@sheetxl/studio-vanilla 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{Df9MYHn7aVLA7abz.cjs → 1zYdog8qXa0d3Zdc.cjs} +2 -2
- package/browser/cjs/{DHES3VrZvl0CSf2G.cjs → 5_QZ1jv3PiD5sQxs.cjs} +1 -1
- package/browser/cjs/Azt9pXhby3025iCa.cjs +145 -0
- package/browser/cjs/B0-sKcMvqrTCj1W0.cjs +14 -0
- package/browser/cjs/B5aj3COvUYYL2V3Q.cjs +7 -0
- package/browser/cjs/{CF0dYrnCZLK0SIwW.cjs → B80HjTD4cFfmCnbb.cjs} +1 -1
- package/browser/cjs/BJEfsjAXKDcrhCQ1.cjs +42 -0
- package/browser/cjs/{UdSif7-6u2CCyoCF.cjs → BJip2JeUgdm1gdEL.cjs} +2 -2
- package/browser/cjs/{BvtpgA7Hgaq6ZV2H.cjs → BLY_1e95Filufqdx.cjs} +1 -1
- package/browser/cjs/{B60hIOo5qZUt-0c9.cjs → BNWAnfdoqNPbNsGN.cjs} +1 -1
- package/browser/cjs/{CKIX0AfAnOnjimpb.cjs → BQbFU2OmhsMDUeqi.cjs} +1 -1
- package/browser/cjs/{DplqlJ7HcglmlTGS.cjs → BR-bSvOGgb_GRmWp.cjs} +5 -5
- package/browser/cjs/BS1q87OHwPqSJ1bl.cjs +7 -0
- package/browser/cjs/BVhF4DreVQaqr1Gj.cjs +6 -0
- package/browser/cjs/{C6aDurA3QFvuwi2s.cjs → BW_Jv9IkXsEgEpC8.cjs} +1 -1
- package/browser/cjs/{CeZwZsfBSeNFzBRj.cjs → BZ2ahkzYDIM5YgtO.cjs} +1 -1
- package/browser/cjs/{BeOlGuqc3a-VytP2.cjs → BcgrclzWuOKXTHdW.cjs} +1 -1
- package/browser/cjs/{C3rAuKXyv3IAMarI.cjs → Bhg-cGfpgpU0fxHZ.cjs} +1 -1
- package/browser/cjs/BkVA7E2W2aT2A0CB.cjs +6 -0
- package/browser/cjs/Bspms_gh_2sn50Nl.cjs +6 -0
- package/browser/cjs/C0D7ZCiR6iJJHxzs.cjs +15 -0
- package/browser/cjs/{qJWlVkguMbHKZo4U.cjs → CBOL7W2cOBVRfxmn.cjs} +2 -2
- package/browser/cjs/{Ce5kMQ7KyLM0FD-L.cjs → CCS2mlgdmPO-joBi.cjs} +1 -1
- package/browser/cjs/{DdMY09pvx5ru0U1Q.cjs → CM391fD-pdPsdeyi.cjs} +1 -1
- package/browser/cjs/{B1jgIjvlVNA8GFNW.cjs → CSzrFvyvVQPaY4q5.cjs} +3 -3
- package/browser/cjs/{DbatomO6r9W0NwNu.cjs → CTshgy8ZuonQcmqq.cjs} +12 -12
- package/browser/cjs/CVtM8GpTGttpr3f9.cjs +16 -0
- package/browser/cjs/{C_lS_SrpK8RvrliQ.cjs → Cam3olL5eRcwBeeS.cjs} +1 -1
- package/browser/cjs/{CPs17M3Xf7TIphbH.cjs → CdXgLoA0hWxBaURc.cjs} +1 -1
- package/browser/cjs/{DSF8l2QqwXpTN4Ja.cjs → ChDi349DWzrLqyun.cjs} +1 -1
- package/browser/cjs/{DoJVL2XhmzNjb-lR.cjs → Cr-2DxqUfd4v88zv.cjs} +2 -2
- package/browser/cjs/{BFiaTsn72ZQNY4wG.cjs → CrG2J1KvKc3HbFIE.cjs} +1 -1
- package/browser/cjs/{C0Lkr_--Cxs31BDb.cjs → Cv5o17EIMATMsr8f.cjs} +1 -1
- package/browser/cjs/D1Dhs73i8o7-FIaD.cjs +124 -0
- package/browser/cjs/{Bz6JSFIxWIFlSIbO.cjs → D2-xpdWkFbALY_WU.cjs} +1 -1
- package/browser/cjs/D6yiFf4TJuOHHtoH.cjs +11 -0
- package/browser/cjs/DBDrj3h1JjZiBMa8.cjs +330 -0
- package/browser/cjs/{BtpdtK6X5kYFON_1.cjs → DDF8KFL-nEus-QvN.cjs} +2 -2
- package/browser/cjs/DEam2iCvaj-ZR4eh.cjs +161 -0
- package/browser/cjs/DHrnzkL6IERuxmDn.cjs +19 -0
- package/browser/cjs/{CXie1KeQLXlWtuFB.cjs → DJYMM1LyunTuaOWP.cjs} +2 -2
- package/browser/cjs/{JMbMtOhA1iNAqg9M.cjs → DL3VLsJ8itUm-LtW.cjs} +2 -2
- package/browser/cjs/DSFfSwhlEclK1Aek.cjs +15 -0
- package/browser/cjs/{B3J8lwJ5LijhN3tn.cjs → DTwJWL_cSMyZaCZB.cjs} +1 -1
- package/browser/cjs/{DE4vWhD9gh5TzYDS.cjs → DUbLz1o9lnw1uq6d.cjs} +2 -2
- package/browser/cjs/DZbUYla0CQiotIo8.cjs +12 -0
- package/browser/cjs/{-e-e6x4DydOkgfVc.cjs → Dcvu8L24Gcr1GP7k.cjs} +1 -1
- package/browser/cjs/{BtFsTB7tByGgTFTS.cjs → DpVPRWncWDgBgvNO.cjs} +1 -1
- package/browser/cjs/{BRbmq4oKdNRRdQVw.cjs → HOyt4hU__hZ2hm-F.cjs} +1 -1
- package/browser/cjs/{BnSv5t6KM-F6UjnT.cjs → I-kfNDgV4THfRo0T.cjs} +2 -2
- package/browser/cjs/{OLabgsQBwtaTK0W0.cjs → Lhmlr-QUTOPxgg5P.cjs} +2 -2
- package/browser/cjs/{dpPMu9SnEmkjFxLS.cjs → Y9nO45RPuXfLWm-6.cjs} +1 -1
- package/browser/cjs/{BkSrJaacn3OYpKiI.cjs → YUHgcBbx-ZbhOCcQ.cjs} +1 -1
- package/browser/cjs/{B_tAQ6NjYmRgJfjr.cjs → ZW13KkvmrVnYw0cE.cjs} +2 -2
- package/browser/cjs/{Dlx1FHAfZ8BCXAv-.cjs → _t4CF2UsxpAVqRut.cjs} +1 -1
- package/browser/cjs/{B4IvAxHfbs1PhNrl.cjs → fjQPZtynU3mYH_0D.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{B19XDmw3OEi3gSNn.cjs → pMhwMbeyP1bo-wZQ.cjs} +5 -5
- package/{cdn/assets/BQl8_GephJT1zJkF.js → browser/esm/-Fcql0_Npsn0DVrs.mjs} +1 -1
- package/browser/esm/{DyIyAX_MrOKaiauf.mjs → 48uygBhar8DWCCsM.mjs} +8 -8
- package/browser/esm/{BbI24vIIyg7QnIWY.mjs → 9i4b4c1pcNwZX0fZ.mjs} +2 -2
- package/browser/esm/{DqpL0PUcHc2yhukz.mjs → B4IK82We7Da4E9tg.mjs} +1 -1
- package/{cdn/assets/BpJyUoZ7qbXZNfEv.js → browser/esm/B9_eUXADGd0bdNnR.mjs} +1 -1
- package/{cdn/assets/CTgBHefewD51JTeI.js → browser/esm/BEtJFqOU9nC8A2sK.mjs} +1 -1
- package/browser/esm/{D_Da-BJ5yYKKDQ4f.mjs → BGVVoj6X9Y8m2D0b.mjs} +5 -5
- package/browser/esm/{B1YdsvFxgY3cBuvU.mjs → BHoeS0PxSxTAsV0B.mjs} +5 -5
- package/browser/esm/{C2oRTm-hB0wbzQzF.mjs → BPOla9qtBml8E1x4.mjs} +12 -12
- package/browser/esm/{BHMr0Avspy2bTfaW.mjs → BWerNcQbiUVSjebb.mjs} +9 -9
- package/browser/esm/{C7ota-WuLdqFs7uL.mjs → BX8ow8XUirJwRShD.mjs} +1 -1
- package/browser/esm/{29gCxd6vbI5VRTfn.mjs → BZWo5ZhsPD6G2LJE.mjs} +168 -168
- package/browser/esm/{BEJRY0y2fQ4GPPtE.mjs → BcuoVEbkuLMuOgsN.mjs} +38 -38
- package/browser/esm/{l3bAiTRrp-5sxROq.mjs → BdBXQZZ2JQ6jdQE4.mjs} +1 -1
- package/browser/esm/{i-cDcFJjQOjsCvkc.mjs → Be5jXSvhb1Rf2PRM.mjs} +6 -6
- package/browser/esm/{DwxBIXOwBXJ0OfuA.mjs → Bg9vU4HVvcZc03_t.mjs} +87 -87
- package/browser/esm/{DPIItzNnxMbq2VfI.mjs → Bn4R4Q0WOoJIwlPq.mjs} +14 -14
- package/browser/esm/{BDwfJYYjLxGxBbfd.mjs → BoyMLYw3HQEO6sYS.mjs} +16 -16
- package/{cdn/assets/CJkiM4g8IYjNDixD.js → browser/esm/BsmwLgpQeALH-w3s.mjs} +1 -1
- package/browser/esm/{DtVOzXc0D5P_N9Tm.mjs → C3yp0gvuwSBeMV3U.mjs} +8 -8
- package/browser/esm/{CWYXCDadrTpz_-C_.mjs → C64Rlw6Y3dk5JexR.mjs} +1758 -1713
- package/{cdn/assets/C01DVMkA79lIKwia.js → browser/esm/CBd8lwquhiczBXjG.mjs} +160 -160
- package/browser/esm/{XG8H8R2jYaQEG5vJ.mjs → CHKvrfyPQNt8UR-h.mjs} +1 -1
- package/browser/esm/{cRhgWaTuF5ulsTUo.mjs → CO7H2CBFpfe07A6E.mjs} +4 -4
- package/browser/esm/{PL8e8GY7OsUL26sU.mjs → CPad23NHuChutDpk.mjs} +1 -1
- package/browser/esm/{DTrC3bkaQd-PALtG.mjs → CQ-H3xs7a6NEfMIg.mjs} +1 -1
- package/browser/esm/{CZ7Use237ej2QPOK.mjs → CXuVB3sMtM2YgwPI.mjs} +16 -16
- package/{cdn/assets/BbFWsuy2TOFb7L6V.js → browser/esm/Cb00heGGHcib78wa.mjs} +357 -356
- package/browser/esm/{BgxNRZhNxwSVMObt.mjs → Cgx9V9Ke-kC8Yy-1.mjs} +586 -586
- package/browser/esm/{BkguhAeEvTcTVZN3.mjs → CiEdwCdT3eUx6KGp.mjs} +10 -10
- package/{cdn/assets/DqY233UP8cctSm77.js → browser/esm/ClLRC3MXwTwtpv_j.mjs} +1 -1
- package/browser/esm/{DqHHGbrzfGptVwKT.mjs → ClRxC7LWi49sEr88.mjs} +1 -1
- package/browser/esm/{BIU3HZSh3eHX5SVx.mjs → CqBxL3mNjb9IT3GC.mjs} +6 -6
- package/browser/esm/{BmQ1SS-asI9ita-i.mjs → Csod6y1vhBdmnq4n.mjs} +193 -193
- package/{cdn/assets/Bn4AQ04vq7zHnoL_.js → browser/esm/CuN4rLR5waiMIcqA.mjs} +1 -1
- package/{cdn/assets/nXa-TVOMsrXxtuc9.js → browser/esm/D662kkUP_xTgNXkI.mjs} +1 -1
- package/browser/esm/{NQYuQ6Fwe1hZ8G7q.mjs → DCheUmm1dBVJ-DWK.mjs} +60 -60
- package/browser/esm/{CC7AU2fXo3KfvWsR.mjs → DF2oP1VjAoMMifdb.mjs} +1 -1
- package/{cdn/assets/BZmUvqJx-yz1aU-5.js → browser/esm/DKvdjpR0ncopbmoF.mjs} +1 -1
- package/{cdn/assets/0w-BNQGPkDhzl4XV.js → browser/esm/D_MtO6kKW24xV-W0.mjs} +1 -1
- package/browser/esm/{BJ7Roh6BEZyEYCBf.mjs → DkU5Kch1MCzwPD9a.mjs} +1 -1
- package/browser/esm/{fRJbgbZ_fawDpe4Y.mjs → Dki5OG4IbBdpA0yV.mjs} +17 -17
- package/browser/esm/{BLoVxuMcliAyTYvm.mjs → Dkoxlchz_jG7-WiW.mjs} +1 -1
- package/browser/esm/{BPpmr49quCMrgcX0.mjs → DlA0Kal3tG1wqZ59.mjs} +1 -1
- package/browser/esm/{BnusHharCufsqHcK.mjs → Doz0JVsEWJcEBipq.mjs} +8 -8
- package/{cdn/assets/BFrPcKvgjQjcu9eN.js → browser/esm/DsRTdsIsu1TzwLNZ.mjs} +1 -1
- package/browser/esm/{5FUp9qfD2-cbJjYw.mjs → DuaF3ylbXGFvZSIS.mjs} +1 -1
- package/browser/esm/{Df2NuZU9juUIKwg8.mjs → Dxev2aiMIU8WjdUC.mjs} +7 -7
- package/{cdn/assets/Buboguw3B4iA6kZz.js → browser/esm/F0wAsfl9Ji5ebBCs.mjs} +75 -82
- package/browser/esm/{DWr4xYPlaw8j1mv4.mjs → IF0rBHM9lIcdub12.mjs} +8 -8
- package/{cdn/assets/ClOj__E12OzLFjTs.js → browser/esm/M4lhucsN_zAaGwFD.mjs} +1 -1
- package/{cdn/assets/iEQmmn4nEfkZiIn_.js → browser/esm/Peb2xy79-OyfnYRG.mjs} +1 -1
- package/browser/esm/{EN4tauuENSQlsREt.mjs → R43eSIVhCZoqF7wj.mjs} +15324 -15207
- package/browser/esm/{Bv8yISQhT9pU00bI.mjs → YV7wbRU5yPGUrR_v.mjs} +10 -10
- package/{cdn/assets/67jatfS90fzwU27R.js → browser/esm/f2UZMVRMnRaCubeO.mjs} +17 -17
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{BSwvcpIMVfqXj73i.mjs → ux2kqLYHyHURPhVT.mjs} +1 -1
- package/browser/esm/{PK_vF_J7qweQDmnh.mjs → wsm5tvwmcmfL7rhP.mjs} +4 -4
- package/{browser/esm/BQl8_GephJT1zJkF.mjs → cdn/assets/-Fcql0_Npsn0DVrs.js} +1 -1
- package/cdn/assets/{CZq9aU6b4OMjD4So.js → B2cdxnKnNszJMC4H.js} +10 -10
- package/cdn/assets/{BDYXl0I19foxo18Q.js → B2yfFuEr6giDTnKh.js} +3 -3
- package/cdn/assets/{DqpL0PUcHc2yhukz.js → B4IK82We7Da4E9tg.js} +1 -1
- package/cdn/assets/{B-vmqKXIqM4BtjB0.js → B969C0F_SSsr8Zc5.js} +4 -4
- package/{browser/esm/BpJyUoZ7qbXZNfEv.mjs → cdn/assets/B9_eUXADGd0bdNnR.js} +1 -1
- package/{browser/esm/CTgBHefewD51JTeI.mjs → cdn/assets/BEtJFqOU9nC8A2sK.js} +1 -1
- package/cdn/assets/{C7ota-WuLdqFs7uL.js → BX8ow8XUirJwRShD.js} +1 -1
- package/cdn/assets/{VSTVSUa9PQF0q0El.js → BYHIkmh97LsBnG1S.js} +4 -4
- package/cdn/assets/{CwNV1YGbYAb8Uj2X.js → B_xb7j5m4CnNhL56.js} +13 -13
- package/cdn/assets/{BEJRY0y2fQ4GPPtE.js → BcuoVEbkuLMuOgsN.js} +38 -38
- package/cdn/assets/{l3bAiTRrp-5sxROq.js → BdBXQZZ2JQ6jdQE4.js} +1 -1
- package/cdn/assets/{BgeMTXAZBFP6Lm1K.js → Bp8Toqq2o-amIzTP.js} +53 -53
- package/{browser/esm/CJkiM4g8IYjNDixD.mjs → cdn/assets/BsmwLgpQeALH-w3s.js} +1 -1
- package/cdn/assets/{Bt9u_FUrrLFhsXQD.js → Bz9Wj39Z8h20d1lf.js} +1758 -1713
- package/cdn/assets/{BlI6YZ6neVjkkQx2.js → C1oRqKDe0_vss7cM.js} +195 -195
- package/cdn/assets/{CMro8-BzdQ70fPcS.js → C4DdXn1P3Zn6Bzj4.js} +13 -13
- package/cdn/assets/{C9OEMeyLi2PcGoM_.js → C6SGlMEc9kv06D7t.js} +8 -8
- package/cdn/assets/{3UI-_5R_kCNSpf11.js → C9eSV0WW9BsKm3qs.js} +12 -12
- package/cdn/assets/CBidCVRwieqhT02B.js +22 -0
- package/cdn/assets/{XG8H8R2jYaQEG5vJ.js → CHKvrfyPQNt8UR-h.js} +1 -1
- package/cdn/assets/{BjiRKxp3WuyUvzaK.js → CLLBiXnZaFLK9qAJ.js} +26 -26
- package/cdn/assets/{C9RXOT83ZaDxZypr.js → COL1hzit7RTYn1H8.js} +16 -16
- package/cdn/assets/{PL8e8GY7OsUL26sU.js → CPad23NHuChutDpk.js} +1 -1
- package/cdn/assets/{DTrC3bkaQd-PALtG.js → CQ-H3xs7a6NEfMIg.js} +1 -1
- package/cdn/assets/{_VkCiSR35Ycf4qMs.js → CUQaEYkN7_byzfC3.js} +17 -17
- package/{browser/esm/BbFWsuy2TOFb7L6V.mjs → cdn/assets/Cb00heGGHcib78wa.js} +357 -356
- package/{browser/esm/C7KXRC3vXznZQMjB.mjs → cdn/assets/CcLzQyk7hV5jHQuF.js} +160 -160
- package/cdn/assets/{BgxNRZhNxwSVMObt.js → Cgx9V9Ke-kC8Yy-1.js} +586 -586
- package/{browser/esm/DqY233UP8cctSm77.mjs → cdn/assets/ClLRC3MXwTwtpv_j.js} +1 -1
- package/cdn/assets/{DqHHGbrzfGptVwKT.js → ClRxC7LWi49sEr88.js} +1 -1
- package/cdn/assets/{DDebECDOqTJ8ep5A.js → CpV4Dryu4t4_XGaX.js} +14382 -14265
- package/{browser/esm/Bn4AQ04vq7zHnoL_.mjs → cdn/assets/CuN4rLR5waiMIcqA.js} +1 -1
- package/cdn/assets/{_kc0UHqioVnr5VaW.js → CwOGnVKqDao9B4aC.js} +17 -17
- package/{browser/esm/nXa-TVOMsrXxtuc9.mjs → cdn/assets/D662kkUP_xTgNXkI.js} +1 -1
- package/cdn/assets/{pQH8gesojID3Qjpt.js → D7KLwOZJsB8qva99.js} +168 -168
- package/cdn/assets/{CC7AU2fXo3KfvWsR.js → DF2oP1VjAoMMifdb.js} +1 -1
- package/{browser/esm/BZmUvqJx-yz1aU-5.mjs → cdn/assets/DKvdjpR0ncopbmoF.js} +1 -1
- package/cdn/assets/{CR_vqV_czKiKF4fw.js → DLPL0BN1jCagoeeF.js} +1 -1
- package/cdn/assets/{DJ5kSGtcg1tDP5HP.js → DRxLV4wDTgL3S7DO.js} +13 -13
- package/cdn/assets/{CjpVzFKvzpgazG0_.js → DYn_QqqM3OWy0JdS.js} +4 -4
- package/cdn/assets/{BJVeRrxdO-nBr5NZ.js → DYyFtelhventSzEM.js} +2 -2
- package/{browser/esm/0w-BNQGPkDhzl4XV.mjs → cdn/assets/D_MtO6kKW24xV-W0.js} +1 -1
- package/cdn/assets/{CoHkOJBYGnv7nVtH.js → Dbwc59ZDNvfOHi8j.js} +9 -9
- package/cdn/assets/{D6rXwkO_1Ii6alNc.js → DkFCQCOf6-Qxqc5d.js} +10 -10
- package/cdn/assets/{BJ7Roh6BEZyEYCBf.js → DkU5Kch1MCzwPD9a.js} +1 -1
- package/cdn/assets/{BLoVxuMcliAyTYvm.js → Dkoxlchz_jG7-WiW.js} +1 -1
- package/cdn/assets/{BPpmr49quCMrgcX0.js → DlA0Kal3tG1wqZ59.js} +1 -1
- package/cdn/assets/{C4K-H3IXpWDSbdYQ.js → Dr8ZNvb4SNA45-gg.js} +12 -12
- package/cdn/assets/{CVdAYNj8GYvhnIO9.js → DrzicXpG2v4dQ2Ho.js} +8 -8
- package/{browser/esm/BFrPcKvgjQjcu9eN.mjs → cdn/assets/DsRTdsIsu1TzwLNZ.js} +1 -1
- package/cdn/assets/{Cr_OegqF4_kCciKy.js → DuWmjtPMudGm_ylm.js} +35 -35
- package/cdn/assets/{5FUp9qfD2-cbJjYw.js → DuaF3ylbXGFvZSIS.js} +1 -1
- package/cdn/assets/{DBZHLc-qxHxMEvda.js → DyUGLrGeH6x2QfAr.js} +7 -7
- package/{browser/esm/Buboguw3B4iA6kZz.mjs → cdn/assets/F0wAsfl9Ji5ebBCs.js} +75 -82
- package/cdn/assets/{Bkevg67QC8R5eRdN.js → FG_5iagC6tIY_EKf.js} +5 -5
- package/{browser/esm/ClOj__E12OzLFjTs.mjs → cdn/assets/M4lhucsN_zAaGwFD.js} +1 -1
- package/cdn/assets/{BxZmciTi6VGgkute.js → NmBw2555wKBuiEyk.js} +112 -112
- package/{browser/esm/iEQmmn4nEfkZiIn_.mjs → cdn/assets/Peb2xy79-OyfnYRG.js} +1 -1
- package/{browser/esm/67jatfS90fzwU27R.mjs → cdn/assets/f2UZMVRMnRaCubeO.js} +17 -17
- package/cdn/assets/{Bws93VgZItsFgUk3.js → fvfDZivW0cwsOaKE.js} +2 -2
- package/cdn/assets/{BGgSpq92Z9F-Ntye.js → riGQb700XY8gmi1f.js} +3 -3
- package/cdn/assets/{BSwvcpIMVfqXj73i.js → ux2kqLYHyHURPhVT.js} +1 -1
- package/cdn/assets/{PK_vF_J7qweQDmnh.js → wsm5tvwmcmfL7rhP.js} +4 -4
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/browser/cjs/0Y5TF7N-_tzvHQVc.cjs +0 -124
- package/browser/cjs/6wuTyFc2OkEg0YDy.cjs +0 -7
- package/browser/cjs/B9eXjWPqyv2f2Vlb.cjs +0 -19
- package/browser/cjs/BDk6w5arhq-Is61b.cjs +0 -12
- package/browser/cjs/BGzSwhO2H5T4phR5.cjs +0 -161
- package/browser/cjs/BJ1WplGSHjaVniJ2.cjs +0 -11
- package/browser/cjs/BWJjG9lChn_biRWK.cjs +0 -16
- package/browser/cjs/BynqqUXsUJ6HXiZn.cjs +0 -145
- package/browser/cjs/CUZ2Y1rgKje31rmq.cjs +0 -15
- package/browser/cjs/D-jAZv3G7PXDD1Cl.cjs +0 -330
- package/browser/cjs/DEKywAPnit6nelii.cjs +0 -7
- package/browser/cjs/DMVOPwwm1q8F1Fmb.cjs +0 -6
- package/browser/cjs/DUnBXgtPLOvtvcMm.cjs +0 -15
- package/browser/cjs/DmtRLRLitcmFXNBb.cjs +0 -6
- package/browser/cjs/Hboq9CzOQN_f83xm.cjs +0 -42
- package/browser/cjs/gAS-cGAMFNh1L6Q8.cjs +0 -14
- package/browser/cjs/zZBeoLrH03ilFGbk.cjs +0 -6
- package/cdn/assets/BeIJny9YSrpatFa_.js +0 -22
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./DBDrj3h1JjZiBMa8.cjs"),g=require("./BR-bSvOGgb_GRmWp.cjs");class X{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const z=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,$=u=>{const t=parseInt(u);return isNaN(t)?null:t},G=u=>{const t=parseFloat(u);return isNaN(t)?null:t},W=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??W}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new X(s)}getFromPath(t,e){return p.Xt.getFromPath(t,e)}setToPath(t,e,s){return p.Xt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return z}get INT_COPY(){return $}get FLOAT_COPY(){return G}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class K{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Xt.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Z{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class J{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class q extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const M=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class Q{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){M(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class tt{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),f(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),M(t,e,i),i}}class et{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class k{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),f(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),A(t,e,r,"majorTickMark","majorTickMarks"),A(t,e,r,"minorTickMark","minorTickMarks"),A(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),A(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),A(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),A(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let d=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),d?h.text=d.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&Y(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[p.oe$1.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class st{visit(t,e,s){const r={};return f(t,e,r,"overlay","overlay"),A(t,e,r,"legendPos","position"),s.legend=r,r}}class ot extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class _ extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};f(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class it{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),A(t,r,o,"xMode","xMode"),A(t,r,o,"yMode","yMode"),A(t,r,o,"wMode","wMode"),A(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class nt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class lt extends D{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class at{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[p.oe$1.getPanoseFallback(i)]),s}}class ct{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ut{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:p.cd.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:p.cd.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:p.cd.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:p.cd.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:p.cd.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:p.cd.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=g.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=g.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class ht{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=g.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?p.Jr.CaseSensitiveOptions:p.Jr.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&g.b(e.getAttribute("columnSort"))&&(r.orientation=p.w.Orientation.Column);const i=p.Zr.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=p.Zr.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=g.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class U{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=g.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=p.oe$1.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||p.oe$1.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.oe$1.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.oe$1.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Z$1.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Z$1.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Z$1.BuiltInSheetPattern.Solid:p.Z$1.BuiltInSheetPattern.None);if(o===p.Z$1.BuiltInSheetPattern.None)return{none:!0};s.type=p.Z$1.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Z$1.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.U.Edge.Left),this.processBorderStroke(t,e,i,p.U.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.U.Edge.Vertical),this.processBorderStroke(t,e,i,p.U.Edge.Top),this.processBorderStroke(t,e,i,p.U.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.U.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends U{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:p.Z$1.Type.None},r.fills[1]={type:p.Z$1.Type.Pattern,patternType:p.Z$1.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.he.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||g.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let d;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(d=b.get(h)),s.numberFormat=d??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=g.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=p.X.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.X.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,g.b(e?.getAttribute("wrapText"))?r.overflow=p.X.Overflow.Wrap:r.overflow=p.X.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.X.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=g.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=p.X.ReadingDirection.Auto:o==="1"?r.readingDirection=p.X.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.X.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!g.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&g.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=g.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=g.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),d=c.getAttribute("dxfId");let m=r?.[d];m||(console.warn("invalid dfx id",d),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const d=a.item(h);d.nodeType===1&&d.localName==="tableStyle"&&this.processTableStyle(t,d,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=g.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class gt extends U{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class dt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class mt{visit(t,e,s){return s}}class x{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.n.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new K),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Z),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new J),this.registerVisitor("c:barChart",new q),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Q),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new k),this.registerVisitor("c:valAx",new k),this.registerVisitor("c:dateAx",new k),this.registerVisitor("c:majorGridlines",new S("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new S("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new st),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new rt),this.registerVisitor("c:ser",new ot,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new _),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new it),this.registerVisitor("c:dispUnits",new S("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new _("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new nt),this.registerVisitor("a:theme",new lt,"themeElements/clrScheme"),this.registerVisitor("a:theme",new at,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ut),this.registerVisitor("sortState",new ht),this.registerVisitor("s:workbook",new gt),this.registerVisitor("styleSheet",new pt),this.registerVisitor("table",new dt),this.registerVisitor("hlinkClick",new ct),this.registerVisitor("wsDr",new mt),this.registerVisitor("twoCellAnchor",new x),this.registerVisitor("oneCellAnchor",new x),this.registerVisitor("absoluteAnchor",new x),this.registerVisitor("graphicFrame",new bt),this.registerVisitor("sp",new B),this.registerVisitor("grpSp",new At),this.registerVisitor("cxnSp",new yt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new vt),this.registerVisitor("rvData",new Ft),this.registerVisitor("comments",new Ct),this.registerVisitor("commentList",new wt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Pt),this.registerVisitor("threadedComment",new Nt),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Ot)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Tt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new V(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(d){console.warn(`Error in afterVisit: ${h.context.getPath()}`,d)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const d=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)d(m.item(b))}else d(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const d=c.item(h);if(d.nodeType===1){const m=d,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=E,exports.default=E;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/function Pe(){}function R(e){return typeof e=="object"&&e!==null||typeof e=="function"}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tr=Pe;function m(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}const St=Promise,eo=Promise.resolve.bind(St),to=Promise.prototype.then,ro=Promise.reject.bind(St),oo=eo;function C(e){return new St(e)}function v(e){return C(t=>t(e))}function c(e){return ro(e)}function B(e,t,r){return to.call(e,t,r)}function W(e,t,r){B(B(e,t,r),void 0,tr)}function nt(e,t){W(e,t)}function bt(e,t){W(e,void 0,t)}function se(e,t,r){return B(e,t,r)}function Ae(e){B(e,void 0,tr)}let le=e=>{if(typeof queueMicrotask=="function")le=queueMicrotask;else{const t=v(void 0);le=r=>B(t,r)}return le(e)};function me(e,t,r){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function ge(e,t,r){try{return v(me(e,t,r))}catch(o){return c(o)}}class A{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const r=this._back;let o=r;r._elements.length===16383&&(o={_elements:[],_next:void 0}),r._elements.push(t),o!==r&&(this._back=o,r._next=o),++this._size}shift(){const t=this._front;let r=t;const o=this._cursor;let i=o+1;const n=t._elements,s=n[o];return i===16384&&(r=t._next,i=0),--this._size,this._cursor=i,t!==r&&(this._front=r),n[o]=void 0,s}forEach(t){let r=this._cursor,o=this._front,i=o._elements;for(;!(r===i.length&&o._next===void 0||r===i.length&&(o=o._next,i=o._elements,r=0,i.length===0));)t(i[r]),++r}peek(){const t=this._front,r=this._cursor;return t._elements[r]}}const rr=Symbol("[[AbortSteps]]"),or=Symbol("[[ErrorSteps]]"),Rt=Symbol("[[CancelSteps]]"),Tt=Symbol("[[PullSteps]]"),qt=Symbol("[[ReleaseSteps]]");function nr(e,t){var r;e._ownerReadableStream=t,t._reader=e,t._state==="readable"?ht(e):t._state==="closed"?(ht(r=e),ar(r)):ir(e,t._storedError)}function Et(e,t){return k(e._ownerReadableStream,t)}function M(e){const t=e._ownerReadableStream;t._state==="readable"?Pt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ir(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[qt](),t._reader=void 0,e._ownerReadableStream=void 0}function Ge(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function ht(e){e._closedPromise=C((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}function ir(e,t){ht(e),Pt(e,t)}function Pt(e,t){e._closedPromise_reject!==void 0&&(Ae(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function ar(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const xt=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},no=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function H(e,t){if(e!==void 0&&typeof(r=e)!="object"&&typeof r!="function")throw new TypeError(`${t} is not an object.`);var r}function K(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}function sr(e,t){if(!(function(r){return typeof r=="object"&&r!==null||typeof r=="function"})(e))throw new TypeError(`${t} is not an object.`)}function ue(e,t,r){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function Nt(e,t,r){if(e===void 0)throw new TypeError(`${t} is required in '${r}'.`)}function lr(e){return Number(e)}function Yt(e){return e===0?0:e}function Ct(e,t){const r=Number.MAX_SAFE_INTEGER;let o=Number(e);if(o=Yt(o),!xt(o))throw new TypeError(`${t} is not a finite number`);if(o=Yt(no(o)),o<0||o>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return xt(o)&&o!==0?o:0}function Ot(e,t){if(!Y(e))throw new TypeError(`${t} is not a ReadableStream.`)}function be(e){return new V(e)}function ur(e,t){e._reader._readRequests.push(t)}function jt(e,t,r){const o=e._reader._readRequests.shift();r?o._closeSteps():o._chunkSteps(t)}function Ze(e){return e._reader._readRequests.length}function cr(e){const t=e._reader;return t!==void 0&&!!G(t)}class V{constructor(t){if(ue(t,1,"ReadableStreamDefaultReader"),Ot(t,"First parameter"),X(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");nr(this,t),this._readRequests=new A}get closed(){return G(this)?this._closedPromise:c(ze("closed"))}cancel(t=void 0){return G(this)?this._ownerReadableStream===void 0?c(Ge("cancel")):Et(this,t):c(ze("cancel"))}read(){if(!G(this))return c(ze("read"));if(this._ownerReadableStream===void 0)return c(Ge("read from"));let t,r;const o=C((i,n)=>{t=i,r=n});return Ce(this,{_chunkSteps:i=>t({value:i,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:i=>r(i)}),o}releaseLock(){if(!G(this))throw ze("releaseLock");var t;this._ownerReadableStream!==void 0&&(M(t=this),dr(t,new TypeError("Reader was released")))}}function G(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof V}function Ce(e,t){const r=e._ownerReadableStream;r._disturbed=!0,r._state==="closed"?t._closeSteps():r._state==="errored"?t._errorSteps(r._storedError):r._readableStreamController[Tt](t)}function dr(e,t){const r=e._readRequests;e._readRequests=new A,r.forEach(o=>{o._errorSteps(t)})}function ze(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}var it,at,st;function Se(e){return e.slice()}function fr(e,t,r,o,i){new Uint8Array(e).set(new Uint8Array(r,o,i),t)}Object.defineProperties(V.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),m(V.prototype.cancel,"cancel"),m(V.prototype.read,"read"),m(V.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});let ce=e=>(ce=typeof e.transfer=="function"?t=>t.transfer():typeof structuredClone=="function"?t=>structuredClone(t,{transfer:[t]}):t=>t,ce(e)),de=e=>(de=typeof e.detached=="boolean"?t=>t.detached:t=>t.byteLength===0,de(e));function br(e,t,r){if(e.slice)return e.slice(t,r);const o=r-t,i=new ArrayBuffer(o);return fr(i,0,e,t,o),i}function Te(e,t){const r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(`${String(t)} is not a function`);return r}}function Vt(e){try{const t=e.done,r=e.value;return B(oo(r),o=>({done:t,value:o}))}catch(t){return c(t)}}const ke=(st=(it=Symbol.asyncIterator)!==null&&it!==void 0?it:(at=Symbol.for)===null||at===void 0?void 0:at.call(Symbol,"Symbol.asyncIterator"))!==null&&st!==void 0?st:"@@asyncIterator";function hr(e,t="sync",r){if(r===void 0)if(t==="async"){if((r=Te(e,ke))===void 0)return(function(i){const n={next(){let s;try{s=_r(i)}catch(a){return c(a)}return Vt(s)},return(s){let a;try{const l=Te(i.iterator,"return");if(l===void 0)return v({done:!0,value:s});a=me(l,i.iterator,[s])}catch(l){return c(l)}return R(a)?Vt(a):c(new TypeError("The iterator.return() method must return an object"))}};return{iterator:n,nextMethod:n.next,done:!1}})(hr(e,"sync",Te(e,Symbol.iterator)))}else r=Te(e,Symbol.iterator);if(r===void 0)throw new TypeError("The object is not iterable");const o=me(r,e,[]);if(!R(o))throw new TypeError("The iterator method must return an object");return{iterator:o,nextMethod:o.next,done:!1}}function _r(e){const t=me(e.nextMethod,e.iterator,[]);if(!R(t))throw new TypeError("The iterator.next() method must return an object");return t}class pr{constructor(t,r){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=r}next(){const t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?se(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){const r=()=>this._returnSteps(t);return this._ongoingPromise=this._ongoingPromise?se(this._ongoingPromise,r,r):r(),this._ongoingPromise}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const t=this._reader;let r,o;const i=C((n,s)=>{r=n,o=s});return Ce(t,{_chunkSteps:n=>{this._ongoingPromise=void 0,le(()=>r({value:n,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,M(t),r({value:void 0,done:!0})},_errorSteps:n=>{this._ongoingPromise=void 0,this._isFinished=!0,M(t),o(n)}}),i}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;const r=this._reader;if(!this._preventCancel){const o=Et(r,t);return M(r),se(o,()=>({value:t,done:!0}))}return M(r),v({value:t,done:!0})}}const mr={next(){return Ut(this)?this._asyncIteratorImpl.next():c(Ht("next"))},return(e){return Ut(this)?this._asyncIteratorImpl.return(e):c(Ht("return"))},[ke](){return this}};function Ut(e){if(!R(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof pr}catch{return!1}}function Ht(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}Object.defineProperty(mr,ke,{enumerable:!1});const yr=Number.isNaN||function(e){return e!=e};function Gt(e){const t=br(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function _t(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function At(e,t,r){if(typeof(o=r)!="number"||yr(o)||o<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var o;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Q(e){e._queue=new A,e._queueTotalSize=0}function vr(e){return e===DataView}class ie{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!lt(this))throw ut("view");return this._view}respond(t){if(!lt(this))throw ut("respond");if(ue(t,1,"respond"),t=Ct(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(de(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Ve(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!lt(this))throw ut("respondWithNewView");if(ue(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(de(t.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Ue(this._associatedReadableByteStreamController,t)}}Object.defineProperties(ie.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),m(ie.prototype.respond,"respond"),m(ie.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ie.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class ${constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!oe(this))throw Re("byobRequest");return mt(this)}get desiredSize(){if(!oe(this))throw Re("desiredSize");return jr(this)}close(){if(!oe(this))throw Re("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);qe(this)}enqueue(t){if(!oe(this))throw Re("enqueue");if(ue(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const r=this._controlledReadableByteStream._state;if(r!=="readable")throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`);Ye(this,t)}error(t=void 0){if(!oe(this))throw Re("error");j(this,t)}[Rt](t){wr(this),Q(this);const r=this._cancelAlgorithm(t);return et(this),r}[Tt](t){const r=this._controlledReadableByteStream;if(this._queueTotalSize>0)return void Or(this,t);const o=this._autoAllocateChunkSize;if(o!==void 0){let i;try{i=new ArrayBuffer(o)}catch(s){return void t._errorSteps(s)}const n={buffer:i,bufferByteLength:o,byteOffset:0,byteLength:o,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(n)}ur(r,t),fe(this)}[qt](){if(this._pendingPullIntos.length>0){const t=this._pendingPullIntos.peek();t.readerType="none",this._pendingPullIntos=new A,this._pendingPullIntos.push(t)}}}function oe(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof $}function lt(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof ie}function fe(e){(function(t){const r=t._controlledReadableByteStream;return!(r._state!=="readable"||t._closeRequested||!t._started)&&(!!(cr(r)&&Ze(r)>0||Wt(r)&&kr(r)>0)||jr(t)>0)})(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,W(e._pullAlgorithm(),()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,fe(e)),null),t=>(j(e,t),null))))}function wr(e){kt(e),e._pendingPullIntos=new A}function gr(e,t){let r=!1;e._state==="closed"&&(r=!0);const o=Sr(t);t.readerType==="default"?jt(e,o,r):(function(i,n,s){const a=i._reader._readIntoRequests.shift();s?a._closeSteps(n):a._chunkSteps(n)})(e,o,r)}function xe(e,t){for(let r=0;r<t.length;++r)gr(e,t[r])}function Sr(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Ne(e,t,r,o){e._queue.push({buffer:t,byteOffset:r,byteLength:o}),e._queueTotalSize+=o}function Rr(e,t,r,o){let i;try{i=br(t,r,r+o)}catch(n){throw j(e,n),n}Ne(e,i,0,o)}function Tr(e,t){t.bytesFilled>0&&Rr(e,t.buffer,t.byteOffset,t.bytesFilled),_e(e)}function qr(e,t){const r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+r;let i=r,n=!1;const s=o-o%t.elementSize;s>=t.minimumFill&&(i=s-t.bytesFilled,n=!0);const a=e._queue;for(;i>0;){const l=a.peek(),u=Math.min(i,l.byteLength),h=t.byteOffset+t.bytesFilled;fr(t.buffer,h,l.buffer,l.byteOffset,u),l.byteLength===u?a.shift():(l.byteOffset+=u,l.byteLength-=u),e._queueTotalSize-=u,Er(e,u,t),i-=u}return n}function Er(e,t,r){r.bytesFilled+=t}function Pr(e){e._queueTotalSize===0&&e._closeRequested?(et(e),We(e._controlledReadableByteStream)):fe(e)}function kt(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function pt(e){const t=[];for(;e._pendingPullIntos.length>0&&e._queueTotalSize!==0;){const r=e._pendingPullIntos.peek();qr(e,r)&&(_e(e),t.push(r))}return t}function Cr(e,t){const r=e._pendingPullIntos.peek();kt(e),e._controlledReadableByteStream._state==="closed"?(function(o,i){i.readerType==="none"&&_e(o);const n=o._controlledReadableByteStream;if(Wt(n)){const s=[];for(;s.length<kr(n);)s.push(_e(o));xe(n,s)}})(e,r):(function(o,i,n){if(Er(0,i,n),n.readerType==="none"){Tr(o,n);const l=pt(o);return void xe(o._controlledReadableByteStream,l)}if(n.bytesFilled<n.minimumFill)return;_e(o);const s=n.bytesFilled%n.elementSize;if(s>0){const l=n.byteOffset+n.bytesFilled;Rr(o,n.buffer,l-s,s)}n.bytesFilled-=s;const a=pt(o);gr(o._controlledReadableByteStream,n),xe(o._controlledReadableByteStream,a)})(e,t,r),fe(e)}function _e(e){return e._pendingPullIntos.shift()}function et(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function qe(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&t._state==="readable")if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){const r=e._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!==0){const o=new TypeError("Insufficient bytes to fill elements in the given buffer");throw j(e,o),o}}et(e),We(t)}}function Ye(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||r._state!=="readable")return;const{buffer:o,byteOffset:i,byteLength:n}=t;if(de(o))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const s=ce(o);if(e._pendingPullIntos.length>0){const a=e._pendingPullIntos.peek();if(de(a.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");kt(e),a.buffer=ce(a.buffer),a.readerType==="none"&&Tr(e,a)}cr(r)?((function(a){const l=a._controlledReadableByteStream._reader;for(;l._readRequests.length>0;){if(a._queueTotalSize===0)return;Or(a,l._readRequests.shift())}})(e),Ze(r)===0?Ne(e,s,i,n):(e._pendingPullIntos.length>0&&_e(e),jt(r,new Uint8Array(s,i,n),!1))):Wt(r)?(Ne(e,s,i,n),xe(r,pt(e))):Ne(e,s,i,n),fe(e)}function j(e,t){const r=e._controlledReadableByteStream;r._state==="readable"&&(wr(e),Q(e),et(e),Qr(r,t))}function Or(e,t){const r=e._queue.shift();e._queueTotalSize-=r.byteLength,Pr(e);const o=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(o)}function mt(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){const i=e._pendingPullIntos.peek(),n=new Uint8Array(i.buffer,i.byteOffset+i.bytesFilled,i.byteLength-i.bytesFilled),s=Object.create(ie.prototype);r=e,o=n,(t=s)._associatedReadableByteStreamController=r,t._view=o,e._byobRequest=s}var t,r,o;return e._byobRequest}function jr(e){const t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Ve(e,t){const r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=ce(r.buffer),Cr(e,t)}function Ue(e,t){const r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const o=t.byteLength;r.buffer=ce(t.buffer),Cr(e,o)}function Ar(e,t,r,o,i,n,s){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Q(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=n,t._pullAlgorithm=o,t._cancelAlgorithm=i,t._autoAllocateChunkSize=s,t._pendingPullIntos=new A,e._readableStreamController=t,W(v(r()),()=>(t._started=!0,fe(t),null),a=>(j(t,a),null))}function ut(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Re(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function io(e,t){if((e=`${e}`)!="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Xt(e){return new U(e)}function Jt(e,t){e._reader._readIntoRequests.push(t)}function kr(e){return e._reader._readIntoRequests.length}function Wt(e){const t=e._reader;return t!==void 0&&!!ae(t)}Object.defineProperties($.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),m($.prototype.close,"close"),m($.prototype.enqueue,"enqueue"),m($.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class U{constructor(t){if(ue(t,1,"ReadableStreamBYOBReader"),Ot(t,"First parameter"),X(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!oe(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");nr(this,t),this._readIntoRequests=new A}get closed(){return ae(this)?this._closedPromise:c(Be("closed"))}cancel(t=void 0){return ae(this)?this._ownerReadableStream===void 0?c(Ge("cancel")):Et(this,t):c(Be("cancel"))}read(t,r={}){if(!ae(this))return c(Be("read"));if(!ArrayBuffer.isView(t))return c(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return c(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return c(new TypeError("view's buffer must have non-zero byteLength"));if(de(t.buffer))return c(new TypeError("view's buffer has been detached"));let o;try{H(i=r,n="options"),o={min:Ct((s=i?.min)!==null&&s!==void 0?s:1,`${n} has member 'min' that`)}}catch(f){return c(f)}var i,n,s;const a=o.min;if(a===0)return c(new TypeError("options.min must be greater than 0"));if((function(f){return vr(f.constructor)})(t)){if(a>t.byteLength)return c(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(a>t.length)return c(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return c(Ge("read from"));let l,u;const h=C((f,b)=>{l=f,u=b});return Wr(this,t,a,{_chunkSteps:f=>l({value:f,done:!1}),_closeSteps:f=>l({value:f,done:!0}),_errorSteps:f=>u(f)}),h}releaseLock(){if(!ae(this))throw Be("releaseLock");var t;this._ownerReadableStream!==void 0&&(M(t=this),zr(t,new TypeError("Reader was released")))}}function ae(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof U}function Wr(e,t,r,o){const i=e._ownerReadableStream;i._disturbed=!0,i._state==="errored"?o._errorSteps(i._storedError):(function(n,s,a,l){const u=n._controlledReadableByteStream,h=s.constructor,f=vr(q=h)?1:q.BYTES_PER_ELEMENT,{byteOffset:b,byteLength:w}=s,T=a*f;var q;let y;try{y=ce(s.buffer)}catch(g){return void l._errorSteps(g)}const _={buffer:y,bufferByteLength:y.byteLength,byteOffset:b,byteLength:w,bytesFilled:0,minimumFill:T,elementSize:f,viewConstructor:h,readerType:"byob"};if(n._pendingPullIntos.length>0)return n._pendingPullIntos.push(_),void Jt(u,l);if(u._state==="closed"){const g=new h(_.buffer,_.byteOffset,0);return void l._closeSteps(g)}if(n._queueTotalSize>0){if(qr(n,_)){const g=Sr(_);return Pr(n),void l._chunkSteps(g)}if(n._closeRequested){const g=new TypeError("Insufficient bytes to fill elements in the given buffer");return j(n,g),void l._errorSteps(g)}}n._pendingPullIntos.push(_),Jt(u,l),fe(n)})(i._readableStreamController,t,r,o)}function zr(e,t){const r=e._readIntoRequests;e._readIntoRequests=new A,r.forEach(o=>{o._errorSteps(t)})}function Be(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function yt(e,t){const{highWaterMark:r}=e;if(r===void 0)return t;if(yr(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Br(e){const{size:t}=e;return t||(()=>1)}function Fr(e,t){H(e,t);const r=e?.highWaterMark,o=e?.size;return{highWaterMark:r===void 0?void 0:lr(r),size:o===void 0?void 0:ao(o,`${t} has member 'size' that`)}}function ao(e,t){return K(e,t),r=>lr(e(r))}function so(e,t,r){return K(e,r),o=>ge(e,t,[o])}function lo(e,t,r){return K(e,r),()=>ge(e,t,[])}function uo(e,t,r){return K(e,r),o=>me(e,t,[o])}function co(e,t,r){return K(e,r),(o,i)=>ge(e,t,[o,i])}function Ir(e,t){if(!he(e))throw new TypeError(`${t} is not a WritableStream.`)}Object.defineProperties(U.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),m(U.prototype.cancel,"cancel"),m(U.prototype.read,"read"),m(U.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(U.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class ne{constructor(t={},r={}){t===void 0?t=null:sr(t,"First parameter");const o=Fr(r,"Second parameter"),i=(function(a,l){H(a,l);const u=a?.abort,h=a?.close,f=a?.start,b=a?.type,w=a?.write;return{abort:u===void 0?void 0:so(u,a,`${l} has member 'abort' that`),close:h===void 0?void 0:lo(h,a,`${l} has member 'close' that`),start:f===void 0?void 0:uo(f,a,`${l} has member 'start' that`),write:w===void 0?void 0:co(w,a,`${l} has member 'write' that`),type:b}})(t,"First parameter");if((n=this)._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new A,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1,i.type!==void 0)throw new RangeError("Invalid type is specified");var n;const s=Br(o);(function(a,l,u,h){const f=Object.create(Oe.prototype);let b,w,T,q;b=l.start!==void 0?()=>l.start(f):()=>{},w=l.write!==void 0?y=>l.write(y,f):()=>v(void 0),T=l.close!==void 0?()=>l.close():()=>v(void 0),q=l.abort!==void 0?y=>l.abort(y):()=>v(void 0),(function(y,_,g,z,I,d,p,S){_._controlledWritableStream=y,y._writableStreamController=_,_._queue=void 0,_._queueTotalSize=void 0,Q(_),_._abortReason=void 0,_._abortController=(function(){if(typeof AbortController=="function")return new AbortController})(),_._started=!1,_._strategySizeAlgorithm=S,_._strategyHWM=p,_._writeAlgorithm=z,_._closeAlgorithm=I,_._abortAlgorithm=d;const E=It(_);Ft(y,E),W(v(g()),()=>(_._started=!0,tt(_),null),O=>(_._started=!0,vt(y,O),null))})(a,f,b,w,T,q,u,h)})(this,i,yt(o,1),s)}get locked(){if(!he(this))throw Ie("locked");return pe(this)}abort(t=void 0){return he(this)?pe(this)?c(new TypeError("Cannot abort a stream that already has a writer")):Xe(this,t):c(Ie("abort"))}close(){return he(this)?pe(this)?c(new TypeError("Cannot close a stream that already has a writer")):F(this)?c(new TypeError("Cannot close an already-closing stream")):$r(this):c(Ie("close"))}getWriter(){if(!he(this))throw Ie("getWriter");return Lr(this)}}function Lr(e){return new L(e)}function he(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof ne}function pe(e){return e._writer!==void 0}function Xe(e,t){var r;if(e._state==="closed"||e._state==="errored")return v(void 0);e._writableStreamController._abortReason=t,(r=e._writableStreamController._abortController)===null||r===void 0||r.abort(t);const o=e._state;if(o==="closed"||o==="errored")return v(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let i=!1;o==="erroring"&&(i=!0,t=void 0);const n=C((s,a)=>{e._pendingAbortRequest={_promise:void 0,_resolve:s,_reject:a,_reason:t,_wasAlreadyErroring:i}});return e._pendingAbortRequest._promise=n,i||zt(e,t),n}function $r(e){const t=e._state;if(t==="closed"||t==="errored")return c(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=C((n,s)=>{const a={_resolve:n,_reject:s};e._closeRequest=a}),o=e._writer;var i;return o!==void 0&&e._backpressure&&t==="writable"&&$t(o),At(i=e._writableStreamController,Yr,0),tt(i),r}function vt(e,t){e._state!=="writable"?Bt(e):zt(e,t)}function zt(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const o=e._writer;var i;o!==void 0&&Mr(o,t),(i=e)._inFlightWriteRequest===void 0&&i._inFlightCloseRequest===void 0&&r._started&&Bt(e)}function Bt(e){e._state="errored",e._writableStreamController[or]();const t=e._storedError;if(e._writeRequests.forEach(o=>{o._reject(t)}),e._writeRequests=new A,e._pendingAbortRequest===void 0)return void Fe(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void Fe(e);W(e._writableStreamController[rr](r._reason),()=>(r._resolve(),Fe(e),null),o=>(r._reject(o),Fe(e),null))}function F(e){return e._closeRequest!==void 0||e._inFlightCloseRequest!==void 0}function Fe(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;t!==void 0&&Lt(t,e._storedError)}function Ft(e,t){const r=e._writer;r!==void 0&&t!==e._backpressure&&(t?rt(r):$t(r)),e._backpressure=t}Object.defineProperties(ne.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),m(ne.prototype.abort,"abort"),m(ne.prototype.close,"close"),m(ne.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});class L{constructor(t){if(ue(t,1,"WritableStreamDefaultWriter"),Ir(t,"First parameter"),pe(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;const r=t._state;if(r==="writable")!F(t)&&t._backpressure?rt(this):Kt(this),He(this);else if(r==="erroring")gt(this,t._storedError),He(this);else if(r==="closed")Kt(this),He(this),Gr(this);else{const o=t._storedError;gt(this,o),Hr(this,o)}}get closed(){return Z(this)?this._closedPromise:c(ee("closed"))}get desiredSize(){if(!Z(this))throw ee("desiredSize");if(this._ownerWritableStream===void 0)throw Ee("desiredSize");return(function(t){const r=t._ownerWritableStream,o=r._state;return o==="errored"||o==="erroring"?null:o==="closed"?0:Vr(r._writableStreamController)})(this)}get ready(){return Z(this)?this._readyPromise:c(ee("ready"))}abort(t=void 0){return Z(this)?this._ownerWritableStream===void 0?c(Ee("abort")):(r=t,Xe(this._ownerWritableStream,r)):c(ee("abort"));var r}close(){if(!Z(this))return c(ee("close"));const t=this._ownerWritableStream;return t===void 0?c(Ee("close")):F(t)?c(new TypeError("Cannot close an already-closing stream")):Dr(this)}releaseLock(){if(!Z(this))throw ee("releaseLock");this._ownerWritableStream!==void 0&&xr(this)}write(t=void 0){return Z(this)?this._ownerWritableStream===void 0?c(Ee("write to")):Nr(this,t):c(ee("write"))}}function Z(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof L}function Dr(e){return $r(e._ownerWritableStream)}function Mr(e,t){e._readyPromiseState==="pending"?Xr(e,t):gt(e,t)}function xr(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");var o,i;Mr(e,r),i=r,(o=e)._closedPromiseState==="pending"?Lt(o,i):Hr(o,i),t._writer=void 0,e._ownerWritableStream=void 0}function Nr(e,t){const r=e._ownerWritableStream,o=r._writableStreamController,i=(function(l,u){if(l._strategySizeAlgorithm===void 0)return 1;try{return l._strategySizeAlgorithm(u)}catch(h){return wt(l,h),1}})(o,t);if(r!==e._ownerWritableStream)return c(Ee("write to"));const n=r._state;if(n==="errored")return c(r._storedError);if(F(r)||n==="closed")return c(new TypeError("The stream is closing or closed and cannot be written to"));if(n==="erroring")return c(r._storedError);const s=(a=r,C((l,u)=>{const h={_resolve:l,_reject:u};a._writeRequests.push(h)}));var a;return(function(l,u,h){try{At(l,u,h)}catch(b){return void wt(l,b)}const f=l._controlledWritableStream;F(f)||f._state!=="writable"||Ft(f,It(l)),tt(l)})(o,t,i),s}Object.defineProperties(L.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),m(L.prototype.abort,"abort"),m(L.prototype.close,"close"),m(L.prototype.releaseLock,"releaseLock"),m(L.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(L.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Yr={};class Oe{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!ct(this))throw dt("abortReason");return this._abortReason}get signal(){if(!ct(this))throw dt("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!ct(this))throw dt("error");this._controlledWritableStream._state==="writable"&&Ur(this,t)}[rr](t){const r=this._abortAlgorithm(t);return Je(this),r}[or](){Q(this)}}function ct(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Oe}function Je(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Vr(e){return e._strategyHWM-e._queueTotalSize}function tt(e){const t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring")return void Bt(t);if(e._queue.length===0)return;const r=e._queue.peek().value;r===Yr?(function(o){const i=o._controlledWritableStream;var n;(n=i)._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0,_t(o);const s=o._closeAlgorithm();Je(o),W(s,()=>((function(a){a._inFlightCloseRequest._resolve(void 0),a._inFlightCloseRequest=void 0,a._state==="erroring"&&(a._storedError=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._resolve(),a._pendingAbortRequest=void 0)),a._state="closed";const l=a._writer;l!==void 0&&Gr(l)})(i),null),a=>{return u=a,(l=i)._inFlightCloseRequest._reject(u),l._inFlightCloseRequest=void 0,l._pendingAbortRequest!==void 0&&(l._pendingAbortRequest._reject(u),l._pendingAbortRequest=void 0),vt(l,u),null;var l,u})})(e):(function(o,i){const n=o._controlledWritableStream;var s;(s=n)._inFlightWriteRequest=s._writeRequests.shift(),W(o._writeAlgorithm(i),()=>{var a;(a=n)._inFlightWriteRequest._resolve(void 0),a._inFlightWriteRequest=void 0;const l=n._state;if(_t(o),!F(n)&&l==="writable"){const u=It(o);Ft(n,u)}return tt(o),null},a=>{return n._state==="writable"&&Je(o),u=a,(l=n)._inFlightWriteRequest._reject(u),l._inFlightWriteRequest=void 0,vt(l,u),null;var l,u})})(e,r)}function wt(e,t){e._controlledWritableStream._state==="writable"&&Ur(e,t)}function It(e){return Vr(e)<=0}function Ur(e,t){const r=e._controlledWritableStream;Je(e),zt(r,t)}function Ie(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function dt(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function ee(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Ee(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function He(e){e._closedPromise=C((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function Hr(e,t){He(e),Lt(e,t)}function Lt(e,t){e._closedPromise_reject!==void 0&&(Ae(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function Gr(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function rt(e){e._readyPromise=C((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function gt(e,t){rt(e),Xr(e,t)}function Kt(e){rt(e),$t(e)}function Xr(e,t){e._readyPromise_reject!==void 0&&(Ae(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function $t(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Oe.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Oe.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const fo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:void 0,bo=(function(){const e=fo?.DOMException;return(function(t){if(typeof t!="function"&&typeof t!="object"||t.name!=="DOMException")return!1;try{return new t,!0}catch{return!1}})(e)?e:void 0})()||(function(){const e=function(t,r){this.message=t||"",this.name=r||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return m(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e})();function Qt(e,t,r,o,i,n){const s=be(e),a=Lr(t);e._disturbed=!0;let l=!1,u=v(void 0);return C((h,f)=>{let b;if(n!==void 0){if(b=()=>{const d=n.reason!==void 0?n.reason:new bo("Aborted","AbortError"),p=[];o||p.push(()=>t._state==="writable"?Xe(t,d):v(void 0)),i||p.push(()=>e._state==="readable"?k(e,d):v(void 0)),g(()=>Promise.all(p.map(S=>S())),!0,d)},n.aborted)return void b();n.addEventListener("abort",b)}var w,T,q;if(_(e,s._closedPromise,d=>(o?z(!0,d):g(()=>Xe(t,d),!0,d),null)),_(t,a._closedPromise,d=>(i?z(!0,d):g(()=>k(e,d),!0,d),null)),w=e,T=s._closedPromise,q=()=>(r?z():g(()=>(function(d){const p=d._ownerWritableStream,S=p._state;return F(p)||S==="closed"?v(void 0):S==="errored"?c(p._storedError):Dr(d)})(a)),null),w._state==="closed"?q():nt(T,q),F(t)||t._state==="closed"){const d=new TypeError("the destination writable stream closed before all data could be piped to it");i?z(!0,d):g(()=>k(e,d),!0,d)}function y(){const d=u;return B(u,()=>d!==u?y():void 0)}function _(d,p,S){d._state==="errored"?S(d._storedError):bt(p,S)}function g(d,p,S){function E(){return W(d(),()=>I(p,S),O=>I(!0,O)),null}l||(l=!0,t._state!=="writable"||F(t)?E():nt(y(),E))}function z(d,p){l||(l=!0,t._state!=="writable"||F(t)?I(d,p):nt(y(),()=>I(d,p)))}function I(d,p){return xr(a),M(s),n!==void 0&&n.removeEventListener("abort",b),d?f(p):h(void 0),null}Ae(C((d,p)=>{(function S(E){E?d():B(l?v(!0):B(a._readyPromise,()=>C((O,x)=>{Ce(s,{_chunkSteps:N=>{u=B(Nr(a,N),void 0,Pe),O(!1)},_closeSteps:()=>O(!0),_errorSteps:x})})),S,p)})(!1)}))})}class D{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Le(this))throw $e("desiredSize");return Dt(this)}close(){if(!Le(this))throw $e("close");if(!we(this))throw new TypeError("The stream is not in a state that permits close");ye(this)}enqueue(t=void 0){if(!Le(this))throw $e("enqueue");if(!we(this))throw new TypeError("The stream is not in a state that permits enqueue");return ve(this,t)}error(t=void 0){if(!Le(this))throw $e("error");J(this,t)}[Rt](t){Q(this);const r=this._cancelAlgorithm(t);return Ke(this),r}[Tt](t){const r=this._controlledReadableStream;if(this._queue.length>0){const o=_t(this);this._closeRequested&&this._queue.length===0?(Ke(this),We(r)):je(this),t._chunkSteps(o)}else ur(r,t),je(this)}[qt](){}}function Le(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof D}function je(e){Jr(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,W(e._pullAlgorithm(),()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,je(e)),null),t=>(J(e,t),null))))}function Jr(e){const t=e._controlledReadableStream;return!!we(e)&&!!e._started&&(!!(X(t)&&Ze(t)>0)||Dt(e)>0)}function Ke(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ye(e){if(!we(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(Ke(e),We(t))}function ve(e,t){if(!we(e))return;const r=e._controlledReadableStream;if(X(r)&&Ze(r)>0)jt(r,t,!1);else{let o;try{o=e._strategySizeAlgorithm(t)}catch(i){throw J(e,i),i}try{At(e,t,o)}catch(i){throw J(e,i),i}}je(e)}function J(e,t){const r=e._controlledReadableStream;r._state==="readable"&&(Q(e),Ke(e),Qr(r,t))}function Dt(e){const t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function we(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Kr(e,t,r,o,i,n,s){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Q(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=s,t._strategyHWM=n,t._pullAlgorithm=o,t._cancelAlgorithm=i,e._readableStreamController=t,W(v(r()),()=>(t._started=!0,je(t),null),a=>(J(t,a),null))}function $e(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function ho(e){return R(t=e)&&t.getReader!==void 0?(function(r){let o;return o=Qe(Pe,function(){let i;try{i=r.read()}catch(n){return c(n)}return se(i,n=>{if(!R(n))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(n.done)ye(o._readableStreamController);else{const s=n.value;ve(o._readableStreamController,s)}})},function(i){try{return v(r.cancel(i))}catch(n){return c(n)}},0),o})(e.getReader()):(function(r){let o;const i=hr(r,"async");return o=Qe(Pe,function(){let n;try{n=_r(i)}catch(s){return c(s)}return se(v(n),s=>{if(!R(s))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(s.done)ye(o._readableStreamController);else{const a=s.value;ve(o._readableStreamController,a)}})},function(n){const s=i.iterator;let a;try{a=Te(s,"return")}catch(l){return c(l)}return a===void 0?v(void 0):se(ge(a,s,[n]),l=>{if(!R(l))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})},0),o})(e);var t}function _o(e,t,r){return K(e,r),o=>ge(e,t,[o])}function po(e,t,r){return K(e,r),o=>ge(e,t,[o])}function mo(e,t,r){return K(e,r),o=>me(e,t,[o])}function yo(e,t){if((e=`${e}`)!="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function Zt(e,t){H(e,t);const r=e?.preventAbort,o=e?.preventCancel,i=e?.preventClose,n=e?.signal;return n!==void 0&&(function(s,a){if(!(function(l){if(typeof l!="object"||l===null)return!1;try{return typeof l.aborted=="boolean"}catch{return!1}})(s))throw new TypeError(`${a} is not an AbortSignal.`)})(n,`${t} has member 'signal' that`),{preventAbort:!!r,preventCancel:!!o,preventClose:!!i,signal:n}}Object.defineProperties(D.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),m(D.prototype.close,"close"),m(D.prototype.enqueue,"enqueue"),m(D.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(D.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class P{constructor(t={},r={}){t===void 0?t=null:sr(t,"First parameter");const o=Fr(r,"Second parameter"),i=(function(n,s){H(n,s);const a=n,l=a?.autoAllocateChunkSize,u=a?.cancel,h=a?.pull,f=a?.start,b=a?.type;return{autoAllocateChunkSize:l===void 0?void 0:Ct(l,`${s} has member 'autoAllocateChunkSize' that`),cancel:u===void 0?void 0:_o(u,a,`${s} has member 'cancel' that`),pull:h===void 0?void 0:po(h,a,`${s} has member 'pull' that`),start:f===void 0?void 0:mo(f,a,`${s} has member 'start' that`),type:b===void 0?void 0:yo(b,`${s} has member 'type' that`)}})(t,"First parameter");if(Mt(this),i.type==="bytes"){if(o.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");(function(n,s,a){const l=Object.create($.prototype);let u,h,f;u=s.start!==void 0?()=>s.start(l):()=>{},h=s.pull!==void 0?()=>s.pull(l):()=>v(void 0),f=s.cancel!==void 0?w=>s.cancel(w):()=>v(void 0);const b=s.autoAllocateChunkSize;if(b===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ar(n,l,u,h,f,a,b)})(this,i,yt(o,0))}else{const n=Br(o);(function(s,a,l,u){const h=Object.create(D.prototype);let f,b,w;f=a.start!==void 0?()=>a.start(h):()=>{},b=a.pull!==void 0?()=>a.pull(h):()=>v(void 0),w=a.cancel!==void 0?T=>a.cancel(T):()=>v(void 0),Kr(s,h,f,b,w,l,u)})(this,i,yt(o,1),n)}}get locked(){if(!Y(this))throw te("locked");return X(this)}cancel(t=void 0){return Y(this)?X(this)?c(new TypeError("Cannot cancel a stream that already has a reader")):k(this,t):c(te("cancel"))}getReader(t=void 0){if(!Y(this))throw te("getReader");return(function(r,o){H(r,o);const i=r?.mode;return{mode:i===void 0?void 0:io(i,`${o} has member 'mode' that`)}})(t,"First parameter").mode===void 0?be(this):Xt(this)}pipeThrough(t,r={}){if(!Y(this))throw te("pipeThrough");ue(t,1,"pipeThrough");const o=(function(n,s){H(n,s);const a=n?.readable;Nt(a,"readable","ReadableWritablePair"),Ot(a,`${s} has member 'readable' that`);const l=n?.writable;return Nt(l,"writable","ReadableWritablePair"),Ir(l,`${s} has member 'writable' that`),{readable:a,writable:l}})(t,"First parameter"),i=Zt(r,"Second parameter");if(X(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(pe(o.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Ae(Qt(this,o.writable,i.preventClose,i.preventAbort,i.preventCancel,i.signal)),o.readable}pipeTo(t,r={}){if(!Y(this))return c(te("pipeTo"));if(t===void 0)return c("Parameter 1 is required in 'pipeTo'.");if(!he(t))return c(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let o;try{o=Zt(r,"Second parameter")}catch(i){return c(i)}return X(this)?c(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):pe(t)?c(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Qt(this,t,o.preventClose,o.preventAbort,o.preventCancel,o.signal)}tee(){if(!Y(this))throw te("tee");return Se(oe((t=this)._readableStreamController)?(function(r){let o,i,n,s,a,l=be(r),u=!1,h=!1,f=!1,b=!1,w=!1;const T=C(d=>{a=d});function q(d){bt(d._closedPromise,p=>(d!==l||(j(n._readableStreamController,p),j(s._readableStreamController,p),b&&w||a(void 0)),null))}function y(){ae(l)&&(M(l),l=be(r),q(l)),Ce(l,{_chunkSteps:d=>{le(()=>{h=!1,f=!1;const p=d;let S=d;if(!b&&!w)try{S=Gt(d)}catch(E){return j(n._readableStreamController,E),j(s._readableStreamController,E),void a(k(r,E))}b||Ye(n._readableStreamController,p),w||Ye(s._readableStreamController,S),u=!1,h?g():f&&z()})},_closeSteps:()=>{u=!1,b||qe(n._readableStreamController),w||qe(s._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&Ve(n._readableStreamController,0),s._readableStreamController._pendingPullIntos.length>0&&Ve(s._readableStreamController,0),b&&w||a(void 0)},_errorSteps:()=>{u=!1}})}function _(d,p){G(l)&&(M(l),l=Xt(r),q(l));const S=p?s:n,E=p?n:s;Wr(l,d,1,{_chunkSteps:O=>{le(()=>{h=!1,f=!1;const x=p?w:b;if(p?b:w)x||Ue(S._readableStreamController,O);else{let N;try{N=Gt(O)}catch(ot){return j(S._readableStreamController,ot),j(E._readableStreamController,ot),void a(k(r,ot))}x||Ue(S._readableStreamController,O),Ye(E._readableStreamController,N)}u=!1,h?g():f&&z()})},_closeSteps:O=>{u=!1;const x=p?w:b,N=p?b:w;x||qe(S._readableStreamController),N||qe(E._readableStreamController),O!==void 0&&(x||Ue(S._readableStreamController,O),!N&&E._readableStreamController._pendingPullIntos.length>0&&Ve(E._readableStreamController,0)),x&&N||a(void 0)},_errorSteps:()=>{u=!1}})}function g(){if(u)return h=!0,v(void 0);u=!0;const d=mt(n._readableStreamController);return d===null?y():_(d._view,!1),v(void 0)}function z(){if(u)return f=!0,v(void 0);u=!0;const d=mt(s._readableStreamController);return d===null?y():_(d._view,!0),v(void 0)}function I(){}return n=er(I,g,function(d){if(b=!0,o=d,w){const p=Se([o,i]),S=k(r,p);a(S)}return T}),s=er(I,z,function(d){if(w=!0,i=d,b){const p=Se([o,i]),S=k(r,p);a(S)}return T}),q(l),[n,s]})(t):(function(r){const o=be(r);let i,n,s,a,l,u=!1,h=!1,f=!1,b=!1;const w=C(y=>{l=y});function T(){return u?(h=!0,v(void 0)):(u=!0,Ce(o,{_chunkSteps:y=>{le(()=>{h=!1;const _=y,g=y;f||ve(s._readableStreamController,_),b||ve(a._readableStreamController,g),u=!1,h&&T()})},_closeSteps:()=>{u=!1,f||ye(s._readableStreamController),b||ye(a._readableStreamController),f&&b||l(void 0)},_errorSteps:()=>{u=!1}}),v(void 0))}function q(){}return s=Qe(q,T,function(y){if(f=!0,i=y,b){const _=Se([i,n]),g=k(r,_);l(g)}return w}),a=Qe(q,T,function(y){if(b=!0,n=y,f){const _=Se([i,n]),g=k(r,_);l(g)}return w}),bt(o._closedPromise,y=>(J(s._readableStreamController,y),J(a._readableStreamController,y),f&&b||l(void 0),null)),[s,a]})(t));var t}values(t=void 0){if(!Y(this))throw te("values");return(function(o,i){const n=be(o),s=new pr(n,i),a=Object.create(mr);return a._asyncIteratorImpl=s,a})(this,(r=t,H(r,"First parameter"),{preventCancel:!!r?.preventCancel}).preventCancel);var r}[ke](t){return this.values(t)}static from(t){return ho(t)}}function Qe(e,t,r,o=1,i=()=>1){const n=Object.create(P.prototype);return Mt(n),Kr(n,Object.create(D.prototype),e,t,r,o,i),n}function er(e,t,r){const o=Object.create(P.prototype);return Mt(o),Ar(o,Object.create($.prototype),e,t,r,0,void 0),o}function Mt(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Y(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof P}function X(e){return e._reader!==void 0}function k(e,t){if(e._disturbed=!0,e._state==="closed")return v(void 0);if(e._state==="errored")return c(e._storedError);We(e);const r=e._reader;if(r!==void 0&&ae(r)){const o=r._readIntoRequests;r._readIntoRequests=new A,o.forEach(i=>{i._closeSteps(void 0)})}return se(e._readableStreamController[Rt](t),Pe)}function We(e){e._state="closed";const t=e._reader;if(t!==void 0&&(ar(t),G(t))){const r=t._readRequests;t._readRequests=new A,r.forEach(o=>{o._closeSteps()})}}function Qr(e,t){e._state="errored",e._storedError=t;const r=e._reader;r!==void 0&&(Pt(r,t),G(r)?dr(r,t):zr(r,t))}function te(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function ft(e,t){var r;(r=e._transformStreamController)._transformAlgorithm=void 0,r._flushAlgorithm=void 0,r._cancelAlgorithm=void 0,wt(e._writable._writableStreamController,t),(function(o){o._backpressure&&Zr(o,!1)})(e)}function Zr(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=C(r=>{e._backpressureChangePromise_resolve=r}),e._backpressure=t}Object.defineProperties(P,{from:{enumerable:!0}}),Object.defineProperties(P.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),m(P.from,"from"),m(P.prototype.cancel,"cancel"),m(P.prototype.getReader,"getReader"),m(P.prototype.pipeThrough,"pipeThrough"),m(P.prototype.pipeTo,"pipeTo"),m(P.prototype.tee,"tee"),m(P.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(P.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(P.prototype,ke,{value:P.prototype.values,writable:!0,configurable:!0}),m(e=>e.byteLength,"size"),m(()=>1,"size");class re{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!De(this))throw Me("desiredSize");return Dt(this._controlledTransformStream._readable._readableStreamController)}enqueue(t=void 0){if(!De(this))throw Me("enqueue");(function(r,o){const i=r._controlledTransformStream,n=i._readable._readableStreamController;if(!we(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{ve(n,o)}catch(a){throw ft(i,a),i._readable._storedError}var s;!Jr(s=n)!==i._backpressure&&Zr(i,!0)})(this,t)}error(t=void 0){if(!De(this))throw Me("error");var r,o,i;r=t,o=this._controlledTransformStream,i=r,J(o._readable._readableStreamController,i),ft(o,i)}terminate(){if(!De(this))throw Me("terminate");(function(t){const r=t._controlledTransformStream;ye(r._readable._readableStreamController),ft(r,new TypeError("TransformStream terminated"))})(this)}}function De(e){return!!R(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof re}function Me(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}Object.defineProperties(re.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),m(re.prototype.enqueue,"enqueue"),m(re.prototype.error,"error"),m(re.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(re.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),exports.ReadableByteStreamController=$,exports.ReadableStream=P,exports.ReadableStreamBYOBReader=U,exports.ReadableStreamBYOBRequest=ie,exports.ReadableStreamDefaultController=D,exports.ReadableStreamDefaultReader=V,exports.TransformStreamDefaultController=re,exports.WritableStream=ne,exports.WritableStreamDefaultController=Oe,exports.WritableStreamDefaultWriter=L;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const yt=require("./DBDrj3h1JjZiBMa8.cjs");var ct,pt={exports:{}},gt=(ct||(ct=1,pt.exports=(function Y(){var Q,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,B=k.IS_PAPA_WORKER||!1,J={},mt=0,a={};function K(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let l=this._config.newline;l||(r=this._config.quoteChar||'"',l=this._handle.guessLineEndings(e,r)),e=[...e.split(l).slice(n)].join(l)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,B)k.postMessage({results:r,workerId:a.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):B&&this._config.error&&k.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=a.RemoteChunkSize),K.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(l){this._chunkError(l.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){var i;e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=((i=(i=e).getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=a.LocalChunkSize),K.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,l=(this._config.chunkSize&&(l=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,l)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:l}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;K.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){K.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){K.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){K.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=$(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(l){this._streamError(l)}},this),this._streamError=$(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=$(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,l=Math.pow(2,53),v=-l,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,w=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,m=this,T=0,o=0,j=!1,u=!1,p=[],s={data:[],errors:[],meta:{}};function C(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function R(){if(s&&n&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(f){return!C(f)})),A()){let f=function(O,L){_(t.transformHeader)&&(O=t.transformHeader(O,L)),p.push(O)};if(s)if(Array.isArray(s.data[0])){for(var h=0;A()&&h<s.data.length;h++)s.data[h].forEach(f);s.data.splice(0,1)}else s.data.forEach(f)}function c(f,O){for(var L=t.header?{}:[],b=0;b<f.length;b++){var y=b,g=f[b];g=((U,d)=>{return S=U,t.dynamicTypingFunction&&t.dynamicTyping[S]===void 0&&(t.dynamicTyping[S]=t.dynamicTypingFunction(S)),(t.dynamicTyping[S]||t.dynamicTyping)===!0?d==="true"||d==="TRUE"||d!=="false"&&d!=="FALSE"&&((I=>{if(M.test(I)&&(I=parseFloat(I),v<I&&I<l))return 1})(d)?parseFloat(d):w.test(d)?new Date(d):d===""?null:d):d;var S})(y=t.header?b>=p.length?"__parsed_extra":p[b]:y,g=t.transform?t.transform(g,y):g),y==="__parsed_extra"?(L[y]=L[y]||[],L[y].push(g)):L[y]=g}return t.header&&(b>p.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+b,o+O):b<p.length&&z("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+b,o+O)),L}var E;s&&(t.header||t.dynamicTyping||t.transform)&&(E=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(c),E=s.data.length):s.data=c(s.data,0),t.header&&s.meta&&(s.meta.fields=p),o+=E)}function A(){return t.header&&p.length===0}function z(h,c,E,f){h={type:h,code:c,message:E},f!==void 0&&(h.row=f),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,A()?R():(R(),s.data.length!==0&&(T+=h.data.length,t.preview&&T>t.preview?i.abort():(s.data=s.data[0],r(s,m))))}),this.parse=function(h,c,E){var f=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,f)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((f=((O,L,b,y,g)=>{var U,d,S,I;g=g||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var Z=0;Z<g.length;Z++){for(var W,tt=g[Z],F=0,D=0,x=0,q=(S=void 0,new st({comments:y,delimiter:tt,newline:L,preview:10}).parse(O)),H=0;H<q.data.length;H++)b&&C(q.data[H])?x++:(D+=W=q.data[H].length,S===void 0?S=W:0<W&&(F+=Math.abs(W-S),S=W));0<q.data.length&&(D/=q.data.length-x),(d===void 0||F<=d)&&(I===void 0||I<D)&&1.99<D&&(d=F,U=tt,I=D)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=f.bestDelimiter:(n=!0,t.delimiter=a.DefaultDelimiter),s.meta.delimiter=t.delimiter),f=at(t),t.preview&&t.header&&f.preview++,e=h,i=new st(f),s=i.parse(e,c,E),R(),j?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return j},this.pause=function(){j=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){m.streamer._halted?(j=!1,m.streamer.parseChunk(e,!0)):setTimeout(m.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,c){h=h.substring(0,1048576),c=new RegExp(V(c)+"([^]*?)"+V(c),"gm");var E=(h=h.replace(c,"")).split("\r");if(h=1<(c=h.split(`
|
|
7
|
+
`)).length&&c[0].length<E[0].length,E.length===1||h)return`
|
|
8
|
+
`;for(var f=0,O=0;O<E.length;O++)E[O][0]===`
|
|
9
|
+
`&&f++;return f>=E.length/2?`\r
|
|
10
|
+
`:"\r"}}function V(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function st(t){var e=(t=t||{}).delimiter,i=t.newline,n=t.comments,r=t.step,l=t.preview,v=t.fastMode,M=null,w=!1,m=t.quoteChar==null?'"':t.quoteChar,T=m;if(t.escapeChar!==void 0&&(T=t.escapeChar),(typeof e!="string"||-1<a.BAD_DELIMITERS.indexOf(e))&&(e=","),n===e)throw new Error("Comment character same as delimiter");n===!0?n="#":(typeof n!="string"||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),i!==`
|
|
11
|
+
`&&i!=="\r"&&i!==`\r
|
|
12
|
+
`&&(i=`
|
|
13
|
+
`);var o=0,j=!1;this.parse=function(u,p,s){if(typeof u!="string")throw new Error("Input must be a string");var C=u.length,R=e.length,A=i.length,z=n.length,h=_(r),c=[],E=[],f=[],O=o=0;if(!u)return F();if(v||v!==!1&&u.indexOf(m)===-1){for(var L=u.split(i),b=0;b<L.length;b++){if(f=L[b],o+=f.length,b!==L.length-1)o+=i.length;else if(s)return F();if(!n||f.substring(0,z)!==n){if(h){if(c=[],I(f.split(e)),D(),j)return F()}else I(f.split(e));if(l&&l<=b)return c=c.slice(0,l),F(!0)}}return F()}for(var y=u.indexOf(e,o),g=u.indexOf(i,o),U=new RegExp(V(T)+V(m),"g"),d=u.indexOf(m,o);;)if(u[o]===m)for(d=o,o++;;){if((d=u.indexOf(m,d+1))===-1)return s||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:o}),W();if(d===C-1)return W(u.substring(o,d).replace(U,m));if(m===T&&u[d+1]===T)d++;else if(m===T||d===0||u[d-1]!==T){y!==-1&&y<d+1&&(y=u.indexOf(e,d+1));var S=Z((g=g!==-1&&g<d+1?u.indexOf(i,d+1):g)===-1?y:Math.min(y,g));if(u.substr(d+1+S,R)===e){f.push(u.substring(o,d).replace(U,m)),u[o=d+1+S+R]!==m&&(d=u.indexOf(m,o)),y=u.indexOf(e,o),g=u.indexOf(i,o);break}if(S=Z(g),u.substring(d+1+S,d+1+S+A)===i){if(f.push(u.substring(o,d).replace(U,m)),tt(d+1+S+A),y=u.indexOf(e,o),d=u.indexOf(m,o),h&&(D(),j))return F();if(l&&c.length>=l)return F(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:o}),d++}}else if(n&&f.length===0&&u.substring(o,o+z)===n){if(g===-1)return F();o=g+A,g=u.indexOf(i,o),y=u.indexOf(e,o)}else if(y!==-1&&(y<g||g===-1))f.push(u.substring(o,y)),o=y+R,y=u.indexOf(e,o);else{if(g===-1)break;if(f.push(u.substring(o,g)),tt(g+A),h&&(D(),j))return F();if(l&&c.length>=l)return F(!0)}return W();function I(x){c.push(x),O=o}function Z(x){return x!==-1&&(x=u.substring(d+1,x))&&x.trim()===""?x.length:0}function W(x){return s||(x===void 0&&(x=u.substring(o)),f.push(x),o=C,I(f),h&&D()),F()}function tt(x){o=x,I(f),f=[],g=u.indexOf(i,o)}function F(x){if(t.header&&!p&&c.length&&!w){var q=c[0],H=Object.create(null),ot=new Set(q);let ft=!1;for(let G=0;G<q.length;G++){let N=q[G];if(H[N=_(t.transformHeader)?t.transformHeader(N,G):N]){let et,lt=H[N];for(;et=N+"_"+lt,lt++,ot.has(et););ot.add(et),q[G]=et,H[N]++,ft=!0,(M=M===null?{}:M)[et]=N}else H[N]=1,q[G]=N;ot.add(N)}ft&&console.warn("Duplicate headers found and renamed."),w=!0}return{data:c,errors:E,meta:{delimiter:e,linebreak:i,aborted:j,truncated:!!x,cursor:O+(p||0),renamedHeaders:M}}}function D(){r(F()),c=[],E=[]}},this.abort=function(){j=!0},this.getCharIndex=function(){return o}}function _t(t){var e=t.data,i=J[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){n=!0,ut(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:dt,resume:dt};if(_(i.userStep)){for(var l=0;l<e.results.data.length&&(i.userStep({data:e.results.data[l],errors:e.results.errors,meta:e.results.meta},r),!n);l++);delete e.results}else _(i.userChunk)&&(i.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!n&&ut(e.workerId,e.results)}function ut(t,e){var i=J[t];_(i.userComplete)&&i.userComplete(e),i.terminate(),delete J[t]}function dt(){throw new Error("Not implemented.")}function at(t){if(typeof t!="object"||t===null)return t;var e,i=Array.isArray(t)?[]:{};for(e in t)i[e]=at(t[e]);return i}function $(t,e){return function(){t.apply(e,arguments)}}function _(t){return typeof t=="function"}return a.parse=function(t,e){var i,n=(e=e||{}).dynamicTyping||!1;if(_(n)&&(e.dynamicTypingFunction=n,n={}),e.dynamicTyping=n,e.transform=!!_(e.transform)&&e.transform,!e.worker||!a.WORKERS_SUPPORTED)return n=null,a.NODE_STREAM_INPUT,typeof t=="string"?(t=(i=t).charCodeAt(0)!==65279?i:i.slice(1),n=new(e.download?it:X)(e)):t.readable===!0&&_(t.read)&&_(t.on)?n=new nt(e):(k.File&&t instanceof File||t instanceof Object)&&(n=new rt(e)),n.stream(t);(n=(()=>{var r,l,v;return!!a.WORKERS_SUPPORTED&&(l=k.URL||k.webkitURL||null,v=Y.toString(),r=a.BLOB_URL||(a.BLOB_URL=l.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",v,")();"],{type:"text/javascript"}))),(r=new k.Worker(r)).onmessage=_t,r.id=mt++,J[r.id]=r)})()).userStep=e.step,n.userChunk=e.chunk,n.userComplete=e.complete,n.userError=e.error,e.step=_(e.step),e.chunk=_(e.chunk),e.complete=_(e.complete),e.error=_(e.error),delete e.worker,n.postMessage({input:t,config:e,workerId:n.id})},a.unparse=function(t,e){var i=!1,n=!0,r=",",l=`\r
|
|
14
|
+
`,v='"',M=v+v,w=!1,m=null,T=!1,o=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||a.BAD_DELIMITERS.filter(function(p){return e.delimiter.indexOf(p)!==-1}).length||(r=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(i=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(w=e.skipEmptyLines),typeof e.newline=="string"&&(l=e.newline),typeof e.quoteChar=="string"&&(v=e.quoteChar),typeof e.header=="boolean"&&(n=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");m=e.columns}e.escapeChar!==void 0&&(M=e.escapeChar+v),e.escapeFormulae instanceof RegExp?T=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(T=/^[=+\-@\t\r].*$/)}})(),new RegExp(V(v),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return j(null,t,w);if(typeof t[0]=="object")return j(m||Object.keys(t[0]),t,w)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||m),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),j(t.fields||[],t.data||[],w);throw new Error("Unable to serialize unrecognized input");function j(p,s,C){var R="",A=(typeof p=="string"&&(p=JSON.parse(p)),typeof s=="string"&&(s=JSON.parse(s)),Array.isArray(p)&&0<p.length),z=!Array.isArray(s[0]);if(A&&n){for(var h=0;h<p.length;h++)0<h&&(R+=r),R+=u(p[h],h);0<s.length&&(R+=l)}for(var c=0;c<s.length;c++){var E=(A?p:s[c]).length,f=!1,O=A?Object.keys(s[c]).length===0:s[c].length===0;if(C&&!A&&(f=C==="greedy"?s[c].join("").trim()==="":s[c].length===1&&s[c][0].length===0),C==="greedy"&&A){for(var L=[],b=0;b<E;b++){var y=z?p[b]:b;L.push(s[c][y])}f=L.join("").trim()===""}if(!f){for(var g=0;g<E;g++){0<g&&!O&&(R+=r);var U=A&&z?p[g]:g;R+=u(s[c][U],g)}c<s.length-1&&(!C||0<E&&!O)&&(R+=l)}}return R}function u(p,s){var C,R;return p==null?"":p.constructor===Date?JSON.stringify(p).slice(1,25):(R=!1,T&&typeof p=="string"&&T.test(p)&&(p="'"+p,R=!0),C=p.toString().replace(o,M),(R=R||i===!0||typeof i=="function"&&i(p,s)||Array.isArray(i)&&i[s]||((A,z)=>{for(var h=0;h<z.length;h++)if(-1<A.indexOf(z[h]))return!0;return!1})(C,a.BAD_DELIMITERS)||-1<C.indexOf(r)||C.charAt(0)===" "||C.charAt(C.length-1)===" ")?v+C+v:C)}},a.RECORD_SEP="",a.UNIT_SEP="",a.BYTE_ORDER_MARK="\uFEFF",a.BAD_DELIMITERS=["\r",`
|
|
15
|
+
`,'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!P&&!!k.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=st,a.ParserHandle=ht,a.NetworkStreamer=it,a.FileStreamer=rt,a.StringStreamer=X,a.ReadableStreamStreamer=nt,k.jQuery&&((Q=k.jQuery).fn.parse=function(t){var e=t.config||{},i=[];return this.each(function(l){if(Q(this).prop("tagName").toUpperCase()!=="INPUT"||Q(this).attr("type").toLowerCase()!=="file"||!k.FileReader||!this.files||this.files.length===0)return!0;for(var v=0;v<this.files.length;v++)i.push({file:this.files[v],inputElem:this,instanceConfig:Q.extend({},e)})}),n(),this;function n(){if(i.length===0)_(t.complete)&&t.complete();else{var l,v,M,w=i[0];if(_(t.before)){var m=t.before(w.file,w.inputElem);if(typeof m=="object"){if(m.action==="abort")return l=w.file,v=w.inputElem,M=m.reason,void(_(t.error)&&t.error({name:"AbortError"},l,v,M));if(m.action==="skip")return void r();typeof m.config=="object"&&(w.instanceConfig=Q.extend(w.instanceConfig,m.config))}else if(m==="skip")return void r()}var T=w.instanceConfig.complete;w.instanceConfig.complete=function(o){_(T)&&T(o,w.file,w.inputElem),r()},a.parse(w.file,w.instanceConfig)}}function r(){i.splice(0,1),n()}}),B&&(k.onmessage=function(t){t=t.data,a.WORKER_ID===void 0&&t&&(a.WORKER_ID=t.workerId),typeof t.input=="string"?k.postMessage({workerId:a.WORKER_ID,results:a.parse(t.input,t.config),finished:!0}):(k.File&&t.input instanceof File||t.input instanceof Object)&&(t=a.parse(t.input,t.config))&&k.postMessage({workerId:a.WORKER_ID,results:t,finished:!0})}),(it.prototype=Object.create(K.prototype)).constructor=it,(rt.prototype=Object.create(K.prototype)).constructor=rt,(X.prototype=Object.create(X.prototype)).constructor=X,(nt.prototype=Object.create(K.prototype)).constructor=nt,a})()),pt.exports);const kt=(function(Y,Q){for(var k=0;k<Q.length;k++){const P=Q[k];if(typeof P!="string"&&!Array.isArray(P)){for(const B in P)if(B!=="default"&&!(B in Y)){const J=Object.getOwnPropertyDescriptor(P,B);J&&Object.defineProperty(Y,B,J.get?J:{enumerable:!0,get:()=>P[B]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))})({__proto__:null,default:yt.Ag(gt)},[gt]);exports.p=kt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DBDrj3h1JjZiBMa8.cjs"),C=["Ok","Cancel"],u=e.reactExports.memo(d=>{const{tableOptions:n,context:r,onOption:i,onValidateOption:R,onDone:c,options:p=C,defaultOption:a=p?.[0],cancelOption:s="Cancel",sx:g,...m}=d,[b,h]=e.reactExports.useState(!1),[o,j]=e.reactExports.useState(()=>n?.hasHeader??!1),[l,O]=e.reactExports.useState(()=>n?.ranges??null),E=e.T(t=>{const x={...n,hasHeader:o,ranges:l};i?.(t,t===s,t===a),c?.({option:t,tableOptions:x})},[c,i,a,s,o,l,n]),f=e.reactExports.useCallback(async(t,x)=>null,[]);return e.jsxRuntimeExports.jsx(e.k3,{title:"Insert Table",options:p,onDone:E,onValidateOption:f,defaultOption:a,cancelOption:s,autoFocusSel:".range-input input",sx:{width:"360px",...g},...m,children:e.jsxRuntimeExports.jsxs(e.Box,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0),rowGap:t=>t.spacing(1),display:"flex",flexDirection:"column"},children:[e.jsxRuntimeExports.jsx(e.cu,{formName:"range",value:l,onChangeInput:t=>O(t),resolvedAddress:r.getNames().getRanges.bind(r.getNames()),onFocus:t=>{b||t.target?.select(),h(!0)}}),e.jsxRuntimeExports.jsx(e.FormControlLabel,{control:e.jsxRuntimeExports.jsx(e.Checkbox,{checked:o,onChange:()=>j(!o)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=u,exports.default=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
7
|
-
`);if(t!==l){const s=[];for(let o=0;o<n.length;o++)s.push({text:n[o]});c?.({content:{runs:s}})}u?.(t,t===l,t===p),r?.()},[a,c,r,u,p,l]),F=e.T(t=>{T(t.target.value),d(t.target.value,null)},[i]),b=e.T(async t=>{let n=await Promise.resolve(i?.(t));try{n!==!1&&(n=await d(a,t))}catch{}return n??!0},[i,a]);return e.jsxRuntimeExports.jsx(e.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DBDrj3h1JjZiBMa8.cjs"),P=["Ok","Cancel"],g=e.reactExports.memo(f=>{const{initialComments:h=null,onUpdateComments:c,context:C,onOption:u,onValidateOption:i,onDone:r,options:m=P,defaultOption:p=m?.[0],cancelOption:l="Cancel",sx:O,...E}=f,x=e.reactExports.useMemo(()=>{const t=h??C?.()?.getComments();let n="";if(t&&t.content&&t.content.runs){const s=t.content.runs;for(let o=0;o<s.length;o++){const k=s[o];n+=k?.text}}return n},[]),[a,T]=e.reactExports.useState(x),[j,y]=e.reactExports.useState(!1),d=e.reactExports.useCallback(async(t,n)=>null,[]),v=e.T(async t=>{const n=a===""?[]:a.split(`
|
|
7
|
+
`);if(t!==l){const s=[];for(let o=0;o<n.length;o++)s.push({text:n[o]});c?.({content:{runs:s}})}u?.(t,t===l,t===p),r?.()},[a,c,r,u,p,l]),F=e.T(t=>{T(t.target.value),d(t.target.value,null)},[i]),b=e.T(async t=>{let n=await Promise.resolve(i?.(t));try{n!==!1&&(n=await d(a,t))}catch{}return n??!0},[i,a]);return e.jsxRuntimeExports.jsx(e.k3,{title:(x?"Edit":"Insert")+" Comments",options:m,onDone:r,onOption:t=>v(t),onValidateOption:b,defaultOption:p,cancelOption:l,autoFocusSel:".autoFocus",sx:{width:"480px",...O},...E,children:e.jsxRuntimeExports.jsx(e.Box,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0),rowGap:t=>t.spacing(1),display:"flex",flexDirection:"column"},children:e.jsxRuntimeExports.jsx(e.FormControl,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:e.jsxRuntimeExports.jsx(e.TextField,{label:"Comments",placeholder:"Enter a comment.",onFocus:t=>{j||t.target?.select(),y(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${e.alpha("#fff",e.getOverlayAlpha(5))}, ${e.alpha("#fff",e.getOverlayAlpha(5))})`}}},value:a,onChange:F,onContextMenu:t=>{t.stopPropagation()}})})})})});exports.CommentsDialog=g,exports.default=g;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let c=class{constructor(e){this._worker=null,this._nextId=1,this._pendingRequests=new Map,this._workerFactory=e}start(){if(typeof Worker>"u")throw new Error("Web Workers are not supported in this environment.");return this._worker||(this._worker=this._workerFactory(),this._worker.onmessage=e=>{const{id:n,result:t,error:r}=e.data,o=this._pendingRequests.get(n);if(o)if(this._pendingRequests.delete(n),r){const i=new Error(r.message);i.stack=r.stack,r.cause&&(i.cause=r.cause),o.reject(i)}else o.resolve(t)},this._worker.onerror=e=>{console.error("Worker error:",e),this._pendingRequests.forEach(n=>{n.reject(new Error(`Worker failed: ${e.message}`))}),this._pendingRequests.clear(),this._worker=null}),Promise.resolve()}execute(e){if(!this._worker)throw new Error("Worker is not initialized. Call start() first.");const n=this._nextId++;return new Promise((t,r)=>{this._pendingRequests.set(n,{resolve:t,reject:r}),this._worker.postMessage({id:n,params:e})})}terminate(){this._worker&&(this._worker.terminate(),this._worker=null)}};class u{constructor(n){this._onExecute=n}execute(n){return this._onExecute(n)}start(){return Promise.resolve()}terminate(){}}const s=`/**
|
|
7
|
-
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.6.
|
|
7
|
+
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.6.8
|
|
8
8
|
*
|
|
9
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -223,7 +223,7 @@ var v;
|
|
|
223
223
|
return r = typeof e == "string" ? rt.get(e) : ot.get(e), r || (r = v.Unknown), new r(t, n);
|
|
224
224
|
}, v.getBuiltInById = (e) => Te.get(e) || xt;
|
|
225
225
|
/**
|
|
226
|
-
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.6.
|
|
226
|
+
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.6.8
|
|
227
227
|
*
|
|
228
228
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
229
229
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -332,15 +332,15 @@ Object.freeze(Object.defineProperty({ __proto__: null, EmptyCell: _t, EmptyRange
|
|
|
332
332
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
333
333
|
function Lt(e) {
|
|
334
334
|
const t = Object.prototype.toString.call(e);
|
|
335
|
-
return t === "[object RegExp]" || t === "[object Date]" || function(n) {
|
|
335
|
+
return t === "[object RegExp]" || t === "[object Date]" || (function(n) {
|
|
336
336
|
return n.$$typeof === At;
|
|
337
|
-
}(e);
|
|
337
|
+
})(e);
|
|
338
338
|
}
|
|
339
339
|
const At = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.element") : 60103;
|
|
340
340
|
function Mt(e) {
|
|
341
|
-
return /* @__PURE__ */ function(t) {
|
|
341
|
+
return /* @__PURE__ */ (function(t) {
|
|
342
342
|
return !!t && typeof t == "object";
|
|
343
|
-
}(e) && !Lt(e);
|
|
343
|
+
})(e) && !Lt(e);
|
|
344
344
|
}
|
|
345
345
|
function re(e, t) {
|
|
346
346
|
return t.clone !== !1 && t.isMergeableObject(e) ? Y((n = e, Array.isArray(n) ? [] : {}), e, t) : e;
|
|
@@ -352,11 +352,11 @@ function jt(e, t, n) {
|
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
function Be(e) {
|
|
355
|
-
return Object.keys(e).concat(function(t) {
|
|
355
|
+
return Object.keys(e).concat((function(t) {
|
|
356
356
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(n) {
|
|
357
357
|
return Object.propertyIsEnumerable.call(t, n);
|
|
358
358
|
}) : [];
|
|
359
|
-
}(e));
|
|
359
|
+
})(e));
|
|
360
360
|
}
|
|
361
361
|
function $e(e, t) {
|
|
362
362
|
try {
|
|
@@ -372,11 +372,11 @@ function Pt(e, t, n) {
|
|
|
372
372
|
}), Be(t).forEach(function(o) {
|
|
373
373
|
(function(i, a) {
|
|
374
374
|
return $e(i, a) && !(Object.hasOwnProperty.call(i, a) && Object.propertyIsEnumerable.call(i, a));
|
|
375
|
-
})(e, o) || ($e(e, o) && n.isMergeableObject(t[o]) ? r[o] = function(i, a) {
|
|
375
|
+
})(e, o) || ($e(e, o) && n.isMergeableObject(t[o]) ? r[o] = (function(i, a) {
|
|
376
376
|
if (!a.customMerge) return Y;
|
|
377
377
|
const l = a.customMerge(i);
|
|
378
378
|
return typeof l == "function" ? l : Y;
|
|
379
|
-
}(o, n)(e[o], t[o], n) : r[o] = re(t[o], n));
|
|
379
|
+
})(o, n)(e[o], t[o], n) : r[o] = re(t[o], n));
|
|
380
380
|
}), r;
|
|
381
381
|
}
|
|
382
382
|
function Y(e, t, n) {
|
|
@@ -1504,4 +1504,4 @@ var ln = /* @__PURE__ */ Object.freeze({
|
|
|
1504
1504
|
__proto__: null,
|
|
1505
1505
|
initialize: an
|
|
1506
1506
|
});
|
|
1507
|
-
`,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./
|
|
1507
|
+
`,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./pMhwMbeyP1bo-wZQ.cjs")),n=new u(t=>e(t));return await n.start(),n};exports.createCompilerWorker=async function(){if(typeof process<"u"&&process.versions?.node&&typeof Worker>"u")return await l();if(typeof Worker<"u"){const e=new c(()=>new d);try{return await e.start(),e}catch(n){console.error("Failed to start TypescriptCompiler worker reverting to fallback:",n)}}return await l()};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./DBDrj3h1JjZiBMa8.cjs");function me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?re(Object(r),!0).forEach(function(n){me(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ye(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(n){ye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,a=new Array(u),p=0;p<u;p++)a[p]=arguments[p];return t.apply(r,[].concat(o,a))}}}function U(e){return{}.toString.call(e).includes("Object")}function q(e){return typeof e=="function"}var P=D(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),ve=function(e,t){return U(t)||P("changeType"),Object.keys(t).some(function(r){return n=e,o=r,!Object.prototype.hasOwnProperty.call(n,o);var n,o})&&P("changeField"),t},be=function(e){q(e)||P("selectorType")},Ee=function(e){q(e)||U(e)||P("handlerType"),U(e)&&Object.values(e).some(function(t){return!q(t)})&&P("handlersType")},Oe=function(e){var t;e||P("initialIsRequired"),U(e)||P("initialType"),t=e,Object.keys(t).length||P("initialContent")};function we(e,t){return q(t)?t(e.current):t}function je(e,t){return e.current=ie(ie({},e.current),t),t}function xe(e,t,r){return q(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var K,Me=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Oe(e),Ee(t);var r={current:e},n=D(xe)(r,t),o=D(je)(r),i=D(ve)(e),u=D(we)(r);return[function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return be(a),a(r.current)},function(a){(function(){for(var p=arguments.length,g=new Array(p),O=0;O<p;O++)g[O]=arguments[O];return function(b){return g.reduceRight(function(x,M){return M(x)},b)}})(n,o,i,u)(a)}]},le={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
7
|
+
You are using deprecated way of configuration.
|
|
8
|
+
|
|
9
|
+
Instead of using
|
|
10
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
11
|
+
use
|
|
12
|
+
monaco.config({ paths: { vs: '...' } })
|
|
13
|
+
|
|
14
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
15
|
+
`},ue=(K=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.length>=K.length?K.apply(this,n):function(){for(var i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];return e.apply(t,[].concat(n,u))}})(le),Pe=function(e){var t;return e||ue("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||ue("configType"),e.urls?(console.warn(le.deprecation),{paths:{vs:e.urls.monacoBase}}):e};function se(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],se(e[r],t[r]))}),ne(ne({},e),t)}var Se={type:"cancelation",msg:"operation is manually canceled"};function Q(e){var t=!1,r=new Promise(function(n,o){e.then(function(i){return t?o(Se):n(i)}),e.catch(o)});return r.cancel=function(){return t=!0},r}var W,fe=(function(e){if(Array.isArray(e))return e})(W=Me({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||(function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e)){var t=[],r=!0,n=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(t.push(i.value),t.length!==2);r=!0);}catch(a){n=!0,o=a}finally{try{r||u.return==null||u.return()}finally{if(n)throw o}}return t}})(W)||(function(e){if(e){if(typeof e=="string")return oe(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?oe(e,2):void 0}})(W)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(),z=fe[0],B=fe[1];function Re(e){return document.body.appendChild(e)}function ke(e){var t,r,n=z(function(i){return{config:i.config,reject:i.reject}}),o=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return o.onload=function(){return e()},o.onerror=n.reject,o}function Te(){var e=z(function(r){return{config:r.config,resolve:r.resolve,reject:r.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){de(r),e.resolve(r)},function(r){e.reject(r)})}function de(e){z().monaco||B({monaco:e})}var X=new Promise(function(e,t){return B({resolve:e,reject:t})}),V={config:function(e){var t=Pe(e),r=t.monaco,n=(function(o,i){if(o==null)return{};var u,a,p=(function(O,b){if(O==null)return{};var x,M,S={},R=Object.keys(O);for(M=0;M<R.length;M++)x=R[M],b.indexOf(x)>=0||(S[x]=O[x]);return S})(o,i);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(o);for(a=0;a<g.length;a++)u=g[a],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(o,u)&&(p[u]=o[u])}return p})(t,["monaco"]);B(function(o){return{config:se(o.config,n),monaco:r}})},init:function(){var e=z(function(t){return{monaco:t.monaco,isInitialized:t.isInitialized,resolve:t.resolve}});if(!e.isInitialized){if(B({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Q(X);if(window.monaco&&window.monaco.editor)return de(window.monaco),e.resolve(window.monaco),Q(X);(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(i,u){return u(i)},o)}})(Re,ke)(Te)}return Q(X)},__getMonacoInstance:function(){return z(function(e){return e.monaco})}},Ie={display:"flex",position:"relative",textAlign:"initial"},Ce={width:"100%"},Ae={display:"none"},De={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Ve=function({children:e}){return c.mt.createElement("div",{style:De.container},e)},pe=c.reactExports.memo(function({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:u}){return c.mt.createElement("section",{style:{...Ie,width:e,height:t},...u},!r&&c.mt.createElement(Ve,null,n),c.mt.createElement("div",{ref:o,style:{...Ce,...!r&&Ae},className:i}))}),Z=function(e){c.reactExports.useEffect(e,[])},w=function(e,t,r=!0){let n=c.reactExports.useRef(!0);c.reactExports.useEffect(n.current||!r?()=>{n.current=!1}:e,t)};function L(){}function T(e,t,r,n){return i=n,(o=e).editor.getModel(ae(o,i))||(function(u,a,p,g){return u.editor.createModel(a,p,g?ae(u,g):void 0)})(e,t,r,n);var o,i}function ae(e,t){return e.Uri.parse(t)}var Le=c.reactExports.memo(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:u,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:p=!1,theme:g="light",loading:O="Loading...",options:b={},height:x="100%",width:M="100%",className:S,wrapperProps:R={},beforeMount:Y=L,onMount:$=L}){let[E,I]=c.reactExports.useState(!1),[C,m]=c.reactExports.useState(!0),y=c.reactExports.useRef(null),f=c.reactExports.useRef(null),A=c.reactExports.useRef(null),v=c.reactExports.useRef($),l=c.reactExports.useRef(Y),k=c.reactExports.useRef(!1);Z(()=>{let s=V.init();return s.then(d=>(f.current=d)&&m(!1)).catch(d=>d?.type!=="cancelation"&&console.error("Monaco initialization: error:",d)),()=>y.current?(function(){let d=y.current?.getModel();a||d?.original?.dispose(),p||d?.modified?.dispose(),y.current?.dispose()})():s.cancel()}),w(()=>{if(y.current&&f.current){let s=y.current.getOriginalEditor(),d=T(f.current,e||"",n||r||"text",i||"");d!==s.getModel()&&s.setModel(d)}},[i],E),w(()=>{if(y.current&&f.current){let s=y.current.getModifiedEditor(),d=T(f.current,t||"",o||r||"text",u||"");d!==s.getModel()&&s.setModel(d)}},[u],E),w(()=>{let s=y.current.getModifiedEditor();s.getOption(f.current.editor.EditorOption.readOnly)?s.setValue(t||""):t!==s.getValue()&&(s.executeEdits("",[{range:s.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),s.pushUndoStop())},[t],E),w(()=>{y.current?.getModel()?.original.setValue(e||"")},[e],E),w(()=>{let{original:s,modified:d}=y.current.getModel();f.current.editor.setModelLanguage(s,n||r||"text"),f.current.editor.setModelLanguage(d,o||r||"text")},[r,n,o],E),w(()=>{f.current?.editor.setTheme(g)},[g],E),w(()=>{y.current?.updateOptions(b)},[b],E);let _=c.reactExports.useCallback(()=>{if(!f.current)return;l.current(f.current);let s=T(f.current,e||"",n||r||"text",i||""),d=T(f.current,t||"",o||r||"text",u||"");y.current?.setModel({original:s,modified:d})},[r,t,o,e,n,i,u]),N=c.reactExports.useCallback(()=>{!k.current&&A.current&&(y.current=f.current.editor.createDiffEditor(A.current,{automaticLayout:!0,...b}),_(),f.current?.editor.setTheme(g),I(!0),k.current=!0)},[b,g,_]);return c.reactExports.useEffect(()=>{E&&v.current(y.current,f.current)},[E]),c.reactExports.useEffect(()=>{!C&&!E&&N()},[C,E,N]),c.mt.createElement(pe,{width:M,height:x,isEditorReady:E,loading:O,_ref:A,className:S,wrapperProps:R})}),F=new Map,ge=c.reactExports.memo(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:u="light",line:a,loading:p="Loading...",options:g={},overrideServices:O={},saveViewState:b=!0,keepCurrentModel:x=!1,width:M="100%",height:S="100%",className:R,wrapperProps:Y={},beforeMount:$=L,onMount:E=L,onChange:I,onValidate:C=L}){let[m,y]=c.reactExports.useState(!1),[f,A]=c.reactExports.useState(!0),v=c.reactExports.useRef(null),l=c.reactExports.useRef(null),k=c.reactExports.useRef(null),_=c.reactExports.useRef(E),N=c.reactExports.useRef($),s=c.reactExports.useRef(),d=c.reactExports.useRef(n),he=(function(h){let j=c.reactExports.useRef();return c.reactExports.useEffect(()=>{j.current=h},[h]),j.current})(i),ee=c.reactExports.useRef(!1),G=c.reactExports.useRef(!1);Z(()=>{let h=V.init();return h.then(j=>(v.current=j)&&A(!1)).catch(j=>j?.type!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>l.current?(s.current?.dispose(),x?b&&F.set(i,l.current.saveViewState()):l.current.getModel()?.dispose(),void l.current.dispose()):h.cancel()}),w(()=>{let h=T(v.current,e||n||"",t||o||"",i||r||"");h!==l.current?.getModel()&&(b&&F.set(he,l.current?.saveViewState()),l.current?.setModel(h),b&&l.current?.restoreViewState(F.get(i)))},[i],m),w(()=>{l.current?.updateOptions(g)},[g],m),w(()=>{!l.current||n===void 0||(l.current.getOption(v.current.editor.EditorOption.readOnly)?l.current.setValue(n):n!==l.current.getValue()&&(G.current=!0,l.current.executeEdits("",[{range:l.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),l.current.pushUndoStop(),G.current=!1))},[n],m),w(()=>{let h=l.current?.getModel();h&&o&&v.current?.editor.setModelLanguage(h,o)},[o],m),w(()=>{a!==void 0&&l.current?.revealLine(a)},[a],m),w(()=>{v.current?.editor.setTheme(u)},[u],m);let te=c.reactExports.useCallback(()=>{if(k.current&&v.current&&!ee.current){N.current(v.current);let h=i||r,j=T(v.current,n||e||"",t||o||"",h||"");l.current=v.current?.editor.create(k.current,{model:j,automaticLayout:!0,...g},O),b&&l.current.restoreViewState(F.get(h)),v.current.editor.setTheme(u),a!==void 0&&l.current.revealLine(a),y(!0),ee.current=!0}},[e,t,r,n,o,i,g,O,b,u,a]);return c.reactExports.useEffect(()=>{m&&_.current(l.current,v.current)},[m]),c.reactExports.useEffect(()=>{!f&&!m&&te()},[f,m,te]),d.current=n,c.reactExports.useEffect(()=>{m&&I&&(s.current?.dispose(),s.current=l.current?.onDidChangeModelContent(h=>{G.current||I(l.current.getValue(),h)}))},[m,I]),c.reactExports.useEffect(()=>{if(m){let h=v.current.editor.onDidChangeMarkers(j=>{let H=l.current.getModel()?.uri;if(H&&j.find(J=>J.path===H.path)){let J=v.current.editor.getModelMarkers({resource:H});C?.(J)}});return()=>{h?.dispose()}}return()=>{}},[m,C]),c.mt.createElement(pe,{width:M,height:S,isEditorReady:m,loading:p,_ref:k,className:R,wrapperProps:Y})}),qe=ge;exports.DiffEditor=Le,exports.Editor=ge,exports.default=qe,exports.loader=V,exports.useMonaco=function(){let[e,t]=c.reactExports.useState(V.__getMonacoInstance());return Z(()=>{let r;return e||(r=V.init(),r.then(n=>{t(n)})),()=>r?.cancel()}),e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./CTshgy8ZuonQcmqq.cjs"));return this.workerWrapper=await r(),this.workerWrapper}async compileModule(r){try{return(await this.getWorkerWrapper()).execute(r)}catch(e){throw console.error("Failed to compile using worker:",e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
|