@sheetxl/mcp 1.0.0 → 1.0.2

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 (178) hide show
  1. package/assets/{CNikOloX_losH8Nz.js → 1d-8AAcf1UmC2qIz.js} +1 -1
  2. package/assets/{C3c2PUtIo-aWbjw4.js → 30KXHiLfwl0cbsxL.js} +1 -1
  3. package/assets/{8mWHFnE0j-CaNsxr.js → 3o7I8loKRGynHrNq.js} +1 -1
  4. package/assets/{C1JeIUEWW-RL1Rnu.js → 648qV0v861jvyZWm.js} +1 -1
  5. package/assets/{P3Or6rEY-fHmQZbH.js → 7khlPnFFCrE8gnT_.js} +13 -13
  6. package/assets/{ByGn4tk2SE1MH_sZ.js → 8hUUTZ62hbxY0TOp.js} +2 -2
  7. package/assets/{CwzSgovxnBMrgLmJ.js → B1Vm5y0E-TPSYFya.js} +3 -3
  8. package/assets/{CEa6wNiDRZrans9S.js → B6ToyMcYe9lyaeDk.js} +3 -3
  9. package/assets/{qVBjd-c5B8neljc0.js → B6pS096VwbWaj1Zz.js} +2 -2
  10. package/assets/{BrHXHm2FNXsL53bo.js → B9V6AFTTnbPscv11.js} +2 -2
  11. package/assets/{CF1fqmS030ry2XQ0.js → BESu-5sZSIJqkrWN.js} +2 -2
  12. package/assets/{B5rrqMYFybo3oW9k.js → BHhPtFpb3YfV6_44.js} +21 -21
  13. package/assets/{CpoqmW4E7rFdkRpf.js → BMAAmO8LPIe4VJ77.js} +1 -1
  14. package/assets/{C1IE0F-y65XqEYRl.js → BMVu89mdcVSqJDDE.js} +1 -1
  15. package/assets/{Da0CtWhc7saaOdER.js → BRB5-fXJFU7Kq2wm.js} +352 -352
  16. package/assets/BRI3D42tlMkZdYb2.js +199 -0
  17. package/assets/{DOXj80NXiglJXsMZ.js → BVzogMoyaicBEKBk.js} +3 -3
  18. package/assets/{PvRzzufo1V8BuC-I.js → BWpLQNKC3n8bXJUk.js} +1 -1
  19. package/assets/{CS07BBUu6ZtXk4TZ.js → Baa8cmJsilboM0DW.js} +1 -1
  20. package/assets/{O3m_QwxIRXMPFTB8.js → BcDNXTGASDvptqc-.js} +1 -1
  21. package/assets/{knMcDWv3xN7yJBTT.js → Bme_PT3UqwTbGLWd.js} +1 -1
  22. package/assets/{pLM8Pxl1CscUdvMh.js → BnxajOeIasx1G3OB.js} +1 -1
  23. package/assets/{CFqF3aUKvOGFOK9O.js → BousX61zAjBfjlsV.js} +1 -1
  24. package/assets/{DF9WfdyjHuCpsEXh.js → Bp73VL7f5DEt88Cn.js} +35 -35
  25. package/assets/{DRy0AcTiSKQY3bih.js → BppAvnmuJbbYBQUy.js} +1 -1
  26. package/assets/{j4zqu8S2Be_yum7W.js → BtoBfR_4n1u37HmC.js} +1 -1
  27. package/assets/{BF0C-5gSMHWBXI_k.js → BuLAeGM4AvHCge4x.js} +1 -1
  28. package/assets/{DWr6GqsnMpLwSUno.js → Buxo11Ux7uxzoy_7.js} +2 -2
  29. package/assets/{pfa2CH5NQuzku6FP.js → BwTF2TRqzXsf0H1I.js} +2 -2
  30. package/assets/{CfBJzpZuy1o216iZ.js → BzCwrG3Zdv-Trzi_.js} +1 -1
  31. package/assets/{BgHOi7rAHLhztiz-.js → C00qhh0-m0B0JP9Y.js} +166 -166
  32. package/assets/{jNZ7exipVCGRPbzr.js → C5VvbPUAfrVKmXXs.js} +1 -1
  33. package/assets/{BVfjBXAMgo4u8Y72.js → C85xBYGjAzNmVNwL.js} +1 -1
  34. package/assets/{Dbi1_JHT_4u0nhwc.js → C880pTyOMof_fzPO.js} +1 -1
  35. package/assets/{BBF_CDIKB2NIXiHg.js → C88UXFOnR1Uc-nw2.js} +1 -1
  36. package/assets/{CRZMD-wS-944FnD_.js → C8G6iJz_vsgbNYq9.js} +4 -4
  37. package/assets/{CoSNTR-pg7BZAU7o.js → CAQgJMpje7ORQ5lt.js} +1 -1
  38. package/assets/CBSyNN4Fk5WsVStK.js +14 -0
  39. package/assets/{CY3Lmr-fgs6NqXRp.js → CCeqR45x9p-GG8Pi.js} +1 -1
  40. package/assets/{BqH4txhrgR2S-2ji.js → CEDsCeYCSlY7wYe1.js} +2 -2
  41. package/assets/{DvHZEP1wpb6549uf.js → CFWHwEc3dKMmNzUp.js} +406 -406
  42. package/assets/{8114GVvAL1oaiJLV.js → CK9LWUZdZ93t3GkS.js} +1 -1
  43. package/assets/{BPlrBhzIqyWK19E2.js → CL-BRusnISEAzebz.js} +606 -606
  44. package/assets/{Bfpf9b1s1bWyBXIw.js → CLvFlk5-KU2jnQ5r.js} +1 -1
  45. package/assets/{CX-LNahzNZRc78er.js → CUhCIQjymULgXquN.js} +1 -1
  46. package/assets/{BKGTzaNNBlRh7ua3.js → CboWvqCV0yix3-yP.js} +1 -1
  47. package/assets/{cl0C9YlF3Ds-lHps.js → Ci4AUhBajQMJs1Ty.js} +1 -1
  48. package/assets/{rlgXnCh6A88ozBRz.js → CkQT1G_6bvMixZ8e.js} +4 -4
  49. package/assets/{rzi2XAwlfy8BsGEa.js → CkqsYktaMF9p014y.js} +1 -1
  50. package/assets/{BuFb0lPxYlHccrD9.js → CkuL4Ed6oRGAhIS9.js} +1 -1
  51. package/assets/{Ban4yk1SYcz9Cs7n.js → Cm41HVr6Xyz53jHz.js} +1 -1
  52. package/assets/{BfB7Vq09p5uO-L88.js → CoY2sE2RG-Nd8TMR.js} +1 -1
  53. package/assets/{Cwe_kiigxAfceEK9.js → CuRvGO_2tG0PUhCM.js} +1 -1
  54. package/assets/{Dcw7GSCgw_dgsum7.js → CvqpsTll6ngbdHgx.js} +8672 -8642
  55. package/assets/{B3J6davzttys1e7l.js → Cvs9i2VUl7wXWZup.js} +3 -3
  56. package/assets/{DlARYdaCOVKiQzMH.js → Cy2uazuc6KpkbYg-.js} +1 -1
  57. package/assets/{2c1OYsVAy_w-ex-F.js → CybNjXi6cOFKyGuH.js} +1 -1
  58. package/assets/{BBZUslaSLC0vlZEb.js → CzPMiqbNDm6TDPGJ.js} +1 -1
  59. package/assets/{BBLuTiY3V4MpFphK.js → CzYXLEVIoCfQ1AMM.js} +193 -193
  60. package/assets/{BoE9cj92LVH2LLy0.js → D-BWtxIGXTCMLoio.js} +2 -2
  61. package/assets/{CRlLpD9cfhJ9Ov9L.js → D0Ly34TqieVSOIbh.js} +1 -1
  62. package/assets/{BloJ-e8xad1b_H7X.js → D0M0EWP28g5rQaei.js} +3 -3
  63. package/assets/{WC-THJfezYSFdiMF.js → D4NBYfzSZ3cU-3ao.js} +1 -1
  64. package/assets/{13QanvzRbNib7VHR.js → D4NcXlPRmR6NaoGS.js} +1 -1
  65. package/assets/{CDDtXZTG6nNFBQZP.js → D4jXxO1LUEQ6erA9.js} +1 -1
  66. package/assets/{CMd7aLIwOA7bxcZm.js → DAx-VOBmi1xAMhhX.js} +98 -98
  67. package/assets/{8hLtXHueDl7B_SEn.js → DBcXAdUaNGrlah12.js} +15 -15
  68. package/assets/{C8zzCf71C976X7SG.js → DFdAxnoXGn_8ge3l.js} +2 -2
  69. package/assets/{DZxHk5oKIVvu3iJR.js → DFjfZCMPfQfwC4cF.js} +580 -580
  70. package/assets/{YK80feN98r6GVZv5.js → DG0Dzgf1kAxN3AIk.js} +1 -1
  71. package/assets/{DQtnL5nOzSzVJhit.js → DGv-dTePYQ8_yif4.js} +42 -42
  72. package/assets/{gf6l-4XXMXtq8hpJ.js → DIaD0BL0JLTaJTS3.js} +5 -5
  73. package/assets/{CICMJpasl9o4FaZi.js → DIimDQiJDW-4lkZT.js} +1 -1
  74. package/assets/{CbkCnjWs7Fpj5iQY.js → DK8DWNMTOmCg6zAI.js} +8 -8
  75. package/assets/{q6advQx4x6PXvl0i.js → DKox8guOumZMOdq8.js} +37 -37
  76. package/assets/{DQ2vEDfVfsIGSmId.js → DMHiZKWwm6puHV6p.js} +1 -1
  77. package/assets/{CsPyLus3kh4QnahD.js → DMyq3L2ibjMlHuDa.js} +1 -1
  78. package/assets/{0WuReGsjIpidu0Cr.js → DOKXQpGyzXCoSLdJ.js} +1 -1
  79. package/assets/{ybnQoU8_KttlHjiy.js → DOXriXo-7WmTAKbN.js} +1 -1
  80. package/assets/{Sm1ouHLiXlCuQVKV.js → DRfsB4kS28fPXv6K.js} +96 -96
  81. package/assets/{BaZAIwIrqn1x69WH.js → DSmARJ0owmwmr2FA.js} +2 -2
  82. package/assets/{BlMUrEA8V2S2KH0D.js → DUM6h3BEreCilg32.js} +1 -1
  83. package/assets/{Bm-wDNSoT-3JD2bJ.js → DXp5V2__VY2opctz.js} +1 -1
  84. package/assets/{eExV3IoVMxYkv5GO.js → D_YBc6vHBL-ajwvB.js} +1 -1
  85. package/assets/{G489eYf-lt3D1riX.js → Dc8BQsPlwN6i6OU7.js} +1 -1
  86. package/assets/{BCdXK-2-AE6FAdRs.js → DcnNIdrilJHfl_CQ.js} +1 -1
  87. package/assets/{xGASRbzSVVKfEAh-.js → DdIufax_qSuWVGQK.js} +2 -2
  88. package/assets/{CCS6r_ru_-bq12nu.js → DeNqXaM_dHSswRuE.js} +1 -1
  89. package/assets/{BB39UJoWw8tjThqY.js → DfVHW5vbnRNXHrCi.js} +1 -1
  90. package/assets/{ov7L79VlksT4fw7T.js → Dfc9_XsqSeh48YeK.js} +11 -11
  91. package/assets/{CdbucPAmUkkc5pcM.js → DiXodb_hLvUDIGb6.js} +29 -29
  92. package/assets/{B-b7HyruDF2gdj3R.js → Dn531BWCDZ2noJix.js} +2 -2
  93. package/assets/{BfEmSaLbKgcjIIpn.js → DnAuLAqQLmAf9Gls.js} +2 -2
  94. package/assets/{BhxIJ8xdUxyMPJ_m.js → Do8K2GlFXIiMX9TB.js} +1 -1
  95. package/assets/{BTamKr78GfsihW1a.js → Dt8hWBnnqlpJOazW.js} +96 -96
  96. package/assets/{Dst0tyK__q2Q_AKk.js → DuBbSpdXZuAFvxpr.js} +1 -1
  97. package/assets/{DzYvbv5u7E2H7IoB.js → DvAq2cPI7-lfSn0x.js} +1 -1
  98. package/assets/{CI8Pu3ko8VzQYdRD.js → DzCZGtlg3pJO91l9.js} +1 -1
  99. package/assets/{B3lrS_GHkG6Mw5pN.js → DzRBnJpz972o277m.js} +1 -1
  100. package/assets/{g3TrQtFS0qJZeshT.js → EohzUi0uCnSF2q2D.js} +264 -264
  101. package/assets/{DXrX5tIZ1J5BhpFk.js → KSagTSkIvZSpUF1c.js} +4 -4
  102. package/assets/{DngX5ZuqqFGTp44B.js → LOFAyr5OoT3oZGMV.js} +1 -1
  103. package/assets/{DfuY8GdoSk8LxDFW.js → LbZNDu6C9XPMEXCN.js} +5 -5
  104. package/assets/{D31pY9r4JAFWw3E4.js → NwtEz6ZaVT8p8wOh.js} +1 -1
  105. package/assets/{hiKRbrdbpmJglbWC.js → PD_i17-cebq3-_Gn.js} +3 -3
  106. package/assets/{C2sDVxKGBNlTFg6y.js → Q-BvS_P_qM8EvP92.js} +1 -1
  107. package/assets/{C4C3Ot0xeo1O0wm5.js → YRKAYjRpPkjhxGSS.js} +1 -1
  108. package/assets/{C30apcFVvDHn2M4R.js → _-kNP8Q4FxBYPY4u.js} +4 -4
  109. package/assets/{BgN67gyTyx_xz2Ny.js → aEDyynzUuzMysLwT.js} +6 -6
  110. package/assets/{kThU6e6dkzEoaK6n.js → cTnKNFayqlXisspN.js} +2 -2
  111. package/assets/{DpwdC4SN_VYB9_ho.js → eEh1r_BS7Y0FXPqk.js} +1 -1
  112. package/assets/{CJoREr6-3iOl7iU_.js → g4vz4gc43eat7Hd2.js} +1 -1
  113. package/assets/{BR4Wpxs0eSlaoLOl.js → jUzhn1PeDLWXOuJO.js} +14 -14
  114. package/assets/{L42Y17f0HUEpfS6U.js → kIzQWtiHNHvh8HLF.js} +1 -1
  115. package/assets/{CJcyMzG19TOjqNHS.js → mIM-JksHd3Zl5INF.js} +1 -1
  116. package/assets/{BTB4fa2DU21pP7At.js → mirSoZ8QDsYUMjYu.js} +1 -1
  117. package/assets/{DOIpXsEXCaI-8VwJ.js → ooSNLnHLIYTBL5JD.js} +1 -1
  118. package/assets/{DRcmbp80jMRjxelW.js → tp75fiKc1r-jdPPN.js} +1 -1
  119. package/assets/{PAzPVx_0jajb_7cO.js → xltGcIbWkjqNtCty.js} +2 -2
  120. package/assets/{Cs1df4D35bBjqyvX.js → zbOvcGIPi-MDlJKE.js} +1 -1
  121. package/index.js +92 -92
  122. package/lib.js +1 -1
  123. package/licenses/dependencies.txt +66 -66
  124. package/package.json +17 -2
  125. package/screenshot-page/assets/{Da_VIghRFdNrmfZT.js → 37HIsN_8LEsOWyOO.js} +1 -1
  126. package/screenshot-page/assets/{DaqAdr-mtpVZMOS8.js → 4I9gFq1IdumstDHq.js} +2 -2
  127. package/screenshot-page/assets/{BrEXXxB9tAI5mmZP.js → 6j6xGn4csAcfcFMQ.js} +1 -1
  128. package/screenshot-page/assets/{hB5riGkPy0wXVIig.js → 7N8xCpYVBHFqfoAg.js} +1 -1
  129. package/screenshot-page/assets/{D8EmNst-H2v0eWcf.js → 97qOXULGlJqaTCIL.js} +1 -1
  130. package/screenshot-page/assets/B6dFVtErFelDd62E.js +2 -0
  131. package/screenshot-page/assets/{d8BvDCByceUNvHp7.js → B6i6Xi9OafEvNRAm.js} +2 -2
  132. package/screenshot-page/assets/B7uNU6WWjJaco6ho.js +1 -0
  133. package/screenshot-page/assets/BGoGxqwlpgXt8CMd.js +4 -0
  134. package/screenshot-page/assets/{0P0DnZolMnjPhiea.js → BXss42mPBQnnt0Rh.js} +1 -1
  135. package/screenshot-page/assets/{CJAgr6wyQGYAd3ZV.js → BbhwsC3eMdzP2PeH.js} +1 -1
  136. package/screenshot-page/assets/Beaq1eo3pAjlfcba.js +1 -0
  137. package/screenshot-page/assets/Bf3eJLndwyxuVR-_.js +1 -0
  138. package/screenshot-page/assets/{BwYQTcPRDDYIeAA5.js → BqJRJVrx7XkIPgo7.js} +6 -6
  139. package/screenshot-page/assets/{CX-ITg5RXdV2cefd.js → C-qNpEaGV5amWPml.js} +5 -5
  140. package/screenshot-page/assets/{BOF6KOmT8mH_NQnA.js → CB-bJVu0a2zAElNH.js} +1 -1
  141. package/screenshot-page/assets/CGvyz3VVFiHbYHM0.js +3 -0
  142. package/screenshot-page/assets/{DTAKTGn53yF_B621.js → CKbXhNyUiI18JA_C.js} +1 -1
  143. package/screenshot-page/assets/{DOsZiE9rOdS_Mm2Q.js → CVEUOXnI1pTa-GKp.js} +1 -1
  144. package/screenshot-page/assets/C_RHXqyejSa8gd9x.js +1 -0
  145. package/screenshot-page/assets/{Bt7fKk5ZupUuo_xD.js → CbTBuiF_Jn72hoj1.js} +2 -2
  146. package/screenshot-page/assets/{C-2hBFk27roWkIrQ.js → CraI-__UdtaIvbNn.js} +1 -1
  147. package/screenshot-page/assets/{Cg9eIWL8fPmeZFHG.js → Cyu6g5rRtEGOHaQS.js} +4 -4
  148. package/screenshot-page/assets/{CL_hAngRQwm_KGdR.js → D1KqgZwk5MjDhk5i.js} +1 -1
  149. package/screenshot-page/assets/{QVGvXAvlw1c8vZjy.js → DGr8M07ioDfKXLHD.js} +3 -3
  150. package/screenshot-page/assets/{BAzHRU12l2vyyXq-.js → DMbhlzvflyxF5Clt.js} +4 -4
  151. package/screenshot-page/assets/{BzI5CCx73aXausKb.js → DQxI7bShZ7TKpL0V.js} +8 -8
  152. package/screenshot-page/assets/{BpJaTpbR_CQzXj9M.js → DSB_SKy2lKI_VGik.js} +1 -1
  153. package/screenshot-page/assets/{jFfcyGJ9xruiOUyS.js → DWkISZdhmV2PBk-k.js} +1 -1
  154. package/screenshot-page/assets/{BhHceo22V3IBfap0.js → DfmEx82r_NbillHk.js} +1 -1
  155. package/screenshot-page/assets/{Cq1EzIAt4dHBkzfP.js → DsZcJUWTmqcp2aI-.js} +1 -1
  156. package/screenshot-page/assets/{jteb4n23QwBT9m_4.js → DszZ1A807YzTc0ek.js} +1 -1
  157. package/screenshot-page/assets/{DJebrQ5mu8uxpX3b.js → DwHci99xcnRTEcv5.js} +2 -2
  158. package/screenshot-page/assets/Ojp2B5i2-AJeD4mV.js +1 -0
  159. package/screenshot-page/assets/{CGNsyKbDXXz9qMa2.js → PRYQO22Y2LgMUg77.js} +1 -1
  160. package/screenshot-page/assets/{CZaKvnrRdlLj1_X8.js → RHcyaEfxJB7O3alo.js} +1 -1
  161. package/screenshot-page/assets/{-HdF7KAN8PKqrASL.js → TA9YjsgX-_8fRRdZ.js} +1 -1
  162. package/screenshot-page/assets/{ByyC3p23DsLAbUpr.js → cUY9GpQPVTLSprfW.js} +1 -1
  163. package/screenshot-page/assets/{Bne-AygyF1USkPAy.js → m48xmzGgNgwXSEgQ.js} +1 -1
  164. package/screenshot-page/assets/{DhnaoxNYwMobAVP6.js → mVfCz3bXIjqEVPEo.js} +1 -1
  165. package/screenshot-page/assets/{B-E9Dzx1wh9RA2yC.js → putBhJCWgRos_Fmk.js} +1 -1
  166. package/screenshot-page/assets/{BfkbiKKbYlPpRZqZ.js → uyInkZWFnMwX-BSC.js} +1 -1
  167. package/screenshot-page/assets/{CAKBmg6tXRtjEWgb.js → xiJthTXsasYVOHWE.js} +2 -2
  168. package/screenshot-page/index.html +8 -8
  169. package/assets/BOa1dD_9H3g65WbP.js +0 -14
  170. package/assets/DCWHNfq5qCxvALwe.js +0 -199
  171. package/screenshot-page/assets/B39YZkEvc1U8ZQ8H.js +0 -2
  172. package/screenshot-page/assets/B8Dy_WA9RlWuvMqF.js +0 -4
  173. package/screenshot-page/assets/CGZYePkVGI5DPBBY.js +0 -1
  174. package/screenshot-page/assets/CWA4xGjOeBuxJOzW.js +0 -3
  175. package/screenshot-page/assets/D2TibFqUBAPLcu_2.js +0 -1
  176. package/screenshot-page/assets/DEy3e1rY-XMdI309.js +0 -1
  177. package/screenshot-page/assets/eR9_DaySoB72PvMo.js +0 -1
  178. package/screenshot-page/assets/hHvAGynpTvAb97GX.js +0 -1
@@ -1 +1 @@
1
- import{l as e}from"./B8Dy_WA9RlWuvMqF.js";import{n as t}from"./Cenh1POxiGMxIQlv.js";var n=async(n,r)=>{let i=n;(function(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e),n={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},r=Object.keys(n);for(let e=0;e<r.length;e++){let i=r[e],a=n[i],o=!0;for(let e=0;e<a.length;e++)if(t[e]!==a[e]){o=!1;break}if(o)return i}return!1})(i)&&(i=await t(i));let a=new TextDecoder().decode(i),o=JSON.parse(a),s={...r?.createWorkbookOptions??{},json:o};return new e(s)};export{n as readSXL};
1
+ import{l as e}from"./BGoGxqwlpgXt8CMd.js";import{n as t}from"./Cenh1POxiGMxIQlv.js";var n=async(n,r)=>{let i=n;(function(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e),n={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},r=Object.keys(n);for(let e=0;e<r.length;e++){let i=r[e],a=n[i],o=!0;for(let e=0;e<a.length;e++)if(t[e]!==a[e]){o=!1;break}if(o)return i}return!1})(i)&&(i=await t(i));let a=new TextDecoder().decode(i),o=JSON.parse(a),s={...r?.createWorkbookOptions??{},json:o};return new e(s)};export{n as readSXL};
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cUY9GpQPVTLSprfW.js","./D4RZZdlItfrgQHcE.js","./HclGiUj8dZXDFmoM.js","./COL9dj40ytErlGak.js","./3Ls_kOvlQseMV8Q0.js","./nHThFXCAZFOM_npq.js","./CQukCzhuewMuFOlO.js","./BqJRJVrx7XkIPgo7.js","./BQTLEc84Eql61S2m.js","./BQnELVV0uR4T4ItQ.js","./CnXLpFE_vFrJ5Jbf.js","./Np3jWxG724t5hLHZ.js","./DMbhlzvflyxF5Clt.js","./BGoGxqwlpgXt8CMd.js","./B5GO9v4p9L70Xb9i.js","./CVEUOXnI1pTa-GKp.js","./J_xJVgE7YlmeU-ZO.js","./w3bV7wggRayUYTd-.js","./CHlWgOAlcRCjVuhg.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./HclGiUj8dZXDFmoM.js";import{F as t,G as n,I as r,L as i,_ as a,m as o,u as s}from"./D4RZZdlItfrgQHcE.js";import{I as c,Tt as l,an as u,vt as d}from"./COL9dj40ytErlGak.js";import{c as f,i as p,r as m}from"./CQukCzhuewMuFOlO.js";import{$ as h,A as g,Gn as _,Gt as ee,Nt as v,On as y,Qr as b,Vr as te,Yt as x,cn as S}from"./BqJRJVrx7XkIPgo7.js";import{a as C,l as ne,p as re,s as w}from"./BGoGxqwlpgXt8CMd.js";import{r as T,t as ie}from"./B5GO9v4p9L70Xb9i.js";import{$ as E,$t as ae,An as D,Ar as oe,At as se,C as ce,Cn as O,Ct as le,D as ue,Er as de,F as k,Fn as fe,Ft as pe,G as me,Gt as he,H as ge,Hn as _e,Ir as A,It as j,Jt as M,Kt as N,L as P,Mr as ve,Mt as ye,Nn as be,Nr as xe,Ot as Se,P as F,Pn as Ce,Q as I,S as L,Sn as R,St as z,T as we,Tr as Te,Tt as Ee,U as De,Un as Oe,Ut as ke,V as Ae,Vr as je,W as Me,Wt as Ne,Xn as Pe,Y as Fe,Yn as Ie,Zt as Le,_ as Re,a as ze,at as Be,b as Ve,br as B,dn as V,dr as H,en as He,er as U,et as Ue,fn as We,gt as W,h as Ge,hn as Ke,i as G,in as qe,ir as Je,it as Ye,j as Xe,ln as Ze,lt as Qe,mn as $e,nr as et,nt as tt,on as nt,p as rt,pr as it,qn as at,rn as ot,sn as st,sr as ct,st as lt,vn as ut,vr as dt,vt as ft,yt as pt}from"./DMbhlzvflyxF5Clt.js";var mt={ascending:`ascending`,descending:`descending`,natural:`dataSource`};function ht(e,t){let n=e.sheets??[],r=new Map;for(let e=0;e<n.length;e++){let t=n[e],i=E(t)?.tables??[];for(let e=0;e<i.length;e++){let t=i[e],n=Array.isArray(t)?t[1]:t?.v;if(!n?.id)continue;let a=(n.columns??[]).map(e=>typeof e==`string`?{name:e}:e);r.set(String(n.id),{name:n.name??``,columns:a})}}let i=new Map;for(let e=0;e<n.length;e++){let t=n[e];t?.sheetId!==void 0&&t.name&&i.set(String(t.sheetId),t.name)}let a=function(e){let t=new Map,n=e.pivotCaches??[];for(let e=0;e<n.length;e++){let r=n[e].part?.xml,i=r?/<(?:\w+:)?pivotCacheDefinition\b[^>]*?\spivotCacheId="(\d+)"[^>]*\/?>\s*<\/(?:\w+:)?ext>/.exec(r)?.[1]:void 0;i!==void 0&&t.set(i,n[e].cacheId)}return t}(e),o=new Map;for(let e=0;e<n.length;e++){let t=E(n[e])?.pivotTables??[];for(let r=0;r<t.length;r++)o.set(`${n[e].name}\0${t[r].name}`,t[r])}let s=new Set((e.pivotCaches??[]).flatMap(e=>e.fields?[e.cacheId]:[])),c=new Set;for(let e=0;e<n.length;e++){let l=n[e],u=E(l);if(!u)continue;let d=u.slicers,f=u.movables;if(d&&f)for(let e=f.length-1;e>=0;e--){let n=f[e].content;if(n?.type!==`slicer`||n.json?.source)continue;let l=n.name??``,u=d[l];if(!u)continue;if(!u.tableId){if(u.pivotBody===void 0)continue;n.json=_t(u,n.json),n.json.pivot=gt(u,i,a,o,s),c.add(l),u.cachePath&&t.markAbsorbed(u.cachePath);continue}let p=r.get(String(u.tableId)),m=p?K(p.columns,u.columnId):null;p&&m?(n.json=_t(u,n.json,te.structuredReference(p.name,m.name)),c.add(l),u.cachePath&&t.markAbsorbed(u.cachePath)):(t.warn(`A slicer names no table; it was not imported.`,`xlsx.slicer.cacheDefinition`),f.splice(e,1))}delete u.slicers}t.slicerParts.forEach((e,n)=>{let r=Object.keys(e);r.length>0&&r.every(e=>c.has(e))&&t.markAbsorbed(n)})}function K(e,t){if(!t)return null;for(let n=0;n<e.length;n++)if(e[n].id!==void 0&&String(e[n].id)===t)return e[n];let n=Number(t);return Number.isInteger(n)&&n>=1&&n<=e.length?e[n-1]:null}function gt(e,t,n,r,i){let a=[],o=e.pivotTables??[];for(let e=0;e<o.length;e++){let n=t.get(o[e].tabId);n&&a.push({sheet:n,name:o[e].name})}let s={sourceName:e.sourceName??``,tables:a,body:e.pivotBody??``},c=e.pivotCacheId===void 0?void 0:n.get(e.pivotCacheId);if(e.tabular){let t=a.length>0?r.get(`${a[0].sheet}\0${a[0].name}`):void 0;c??=t?.cacheId,t?.fields&&c!==void 0&&i.has(c)?s.tabular=!1===e.showMissing?{hideMissing:!0}:{}:s.body=(e.pivotData??``)+s.body}return c!==void 0&&(s.cacheId=c),e.timelineAttributes&&(s.timeline={attributes:e.timelineAttributes,body:e.timelineBody??``}),s}function _t(e,t,n){let r={...t};if(n!==void 0&&(r.source=n),e.caption!==void 0&&e.caption!==e.sourceName&&(r.caption=e.caption),!1===e.showCaption&&(r.hiddenCaption=!0),e.columnCount!==void 0&&e.columnCount>1&&(r.columnCount=e.columnCount),e.rowHeight!==void 0){let t=Math.round(e.rowHeight/9525);t>0&&t!==27&&(r.rowHeight=t)}e.style&&e.style!==`SlicerStyleLight1`&&(r.style=e.style);let i=e.sortOrder?mt[e.sortOrder]:void 0;return i&&i!==`ascending`&&(r.sortOrder=i),e.crossFilter&&e.crossFilter!==`showItemsWithDataAtTop`&&(r.crossFilter=e.crossFilter),e.lockedPosition&&(r.lockedPosition=!0),!1===e.customListSort&&(r.disabledCustomListSort=!0),e.cacheName&&(r.cacheName=e.cacheName),e.startItem&&(r.startItem=e.startItem),e.level!==void 0&&(r.level=e.level),e.uid&&(r.uid=e.uid),r}var vt=`xl/richData/rdrichvaluestructure.xml`,yt=`xl/richData/rdrichvalue.xml`,bt=`xl/richData/rdarray.xml`,xt=`xl/richData/rdsupportingpropertybagstructure.xml`,St=`xl/richData/rdsupportingpropertybag.xml`,Ct=`xl/richData/rdRichValueTypes.xml`,wt=`xl/richData/richStyles.xml`,q=(e,t)=>{let n=[],r=e?.childNodes,i=r?.length??0;for(let e=0;e<i;e++){let i=r.item(e);i.nodeType!==1||t&&i.localName!==t||n.push(i)}return n},Tt=e=>q(e,`k`).map(e=>[e.getAttribute(`n`)??``,e.getAttribute(`t`)||null]),Et=e=>q(e,`v`).map(e=>({t:e.getAttribute(`t`)||null,text:e.textContent??``})),Dt=e=>{let t=new Map;for(let n of q(e,`key`)){let e=new Map;for(let t of q(n,`flag`))e.set(t.getAttribute(`name`)??``,t.getAttribute(`value`)??``);t.set(n.getAttribute(`name`)??``,e)}return t},Ot=new Uint8Array,kt=class e{constructor(e,t,n){this.buffers=new Map,this.zip=e,this.entries=t,this.rawBuffer=n}static normalize(e){return e.startsWith(`/`)?e.slice(1):e}static async create(t){let n=t instanceof Blob?Ot:t instanceof Uint8Array?t:new Uint8Array(t),r=t instanceof Blob?new Ie(t):new U(n),i=new ye(r),a=new Map;for(let e of await i.getEntries())e.directory||a.set(e.filename,e);return new e(i,a,n)}getNames(){return[...this.entries.keys()]}has(t){return this.entries.has(e.normalize(t))}uncompressedSize(t){return this.entries.get(e.normalize(t))?.uncompressedSize??0}async getBuffer(t){let n=e.normalize(t),r=this.buffers.get(n);if(r)return r;let i=this.entries.get(n);if(!i)return null;let a=await i.getData(new it);return this.buffers.set(n,a),a}async prefetch(e){let t=[];for(let[n,r]of this.entries)!this.buffers.has(n)&&e(n,r)&&t.push(r.getData(new it).then(e=>{this.buffers.set(n,e)}));await Promise.all(t)}getEntry(t){return this.buffers.get(e.normalize(t))??null}async getTextStream(t,n){let r=this.entries.get(e.normalize(t));if(!r)return null;let i=new TransformStream;r.getData(i.writable).catch(()=>{});let a=i.readable.getReader(),o=new TextDecoder(`utf-8`);return new ReadableStream({async pull(e){let{value:t,done:r}=await a.read();if(r){let t=o.decode();t&&e.enqueue(t),e.close();return}n?.(t.byteLength);let i=o.decode(t,{stream:!0});i&&e.enqueue(i)}}).getReader()}getRawEntry(t){let n=this.entries.get(e.normalize(t));if(!n||n.encrypted||n.crc32===void 0)return null;let r=n.offset;if(r+30>this.rawBuffer.byteLength)return null;let i=new DataView(this.rawBuffer.buffer,this.rawBuffer.byteOffset+r,30);if(i.getUint32(0,!0)!==67324752)return null;let a=r+30+i.getUint16(26,!0)+i.getUint16(28,!0),o=a+n.compressedSize;return o>this.rawBuffer.byteLength?null:{data:this.rawBuffer.subarray(a,o),compressionMethod:n.compressionMethod,signature:n.crc32}}async close(){await this.zip.close()}},At=class{constructor(e){this._sink=e,this._samples=[],this._t0=jt(),this._tPrev=this._t0,this._heapPrev=Mt()}mark(e){let t=jt(),n=Mt(),r={label:e,tMs:t-this._t0,dtMs:t-this._tPrev,heapBytes:n,dHeapBytes:n!==void 0&&this._heapPrev!==void 0?n-this._heapPrev:void 0,rssBytes:Nt()};this._tPrev=t,this._heapPrev=n,this._samples.push(r),this._sink?.(r)}samples(){return this._samples}toTable(){return this._samples.map(e=>({phase:e.label,tMs:Math.round(e.tMs),dtMs:Math.round(e.dtMs),heapMB:e.heapBytes===void 0?`—`:Pt(e.heapBytes/1048576),dHeapMB:e.dHeapBytes===void 0?`—`:Pt(e.dHeapBytes/1048576),rssMB:e.rssBytes===void 0?`—`:Pt(e.rssBytes/1048576)}))}},jt=typeof performance==`object`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now();function Mt(){let e=typeof performance==`object`?performance.memory:void 0;if(e&&typeof e.usedJSHeapSize==`number`)return e.usedJSHeapSize;let t=globalThis.process;return typeof t==`object`&&typeof t.memoryUsage==`function`?t.memoryUsage().heapUsed:void 0}function Nt(){let e=globalThis.process;if(typeof e==`object`&&typeof e.memoryUsage==`function`)return e.memoryUsage().rss}function Pt(e){return Math.round(10*e)/10}var Ft=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,It=`-${Ft}.0-9·̀-ͯ‿-⁀`,Lt=(RegExp(`^[${Ft}]$`,`u`),RegExp(`^[${It}]$`,`u`),RegExp(`^[${Ft}][${It}]*$`,`u`)),Rt=(RegExp(`^[${It}]+$`,`u`),[32,10,13,9]);function zt(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var Bt=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,Vt=`-${Bt}.0-9·̀-ͯ‿-⁀`;RegExp(`^[${Bt}]$`,`u`),RegExp(`^[${Vt}]$`,`u`),RegExp(`^[${Bt}][${Vt}]*$`,`u`),RegExp(`^[${Vt}]+$`,`u`);var Ht=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,Ut=`-${Ht}.0-9·̀-ͯ‿-⁀`,Wt=(RegExp(`^[${Ht}]$`,`u`),RegExp(`^[${Ut}]$`,`u`),RegExp(`^[${Ht}][${Ut}]*$`,`u`));function Gt(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var Kt=function(e){return e===32||e===10||e===13||e===9},qt=function(e){return e>=32&&e<=55295||e===10||e===13||e===9||e>=57344&&e<=65533||e>=65536&&e<=1114111},Jt=zt,Yt=function(e){return zt(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256},Xt=Rt,Zt=Lt,Qt=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},$t=Gt,en=function(e){return Gt(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256},tn=Wt,nn=`http://www.w3.org/XML/1998/namespace`,rn=`http://www.w3.org/2000/xmlns/`,an={__proto__:null,xml:nn,xmlns:rn},on={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},J=-1,sn=-2,cn=13,ln=33,un=10,dn=60,fn=61,Y=62,X=63,pn=93,mn=e=>e===34||e===39,hn=[34,39],gn=[...hn,91,Y],_n=[...hn,dn,pn],vn=[fn,X,...Xt],yn=[...Xt,Y,38,dn];function bn(e,t,n){switch(t){case`xml`:n!==nn&&e.fail(`xml prefix must be bound to ${nn}.`);break;case`xmlns`:n!==rn&&e.fail(`xmlns prefix must be bound to ${rn}.`)}switch(n){case rn:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI ${rn}.`);break;case nn:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}var xn,Sn=e=>tn.test(e),Cn=e=>Zt.test(e),wn={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`},Tn=class{get closed(){return this._closed}constructor(e){this.i=0,this.prevI=0,this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=$t,this.nameCheck=en,this.isName=Sn,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...an};let e=this.opt.additionalNamespaces;e!=null&&(function(e,t){for(let n of Object.keys(t))bn(e,n,t[n])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=Jt,this.nameCheck=Yt,this.isName=Cn,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()}_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=[];let{fragmentOpt:e}=this;this.state=e?cn:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:t}=this.opt;if(t===void 0){if(!0===this.opt.forceXMLVersion)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);t=`1.0`}this.setXMLVersion(t),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(on),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[wn[e]]=t}off(e){this[wn[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===13||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let e=this.chunk,t=this.i;if(this.prevI=t,this.i++,t>=e.length)return J;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=32||n===9)return n;switch(n){case un:return this.line++,this.column=0,this.positionAtNewLine=this.position,un;case 13:return e.charCodeAt(t+1)===un&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,sn;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return J;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==8232||n===9)return n;switch(n){case un:return this.line++,this.column=0,this.positionAtNewLine=this.position,un;case 13:{let n=e.charCodeAt(t+1);n!==un&&n!==133||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,sn;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===sn?un:e}unGet(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===sn,a=i?un:r;if(a===J||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case sn:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=un;break;case J:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===J)return this.name+=e.slice(t),J;if(!Yt(n))return this.name+=e.slice(t,this.prevI),n===sn?un:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===J||!Kt(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=qt,this.getCode=this.getCode10):(this.isChar=Qt,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case dn:if(this.state=15,this.text.length!==0)throw Error(`no-empty text at start`);break;case J:break;default:this.unGet(),this.state=cn,this.xmlDeclPossible=!1}}sDoctype(){let e=this.captureTo(gn);switch(e){case Y:this.doctypeHandler?.(this.text),this.text=``,this.state=cn,this.doctype=!0;break;case J:break;default:this.text+=String.fromCodePoint(e),e===91?this.state=4:mn(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){let e=this.captureTo(_n);e!==J&&(this.text+=String.fromCodePoint(e),e===pn?this.state=2:e===dn?this.state=6:mn(e)&&(this.state=5,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang=``;break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?8:4,this.openWakaBang=``)}sDTDComment(){this.captureToChar(45)&&(this.text+=`-`,this.state=9)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===45?10:8}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===Y?this.state=4:(this.fail(`malformed comment.`),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+=`?`,this.state=12)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===Y&&(this.state=4)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;t:for(;;)switch(this.getCode()){case sn:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{let{entityReturnState:n}=this,r=this.entity+t.slice(e,this.prevI),i;this.state=n,r===``?(this.fail(`empty entity name.`),i=`&;`):(i=this.parseEntity(r),this.entity=``),n===cn&&this.textHandler===void 0||(this.text+=i);break t}case J:this.entity+=t.slice(e);break t}}sOpenWaka(){let e=this.getCode();if(Jt(e))this.state=34,this.unGet(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail(`disallowed character in tag name`),this.state=cn,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(){let e=this.getCodeNorm();e===45?(this.state=19,this.commentHandler?.(this.text),this.text=``):(this.text+=`-${String.fromCodePoint(e)}`,this.state=17)}sCommentEnded(){let e=this.getCodeNorm();e===Y?this.state=cn:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=17)}sCData(){this.captureToChar(pn)&&(this.state=21)}sCDataEnding(){let e=this.getCodeNorm();e===pn?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){let e=this.getCodeNorm();switch(e){case Y:this.cdataHandler?.(this.text),this.text=``,this.state=cn;break;case pn:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(e)}`,this.state=20}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===X||Kt(e)?(this.fail(`processing instruction without a target.`),this.state=e===X?26:25):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===J)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===X;r||Kt(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?ln:27):this.state=r?26:25:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===X?this.state=26:Kt(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){let e=this.getCodeNorm();if(e===Y){let{piTarget:e}=this;e.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),this.piHandler?.({target:e,body:this.text}),this.piTarget=this.text=``,this.state=cn}else e===X?this.text+=`?`:(this.text+=`?${String.fromCodePoint(e)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();e===X?this.state=ln:e!==J&&(this.state=28,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(vn);if(e===X)return this.state=ln,this.name+=this.text,this.text=``,void this.fail(`XML declaration is incomplete.`);if(Kt(e)||e===fn){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=e===fn?30:29}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===X)return this.state=ln,void this.fail(`XML declaration is incomplete.`);Kt(e)||(e!==fn&&this.fail(`value required.`),this.state=30)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===X)return this.state=ln,void this.fail(`XML declaration is incomplete.`);Kt(e)||(mn(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=32),this.state=31)}sXMLDeclValue(){let e=this.captureTo([this.q,X]);if(e===X)return this.state=ln,this.text=``,void this.fail(`XML declaration is incomplete.`);if(e===J)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=32}sXMLDeclSeparator(){let e=this.getCodeNorm();e===X?this.state=ln:(Kt(e)||(this.fail(`whitespace required.`),this.unGet()),this.state=27)}sXMLDeclEnding(){this.getCodeNorm()===Y?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),this.xmlDeclHandler?.(this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=cn):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){let e=this.captureNameChars();if(e===J)return;let t=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=t.ns=Object.create(null)),this.openTagStartHandler?.(t),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),e){case Y:this.openTag();break;case 47:this.state=35;break;default:Kt(e)||this.fail(`disallowed character in tag name.`),this.state=36}}sOpenTagSlash(){this.getCode()===Y?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=36)}sAttrib(){let e=this.skipSpaces();e!==J&&(Jt(e)?(this.unGet(),this.state=37):e===Y?this.openTag():e===47?this.state=35:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===fn?this.state=39:Kt(e)?this.state=38:e===Y?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==J&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case J:return;case fn:this.state=39;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===Y?this.openTag():Jt(e)?(this.unGet(),this.state=37):(this.fail(`disallowed character in attribute name.`),this.state=36)}}sAttribValue(){let e=this.getCodeNorm();mn(e)?(this.q=e,this.state=40):Kt(e)||(this.fail(`unquoted attribute value.`),this.state=42,this.unGet())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=41;return;case 38:this.text+=t.slice(n,this.prevI),this.state=14,this.entityReturnState=40;return;case un:case sn:case 9:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case dn:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case J:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();Kt(e)?this.state=36:e===Y?this.openTag():e===47?this.state=35:Jt(e)?(this.fail(`no whitespace between attributes.`),this.unGet(),this.state=37):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(yn);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case dn:this.fail(`disallowed character.`);break;case J:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===Y?this.openTag():this.state=36}}sCloseTag(){let e=this.captureNameChars();e===Y?this.closeTag():Kt(e)?this.state=44:e!==J&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case Y:this.closeTag();break;case J:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;t:for(;;)switch(this.getCode()){case dn:if(this.state=15,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=0;break t;case 38:this.state=14,this.entityReturnState=cn,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=0;break t;case pn:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw Error(`impossible state`)}break;case Y:t===2&&this.fail(`the string "]]>" is disallowed in char data.`),t=0;break;case sn:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case J:r!==void 0&&(this.text+=n.slice(e));break t;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;t:for(;;){let i=this.getCode();switch(i){case dn:if(this.state=15,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break t;case 38:this.state=14,this.entityReturnState=cn,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break t;case sn:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case J:n!==void 0&&(this.text+=t.slice(e));break t;default:Kt(i)||(r=!0)}}r&&(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(e,t){let{prefix:n,local:r}=this.qName(e),i={name:e,prefix:n,local:r,value:t};if(this.attribList.push(i),this.attributeHandler?.(i),n===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[r]=e,bn(this,r,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,bn(this,``,e)}}pushAttribPlain(e,t){let n={name:e,value:t};this.attribList.push(n),this.attributeHandler?.(n)}end(){this.sawRoot||this.fail(`document must contain a root element.`);let{tags:e}=this;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}this.state!==0&&this.state!==cn&&this.fail(`unexpected end.`);let{text:t}=this;return t.length!==0&&(this.textHandler?.(t),this.text=``),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(e){let t=this.topNS[e];if(t!==void 0)return t;let{tags:n}=this;for(let r=n.length-1;r>=0;r--)if(t=n[r].ns[e],t!==void 0)return t;return t=this.ns[e],t===void 0?this.opt.resolvePrefix?.(e):t}qName(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qName(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let{name:e,prefix:i,local:a}=t,o,s;i===``?(o=e===`xmlns`?rn:``,s=e):(o=this.resolve(i),o===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),o=i),s=`{${o}}${a}`),r.has(s)&&this.fail(`duplicate attribute: ${s}.`),r.add(s),t.uri=o,n[e]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!1,this.openTagHandler?.(t),e.push(t),this.state=cn,this.name=``}openSelfClosingTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!0,this.openTagHandler?.(t),this.closeTagHandler?.(t),(this.tag=e[e.length-1]??null)===null&&(this.closedRoot=!0),this.state=cn,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=cn,this.name=``,t===``)return this.fail(`weird empty close tag.`),void(this.text+=`</>`);let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag: ${t}.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}},En=/&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g,Dn={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},On=(e,t)=>{let n=Dn[t];if(n!==void 0)return n;let r=t.charCodeAt(1)===120?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r>0&&r<=1114111?String.fromCodePoint(r):e},kn=e=>{let t=e;return t.indexOf(`\r`)!==-1&&(t=t.replace(/\r\n?/g,`
3
+ `)),t.indexOf(`&`)!==-1&&(t=t.replace(En,On)),t},An=e=>{let t=e,n=t.length;for(let e=0;e<n;e++){let n=t.charCodeAt(e);if(n===9||n===10||n===13){t=t.replace(/\r\n|[\t\n\r]/g,` `);break}}return t.indexOf(`&`)!==-1&&(t=t.replace(En,On)),t},jn=e=>e===32||e===9||e===10||e===13,Mn=class e{constructor(){this._openTagHandler=void 0,this._closeTagHandler=void 0,this._textHandler=void 0,this._cdataHandler=void 0,this._errorHandler=void 0,this._endHandler=void 0,this._scanners=null,this._carry=``,this._text=``,this._tags=[],this._sawRoot=!1,this._closed=!1}static{this.NEED_MORE=-1}static{this.NOT_HANDLED=-2}static decodeText(e){return kn(e)}on(e,t){switch(e){case`opentag`:this._openTagHandler=t;break;case`closetag`:this._closeTagHandler=t;break;case`text`:this._textHandler=t;break;case`cdata`:this._cdataHandler=t;break;case`error`:this._errorHandler=t;break;case`end`:this._endHandler=t}}setElementScanners(e){if(!e||e.length===0)return void(this._scanners=null);let t=Array(128);for(let n of e){let e=n.name.charCodeAt(0);if(!(e<128)||t[e]!==void 0)throw Error(`Element scanner '${n.name}' needs an ASCII first character no other scanner uses.`);t[e]=n}this._scanners=t}fail(e){let t=Error(e),n=this._errorHandler;if(n===void 0)throw t;n(t)}write(e){if(this._closed)return this.fail(`cannot write after close.`),this;let t=e;this._carry.length!==0&&(t=this._carry+e,this._carry=``);let n=t.length,r=0;for(;r<n;){let e=t.indexOf(`<`,r);if(e===-1)return this._text+=t.slice(r),this;e>r&&(this._text+=t.slice(r,e));let i=this._markup(t,e,n);if(i===-1)return this._carry=t.slice(e),this;r=i}return this}close(){this._carry.length!==0&&(this.fail(`unexpected end.`),this._carry=``),this._sawRoot||this.fail(`document must contain a root element.`);let e=this._tags;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}return this._flushText(),this._closed=!0,this._endHandler?.(),this}_flushText(){let e=this._text;if(e.length===0)return;this._text=``;let t=this._textHandler;t!==void 0&&this._tags.length!==0&&t(kn(e))}_markup(t,n,r){if(n+1>=r)return-1;let i=t.charCodeAt(n+1);if(i===47){let e=t.indexOf(`>`,n+2);return e===-1?-1:(this._flushText(),this._closeTag(t.slice(n+2,e).trimEnd()),e+1)}if(i===63){let e=t.indexOf(`?>`,n+2);return e===-1?-1:e+2}if(i===33){if(n+4>r)return-1;if(t.charCodeAt(n+2)===45&&t.charCodeAt(n+3)===45){let e=t.indexOf(`-->`,n+4);return e===-1?-1:e+3}if(n+9>r)return-1;if(t.startsWith(`[CDATA[`,n+2)){let e=t.indexOf(`]]>`,n+9);return e===-1?-1:(this._flushText(),this._cdataHandler?.(t.slice(n+9,e)),e+3)}let e=t.indexOf(`[`,n+2),i=t.indexOf(`>`,n+2);if(i===-1)return-1;if(e!==-1&&e<i){let n=t.indexOf(`]>`,e);return n===-1?-1:n+2}return i+1}let a=this._scanners;if(a!==null){let o=i<128?a[i]:void 0;if(o!==void 0&&t.startsWith(o.name,n+1)){let i=n+1+o.name.length;if(i>=r)return-1;let a=t.charCodeAt(i);if(a===62||a===47||jn(a)){this._flushText();let i=o.scan(t,n,r);if(i!==e.NOT_HANDLED){if(i!==e.NEED_MORE){this._sawRoot=!0;let e=o.openTag;e!==void 0&&this._tags.push(e)}return i}}}}return this._openTag(t,n,r)}_openTag(e,t,n){let r=t+1,i=0;for(;r<n&&(i=e.charCodeAt(r),i!==62&&i!==47&&!jn(i));)r++;if(r>=n)return-1;let a=e.slice(t+1,r),o={},s=!1;for(;;){for(;r<n&&jn(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i===62){r++;break}if(i===47){if(r+1>=n)return-1;if(e.charCodeAt(r+1)!==62){this.fail(`forward-slash in opening tag not followed by >.`),r++;continue}s=!0,r+=2;break}let t=r;for(;r<n&&(i=e.charCodeAt(r),i!==61&&i!==62&&i!==47&&!jn(i));)r++;if(r>=n)return-1;let a=e.slice(t,r);for(;r<n&&jn(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==61){this.fail(`attribute without value.`);continue}for(r++;r<n&&jn(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==34&&i!==39){this.fail(`unquoted attribute value.`);continue}let c=e.indexOf(i===34?`"`:`'`,r+1);if(c===-1)return-1;a!==`__proto__`&&(o[a]=An(e.slice(r+1,c))),r=c+1}this._flushText(),this._sawRoot=!0;let c={name:a,attributes:o,isSelfClosing:s};return this._openTagHandler?.(c),s?this._closeTagHandler?.(c):this._tags.push(c),r}_closeTag(e){if(e===``)return void this.fail(`weird empty close tag.`);let t=this._tags,n=this._closeTagHandler,r=t.length;for(;r-->0;){let r=t.pop();if(n?.(r),r.name===e)return;this.fail(`unexpected close tag: ${e}.`)}this.fail(`unmatched closing tag: ${e}.`)}};(function(e){e.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`},e.parseStream=async(e,t,n)=>{if(n?.lean)return(async(e,t)=>{let n=new Mn,r;t.elementScanners&&n.setElementScanners(t.elementScanners),t.onOpenTag&&n.on(`opentag`,t.onOpenTag),t.onCloseTag&&n.on(`closetag`,t.onCloseTag),t.onText&&n.on(`text`,t.onText),t.onError&&n.on(`error`,t.onError);let i=t.onEnd;for(i&&n.on(`end`,()=>{r=i()});;){let{value:t,done:r}=await e.read();if(r)break;n.write(t)}return n.close(),r})(e,t);let r=new Tn({position:!1,...n}),i;t.onOpenTagStart&&r.on(xn.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&r.on(xn.Events.OpenTag,t.onOpenTag),t.onCloseTag&&r.on(xn.Events.CloseTag,t.onCloseTag),t.onAttribute&&r.on(xn.Events.Attribute,t.onAttribute),t.onText&&r.on(xn.Events.Text,t.onText),t.onError&&r.on(xn.Events.Error,t.onError);let a=t.onEnd;for(a&&r.on(xn.Events.End,()=>{i=a()});;){let{value:t,done:n}=await e.read();if(n)break;r.write(t)}return r.close(),i}})(xn||={});var Z=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,Q=e=>{let t=parseInt(e);return isNaN(t)?null:t},Nn=e=>{let t=parseFloat(e);return isNaN(t)?null:t},$=null,Pn=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),Fn=e=>Pn(e).replace(/"/g,`&quot;`),In=class{constructor(){this._registeredVisitors=new Map}registerVisitor(e){this._registeredVisitors.set(e.from,e)}createEventHandler(e,t,n){let r=this._registeredVisitors,i=[],a=[],o=null,s=null,c=null,l=null,u=[],d={key:null,source:e,parent:null},f=null,p=!1,m=null,h=null,g=null,_=(e,t)=>{let n=c.attributes[e];if(t){if(Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(n==null||(n=t[r](n),n==null))return}else if(n==null||(n=t(n),n==null))return}return n},ee={getSource:()=>f?.source??null,setSource:e=>{f.source=e},setKey:e=>{f.key=e},getFrom:()=>c,getAttribute:(e,t)=>_(e,t)??null,hasAttribute:e=>ee.getAttribute(e)!==null,getParent:()=>{let e=u[u.length-2];return e.parent??e.source},getPath:()=>{let e=[],t=a.length;for(let n=0;n<t;n++)e.push(a[n].local);return e.join(`\\`)},parseAttribute:_,getRawXml:()=>g,copyToObject:(e,t,n,r)=>{let i=_(r??t,n);i!==void 0&&(e[t]=i)},copyTo:(e,t,n)=>{let r=_(n??e,t);r!==void 0&&(f.source[e]=r)},warn:(e,t)=>{n?n(e,void 0,t?.onceKey):console.warn(e)}};return{onOpenTag:e=>{let t=e.name,n=t.indexOf(`:`);if(n!==-1&&(t=t.slice(n+1)),m)return m.push((e=>{let t=e.attributes??{},n=`<${e.name}`;for(let e in t){let r=t[e];n+=` ${e}="${Fn(typeof r==`string`?r:r?.value??``)}"`}return n+`>`})(e)),o={local:t,tag:e,destination:null},a.push(o),s=t,void(c=e);let g=(i.length>0?i[i.length-1]:r).get(t);if(o={local:t,visitor:g,tag:e,destination:null},p)return a.push(o),s=t,void(c=e);l=o?.visitor??null,s=t,c=e;let _=!!g&&g.to===null;if(g&&!_&&g.scope){let e=g.scope(ee);e===null?_=!0:e&&(i.push(e),o.pushedScope=!0)}g&&(a.length===0?(f=d,o.destination=f,o.pushedDestination=!0,u.push(f)):_?(f=null,o.destination=null):g.transparent?o.destination=f:(f={key:null,source:{},parent:null},o.destination=f,o.pushedDestination=!0,u.push(f))),a.push(o),p=_;let v=l?.openTag?.(ee);v!==void 0&&(f.parent=v),g?.raw&&!_&&(m=[],h=o)},onCloseTag:e=>{let t=e.name,r=t.indexOf(`:`);if(r!==-1&&(t=t.slice(r+1)),t!==s)throw Error(`mismatch open/close tag: '${t}'/'${s}'`);let _=!1;if(m){if(a[a.length-1]!==h)return m.push(`</${e.name}>`),a.pop(),o=a[a.length-1]??null,s=o?.local??null,void(c=o?.tag??null);g=m.join(``),m=null,h=null,_=!0}p||l?.closeTag?.(ee),_&&(g=null);let v=a.pop()??null;o=a[a.length-1]??null,v?.pushedScope&&i.pop();let y=v?.destination;if(y&&v.pushedDestination){u.pop(),f=u[u.length-1]??d;let e=v.visitor;e&&e.to&&y.source!==void 0&&(Array.isArray(e.to)?f.source.push?f.source.push(y.source):n?.(`Unable to parse array for ${e.from} at ${ee.getPath()}`):y.key?f.source[y.key]=y.source:typeof e.to==`string`&&(f.source[e.to]=y.source))}else y||(f=u[u.length-1]??d);s=o?.local??null,c=o?.tag??null,l=o?.visitor??null,p=!o?.destination},onText:e=>{m?m.push(Pn(e)):l?.text?.(e,ee)},onEnd:t}}},Ln=`IFERROR(${B}(`,Rn=Ln.toUpperCase(),zn=V.toUpperCase(),Bn={kind:`none`},Vn={kind:`spilled`},Hn=(e,t)=>{if(e.charCodeAt(t)!==34)return null;let n=``,r=t+1;for(;r<e.length;)if(e.charCodeAt(r)===34){if(e.charCodeAt(r+1)!==34)return{value:n,end:r+1};n+=`"`,r+=2}else n+=e[r],r++;return null},Un=e=>{let t=[],n=0;for(;n<e.length;){let r=e.charCodeAt(n);if(r===34){let t=Hn(e,n);if(t===null)break;n=t.end;continue}if(!(r>=65&&r<=90||r>=97&&r<=122||r===95)){n++;continue}let i=n+1;for(;i<e.length;){let t=e.charCodeAt(i);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46))break;i++}e.charCodeAt(i)===40&&t.push(e.slice(n,i).toUpperCase().replace(/^_XLFN\./,``).replace(/^_XLWS\./,``)),n=i}return t},Wn=class{constructor(e){this._restored=[],this._byColumn=new Map,this._isKnown=e}anchor(e,t,n){let r=this._byColumn.get(t);r&&e===r.rowEnd+1&&e>r.rowStart&&(r.closed=!0);let i=Un(n),a=!0;for(let e=0;e<i.length&&a;e++)a=this._isKnown(i[e]);let o={rowStart:e,colStart:t,rowEnd:e,colEnd:t,closed:!1,restored:a};return this._byColumn.set(t,o),a&&this._restored.push(o),a}placeholder(e,t){let n=this._byColumn.get(t);if(n&&!n.closed&&e>n.rowStart&&e<=n.rowEnd+1&&t>=n.colStart&&t<=n.colEnd)return n.rowEnd=e,n.restored;let r=this._byColumn.get(t-1);return!(!r||r.rowStart!==e||r.colEnd!==t-1)&&(r.colEnd=t,this._byColumn.set(t,r),r.restored)}getFormulaArray(){return this._restored.map(e=>[S.rangeToString(e),`dynamic`])}},Gn=/^\s*TABLE\s*\(([^()]*)\)\s*$/i,Kn=/^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/,qn=e=>{let t=Kn.exec(e);if(!t)return null;let n=S.fastStringToCol(t[2]),r=parseInt(t[4],10)-1;return n<0||r<0?null:{row:r,col:n,colAbsolute:t[1]===`$`,rowAbsolute:t[3]===`$`}},Jn=e=>S.cellToString({rowIndex:e.row,colIndex:e.col}),Yn=(e,t)=>{let n=Gn.exec(e);if(!n)return null;let r=n[1].split(`,`);if(r.length!==3&&r.length!==5)return null;let i=[];for(let e=0;e<r.length;e++){let t=qn(r[e]);if(!t)return null;i.push(t)}let a=t.rowStart,o=t.colStart,s=e=>e.colAbsolute&&!e.rowAbsolute&&e.col===o-1&&e.row===a,c=e=>e.rowAbsolute&&!e.colAbsolute&&e.row===a-1&&e.col===o,l={rowStart:a,colStart:o,rowEnd:t.rowEnd,colEnd:t.colEnd},u=i[0];if(i.length===3){let[,e,t]=i;return s(t)&&c(u)?{ref:l,columnInput:Jn(e)}:c(t)&&s(u)?{ref:l,rowInput:Jn(e)}:null}if(!u.rowAbsolute||!u.colAbsolute||u.row!==a-1||u.col!==o-1)return null;let[,d,f,p,m]=i;return s(f)&&c(m)?{ref:l,rowInput:Jn(p),columnInput:Jn(d)}:c(f)&&s(m)?{ref:l,rowInput:Jn(d),columnInput:Jn(p)}:null},Xn=/^(?:(\d{4})-(\d{2})-(\d{2}))?T?(?:(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/,Zn=/^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/,Qn=(e,t,n)=>{let r=Math.floor((14-t)/12),i=e+4800-r,a=t+12*r-3;return n+Math.floor((153*a+2)/5)+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)-32045},$n=Qn(1899,12,30),er=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},tr=class{constructor(){this._runs=null,this._text=``,this._font=null,this._inRun=!1,this._inRPr=!1}reset(){this._runs=null,this._inRun=!1,this._inRPr=!1}onOpenTag(e,t){e===`r`?(this._inRun=!0,this._text=``,this._font=null,this._runs??=[]):e===`rPr`?this._inRun&&(this._inRPr=!0):this._inRPr&&function(e,t,n){switch(e){case`b`:n.weight=ir(t)?700:400;break;case`i`:n.style=ir(t)?c.Style.Italic:c.Style.Normal;break;case`strike`:n.strike=Xe(ir(t));break;case`outline`:n.outline=ir(t);break;case`shadow`:n.shadow=ir(t);break;case`condense`:case`extend`:{let r=I(e,ir(t));r!==void 0&&(n.letterSpacing=r);break}case`u`:n.underline=je(t.val);break;case`vertAlign`:{let e=Be(t.val);e!==void 0&&(n.baseline=e);break}case`sz`:{let e=parseFloat(t.val??``);isNaN(e)||(n.size=e);break}case`rFont`:{let e=t.val;e&&(n.family=e);break}case`family`:{let e=rr[t.val??``];e&&(n.fallbacks=[e]);break}case`charset`:{let e=parseInt(t.val??``,10);isNaN(e)||(n.charset=e);break}case`scheme`:fe(n,t.val);break;case`color`:{let e=t.rgb;if(e&&t.theme===void 0){n.color=`#`+(e.length===8?e.substring(2):e).toUpperCase();break}let r=ue(e=>t[e]);r&&(n.color=r);break}}}(e,t,this._font??={})}onText(e){this._inRun&&(this._text+=e)}onCloseTag(e){if(e===`rPr`)this._inRPr=!1,this._font??={};else if(e===`r`&&this._inRun){let e=we(this._text),t=this._font;this._runs.push(t?{text:e,font:t}:{text:e}),this._inRun=!1}}take(){let e=this._runs;if(this.reset(),!e)return null;for(let t=0;t<e.length;t++)if(e[t].font)return e;return null}};function nr(e,t){let n={family:`Calibri`,size:11,...t,weight:400,style:c.Style.Normal,underline:c.UnderlineStyle.None,strike:c.StrikeStyle.None,baseline:0},r=Array(e.length);for(let t=0;t<e.length;t++){let i=e[t];if(!i.font){r[t]=i;continue}let a={...n,...i.font};r[t]={text:i.text,font:a}}return r}var rr={1:`serif`,2:`sans-serif`,3:`monospace`,4:`cursive`,5:`fantasy`},ir=e=>{let t=e.val;return t===void 0||t===`1`||t===`true`},ar=e=>{let t=t=>{if(e)return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1]},n=e=>{let t=parseInt(e??``,10);return isNaN(t)?0:t};return{c:n(t(`col`)),r:n(t(`row`)),x:Le(t(`colOff`)??`0`)??0,y:Le(t(`rowOff`)??`0`)??0}},or=`formulaDialect`,sr=`isKnownFunction`,cr=`date1904`,lr=`richStrings`,ur=`defaultFont`,dr=(e,t,n,r,i,a,o,s)=>{let c=new In,l=e=>{let t=e.getAttribute(`dxfId`,Q);return t===null?void 0:r?.get(t)||(a?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`),{})},u=!1,d=s?.get(`parseInlineDxf`),p=s?.get(or),m=e=>p&&e?p.readDetached(e):e,h=new y.TransposedBuilder,g=null,v=`topLeft`;c.registerVisitor({from:`autoFilter`,to:`autoTable`,openTag:e=>{let t=e.getAttribute(`ref`),n=S.fastStringToRange(t);e.getSource().r=n,e.getSource().v={}},closeTag:e=>{let t=e.getSource(),n=t.v,r=n.hiddenButtons;if(Array.isArray(r)){let e=r.length,i=t.r,a=i.colEnd-i.colStart+1;e===0?n.hiddenButtons=!1:e===a&&(n.hiddenButtons=!0)}}}),c.registerVisitor({from:`conditionalFormatting`,to:{},openTag:e=>{let t=e.getParent();t.conditionals||=[];let n=e.getAttribute(`sqref`);n&&=n.trim().split(/\s+/).join(`,`);let r={r:n,conditionals:t.conditionals},i=e.getAttribute(`pivot`,Z);i!==null&&(r.pivot=i),e.setSource(r)}}),c.registerVisitor({from:`cfRule`,to:{},openTag:e=>{let t=e.getParent();if(!t?.r)return;let n=e.getSource()??{};t.pivot!==void 0&&(n.pivot=t.pivot),t.conditionals.push({r:t.r,v:null,rule:n}),e.copyToObject(n,`type`,$),e.copyToObject(n,`priority`,Q),e.copyToObject(n,`stopIfTrue`,Z);let i=e.getAttribute(`dxfId`,Q);if(i!==null){let t=r?.get(i);t||=(a?.(`Unable to load conditional color. Invalid dxfI: '${i}' at '${e.getPath()}'.`),{}),n.style=t}e.copyToObject(n,`aboveAverage`,Z),e.copyToObject(n,`equalAverage`,Z),e.copyToObject(n,`stdDev`,Q),e.copyToObject(n,`bottom`,Z),e.copyToObject(n,`percent`,Z),e.copyToObject(n,`rank`,Q),e.copyToObject(n,`operator`,$),e.copyToObject(n,`text`,$),e.copyToObject(n,`timePeriod`,$)},closeTag:e=>{let t=e.getParent();if(!t?.r)return;let n=t.conditionals[t.conditionals.length-1],r=n?.rule;if(!r)return;let i={},o=ce(r,a);o&&(i.condition=o),r.style&&(i.style=r.style),r.scale&&(i.scale=r.scale),r.stopIfTrue&&(i.stopIfTrue=!0),r.pivot&&typeof r.priority==`number`&&(i.pivotKey=r.priority),n.v=i,n.priority=r.priority,r.x14Id&&(n.x14Id=r.x14Id),delete n.rule}});let te=(e,t)=>{let n=t.minLength??10,r=t.maxLength??90;n===0?delete e.minLength:e.minLength=n,r===100?delete e.maxLength:e.maxLength=r},x=(e,t)=>{let n=(e,t)=>!e||e.type===t&&e.value===void 0&&!e.exclusive,[r,i]=t;n(r,b.ColorStopType.Min)?delete e.minPoint:e.minPoint=r,n(i,b.ColorStopType.Max)?delete e.maxPoint:e.maxPoint=i},C=e=>{let t=e.conditions??[],n=[];for(let e=0;e<t.length;e++){let r=t[e],i={};r.type&&(i.type=r.type),r.value!==void 0&&(i.value=r.value),r.exclusive&&(i.exclusive=!0),n.push(i)}return n};c.registerVisitor({from:`colorScale`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t.colors??[],r=C(t);for(let e=0;e<r.length;e++)r[e].color=n[e];e.getParent().scale={type:b.ScaleType.ColorScale,stops:r}}}),c.registerVisitor({from:`dataBar`,to:{},openTag:e=>{e.copyTo(`maxLength`,Q),e.copyTo(`minLength`,Q),e.copyTo(`showValue`,Z)},closeTag:e=>{let t=e.getSource(),n={type:b.ScaleType.DataBar};x(n,C(t));let r=t.colors?.[0];r&&(n.color=r),te(n,t),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),c.registerVisitor({from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`reverse`,Z),e.copyTo(`showValue`,Z)},closeTag:e=>{let t=e.getSource(),n={type:b.ScaleType.IconSet,stops:C(t)};t.iconSet!==void 0&&(n.iconSet=t.iconSet),t.reverse!==void 0&&(n.reverse=t.reverse),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),c.registerVisitor({from:`formula`,to:{},text:(e,t)=>{let n=t.getParent(),r=n.formulas;r||(r=[],n.formulas=r),r.push(m(e))}}),c.registerVisitor({from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();if(t.conditions.push(n),e.copyTo(`type`,$),n.type===b.ColorStopType.Formula){let t=e.getAttribute(`val`);t!=null&&(n.value=m(String(t)))}else e.copyTo(`value`,Nn,`val`);!1===e.getAttribute(`gte`,Z)&&(n.exclusive=!0)}}),c.registerVisitor({from:`color`,to:{},openTag:e=>{let t=e.getParent();t.colors||=[];let n=ue(t=>e.getAttribute(t));t.colors.push(n)}}),c.registerVisitor({from:`filterColumn`,to:{},openTag:e=>{let t=e.getParent().v,n=parseInt(e.getAttribute(`colId`)),r=e.getSource();r.index=n;let i=t.filter;i||(i={conditions:[]},t.filter=i);let a=i.conditions;if(a||(a=[],i.conditions=a),a.push(r),e.getAttribute(`hiddenButton`,Z)&&t){let e=t.hiddenButtons;e||(e=[],t.hiddenButtons=e),e.push(n)}if(e.getAttribute(`showButton`,Z)&&t){let e=t.showButtons;e||(e=[],t.showButtons=e),e.push(n)}return r}}),c.registerVisitor({from:`colorFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=_.BuiltInOperatorNames.Color,t.param=n,e.copyToObject(n,`cellColor`,Z);let r=l(e);r&&(n.style=r)}}),c.registerVisitor({from:`iconFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=_.BuiltInOperatorNames.Icon,t.param=n,e.copyToObject(n,`iconId`,Q),e.copyToObject(n,`iconSet`,$)}}),c.registerVisitor({from:`top10`,openTag:e=>{let t=e.getParent(),n={};t.operator=_.BuiltInOperatorNames.TopN,t.param=n,e.copyToObject(n,`filterVal`,Nn),e.copyToObject(n,`percent`,Z),e.copyToObject(n,`top`,Z),e.copyToObject(n,`limit`,Nn,`val`)}}),c.registerVisitor({from:`dynamicFilter`,openTag:e=>{let t=e.getParent(),n=$e(e.getAttribute(`type`),e.getAttribute(`val`),e.getAttribute(`maxVal`));t.operator=n.operator,t.param=n.param}});let ne={from:`filters`,to:{},openTag:e=>{let t=e.getParent(),n={};return t.selector=_.BuiltInSelectorNames.Display,t.operator=_.BuiltInOperatorNames.InSet,t.param=n,e.copyToObject(n,`blank`,Z),e.copyToObject(n,`calendarType`,$),n}};c.registerVisitor(ne);let re={from:`filter`,openTag:e=>{let t=e.getParent(),n=t.items;n||(n=[],t.items=n),n.push(e.getAttribute(`val`,$))}};c.registerVisitor(re);let w={from:`dateGroupItem`,to:{},openTag:e=>{let t=e.getParent(),n=t.dateGroups;n||(n=[],t.dateGroups=n),n.push(e.getSource()),e.copyTo(`group`,$,`dateTimeGrouping`),e.copyTo(`day`,Q),e.copyTo(`hour`,Q),e.copyTo(`minute`,Q),e.copyTo(`month`,Q),e.copyTo(`second`,Q),e.copyTo(`year`,Q)}};c.registerVisitor(w);let T=new Map;T.set(`filterColumn`,{from:`filterColumn`,transparent:!0}),T.set(`filters`,ne),T.set(`filter`,re),T.set(`dateGroupItem`,w),c.registerVisitor({from:`customFilters`,openTag:e=>{let t=e.getParent(),n=e.getAttribute(`and`),r=n===`and`||n===`1`,i=[];return t.operator=r?_.BuiltInOperatorNames.And:_.BuiltInOperatorNames.Or,t.param=i,e.setSource(t),i},closeTag:e=>{let t=e.getSource(),n=t?.param;if(!t||!n)return;let r=n.length===1?n[0]:xe(t);r!==t&&(t.operator=r.operator,t.param=r.param)}}),c.registerVisitor({from:`customFilter`,openTag:e=>{let t=e.getParent(),n;Array.isArray(t)?(n={},t.push(n)):n=t;let r=He({operator:e.getAttribute(`operator`),val:e.getAttribute(`val`)},t=>e.warn(t));r&&(n.operator=r.operator,n.param=r.param)}});let ie={},E=null;c.registerVisitor({from:`sortState`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;if(!n)return;let r={};ie={};let i=e.getAttribute(`caseSensitive`,Z);i!=null&&(ie.collatorOptions=i?ee.CaseSensitiveOptions:ee.CaseInsensitiveOptions);let a=e.getAttribute(`sortMethod`);a!==`stroke`&&a!==`pinYin`||(ie.collatorOptions={...ie.collatorOptions,collation:a===`stroke`?`stroke`:`pinyin`}),e.getAttribute(`columnSort`,Z)&&(r.axis=f.Axis.Column);let o=e.getAttribute(`ref`),s=t.r;E=o&&s?S.fastStringToRange(o):null,E&&(r.extent={range:se(s,E)}),n.sort=r,e.setSource(t)}}),c.registerVisitor({from:`sortCondition`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;if(!n)return;let r=n.sort;if(!r)return;let i=r.sorts;i||(i=[],r.sorts=i);let a=e.getAttribute(`ref`),o=0,s=null;if(a){let e=S.fastStringToRange(a,hr),n=e.colStart,r=t.r,i=r.colStart;o=r?n-i:n,r&&E&&(s=Re(r,E,e))}r.extent&&(r.extent.sorts??=[]).push(s);let c={...ie},u=L(e.getAttribute(`sortBy`));u&&(c.sortOn=u);let d=l(e);d&&(c.style=d),e.copyToObject(c,`iconSet`,$),e.copyToObject(c,`customList`,$),c.reverse=e.getAttribute(`descending`,Z)??!1;let f={index:o,criteria:c};i.push(f)}});let ae=e=>{g=e.getSource(),v=`topLeft`,e.copyTo(`topLeft`,$,`topLeftCell`);let t=nt(e.getAttribute(`defaultGridColor`)),n=e.getAttribute(`colorId`);n===null||t||(e.getSource().gridLineColor=`index`+parseFloat(n)),e.copyTo(`showZeros`,Z),e.copyTo(`showFormulas`,Z),e.copyTo(`zoomScale`,Q),e.copyTo(`viewMode`,$,`view`);let r={};for(let[t,n]of k){let i=e.getAttribute(n,Q);i&&(r[t]=Math.min(400,Math.max(10,i)))}Object.keys(r).length>0&&(e.getSource().zoomScales=r),e.copyTo(`showRuler`,Z),e.copyTo(`showWhitespace`,Z,`showWhiteSpace`),e.copyTo(`windowProtection`,Z),e.copyTo(`showRowHeaders`,Z,`showRowColHeaders`),e.copyTo(`showColumnHeaders`,Z,`showRowColHeaders`),e.copyTo(`showRowGridlines`,Z,`showGridLines`),e.copyTo(`showColumnGridlines`,Z,`showGridLines`),e.copyTo(`rightToLeft`,Z),e.copyTo(`showOutlineSymbols`,Z)};c.registerVisitor({from:`sheetView`,to:`view`,openTag:e=>{ae(e)},closeTag:()=>{g=null}}),c.registerVisitor({from:`customSheetViews`,to:`customSheetViews`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`customSheetView`,to:[],openTag:e=>{oe=!0,ae(e)},closeTag:()=>{oe=!1,g=null}}),c.registerVisitor({from:`selection`,to:null,openTag:e=>{if(!g)return;let t=e.getAttribute(`activeCell`)?.replace(/\$/g,``),n=e.getAttribute(`sqref`)?.replace(/\$/g,``),r=e.getAttribute(`pane`)??`topLeft`;if(r!==v){let e=g.freezePanes;if(e&&t){let i={activeCell:t};n&&n!==t&&(i.sqref=n),(e.paneSelections??={})[r]=i}return}let i={};t&&(i.cell=t);let a=e.getAttribute(`activeCellId`,Q);a!==null&&(i.rangeIndex=a),n&&n!==t&&(i.ranges=n.trim().split(/\s+/)),g.selection=i}}),c.registerVisitor({from:`pane`,to:null,openTag:e=>{if(!g)return;v=e.getAttribute(`activePane`)??`topLeft`;let t=e.getAttribute(`state`);if(t===`frozen`||t===`frozenSplit`){let t={};g.freezePanes=t,e.copyToObject(t,`topLeft`,$,`topLeftCell`);let n=(g.topLeft?S.fastStringToCell(g.topLeft):void 0)??{colIndex:0,rowIndex:0},r={colIndex:0,rowIndex:0};e.copyToObject(r,`colIndex`,Q,`xSplit`),e.copyToObject(r,`rowIndex`,Q,`ySplit`);let i={colIndex:n.colIndex+r.colIndex,rowIndex:n.rowIndex+r.rowIndex};t.coords=S.cellToString(i)}}}),c.registerVisitor({from:`sheetPr`,transparent:!0,openTag:t=>{let n=t.getAttribute(`codeName`);n&&(e.codeName=n),!1===t.getAttribute(`enableFormatConditionsCalculation`,Z)&&(e.conditionalFormatCalculation=!1),!0===t.getAttribute(`transitionEvaluation`,Z)&&(e.transitionFormulaEvaluation=!0),!0===t.getAttribute(`transitionEntry`,Z)&&(e.transitionFormulaEntry=!0),!1===t.getAttribute(`published`,Z)&&(e.excludeFromPublishing=!0);let r={};!0===t.getAttribute(`syncHorizontal`,Z)&&(r.horizontal=!0),!0===t.getAttribute(`syncVertical`,Z)&&(r.vertical=!0);let i=t.getAttribute(`syncRef`);i&&(r.anchor=i),Object.keys(r).length>0&&(e.syncScroll=r)}}),c.registerVisitor({from:`tabColor`,to:null,openTag:t=>{let n=ue(e=>t.getAttribute(e));n&&(e.tabColor=n)}});let oe=!1,O=()=>e.pageLayout??={};c.registerVisitor({from:`pageSetUpPr`,to:null,openTag:e=>{!0===e.getAttribute(`fitToPage`,Z)&&(O().fitToPage=!0),!1===e.getAttribute(`autoPageBreaks`,Z)&&(O().hideAutoPageBreaks=!0)}}),c.registerVisitor({from:`outlinePr`,to:null,openTag:t=>{let n=e=>{let n=t.getAttribute(e);return n===`0`||n===`false`},r={};n(`summaryBelow`)&&(r.summaryRow=`up`),n(`summaryRight`)&&(r.summaryColumn=`left`),(e=>{let n=t.getAttribute(e);return n===`1`||n===`true`})(`applyStyles`)&&(r.automaticStyles=!0),Object.keys(r).length>0&&(e.outline=r)}}),c.registerVisitor({from:`pageMargins`,to:null,openTag:e=>{if(oe)return;let t=(t,n)=>e.getAttribute(t,Nn)??n,n={left:t(`left`,.7),right:t(`right`,.7),top:t(`top`,.75),bottom:t(`bottom`,.75),header:t(`header`,.3),footer:t(`footer`,.3)};n.left===.7&&n.right===.7&&n.top===.75&&n.bottom===.75&&n.header===.3&&n.footer===.3||(O().margins=n)}}),c.registerVisitor({from:`pageSetup`,to:null,openTag:e=>{if(oe)return;let n=O(),r=t=>e.getAttribute(t,Q)??void 0,i=t=>e.getAttribute(t,Z),a=e.getAttribute(`orientation`);a!==`landscape`&&a!==`portrait`||(n.orientation=a);for(let e of[`paperSize`,`scale`,`fitToWidth`,`fitToHeight`,`firstPageNumber`,`horizontalDpi`,`verticalDpi`,`copies`]){let t=r(e);t!==void 0&&(n[e]=t)}let o=e.getAttribute(`paperHeight`);o&&(n.paperHeight=o);let s=e.getAttribute(`paperWidth`);s&&(n.paperWidth=s),e.getAttribute(`pageOrder`)===`overThenDown`&&(n.printOrder=`overThenDown`),!0===i(`blackAndWhite`)&&(n.blackAndWhite=!0),!0===i(`draft`)&&(n.draftMode=!0),!0===i(`useFirstPageNumber`)&&(n.useFirstPageNumber=!0),!1===i(`usePrinterDefaults`)&&(n.ignorePrinterDefaults=!0);let c=e.getAttribute(`cellComments`),l=Fe.find(([e])=>e===c)?.[1];l&&(n.printComments=l);let u=e.getAttribute(`errors`),d=ct.find(([e])=>e===u)?.[1];d&&(n.printErrors=d);let f=e.getAttribute(`r:id`),p=f?t(f,`part`):null;p&&(n.printerSettings=p)}}),c.registerVisitor({from:`printOptions`,to:null,openTag:e=>{if(oe)return;let t=t=>!0===e.getAttribute(t,Z);t(`horizontalCentered`)&&(O().centerHorizontally=!0),t(`verticalCentered`)&&(O().centerVertically=!0),t(`gridLines`)&&(O().printGridlines=!0),t(`headings`)&&(O().printHeadings=!0)}}),c.registerVisitor({from:`headerFooter`,to:{},openTag:e=>{if(oe)return;let t={},n=t=>e.getAttribute(t,Z);!0===n(`differentOddEven`)&&(t.differentOddEven=!0),!0===n(`differentFirst`)&&(t.differentFirst=!0),!1===n(`scaleWithDoc`)&&(t.ignoreSheetScale=!0),!1===n(`alignWithMargins`)&&(t.ignoreSheetMargins=!0),Object.keys(t).length>0&&(O().headerFooter=t)}});for(let e of Me)c.registerVisitor({from:e,to:{},text:(t,n)=>{if(oe)return;let r=O(),i=r.headerFooter??={};i[e]=(i[e]??``)+we(t)}});let le=`rowBreaks`;for(let[e,t]of[[`rowBreaks`,`rowBreaks`],[`colBreaks`,`columnBreaks`]])c.registerVisitor({from:e,to:{},openTag:()=>{le=t}});c.registerVisitor({from:`brk`,to:null,openTag:e=>{if(oe)return;let t=e.getAttribute(`id`,Q);if(t==null)return;let n={index:t},r=e.getAttribute(`min`,Q);r!=null&&(n.min=r);let i=e.getAttribute(`max`,Q);i!=null&&(n.max=i),!0!==e.getAttribute(`man`,Z)&&(n.automatic=!0),!0===e.getAttribute(`pt`,Z)&&(n.pivot=!0);let a=O();(a[le]??=[]).push(n)}}),c.registerVisitor({from:`ignoredErrors`,transparent:!0}),c.registerVisitor({from:`ignoredError`,to:null,openTag:t=>{let n=t.getAttribute(`sqref`);if(!n)return;let r=[];for(let e of ze)!0===t.getAttribute(e,Z)&&r.push(e);if(r.length!==0)for(let t of n.trim().split(/\s+/))(e.ignoredErrors??=[]).push({r:t,v:r})}}),c.registerVisitor({from:`mergeCells`,to:`merges`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`dataValidations`,to:`validations`,openTag:t=>{t.setSource([]);let n={};!0===t.getAttribute(`disablePrompts`,Z)&&(n.disablePrompts=!0);let r=t.getAttribute(`xWindow`,Q);r!==null&&(n.windowX=r);let i=t.getAttribute(`yWindow`,Q);i!==null&&(n.windowY=i),Object.keys(n).length>0&&(e.validationSettings={...e.validationSettings,...n})}});let de={from:`dataValidation`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n,rule:{type:e.getAttribute(`type`)??void 0,operator:e.getAttribute(`operator`)??void 0}};!0===e.getAttribute(`showDropDown`,Z)&&(n.hideDropdown=!0),e.copyToObject(n,`alert`,$,`error`),e.copyToObject(n,`alertTitle`,$,`errorTitle`),e.copyToObject(n,`showAlertMessage`,Z,`showErrorMessage`),n.alertStyle=e.getAttribute(`errorStyle`)??`stop`,e.copyToObject(n,`imeMode`),e.copyToObject(n,`prompt`),e.copyToObject(n,`promptTitle`),e.copyToObject(n,`showPromptMessage`,Z,`showInputMessage`),e.setSource(r)},closeTag:e=>{let t=e.getSource();if(!t?.rule)return;let n=F(t.rule,a);n&&(e.getAttribute(`allowBlank`,Z)&&(n.includeBlanks=!0),t.v.condition=n),delete t.rule}};c.registerVisitor(de),c.registerVisitor({from:`formula1`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula1=P(m(e),n.type))}}),c.registerVisitor({from:`formula2`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula2=P(m(e),n.type))}}),c.registerVisitor({from:`picture`,to:`picture`,openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return void e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.sheet.picture.noRel`});let r=t(n,`resource`);e.getSource().resId=r}});let fe={from:`slicer`,to:{},openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return void e.warn(`A slicer names no cache; it was not imported.`,{onceKey:`xlsx.sheet.slicer.noRel`});let r=t(n)?.slicers,i=e.getParent();i.slicers||={};let a=Object.keys(r);for(let e of a)i.slicers[e]=r[e]}};c.registerVisitor(fe);let me={from:`timelineRef`,to:{},openTag:e=>{let n=e.getAttribute(`r:id`),r=n?t(n)?.slicers:void 0;if(!r)return void e.warn(`A timeline names no part; it was not imported.`,{onceKey:`xlsx.sheet.timeline.noRel`});let i=e.getParent();i.slicers??={};for(let e of Object.keys(r))i.slicers[e]=r[e]}},he=(e,t)=>({from:e,to:{},openTag:e=>{e.setSource(``)},text:(e,t)=>{t.setSource((t.getSource()??``)+e)},closeTag:e=>{t(String(e.getSource()??``),e)}}),ge=new Map;ge.set(`dataValidations`,{from:`dataValidations`,to:`validations`,openTag:e=>{let t=e.getParent();e.setSource(t.validations??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),ge.set(`dataValidation`,{...de,closeTag:e=>{de.closeTag(e);let t=e.getSource();t&&!t.r&&(e.warn(`x14 dataValidation with no xm:sqref was dropped.`),e.setSource(void 0))}});let _e=e=>({from:e,to:{},openTag:t=>{t.setSource({rule:t.getParent()?.rule,key:e})}});ge.set(`formula1`,_e(`formula1`)),ge.set(`formula2`,_e(`formula2`)),ge.set(`f`,he(`f`,(e,t)=>{let n=t.getParent(),r=n?.rule;r&&(r[n.key]=P(m(e),r.type))})),ge.set(`sqref`,he(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.r=r.split(/\s+/).join(`,`))}));let A=new Map,M=[],N=new Map;N.set(`conditionalFormattings`,{from:`conditionalFormattings`,transparent:!0}),N.set(`conditionalFormatting`,{from:`conditionalFormatting`,to:{},openTag:e=>{e.setSource({rules:[]})},closeTag:e=>{let t=e.getSource(),n=t?.rules??[];for(let e=0;e<n.length;e++){let r=n[e];r.sqref=t.sqref,r.id?A.set(r.id,r):M.push(r)}}}),N.set(`cfRule`,{from:`cfRule`,to:{},openTag:e=>{e.copyTo(`id`,$),e.copyTo(`type`,$),e.copyTo(`priority`,Q),e.copyTo(`stopIfTrue`,Z),e.copyTo(`operator`,$),e.copyTo(`text`,$),e.copyTo(`timePeriod`,$),e.copyTo(`aboveAverage`,Z),e.copyTo(`equalAverage`,Z),e.copyTo(`stdDev`,Q),e.copyTo(`bottom`,Z),e.copyTo(`percent`,Z),e.copyTo(`rank`,Q)},closeTag:e=>{let t=e.getSource();t&&e.getParent()?.rules?.push(t)}}),N.set(`sqref`,he(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.sqref=r)})),N.set(`dataBar`,{from:`dataBar`,to:{},openTag:e=>{e.copyTo(`minLength`,Q),e.copyTo(`maxLength`,Q),e.copyTo(`gradient`,Z),e.copyTo(`border`,Z),e.copyTo(`direction`,$),e.copyTo(`axisPosition`,$),e.copyTo(`negativeBarColorSameAsPositive`,Z),e.copyTo(`negativeBarBorderColorSameAsPositive`,Z)},closeTag:e=>{e.getParent().dataBar=e.getSource()}}),N.set(`iconSet`,{from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`custom`,Z),e.copyTo(`reverse`,Z),e.copyTo(`showValue`,Z)},closeTag:e=>{e.getParent().iconSet=e.getSource()}});let ve=new Map;ve.set(`f`,he(`f`,(e,t)=>{let n=t.getParent();if(!n)return;let r=e.trim(),i=Number(r);n.value=r.length>0&&Number.isFinite(i)?i:m(e)})),N.set(`cfvo`,{from:`cfvo`,to:{},scope:()=>ve,openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();t.conditions.push(n),e.copyTo(`type`,$),!1===e.getAttribute(`gte`,Z)&&(n.exclusive=!0)}}),N.set(`f`,he(`f`,(e,t)=>{let n=t.getParent();n&&(n.formulas??=[]).push(m(e))})),N.set(`dxf`,{from:`dxf`,to:{},raw:!0,closeTag:e=>{if(!d)return;let t=e.getParent();if(!t)return;let n=d(e.getRawXml()??``);n&&(t.style=n)}});let ye=e=>({from:e,to:{},openTag:t=>{let n=ue(e=>t.getAttribute(e));n&&(t.getParent()[e]=n)}});N.set(`borderColor`,ye(`borderColor`)),N.set(`negativeFillColor`,ye(`negativeFillColor`)),N.set(`negativeBorderColor`,ye(`negativeBorderColor`)),N.set(`axisColor`,ye(`axisColor`)),N.set(`cfIcon`,{from:`cfIcon`,to:{},openTag:e=>{let t=e.getAttribute(`iconSet`),n=e.getAttribute(`iconId`,Q);if(t===null||n===null)return;let r=e.getParent();r.icons||=[],r.icons.push({set:t,id:n})}});let Se=new Map;Se.set(`id`,he(`id`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.x14Id=r)}));let Ce=new Map;Ce.set(`slicerList`,{from:`slicerList`,transparent:!0}),Ce.set(`slicer`,fe);let I=new Map;I.set(`timelineRefs`,{from:`timelineRefs`,transparent:!0}),I.set(`timelineRef`,me);let z=new Map;z.set(`sparklineGroups`,{from:`sparklineGroups`,to:`sparklineGroups`,openTag:e=>{let t=e.getParent();e.setSource(t.sparklineGroups??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),z.set(`sparklineGroup`,{from:`sparklineGroup`,to:[],openTag:e=>{let t=e.getFrom().attributes??{},n={};for(let e in t){let r=t[e];n[e]=typeof r==`string`?r:r?.value??``}e.setSource({properties:W(n),entries:[]})},closeTag:e=>{let t=e.getSource(),n=Ke(t.properties,t.entries);n||e.warn(`A sparkline group with no sparklines was dropped.`,{onceKey:`xlsx.sheet.sparklineGroup.empty`}),e.setSource(n??void 0)}});for(let e of De)z.set(e,{from:e,to:{},openTag:t=>{let n=ue(e=>t.getAttribute(e));n&&(t.getParent().properties[e]=n)}});z.set(`sparklines`,{from:`sparklines`,transparent:!0}),z.set(`sparkline`,{from:`sparkline`,to:{},openTag:e=>{e.setSource({isSparkline:!0})},closeTag:e=>{let t=e.getSource(),n=e.getParent(),r=t?.sqref?.trim(),i=r?S.fastStringToRange(r.split(/\s+/)[0]):null;i?n.entries.push({location:{rowIndex:i.rowStart,colIndex:i.colStart},data:t.data??``}):e.warn(`A sparkline with no location was dropped.`,{onceKey:`xlsx.sheet.sparkline.incomplete`})}}),z.set(`f`,he(`f`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.isSparkline?n.data=r:n.properties.dateRange=r)})),z.set(`sqref`,he(`sqref`,(e,t)=>{let n=t.getParent();n?.isSparkline&&(n.sqref=e)}));let Te=new Map([[D(R),z],[D(ft),ge],[D(G),N],[D(ut),N],[D(dt),Se],[D(H),Ce],[D(be),Ce],[D(st),I],[D(We),T]]),Ee=new Set;c.registerVisitor({from:`extLst`,transparent:!0}),c.registerVisitor({from:`ext`,transparent:!0,scope:e=>{let t=e.getAttribute(`uri`),n=D(t),r=Te.get(n);if(r)return r;if(!at.has(n)&&!Ee.has(n)){Ee.add(n);let r=Je[n];e.warn(r?`Extension content '${r}' (${t}) is not read; it will be lost on resave.`:`Unknown extension content (uri ${t}) is not read; it will be lost on resave.`)}return null}}),c.registerVisitor({from:`mergeCell`,to:[],openTag:e=>{let t=e.getAttribute(`ref`);e.setSource(t)}}),c.registerVisitor({from:`hyperlinks`,to:`hyperlinks`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`hyperlink`,to:[],openTag:e=>{let n=e.getAttribute(`r:id`),r=e.getAttribute(`ref`);if(!r)return void e.warn(`A hyperlink has no ref; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.noRef`});e.setKey(r);let i=n?t(n):``;if(typeof i!=`string`)return void e.warn(`A hyperlink has an invalid address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});i.endsWith(`\\`)&&(i=i.substring(0,i.length-1));let a=e.getAttribute(`location`);if(a&&(i+=`#`+a),!i)return void e.warn(`A hyperlink has no address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});let o,s=e.getAttribute(`tooltip`),c=e.getAttribute(`display`);s||c?(o={address:i},s&&(o.screenTip=s),c&&(o.display=c)):o=i,e.setSource({r,v:o})}}),c.registerVisitor({from:`drawing`,to:`movables`,openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return;let r=t(n);r?e.setSource(r.movables):e.warn(`A drawing part is missing; its shapes were not imported.`,{onceKey:`xlsx.sheet.drawing.missing`})}}),c.registerVisitor({from:`legacyDrawing`,to:`legacyDrawing`,openTag:e=>{e.setSource(t(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}}),c.registerVisitor({from:`legacyDrawingHF`,to:`legacyDrawingHF`,openTag:e=>{e.setSource(t(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}});let Oe=null,ke=!1,Ae=new Map,je={from:`Fallback`,to:null},Ne={from:`Choice`,transparent:!0};Ae.set(`Fallback`,je),Ae.set(`Choice`,Ne),Ae.set(`control`,{from:`control`,transparent:!0,openTag:e=>{let n=e.getAttribute(`name`),r=e.getAttribute(`r:id`),i=r?t(r,`formControl`):null;if(!i)return e.warn(`The form control '${n??``}' has no properties and was not read.`,{onceKey:`xlsx.sheet.control.noProperties`}),void(Oe=null);let a=i.json,o=parseInt(e.getAttribute(`shapeId`)??``,10);isNaN(o)||(a.shapeId=o);let s={anchor:{tl:{c:0,r:0,x:0,y:0},br:{c:0,r:0,x:0,y:0}},content:{type:i.type,json:a}};n&&(s.content.name=n),Oe={movable:s,control:a}},closeTag:()=>{Oe&&=(e.movables||=[],e.movables.push(Oe.movable),null)}}),Ae.set(`controlPr`,{from:`controlPr`,transparent:!0,raw:!0,openTag:e=>{if(!Oe)return;let t=e.getFrom().attributes??{},n={};for(let e in t){let r=t[e];n[e]=typeof r==`string`?r:r?.value??``}Qe(n,Oe.control)},closeTag:e=>{if(!Oe)return;let t=(e=>{let t=/<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);if(!t)return null;let n=t[2],r=e=>RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1],i=t[1],a=/\bmoveWithCells="(?:1|true)"/.test(i),o=/\bsizeWithCells="(?:1|true)"/.test(i);return{anchor:{tl:ar(r(`from`)),br:ar(r(`to`))},anchorType:a?o?`twoCell`:`oneCell`:`absolute`,rest:(e.slice(0,t.index)+e.slice(t.index+t[0].length)).trim()}})(e.getRawXml()??``);t?(Oe.movable.anchor=t.anchor,t.anchorType!==`twoCell`&&(Oe.movable.anchorType=t.anchorType),t.rest&&(Oe.control.xml=t.rest)):ke||(ke=!0,e.warn(`A form control has no anchor; it is placed at the top left of the sheet.`))}});let Pe={from:`controls`,transparent:!0,scope:()=>Ae};c.registerVisitor(Pe);let Ie=new Map([[`Choice`,Ne],[`Fallback`,je],[`controls`,Pe]]);c.registerVisitor({from:`AlternateContent`,transparent:!0,scope:()=>Ie}),c.registerVisitor({from:`tableParts`,to:`tables`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`tablePart`,to:[],openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return;let r=t(n);r?e.setSource(r):e.warn(`A table part is missing; the table was not imported.`,{onceKey:`xlsx.sheet.table.missing`})}});let Le=(e,t)=>{t.conditions?.length&&x(e,C(t)),te(e,t),!1===t.gradient?e.solidFill=!0:delete e.solidFill,t.border&&t.borderColor&&(e.borderColor=t.borderColor),!t.negativeBarColorSameAsPositive&&t.negativeFillColor&&(e.negativeFillColor=t.negativeFillColor),!(t.negativeBarBorderColorSameAsPositive??1)&&t.negativeBorderColor&&(e.negativeBorderColor=t.negativeBorderColor),t.axisColor&&(e.axisColor=t.axisColor),t.axisPosition!==`middle`&&t.axisPosition!==`none`||(e.axisPosition=t.axisPosition),t.direction!==`leftToRight`&&t.direction!==`rightToLeft`||(e.direction=t.direction)},Be=(e,t)=>{t.conditions?.length&&(e.stops=C(t)),t.iconSet&&t.iconSet!==e.iconSet&&(e.iconSet=t.iconSet),t.icons?.length&&(e.icon=t.icons),t.reverse!==void 0&&(e.reverse=t.reverse),t.showValue!==void 0&&(e.showValue=t.showValue)},Ve=e=>{if(!e.sqref)return null;let t=e.sqref.split(/\s+/).join(`,`);if(e.type===`iconSet`){if(!e.iconSet)return null;let n={type:b.ScaleType.IconSet,stops:[]};return Be(n,e.iconSet),{r:t,v:{scale:n},priority:e.priority}}let n=ce(e,a);if(!n)return null;let r={condition:n};return e.style&&(r.style=e.style),e.stopIfTrue&&(r.stopIfTrue=!0),{r:t,v:r,priority:e.priority}};c.registerVisitor({from:`worksheet`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t?.conditionals;if(n)for(let e=0;e<n.length;e++){let t=n[e],r=t.x14Id;if(!r)continue;delete t.x14Id;let i=A.get(r);if(!i)continue;A.delete(r);let a=t.v?.scale;i.dataBar&&a?.type===b.ScaleType.DataBar?Le(a,i.dataBar):i.iconSet&&a?.type===b.ScaleType.IconSet&&Be(a,i.iconSet)}let r=[...A.values(),...M],i=new Set,o=0;for(let e=0;e<r.length;e++){let a=Ve(r[e]);a?(n||(n=[],t.conditionals=n),n.push(a)):(i.add(r[e].type??`unknown`),o++)}if(o>0){let e=[...i].map(e=>`'${e}'`).join(`, `);a?.(o===1?`An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.`:`${o} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`)}if(n){n.length>1&&n.sort((e,t)=>(e.priority??1/0)-(t.priority??1/0));for(let e=0;e<n.length;e++)delete n[e].priority}}}),c.registerVisitor({from:`customProperties`,to:`customProperties`,openTag:e=>{e.setSource([])},closeTag:e=>{let t=e.getSource();t.length>0&&(e.getParent().customProperties=t)}}),c.registerVisitor({from:`customPr`,to:{},openTag:e=>{let n=e.getParent();e.copyTo(`name`);let r=e.getAttribute(`r:id`);if(!r)return void e.warn(`A custom property names no part; it was not imported.`,{onceKey:`xlsx.sheet.customProperty.noRel`});let i=t(r,`resource`),a=e.getSource();a.resId=i,n.push(a)}}),c.registerVisitor({from:`sheetProtection`,to:`protection`,openTag:e=>{let t=e.getSource();for(let n of j){let r=e.hasAttribute(n.attribute)?e.getAttribute(n.attribute):null;t[n.key]=pe(n,r)}if(t.sheet)return;let n={};e.copyToObject(n,`hash`,$,`hashValue`),e.copyToObject(n,`algorithm`,$,`algorithmName`),e.copyToObject(n,`salt`,$,`saltValue`),e.copyToObject(n,`spinCount`,Q),e.copyToObject(n,`legacyHash`,$,`password`),Object.keys(n).length>0&&(e.getSource().password=n)}}),c.registerVisitor({from:`protectedRanges`,to:`protectedRanges`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`protectedRange`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n};e.copyToObject(n,`name`),e.copyToObject(n,`securityDescriptor`);let i={};e.copyToObject(i,`hash`,$,`hashValue`),e.copyToObject(i,`algorithm`,$,`algorithmName`),e.copyToObject(i,`salt`,$,`saltValue`),e.copyToObject(i,`spinCount`,Q),e.copyToObject(i,`legacyHash`,$,`password`),Object.keys(i).length>0&&(n.password=i),e.setSource(r)},closeTag:e=>{let t=e.getSource();t?.r&&t.v.name||e.setSource(void 0)}}),c.registerVisitor({from:`sheetFormatPr`,to:`sheetFormatPr`,openTag:t=>{t.copyToObject(e,`defaultColSize`,Nn,`defaultColWidth`);let n=t.getAttribute(`customHeight`);n!==`1`&&n!==`true`||t.copyToObject(e,`defaultRowSize`,Nn,`defaultRowHeight`);let r=t.getAttribute(`baseColWidth`,Q);r&&r!==8&&(e.baseColSize=r),u=!!t.getAttribute(`zeroHeight`,Z)}}),c.registerVisitor({from:`cols`,to:`cols`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`col`,to:[],openTag:e=>{let t=e.getSource(),n=e.getAttribute(`min`),r=e.getAttribute(`max`),i=n===void 0?0:parseInt(n)-1,a=r===void 0?i:parseInt(r)-1;t.r=S.runToString(i,a,!0);let o={};t.v=o,e.copyToObject(o,`sz`,Nn,`width`),e.copyToObject(o,`csz`,Z,`customWidth`),e.copyToObject(o,`h`,Z,`hidden`),e.copyToObject(o,`l`,Q,`outlineLevel`),e.copyToObject(o,`cl`,Z,`collapsed`),e.getAttribute(`bestFit`,Z)&&(o.bf=!0),e.copyToObject(o,`s`,Q,`style`)}}),c.registerVisitor({from:`oleObjects`,to:null,openTag:e=>{e.warn(`'OLE Objects' are not supported.`)}});let B=!1,V=!1,U=0,Ue=``,Ge=``,qe=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},Ye=new tr;return _r(h,e,c.createEventHandler(e,i,a),a,o,{onOpenTag:e=>{B=!0;let t=qe(e.name);t===`t`||t===`v`?U===0&&(V=!0):t===`rPh`||t===`phoneticPr`?U++:U===0&&Ye.onOpenTag(t,e.attributes)},onText:e=>{V&&(Ue+=e,Ye.onText(e))},onCloseTag:e=>{let t=qe(e.name);t===`t`||t===`v`?V=!1:t===`rPh`||t===`phoneticPr`?U>0&&U--:Ye.onCloseTag(t)},onEnd:()=>{if(!B)return;let e=Ye.take();B=!1,V=!1,U=0;let t=we(Ue);return Ue=``,Ge=t,e?{t:`r`,v:{type:`richText`,data:{runs:nr(e,s?.get(ur))}}}:n(t)},onError:e=>{}},s,n,()=>u,()=>Ge)},fr=class{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}},pr=(e,t,n)=>{if(e[0].value[0]===e[1].value[0])return t},mr=/^\s*TABLE\s*\(/i,hr={colStart:0,colEnd:0,rowStart:0,rowEnd:0},gr=e=>e===`1`||e===`true`,_r=(e,t,n,i,o,s,c,l,u,d)=>{let h=!1,g=[],_=c?.get(lr),ee=c?.get(ur),y=new Map,b=!1,te=[],x=!1,C=null,ne=null,w=null,T=null,ie=null,E=null,ae=c?.get(`richData`)??r.EmptyArray,D=null,oe=!1,se=S.normalizeA1ToR1C1,ce=a.createConflatingRanges(),O=new Map,le=[],ue=[],de=!1,k=!1,fe=null,pe=e=>{let t=c?.get(`metadata`)?.values;if(!t)return;let n=parseInt(e,10);if(!Number.isFinite(n)||n<1)return;let r=t[n-1]?.get(`XLRICHVALUE`);return r?.richValueIndex===void 0?void 0:ae[r.richValueIndex]},me=!1,he=a.createConflatingRanges(),ge,_e=!1,A=-1,j=-1,M=null,N=null,P=e=>({t:`r`,v:{type:`hyperlink`,data:{address:ge,friendly:e}}}),ve=null,ye=[],be=null,xe=-2,Se=0,F=``,Ce=``,I=``,L=``,R=``,z=``,we=``,Ee=``,De=``,Oe=``,ke=``,je=``,Me=``,Ne=``,Pe=!0,Fe=null,Ie=!1,Le=!1,Re=!1,ze=null,Be=0,Ve=e=>{let r=e.name,i=r.indexOf(`:`);if(i!==-1&&(r=r.slice(i+1)),Be++,Be%196608==0&&o?.(Be),N){let t=e.attributes;switch(r){case`v`:b=!0;break;case`f`:switch(x=!0,t.t??null){case null:case`normal`:break;case`shared`:let e=t.si;ne=t.ref,C=e;break;case`array`:ne=t.ref,fe=ne;break;case`dataTable`:{let e=((e,t,n)=>{let r=e.r1,i=gr(e.del1);if(!r&&!i)return null;let a=e.ref??S.cellToString({rowIndex:t,colIndex:n}),o=S.fastStringToRange(a);if(!o)return null;let s={ref:{rowStart:o.rowStart,colStart:o.colStart,rowEnd:o.rowEnd,colEnd:o.colEnd}},c=gr(e.dt2D);if(c||gr(e.dtr)?(r&&(s.rowInput=r),i&&(s.rowInputDeleted=!0)):(r&&(s.columnInput=r),i&&(s.columnInputDeleted=!0)),c){let t=e.r2;t&&(s.columnInput=t),gr(e.del2)&&(s.columnInputDeleted=!0)}return s})(t,A,j);e&&(ue.push(e),gr(t.ca)&&he.append(A,j));return}}let e=t.ca;e!==void 0&&(me=e===`1`);break;case`is`:_e=!0;return}_e&&!x&&s?.onOpenTag?.(e)}else if(h){if(r===`c`){N=e,ge=void 0;let t=e.attributes,n=t.r;j=n===void 0?j+1:S.fastStringToCol(n);let r=t.t;r===void 0?ve=null:(ve=r,ve===`str`&&(_e=!0));let i=t.s;i===void 0&&(ze!==null||Re)&&(i=`0`),i!==void 0&&(i=parseInt(i),Fe&&Fe.value===i&&Fe.colEnd+1===j?Fe.colEnd=j:(Fe={colStart:j,rowStart:A,colEnd:j,rowEnd:A,value:i},te.push(Fe))),fe=null,k=!1,oe=!1;let a=t.cm;de=a!==void 0&&(e=>{let t=c?.get(`metadata`)?.cells;if(!t)return!1;let n=parseInt(e,10);return!(!Number.isFinite(n)||n<1)&&!0===t[n-1]?.get(`XLDAPR`)?.fDynamic})(a);let o=t.vm;if(o!==void 0){let e=pe(o);if(p.isError(e)){let t=e.getCode();M={t:`e`,v:t},de&&t===p.Code.Spill&&(k=!0)}}}}else{if(Le&&r===`row`){h=!0;let t=e.attributes.r;if(A=t===void 0?A+1:parseInt(t)-1,j=-1,u?.()){let e=g[g.length-1];e&&e.max+1===A?e.max=A:g.push({min:A,max:A})}if(Se=0,Ce=e.attributes.customHeight,Ce!==void 0&&(Se|=fr.CustomHeight),Ce!==De&&(Pe=!0,De=Ce),F=e.attributes.ht,F!==void 0&&(Se|=fr.Ht),F!==Ee&&(Pe=!0,Ee=F),I=e.attributes.hidden,I!==void 0&&(Se|=fr.Hidden),I!==Oe&&(Pe=!0,Oe=I),R=e.attributes.s,R!==void 0&&(Se|=fr.S),R!==je&&(Pe=!0,je=R),L=e.attributes.customFormat,L!==void 0&&(Se|=fr.CustomFormat),L!==ke&&(Pe=!0,ke=L),z=e.attributes.outlineLevel,z!==void 0&&(Se|=fr.OutlineLevel),z!==Me&&(Pe=!0,Me=z),we=e.attributes.collapsed,we!==void 0&&(Se|=fr.Collapsed),we!==Ne&&(Pe=!0,Ne=we),Se!==0){if(xe+1!==A||Pe){let e=Ce!==void 0&&(Ce===`1`||Ce===`true`),t=L!==void 0&&(L===`1`||L===`true`);ze=t&&R!==void 0?R:null,t&&ze===null&&(ze=`0`),be={min:A,max:A,value:{sz:F===void 0?-1:parseFloat(F),csz:e,h:I!==void 0&&(I===`1`||I===`true`),s:ze===null?void 0:ze===`0`?0:parseInt(ze),l:z===void 0||z===`0`?0:parseInt(z),cl:we!==void 0&&(we===`1`||we===`true`)}},ye.push(be)}else be.max=A}xe=A,Pe=!1;return}if(r===`sheetData`&&(Le=!0),!Ie&&r===`sheetData`){Ie=!0;let e=t.cols,n=e?e.length:0;for(let t=0;!Re&&t<n;t++)e[t].v.s&&(Re=!0)}n?.onOpenTag?.(e)}},B=t=>{let r=t.name;if(r===`sheetData`&&(Le=!1),!x||r!==`c`&&r!==`f`||(C&&(T=O.get(C)??null),T&&(ge=(e=>{if(e.length<11||(32|e.charCodeAt(0))!=104||!/^HYPERLINK\(/i.test(e))return;let t=1,n=!1,r=10;for(;r<e.length&&t>0;r++){let i=e.charCodeAt(r);n?i===34&&(e.charCodeAt(r+1)===34?r++:n=!1):i===34?n=!0:i===40?t++:i===41&&t--}if(t!==0||e.slice(r).trim().length>0)return;let i=/^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);return i?i[1].replace(/""/g,`"`):null})(T[2]),ce.append(A,j,T),me&&he.append(A,j)),fe!==null&&le.push([fe,de?k?`error`:`dynamic`:`fixed`]),x=!1,T=null,C=null,ne=null,b=!1,me=!1,fe=null,de=!1,k=!1),N){let n=r.indexOf(`:`);if(n!==-1&&(r=r.slice(n+1)),_e){if(r===`is`||r===`v`){let t=s?.onEnd?.();t==null||oe&&d?.()===``||e.pushAt(A,j,ge!==void 0&&typeof t==`number`?P(d?.()??``):typeof t==`number`?``+t:t)}else r!==`f`&&s?.onCloseTag?.(t)}b&&=!1,r===`c`&&(N=null,_e=!1)}else{if(h)return h=!1,void(Fe=null);n?.onCloseTag?.(t)}},V=t=>{let r=t.trim();if(b){switch(M=null,ve){case null:case`n`:M=m.flushSubnormal(parseFloat(r));break;case`b`:M=r===`1`||r===`true`;break;case`s`:{let e=parseInt(r,10),t=y.get(e);if(t===void 0){let n=_?.get(e);t=n?nr(n,ee):null,y.set(e,t)}M=t?{t:`r`,v:{type:`richText`,data:{runs:t}}}:r;break}case`d`:{let e=((e,t=!1)=>{if(!e)return null;let n=Zn.exec(e);if(n){let[,e,t,r]=n;return e===void 0&&t===void 0&&r===void 0?null:(3600*parseFloat(e??`0`)+60*parseFloat(t??`0`)+parseFloat(r??`0`))/86400}let r=Xn.exec(e);if(!r)return null;let[,i,a,o,s,c,l,u]=r;if(i===void 0&&s===void 0)return null;let d=0;if(i!==void 0){let e=parseInt(i,10),n=parseInt(a,10),r=parseInt(o,10);if(n<1||n>12||r<1||r>31)return null;let s=Qn(e,n,r)-$n;if(d=s<=60?s-1:s,t&&(d-=1462),d<0)return null}return s!==void 0&&(d+=(3600*parseInt(s,10)+60*parseInt(c,10)+(l===void 0?0:parseInt(l,10))+(u===void 0?0:parseFloat(u)))/86400),d})(r,!0===c?.get(cr));e===null?l&&(i?.(`Date '${r}' in cell ${S.cellToString({colIndex:j,rowIndex:A})} is not a date this workbook can hold; kept as text.`,void 0,`xlsx.cell.isoDateText`),M=``+l(r)):M=e;break}case`e`:if(r===`#VALUE!`){let e=N.attributes.vm;if(e!==void 0){let t=pe(e);if(p.isError(t)){M={t:`e`,v:t.getCode()};break}if(v.isJSON(t)){M={t:`r`,v:t};break}}}let e=p.getBuiltInByLabel(r);e?M={t:`e`,v:e.getCode()}:(M=r,i?.(`Unknown formula error '${r}' in cell ${S.cellToString({colIndex:j,rowIndex:A})}`));break;case`str`:case`inlineStr`:_e=!0}M!==null&&e.pushAt(A,j,ge===void 0||typeof M!=`number`&&typeof M!=`boolean`?M:P(M))}let a=C!==null;if(C){if(ie===C)T=E;else{if(T=O.get(C)??null,!T){let e=[];w=se(r,A,j,e),T=[w,e,r],O.set(C,T)}ie=C,E=T}C=null}if(x){let e=r,t=a?void 0:c?.get(sr);if(t){let n=(e=>{if(e.length<Ln.length||e.slice(0,Ln.length).toUpperCase()!==Rn)return Bn;let t=Hn(e,Ln.length);if(t===null||e.charCodeAt(t.end)!==41||e.charCodeAt(t.end+1)!==44||e.charCodeAt(e.length-1)!==41)return Bn;let n=t.value;return n.toUpperCase()===zn?Vn:n.length===0?Bn:{kind:`formula`,formula:n}})(r);n.kind!==`none`&&(D??=new Wn(t),n.kind===`spilled`?oe=D.placeholder(A,j):D.anchor(A,j,n.formula)&&(e=n.formula,me||=(e=>Un(e).some(e=>Ae(e)||!0===re.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)))}if(oe)me=!1;else{let t=[];w=se(e,A,j,t),T=[w,t,e]}}_e?s?.onText?.(t):h||n?.onText?.(r)},H={r:void 0,t:void 0,s:void 0,cm:void 0,vm:void 0},He={name:`c`,attributes:H,isSelfClosing:!1},U={t:void 0,si:void 0,ref:void 0,ca:void 0},Ue={name:`f`,attributes:U,isSelfClosing:!1},We={name:`v`,attributes:{},isSelfClosing:!1},W={r:void 0,s:void 0,ht:void 0,hidden:void 0,collapsed:void 0,customHeight:void 0,customFormat:void 0,outlineLevel:void 0},Ge={name:`row`,attributes:W,isSelfClosing:!1},Ke=Mn.NEED_MORE,G=Mn.NOT_HANDLED,qe=Mn.decodeText,Je=!1,Ye=(e,t,n,r)=>{for(;;){let i=0;for(;t<n&&((i=e.charCodeAt(t))===32||i===9||i===10||i===13);)t++;if(t>=n)return Ke;if(i===62)return Je=!1,t+1;if(i===47)return t+1>=n?Ke:e.charCodeAt(t+1)===62?(Je=!0,t+2):G;let a=t;for(;t<n&&(i=e.charCodeAt(t))!==61;){if(i===62||i===47||i===32||i===9||i===10||i===13)return G;t++}if(t+1>=n)return Ke;let o=t-a,s=e.charCodeAt(t+1);if(s!==34&&s!==39)return G;let c=t+2,l=c;for(;l<n&&(i=e.charCodeAt(l))!==s;){if(i===38||i<32)return G;l++}if(l>=n)return Ke;t=l+1;let u=e.charCodeAt(a);if(r===2)switch(o){case 1:u===114?W.r=e.slice(c,l):u===115&&(W.s=e.slice(c,l));break;case 2:e.startsWith(`ht`,a)&&(W.ht=e.slice(c,l));break;case 6:e.startsWith(`hidden`,a)&&(W.hidden=e.slice(c,l));break;case 9:e.startsWith(`collapsed`,a)&&(W.collapsed=e.slice(c,l));break;case 12:e.startsWith(`customHeight`,a)?W.customHeight=e.slice(c,l):e.startsWith(`customFormat`,a)?W.customFormat=e.slice(c,l):e.startsWith(`outlineLevel`,a)&&(W.outlineLevel=e.slice(c,l))}else if(r===0)o===1?u===114?H.r=e.slice(c,l):u===116?H.t=e.slice(c,l):u===115&&(H.s=e.slice(c,l)):o===2&&e.charCodeAt(a+1)===109&&(u===99?H.cm=e.slice(c,l):u===118&&(H.vm=e.slice(c,l)));else if(o===1)u===116&&(U.t=e.slice(c,l));else if(o===2){let t=e.charCodeAt(a+1);u===115&&t===105?U.si=e.slice(c,l):u===99&&t===97&&(U.ca=e.slice(c,l))}else o===3&&e.startsWith(`ref`,a)&&(U.ref=e.slice(c,l))}},Xe=(e,t,n)=>e.charCodeAt(t+1)===47&&e.charCodeAt(t+2)===n&&e.charCodeAt(t+3)===62;return{...n,onEnd:()=>{if(u?.()){let e=0,t=[],n=(e,t)=>({min:e,max:t,value:{sz:-1,csz:!1,h:!0,s:void 0,l:0,cl:!1}});for(let r of g)r.min>e&&t.push(n(e,r.min-1)),e=Math.max(e,r.max+1);e<=1048575&&t.push(n(e,1048575)),t.length>0&&(ye.push(...t),ye.sort((e,t)=>e.min-t.min))}ye.length>0&&(t.rows=S.runsToRefs(ye,!1));let r=ce.done(pr);r=((e,t)=>{let n=null;for(let t=0;t<e.length;t++){let r=e[t];if(!mr.test(r.value[2]))continue;n??=new Map;let i=r.value[0],a=n.get(i);a?a.push(r):n.set(i,[r])}if(n===null)return e;let r=new Set;for(let e of n.values()){let n=e[0],i={rowStart:n.rowStart,colStart:n.colStart,rowEnd:n.rowEnd,colEnd:n.colEnd},a=0;for(let t=0;t<e.length;t++){let n=e[t];n.rowStart<i.rowStart&&(i.rowStart=n.rowStart),n.colStart<i.colStart&&(i.colStart=n.colStart),n.rowEnd>i.rowEnd&&(i.rowEnd=n.rowEnd),n.colEnd>i.colEnd&&(i.colEnd=n.colEnd),a+=(n.rowEnd-n.rowStart+1)*(n.colEnd-n.colStart+1)}if(a!==(i.rowEnd-i.rowStart+1)*(i.colEnd-i.colStart+1))continue;let o=Yn(S.resolveRelativeToA1(n.value[1],i.rowStart,i.colStart),i);if(o){t.push(o);for(let t=0;t<e.length;t++)r.add(e[t])}}return r.size===0?e:e.filter(e=>!r.has(e))})(r,ue);let i=r.length;if(i>0||ue.length>0){let e=Array(i);for(let t=0;t<i;t++){let n=r[t],i=S.rangeToString(n),a=n.value[1],o=S.resolveRelativeToA1(a,n.rowStart,n.colStart);e[t]=[i,o]}for(let t=0;t<ue.length;t++){let n=ue[t],r=n.ref;e.push([S.cellToString({rowIndex:r.rowStart,colIndex:r.colStart}),Te(n)]),le.push([S.rangeToString(r),`dynamic`])}t.formulas=e}let o=he.done(!0),s=o.length;if(s>0){let e=Array(s);for(let t=0;t<s;t++){let n=o[t],r=S.rangeToString(n);e[t]=r}t.volatile=e}D&&le.push(...D.getFormulaArray()),le.length>0&&(t.formulaArray=[...le]);let c=te.length;if(c>0){te.sort(a.createRangeComparator(f.Axis.Column));let e=te[0],n=e.colStart,r=e.colEnd,i=e.rowEnd,o=e.value,s=[];s.push(e);let l=null;for(let t=1;t<c;t++)l=te[t],o!==l.value||n!==l.colStart||r!==l.colEnd||i+1!==l.rowEnd?(s.push(l),e=l,n=e.colStart,r=e.colEnd,i=e.rowEnd,o=e.value):(i=l.rowEnd,e.rowEnd=i);let u=s.length,d=Array(u);for(let e=0;e<u;e++){let t=s[e],n=S.rangeToString(t);d[e]=[n,t.value]}t.directStyles=d}let l=e.build();l&&(t.data=l.tuples),n?.onEnd?.()},onOpenTag:Ve,onCloseTag:B,onText:V,elementScanners:[{name:`c`,scan:(e,t,n)=>{if(!h||N!==null)return G;H.r=H.t=H.s=H.cm=H.vm=void 0;let r=Ye(e,t+2,n,0);if(r<0)return r;let i=H.t;if(H.r===void 0||i===`str`||i===`inlineStr`)return G;let a=!1,o=-1,s=-1,c=-1,l=-1,u=r;if(!Je)for(U.t=U.si=U.ref=U.ca=void 0;;){let t=e.indexOf(`<`,r);if(t===-1||t+3>=n)return Ke;for(let n=r;n<t;n++){let t=e.charCodeAt(n);if(t!==32&&t!==9&&t!==10&&t!==13)return G}let i=e.charCodeAt(t+1),d=e.charCodeAt(t+2);if(i===47){if(!Xe(e,t,99))return G;u=t+4;break}if(i===102&&!a&&c===-1&&(d===32||d===62||d===47)){if(a=!0,r=Ye(e,t+2,n,1),r<0)return r;if(U.t===`dataTable`)return G;if(Je)continue;let i=e.indexOf(`<`,r);if(i===-1||i+3>=n)return Ke;if(!Xe(e,i,102))return G;o=r,s=i,r=i+4}else if(i===118&&d===62&&c===-1){let i=e.indexOf(`<`,t+3);if(i===-1||i+3>=n)return Ke;if(!Xe(e,i,118))return G;c=t+3,l=i,r=i+4}else return G}return Ve(He),a&&(Ve(Ue),s>o&&V(qe(e.slice(o,s))),B(Ue)),c!==-1&&(Ve(We),l>c&&V(qe(e.slice(c,l))),B(We)),B(He),u}},{name:`row`,openTag:Ge,scan:(e,t,n)=>{if(!Le||h||N!==null)return G;W.r=W.s=W.ht=W.hidden=W.collapsed=W.customHeight=W.customFormat=W.outlineLevel=void 0;let r=Ye(e,t+4,n,2);return r<0?r:Je||W.r===void 0?G:(Ve(Ge),r)}}]}},vr=new Map([[`urn:schemas-microsoft-com:vml`,`v`],[`urn:schemas-microsoft-com:office:office`,`o`],[`urn:schemas-microsoft-com:office:excel`,`x`]]),yr=[...vr].map(([e,t])=>` xmlns:${t}="${e}"`).join(``),br=/<(\/?)([A-Za-z_][\w.-]*(?::[\w.-]+)?)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g,xr=/(\s+)([A-Za-z_][\w.-]*(?::[\w.-]+)?)(\s*=\s*)("[^"]*"|'[^']*')/g,Sr=/\sxmlns(?::([\w.-]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function Cr(e){if(!e||!(e=>{let t;for(Sr.lastIndex=0;(t=Sr.exec(e))!==null;){let e=vr.get(t[2]??t[3]??``);if(e&&e!==(t[1]??``))return!0}return!1})(e))return e;let t=[],n=(e,n,r)=>{let i=e.indexOf(`:`);if(i===-1&&r)return null;let a=i===-1?``:e.substring(0,i);if(a===`xmlns`)return null;let o=((e,n)=>{let r=n?.get(e);if(r!==void 0)return r;for(let n=t.length-1;n>=0;n--){let r=t[n].bindings.get(e);if(r!==void 0)return r}})(a,n),s=o===void 0?void 0:vr.get(o);return s?`${s}:${i===-1?e:e.substring(i+1)}`:null},r=!1,i=!1,a=e.replace(br,(e,a,o,s,c)=>{if(a){let r=t[t.length-1],i=n(o,null,!1);return r&&r.name===o&&(r.nested>0?r.nested--:t.pop()),i?`</${i}>`:e}let l=(e=>{let t,n=null;for(Sr.lastIndex=0;(t=Sr.exec(e))!==null;)(n??=new Map).set(t[1]??``,t[2]??t[3]??``);return n})(s);l?.forEach((e,t)=>{let n=[...vr].find(([,e])=>e===t)?.[0];n&&n!==e&&(r=!0)});let u=n(o,l,!1),d=s.replace(xr,(e,t,r,i,a)=>{if(r===`xmlns`||r.startsWith(`xmlns:`)){let t=a.slice(1,-1);return vr.has(t)?``:e}let o=n(r,l,!0);return o?`${t}${o}${i}${a}`:e});if(i||(i=!0,d=d.replace(/\s+$/,``)+yr),!c){let e=t[t.length-1];l?t.push({name:o,bindings:l,nested:0}):e&&e.name===o&&e.nested++}return`<${u??o}${d}${c}>`});return r?e:a}var wr={creator:`author`,category:`category`,description:`comments`,contentStatus:`contentStatus`,created:`creationDate`,keywords:`keywords`,lastModifiedBy:`lastAuthor`,modified:`lastModifiedDate`,lastPrinted:`lastPrinted`,revision:`revisionNumber`,subject:`subject`,title:`title`},Tr={Company:`company`,Manager:`manager`},Er={lpwstr:w.Type.String,lpstr:w.Type.String,bstr:w.Type.String,i1:w.Type.Number,i2:w.Type.Number,i4:w.Type.Number,i8:w.Type.Number,int:w.Type.Number,ui1:w.Type.Number,ui2:w.Type.Number,ui4:w.Type.Number,ui8:w.Type.Number,uint:w.Type.Number,r4:w.Type.Float,r8:w.Type.Float,decimal:w.Type.Float,bool:w.Type.Boolean,filetime:w.Type.Date,date:w.Type.Date},Dr=e=>{let t=e.kind?Er[e.kind]:void 0;if(!t)return null;let n=e.value.trim(),r;if(t===w.Type.String)r={key:e.key,type:t,value:e.value};else if(t===w.Type.Boolean){if(n!==`true`&&n!==`false`&&n!==`1`&&n!==`0`)return null;r={key:e.key,type:t,value:n===`true`||n===`1`}}else if(t===w.Type.Date){let i=new Date(n);if(!n||isNaN(i.getTime()))return null;r={key:e.key,type:t,value:i.toISOString()}}else{let i=Number(n);if(!n||!Number.isFinite(i))return null;let a=t===w.Type.Number&&i>=-2147483648&&i<=2147483647;r={key:e.key,type:a?t:w.Type.Float,value:i}}return e.linkTarget&&(r.linkTarget=e.linkTarget),r},Or=`hiddenXfs`,kr=e=>(Array.isArray(e)?e[1]:e?.v)?.s,Ar=e=>{if(!e||e.length===0)return!1;let t=S.refsToRuns(e,!0),n=0;for(let e of t){if(e.min>n||e.value?.s===void 0)return!1;n=Math.max(n,e.max+1)}return n>he},jr=(e,t)=>{e.protection={...e.protection,showFormulas:t}},Mr=`pivotButtonXfs`,Nr=(e,n)=>{let r=e.styles?.direct;if(!r||r.length===0)return;let i=null,a=new Map,o=new Map,s=(e,s,c,l)=>{let u=``;l&&(u=o.get(l)??t.JSONStableStringify(l),o.set(l,u));let d=`${e}|${s??``}|${c??``}|${u}`,f=a.get(d);if(f!==void 0)return f;let p=r[e],m=p?Fr(p,s,c,l):null,h=n?.get(e);return f=m===p?e:m||h!==void 0?((e,a)=>{if(!i){i=new Map;for(let e=0;e<r.length;e++){let a=t.JSONStableStringify(r[e]),o=n?.get(e);o!==void 0&&(a+=`|${o}`),i.has(a)||i.set(a,e)}}let o=t.JSONStableStringify(e);a!==void 0&&(o+=`|${a}`);let s=i.get(o);return s===void 0&&(s=r.length,r.push(e),i.set(o,s),a!==void 0&&n.set(s,a)),s})(m??{},h):null,a.set(d,f),f},c=new Map((e.pivotCaches??[]).map(e=>[e.cacheId,e.fields]));for(let t of e.sheets??[]){let e=E(t),n=e?.pivotTables,r=e?.directStyles;if(!e||!n||n.length===0||!r||r.length===0)continue;let i=r,a=!1;for(let e of n){let t=Pr(e,c.get(e.cacheId));if(!t)continue;let n=[];for(let e of i){let r=S.fastStringToRange(e[0]),i=Hr(r,t.coords);if(!i){n.push(e);continue}a=!0;for(let t of Ur(r,i))n.push([S.rangeToString(t),e[1]]);let{rowIndex:o,colIndex:c}=t.origin;for(let r=i.rowStart;r<=i.rowEnd;r++){let a=i.colStart,l=null,u=e=>{l!==null&&n.push([S.rangeToString({rowStart:r,rowEnd:r,colStart:a,colEnd:e}),l])};for(let n=i.colStart;n<=i.colEnd;n++){let{numberFormat:d,labelIndent:f,user:p}=t.formats.formatAt(r-o,n-c),m=s(e[1],d,f,p);n!==i.colStart&&m===l||(n!==i.colStart&&u(n-1),a=n,l=m)}u(i.colEnd)}}i=n}a&&(e.directStyles=i)}},Pr=(e,t)=>{let n=x(e,t);if(!n||!e.location)return null;let r=S.fastStringToRange(e.location),i={rowIndex:r.rowStart-n.top,colIndex:r.colStart};return i.rowIndex<0||r.rowEnd!==i.rowIndex+n.rows-1?null:{coords:{rowStart:i.rowIndex,colStart:i.colIndex,rowEnd:r.rowEnd,colEnd:i.colIndex+n.columns-1},origin:i,formats:n}},Fr=(e,t,n,r)=>{let i=e,a=r?.numberFormat??t??0;if(e.numberFormat!==void 0&&Ir(e.numberFormat,a)){let{numberFormat:e,...t}=i;i=t}let o=i.alignment;if(n!==null&&o?.horizontal===d.HorizontalAlignment.Left&&(o.indent??0)===n){let{horizontal:e,indent:t,...n}=o,{alignment:r,...a}=i;i=Vr(n)?a:{...a,alignment:n}}if(r){let{numberFormat:e,...t}=r;if(i=zr(i,t),i.alignment&&Vr(i.alignment)){let{alignment:e,...t}=i;i=t}}if(i===e)return e;for(let e of Object.keys(i))if(i[e]!==void 0&&(e!==`named`||i.named!==l.BuiltInName.Normal))return i;return null},Ir=(e,t)=>e===t||u.toBuiltInID(e)===u.toBuiltInID(t),Lr=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Rr=(e,n)=>!(!Lr(e)||!Lr(n))&&(e.patternType===`solid`&&n.patternType===`solid`?e.foreground===n.foreground:t.JSONStableStringify(e)===t.JSONStableStringify(n)),zr=(e,t)=>{let n=null,r=(t,r)=>{n??={...e},r===void 0?delete n[t]:n[t]=r};for(let n of Object.keys(e)){let i=e[n],a=t[n];if(a!==void 0&&i!==void 0){if(n===`fill`)Rr(i,a)&&r(n);else if(Lr(i)&&Lr(a)){let e=zr(i,a);e!==i&&r(n,Object.keys(e).some(t=>e[t]!==void 0)?e:void 0)}else i===a&&r(n)}}return n??e},Br={vertical:d.VerticalAlignment.Bottom,relativeIndent:0,overflow:d.Overflow.Visible,rotation:0},Vr=e=>Object.keys(e).every(t=>e[t]===void 0||Br[t]===e[t]),Hr=(e,t)=>{let n=Math.max(e.rowStart,t.rowStart),r=Math.min(e.rowEnd,t.rowEnd),i=Math.max(e.colStart,t.colStart),a=Math.min(e.colEnd,t.colEnd);return n<=r&&i<=a?{rowStart:n,rowEnd:r,colStart:i,colEnd:a}:null},Ur=(e,t)=>{let n=[];return e.rowStart<t.rowStart&&n.push({...e,rowEnd:t.rowStart-1}),e.rowEnd>t.rowEnd&&n.push({...e,rowStart:t.rowEnd+1}),e.colStart<t.colStart&&n.push({rowStart:t.rowStart,rowEnd:t.rowEnd,colStart:e.colStart,colEnd:t.colStart-1}),e.colEnd>t.colEnd&&n.push({rowStart:t.rowStart,rowEnd:t.rowEnd,colStart:t.colEnd+1,colEnd:e.colEnd}),n},Wr=`xfComplements`,Gr=(e,t)=>{if(typeof e==`string`)return void t.push(e);let n=Array.isArray(e)?e:[e];for(let e=0;e<n.length;e++){let r=S.rangeToString(n[e]);r&&t.push(r)}},Kr=e=>{let t=Array.isArray(e)?e[1]:e.v;if(!t||!(`s`in t))return;let n=t.s;return delete t.s,n},qr=(e,t,n,r)=>{if(!e)return;let i=t?2:1,a=t?n.rowStart:n.colStart,o=t?n.rowEnd:n.colEnd,s,c=-1;for(let n of e){let e=S.refToRun(n,t),l=Kr(n);e&&l!==void 0?l!==c||(t?s.colEnd:s.rowEnd)+1!==e.min?(s={colStart:t?e.min:a,rowStart:t?a:e.min,colEnd:t?e.max:o,rowEnd:t?o:e.max,value:{kind:i,index:l}},c=l,r.push(s)):t?s.colEnd=e.max:s.rowEnd=e.max:c=-1}},Jr={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.macroEnabled.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.binary.macroEnabled.main":`workbooks`,"application/vnd.ms-excel.addin.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":`workbooks`,"application/vnd.ms-excel.template.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":`sheets`,"application/vnd.ms-excel.worksheet":`sheets`,"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":`charts`,"application/vnd.ms-excel.chartsheet":`charts`,"application/vnd.ms-excel.macrosheet+xml":`macros`,"application/vnd.ms-excel.macrosheet":`macros`,"application/vnd.ms-excel.intlmacrosheet+xml":`macros`,"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":`dialogs`,"application/vnd.ms-excel.dialogsheet":`dialogs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":`strs`,"application/vnd.ms-excel.sharedStrings":`strs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":`styles`,"application/vnd.ms-excel.styles":`styles`,"application/vnd.openxmlformats-package.core-properties+xml":`coreprops`,"application/vnd.openxmlformats-officedocument.custom-properties+xml":`custprops`,"application/vnd.openxmlformats-officedocument.extended-properties+xml":`extprops`,"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":`comments`,"application/vnd.ms-excel.comments":`comments`,"application/vnd.ms-excel.threadedcomments+xml":`threadedcomments`,"application/vnd.ms-excel.person+xml":`people`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":`metadata`,"application/vnd.ms-excel.sheetMetadata":`metadata`,"application/vnd.ms-excel.featurepropertybag+xml":`featurePropertyBag`,"application/vnd.ms-excel.externalLink":`links`,"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":`links`,"application/vnd.openxmlformats-officedocument.theme+xml":`themes`},Yr=T({readXLSX:()=>ei}),Xr=e=>e.startsWith(`/`)?e.slice(1):e,Zr=[208,207,17,224,161,177,26,225],Qr=/^xl\/worksheets\/[^/]+\.xml$/i,$r=e=>typeof e==`string`?e:(e?.runs??[]).map(e=>e.text??``).join(``),ei=async(a,c)=>{let{password:u,onVBA:d,profile:f,calcOnLoad:p=`auto`,createWorkbookOptions:m={},..._}=c??{};await te.load();let ee=!!m.origin&&typeof m.origin!=`string`,v=f?new At(typeof f==`function`?f:void 0):null,y=[],b=(e,t,n)=>{y.push([e,t??``,n])},x={onWarning:b},w=c?.progress,T=w?.onProgress?w.onProgress.bind(w):void 0,D=a.byteLength,se=0,ce=0,ue=T?e=>{if(se<=0)return;ce+=e;let t=Math.min(D,Math.round(ce/se*D));T(t,D)}:void 0,k=e(()=>import(`./cUY9GpQPVTLSprfW.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url),fe=null;try{fe=new DOMParser}catch{}let pe=null;try{pe=new XMLSerializer}catch{}let j,P,ye,be=null;fe||(be=e(()=>import(`./J_xJVgE7YlmeU-ZO.js`).then(e=>ie(e.default,1)),__vite__mapDeps([16,14]),import.meta.url));try{let[e,t]=await Promise.all([be,k]);j=new t.DOMTransformer,P=fe??new e.DOMParser,ye=pe??new e.XMLSerializer}catch(e){throw Error(`Unable to load XLSX parser.`,{cause:e})}let xe=e=>ye.serializeToString(e);if((e=>{if(e.byteLength<Zr.length)return!1;let t=new Uint8Array(e,0,Zr.length);return Zr.every((e,n)=>t[n]===e)})(a))throw new s(`This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.`);let F;try{F=await kt.create(a)}catch(e){throw new s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`,{cause:e})}v?.mark(`zip-open`);try{if(!F.has(`[Content_Types].xml`))throw new s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let a=e=>{let t=F.getEntry(e);return t?{content:t}:void 0},o={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],metadata:[],people:[],featurePropertyBag:[],overrides:{},sst:``,style:``,defaults:{}};{let e=((e,t)=>({onOpenTag:t=>{let n=(e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)})(t.name),r=t.attributes;if(n===`Override`){let t=r.ContentType,n=r.PartName;if(!t||!n)return;e.overrides[n.startsWith(`/`)?n.slice(1):n]=t;let i=Jr[t],a=i?e[i]:void 0;Array.isArray(a)&&a.push(n)}else if(n===`Default`){let t=r.Extension,n=r.ContentType;t&&(e.defaults[t.toLowerCase()]=n)}},onEnd:()=>{e.sst=e.strs.length>0?e.strs[0]:``,e.style=e.styles.length>0?e.styles[0]:``},onError:e=>{t?.(`Error parsing content types: ${e?.message??e}`)}}))(o,e=>{y.push([e,`[Content_Types].xml`])}),t=await F.getTextStream(`[Content_Types].xml`);if(!t)throw Error(`Error parsing content types: '[Content_Types].xml'`);try{await xn.parseStream(t,e,{xmlns:!1})}catch(e){throw Error(`Error parsing content types: '[Content_Types].xml'`,{cause:e})}ee&&await F.getBuffer(`[Content_Types].xml`)}v?.mark(`content-types`);let c=o.sst,u=new Set;for(let e of o.sheets)u.add(Xr(e));c&&u.add(Xr(c));for(let e of u)se+=F.uncompressedSize(e);if(await F.prefetch(e=>!u.has(e)&&!Qr.test(e)),v?.mark(`prefetch-side-parts`),o.workbooks.length===0){let e=Se(`_rels/.rels`,a,P,j,x);if(e){for(let t of e.values())if(t.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`&&t.target){o.workbooks.push(t.target);break}}}if(o.workbooks.length===0)throw new s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let _=m?.resources??new h,te=_.beginPersist(),ie={},ce=new Set,k=new Map;k.set(`parseInlineDxf`,e=>{if(!e)return;let t=P.parseFromString(`<dxf xmlns:x14="${Ne}" xmlns:xm="${N}">${e}</dxf>`,`text/xml`)?.documentElement;if(!t)return;let n=j.parseDxf(t,``,x);return Object.keys(n).length>0?n:void 0});let fe=rt(`metadata`,o,a,P,j,x).entries().next()?.value?.[1]?.metadata;fe&&k.set(`metadata`,fe),k.set(or,ve());let pe=new Map,ye=[],be=new Set,I=e=>{be.add(Xr(e))},L=(e,t=pe)=>{let n=e.lastIndexOf(`/`),r=e.substring(0,n+1)+`_rels/`+e.substring(n+1,e.length)+`.rels`,i=t.get(r);return i||(i=Se(r,a,P,j,B),t.set(r,i)),i},R=(e,t,n,r=pe)=>{let i=L(t,r).get(e),o=i?.target;if(!o)return null;if(i.targetMode===`External`){if(!n)return i.target;let e=_.add({source:{external:i.target}});return e.addReference(ie),ce.add(e),te.toResourceId(e)}let s=t.lastIndexOf(`/`),c=t.substring(0,s+1);o.startsWith(`/`)||(o=c+o),o=oe(o);let l=j?.getVisitorParamsState().get(`dxfs`),u=r.get(o);if(!u){if(i.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`){let e={};u=e,ye.push((async()=>{let t=dr(e,(e,t)=>t===`legacyDrawing`?Ae(e,o):t===`formControl`?je(e,o):t===`part`?Me(e,o):R(e,o,t===`resource`)??null,W,l,()=>{},(e,t,n)=>{b(e,t?`${t} (${o})`:o,n)},void 0,k),n=await F.getTextStream(o,ue);if(n)try{await xn.parseStream(n,t,{xmlns:!1,lean:!0})}catch(e){throw Error(`Error parsing sheet: '${o}'`,{cause:e})}let i=L(o,r);if(i){De(e,o,i,r),Ye(e),et(e);let t=[];i.forEach((e,n)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`)return;let r=Me(n,o,e.type,e=>e!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`);if(!r?.xml)return;let i=/<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0]??``,a=parseInt(/\scacheId="(\d+)"/.exec(i)?.[1]??``,10);if(isNaN(a))return void y.push([`Pivot table '${r.name}' names no cache and was dropped.`,o]);let s=/\sname="([^"]*)"/.exec(i)?.[1],c=Ue(r.xml);if(!c)return void y.push([`Pivot table '${r.name}' states no location and was dropped.`,o]);let l=j?.getVisitorParamsState(),u=Pe(l?.get(`numFmts`),l?.get(`dxfs`)),d=le(r.xml,u),f=d?void 0:de(r.xml,u);t.push({...s?{name:qe(s)}:{},cacheId:a,location:c,part:r,...f?{partFormats:f}:{},...d})}),t.length>0&&(e.pivotTables=t)}})())}else if(i.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`){let e=A(o,a,P,j,B);if(e&&Object.keys(e).length!==0){let t=e,n=t.__bookRelId,i=t.__absoluteUrlRelId;delete t.__bookRelId,delete t.__absoluteUrlRelId;let a=[];L(o,r)?.forEach((e,t)=>{if(e.targetMode===`External`&&e.type&&e.target){let r={type:e.type,target:e.target};t===n?r.role=`book`:t===i&&(r.role=`absoluteUrl`),a.push(r)}}),a.sort((e,t)=>(e.role===`book`?0:1)-(t.role===`book`?0:1)),t.sources=a,I(o),u=t}else u=null}else u=n?ot(o,a,(e,t)=>{let n=_.add({source:{buffer:e}});return n.addReference(ie),ce.add(n),te.toResourceId(n)},B):A(o,a,P,j,B)}return u},Te=(e,t)=>{if(!e)return null;let n=L(t,pe)?.get(e);if(!n?.target||n.targetMode===`External`)return null;let r=n.target;return r.startsWith(`/`)||(r=t.substring(0,t.lastIndexOf(`/`)+1)+r),oe(r)},De=(e,t,n,i)=>{let a=[],o=new Map,s=[];n.forEach((e,n)=>{if(e.type!==`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`)return;let r=R(n,t,!1,i)?.comments;if(!r)return;for(let e=0;e<r.length;e++){let t=r[e];if(!t?.v?.id)continue;let{parentId:n,done:i,content:c,...l}=t.v,u={...l,content:$r(c)};n?s.push({parentId:n,json:u}):(i&&(u.done=!0),o.set(u.id,u),a.push({r:t.r,v:u}))}let c=Te(n,t);c&&I(c)});for(let e=0;e<s.length;e++){let{parentId:t,json:n}=s[e],r=o.get(t);r&&(r.replies??=[]).push(n)}let c=[];if(n.forEach((e,n)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`)return;let a=R(n,t,!1,i),s=a?.comments;if(!s)return;let l=a?.authors;for(let e=0;e<s.length;e++){let t=s[e];if(!t?.r)continue;let n=l&&t.v.authorId!==void 0?l[t.v.authorId]:void 0;if(n&&n.startsWith(`tc=`)){if(o.has(Ve(n.substring(3))))continue;n=void 0}let i={id:r.uuidV4().toUpperCase(),asNote:!0,content:t.v.content??``},a=n?Be({displayName:n}):void 0;a&&(i.personId=a.id),c.push({r:t.r,v:i})}let u=Te(n,t);u&&I(u)}),a.length===0&&c.length===0)return;let l=[...a,...c],u=e.legacyDrawing;if(u?.xml){let{rest:t,notes:n}=ge(u.xml);if(n.length>0){let r=new Map;for(let e=0;e<n.length;e++){let t=n[e];r.set(S.cellToString({rowIndex:t.row,colIndex:t.col}),t)}for(let e=0;e<l.length;e++){let t=l[e],n=r.get(String(t.r).toUpperCase());if(!n||(r.delete(String(t.r).toUpperCase()),!t.v.asNote))continue;let i=ae(n.xml),a={};if(i.anchor){let[e,t,r,o,s,c,l,u]=i.anchor;a.anchor={tl:{c:e-n.col,x:t,r:r-n.row,y:o},br:{c:s-n.col,x:c,r:l-n.row,y:u}}}else i.bounds&&(a.bounds=i.bounds);i.style.fill&&(a.fill=i.style.fill),i.style.stroke&&(a.stroke=i.style.stroke),i.xml&&(a.xml=i.xml),(a.anchor||a.bounds||a.fill||a.stroke||a.xml)&&(t.v.box=a),i.visible&&(t.v.shown=!0),i.alt&&(t.v.description=i.alt)}let i=[];r.forEach(e=>{i.push(e.xml)});let a=_e(t,i);a?u.xml=a:delete e.legacyDrawing}}e.comments=l},Ae=(e,t)=>{let n=Te(e,t);if(!n)return null;let r=a(Xr(n));if(!r)return null;let i={xml:Cr(new TextDecoder(`utf-8`).decode(r.content))},o=[];return L(n,pe)?.forEach((e,t)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`)return;let r=R(t,n,!0);typeof r==`number`&&o.push({id:t,resId:r})}),o.length>0&&(i.images=o),I(n),i},je=(e,t)=>{let n=Te(e,t);if(!n)return null;let r=A(n,a,P,j,B)?.formControl??null;return r&&I(n),r},Me=(e,t,n,r,i=new Set)=>{let s=Te(e,t);if(!s||i.has(s))return null;let c=n??L(t,pe)?.get(e)?.type;if(!c)return null;let l=a(Xr(s));if(!l)return null;i.add(s);let u=s.substring(s.lastIndexOf(`/`)+1),d=o.overrides[Xr(s)]??o.defaults[u.substring(u.lastIndexOf(`.`)+1).toLowerCase()],f={id:e,type:c,name:u};if(d&&(f.contentType=d),((e,t)=>e?e.endsWith(`+xml`)||e===`application/xml`:/\.(xml|rels|vml)$/i.test(t))(d,u))f.xml=new TextDecoder(`utf-8`).decode(l.content);else{let n=R(e,t,!0);if(typeof n!=`number`)return null;f.resId=n}let p=[];return L(s,pe)?.forEach((e,t)=>{if(!e?.type||r&&!r(e.type))return;if(e.targetMode===`External`){let n=R(t,s,!0);typeof n==`number`&&p.push({id:t,type:e.type,resId:n});return}let n=Me(t,s,e.type,r,i);n&&p.push(n)}),p.length>0&&(f.parts=p),I(s),f},Fe=rt(`coreprops`,o,a,P,j,x),Ie=rt(`extprops`,o,a,P,j,x),Le=rt(`custprops`,o,a,P,j,x);Le.forEach((e,t)=>{e?.custom&&I(t)});let Re=new C,ze=rt(`people`,o,a,P,j,x);if(ze.size>0){let[e,t]=ze.entries().next().value;Re.fromJSON(t?.persons),I(e)}let Be=e=>{if(e)return Re.add(e).toJSON()},B={paramMap:k,getRefs:L,getRef:R,parsedRefs:pe,readEmbeddedPart:(e,t)=>Me(e,t),addPerson:Be,serializeElement:xe,onWarning:b},V=[],H=new Map;if(k.set(lr,H),c){let e=await F.getTextStream(c,ue);if(e){let t=((e,t)=>{let n=!1,r=!1,i=0,a=``,o=new tr;return{onOpenTag:e=>{let t=er(e.name);t===`t`?n&&i===0&&(r=!0):t===`si`?(n=!0,a=``,o.reset(),i=0):t===`rPh`||t===`phoneticPr`?i++:n&&i===0&&o.onOpenTag(t,e.attributes)},onText:e=>{r&&(a+=e,o.onText(e))},onCloseTag:t=>{let s=er(t.name);s===`t`?r=!1:s===`si`?(e(we(a),o.take()??void 0),n=!1,a=``):s===`rPh`||s===`phoneticPr`?i>0&&i--:o.onCloseTag(s)},onError:e=>{t?.(`Error parsing shared strings: ${e?.message??e}`)}}})((e,t)=>{t&&H.set(V.length,t),V.push(e)},e=>{b(e,c)});try{await xn.parseStream(e,t,{xmlns:!1})}catch(e){throw Error(`Error parsing shared strings: '${c}'`,{cause:e})}}}v?.mark(`shared-strings`);let He=V.length,U=new Map,We=He,W=e=>{let t=U.get(e);if(t!==void 0)return t;let n=We;return U.set(e,We++),V.push(e),n},Ke=[];o.slicersCache=Ke;let G=F.getNames(),Je=G.length;for(let e=0;e<Je;e++){let t=G[e];t&&(t.startsWith(`xl/slicerCache`)||t.startsWith(`xl/timelineCaches/`)&&t.endsWith(`.xml`))&&Ke.push(`/${t}`)}let Xe=rt(`slicersCache`,o,a,P,j,B),Qe=new Map;Xe.forEach((e,t)=>{e?.cacheName&&(e.cachePath=t,Qe.set(e.cacheName,e))}),k.set(`slicerCaches`,Qe);let $e=[];o.slicers=$e;for(let e=0;e<Je;e++){let t=G[e];t&&(t.startsWith(`xl/slicers/`)||t.startsWith(`xl/timelines/`))&&t.endsWith(`.xml`)&&$e.push(`/${t}`)}let nt={getFile:a,domParser:P,getAddress:(e,t)=>{let n=R(t,e,!1);return typeof n==`string`?n:null},getBytes:(e,t)=>{let n=Te(t,e),r=n?a(n.substring(1))?.content:void 0;return r?r.slice().buffer:null},addFetched:(e,t)=>{let n=_.add({source:{buffer:e},fetchedFrom:t});return n.addReference(ie),ce.add(n),te.toResourceId(n)},markAbsorbed:I},it=new Map;for(let e of M.getAll())it.set(e.structure,e.beginRead(nt));let at=((e,t)=>{let n=n=>{let r=e(n);return r?t.parseFromString(new TextDecoder().decode(r.content),`text/xml`).documentElement??null:null},r=q(n(vt),`s`).map(e=>({t:e.getAttribute(`t`)??``,keys:Tt(e)})),i=q(n(yt),`rv`).map(e=>{let t=q(e,`fb`)[0];return{s:parseInt(e.getAttribute(`s`)??`-1`,10),values:q(e,`v`).map(e=>e.textContent??``),fb:t?t.textContent??``:null}}),a=q(n(bt),`a`).map(e=>{let t=Et(e),n=parseInt(e.getAttribute(`r`)??``,10),r=parseInt(e.getAttribute(`c`)??``,10),i=n>0?n:t.length;return{rows:i,columns:r>0?r:Math.max(1,Math.ceil(t.length/Math.max(1,i))),items:t}}),o=q(n(xt),`s`).map(Tt),s=n(St),c=q(q(s,`spbArrays`)[0],`a`).map(Et),l=q(q(s,`spbData`)[0],`spb`).map(e=>({s:parseInt(e.getAttribute(`s`)??`-1`,10),values:q(e,`v`).map(e=>e.textContent??``)})),u=n(Ct),d=Dt(q(q(u,`global`)[0],`keyFlags`)[0]),f=new Map;for(let e of q(q(u,`types`)[0],`type`))f.set(e.getAttribute(`name`)??``,Dt(q(e,`keyFlags`)[0]));let p=n(wt),m=q(q(p,`dxfs`)[0],`dxf`).map(e=>q(e,`numFmt`)[0]?.getAttribute(`formatCode`)??null),h=q(q(p,`richProperties`)[0],`rPr`).map(e=>e.getAttribute(`n`)??``);return{structures:r,values:i,arrays:a,bagStructures:o,bagArrays:c,bags:l,globalKeyFlags:d,typeKeyFlags:f,richStyles:q(q(p,`richStyles`)[0],`rSty`).map(e=>{let t=new Map;for(let n of q(e,`rpv`)){let e=h[parseInt(n.getAttribute(`i`)??`-1`,10)];e&&t.set(e,n.textContent??``)}let n=parseInt(e.getAttribute(`dxfid`)??``,10);return{numberFormat:t.get(`NumberFormat`)??(n>=0?m[n]??null:null),isTitle:t.get(`IsTitleField`)===`1`,isHero:t.get(`IsHeroField`)===`1`}})}})(a,P),st=pt(at,it,e=>{b(e,`/xl/richData/rdrichvalue.xml`)});k.set(`richData`,at.values.map((e,t)=>st.cellValue(t)));for(let e=0;e<Je;e++){let t=G[e];t.startsWith(`xl/richData/`)&&!t.includes(`/_rels/`)&&I(t)}let ct=rt(`themes`,o,a,P,j,B),ut=null;if(ct&&ct.entries){let e=ct.entries().next();e?.value?.[1]&&(ut=e.value[1])}let dt=new g(ut),ft=rt(`styles`,o,a,P,j,B).entries().next()?.value?.[1];ft&&=JSON.parse(t.JSONStableStringify(ft));let mt=rt(`workbooks`,o,a,P,j,B);k.set(cr,!0===mt.entries().next().value?.[1]?.date1904),(m.calcOnLoad??p)!==`none`&&k.set(sr,((e,t)=>{let n=new Set;if(e)for(let t=0;t<e.length;t++)n.add(String(e[t]?.name).toUpperCase());if(t)for(let e=0;e<t.length;e++)try{let r=t[e](()=>{throw Error(`Not evaluating.`)},(e,t,r,i)=>{for(let e of Object.keys(i))n.add(e.toUpperCase())},new Map);for(let e of r.keys())n.add(e.toUpperCase())}catch{}return e=>n.has(e)||re.has(e)})(mt.entries().next().value?.[1]?.names,m.functions)),v?.mark(`side-parts-json`),await Promise.all(ye);{let e=mt.entries().next().value?.[1],t=ve(e?.names),n=e?.sheets??[];for(let e=0;e<n.length;e++){let r=n[e],i=z(r);if(r?.kind===`macro`&&i?.part.xml){i.part.xml=me(i.part.xml,V);continue}let a=E(r);a&&Ee(a,t)}let r=e?.names;if(r)for(let e=0;e<r.length;e++){let n=r[e]?.ref;typeof n==`string`&&(r[e].ref=t.readDetached(n))}}T&&se>0&&(T(D,D),await new Promise(e=>setTimeout(e,0))),v?.mark(`sheets`);let K={...mt.entries().next().value?.[1],styles:ft,theme:dt.toJSON()},gt=((e,t,n,r)=>{let i={},a=(e,t)=>{if(e)for(let{key:n,value:r}of e){let e=t[n];if(e&&r){if(e===`revisionNumber`){let e=parseInt(r,10);Number.isFinite(e)&&(i.revisionNumber=e)}else i[e]=r}}};if(a(e,wr),a(t,Tr),n){let e=[];for(let t of n){let n=Dr(t);n?e.push(n):r?.(`The custom document property '${t.key}' holds a value of a kind that is not read (${t.kind?`vt:`+t.kind:`none`}); it was dropped.`,`xlsx.docProps.custom.kind`)}e.length>0&&(i.custom=e)}return Object.keys(i).length>0?i:void 0})(Fe.values().next().value?.properties,Ie.values().next().value?.properties,Le.values().next().value?.custom,(e,t)=>{b(e,`docProps/custom.xml`,t)});gt&&(K.properties=gt),((e,t)=>{if(!t||t.size===0)return;let n=e.styles;if(!n)return;let r=new Set,i=new Set;for(let n of e.sheets??[]){let e=E(n);if(!e)continue;let a=new Set;Ar(e.cols)||a.add(0);for(let t of e.directStyles??[])a.add(Array.isArray(t)?t[1]:t.v);for(let t of e.rows??[]){let e=kr(t);e!==void 0&&a.add(e)}for(let t of e.cols??[]){let e=kr(t);e!==void 0&&a.add(e)}let o=!1;for(let e of a)if(t.has(e)){o=!0;break}if(o){e.protection={...e.protection??{sheet:!0},showFormulas:!1};for(let e of a)(t.has(e)?i:r).add(e)}}if(r.size===0)return;let a=n.direct??=[];for(let e of r)e!==0&&jr(a[e]??(a[e]={}),!0);for(let e of i)e!==0&&jr(a[e]??(a[e]={}),!1);if(r.has(0)){let e=n.named??=[],t=l.BuiltInName.Normal.toLowerCase(),r=e.find(e=>e.name?.toLowerCase()===t);r||(r={name:l.BuiltInName.Normal,style:{}},e.push(r)),jr(r.style,!0)}})(K,k.get(Or)),((e,t)=>{if(t&&t.size!==0)for(let n of e.sheets??[]){let e=E(n),r=e?.pivotTables;if(!e||!r||r.length===0)continue;let i=r.map(Ze),a=r.map(()=>[]);for(let[n,r]of e.directStyles??[]){if(!t.has(r))continue;let e=S.fastStringToRange(n);for(let t=0;t<i.length;t++){let n=i[t];if(!n)continue;let r=Math.max(e.rowStart,n.rowStart),o=Math.min(e.rowEnd,n.rowEnd),s=Math.max(e.colStart,n.colStart),c=Math.min(e.colEnd,n.colEnd);if(r>o||s>c)continue;let l=S.rangeToString({rowStart:r-n.rowStart,rowEnd:o-n.rowStart,colStart:s-n.colStart,colEnd:c-n.colStart});l&&a[t].push(l)}}for(let e=0;e<r.length;e++)a[e].length>0&&(r[e].buttons=a[e])}})(K,k.get(Mr));let _t=k.get(Wr);Nr(K,_t),(e=>{let t={colStart:0,rowStart:0,colEnd:he,rowEnd:ke};for(let r of e.sheets??[]){let e=E(r);if(!e)continue;let a=[];if(qr(e.cols,!0,t,a),qr(e.rows,!1,t,a),a.length===0)continue;let o=[];for(let[t,n]of e.directStyles??[])o.push({...S.fastStringToRange(t),value:{kind:0,index:n}});o.push(...a);let s=[],c=new n.IteratorInstance(o,{axis:i.Column});for(let e=c.next();!e.done;e=c.next()){let n=e.value.overlaps,r;if(n.length===1){if(r=n[0].value,r.index===0)continue}else{let e,t,i;for(let r=0;!e&&r<n.length;r++){let a=n[r].value;a.kind===0?e=a:a.kind===1?t=a:i=a}r=e??t??i}s.push([S.rangeToString(e.value.range,t),r.index])}s.length>0?e.directStyles=s:delete e.directStyles}})(K),_t&&((e,t,n)=>{if(!t||t.size===0||!n)return;let r=e=>{if(e===void 0||e===0)return null;let r=t.get(e);return r===void 0?null:n.controls[r]??null};for(let t of e.sheets??[]){let e=E(t);if(!e)continue;let n=new Map;for(let t of e.directStyles??[]){let e=Array.isArray(t)?t[0]:t.r,i=r(Array.isArray(t)?t[1]:t.v);if(!i)continue;let a=JSON.stringify(i),o=n.get(a);o||(o={control:i,addresses:[]},n.set(a,o)),Gr(e,o.addresses)}if(n.size===0)continue;let i=[...e.cellControls??[]];for(let{control:e,addresses:t}of n.values())i.push({r:t.join(`,`),v:e});e.cellControls=i}})(K,_t,rt(`featurePropertyBag`,o,a,P,j,B).values().next().value?.featurePropertyBag);{let e=new Map;rt(`slicers`,o,a,P,j,B).forEach((t,n)=>{t?.slicers&&e.set(n,t.slicers)}),ht(K,{warn:(e,t)=>{b(e,`xl/slicers`,t)},markAbsorbed:I,slicerParts:e})}K.calc={...K.calc??{},legacyIntersect:!0},V.length>0&&(K.strings=V);let Ot=Re.toJSON();Ot&&Ot.length>0&&(K.people=Ot);let kt=F.getEntry(`xl/vbaProject.bin`);if(kt)try{let{VBAProject:t}=await e(async()=>{let{VBAProject:e}=await import(`./w3bV7wggRayUYTd-.js`);return{VBAProject:e}},__vite__mapDeps([17,18]),import.meta.url),n=t.extract(kt);if(n){let e=new Map;for(let t of K.sheets??[]){let n=E(t),r=n?.codeName;r&&e.set(r,n)}for(let r of n.modules){let n={language:`vba`},{header:i,body:a}=t.splitAttributes(r.code);a&&(n.source=a),i&&(n.sourceHeader=i);let o=r.type===`document`?e.get(r.name):void 0;o||r.type!==`document`||(n.scope=`workbook`);let s=o?o.modules??={}:K.modules??={};s[r.name]||(s[r.name]=n)}d?.(n)}else y.push([`Unable to parse VBA project.`,`xl/vbaProject.bin`])}catch(e){y.push([`Error extracting VBA: ${e?.message??e}`,`xl/vbaProject.bin`])}let At=k.get(`calcId`),jt=At===void 0||!(Number(At)>=191029),Mt=m.calcOnLoad??(p===`auto`&&jt?`full`:p),Nt={...m,calcOnLoad:Mt,resources:_,json:K};if(Nt.disableLoadAutoFit===void 0){let e=k.get(Oe);Nt.disableLoadAutoFit=!!e?.declared&&e.normalIsThemeFont&&await O(e.faces)}v?.mark(`json-assembled`);let Pt=new ne(Nt);if(v?.mark(`workbook-constructed`),ce.forEach(e=>{e.deleteReference(ie)}),te.endPersist(),ee){tt(Pt);let e=new Map,t=0;for(let n of F.getNames()){let r=F.getEntry(n);if(!r)continue;let i=F.getRawEntry(n),a=i?{data:r,uncompressedSize:F.uncompressedSize(n),raw:{compressedData:i.data,compressionMethod:i.compressionMethod,signature:i.signature}}:{data:r,uncompressedSize:F.uncompressedSize(n)};e.set(n,a),t+=r.byteLength}if(t>67108864)y.push([`Source package too large to retain (${t} bytes, limit ${Ge}); unmodeled parts will be dropped on save.`,`SourcePackage`]);else if(e.size>0){let t=new lt(e,be);Ce(Pt,t);let n=Pt.getWorksheets().getItems(),r=Pt.getTransactions().addListener({onCommitEnd:e=>{let n=e.getOperation()?.name;n!==`insertCells`&&n!==`deleteCells`||t.markStructuralChange()}}),i=Pt.addListeners({onSheetsChange:()=>{let e=Pt.getWorksheets().getItems();(e.length!==n.length||e.some((e,t)=>e!==n[t]))&&t.markStructuralChange(),n=e}});Pt.addListeners({onClose:()=>{r(),i(),tt(Pt)}})}}if(y.length&&w?.onWarning){let e=new Set;for(let t of y){let[n,r,i]=t,a=i??n;e.has(a)||(e.add(a),w.onWarning(n,r))}}return v&&!0===f&&console.table(v.toTable()),await Pt.whenFontsReady(),Pt}catch(e){let t=`Unable to parse XLSX.`;throw e instanceof o&&(t=`Unable to open XLSX. There are too many rows or columns.`),Error(t,{cause:e})}finally{await F.close().catch(()=>{})}};export{Or as a,ur as i,Mr as n,ei as o,Yr as r,Wr as t};
@@ -1 +1 @@
1
- import{t as e}from"./gU2zeJaXoNh7QI_e.js";import{C as t,Z as n,y as r}from"./D4RZZdlItfrgQHcE.js";import{Y as i}from"./DJebrQ5mu8uxpX3b.js";import{t as a}from"./D72Rp__0TEqJ972a.js";import{i as o,n as s,r as c,t as l}from"./hB5riGkPy0wXVIig.js";var u=e(),d={cropAspect1x1:[1,1],cropAspect2x3:[2,3],cropAspect3x4:[3,4],cropAspect3x5:[3,5],cropAspect4x5:[4,5],cropAspect3x2:[3,2],cropAspect4x3:[4,3],cropAspect5x3:[5,3],cropAspect5x4:[5,4],cropAspect16x9:[16,9],cropAspect16x10:[16,10]},f={renderer:e=>{let t=e.movable.getContent();return(0,u.jsx)(l,{loadingPanel:(0,u.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`}}),picture:t,description:t.getDescription()??t.getName?.()??void 0,...e})},commands:(e,l)=>{let{sheet:u,movable:f,notifier:p}=l,m=f.getContent(),h=async e=>{try{await e()}catch(e){p?.showError?.(e)}},g=m.isReadOnly()?[n(`reason.sheetProtected`)]:[],_=m.toJSON().locks?.noCrop?[n(`reason.pictureCropLocked`)]:g;e.updateCommand(`cropToShape`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:e=>h(()=>{let t=typeof e==`object`&&e?e.geometry:e;m.setShapeType(typeof t==`string`?t:`rect`)})});for(let[t,[r,i]]of Object.entries(d))e.updateCommand(t,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:()=>h(()=>{let e=o(f.getBounds(),m.getCrop(),r/i);return u.doBatch(()=>{f.setBounds(e.bounds),m.setCrop(e.crop)},{description:n(`op.setPictureCrop`)})})});let v=e=>()=>h(async()=>{let t=await m.getDetails();m.setCrop(e(f.getBounds(),t.getNaturalSize()))});e.updateCommand(`cropFill`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:v(c)}),e.updateCommand(`cropFit`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:v(s)});let y=m.getHyperlink(),b=y?[]:[n(`reason.pictureNoHyperlink`)];e.updateCommand(`updatePictureHyperlink`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{a(m,u,p)}}),e.updateCommand(`openPictureHyperlink`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:b,callback:()=>h(async()=>{await m.getHyperlink()?.open()})}),e.updateCommand(`deletePictureHyperlink`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:y?g:b,callback:()=>h(()=>{m.setHyperlink(null)})});let x=async e=>{let t=await(async e=>{let t=await Promise.resolve(p?.showBusy?.(r(n(`op.setPictureResource`)))??null);try{let t=u.getResources().add(e);return await t.toBuffer(),t}catch(e){let t=e;if(typeof t!=`string`){console.warn(e);let n=typeof e?.cause==`string`?e.cause:``,i=typeof e?.message==`string`?e.message:``;n&&(i=i?`${i} (${n})`:n),t=r(`error.insertImage.unresolved`,{detail:i})}return p?.showMessage?.(t,{type:i.Error}),null}finally{t?.()}})(e);t&&m.setResource(t)};e.updateCommand(`changePictureFromFile`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{let n=null,r=null;typeof e==`string`?r=e:n=e??null,(n||(n=await t.openFileDialog(r??`image/*`),n))&&await x({source:{file:await Promise.resolve(n)}})}}),e.updateCommand(`changePictureFromURL`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{if(!e){let t=await p?.showInput?.({title:r(`dialog.changePicture.title`),description:r(`dialog.changePicture.description`),inputLabel:r(`dialog.insertImage.inputLabel`),initialValue:`https://picsum.photos/360`,propsInput:{style:{minWidth:`440px`}},options:[{id:`Change`,label:()=>r(`dialog.change`)}]});if(!t||t.option!==`Change`)return;e=t.input}e&&await x({source:{fetch:e}})}})}};export{f as PictureKind};
1
+ import{t as e}from"./gU2zeJaXoNh7QI_e.js";import{C as t,Z as n,y as r}from"./D4RZZdlItfrgQHcE.js";import{Y as i}from"./DwHci99xcnRTEcv5.js";import{t as a}from"./D72Rp__0TEqJ972a.js";import{i as o,n as s,r as c,t as l}from"./7N8xCpYVBHFqfoAg.js";var u=e(),d={cropAspect1x1:[1,1],cropAspect2x3:[2,3],cropAspect3x4:[3,4],cropAspect3x5:[3,5],cropAspect4x5:[4,5],cropAspect3x2:[3,2],cropAspect4x3:[4,3],cropAspect5x3:[5,3],cropAspect5x4:[5,4],cropAspect16x9:[16,9],cropAspect16x10:[16,10]},f={renderer:e=>{let t=e.movable.getContent();return(0,u.jsx)(l,{loadingPanel:(0,u.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`}}),picture:t,description:t.getDescription()??t.getName?.()??void 0,...e})},commands:(e,l)=>{let{sheet:u,movable:f,notifier:p}=l,m=f.getContent(),h=async e=>{try{await e()}catch(e){p?.showError?.(e)}},g=m.isReadOnly()?[n(`reason.sheetProtected`)]:[],_=m.toJSON().locks?.noCrop?[n(`reason.pictureCropLocked`)]:g;e.updateCommand(`cropToShape`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:e=>h(()=>{let t=typeof e==`object`&&e?e.geometry:e;m.setShapeType(typeof t==`string`?t:`rect`)})});for(let[t,[r,i]]of Object.entries(d))e.updateCommand(t,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:()=>h(()=>{let e=o(f.getBounds(),m.getCrop(),r/i);return u.doBatch(()=>{f.setBounds(e.bounds),m.setCrop(e.crop)},{description:n(`op.setPictureCrop`)})})});let v=e=>()=>h(async()=>{let t=await m.getDetails();m.setCrop(e(f.getBounds(),t.getNaturalSize()))});e.updateCommand(`cropFill`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:v(c)}),e.updateCommand(`cropFit`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:_,callback:v(s)});let y=m.getHyperlink(),b=y?[]:[n(`reason.pictureNoHyperlink`)];e.updateCommand(`updatePictureHyperlink`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{a(m,u,p)}}),e.updateCommand(`openPictureHyperlink`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:b,callback:()=>h(async()=>{await m.getHyperlink()?.open()})}),e.updateCommand(`deletePictureHyperlink`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:y?g:b,callback:()=>h(()=>{m.setHyperlink(null)})});let x=async e=>{let t=await(async e=>{let t=await Promise.resolve(p?.showBusy?.(r(n(`op.setPictureResource`)))??null);try{let t=u.getResources().add(e);return await t.toBuffer(),t}catch(e){let t=e;if(typeof t!=`string`){console.warn(e);let n=typeof e?.cause==`string`?e.cause:``,i=typeof e?.message==`string`?e.message:``;n&&(i=i?`${i} (${n})`:n),t=r(`error.insertImage.unresolved`,{detail:i})}return p?.showMessage?.(t,{type:i.Error}),null}finally{t?.()}})(e);t&&m.setResource(t)};e.updateCommand(`changePictureFromFile`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{let n=null,r=null;typeof e==`string`?r=e:n=e??null,(n||(n=await t.openFileDialog(r??`image/*`),n))&&await x({source:{file:await Promise.resolve(n)}})}}),e.updateCommand(`changePictureFromURL`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{if(!e){let t=await p?.showInput?.({title:r(`dialog.changePicture.title`),description:r(`dialog.changePicture.description`),inputLabel:r(`dialog.insertImage.inputLabel`),initialValue:`https://picsum.photos/360`,propsInput:{style:{minWidth:`440px`}},options:[{id:`Change`,label:()=>r(`dialog.change`)}]});if(!t||t.option!==`Change`)return;e=t.input}e&&await x({source:{fetch:e}})}})}};export{f as PictureKind};
@@ -1,3 +1,3 @@
1
- import{Q as e,Y as t,bt as n}from"./COL9dj40ytErlGak.js";import{i as r}from"./CQukCzhuewMuFOlO.js";import{A as i,Nt as a,dt as o,z as s}from"./BAzHRU12l2vyyXq-.js";var c=[`customMenu`,`description`,`help`,`statusBar`,`shortcutKey`],l=[`function`,`vbProcedure`,`xlm`,`publishToServer`,`workbookParameter`],u=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords`,d=class extends Error{},f=()=>{throw new d},p={t:`z`,v:0},m=/<([snbdemx])((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/g,h=(e,t,n)=>{try{return _(e,t,n)}catch(e){if(e instanceof d)return null;throw e}},g=e=>{let t=o(e,`cacheSource`);if(!t||i(t.attributes).get(`type`)!==`worksheet`)return;let n=o(e,`worksheetSource`,t.contentStart,t.end);if(!n)return;let r=i(n.attributes);if(r.has(`r:id`))return;let a={};for(let e of[`ref`,`sheet`,`name`]){let t=r.get(e);t!==void 0&&(a[e]=t)}return a},_=(e,t,n)=>{let r=e.xml??f(),a=ee(r,`pivotCacheDefinition`)??f(),c=i(a.attributes),l=c.get(`r:id`),u=e.parts?.find(e=>e.id===l&&e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords`)?.xml??null;l!==void 0&&u===null&&f();let d=g(r)??f(),p=o(r,`cacheSource`)??f(),m=o(r,`worksheetSource`,p.contentStart,p.end)??f(),h=o(r,`cacheFields`)??f(),_=[],re=h.contentStart;for(;;){let e=o(r,`cacheField`,re,h.contentEnd);if(!e)break;_.push(ne(r,e,_.length,t,n)),re=e.end}let v=o(r,`calculatedItems`);v&&te(r,v,_);let ie=u===null?parseInt(c.get(`recordCount`)??`0`,10):y(u,_.filter(e=>e.records!==null),t),b=[],ae=[];for(let e=0;e<_.length;e++){let t=_[e];t.hasDate&&t.hasNumber?t.json.dateItems=t.dateItems:t.hasDate&&(t.json.dates=!0),t.items.length>0&&b.push([e,[[0,t.items]]]),t.records&&t.records.length>0&&ae.push([e,[[0,t.records]]])}let oe=v?r.substring(0,v.start)+r.substring(v.end):r,se=o(oe,`cacheFields`)??f(),x=oe.substring(0,se.start)+oe.substring(se.end),S=r.substring(m.start,m.start+m.attributes.length+16);x=x.replace(S,()=>`<worksheetSource`+s(m.attributes,[`ref`,`sheet`,`name`])),x=x.replace(a.tag,()=>`<pivotCacheDefinition`+s(a.attributes,[`r:id`,`recordCount`,`refreshOnLoad`]));let C={source:d,fields:_.map(e=>e.json),items:b,recordCount:ie,rest:x};u!==null&&(C.records=ae);let ce=c.get(`refreshOnLoad`);return ce!==`1`&&ce!==`true`||(C.refreshOnLoad=!0),C},ee=(e,t)=>{let n=RegExp(`<${t}((?:\\s+[^\\s=/>]+\\s*=\\s*(?:"[^"]*"|'[^']*'))*)`).exec(e);return n?{tag:n[0],attributes:n[1]}:null},te=(e,t,n)=>{let r=t.contentStart;for(;;){let a=o(e,`calculatedItem`,r,t.contentEnd);if(!a)break;r=a.end;let s=i(a.attributes).get(`formula`)??f(),c=[...e.substring(a.contentStart,a.contentEnd).matchAll(/<reference\s[^>]*?field="(\d+)"[^>]*>\s*<x(?:\s+v="(\d+)")?\s*\/>\s*<\/reference>/g)];c.length!==1&&f();let l=n[parseInt(c[0][1],10)]??f();(l.json.calculatedItems??=[]).push({item:c[0][2]?parseInt(c[0][2],10):0,formula:s})}},ne=(e,t,n,r,c)=>{let l=i(t.attributes),u={name:l.get(`name`)??f()},d=l.get(`numFmtId`),p=d===void 0?void 0:c(parseInt(d,10));p!==void 0&&(u.numberFormat=p);let h=l.get(`databaseField`)===`0`;h&&(u.noRecords=!0);let g=l.get(`formula`);g!==void 0&&(u.formula=g);let _=o(e,`fieldGroup`,t.contentStart,t.contentEnd);_&&(u.group=((e,t,n,r)=>{let s=i(t.attributes),c=e=>e===void 0?void 0:parseInt(e,10),l={base:c(s.get(`base`))??n,items:[]},u=c(s.get(`par`));u!==void 0&&(l.parent=u);let d=o(e,`groupItems`,t.contentStart,t.contentEnd);if(d){let t=e.substring(d.contentStart,d.contentEnd);m.lastIndex=0;let n,a=0,o={items:l.items,hasDate:!1,hasNumber:!1,dateItems:[]};for(;n=m.exec(t);)(n[3]!==`/`||t.substring(a,n.index).trim())&&f(),l.items.push(v(n[1],i(n[2]).get(`v`),o,r)),a=m.lastIndex;t.substring(a).trim()&&f(),o.hasDate&&(l.dateItems=o.dateItems)}let p=o(e,`rangePr`,t.contentStart,t.contentEnd);if(p){let e=i(p.attributes),t=e.get(`groupBy`)??`range`,n=t!==`range`,o=t=>{let i=e.get(`${t}${n?`Date`:`Num`}`)??f(),o=n?a(i,r):Number(i);return o!==null&&Number.isFinite(o)?o:f()},s={by:n?t:`numbers`,start:o(`start`),end:o(`end`)},c=e.get(`groupInterval`);c!==void 0&&(s.interval=Number(c)),e.get(`autoStart`)===`0`&&(s.fixedStart=!0),e.get(`autoEnd`)===`0`&&(s.fixedEnd=!0),l.range=s}let h=o(e,`discretePr`,t.contentStart,t.contentEnd);if(h){let t=e.substring(h.contentStart,h.contentEnd);l.discrete=Array.from(t.matchAll(/<x((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*\/>/g),e=>c(i(e[1]).get(`v`))??0)}return l})(e,_,n,r));let ee=h?null:o(e,`sharedItems`,t.contentStart,t.contentEnd),te={json:u,items:[],byValue:null,records:h?null:[],hasDate:!1,hasNumber:!1,dateItems:[]},ne=[ee,_].filter(e=>!!e).sort((e,t)=>e.start-t.start),y=``,ie=t.contentStart;for(let t of ne)y+=e.substring(ie,t.start),ie=t.end;y+=e.substring(ie,t.contentEnd),ee&&re(e.substring(ee.contentStart,ee.contentEnd),te,r),h||te.items.length!==0||(u.inline=!0,te.byValue=new Map);let b=s(t.attributes,[`name`,`numFmtId`,`databaseField`,`formula`]);return(b.trim()||y.trim())&&(u.rest=y.trim()?`<cacheField${b}>${y}</cacheField>`:`<cacheField${b}/>`),te},re=(e,t,n)=>{m.lastIndex=0;let r,a=0;for(;r=m.exec(e);){e.substring(a,r.index).trim()&&f();let[,o,s,c]=r;c===`/`&&o!==`x`||f();let l=i(s);for(let e of l.keys())e!==`v`&&e!==`u`&&e!==`f`&&f();let u=l.get(`u`);u!==`1`&&u!==`true`||(t.json.unused??=[]).push(t.items.length),t.items.push(v(o,l.get(`v`),t,n)),a=m.lastIndex}e.substring(a).trim()&&f()},v=(e,t,n,i)=>{switch(e){case`m`:return p;case`s`:return t??f();case`n`:{let e=t===void 0?NaN:Number(t);return Number.isFinite(e)||f(),n.hasNumber=!0,e}case`d`:{let e=t===void 0?null:a(t,i);return e===null&&f(),n.hasDate=!0,n.dateItems.push(n.items.length),e}case`b`:return t===`1`||t===`true`;case`e`:{let e=t===void 0?void 0:r.getBuiltInByLabel(t);return e||f(),{t:`e`,v:e.getCode()}}default:return f()}},y=(e,t,n)=>{let r=o(e,`pivotCacheRecords`)??f(),i=e.substring(r.contentStart,r.contentEnd),a=/<r>([\s\S]*?)<\/r>|<r\/>/g,s,c=0,l=0;for(;s=a.exec(i);)i.substring(l,s.index).trim()&&f(),ie(s[1]??``,t,n),c++,l=a.lastIndex;return i.substring(l).trim()&&f(),c},ie=(e,t,n)=>{m.lastIndex=0;let r,a=0,o=0;for(;r=m.exec(e);){e.substring(o,r.index).trim()&&f();let[,s,c,l]=r;l!==`/`&&f();let u=t[a++]??f(),d=i(c);for(let e of d.keys())e!==`v`&&f();let p=d.get(`v`);if(s===`x`){let e=p===void 0?NaN:Number(p);(u.byValue||!Number.isInteger(e)||e<0||e>=u.items.length)&&f(),u.records.push(e)}else{let e=u.byValue??f(),t=s+(p??``),r=e.get(t);r===void 0&&(r=u.items.length,u.items.push(v(s,p,u,n)),e.set(t,r)),u.records.push(r)}o=m.lastIndex}(e.substring(o).trim()||a!==t.length)&&f()},b=/<!\[CDATA\[([\s\S]*?)\]\]>|<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!DOCTYPE[^>]*>|<(\/?)([^\s/>]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|([^<]+)/g,ae={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},oe=e=>e.indexOf(`&`)===-1?e:e.replace(/&(#x[0-9a-fA-F]+|#\d+|\w+);/g,(e,t)=>{if(t[0]!==`#`)return ae[t]??e;let n=t[1]===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Number.isFinite(n)?String.fromCodePoint(n):e}),se=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},x=e=>{let t={name:``,qname:``,attrs:``,children:[],start:0,end:e.length,contentStart:0,contentEnd:e.length},n=[t];b.lastIndex=0;for(let t=b.exec(e);t;t=b.exec(e)){let e=n[n.length-1];if(t[1]!==void 0)e.children.push(t[1]);else if(t[6]!==void 0)e.children.push(oe(t[6]));else if(t[3]!==void 0){if(t[2]){if(n.length>1){let e=n.pop();e.contentEnd=t.index,e.end=t.index+t[0].length}continue}let r=t.index+t[0].length,i={name:se(t[3]),qname:t[3],attrs:t[4]??``,children:[],start:t.index,end:r,contentStart:r,contentEnd:r};e.children.push(i),t[5]||n.push(i)}}return t.children.find(e=>typeof e!=`string`)??null},S=e=>e.children.filter(e=>typeof e!=`string`),C=e=>{let t=``;for(let n of e.children)typeof n==`string`&&(t+=n);return t},ce=`http://schemas.openxmlformats.org/drawingml/2006/chart`,le=`http://purl.oclc.org/ooxml/drawingml/chart`,ue=`http://schemas.openxmlformats.org/drawingml/2006/main`,de=`http://purl.oclc.org/ooxml/drawingml/main`,fe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,pe=`http://schemas.microsoft.com/office/drawing/2012/chart`,me=`http://schemas.microsoft.com/office/drawing/2014/chartex`,he=`http://www.w3.org/XML/1998/namespace`,w={c:`c`,a:`a`,r:`r`,c15:`c15`,cx:`cx`},ge=e=>e===ce||e===le,_e=e=>e===ue||e===de,ve=e=>e===me,ye=Object.freeze({xml:he}),be=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,T=e=>{let t=[];be.lastIndex=0;for(let n=be.exec(e.attrs);n;n=be.exec(e.attrs))t.push([n[1],oe(n[2]??n[3]??``)]);return t},xe=(e,t)=>{let n=null;for(let[r,i]of T(e))r===`xmlns`?(n??={...t})[``]=i:r.startsWith(`xmlns:`)&&((n??={...t})[r.slice(6)]=i);return n??t},Se=(e,t)=>t[(e=>{let t=e.indexOf(`:`);return t===-1?``:e.slice(0,t)})(e.qname)],Ce=class{constructor(){this._parts=[]}open(e,t,n=!1){let r=`<`+e;if(t)for(let[e,n]of t)r+=` ${e}="${we(n)}"`;return this._parts.push(r+(n?`/>`:`>`)),this}close(e){return this._parts.push(`</${e}>`),this}val(e,t){return this.open(e,[[`val`,t]],!0)}text(e){return this._parts.push((e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`))(e)),this}raw(e){return this._parts.push(e),this}toString(){return this._parts.join(``)}},we=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/"/g,`&quot;`),E=e=>e===`1`||e===`true`||e!==`0`&&e!==`false`&&null,D=e=>e?`1`:`0`,Te=/^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?$/,O=e=>{let t=E(e);return t===null?Te.test(e)?String(Number(e)):e:D(t)},Ee=new Set(`date1904.roundedCorners.autoTitleDeleted.plotVisOnly.showDLblsOverMax.varyColors.marker.smooth.invertIfNegative.bubble3D.delete.showLegendKey.showVal.showCatName.showSerName.showPercent.showBubbleSize.showLeaderLines.overlay.rAngAx.showHorzBorder.showVertBorder.showOutline.showKeys.auto.noMultiLvlLbl.wireframe.showNegBubbles.autoUpdate.applyToFront.applyToSides.applyToEnd.chartObject.data.formatting.selection.userInterface`.split(`.`)),De=(e,t,n=!1)=>{let r=xe(e,t),i=Se(e,r)??``,a=[];for(let[t,n]of T(e)){if(t===`xmlns`||t.startsWith(`xmlns:`))continue;let e=t.indexOf(`:`),i=e===-1?t:`{${r[t.slice(0,e)]??t.slice(0,e)}}${t.slice(e+1)}`;a.push(`${i}=${JSON.stringify(O(n))}`)}let o=S(e),s=o.length===0?e.children.join(``):``;a.length===0&&o.length===0&&s===``&&ge(i)&&Ee.has(e.name)&&a.push(`val="1"`),a.sort();let c=`<{${i}}${e.name}${a.length?` `+a.join(` `):``}>`;if(o.length>0){let t=[];for(let i of e.children)typeof i==`string`?i.trim()!==``&&t.push(JSON.stringify(i)):t.push(De(i,r,n));n&&t.sort(),c+=t.join(``)}else s!==``&&(c+=JSON.stringify(s));return c+`</>`},Oe=class{constructor(e,t){this.xml=e,this.rootScope=t,this.kept=0,this.reordered=0;let n=Object.values(t).find(ge)??ce,r=_e(t[w.a])?t[w.a]:ue;this.writeScope={...t,[w.c]:n,[w.cx]:me,[w.a]:r,[w.r]:t[w.r]??fe}}markupOf(e,t){let n=this.xml.slice(e.start,e.end),r=new Set(T(e).map(([e])=>e).filter(e=>e===`xmlns`||e.startsWith(`xmlns:`))),i=``;for(let e of Object.keys(t))e!==`xml`&&t[e]!==this.rootScope[e]&&(r.has(e===``?`xmlns`:`xmlns:${e}`)||(i+=e===``?` xmlns="${t[e]}"`:` xmlns:${e}="${t[e]}"`));if(i){let t=1+e.qname.length;n=n.slice(0,t)+i+n.slice(t)}return n}},ke=(e,t)=>{switch(e){case`c`:return ge(t);case`c15`:return t===pe;case`cx`:return ve(t);default:return _e(t)}},k=(e,t,n,r)=>{let i=xe(e,n),a={},o,s;for(let[n,r]of T(e)){let e=t.attributes?.find(e=>e.name===n),i=e?e.read(r):void 0;e&&i!==void 0&&O(e.write(i))===O(r)?a[e.key]=i:(o??={})[n]=r}let c=-1,l=``,u={};for(let n of S(e)){let e=xe(n,i),o=Se(n,e),d=t.fields.findIndex(e=>e.tags.includes(n.name)&&ke(e.ns,o)),f=d===-1?null:t.fields[d],p=f&&!f.many?f.get?f.get(a):a[f.key]:void 0,m=d>c||d===c&&!!f?.many;if(f&&p===void 0&&(m||!f.many)){let t=f.read(n,e,r);if(t!==void 0){f.many?(a[f.key]??=[]).push(t):f.set?f.set(a,t):a[f.key]=t,u[f.key]=(u[f.key]??0)+1,m?(c=d,l=n.name):r.reordered++;continue}}let h=c===-1?null:t.fields[c],g={after:l,xml:r.markupOf(n,i)};h?.many&&(g.at=u[h.key]),(s??=[]).push(g)}return(o||s)&&(a.unknown={},s&&(a.unknown.elements=s),o&&(a.unknown.attributes=o)),t.afterRead?.(a,e,i,r),a},A=(e,t,n,r)=>{let i=[];for(let e of r.attributes??[]){let t=n[e.key];t!==void 0&&i.push([e.name,e.write(t)])}let a=n.unknown;if(a?.attributes)for(let e of Object.keys(a.attributes))i.push([e,a.attributes[e]]);for(let e of r.declares?.(n)??[])i.some(([t])=>t===e[0])||i.push(e);let o=new Ce,s=a?.elements?[...a.elements]:[],c=e=>{for(let t=0;t<s.length;t++)e(s[t])&&(o.raw(s[t].xml),s.splice(t--,1))};c(e=>e.after===``);for(let e of r.fields){let t=e.get?e.get(n):n[e.key],r=t=>e.tags.includes(t.after);if(e.many){let n=t??[];for(let t=0;t<n.length;t++)e.write(o,n[t]),c(e=>r(e)&&e.at===t+1)}else t!==void 0&&e.write(o,t);c(r)}c(()=>!0);let l=o.toString();l===``?e.open(t,i,!0):e.open(t,i).raw(l).close(t)},j=(e,t)=>`${w[e]}:${t}`,M=(e,t,n=e,r=`c`)=>({tags:[e],key:n,ns:r,read:e=>{let n=(e=>{if(S(e).length>0)return;let t=null;for(let[n,r]of T(e)){if(n!==`val`)return;t=r}return t})(e);if(n===void 0)return;if(t===`bool`)return n===null||(E(n)??void 0);if(n===null)return;if(t===`str`)return n;let r=Number(n);return Number.isFinite(r)&&(t!==`int`||Number.isInteger(r))&&O(String(r))===O(n)?r:void 0},write:(n,i)=>{n.val(j(r,e),t===`bool`?D(i):String(i))}}),N=(e,t=e,n=`c`)=>({tags:[e],key:t,ns:n,read:e=>{if(!(S(e).length>0||T(e).some(([e])=>!e.startsWith(`xmlns`))))return C(e)},write:(t,r)=>{let i=j(n,e);r===``?t.open(i,null,!0):t.open(i).text(r).close(i)}}),P=(e,t,n=e,r)=>{let i=r?.ns??`c`,a=typeof t==`function`?t:()=>t;return{tags:[e],key:n,ns:i,many:r?.many,read:(e,t,n)=>k(e,a(),t,n),write:(t,n)=>A(t,j(i,e),n,a())}},F=(e,t,n=e,r=1)=>({name:e,key:n,read:e=>{if(t===`str`)return e;if(t===`bool`)return E(e)??void 0;let n=Number(e);return Number.isFinite(n)&&(t!==`int`||Number.isInteger(n))?r===1?n:n/r:void 0},write:e=>t===`bool`?D(e):t===`str`?e:String(r===1?e:Math.round(e*r))}),Ae=(e,t,n,r)=>({name:e,key:t,read:n,write:r}),je=e=>({...e,read:(t,n,r)=>{let i=e.read(t,n,r);if(i===void 0)return;let a=new Ce;e.write(a,i);let o=((e,t)=>{let n=x(e);return n?De(n,t):null})(a.toString(),r.writeScope)===De(t,n);return o||r.kept++,o?i:void 0}}),I=e=>`a:${e}`,Me=new Set([`bg1`,`tx1`,`bg2`,`tx2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`,`phClr`,`dk1`,`lt1`,`dk2`,`lt2`]),Ne=new Set(`scrollBar.background.activeCaption.inactiveCaption.menu.window.windowFrame.menuText.windowText.captionText.activeBorder.inactiveBorder.appWorkspace.highlight.highlightText.btnFace.btnShadow.grayText.btnText.inactiveCaptionText.btnHighlight.3dDkShadow.3dLight.infoText.infoBk.hotLight.gradientActiveCaption.gradientInactiveCaption.menuHighlight.menuBar`.split(`.`)),Pe=[`scrgbClr`,`srgbClr`,`hslClr`,`sysClr`,`schemeClr`,`prstClr`],Fe=e=>e===`hue`||e===`hueOff`||e===`hueMod`?6e4:e===`alpha`||e===`alphaOff`||e===`alphaMod`?1e5:1e3,L=(e,t)=>{let n={};for(let[r,i]of T(e)){if(!t.includes(r))return null;n[r]=i}return n},R=/^-?\d+$/,Ie=e=>{let t=S(e);return t.length===0?null:t.length>1||!Pe.includes(t[0].name)?void 0:(e=>{let t;switch(e.name){case`scrgbClr`:{let n=L(e,[`r`,`g`,`b`]);if(!(n&&R.test(n.r??``)&&R.test(n.g??``)&&R.test(n.b??``)))return;t=`lrgb(${Number(n.r)/1e3},${Number(n.g)/1e3},${Number(n.b)/1e3})`;break}case`hslClr`:{let n=L(e,[`hue`,`sat`,`lum`]);if(!(n&&R.test(n.hue??``)&&R.test(n.sat??``)&&R.test(n.lum??``)))return;t=`hsl(${Number(n.hue)/6e4},${Number(n.sat)/1e3},${Number(n.lum)/1e3})`;break}case`sysClr`:{let n=L(e,[`val`,`lastClr`]);if(!n?.val||!Ne.has(n.val))return;t=n.lastClr===void 0?n.val:`${n.val} lastClr ${n.lastClr}`;break}default:{let n=L(e,[`val`]);if(!n?.val||/\s/.test(n.val)||(Me.has(n.val)?`schemeClr`:/^[0-9A-Fa-f]{6}$/.test(n.val)?`srgbClr`:`prstClr`)!==e.name)return;t=n.val}}for(let n of S(e)){if(S(n).length>0)return;let e=L(n,[`val`]);if(!e)return;if(e.val!==void 0){if(!R.test(e.val))return;t+=` ${n.name} ${Number(e.val)/Fe(n.name)}`}else t+=` ${n.name}`}return t})(t[0])},Le=/^-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i,Re=(e,t)=>{let r=(e=>{let t=e.trim(),n=/^[a-z]+\([^)]*\)|^[^\s,]+/i.exec(t)?.[0]??t,r=t.slice(n.length).split(/\s*,\s*|\s+/).filter(e=>e!==``);return[n.replace(/\s+/g,``),...r]})(t),i=r.shift(),a,o,s=/^(lrgb|hsl)\(([^,]+),([^,]+),([^)]+)\)$/.exec(i);if(s?.[1]===`lrgb`)a=`scrgbClr`,o=[[`r`,String(Math.round(1e3*Number(s[2])))],[`g`,String(Math.round(1e3*Number(s[3])))],[`b`,String(Math.round(1e3*Number(s[4])))]];else if(s?.[1]===`hsl`)a=`hslClr`,o=[[`hue`,String(Math.round(6e4*Number(s[2])))],[`sat`,String(Math.round(1e3*Number(s[3])))],[`lum`,String(Math.round(1e3*Number(s[4])))]];else if(r[0]===`lastClr`||Ne.has(i))a=`sysClr`,o=[[`val`,i]],r[0]===`lastClr`&&(r.shift(),o.push([`lastClr`,r.shift()]));else{let e=(e=>{if(Me.has(e)||/^[0-9A-Fa-f]{6}$/.test(e)||/^[a-z]+$/i.test(e))return null;let t;try{t=new n(e)}catch{return null}let r=t.getType();return r===`hex`||r===`rgb`||r===`hsl`?t.toHex().toString(!1).replace(`#`,``).toUpperCase():null})(i);a=e?`srgbClr`:Me.has(i)?`schemeClr`:/^[0-9A-Fa-f]{6}$/.test(i)?`srgbClr`:`prstClr`,o=[[`val`,e??i]]}if(r.length!==0){e.open(I(a),o);for(let t=0;t<r.length;t++){let n=r[t];t+1<r.length&&Le.test(r[t+1])?e.val(I(n),String(Math.round(Number(r[++t])*Fe(n)))):e.open(I(n),null,!0)}e.close(I(a))}else e.open(I(a),o,!0)},ze=(e,t,n,r)=>{n===void 0?e.open(I(t),r,!0):(e.open(I(t),r),Re(e,n),e.close(I(t)))},Be=[`noFill`,`solidFill`,`gradFill`,`pattFill`,`grpFill`],Ve=e=>{let t=L(e,[`l`,`t`,`r`,`b`]);if(!t)return;let n={};return t.l!==void 0&&(n.left=Number(t.l)/1e3),t.t!==void 0&&(n.top=Number(t.t)/1e3),t.r!==void 0&&(n.right=Number(t.r)/1e3),t.b!==void 0&&(n.bottom=Number(t.b)/1e3),n},He=(e,t,n)=>{let r=[];n.left!==void 0&&r.push([`l`,String(Math.round(1e3*n.left))]),n.top!==void 0&&r.push([`t`,String(Math.round(1e3*n.top))]),n.right!==void 0&&r.push([`r`,String(Math.round(1e3*n.right))]),n.bottom!==void 0&&r.push([`b`,String(Math.round(1e3*n.bottom))]),e.open(I(t),r,!0)},Ue=t=>{switch(t.name){case`noFill`:return S(t).length===0&&T(t).length===0?{type:e.Type.None}:void 0;case`grpFill`:return S(t).length===0&&T(t).length===0?{type:e.Type.Group}:void 0;case`solidFill`:{if(T(t).length>0)return;let n=Ie(t);return n===void 0?void 0:n===null?{type:e.Type.Solid}:{type:e.Type.Solid,color:n}}case`gradFill`:return(t=>{let n=L(t,[`rotWithShape`,`flip`]);if(!n)return;let r={type:e.Type.Gradient};if(n.rotWithShape!==void 0){let e=E(n.rotWithShape);if(e===null)return;r.isRotatedWithShape=e}n.flip!==void 0&&(r.flip=n.flip);for(let n of S(t))if(n.name===`gsLst`){let e=[];for(let t of S(n)){let n=t.name===`gs`?L(t,[`pos`]):null,r=n&&R.test(n.pos??``)?Ie(t):void 0;if(!r)return;e.push({offset:Number(n.pos)/1e5,color:r})}r.stops=e}else if(n.name===`lin`){let t=L(n,[`ang`,`scaled`]);if(!t||S(n).length>0)return;if(r.gradientType=e.GradientType.Linear,t.ang!==void 0){if(!R.test(t.ang))return;r.angle=(Number(t.ang)/6e4+90)%360}if(t.scaled!==void 0){let e=E(t.scaled);if(e===null)return;r.scaled=e}}else if(n.name===`path`){let t=L(n,[`path`]);if(!t)return;r.gradientType=t.path===`circle`?e.GradientType.Path:t.path;let i=S(n);if(i.length>1||i.length===1&&i[0].name!==`fillToRect`)return;if(i.length===1){let e=Ve(i[0]);if(!e)return;r.focus={left:(e.left??0)/100,top:(e.top??0)/100,right:1-(e.right??0)/100,bottom:1-(e.bottom??0)/100}}}else{if(n.name!==`tileRect`)return;{let e=Ve(n);if(!e)return;r.tileRect=e}}return r})(t);case`pattFill`:{let n=L(t,[`prst`]);if(!n)return;let r={type:e.Type.Pattern};n.prst!==void 0&&(r.patternType=n.prst);for(let e of S(t)){let t=e.name===`fgClr`||e.name===`bgClr`?Ie(e):void 0;if(!t)return;e.name===`fgClr`?r.foreground=t:r.background=t}return r}}},We=(t,n)=>{switch(n.type){case e.Type.None:t.open(I(`noFill`),null,!0);return;case e.Type.Group:t.open(I(`grpFill`),null,!0);return;case e.Type.Solid:ze(t,`solidFill`,n.color);return;case e.Type.Gradient:((t,n)=>{let r=[];if(n.flip!==void 0&&r.push([`flip`,n.flip]),n.isRotatedWithShape!==void 0&&r.push([`rotWithShape`,D(n.isRotatedWithShape)]),t.open(I(`gradFill`),r),n.stops){t.open(I(`gsLst`));for(let e of n.stops){let{offset:n,color:r}=typeof e==`string`?{offset:0,color:e}:e;ze(t,`gs`,r,[[`pos`,String(Math.round(1e5*(n??0)))]])}t.close(I(`gsLst`))}if(n.gradientType===e.GradientType.Linear){let e=[];n.angle!==void 0&&e.push([`ang`,String(Math.round((n.angle-90+360)%360*6e4))]),n.scaled!==void 0&&e.push([`scaled`,D(n.scaled)]),t.open(I(`lin`),e,!0)}else if(n.gradientType!==void 0){let r=n.gradientType===e.GradientType.Path?`circle`:n.gradientType;n.focus?(t.open(I(`path`),[[`path`,r]]),He(t,`fillToRect`,{left:100*n.focus.left,top:100*n.focus.top,right:100*(1-n.focus.right),bottom:100*(1-n.focus.bottom)}),t.close(I(`path`))):t.open(I(`path`),[[`path`,r]],!0)}n.tileRect&&He(t,`tileRect`,n.tileRect),t.close(I(`gradFill`))})(t,n);return;case e.Type.Pattern:{let e=n,r=e.patternType===void 0?[]:[[`prst`,e.patternType]];e.foreground===void 0&&e.background===void 0?t.open(I(`pattFill`),r,!0):(t.open(I(`pattFill`),r),e.foreground!==void 0&&ze(t,`fgClr`,e.foreground),e.background!==void 0&&ze(t,`bgClr`,e.background),t.close(I(`pattFill`)));return}}throw Error(`A chart cannot write a fill of type '${n.type}'.`)},Ge=e=>je({tags:Be,key:e,ns:`a`,read:e=>Ue(e),write:(e,t)=>We(e,t)}),Ke={tags:[`effectLst`],key:`effects`,ns:`a`,read:e=>S(e).length===0&&T(e).length===0?[]:void 0,write:(e,t)=>{if(t.length>0)throw Error(`A chart cannot write effects yet.`);e.open(I(`effectLst`),null,!0)}},qe={rnd:`round`,flat:`butt`,sq:`square`},Je=(e,t)=>({tags:[e],key:`${t}Type`,ns:`a`,read:e=>{let t=L(e,[`type`,`w`,`len`]);if(t&&!(S(e).length>0)&&Object.keys(t).length!==0)return t},write:(t,n)=>{let r=[];for(let e of[`type`,`w`,`len`])n[e]!==void 0&&r.push([e,n[e]]);t.open(I(e),r,!0)},get:e=>{let n={};return e[`${t}Type`]!==void 0&&(n.type=e[`${t}Type`]),e[`${t}Width`]!==void 0&&(n.w=e[`${t}Width`]),e[`${t}Length`]!==void 0&&(n.len=e[`${t}Length`]),Object.keys(n).length>0?n:void 0},set:(e,n)=>{n.type!==void 0&&(e[`${t}Type`]=n.type),n.w!==void 0&&(e[`${t}Width`]=n.w),n.len!==void 0&&(e[`${t}Length`]=n.len)}}),Ye={attributes:[F(`w`,`int`,`width`,12700),Ae(`cap`,`lineCap`,e=>qe[e],e=>Object.keys(qe).find(t=>qe[t]===e)),F(`cmpd`,`str`,`compound`),F(`algn`,`str`,`align`)],fields:[Ge(`fill`),{tags:[`prstDash`,`custDash`],key:`dash`,ns:`a`,read:e=>{if(e.name===`prstDash`){let t=L(e,[`val`]);return t?.val!==void 0&&S(e).length===0?t.val:void 0}if(T(e).length>0)return;let t=[];for(let n of S(e)){let e=n.name===`ds`?L(n,[`d`,`sp`]):null;if(!e||!R.test(e.d??``)||!R.test(e.sp??``))return;t.push(Number(e.d)/1e3,Number(e.sp)/1e3)}return t},write:(e,t)=>{if(typeof t!=`string`){e.open(I(`custDash`));for(let n=0;n<t.length;n+=2)e.open(I(`ds`),[[`d`,String(Math.round(1e3*t[n]))],[`sp`,String(Math.round(1e3*t[n+1]))]],!0);e.close(I(`custDash`))}else e.val(I(`prstDash`),t)}},{tags:[`round`,`bevel`,`miter`],key:`lineJoin`,ns:`a`,read:e=>{let t=L(e,e.name===`miter`?[`lim`]:[]);if(t&&!(S(e).length>0)&&(t.lim===void 0||R.test(t.lim)))return{join:e.name,limit:t.lim===void 0?void 0:Number(t.lim)/1e5}},write:(e,t)=>{e.open(I(t.join),t.limit===void 0?null:[[`lim`,String(Math.round(1e5*t.limit))]],!0)},get:e=>e.lineJoin?{join:e.lineJoin,limit:e.miterLimit}:void 0,set:(e,t)=>{e.lineJoin=t.join,t.limit!==void 0&&(e.miterLimit=t.limit)}},Je(`headEnd`,`head`),Je(`tailEnd`,`tail`)]},Xe=e=>je(P(`ln`,Ye,e,{ns:`a`})),Ze={fields:[Ge(`fill`),Xe(`stroke`),Ke]},Qe=(e,n,r)=>({tags:[e],key:n,ns:`a`,read:e=>{let n=L(e,[`typeface`]);if(!(n?.typeface===void 0||S(e).length>0))return r&&n.typeface===`+mn-${r}`?t.ThemeFamily.Body:r&&n.typeface===`+mj-${r}`?t.ThemeFamily.Heading:n.typeface},write:(n,i)=>{let a=r?i===t.ThemeFamily.Body?`+mn-${r}`:i===t.ThemeFamily.Heading?`+mj-${r}`:i:i;n.open(I(e),[[`typeface`,a]],!0)}}),$e=(e,t,n)=>{let r=Object.fromEntries(Object.entries(n).map(([e,t])=>[t,e]));return Ae(e,t,e=>r[e],e=>n[e]??e)},et={attributes:[F(`lang`,`str`,`language`),F(`altLang`,`str`,`alternateLanguage`),F(`sz`,`int`,`size`,100),Ae(`b`,`weight`,e=>{let t=E(e);return t===null?void 0:t?700:400},e=>D(e>=600)),Ae(`i`,`style`,e=>{let t=E(e);return t===null?void 0:t?`italic`:`normal`},e=>D(e===`italic`)),$e(`u`,`underline`,{none:`none`,words:`words`,single:`sng`,double:`dbl`,heavy:`heavy`,dotted:`dotted`,dottedHeavy:`dottedHeavy`,dash:`dash`,dashHeavy:`dashHeavy`,dashLong:`dashLong`,dashLongHeavy:`dashLongHeavy`,dotDash:`dotDash`,dotDashHeavy:`dotDashHeavy`,dotDotDash:`dotDotDash`,dotDotDashHeavy:`dotDotDashHeavy`,wavy:`wavy`,wavyHeavy:`wavyHeavy`,wavyDouble:`wavyDbl`}),$e(`strike`,`strike`,{none:`noStrike`,single:`sngStrike`,double:`dblStrike`}),F(`kern`,`int`,`kerning`,100),$e(`cap`,`capitals`,{none:`none`,small:`small`,all:`all`}),F(`spc`,`int`,`letterSpacing`,100),F(`normalizeH`,`bool`,`normalizeHeight`),F(`baseline`,`int`,`baseline`,1e3)],fields:[Xe(`outline`),Ge(`color`),Ke,Qe(`latin`,`latin`,`lt`),Qe(`ea`,`eastAsian`,`ea`),Qe(`cs`,`complexScript`,`cs`),Qe(`sym`,`symbol`)]},tt={attributes:[F(`algn`,`str`,`align`),F(`rtl`,`bool`,`rtl`)],fields:[P(`defRPr`,et,`defaultRun`,{ns:`a`})]},nt={fields:[P(`rPr`,et,`rPr`,{ns:`a`}),{tags:[`t`],key:`text`,ns:`a`,read:e=>{if(S(e).length>0)return;let t=!1;for(let[n,r]of T(e))if(n!==`xmlns`&&!n.startsWith(`xmlns:`)){if(n!==`xml:space`||r!==`preserve`)return;t=!0}return{text:C(e),preserve:t}},get:e=>e.text===void 0?void 0:{text:e.text,preserve:!0===e.preserveSpace},set:(e,t)=>{e.text=t.text,t.preserve&&(e.preserveSpace=!0)},write:(e,t)=>{let n=I(`t`),r=t.preserve?[[`xml:space`,`preserve`]]:null;t.text===``?e.open(n,r,!0):e.open(n,r).text(t.text).close(n)}}]},rt={attributes:[F(`id`,`str`,`id`),F(`type`,`str`,`type`)],fields:nt.fields},it={fields:[P(`rPr`,et,`rPr`,{ns:`a`})]},at={fields:[P(`pPr`,tt,`pPr`,{ns:`a`}),{tags:[`r`,`br`,`fld`],key:`runs`,ns:`a`,many:!0,read:(e,t,n)=>{if(e.name===`br`)return{...k(e,it,t,n),text:`
1
+ import{Q as e,Y as t,bt as n}from"./COL9dj40ytErlGak.js";import{i as r}from"./CQukCzhuewMuFOlO.js";import{A as i,Nt as a,dt as o,z as s}from"./DMbhlzvflyxF5Clt.js";var c=[`customMenu`,`description`,`help`,`statusBar`,`shortcutKey`],l=[`function`,`vbProcedure`,`xlm`,`publishToServer`,`workbookParameter`],u=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords`,d=class extends Error{},f=()=>{throw new d},p={t:`z`,v:0},m=/<([snbdemx])((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/g,h=(e,t,n)=>{try{return _(e,t,n)}catch(e){if(e instanceof d)return null;throw e}},g=e=>{let t=o(e,`cacheSource`);if(!t||i(t.attributes).get(`type`)!==`worksheet`)return;let n=o(e,`worksheetSource`,t.contentStart,t.end);if(!n)return;let r=i(n.attributes);if(r.has(`r:id`))return;let a={};for(let e of[`ref`,`sheet`,`name`]){let t=r.get(e);t!==void 0&&(a[e]=t)}return a},_=(e,t,n)=>{let r=e.xml??f(),a=ee(r,`pivotCacheDefinition`)??f(),c=i(a.attributes),l=c.get(`r:id`),u=e.parts?.find(e=>e.id===l&&e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords`)?.xml??null;l!==void 0&&u===null&&f();let d=g(r)??f(),p=o(r,`cacheSource`)??f(),m=o(r,`worksheetSource`,p.contentStart,p.end)??f(),h=o(r,`cacheFields`)??f(),_=[],re=h.contentStart;for(;;){let e=o(r,`cacheField`,re,h.contentEnd);if(!e)break;_.push(ne(r,e,_.length,t,n)),re=e.end}let v=o(r,`calculatedItems`);v&&te(r,v,_);let ie=u===null?parseInt(c.get(`recordCount`)??`0`,10):y(u,_.filter(e=>e.records!==null),t),b=[],ae=[];for(let e=0;e<_.length;e++){let t=_[e];t.hasDate&&t.hasNumber?t.json.dateItems=t.dateItems:t.hasDate&&(t.json.dates=!0),t.items.length>0&&b.push([e,[[0,t.items]]]),t.records&&t.records.length>0&&ae.push([e,[[0,t.records]]])}let oe=v?r.substring(0,v.start)+r.substring(v.end):r,se=o(oe,`cacheFields`)??f(),x=oe.substring(0,se.start)+oe.substring(se.end),S=r.substring(m.start,m.start+m.attributes.length+16);x=x.replace(S,()=>`<worksheetSource`+s(m.attributes,[`ref`,`sheet`,`name`])),x=x.replace(a.tag,()=>`<pivotCacheDefinition`+s(a.attributes,[`r:id`,`recordCount`,`refreshOnLoad`]));let C={source:d,fields:_.map(e=>e.json),items:b,recordCount:ie,rest:x};u!==null&&(C.records=ae);let ce=c.get(`refreshOnLoad`);return ce!==`1`&&ce!==`true`||(C.refreshOnLoad=!0),C},ee=(e,t)=>{let n=RegExp(`<${t}((?:\\s+[^\\s=/>]+\\s*=\\s*(?:"[^"]*"|'[^']*'))*)`).exec(e);return n?{tag:n[0],attributes:n[1]}:null},te=(e,t,n)=>{let r=t.contentStart;for(;;){let a=o(e,`calculatedItem`,r,t.contentEnd);if(!a)break;r=a.end;let s=i(a.attributes).get(`formula`)??f(),c=[...e.substring(a.contentStart,a.contentEnd).matchAll(/<reference\s[^>]*?field="(\d+)"[^>]*>\s*<x(?:\s+v="(\d+)")?\s*\/>\s*<\/reference>/g)];c.length!==1&&f();let l=n[parseInt(c[0][1],10)]??f();(l.json.calculatedItems??=[]).push({item:c[0][2]?parseInt(c[0][2],10):0,formula:s})}},ne=(e,t,n,r,c)=>{let l=i(t.attributes),u={name:l.get(`name`)??f()},d=l.get(`numFmtId`),p=d===void 0?void 0:c(parseInt(d,10));p!==void 0&&(u.numberFormat=p);let h=l.get(`databaseField`)===`0`;h&&(u.noRecords=!0);let g=l.get(`formula`);g!==void 0&&(u.formula=g);let _=o(e,`fieldGroup`,t.contentStart,t.contentEnd);_&&(u.group=((e,t,n,r)=>{let s=i(t.attributes),c=e=>e===void 0?void 0:parseInt(e,10),l={base:c(s.get(`base`))??n,items:[]},u=c(s.get(`par`));u!==void 0&&(l.parent=u);let d=o(e,`groupItems`,t.contentStart,t.contentEnd);if(d){let t=e.substring(d.contentStart,d.contentEnd);m.lastIndex=0;let n,a=0,o={items:l.items,hasDate:!1,hasNumber:!1,dateItems:[]};for(;n=m.exec(t);)(n[3]!==`/`||t.substring(a,n.index).trim())&&f(),l.items.push(v(n[1],i(n[2]).get(`v`),o,r)),a=m.lastIndex;t.substring(a).trim()&&f(),o.hasDate&&(l.dateItems=o.dateItems)}let p=o(e,`rangePr`,t.contentStart,t.contentEnd);if(p){let e=i(p.attributes),t=e.get(`groupBy`)??`range`,n=t!==`range`,o=t=>{let i=e.get(`${t}${n?`Date`:`Num`}`)??f(),o=n?a(i,r):Number(i);return o!==null&&Number.isFinite(o)?o:f()},s={by:n?t:`numbers`,start:o(`start`),end:o(`end`)},c=e.get(`groupInterval`);c!==void 0&&(s.interval=Number(c)),e.get(`autoStart`)===`0`&&(s.fixedStart=!0),e.get(`autoEnd`)===`0`&&(s.fixedEnd=!0),l.range=s}let h=o(e,`discretePr`,t.contentStart,t.contentEnd);if(h){let t=e.substring(h.contentStart,h.contentEnd);l.discrete=Array.from(t.matchAll(/<x((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*\/>/g),e=>c(i(e[1]).get(`v`))??0)}return l})(e,_,n,r));let ee=h?null:o(e,`sharedItems`,t.contentStart,t.contentEnd),te={json:u,items:[],byValue:null,records:h?null:[],hasDate:!1,hasNumber:!1,dateItems:[]},ne=[ee,_].filter(e=>!!e).sort((e,t)=>e.start-t.start),y=``,ie=t.contentStart;for(let t of ne)y+=e.substring(ie,t.start),ie=t.end;y+=e.substring(ie,t.contentEnd),ee&&re(e.substring(ee.contentStart,ee.contentEnd),te,r),h||te.items.length!==0||(u.inline=!0,te.byValue=new Map);let b=s(t.attributes,[`name`,`numFmtId`,`databaseField`,`formula`]);return(b.trim()||y.trim())&&(u.rest=y.trim()?`<cacheField${b}>${y}</cacheField>`:`<cacheField${b}/>`),te},re=(e,t,n)=>{m.lastIndex=0;let r,a=0;for(;r=m.exec(e);){e.substring(a,r.index).trim()&&f();let[,o,s,c]=r;c===`/`&&o!==`x`||f();let l=i(s);for(let e of l.keys())e!==`v`&&e!==`u`&&e!==`f`&&f();let u=l.get(`u`);u!==`1`&&u!==`true`||(t.json.unused??=[]).push(t.items.length),t.items.push(v(o,l.get(`v`),t,n)),a=m.lastIndex}e.substring(a).trim()&&f()},v=(e,t,n,i)=>{switch(e){case`m`:return p;case`s`:return t??f();case`n`:{let e=t===void 0?NaN:Number(t);return Number.isFinite(e)||f(),n.hasNumber=!0,e}case`d`:{let e=t===void 0?null:a(t,i);return e===null&&f(),n.hasDate=!0,n.dateItems.push(n.items.length),e}case`b`:return t===`1`||t===`true`;case`e`:{let e=t===void 0?void 0:r.getBuiltInByLabel(t);return e||f(),{t:`e`,v:e.getCode()}}default:return f()}},y=(e,t,n)=>{let r=o(e,`pivotCacheRecords`)??f(),i=e.substring(r.contentStart,r.contentEnd),a=/<r>([\s\S]*?)<\/r>|<r\/>/g,s,c=0,l=0;for(;s=a.exec(i);)i.substring(l,s.index).trim()&&f(),ie(s[1]??``,t,n),c++,l=a.lastIndex;return i.substring(l).trim()&&f(),c},ie=(e,t,n)=>{m.lastIndex=0;let r,a=0,o=0;for(;r=m.exec(e);){e.substring(o,r.index).trim()&&f();let[,s,c,l]=r;l!==`/`&&f();let u=t[a++]??f(),d=i(c);for(let e of d.keys())e!==`v`&&f();let p=d.get(`v`);if(s===`x`){let e=p===void 0?NaN:Number(p);(u.byValue||!Number.isInteger(e)||e<0||e>=u.items.length)&&f(),u.records.push(e)}else{let e=u.byValue??f(),t=s+(p??``),r=e.get(t);r===void 0&&(r=u.items.length,u.items.push(v(s,p,u,n)),e.set(t,r)),u.records.push(r)}o=m.lastIndex}(e.substring(o).trim()||a!==t.length)&&f()},b=/<!\[CDATA\[([\s\S]*?)\]\]>|<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!DOCTYPE[^>]*>|<(\/?)([^\s/>]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|([^<]+)/g,ae={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},oe=e=>e.indexOf(`&`)===-1?e:e.replace(/&(#x[0-9a-fA-F]+|#\d+|\w+);/g,(e,t)=>{if(t[0]!==`#`)return ae[t]??e;let n=t[1]===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Number.isFinite(n)?String.fromCodePoint(n):e}),se=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},x=e=>{let t={name:``,qname:``,attrs:``,children:[],start:0,end:e.length,contentStart:0,contentEnd:e.length},n=[t];b.lastIndex=0;for(let t=b.exec(e);t;t=b.exec(e)){let e=n[n.length-1];if(t[1]!==void 0)e.children.push(t[1]);else if(t[6]!==void 0)e.children.push(oe(t[6]));else if(t[3]!==void 0){if(t[2]){if(n.length>1){let e=n.pop();e.contentEnd=t.index,e.end=t.index+t[0].length}continue}let r=t.index+t[0].length,i={name:se(t[3]),qname:t[3],attrs:t[4]??``,children:[],start:t.index,end:r,contentStart:r,contentEnd:r};e.children.push(i),t[5]||n.push(i)}}return t.children.find(e=>typeof e!=`string`)??null},S=e=>e.children.filter(e=>typeof e!=`string`),C=e=>{let t=``;for(let n of e.children)typeof n==`string`&&(t+=n);return t},ce=`http://schemas.openxmlformats.org/drawingml/2006/chart`,le=`http://purl.oclc.org/ooxml/drawingml/chart`,ue=`http://schemas.openxmlformats.org/drawingml/2006/main`,de=`http://purl.oclc.org/ooxml/drawingml/main`,fe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,pe=`http://schemas.microsoft.com/office/drawing/2012/chart`,me=`http://schemas.microsoft.com/office/drawing/2014/chartex`,he=`http://www.w3.org/XML/1998/namespace`,w={c:`c`,a:`a`,r:`r`,c15:`c15`,cx:`cx`},ge=e=>e===ce||e===le,_e=e=>e===ue||e===de,ve=e=>e===me,ye=Object.freeze({xml:he}),be=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,T=e=>{let t=[];be.lastIndex=0;for(let n=be.exec(e.attrs);n;n=be.exec(e.attrs))t.push([n[1],oe(n[2]??n[3]??``)]);return t},xe=(e,t)=>{let n=null;for(let[r,i]of T(e))r===`xmlns`?(n??={...t})[``]=i:r.startsWith(`xmlns:`)&&((n??={...t})[r.slice(6)]=i);return n??t},Se=(e,t)=>t[(e=>{let t=e.indexOf(`:`);return t===-1?``:e.slice(0,t)})(e.qname)],Ce=class{constructor(){this._parts=[]}open(e,t,n=!1){let r=`<`+e;if(t)for(let[e,n]of t)r+=` ${e}="${we(n)}"`;return this._parts.push(r+(n?`/>`:`>`)),this}close(e){return this._parts.push(`</${e}>`),this}val(e,t){return this.open(e,[[`val`,t]],!0)}text(e){return this._parts.push((e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`))(e)),this}raw(e){return this._parts.push(e),this}toString(){return this._parts.join(``)}},we=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/"/g,`&quot;`),E=e=>e===`1`||e===`true`||e!==`0`&&e!==`false`&&null,D=e=>e?`1`:`0`,Te=/^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?$/,O=e=>{let t=E(e);return t===null?Te.test(e)?String(Number(e)):e:D(t)},Ee=new Set(`date1904.roundedCorners.autoTitleDeleted.plotVisOnly.showDLblsOverMax.varyColors.marker.smooth.invertIfNegative.bubble3D.delete.showLegendKey.showVal.showCatName.showSerName.showPercent.showBubbleSize.showLeaderLines.overlay.rAngAx.showHorzBorder.showVertBorder.showOutline.showKeys.auto.noMultiLvlLbl.wireframe.showNegBubbles.autoUpdate.applyToFront.applyToSides.applyToEnd.chartObject.data.formatting.selection.userInterface`.split(`.`)),De=(e,t,n=!1)=>{let r=xe(e,t),i=Se(e,r)??``,a=[];for(let[t,n]of T(e)){if(t===`xmlns`||t.startsWith(`xmlns:`))continue;let e=t.indexOf(`:`),i=e===-1?t:`{${r[t.slice(0,e)]??t.slice(0,e)}}${t.slice(e+1)}`;a.push(`${i}=${JSON.stringify(O(n))}`)}let o=S(e),s=o.length===0?e.children.join(``):``;a.length===0&&o.length===0&&s===``&&ge(i)&&Ee.has(e.name)&&a.push(`val="1"`),a.sort();let c=`<{${i}}${e.name}${a.length?` `+a.join(` `):``}>`;if(o.length>0){let t=[];for(let i of e.children)typeof i==`string`?i.trim()!==``&&t.push(JSON.stringify(i)):t.push(De(i,r,n));n&&t.sort(),c+=t.join(``)}else s!==``&&(c+=JSON.stringify(s));return c+`</>`},Oe=class{constructor(e,t){this.xml=e,this.rootScope=t,this.kept=0,this.reordered=0;let n=Object.values(t).find(ge)??ce,r=_e(t[w.a])?t[w.a]:ue;this.writeScope={...t,[w.c]:n,[w.cx]:me,[w.a]:r,[w.r]:t[w.r]??fe}}markupOf(e,t){let n=this.xml.slice(e.start,e.end),r=new Set(T(e).map(([e])=>e).filter(e=>e===`xmlns`||e.startsWith(`xmlns:`))),i=``;for(let e of Object.keys(t))e!==`xml`&&t[e]!==this.rootScope[e]&&(r.has(e===``?`xmlns`:`xmlns:${e}`)||(i+=e===``?` xmlns="${t[e]}"`:` xmlns:${e}="${t[e]}"`));if(i){let t=1+e.qname.length;n=n.slice(0,t)+i+n.slice(t)}return n}},ke=(e,t)=>{switch(e){case`c`:return ge(t);case`c15`:return t===pe;case`cx`:return ve(t);default:return _e(t)}},k=(e,t,n,r)=>{let i=xe(e,n),a={},o,s;for(let[n,r]of T(e)){let e=t.attributes?.find(e=>e.name===n),i=e?e.read(r):void 0;e&&i!==void 0&&O(e.write(i))===O(r)?a[e.key]=i:(o??={})[n]=r}let c=-1,l=``,u={};for(let n of S(e)){let e=xe(n,i),o=Se(n,e),d=t.fields.findIndex(e=>e.tags.includes(n.name)&&ke(e.ns,o)),f=d===-1?null:t.fields[d],p=f&&!f.many?f.get?f.get(a):a[f.key]:void 0,m=d>c||d===c&&!!f?.many;if(f&&p===void 0&&(m||!f.many)){let t=f.read(n,e,r);if(t!==void 0){f.many?(a[f.key]??=[]).push(t):f.set?f.set(a,t):a[f.key]=t,u[f.key]=(u[f.key]??0)+1,m?(c=d,l=n.name):r.reordered++;continue}}let h=c===-1?null:t.fields[c],g={after:l,xml:r.markupOf(n,i)};h?.many&&(g.at=u[h.key]),(s??=[]).push(g)}return(o||s)&&(a.unknown={},s&&(a.unknown.elements=s),o&&(a.unknown.attributes=o)),t.afterRead?.(a,e,i,r),a},A=(e,t,n,r)=>{let i=[];for(let e of r.attributes??[]){let t=n[e.key];t!==void 0&&i.push([e.name,e.write(t)])}let a=n.unknown;if(a?.attributes)for(let e of Object.keys(a.attributes))i.push([e,a.attributes[e]]);for(let e of r.declares?.(n)??[])i.some(([t])=>t===e[0])||i.push(e);let o=new Ce,s=a?.elements?[...a.elements]:[],c=e=>{for(let t=0;t<s.length;t++)e(s[t])&&(o.raw(s[t].xml),s.splice(t--,1))};c(e=>e.after===``);for(let e of r.fields){let t=e.get?e.get(n):n[e.key],r=t=>e.tags.includes(t.after);if(e.many){let n=t??[];for(let t=0;t<n.length;t++)e.write(o,n[t]),c(e=>r(e)&&e.at===t+1)}else t!==void 0&&e.write(o,t);c(r)}c(()=>!0);let l=o.toString();l===``?e.open(t,i,!0):e.open(t,i).raw(l).close(t)},j=(e,t)=>`${w[e]}:${t}`,M=(e,t,n=e,r=`c`)=>({tags:[e],key:n,ns:r,read:e=>{let n=(e=>{if(S(e).length>0)return;let t=null;for(let[n,r]of T(e)){if(n!==`val`)return;t=r}return t})(e);if(n===void 0)return;if(t===`bool`)return n===null||(E(n)??void 0);if(n===null)return;if(t===`str`)return n;let r=Number(n);return Number.isFinite(r)&&(t!==`int`||Number.isInteger(r))&&O(String(r))===O(n)?r:void 0},write:(n,i)=>{n.val(j(r,e),t===`bool`?D(i):String(i))}}),N=(e,t=e,n=`c`)=>({tags:[e],key:t,ns:n,read:e=>{if(!(S(e).length>0||T(e).some(([e])=>!e.startsWith(`xmlns`))))return C(e)},write:(t,r)=>{let i=j(n,e);r===``?t.open(i,null,!0):t.open(i).text(r).close(i)}}),P=(e,t,n=e,r)=>{let i=r?.ns??`c`,a=typeof t==`function`?t:()=>t;return{tags:[e],key:n,ns:i,many:r?.many,read:(e,t,n)=>k(e,a(),t,n),write:(t,n)=>A(t,j(i,e),n,a())}},F=(e,t,n=e,r=1)=>({name:e,key:n,read:e=>{if(t===`str`)return e;if(t===`bool`)return E(e)??void 0;let n=Number(e);return Number.isFinite(n)&&(t!==`int`||Number.isInteger(n))?r===1?n:n/r:void 0},write:e=>t===`bool`?D(e):t===`str`?e:String(r===1?e:Math.round(e*r))}),Ae=(e,t,n,r)=>({name:e,key:t,read:n,write:r}),je=e=>({...e,read:(t,n,r)=>{let i=e.read(t,n,r);if(i===void 0)return;let a=new Ce;e.write(a,i);let o=((e,t)=>{let n=x(e);return n?De(n,t):null})(a.toString(),r.writeScope)===De(t,n);return o||r.kept++,o?i:void 0}}),I=e=>`a:${e}`,Me=new Set([`bg1`,`tx1`,`bg2`,`tx2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`,`phClr`,`dk1`,`lt1`,`dk2`,`lt2`]),Ne=new Set(`scrollBar.background.activeCaption.inactiveCaption.menu.window.windowFrame.menuText.windowText.captionText.activeBorder.inactiveBorder.appWorkspace.highlight.highlightText.btnFace.btnShadow.grayText.btnText.inactiveCaptionText.btnHighlight.3dDkShadow.3dLight.infoText.infoBk.hotLight.gradientActiveCaption.gradientInactiveCaption.menuHighlight.menuBar`.split(`.`)),Pe=[`scrgbClr`,`srgbClr`,`hslClr`,`sysClr`,`schemeClr`,`prstClr`],Fe=e=>e===`hue`||e===`hueOff`||e===`hueMod`?6e4:e===`alpha`||e===`alphaOff`||e===`alphaMod`?1e5:1e3,L=(e,t)=>{let n={};for(let[r,i]of T(e)){if(!t.includes(r))return null;n[r]=i}return n},R=/^-?\d+$/,Ie=e=>{let t=S(e);return t.length===0?null:t.length>1||!Pe.includes(t[0].name)?void 0:(e=>{let t;switch(e.name){case`scrgbClr`:{let n=L(e,[`r`,`g`,`b`]);if(!(n&&R.test(n.r??``)&&R.test(n.g??``)&&R.test(n.b??``)))return;t=`lrgb(${Number(n.r)/1e3},${Number(n.g)/1e3},${Number(n.b)/1e3})`;break}case`hslClr`:{let n=L(e,[`hue`,`sat`,`lum`]);if(!(n&&R.test(n.hue??``)&&R.test(n.sat??``)&&R.test(n.lum??``)))return;t=`hsl(${Number(n.hue)/6e4},${Number(n.sat)/1e3},${Number(n.lum)/1e3})`;break}case`sysClr`:{let n=L(e,[`val`,`lastClr`]);if(!n?.val||!Ne.has(n.val))return;t=n.lastClr===void 0?n.val:`${n.val} lastClr ${n.lastClr}`;break}default:{let n=L(e,[`val`]);if(!n?.val||/\s/.test(n.val)||(Me.has(n.val)?`schemeClr`:/^[0-9A-Fa-f]{6}$/.test(n.val)?`srgbClr`:`prstClr`)!==e.name)return;t=n.val}}for(let n of S(e)){if(S(n).length>0)return;let e=L(n,[`val`]);if(!e)return;if(e.val!==void 0){if(!R.test(e.val))return;t+=` ${n.name} ${Number(e.val)/Fe(n.name)}`}else t+=` ${n.name}`}return t})(t[0])},Le=/^-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i,Re=(e,t)=>{let r=(e=>{let t=e.trim(),n=/^[a-z]+\([^)]*\)|^[^\s,]+/i.exec(t)?.[0]??t,r=t.slice(n.length).split(/\s*,\s*|\s+/).filter(e=>e!==``);return[n.replace(/\s+/g,``),...r]})(t),i=r.shift(),a,o,s=/^(lrgb|hsl)\(([^,]+),([^,]+),([^)]+)\)$/.exec(i);if(s?.[1]===`lrgb`)a=`scrgbClr`,o=[[`r`,String(Math.round(1e3*Number(s[2])))],[`g`,String(Math.round(1e3*Number(s[3])))],[`b`,String(Math.round(1e3*Number(s[4])))]];else if(s?.[1]===`hsl`)a=`hslClr`,o=[[`hue`,String(Math.round(6e4*Number(s[2])))],[`sat`,String(Math.round(1e3*Number(s[3])))],[`lum`,String(Math.round(1e3*Number(s[4])))]];else if(r[0]===`lastClr`||Ne.has(i))a=`sysClr`,o=[[`val`,i]],r[0]===`lastClr`&&(r.shift(),o.push([`lastClr`,r.shift()]));else{let e=(e=>{if(Me.has(e)||/^[0-9A-Fa-f]{6}$/.test(e)||/^[a-z]+$/i.test(e))return null;let t;try{t=new n(e)}catch{return null}let r=t.getType();return r===`hex`||r===`rgb`||r===`hsl`?t.toHex().toString(!1).replace(`#`,``).toUpperCase():null})(i);a=e?`srgbClr`:Me.has(i)?`schemeClr`:/^[0-9A-Fa-f]{6}$/.test(i)?`srgbClr`:`prstClr`,o=[[`val`,e??i]]}if(r.length!==0){e.open(I(a),o);for(let t=0;t<r.length;t++){let n=r[t];t+1<r.length&&Le.test(r[t+1])?e.val(I(n),String(Math.round(Number(r[++t])*Fe(n)))):e.open(I(n),null,!0)}e.close(I(a))}else e.open(I(a),o,!0)},ze=(e,t,n,r)=>{n===void 0?e.open(I(t),r,!0):(e.open(I(t),r),Re(e,n),e.close(I(t)))},Be=[`noFill`,`solidFill`,`gradFill`,`pattFill`,`grpFill`],Ve=e=>{let t=L(e,[`l`,`t`,`r`,`b`]);if(!t)return;let n={};return t.l!==void 0&&(n.left=Number(t.l)/1e3),t.t!==void 0&&(n.top=Number(t.t)/1e3),t.r!==void 0&&(n.right=Number(t.r)/1e3),t.b!==void 0&&(n.bottom=Number(t.b)/1e3),n},He=(e,t,n)=>{let r=[];n.left!==void 0&&r.push([`l`,String(Math.round(1e3*n.left))]),n.top!==void 0&&r.push([`t`,String(Math.round(1e3*n.top))]),n.right!==void 0&&r.push([`r`,String(Math.round(1e3*n.right))]),n.bottom!==void 0&&r.push([`b`,String(Math.round(1e3*n.bottom))]),e.open(I(t),r,!0)},Ue=t=>{switch(t.name){case`noFill`:return S(t).length===0&&T(t).length===0?{type:e.Type.None}:void 0;case`grpFill`:return S(t).length===0&&T(t).length===0?{type:e.Type.Group}:void 0;case`solidFill`:{if(T(t).length>0)return;let n=Ie(t);return n===void 0?void 0:n===null?{type:e.Type.Solid}:{type:e.Type.Solid,color:n}}case`gradFill`:return(t=>{let n=L(t,[`rotWithShape`,`flip`]);if(!n)return;let r={type:e.Type.Gradient};if(n.rotWithShape!==void 0){let e=E(n.rotWithShape);if(e===null)return;r.isRotatedWithShape=e}n.flip!==void 0&&(r.flip=n.flip);for(let n of S(t))if(n.name===`gsLst`){let e=[];for(let t of S(n)){let n=t.name===`gs`?L(t,[`pos`]):null,r=n&&R.test(n.pos??``)?Ie(t):void 0;if(!r)return;e.push({offset:Number(n.pos)/1e5,color:r})}r.stops=e}else if(n.name===`lin`){let t=L(n,[`ang`,`scaled`]);if(!t||S(n).length>0)return;if(r.gradientType=e.GradientType.Linear,t.ang!==void 0){if(!R.test(t.ang))return;r.angle=(Number(t.ang)/6e4+90)%360}if(t.scaled!==void 0){let e=E(t.scaled);if(e===null)return;r.scaled=e}}else if(n.name===`path`){let t=L(n,[`path`]);if(!t)return;r.gradientType=t.path===`circle`?e.GradientType.Path:t.path;let i=S(n);if(i.length>1||i.length===1&&i[0].name!==`fillToRect`)return;if(i.length===1){let e=Ve(i[0]);if(!e)return;r.focus={left:(e.left??0)/100,top:(e.top??0)/100,right:1-(e.right??0)/100,bottom:1-(e.bottom??0)/100}}}else{if(n.name!==`tileRect`)return;{let e=Ve(n);if(!e)return;r.tileRect=e}}return r})(t);case`pattFill`:{let n=L(t,[`prst`]);if(!n)return;let r={type:e.Type.Pattern};n.prst!==void 0&&(r.patternType=n.prst);for(let e of S(t)){let t=e.name===`fgClr`||e.name===`bgClr`?Ie(e):void 0;if(!t)return;e.name===`fgClr`?r.foreground=t:r.background=t}return r}}},We=(t,n)=>{switch(n.type){case e.Type.None:t.open(I(`noFill`),null,!0);return;case e.Type.Group:t.open(I(`grpFill`),null,!0);return;case e.Type.Solid:ze(t,`solidFill`,n.color);return;case e.Type.Gradient:((t,n)=>{let r=[];if(n.flip!==void 0&&r.push([`flip`,n.flip]),n.isRotatedWithShape!==void 0&&r.push([`rotWithShape`,D(n.isRotatedWithShape)]),t.open(I(`gradFill`),r),n.stops){t.open(I(`gsLst`));for(let e of n.stops){let{offset:n,color:r}=typeof e==`string`?{offset:0,color:e}:e;ze(t,`gs`,r,[[`pos`,String(Math.round(1e5*(n??0)))]])}t.close(I(`gsLst`))}if(n.gradientType===e.GradientType.Linear){let e=[];n.angle!==void 0&&e.push([`ang`,String(Math.round((n.angle-90+360)%360*6e4))]),n.scaled!==void 0&&e.push([`scaled`,D(n.scaled)]),t.open(I(`lin`),e,!0)}else if(n.gradientType!==void 0){let r=n.gradientType===e.GradientType.Path?`circle`:n.gradientType;n.focus?(t.open(I(`path`),[[`path`,r]]),He(t,`fillToRect`,{left:100*n.focus.left,top:100*n.focus.top,right:100*(1-n.focus.right),bottom:100*(1-n.focus.bottom)}),t.close(I(`path`))):t.open(I(`path`),[[`path`,r]],!0)}n.tileRect&&He(t,`tileRect`,n.tileRect),t.close(I(`gradFill`))})(t,n);return;case e.Type.Pattern:{let e=n,r=e.patternType===void 0?[]:[[`prst`,e.patternType]];e.foreground===void 0&&e.background===void 0?t.open(I(`pattFill`),r,!0):(t.open(I(`pattFill`),r),e.foreground!==void 0&&ze(t,`fgClr`,e.foreground),e.background!==void 0&&ze(t,`bgClr`,e.background),t.close(I(`pattFill`)));return}}throw Error(`A chart cannot write a fill of type '${n.type}'.`)},Ge=e=>je({tags:Be,key:e,ns:`a`,read:e=>Ue(e),write:(e,t)=>We(e,t)}),Ke={tags:[`effectLst`],key:`effects`,ns:`a`,read:e=>S(e).length===0&&T(e).length===0?[]:void 0,write:(e,t)=>{if(t.length>0)throw Error(`A chart cannot write effects yet.`);e.open(I(`effectLst`),null,!0)}},qe={rnd:`round`,flat:`butt`,sq:`square`},Je=(e,t)=>({tags:[e],key:`${t}Type`,ns:`a`,read:e=>{let t=L(e,[`type`,`w`,`len`]);if(t&&!(S(e).length>0)&&Object.keys(t).length!==0)return t},write:(t,n)=>{let r=[];for(let e of[`type`,`w`,`len`])n[e]!==void 0&&r.push([e,n[e]]);t.open(I(e),r,!0)},get:e=>{let n={};return e[`${t}Type`]!==void 0&&(n.type=e[`${t}Type`]),e[`${t}Width`]!==void 0&&(n.w=e[`${t}Width`]),e[`${t}Length`]!==void 0&&(n.len=e[`${t}Length`]),Object.keys(n).length>0?n:void 0},set:(e,n)=>{n.type!==void 0&&(e[`${t}Type`]=n.type),n.w!==void 0&&(e[`${t}Width`]=n.w),n.len!==void 0&&(e[`${t}Length`]=n.len)}}),Ye={attributes:[F(`w`,`int`,`width`,12700),Ae(`cap`,`lineCap`,e=>qe[e],e=>Object.keys(qe).find(t=>qe[t]===e)),F(`cmpd`,`str`,`compound`),F(`algn`,`str`,`align`)],fields:[Ge(`fill`),{tags:[`prstDash`,`custDash`],key:`dash`,ns:`a`,read:e=>{if(e.name===`prstDash`){let t=L(e,[`val`]);return t?.val!==void 0&&S(e).length===0?t.val:void 0}if(T(e).length>0)return;let t=[];for(let n of S(e)){let e=n.name===`ds`?L(n,[`d`,`sp`]):null;if(!e||!R.test(e.d??``)||!R.test(e.sp??``))return;t.push(Number(e.d)/1e3,Number(e.sp)/1e3)}return t},write:(e,t)=>{if(typeof t!=`string`){e.open(I(`custDash`));for(let n=0;n<t.length;n+=2)e.open(I(`ds`),[[`d`,String(Math.round(1e3*t[n]))],[`sp`,String(Math.round(1e3*t[n+1]))]],!0);e.close(I(`custDash`))}else e.val(I(`prstDash`),t)}},{tags:[`round`,`bevel`,`miter`],key:`lineJoin`,ns:`a`,read:e=>{let t=L(e,e.name===`miter`?[`lim`]:[]);if(t&&!(S(e).length>0)&&(t.lim===void 0||R.test(t.lim)))return{join:e.name,limit:t.lim===void 0?void 0:Number(t.lim)/1e5}},write:(e,t)=>{e.open(I(t.join),t.limit===void 0?null:[[`lim`,String(Math.round(1e5*t.limit))]],!0)},get:e=>e.lineJoin?{join:e.lineJoin,limit:e.miterLimit}:void 0,set:(e,t)=>{e.lineJoin=t.join,t.limit!==void 0&&(e.miterLimit=t.limit)}},Je(`headEnd`,`head`),Je(`tailEnd`,`tail`)]},Xe=e=>je(P(`ln`,Ye,e,{ns:`a`})),Ze={fields:[Ge(`fill`),Xe(`stroke`),Ke]},Qe=(e,n,r)=>({tags:[e],key:n,ns:`a`,read:e=>{let n=L(e,[`typeface`]);if(!(n?.typeface===void 0||S(e).length>0))return r&&n.typeface===`+mn-${r}`?t.ThemeFamily.Body:r&&n.typeface===`+mj-${r}`?t.ThemeFamily.Heading:n.typeface},write:(n,i)=>{let a=r?i===t.ThemeFamily.Body?`+mn-${r}`:i===t.ThemeFamily.Heading?`+mj-${r}`:i:i;n.open(I(e),[[`typeface`,a]],!0)}}),$e=(e,t,n)=>{let r=Object.fromEntries(Object.entries(n).map(([e,t])=>[t,e]));return Ae(e,t,e=>r[e],e=>n[e]??e)},et={attributes:[F(`lang`,`str`,`language`),F(`altLang`,`str`,`alternateLanguage`),F(`sz`,`int`,`size`,100),Ae(`b`,`weight`,e=>{let t=E(e);return t===null?void 0:t?700:400},e=>D(e>=600)),Ae(`i`,`style`,e=>{let t=E(e);return t===null?void 0:t?`italic`:`normal`},e=>D(e===`italic`)),$e(`u`,`underline`,{none:`none`,words:`words`,single:`sng`,double:`dbl`,heavy:`heavy`,dotted:`dotted`,dottedHeavy:`dottedHeavy`,dash:`dash`,dashHeavy:`dashHeavy`,dashLong:`dashLong`,dashLongHeavy:`dashLongHeavy`,dotDash:`dotDash`,dotDashHeavy:`dotDashHeavy`,dotDotDash:`dotDotDash`,dotDotDashHeavy:`dotDotDashHeavy`,wavy:`wavy`,wavyHeavy:`wavyHeavy`,wavyDouble:`wavyDbl`}),$e(`strike`,`strike`,{none:`noStrike`,single:`sngStrike`,double:`dblStrike`}),F(`kern`,`int`,`kerning`,100),$e(`cap`,`capitals`,{none:`none`,small:`small`,all:`all`}),F(`spc`,`int`,`letterSpacing`,100),F(`normalizeH`,`bool`,`normalizeHeight`),F(`baseline`,`int`,`baseline`,1e3)],fields:[Xe(`outline`),Ge(`color`),Ke,Qe(`latin`,`latin`,`lt`),Qe(`ea`,`eastAsian`,`ea`),Qe(`cs`,`complexScript`,`cs`),Qe(`sym`,`symbol`)]},tt={attributes:[F(`algn`,`str`,`align`),F(`rtl`,`bool`,`rtl`)],fields:[P(`defRPr`,et,`defaultRun`,{ns:`a`})]},nt={fields:[P(`rPr`,et,`rPr`,{ns:`a`}),{tags:[`t`],key:`text`,ns:`a`,read:e=>{if(S(e).length>0)return;let t=!1;for(let[n,r]of T(e))if(n!==`xmlns`&&!n.startsWith(`xmlns:`)){if(n!==`xml:space`||r!==`preserve`)return;t=!0}return{text:C(e),preserve:t}},get:e=>e.text===void 0?void 0:{text:e.text,preserve:!0===e.preserveSpace},set:(e,t)=>{e.text=t.text,t.preserve&&(e.preserveSpace=!0)},write:(e,t)=>{let n=I(`t`),r=t.preserve?[[`xml:space`,`preserve`]]:null;t.text===``?e.open(n,r,!0):e.open(n,r).text(t.text).close(n)}}]},rt={attributes:[F(`id`,`str`,`id`),F(`type`,`str`,`type`)],fields:nt.fields},it={fields:[P(`rPr`,et,`rPr`,{ns:`a`})]},at={fields:[P(`pPr`,tt,`pPr`,{ns:`a`}),{tags:[`r`,`br`,`fld`],key:`runs`,ns:`a`,many:!0,read:(e,t,n)=>{if(e.name===`br`)return{...k(e,it,t,n),text:`
2
2
  `,break:!0};if(e.name===`r`){let r=k(e,nt,t,n);return r.text===void 0?void 0:r}let{id:r,type:i,...a}=k(e,rt,t,n);return r===void 0?void 0:(a.text??=``,a.field=i===void 0?{id:r}:{id:r,type:i},a)},write:(e,t)=>{if(t.break){let{text:n,break:r,...i}=t;A(e,I(`br`),i,it)}else if(t.field){let{field:n,...r}=t;A(e,I(`fld`),{...r,id:n.id,type:n.type},rt)}else A(e,I(`r`),t,nt)}},P(`endParaRPr`,et,`endRun`,{ns:`a`})]},ot={fields:[P(`bodyPr`,{attributes:[F(`rot`,`int`,`rotation`,6e4),F(`spcFirstLastPara`,`bool`,`spcFirstLastPara`),F(`vertOverflow`,`str`,`vertOverflow`),F(`horzOverflow`,`str`,`horzOverflow`),F(`vert`,`str`,`vert`),F(`wrap`,`str`,`wrap`),F(`lIns`,`int`,`lIns`),F(`tIns`,`int`,`tIns`),F(`rIns`,`int`,`rIns`),F(`bIns`,`int`,`bIns`),F(`anchor`,`str`,`anchor`),F(`anchorCtr`,`bool`,`anchorCtr`)],fields:[]},`bodyPr`,{ns:`a`}),P(`lstStyle`,{fields:[]},`lstStyle`,{ns:`a`}),P(`p`,at,`paragraphs`,{ns:`a`,many:!0})]},z=()=>P(`spPr`,Ze),B=()=>P(`txPr`,ot),st={attributes:[F(`idx`,`int`),F(`formatCode`,`str`)],fields:[N(`v`)]},ct={fields:[N(`formatCode`),M(`ptCount`,`int`),P(`pt`,st,`points`,{many:!0})]},lt={fields:[M(`ptCount`,`int`),P(`pt`,st,`points`,{many:!0})]},ut={fields:[M(`ptCount`,`int`),P(`lvl`,{fields:[P(`pt`,st,`points`,{many:!0})]},`levels`,{many:!0})]},dt={fields:[N(`f`),P(`numCache`,ct,`cache`)]},ft={fields:[N(`f`),P(`strCache`,lt,`cache`)]},pt={fields:[N(`f`),P(`multiLvlStrCache`,ut,`cache`)]},mt=P(`datalabelsRange`,{fields:[N(`f`,`f`,`c15`),P(`dlblRangeCache`,lt,`cache`,{ns:`c15`})]},`datalabelsRange`,{ns:`c15`}),ht={...mt,read:(e,t,n)=>t[w.c15]===pe?mt.read(e,t,n):void 0},gt=M(`showDataLabelsRange`,`bool`,`showDataLabelsRange`,`c15`),_t={...gt,read:(e,t,n)=>t[w.c15]===pe?gt.read(e,t,n):void 0},vt={fields:[P(`ext`,{attributes:[F(`uri`,`str`)],fields:[ht,_t],declares:e=>e.datalabelsRange!==void 0||e.showDataLabelsRange!==void 0?[[`xmlns:${w.c15}`,pe]]:[]},`extensions`,{many:!0})]},yt={fields:[P(`multiLvlStrRef`,pt),P(`numRef`,dt),P(`numLit`,ct),P(`strRef`,ft),P(`strLit`,lt)]},bt={fields:[P(`strRef`,ft),N(`v`)]},xt={fields:[P(`strRef`,ft),P(`rich`,ot)]},St={attributes:[F(`formatCode`,`str`),F(`sourceLinked`,`bool`)],fields:[]},V={fields:[P(`manualLayout`,{fields:[M(`layoutTarget`,`str`),M(`xMode`,`str`),M(`yMode`,`str`),M(`wMode`,`str`),M(`hMode`,`str`),M(`x`,`num`),M(`y`,`num`),M(`w`,`num`),M(`h`,`num`)]})]},Ct={fields:[P(`tx`,xt),P(`layout`,V),M(`overlay`,`bool`),z(),B()]},wt={fields:[z()]},Tt={fields:[M(`symbol`,`str`),M(`size`,`int`),z()]},Et={fields:[M(`idx`,`int`),M(`invertIfNegative`,`bool`),P(`marker`,Tt),M(`bubble3D`,`bool`),M(`explosion`,`int`),z()]},Dt=()=>[P(`numFmt`,St),z(),B(),M(`dLblPos`,`str`),M(`showLegendKey`,`bool`),M(`showVal`,`bool`),M(`showCatName`,`bool`),M(`showSerName`,`bool`),M(`showPercent`,`bool`),M(`showBubbleSize`,`bool`),N(`separator`)],Ot={fields:[P(`dLbl`,{fields:[M(`idx`,`int`),M(`delete`,`bool`),P(`layout`,V),P(`tx`,xt),...Dt(),P(`extLst`,vt)]},`labels`,{many:!0}),M(`delete`,`bool`),...Dt(),M(`showLeaderLines`,`bool`),P(`leaderLines`,wt),P(`extLst`,vt)]},kt={fields:[P(`layout`,V),P(`tx`,xt),P(`numFmt`,St),z(),B()]},At={fields:[N(`name`),z(),M(`trendlineType`,`str`),M(`order`,`int`),M(`period`,`int`),M(`forward`,`num`),M(`backward`,`num`),M(`intercept`,`num`),M(`dispRSqr`,`bool`),M(`dispEq`,`bool`),P(`trendlineLbl`,kt)]},jt={fields:[M(`errDir`,`str`),M(`errBarType`,`str`),M(`errValType`,`str`),M(`noEndCap`,`bool`),P(`plus`,yt),P(`minus`,yt),M(`val`,`num`),z(),P(`extLst`,vt)]},Mt={fields:[M(`gapWidth`,`int`),P(`upBars`,wt),P(`downBars`,wt)]},H=()=>[M(`idx`,`int`),M(`order`,`int`),P(`tx`,bt),z()],U=()=>P(`dPt`,Et,`points`,{many:!0}),W=()=>P(`dLbls`,Ot),Nt=()=>P(`trendline`,At,`trendlines`,{many:!0}),Pt=()=>P(`errBars`,jt,`errBars`,{many:!0}),G=e=>P(e,yt),K=()=>P(`extLst`,vt),Ft={bar:{fields:[...H(),M(`invertIfNegative`,`bool`),U(),W(),Nt(),Pt(),G(`cat`),G(`val`),M(`shape`,`str`),K()]},line:{fields:[...H(),P(`marker`,Tt),U(),W(),Nt(),Pt(),G(`cat`),G(`val`),M(`smooth`,`bool`),K()]},area:{fields:[...H(),U(),W(),Nt(),Pt(),G(`cat`),G(`val`),K()]},pie:{fields:[...H(),M(`explosion`,`int`),U(),W(),G(`cat`),G(`val`),K()]},scatter:{fields:[...H(),P(`marker`,Tt),U(),W(),Nt(),Pt(),G(`xVal`),G(`yVal`),M(`smooth`,`bool`),K()]},bubble:{fields:[...H(),M(`invertIfNegative`,`bool`),U(),W(),Nt(),Pt(),G(`xVal`),G(`yVal`),G(`bubbleSize`),M(`bubble3D`,`bool`),K()]},radar:{fields:[...H(),P(`marker`,Tt),U(),W(),G(`cat`),G(`val`),K()]},surface:{fields:[...H(),G(`cat`),G(`val`),K()]}},q=e=>P(`ser`,Ft[e],`series`,{many:!0}),J=()=>({...M(`axId`,`int`,`axIds`),many:!0}),Y=(e,t)=>P(e,wt,e,{many:t}),It={tags:[`custSplit`],key:`custSplit`,ns:`c`,read:(e,t,n)=>{let r=k(e,{fields:[{...M(`secondPiePt`,`int`,`points`),many:!0}]},t,n);return r.unknown?void 0:r.points??[]},write:(e,t)=>{A(e,`c:custSplit`,{points:t},{fields:[{...M(`secondPiePt`,`int`,`points`),many:!0}]})}},Lt={fields:[M(`idx`,`int`),z()]},Rt={tags:[`bandFmts`],key:`bandFmts`,ns:`c`,read:(e,t,n)=>{let r=k(e,{fields:[P(`bandFmt`,Lt,`formats`,{many:!0})]},t,n);return r.unknown?void 0:r.formats??[]},write:(e,t)=>{A(e,`c:bandFmts`,{formats:t},{fields:[P(`bandFmt`,Lt,`formats`,{many:!0})]})}},zt={areaChart:{type:`area`,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`area`),W(),Y(`dropLines`),J()]}},area3DChart:{type:`area`,is3D:!0,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`area`),W(),Y(`dropLines`),M(`gapDepth`,`int`),J()]}},lineChart:{type:`line`,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`line`),W(),Y(`dropLines`),Y(`hiLowLines`),P(`upDownBars`,Mt),M(`marker`,`bool`),M(`smooth`,`bool`),J()]}},line3DChart:{type:`line`,is3D:!0,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`line`),W(),Y(`dropLines`),M(`gapDepth`,`int`),J()]}},stockChart:{type:`stock`,codec:{fields:[q(`line`),W(),Y(`dropLines`),Y(`hiLowLines`),P(`upDownBars`,Mt),J()]}},radarChart:{type:`radar`,codec:{fields:[M(`radarStyle`,`str`),M(`varyColors`,`bool`),q(`radar`),W(),J()]}},scatterChart:{type:`scatter`,codec:{fields:[M(`scatterStyle`,`str`),M(`varyColors`,`bool`),q(`scatter`),W(),J()]}},pieChart:{type:`pie`,codec:{fields:[M(`varyColors`,`bool`),q(`pie`),W(),M(`firstSliceAng`,`int`)]}},pie3DChart:{type:`pie`,is3D:!0,codec:{fields:[M(`varyColors`,`bool`),q(`pie`),W()]}},doughnutChart:{type:`doughnut`,codec:{fields:[M(`varyColors`,`bool`),q(`pie`),W(),M(`firstSliceAng`,`int`),M(`holeSize`,`int`)]}},barChart:{type:`bar`,codec:{fields:[M(`barDir`,`str`),M(`grouping`,`str`),M(`varyColors`,`bool`),q(`bar`),W(),M(`gapWidth`,`int`),M(`overlap`,`int`),Y(`serLines`,!0),J()]}},bar3DChart:{type:`bar`,is3D:!0,codec:{fields:[M(`barDir`,`str`),M(`grouping`,`str`),M(`varyColors`,`bool`),q(`bar`),W(),M(`gapWidth`,`int`),M(`gapDepth`,`int`),M(`shape`,`str`),J()]}},ofPieChart:{type:`ofPie`,codec:{fields:[M(`ofPieType`,`str`),M(`varyColors`,`bool`),q(`pie`),W(),M(`gapWidth`,`int`),M(`splitType`,`str`),M(`splitPos`,`num`),It,M(`secondPieSize`,`int`),Y(`serLines`,!0)]}},surfaceChart:{type:`surface`,codec:{fields:[M(`wireframe`,`bool`),q(`surface`),Rt,J()]}},surface3DChart:{type:`surface`,is3D:!0,codec:{fields:[M(`wireframe`,`bool`),q(`surface`),Rt,J()]}},bubbleChart:{type:`bubble`,codec:{fields:[M(`varyColors`,`bool`),q(`bubble`),W(),M(`bubble3D`,`bool`),M(`bubbleScale`,`int`),M(`showNegBubbles`,`bool`),M(`sizeRepresents`,`str`),J()]}}},Bt={tags:Object.keys(zt),key:`groups`,ns:`c`,many:!0,read:(e,t,n)=>{let{type:r,is3D:i,codec:a}=zt[e.name],o=k(e,a,t,n);return o.series??=[],o.axIds??=[],i?{type:r,is3D:i,...o}:{type:r,...o}},write:(e,t)=>{let n=(e=>`${e.type}${e.is3D?`3D`:``}Chart`)(t),{type:r,is3D:i,...a}=Wt(t);A(e,`c:${n}`,a,zt[n].codec)}},Vt=[`ctr`,`l`,`r`,`t`,`b`],Ht=e=>{switch(e.type){case`bar`:return e.is3D?[]:e.grouping===`stacked`||e.grouping===`percentStacked`?[`ctr`,`inEnd`,`inBase`]:[`ctr`,`inEnd`,`inBase`,`outEnd`];case`line`:return e.is3D?[]:Vt;case`stock`:case`scatter`:case`bubble`:return Vt;case`pie`:case`ofPie`:return[`ctr`,`inEnd`,`outEnd`,`bestFit`];default:return[]}},Ut=(e,t)=>t?.dLblPos!==void 0&&!e.includes(t.dLblPos),Wt=e=>{let t=Ht(e),n=e=>{if(!Ut(t,e))return e;let{dLblPos:n,...r}=e;return r},r=e=>e.labels?{...n(e),labels:e.labels.map(n)}:n(e);return{...e,...e.dLbls?{dLbls:r(e.dLbls)}:{},series:e.series.map(e=>e.dLbls?{...e,dLbls:r(e.dLbls)}:e)}},Gt={fields:[M(`logBase`,`num`),M(`orientation`,`str`),M(`max`,`num`),M(`min`,`num`)]},Kt={fields:[P(`layout`,V),P(`tx`,xt),z(),B()]},qt={fields:[M(`custUnit`,`num`),M(`builtInUnit`,`str`),P(`dispUnitsLbl`,Kt)]},Jt=()=>[M(`axId`,`int`),P(`scaling`,Gt),M(`delete`,`bool`),M(`axPos`,`str`),Y(`majorGridlines`),Y(`minorGridlines`),P(`title`,Ct),P(`numFmt`,St),M(`majorTickMark`,`str`),M(`minorTickMark`,`str`),M(`tickLblPos`,`str`),z(),B(),M(`crossAx`,`int`),M(`crosses`,`str`),M(`crossesAt`,`num`)],Yt={valAx:{type:`val`,codec:{fields:[...Jt(),M(`crossBetween`,`str`),M(`majorUnit`,`num`),M(`minorUnit`,`num`),P(`dispUnits`,qt)]}},catAx:{type:`cat`,codec:{fields:[...Jt(),M(`auto`,`bool`),M(`lblAlgn`,`str`),M(`lblOffset`,`int`),M(`tickLblSkip`,`int`),M(`tickMarkSkip`,`int`),M(`noMultiLvlLbl`,`bool`)]}},dateAx:{type:`date`,codec:{fields:[...Jt(),M(`auto`,`bool`),M(`lblOffset`,`int`),M(`baseTimeUnit`,`str`),M(`majorUnit`,`num`),M(`majorTimeUnit`,`str`),M(`minorUnit`,`num`),M(`minorTimeUnit`,`str`)]}},serAx:{type:`ser`,codec:{fields:[...Jt(),M(`tickLblSkip`,`int`),M(`tickMarkSkip`,`int`)]}}},Xt={tags:Object.keys(Yt),key:`axes`,ns:`c`,many:!0,read:(e,t,n)=>({type:Yt[e.name].type,...k(e,Yt[e.name].codec,t,n)}),write:(e,t)=>{let{type:n,...r}=t,i=`${n}Ax`;A(e,`c:${i}`,r,Yt[i].codec)}},Zt={fields:[M(`showHorzBorder`,`bool`),M(`showVertBorder`,`bool`),M(`showOutline`,`bool`),M(`showKeys`,`bool`),z(),B()]},Qt={fields:[P(`layout`,V),Bt,Xt,P(`dTable`,Zt),z()],afterRead:e=>{e.groups??=[],e.axes??=[]}},$t={fields:[M(`rotX`,`int`),M(`hPercent`,`int`),M(`rotY`,`int`),M(`depthPercent`,`int`),M(`rAngAx`,`bool`),M(`perspective`,`int`)]},en={fields:[M(`thickness`,`int`),z()]},tn={fields:[M(`idx`,`int`),M(`delete`,`bool`),B()]},nn={fields:[M(`legendPos`,`str`),P(`legendEntry`,tn,`entries`,{many:!0}),P(`layout`,V),M(`overlay`,`bool`),z(),B()]},rn={fields:[P(`title`,Ct),M(`autoTitleDeleted`,`bool`),P(`view3D`,$t),P(`floor`,en),P(`sideWall`,en),P(`backWall`,en),P(`plotArea`,Qt),P(`legend`,nn),M(`plotVisOnly`,`bool`),M(`dispBlanksAs`,`str`),M(`showDLblsOverMax`,`bool`)]},an={fields:[N(`name`),M(`fmtId`,`int`)]},on={fields:[M(`date1904`,`bool`),M(`lang`,`str`),M(`roundedCorners`,`bool`),M(`style`,`int`),P(`pivotSource`,an),P(`chart`,rn),z(),B()]},sn=e=>{let t=x(e);if(!t||t.name!==`chartSpace`)return null;let n=xe(t,ye);if(!ge(Se(t,n)))return null;let r=new Oe(e,n);return{model:k(t,on,ye,r),kept:r.kept,reordered:r.reordered}},cn=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
3
3
  `,ln=e=>{let t={...e.unknown?.attributes},n=(e,n)=>{t[`xmlns:${e}`]??=n};n(w.c,ce),n(w.a,ue),n(w.r,fe);let r=new Ce().raw(cn);return((e,t)=>{A(e,`c:chartSpace`,t,on)})(r,{...e,unknown:{...e.unknown,attributes:t}}),r.toString()},un=(e,t)=>{if(t&&(n=e,!(n.chart?.plotArea?.groups??[]).some(e=>{let t=Ht(e),n=e=>Ut(t,e)||!!e?.labels?.some(e=>Ut(t,e));return n(e.dLbls)||e.series.some(e=>n(e.dLbls))}))){let n=sn(t);if(n&&JSON.stringify(n.model)===JSON.stringify(e))return t}var n;return ln(e)},X=(e,t,n=e,r)=>P(e,t,n,{ns:`cx`,many:r}),Z=()=>X(`spPr`,Ze),Q=()=>X(`txPr`,ot),dn=()=>X(`numFmt`,St),fn=e=>({name:e,key:e,read:e=>{if(e===`auto`)return`auto`;let t=Number(e);return e.trim()!==``&&Number.isFinite(t)?t:void 0},write:e=>String(e)}),pn=e=>T(e).filter(([e])=>e!==`xmlns`&&!e.startsWith(`xmlns:`)),mn=e=>({tags:[e],key:e,ns:`cx`,read:e=>{if(S(e).length>0)return;let t={f:C(e)};for(let[n,r]of pn(e)){if(n!==`dir`||r!==`col`&&r!==`row`)return;t.dir=r}return t.f===``?void 0:t},write:(t,n)=>{let r=j(`cx`,e);t.open(r,n.dir?[[`dir`,n.dir]]:null).text(n.f).close(r)}}),hn={attributes:[F(`ptCount`,`int`),F(`formatCode`,`str`),F(`name`,`str`)],fields:[{tags:[`pt`],key:`points`,ns:`cx`,many:!0,read:e=>{if(S(e).length>0)return;let t=pn(e);if(t.length!==1||t[0][0]!==`idx`)return;let n=Number(t[0][1]);return Number.isInteger(n)&&O(String(n))===O(t[0][1])?{idx:n,v:C(e)}:void 0},write:(e,t)=>{let n=j(`cx`,`pt`);t.v===``?e.open(n,[[`idx`,String(t.idx)]],!0):e.open(n,[[`idx`,String(t.idx)]]).text(t.v).close(n)}}]},gn={attributes:[F(`type`,`str`)],fields:[mn(`f`),mn(`nf`),X(`lvl`,hn,`levels`,!0)]},_n=new Set([`val`,`x`,`y`,`size`,`colorVal`]),vn=new Set([`cat`,`colorStr`,`entityId`]),yn={fields:[X(`data`,{attributes:[F(`id`,`int`)],fields:[{tags:[`numDim`,`strDim`],key:`dimensions`,ns:`cx`,many:!0,read:(e,t,n)=>{let r=k(e,gn,t,n);return(e.name===`numDim`?_n:vn).has(r.type)?r:void 0},write:(e,t)=>{A(e,j(`cx`,_n.has(t.type)?`numDim`:`strDim`),t,gn)}}],afterRead:e=>{e.dimensions??=[]}},`data`,!0)],afterRead:e=>{e.data??=[]}},bn={fields:[X(`txData`,{fields:[mn(`f`),N(`v`,`v`,`cx`)]}),X(`rich`,ot)]},xn=()=>[F(`pos`,`str`),F(`align`,`str`),F(`overlay`,`bool`)],Sn={attributes:xn(),fields:[X(`tx`,bn),Z(),Q()]},Cn={attributes:xn(),fields:[Z(),Q()]},wn={attributes:[F(`seriesName`,`bool`),F(`categoryName`,`bool`),F(`value`,`bool`)],fields:[]},Tn=()=>[dn(),Z(),Q(),X(`visibility`,wn),N(`separator`,`separator`,`cx`)],En={attributes:[F(`idx`,`int`),F(`pos`,`str`)],fields:Tn()},Dn={attributes:[F(`idx`,`int`)],fields:[]},On={attributes:[F(`pos`,`str`)],fields:[...Tn(),X(`dataLabel`,En,`labels`,!0),X(`dataLabelHidden`,Dn,`hiddenLabels`,!0)]},kn={attributes:[F(`idx`,`int`)],fields:[Z()]},An={attributes:[`connectorLines`,`meanLine`,`meanMarker`,`nonoutliers`,`outliers`].map(e=>F(e,`bool`)),fields:[]},jn={attributes:[F(`intervalClosed`,`str`),fn(`underflow`),fn(`overflow`)],fields:[M(`binSize`,`num`,`binSize`,`cx`),M(`binCount`,`int`,`binCount`,`cx`)]},Mn={fields:[{...M(`idx`,`int`,`indexes`,`cx`),many:!0}]},Nn={fields:[M(`parentLabelLayout`,`str`,`parentLabelLayout`,`cx`),M(`regionLabelLayout`,`str`,`regionLabelLayout`,`cx`),X(`visibility`,An),X(`aggregation`,{fields:[]}),X(`binning`,jn),X(`statistics`,{attributes:[F(`quartileMethod`,`str`)],fields:[]}),{tags:[`subtotals`],key:`subtotals`,ns:`cx`,read:(e,t,n)=>{let r=k(e,Mn,t,n);return r.unknown?void 0:r.indexes??[]},write:(e,t)=>{A(e,j(`cx`,`subtotals`),{indexes:t},Mn)}}]},Pn={attributes:[F(`layoutId`,`str`),F(`hidden`,`bool`),F(`ownerIdx`,`int`),F(`uniqueId`,`str`),F(`formatIdx`,`int`)],fields:[X(`tx`,bn),Z(),X(`dataPt`,kn,`points`,!0),X(`dataLabels`,On),M(`dataId`,`int`,`dataId`,`cx`),X(`layoutPr`,Nn),{...M(`axisId`,`int`,`axisIds`,`cx`),many:!0}]},Fn={fields:[X(`plotSurface`,{fields:[Z()]}),X(`series`,Pn,`series`,!0)],afterRead:e=>{e.series??=[]}},In={fields:[X(`tx`,bn),Z(),Q()]},Ln={fields:[Z()]},Rn={attributes:[F(`type`,`str`)],fields:[]},zn={attributes:[F(`id`,`int`),F(`hidden`,`bool`)],fields:[X(`catScaling`,{attributes:[F(`gapWidth`,`num`)],fields:[]}),X(`valScaling`,{attributes:[`max`,`min`,`majorUnit`,`minorUnit`].map(e=>F(e,`num`)),fields:[]}),X(`title`,In),X(`units`,{attributes:[F(`unit`,`str`)],fields:[X(`unitsLabel`,In)]}),X(`majorGridlines`,Ln),X(`minorGridlines`,Ln),X(`majorTickMarks`,Rn),X(`minorTickMarks`,Rn),X(`tickLabels`,{fields:[]}),dn(),Z(),Q()]},Bn={fields:[X(`plotAreaRegion`,Fn),X(`axis`,zn,`axes`,!0),Z()],afterRead:e=>{e.axes??=[]}},Vn={fields:[X(`title`,Sn),X(`plotArea`,Bn),X(`legend`,Cn)]},Hn={fields:[X(`chartData`,yn),X(`chart`,Vn),Z(),Q()]},Un={waterfall:`waterfall`,clusteredColumn:`histogram`,boxWhisker:`boxWhisker`,treemap:`treemap`,sunburst:`sunburst`,funnel:`funnel`,regionMap:`regionMap`},Wn=Object.fromEntries(Object.entries(Un).map(([e,t])=>[t,e])),Gn=new Set(Object.values(Un)),Kn=`paretoLine`,qn={cat:`cat`,val:`val`,x:`xVal`,y:`yVal`,size:`bubbleSize`,colorVal:`color`,colorStr:`color`,entityId:`entityId`},Jn=new Set([`val`,`x`,`y`,`size`,`colorVal`]),Yn=[`cat`,`colorStr`,`entityId`,`x`,`y`,`val`,`size`,`colorVal`],$=e=>{for(let t of Object.keys(e))e[t]===void 0&&delete e[t];return e},Xn=e=>$({f:e.f,dir:e.dir}),Zn=e=>e&&$({strRef:e.txData?.f?Xn(e.txData.f):void 0,v:e.txData?.v,rich:e.rich,unknown:e.unknown}),Qn=e=>e&&$({tx:Zn(e.tx),overlay:e.overlay,spPr:e.spPr,txPr:e.txPr,pos:e.pos,align:e.align,unknown:e.unknown}),$n=e=>$({numFmt:e.numFmt,spPr:e.spPr,txPr:e.txPr,dLblPos:e.pos,showSerName:e.visibility?.seriesName,showCatName:e.visibility?.categoryName,showVal:e.visibility?.value,separator:e.separator,unknown:e.unknown}),er=e=>{if(!e)return;let t=$n(e),n=[...(e.labels??[]).map(e=>({idx:e.idx,...$n(e)})),...(e.hiddenLabels??[]).map(e=>({idx:e.idx,delete:!0}))];return n.length>0&&(t.labels=n),t},tr=(e,t)=>{let n=(e??[]).map(e=>({...e}));for(let e of[...t??[]].sort((e,t)=>e-t)){let t=n.find(t=>t.idx===e);t?t.subtotal=!0:n.push({idx:e,subtotal:!0})}return n.length>0?n:void 0},nr=e=>{if(!e)return;let{subtotals:t,...n}=e;return Object.keys(n).length>0?n:void 0},rr=e=>$({ptCount:e.ptCount,formatCode:e.formatCode,name:e.name,points:(e.points??[]).map(e=>({idx:e.idx,v:e.v})),unknown:e.unknown}),ir=e=>{let t=Jn.has(e.type),n=e.levels?.map(rr),r={};return e.f?r[t?`numRef`:`strRef`]=$({...Xn(e.f),cache:n?{levels:n}:void 0}):r[t?`numLit`:`strLit`]=$({levels:n}),e.nf&&(r.nf=Xn(e.nf)),e.unknown&&(r.unknown=e.unknown),r},ar=(e,t)=>{let n=$({idx:e.formatIdx,hidden:e.hidden,uniqueId:e.uniqueId,tx:Zn(e.tx),spPr:e.spPr,points:tr(e.points,e.layoutPr?.subtotals),dLbls:er(e.dataLabels),layoutPr:nr(e.layoutPr),unknown:e.unknown});for(let e of t?.dimensions??[]){let t=qn[e.type];t&&!n[t]&&(n[t]=ir(e))}return n},or=e=>$({idx:e.formatIdx,hidden:e.hidden,uniqueId:e.uniqueId,tx:Zn(e.tx),spPr:e.spPr,points:tr(e.points,e.layoutPr?.subtotals),dLbls:er(e.dataLabels),layoutPr:nr(e.layoutPr),axIds:e.axisIds,unknown:e.unknown}),sr=(e,t)=>{let n=new Map(t.map(e=>[e.id,e])),r=[],i=[],a=null;for(let t of e?.series??[]){if(t.layoutId===Kn){let e=t.ownerIdx===void 0?null:i[t.ownerIdx];e&&!e.cumulativeLine&&(e.cumulativeLine=or(t)),i.push(null);continue}let e=Un[t.layoutId]??t.layoutId,o=t.axisIds??[];a&&a.type===e&&JSON.stringify(a.axIds)===JSON.stringify(o)||(a={type:e,series:[],axIds:o},r.push(a));let s=ar(t,t.dataId===void 0?void 0:n.get(t.dataId));a.series.push(s),i.push(s)}return r},cr=e=>{let t=e.catScaling??e.valScaling;return $({type:e.catScaling||!e.valScaling?`cat`:`val`,axId:e.id,scaling:$({max:e.valScaling?.max,min:e.valScaling?.min,gapWidth:e.catScaling?.gapWidth,unknown:t?.unknown}),delete:e.hidden,majorGridlines:e.majorGridlines,minorGridlines:e.minorGridlines,title:Qn(e.title),numFmt:e.numFmt,majorTickMark:e.majorTickMarks?.type,minorTickMark:e.minorTickMarks?.type,tickLblPos:e.tickLabels?void 0:`none`,spPr:e.spPr,txPr:e.txPr,majorUnit:e.valScaling?.majorUnit,minorUnit:e.valScaling?.minorUnit,dispUnits:e.units&&$({builtInUnit:e.units.unit,dispUnitsLbl:Qn(e.units.unitsLabel),unknown:e.units.unknown}),unknown:e.unknown})},lr=e=>e&&$({txData:e.strRef||e.v!==void 0?$({f:e.strRef?Xn(e.strRef):void 0,v:e.v}):void 0,rich:e.rich,unknown:e.unknown}),ur=e=>e&&$({tx:lr(e.tx),spPr:e.spPr,txPr:e.txPr,unknown:e.unknown}),dr=e=>{let t=e.showSerName!==void 0||e.showCatName!==void 0||e.showVal!==void 0;return $({pos:e.dLblPos,numFmt:e.numFmt,spPr:e.spPr,txPr:e.txPr,visibility:t?$({seriesName:e.showSerName,categoryName:e.showCatName,value:e.showVal}):void 0,separator:e.separator,unknown:e.unknown})},fr=e=>!0===e.delete&&Object.keys(e).every(e=>e===`idx`||e===`delete`),pr=e=>{if(!e)return;let t=dr(e),n=(e.labels??[]).filter(e=>!fr(e)).map(e=>({idx:e.idx,...dr(e)})),r=(e.labels??[]).filter(fr).map(e=>({idx:e.idx}));return n.length>0&&(t.labels=n),r.length>0&&(t.hiddenLabels=r),t},mr=e=>{let t=(e??[]).filter(e=>Object.keys(e).some(e=>e!==`idx`&&e!==`subtotal`)).map(({subtotal:e,...t})=>t);return t.length>0?t:void 0},hr=(e,t,n)=>{let r=(t??[]).filter(e=>e.subtotal).map(e=>e.idx).sort((e,t)=>e-t);return r.length!==0||n?{...e,subtotals:r}:e},gr=e=>$({ptCount:e.ptCount,formatCode:e.formatCode,name:e.name,points:e.points.length>0?e.points.map(e=>({idx:e.idx,v:e.v})):void 0,unknown:e.unknown}),_r=(e,t)=>e===`color`?t.strRef||t.strLit?`colorStr`:`colorVal`:Object.keys(qn).find(t=>qn[t]===e),vr=e=>{let t=[];for(let n of[`cat`,`val`,`xVal`,`yVal`,`bubbleSize`,`color`,`entityId`]){let r=e[n];if(!r)continue;let i=r.numRef??r.strRef,a=(i?i.cache:r.numLit??r.strLit)?.levels;t.push($({type:_r(n,r),f:i?Xn(i):void 0,nf:r.nf?Xn(r.nf):void 0,levels:a&&a.length>0?a.map(gr):void 0,unknown:r.unknown}))}return t.sort((e,t)=>Yn.indexOf(e.type)-Yn.indexOf(t.type))},yr=e=>{let t=e.scaling??{},n=e.type===`cat`||e.type===`date`;return $({id:e.axId,hidden:e.delete,catScaling:n?$({gapWidth:t.gapWidth,unknown:t.unknown}):void 0,valScaling:n?void 0:$({max:t.max,min:t.min,majorUnit:e.majorUnit,minorUnit:e.minorUnit,unknown:t.unknown}),title:ur(e.title),units:e.dispUnits&&$({unit:e.dispUnits.builtInUnit,unitsLabel:ur(e.dispUnits.dispUnitsLbl),unknown:e.dispUnits.unknown}),majorGridlines:e.majorGridlines,minorGridlines:e.minorGridlines,majorTickMarks:e.majorTickMark?{type:e.majorTickMark}:void 0,minorTickMarks:e.minorTickMark?{type:e.minorTickMark}:void 0,tickLabels:e.tickLblPos===`none`?void 0:{},numFmt:e.numFmt,spPr:e.spPr,txPr:e.txPr,unknown:e.unknown})},br=e=>{let t=e.chart,n=t?.plotArea,r=[],i=[],a=[];for(let e of n?.groups??[]){let t=Wn[e.type];if(t)for(let n of e.series){let o=vr(n),s;if(o.length>0){let e=JSON.stringify(o);s=a.indexOf(e),s===-1&&(s=i.length,i.push({id:s,dimensions:o}),a.push(e))}let c=r.length;r.push($({layoutId:t,hidden:n.hidden,uniqueId:n.uniqueId,formatIdx:n.idx,tx:lr(n.tx),spPr:n.spPr,points:mr(n.points),dataLabels:pr(n.dLbls),dataId:s,layoutPr:hr(n.layoutPr,n.points,e.type===`waterfall`),axisIds:e.axIds.length>0?e.axIds:void 0,unknown:n.unknown}));let l=n.cumulativeLine;l&&r.push($({layoutId:Kn,hidden:l.hidden,ownerIdx:c,uniqueId:l.uniqueId,formatIdx:l.idx,tx:lr(l.tx),spPr:l.spPr,points:mr(l.points),dataLabels:pr(l.dLbls),layoutPr:hr(l.layoutPr,l.points,!1),axisIds:l.axIds,unknown:l.unknown}))}}let o=t?.legend;return $({chartData:{data:i},chart:$({title:(s=t?.title,s&&$({pos:s.pos,align:s.align,overlay:s.overlay,tx:lr(s.tx),spPr:s.spPr,txPr:s.txPr,unknown:s.unknown})),plotArea:$({plotAreaRegion:$({plotSurface:n?.plotSurface,series:r}),axes:(n?.axes??[]).map(yr),spPr:n?.spPr,unknown:n?.unknown}),legend:o&&$({pos:o.legendPos===`tr`?`r`:o.legendPos,align:o.align,overlay:o.overlay,spPr:o.spPr,txPr:o.txPr,unknown:o.unknown}),unknown:t?.unknown}),spPr:e.spPr,txPr:e.txPr,unknown:e.unknown});var s},xr=(e,t)=>{if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=e=>Object.keys(e).filter(t=>e[t]!==void 0),r=n(e),i=n(t);return r.length===i.length&&r.every(n=>xr(e[n],t[n]))},Sr=(e,t)=>xr(e,br(t)),Cr=e=>{let t=x(e);if(!t||t.name!==`chartSpace`)return null;let n=xe(t,ye);if(!ve(Se(t,n)))return null;let r=new Oe(e,n),i=k(t,Hn,ye,r),a=(e=>{let t=e.chart,n=t?.plotArea,r=t?.legend;return $({chart:$({title:Qn(t?.title),plotArea:$({groups:sr(n?.plotAreaRegion,e.chartData?.data??[]),axes:(n?.axes??[]).map(cr),spPr:n?.spPr,plotSurface:n?.plotAreaRegion?.plotSurface,unknown:n?.unknown}),legend:r&&$({legendPos:r.pos,align:r.align,overlay:r.overlay,spPr:r.spPr,txPr:r.txPr,unknown:r.unknown}),unknown:t?.unknown}),spPr:e.spPr,txPr:e.txPr,unknown:e.unknown})})(i);return{model:a,kept:r.kept,reordered:r.reordered,lossy:!Sr(i,a)}},wr=e=>{let t={...e.unknown?.attributes},n=(e,n)=>{t[`xmlns:${e}`]??=n};n(w.a,ue),n(w.r,fe),n(w.cx,me);let r=br(e),i=new Ce().raw(cn);return((e,t)=>{A(e,j(`cx`,`chartSpace`),t,Hn)})(i,{...r,unknown:{...r.unknown,attributes:t}}),i.toString()},Tr=(e,t)=>{if(t){let n=Cr(t);if(n&&JSON.stringify(n.model)===JSON.stringify(e))return t}return wr(e)},Er={chart:{relType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart`,contentType:`application/vnd.openxmlformats-officedocument.drawingml.chart+xml`,path:`../charts/chart{n}.xml`,graphicUri:ce},chartEx:{relType:`http://schemas.microsoft.com/office/2014/relationships/chartEx`,contentType:`application/vnd.ms-office.chartex+xml`,path:`../charts/chartEx{n}.xml`,graphicUri:me}},Dr=new Set([`area`,`bar`,`line`,`pie`,`doughnut`,`ofPie`,`scatter`,`bubble`,`radar`,`stock`,`surface`]),Or=e=>e===Er.chartEx.relType?`chartEx`:e===Er.chart.relType?`chart`:null,kr=e=>Dr.has(e)?`chart`:Gn.has(e)?`chartEx`:null,Ar=e=>{let t=sn(e);if(t)return{model:t.model,family:`chart`,kept:t.kept,lossy:!1};let n=Cr(e);return n?{model:n.model,family:`chartEx`,kept:n.kept,lossy:n.lossy}:null},jr=e=>{if(Array.isArray(e))return e.map(jr);if(typeof e!=`object`||!e)return e;let t={};for(let[n,r]of Object.entries(e))n!==`unknown`&&(t[n]=jr(r));return t},Mr=(e,t)=>{let n=e.chart?.plotArea?.groups??[],r=n.map(e=>kr(e.type)).find(e=>e!==null)??t?.family??`chart`,i=n.filter(e=>kr(e.type)!==r).map(e=>e.type),a=e;if(i.length>0){let t={...e.chart.plotArea,groups:n.filter(e=>kr(e.type)===r)};a={...e,chart:{...e.chart,plotArea:t}}}let o=(t?.family??r)===r;o||(a=jr(a));let s=o?t?.xml:void 0;return{family:r,leftOut:i,xml:r===`chartEx`?Tr(a,s):un(a,s)}};export{c as a,l as c,Or as i,u as l,Er as n,g as o,Mr as r,h as s,Ar as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./CQukCzhuewMuFOlO.js";import{S as t,Si as n,ar as r,ea as i,fi as a,jt as o,ma as s,pn as c,va as l,w as u}from"./BqJRJVrx7XkIPgo7.js";import{C as ee,T as d,d as f,h as p,n as te,o as m,p as ne,s as re,t as h}from"./DWkISZdhmV2PBk-k.js";import{r as g,t as _}from"./DGr8M07ioDfKXLHD.js";import{A as v,B as y,C as b,D as x,E as S,F as C,G as w,H as T,I as E,J as D,K as O,L as k,M as A,N as j,O as M,P as N,Q as P,R as F,S as I,T as L,U as R,V as z,W as B,X as V,Y as H,Z as U,_ as W,a as G,b as K,c as q,d as J,f as Y,g as ie,h as ae,i as oe,j as se,k as ce,l as le,m as ue,n as de,nt as fe,o as pe,p as me,q as he,r as ge,s as _e,t as ve,u as ye,v as be,w as xe,x as Se,y as Ce,z as we}from"./PRYQO22Y2LgMUg77.js";import{n as Te,r as Ee,t as De}from"./6j6xGn4csAcfcFMQ.js";var Oe=[{declarations:N,category:`Database`},{declarations:O,category:`Date & Time`,enums:z},{declarations:B,category:`Engineering`},{declarations:F,category:`Engineering`},{declarations:v,category:`Engineering`},{declarations:T,category:`Engineering`},{declarations:w,category:`Engineering`},{declarations:A,category:`Engineering`},{declarations:we,category:`Financial`},{declarations:he,category:`Information`,enums:j},{declarations:C,category:`Japanese`},{declarations:R,category:`Japanese`},{declarations:y,category:`Logical`},{declarations:k,category:`Lookup & Reference`,enums:E},{declarations:ce,category:`Math & Trig`,enums:D},{declarations:U,category:`Math & Trig`},{declarations:se,category:`Operators`},{declarations:V,category:`Statistical`},{declarations:x,category:`Statistical`},{declarations:b,category:`Testing`},{declarations:H,category:`Text`},{declarations:M,category:`Thai`},{declarations:L,category:`Web`},{declarations:xe,category:`Web`},{declarations:S,category:`Web`}],ke=[{declarations:pe,category:`Cube`},{declarations:be,category:`Financial`},{declarations:me,category:`Financial`},{declarations:ie,category:`Financial`,enums:ye},{declarations:de,category:`Financial`},{declarations:ue,category:`Financial`},{declarations:W,category:`Financial`},{declarations:oe,category:`Financial`},{declarations:J,category:`Financial`},{declarations:Ce,category:`Financial`},{declarations:G,category:`Financial`},{declarations:_e,category:`Financial`},{declarations:ae,category:`Financial`},{declarations:Y,category:`Financial`},{declarations:le,category:`Financial`},{declarations:q,category:`Lookup & Reference`},{declarations:ve,category:`Lookup & Reference`},{declarations:K,category:`Statistical`},{declarations:I,category:`Statistical`},{declarations:ge,category:`Statistical`},{declarations:Se,category:`Text`}],X=null;function Z(t){return X||=(()=>{let t=new Map,n=[...Oe,...ke,P];for(let{declarations:r,enums:i}of n){let n=new Map,a=t=>{let r=n.get(t);if(!r){let a=i?.[t];if(!a)return;r={id:t,type:a.s===`string`?e.String:e.Number,members:a.m},n.set(t,r)}return r};for(let e of Object.keys(r)){let{decl:n}=fe(e,r[e],a),i=new o(n);t.set(e.toUpperCase(),{getName:()=>e,getDeclaration:()=>i,isBuiltIn:()=>!0})}}return t})(),X.get(t.toUpperCase())??null}var Q=null,Ae=Object.freeze({rowStart:0,colStart:0,rowEnd:s,colEnd:t}),$=e=>Z(e);function je(e,t){if(typeof e!=`string`||e.length===0)return null;Q||=new g;let n=t?.anchor,r;try{let i=Q.parse(n?.rowIndex??0,n?.colIndex??0,e);if(i.errors.length>0||!i.root||i.root.type===c.Unparsed)return null;if(r=i.root,t?.normalize){let e=te(r,$);typeof e!=`string`&&(r=e),r=ne(r,$),r=m(r,$),r=d(r),r=h(r),r=f(r),r=ee(r),r=re(r)}}catch{return null}return Te(r,null)}function Me(e,t){return Ee(e,t)}function Ne(e,t){let n=p(m(d(De(e)),$)),r=t?.entireCoords??Ae,i=!0===t?.r1c1;return e=>i?u(n,r):l(n,r,e?.rowIndex??0,e?.colIndex??0)}function Pe(e){let t=e.trim();if(!t)return;let o;try{let e=_.shared().tokenize(t,!1);if(e.errors.length>0)return;o=e.tokens}catch{return}let s=0,c=0;if(o.length===2){let e=o[0].tokenType?.name;e===`MinOp`?(s=-1,c=1):e===`PlusOp`&&(s=1,c=1)}if(o.length-c!==1)return;let l=o[c],u=l.image;try{switch(l.tokenType?.name){case`NumberToken`:case`ScientificDigit`:case`DigitToken`:{let e=i(u).value;return s===0?e:s*e}case`StringToken`:return s===0?a(u).value:void 0;case`BooleanToken`:return s===0?r(u).value:void 0;case`LiteralError`:case`RefError`:return s===0?n(u).value:void 0;default:return}}catch{return}}export{Z as getFunctionDeclaration,Ne as imager,je as parse,Pe as readFormulaLiteral,Me as transform};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DTAKTGn53yF_B621.js","./gU2zeJaXoNh7QI_e.js","./CbXtAM7H-Jg_J0dk.js","./D4RZZdlItfrgQHcE.js","./HclGiUj8dZXDFmoM.js","./DJebrQ5mu8uxpX3b.js","./DdmX3djBOA6UCZtf.js","./D72Rp__0TEqJ972a.js","./hB5riGkPy0wXVIig.js","./CQ-33-es3XJ56pR4.js","./Bdb0azxGoCh6NBDk.js","./jteb4n23QwBT9m_4.js","./D8EmNst-H2v0eWcf.js","./COL9dj40ytErlGak.js","./3Ls_kOvlQseMV8Q0.js","./nHThFXCAZFOM_npq.js","./DYYzsN95gWMsxOaj.js","./Da_VIghRFdNrmfZT.js","./YH1wNXzhQbkuWxeS.js","./C-2hBFk27roWkIrQ.js","./C9SC-cEIt6gdhZRw.js","./CL_hAngRQwm_KGdR.js","./BowRIybLgENunTOT.js","./Bne-AygyF1USkPAy.js","./BTOQaSn9DDyJPUlX.js","./CBP4y6KFPu24xhDT.js","./CZaKvnrRdlLj1_X8.js","./0P0DnZolMnjPhiea.js","./hHvAGynpTvAb97GX.js","./BpJaTpbR_CQzXj9M.js","./DKVB6ddRfDJatYid.js","./BGIujWi3UayyIWlg.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./CbXtAM7H-Jg_J0dk.js";import{i as t,t as n}from"./gU2zeJaXoNh7QI_e.js";import{n as r}from"./CQ-33-es3XJ56pR4.js";import{t as i}from"./HclGiUj8dZXDFmoM.js";import{B as a}from"./D4RZZdlItfrgQHcE.js";import{$ as o,Z as s}from"./DJebrQ5mu8uxpX3b.js";import{g as c}from"./jteb4n23QwBT9m_4.js";var l=e(t(),1),u=n(),d=Object.freeze({x:0,y:0,width:0,height:0}),f=(e,t,n)=>{let r=n?.bounds??e.getBounds(),i=r?t.toPaneBounds(r):d,a=o.getDevicePixelRatio();return{left:o.snapDeviceEdge(i.x,a),top:o.snapDeviceEdge(i.y,a),width:i.width,height:i.height,rotation:n?.rotation??(e.getRotation()||0),flip:n?.flip??e.getFlip()}},p=`data-movable-id`,m=e=>{let t=e;for(let e=t.getParent();e;e=t.getParent())t=e;return t},h=(e,t,n)=>{let r=[],i=t;for(;i&&i!==n;){let e=i.getAttribute?.(p);e&&r.unshift(e),i=i.parentElement}if(r.length===0)return e;let a=[e];for(let e of r){let t=a[a.length-1].getMovables()?.getItems().find(t=>t.getId()===e);if(!t)break;a.push(t)}let o=a.length-1;for(let e=o;e>=0;e--)if(a[e].isSelected())return a[Math.min(e+1,o)];let s=e.getRange().getWorksheet().getView().getMovableSelection().getContainer();return s&&m(s)===e?a[Math.min(g(s)+1,o)]:e},g=e=>{let t=0;for(let n=e.getParent();n;n=n.getParent())t++;return t},_=(0,l.createContext)(new Map),v=(0,l.memo)(({movable:e,preview:t,onHost:n,children:i})=>{let a=c(),[,o]=(0,l.useReducer)(e=>e+1,0);r(e,{onBoundsChange:()=>o(),onAnyChange:()=>o()});let s=(0,l.useCallback)(t=>{n(e,t)},[e,n]),d=f(e,a,t);return(0,u.jsx)(`div`,{className:`sxl-movable-adornment`,ref:s,style:{position:`absolute`,left:d.left,top:d.top,width:d.width,height:d.height,transform:d.rotation?`rotate(${d.rotation}deg)`:void 0,transformOrigin:`center`,zIndex:3001,pointerEvents:`none`},children:i})});v.displayName=`MovableAdornment`;var y={nw:[-1,-1],n:[0,-1],ne:[1,-1],w:[-1,0],e:[1,0],sw:[-1,1],s:[0,1],se:[1,1]},b=[`ew-resize`,`nwse-resize`,`ns-resize`,`nesw-resize`],x=(e,t)=>{let n=180*Math.atan2(e[1],e[0])/Math.PI+t;return b[(Math.round(n/45)%4+4)%4]},S=(0,l.memo)(e=>{let{directions:t,rotation:n,isDragging:r=!1,onResizeStart:i,onResize:a,onResizeEnd:o,onResizeCancel:s,context:c=!1,onMoveStart:d,children:f}=e,p=(0,l.useRef)(null),m=(0,l.useCallback)(e=>{if(e.button!==0)return;e.stopPropagation(),e.preventDefault();let t=y[e.currentTarget.dataset.direction??``];t&&i()&&(p.current={pointerId:e.pointerId,direction:t,press:{x:e.clientX,y:e.clientY}},e.currentTarget.setPointerCapture(e.pointerId))},[i]),h=(0,l.useCallback)(e=>{let t=p.current;t&&t.pointerId===e.pointerId&&(e.stopPropagation(),a(t.direction,[e.clientX-t.press.x,e.clientY-t.press.y],e.shiftKey))},[a]),g=(0,l.useCallback)(e=>{let t=p.current;t&&t.pointerId===e.pointerId&&(e.stopPropagation(),p.current=null,o())},[o]),_=(0,l.useCallback)(e=>{let t=p.current;t&&t.pointerId===e.pointerId&&(p.current=null,s())},[s]),v=(0,l.useCallback)(e=>{e.button===0&&(e.stopPropagation(),e.preventDefault(),d?.(e.nativeEvent))},[d]);return(0,u.jsxs)(`div`,{className:[`sxl-movable-control`,r?`sxl-dragging`:null,c?`sxl-context`:null].filter(Boolean).join(` `),children:[f,(0,u.jsx)(`div`,{className:`sxl-movable-control-outline`}),t.map(e=>{let t=y[e];return t?(0,u.jsx)(`div`,{className:`sxl-movable-control-handle`,"data-direction":e,style:{left:50*(t[0]+1)+`%`,top:50*(t[1]+1)+`%`,cursor:x(t,n)},onPointerDown:m,onPointerMove:h,onPointerUp:g,onPointerCancel:_},e):null}),d?(0,u.jsx)(`div`,{className:`sxl-movable-move-handle`,onPointerDown:v,children:(0,u.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,u.jsx)(`path`,{d:`M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z`})})}):null]})});S.displayName=`MovableControl`;var C=new Map,w=new Map,T=new Map,E=new Set,D=()=>{for(let e of[...E])e()},O=!1,k=()=>{O||(O=!0,function(e){e(`picture`,()=>i(()=>import(`./DTAKTGn53yF_B621.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),{select:e=>e.PictureKind}),e(`chart`,()=>i(()=>import(`./Da_VIghRFdNrmfZT.js`),__vite__mapDeps([17,2,1,18,3,4,5,6,19,20]),import.meta.url),{select:e=>e.ChartKind}),e(`slicer`,()=>i(()=>import(`./CL_hAngRQwm_KGdR.js`),__vite__mapDeps([21,2,1,9,10,3,4,5,6,22,13,14,15]),import.meta.url),{select:e=>e.SlicerKind}),e(`shape`,()=>i(()=>import(`./Bne-AygyF1USkPAy.js`),__vite__mapDeps([23,2,1,9,10,3,4,5,6,11,24,25,20,13,14,15,12,16]),import.meta.url),{select:e=>e.ShapeKind,selectionShadow:!1}),e(`group`,()=>i(()=>import(`./CZaKvnrRdlLj1_X8.js`),__vite__mapDeps([26,2,1,9,11,3,4,5,6]),import.meta.url),{select:({GroupEditor:e})=>t=>(0,u.jsx)(e,{...t,container:t.movable.getContent()})}),e(`note`,()=>i(()=>import(`./0P0DnZolMnjPhiea.js`),__vite__mapDeps([27,2,1,9,18,5,3,4,6,25,13,14,15]),import.meta.url),{select:({NoteEditor:e})=>t=>{let{onContextMenuCapture:n,...r}=t;return(0,u.jsx)(e,{...r,note:t.movable.getContent()})}}),e(`error`,()=>i(()=>import(`./hHvAGynpTvAb97GX.js`).then(e=>e.t),__vite__mapDeps([28,29,2,1,30,18,5,3,4,6]),import.meta.url),{select:({ErrorContentFrame:e})=>t=>(0,u.jsx)(e,{...t})});let t=(t,n)=>{e(t,()=>i(()=>import(`./BGIujWi3UayyIWlg.js`),__vite__mapDeps([31,2,1,9,13,4,3,14,15]),import.meta.url),{select:n})};t(`button`,e=>e.ButtonRenderer),t(`checkBox`,e=>e.CheckBoxRenderer),t(`optionButton`,e=>e.OptionButtonRenderer),t(`listBox`,e=>e.ListBoxRenderer),t(`dropDown`,e=>e.DropDownRenderer),t(`scrollBar`,e=>e.ScrollBarRenderer),t(`spinner`,e=>e.SpinnerRenderer),t(`groupBox`,e=>e.GroupBoxRenderer),t(`label`,e=>e.LabelRenderer),t(`editBox`,e=>e.UnmodeledControlRenderer),t(`dialog`,e=>e.UnmodeledControlRenderer),t(`formControl`,e=>e.UnmodeledControlRenderer)}(H))},A=e=>(k(),w.get(e)??C.get(e)),j=e=>{let{movable:t,fallback:n,children:r}=e,[,i]=(0,l.useReducer)(e=>e+1,0),a=t.isContentLoaded();return s(!a),(0,l.useEffect)(()=>{if(a)return;let e=!0;return t.whenContentLoaded().then(()=>{e&&i()}),()=>{e=!1}},[t,a]),(0,u.jsx)(u.Fragment,{children:a?r:n})},M=e=>{let[,t]=(0,l.useReducer)(e=>e+1,0),n=e.module;return(0,l.useEffect)(()=>{if(n)return;let r=!0,i=L(()=>{r&&e.module&&t()});return e.loadModule().catch(()=>{}),()=>{r=!1,i()}},[e,n]),n},N=e=>{let t=M(e.kind),[n,r]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{if(t)return;let n=!0;return e.kind.loadModule().catch(()=>{n&&r(!0)}),()=>{n=!1}},[e.kind,t]),s(!t&&!n),!t)return(0,u.jsx)(u.Fragment,{children:e.fallback});let i=t.renderer;return(0,u.jsx)(i,{...e.props})},P=(e,t,n,r)=>{let i=a(e,t,{select:e=>{let t=n?.select?n.select(e):e,r=typeof(i=t)==`object`&&i!==null&&`renderer`in i?t:{renderer:t};var i;return l.module=r,l.control=r.control,l.loaded=!0,D(),r},prefetch:!1!==n?.prefetch&&(r??!0)}),o=null,s=n?.fallback??null,c=e=>(0,u.jsx)(j,{movable:e.movable,fallback:s,children:(0,u.jsx)(N,{kind:l,fallback:s,props:e})}),l={Renderer:n?.hitArea===`content`?c:e=>(0,u.jsx)(`div`,{className:`sxl-movable-content`,style:e.style,children:c(e)}),loaded:!1,control:void 0,LazyControl:e=>{let t=M(l)?.control??S;return(0,u.jsx)(t,{...e})},ownShadow:!1===n?.selectionShadow,loadModule:()=>(o??=i.load().then(e=>(o=null,e),t=>{throw o=null,console.warn(`The renderer '${e}' could not be loaded; its movables are drawn as the fallback.`,t),t}),o),module:void 0,lazyModule:i};return l};function F(e){let t=A(e);if(!t?.module)return;let n=T.get(e);n&&!n.pane&&n.load().catch(()=>{});let{control:r,commands:i,toolbar:a,pane:o}=t.module;return{type:e,control:r,commands:i,toolbar:a,pane:n?n.pane:o}}async function I(e){let t=A(e);if(t){try{await t.loadModule(),await T.get(e)?.load()}catch{return}return F(e)}}function L(e){return E.add(e),()=>{E.delete(e)}}function R(e){return!A(e)?.ownShadow}function z(e){let t=A(e);if(t)return t.loaded?t.control:t.LazyControl}function B(e){return A(e)?.Renderer}function V(){return k(),[...new Set([...C.keys(),...w.keys()])]}function H(e,t,n){C.set(e,P(`movable-renderer:built-in:${e}`,t,{hitArea:`content`,...n},()=>!w.has(e)))}export{V as a,I as c,h as d,B as f,F as i,L as l,m,S as n,z as o,p,R as r,_ as s,v as t,f as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CKbXhNyUiI18JA_C.js","./gU2zeJaXoNh7QI_e.js","./CbXtAM7H-Jg_J0dk.js","./D4RZZdlItfrgQHcE.js","./HclGiUj8dZXDFmoM.js","./DwHci99xcnRTEcv5.js","./DdmX3djBOA6UCZtf.js","./D72Rp__0TEqJ972a.js","./7N8xCpYVBHFqfoAg.js","./CQ-33-es3XJ56pR4.js","./Bdb0azxGoCh6NBDk.js","./DszZ1A807YzTc0ek.js","./97qOXULGlJqaTCIL.js","./COL9dj40ytErlGak.js","./3Ls_kOvlQseMV8Q0.js","./nHThFXCAZFOM_npq.js","./DYYzsN95gWMsxOaj.js","./37HIsN_8LEsOWyOO.js","./YH1wNXzhQbkuWxeS.js","./CraI-__UdtaIvbNn.js","./C9SC-cEIt6gdhZRw.js","./D1KqgZwk5MjDhk5i.js","./BowRIybLgENunTOT.js","./m48xmzGgNgwXSEgQ.js","./BTOQaSn9DDyJPUlX.js","./CBP4y6KFPu24xhDT.js","./RHcyaEfxJB7O3alo.js","./BXss42mPBQnnt0Rh.js","./B7uNU6WWjJaco6ho.js","./DSB_SKy2lKI_VGik.js","./DKVB6ddRfDJatYid.js","./BGIujWi3UayyIWlg.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./CbXtAM7H-Jg_J0dk.js";import{i as t,t as n}from"./gU2zeJaXoNh7QI_e.js";import{n as r}from"./CQ-33-es3XJ56pR4.js";import{t as i}from"./HclGiUj8dZXDFmoM.js";import{B as a}from"./D4RZZdlItfrgQHcE.js";import{$ as o,Z as s}from"./DwHci99xcnRTEcv5.js";import{g as c}from"./DszZ1A807YzTc0ek.js";var l=e(t(),1),u=n(),d=Object.freeze({x:0,y:0,width:0,height:0}),f=(e,t,n)=>{let r=n?.bounds??e.getBounds(),i=r?t.toPaneBounds(r):d,a=o.getDevicePixelRatio();return{left:o.snapDeviceEdge(i.x,a),top:o.snapDeviceEdge(i.y,a),width:i.width,height:i.height,rotation:n?.rotation??(e.getRotation()||0),flip:n?.flip??e.getFlip()}},p=`data-movable-id`,m=e=>{let t=e;for(let e=t.getParent();e;e=t.getParent())t=e;return t},h=(e,t,n)=>{let r=[],i=t;for(;i&&i!==n;){let e=i.getAttribute?.(p);e&&r.unshift(e),i=i.parentElement}if(r.length===0)return e;let a=[e];for(let e of r){let t=a[a.length-1].getMovables()?.getItems().find(t=>t.getId()===e);if(!t)break;a.push(t)}let o=a.length-1;for(let e=o;e>=0;e--)if(a[e].isSelected())return a[Math.min(e+1,o)];let s=e.getRange().getWorksheet().getView().getMovableSelection().getContainer();return s&&m(s)===e?a[Math.min(g(s)+1,o)]:e},g=e=>{let t=0;for(let n=e.getParent();n;n=n.getParent())t++;return t},_=(0,l.createContext)(new Map),v=(0,l.memo)(({movable:e,preview:t,onHost:n,children:i})=>{let a=c(),[,o]=(0,l.useReducer)(e=>e+1,0);r(e,{onBoundsChange:()=>o(),onAnyChange:()=>o()});let s=(0,l.useCallback)(t=>{n(e,t)},[e,n]),d=f(e,a,t);return(0,u.jsx)(`div`,{className:`sxl-movable-adornment`,ref:s,style:{position:`absolute`,left:d.left,top:d.top,width:d.width,height:d.height,transform:d.rotation?`rotate(${d.rotation}deg)`:void 0,transformOrigin:`center`,zIndex:3001,pointerEvents:`none`},children:i})});v.displayName=`MovableAdornment`;var y={nw:[-1,-1],n:[0,-1],ne:[1,-1],w:[-1,0],e:[1,0],sw:[-1,1],s:[0,1],se:[1,1]},b=[`ew-resize`,`nwse-resize`,`ns-resize`,`nesw-resize`],x=(e,t)=>{let n=180*Math.atan2(e[1],e[0])/Math.PI+t;return b[(Math.round(n/45)%4+4)%4]},S=(0,l.memo)(e=>{let{directions:t,rotation:n,isDragging:r=!1,onResizeStart:i,onResize:a,onResizeEnd:o,onResizeCancel:s,context:c=!1,onMoveStart:d,children:f}=e,p=(0,l.useRef)(null),m=(0,l.useCallback)(e=>{if(e.button!==0)return;e.stopPropagation(),e.preventDefault();let t=y[e.currentTarget.dataset.direction??``];t&&i()&&(p.current={pointerId:e.pointerId,direction:t,press:{x:e.clientX,y:e.clientY}},e.currentTarget.setPointerCapture(e.pointerId))},[i]),h=(0,l.useCallback)(e=>{let t=p.current;t&&t.pointerId===e.pointerId&&(e.stopPropagation(),a(t.direction,[e.clientX-t.press.x,e.clientY-t.press.y],e.shiftKey))},[a]),g=(0,l.useCallback)(e=>{let t=p.current;t&&t.pointerId===e.pointerId&&(e.stopPropagation(),p.current=null,o())},[o]),_=(0,l.useCallback)(e=>{let t=p.current;t&&t.pointerId===e.pointerId&&(p.current=null,s())},[s]),v=(0,l.useCallback)(e=>{e.button===0&&(e.stopPropagation(),e.preventDefault(),d?.(e.nativeEvent))},[d]);return(0,u.jsxs)(`div`,{className:[`sxl-movable-control`,r?`sxl-dragging`:null,c?`sxl-context`:null].filter(Boolean).join(` `),children:[f,(0,u.jsx)(`div`,{className:`sxl-movable-control-outline`}),t.map(e=>{let t=y[e];return t?(0,u.jsx)(`div`,{className:`sxl-movable-control-handle`,"data-direction":e,style:{left:50*(t[0]+1)+`%`,top:50*(t[1]+1)+`%`,cursor:x(t,n)},onPointerDown:m,onPointerMove:h,onPointerUp:g,onPointerCancel:_},e):null}),d?(0,u.jsx)(`div`,{className:`sxl-movable-move-handle`,onPointerDown:v,children:(0,u.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,u.jsx)(`path`,{d:`M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z`})})}):null]})});S.displayName=`MovableControl`;var C=new Map,w=new Map,T=new Map,E=new Set,D=()=>{for(let e of[...E])e()},O=!1,k=()=>{O||(O=!0,function(e){e(`picture`,()=>i(()=>import(`./CKbXhNyUiI18JA_C.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),{select:e=>e.PictureKind}),e(`chart`,()=>i(()=>import(`./37HIsN_8LEsOWyOO.js`),__vite__mapDeps([17,2,1,18,3,4,5,6,19,20]),import.meta.url),{select:e=>e.ChartKind}),e(`slicer`,()=>i(()=>import(`./D1KqgZwk5MjDhk5i.js`),__vite__mapDeps([21,2,1,9,10,3,4,5,6,22,13,14,15]),import.meta.url),{select:e=>e.SlicerKind}),e(`shape`,()=>i(()=>import(`./m48xmzGgNgwXSEgQ.js`),__vite__mapDeps([23,2,1,9,10,3,4,5,6,11,24,25,20,13,14,15,12,16]),import.meta.url),{select:e=>e.ShapeKind,selectionShadow:!1}),e(`group`,()=>i(()=>import(`./RHcyaEfxJB7O3alo.js`),__vite__mapDeps([26,2,1,9,11,3,4,5,6]),import.meta.url),{select:({GroupEditor:e})=>t=>(0,u.jsx)(e,{...t,container:t.movable.getContent()})}),e(`note`,()=>i(()=>import(`./BXss42mPBQnnt0Rh.js`),__vite__mapDeps([27,2,1,9,18,5,3,4,6,25,13,14,15]),import.meta.url),{select:({NoteEditor:e})=>t=>{let{onContextMenuCapture:n,...r}=t;return(0,u.jsx)(e,{...r,note:t.movable.getContent()})}}),e(`error`,()=>i(()=>import(`./B7uNU6WWjJaco6ho.js`).then(e=>e.t),__vite__mapDeps([28,29,2,1,30,18,5,3,4,6]),import.meta.url),{select:({ErrorContentFrame:e})=>t=>(0,u.jsx)(e,{...t})});let t=(t,n)=>{e(t,()=>i(()=>import(`./BGIujWi3UayyIWlg.js`),__vite__mapDeps([31,2,1,9,13,4,3,14,15]),import.meta.url),{select:n})};t(`button`,e=>e.ButtonRenderer),t(`checkBox`,e=>e.CheckBoxRenderer),t(`optionButton`,e=>e.OptionButtonRenderer),t(`listBox`,e=>e.ListBoxRenderer),t(`dropDown`,e=>e.DropDownRenderer),t(`scrollBar`,e=>e.ScrollBarRenderer),t(`spinner`,e=>e.SpinnerRenderer),t(`groupBox`,e=>e.GroupBoxRenderer),t(`label`,e=>e.LabelRenderer),t(`editBox`,e=>e.UnmodeledControlRenderer),t(`dialog`,e=>e.UnmodeledControlRenderer),t(`formControl`,e=>e.UnmodeledControlRenderer)}(H))},A=e=>(k(),w.get(e)??C.get(e)),j=e=>{let{movable:t,fallback:n,children:r}=e,[,i]=(0,l.useReducer)(e=>e+1,0),a=t.isContentLoaded();return s(!a),(0,l.useEffect)(()=>{if(a)return;let e=!0;return t.whenContentLoaded().then(()=>{e&&i()}),()=>{e=!1}},[t,a]),(0,u.jsx)(u.Fragment,{children:a?r:n})},M=e=>{let[,t]=(0,l.useReducer)(e=>e+1,0),n=e.module;return(0,l.useEffect)(()=>{if(n)return;let r=!0,i=L(()=>{r&&e.module&&t()});return e.loadModule().catch(()=>{}),()=>{r=!1,i()}},[e,n]),n},N=e=>{let t=M(e.kind),[n,r]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{if(t)return;let n=!0;return e.kind.loadModule().catch(()=>{n&&r(!0)}),()=>{n=!1}},[e.kind,t]),s(!t&&!n),!t)return(0,u.jsx)(u.Fragment,{children:e.fallback});let i=t.renderer;return(0,u.jsx)(i,{...e.props})},P=(e,t,n,r)=>{let i=a(e,t,{select:e=>{let t=n?.select?n.select(e):e,r=typeof(i=t)==`object`&&i!==null&&`renderer`in i?t:{renderer:t};var i;return l.module=r,l.control=r.control,l.loaded=!0,D(),r},prefetch:!1!==n?.prefetch&&(r??!0)}),o=null,s=n?.fallback??null,c=e=>(0,u.jsx)(j,{movable:e.movable,fallback:s,children:(0,u.jsx)(N,{kind:l,fallback:s,props:e})}),l={Renderer:n?.hitArea===`content`?c:e=>(0,u.jsx)(`div`,{className:`sxl-movable-content`,style:e.style,children:c(e)}),loaded:!1,control:void 0,LazyControl:e=>{let t=M(l)?.control??S;return(0,u.jsx)(t,{...e})},ownShadow:!1===n?.selectionShadow,loadModule:()=>(o??=i.load().then(e=>(o=null,e),t=>{throw o=null,console.warn(`The renderer '${e}' could not be loaded; its movables are drawn as the fallback.`,t),t}),o),module:void 0,lazyModule:i};return l};function F(e){let t=A(e);if(!t?.module)return;let n=T.get(e);n&&!n.pane&&n.load().catch(()=>{});let{control:r,commands:i,toolbar:a,pane:o}=t.module;return{type:e,control:r,commands:i,toolbar:a,pane:n?n.pane:o}}async function I(e){let t=A(e);if(t){try{await t.loadModule(),await T.get(e)?.load()}catch{return}return F(e)}}function L(e){return E.add(e),()=>{E.delete(e)}}function R(e){return!A(e)?.ownShadow}function z(e){let t=A(e);if(t)return t.loaded?t.control:t.LazyControl}function B(e){return A(e)?.Renderer}function V(){return k(),[...new Set([...C.keys(),...w.keys()])]}function H(e,t,n){C.set(e,P(`movable-renderer:built-in:${e}`,t,{hitArea:`content`,...n},()=>!w.has(e)))}export{V as a,I as c,h as d,B as f,F as i,L as l,m,S as n,z as o,p,R as r,_ as s,v as t,f as u};