@sheetxl/studio-vanilla 0.6.9 → 0.6.11

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.
Files changed (194) hide show
  1. package/browser/cjs/{CXUE5rWOVjcuv0l_.cjs → 0g1QZyv2wrvbRsdS.cjs} +1 -1
  2. package/browser/cjs/{D-qChmIFBCv1KOJi.cjs → 2EWWcHVDCZl4KBZh.cjs} +1 -1
  3. package/browser/cjs/{BjPuP-3W9W6NYT9V.cjs → 8kr1vhDEGTvGJAzA.cjs} +1 -1
  4. package/browser/cjs/B-iy63zNyyCfawO7.cjs +11 -0
  5. package/browser/cjs/{BJolSqJdWmY2L4Ef.cjs → B256ouyF_cklxHtX.cjs} +1 -1
  6. package/browser/cjs/{BpKRXhkK43wUi3CT.cjs → B6FgF4mYdSVu9k73.cjs} +1 -1
  7. package/browser/cjs/{BQLogR50C1MmG-XE.cjs → BAhbxVlq2_8drv_m.cjs} +1 -1
  8. package/browser/cjs/{CG4-r53H7Fj0-ZIR.cjs → BBrRZz5B2zoHAN9Y.cjs} +2 -2
  9. package/browser/cjs/{CLR2tw7tediAT4i3.cjs → BLDPuLeHWaJWwDmS.cjs} +1 -1
  10. package/browser/cjs/{BfsUYILdtXqrRJcT.cjs → BOq6rTMNi2H5ziRF.cjs} +1 -1
  11. package/browser/cjs/{DGfuDq_pQpahk68H.cjs → BOyoY_HQ258IRL7A.cjs} +2 -2
  12. package/browser/cjs/{BDcqdbUbeR_-OhaB.cjs → BR2feSbxQhiUx0ve.cjs} +1 -1
  13. package/browser/cjs/BWTZzkrzhBVcZcVO.cjs +6 -0
  14. package/browser/cjs/{DIWL3lIzZf2aFofI.cjs → BXsNN5OIqFIISk8z.cjs} +2 -2
  15. package/browser/cjs/{CdZ9xkB0-a1lq_sb.cjs → BjBwKyqsdtwBZmra.cjs} +1 -1
  16. package/browser/cjs/{BaEJI0g_NZYXRqmi.cjs → Bsh4gxB-AZa6vrho.cjs} +2 -2
  17. package/browser/cjs/BykeMXuqQ1Tsu8VV.cjs +330 -0
  18. package/browser/cjs/C46TuR3F7SprGoGG.cjs +6 -0
  19. package/browser/cjs/CA-866I7v6Zutlv9.cjs +6 -0
  20. package/browser/cjs/{4cCHMenOpUoMX-ey.cjs → CKHVD5SXHioheGLB.cjs} +1 -1
  21. package/browser/cjs/{CtPiMI5aoPJOoZPJ.cjs → CM5hMK1pUIh1eBbC.cjs} +4 -4
  22. package/browser/cjs/{BwdB25GiF1GKOWgl.cjs → CMpcVmK6NyIHZbQe.cjs} +1 -1
  23. package/browser/cjs/{BKPebwj1mIm-UfnC.cjs → CS2tXWHBVQIU67gY.cjs} +2 -2
  24. package/browser/cjs/{CZCl2XsgHAVVRgdU.cjs → CUIFforYlaNEvC1I.cjs} +4 -4
  25. package/browser/cjs/{1ZoSnZDEnt4sv55J.cjs → CW9Eb3taF--hyjO6.cjs} +2 -2
  26. package/browser/cjs/{Dy2m6bBCyB88enAm.cjs → CXy8i5LdgNECIsU8.cjs} +1 -1
  27. package/browser/cjs/{BaJWOQgGQnlMkxle.cjs → CaxLcPMfTfCP3HVM.cjs} +1 -1
  28. package/browser/cjs/{hv5j4S3_A-WFYwNc.cjs → Ce_zwBSNT8mlAnXL.cjs} +1 -1
  29. package/browser/cjs/{B1wfwwcJt9yQ9pny.cjs → Chy6NUkZXtPqgrZR.cjs} +2 -2
  30. package/browser/cjs/{B_q-1a6tXu_2TCnG.cjs → CkUIJkk4tGcBLDzt.cjs} +1 -1
  31. package/browser/cjs/{BmEqdu_KT06_KPmp.cjs → Ck_XSvnhc4XECkOd.cjs} +1 -1
  32. package/browser/cjs/{BulFNFFGWG7Q9Qqf.cjs → Cn41imsLOCTVlRxR.cjs} +2 -2
  33. package/browser/cjs/{C0QVeL8Oz6OLWY4S.cjs → Cq7t367tAjzZiHrA.cjs} +1 -1
  34. package/browser/cjs/{CYbqkA-I7eIMNbFC.cjs → CxhPRHgwpIAMDc_a.cjs} +2 -2
  35. package/browser/cjs/{DMLO1Nqc6wPdNt6e.cjs → CyCkK_PTjuR-1olP.cjs} +1 -1
  36. package/browser/cjs/{CuXA1jL8nYqRNyHC.cjs → CzmxW1qMzEA20ta2.cjs} +2 -2
  37. package/browser/cjs/{DXaK7ErUogYPqrbF.cjs → D-tsTUrXJ9H8SVUo.cjs} +1 -1
  38. package/browser/cjs/{Bqv1apOdfGQ8HWku.cjs → D1nvLhV8dNYsMbTo.cjs} +3 -3
  39. package/browser/cjs/{CizXrDFtnDzvp5GD.cjs → DEC-4LETKmaxAyGk.cjs} +1 -1
  40. package/browser/cjs/{CJSHJZnpGkEHxwTv.cjs → DLeD6vyjEjWPn6HD.cjs} +2 -2
  41. package/browser/cjs/{CH8vR45FnfXkvrJK.cjs → DM_MA2z9EviuPzoA.cjs} +1 -1
  42. package/browser/cjs/{D7vhUxv7ilVI5dOy.cjs → DSCY0h0k7_NGFAa9.cjs} +1 -1
  43. package/browser/cjs/{BTN3kUQ33wHj3-SE.cjs → D_q5Ft7rHeY_SEc_.cjs} +1 -1
  44. package/browser/cjs/{DdeWYeqiG6oDZOLT.cjs → DfHcrDlwCCeVJVws.cjs} +1 -1
  45. package/browser/cjs/{D3C8w3J8yEW_mK07.cjs → DgmHf9dI4VJCZbDp.cjs} +1 -1
  46. package/browser/cjs/{Bsibmu1cGnqOhDce.cjs → Dko_G-DbgBQsU8gK.cjs} +3 -3
  47. package/browser/cjs/{DzUtl3xEaPr2h5py.cjs → DtVW16ZMhSlBHrUI.cjs} +2 -2
  48. package/browser/cjs/{BIHX7SNYLh8tESWI.cjs → Dvswt6wd4E_kc9U6.cjs} +4 -4
  49. package/browser/cjs/{N-l_Uv53y3rLMUwH.cjs → DxTLX-Xu-p7q-rx1.cjs} +1 -1
  50. package/browser/cjs/{DBOfqYF0FuaGdU2_.cjs → U2nILmJF7mZ0IwB0.cjs} +2 -2
  51. package/browser/cjs/bJoZrtU3DvP8WHgg.cjs +6 -0
  52. package/browser/cjs/{Cch1zyhCk3YWvO-A.cjs → fCZqW0EpUS-vX5Ub.cjs} +1 -1
  53. package/browser/cjs/{CeeZ0BYOlyVekqjR.cjs → hvbMSwM_KarZIwXU.cjs} +2 -2
  54. package/browser/cjs/index.cjs +2 -2
  55. package/browser/cjs/{NpqJS8IvavlIoQ7p.cjs → kUPfWN5_ixae-NhP.cjs} +1 -1
  56. package/browser/cjs/{P5bweAaALnbuUnFz.cjs → lVAnc94189QEW85A.cjs} +2 -2
  57. package/browser/cjs/{CRH3t4ElGYXJai5K.cjs → sTEaI4C-lqFBtWvq.cjs} +2 -2
  58. package/browser/cjs/{CKgIw2SxEAIMBJnl.cjs → yXhxuzgDDWBV547R.cjs} +1 -1
  59. package/{cdn/assets/BW5l6iS-31FNFEUx.js → browser/esm/4BPCTIlF0pqI05ht.mjs} +1 -1
  60. package/browser/esm/{BWj7rV2MefNCGjZk.mjs → 7Dybvm0k5M0Rgxi9.mjs} +3 -3
  61. package/browser/esm/{CJjQplFdYThKlGF6.mjs → A0mKJagiIIafETKt.mjs} +6 -6
  62. package/browser/esm/{4zACS7fi_-m4_ce9.mjs → B371bLYYzBAadUNu.mjs} +2 -2
  63. package/{cdn/assets/Bng9ix9sfxbQZqg-.js → browser/esm/B3lbG_j1N1BUm4A1.mjs} +1 -1
  64. package/browser/esm/{Bd_TWnJ56S2tc933.mjs → B413hlEwLRdL7jdK.mjs} +5 -5
  65. package/browser/esm/{3ipr8iZEA2Lr1bGA.mjs → B6EnN2PTngU4fW3X.mjs} +4 -4
  66. package/browser/esm/{LWUa7tpq7j9-n6Ef.mjs → BBSmKE3PyYmNnNG5.mjs} +4 -4
  67. package/browser/esm/{B7XHld4IQbV1dmD8.mjs → BEPO_VFY_vEEcx57.mjs} +1 -1
  68. package/{cdn/assets/XQ_lEQBwU6Yc24dZ.js → browser/esm/BHC5dYgDe-yxi9pL.mjs} +1 -1
  69. package/browser/esm/{DrBLmfEvbDdCLYHg.mjs → BHguDOHteRDQL56G.mjs} +1 -1
  70. package/{cdn/assets/xfzdS0frUCeEtUbz.js → browser/esm/BKB3NbD6Z1Zx00fn.mjs} +1 -1
  71. package/{cdn/assets/DLv9_A2FRBPPugOR.js → browser/esm/BWVfVWPfko24QQTK.mjs} +1 -1
  72. package/browser/esm/{Dl7WapPl0fLnWm-o.mjs → BYLVMtwTimlP_9hg.mjs} +3 -3
  73. package/browser/esm/{3Dpm5egDa1V9NdGx.mjs → BZ1qIk9UaulOvJeC.mjs} +1 -1
  74. package/browser/esm/{BD1fmHO9kWVYpTn1.mjs → BaiPAiVsT4N84J6g.mjs} +2 -2
  75. package/{cdn/assets/BTWAhZsiVaprBGuq.js → browser/esm/BjsepRAVD0aE76wy.mjs} +2 -2
  76. package/{cdn/assets/91OCWp65Lh5ppevX.js → browser/esm/BrEA-Ll98LSBU5pb.mjs} +1 -1
  77. package/browser/esm/{HW-V5yVryy6T8xzs.mjs → BtxyhWlEL5IaY_hm.mjs} +7 -7
  78. package/{cdn/assets/C8wjkakCU0WmC5Dn.js → browser/esm/BxFQDHGfap0k7f8z.mjs} +1 -1
  79. package/browser/esm/{BM1G3_OQLbZr0rnk.mjs → CAD2eGmHD0r_Cj4u.mjs} +3 -3
  80. package/browser/esm/{CwQX6aDhumT_9Q1K.mjs → CBZnNZe8v548iJ_R.mjs} +1 -1
  81. package/browser/esm/{BQdwnK_VSkFn4lCK.mjs → CCfcJvj7nqz0qwrf.mjs} +1 -1
  82. package/browser/esm/{BkL2pHNfEpgy5AjI.mjs → CGkWXHIuW7Zea8eC.mjs} +16 -16
  83. package/{cdn/assets/5qa-WBpZKEe4Ogh2.js → browser/esm/CMnJNhH4Ay8dZGXp.mjs} +1 -1
  84. package/{cdn/assets/DY20lrCHUieeDicO.js → browser/esm/CPOvQuec4xYzOXDx.mjs} +1 -1
  85. package/{cdn/assets/Bsch6gORnudqZwVq.js → browser/esm/CT8OrAikF_X8OlTe.mjs} +6 -8
  86. package/browser/esm/{DPkY06F0vQMWpBCC.mjs → Cb39jxbqw2Riaewe.mjs} +2 -2
  87. package/browser/esm/{i89czqIGWW-6IN90.mjs → CcUOUH3-vLOcNeWo.mjs} +1 -1
  88. package/browser/esm/{CwHSQHPfeogKoBoY.mjs → Cecgq9vdu7WniaRl.mjs} +1 -1
  89. package/browser/esm/{CwPlu0AeEpe0XYsE.mjs → CjHEGzsBP2ps07ya.mjs} +1 -1
  90. package/browser/esm/{0MTYz8tJRkoCGZzF.mjs → CjHoMkU6X3s9wTwJ.mjs} +1 -1
  91. package/{cdn/assets/CJWcf9kZErAGQkK1.js → browser/esm/Ckz0-uTyB9pPnWVd.mjs} +1 -1
  92. package/browser/esm/{B-cjDIBT2VklBYeC.mjs → CtlaeZi8a0W6xVye.mjs} +1 -1
  93. package/{cdn/assets/Ble3ihgcekQfK3B_.js → browser/esm/D3eToVxChBm1vskm.mjs} +1 -1
  94. package/browser/esm/{jjEKB6Jbsh3AjdA_.mjs → DJVSp6k73bUNcSEM.mjs} +1 -1
  95. package/browser/esm/{CUSevRNH6XNYSTMz.mjs → DJfa0QB-LbuVDa-x.mjs} +193 -192
  96. package/browser/esm/{dT2-g9AtdFbAepFd.mjs → DMe6xRvjt3iQ0qa4.mjs} +2 -2
  97. package/{cdn/assets/C9LjcFsOsH-T9RE1.js → browser/esm/DeQF8cAfpEj04GBF.mjs} +1 -1
  98. package/browser/esm/{DvVNH_i2C7DSqkej.mjs → DgY0aShDtY6hxbQh.mjs} +2 -2
  99. package/browser/esm/{dccJ0Zb4ezHbdHlw.mjs → DmbiRnIM6oc8lzbG.mjs} +1 -1
  100. package/browser/esm/{CgvYxl-8vcaaqQNn.mjs → DqBww2VmIy1kjaRI.mjs} +1 -1
  101. package/browser/esm/{DgoERJBX4ar9cKe7.mjs → DqvsG_Kt5h7OXOD4.mjs} +1 -1
  102. package/browser/esm/{CJRNrFY2_fuYhFzN.mjs → Dr3-VaDEehS5r3lW.mjs} +1 -1
  103. package/{cdn/assets/CSf8GiBiZnrqHDpM.js → browser/esm/Ds6-ZtMzNBnapRPR.mjs} +1 -1
  104. package/browser/esm/Dz_Xpa7-vaKrl6gi.mjs +10 -0
  105. package/{cdn/assets/VlS6qOo0BApKuraY.js → browser/esm/Jo81Ec76yqof_D2n.mjs} +2 -2
  106. package/{cdn/assets/7d1Vn9ZPowvw8KGz.js → browser/esm/QnOc_115EfuiMrV9.mjs} +2 -2
  107. package/browser/esm/XrnAhMT2xm37Qcui.mjs +10 -0
  108. package/browser/esm/{B48YCRMiJCy8-uo5.mjs → be56x0hvyZjriF-C.mjs} +2 -2
  109. package/browser/esm/{D_-y8IhesILZ4tnZ.mjs → cMpuf0nUKBKIvP6-.mjs} +9 -9
  110. package/browser/esm/{MD_E4lvBRo_augAU.mjs → e9sNJT-C4juKOvPJ.mjs} +1 -1
  111. package/{cdn/assets/OxSKnyWAEpg5PsII.js → browser/esm/f1sPjK-5gCikEO7x.mjs} +1 -1
  112. package/browser/esm/index.mjs +2 -2
  113. package/browser/esm/{DwIBlukg9B0cEOp-.mjs → j8k5EUdYa05M8Dx4.mjs} +4 -4
  114. package/browser/esm/{DaD2MU-2RQc5gMNJ.mjs → n5ivgVEV9XXtLNNI.mjs} +4 -4
  115. package/browser/esm/{CAJ6C5VMtWhyJJx2.mjs → nSlm8uWfv0TKCPMH.mjs} +2 -2
  116. package/browser/esm/{B_CyYygjLPHMFaOs.mjs → sFj63f4s74BFpJl4.mjs} +14099 -14078
  117. package/cdn/assets/{BLuNQHXC-V-MfDcj.js → -sMQ5ptS-I77owZz.js} +7 -7
  118. package/{browser/esm/BW5l6iS-31FNFEUx.mjs → cdn/assets/4BPCTIlF0pqI05ht.js} +1 -1
  119. package/cdn/assets/{Dz1xMt8FctgB2-OB.js → 4_eVc_NHveHr_iYh.js} +10 -10
  120. package/{browser/esm/Bng9ix9sfxbQZqg-.mjs → cdn/assets/B3lbG_j1N1BUm4A1.js} +1 -1
  121. package/cdn/assets/{C0G3pUQkCol3zN7U.js → B5ggAX8if47B8zgf.js} +33 -33
  122. package/cdn/assets/{DUpAuNDCz94KK39E.js → B9M_HdQR_7nCf0PF.js} +4 -4
  123. package/cdn/assets/{BJ8br6jkSlp0O4YB.js → BA84bb8x6bfiOlla.js} +1 -1
  124. package/cdn/assets/{B7XHld4IQbV1dmD8.js → BEPO_VFY_vEEcx57.js} +1 -1
  125. package/{browser/esm/XQ_lEQBwU6Yc24dZ.mjs → cdn/assets/BHC5dYgDe-yxi9pL.js} +1 -1
  126. package/cdn/assets/{DrBLmfEvbDdCLYHg.js → BHguDOHteRDQL56G.js} +1 -1
  127. package/cdn/assets/{UVD__1wXHI_R_JrB.js → BHqxKaUWRnqlOIwU.js} +4 -4
  128. package/{browser/esm/xfzdS0frUCeEtUbz.mjs → cdn/assets/BKB3NbD6Z1Zx00fn.js} +1 -1
  129. package/cdn/assets/{2AGc6eLTYagfdb_F.js → BWPDJIAKkspYDjeG.js} +2 -2
  130. package/{browser/esm/DLv9_A2FRBPPugOR.mjs → cdn/assets/BWVfVWPfko24QQTK.js} +1 -1
  131. package/cdn/assets/{BlQb8YFDM-0GCRen.js → BXtrrp3TwXPldY5p.js} +3 -3
  132. package/cdn/assets/{3Dpm5egDa1V9NdGx.js → BZ1qIk9UaulOvJeC.js} +1 -1
  133. package/cdn/assets/{JSGLcwOt970MLSz_.js → BkDeNlXS9IF_cU9l.js} +10 -10
  134. package/{browser/esm/91OCWp65Lh5ppevX.mjs → cdn/assets/BrEA-Ll98LSBU5pb.js} +1 -1
  135. package/cdn/assets/{DpHg8vSuOwzhZ8va.js → Bt7MaehKrr9HHrl_.js} +193 -192
  136. package/{browser/esm/C8wjkakCU0WmC5Dn.mjs → cdn/assets/BxFQDHGfap0k7f8z.js} +1 -1
  137. package/cdn/assets/{CwQX6aDhumT_9Q1K.js → CBZnNZe8v548iJ_R.js} +1 -1
  138. package/cdn/assets/{DO15jgHFM8r_cd4h.js → CC_ssLj3EZenV9ci.js} +3 -3
  139. package/cdn/assets/{BQdwnK_VSkFn4lCK.js → CCfcJvj7nqz0qwrf.js} +1 -1
  140. package/cdn/assets/{CqDkvFWJ5TTkA4An.js → CDl3cGYRe3FVTAa0.js} +2 -2
  141. package/cdn/assets/{CfbUY4iA-KC-HwMd.js → CHBYGIRMkPSTfKHz.js} +9 -9
  142. package/{browser/esm/5qa-WBpZKEe4Ogh2.mjs → cdn/assets/CMnJNhH4Ay8dZGXp.js} +1 -1
  143. package/{browser/esm/DY20lrCHUieeDicO.mjs → cdn/assets/CPOvQuec4xYzOXDx.js} +1 -1
  144. package/cdn/assets/{Bdj5knA_qC0CeQP_.js → CRGvn7E4ngCBM7q1.js} +2 -2
  145. package/cdn/assets/{Cu4iM0RF98ZktjPQ.js → CZ8wwk5mEEEIq0FP.js} +3 -3
  146. package/cdn/assets/{i89czqIGWW-6IN90.js → CcUOUH3-vLOcNeWo.js} +1 -1
  147. package/cdn/assets/{CwHSQHPfeogKoBoY.js → Cecgq9vdu7WniaRl.js} +1 -1
  148. package/{browser/esm/DvnbTrr1a25Bw3Q0.mjs → cdn/assets/CiQ1bXvali4tgsRH.js} +2 -2
  149. package/cdn/assets/{CwPlu0AeEpe0XYsE.js → CjHEGzsBP2ps07ya.js} +1 -1
  150. package/cdn/assets/{0MTYz8tJRkoCGZzF.js → CjHoMkU6X3s9wTwJ.js} +1 -1
  151. package/{browser/esm/CJWcf9kZErAGQkK1.mjs → cdn/assets/Ckz0-uTyB9pPnWVd.js} +1 -1
  152. package/cdn/assets/{DYUSMk7zgJjlElMh.js → CqLqtJUqZ_vShU25.js} +4 -4
  153. package/cdn/assets/{DYZBZ7zWUU5S9N4t.js → CwiZnPVW2X9r3FKB.js} +3 -3
  154. package/{browser/esm/Ble3ihgcekQfK3B_.mjs → cdn/assets/D3eToVxChBm1vskm.js} +1 -1
  155. package/cdn/assets/{BpHqnjG6_A_iZy--.js → D556jZ6f2NRUvUyF.js} +14936 -14915
  156. package/{browser/esm/C5toxLwX1xly5ni4.mjs → cdn/assets/D6KyT1Esxw1TEgUu.js} +2 -2
  157. package/cdn/assets/{jjEKB6Jbsh3AjdA_.js → DJVSp6k73bUNcSEM.js} +1 -1
  158. package/cdn/assets/{D_17PMRsUyONTQLp.js → DNwggyYaFafLdQV0.js} +21 -21
  159. package/cdn/assets/{CQxER7Aq1ua_kdwa.js → DUeMOZjhpvJ_6uhS.js} +2 -2
  160. package/cdn/assets/{D_abAgUd-7o05Qwa.js → DaB2B7Zar-aUVirp.js} +2 -2
  161. package/cdn/assets/Dc1kMbzWjvllPqe1.js +43 -0
  162. package/{browser/esm/C9LjcFsOsH-T9RE1.mjs → cdn/assets/DeQF8cAfpEj04GBF.js} +1 -1
  163. package/cdn/assets/{DdUcB5l48Pr_Qyce.js → DfFtQgx2dh9vIP0c.js} +9 -9
  164. package/cdn/assets/{BkDRMMQpYcDJo_LF.js → DiiI8CNWqen-tunB.js} +4 -4
  165. package/cdn/assets/{dccJ0Zb4ezHbdHlw.js → DmbiRnIM6oc8lzbG.js} +1 -1
  166. package/cdn/assets/{CgvYxl-8vcaaqQNn.js → DqBww2VmIy1kjaRI.js} +1 -1
  167. package/cdn/assets/{DgoERJBX4ar9cKe7.js → DqvsG_Kt5h7OXOD4.js} +1 -1
  168. package/cdn/assets/{CJRNrFY2_fuYhFzN.js → Dr3-VaDEehS5r3lW.js} +1 -1
  169. package/{browser/esm/CSf8GiBiZnrqHDpM.mjs → cdn/assets/Ds6-ZtMzNBnapRPR.js} +1 -1
  170. package/cdn/assets/Dz_Xpa7-vaKrl6gi.js +10 -0
  171. package/{browser/esm/DrCApYAgM59b1gkb.mjs → cdn/assets/IzSH40VnDHnVyGKo.js} +2 -2
  172. package/cdn/assets/{5gQ_mS4isigP5ESA.js → KtA9rkFunJ_pznZ7.js} +4 -4
  173. package/cdn/assets/{UqIDPaqYrdp_CbFM.js → L1HZTkI2V44CIIqF.js} +11 -11
  174. package/cdn/assets/XrnAhMT2xm37Qcui.js +10 -0
  175. package/cdn/assets/{Dl-a7-_qzDbgeRKv.js → dBypFeuqSOAN27DS.js} +4 -4
  176. package/cdn/assets/{MD_E4lvBRo_augAU.js → e9sNJT-C4juKOvPJ.js} +1 -1
  177. package/{browser/esm/OxSKnyWAEpg5PsII.mjs → cdn/assets/f1sPjK-5gCikEO7x.js} +1 -1
  178. package/cdn/assets/{vAlH-fnjW9UgVoQL.js → jCSnsi7oZvNEZ68R.js} +1 -1
  179. package/cdn/assets/{ev6SuzxjaCmJsLou.js → o4XtjKEYah97mq2L.js} +27 -27
  180. package/cdn/assets/{BmbVMB14jDSRfeyg.js → rS6lMMOdCvbDI366.js} +2 -2
  181. package/cdn/index.js +2 -2
  182. package/cdn/loader.js +1 -1
  183. package/package.json +3 -3
  184. package/browser/cjs/1yauO7dmzjUaAZLh.cjs +0 -11
  185. package/browser/cjs/BD2XOp_mCEDiU1Vc.cjs +0 -6
  186. package/browser/cjs/BQroH-EqHlkbCQXw.cjs +0 -6
  187. package/browser/cjs/DPCTm_ZmEZ2rV5oX.cjs +0 -6
  188. package/browser/cjs/Dl3Vea8PMrr9yITV.cjs +0 -6
  189. package/browser/cjs/h--y53Cz6XBstcC3.cjs +0 -330
  190. package/browser/esm/DKtZ47pCqe_X87ze.mjs +0 -10
  191. package/browser/esm/DdccOJLGMMaxHZ2C.mjs +0 -41
  192. package/browser/esm/DivcJTGEgdJhrXuv.mjs +0 -10
  193. package/cdn/assets/DKtZ47pCqe_X87ze.js +0 -10
  194. package/cdn/assets/DivcJTGEgdJhrXuv.js +0 -10
@@ -1,22 +1,22 @@
1
- import { a as L } from "./BmbVMB14jDSRfeyg.js";
2
- import { ae as $t, af as qt, ag as Kt, ah as ht, ai as Xt, aj as Y, ak as Yt, al as Jt, am as Zt, an as Qt, p as X, G as eo, H as to, f as ft, X as oo, B as ce, t as no, R as ro, ao as io, ap as lo, s as de, F as so, e as ao, v as co, aq as me, ar as uo, as as ho, at as N, au as U, av as fo } from "./BpHqnjG6_A_iZy--.js";
3
- import { r as C, m as pt } from "./DO15jgHFM8r_cd4h.js";
1
+ import { a as L } from "./rS6lMMOdCvbDI366.js";
2
+ import { ae as $t, af as Kt, ag as qt, ah as ht, ai as Xt, aj as Y, ak as Yt, al as Jt, am as Zt, an as Qt, r as X, K as eo, L as to, p as ft, X as oo, h as ce, x as no, V as ro, ao as io, ap as lo, s as de, F as so, o as ao, y as co, aq as me, ar as uo, as as ho, at as N, au as U, av as fo } from "./D556jZ6f2NRUvUyF.js";
3
+ import { r as C, m as pt } from "./CC_ssLj3EZenV9ci.js";
4
4
  /**
5
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
5
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
6
6
  *
7
7
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
8
8
  * License: The license can be found at https://www.sheetxl.com/license.
9
9
  */
10
10
  const po = C.createContext(), go = C.createContext();
11
11
  function mo(o) {
12
- return qt("MuiTableCell", o);
12
+ return Kt("MuiTableCell", o);
13
13
  }
14
14
  const vo = $t("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "sizeMedium", "paddingCheckbox", "paddingNone", "alignLeft", "alignCenter", "alignRight", "alignJustify", "stickyHeader"]), _o = ht("td", { name: "MuiTableCell", slot: "Root", overridesResolver: (o, e) => {
15
15
  const { ownerState: t } = o;
16
16
  return [e.root, e[t.variant], e[`size${Y(t.size)}`], t.padding !== "normal" && e[`padding${Y(t.padding)}`], t.align !== "inherit" && e[`align${Y(t.align)}`], t.stickyHeader && e.stickyHeader];
17
17
  } })(Jt(({ theme: o }) => ({ ...o.typography.body2, display: "table-cell", verticalAlign: "inherit", borderBottom: o.vars ? `1px solid ${o.vars.palette.TableCell.border}` : `1px solid
18
18
  ${o.palette.mode === "light" ? Zt(X(o.palette.divider, 1), 0.88) : Qt(X(o.palette.divider, 1), 0.68)}`, textAlign: "left", padding: 16, variants: [{ props: { variant: "head" }, style: { color: (o.vars || o).palette.text.primary, lineHeight: o.typography.pxToRem(24), fontWeight: o.typography.fontWeightMedium } }, { props: { variant: "body" }, style: { color: (o.vars || o).palette.text.primary } }, { props: { variant: "footer" }, style: { color: (o.vars || o).palette.text.secondary, lineHeight: o.typography.pxToRem(21), fontSize: o.typography.pxToRem(12) } }, { props: { size: "small" }, style: { padding: "6px 16px", [`&.${vo.paddingCheckbox}`]: { width: 24, padding: "0 12px 0 16px", "& > *": { padding: 0 } } } }, { props: { padding: "checkbox" }, style: { width: 48, padding: "0 0 0 4px" } }, { props: { padding: "none" }, style: { padding: 0 } }, { props: { align: "left" }, style: { textAlign: "left" } }, { props: { align: "center" }, style: { textAlign: "center" } }, { props: { align: "right" }, style: { textAlign: "right", flexDirection: "row-reverse" } }, { props: { align: "justify" }, style: { textAlign: "justify" } }, { props: ({ ownerState: e }) => e.stickyHeader, style: { position: "sticky", top: 0, zIndex: 2, backgroundColor: (o.vars || o).palette.background.default } }] }))), Me = C.forwardRef(function(o, e) {
19
- const t = Kt({ props: o, name: "MuiTableCell" }), { align: n = "inherit", className: r, component: i, padding: l, scope: a, size: s, sortDirection: c, variant: d, ...h } = t, f = C.useContext(po), u = C.useContext(go), _ = u && u.variant === "head";
19
+ const t = qt({ props: o, name: "MuiTableCell" }), { align: n = "inherit", className: r, component: i, padding: l, scope: a, size: s, sortDirection: c, variant: d, ...h } = t, f = C.useContext(po), u = C.useContext(go), _ = u && u.variant === "head";
20
20
  let g;
21
21
  g = i || (_ ? "th" : "td");
22
22
  let m = a;
@@ -799,7 +799,7 @@ var bo = (F = typeof window < "u" ? window : typeof self < "u" ? self : {}).requ
799
799
  }, r = { id: $e(n) };
800
800
  return r;
801
801
  };
802
- function qe(o, e) {
802
+ function Ke(o, e) {
803
803
  var t = Object.keys(o);
804
804
  if (Object.getOwnPropertySymbols) {
805
805
  var n = Object.getOwnPropertySymbols(o);
@@ -812,9 +812,9 @@ function qe(o, e) {
812
812
  function D(o) {
813
813
  for (var e = 1; e < arguments.length; e++) {
814
814
  var t = arguments[e] != null ? arguments[e] : {};
815
- e % 2 ? qe(Object(t), !0).forEach(function(n) {
815
+ e % 2 ? Ke(Object(t), !0).forEach(function(n) {
816
816
  p(o, n, t[n]);
817
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(n) {
817
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Ke(Object(t)).forEach(function(n) {
818
818
  Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
819
819
  });
820
820
  }
@@ -830,7 +830,7 @@ function Tt() {
830
830
  return !!o;
831
831
  })();
832
832
  }
833
- var Ke = "requested", V = (function() {
833
+ var qe = "requested", V = (function() {
834
834
  function o(e) {
835
835
  var t, n, r, i;
836
836
  G(this, o), n = this, i = [e], r = I(r = o), p(t = H(n, Tt() ? Reflect.construct(r, i || [], I(n).constructor) : r.apply(n, i)), "_onGridRenderedMemoizer", Z()), p(t, "_onScrollMemoizer", Z(!1)), p(t, "_deferredInvalidateColumnIndex", null), p(t, "_deferredInvalidateRowIndex", null), p(t, "_recomputeScrollLeftFlag", !1), p(t, "_recomputeScrollTopFlag", !1), p(t, "_horizontalScrollBarSize", 0), p(t, "_verticalScrollBarSize", 0), p(t, "_scrollbarPresenceChanged", !1), p(t, "_scrollingContainer", void 0), p(t, "_childrenToDisplay", void 0), p(t, "_columnStartIndex", void 0), p(t, "_columnStopIndex", void 0), p(t, "_rowStartIndex", void 0), p(t, "_rowStopIndex", void 0), p(t, "_renderedColumnStartIndex", 0), p(t, "_renderedColumnStopIndex", 0), p(t, "_renderedRowStartIndex", 0), p(t, "_renderedRowStopIndex", 0), p(t, "_initialScrollTop", void 0), p(t, "_initialScrollLeft", void 0), p(t, "_disablePointerEventsTimeoutId", void 0), p(t, "_styleCache", {}), p(t, "_cellCache", {}), p(t, "_debounceScrollEndedCallback", function() {
@@ -896,7 +896,7 @@ var Ke = "requested", V = (function() {
896
896
  var n = this, r = this.props, i = r.autoHeight, l = r.autoWidth, a = r.columnCount, s = r.height, c = r.rowCount, d = r.scrollToAlignment, h = r.scrollToColumn, f = r.scrollToRow, u = r.width, _ = this.state, g = _.scrollLeft, m = _.scrollPositionChangeReason, S = _.scrollTop, y = _.instanceProps;
897
897
  this._handleInvalidatedGridSize();
898
898
  var v = a > 0 && e.columnCount === 0 || c > 0 && e.rowCount === 0;
899
- m === Ke && (!l && g >= 0 && (g !== this._scrollingContainer.scrollLeft || v) && (this._scrollingContainer.scrollLeft = g), !i && S >= 0 && (S !== this._scrollingContainer.scrollTop || v) && (this._scrollingContainer.scrollTop = S));
899
+ m === qe && (!l && g >= 0 && (g !== this._scrollingContainer.scrollLeft || v) && (this._scrollingContainer.scrollLeft = g), !i && S >= 0 && (S !== this._scrollingContainer.scrollTop || v) && (this._scrollingContainer.scrollTop = S));
900
900
  var w = (e.width === 0 || e.height === 0) && s > 0 && u > 0;
901
901
  if (this._recomputeScrollLeftFlag ? (this._recomputeScrollLeftFlag = !1, this._updateScrollLeftForScrollToColumn(this.props)) : Ve({ cellSizeAndPositionManager: y.columnSizeAndPositionManager, previousCellsCount: e.columnCount, previousCellSize: e.columnWidth, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToColumn, previousSize: e.width, scrollOffset: g, scrollToAlignment: d, scrollToIndex: h, size: u, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
902
902
  return n._updateScrollLeftForScrollToColumn(n.props);
@@ -1000,7 +1000,7 @@ var Ke = "requested", V = (function() {
1000
1000
  } }, { key: "_getEstimatedRowSize", value: function(e) {
1001
1001
  return typeof e.rowHeight == "number" ? e.rowHeight : e.estimatedRowSize;
1002
1002
  } }, { key: "_getScrollToPositionStateUpdate", value: function(e) {
1003
- var t = e.prevState, n = e.scrollLeft, r = e.scrollTop, i = { scrollPositionChangeReason: Ke };
1003
+ var t = e.prevState, n = e.scrollLeft, r = e.scrollTop, i = { scrollPositionChangeReason: qe };
1004
1004
  return typeof n == "number" && n >= 0 && (i.scrollDirectionHorizontal = n > t.scrollLeft ? 1 : -1, i.scrollLeft = n), typeof r == "number" && r >= 0 && (i.scrollDirectionVertical = r > t.scrollTop ? 1 : -1, i.scrollTop = r), typeof n == "number" && n >= 0 && n !== t.scrollLeft || typeof r == "number" && r >= 0 && r !== t.scrollTop ? i : {};
1005
1005
  } }, { key: "_wrapSizeGetter", value: function(e) {
1006
1006
  return typeof e == "function" ? e : function() {
@@ -1302,22 +1302,22 @@ te.intervals = function(o) {
1302
1302
  var n;
1303
1303
  return o < this.mid && this.left && (n = this.left.queryInterval(o, e, t)) || e > this.mid && this.right && (n = this.right.queryInterval(o, e, t)) ? n : e < this.mid ? Ze(this.leftPoints, e, t) : o > this.mid ? Qe(this.rightPoints, o, t) : et(this.leftPoints, t);
1304
1304
  };
1305
- var K = Lt.prototype;
1306
- K.insert = function(o) {
1305
+ var q = Lt.prototype;
1306
+ q.insert = function(o) {
1307
1307
  this.root ? this.root.insert(o) : this.root = new Oe(o[0], null, null, [o], [o]);
1308
- }, K.remove = function(o) {
1308
+ }, q.remove = function(o) {
1309
1309
  if (this.root) {
1310
1310
  var e = this.root.remove(o);
1311
1311
  return e === 2 && (this.root = null), e !== 0;
1312
1312
  }
1313
1313
  return !1;
1314
- }, K.queryPoint = function(o, e) {
1314
+ }, q.queryPoint = function(o, e) {
1315
1315
  if (this.root) return this.root.queryPoint(o, e);
1316
- }, K.queryInterval = function(o, e, t) {
1316
+ }, q.queryInterval = function(o, e, t) {
1317
1317
  if (o <= e && this.root) return this.root.queryInterval(o, e, t);
1318
- }, Object.defineProperty(K, "count", { get: function() {
1318
+ }, Object.defineProperty(q, "count", { get: function() {
1319
1319
  return this.root ? this.root.count : 0;
1320
- } }), Object.defineProperty(K, "intervals", { get: function() {
1320
+ } }), Object.defineProperty(q, "intervals", { get: function() {
1321
1321
  return this.root ? this.root.intervals([]) : [];
1322
1322
  } });
1323
1323
  var _e = A(function o() {
@@ -1865,12 +1865,12 @@ p(ze, "defaultProps", { disableHeader: !1, estimatedRowSize: 30, headerHeight: 0
1865
1865
  var e = o.className, t = o.columns, n = o.style;
1866
1866
  return C.createElement("div", { className: e, role: "row", style: n }, t);
1867
1867
  }, rowStyle: {}, scrollToAlignment: "auto", scrollToIndex: -1, style: {} }), ze.propTypes = {};
1868
- var q = [], ie = null, $ = null;
1868
+ var K = [], ie = null, $ = null;
1869
1869
  function jt() {
1870
1870
  $ && ($ = null, document.body && ie != null && (document.body.style.pointerEvents = ie), ie = null);
1871
1871
  }
1872
1872
  function Ao() {
1873
- jt(), q.forEach(function(o) {
1873
+ jt(), K.forEach(function(o) {
1874
1874
  return o.__resetIsScrolling();
1875
1875
  });
1876
1876
  }
@@ -1878,20 +1878,20 @@ function Ft(o) {
1878
1878
  o.currentTarget === window && ie == null && document.body && (ie = document.body.style.pointerEvents, document.body.style.pointerEvents = "none"), (function() {
1879
1879
  $ && Q($);
1880
1880
  var e = 0;
1881
- q.forEach(function(t) {
1881
+ K.forEach(function(t) {
1882
1882
  e = Math.max(e, t.props.scrollingResetTimeInterval);
1883
1883
  }), $ = ke(Ao, e);
1884
- })(), q.forEach(function(e) {
1884
+ })(), K.forEach(function(e) {
1885
1885
  e.props.scrollElement === o.currentTarget && e.__handleWindowScrollEvent();
1886
1886
  });
1887
1887
  }
1888
1888
  function lt(o, e) {
1889
- q.some(function(t) {
1889
+ K.some(function(t) {
1890
1890
  return t.props.scrollElement === e;
1891
- }) || e.addEventListener("scroll", Ft), q.push(o);
1891
+ }) || e.addEventListener("scroll", Ft), K.push(o);
1892
1892
  }
1893
1893
  function st(o, e) {
1894
- (q = q.filter(function(t) {
1894
+ (K = K.filter(function(t) {
1895
1895
  return t !== o;
1896
1896
  })).length || (e.removeEventListener("scroll", Ft), $ && (Q($), jt()));
1897
1897
  }
@@ -2052,7 +2052,7 @@ function Do(o) {
2052
2052
  return _;
2053
2053
  }, [n, e]), [s, c] = C.useState(null);
2054
2054
  C.useEffect(() => {
2055
- import("./XQ_lEQBwU6Yc24dZ.js").then((u) => {
2055
+ import("./BHC5dYgDe-yxi9pL.js").then((u) => {
2056
2056
  c(new u.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
2057
2057
  });
2058
2058
  }, [a]);
@@ -1,6 +1,6 @@
1
- import { g as c } from "./BJ8br6jkSlp0O4YB.js";
1
+ import { g as c } from "./BA84bb8x6bfiOlla.js";
2
2
  /**
3
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
3
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
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.
@@ -114,7 +114,7 @@ const S = /* @__PURE__ */ new Map(), k = (e, o = {}) => {
114
114
  let d;
115
115
  const C = async (e) => {
116
116
  if (d) return d;
117
- const { resolveDependencies: o } = await import("./assets/CqDkvFWJ5TTkA4An.js"), s = await o(typeof e == "object" ? e?.dependencies : void 0);
117
+ const { resolveDependencies: o } = await import("./assets/CDl3cGYRe3FVTAa0.js"), s = await o(typeof e == "object" ? e?.dependencies : void 0);
118
118
  return d = await (async (a, n) => {
119
119
  typeof n == "string" && (n = { selector: n });
120
120
  try {
package/cdn/loader.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/studio-vanilla",
3
3
  "description": "SheetXL Studio - Vanilla entry point for integrating SheetXL UI.",
4
- "version": "0.6.9",
4
+ "version": "0.6.11",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "main": "./browser/esm/index.mjs",
@@ -41,8 +41,8 @@
41
41
  "@mui/styled-engine": "^6.5.0",
42
42
  "@mui/system": "^6.5.0",
43
43
  "@mui/utils": "^6.4.9",
44
- "@sheetxl/studio-mui": "^0.6.9",
45
- "@sheetxl/sdk": "^0.6.9",
44
+ "@sheetxl/studio-mui": "^0.6.11",
45
+ "@sheetxl/sdk": "^0.6.11",
46
46
  "react": "^19.1.0",
47
47
  "react-dom": "^19.1.0",
48
48
  "csstype": "^3.1.3",
@@ -1,11 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
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 u=require("./h--y53Cz6XBstcC3.cjs"),Ke=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",ys=new RegExp(`^[${Ke}][-${Ke}.0-9·̀-ͯ‿-⁀]*$`,"u");function os(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const Ye="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const z=function(i){return i===32||i===10||i===13||i===9},xs=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=os,ts=function(i){return os(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ns=[32,10,13,9],ws=ys,vs=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Ss=rs,Cs=function(i){return rs(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ks=bs,ge="http://www.w3.org/XML/1998/namespace",Jt="http://www.w3.org/2000/xmlns/",As={__proto__:null,xml:ge,xmlns:Jt},Es={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,W=13,Ht=33,ot=10,St=60,Gt=61,j=62,F=63,Zt=93,pe=i=>i===34||i===39,as=[34,39],Ds=[...as,91,j],Ps=[...as,St,Zt],Vs=[Gt,F,...ns],Os=[...ns,j,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Jt&&i.fail(`xmlns prefix must be bound to ${Jt}.`)}switch(s){case Jt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Jt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Is=i=>ks.test(i),Ls=i=>ws.test(i),es={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Ns{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Ss,this.nameCheck=Cs,this.isName=Is,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...As};const o=this.opt.additionalNamespaces;o!=null&&((function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])})(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=ts,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?W:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Es),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[es[t]]=s}off(t){this[es[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
7
- `,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
8
- `,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!ts(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!z(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=xs,this.getCode=this.getCode10):(this.isChar=vs,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=W,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ds);switch(t){case j:this.doctypeHandler?.(this.text),this.text="",this.state=W,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Ps);t!==O&&(this.text+=String.fromCodePoint(t),t===Zt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case F:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===j?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(F)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===j&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
9
- `,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===W&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case F:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=W,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==j?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=W}sCData(){this.captureToChar(Zt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Zt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case j:this.cdataHandler?.(this.text),this.text="",this.state=W;break;case Zt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===F||z(t)?(this.fail("processing instruction without a target."),this.state=t===F?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===F;n||z(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?Ht:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===F?this.state=26:z(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(F)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===j){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=W}else t===F?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==F?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=Ht}sXMLDeclName(){const t=this.captureTo(Vs);if(t===F)return this.state=Ht,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(z(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===F)return this.state=Ht,void this.fail("XML declaration is incomplete.");z(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===F)return this.state=Ht,void this.fail("XML declaration is incomplete.");z(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,F]);if(t===F)return this.state=Ht,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==F?(z(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=Ht}sXMLDeclEnding(){this.getCodeNorm()===j?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=W):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case j:this.openTag();break;case 47:this.state=35;break;default:z(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===j?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===j?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:z(t)?this.state=38:t===j?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===j?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):z(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();z(t)?this.state=36:t===j?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Os);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===j?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===j?this.closeTag():z(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case j:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=W,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Zt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case j:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
10
- `),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=W,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
11
- `),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:z(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==W&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Jt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=W,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=W,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=W,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Ns({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class Rs{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let I=S.attributes[y];if(m){if(Array.isArray(m)){for(let X=0;X<m.length;X++)if(I==null||(I=m[X](I),I==null))return}else if(I==null||(I=m(I),I==null))return}return I},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,I,X)=>{const q=P(X??m,I);q!==void 0&&(y[m]=q)},copyTo:(y,m,I)=>{const X=P(I??y,m);X!==void 0&&(b.source[y]=X)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const I=m.indexOf(":");I!==-1&&(m=m.slice(I+1));const X=n.get(m);if(c={local:m,visitor:X,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,X&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const I=m.indexOf(":");if(I!==-1&&(m=m.slice(I+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const X=a.pop()??null;c=a[a.length-1]??null;const q=X?.destination;if(q){w.pop(),b=w[w.length-1]??D;const ht=X.visitor;ht&&ht.to&&q.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(q.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):q.key?b.source[q.key]=q.source:typeof ht.to=="string"&&(b.source[ht.to]=q.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const ss=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},Ut=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Ms=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Ms[c]);let T=i("tint");if(T&&(s+=` ${u.N.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},ls=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),cs=i=>i==="true"||i==="1";class Xt{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const $s=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},is={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,createWorkbookOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./CLR2tw7tediAT4i3.cjs")),T=Promise.resolve().then(()=>require("./DPCTm_ZmEZ2rV5oX.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./Dy2m6bBCyB88enAm.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.Wm$1,m=y.beginPersist(),I={},X=new Set,q=new Map;q.set("richTypes",[]);const ht=new Map,Pe=[],ne=V=>d.files[V],fe=(V,U)=>{const Y=V.lastIndexOf("/"),ut=V.substring(0,Y+1)+"_rels/"+V.substring(Y+1,V.length)+".rels";let dt=U.get(ut);return dt||(dt=((M,be,xe,we,Ft=null)=>{if(!M)return null;const tt=Ee(M,be,xe,we,Ft);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const Wt=bt[xt],kt=tt[Wt];et.set(Wt,kt)}return et})(ut,ne,f,P,yt),U.set(ut,dt)),dt},ae=(V,U,Y,ut=ht)=>{let dt=fe(U,ut).get(V),M=dt?.target;if(!M)return null;if(dt.targetMode==="External")return dt.target;const be=U.lastIndexOf("/"),xe=U.substring(0,be+1);M.startsWith("/")||(M=xe+M),M=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})(M);const we=P?.getVisitorParamsState().get("dxfs");let Ft=ut.get(M);if(!Ft)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Ft=tt;const et=async()=>{const bt=((L,G,Qt,_,Z,J,wt)=>{const h=new Rs,Q=new u.zt.TransposedBuilder;let H=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(J?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.xu.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.xu.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.xu.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.xu.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.xu.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.xu.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.lo.fastStringToRange(p,is).colStart,pt=u.lo.fastStringToRange(r.ref,is),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{H=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=cs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{H=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{H=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!H)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(H&&e.getAttribute("state")==="frozen"){const r={};H.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=H.topLeft?u.lo.fastStringToCell(H.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.lo.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(L.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(L,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(L,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(L,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(L,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const ms={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,qt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,Me=null,$e=null;const Ts=pt?.get("richData")??[],je=u.lo.normalizeA1ToR1C1,He=u.Zt.createConflatingRanges(),Xe=new Map,ve=[];let te=null;const Fe=u.Zt.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,zt="",Pt="",Vt="",Ot="",It="",Lt="",Nt="",We="",qe="",_e="",ze="",Ue="",Ge="",Ze="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=He.done($s);const k=g.length;if(k>0){const $=new Array(k);for(let N=0;N<k;N++){const at=g[N],Mt=u.lo.rangeToString(at),$t=at.value[1],ie=u.lo.resolveRelativeToA1($t,at.rowStart,at.colStart);$[N]=[Mt,ie]}r.formulas=$}const st=Fe.done(!0),R=st.length;if(R>0){const $=new Array(R);for(let N=0;N<R;N++){const at=st[N],Mt=u.lo.rangeToString(at);$[N]=Mt}r.volatile=$}if(ve.length>0&&(r.dynamicArray=[...ve]),qt.length>0){qt.sort(u.Zt.createRangeComparator(u.w.Orientation.Column));const $=[];let N=null,at=-1,Mt=-1,$t=-1,ie=-1,vt=null;const Je=qt.length;Je>0&&(N=qt[0],at=N.colStart,Mt=N.colEnd,$t=N.rowEnd,ie=N.value,$.push(N));for(let jt=1;jt<Je;jt++)vt=qt[jt],ie!==vt.value||at!==vt.colStart||Mt!==vt.colEnd||$t+1!==vt.rowEnd?($.push(vt),N=vt,at=N.colStart,Mt=N.colEnd,$t=N.rowEnd,ie=N.value):($t=vt.rowEnd,N.rowEnd=$t);let Qe=[];for(let jt=0;jt<$.length;jt++){const oe=$[jt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const $=it.tuples;r.data=$}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Fe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.lo.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let $=g.attributes.s;$!==void 0&&($=parseInt($),Rt&&Rt.value===$&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:$},qt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Xt.CustomHeight),Pt!==qe&&(mt=!0,qe=Pt),zt=g.attributes.ht,zt!==void 0&&(ft|=Xt.Ht),zt!==We&&(mt=!0,We=zt),Vt=g.attributes.hidden,Vt!==void 0&&(ft|=Xt.Hidden),Vt!==_e&&(mt=!0,_e=Vt),It=g.attributes.s,It!==void 0&&(ft|=Xt.S),It!==Ue&&(mt=!0,Ue=It),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Xt.CustomFormat),Ot!==ze&&(mt=!0,ze=Ot),Lt=g.attributes.outlineLevel,Lt!==void 0&&(ft|=Xt.OutlineLevel),Lt!==Ge&&(mt=!0,Ge=Lt),Nt=g.attributes.collapsed,Nt!==void 0&&(ft|=Xt.Collapsed),Nt!==Ze&&(mt=!0,Ze=Nt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),$=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&zt!==void 0?parseFloat(zt):-1,csz:it,h:Vt!==void 0&&(Vt==="1"||Vt==="true"),s:it&&It!==void 0&&It!=="0"?parseInt(It):0,cs:$,l:Lt===void 0||Lt==="0"?0:parseInt(Lt),cl:Nt!==void 0&&(Nt==="1"||Nt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=Ts[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.M.Error,v:R.getCode()};break}}}const k=u.n.getBuiltInByLabel(g);k?gt={t:u.M.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.lo.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if(Me===Et)nt=$e;else{if(nt=Xe.get(Et),!nt){const k=[];de=je(g,B,K,k),nt=[de,k,g],Xe.set(Et,nt)}Me=Et,$e=nt}if(_t){const k=[];de=je(g,B,K,k),nt=[de,k,g]}if(nt)return He.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,L,h.createEventHandler(L,()=>{},J),J,ms,wt)})(tt,(L,G=!1)=>ae(L,M,G)??null,us,we,0,L=>{o&&(L=M+": "+L,o?.(L))},q),Bt=ss(M,ne),xt=await(async(L,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:J}=await Promise.resolve().then(()=>require("./BDcqdbUbeR_-OhaB.cjs"));globalThis.ReadableStream=J}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const Z=L instanceof Uint8Array?L:new Uint8Array(L);return new ReadableStream({pull(J){if(_>=Z.byteLength)return void J.close();const wt=Z.subarray(_,Math.min(_+G,Z.byteLength)),h=Qt.decode(wt,{stream:_+G<Z.byteLength});J.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(L){throw console.warn(`Error parsing sheet: '${M}'`,L),new Error(`Error parsing sheet: '${M}'`,{cause:L})}const Wt=fe(M,ut);let kt,Re=new Map;if(Wt){const L="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;Wt.forEach((_,Z)=>{_.type===L&&(kt=ae(Z,M,!1,ut)?.comments,kt&&kt.forEach(J=>{Re.set(J.id,J)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(Wt.forEach((_,Z)=>{_.type===Qt&&(G=ae(Z,M,!1,ut))}),G||kt){const _=kt??[],Z=G?.comments;if(Z){const J=G?.authors;for(let wt=0;wt<Z.length;wt++){const h=Z[wt];let Q=h.authorId!==void 0?J[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=ls(Q.substring(3)),Re.has(Q)))continue;let H=ce.get(Q);H||(H=Ie.get(Q)),H||(H={id:u.Xt.uuidV4(),displayName:Q},Ie.set(H.displayName,H),ce.set(H.id,H)),Q=H?.id??null;const ue={id:u.Xt.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Ft=Y?ss(M,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(I),X.add(et),m.toResourceId(et)},yt):Ee(M,ne,f,P,yt);return Ft},yt={paramMap:q,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:V=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const hs=d.Strings??[];for(let V=0;V<me;V++)le.push(hs[V]?.t??"");const Ve=new Map;let Oe=me;const us=V=>{const U=Ve.get(V);if(U!==void 0)return U;const Y=Oe;return Ve.set(V,Oe++),le.push(V),Y},ce=(Ut("richstructure",d,f,P,yt),Ut("richdata",d,f,P,yt),new Map),Ie=new Map,Le=Ut("people",d,f,P);let Ct=null;if(Le.size>0&&(Ct=Le.entries().next()?.value?.[1]?.persons,Ct)){const V=Ct.length;for(let U=0;U<V;U++){const Y=Ct[U];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=Ut("themes",d,f,P,yt);let Ne=null;if(Te&&Te.entries){let V=Te.entries().next();V?.value?.[1]&&(Ne=V.value[1])}const ds=new u.Jl(Ne);let he=Ut("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.re(he)));const ps=Ut("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...ps.entries().next().value[1],styles:he,theme:ds.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const gs={...n,resources:y,json:ye},fs=new u.Ey(gs);return X.forEach(V=>{V.deleteReference(I)}),m.endPersist(),fs}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.oe&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./CLR2tw7tediAT4i3.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.Ve.Type.General&&(f===u.Ve.Type.ShortDate?f="m/d/yyyy":f===u.Ve.Type.MediumDate?f="d-mmm-yy":f===u.Ve.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.Ve.Type.ShortTime?f="h:mm":f===u.Ve.Type.MediumTime?f="h:mm AM/PM":f===u.Ve.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.M.Number:d.t="n",d.v=D;break;case u.M.String:d.t="s",d.v=D;break;case u.M.Boolean:d.t="b",d.v=D;break;case u.M.Error:d.t="e",d.v=D.toString();case u.M.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=cs,exports.c=i=>i?u.Xt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=ls,exports.t=i=>i?u.Xt.roundAccurately(parseFloat(i)/12700,4):null;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
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"});exports.default={ADDRESS:{s:"Creates a cell reference as text, given specified row and column numbers",p:{rowNum:{d:"is the row number to use in the cell reference: Row_number = 1 for row 1"},columnNum:{d:"is the column number to use in the cell reference. For example, Column_number = 4 for column D"},absNum:{d:"specifies the reference type: absolute = 1; absolute row/relative column = 2; relative row/absolute column = 3; relative = 4",v:1},a1:{d:"is a logical value that specifies the reference style: A1 style = 1 or TRUE; R1C1 style = 0 or FALSE",v:!0},sheetText:{d:"is text specifying the name of the worksheet to be used as the external reference",v:""}}},AREAS:{s:"Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell",p:{references:{d:"is a reference to a cell or range of cells and can refer to multiple areas"}}},CHOOSE:{s:"Chooses a value or action to perform from a list of values, based on an index number",p:{indexNum:{d:"specifies which value argument is selected. Index_num must be between 1 and 254, or a formula or a reference to a number between 1 and 254"},value1:{d:"value1,value2,... are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects"},value:{}}},CHOOSECOLS:{s:"Returns columns from an array or reference.",p:{array:{d:"The array or reference from which to choose columns."},colNum1:{d:"col_num1,col_num2,... The number of the column to be returned."},colNum:{}}},CHOOSEROWS:{s:"Returns rows from an array or reference.",p:{array:{d:"The array or reference from which to choose rows."},rowNum1:{d:"row_num1,row_num2,... The number of the row to be returned."},rowNum:{}}},COLUMN:{s:"Returns the column number of a reference",p:{reference:{d:"is the cell or range of contiguous cells for which you want the column number. If omitted, the cell containing the COLUMN function is used"}}},COLUMNS:{s:"Returns the number of columns in an array or reference",p:{array:{d:"is an array or array formula, or a reference to a range of cells for which you want the number of columns"}}},DROP:{s:"Drops rows or columns from array start or end.",p:{array:{d:"The array from which to drop rows or columns."},row:{d:"The number of rows to drop. A negative value drops from the end of the array."},columns:{d:"The number of columns to drop. A negative value drops from the end of the array.",v:0}},h:"Unimplemented"},EXPAND:{s:"Expands an array to the specified dimensions.",p:{array:{d:"The array to expand."},row:{d:"The number of rows in the expanded array. If missing, rows will not be expanded."},columns:{d:"The number of columns in the expanded array. If missing, columns will not be expanded.",v:0},padWidth:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},FIELDVALUE:{s:"Extracts a value from a field of a given record",p:{value:{d:"The record from which you want to extract the field"},fieldName:{d:"The names of the field or fields that you want to extract"}},h:"Unimplemented"},FILTER:{s:"Filter a range or array",p:{array:{d:"the range or array to filter"},include:{d:"an array of booleans where TRUE represents a row or column to retain"},ifEmpty:{d:"return if no items are retained"}},h:"Unimplemented"},FORMULATEXT:{s:"Returns a formula as a string",p:{reference:{d:"is a reference to a formula"}}},GETPIVOTDATA:{s:"Extracts data stored in a PivotTable.",p:{dataField:{d:"is the name of the data field to extract data from"},pivotTable:{d:"is a reference to a cell or range of cells in the PivotTable that contains the data you want to retrieve"},field1:{d:"field1,field2,... field to refer to"},item1:{d:"item1,item2,... field item to refer to"}},h:"Unimplemented"},GROUPBY:{s:"Aggregate values by row fields",p:{rowFields:{d:"The range or array containing the row fields"},values:{d:"The range or array containing the values to aggregate"},fn:{d:"The function used to do the aggregations"},fieldHeaders:{d:"A number between 0 and 3 that specifies whether the field data has headers and whether field headers should be returned in the results",v:null},totalDepth:{d:"Show totals for the row fields. 0 for none, 1 for grand totals, 2 for grand total and first level subtotals, etc",v:2},sortOrder:{d:"The column index to sort the row fields on. A negative index will sort in reverse order",v:null},filterArray:{d:"param-534 paramName-535",v:null},fieldRelationship:{d:"The relationship of fields when multiple columns are supplied to the row_fields argument",v:0}},h:"Unimplemented"},HLOOKUP:{p:{lookupValue:{d:"is the value to be found in the first row of the table and can be a value, a reference, or a text string"},tableArray:{d:"is a table of text, numbers, or logical values in which data is looked up. Table_array can be a reference to a range or a range name"},rowIndexNum:{d:"is the row number in table_array from which the matching value should be returned. The first row of values in the table is row 1"},rangeLookup:{d:"is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE; find an exact match = FALSE",v:!0}}},HSTACK:{s:"Horizontally stacks arrays into one array.",p:{array1:{},array:{d:"array1,array2,... An array or reference to be stacked."}},h:"Unimplemented"},HYPERLINK:{s:"Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet",p:{linkLocation:{d:"is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path"},friendlyName:{d:"is text or a number that is displayed in the cell. If omitted, the cell displays the Link_location text"}},h:"Unimplemented"},IMAGE:{s:"Returns an image from a given source",p:{source:{d:"The path of the source that points to the image"},alternateText:{d:"The alternative text that describes the image for accessibility"},sizing:{d:"The setting that determines the dimensions in which the image will be rendered in the cell"},height:{d:"The custom height of the image in pixels"},width:{d:"The custom width of the image in pixels"}},h:"Unimplemented"},INDEX:{s:"Returns a value or reference of the cell at the intersection of a particular row and column, in a given range",p:{array:{d:"is a range of cells or an array constant."},rowNum:{d:"selects the row in Array or Reference from which to return a value. If omitted, Column_num is required",v:0},colNum:{d:"selects the column in Array or Reference from which to return a value. If omitted, Row_num is required",v:0},areaNum:{d:"selects the area in Array or Reference from which to return a value. If omitted, the first area is used",v:1}}},INDIRECT:{s:"Returns the reference specified by a text string",p:{refText:{d:"is a reference to a cell that contains an A1- or R1C1-style reference, a name defined as a reference, or a reference to a cell as a text string"},a1:{d:"is a logical value that specifies the type of reference in Ref_text: R1C1-style = FALSE; A1-style = TRUE.",v:!0}}},LOOKUP:{s:"Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility",p:{lookupValue:{d:"is a value that LOOKUP searches for in Lookup_vector and can be a number, text, a logical value, or a name or reference to a value"},lookupVector:{d:"is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order"},resultVector:{d:"is a range that contains only one row or column, the same size as Lookup_vector"}},h:"Unimplemented"},MATCH:{s:"Returns the relative position of an item in an array that matches a specified value in a specified order",p:{lookupValue:{d:"is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these"},lookupArray:{d:"is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array"},matchType:{d:"is a number 1, 0, or -1 indicating which value to return."}},h:"Unimplemented"},OFFSET:{s:"Returns a reference to a range that is a given number of rows and columns from a given reference",p:{reference:{d:"is the reference from which you want to base the offset, a reference to a cell or range of adjacent cells"},rows:{d:"is the number of rows, up or down, that you want the upper-left cell of the result to refer to"},cols:{d:"is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to"},height:{d:"is the height, in number of rows, that you want the result to be, the same height as Reference if omitted"},width:{d:"is the width, in number of columns, that you want the result to be, the same width as Reference if omitted"}}},PIVOTBY:{p:{rowFields:{},colFields:{},values:{},fn:{},fieldHeaders:{v:null},rowTotalDepth:{v:2},rowSortOrder:{v:null},colTotalDepth:{v:2},colSortOrder:{v:null},filterArray:{v:null},relativeTo:{v:0}},h:"Unimplemented"},ROW:{s:"Returns the row number of a reference",p:{reference:{d:"is the cell or a single range of cells for which you want the row number; if omitted, returns the cell containing the ROW function"}}},ROWS:{s:"Returns the number of rows in a reference or array",p:{array:{d:"is an array, an array formula, or a reference to a range of cells for which you want the number of rows"}}},RTD:{s:"Retrieves the real-time data (RTD) from a program that supports COM automation",p:{progId:{d:"is the programmatic identifier (ProgID) of a registered COM automation add-in. Enclose the id in quotation marks"},server:{d:"is the name of the server that provides the real-time data. If running locally us an empty string"},topic:{d:"topic1,topic2,... are 1 to 38 parameters that specify a piece of data"}},h:"Unimplemented"},SORT:{s:"Sorts a range or array",p:{array:{d:"the range or array to sort"},sortIndex:{d:"a number indicating the row or column to sort by"},sortOrder:{d:"a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order"},byCol:{d:"a logical value indicating the desired sort direction: FALSE to sort by row (default), TRUE to sort by column",v:!1}},h:"Unimplemented"},SORTBY:{s:"Sorts a range or array based on the values in a corresponding range or array",p:{array:{d:"the range or array to sort"},byArray1:{d:"by_array1,by_array2,... the range or array to sort on"},sortOrder:{d:"sort_order1,sort_order2,... a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order"}},h:"Unimplemented"},TAKE:{s:"Returns rows or columns from array start or end.",p:{array:{d:"The array from which to take rows or columns."},rows:{d:"The number of rows to take. A negative value takes from the end of the array."},columns:{d:"The number of columns to take. A negative value takes from the end of the array.",v:0}},h:"Unimplemented"},TOCOL:{s:"Returns the array as one column.",p:{array:{d:"The array or reference to return as a column."},ignore:{d:"Whether to ignore certain types of values. By default, no values are ignored.",v:0},scanByColumn:{d:"Scan the array by column. By default, the array is scanned by row.",v:!1}},h:"Unimplemented"},TOROW:{s:"Returns the array as one row.",p:{array:{d:"The array or reference to return as a column."},ignore:{d:"Whether to ignore certain types of values. By default, no values are ignored.",v:0},scanByColumn:{d:"Scan the array by column. By default, the array is scanned by row.",v:!1}},h:"Unimplemented"},TRANSPOSE:{s:"Converts a vertical range of cells to a horizontal range, or vice versa",p:{array:{d:"is a range of cells on a worksheet or an array of values that you want to transpose"}}},TRIMRANGE:{s:"Trims a range to the last used cell in any direction.",p:{range:{d:"The range to be trimmed"},rowTrimMode:{d:"Row trim direction. 0 - none, 1 - leading, 2 - trailing, 3 - both.",v:3},colTrimMode:{d:"Column trim direction. 0 - none. 1 - leading, 2 - trailing, 3 - both.",v:3}}},UNIQUE:{s:"Returns the unique values from a range or array.",p:{array:{d:"the range or array from which to return unique rows or columns"},byCol:{d:"is a logical value: compare rows against each other and return the unique rows = FALSE; compare columns against each other and return the unique columns = TRUE",v:!1},exactlyOnce:{d:"is a logical value: return rows or columns that occur exactly once from the array = TRUE; return all distinct rows or columns from the array = FALSE",v:!1}},h:"Unimplemented"},VLOOKUP:{s:"Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order",p:{lookupValue:{d:"is the value to be found in the first column of the table, and can be a value, a reference, or a text string"},tableArray:{d:"is a table of text, numbers, or logical values, in which data is retrieved. Table_array can be a reference to a range or a range name"},colIndexNum:{d:"is the column number in table_array from which the matching value should be returned. The first column of values in the table is column 1"},rangeLookup:{d:"is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE; find an exact match = FALSE",v:!0}}},VSTACK:{s:"Vertically stacks arrays into one array.",p:{array1:{d:"array1,array2,... An array or reference to be stacked."},array:{d:"array1,array2,... An array or reference to be stacked."}},h:"Unimplemented"},WRAPCOLS:{s:"Wraps a row or column vector after a specified number of values.",p:{vector:{d:"The vector or reference to wrap."},wrapCount:{d:"The maximum number of values per column."},padWith:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},WRAPROWS:{s:"Wraps a row or column vector after a specified number of values.",p:{vector:{d:"The vector or reference to wrap."},wrapCount:{d:"The maximum number of values per column."},padWith:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},XLOOKUP:{s:"Searches a range or an array for a match and returns the corresponding item from a second range or array. By default, an exact match is used",p:{lookupValue:{d:"is the value to search for"},lookupArray:{d:"is the array or range to search"},returnArray:{d:"is the array or range to return"},ifNotFound:{d:"returned if no match is found"},rangeLookup:{v:!0},matchMode:{d:"specify how to match lookup_value against the values in lookup_array"},searchMode:{d:"specify the search mode to use. By default, a first to last search will be used",v:!0}},h:"Unimplemented"},XMATCH:{s:"Returns the relative position of an item in an array. By default, an exact match is required",p:{lookupValue:{d:"is the value to search for"},lookupArray:{d:"is the array or range to search"},matchMode:{d:"specify how to match the lookup_value against the values in lookup_array"},searchMode:{d:"specify the search mode to use. By default, a first to last search will be used",v:!0}},h:"Unimplemented"}};
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
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 e=require("./h--y53Cz6XBstcC3.cjs"),l=({range:a,options:i,cell:c,onDone:r,...x})=>{const[t,o]=e.reactExports.useState(i??e.no.DefaultRangeOptions),d=e.T(n=>{let s=null;n==="Sort"&&(s={...i,options:t}),r?.(s)},[t,r,i]);return e.jsxRuntimeExports.jsx(e.k3,{title:"Sort",options:["Sort","Cancel"],onDone:d,...x,children:e.jsxRuntimeExports.jsxs(e.Box,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxRuntimeExports.jsx(e.FormControlLabel,{control:e.jsxRuntimeExports.jsx(e.Checkbox,{checked:!t.reverse,onChange:()=>o(n=>({...n,reverse:!n.reverse}))}),label:"Is Ascending",labelPlacement:"end"}),e.jsxRuntimeExports.jsx(e.FormControlLabel,{control:e.jsxRuntimeExports.jsx(e.Checkbox,{checked:t.hasHeader,onChange:()=>o(n=>({...n,hasHeader:!n.hasHeader}))}),label:"Has Header",labelPlacement:"end"}),e.jsxRuntimeExports.jsx(e.FormControlLabel,{control:e.jsxRuntimeExports.jsx(e.Checkbox,{checked:t.collatorOptions?.sensitivity===e.no.CaseSensitiveOptions.sensitivity,onChange:()=>o(n=>({...n,collatorOptions:t.collatorOptions?.sensitivity===e.no.CaseSensitiveOptions.sensitivity?e.no.CaseInsensitiveOptions:e.no.CaseSensitiveOptions}))}),label:"Case Sensitive",labelPlacement:"end"}),e.jsxRuntimeExports.jsx(e.FormControlLabel,{control:e.jsxRuntimeExports.jsx(e.Checkbox,{checked:t.orientation===e.w.Orientation.Row,onChange:()=>o(n=>{const s=n.orientation===e.w.Orientation.Row?e.w.Orientation.Column:e.w.Orientation.Row;return{...a.getDefaultSortCriteria(s,c).options,includeHidden:n.includeHidden,reverse:n.reverse,orientation:s}})}),label:"Row Sort",labelPlacement:"end"}),e.jsxRuntimeExports.jsx(e.FormControlLabel,{control:e.jsxRuntimeExports.jsx(e.Checkbox,{checked:t.includeHidden,onChange:()=>o(n=>({...n,includeHidden:!n.includeHidden}))}),label:"Include Hidden",labelPlacement:"end"})]})})};exports.SortDialog=l,exports.default=l;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
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("./h--y53Cz6XBstcC3.cjs"),g=require("./1yauO7dmzjUaAZLh.cjs");class X{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const z=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,G=u=>{const t=parseInt(u);return isNaN(t)?null:t},W=u=>{const t=parseFloat(u);return isNaN(t)?null:t},$=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??$}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new X(s)}getFromPath(t,e){return p.Xt.getFromPath(t,e)}setToPath(t,e,s){return p.Xt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return z}get INT_COPY(){return G}get FLOAT_COPY(){return W}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class K{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Xt.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Q{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class J extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const 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 Z{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){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 x{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.et.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.et.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.xu.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.xu.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.xu.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.xu.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.xu.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.xu.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.no.CaseSensitiveOptions:p.no.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.lo.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.lo.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.et.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.et.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.et.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.et.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Q.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Q.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Q.BuiltInSheetPattern.Solid:p.Q.BuiltInSheetPattern.None);if(o===p.Q.BuiltInSheetPattern.None)return{none:!0};s.type=p.Q.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Q.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.U.Edge.Left),this.processBorderStroke(t,e,i,p.U.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.U.Edge.Vertical),this.processBorderStroke(t,e,i,p.U.Edge.Top),this.processBorderStroke(t,e,i,p.U.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.U.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends 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.Q.Type.None},r.fills[1]={type:p.Q.Type.Pattern,patternType:p.Q.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.lt.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 k{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.n.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new K),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Q),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new q),this.registerVisitor("c:barChart",new J),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Z),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new x),this.registerVisitor("c:valAx",new x),this.registerVisitor("c:dateAx",new x),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 k),this.registerVisitor("oneCellAnchor",new k),this.registerVisitor("absoluteAnchor",new k),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;