@sheetxl/studio-vanilla 0.8.0-beta.1 → 0.8.0-beta.10

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 (539) hide show
  1. package/browser/esm/-LoBx7J6imeqaxCq.mjs +236 -0
  2. package/browser/esm/8-jmVNNbOHuXFdVQ.mjs +392 -0
  3. package/browser/esm/{CJPemkFUzhcAD_qR.mjs → B00ixdmb8-O5ijEp.mjs} +1 -1
  4. package/{cdn/assets/Bv_96nwOEMHN9Sa0.js → browser/esm/B0Wjc3lwtjKMwnvn.mjs} +27 -29
  5. package/browser/esm/B3Ii8x6RquHW1jMc.mjs +299 -0
  6. package/{cdn/assets/C_Io1QC4CeLGRBrz.js → browser/esm/B7iV5qzlmJlM2nQv.mjs} +179 -202
  7. package/{cdn/assets/D_t53-8k73CNpV-p2.js → browser/esm/BAH_cWcQEIBKWnl6.mjs} +94 -74
  8. package/browser/esm/BAdRecWK1maKGOZd.mjs +142 -0
  9. package/browser/esm/BBjgqNlHm-ssbSAG.mjs +47 -0
  10. package/browser/esm/BCWTI3jdTPG37r8W.mjs +46 -0
  11. package/browser/esm/{Dnx3_xXfRlD6ECfZ2.mjs → BMlPFJ1glExv-70Z.mjs} +5 -5
  12. package/browser/esm/{DBL3Qp5jyPrFg7KI2.mjs → BN2d5U1nw7pRtOrn.mjs} +1 -1
  13. package/browser/esm/BNIInlJQbJjH8B6G.mjs +84250 -0
  14. package/browser/esm/BPrHgyAsm2Htx15h.mjs +67 -0
  15. package/browser/esm/BRfat1fV3oGLwvin.mjs +76 -0
  16. package/browser/esm/{8V-VceXEjpADM8qK2.mjs → BSCja5yvevmKZPBB.mjs} +1 -1
  17. package/browser/esm/BThOwSja2ra4xejQ.mjs +6306 -0
  18. package/browser/esm/BVJUL2HhoedhbwVy.mjs +77 -0
  19. package/browser/esm/{CfvrjQGuf7vXiQCB.mjs → BWo1N4YbK_zGU0nu.mjs} +1 -1
  20. package/browser/esm/B_HB4y7AA88Z775Z.mjs +91 -0
  21. package/browser/esm/BaEZmurTZnX_yfKD.mjs +1082 -0
  22. package/browser/esm/BeMLfv6hWo15VCIL.mjs +239 -0
  23. package/{cdn/assets/C1ZePT2B182vSnxW.js → browser/esm/BhkeuRcx8RlLCQ5E.mjs} +1 -1
  24. package/browser/esm/Bi5-feQLtwpV6Ai8.mjs +57 -0
  25. package/browser/esm/BlPn_DXaEXOPxMxC.mjs +540 -0
  26. package/browser/esm/{B4iT_CduJeJunwBc.mjs → BsUrrzAgfyAdcCJW.mjs} +28 -13
  27. package/browser/esm/{47Yv4X226-93If7L.mjs → BtGmrIqU9W1L8zfZ.mjs} +1 -1
  28. package/browser/esm/BtdRr6IbtO6Gypsk.mjs +27 -0
  29. package/browser/esm/BwOxnbR61WFJwy0A.mjs +607 -0
  30. package/browser/esm/BxhKgo_rPQ2d12HT.mjs +35 -0
  31. package/browser/esm/By3a43qwWICwXRmw.mjs +8035 -0
  32. package/browser/esm/{BqTFwWLbXXJ0Fu-X2.mjs → ByUcqyCNfqi5Mm7w.mjs} +2 -2
  33. package/browser/esm/{Blc1T4zLkp8bRC_n2.mjs → ByqhqEMBLrnkaPKE.mjs} +28 -27
  34. package/{cdn/assets/8f9hCbpXTTYEgG31.js → browser/esm/C-0viTjg1dT2F-sk.mjs} +2 -2
  35. package/{cdn/assets/BMRav2VAqEzDSp3r.js → browser/esm/C3r_9RqlWrEmlXZ1.mjs} +37 -3
  36. package/browser/esm/C4VT6lNbpaDXCpBb.mjs +8820 -0
  37. package/browser/esm/{Be4QC65cR8N84rTn.mjs → C5EKgE9Owsc_juw-.mjs} +1 -1
  38. package/browser/esm/{1guzFZp1LHz_FwfL.mjs → C9NyIoUahFiyRCxP.mjs} +2 -2
  39. package/{cdn/assets/BykiUmcpDgSRNQI1.js → browser/esm/CBdNC7BOfc5TewHU.mjs} +1 -1
  40. package/browser/esm/CCd192S7yVpc6iOe.mjs +118 -0
  41. package/browser/esm/{BLcn1kGRsjURZSzk.mjs → CDsuiN--qdALFyql.mjs} +179 -202
  42. package/{cdn/assets/BDkVAo0CDCTE04ZJ.js → browser/esm/CFvKDDbrL3wpXnQH.mjs} +1 -1
  43. package/browser/esm/{CH0of3GZTzHviuQV.mjs → CHMqT9DzYKTxPfP6.mjs} +2 -2
  44. package/browser/esm/{CEN8dYSpN2oew8HH.mjs → CMxbiQ5J79M3n1tk.mjs} +604 -405
  45. package/browser/esm/{vcRSnmAqjwKglEkY.mjs → CQOyeq_-pg3CM-uA.mjs} +6 -7
  46. package/browser/esm/CQuv-nk5jtXUfu7C.mjs +7 -0
  47. package/browser/esm/CRAzVh3CaAa16avf.mjs +521 -0
  48. package/{cdn/assets/hFSDx-LnUOObv-6h.js → browser/esm/CSEMxasVyGCekxKf.mjs} +6 -7
  49. package/browser/esm/CTI-mCJbJzitJZwj.mjs +25 -0
  50. package/{cdn/assets/CdMv3f8Gyxh8q2RR.js → browser/esm/CTdFZ_I-41Vr6Dy4.mjs} +1 -1
  51. package/browser/esm/CVcCUfSRsiZ1-6hs.mjs +119 -0
  52. package/browser/esm/CVxlfyE-gnJM8hOz.mjs +177 -0
  53. package/browser/esm/CWJzHmEgahdOfNjH.mjs +527 -0
  54. package/browser/esm/CWoPWWRwMgkGPFFP.mjs +7393 -0
  55. package/browser/esm/CZOJogyZqMfUxcXj.mjs +1141 -0
  56. package/{cdn/assets/DLEdaT0MmrOxMa2h2.js → browser/esm/CaS8_J5HfBRk5_Nw.mjs} +94 -94
  57. package/browser/esm/CdeXXPCp5cCYvGyD.mjs +14 -0
  58. package/browser/esm/{BVRzmIk5PujkT_Ap.mjs → CfltjY8hY-RPwwpd.mjs} +582 -551
  59. package/browser/esm/Chr_TXM-48IsK8Va.mjs +155 -0
  60. package/browser/esm/{DTaVECXVrgvC48BE.mjs → ClJvUf8aR8vNC_3Z.mjs} +6 -6
  61. package/browser/esm/Clx8vvGDOTWK_M2l.mjs +484 -0
  62. package/browser/esm/CnWNviK4qlX2GVl6.mjs +73 -0
  63. package/browser/esm/{CQM87ZBN7Yzn4Yxr.mjs → Cpza4AeltEVHASij.mjs} +3 -3
  64. package/browser/esm/{BceIETi6JJRW6Ss62.mjs → CqoHxlGpZ3yzPj5V.mjs} +22 -21
  65. package/{cdn/assets/iXWgTu3qpYZHcx1J.js → browser/esm/CtZPEkaldpJpoGtW.mjs} +2197 -2013
  66. package/browser/esm/CvWGtHslTdesJik-.mjs +69 -0
  67. package/browser/esm/Cw-4uoMuq_m7ziA3.mjs +36 -0
  68. package/browser/esm/CxCipDFamYSOctBo.mjs +299 -0
  69. package/browser/esm/Cy00y9b9j17Txyv1.mjs +466 -0
  70. package/browser/esm/D-55MlIn7Wo_hdjI.mjs +905 -0
  71. package/browser/esm/D-9f1NKcpuYSgond.mjs +412 -0
  72. package/browser/esm/D-KZpU6HMaP4VUva.mjs +357 -0
  73. package/browser/esm/D0r2MPlWLnStWJNW.mjs +622 -0
  74. package/browser/esm/{9_bymSfTn_rR_v6W.mjs → D2aQPiGg0ZoMYzuf.mjs} +22 -21
  75. package/{cdn/assets/DKeLjEJPO9nT3bpr.js → browser/esm/D2coM-dNrlLpnUu5.mjs} +1000 -1010
  76. package/browser/esm/D7CGuQcwpkiuesEI.mjs +229 -0
  77. package/browser/esm/{RW23HF8taEtW8q9D.mjs → D7DWH3-5fBNx8jtc.mjs} +182 -132
  78. package/browser/esm/D7kkzIFPqKBK94kO.mjs +17952 -0
  79. package/browser/esm/D88StfSjZJi5E8Xb.mjs +5153 -0
  80. package/browser/esm/D8exjrado9TJrBp-.mjs +1946 -0
  81. package/browser/esm/DAE3Kv0Vs0VuBecT.mjs +32 -0
  82. package/browser/esm/DAprxR00V9qvNLL2.mjs +6607 -0
  83. package/browser/esm/DEvZj68igS7Q8SZE.mjs +763 -0
  84. package/browser/esm/DG3BfxRsbjey-B7E.mjs +441 -0
  85. package/browser/esm/DGCOPbZbEmt0x9z0.mjs +155 -0
  86. package/browser/esm/DGcvio2uhlrsE3ZY.mjs +236 -0
  87. package/browser/esm/DGuynZFJ9tqziqQs.mjs +92 -0
  88. package/browser/esm/DJqj66SnUcx0QmSN.mjs +15 -0
  89. package/browser/esm/DLhK_oSGg71ry6-m.mjs +86 -0
  90. package/{cdn/assets/D9-wpGVbTS9rRpxx.js → browser/esm/DLqc11Pf8vaE4Q5B.mjs} +2 -2
  91. package/browser/esm/DNCqTF9EbT-U1TdV.mjs +20 -0
  92. package/browser/esm/{R5bs6kCQSZmsCXz-.mjs → DNaPo7BQu6hr1fWq.mjs} +1 -1
  93. package/browser/esm/{BCkXtOM3yKocv7L-2.mjs → DQEjvIGMgEkiaP6J.mjs} +1 -1
  94. package/{cdn/assets/CAPgMrAKg07EREFD2.js → browser/esm/DQIRFXG4MveFkK3I.mjs} +1 -1
  95. package/browser/esm/{DrUEYcXg6N2D2s1Z2.mjs → DRm1R4uVOkaMfXNI.mjs} +51 -11
  96. package/browser/esm/DSf-Db1h8rlW2A6n.mjs +122 -0
  97. package/browser/esm/DSviq1TNoiIAGW7W.mjs +32 -0
  98. package/{cdn/assets/UYgwKnPX3US3Cj2k2.js → browser/esm/DTn9oYyiIYgyijAk.mjs} +110 -83
  99. package/{cdn/assets/Clfp7SznkOrJoQvL.js → browser/esm/DVpi1vC8ixXvUQG_.mjs} +3 -3
  100. package/browser/esm/{BOl4FzJRD7MplCU72.mjs → DWgp4t9N9u0eWthH.mjs} +1 -1
  101. package/{cdn/assets/B5ZqqASTcBEV5L9K.js → browser/esm/DXo8mR6t5HGsmTcu.mjs} +1 -1
  102. package/browser/esm/DZRmBfjn2TgOTu5e.mjs +3604 -0
  103. package/browser/esm/{DVZ_UnchuMRveDG32.mjs → D_7BWdsu8yejhUxy.mjs} +184 -11
  104. package/browser/esm/D_thhK0vSez8Yfle.mjs +798 -0
  105. package/browser/esm/DaMKWQQTgIF08cT7.mjs +105 -0
  106. package/browser/esm/Db6Tvr45TS9J5Qsb.mjs +259 -0
  107. package/{cdn/assets/EwzqnZl1lTr56hH-.js → browser/esm/Dc2ZwgbIEgYWwAsF.mjs} +1 -1
  108. package/{cdn/assets/DQ4o4dG7gWbL1X8F.js → browser/esm/DeUXRggj8Oz9ru_i.mjs} +2 -2
  109. package/{cdn/assets/DRc_Wi5c7WdKHTVN.js → browser/esm/DfESVLC8CAi8m8A7.mjs} +6 -6
  110. package/browser/esm/{D3G3tI3DVCUF3Gdk.mjs → DjdkGy-EI1kSo226.mjs} +7 -5
  111. package/browser/esm/DjtXfgbmXjUAoG0y.mjs +58 -0
  112. package/browser/esm/DlOVZD0OiAjouS6-.mjs +3563 -0
  113. package/browser/esm/Dme0qpRinBnhzp53.mjs +519 -0
  114. package/browser/esm/DnyZmrwPxShyeUjm.mjs +849 -0
  115. package/browser/esm/DoS1sE431fEhdOQb.mjs +216 -0
  116. package/browser/esm/DqBj-9o7UdXu4qhb.mjs +33 -0
  117. package/browser/esm/{DZbR5R1fNikjgqYb.mjs → DrI_S0A9TQvriTua.mjs} +1 -1
  118. package/browser/esm/Dv2z0548SZRGTN3l.mjs +149 -0
  119. package/browser/esm/{D6SKy2BtcWkhfiA02.mjs → Dv8aQFTTaQBJKDDk.mjs} +2 -5
  120. package/browser/esm/DvWCBuY0jAL-RmJV.mjs +3363 -0
  121. package/browser/esm/Dwxz0s23ra1tRtsH.mjs +7 -0
  122. package/browser/esm/{Cbw0JeJURvQyxIoa.mjs → DxcRLd7wmBGDgJsA.mjs} +1 -1
  123. package/{cdn/assets/DOsbSsKsexrBoeXa2.js → browser/esm/DxwprgjYhcmfDbXH.mjs} +24 -24
  124. package/browser/esm/{Dc0BDcQUGy_WIVFa.mjs → Dy44qJVkwNseMG-3.mjs} +1 -1
  125. package/browser/esm/DyeY6XwMQ_XNUHiW.mjs +89 -0
  126. package/browser/esm/{BD7RxHQgrqy_4tb5.mjs → ErIXJFPDFXwGEL8V.mjs} +2 -2
  127. package/{cdn/assets/COA_SZY2x8q6t4BD.js → browser/esm/FO1Jezau486fH4kN.mjs} +7 -6
  128. package/browser/esm/FjNOhkR7-JAIaRP6.mjs +19 -0
  129. package/browser/esm/H-JnJQMcZQbpvjdb.mjs +2706 -0
  130. package/browser/esm/J9i3r1fU0H10b2hX.mjs +1001 -0
  131. package/browser/esm/LAbUYeLiPG8z9cmA.mjs +277 -0
  132. package/browser/esm/M7RYrx20B_Yl_euJ.mjs +400 -0
  133. package/browser/esm/{Gy0CHZTvn4hY-rkx2.mjs → PtGiIWFBYP-ujLmf.mjs} +1 -1
  134. package/browser/esm/RLU85PsAYtKPUf6N.mjs +71 -0
  135. package/browser/esm/{qG5zdZZAe6mQIJo32.mjs → RfHd1JATBlcsfLPv.mjs} +5 -5
  136. package/{cdn/assets/CtXoSHbCUKMY-tSJ2.js → browser/esm/SNze-adFJwKuGSQW.mjs} +48 -2
  137. package/browser/esm/UTZcodQydbuMfCOS.mjs +171 -0
  138. package/browser/esm/{BHmYoIIbNW3GdcqV2.mjs → VwGokBaawZfZiV2X.mjs} +1 -1
  139. package/browser/esm/WMYR09ZOR8JbZEnx.mjs +4748 -0
  140. package/browser/esm/{DW72HwfnJtQxzoGa.mjs → ZbGPiRN9j0629JJQ.mjs} +2 -2
  141. package/browser/esm/{CR3jgkduTLczbMjH2.mjs → ZxsFYopF0_WWqw4Q.mjs} +1 -1
  142. package/browser/esm/_MPToH4oMe4rhTdZ.mjs +63 -0
  143. package/{cdn/assets/BHBJtVTiQByD_y9j2.js → browser/esm/_t0Mx-mUFVtmVNkU.mjs} +2 -2
  144. package/browser/esm/{B0HA_dHcr0kKfudQ.mjs → _zRV52yhE4gPf3XI.mjs} +213 -190
  145. package/browser/esm/aUREGNA8H7p4BpMK.mjs +33 -0
  146. package/browser/esm/cwuYkcKwsKkPe3gG.mjs +598 -0
  147. package/browser/esm/{NekeSGoazNCraGNC2.mjs → djM9mJznx8GzVq51.mjs} +16 -15
  148. package/browser/esm/{DuPdSe-EXFTx9dsc2.mjs → f1OJemsiZnbwnds-.mjs} +16 -15
  149. package/{cdn/assets/DQ-0yyFAwoWtxmhV2.js → browser/esm/i0P63Wd0RRlgJotb.mjs} +1 -1
  150. package/browser/esm/{B4vYIE3kSPTxCgpf2.mjs → iC69oOND5T8khIWf.mjs} +18 -17
  151. package/browser/esm/index.mjs +644 -48
  152. package/browser/esm/{7rixDGGrR72lXkMV.mjs → kVBPUUnVyZfb8pf3.mjs} +52 -52
  153. package/{cdn/assets/BCZjYGV8AqIZghBH.js → browser/esm/lqknEt3DTma5Juxs.mjs} +69 -4
  154. package/browser/esm/mZ92wNrHVpYdli1U.mjs +182 -0
  155. package/browser/esm/{DtXC6uPF2LLktqFE.mjs → pKc_RPdZPLAgvNDh.mjs} +2 -2
  156. package/browser/esm/{BPv6Pw1hW-sV5Fya.mjs → pc49xtHdprXZLW2X.mjs} +1 -1
  157. package/browser/esm/px-aQ8dMjiWag_pV.mjs +167 -0
  158. package/browser/esm/qYca4mdySLkACfo1.mjs +37 -0
  159. package/browser/esm/r2Az2Yc4_qj2-sn0.mjs +398 -0
  160. package/browser/esm/{DXWmgQSeh0_HDxZj.mjs → rY-dC3WB558TIbum.mjs} +4 -4
  161. package/browser/esm/rkTVQiYG3wd8oPom.mjs +2452 -0
  162. package/browser/esm/sDVzjXC1mS5rucF5.mjs +2447 -0
  163. package/browser/esm/sxxbiJiCMOW2Eivd.mjs +24952 -0
  164. package/{cdn/assets/CopfZ7Y1Zn_PDNXK.js → browser/esm/vGKTE7yjY8y-XnsW.mjs} +16 -11
  165. package/browser/esm/{CG5v2hAwGR5Ptufn.mjs → x6GcENwqoUVbd60j.mjs} +1 -1
  166. package/{cdn/assets/CGqvy5LwQ4z9J2oD.js → browser/esm/ycmpAs4kQfeh78Pa.mjs} +1 -1
  167. package/browser/esm/ztqpWR65YYMZ3EPk.mjs +811 -0
  168. package/cdn/assets/0vqRTRN0wEzWao1c.js +522 -0
  169. package/cdn/assets/514mXPTuNvdNgw35.js +412 -0
  170. package/{browser/esm/DVQNQmjI2PKkwiOw2.mjs → cdn/assets/7Sg0ht_ZCMJkPurt.js} +89 -87
  171. package/cdn/assets/{mtrwY1hjJeYlmzC-.js → 7i4WSxDsu2ApJJ2_.js} +6 -6
  172. package/cdn/assets/AjMG7Fb9r4Fk7Hsf.js +78 -0
  173. package/cdn/assets/{CJPemkFUzhcAD_qR.js → B00ixdmb8-O5ijEp.js} +1 -1
  174. package/{browser/esm/Bv_96nwOEMHN9Sa02.mjs → cdn/assets/B0Wjc3lwtjKMwnvn.js} +27 -29
  175. package/cdn/assets/B27vTQlxbHhSQJx8.js +24953 -0
  176. package/cdn/assets/B3NWCYKXucbHhOix.js +93 -0
  177. package/{browser/esm/D_t53-8k73CNpV-p.mjs → cdn/assets/BAH_cWcQEIBKWnl6.js} +94 -74
  178. package/cdn/assets/BAdRecWK1maKGOZd.js +142 -0
  179. package/cdn/assets/BB4MW8sSYEXjPvvf.js +64 -0
  180. package/cdn/assets/BBjgqNlHm-ssbSAG.js +47 -0
  181. package/cdn/assets/BI6afPOpgNYkzIWv.js +6609 -0
  182. package/cdn/assets/{CF8m5SqeMaRkGIYM.js → BIsbcP5RXRU2XPfx.js} +2 -2
  183. package/cdn/assets/{Dnx3_xXfRlD6ECfZ.js → BMlPFJ1glExv-70Z.js} +5 -5
  184. package/cdn/assets/{DBL3Qp5jyPrFg7KI.js → BN2d5U1nw7pRtOrn.js} +1 -1
  185. package/cdn/assets/BNsqqoZY7a4N1wWC.js +905 -0
  186. package/cdn/assets/BPrHgyAsm2Htx15h.js +67 -0
  187. package/cdn/assets/{8V-VceXEjpADM8qK.js → BSCja5yvevmKZPBB.js} +1 -1
  188. package/cdn/assets/{CfvrjQGuf7vXiQCB2.js → BWo1N4YbK_zGU0nu.js} +1 -1
  189. package/cdn/assets/B_3Musz0q2MSZ5H-.js +799 -0
  190. package/cdn/assets/Ba8taVvLslFcKS72.js +119 -0
  191. package/cdn/assets/{CBuvbUg67ah_3BOZ.js → BeQ95CzwR65il0CK.js} +2 -2
  192. package/cdn/assets/BelX6bvQPsGuo-x3.js +7 -0
  193. package/cdn/assets/{C8mUyjJ26jsHGl_D.js → Bgbi7BFR3rN5qj51.js} +22 -21
  194. package/cdn/assets/BgyY4zVPZSXljoCZ.js +14 -0
  195. package/{browser/esm/C1ZePT2B182vSnxW2.mjs → cdn/assets/BhkeuRcx8RlLCQ5E.js} +1 -1
  196. package/cdn/assets/BlIZ30huelIxNo6S.js +91 -0
  197. package/cdn/assets/BlPn_DXaEXOPxMxC.js +540 -0
  198. package/cdn/assets/BoFx07POTorOb5g-.js +7393 -0
  199. package/cdn/assets/{-2S675KWulPRlVNb2.js → BpZ7P0CO148rR4zW.js} +23 -22
  200. package/cdn/assets/BsTFy_iJXJYmaO3Z.js +763 -0
  201. package/cdn/assets/{j8nXVEYbO2kPuEYQ.js → Bsn-tUx172sEG2kR.js} +59 -47
  202. package/cdn/assets/{47Yv4X226-93If7L2.js → BtGmrIqU9W1L8zfZ.js} +1 -1
  203. package/cdn/assets/BuYS_ZjSlcvWZ1JC.js +8035 -0
  204. package/cdn/assets/BvlfKrfrDhE9Jw4d.js +598 -0
  205. package/cdn/assets/BwOxnbR61WFJwy0A.js +607 -0
  206. package/cdn/assets/BxqXOiOyI_XiOmvN.js +156 -0
  207. package/cdn/assets/{BqTFwWLbXXJ0Fu-X.js → ByUcqyCNfqi5Mm7w.js} +2 -2
  208. package/{browser/esm/CsufM5aF6VTLKDWM.mjs → cdn/assets/BzbP4jaN13wC9aSi.js} +58 -55
  209. package/{browser/esm/8f9hCbpXTTYEgG312.mjs → cdn/assets/C-0viTjg1dT2F-sk.js} +2 -2
  210. package/cdn/assets/C0CeCYdLWLjySEFe.js +123 -0
  211. package/cdn/assets/{B55nrhIK6gAAu4ZA.js → C32co-XulWTkEKrW.js} +2 -2
  212. package/{browser/esm/BMRav2VAqEzDSp3r2.mjs → cdn/assets/C3r_9RqlWrEmlXZ1.js} +37 -3
  213. package/cdn/assets/{Be4QC65cR8N84rTn2.js → C5EKgE9Owsc_juw-.js} +1 -1
  214. package/cdn/assets/C6INLvBy8kdzFpsX.js +2447 -0
  215. package/cdn/assets/C7fu6LrSMBlHqwUy.js +46 -0
  216. package/{browser/esm/DMX-ZlC_ljcf7oUN.mjs → cdn/assets/C9NyIoUahFiyRCxP.js} +2 -2
  217. package/{browser/esm/BykiUmcpDgSRNQI12.mjs → cdn/assets/CBdNC7BOfc5TewHU.js} +1 -1
  218. package/cdn/assets/{DZDynaLqNeVaDoiH2.js → CCvBdPu7W2ZF6A9J.js} +3 -3
  219. package/cdn/assets/{Chq4BwbjH0sbIkJN2.js → CDAYVaQYywqaxg4O.js} +28 -13
  220. package/cdn/assets/CEYyp6Qrr_IopxpL.js +22597 -0
  221. package/cdn/assets/CFBgmXap8kmumhoz.js +622 -0
  222. package/{browser/esm/BDkVAo0CDCTE04ZJ2.mjs → cdn/assets/CFvKDDbrL3wpXnQH.js} +1 -1
  223. package/cdn/assets/{1guzFZp1LHz_FwfL2.js → CHMqT9DzYKTxPfP6.js} +2 -2
  224. package/cdn/assets/CILUMtSddGz7WXEv.js +240 -0
  225. package/cdn/assets/{DnzDlqizzNkbhJP7.js → CIyaijfp6itgRpFM.js} +95 -87
  226. package/cdn/assets/{DW7JlG-SQEdLYNar2.js → CL6Tgu_rUO6G-fyq.js} +183 -10
  227. package/cdn/assets/CMVTwWHsRgyfSEDM.js +300 -0
  228. package/cdn/assets/{CEN8dYSpN2oew8HH2.js → CMxbiQ5J79M3n1tk.js} +604 -405
  229. package/cdn/assets/COMOqucXq7X1vi0P.js +230 -0
  230. package/cdn/assets/{vcRSnmAqjwKglEkY2.js → CQOyeq_-pg3CM-uA.js} +6 -7
  231. package/cdn/assets/{c6VvwMHfXubjjtyj.js → CRXSrbGNABtzf532.js} +141 -126
  232. package/{browser/esm/hFSDx-LnUOObv-6h2.mjs → cdn/assets/CSEMxasVyGCekxKf.js} +6 -7
  233. package/cdn/assets/CSIZpJClc66_20kP.js +849 -0
  234. package/cdn/assets/CTI-mCJbJzitJZwj.js +25 -0
  235. package/{browser/esm/CdMv3f8Gyxh8q2RR2.mjs → cdn/assets/CTdFZ_I-41Vr6Dy4.js} +1 -1
  236. package/cdn/assets/CTvPIYWTcjwlJeEA.js +237 -0
  237. package/cdn/assets/CU5cKipVT1X8Xz7F.js +156 -0
  238. package/cdn/assets/CVcCUfSRsiZ1-6hs.js +119 -0
  239. package/cdn/assets/CWJzHmEgahdOfNjH.js +527 -0
  240. package/cdn/assets/CZOJogyZqMfUxcXj.js +1141 -0
  241. package/{browser/esm/D4VqLbEWag8lTWzC2.mjs → cdn/assets/CakrxSS_RXtKmcUX.js} +123 -94
  242. package/{browser/esm/Bl6bX86tSq8hfyb2.mjs → cdn/assets/CbTN0q6XnYGJqyEp.js} +2215 -2027
  243. package/cdn/assets/{gspQcUnmlRIwG609.js → Cfg4Dtndwurxv9LM.js} +8 -8
  244. package/cdn/assets/{BhDLR-jtbOOG-tl12.js → ChAKLV5zrGAHAof2.js} +28 -27
  245. package/cdn/assets/{CpnA5TZRkPDt4HnM2.js → CsrTRThObSryov1b.js} +182 -132
  246. package/cdn/assets/Cv5PLuhEmh5IDHjb.js +75 -0
  247. package/cdn/assets/Cw-4uoMuq_m7ziA3.js +36 -0
  248. package/cdn/assets/Cw7AJWd0S2sjRmr6.js +6309 -0
  249. package/cdn/assets/CwqRA5h1u92Cyit-.js +7 -0
  250. package/cdn/assets/Cy00y9b9j17Txyv1.js +466 -0
  251. package/cdn/assets/{CT3G9YRPVfKtHWwf2.js → D-bNmX0QsA8SuT0m.js} +32 -31
  252. package/{browser/esm/Dg5wjQp0fArKXlM3.mjs → cdn/assets/D-yz3V2UC54rwctD.js} +16 -11
  253. package/cdn/assets/D32D_biNXRCZ24vG.js +87 -0
  254. package/cdn/assets/D8DghdqjOtBzO2Wx.js +35 -0
  255. package/cdn/assets/DAE3Kv0Vs0VuBecT.js +32 -0
  256. package/cdn/assets/DCnWyVXikb_8Dat3.js +61 -0
  257. package/cdn/assets/DHH_uKVzQ_kRYO2N.js +57 -0
  258. package/cdn/assets/DHugYwX4_ZyqGn-C.js +1947 -0
  259. package/cdn/assets/DJqj66SnUcx0QmSN.js +15 -0
  260. package/cdn/assets/{R5bs6kCQSZmsCXz-2.js → DNaPo7BQu6hr1fWq.js} +1 -1
  261. package/cdn/assets/DOHh3pUXxMM09UY5.js +3604 -0
  262. package/cdn/assets/DONxZZT2Iwu7psS5.js +27 -0
  263. package/cdn/assets/{BCkXtOM3yKocv7L-.js → DQEjvIGMgEkiaP6J.js} +1 -1
  264. package/{browser/esm/CAPgMrAKg07EREFD.mjs → cdn/assets/DQIRFXG4MveFkK3I.js} +1 -1
  265. package/cdn/assets/DQjxp9lDP9DzP8ah.js +357 -0
  266. package/cdn/assets/{DrUEYcXg6N2D2s1Z.js → DRm1R4uVOkaMfXNI.js} +51 -11
  267. package/cdn/assets/DSXJHEORGmMQX_Mb.js +8391 -0
  268. package/cdn/assets/DSviq1TNoiIAGW7W.js +32 -0
  269. package/{browser/esm/Clfp7SznkOrJoQvL.mjs → cdn/assets/DVpi1vC8ixXvUQG_.js} +3 -3
  270. package/cdn/assets/{BOl4FzJRD7MplCU7.js → DWgp4t9N9u0eWthH.js} +1 -1
  271. package/{browser/esm/B5ZqqASTcBEV5L9K2.mjs → cdn/assets/DXo8mR6t5HGsmTcu.js} +1 -1
  272. package/cdn/assets/DYvBgX17ZerZSHEJ.js +300 -0
  273. package/cdn/assets/DZRm4H75lnEtOG8e.js +260 -0
  274. package/cdn/assets/D_pMOq6FdH4RSBLc.js +3364 -0
  275. package/{browser/esm/EwzqnZl1lTr56hH-2.mjs → cdn/assets/Dc2ZwgbIEgYWwAsF.js} +1 -1
  276. package/cdn/assets/DckmFyHxGX4Y1gOq.js +70 -0
  277. package/{browser/esm/oYdWyqsKo9ejAdVm.mjs → cdn/assets/De2z8LdHaWRFiR5T.js} +179 -202
  278. package/{browser/esm/DQ4o4dG7gWbL1X8F2.mjs → cdn/assets/DeUXRggj8Oz9ru_i.js} +2 -2
  279. package/{browser/esm/DRc_Wi5c7WdKHTVN2.mjs → cdn/assets/DfESVLC8CAi8m8A7.js} +6 -6
  280. package/cdn/assets/DicTo_3G-KZyWDiE.js +1084 -0
  281. package/cdn/assets/{D3G3tI3DVCUF3Gdk2.js → DjdkGy-EI1kSo226.js} +7 -5
  282. package/cdn/assets/DjtXfgbmXjUAoG0y.js +58 -0
  283. package/cdn/assets/DlpgIJxNq2V4gdDq.js +74 -0
  284. package/cdn/assets/{DaBczM5xU9ev5_or.js → Dp-GJXOMz_b8qAxD.js} +2 -2
  285. package/cdn/assets/DqBj-9o7UdXu4qhb.js +33 -0
  286. package/cdn/assets/{DZbR5R1fNikjgqYb.js → DrI_S0A9TQvriTua.js} +1 -1
  287. package/cdn/assets/DuAbY54w5gJpQgss.js +84250 -0
  288. package/cdn/assets/{D6SKy2BtcWkhfiA0.js → Dv8aQFTTaQBJKDDk.js} +2 -5
  289. package/cdn/assets/DviEoeWW0EvDg1hr.js +149 -0
  290. package/cdn/assets/{Cbw0JeJURvQyxIoa.js → DxcRLd7wmBGDgJsA.js} +1 -1
  291. package/cdn/assets/DxisV9_27l_WU-nk.js +21 -0
  292. package/cdn/assets/{Dc0BDcQUGy_WIVFa.js → Dy44qJVkwNseMG-3.js} +1 -1
  293. package/cdn/assets/ENtt4kmaU9mJfVEp.js +236 -0
  294. package/{browser/esm/COA_SZY2x8q6t4BD.mjs → cdn/assets/FO1Jezau486fH4kN.js} +7 -6
  295. package/cdn/assets/FjNOhkR7-JAIaRP6.js +19 -0
  296. package/cdn/assets/{DbEGszSW_J_k96KJ.js → G5z0uVlyF6CLw_PA.js} +179 -202
  297. package/cdn/assets/H-JnJQMcZQbpvjdb.js +2706 -0
  298. package/cdn/assets/J3hutJxqQiHENpIe.js +392 -0
  299. package/cdn/assets/J9i3r1fU0H10b2hX.js +1001 -0
  300. package/cdn/assets/{Gy0CHZTvn4hY-rkx.js → PtGiIWFBYP-ujLmf.js} +1 -1
  301. package/cdn/assets/PzWqv-oXxEuzKdaT.js +484 -0
  302. package/cdn/assets/QJ4AkDD269D1MzmI.js +89 -0
  303. package/cdn/assets/{qG5zdZZAe6mQIJo3.js → RfHd1JATBlcsfLPv.js} +5 -5
  304. package/{browser/esm/CtXoSHbCUKMY-tSJ.mjs → cdn/assets/SNze-adFJwKuGSQW.js} +48 -2
  305. package/cdn/assets/UTZcodQydbuMfCOS.js +171 -0
  306. package/{browser/esm/DzDwSOBdJh_lx_NM.mjs → cdn/assets/VCiu_neIjCTg2NUa.js} +998 -1006
  307. package/cdn/assets/{BHmYoIIbNW3GdcqV.js → VwGokBaawZfZiV2X.js} +1 -1
  308. package/cdn/assets/W1d6GQyySAHrtjEu.js +3563 -0
  309. package/cdn/assets/ZSYS1J3uR7UQuHwZ.js +217 -0
  310. package/cdn/assets/{CR3jgkduTLczbMjH.js → ZxsFYopF0_WWqw4Q.js} +1 -1
  311. package/{browser/esm/BHBJtVTiQByD_y9j.mjs → cdn/assets/_t0Mx-mUFVtmVNkU.js} +2 -2
  312. package/cdn/assets/aHTKr1ijZ6bRi3Zg.js +33 -0
  313. package/cdn/assets/anQDUZhHMDPi1eha.js +812 -0
  314. package/cdn/assets/{tVOVNvOs6ro8FXqa2.js → dn69mDhY7Xcc91kF.js} +20 -19
  315. package/cdn/assets/fm3mUdTDo-STB36M.js +4749 -0
  316. package/cdn/assets/gpQ4FdJMbIScKnS_.js +400 -0
  317. package/cdn/assets/{EjOJX5m8OEL-IjPB.js → hg8WYI0Yy4WPPPoP.js} +28 -27
  318. package/{browser/esm/DQ-0yyFAwoWtxmhV2.mjs → cdn/assets/i0P63Wd0RRlgJotb.js} +1 -1
  319. package/cdn/assets/lWY3TbG2NDscy9He.js +72 -0
  320. package/{browser/esm/BCZjYGV8AqIZghBH.mjs → cdn/assets/lqknEt3DTma5Juxs.js} +69 -4
  321. package/cdn/assets/mK8HcIZyXkOTvL6E.js +2453 -0
  322. package/cdn/assets/{BPv6Pw1hW-sV5Fya.js → pc49xtHdprXZLW2X.js} +1 -1
  323. package/cdn/assets/px-aQ8dMjiWag_pV.js +167 -0
  324. package/cdn/assets/qYca4mdySLkACfo1.js +37 -0
  325. package/{browser/esm/BqwvP0318zI2izeL2.mjs → cdn/assets/w5IQWbJETgHhqMsY.js} +33 -31
  326. package/cdn/assets/wM7DzeOpoEGBVDBe.js +441 -0
  327. package/cdn/assets/{CG5v2hAwGR5Ptufn2.js → x6GcENwqoUVbd60j.js} +1 -1
  328. package/cdn/assets/xlXDq-qoj7eOE6_T.js +5153 -0
  329. package/{browser/esm/CGqvy5LwQ4z9J2oD2.mjs → cdn/assets/ycmpAs4kQfeh78Pa.js} +1 -1
  330. package/cdn/index.js +2 -2
  331. package/package.json +13 -14
  332. package/browser/cjs/1XrWGMP3GmsQOMIX2.cjs +0 -1
  333. package/browser/cjs/2zXD3NPfuQT2KSZq.cjs +0 -7
  334. package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
  335. package/browser/cjs/4nReftSsKWmnRdtf2.cjs +0 -1
  336. package/browser/cjs/507hQYooKKjnRzsZ2.cjs +0 -1
  337. package/browser/cjs/B19QM3SGmPKKwD_o.cjs +0 -1
  338. package/browser/cjs/B4JJfKSI4ppwU8552.cjs +0 -1
  339. package/browser/cjs/B5YBx0GqLor3i0O1.cjs +0 -1
  340. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  341. package/browser/cjs/B9EI7wviSkHS9ZkH.cjs +0 -1
  342. package/browser/cjs/BAxVLKkxFgI6cXnR.cjs +0 -1
  343. package/browser/cjs/BC2gCQkR1iykfAuC.cjs +0 -1
  344. package/browser/cjs/BEJFcqVMDMKOvs11.cjs +0 -1
  345. package/browser/cjs/BEVqcFGFU6Ri9y8T.cjs +0 -5
  346. package/browser/cjs/BEzaum_kgG4yAOx0.cjs +0 -1
  347. package/browser/cjs/BF-38Z7Z0FZOPl192.cjs +0 -1
  348. package/browser/cjs/BIQZDBQfv3Qm5iC8.cjs +0 -4
  349. package/browser/cjs/BK0SCfN_VZYqBxoQ2.cjs +0 -1
  350. package/browser/cjs/BSCgCfORdZz1Ii5S.cjs +0 -2
  351. package/browser/cjs/BWDfauDHqB6U_2ka2.cjs +0 -1
  352. package/browser/cjs/BZr-IqNS1skh1hr6.cjs +0 -21
  353. package/browser/cjs/B_WV3e3yexp3dKaz.cjs +0 -9
  354. package/browser/cjs/BfzzZ9IR27ZPzj-8.cjs +0 -3
  355. package/browser/cjs/Bgke3PtMSF2Iaen4.cjs +0 -1
  356. package/browser/cjs/BnccBYHCCq9TGFx4.cjs +0 -8
  357. package/browser/cjs/Btc0Nzu40VYOpzLX.cjs +0 -1
  358. package/browser/cjs/BvG8N7G_8CXIAlT-.cjs +0 -1
  359. package/browser/cjs/BwLx9ix5Sq7suAYP2.cjs +0 -1
  360. package/browser/cjs/BziOCn_XEGT4ynN5.cjs +0 -1
  361. package/browser/cjs/C-HOJozu5NgCil1q.cjs +0 -1
  362. package/browser/cjs/C-bW8lKUTFFUVap4.cjs +0 -1
  363. package/browser/cjs/C2oTW2DjZypuqq7x.cjs +0 -1
  364. package/browser/cjs/C2uDl8VIJqh58YF_.cjs +0 -1
  365. package/browser/cjs/C5rQELB0TUeXY6VM.cjs +0 -1
  366. package/browser/cjs/C6yxQPAEgcGWAhYR.cjs +0 -33
  367. package/browser/cjs/C9C-pr-T_ThweQX92.cjs +0 -1
  368. package/browser/cjs/CHFOXPbNUaeZbrXn.cjs +0 -1
  369. package/browser/cjs/CHMgm0vAbEBS1mVW.cjs +0 -1
  370. package/browser/cjs/CJYewYJ5Z3iojl7J.cjs +0 -1
  371. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
  372. package/browser/cjs/CPgCih_KEqnUZ9Rv.cjs +0 -3
  373. package/browser/cjs/CRx1WvmgBjT8WVyB2.cjs +0 -1
  374. package/browser/cjs/CSNCOmYEOR-iTJ7K.cjs +0 -5
  375. package/browser/cjs/CV4KQsHluMqo1I2Q.cjs +0 -1
  376. package/browser/cjs/CW-b31_-r-_raT8Y2.cjs +0 -1
  377. package/browser/cjs/CXlzsh_WHCOsErJ12.cjs +0 -1
  378. package/browser/cjs/C_7w8EJZpHw8ueuq.cjs +0 -1
  379. package/browser/cjs/C_IEgjM-hSJCv6Gm.cjs +0 -1
  380. package/browser/cjs/CbLXP9WY38wTcGn5.cjs +0 -10
  381. package/browser/cjs/CcneNtiqtKppCa-p.cjs +0 -57
  382. package/browser/cjs/CeF0DZ-k4DB8M47I.cjs +0 -1
  383. package/browser/cjs/Ci8Uu7_b4lwwRLAD2.cjs +0 -1
  384. package/browser/cjs/Clu7XiAsCB48GDXN2.cjs +0 -1
  385. package/browser/cjs/Cm21F18ga8TluA9h.cjs +0 -1
  386. package/browser/cjs/CnZfa45XxA-9Jhmp.cjs +0 -1
  387. package/browser/cjs/CojEXZgX08waZOoq.cjs +0 -1
  388. package/browser/cjs/CpJJh4UnFl1_qFui.cjs +0 -1
  389. package/browser/cjs/CrDTTLE9EvaGDSD4.cjs +0 -88
  390. package/browser/cjs/CrZlUtdX1h2RUnCP.cjs +0 -1
  391. package/browser/cjs/Cty5pi0fwToP1GWe.cjs +0 -7
  392. package/browser/cjs/CvV18ZJgssoHMkdf2.cjs +0 -2
  393. package/browser/cjs/Cy-4IMt-AbR-ifP3.cjs +0 -126
  394. package/browser/cjs/CyGzzWYDy-IniKCq2.cjs +0 -7
  395. package/browser/cjs/CzgwTfy2072Dmt5u.cjs +0 -1
  396. package/browser/cjs/D19RglhKiroWfpQn2.cjs +0 -1
  397. package/browser/cjs/D8-KovdJ0LjxqCe2.cjs +0 -1
  398. package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
  399. package/browser/cjs/DDnGLOLTqLFsdUDS2.cjs +0 -1
  400. package/browser/cjs/DEOu_cHJ1FfTA9R_2.cjs +0 -1
  401. package/browser/cjs/DFHxNnJ-lHtv0hIq.cjs +0 -1
  402. package/browser/cjs/DG-AY_xO8RKHtEBE.cjs +0 -2
  403. package/browser/cjs/DG2kqsWRUtVugjay2.cjs +0 -1
  404. package/browser/cjs/DH3WXPfGHwWJW0nH.cjs +0 -1
  405. package/browser/cjs/DIbdDzNf_3S2RYZN.cjs +0 -1
  406. package/browser/cjs/DLYEQZzAGuSAmJsp.cjs +0 -6
  407. package/browser/cjs/DM7-R_ltoLbA9jde2.cjs +0 -1
  408. package/browser/cjs/DNCC-QNp2I7saV-I.cjs +0 -1
  409. package/browser/cjs/DNKyaSruDogoBd2H2.cjs +0 -1
  410. package/browser/cjs/DNy-UU3NKNqQQngF.cjs +0 -1
  411. package/browser/cjs/DPjEO7dwhCFd8DHR2.cjs +0 -2
  412. package/browser/cjs/DYqvGm5rx1DB53p7.cjs +0 -1
  413. package/browser/cjs/DZSvmqU8nRas1uz62.cjs +0 -1
  414. package/browser/cjs/DfMJOaJ0GcUiSn4Q.cjs +0 -1
  415. package/browser/cjs/DiZDRPIgbO3sQ8Vb.cjs +0 -1
  416. package/browser/cjs/DsFZgtSQpC75d1M02.cjs +0 -1
  417. package/browser/cjs/DsIHLUKUrSrYhFHl.cjs +0 -1
  418. package/browser/cjs/Du4jBiFxRIF1OjD4.cjs +0 -1
  419. package/browser/cjs/DvSvfeo9V0Abfd3q2.cjs +0 -1
  420. package/browser/cjs/Dx79LP1-YCQg8B87.cjs +0 -1
  421. package/browser/cjs/DxQkFYAFNZubVdn22.cjs +0 -1
  422. package/browser/cjs/E-IqDztfMb_xdszH.cjs +0 -1
  423. package/browser/cjs/EeOVMRq7TuptFKTc2.cjs +0 -1
  424. package/browser/cjs/ElcoSB--cCpS6i7R2.cjs +0 -1
  425. package/browser/cjs/JfM6P_qoQQTWakZf.cjs +0 -1
  426. package/browser/cjs/KNCocKN9uPR0tvUS.cjs +0 -1
  427. package/browser/cjs/Kr8f1inOTt-MICaP2.cjs +0 -1
  428. package/browser/cjs/Kvn916ebqGc4t6hv2.cjs +0 -1
  429. package/browser/cjs/NcNz8RfT5V889CMT.cjs +0 -10
  430. package/browser/cjs/PM3PrEWG3WHKxaDx.cjs +0 -1
  431. package/browser/cjs/YG320hBA20Dl3HoU2.cjs +0 -1
  432. package/browser/cjs/Ytzw6iUYx5f19wfK.cjs +0 -9
  433. package/browser/cjs/_H5j4dU7HOBYTawU.cjs +0 -1
  434. package/browser/cjs/a0Z-SXs_N71CtqYb2.cjs +0 -1
  435. package/browser/cjs/aONv0Ys3C8xmnaR82.cjs +0 -1
  436. package/browser/cjs/aYuNpndpwcZG5eik2.cjs +0 -20
  437. package/browser/cjs/bGMaev70Zd_NXqLM2.cjs +0 -1
  438. package/browser/cjs/bIaGoYEDSBCrAaB6.cjs +0 -1
  439. package/browser/cjs/bM25C5avKgBAJVfk2.cjs +0 -1
  440. package/browser/cjs/fqTQ_p3ehzUvc1tF2.cjs +0 -1
  441. package/browser/cjs/h3dw1jAp2J5Pu4p32.cjs +0 -1
  442. package/browser/cjs/hzUo76TXMOBqsI3U2.cjs +0 -1
  443. package/browser/cjs/i2VboqjlOcozI9MQ.cjs +0 -12
  444. package/browser/cjs/index.cjs +0 -79
  445. package/browser/cjs/jev6VGWTdgEgm4Yk2.cjs +0 -1
  446. package/browser/cjs/lEQC21-Sk4lwHy2r2.cjs +0 -1
  447. package/browser/cjs/ppSJKdLn646BZOzg.cjs +0 -1
  448. package/browser/cjs/xBcvszV6x7ys-m532.cjs +0 -1
  449. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  450. package/browser/cjs/z_rZE1OHFPpdGBh42.cjs +0 -1
  451. package/browser/esm/-vgNEEXiEad4bltZ.mjs +0 -28782
  452. package/browser/esm/3y_bCend8tkaewDG2.mjs +0 -106
  453. package/browser/esm/At60x9FEPePwPP_J.mjs +0 -51151
  454. package/browser/esm/B1NoGosH2YQh01g7.mjs +0 -105
  455. package/browser/esm/B4h6iO7hQ9lCR7kj.mjs +0 -11273
  456. package/browser/esm/BBtOlJMVlsWorNJH.mjs +0 -824
  457. package/browser/esm/BQDXkeSabbxB5DUB2.mjs +0 -47
  458. package/browser/esm/BUCKq_2lHPd1ndvw.mjs +0 -149
  459. package/browser/esm/BVjXdv_wkL1x_8ZJ2.mjs +0 -1149
  460. package/browser/esm/BX4f6i2WMBMKFVCq.mjs +0 -99
  461. package/browser/esm/BZsx0QHg1RZlM9ZN.mjs +0 -15
  462. package/browser/esm/BhxX7CZWSOlV2Dsz.mjs +0 -224
  463. package/browser/esm/BhzLZRz2N8RxjQ_U.mjs +0 -34
  464. package/browser/esm/BjTf3XA9Swj0ngpH.mjs +0 -7813
  465. package/browser/esm/BkSb_vyWe-AhyEDa.mjs +0 -4423
  466. package/browser/esm/Bp9qFBIcpIGXvMgo.mjs +0 -134
  467. package/browser/esm/C0rS1uBqfsj-gPR8.mjs +0 -152
  468. package/browser/esm/C6CK_4GD9IpxKglV2.mjs +0 -6713
  469. package/browser/esm/CGGJWgWSPZ0aP_C3.mjs +0 -87
  470. package/browser/esm/CGyydD3tRb0ik50l2.mjs +0 -20
  471. package/browser/esm/CPUlpDM6aAzZzCat2.mjs +0 -471
  472. package/browser/esm/CU1d8OvDv5TU6fSd.mjs +0 -2211
  473. package/browser/esm/CY1zykikO58_ADk8.mjs +0 -3188
  474. package/browser/esm/CZWIS7FuqNjbheSw.mjs +0 -235
  475. package/browser/esm/Cb-FUOYcyRSkHG6u2.mjs +0 -238
  476. package/browser/esm/Cc5IufffX4N-8QpE.mjs +0 -6104
  477. package/browser/esm/Cd8HXAJlflkkTXxc.mjs +0 -53
  478. package/browser/esm/CfuhUkrvOq11d9FR.mjs +0 -44
  479. package/browser/esm/Ckl3FLCOeqw7yhkP2.mjs +0 -82
  480. package/browser/esm/CpjX81WsWJbXMUoT.mjs +0 -3655
  481. package/browser/esm/D9-wpGVbTS9rRpxx.mjs +0 -24
  482. package/browser/esm/DDOO4tcrO4OfMUDe.mjs +0 -25
  483. package/browser/esm/DDUYQ8FPeh1TJU24.mjs +0 -538
  484. package/browser/esm/DFdU1DsC1lXOrejZ.mjs +0 -8260
  485. package/browser/esm/DMLwXmjo28k_iNEU.mjs +0 -4740
  486. package/browser/esm/DVJd6McdAG5udItH.mjs +0 -27
  487. package/browser/esm/D_zNx76HGunFi7xJ.mjs +0 -509
  488. package/browser/esm/DfRGH6mEtIVDWEYN2.mjs +0 -304
  489. package/browser/esm/DnuaqN0xfgqzl8qG.mjs +0 -2687
  490. package/browser/esm/fJ1McMt7xzRA_lUX.mjs +0 -383
  491. package/browser/esm/nguMxPB9LKexKBRX.mjs +0 -219
  492. package/browser/esm/qzhFT2j-mpQEQnKs.mjs +0 -16386
  493. package/cdn/assets/2CuCH0wi9XPgVzE42.js +0 -44
  494. package/cdn/assets/2UHIeioUPXrwtZy-2.js +0 -83
  495. package/cdn/assets/BAhvL7M7ZcgZ8eDc2.js +0 -48
  496. package/cdn/assets/BJEpPEyFWtLzMIq-2.js +0 -3655
  497. package/cdn/assets/BKEzd89UphJ8q1pp2.js +0 -2211
  498. package/cdn/assets/BM7OqAUEUk-up7_82.js +0 -134
  499. package/cdn/assets/BNuoKAzs4zkxSocG2.js +0 -44
  500. package/cdn/assets/BNybEGR813e3aNIv.js +0 -8263
  501. package/cdn/assets/BU6uQhQhpaLElTT82.js +0 -225
  502. package/cdn/assets/BVgTMDEoPgsWFmku.js +0 -510
  503. package/cdn/assets/BVjXdv_wkL1x_8ZJ2.js +0 -1149
  504. package/cdn/assets/BWlMK76Aj2d4ygsH.js +0 -538
  505. package/cdn/assets/BZsx0QHg1RZlM9ZN2.js +0 -15
  506. package/cdn/assets/BixsQGDDf3Iv_PtW2.js +0 -4740
  507. package/cdn/assets/Bl6C6xWT8E6b7OwJ2.js +0 -239
  508. package/cdn/assets/BzUU8y1IFjREzgog2.js +0 -107
  509. package/cdn/assets/CGyydD3tRb0ik50l.js +0 -20
  510. package/cdn/assets/CH0of3GZTzHviuQV.js +0 -24
  511. package/cdn/assets/CH0of3GZTzHviuQV2.js +0 -24
  512. package/cdn/assets/CHttngK66Ido5dWW.js +0 -106
  513. package/cdn/assets/Ce5A_D4YBgi_s2KF.js +0 -176
  514. package/cdn/assets/CpYlf4dXa_V2v-iS2.js +0 -3188
  515. package/cdn/assets/Crkvq5j5KIa6eTLI2.js +0 -51151
  516. package/cdn/assets/Cv-KXN9kl0UeMezQ.js +0 -824
  517. package/cdn/assets/CvtkpvGzCHhNuwTm.js +0 -16386
  518. package/cdn/assets/D-fJXasEYyfRUcj2.js +0 -6104
  519. package/cdn/assets/D1MA2ed2cLMt7hV9.js +0 -236
  520. package/cdn/assets/D9gETGi23d14kT7u2.js +0 -99
  521. package/cdn/assets/D9joTG0Z2zdWHAEa2.js +0 -4423
  522. package/cdn/assets/DC9obE_EVmxtvXCf.js +0 -11275
  523. package/cdn/assets/DCnA2-zB7W_QB-tD2.js +0 -2199
  524. package/cdn/assets/DDNivpFWzQ3AIJia.js +0 -2687
  525. package/cdn/assets/DDOO4tcrO4OfMUDe.js +0 -25
  526. package/cdn/assets/DEUY_zuVwmptMX4l.js +0 -150
  527. package/cdn/assets/DIQf1pX-j-dWQu_e.js +0 -472
  528. package/cdn/assets/DJwQ9abZkyFO9Doy.js +0 -7404
  529. package/cdn/assets/DTCtbG90ip7Z7LaG.js +0 -220
  530. package/cdn/assets/DVS_5oDniuAFH3vT2.js +0 -6715
  531. package/cdn/assets/D_HeH7AJqWoxehn52.js +0 -53
  532. package/cdn/assets/DfRGH6mEtIVDWEYN.js +0 -304
  533. package/cdn/assets/DvItgGbf8IOWPyxd.js +0 -28784
  534. package/cdn/assets/DvlpP6sUZ9Qzl9s22.js +0 -616
  535. package/cdn/assets/WLUhtyUNK5QJ7Pff.js +0 -34
  536. package/cdn/assets/c7aIqKLOO4pvUsV12.js +0 -220
  537. package/cdn/assets/mtI43hWjdp4E3Z_-.js +0 -152
  538. package/cdn/assets/nmR_PgTW7GrlbHHZ.js +0 -27
  539. package/cdn/assets/vTCuFafvRlSaT9wy.js +0 -87
@@ -0,0 +1,3604 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.8.0-beta.10
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { C as e, D as t, E as n, G as r, O as i, P as a, U as o, V as s, X as c, b as l, c as u, o as d, q as f, r as p, s as m, u as h, y as g } from "./CMxbiQ5J79M3n1tk.mjs";
8
+ import { r as _ } from "./C9NyIoUahFiyRCxP.mjs";
9
+ import { i as v, r as y } from "./D-55MlIn7Wo_hdjI.mjs";
10
+ import { C as b, E as x, Et as S, Ht as C, N as w, S as T, V as E, W as ee, Wt as te, Z as ne, b as re, bt as D, ct as O, m as ie, rt as ae, tt as oe } from "./CWoPWWRwMgkGPFFP.mjs";
11
+ import { i as k, t as A } from "./BAH_cWcQEIBKWnl6.mjs";
12
+ import { A as se, At as ce, C as j, Ct as le, D as ue, E as de, F as M, Ft as N, Gt as fe, H as P, Ht as F, Jt as pe, K as me, L as he, Lt as ge, M as _e, N as ve, Ot as ye, P as be, R as xe, S as Se, St as Ce, Tt as we, U as Te, V as Ee, Xt as De, Y as I, Z as L, _t as Oe, an as ke, b as Ae, c as je, d as Me, en as Ne, et as Pe, ft as Fe, h as Ie, in as Le, k as Re, kt as ze, l as Be, ln as Ve, m as He, mt as Ue, nn as R, nt as We, o as Ge, r as Ke, rn as qe, sn as Je, tn as Ye, tt as Xe, u as Ze, un as Qe, v as $e, vt as et, wt as tt, x as nt, xt as rt, y as z, yt as it, z as at } from "./BNIInlJQbJjH8B6G.mjs";
13
+ var ot, st = class extends r {
14
+ constructor(e, t = 50) {
15
+ super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
16
+ }
17
+ _undoCommits(e = this.maxStack) {
18
+ let t = this._transactions;
19
+ if (!t) return [];
20
+ let n = t.getLog(t.getCurrentCommit(!1).getId(), 2 ** 53 - 1), r = [];
21
+ for (let t = 0; t < n.length && r.length < e; t++) {
22
+ let e = n[t];
23
+ if (e.getId() === this._floorId || t === n.length - 1) break;
24
+ e.getDescription() && r.push(e);
25
+ }
26
+ return r;
27
+ }
28
+ _redoCommits(e = this.maxStack) {
29
+ let t = this._transactions;
30
+ if (!t) return [];
31
+ let n = t.getCurrentCommit(!1).getId(), r = t.getTipCommit().getId();
32
+ if (r === n) return [];
33
+ let i = t.getLog(r, 2 ** 53 - 1), a = [], o = !1;
34
+ for (let e of i) {
35
+ if (e.getId() === n) {
36
+ o = !0;
37
+ break;
38
+ }
39
+ a.push(e);
40
+ }
41
+ if (!o) return [];
42
+ a.reverse();
43
+ let s = [];
44
+ for (let t of a) if (t.getDescription() && s.push(t), s.length >= e) break;
45
+ return s;
46
+ }
47
+ undo(e = 1) {
48
+ let t = this._transactions;
49
+ if (!t) return;
50
+ let n = !1;
51
+ try {
52
+ for (let r = 0; r < e; r++) {
53
+ let [e] = this._undoCommits(1);
54
+ if (!e) break;
55
+ t.revert(e.getId()), n = !0;
56
+ }
57
+ } finally {
58
+ n && this._notifyOnStackChange();
59
+ }
60
+ }
61
+ redo(e = 1) {
62
+ let t = this._transactions;
63
+ if (!t) return;
64
+ let n = !1;
65
+ try {
66
+ for (let r = 0; r < e; r++) {
67
+ let [e] = this._redoCommits(1);
68
+ if (!e) {
69
+ r === 0 && this._repeatOperation?.repeat();
70
+ break;
71
+ }
72
+ t.restore(e.getId()), n = !0;
73
+ }
74
+ } finally {
75
+ n && this._notifyOnStackChange();
76
+ }
77
+ }
78
+ hasUndo() {
79
+ return this._undoCommits(1).length > 0;
80
+ }
81
+ hasRedo() {
82
+ return this._redoCommits(1).length > 0 || this._repeatOperation !== null;
83
+ }
84
+ getTopUndoDescription() {
85
+ return this._undoCommits(1)[0]?.getDescription() ?? null;
86
+ }
87
+ getTopRedoDescription() {
88
+ return this._repeatOperation === null ? this._redoCommits(1)[0]?.getDescription() ?? null : this._repeatOperation.description;
89
+ }
90
+ getUndoDescriptions() {
91
+ return this._undoCommits().map((e) => e.getDescription());
92
+ }
93
+ getRedoDescriptions() {
94
+ let e = this._redoCommits().map((e) => e.getDescription());
95
+ return e.length === 0 && this._repeatOperation !== null && e.push(this._repeatOperation.description), Object.freeze(e);
96
+ }
97
+ getUndoEntries() {
98
+ return this._undoCommits().map(lt);
99
+ }
100
+ getRedoEntries() {
101
+ let e = this._redoCommits().map(lt);
102
+ return e.length === 0 && this._repeatOperation !== null && e.push({
103
+ description: this._repeatOperation.description,
104
+ author: null,
105
+ meta: ct
106
+ }), Object.freeze(e);
107
+ }
108
+ addUndoOperation() {
109
+ throw Error("TransactionUndoManager derives its stack from the commit log; commit a described transaction instead.");
110
+ }
111
+ clear(e = !0) {
112
+ this._transactions && (this._floorId = this._transactions.getCurrentCommit(!1).getId()), super.clear(e);
113
+ }
114
+ close() {
115
+ this._removeListener?.();
116
+ }
117
+ }, ct = Object.freeze({}), lt = (e) => ({
118
+ description: e.getDescription(),
119
+ author: e.getAuthor(),
120
+ meta: e.getMeta() ?? ct
121
+ }), ut = class {
122
+ constructor(e, t) {
123
+ this._dirty = !1, this._store = e, this._savedCommitId = e.getCurrentCommit()?.getId() ?? null, this._emitter = new y(this);
124
+ let n = this;
125
+ this._removeStoreListener = e.addListener({
126
+ onCommitEnd() {
127
+ n._recompute();
128
+ },
129
+ onCommitChange() {
130
+ n._recompute();
131
+ }
132
+ }), this._removeCommitListener = t?.addCommitListener({ onCommit(e) {
133
+ e.store === n._store && n.markSaved(e.commitId);
134
+ } });
135
+ }
136
+ getStore() {
137
+ return this._store;
138
+ }
139
+ isDirty() {
140
+ return (this._store.getCurrentCommit()?.getId() ?? null) !== this._savedCommitId;
141
+ }
142
+ getSavedCommitId() {
143
+ return this._savedCommitId;
144
+ }
145
+ markSaved(e = this._store.getCurrentCommit()?.getId() ?? null) {
146
+ e !== this._savedCommitId && (this._savedCommitId = e ?? null, this._recompute());
147
+ }
148
+ addListeners(e, t) {
149
+ return this._emitter.addListeners(e, t);
150
+ }
151
+ _recompute() {
152
+ let e = this.isDirty();
153
+ e !== this._dirty && (this._dirty = e, this._emitter.notify(e ? "onDirty" : "onClean", { transactional: !1 }));
154
+ }
155
+ close() {
156
+ this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
157
+ }
158
+ };
159
+ ot ||= {};
160
+ var B = class e {
161
+ constructor(t, n = {}) {
162
+ this._password = null, this._emitter = new y(this), this._path = t ?? null, this._name = n.name ?? null, this._format = n.format ?? null, this._size = n.size ?? null, this._lastModified = n.lastModified ?? null, this._canWrite = n.canWrite ?? e._defaultCanWrite(this._path), this._encryption = n.encryption ?? null;
163
+ }
164
+ static _defaultCanWrite(e) {
165
+ return !!e && !/^(https?:|data:|blob:)/i.test(e);
166
+ }
167
+ _cleanPath() {
168
+ return this._path ? this._path.split(/[?#]/)[0] : null;
169
+ }
170
+ getName() {
171
+ if (this._name !== null && this._name !== void 0) return this._name;
172
+ let e = this._cleanPath();
173
+ return e && I(e) || null;
174
+ }
175
+ getPath() {
176
+ return this._path;
177
+ }
178
+ getFormat() {
179
+ return this._format ? this._format : this.getExtension();
180
+ }
181
+ getExtension() {
182
+ let e = this._cleanPath();
183
+ if (!e) return null;
184
+ let t = z(e);
185
+ return t ? t.toLowerCase() : null;
186
+ }
187
+ getEncryption() {
188
+ return this._encryption;
189
+ }
190
+ isEncrypted() {
191
+ return this._encryption !== null || this._password !== null;
192
+ }
193
+ setPassword(e) {
194
+ this._password !== (e ?? null) && (this._password = e ?? null, this._password === null && (this._encryption = null), this._emitter.notify("onChange"));
195
+ }
196
+ getPassword() {
197
+ return this._password;
198
+ }
199
+ getSize() {
200
+ return this._size;
201
+ }
202
+ getLastModified() {
203
+ return this._lastModified;
204
+ }
205
+ canWrite() {
206
+ return this._canWrite;
207
+ }
208
+ setName(e) {
209
+ this.update({ name: e });
210
+ }
211
+ update(e) {
212
+ let t = !1;
213
+ return e.lastModified !== void 0 && e.lastModified !== this._lastModified && (this._lastModified = e.lastModified, t = !0), e.name !== void 0 && e.name !== this._name && (this._name = e.name, t = !0), e.format !== void 0 && e.format !== this._format && (this._format = e.format, t = !0), e.size !== void 0 && e.size !== this._size && (this._size = e.size, t = !0), e.canWrite !== void 0 && e.canWrite !== this._canWrite && (this._canWrite = e.canWrite, t = !0), e.encryption !== void 0 && e.encryption !== this._encryption && (this._encryption = e.encryption, t = !0), t && this._emitter.notify("onChange"), this;
214
+ }
215
+ addListeners(e, t) {
216
+ return this._emitter.addListeners(e, t);
217
+ }
218
+ get [Symbol.toStringTag]() {
219
+ return "[Origin]";
220
+ }
221
+ toString() {
222
+ let e = this._cleanPath(), t = e ? e.split(/[/\\]/).pop() || e : this._name ?? "(unbound)", n = this._size;
223
+ if (n == null) return t;
224
+ if (n < 1024) return `${t} ${n}B`;
225
+ let r = Math.floor(Math.log(n) / Math.log(1024)), i = [
226
+ "B",
227
+ "KB",
228
+ "MB",
229
+ "GB",
230
+ "TB"
231
+ ];
232
+ return `${t} ${(n / 1024 ** r).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
233
+ }
234
+ }, V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set(), dt = (e) => V.get(e) ?? null, ft = () => Array.from(H, (e) => e.getOrigin()), pt = class e {
235
+ constructor(t) {
236
+ this._released = !1, e._assertFree(t), this._emitter = new y(this), this._origin = t, V.set(t, this), H.add(this);
237
+ }
238
+ getOrigin() {
239
+ return this._origin;
240
+ }
241
+ setOrigin(t) {
242
+ t !== this._origin && (e._assertFree(t), this._released || (V.delete(this._origin), V.set(t, this)), this._origin = t, this._emitter.notify("onOriginChange"));
243
+ }
244
+ release() {
245
+ this._released || (this._released = !0, V.get(this._origin) === this && V.delete(this._origin), H.delete(this));
246
+ }
247
+ addListeners(e, t) {
248
+ return this._emitter.addListeners(e, t);
249
+ }
250
+ static _assertFree(e) {
251
+ if (V.has(e)) throw Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
252
+ }
253
+ }, mt = class {
254
+ constructor() {
255
+ this._defaultStringSourceType = "filepath";
256
+ }
257
+ async read(e) {
258
+ let t = e.options ?? {}, n = e.source;
259
+ if (typeof n == "function" && (n = n()), n && typeof n == "object" && typeof n.then == "function" && (n = await Promise.resolve(n)), n == null && (n = await this.resolveSource(e), n == null)) return null;
260
+ let r = n, i = await this.fileFromHandle(n);
261
+ i && (n = i);
262
+ let a = t.format, o = this._detectSourceType(n);
263
+ if (!o) throw Error("Unable to detect source type from provided input.");
264
+ let c, l, u = !1;
265
+ if (o === "filepath") {
266
+ let e = typeof n == "string" && n.startsWith("file://") ? n.slice(7) : n;
267
+ n = await this.filePathToFile(e), o = "file", u = !0;
268
+ }
269
+ switch (o) {
270
+ case "file": {
271
+ let e = n, r = e?.name, o = r ? `${I(r)}` : "";
272
+ c = await e.arrayBuffer(), l = {
273
+ format: a,
274
+ ext: z(r),
275
+ name: o,
276
+ absolutePath: r,
277
+ size: e.size,
278
+ lastModified: e.lastModified,
279
+ canWrite: !t.asCopy && (!!i || u && this._canWriteLocalPath())
280
+ };
281
+ break;
282
+ }
283
+ case "blob": {
284
+ let e = n;
285
+ c = await e.arrayBuffer(), l = {
286
+ format: a,
287
+ size: e.size
288
+ };
289
+ break;
290
+ }
291
+ case "base64": {
292
+ let e;
293
+ if (n && typeof n == "object" && "base64" in n) e = n.base64;
294
+ else if (typeof n == "string" && n.startsWith("data:")) {
295
+ let [, t] = n.split(",");
296
+ e = t;
297
+ } else e = n;
298
+ c = s.base64ToArrayBuffer(e), l = {
299
+ format: a,
300
+ size: e.length
301
+ };
302
+ break;
303
+ }
304
+ case "fetch": {
305
+ let e, t, r;
306
+ if (typeof n == "string") e = n;
307
+ else {
308
+ if (!n || typeof n != "object" || !("input" in n)) throw Error("Invalid fetch source provided.");
309
+ {
310
+ let i = n;
311
+ e = i.input, t = i.init, r = i.timeout;
312
+ }
313
+ }
314
+ let i = r || 3e4, o = new AbortController(), s = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = z(u);
315
+ try {
316
+ let n = await fetch(e, {
317
+ ...t,
318
+ signal: o.signal
319
+ });
320
+ if (clearTimeout(s), !n.ok) throw Error(`Failed to fetch: ${n.status} ${n.statusText}`);
321
+ let r = await n.arrayBuffer();
322
+ if (!r) throw Error(`Unable to fetched content: ${u}`);
323
+ c = r, l = {
324
+ format: a,
325
+ ext: d,
326
+ name: I(u, !0),
327
+ absolutePath: u
328
+ };
329
+ } catch (e) {
330
+ throw clearTimeout(s), e.name === "AbortError" ? Error(`Fetch timeout after ${i}ms: ${u}`) : e;
331
+ }
332
+ break;
333
+ }
334
+ case "buffer":
335
+ c = n, l = { format: a };
336
+ break;
337
+ case "stream": {
338
+ let e = n.getReader(), t = [], r = 0;
339
+ try {
340
+ for (;;) {
341
+ let { done: n, value: i } = await e.read();
342
+ if (n) break;
343
+ t.push(i), r += i.length;
344
+ }
345
+ } finally {
346
+ e.releaseLock();
347
+ }
348
+ let i = new ArrayBuffer(r), o = new Uint8Array(i), s = 0;
349
+ for (let e of t) o.set(e, s), s += e.length;
350
+ c = i, l = { format: a };
351
+ break;
352
+ }
353
+ default: throw Error(`Unsupported source type: ${o}`);
354
+ }
355
+ l.canWrite && await this.findOpenOrigin(r, l) && (l.canWrite = !1);
356
+ let d = await e.decode(c, {
357
+ sourceType: o,
358
+ ...l
359
+ });
360
+ return d ? (await this.onWorkbookRead(d, r), d) : null;
361
+ }
362
+ async findOpenOrigin(e, t) {
363
+ return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
364
+ }
365
+ findOpenPath(e, t) {
366
+ return ft().find((n) => {
367
+ if (n === t || !n.canWrite()) return !1;
368
+ let r = n.getPath();
369
+ return !!r && this.isSamePath(r, e);
370
+ }) ?? null;
371
+ }
372
+ isSamePath(e, t) {
373
+ return e === t;
374
+ }
375
+ async fileFromHandle(e) {
376
+ return null;
377
+ }
378
+ async resolveSource(e) {
379
+ return null;
380
+ }
381
+ async onWorkbookRead(e, t) {}
382
+ _canWriteLocalPath() {
383
+ return !1;
384
+ }
385
+ _detectSourceType(e) {
386
+ if (e && typeof e == "object" && "base64" in e) return "base64";
387
+ if (e && typeof e == "object" && "input" in e) return "fetch";
388
+ if (typeof e == "string") {
389
+ if (e.startsWith("data:")) return "base64";
390
+ if (e.startsWith("http://") || e.startsWith("https://")) return "fetch";
391
+ if (e.startsWith("file://")) return "filepath";
392
+ let t = this._defaultStringSourceType;
393
+ return e.startsWith("./") || e.startsWith("../") || e.startsWith("/") || /^[a-zA-Z]:[/\\]/.test(e), t;
394
+ }
395
+ if (typeof File < "u" && e instanceof File) return "file";
396
+ if (typeof Blob < "u" && e instanceof Blob) return "blob";
397
+ let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = s.isNodeBuffer(e);
398
+ return t || n || r ? "buffer" : typeof ReadableStream < "u" && e instanceof ReadableStream || Object.prototype.toString.call(e) === "[object ReadableStream]" || e && typeof e.getReader == "function" && e.locked !== void 0 ? "stream" : null;
399
+ }
400
+ }, ht = class extends mt {
401
+ constructor(e, t) {
402
+ super(), this._getWriteFormats = e, this._getReadFormats = t, this._defaultStringSourceType = "fetch", this._handleCache = /* @__PURE__ */ new WeakMap();
403
+ }
404
+ async fileFromHandle(e) {
405
+ return U(e) ? e.getFile() : null;
406
+ }
407
+ async resolveSource() {
408
+ let e = await this._getReadFormats?.() ?? [];
409
+ if (typeof globalThis.showOpenFilePicker == "function") try {
410
+ let t = function(e) {
411
+ let t = gt(e);
412
+ if (t.length <= 1) return t;
413
+ let n = /* @__PURE__ */ new Set(), r = {};
414
+ for (let e of t) for (let [t, i] of Object.entries(e.accept)) for (let e of i) n.has(e) || (n.add(e), (r[t] ??= []).push(e));
415
+ return [{
416
+ description: "All Supported",
417
+ accept: r
418
+ }, ...t];
419
+ }(e), [n] = await globalThis.showOpenFilePicker(t.length ? { types: t } : void 0);
420
+ return n;
421
+ } catch (e) {
422
+ if (e?.name === "AbortError") return null;
423
+ throw e;
424
+ }
425
+ let t = e.flatMap((e) => e.exts.map((e) => "." + e)).join(", ");
426
+ return c.openFileDialog(t);
427
+ }
428
+ async findOpenOrigin(e) {
429
+ return U(e) ? this._findOpenHandle(e) : null;
430
+ }
431
+ async _findOpenHandle(e, t) {
432
+ for (let n of ft()) {
433
+ if (n === t || !n.canWrite()) continue;
434
+ let r = this._handleCache.get(n);
435
+ if (r && typeof r.isSameEntry == "function" && await r.isSameEntry(e)) return n;
436
+ }
437
+ return null;
438
+ }
439
+ async onWorkbookRead(e, t) {
440
+ if (!U(t)) return;
441
+ let n = e.getOrigin?.();
442
+ n?.canWrite() && this._handleCache.set(n, t);
443
+ }
444
+ async filePathToFile(e) {
445
+ throw Error(`Cannot read local file path '${e}' in browser environment. Use a file input element or fetch for remote URLs.`);
446
+ }
447
+ async write(e) {
448
+ let { origin: t, suggestedName: n, format: r, encode: i, prompt: a } = e, o = [r, ...(await this._getWriteFormats()).filter((e) => e.key !== r.key)], s = typeof globalThis.showSaveFilePicker == "function", c = !a && t.canWrite() ? this._handleCache.get(t) : void 0;
449
+ if (s) try {
450
+ if (c) {
451
+ let e = await async function(e) {
452
+ try {
453
+ if (typeof e.queryPermission != "function") return "granted";
454
+ let t = { mode: "readwrite" };
455
+ return await e.queryPermission(t) === "granted" || await e.requestPermission(t) === "granted" ? "granted" : "denied";
456
+ } catch {
457
+ return "unavailable";
458
+ }
459
+ }(c);
460
+ if (e === "denied") return null;
461
+ e !== "granted" && (c = void 0);
462
+ }
463
+ let a = !!c;
464
+ if (!a) {
465
+ c = await globalThis.showSaveFilePicker({
466
+ suggestedName: n,
467
+ types: gt(o)
468
+ });
469
+ let t = await this._findOpenHandle(c, e.workbook?.getOrigin?.());
470
+ if (t) throw new h(d("error.io.openElsewhere", { name: t.getName() ?? c.name ?? "" }));
471
+ }
472
+ let s = vt(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new B(c.name ?? n, {
473
+ format: l.key,
474
+ canWrite: !0
475
+ }), f = await i(l.key, u);
476
+ if (!f) return null;
477
+ let p = new Blob([_t(f)], { type: l.mimeType || "application/octet-stream" }), m = await c.createWritable();
478
+ if (await m.write(p), await m.close(), this._handleCache.set(u, c), u instanceof B) {
479
+ let e = await Promise.resolve(c.getFile?.()).then((e) => e?.lastModified ?? null, () => null);
480
+ u.update({
481
+ size: p.size,
482
+ lastModified: e
483
+ });
484
+ }
485
+ return u;
486
+ } catch (e) {
487
+ if (e?.name === "AbortError") return null;
488
+ if (e instanceof h) throw e;
489
+ }
490
+ let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, f = u && r.exts.some((e) => e.toLowerCase() === vt(u)) ? u : n, p = l !== f || t.canWrite() ? new B(f, {
491
+ format: r.key,
492
+ canWrite: !1
493
+ }) : t, m = await i(r.key, p);
494
+ if (!m) return null;
495
+ let g = new Blob([_t(m)], { type: r.mimeType || "application/octet-stream" });
496
+ return function(e, t) {
497
+ let n = URL.createObjectURL(e), r = document.createElement("a");
498
+ r.style.display = "none", r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
499
+ }(g, f), p instanceof B && p.update({ size: g.size }), p;
500
+ }
501
+ };
502
+ function gt(e) {
503
+ return e.map((e) => {
504
+ let t = e.mimeType && e.mimeType.includes("/") ? e.mimeType : "application/octet-stream";
505
+ return {
506
+ description: e.description ?? e.key,
507
+ accept: { [t]: e.exts.map((e) => "." + e) }
508
+ };
509
+ });
510
+ }
511
+ function U(e) {
512
+ return !!e && e.kind === "file" && typeof e.getFile == "function";
513
+ }
514
+ function _t(e) {
515
+ if (typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) {
516
+ let t = new ArrayBuffer(e.byteLength);
517
+ return new Uint8Array(t).set(new Uint8Array(e)), t;
518
+ }
519
+ return e;
520
+ }
521
+ function vt(e) {
522
+ let t = e.lastIndexOf(".");
523
+ return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
524
+ }
525
+ var yt = class {
526
+ constructor(e) {
527
+ this._private = { input: e }, typeof e == "string" ? this._private.name = e : Object.assign(this._private, e);
528
+ }
529
+ toJSON() {
530
+ return this._private.input;
531
+ }
532
+ getFamily() {
533
+ return this._private.name;
534
+ }
535
+ getPitch() {
536
+ return this._private.pitch;
537
+ }
538
+ getPanose() {
539
+ return this._private.panose;
540
+ }
541
+ toString() {
542
+ return typeof this._private.input == "string" ? this._private.input : JSON.stringify(this._private.input);
543
+ }
544
+ get isIFont() {
545
+ return !0;
546
+ }
547
+ }, bt = /^\p{White_Space}$/u, W = (e) => Math.max(0, Math.floor(e + .5)) || 0, xt = class e {
548
+ constructor(e, t) {
549
+ this._perEm = /* @__PURE__ */ new Map(), this.family = e.family, this.weight = e.weight, this.italic = e.italic, this._vertical = t;
550
+ }
551
+ static fromJSON(t) {
552
+ if (t?.format !== e.FORMAT) throw Error(`Not a font metrics table: format '${t?.format}', expected '${e.FORMAT}'.`);
553
+ let n = Math.max(1, t.unitsPerEm), r = (e) => e ? {
554
+ position: e[0] / n,
555
+ thickness: e[1] / n
556
+ } : null, i = new e({
557
+ family: t.family,
558
+ weight: t.weight,
559
+ italic: t.italic
560
+ }, {
561
+ ascent: t.winAscent / n,
562
+ descent: t.winDescent / n,
563
+ underline: r(t.underline),
564
+ strikeout: r(t.strikeout)
565
+ }), a = i._perEm;
566
+ for (let [e, r] of t.advances) for (let t = 0; t < r.length; t++) a.set(e + t, r[t] / n);
567
+ return i;
568
+ }
569
+ get size() {
570
+ return this._perEm.size;
571
+ }
572
+ advance(e) {
573
+ return this._perEm.get(e);
574
+ }
575
+ set(e) {
576
+ for (let [t, n] of e) this._perEm.set(t, n);
577
+ }
578
+ missing(e) {
579
+ let t = /* @__PURE__ */ new Set();
580
+ for (let n of e) this._perEm.has(n.codePointAt(0)) || t.add(n);
581
+ return [...t];
582
+ }
583
+ width(e, t, n) {
584
+ let r = this._perEm, i = r.get(32) ?? 0, a = 0, o = 0;
585
+ for (let t of e) a += r.get(t.codePointAt(0)) ?? (bt.test(t) ? i : 0), o++;
586
+ return a * t * (n?.superSub ? .6 : 1) + (n?.letterSpacing ?? 0) * Math.max(0, o - 1);
587
+ }
588
+ metrics(e) {
589
+ let t = W(e), n = W(this._vertical.ascent * t), r = W(this._vertical.descent * t), i = n + r + 2;
590
+ return {
591
+ ascent: n,
592
+ descent: r,
593
+ lineHeight: i,
594
+ baseline: Math.floor((i - (n + r)) / 2) + n,
595
+ lineGap: 2
596
+ };
597
+ }
598
+ underline(e) {
599
+ return St(this._vertical.underline, e);
600
+ }
601
+ strikeout(e) {
602
+ return St(this._vertical.strikeout, e);
603
+ }
604
+ measure(e, t, n) {
605
+ return {
606
+ width: this.width(e, t, n),
607
+ ...this.metrics(t)
608
+ };
609
+ }
610
+ };
611
+ function St(e, t) {
612
+ return e ? {
613
+ position: e.position * t,
614
+ thickness: e.thickness * t
615
+ } : null;
616
+ }
617
+ (xt ||= {}).FORMAT = "sheetxl-font-metrics/1";
618
+ var G, K, Ct, wt = class {
619
+ constructor(e = null) {
620
+ this.name = "table-file", this.kind = "table", this._pending = /* @__PURE__ */ new Map(), this._base = e;
621
+ }
622
+ build(e) {
623
+ let t = function(e) {
624
+ let t = e.family.trim().toLowerCase().replace(/\s+/g, "-"), n = e.weight >= 600;
625
+ return `${t}-${n && e.italic ? "bold-italic" : n ? "bold" : e.italic ? "italic" : "regular"}.metrics.json`;
626
+ }(e), n = this._pending.get(t);
627
+ return n || (n = this._load(t), this._pending.set(t, n)), n;
628
+ }
629
+ async _load(e) {
630
+ let t;
631
+ try {
632
+ t = await o("fonts", "@sheetxl/sdk", e, this._base, import.meta.url);
633
+ } catch {
634
+ return null;
635
+ }
636
+ return xt.fromJSON(t);
637
+ }
638
+ }, Tt = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Arial\",\n \"weight\": 700,\n \"italic\": false,\n \"source\": { \"family\": \"Liberation Sans\", \"version\": \"Version 2.1.5\", \"license\": \"OFL-1.1\", \"notice\": \"Licensed under the SIL Open Font License, Version 1.1\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1854,\n \"winDescent\": 434,\n \"underline\": [-2, 215],\n \"strikeout\": [530, 102],\n \"advances\": [\n [32, [569,682,971,1139,1139,1821,1479,487,682,682,797,1196,569,682,569,569,1139,1139,1139,1139,1139,1139,1139,1139,1139,1139,682,682,1196,1196,1196,1251,1997,1479,1479,1479,1479,1366,1251,1593,1479,569,1139,1479,1251,1706,1479,1593,1366,1593,1479,1366,1251,1479,1366,1933,1366,1366,1251,682,569,682,1196,1139,682,1139,1251,1139,1251,1139,682,1251,1251,569,569,1139,569,1821,1251,1251,1251,1251,797,1139,682,1251,1139,1593,1139,1139,1024,797,573,797,1196]],\n [160, [569,682,1139,1139,1139,1139,573,1139,682,1509,758,1139,1196,682,1509,1131,819,1124,682,682,682,1180,1139,682,682,682,748,1139,1708,1708,1708,1251,1479,1479,1479,1479,1479,1479,2048,1479,1366,1366,1366,1366,569,569,569,569,1479,1479,1593,1593,1593,1593,1593,1196,1593,1479,1479,1479,1479,1366,1366,1251,1139,1139,1139,1139,1139,1139,1821,1139,1139,1139,1139,1139,569,569,569,569,1251,1251,1251,1251,1251,1251,1251,1124,1251,1251,1251,1251,1251,1139,1251,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1472,1479,1251,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1593,1251,1593,1251,1593,1251,1593,1251,1479,1251,1479,1251,569,569,569,569,569,569,569,569,569,569,1607,1139,1139,569,1479,1139,1139,1251,569,1251,569,1251,789,1251,981,1251,569,1479,1251,1479,1251,1479,1251,1451,1481,1251,1593,1251,1593,1251,1593,1251,2048,1933,1479,797,1479,797,1479,797,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1251,981,1251,682,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1933,1593,1366,1139,1366,1251,1024,1251,1024,1251,1024,569,1251,1713,1472,1251,1472,1251,1479,1479,1139,1479,1715,1472,1251,1242,1366,1487,1283,1251,1139,1593,1304,1906,569,569,1479,1139,569,1139,2031,1479,1251,1593,1747,1456,1816,1523,1601,1251,1366,1366,1139,1229,737,682,1251,682,1251,1699,1483,1642,1479,1577,1139,1251,1024,1251,1251,1078,1078,1139,1139,1018,1186,1251,573,1019,1197,682,2730,2503,2275,2390,1820,1138,2618,2048,1820,1479,1139,569,569,1593,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1139,1479,1139,1479,1139,2048,1821,1593,1251,1593,1251,1479,1139,1593,1251,1593,1251,1251,1078,569,2730,2503,2275,1593,1251,2115,1362,1479,1251,1479,1139,2048,1821,1593,1251,1479,1139,1479,1139,1366,1139,1366,1139,569,569,569,569,1593,1251,1593,1251,1479,797,1479,797,1479,1251,1479,1251,1366,1139,1251,682,1182,1065,1479,1251,1439,1715,1292,1292,1251,1024,1479,1139,1366,1139,1593,1251,1593,1251,1593,1251,1593,1251,1366,1139,1022,1707,1036,569,1953,1953,1479,1479,1139,1251,1251,1139,1024,1321,991,1479,1479,1366,1366,1139,1139,569,1587,1251,1479,797,1366,1139,1139,1251,1251,1251,1139,1139,1251,1251,1139,1139,1601,1018,1018,1415,1162,682,1251,1251,1200,1139,1230,1251,1251,1251,569,569,830,680,729,569,1236,1821,1821,1821,1251,1251,1259,1251,1707,1730,1535,797,797,797,797,797,797,797,1195,1195,1139,682,682,682,1105,682,682,1251,1272,1192,1139,1593,1139,1169,1024,1392,1078,1078,1139,1139,1139,1139,1593,1259,1162,1200,1237,939,1139,926,1251,1139,1139,2111,1929,2479,1666,1094,1688,1780,1589,1418,1093,1154,1494,1494,753,753,398,516,516,516,768,1071,738,487,971,569,569,569,682,682,768,768,1196,1196,1196,1196,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,749,289,770,750,768,784,784,784,784,784,682,682,682,682,1024,682,682,682,682,682,682,682,682,682,682,682,682,682,682,814,814,682,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [682,682]],\n [890, [682,1139,1139,1139,682]],\n [900, [682,952,1479,682,1747,1855,970]],\n [908, [1689]],\n [910, [1899,1716,569,1479,1479,1231,1472,1366,1251,1479,1593,569,1479,1366,1706,1479,1318,1593,1479,1366]],\n [931, [1229,1251,1366,1681,1366,1657,1642,569,1366,1259,924,1251,569,1192,1259,1250,1139,1242,972,943,1251,1107,569,1142,1139,1253,1139,912,1251,1568,1267,1065,1401,914,1192,1465,1179,1543,1730,569,1192,1251,1192,1730]],\n [976, [1250,1192,1577,2050,1577,1535,1730,1385,1593,1251,1479,1139,1251,926,1539,1084,1647,1250,2031,1821,1439,1251,1439,1239,1366,1366,1316,1236,1505,1184,1038,900,1385,1265,1139,569,1593,980,980,1366,1251,1479,1706,1515,1267,1479,1479,1479,1366,1370,1813,1161,1457,1366,569,565,1139,2240,2176,1792,1250,1472,1274,1472,1479,1472,1479,1161,1459,1366,1851,1283,1472,1472,1250,1437,1706,1479,1593,1472,1366,1479,1251,1274,1748,1366,1496,1439,2058,2087,1781,2005,1472,1457,2112,1472,1139,1265,1259,853,1300,1139,1452,1018,1259,1259,1025,1301,1515,1237,1251,1237,1251,1139,1003,1139,1792,1139,1259,1189,1707,1728,1493,1749,1259,1131,1749,1195,1139,1139,1251,853,1131,1139,569,576,569,1984,1856,1251,1025,1259,1139,1237,2621,1594,1780,1439,1998,1630,1366,1139,1896,1639,1657,1543,2206,2008,1283,1018,1657,1543,1593,1251,1669,1324,1669,1324,2294,1995,1668,1306,2621,1845,2621,1594,1479,1139,1196,0,0,0,0,0,0,0,1472,1259,1472,1259,1366,1251,997,915,1161,853,1439,1225,1851,1452,1283,1018,1250,1025,1250,1025,1250,1025,1559,1276,1479,1237,1801,1462,2306,1887,1479,1183,1479,1139,1251,1003,1139,1139,1139,1139,1366,1139,1746,1411,1439,1189,1439,1189,1439,1251,1754,1389,1754,1389,569,1851,1452,1437,1224,1437,1301,1479,1237,1479,1237,1439,1189,1706,1515,569,1479,1139,1479,1139,2048,1821,1366,1139,1487,1139,1487,1139,1851,1452,1283,1018,1283,1078,1472,1259,1472,1259,1593,1251,1593,1251,1593,1251,1457,1131,1274,1139,1274,1139,1274,1139,1439,1189,1161,853,2005,1749,1161,853,1366,1139,1366,1139,1472,1251,2110,1914,1965,1732,1347,1098,2074,1957,2115,1894,1593,1200,1568,1435,1283,1018,1437,1301]],\n [1306, [1593,1251,1933,1593]],\n [1425, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,784,0,1153,0,0,682,0,0,862,0]],\n [1488, [1397,1311,981,1192,1384,618,748,1434,1409,618,1180,1133,1171,1475,1487,618,883,1430,1266,1382,1335,1128,1247,1339,1180,1649,1470]],\n [1520, [1237,1237,1237,831,1278]],\n [7424, [1205,1589,1821,1259,1139,1177,1177,1025,1018,569,1039,1142,926,1515,1259,1251,1139,1265,1265,1265,1933,1170,1251,1251,1257,1195,1195,1003,1192,1251,1572,1248,1139,1593,1024,991,1010,1260,853,1139,1237,1257,1543,1301,995,1425,930,930,931,853,853,1027,892,370,734,944,798,1058,887,888,1062,890,859,940,887,891,1300,773,773,801,1206,801,801,770,770,719,719,800,289,714,1156,754,840,778,841,841,800,444,754,834,1156,745,844,795,745,835,986,776,289,516,754,745,795,745,834,986,776,1888,1251,1251,682,1821,1251,1251,797,797,1139,682,1024,1251,752,1244,1787,569,569,1251,1192,1272,1251,1251,682,1573,1139,569,1821,1251,1251,797,1139,954,1139,1139,1024,1139,1251,1251,1139,1018,1018,1342,569,1139,682,1251,1078,801,778,778,840,719,496,496,800,753,372,289,289,372,630,398,336,585,1156,1156,863,863,762,840,1027,770,569,444,832,862,746,746,745,740,740,958,778,744,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1479,1139,1479,1251,1479,1251,1479,1251,1479,1139,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1593,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,569,569,569,569,1479,1139,1479,1139,1479,1139,1251,569,1251,569,1251,569,1251,569,1706,1821,1706,1821,1706,1821,1479,1251,1479,1251,1479,1251,1479,1251,1593,1251,1593,1251,1593,1251,1593,1251,1366,1251,1366,1251,1479,797,1479,797,1479,797,1479,797,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1251,682,1251,682,1251,682,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1366,1139,1366,1139,1933,1593,1933,1593,1933,1593,1933,1593,1933,1593,1366,1139,1366,1139,1366,1139,1251,1024,1251,1024,1251,1024,1251,682,1593,1139,1139,569]],\n [7838, [1465]],\n [7840, [1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,569,569,569,569,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1747,1456,1747,1456,1747,1456,1747,1456,1747,1456,1479,1251,1479,1251,1699,1483,1699,1483,1699,1483,1699,1483,1699,1483,1366,1139,1366,1139,1366,1139,1366,1139]],\n [7936, [1259,1259,1259,1259,1259,1259,1259,1259,1479,1479,1779,1779,1779,1779,1779,1779,972,972,972,972,972,972]],\n [7960, [1566,1566,1966,1966,1966,1966]],\n [7968, [1251,1251,1251,1251,1251,1251,1251,1251,1679,1679,2079,2079,2079,2079,2079,2079,569,569,569,569,569,569,569,569,769,769,1169,1169,1169,1169,1169,1169,1251,1251,1251,1251,1251,1251]],\n [8008, [1693,1693,2133,2133,1993,1993]],\n [8016, [1192,1192,1192,1192,1192,1192,1192,1192]],\n [8025, [1666]],\n [8027, [2046]],\n [8029, [2146]],\n [8031, [1966,1730,1730,1730,1730,1730,1730,1730,1730,1742,1742,2182,2182,2042,2042,2042,2042,1259,1259,972,972,1251,1251,569,569,1251,1251,1192,1192,1730,1730]],\n [8064, [1259,1259,1259,1259,1259,1259,1259,1259,1479,1479,1779,1779,1779,1779,1779,1779,1251,1251,1251,1251,1251,1251,1251,1251,1679,1679,2079,2079,2079,2079,2079,2079,1730,1730,1730,1730,1730,1730,1730,1730,1742,1742,2182,2182,2042,2042,2042,2042,1259,1259,1259,1259,1259]],\n [8118, [1259,1259,1479,1479,1479,1479,1479,682,682,682,682,682,1251,1251,1251]],\n [8134, [1251,1251,1766,1766,1879,1879,1479,682,682,682,569,569,569,569]],\n [8150, [569,569,569,569,969,969]],\n [8157, [682,682,682,1192,1192,1192,1192,1267,1267,1192,1192,1366,1366,1766,1866,1566,952,952,682]],\n [8178, [1730,1730,1730]],\n [8182, [1730,1730,1893,1693,1942,1742,1642,682,682]],\n [8192, [1024,2048,1024,2048,683,512,341,1139,569,410,171,0,0,0,0,0,682]],\n [8210, [1139,1139,2048,2048,1019,1131,569,569,569,569,1024,1024,1024,1024,1139,1139,717]],\n [8230, [2048]],\n [8234, [0,0,0,0,0,410,2048]],\n [8242, [491,981,981]],\n [8249, [682,682]],\n [8252, [1237]],\n [8254, [682]],\n [8260, [342]],\n [8286, [682]],\n [8298, [0,0,0,0,0,0]],\n [8308, [1013,962,943,845,968,972]],\n [8319, [811,923,847,910,947,976,939,930,819,959,922]],\n [8336, [773,770,840,750,770]],\n [8352, [1139,1479,1479,1139,1139,1821,1479,2240,2509,1933,1810,1051,1139,1479,1251,2224,1139,1366,1593,1479,1366,1479]],\n [8383, [1669]],\n [8432, [0]],\n [8453, [1813]],\n [8467, [1001]],\n [8470, [2283,1509]],\n [8482, [2048]],\n [8486, [1573]],\n [8494, [1229]],\n [8525, [2048,1025]],\n [8531, [1708,1708]],\n [8539, [1708,1708,1708,1708]],\n [8580, [1139]],\n [8592, [2048,1024,2048,1024,2048,1024]],\n [8616, [1024]],\n [8660, [2048]],\n [8706, [1012]],\n [8710, [1253]],\n [8719, [1686]],\n [8721, [1460,1196]],\n [8725, [342]],\n [8729, [569,1124]],\n [8734, [1460,2005]],\n [8745, [1479]],\n [8747, [561]],\n [8776, [1124]],\n [8800, [1124,1195,2048]],\n [8804, [1124,1124]],\n [8962, [1237]],\n [8976, [1196]],\n [8992, [1237,1237]],\n [9472, [1451]],\n [9474, [1280]],\n [9484, [1451]],\n [9488, [1451]],\n [9492, [1451]],\n [9496, [1451]],\n [9500, [1451]],\n [9508, [1451]],\n [9516, [1451]],\n [9524, [1451]],\n [9532, [1451]],\n [9552, [1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451]],\n [9600, [1451]],\n [9604, [1451]],\n [9608, [1451]],\n [9612, [1451]],\n [9616, [1451,1451,1451,1493]],\n [9632, [1237,1237]],\n [9642, [726,726,2048]],\n [9650, [2027]],\n [9658, [2027]],\n [9660, [2027]],\n [9668, [2027]],\n [9674, [1012,1237,1217]],\n [9679, [1237,1237,1237,1237,1237,1237,1237,1237,1237,1237,1237]],\n [9702, [726]],\n [9786, [2091,2155,1877]],\n [9791, [1536,1536,1536,1536,1536,1536,1536,1536,1536]],\n [9824, [1088]],\n [9827, [1344]],\n [9829, [1216,1045]],\n [9833, [2048,1024,1536,2048]],\n [9839, [1024]],\n [11360, [1251,569,1251,1366,1479,1139,682,1479,1251,1479,1139,1251,1024,1563]],\n [11377, [1241,2139,1758,1139,1108,892,1465]],\n [11799, [682]],\n [42775, [0,0,0,0,1024,1024,682,682,682,0,0]],\n [42888, [682,682,796,487,487]],\n [64257, [1251,1251]],\n [64285, [618,0,1237,1266,1397,1192,1384,1133,1171,1475,1180,1470,1237,1649,1649,1649,1649,1397,1397,1397,1311,981,1192,1384,618,748]],\n [64312, [1409,618,1180,1133,1171]],\n [64318, [1487]],\n [64320, [883,1430]],\n [64323, [1382,1335]],\n [64326, [1247,1339,1180,1649,1470,618,1311,1133,1335,1368]],\n [65056, [0,0,0,0]],\n [65532, [2048]]\n ]\n}\n", Et = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Arial\",\n \"weight\": 400,\n \"italic\": false,\n \"source\": { \"family\": \"Liberation Sans\", \"version\": \"Version 2.1.5\", \"license\": \"OFL-1.1\", \"notice\": \"Licensed under the SIL Open Font License, Version 1.1\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1854,\n \"winDescent\": 434,\n \"underline\": [-67, 150],\n \"strikeout\": [530, 102],\n \"advances\": [\n [32, [569,569,727,1139,1139,1821,1366,391,682,682,797,1196,569,682,569,569,1139,1139,1139,1139,1139,1139,1139,1139,1139,1139,569,569,1196,1196,1196,1139,2079,1366,1366,1479,1479,1366,1251,1593,1479,569,1024,1366,1139,1706,1479,1593,1366,1593,1479,1366,1251,1479,1366,1933,1366,1366,1251,569,569,569,961,1139,682,1139,1139,1024,1139,1139,569,1139,1139,455,455,1024,455,1706,1139,1139,1139,1139,682,1024,569,1139,1024,1479,1024,1024,1024,684,532,684,1196]],\n [160, [569,682,1139,1139,1139,1139,532,1139,682,1509,758,1139,1196,682,1509,1131,819,1124,682,682,682,1180,1100,682,682,682,748,1139,1708,1708,1708,1251,1366,1366,1366,1366,1366,1366,2048,1479,1366,1366,1366,1366,569,569,569,569,1479,1479,1593,1593,1593,1593,1593,1196,1593,1479,1479,1479,1479,1366,1366,1251,1139,1139,1139,1139,1139,1139,1821,1024,1139,1139,1139,1139,569,569,569,569,1139,1139,1139,1139,1139,1139,1139,1124,1251,1139,1139,1139,1139,1024,1139,1024,1366,1139,1366,1139,1366,1139,1479,1024,1479,1024,1479,1024,1479,1024,1479,1259,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1593,1139,1593,1139,1593,1139,1593,1139,1479,1139,1479,1139,569,569,569,569,569,569,569,455,569,569,1505,909,1024,455,1366,1024,1024,1139,455,1139,455,1139,597,1139,684,1139,455,1479,1139,1479,1139,1479,1139,1237,1481,1139,1593,1139,1593,1139,1593,1139,2048,1933,1479,682,1479,682,1479,682,1366,1024,1366,1024,1366,1024,1366,1024,1251,569,1251,768,1251,569,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1933,1479,1366,1024,1366,1251,1024,1251,1024,1251,1024,455,1139,1553,1344,1139,1344,1139,1479,1479,1024,1479,1658,1344,1139,1140,1366,1541,1237,1251,1139,1593,1278,1804,455,569,1366,1024,455,1024,1824,1479,1139,1593,1756,1343,1778,1367,1545,1139,1366,1366,1024,1266,779,569,1251,569,1251,1749,1371,1531,1479,1582,1024,1251,1024,1251,1251,1116,1116,1139,1139,939,997,1139,532,846,1196,569,2730,2503,2148,2175,1706,924,2503,1934,1579,1366,1139,569,455,1593,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1139,1366,1139,1366,1139,2048,1821,1593,1139,1593,1139,1366,1024,1593,1139,1593,1139,1251,1116,455,2730,2503,2148,1593,1139,2118,1266,1479,1139,1366,1139,2048,1821,1593,1251,1366,1139,1366,1139,1366,1139,1366,1139,569,569,569,569,1593,1139,1593,1139,1479,682,1479,682,1479,1139,1479,1139,1366,1024,1251,569,1116,894,1479,1139,1446,1396,1238,1158,1251,1024,1366,1139,1366,1139,1593,1139,1593,1139,1593,1139,1593,1139,1366,1024,715,1402,752,455,1816,1816,1366,1479,1024,1139,1251,1024,1024,1189,928,1366,1479,1368,1366,1139,1024,455,1510,1139,1479,682,1366,1024,1139,1139,1139,1139,1024,1024,1139,1139,1139,1139,1513,939,939,1293,1039,569,1139,1139,1144,1026,1263,1139,1139,1139,455,455,729,670,622,455,1171,1706,1706,1706,1139,1139,1132,1139,1619,1599,1126,682,682,682,682,682,682,682,1109,1109,1024,455,532,455,715,569,569,1139,1164,1120,1024,1479,1024,1064,1024,1108,1116,1116,1024,1024,1024,1024,1593,1088,1039,1144,1131,814,1024,827,1139,1024,1024,1975,1856,2059,1459,879,1472,1564,1354,1295,994,1080,1407,1407,785,785,326,491,491,491,746,985,657,391,727,455,455,455,682,682,714,714,1196,1196,1196,1196,682,682,682,682,682,682,682,682,682,682,569,569,682,682,682,682,682,682,682,682,682,682,682,682,682,682,660,322,696,672,714,784,784,784,784,784,682,682,682,682,682,682,682,682,682,682,682,682,682,682,569,682,682,682,682,814,814,682,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [682,682]],\n [890, [682,1024,1024,1024,569]],\n [900, [682,682,1367,569,1606,1716,786]],\n [908, [1586]],\n [910, [1752,1541,455,1366,1366,1128,1368,1366,1251,1479,1593,569,1366,1368,1706,1479,1331,1593,1479,1366]],\n [931, [1266,1251,1366,1634,1366,1711,1531,569,1366,1184,913,1139,455,1120,1184,1178,1024,1140,913,903,1139,1139,455,1024,1024,1180,1024,917,1139,1413,1165,987,1264,809,1120,1328,1075,1460,1599,455,1120,1139,1120,1599]],\n [976, [1178,1120,1582,1962,1582,1147,1599,1231,1593,1139,1479,1024,1251,827,1279,1084,1549,1181,1824,1706,1381,1139,1380,1024,1366,1366,1248,1221,1509,1134,950,839,1231,1173,1024,455,1593,905,905,1366,1139,1479,1706,1408,1165,1479,1479,1479,1366,1367,1771,1109,1472,1366,569,569,1024,2165,2069,1749,1193,1472,1301,1472,1366,1344,1366,1109,1387,1366,1891,1237,1472,1472,1193,1344,1706,1479,1593,1472,1366,1479,1251,1301,1557,1366,1515,1365,1877,1920,1621,1813,1344,1472,2069,1479,1139,1173,1088,747,1195,1139,1370,939,1144,1144,896,1195,1408,1131,1139,1109,1139,1024,938,1024,1685,1024,1173,1067,1643,1685,1280,1472,1067,1045,1536,1109,1139,1139,1139,747,1045,1024,455,569,455,1856,1664,1139,896,1144,1024,1131,2740,1278,1593,1255,1945,1461,1368,1024,1838,1424,1697,1403,2157,1776,1237,939,1631,1410,1593,1139,1645,1292,1645,1292,2200,1836,1706,1254,2439,1744,2740,1278,1479,1024,1031,0,0,0,0,0,0,0,1472,1144,1344,1067,1366,1139,1001,842,1109,747,1373,1124,1891,1370,1237,939,1193,896,1193,896,1193,896,1519,1097,1479,1131,1801,1327,2328,1782,1542,1067,1479,1024,1251,938,1139,1024,1139,1024,1366,1024,1895,1415,1365,1067,1365,1067,1365,1139,1764,1364,1764,1364,569,1891,1370,1367,1128,1344,1195,1479,1131,1479,1131,1365,1067,1706,1408,455,1366,1139,1366,1139,2048,1821,1366,1139,1541,1139,1541,1139,1891,1370,1237,939,1237,1116,1472,1144,1472,1144,1593,1139,1593,1139,1593,1139,1472,1045,1301,1024,1301,1024,1301,1024,1365,1067,1109,747,1813,1472,1109,747,1366,1024,1366,1024,1344,1139,1983,1795,1958,1670,1357,1043,1987,1863,2118,1799,1593,1144,1529,1363,1237,939,1344,1195]],\n [1306, [1593,1139,1933,1479]],\n [1425, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,784,0,1153,0,0,569,0,0,776,0]],\n [1488, [1286,1225,866,1135,1298,532,662,1348,1337,532,1094,1075,1085,1389,1407,532,797,1343,1192,1276,1249,1032,1116,1208,1094,1495,1415]],\n [1520, [1042,1042,1042,788,1235]],\n [7424, [1016,1531,1821,1088,1024,1129,1129,1003,939,455,865,1024,822,1408,1144,1139,1024,1246,1246,1246,1933,936,1139,1139,1067,1109,1109,938,1120,1222,1502,1222,1024,1479,1024,939,875,1243,747,1024,1109,1067,1460,1195,928,1359,849,849,920,840,840,1016,878,342,644,870,720,1045,881,879,1048,783,857,924,886,879,1275,762,762,772,1228,773,773,761,761,652,652,772,322,694,1173,783,773,725,773,773,774,450,783,834,1173,658,800,789,658,774,901,703,322,491,783,658,789,658,777,901,703,1860,1139,1139,569,1706,1139,1139,682,682,1024,569,1024,1139,779,1140,1609,455,455,1139,1120,1164,1139,1139,569,1460,1024,455,1706,1139,1139,682,1024,792,1024,1024,1024,1139,1139,1139,1139,939,939,1332,455,1024,455,1139,1116,772,725,713,764,652,469,469,772,785,322,322,322,322,554,322,322,563,1171,1171,783,783,782,773,768,696,322,450,783,794,774,724,658,734,734,734,756,746,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1366,1139,1366,1139,1366,1139,1366,1139,1479,1024,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,569,1593,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,569,455,569,569,1366,1024,1366,1024,1366,1024,1139,455,1139,455,1139,455,1139,455,1706,1706,1706,1706,1706,1706,1479,1139,1479,1139,1479,1139,1479,1139,1593,1139,1593,1139,1593,1139,1593,1139,1366,1139,1366,1139,1479,682,1479,682,1479,682,1479,682,1366,1024,1366,1024,1366,1024,1366,1024,1366,1024,1251,569,1251,569,1251,569,1251,569,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1024,1366,1024,1933,1479,1933,1479,1933,1479,1933,1479,1933,1479,1366,1024,1366,1024,1366,1024,1251,1024,1251,1024,1251,1024,1139,569,1479,1024,1139,455]],\n [7838, [1439]],\n [7840, [1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,569,455,569,455,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1756,1343,1756,1343,1756,1343,1756,1343,1756,1343,1479,1139,1479,1139,1749,1371,1749,1371,1749,1371,1749,1371,1749,1371,1366,1024,1366,1024,1366,1024,1366,1024]],\n [7936, [1184,1184,1184,1184,1184,1184,1184,1184,1366,1366,1666,1666,1666,1666,1666,1666,913,913,913,913,913,913]],\n [7960, [1566,1566,1900,1900,1900,1900]],\n [7968, [1139,1139,1139,1139,1139,1139,1139,1139,1679,1679,2079,2079,2079,2079,2079,2079,455,455,455,455,455,455,455,455,769,769,1169,1169,1169,1169,1169,1169,1139,1139,1139,1139,1139,1139]],\n [8008, [1693,1693,2093,2093,1993,1993]],\n [8016, [1120,1120,1120,1120,1120,1120,1120,1120]],\n [8025, [1666]],\n [8027, [1966]],\n [8029, [2066]],\n [8031, [1966,1599,1599,1599,1599,1599,1599,1599,1599,1631,1631,2031,2031,1931,1931,1931,1931,1184,1184,913,913,1139,1139,455,455,1139,1139,1120,1120,1599,1599]],\n [8064, [1184,1184,1184,1184,1184,1184,1184,1184,1366,1366,1666,1666,1666,1666,1666,1666,1139,1139,1139,1139,1139,1139,1139,1139,1679,1679,2079,2079,2079,2079,2079,2079,1599,1599,1599,1599,1599,1599,1599,1599,1631,1631,2031,2031,1931,1931,1931,1931,1184,1184,1184,1184,1184]],\n [8118, [1184,1184,1366,1366,1366,1366,1366,682,682,682,682,682,1139,1139,1139]],\n [8134, [1139,1139,1666,1666,1779,1779,1479,682,682,682,455,455,455,455]],\n [8150, [455,455,569,569,869,869]],\n [8157, [682,682,682,1120,1120,1120,1120,1165,1165,1120,1120,1366,1366,1766,1816,1566,682,682,682]],\n [8178, [1599,1599,1599]],\n [8182, [1599,1599,1893,1693,1831,1631,1531,682,682]],\n [8192, [1024,2048,1024,2048,683,512,341,1139,569,410,171,0,0,0,0,0,682]],\n [8210, [1139,1139,2048,2048,846,1131,455,455,455,455,682,682,682,682,1139,1139,717]],\n [8230, [2048]],\n [8234, [0,0,0,0,0,410,2048]],\n [8242, [384,725,725]],\n [8249, [682,682]],\n [8252, [1024]],\n [8254, [682]],\n [8260, [342]],\n [8286, [569]],\n [8298, [0,0,0,0,0,0]],\n [8308, [880,849,843,741,864,877]],\n [8319, [747,850,691,795,834,836,825,826,704,849,812]],\n [8336, [762,761,773,672,761]],\n [8352, [1139,1479,1479,1139,1139,1706,1479,2240,2384,1933,1739,1051,1139,1366,1251,2048,1067,1366,1593,1366,1139,1479]],\n [8383, [1516]],\n [8432, [0]],\n [8453, [1813]],\n [8467, [662]],\n [8470, [2197,1509]],\n [8482, [2048]],\n [8486, [1573]],\n [8494, [1229]],\n [8525, [1931,1003]],\n [8531, [1708,1708]],\n [8539, [1708,1708,1708,1708]],\n [8580, [1024]],\n [8592, [2048,1024,2048,1024,2048,1024]],\n [8616, [1024]],\n [8660, [2048]],\n [8706, [1012]],\n [8710, [1253]],\n [8719, [1686]],\n [8721, [1460,1196]],\n [8725, [342]],\n [8729, [569,1124]],\n [8734, [1460,2005]],\n [8745, [1472]],\n [8747, [561]],\n [8776, [1124]],\n [8800, [1124,1195,2048]],\n [8804, [1124,1124]],\n [8962, [1237]],\n [8976, [1196]],\n [8992, [1237,1237]],\n [9472, [1451]],\n [9474, [1280]],\n [9484, [1451]],\n [9488, [1451]],\n [9492, [1451]],\n [9496, [1451]],\n [9500, [1451]],\n [9508, [1451]],\n [9516, [1451]],\n [9524, [1451]],\n [9532, [1451]],\n [9552, [1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451]],\n [9600, [1451]],\n [9604, [1451]],\n [9608, [1451]],\n [9612, [1451]],\n [9616, [1451,1451,1451,1493]],\n [9632, [1237,1237]],\n [9642, [726,726,2048]],\n [9650, [2027]],\n [9658, [2027]],\n [9660, [2027]],\n [9668, [2027]],\n [9674, [1012,1237,1217]],\n [9679, [1237,1237,1237,1237,1237,1237,1237,1237,1237,1237,1237]],\n [9702, [726]],\n [9786, [2091,2155,1877]],\n [9791, [1536,1536,1536,1536,1536,1536,1536,1536,1536]],\n [9824, [1088]],\n [9827, [1344]],\n [9829, [1216,1045]],\n [9833, [2048,1024,1536,2048]],\n [9839, [1024]],\n [11360, [1139,455,1139,1366,1479,1139,569,1479,1139,1366,1024,1251,1024,1500]],\n [11377, [1222,2124,1722,1024,1182,871,1328]],\n [11799, [682]],\n [42775, [0,0,0,0,1024,1024,569,569,569,0,0]],\n [42888, [682,569,896,391,391]],\n [64257, [1024,1024]],\n [64285, [532,0,1042,1192,1286,1135,1298,1075,1085,1389,1094,1415,1151,1495,1495,1495,1495,1286,1286,1286,1225,866,1135,1298,532,662]],\n [64312, [1337,532,1094,1075,1085]],\n [64318, [1407]],\n [64320, [797,1343]],\n [64323, [1276,1249]],\n [64326, [1116,1208,1094,1495,1415,532,1225,1075,1249,1286]],\n [65056, [0,0,0,0]],\n [65532, [2048]]\n ]\n}\n", Dt = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Calibri\",\n \"weight\": 700,\n \"italic\": false,\n \"source\": { \"family\": \"Carlito\", \"version\": \"Version 1.103\", \"license\": \"OFL-1.1\", \"notice\": \"Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name \\\"Carlito\\\". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1950,\n \"winDescent\": 550,\n \"underline\": [-103, 194],\n \"strikeout\": [512, 134],\n \"advances\": [\n [0, [0]],\n [13, [0]],\n [32, [463,667,898,1020,1038,1493,1443,478,638,638,1020,1020,528,627,547,880,1038,1038,1038,1038,1038,1038,1038,1038,1038,1038,565,565,1020,1020,1020,949,1840,1241,1148,1084,1291,999,940,1305,1292,546,678,1120,866,1790,1349,1385,1090,1405,1153,968,1014,1337,1211,1856,1128,1064,979,665,880,665,1020,1020,615,1011,1099,857,1099,1031,648,971,1099,503,523,983,503,1666,1099,1101,1099,1099,728,817,710,1099,969,1526,941,970,814,704,973,704,1020]],\n [161, [667,1020,1038,1020,1038,1020,1020,849,1709,852,1103,1020]],\n [174, [1038,799,701,1020,692,688,616,1154,1224,548,621,517,891,1103,1347,1415,1437,949,1241,1241,1241,1241,1241,1241,1588,1084,999,999,999,999,546,546,546,546,1309,1349,1385,1385,1385,1385,1385,1020,1394,1337,1337,1337,1337,1064,1090,1136,1011,1011,1011,1011,1011,1011,1587,857,1031,1031,1031,1031,503,503,503,503,1099,1099,1101,1101,1101,1101,1101,1020,1114,1099,1099,1099,1099,970,1099,970,1241,1011,1241,1011,1241,1011,1084,857,1084,857,1084,857,1084,857,1291,1222,1309,1165,999,1031,999,1031,999,1031,999,1031,999,1031,1305,971,1305,971,1305,971,1305,971,1292,1099,1347,1121,546,503,546,503,546,503,546,503,546,503,1225,1027,678,523,1120,983,983,866,503,866,503,881,627,1150,865,886,540,1349,1099,1349,1099,1349,1099,1274,1313,1099,1385,1101,1385,1101,1385,1101,1790,1726,1153,728,1153,728,1153,728,968,817,968,817,968,817,968,817,1014,710,1014,744,1014,726,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1856,1526,1064,970,1064,979,814,979,814,979,814,529,1170,1368,1138,1099,1171,1119,1075,1243,950,1309,1511,1138,1099,1091,999,1347,1009,940,1020,1395,1210,1646,614,616,1124,983,641,996,1820,1349,1099,1385,1566,1296,1642,1415,1310,1099,1153,975,826,962,913,749,1116,710,1014,1559,1326,1394,1337,1125,1052,979,814,1003,1009,981,884,1038,1038,866,805,1099,541,985,1203,667,2270,2105,1913,1577,1389,1026,2027,1872,1622,1241,1011,546,503,1385,1101,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1031,1241,1011,1241,1011,1588,1587,1321,1140,1305,971,1120,983,1385,1101,1385,1101,1003,937,523,2245,2105,1913,1305,971,1812,1254,1349,1099,1241,1011,1588,1587,1394,1114,1241,1011,1241,1011,999,1031,999,1031,546,503,546,503,1385,1101,1385,1101,1153,728,1153,728,1337,1099,1337,1099,968,817,1014,710,1003,937,1292,1099,1315,1243,1081,1055,1004,826,1241,1011,999,1031,1385,1101,1385,1101,1385,1101,1385,1101,1064,970,676,1276,719,523,1693,1695,1241,1094,866,901,1034,817,814,898,890,1174,1374,1216,1000,1019,707,608,1295,1099,1181,776,1204,1010,1011,1099,1100,1099,867,904,1099,1121,1031,1031,1316,874,874,1103,1079,597,1118,1098,1098,980,992,1099,1099,1099,619,586,503,807,824,516,1195,1666,1666,1666,1099,1099,1128,1097,1473,1447,1432,728,728,729,728,728,672,672,1002,1002,817,494,582,494,671,710,710,1201,1197,1089,969,1526,970,948,824,981,937,942,898,898,898,857,1325,1013,1079,1108,1117,676,983,828,1120,898,898,1716,1789,1883,1314,1030,1439,1634,1268,1214,1075,1007,1117,1118,763,763,388,512,502,524,692,1051,678,439]],\n [699, [528,528,528,462,462,665,665,1020,1020,1099,1099,822,822,593]],\n [715, [615,593,807,615,616,569,569,462,462,682,682,682,682,788,482,671,646,910,995,682,682,682,374,570,681,665,784,784,784,784,784,682,682,822,1178,891,682,682,682,682,671]],\n [757, [961]],\n [759, [910,565,682,682,682,682,1088,1088,770]],\n [773, [0]],\n [781, [0,0,0,0,0]],\n [787, [0,0,508]],\n [792, [0,0,0,682,0,0,0,0,0,0,0]],\n [805, [0]],\n [809, [0,0,0]],\n [815, [0]],\n [818, [0,0]],\n [822, [0]],\n [825, [0,0,0,0,0,0,0]],\n [835, [0]],\n [838, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [857, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [528,528]],\n [890, [562,867,857,867,565]],\n [900, [649,1012,1241,548,999,1292,546]],\n [908, [1385]],\n [910, [1064,1394,586,1241,1148,839,1183,999,979,1292,1385,546,1120,1216,1790,1349,1008,1385,1292,1090]],\n [931, [962,1014,1064,1641,1128,1654,1394,546,1064,1210,937,1114,586,1123,1210,1117,957,1091,937,746,1114,1116,586,983,996,1154,965,789,1101,1186,1086,833,1115,804,1123,1432,923,1511,1470,586,1123,1101,1123,1470]],\n [976, [1098,1208,1071,1071,1071,1441,1733,1252,1385,1101,1075,839,940,914,1131,967,1228,1232,1809,1666,1117,1081,1148,1067,1038,860,1190,974,1368,1105,1031,826,1239,1082,857,523,1385,916,916,1090,1119,1084,1470,1262,1086,1110,1084,1110,999,999,1302,885,1103,968,546,546,678,1834,1836,1295,1153,1335,1121,1287,1241,1138,1148,885,1378,999,1705,987,1335,1335,1153,1288,1790,1292,1385,1290,1090,1084,1014,1121,1482,1128,1347,1166,1837,1898,1309,1635,1133,1103,1871,1176,1011,1090,1013,726,1192,1031,1509,874,1140,1140,1013,1077,1461,1117,1101,1094,1099,857,798,970,1383,941,1151,1000,1563,1616,1143,1458,1013,895,1542,1020,1031,1031,1133,726,896,817,503,503,523,1590,1626,1121,1013,1140,970,1100,1938,1473,1306,1089,1599,1337,1333,1173,1832,1615,1490,1282,1960,1722,1010,870,1654,1511,1385,1097,1253,1017]],\n [1143, [1017,2250,1960,1465,1200,1938,1628,1938,1473,1060,834,1248,0,0,0,0]],\n [1160, [2018,1944,1416,1206,1163,1031,1090,1099,889,752,903,774,1135,935,1818,1598,987,874,1268,1099,1203,1083,1180,1047,1323,1165,1378,1172,1490,1269,1880,1524,1351,1155,1084,857,1014,797,1064,975,1064,975,1239,1026,1541,1254,1227,1086,1166,1030,1166,1030,1597,1285,1597,1285,546,1705,1509,1196,1040,1368,1143,1292,1116,1373,1182,1166,1030,1871,1505,546,1241,1011,1241,1011,1588,1587,999,1031,1347,1031,1347,1031,1705,1509,987,874,1003,937,1335,1140,1335,1140,1385,1101,1385,1101,1385,1101,1103,895,1121,970,1121,970,1121,970,1166,1000,874,726,1635,1458,903,774,1223,1022,1128,941,1133,1099,1673,1595,1536,1395,1078,970,1808,1584,1812,1623,1318,1117,1299,1157,1009,874,1348,1134]],\n [3647, [1038]],\n [7424, [1063,1399,1587,1061,955,1122,1122,864]],\n [7433, [503,621,994,762,1461,1140,1192,955,1162,1161,1320,1726,953,1101,1101,987,1014,1014,853,1158,1135,1507,1175,1033,1595,878,860,817,1012,780,1003,1141,987,1444,1098,787,1047,778,807,875,695,695,892,871,432,517,756,615,1178,914,909,929,761,756,781,688,888,1185,703,684,757,1068,757,757,711,696,635,631,668,378,704,1132,761,757,580,742,742,757,506,763]],\n [7514, [1132,677,679,754,638,732,977,706,378,512,763,677,754,638,749,977,706,1691,1247,1242,813,1907,1362,1212,870,829,1004,813,880,971,813,994,1711,620,669,1140,1250,1236,1099,1198,680,1461,1131,583,1751,1184,1099,728,941,876,979,1070,850,1208,1234,1130,1041,904,874,1041,630,867,494,1224,907,741,580,622,736,631,464,449,668,763,503,434,378,504,557,444,435,584,1132,1132,812,812,802,757,951,570,522,531,855,816,747,740,705,570,670,714,674,790,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1241,1011,1148,1099,1148,1099,1148,1099,1084,857,1291,1099,1291,1099,1291,1099,1291,1099,1291,1099,999,1031,999,1031,999,1031,999,1031,999,1031,940,648,1305,971,1292,1099,1292,1099,1292,1099,1292,1099,1292,1099,546,503,546,503,1120,983,1120,983,1120,983,866,503,866,503,866,503,866,503,1790,1666,1790,1666,1790,1666,1349,1099,1349,1099,1349,1099,1349,1099,1385,1101,1385,1101,1385,1101,1385,1101,1090,1099,1090,1099,1153,728,1153,728,1153,728,1153,728,968,817,968,817,968,817,968,817,968,817,1014,710,1014,710,1014,710,1014,710,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1211,969,1211,969,1856,1526,1856,1526,1856,1526,1856,1526,1856,1526,1128,941,1128,941,1064,970,979,814,979,814,979,814,1099,710,1526,970,1011,529]],\n [7838, [1173]],\n [7840, [1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,546,503,546,503,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1428,1296,1428,1296,1428,1296,1428,1296,1428,1296,1337,1099,1337,1099,1559,1326,1559,1326,1559,1326,1559,1326,1559,1326,1064,970,1064,970,1064,970,1064,970]],\n [7936, [1210,1210,1210,1210,1210,1210,1210,1210,1241,1241,1241,1241,1241,1241,1241,1241,937,937,937,937,937,937]],\n [7960, [999,999,1258,1258,1258,1258]],\n [7968, [1114,1114,1114,1114,1114,1114,1114,1114,1292,1292,1551,1551,1551,1551,1479,1479,586,586,586,586,586,586,586,586,546,546,805,805,805,805,733,546,1101,1101,1101,1101,1101,1101]],\n [8008, [1385,1385,1590,1590,1590,1590]],\n [8016, [1123,1123,1123,1123,1123,1123,1123,1123]],\n [8025, [1064]],\n [8027, [1425]],\n [8029, [1425]],\n [8031, [1425,1470,1470,1470,1470,1470,1470,1470,1470,1394,1394,1598,1598,1598,1598,1523,1530,1210,1210,937,937,1114,1114,586,586,1101,1101,1123,1123,1470,1470]],\n [8064, [1210,1210,1210,1210,1210,1210,1210,1210,1241,1241,1241,1241,1241,1241,1241,1241,1114,1114,1114,1114,1114,1114,1114,1114,1292,1292,1551,1551,1551,1551,1479,1479,1470,1470,1470,1470,1470,1470,1470,1470,1394,1394,1598,1598,1598,1598,1530,1530,1210,1210,1210,1210,1210]],\n [8118, [1210,1210,1241,1241,1241,1241,1241,473]],\n [8127, [473,922,804,1114,1114,1114]],\n [8134, [1114,1114,999,999,1292,1292,1292,809,809,804,586,586,586,586]],\n [8150, [586,586,546,546,546,546]],\n [8157, [809,809,804,1123,1123,1123,1123,1086,1086,1123,1123,1064,1064,1064,1064,1090,1012,1012,649]],\n [8178, [1470,1470,1470]],\n [8182, [1470,1470,1385,1385,1394,1394,1394,649,473]],\n [8192, [1024,2048,1024,2048,687,512,341,1038,444,409,256,0,0,0,0,0]],\n [8210, [1038,1020,1854,1854,985,1022,528,528,528,528,891,891,891,891,1020,1020,1020]],\n [8230, [1457]],\n [8239, [463,2174]],\n [8243, [835,1221]],\n [8249, [705,705]],\n [8252, [1202,1034,1020]],\n [8260, [728]],\n [8286, [601,455]],\n [8304, [815,378]],\n [8308, [749,690,740,669,749,740,727,720,711,455,455,761,815,517,692,688,749,690,740,669,749,740,727,720,711,455,455,652,703,696,757,681,711]],\n [8352, [1323,1114,1084,950,1038,1666,1411,1884,1563,1945,1565,1165,1038,1148,1014,2286,1149,1211,1249,1274,1063,1084]],\n [8376, [1038,1038]],\n [8413, [2036]],\n [8453, [1589]],\n [8467, [1081]],\n [8470, [2142,1709]],\n [8480, [1497]],\n [8482, [1475]],\n [8486, [1394]],\n [8494, [1513]],\n [8498, [940]],\n [8525, [1569,750]],\n [8531, [1428,1530,1428,1530,1515,1543,1370,1457,1426,1512,1512,1392,812]],\n [8579, [1084,867]],\n [8592, [1854,1854,1854,1854,2683,1574,1719,1719,1719,1719]],\n [8616, [967]],\n [8706, [1100]],\n [8710, [1183]],\n [8719, [1602]],\n [8721, [1127,1020]],\n [8725, [780]],\n [8730, [1020]],\n [8734, [1716,1400]],\n [8745, [1437]],\n [8747, [769]],\n [8776, [1020]],\n [8800, [1020,1020]],\n [8804, [1020,1020]],\n [8962, [1793]],\n [8976, [1020]],\n [8992, [1106,1106]],\n [9312, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9450, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9471, [2720,1024]],\n [9474, [1024]],\n [9484, [1024]],\n [9488, [1024]],\n [9492, [1024]],\n [9496, [1024]],\n [9633, [1237]],\n [9642, [725,725]],\n [9674, [1093,1126,1217]],\n [9679, [1237]],\n [9702, [725]],\n [9728, [1506]],\n [9788, [1506]],\n [9833, [0]],\n [10102, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [11360, [912,656,996,1123,1153,1011,761,1378,1160,1228,1069,1013,829]],\n [11380, [1012,1001,846,1433]],\n [11799, [656]],\n [42775, [807,807,804,682]],\n [42784, [1810,1810]],\n [63743, [1522]],\n [64256, [1230,1135,1135,1718,1718]],\n [65056, [0,0,0,0]],\n [65279, [0]]\n ]\n}\n", Ot = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Calibri\",\n \"weight\": 400,\n \"italic\": false,\n \"source\": { \"family\": \"Carlito\", \"version\": \"Version 1.103\", \"license\": \"OFL-1.1\", \"notice\": \"Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name \\\"Carlito\\\". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1950,\n \"winDescent\": 550,\n \"underline\": [-103, 194],\n \"strikeout\": [512, 134],\n \"advances\": [\n [0, [0]],\n [13, [0]],\n [32, [463,667,821,1020,1038,1464,1397,452,621,621,1020,1020,511,627,517,791,1038,1038,1038,1038,1038,1038,1038,1038,1038,1038,548,548,1020,1020,1020,949,1831,1185,1114,1092,1260,1000,941,1292,1276,516,653,1064,861,1751,1322,1356,1058,1378,1112,941,998,1314,1162,1822,1063,998,959,628,791,628,1020,1020,596,981,1076,866,1076,1019,625,964,1076,470,490,931,470,1636,1076,1080,1076,1076,714,801,686,1076,925,1464,887,927,809,644,943,644,1020]],\n [161, [667,1020,1038,1020,1038,1020,1020,804,1709,824,1049,1020]],\n [174, [1038,807,694,1020,688,685,598,1126,1200,517,629,504,865,1049,1303,1375,1383,949,1185,1185,1185,1185,1185,1185,1563,1092,1000,1000,1000,1000,516,516,516,516,1279,1322,1356,1356,1356,1356,1356,1020,1359,1314,1314,1314,1314,998,1058,1080,981,981,981,981,981,981,1583,866,1019,1019,1019,1019,470,470,470,470,1076,1076,1080,1080,1080,1080,1080,1020,1084,1076,1076,1076,1076,927,1076,927,1185,981,1185,981,1185,981,1092,866,1092,866,1092,866,1092,866,1260,1164,1279,1130,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1292,964,1292,964,1292,964,1292,964,1276,1076,1344,1091,516,470,516,470,516,470,516,470,516,470,1170,960,653,490,1064,931,931,861,470,861,470,866,540,1118,765,880,507,1322,1076,1322,1076,1322,1076,1186,1287,1076,1356,1080,1356,1080,1356,1080,1775,1740,1112,714,1112,714,1112,714,941,801,941,801,941,801,941,801,998,686,998,708,998,700,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1822,1464,998,927,998,959,809,959,809,959,809,497,1130,1260,1101,1076,1088,1076,1122,1181,947,1279,1406,1101,1076,1072,1000,1317,970,941,1020,1294,1162,1603,592,550,1064,931,577,948,1801,1322,1100,1356,1428,1184,1583,1342,1252,1076,1112,941,801,939,882,736,1087,686,998,1478,1234,1360,1314,1090,1020,959,809,970,970,970,870,1038,1038,872,801,1076,499,809,1175,667,2219,2069,1885,1539,1351,960,1975,1812,1566,1185,981,516,470,1356,1080,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1019,1185,981,1185,981,1563,1583,1292,1100,1292,964,1064,931,1356,1080,1356,1080,970,970,490,2197,2069,1885,1292,964,1832,1236,1322,1076,1185,981,1563,1583,1359,1084,1185,981,1185,981,1000,1019,1000,1019,516,470,516,470,1356,1080,1356,1080,1112,714,1112,714,1314,1076,1314,1076,941,801,998,686,970,970,1276,1076,1316,1229,1038,1038,1007,844,1185,981,1000,1019,1356,1080,1356,1080,1356,1080,1356,1080,998,927,649,1259,686,490,1683,1682,1185,1092,866,861,998,801,809,916,916,1131,1349,1173,1000,1019,673,576,1290,1076,1129,767,1184,994,981,1076,1076,1076,866,923,1076,1076,1019,1019,1307,866,866,1077,1083,577,1076,1076,1105,925,976,1075,1076,1076,577,562,470,743,761,470,1158,1635,1635,1636,1076,1076,1107,1080,1459,1426,1334,714,714,714,714,714,654,654,920,920,801,490,578,490,650,686,686,1188,1142,1109,925,1464,927,849,809,979,956,955,916,916,916,866,1287,981,1083,1131,1095,650,931,793,1076,916,916,1647,1748,1817,1267,964,1402,1548,1198,1129,1007,1007,1076,1101,745,745,365,502,502,515,651,1007,646,452]],\n [699, [511,511,511,462,462,665,665,1020,1020,1099,1099,809,809,593]],\n [715, [596,593,807,596,598,569,569,462,462,682,682,682,682,780,462,657,639,922,961,682,682,609,350,560,638,665,784,784,784,784,784,682,682,809,1178,857,682,682,682,682,657]],\n [757, [961]],\n [759, [922,548,682,682,682,682,1088,1088,770]],\n [773, [0]],\n [781, [0,0,0,0,0]],\n [787, [0,0,511]],\n [792, [0,0,0,682,0,0,0,0,0,0,0]],\n [805, [0]],\n [809, [0,0,0]],\n [815, [0]],\n [818, [0,0]],\n [822, [0]],\n [825, [0,0,0,0,0,0,0]],\n [835, [0]],\n [838, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [857, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [511,511]],\n [890, [562,866,866,866,548]],\n [900, [649,1012,1185,517,1000,1276,516]],\n [908, [1356]],\n [910, [998,1360,562,1185,1114,851,1156,1000,959,1276,1356,516,1064,1173,1751,1322,1007,1356,1276,1058]],\n [931, [939,998,998,1555,1063,1536,1360,516,998,1162,933,1100,562,1109,1162,1088,914,1072,933,712,1100,1089,562,931,948,1126,919,770,1080,1132,1042,841,1089,793,1109,1334,873,1449,1426,562,1109,1080,1109,1426]],\n [976, [1074,1144,998,1110,998,1339,1668,1239,1356,1080,1092,841,941,888,1117,921,1186,1186,1801,1636,1116,1071,1138,1048,1092,858,1232,1035,1378,1089,969,806,1239,1042,866,490,1356,885,885,1058,1142,1092,1431,1221,1042,1092,1092,1092,1000,1000,1279,880,1121,941,516,516,653,1786,1795,1266,1112,1314,1080,1269,1185,1101,1114,880,1319,1000,1640,970,1314,1314,1112,1251,1751,1276,1356,1273,1058,1092,998,1080,1428,1063,1308,1138,1778,1822,1259,1560,1088,1122,1800,1137,981,1091,981,708,1143,1019,1411,866,1107,1107,950,1045,1385,1095,1080,1066,1076,866,793,927,1278,887,1109,960,1492,1534,1098,1364,962,907,1478,971,1019,1019,1107,708,909,801,470,470,490,1538,1576,1091,950,1107,927,1075,1900,1386,1284,1063,1601,1332,1291,1075,1703,1455,1480,1152,1855,1547,970,846,1536,1449,1356,1073,1208,978]],\n [1143, [978,2140,1861,1356,1180,1900,1602,1900,1386,1092,866,1248,0,0,0,0]],\n [1160, [2018,1944,1358,1119,1088,991,1058,1076,886,725,870,761,1089,927,1714,1472,970,866,1189,1012,1112,950,1130,1003,1292,1095,1316,1137,1457,1240,1848,1521,1323,1135,1092,866,998,793,998,925,998,925,1142,946,1490,1221,1178,1002,1138,960,1138,960,1526,1224,1526,1224,516,1640,1411,1119,975,1294,1057,1276,1095,1276,1108,1138,960,1799,1462,516,1185,981,1185,981,1563,1583,1000,1019,1317,1019,1317,1019,1640,1411,970,866,970,956,1314,1107,1314,1107,1356,1080,1356,1073,1356,1073,1122,907,1080,927,1080,927,1080,927,1138,960,851,708,1560,1364,870,761,1157,945,1063,887,1088,1076,1629,1621,1565,1435,1050,954,1807,1567,1832,1616,1301,1093,1313,1153,970,866,1289,1067]],\n [3647, [1038]],\n [7424, [982,1295,1583,1042,971,1092,1113,831]],\n [7433, [470,551,913,752,1385,1107,1140,971,1193,1192,1320,1740,872,1080,1080,936,975,975,831,1130,1125,1479,1636,990,1550,847,815,801,976,754,990,1104,936,1327,1038,757,1009,743,763,843,680,680,836,859,422,459,736,603,1133,885,885,885,690,728,667,599,788,1093,684,684,741,1067,741,741,696,696,631,631,663,355,663,1110,742,742,590,742,742,741,483,745]],\n [7514, [1110,645,586,702,582,643,869,607,355,502,745,645,702,582,741,869,607,1684,1211,1213,778,1692,1204,1214,850,794,925,783,809,964,772,964,1672,577,617,1128,1243,1220,1076,1105,625,1356,1054,496,1663,1105,1076,714,891,762,925,1005,828,1148,1240,1076,1019,866,866,1019,470,866,563,1240,886,741,590,622,690,631,449,449,663,745,402,426,355,402,485,404,379,548,1110,1110,795,796,772,742,822,560,365,484,745,696,742,742,645,567,660,678,626,742,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1185,981,1114,1076,1114,1076,1114,1076,1092,866,1260,1076,1260,1076,1260,1076,1260,1076,1260,1076,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,941,625,1292,964,1276,1076,1276,1076,1276,1076,1276,1076,1276,1076,516,470,516,470,1064,931,1064,931,1064,931,861,470,861,470,861,470,861,470,1751,1636,1751,1636,1751,1636,1322,1076,1322,1076,1322,1076,1322,1076,1356,1080,1356,1080,1356,1080,1356,1080,1058,1076,1058,1076,1112,714,1112,714,1112,714,1112,714,941,801,941,801,941,801,941,801,941,801,998,686,998,686,998,686,998,686,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1162,925,1162,925,1822,1464,1822,1464,1822,1464,1822,1464,1822,1464,1063,887,1063,887,998,927,959,809,959,809,959,809,1076,686,1464,927,981,497]],\n [7838, [1149]],\n [7840, [1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,516,470,516,470,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1428,1184,1428,1184,1428,1184,1428,1184,1428,1184,1314,1076,1314,1076,1478,1234,1478,1234,1478,1234,1478,1234,1478,1234,998,927,998,927,998,927,998,927]],\n [7936, [1162,1162,1162,1162,1162,1162,1162,1162,1185,1185,1185,1185,1185,1185,1185,1185,933,933,933,933,933,933]],\n [7960, [1000,1000,1213,1213,1213,1217]],\n [7968, [1100,1100,1100,1100,1100,1100,1100,1100,1276,1276,1489,1489,1489,1489,1369,1369,562,562,562,562,562,562,562,562,516,516,729,729,729,729,609,609,1080,1080,1080,1080,1080,1080]],\n [8008, [1356,1356,1548,1541,1525,1522]],\n [8016, [1109,1109,1109,1109,1109,1109,1109,1109]],\n [8025, [998]],\n [8027, [1299]],\n [8029, [1303]],\n [8031, [1183,1426,1426,1426,1426,1426,1426,1426,1426,1360,1360,1549,1553,1522,1522,1433,1433,1162,1162,933,933,1100,1100,562,562,1080,1080,1109,1109,1426,1426]],\n [8064, [1162,1162,1162,1162,1162,1162,1162,1162,1185,1185,1185,1185,1185,1185,1185,1185,1100,1100,1100,1100,1100,1100,1100,1100,1276,1276,1489,1489,1489,1489,1369,1369,1426,1426,1426,1426,1426,1426,1426,1426,1360,1360,1549,1553,1522,1522,1433,1433,1162,1162,1162,1162,1162]],\n [8118, [1162,1162,1185,1185,1185,1185,1185,473]],\n [8127, [473,922,804,1100,1100,1100]],\n [8134, [1100,1100,1000,1000,1276,1276,1276,809,809,804,562,562,562,562]],\n [8150, [562,562,516,516,516,516]],\n [8157, [809,809,804,1109,1109,1109,1109,1042,1042,1109,1109,998,998,998,998,1058,1012,1012,649]],\n [8178, [1426,1426,1426]],\n [8182, [1426,1426,1356,1356,1360,1360,1360,649,473]],\n [8192, [1024,2048,1024,2048,687,512,341,1104,444,409,256,0,0,0,0,0]],\n [8210, [1038,1020,1854,1854,809,1020,511,511,511,511,857,857,857,856,1020,1020,1020]],\n [8230, [1414]],\n [8239, [463,2126]],\n [8243, [820,1188]],\n [8249, [694,694]],\n [8252, [1142,990,1020]],\n [8260, [689]],\n [8286, [548,455]],\n [8304, [801,355]],\n [8308, [731,678,735,657,737,735,746,735,720,444,444,742,801,504,688,685,731,678,735,657,737,735,746,735,720,444,444,631,684,696,742,638,696]],\n [8352, [1262,1092,1092,941,1038,1636,1322,1888,1608,1822,1525,1130,1038,1064,998,2216,1082,1154,1202,1173,941,1092]],\n [8376, [1038,1038]],\n [8413, [2036]],\n [8453, [1569]],\n [8467, [1029]],\n [8470, [2099,1709]],\n [8480, [1452]],\n [8482, [1444]],\n [8486, [1360]],\n [8494, [1513]],\n [8498, [941]],\n [8525, [1569,750]],\n [8531, [1385,1481,1385,1481,1463,1485,1326,1405,1363,1442,1442,1322,787]],\n [8579, [1092,866]],\n [8592, [1854,1854,1854,1854,2638,1592,1806,1806,1806,1806]],\n [8616, [967]],\n [8706, [1091]],\n [8710, [1156]],\n [8719, [1637]],\n [8721, [1108,1020]],\n [8725, [689]],\n [8730, [1020]],\n [8734, [1747,1400]],\n [8745, [1437]],\n [8747, [749]],\n [8776, [1020]],\n [8800, [1020,1020]],\n [8804, [1020,1020]],\n [8962, [1793]],\n [8976, [1020]],\n [8992, [1106,1106]],\n [9312, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9450, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9471, [2720,1024]],\n [9474, [1024]],\n [9484, [1024]],\n [9488, [1024]],\n [9492, [1024]],\n [9496, [1024]],\n [9633, [1237]],\n [9642, [725,725]],\n [9674, [1046,1126,1217]],\n [9679, [1237]],\n [9702, [725]],\n [9728, [1500]],\n [9788, [1500]],\n [9833, [0]],\n [10102, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [11360, [861,577,962,1075,1112,981,686,1316,1123,1137,987,994,836]],\n [11380, [962,949,793,1339]],\n [11799, [627]],\n [42775, [807,807,804,682]],\n [42784, [1810,1810]],\n [63743, [1522]],\n [64256, [1195,1084,1084,1654,1654]],\n [65056, [0,0,0,0]],\n [65279, [0]]\n ]\n}\n", kt = [
639
+ "Arial",
640
+ "Arial Black",
641
+ "Brush Script MT",
642
+ "Calibri",
643
+ "Comic Sans MS",
644
+ "Courier New",
645
+ "Garamond",
646
+ "Georgia",
647
+ "Impact",
648
+ "Luminari",
649
+ "Palatino Linotype",
650
+ "Tahoma",
651
+ "Times New Roman",
652
+ "Trebuchet MS",
653
+ "Verdana"
654
+ ], At = /* @__PURE__ */ new Map([
655
+ [D.GenericName.Serif, ["Tahoma"]],
656
+ [D.GenericName.SanSerif, ["Calibri"]],
657
+ [D.GenericName.MonoSpace, ["Courier New"]],
658
+ [D.GenericName.Cursive, ["Comic Sans MS"]],
659
+ [D.GenericName.Fantasy, ["Luminari"]],
660
+ [D.GenericName.UISystem, ["Arial"]],
661
+ [D.GenericName.UISerif, ["Tahoma"]],
662
+ [D.GenericName.UISanSerif, ["Arial"]],
663
+ [D.GenericName.UIMonoSpace, ["Courier New"]],
664
+ [D.GenericName.UIRounded, ["Arial"]],
665
+ [D.GenericName.Math, []],
666
+ [D.GenericName.Emoji, []],
667
+ [D.GenericName.Fangsong, []]
668
+ ]), jt = /* @__PURE__ */ new Map([
669
+ ["aptos", "calibri"],
670
+ ["aptos narrow", "calibri"],
671
+ ["aptos display", "calibri"],
672
+ ["carlito", "calibri"],
673
+ ["caladea", "cambria"],
674
+ ["helvetica", "arial"],
675
+ ["helvetica neue", "arial"],
676
+ ["arial nova", "arial"],
677
+ ["liberation sans", "arial"],
678
+ ["arimo", "arial"],
679
+ ["times", "times new roman"],
680
+ ["liberation serif", "times new roman"],
681
+ ["tinos", "times new roman"],
682
+ ["courier", "courier new"],
683
+ ["liberation mono", "courier new"],
684
+ ["cousine", "courier new"],
685
+ ["sans-serif", "calibri"],
686
+ ["serif", "times new roman"],
687
+ ["monospace", "courier new"],
688
+ ["system-ui", "arial"],
689
+ ["ui-system", "arial"],
690
+ ["ui-sans-serif", "arial"],
691
+ ["ui-rounded", "arial"],
692
+ ["ui-serif", "times new roman"],
693
+ ["ui-monospace", "courier new"]
694
+ ]), Mt = /* @__PURE__ */ new Set([
695
+ "serif",
696
+ "sans-serif",
697
+ "monospace",
698
+ "cursive",
699
+ "fantasy",
700
+ "system-ui",
701
+ "ui-system",
702
+ "ui-serif",
703
+ "ui-sans-serif",
704
+ "ui-monospace",
705
+ "ui-rounded",
706
+ "math",
707
+ "emoji",
708
+ "fangsong"
709
+ ]), q = (e) => e.trim().replace(/\s+/g, " ").toLowerCase(), J = (e, t, n) => `${q(e)}|${t ? "b" : ""}${n ? "i" : ""}`, Nt = eval, Pt = (e) => {
710
+ try {
711
+ return Nt(`document.fonts.check('12px ${e}')`);
712
+ } catch {
713
+ return !0;
714
+ }
715
+ }, Ft = class e {
716
+ static {
717
+ this._shared = null;
718
+ }
719
+ static getShared() {
720
+ return e._shared ??= new e([new wt()]), e._shared;
721
+ }
722
+ constructor(e) {
723
+ this._entries = /* @__PURE__ */ new Map(), this._resolutions = /* @__PURE__ */ new Map(), this._loading = /* @__PURE__ */ new Set(), this._builtins = /* @__PURE__ */ new Map(), this._fontList = [], this._fontsByFamily = /* @__PURE__ */ new Map(), this._bestMatches = /* @__PURE__ */ new Map(), this._builders = e, this._emitter = new y(this), this._seedBuiltins(), this.setFontList(null);
724
+ }
725
+ getByName(e, t) {
726
+ let n = t?.bold ?? !1, r = t?.italic ?? !1, i = J(e, n, r), a = this._resolutions.get(i);
727
+ if (a) return a;
728
+ let o = this._resolve(e, n, r);
729
+ return this._resolutions.set(i, o), o;
730
+ }
731
+ load(e) {
732
+ let t = e.map((e) => {
733
+ let t = typeof e == "string" ? { family: e } : e, n = q(t.family);
734
+ return Mt.has(n) ? void 0 : this._ensure(n, t.bold ?? !1, t.italic ?? !1).done;
735
+ });
736
+ return Promise.all(t).then(() => {});
737
+ }
738
+ async whenReady() {
739
+ for (; this._loading.size > 0;) await Promise.all(this._loading);
740
+ }
741
+ isLoading() {
742
+ return this._loading.size > 0;
743
+ }
744
+ setAdvanceBuilders(e) {
745
+ this._builders = e, this._entries.clear(), this._seedBuiltins(), this._changed();
746
+ }
747
+ getFontList() {
748
+ return this._fontList;
749
+ }
750
+ setFontList(e) {
751
+ let t = [];
752
+ this._fontsByFamily.clear(), this._bestMatches.clear();
753
+ for (let n of e ?? kt) {
754
+ let e = typeof n == "string" ? new yt(n) : n, r = {
755
+ fontRef: e,
756
+ loaded: Pt(e.getFamily())
757
+ };
758
+ t.push(r), this._fontsByFamily.set(e.getFamily(), r);
759
+ }
760
+ this._fontList = Object.freeze(t);
761
+ }
762
+ findBestMatch(e, t) {
763
+ let n = this._bestMatches.get(e);
764
+ if (n) return n.fontRef ? n : null;
765
+ let r = null;
766
+ for (let n of [e, ...t?.fallbacks ?? []]) {
767
+ r = this._fontsByFamily.get(n) ?? null;
768
+ for (let e of r ? [] : At.get(n) ?? []) if (r = this._fontsByFamily.get(e) ?? null, r) break;
769
+ if (r) break;
770
+ }
771
+ return this._bestMatches.set(e, r ?? {
772
+ fontRef: null,
773
+ loaded: !1
774
+ }), r;
775
+ }
776
+ addListeners(e, t) {
777
+ return this._emitter.addListeners(e, t);
778
+ }
779
+ get isIFontCollection() {
780
+ return !0;
781
+ }
782
+ _seedBuiltins() {
783
+ this._builtins = /* @__PURE__ */ new Map();
784
+ for (let e of [
785
+ Ot,
786
+ Dt,
787
+ Et,
788
+ Tt
789
+ ].map((e) => xt.fromJSON(JSON.parse(e)))) {
790
+ let t = J(e.family, e.weight >= 700, e.italic);
791
+ this._builtins.set(t, e), this._entries.set(t, {
792
+ state: "loaded",
793
+ table: e,
794
+ kind: "table",
795
+ done: Promise.resolve()
796
+ });
797
+ }
798
+ }
799
+ _resolve(e, t, n) {
800
+ let r = {
801
+ family: e,
802
+ weight: t ? 700 : 400,
803
+ italic: n
804
+ }, i = q(e), a = Mt.has(i) ? void 0 : this._ensure(i, t, n);
805
+ if (a?.state === "loaded") return {
806
+ table: a.table,
807
+ kind: a.kind,
808
+ status: "loaded",
809
+ requested: r
810
+ };
811
+ let o = a?.state === "loading", s = jt.get(i);
812
+ if (s) {
813
+ let e = this._ensure(s, t, n);
814
+ if (e.state === "loaded") return {
815
+ table: e.table,
816
+ kind: "classified",
817
+ status: o ? "loading" : "loaded",
818
+ requested: r
819
+ };
820
+ o ||= e.state === "loading";
821
+ }
822
+ let c = s === "arial" || i === "arial" ? "arial" : "calibri";
823
+ return {
824
+ table: this._builtins.get(J(c, t, !1)),
825
+ kind: "generic",
826
+ status: o ? "loading" : a?.state === "error" ? "error" : "loaded",
827
+ requested: r
828
+ };
829
+ }
830
+ _ensure(e, t, n) {
831
+ let r = J(e, t, n), i = this._entries.get(r);
832
+ if (i) return i;
833
+ let a = {
834
+ state: "loading",
835
+ done: Promise.resolve()
836
+ }, o = {
837
+ family: e,
838
+ weight: t ? 700 : 400,
839
+ italic: n
840
+ }, s = this._builders, c = (async () => {
841
+ try {
842
+ for (let e of s) {
843
+ let t = await e.build(o);
844
+ if (t) return a.table = t, a.kind = e.kind, void (a.state = "loaded");
845
+ }
846
+ a.state = "missing";
847
+ } catch {
848
+ a.state = "error";
849
+ }
850
+ })().finally(() => {
851
+ this._loading.delete(c), this._entries.get(r) === a && this._changed();
852
+ });
853
+ return a.done = c, this._entries.set(r, a), this._loading.add(c), a;
854
+ }
855
+ _changed() {
856
+ this._resolutions.clear(), this._emitter.notify("onCollectionChange");
857
+ }
858
+ };
859
+ (K = G ||= {}).getShared = function() {
860
+ return Ft.getShared();
861
+ }, K.ResolutionKind = {
862
+ Table: "table",
863
+ Exact: "exact",
864
+ Classified: "classified",
865
+ Generic: "generic"
866
+ }, K.FontStatus = {
867
+ Loading: "loading",
868
+ Loaded: "loaded",
869
+ Error: "error"
870
+ };
871
+ var It = _({
872
+ DefaultFontSizes: () => Lt,
873
+ findNextFontSize: () => Rt
874
+ }), Lt = Object.freeze([
875
+ 8,
876
+ 9,
877
+ 10,
878
+ 11,
879
+ 12,
880
+ 14,
881
+ 16,
882
+ 18,
883
+ 20,
884
+ 22,
885
+ 24,
886
+ 26,
887
+ 28,
888
+ 30,
889
+ 36,
890
+ 48,
891
+ 72
892
+ ]);
893
+ function Rt(e, t = !0, n = Lt) {
894
+ if (!n || n.length === 0) return e;
895
+ if (e === void 0) return n[0];
896
+ if (t && e >= n[n.length - 1] || !t && e <= n[0]) return e;
897
+ let r = a.findEqualOrGreater(n, e);
898
+ return t ? (n[r] === e && (r += 1), n[r] || --r, n[r]) : (--r, n[r]);
899
+ }
900
+ (Ct ||= {}).SortOn = {
901
+ Value: "value",
902
+ FillColor: "fillColor",
903
+ FontColor: "fontColor",
904
+ Icon: "icon"
905
+ };
906
+ var zt, Bt, Vt, Ht, Ut = {
907
+ TopLeft: "tl",
908
+ Top: "t",
909
+ TopRight: "tr",
910
+ Left: "l",
911
+ Center: "ctr",
912
+ Right: "r",
913
+ BottomLeft: "bl",
914
+ Bottom: "b",
915
+ BottomRight: "br"
916
+ }, Y = ee.BuiltInName, Wt = {
917
+ [Y.Normal]: l("style.builtin.normal"),
918
+ [Y.Comma]: l("style.builtin.comma"),
919
+ [Y.Currency]: l("style.builtin.currency"),
920
+ [Y.Percent]: l("style.builtin.percent"),
921
+ [Y.Comma0]: l("style.builtin.comma0"),
922
+ [Y.Currency0]: l("style.builtin.currency0"),
923
+ [Y.Hyperlink]: l("style.builtin.hyperlink"),
924
+ [Y.FollowedHyperlink]: l("style.builtin.followedHyperlink"),
925
+ [Y.Note]: l("style.builtin.note"),
926
+ [Y.WarningText]: l("style.builtin.warningText"),
927
+ [Y.Title]: l("style.builtin.title"),
928
+ [Y.Input]: l("style.builtin.input"),
929
+ [Y.Output]: l("style.builtin.output"),
930
+ [Y.Calculation]: l("style.builtin.calculation"),
931
+ [Y.CheckCell]: l("style.builtin.checkCell"),
932
+ [Y.LinkedCell]: l("style.builtin.linkedCell"),
933
+ [Y.Total]: l("style.builtin.total"),
934
+ [Y.Good]: l("style.builtin.good"),
935
+ [Y.Bad]: l("style.builtin.bad"),
936
+ [Y.Neutral]: l("style.builtin.neutral"),
937
+ [Y.ExplanatoryText]: l("style.builtin.explanatoryText")
938
+ }, Gt = l("style.builtin.heading"), Kt = l("style.builtin.accent"), qt = l("style.builtin.accentTint"), Jt = /^Heading ([1-4])$/, Yt = /^Accent([1-6])$/, Xt = /^(20|40|60)% - Accent([1-6])$/;
939
+ function Zt(e) {
940
+ let t = Wt[e];
941
+ if (t) return { key: t };
942
+ let n = Jt.exec(e);
943
+ return n ? {
944
+ key: Gt,
945
+ params: { n: +n[1] }
946
+ } : (n = Yt.exec(e), n ? {
947
+ key: Kt,
948
+ params: { n: +n[1] }
949
+ } : (n = Xt.exec(e), n ? {
950
+ key: qt,
951
+ params: {
952
+ pct: +n[1],
953
+ n: +n[2]
954
+ }
955
+ } : null));
956
+ }
957
+ var Qt = (e, t, n, r, i) => {
958
+ let a = JSON.parse(JSON.stringify(e.definition));
959
+ a.adjs ||= [];
960
+ let o = "", s = 0, c = 0;
961
+ t > 0 ? (c = t, s = 100 - t, o = d("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = d("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [ie.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [ie.AdjustmentType.LumOff]: c });
962
+ let l = new w({
963
+ val: a.val,
964
+ adjs: a.adjs
965
+ }, n), u = l.toString();
966
+ r?.set(u, l);
967
+ let f = l.toRGBA().toString();
968
+ return i?.set(f, l), {
969
+ description: e.description + ", " + o,
970
+ definition: a
971
+ };
972
+ };
973
+ function $t(e) {
974
+ let t, n = e.trim();
975
+ if (!n) return;
976
+ try {
977
+ let e = Ue.shared().tokenize(n, !1);
978
+ if (e.errors.length > 0) return;
979
+ t = e.tokens;
980
+ } catch {
981
+ return;
982
+ }
983
+ let r = 0, i = 0;
984
+ if (t.length === 2) {
985
+ let e = t[0].tokenType?.name;
986
+ e === "MinOp" ? (r = -1, i = 1) : e === "PlusOp" && (r = 1, i = 1);
987
+ }
988
+ if (t.length - i !== 1) return;
989
+ let a = t[i], o = a.image;
990
+ try {
991
+ switch (a.tokenType?.name) {
992
+ case "NumberToken":
993
+ case "ScientificDigit":
994
+ case "DigitToken": {
995
+ let e = be(o).value;
996
+ return r === 0 ? e : r * e;
997
+ }
998
+ case "StringToken": return r === 0 ? we(o).value : void 0;
999
+ case "BooleanToken": return r === 0 ? Ce(o).value : void 0;
1000
+ case "LiteralError":
1001
+ case "RefError": return r === 0 ? Re(o).value : void 0;
1002
+ default: return;
1003
+ }
1004
+ } catch {
1005
+ return;
1006
+ }
1007
+ }
1008
+ function en(e, t) {
1009
+ let n = tn(e), r = tn(t);
1010
+ return n === r ? e === t ? 0 : typeof e == "number" && typeof t == "number" ? e < t ? -1 : 1 : typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : typeof e == "boolean" ? e ? 1 : -1 : k.isError(e) && k.isError(t) ? e.getCode() - t.getCode() : 0 : n - r;
1011
+ }
1012
+ function tn(e) {
1013
+ if (e === null) return 0;
1014
+ switch (typeof e) {
1015
+ case "number": return 1;
1016
+ case "string": return 2;
1017
+ case "boolean": return 3;
1018
+ default: return k.isError(e) ? 4 : 5;
1019
+ }
1020
+ }
1021
+ (zt ||= {}).buildPalette = function(e, t, n, r) {
1022
+ let i = [];
1023
+ for (let a = 0; a < e.length; a++) {
1024
+ let o = [];
1025
+ i.push(o);
1026
+ let s = (i) => {
1027
+ for (let s = 0; s < i.length; s++) o.push(Qt(e[a], i[s], t, n, r));
1028
+ }, c = new w({
1029
+ val: e[a].definition.val,
1030
+ adjs: e[a].definition.adjs
1031
+ }, t).toHSLA().lum;
1032
+ s(c === 0 ? [
1033
+ 50,
1034
+ 35,
1035
+ 25,
1036
+ 15,
1037
+ 5
1038
+ ] : c === 100 ? [
1039
+ -5,
1040
+ -15,
1041
+ -25,
1042
+ -35,
1043
+ -50
1044
+ ] : c <= 20 ? [
1045
+ 90,
1046
+ 75,
1047
+ 50,
1048
+ 25,
1049
+ 10
1050
+ ] : c >= 80 ? [
1051
+ -10,
1052
+ -25,
1053
+ -50,
1054
+ -75,
1055
+ -90
1056
+ ] : [
1057
+ 80,
1058
+ 60,
1059
+ 40,
1060
+ -25,
1061
+ -50
1062
+ ]);
1063
+ }
1064
+ return i;
1065
+ }, Bt ||= {}, Vt ||= {}, Ht ||= {};
1066
+ var nn = class {
1067
+ constructor(e) {
1068
+ this._children = e;
1069
+ }
1070
+ getCoords() {
1071
+ let e = this._children, t = null;
1072
+ for (let n = 0; n < e.length; n++) {
1073
+ let r = e[n].getCoords();
1074
+ r && (t = t ? {
1075
+ rowStart: Math.min(t.rowStart, r.rowStart),
1076
+ colStart: Math.min(t.colStart, r.colStart),
1077
+ rowEnd: Math.max(t.rowEnd, r.rowEnd),
1078
+ colEnd: Math.max(t.colEnd, r.colEnd)
1079
+ } : r);
1080
+ }
1081
+ return t;
1082
+ }
1083
+ getSize() {
1084
+ let e = this._children, t = e.length, n = 0;
1085
+ for (let r = 0; r < t; r++) n += e[r].getSize();
1086
+ return n;
1087
+ }
1088
+ getCount() {
1089
+ let e = this._children, t = e.length, n = 0;
1090
+ for (let r = 0; r < t; r++) n += e[r].getCount();
1091
+ return n;
1092
+ }
1093
+ getAggregates(e) {
1094
+ if (e) return this._mergeAggregates(e);
1095
+ let t = this._aggregates;
1096
+ return t || (t = this._mergeAggregates(), this._aggregates = t), t;
1097
+ }
1098
+ getSnappedSum(e) {
1099
+ let t = e ?? this.getAggregates().sum ?? 0, n = this._children;
1100
+ for (let e = n.length - 1; e >= 0; e--) if (n[e].getAggregates().numericalCount > 0) return n[e].getSnappedSum(t);
1101
+ return t;
1102
+ }
1103
+ getSortedNumbers() {
1104
+ let e = this._sortedNumbers;
1105
+ if (!e) {
1106
+ let t = this._children, n = t.length, r = [];
1107
+ for (let e = 0; e < n; e++) {
1108
+ let n = t[e].getSortedNumbers().getValues();
1109
+ n.length > 0 && r.push(n);
1110
+ }
1111
+ e = new Te(function(e) {
1112
+ let t = e.length;
1113
+ if (t === 0) return rn;
1114
+ if (t === 1) return e[0];
1115
+ let n = e[0];
1116
+ for (let r = 1; r < t; r++) n = an(n, e[r]);
1117
+ return Object.freeze(n);
1118
+ }(r)), this._sortedNumbers = e;
1119
+ }
1120
+ return e;
1121
+ }
1122
+ getRanked(e) {
1123
+ return Ie(this._children, e, en)[Symbol.iterator]();
1124
+ }
1125
+ getFrequencies(e) {
1126
+ if (e) return this._mergeFrequencies(e);
1127
+ let t = this._frequencies;
1128
+ return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
1129
+ }
1130
+ _mergeFrequencies(e) {
1131
+ let t = e?.keyFn ?? at, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
1132
+ for (let l = 0; l < a; l++) {
1133
+ let a = i[l].getFrequencies(e);
1134
+ o += a.getVisitedCount(), s += a.getTotalCount(), c ||= a.isTruncated();
1135
+ let u = a.getValueCounts(), d = u.next();
1136
+ for (; !d.done;) {
1137
+ let [e, i] = d.value, a = t(e), o = r.get(a);
1138
+ o ? o.count += i : n === void 0 || r.size < n ? r.set(a, {
1139
+ value: e,
1140
+ count: i
1141
+ }) : c = !0, d = u.next();
1142
+ }
1143
+ }
1144
+ return ve.fromGroups(r, t, e, en, o, s, c);
1145
+ }
1146
+ getTypedCounts(e) {
1147
+ let t = this._typedCounts;
1148
+ if (!t) {
1149
+ let e = {
1150
+ [A.Number]: 0,
1151
+ [A.String]: 0,
1152
+ [A.Boolean]: 0,
1153
+ [A.Error]: 0,
1154
+ [A.RichData]: 0,
1155
+ [A.Null]: 0
1156
+ }, n = this._children, r = n.length;
1157
+ for (let t = 0; t < r; t++) {
1158
+ let r = n[t].getTypedCounts();
1159
+ e[A.Number] += r[A.Number] ?? 0, e[A.String] += r[A.String] ?? 0, e[A.Boolean] += r[A.Boolean] ?? 0, e[A.Error] += r[A.Error] ?? 0, e[A.RichData] += r[A.RichData] ?? 0, e[A.Null] += r[A.Null] ?? 0;
1160
+ }
1161
+ t = Object.freeze(e), this._typedCounts = t;
1162
+ }
1163
+ if (e === void 0) return t;
1164
+ let n = {}, r = e.length;
1165
+ for (let i = 0; i < r; i++) n[e[i]] = t[e[i]] ?? 0;
1166
+ return n;
1167
+ }
1168
+ get isIRangeStats() {
1169
+ return !0;
1170
+ }
1171
+ _mergeAggregates(e) {
1172
+ let t = this._children, n = t.length, r = {
1173
+ count: 0,
1174
+ min: void 0,
1175
+ max: void 0,
1176
+ numericalCount: 0,
1177
+ sum: 0,
1178
+ sumSq: 0,
1179
+ typed: {
1180
+ [A.Number]: 0,
1181
+ [A.String]: 0,
1182
+ [A.Boolean]: 0,
1183
+ [A.Error]: 0,
1184
+ [A.RichData]: 0,
1185
+ [A.Null]: 0
1186
+ }
1187
+ };
1188
+ for (let i = 0; i < n; i++) {
1189
+ let n = t[i].getAggregates(e);
1190
+ r.count += n.count;
1191
+ let a = n.numericalCount;
1192
+ a <= 0 || (r.numericalCount += a, r.sum += n.sum, r.sumSq += n.varP * a + n.sum * n.sum / a, (r.min === void 0 || n.min < r.min) && (r.min = n.min), (r.max === void 0 || n.max > r.max) && (r.max = n.max));
1193
+ }
1194
+ return it(r);
1195
+ }
1196
+ }, rn = Object.freeze([]);
1197
+ function an(e, t) {
1198
+ let n = e.length, r = t.length, i = Array(n + r), a = 0, o = 0, s = 0;
1199
+ for (; a < n && o < r;) i[s++] = e[a] <= t[o] ? e[a++] : t[o++];
1200
+ for (; a < n;) i[s++] = e[a++];
1201
+ for (; o < r;) i[s++] = t[o++];
1202
+ return i;
1203
+ }
1204
+ var on = class {
1205
+ constructor(e, t) {
1206
+ this._source = null, this.cacheId = e, this.part = t;
1207
+ }
1208
+ _hold(e) {
1209
+ let t = this.part?.xml;
1210
+ if (!t || this._source) return;
1211
+ let n = Me(t, "worksheetSource", "ref"), r = Me(t, "worksheetSource", "sheet");
1212
+ if (!n || !r || n.includes("#REF!")) return;
1213
+ let i = e(r);
1214
+ if (!i) return;
1215
+ let a = {
1216
+ formula: null,
1217
+ wired: null,
1218
+ last: null
1219
+ };
1220
+ this._source = a, i(`${We(r)}!${Be(n)}`, (e) => {
1221
+ a.formula = e.formula;
1222
+ let t = e.formula.getExpression();
1223
+ a.wired ??= t, e.formula.hasRefError() || (a.last = t);
1224
+ });
1225
+ }
1226
+ getXML() {
1227
+ let e = this.part?.xml ?? null, t = this._source;
1228
+ if (!e || !t?.formula) return e;
1229
+ let n = t.formula.hasRefError() ? t.last : t.formula.getExpression();
1230
+ if (n === null || n === t.wired) return e;
1231
+ let r = Ve(n);
1232
+ return r ? M(M(e, "worksheetSource", "ref", Le(r.reference)), "worksheetSource", "sheet", r.sheet) : M(e, "worksheetSource", "ref", Le(n));
1233
+ }
1234
+ toJSON(e) {
1235
+ let t = { cacheId: this.cacheId }, n = Fe.toJSON(this.part, e);
1236
+ if (n) {
1237
+ let e = this.getXML();
1238
+ e !== null && (n.xml = e), t.part = n;
1239
+ }
1240
+ return t;
1241
+ }
1242
+ }, sn = class {
1243
+ constructor(e, t) {
1244
+ this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
1245
+ }
1246
+ getId() {
1247
+ return this._json.id;
1248
+ }
1249
+ getDisplayName() {
1250
+ return this._json.displayName;
1251
+ }
1252
+ getUserId() {
1253
+ return this._json.userId ?? null;
1254
+ }
1255
+ getProviderId() {
1256
+ return this._json.providerId ?? null;
1257
+ }
1258
+ delete() {
1259
+ this._deleted || (this._deleted = !0, this._deleteFromCollection?.(this));
1260
+ }
1261
+ isDeleted() {
1262
+ return this._deleted;
1263
+ }
1264
+ toJSON() {
1265
+ return { ...this._json };
1266
+ }
1267
+ get [Symbol.toStringTag]() {
1268
+ return "[Person]";
1269
+ }
1270
+ toString() {
1271
+ return `Person:${this.getDisplayName()}`;
1272
+ }
1273
+ get isIPerson() {
1274
+ return !0;
1275
+ }
1276
+ }, cn = class extends ue {
1277
+ constructor(e) {
1278
+ super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
1279
+ }
1280
+ _getItems() {
1281
+ return this._items ??= Array.from(this._byId.values());
1282
+ }
1283
+ getCount() {
1284
+ return this._byId.size;
1285
+ }
1286
+ add(e) {
1287
+ let t = typeof e == "string" ? { displayName: e } : e, n = t.id;
1288
+ if (n) {
1289
+ let e = this._byId.get(n);
1290
+ if (e) return e;
1291
+ }
1292
+ let r = t.displayName ?? "";
1293
+ if (!n) {
1294
+ let e = this._byDisplayName.get(r);
1295
+ if (e) return e;
1296
+ }
1297
+ let i = new sn({
1298
+ ...t,
1299
+ displayName: r,
1300
+ id: n ?? a.uuidV4().toUpperCase()
1301
+ }, (e) => this._remove(e));
1302
+ return this._byId.set(i.getId(), i), r && !this._byDisplayName.has(r) && this._byDisplayName.set(r, i), this._items = null, this._notifyCollectionChange(), i;
1303
+ }
1304
+ getById(e) {
1305
+ return typeof e == "string" ? this._byId.get(e) ?? null : null;
1306
+ }
1307
+ getByDisplayName(e) {
1308
+ return typeof e == "string" ? this._byDisplayName.get(e) ?? null : null;
1309
+ }
1310
+ getCurrent() {
1311
+ return this._current ??= this.add("Author");
1312
+ }
1313
+ setCurrent(e) {
1314
+ if (e !== null) {
1315
+ if (typeof e == "object" && e.isIPerson) {
1316
+ let t = e;
1317
+ this._current = this.getById(t.getId()) ?? this.add(t.toJSON());
1318
+ return;
1319
+ }
1320
+ this._current = this.add(e);
1321
+ } else this._current = null;
1322
+ }
1323
+ _remove(e) {
1324
+ this._byId.get(e.getId()) === e && (this._byId.delete(e.getId()), this._byDisplayName.get(e.getDisplayName()) === e && this._byDisplayName.delete(e.getDisplayName()), this._current === e && (this._current = null), this._items = null, this._notifyCollectionChange());
1325
+ }
1326
+ toJSON() {
1327
+ return this._byId.size === 0 ? null : this._getItems().map((e) => e.toJSON());
1328
+ }
1329
+ fromJSON(e) {
1330
+ if (!e) return;
1331
+ let t = e.length;
1332
+ for (let n = 0; n < t; n++) {
1333
+ let t = e[n];
1334
+ t && typeof t.id == "string" && this.add(t);
1335
+ }
1336
+ }
1337
+ get isIPersonCollection() {
1338
+ return !0;
1339
+ }
1340
+ }, ln = class {
1341
+ constructor(e) {
1342
+ this._options = e, this._emitter = new y(this), this._initState();
1343
+ }
1344
+ _initState() {}
1345
+ getModules() {
1346
+ return this._modules;
1347
+ }
1348
+ _builtInNames() {
1349
+ try {
1350
+ let e = this._options.getBuiltInFunctions?.();
1351
+ if (!e) return a.EmptyArray;
1352
+ let t = [];
1353
+ for (let n of e.getItems({ includeHidden: !0 })) n.isBuiltIn() && t.push(n.getName());
1354
+ return t;
1355
+ } catch {
1356
+ return a.EmptyArray;
1357
+ }
1358
+ }
1359
+ async createModule(e) {
1360
+ let t = await (await import("./B_HB4y7AA88Z775Z.mjs").then((e) => e.n)).ScriptCompiler.compile({
1361
+ builtInNames: this._builtInNames(),
1362
+ minify: !0,
1363
+ ...e
1364
+ });
1365
+ return t.module ? await j(tt.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
1366
+ }
1367
+ addModule(e, t, n) {
1368
+ this._modules.add(e, t, n);
1369
+ }
1370
+ async addModuleFromJSON(e, t, n) {
1371
+ let r = await j(e, t);
1372
+ return this.addModule(e, r, n), r;
1373
+ }
1374
+ executeMacro(e, t, n) {
1375
+ let r = this._modules.getItems({ name: t }), i = r.length;
1376
+ for (let t = 0; t < i; t++) {
1377
+ let i = r[t].getFunctions().getByName(e);
1378
+ if (i) return i.execute(this._options.workbook, {
1379
+ applyResult: !0,
1380
+ ...n
1381
+ });
1382
+ }
1383
+ throw Error(`No macro ${e} found.`);
1384
+ }
1385
+ async run(e, t) {
1386
+ try {
1387
+ let n = typeof e == "string" ? await this.createModule({ source: e }) : await j(tt.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
1388
+ return await this._runModule(n, r, t);
1389
+ } catch (e) {
1390
+ return {
1391
+ ok: !1,
1392
+ error: e
1393
+ };
1394
+ }
1395
+ }
1396
+ async _runModule(e, t, n) {
1397
+ let r = this._options?.workbook;
1398
+ if (!e) return {
1399
+ ok: !1,
1400
+ error: Error("The script did not compile to a module.")
1401
+ };
1402
+ let i = e.getDiagnostics(), a = i.filter((e) => e.severity === "error");
1403
+ if (a.length > 0) {
1404
+ let e = Error(((e, t) => {
1405
+ let n = [0];
1406
+ for (let t = 0; t < e.length; t++) e[t] === "\n" && n.push(t + 1);
1407
+ let r = t.map((e) => ` ${((e) => {
1408
+ let t = 0, r = n.length - 1;
1409
+ for (; t < r;) {
1410
+ let i = t + r + 1 >> 1;
1411
+ n[i] <= e ? t = i : r = i - 1;
1412
+ }
1413
+ return `${t + 1}:${e - n[t] + 1}`;
1414
+ })(e.start)} ${e.code}: ${e.message}`), i = t.length;
1415
+ return `Script has ${i} compile error${i === 1 ? "" : "s"}:\n${r.join("\n")}`;
1416
+ })(t, a));
1417
+ return e.diagnostics = a, {
1418
+ ok: !1,
1419
+ error: e,
1420
+ diagnostics: i
1421
+ };
1422
+ }
1423
+ let o = e.getFunctions(), s = o.getItems({
1424
+ type: "autoRun",
1425
+ includeHidden: !0
1426
+ })[0] ?? o.getItems({
1427
+ type: "macro",
1428
+ includeHidden: !0
1429
+ })[0] ?? null;
1430
+ if (!s) return {
1431
+ ok: !1,
1432
+ error: Error("The script has no runnable entry. Export a default function taking the script context, e.g. `export default function run(ctx: IScript.ScriptContext) { ... }` (the workbook is `ctx.wb`; a macro may instead take its target first, e.g. `(sheet: ISheet, ctx)`).")
1433
+ };
1434
+ let c = await s.execute(r, n);
1435
+ return {
1436
+ ok: !0,
1437
+ result: c?.results,
1438
+ commitId: c?.commitId,
1439
+ diagnostics: i
1440
+ };
1441
+ }
1442
+ _searchable(e) {
1443
+ let t = this._modules;
1444
+ return t && t.getCount() !== 0 ? (e ? t.getItems({ name: e }) : t.getItems()).map((e) => e.getFunctions()) : a.EmptyArray;
1445
+ }
1446
+ async searchFunctions(e) {
1447
+ await this._emitter.notify("onBeforeSearch", { async: !0 });
1448
+ let t = this._searchable(e?.moduleName);
1449
+ if (t.length === 0) return a.EmptyArray;
1450
+ if (t.length === 1) return t[0].search(e);
1451
+ let n, r = e?.limit, i = r === void 0 ? e : {
1452
+ ...e,
1453
+ limit: void 0
1454
+ }, o = /* @__PURE__ */ new Set();
1455
+ for (let e = 0; e < t.length; e++) {
1456
+ let r = await t[e].search(i);
1457
+ if (r.length !== 0) {
1458
+ n ||= [];
1459
+ for (let e = 0; e < r.length; e++) {
1460
+ let t = r[e], i = t.getName().toUpperCase();
1461
+ o.has(i) || (o.add(i), n.push(t));
1462
+ }
1463
+ }
1464
+ }
1465
+ if (!n || n.length === 0) return a.EmptyArray;
1466
+ let s = e?.text ? e.text.trim().toUpperCase() : null;
1467
+ return s ? Ae(n, s) : n.sort((e, t) => {
1468
+ let n = e.getName().toUpperCase(), r = t.getName().toUpperCase();
1469
+ return n < r ? -1 : +(n > r);
1470
+ }), r !== void 0 && n.length > r ? n.slice(0, r) : n;
1471
+ }
1472
+ async start() {
1473
+ if (!this._modules) return this._startPromise || (this._startPromise = this._doStart(), this._startPromise.catch(() => {
1474
+ this._startPromise = void 0;
1475
+ })), this._startPromise;
1476
+ }
1477
+ async _doStart() {
1478
+ let e = this._options?.workbook, t = this._options?.json, n = {};
1479
+ if (t) {
1480
+ let r = Object.keys(t);
1481
+ for (let i = 0; i < r.length; i++) {
1482
+ let a = r[i], o = t[a];
1483
+ try {
1484
+ n[a] = await j(a, o, !1, [], o?.scope === "workbook" ? e : null);
1485
+ } catch (e) {
1486
+ m.error(`Could not load script '${a}'; it will be unavailable.`, e);
1487
+ }
1488
+ }
1489
+ }
1490
+ let r = this, i = new ke({
1491
+ transactions: this._options?.transactions,
1492
+ initial: n,
1493
+ isReadOnly: () => r.isReadOnly(),
1494
+ onRemove: (e, t) => {
1495
+ r._options?.onRemove?.(e, t);
1496
+ },
1497
+ onAdd: (e, t) => {
1498
+ r._emitter.notify("onChange"), r._options?.onAdd?.(e, t);
1499
+ }
1500
+ });
1501
+ this._modules = i;
1502
+ let o = i.getItems();
1503
+ if (o.length === 0) return Promise.resolve(a.EmptyArray);
1504
+ let s = o.length;
1505
+ for (let t = 0; t < s; t++) {
1506
+ let n = o[t];
1507
+ try {
1508
+ let t = n.getFunctions().getItems({
1509
+ type: "autoRun",
1510
+ includeHidden: !0
1511
+ }), r = t.length;
1512
+ for (let n = 0; n < r; n++) await t[n].execute(e);
1513
+ } catch (e) {
1514
+ m.error("Error executing autoRun script:", e);
1515
+ }
1516
+ }
1517
+ }
1518
+ addListeners(e, t) {
1519
+ return this._emitter.addListeners(e, t);
1520
+ }
1521
+ isReadOnly() {
1522
+ return this._options.workbook?._isStructureProtected?.() ?? !1;
1523
+ }
1524
+ toJSON() {
1525
+ this._emitter.notify("onBeforeSave");
1526
+ let e = this._modules;
1527
+ if (!e) throw Error("Scripts is initializing.");
1528
+ return e.toJSON();
1529
+ }
1530
+ get isIScript() {
1531
+ return !0;
1532
+ }
1533
+ }, un = class {
1534
+ constructor(t, n, r, i) {
1535
+ this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = r, this._topLeft = n ?? e.EmptyCell, this._sheet = new L({
1536
+ runtime: t,
1537
+ styles: this._styles,
1538
+ calcOnLoad: "none",
1539
+ container: {
1540
+ getName: () => i,
1541
+ getIndex: () => 1
1542
+ }
1543
+ }), this._builder = this._sheet.getEntireRange().createSparseBuilder();
1544
+ }
1545
+ applyCSSStyle(e, t) {
1546
+ let n = !1;
1547
+ e.style || (e.style = {}, n = !0);
1548
+ let r = e.style, i = { ...t };
1549
+ if (t.msoIgnore) {
1550
+ let e = t.msoIgnore.split(","), n = Object.keys(i);
1551
+ for (let t = 0; t < n.length; t++) {
1552
+ let r = n[t];
1553
+ e.includes(r) && delete i[r];
1554
+ }
1555
+ }
1556
+ let a = ne(i.fontFamily);
1557
+ r.font = {}, a && (r.font.family = a.family, r.font.fallbacks = a.fallbacks, r.font.size = a.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
1558
+ let o = oe(i.textDecoration);
1559
+ r.font.underline = o.underline, r.font.strike = o.strike, i.textUnderlineStyle && (r.font.underline = ae(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = te(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = O.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = O.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = O.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.verticalAlign = D.VerticalAlignment.Super : i.verticalAlign.toLowerCase() === "sup" ? r.font.verticalAlign = D.VerticalAlignment.Sub : r.alignment.vertical = C(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = O.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? O.Overflow.Visible : O.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = O.Overflow.Shrink);
1560
+ let s = null;
1561
+ if (i.background ? s = i.background : i.backgroundColor && (s = i.backgroundColor), s && (r.fill = { color: s }), i.msoPattern) {
1562
+ let e = b(i.msoPattern);
1563
+ e && (e.patternType === x.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== x.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
1564
+ }
1565
+ i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = re(i.msoRotate));
1566
+ let c = (e, t) => {
1567
+ e && (r.borders ||= {}, r.borders[e] = t);
1568
+ };
1569
+ i.border && i.border !== "none" && (c("top", i.border), c("left", i.border), c("right", i.border), c("bottom", i.border)), i.borderTop && c("top", i.borderTop), i.borderLeft && c("left", i.borderLeft), i.borderRight && c("right", i.borderRight), i.borderBottom && c("bottom", i.borderBottom), i.msoDiagonalUp && c("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && c("diagonalDown", i.msoDiagonalDown);
1570
+ let l = r.numberFormat;
1571
+ i.msoNumberFormat && (l = S(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = T.Styles.lookupStyle(r.numberFormat).formatType === T.Type.Number ? null : T.Type.Number : l === "Percent" && (l = T.Styles.lookupStyle(r.numberFormat).formatType === T.Type.Percentage ? null : T.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
1572
+ }
1573
+ onCell(t, n, r, i, a) {
1574
+ let o = i(a), s = { value: n === void 0 ? r ?? "" : n };
1575
+ if (typeof s.value == "string" && s.value.length === 0 && (s.value = void 0), o && this.applyCSSStyle(s, o), a?.tagName.toUpperCase() === "TD") {
1576
+ let e = s.style, t = e?.font ?? {};
1577
+ (a.querySelectorAll("s").length > 0 || a.querySelectorAll("strike").length > 0) && (t.strike = !0), a.querySelectorAll("sub").length > 0 && (t.verticalAlign = D.VerticalAlignment.Sub), a.querySelectorAll("sup").length > 0 && (t.verticalAlign = D.VerticalAlignment.Super), (a.querySelectorAll("b").length > 0 || a.querySelectorAll("strong").length > 0) && (t.weight = 700), a.querySelectorAll("i").length > 0 && (t.style = D.Style.Italic), a.querySelectorAll("u").length > 0 && (t.underline = D.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, s.style = e), e.font || (e.font = t));
1578
+ let n = a.querySelectorAll("a");
1579
+ if (n.length > 0) {
1580
+ let e = n[0].getAttribute("href");
1581
+ e && (s.hyperlink = e);
1582
+ }
1583
+ }
1584
+ if (!e.isSingleCell(t)) {
1585
+ let e = {
1586
+ rowStart: this._topLeft.rowIndex + t.rowStart,
1587
+ colStart: this._topLeft.colIndex + t.colStart,
1588
+ rowEnd: this._topLeft.rowIndex + t.rowEnd,
1589
+ colEnd: this._topLeft.colIndex + t.colEnd
1590
+ };
1591
+ this._mergedReading.push(e);
1592
+ }
1593
+ if (s.value === void 0 && !s.style && Object.keys(s).length <= 1) return;
1594
+ let c = this._builder, l = this._topLeft;
1595
+ if (c.pushAt(l.rowIndex + t.rowStart, l.colIndex + t.colStart, s), !e.isSingleCell(t) && o.msoIgnore) {
1596
+ if (o.msoIgnore.includes("colspan")) {
1597
+ let e = {};
1598
+ o && this.applyCSSStyle(e, o);
1599
+ let n = t.colEnd - t.colStart, r = l.rowIndex + t.rowStart;
1600
+ for (let i = 1; i <= n; i++) c.pushAt(r, l.colIndex + t.colStart + i, e);
1601
+ t = {
1602
+ ...t,
1603
+ colEnd: t.colStart
1604
+ };
1605
+ }
1606
+ o.msoIgnore.includes("rowspan") && (t = {
1607
+ ...t,
1608
+ rowEnd: t.rowStart
1609
+ });
1610
+ }
1611
+ }
1612
+ onNoTable(e, t, n) {
1613
+ this.onCell({
1614
+ rowStart: this._topLeft.rowIndex,
1615
+ colStart: this._topLeft.colIndex,
1616
+ rowEnd: this._topLeft.rowIndex,
1617
+ colEnd: this._topLeft.colIndex
1618
+ }, e, null, t, n);
1619
+ }
1620
+ onRowStart(e, t, n, r) {
1621
+ let i = n(r);
1622
+ if (i.msoHeightSource !== "userset" || !r) return;
1623
+ let a = r.getAttribute("height") ?? i.height, o = null;
1624
+ if (a && (o = E(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
1625
+ let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = E(i, this._styles.getNormal().getFont().getSize(), "px");
1626
+ a !== null && (o = Math.max(a, o ?? 0));
1627
+ }
1628
+ o !== null && this._rowsReading.push({
1629
+ address: {
1630
+ min: this._topLeft.rowIndex + e,
1631
+ max: this._topLeft.rowIndex + e + t - 1
1632
+ },
1633
+ update: { size: o * D.getDeviceScale() }
1634
+ });
1635
+ }
1636
+ onColumn(e, t, n, r) {
1637
+ let i = n(r);
1638
+ if (i.msoWidthSource !== "userset" || !r) return;
1639
+ let a = r.getAttribute("width") ?? i.width, o = null;
1640
+ a && (o = E(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
1641
+ address: {
1642
+ min: this._topLeft.colIndex + e,
1643
+ max: this._topLeft.colIndex + e + t - 1
1644
+ },
1645
+ update: { size: o * D.getDeviceScale() }
1646
+ });
1647
+ }
1648
+ onDone() {
1649
+ this._colsReading.length > 0 && this._sheet.getColumnHeaders().updateHeaderPairs(this._colsReading), this._rowsReading.length > 0 && this._sheet.getRowHeaders().updateHeaderPairs(this._rowsReading), this._sheet.doBatch(() => {
1650
+ this._builder.apply();
1651
+ }), this._mergedReading.length > 0 && this._sheet.getRanges(this._mergedReading).merge();
1652
+ }
1653
+ sheet() {
1654
+ return this._sheet;
1655
+ }
1656
+ }, dn = class {
1657
+ constructor(e) {
1658
+ if (!e) throw new g("snapshot is required.");
1659
+ this._snapshot = e;
1660
+ }
1661
+ getItemType() {
1662
+ return "range";
1663
+ }
1664
+ getItem() {
1665
+ return this._snapshot;
1666
+ }
1667
+ editMode() {
1668
+ return this._snapshot?.getMarkOptions().editMode ?? null;
1669
+ }
1670
+ isCut() {
1671
+ return this._snapshot?.getMarkOptions().isCut ?? !1;
1672
+ }
1673
+ getName() {
1674
+ return this._snapshot.getName();
1675
+ }
1676
+ toText() {
1677
+ return this._snapshot.toText();
1678
+ }
1679
+ toHtml() {
1680
+ return this._snapshot.toHtml();
1681
+ }
1682
+ toImage() {
1683
+ return this._snapshot.toImage();
1684
+ }
1685
+ get isClipboardItem() {
1686
+ return !0;
1687
+ }
1688
+ }, fn = class {
1689
+ constructor(t, n, r, i, a) {
1690
+ if (this._parsed = void 0, this._runtime = t, !n) throw new g("nativeItems are required.");
1691
+ this._topLeft = r ?? e.EmptyCell, this._native = n, this._markOptions = Object.freeze(i ?? {}), this._styles = a;
1692
+ }
1693
+ getItemType() {
1694
+ return "range";
1695
+ }
1696
+ isCut() {
1697
+ return !1;
1698
+ }
1699
+ toText() {
1700
+ return this._native?.text;
1701
+ }
1702
+ toHtml() {
1703
+ return this._native?.html?.documentElement.outerHTML || null;
1704
+ }
1705
+ toImage() {
1706
+ return this._native?.image;
1707
+ }
1708
+ getItem() {
1709
+ let e = this._parsed;
1710
+ if (e === void 0) throw Error("Must call 'parse()' before getItem().");
1711
+ if (e === null) return null;
1712
+ if (this._snapshot) return this._snapshot;
1713
+ let t = this;
1714
+ return this._snapshot = {
1715
+ copyTo: (n, r) => e.copyTo(n, {
1716
+ ...t._markOptions,
1717
+ ...r
1718
+ }),
1719
+ getMarkOptions: () => t._markOptions,
1720
+ getName: () => e?.getName() ?? "Clipboard Data",
1721
+ getCoords: () => e?.getCoords?.() ?? null,
1722
+ toText: () => t.toText(),
1723
+ toHtml: () => t.toHtml(),
1724
+ toImage: () => t.toImage(),
1725
+ getSource: () => e?.getSource?.() ?? null,
1726
+ isISnapshot: !0
1727
+ }, this._snapshot;
1728
+ }
1729
+ async parse() {
1730
+ let e, t = this._native?.text, r = this._native.html;
1731
+ if (r === null && t && t.includes("<table")) try {
1732
+ let e = new DOMParser().parseFromString(t, n.Html), i = e.querySelector("parsererror");
1733
+ if (i) throw new h("Unable to parse: " + i);
1734
+ r = e, t = null;
1735
+ } catch {
1736
+ console.warn("Discovered text as html table but could could not parse.");
1737
+ }
1738
+ try {
1739
+ let n, i = new un(this._runtime, this._topLeft, this._styles, r ? "HTML" : "Text"), a = await Promise.resolve(t ? rt(t) : [[]]);
1740
+ if (xe(r, a, i) ? (e = i.sheet(), n = e.getUsedRange()) : r = null, n) return this._parsed = {
1741
+ copyTo: async (e, t) => (await e.copyFrom(n, t))?.getCoords() ?? null,
1742
+ getCoords: () => n.getCoords(),
1743
+ getSource: () => e,
1744
+ getName: () => e.getName()
1745
+ }, !0;
1746
+ } catch (e) {
1747
+ throw e;
1748
+ }
1749
+ if (!t && !r && this._native.image) {
1750
+ let e = this;
1751
+ return this._parsed = {
1752
+ async copyTo(t, n) {
1753
+ let r = t.getSheet(), i = await e._native.image.arrayBuffer();
1754
+ return await r.getMovables().addPicture({ source: { buffer: i } }, {
1755
+ type: "picture",
1756
+ description: l("op.copyImageFromClipboard"),
1757
+ autoSelect: !0
1758
+ }), null;
1759
+ },
1760
+ getName: () => "Image"
1761
+ }, !0;
1762
+ }
1763
+ return this._parsed = null, !1;
1764
+ }
1765
+ get isClipboardItem() {
1766
+ return !0;
1767
+ }
1768
+ }, X = {
1769
+ showFormulaBar: !0,
1770
+ showTabs: !0,
1771
+ tabRatio: 600,
1772
+ showHorizontalScrollbar: !0,
1773
+ showVerticalScrollbar: !0,
1774
+ showStatusBar: !0,
1775
+ activeSheetId: 0
1776
+ }, pn = class {
1777
+ constructor(e) {
1778
+ this._id = a.uuidV4(), this._emitter = new y(this), this._state = { ...X }, e?.json && this._fromJSON(e?.json);
1779
+ }
1780
+ getId() {
1781
+ return this._id;
1782
+ }
1783
+ isShowFormulaBar() {
1784
+ return this._state.showFormulaBar;
1785
+ }
1786
+ setShowFormulaBar(e) {
1787
+ return this._state.showFormulaBar = e, this._emitter.notify("onViewChange"), this;
1788
+ }
1789
+ isShowTabs() {
1790
+ return this._state.showTabs;
1791
+ }
1792
+ setShowTabs(e) {
1793
+ return this._state.showTabs = e, this._emitter.notify("onViewChange"), this;
1794
+ }
1795
+ getTabRatio() {
1796
+ return this._state.tabRatio;
1797
+ }
1798
+ setTabRatio(e) {
1799
+ return this._state.tabRatio = e, this._emitter.notify("onViewChange"), this;
1800
+ }
1801
+ isShowHorizontalScrollbar() {
1802
+ return this._state.showHorizontalScrollbar;
1803
+ }
1804
+ setShowHorizontalScrollbar(e) {
1805
+ return this._state.showHorizontalScrollbar = e, this._emitter.notify("onViewChange"), this;
1806
+ }
1807
+ isShowVerticalScrollbar() {
1808
+ return this._state.showVerticalScrollbar;
1809
+ }
1810
+ setShowVerticalScrollbar(e) {
1811
+ return this._state.showVerticalScrollbar = e, this._emitter.notify("onViewChange"), this;
1812
+ }
1813
+ isShowStatusBar() {
1814
+ return this._state.showStatusBar;
1815
+ }
1816
+ setShowStatusBar(e) {
1817
+ return this._state.showStatusBar = e, this._emitter.notify("onViewChange"), this;
1818
+ }
1819
+ getActiveSheetId() {
1820
+ return this._state.activeSheetId;
1821
+ }
1822
+ setActiveSheetId(e) {
1823
+ let t = this._state, n = t.activeSheetId;
1824
+ return t.activeSheetId = e, n !== e && this._emitter.notify("onViewChange"), this;
1825
+ }
1826
+ addListeners(e, t) {
1827
+ return this._emitter.addListeners(e, t);
1828
+ }
1829
+ toJSON() {
1830
+ let e = {}, t = Object.keys(this._state), n = t.length;
1831
+ for (let r = 0; r < n; r++) {
1832
+ let n = t[r], i = this._state[n];
1833
+ i != null && i !== X[n] && (e[n] = i);
1834
+ }
1835
+ return Object.keys(e).length === 0 && (e = null), e;
1836
+ }
1837
+ _fromJSON(e, t = !0) {
1838
+ let n = e || {};
1839
+ this.update(n, t);
1840
+ }
1841
+ update(e, t = !0) {
1842
+ this._state = {
1843
+ ...X,
1844
+ ...this._state,
1845
+ ...e
1846
+ }, t && this._emitter.notify("onViewChange");
1847
+ }
1848
+ get [Symbol.toStringTag]() {
1849
+ return "[WorkbookView]";
1850
+ }
1851
+ toString() {
1852
+ let e = this.toJSON();
1853
+ return e ? JSON.stringify(e) : "DefaultWorkbookView";
1854
+ }
1855
+ get isIWorkbookView() {
1856
+ return !0;
1857
+ }
1858
+ }, mn = Object.freeze({
1859
+ structure: !1,
1860
+ windows: !1,
1861
+ revision: !1,
1862
+ password: null,
1863
+ revisionsPassword: null
1864
+ }), hn = class extends Je {
1865
+ isWindowsAllowed() {
1866
+ return this._isPropertyAllowed("windows");
1867
+ }
1868
+ isRevisionAllowed() {
1869
+ return this._isPropertyAllowed("revision");
1870
+ }
1871
+ isStructureAllowed() {
1872
+ return this._isPropertyAllowed("structure");
1873
+ }
1874
+ _getAllowedKey() {
1875
+ return "workbook";
1876
+ }
1877
+ _fromJSON(e) {
1878
+ this._properties = e;
1879
+ }
1880
+ _toJSON(e) {
1881
+ let t = this._properties;
1882
+ if (t) {
1883
+ let n = Object.keys(t), r = n.length;
1884
+ for (let i = 0; i < r; i++) {
1885
+ let r = n[i], a = t[r];
1886
+ a != null && a !== mn[r] && (e[r] = a);
1887
+ }
1888
+ }
1889
+ return super._toJSON(e);
1890
+ }
1891
+ get [Symbol.toStringTag]() {
1892
+ return "[WorkbookProtection]";
1893
+ }
1894
+ get isIWorkbookProtection() {
1895
+ return !0;
1896
+ }
1897
+ };
1898
+ function Z(e) {
1899
+ return d("error.workbook.invalidSheetKey", { key: e });
1900
+ }
1901
+ var gn, _n, vn = class extends ue {
1902
+ constructor(e, t, n) {
1903
+ super(), this._add = e, this._get = t, this._addListeners = n;
1904
+ }
1905
+ add(e) {
1906
+ return this._add(e);
1907
+ }
1908
+ _getItems(e) {
1909
+ return this._get(e?.name, e?.visibility);
1910
+ }
1911
+ getByName(e) {
1912
+ return this._get(e)?.[0] ?? null;
1913
+ }
1914
+ addListeners(e, t) {
1915
+ return this._addListeners(e, t);
1916
+ }
1917
+ get isISheetCollection() {
1918
+ return !0;
1919
+ }
1920
+ }, Q = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), yn = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
1921
+ function bn(e) {
1922
+ let t = d(l("workbook.defaultSheetName"), { n: e + 1 });
1923
+ return t === "workbook.defaultSheetName" ? `Sheet${e + 1}` : t;
1924
+ }
1925
+ function xn(e, t) {
1926
+ return {
1927
+ ..._e,
1928
+ getSheet: () => null,
1929
+ toString: () => F(e, t)
1930
+ };
1931
+ }
1932
+ function Sn(e, t = !1) {
1933
+ if (!e) throw Error(d("error.workbook.sheetNameBlank"));
1934
+ if (Q.test(e)) {
1935
+ if (!t) throw Error(function(e) {
1936
+ return e ? d("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : d("error.workbook.sheetNameInvalidChars");
1937
+ }(e));
1938
+ e = e.replace(Q, "");
1939
+ }
1940
+ if (e.length === 0) throw Error(d("error.workbook.sheetNameBlank"));
1941
+ let n = e.length;
1942
+ if (n > 31) {
1943
+ if (!t) throw Error(d("error.workbook.sheetNameTooLong"));
1944
+ e = e.substring(0, 31);
1945
+ }
1946
+ if (e.charAt(0) === "'" || e.charAt(n - 1) === "'") {
1947
+ if (!t) throw Error(d("error.workbook.sheetNameQuotes"));
1948
+ e = e.replace(/^'|'$/g, "");
1949
+ }
1950
+ return e;
1951
+ }
1952
+ var Cn, wn, Tn, En = "workbook.activeSheet", Dn = class e extends De {
1953
+ constructor(e, t, n, r) {
1954
+ super(e, t, r), this._workbook = n;
1955
+ }
1956
+ getSource() {
1957
+ return this._workbook;
1958
+ }
1959
+ _createRanges(t, n) {
1960
+ let r = this._options;
1961
+ return n && (r = {
1962
+ ...this._options,
1963
+ getOptions: N(this._options?.getOptions, n)
1964
+ }), new e(t, this._internal, this._workbook, r);
1965
+ }
1966
+ _createRange(e, t) {
1967
+ let n = e ? { ...e } : null, r = n ? this._workbook._getSheetRef(n.scope, R.Visibility.VeryHidden) : null;
1968
+ if (!r) {
1969
+ let e = this._workbook.getSelectedSheet();
1970
+ return delete n?.scope, xn(n, n ? {
1971
+ scope: Qe,
1972
+ ...e.getEntireRange().getCoords()
1973
+ } : null);
1974
+ }
1975
+ let i = this._options;
1976
+ return t && (i = {
1977
+ ...this._options,
1978
+ getOptions: N(this._options.getOptions, t)
1979
+ }), new On(e, P(r.sheet), this._workbook, i);
1980
+ }
1981
+ async select(e) {
1982
+ let t = [], n = null, r = this.getCoords();
1983
+ for (let e = 0; e < r.length; e++) {
1984
+ let i = r[e];
1985
+ i && (n ||= i.scope, i && i.scope === n && t.push(i));
1986
+ }
1987
+ n ||= this._workbook.getSelectedSheet().getName();
1988
+ let i = this._workbook.getSheets().getByName(n);
1989
+ if (!i) return;
1990
+ let a = await i.getRanges(t).select(e), o = this._workbook._rangesAddressToCoords(a.getCoords());
1991
+ return this._createRanges(o);
1992
+ }
1993
+ addListener(e, t) {
1994
+ if (!this.getCoords()) return () => {};
1995
+ let n = this._workbook._sheetToWBEvent(e);
1996
+ return super.addListener(n, t);
1997
+ }
1998
+ get [Symbol.toStringTag]() {
1999
+ return "[WorkbookRanges]";
2000
+ }
2001
+ getAddress(e) {
2002
+ let t = this._internal.getSheet(), n = t.getEntireRange().getCoords();
2003
+ return ye(this.getCoords(), {
2004
+ ...n,
2005
+ scope: t.getName()
2006
+ }, F, Pe, e);
2007
+ }
2008
+ toString() {
2009
+ return this.getAddress();
2010
+ }
2011
+ }, On = class e extends pe {
2012
+ constructor(e, t, n, r) {
2013
+ super(e, t, r), this._workbook = n;
2014
+ }
2015
+ _createRanges(e, t) {
2016
+ let n = this._options;
2017
+ return t && (n = {
2018
+ ...this._options,
2019
+ getOptions: N(this._options?.getOptions, t)
2020
+ }), new Dn(e, this._internal, this._workbook, n);
2021
+ }
2022
+ _createRange(t, n) {
2023
+ let r = this._internal;
2024
+ if (!t) return $e(r.getSheet(), r.getSheet().getEntireCoords());
2025
+ if (r.validateCoords(t), r.getSheet().isClosed()) return $e(null, r.getSheet().getEntireCoords(), t);
2026
+ let i = this._options;
2027
+ return n && (i = {
2028
+ ...this._options,
2029
+ getOptions: N(this._options?.getOptions, n)
2030
+ }), new e(t, this._internal, this._workbook, i);
2031
+ }
2032
+ addListener(e, t) {
2033
+ if (!this.getCoords()) return () => {};
2034
+ let n = this._workbook._sheetToWBEvent(e);
2035
+ return super.addListener(n, t);
2036
+ }
2037
+ get [Symbol.toStringTag]() {
2038
+ return "[WorkbookRange]";
2039
+ }
2040
+ getAddress(e) {
2041
+ let t = this._internal.getSheet(), n = t?.getEntireRange().getCoords() ?? null;
2042
+ return F(this.getCoords(), {
2043
+ ...n,
2044
+ scope: t.getName()
2045
+ });
2046
+ }
2047
+ toString() {
2048
+ return this.getAddress();
2049
+ }
2050
+ }, kn = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", An = class {
2051
+ constructor(e) {
2052
+ this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new le(() => {
2053
+ let e = [];
2054
+ for (let t of this.getSheets()) e.push(...t.getPivotTables());
2055
+ return e;
2056
+ }), this._people = new cn(), this._commentCollection = new nt(null, (e, t, n) => {
2057
+ let r = [];
2058
+ for (let i of this.getSheets()) r.push(...i.getComments().getItems(e ? {
2059
+ address: e,
2060
+ ignoreHidden: t,
2061
+ fullyContained: n
2062
+ } : {
2063
+ ignoreHidden: t,
2064
+ fullyContained: n
2065
+ }));
2066
+ return r;
2067
+ }, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
2068
+ e.onCollectionChange(this._commentCollection);
2069
+ } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._locale = null, this._localeOverrides = null;
2070
+ let t = typeof e == "string" ? { origin: e } : { ...e }, n = t.origin;
2071
+ this._ownOriginProvider = !kn(n), this._originProvider = kn(n) ? n : new pt(typeof n == "string" ? new B(null, { name: n }) : n ?? new B(null)), delete t.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2072
+ let r = t.json;
2073
+ delete t.json, this._transactions = t.transactions ?? new v(), this._id = this._transactions.create(), this._ownTransactions = !t.transactions, this._emitter = new y(this, this._transactions), this._runtime = t.runtime ?? new Ze("Workbook Runtime", {
2074
+ isDate1904: () => this._isDate1904,
2075
+ getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
2076
+ getLocale: () => this._locale ?? He() ?? Ye(),
2077
+ getLocaleOverrides: () => this._localeOverrides
2078
+ }), this._listenerLanguage = i.addChangeListener(() => {
2079
+ this._closed || this._notifyAllChange();
2080
+ });
2081
+ let o = this, s = this._beginCommit({ description: l(r ? "op.openWorkbook" : "op.newWorkbook") });
2082
+ try {
2083
+ this._strings = t.strings ?? new ge(), this._ownStrings = !t.strings, this._resources = t.resources ?? new Oe(), this._ownResources = !t.resources, this._createSheetName = t.createSheetNameCallback ?? bn;
2084
+ let e = t.createSheetCallback;
2085
+ e ||= (e) => new L(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, n, r, i, a, s, c) => {
2086
+ let l = null, u = {
2087
+ runtime: o._runtime,
2088
+ readonly: o._options.readonly ?? !1,
2089
+ disableLoadAutoFit: o._options.disableLoadAutoFit ?? !1,
2090
+ opener: o._options.opener,
2091
+ transactions: o._transactions,
2092
+ styles: o._styles,
2093
+ strings: o._strings,
2094
+ resources: o._resources,
2095
+ names: o._names,
2096
+ workbook: o,
2097
+ calculation: o._calculation,
2098
+ resolveRange: (e) => o._options.resolveRange?.(e) ?? o.getRange(e),
2099
+ container: {
2100
+ beforeFromJSON: (e) => {
2101
+ l = e, o._addSheetRef({
2102
+ name: n,
2103
+ id: t,
2104
+ visibility: r ?? R.Visibility.Visible,
2105
+ sheetId: a,
2106
+ sheet: e
2107
+ }, i);
2108
+ },
2109
+ getName: () => {
2110
+ let e = o._getSheetRef(l);
2111
+ return e ? e.name : n;
2112
+ },
2113
+ setName: (e, t) => {
2114
+ o._getSheetRef(l) && o._setSheetName(l, e, t);
2115
+ },
2116
+ setNameChangeCallback: (e) => {
2117
+ o._sheetOnNameChange.set(t, e);
2118
+ },
2119
+ getVisibility: () => {
2120
+ let e = o._getSheetRef(l);
2121
+ return e ? e.visibility : R.Visibility.Visible;
2122
+ },
2123
+ setVisibility: (e, t) => {
2124
+ o._setSheetVisibility(l, e, t);
2125
+ },
2126
+ setVisibilityCallback: (e) => {
2127
+ o._sheetOnVisibilityChange.set(t, e);
2128
+ },
2129
+ duplicate: () => o._duplicateSheet(l),
2130
+ getIndex: () => {
2131
+ let e = o._getSheetRef(l);
2132
+ return e ? o._getOffsetForId(e.id, o._getSheetRefs(R.Visibility.VeryHidden)) : i;
2133
+ },
2134
+ setIndex: (e, t) => {
2135
+ let n = o._getSheetRef(l, R.Visibility.VeryHidden);
2136
+ return !!n && (o._moveSheet(n, e, t), !0);
2137
+ },
2138
+ setIndexCallback: (e) => {
2139
+ o._sheetOnIndexChange.set(t, e);
2140
+ },
2141
+ requestSelect: async () => (o._setSelectedSheet(l), await this._emitter.notify("onRequestSelect", {
2142
+ source: o,
2143
+ params: l,
2144
+ async: !0
2145
+ }), o.getSelectedSheet() === l)
2146
+ }
2147
+ };
2148
+ return s && (u.json = s), c !== void 0 && (u.uid = () => c), l = e(u, n, i, r), l;
2149
+ }, this._namedTableSource = new Ge({
2150
+ getSheets: () => o._sheets ? o.getSheets().getItems() : a.EmptyArray,
2151
+ addSheetsListener: (e, t) => o.addListeners({ onSheetsChange: e }, t)
2152
+ }), this._names = t.names ?? new ze({
2153
+ addressToRanges: (e) => o.getRanges(e),
2154
+ getCurrentScope: () => o.getSelectedSheet().getName(),
2155
+ isReadOnly: () => (o._options.readonly ?? !1) || o._isStructureProtected(),
2156
+ transactions: o._transactions,
2157
+ getSources: () => o._calculation ? [o._calculation.getNamedFormulas(), o._namedTableSource] : a.EmptyArray
2158
+ }), this._ownNames = !t.names, this._calculation = t.calculation ?? new je({
2159
+ runtime: o._runtime,
2160
+ functions: t.functions,
2161
+ json: r?.calc,
2162
+ isNamesReadOnly: () => o._isStructureProtected(),
2163
+ getActiveCell: () => {
2164
+ let e = o.getSelectedSheet(), t = e?.getSelectedRange()?.getCoords();
2165
+ return t ? {
2166
+ rowIndex: t.rowStart,
2167
+ colIndex: t.colStart,
2168
+ scope: e.getId()
2169
+ } : null;
2170
+ },
2171
+ getRange: o.getRange.bind(o),
2172
+ getRanges: o.getRanges.bind(o),
2173
+ createGraphRanges: (e, t) => o._createGraphRanges(e, t),
2174
+ getSheetIndex: (e) => {
2175
+ if (e === void 0) {
2176
+ let e = o.getSelectedSheet();
2177
+ return e ? this._getSheetRefs(R.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2178
+ }
2179
+ let t = this._getSheetRefs(R.Visibility.VeryHidden);
2180
+ e = e.toLowerCase();
2181
+ let n = t.length;
2182
+ for (let r = 0; r < n; r++) if (t[r].name.toLowerCase() === e) return r;
2183
+ try {
2184
+ jn.address = e;
2185
+ let t = this._names.getItems(jn);
2186
+ if (!t || t.length === 0) return -1;
2187
+ let n = t[0].getRanges?.()?.getCoords()?.[0]?.scope;
2188
+ if (!n) return -1;
2189
+ let r = this._getSheetRefs(R.Visibility.VeryHidden);
2190
+ n = n.toLowerCase();
2191
+ let i = r.length;
2192
+ for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === n) return e;
2193
+ } catch {
2194
+ return -1;
2195
+ }
2196
+ return -1;
2197
+ },
2198
+ getSheetCount: () => o.getSheets().getItems({ visibility: R.Visibility.VeryHidden }).length,
2199
+ externalBooks: r?.externalBooks,
2200
+ externalBookResolver: t.externalBookResolver,
2201
+ namedCollection: o._names,
2202
+ strings: o._strings,
2203
+ transactions: o._transactions,
2204
+ names: r?.names
2205
+ }), this._ownCalculation = !t.calculation, this._scripts = this._createScripts(r?.modules), this._ownNames = !t.names, this._options = Object.freeze({ ...t });
2206
+ let n = r?.sheets?.length ? r.sheets.map((e) => e.name) : [this._createSheetName(0)], i = n.map((e) => e + "-" + a.uuidV4());
2207
+ this._calculation._setSheets(n.map((e, t) => [i[t], e]));
2208
+ let c = t.calcOnLoad ?? "auto", l = !1, u = (async () => {
2209
+ try {
2210
+ if (this._ownCalculation && c !== "none" && (c === "full" || c === "auto" && !0 === r?.calc?.fullCalcOnLoad ? await this._calculation.calculate({ full: !0 }) : await this._calculation.start(), this._closed)) return;
2211
+ await this._scripts.start();
2212
+ } finally {
2213
+ l = !0, this._starting = null;
2214
+ }
2215
+ })();
2216
+ l || (this._starting = u), this._starting?.catch(() => {}), r ? this._fromJSON(r, i) : (this._initState(), this._addSheet(!1, n[0], null, i[0])), this._sheets = new vn((e) => o._addSheetOptions(e), (e, t) => {
2217
+ if (e) {
2218
+ let n = this._getSheetRef(e, t);
2219
+ return n ? [n.sheet] : a.EmptyArray;
2220
+ }
2221
+ return this._getSheets(t);
2222
+ }, (e, t) => {
2223
+ let n = e.onCollectionChange, r = e.onInvalidated;
2224
+ return o._emitter.addListeners({
2225
+ onSheetsChange: n ? () => {
2226
+ n(o._sheets);
2227
+ } : void 0,
2228
+ onInvalidated: r ? () => {
2229
+ r(o._sheets);
2230
+ } : void 0
2231
+ }, t);
2232
+ }), this._ownCalculation && (t.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? s.amend() : s.commit();
2233
+ } catch (e) {
2234
+ throw s.rollback(), e;
2235
+ }
2236
+ this._initializing = !1;
2237
+ }
2238
+ _initState() {
2239
+ let e = this._getSheetRefs();
2240
+ for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
2241
+ let t = this._options;
2242
+ this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new Ne().getDefaultTheme(), this._styles = t?.styles ?? new se(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new pn()), this._listenerProtection?.(), this._protection = new hn(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2243
+ n._emitter.notify("onProtectionChange");
2244
+ } });
2245
+ let n = this;
2246
+ this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
2247
+ async onAfterStateChange(e, t, r, i, a) {
2248
+ let o = n._view, s = a?.[En], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
2249
+ d ? await d.sheet.select() : n._resyncActiveSheet(u, e), n._lastTransactionUUID = t.getId(), (r || i) && n._emitter.notify("onSheetsChange"), n._emitter.notify("onSelectedSheetChange"), n._emitter.notify("onViewChange");
2250
+ },
2251
+ onRestoreOrRevert() {
2252
+ n._ownCalculation, n._emitter.notify("onInvalidated");
2253
+ }
2254
+ });
2255
+ let r = this._getState();
2256
+ r?.listenersSheets && (r?.listenersSheets.forEach((e) => {
2257
+ e();
2258
+ }), r?.listenersSheets.clear()), this._updateState({
2259
+ sheetRefsAll: [],
2260
+ sheetRefsVisibleAndHidden: [],
2261
+ sheetRefsVisible: [],
2262
+ refsById: /* @__PURE__ */ new Map(),
2263
+ sheetsById: /* @__PURE__ */ new Map(),
2264
+ refsByLowerCaseName: /* @__PURE__ */ new Map(),
2265
+ sheetsByLowerCaseName: /* @__PURE__ */ new Map(),
2266
+ refsByInstance: /* @__PURE__ */ new Map(),
2267
+ lastId: -1,
2268
+ sheetsCreated: /* @__PURE__ */ new Set(),
2269
+ listenersSheets: /* @__PURE__ */ new Map()
2270
+ });
2271
+ }
2272
+ getId() {
2273
+ return this._id;
2274
+ }
2275
+ getVersionId() {
2276
+ return this._transactions.getVersionId(this._id);
2277
+ }
2278
+ getName() {
2279
+ return this._closed ? null : this._origin.getName();
2280
+ }
2281
+ getOrigin() {
2282
+ return this._originProvider.getOrigin();
2283
+ }
2284
+ _onOriginChange() {
2285
+ if (this._closed) return;
2286
+ let e = this._originProvider.getOrigin();
2287
+ if (e === this._origin) return;
2288
+ this._listenerOrigin?.();
2289
+ let t = this._lastOriginName;
2290
+ this._bindOrigin(e), this._emitter.notify("onOriginChange"), this._lastOriginName !== t && this._emitter.notify("onNameChange");
2291
+ }
2292
+ _bindOrigin(e) {
2293
+ this._origin = e, this._lastOriginName = e.getName(), this._listenerOrigin = e.addListeners({ onChange: () => {
2294
+ if (this._closed) return;
2295
+ let t = e.getName();
2296
+ t !== this._lastOriginName && (this._lastOriginName = t, this._emitter.notify("onNameChange"));
2297
+ } });
2298
+ }
2299
+ getView() {
2300
+ return this._view;
2301
+ }
2302
+ setView(e) {
2303
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2304
+ if (!e) throw new h(d("error.sheet.emptyView"));
2305
+ this._listenerWorkbookView?.();
2306
+ let t = this, n = -1;
2307
+ return this._listenerWorkbookView = e.addListeners({ onViewChange: (e) => {
2308
+ let r = t._getState(), i = this._view.getActiveSheetId(), a = r.sheetRefsVisible, o = this._getOffsetForId(i, a);
2309
+ this._activeSheetOffset = o, t._emitter.notify("onViewChange"), n !== i && (t._emitter.notify("onSelectionChange"), t._emitter.notify("onSelectedSheetChange")), n = i;
2310
+ } }), this._view = e, t._emitter.notify("onViewChange"), this;
2311
+ }
2312
+ getRuntime() {
2313
+ return this._runtime;
2314
+ }
2315
+ setDate1904(e) {
2316
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2317
+ return this._isDate1904 === e || (this._isDate1904 = e, this._emitter.notify("onRegionalChange")), this;
2318
+ }
2319
+ getLocale() {
2320
+ return this._runtime.getLocale();
2321
+ }
2322
+ getPinnedLocale() {
2323
+ return this._locale;
2324
+ }
2325
+ setLocale(e) {
2326
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2327
+ if (e) try {
2328
+ new Intl.Locale(e);
2329
+ } catch {
2330
+ throw Error(d("error.workbook.invalidLocale", { locale: e }));
2331
+ }
2332
+ return this._locale === e || (this._locale = e, this._emitter.notify("onRegionalChange")), this;
2333
+ }
2334
+ getLocaleOverrides() {
2335
+ return this._localeOverrides;
2336
+ }
2337
+ setLocaleOverrides(e) {
2338
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2339
+ let t = e && Object.keys(e).length > 0 ? e : null;
2340
+ return this._localeOverrides = t, this._emitter.notify("onRegionalChange"), this;
2341
+ }
2342
+ getStyles() {
2343
+ return this._styles;
2344
+ }
2345
+ getResources() {
2346
+ return this._resources;
2347
+ }
2348
+ getTransactions() {
2349
+ return this._transactions;
2350
+ }
2351
+ getStrings() {
2352
+ return this._strings;
2353
+ }
2354
+ getExternalBooks() {
2355
+ return this._calculation.getExternalBooks();
2356
+ }
2357
+ getUpdateLinks() {
2358
+ return this._updateLinks;
2359
+ }
2360
+ setUpdateLinks(e) {
2361
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2362
+ return this._updateLinks = e, this;
2363
+ }
2364
+ getPivotTables() {
2365
+ return this._pivotTableCollection;
2366
+ }
2367
+ getComments() {
2368
+ return this._commentCollection;
2369
+ }
2370
+ getPeople() {
2371
+ return this._people;
2372
+ }
2373
+ getTheme() {
2374
+ return this._theme;
2375
+ }
2376
+ setTheme(e) {
2377
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2378
+ if (!e) throw new h(d("error.workbook.notSetValue"));
2379
+ let t = this._theme;
2380
+ return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
2381
+ }
2382
+ getSelectedSheetIndex() {
2383
+ return this._activeSheetOffset;
2384
+ }
2385
+ getSelectedSheet() {
2386
+ let e = this._getSheetRef(this.getSelectedSheetIndex());
2387
+ return e ? e?.sheet : null;
2388
+ }
2389
+ getSheet(e, t = R.Visibility.Visible) {
2390
+ if (e === void 0) return this.getSelectedSheet();
2391
+ if (!e) throw Error(d("error.workbook.sheetNameNotProvided"));
2392
+ let n = this._getSheetRef(e, t);
2393
+ if (!n) throw new f(d("error.workbook.sheetNameNotFound", { sheetName: e }));
2394
+ return n.sheet;
2395
+ }
2396
+ getSheetAt(e, t = R.Visibility.Visible) {
2397
+ let n = this._getSheetRef(e, t);
2398
+ if (!n) throw new f(function(e) {
2399
+ return d("error.workbook.sheetIndexNotFound", { index: e });
2400
+ }(e));
2401
+ return n.sheet;
2402
+ }
2403
+ getSheets() {
2404
+ return this._sheets;
2405
+ }
2406
+ addSheet(e) {
2407
+ return this.getSheets().add(e);
2408
+ }
2409
+ _getSheets(e = R.Visibility.Visible) {
2410
+ let t = this._getSheetRefs(e), n = [], r = t.length;
2411
+ for (let e = 0; e < r; e++) n.push(t[e].sheet);
2412
+ return n;
2413
+ }
2414
+ _getSheetRefs(e = R.Visibility.Visible) {
2415
+ let t = this._getState();
2416
+ return t ? e === R.Visibility.Visible ? t.sheetRefsVisible : e === R.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === R.Visibility.VeryHidden ? t.sheetRefsAll : a.EmptyArray : [];
2417
+ }
2418
+ _getSheetRef(e, t = R.Visibility.Visible) {
2419
+ let n = null;
2420
+ return typeof e == "number" ? this._getSheetRefs(t)[e] : (typeof e == "string" ? n = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : e instanceof L ? n = this._getState().refsByInstance.get(e) : e?.id !== void 0 && (n = this._getState().refsById.get(e.id)), n);
2421
+ }
2422
+ _validateNewSheetName(e, t = !0) {
2423
+ if (e == null) return e;
2424
+ if (Sn(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new h(d("error.workbook.nameTaken"));
2425
+ return e.substring(0, 31);
2426
+ }
2427
+ findValidSheetName(e) {
2428
+ e &&= Sn(e, !0);
2429
+ try {
2430
+ return function(e, t) {
2431
+ try {
2432
+ if (t(e)) return e;
2433
+ } catch {}
2434
+ let n, r, i = yn.exec(e);
2435
+ for (i === null ? (n = e + " ", r = 1) : (n = e.substring(0, i.index), r = parseFloat(i[1])); r < 256;) {
2436
+ r++;
2437
+ let e = "(" + r + ")", i = n.substring(0, 31 - e.length) + e;
2438
+ try {
2439
+ if (t(i)) return i;
2440
+ } catch {}
2441
+ }
2442
+ throw Error(e + " is not a valid sheet name");
2443
+ }(e, (e) => this._validateNewSheetName(e));
2444
+ } catch {
2445
+ return this._nextSheetName();
2446
+ }
2447
+ }
2448
+ isValidSheetNameCharacter(e) {
2449
+ return !Q.test(e);
2450
+ }
2451
+ _isStructureProtected() {
2452
+ return !this._initializing && !this.getProtection().isStructureAllowed();
2453
+ }
2454
+ _addSheetOptions(e) {
2455
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2456
+ if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2457
+ let t, n = null;
2458
+ t = typeof e == "string" ? { name: e } : typeof e == "number" ? { index: e } : e, t = {
2459
+ ...t,
2460
+ description: t?.description ?? l("op.addSheet")
2461
+ };
2462
+ let r = this.beginCommit(t);
2463
+ try {
2464
+ let e = t?.autoSelect ?? !1;
2465
+ n = this._addSheet(!0, t.name, t.index ?? null);
2466
+ let i = this.getView().getActiveSheetId();
2467
+ if (e && this._recordActiveSheet(r, i, this._getSheetRef(n).id), r.commit({ description: d("op.addSheetNamed", { name: n.getName() }) }), !1 !== e) {
2468
+ let t = typeof e == "boolean" ? void 0 : e;
2469
+ n.select(t);
2470
+ }
2471
+ } catch (e) {
2472
+ throw r.rollback(), e;
2473
+ }
2474
+ return n;
2475
+ }
2476
+ _nextSheetName(e = null) {
2477
+ let t = e ? e.toLowerCase() : null, n = this._getState(), r = n.sheetsByLowerCaseName;
2478
+ if (e && r.has(t)) throw new h(function(e) {
2479
+ return d("error.workbook.nameDuplicate", { sheetName: e });
2480
+ }(e));
2481
+ t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
2482
+ let i = n.lastId + 1;
2483
+ for (; !e;) {
2484
+ let t = this._createSheetName(i), n = t.toLowerCase();
2485
+ r.has(n) ? i++ : e = t;
2486
+ }
2487
+ return this._updateState({ lastId: i }), e;
2488
+ }
2489
+ _addSheet(e, t = null, n = null, r) {
2490
+ t = this._nextSheetName(t);
2491
+ let i = this._getState(), a = this._createSheet(i.lastId, t, R.Visibility.Visible, n, void 0, null, r);
2492
+ if (!a) throw new h(d("error.workbook.sheetNameBlank"));
2493
+ return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), a;
2494
+ }
2495
+ _updateSheetRefStates(e) {
2496
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2497
+ if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2498
+ let t = e, n = [], r = [], i = t.length;
2499
+ for (let e = 0; e < i; e++) t[e].visibility === R.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === R.Visibility.Hidden && r.push(t[e]);
2500
+ this._updateState({
2501
+ sheetRefsAll: t,
2502
+ sheetRefsVisible: n,
2503
+ sheetRefsVisibleAndHidden: r
2504
+ });
2505
+ }
2506
+ _tellSheets() {
2507
+ if (this._isLoadingSheets) return;
2508
+ let e = this._getState().sheetRefsAll;
2509
+ this._calculation._setSheets(e.map((e) => [e.sheet.getId(), e.name]));
2510
+ }
2511
+ _addSheetRef(e, t = null) {
2512
+ let n = this._getState(), r = n.sheetRefsAll, i = Math.max(0, Math.min(r.length, t ?? r.length)), a = [
2513
+ ...r.slice(0, i),
2514
+ e,
2515
+ ...r.slice(i)
2516
+ ];
2517
+ this._updateSheetRefStates(a);
2518
+ let o = e.sheet, s = e.name.toLowerCase(), c = new Map(n.refsById);
2519
+ c.set(e.id, e);
2520
+ let l = new Map(n.refsByLowerCaseName);
2521
+ l.set(s, e);
2522
+ let u = new Map(n.refsByInstance);
2523
+ u.set(o, e);
2524
+ let f = new Map(n.sheetsById);
2525
+ f.set(e.id, o);
2526
+ let p = new Map(n.sheetsByLowerCaseName);
2527
+ p.set(s, o);
2528
+ let m = this, h = n.listenersSheets;
2529
+ if (o !== void 0) {
2530
+ let t = o.addListeners({
2531
+ onBeforeDelete: (e) => {
2532
+ m._validateDeleteSheet(e);
2533
+ },
2534
+ onDelete(e) {
2535
+ let t = m._getSheetRef(e, R.Visibility.VeryHidden);
2536
+ if (!t) return;
2537
+ let n = m._beginCommit({ description: d("op.deleteSheet", { name: t.name }) });
2538
+ try {
2539
+ let r = m._getState(), i = r.sheetRefsAll, a = m._getOffsetForId(t.id, i), s = [...i];
2540
+ s.splice(a, 1), m._updateSheetRefStates(s);
2541
+ let c = new Map(r.refsById);
2542
+ c.delete(t.id);
2543
+ let l = new Map(r.sheetsById);
2544
+ l.delete(t.id);
2545
+ let u = t.name.toLowerCase(), d = new Map(r.refsByLowerCaseName);
2546
+ d.delete(u);
2547
+ let f = new Map(r.sheetsByLowerCaseName);
2548
+ f.delete(u);
2549
+ let p = new Map(r.refsByInstance);
2550
+ p.delete(e), r.listenersSheets.get(t.id)();
2551
+ let h = new Map(r.listenersSheets);
2552
+ h.delete(t.id), m._adjustRemoveSelectionIfRequired(a, t.id), m._adjustSheetNamesIfRequired(), m._sheetOnNameChange.delete(t.id), m._sheetOnVisibilityChange.delete(t.id), m._sheetOnIndexChange.delete(t.id), m._tellSheets(), m._emitter.notify("onSheetsChange");
2553
+ let g = new Set(r.sheetsCreated);
2554
+ g.has(o) && g.delete(o), m._updateState({
2555
+ refsById: c,
2556
+ sheetsById: l,
2557
+ refsByLowerCaseName: d,
2558
+ sheetsByLowerCaseName: f,
2559
+ refsByInstance: p,
2560
+ sheetsCreated: g,
2561
+ listenersSheets: h
2562
+ }), n.commit();
2563
+ } catch (e) {
2564
+ throw n.rollback(), e;
2565
+ }
2566
+ }
2567
+ }), r = o.addListeners({ onSelectionChange: (e) => {
2568
+ m.getView().getActiveSheetId() === m._getSheetRef(e)?.id && m._emitter.notify("onSelectionChange", {
2569
+ source: m,
2570
+ params: e
2571
+ });
2572
+ } }, { transactional: !1 });
2573
+ h = new Map(n.listenersSheets), h.set(e.id, () => {
2574
+ t(), r();
2575
+ });
2576
+ }
2577
+ let g = n.lastId;
2578
+ g !== -1 && (g = Math.max(g, e.id)), this._updateState({ lastId: g }), this._updateState({
2579
+ refsById: c,
2580
+ refsByLowerCaseName: l,
2581
+ refsByInstance: u,
2582
+ sheetsById: f,
2583
+ sheetsByLowerCaseName: p,
2584
+ listenersSheets: h
2585
+ }), this._adjustSheetNamesIfRequired();
2586
+ let _ = new Set(this._getState().sheetsCreated);
2587
+ return _.add(e.sheet), this._updateState({ sheetsCreated: _ }), this._tellSheets(), e;
2588
+ }
2589
+ _recordActiveSheet(e, t, n) {
2590
+ let r = this.getView().getId();
2591
+ e.setIntent(En, (e) => ({
2592
+ viewId: r,
2593
+ before: e?.before ?? t,
2594
+ after: n
2595
+ }));
2596
+ }
2597
+ _resyncActiveSheet(e, t) {
2598
+ let n = t?.sheetRefsVisible;
2599
+ if (!n?.length) return;
2600
+ let r = -1, i = n.length;
2601
+ for (let t = 0; t < i; t++) if (n[t].id === e) {
2602
+ r = t;
2603
+ break;
2604
+ }
2605
+ r === -1 && (r = Math.min(Math.max(this._activeSheetOffset, 0), i - 1));
2606
+ let a = n[r].id;
2607
+ this._view.getActiveSheetId() === a ? this._activeSheetOffset = r : this._view.setActiveSheetId(a);
2608
+ }
2609
+ _adjustRemoveSelectionIfRequired(e, t) {
2610
+ if (this._view.getActiveSheetId() === t) {
2611
+ let t, n = this._getState().sheetRefsVisible;
2612
+ t = e < n.length ? n[e].id : n[e - 1].id, this._view.setActiveSheetId(t);
2613
+ }
2614
+ }
2615
+ _adjustSheetNamesIfRequired() {
2616
+ let e = this._getState(), t = e.lastId;
2617
+ if (t === -1) return;
2618
+ let n = this._view.getActiveSheetId();
2619
+ n ??= (this._view.setActiveSheetId(t), t);
2620
+ let r = e.refsById.get(n);
2621
+ r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === R.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
2622
+ }
2623
+ _validateDeleteSheet(e) {
2624
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2625
+ if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2626
+ let t = this._getSheetRef(e);
2627
+ if (!t) throw new h(function(e) {
2628
+ return d("error.workbook.deleteKey", { key: e });
2629
+ }(e));
2630
+ let n = this._getState().sheetRefsVisible;
2631
+ if (n.length === 1 && n[0].id === t.id) throw new h(d("error.workbook.sheetOne"));
2632
+ }
2633
+ _getOffsetForId(e, t) {
2634
+ let n = t.length;
2635
+ for (let r = 0; r < n; r++) if (t[r].id === e) return r;
2636
+ throw new h(d("error.workbook.noVisibleRefs"));
2637
+ }
2638
+ find(t) {
2639
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2640
+ let n = this._getSheets();
2641
+ if (n.length === 1) return n[0].find(t);
2642
+ typeof t == "string" && (t = { text: t });
2643
+ let r = !t?.reverse, i = t?.disableWrap ?? !1, a = this.getSelectedSheetIndex(), o = a, s = n[o], c = !1;
2644
+ t = {
2645
+ ...t,
2646
+ disableWrap: !0
2647
+ };
2648
+ let l, u = s.find(t), f = u.next(), p = !1;
2649
+ if (t?.from) {
2650
+ let e = this._rangesAddressToCoords(t?.from);
2651
+ l = {
2652
+ colIndex: e[0].colStart,
2653
+ rowIndex: e[0].rowStart
2654
+ };
2655
+ }
2656
+ let m = e.createCellComparator(t?.axis, t?.reverse);
2657
+ delete (t = { ...t }).from;
2658
+ let h = () => {
2659
+ if (!p && f.done && (c && o === a ? p = !0 : r ? (o++, o > n.length - 1 && (o = 0, c = !0)) : (o--, o < 0 && (o = n.length - 1, c = !0)), i && c && (p = !0), p || l || !c || o !== a || (p = !0), !p)) {
2660
+ s = n[o], u = s.find(t);
2661
+ let e = f;
2662
+ return f = u.next(), e;
2663
+ }
2664
+ if (!p && c && o === a && (f.done || !l || !f.done && m(f.value.getCoords(), l) >= 0) && (p = !0), p) {
2665
+ let e = f;
2666
+ return f = Se, e;
2667
+ }
2668
+ let e = f;
2669
+ return f = u.next(), e;
2670
+ };
2671
+ return { next: () => {
2672
+ let e = h();
2673
+ for (; !p && e.done;) e = h();
2674
+ return e;
2675
+ } };
2676
+ }
2677
+ replace(e, t, n) {
2678
+ let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", u = typeof t == "string" ? de(t) : null, f = n?.description ?? l("op.replace"), p = this._transactions.beginCommit({ description: f });
2679
+ try {
2680
+ let f = null, m = null, h = e.next();
2681
+ for (; !h.done && r < o;) {
2682
+ let o = h.value, s = o.getSheet();
2683
+ s !== f && (f = s, m !== null && m.apply(), m = f.getEntireRange().createSparseBuilder({
2684
+ axis: n?.axis,
2685
+ allowUnorderedWrites: !0
2686
+ }));
2687
+ let c = a ? t(o) : t;
2688
+ c !== void 0 && c !== o && (m.push(o, c), r++, i = o), h = e.next();
2689
+ }
2690
+ m?.apply(), r === 1 && o === 1 && i && (c = i.getAddress()), r === 0 ? p.rollback() : p.commit({ description: n?.description ?? (s ? u === null ? l("op.replaceAll") : d("op.replaceAllWith", { value: u }) : c ? u === null ? d("op.replaceAt", { address: c }) : d("op.replaceAtWith", {
2691
+ address: c,
2692
+ value: u
2693
+ }) : u === null ? l("op.replace") : d("op.replaceWith", { value: u })) });
2694
+ } catch (e) {
2695
+ throw p.rollback(), e;
2696
+ }
2697
+ return {
2698
+ count: r,
2699
+ last: i
2700
+ };
2701
+ }
2702
+ _nextSheetIndex(e, t = this._getSheetRefs()) {
2703
+ let n = t.length;
2704
+ return n === 1 ? 0 : (e === void 0 && (e = this.getSelectedSheetIndex()), (e = Math.max(0, Math.min(e, n - 1))) >= n - 1 ? 0 : e + 1);
2705
+ }
2706
+ _prevSheetIndex(e, t = this._getSheetRefs()) {
2707
+ let n = t.length;
2708
+ return n === 1 ? 0 : (e === void 0 && (e = this.getSelectedSheetIndex()), (e = Math.max(0, Math.min(e, n - 1))) <= 0 ? n - 1 : e - 1);
2709
+ }
2710
+ getNextSheet(e) {
2711
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2712
+ let t = this._getSheetRefs();
2713
+ return t[this._nextSheetIndex(e, t)]?.sheet ?? null;
2714
+ }
2715
+ getPreviousSheet(e) {
2716
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2717
+ let t = this._getSheetRefs();
2718
+ return t[this._prevSheetIndex(e, t)]?.sheet ?? null;
2719
+ }
2720
+ async _duplicateSheet(e) {
2721
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2722
+ if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2723
+ let t = this._getSheetRefs(), n = this.getSelectedSheetIndex(), r = null;
2724
+ if (e) {
2725
+ if (r = this._getSheetRef(e), !r) throw new h(Z(r));
2726
+ } else r = t[n];
2727
+ if (!r) return null;
2728
+ let i = r.sheet, a = this._strings.beginPersist(), o = this.getResources().beginPersist(), s = this.getStyles().beginPersist(), c = null, l = this.beginCommit(d("op.duplicateNamed", { name: i.getName() }));
2729
+ try {
2730
+ let e = this._getState().refsByInstance.get(i), r = await i.toJSON(), a = t.length + 1, o = this.findValidSheetName(e.name), s = this._createSheet(a, o, e.visibility, n, void 0, r);
2731
+ this._tellSheets(), this._emitter.notify("onSheetsChange"), c = s, l.commit();
2732
+ } catch (e) {
2733
+ throw l.rollback(), e;
2734
+ } finally {
2735
+ s.endPersist(), o.endPersist(), a.endPersist();
2736
+ }
2737
+ return c;
2738
+ }
2739
+ _createRange(e, t) {
2740
+ let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, R.Visibility.VeryHidden) : null;
2741
+ if (!r) {
2742
+ let e = this.getSelectedSheet();
2743
+ return e ? (delete n?.scope, xn(n, n ? {
2744
+ scope: Qe,
2745
+ ...e.getEntireRange().getCoords()
2746
+ } : null)) : void console.warn(d("error.workbook.noVisibleRefs"));
2747
+ }
2748
+ let i = r.sheet, a = null;
2749
+ return t && (a = { getOptions: t }), new On(e, P(i), this, a);
2750
+ }
2751
+ _createRanges(e, t) {
2752
+ let n = this.getSelectedSheet(), r = null;
2753
+ return t && (r = { getOptions: t }), new Dn(e, P(n), this, r);
2754
+ }
2755
+ getRange(e, t) {
2756
+ if (e === void 0) return this.getSelectedRange(t);
2757
+ try {
2758
+ let n = this._rangesAddressToCoords(e);
2759
+ if (n.length !== 1) throw new h(d("error.address.singleRangeOnlyAlt"));
2760
+ return this._createRange(n[0], t);
2761
+ } catch (t) {
2762
+ throw t instanceof f ? new f(t.message) : new h(t.message ?? qe(e));
2763
+ }
2764
+ }
2765
+ getCell(e) {
2766
+ if (e === void 0) return this.getSelectedCell();
2767
+ let t = this.getRange(e);
2768
+ if (t.size > 1) throw new h(d("error.address.singleCellOnly"));
2769
+ return t.getCell();
2770
+ }
2771
+ getRanges(e, t) {
2772
+ let n = this._rangesAddressToCoords(e);
2773
+ if (n.length === 0) throw new h(qe(e));
2774
+ return this._createRanges(n, t);
2775
+ }
2776
+ _createGraphRanges(e, t) {
2777
+ let n = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
2778
+ for (let e = 0; e < t.length; e++) {
2779
+ let i = t[e], a = (i.sheetName ? this._getSheetRef(i.sheetName, R.Visibility.VeryHidden) : null)?.sheet ?? this.getSelectedSheet();
2780
+ a && n.push(new ce(i, r, P(a), null));
2781
+ }
2782
+ for (let t = 0; t < e.length; t++) n.push(e[t]);
2783
+ return n.length === 0 ? null : new Dn(n, P(this.getSelectedSheet()), this, null);
2784
+ }
2785
+ getStats(e) {
2786
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2787
+ let t = this._getSheets(R.Visibility.VeryHidden), n = t.length;
2788
+ if (n === 1) return t[0].getStats(e);
2789
+ let r = Array(n);
2790
+ for (let i = 0; i < n; i++) r[i] = t[i].getStats(e);
2791
+ return new nn(r);
2792
+ }
2793
+ _activeRangeCoords() {
2794
+ let e = this.getSelectedSheet(), t = e.getSelection().getRanges().getCoords(), n = e.getName(), r = t.length, i = Array(r);
2795
+ for (let e = 0; e < r; e++) {
2796
+ let r = t[e];
2797
+ i[e] = {
2798
+ colStart: r.colStart,
2799
+ colEnd: r.colEnd,
2800
+ rowStart: r.rowStart,
2801
+ rowEnd: r.rowEnd,
2802
+ scope: n
2803
+ };
2804
+ }
2805
+ return i;
2806
+ }
2807
+ getSelectedRange(e) {
2808
+ return this.getRange(this._activeRangeCoords()[0], e);
2809
+ }
2810
+ getSelectedRanges(e) {
2811
+ return this.getRanges(this._activeRangeCoords(), e);
2812
+ }
2813
+ getSelectedCell() {
2814
+ return this.getSelectedSheet().getSelectedCell();
2815
+ }
2816
+ _rangesAddressToCoords(e, t = !0, n = R.Visibility.Hidden) {
2817
+ if (!e) throw new h(d("error.address.noAddress"));
2818
+ let r = this.getSelectedSheet(), i = { ...r?.getEntireRange().getCoords() }, a = r?.getName();
2819
+ if (a && (i.scope = a), typeof e == "string") {
2820
+ let t = e.trim().toLowerCase();
2821
+ if (t === "r" || t === "c") {
2822
+ let n = this.getSelectedCell().getCoords(), r = {};
2823
+ t === "r" ? r.rowStart = r.rowEnd = n.rowIndex : r.colStart = r.colEnd = n.colIndex, e = r;
2824
+ }
2825
+ }
2826
+ let o = this, s = et(e, i, fe, (e) => {
2827
+ if (!t) return null;
2828
+ if (typeof e == "string") {
2829
+ let t = o.getNames().getByName(e)?.getRanges?.();
2830
+ if (t) return t.getCoords();
2831
+ }
2832
+ throw new h(`Invalid sheet reference '${e}'.`);
2833
+ }), c = s.length;
2834
+ for (let e = 0; e < c; e++) this._validateCoords(s[e], n);
2835
+ return s;
2836
+ }
2837
+ _validateCoords(t, n = R.Visibility.Visible, r = d("error.sheet.oobRange")) {
2838
+ if (t === null) return;
2839
+ let i = this.getSheet(t.scope, n).getEntireRange().getCoords();
2840
+ if (!e.isRangeWithinRange(t, i)) throw new f(r);
2841
+ if (t.rowEnd < t.rowStart || t.colEnd < t.colStart) throw new h(d("error.address.invalidRangeInverted"));
2842
+ }
2843
+ _updateSheetRef(e, t) {
2844
+ let n = this._getState(), r = [...n.sheetRefsAll];
2845
+ r[this._getOffsetForId(e.id, n.sheetRefsAll)] = t, this._updateSheetRefStates(r);
2846
+ let i = new Map(n.refsById);
2847
+ i.set(e.id, t);
2848
+ let a = e.name.toLowerCase(), o = t.name.toLowerCase(), s = new Map(n.refsByLowerCaseName);
2849
+ s.delete(a), s.set(o, t);
2850
+ let c = new Map(n.sheetsByLowerCaseName), l = c.get(a);
2851
+ c.delete(a), c.set(o, l);
2852
+ let u = new Map(n.refsByInstance);
2853
+ return u.set(l, t), this._updateState({
2854
+ refsById: i,
2855
+ refsByLowerCaseName: s,
2856
+ sheetsByLowerCaseName: c,
2857
+ refsByInstance: u
2858
+ }), this._tellSheets(), t;
2859
+ }
2860
+ _setSheetName(e, t, n) {
2861
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2862
+ if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2863
+ let r = this._getSheetRef(e);
2864
+ if (!r) throw new h(Z(e));
2865
+ if (t === r.name) return r.sheet;
2866
+ if ((t = this._validateNewSheetName(t)) == null) throw new h(d("error.workbook.sheetNameNotProvided"));
2867
+ let i = Object.freeze({
2868
+ ...r,
2869
+ name: t
2870
+ }), a = null, o = this.beginCommit(l("op.renameSheet"));
2871
+ try {
2872
+ let e = this._updateSheetRef(r, i);
2873
+ this._adjustSheetNamesIfRequired(), this._sheetOnNameChange.forEach((e, t) => {
2874
+ r.id === t && e();
2875
+ }), this._emitter.notify("onSheetsChange"), r.id === this.getView().getActiveSheetId() && this._emitter.notify("onSelectionChange"), a = e.sheet, o.commit(n);
2876
+ } catch (e) {
2877
+ throw o.rollback(), e;
2878
+ }
2879
+ return a;
2880
+ }
2881
+ _setSheetVisibility(e, t = R.Visibility.Visible, n) {
2882
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2883
+ if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2884
+ let r = this._getSheetRef(e, R.Visibility.VeryHidden);
2885
+ if (!r) return null;
2886
+ if (t === r.visibility) return;
2887
+ let i = null, a = "";
2888
+ t === R.Visibility.Visible ? a = l("op.unhideSheet") : t === R.Visibility.Hidden ? a = l("op.hideSheet") : t === R.Visibility.VeryHidden && (a = l("op.veryHideSheet"));
2889
+ let o = this.beginCommit(a);
2890
+ try {
2891
+ let e = this._getState().sheetRefsVisible;
2892
+ if (t !== R.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new h(d("error.workbook.sheetOne"));
2893
+ let a = {
2894
+ ...r,
2895
+ visibility: t
2896
+ }, s = -1;
2897
+ t !== R.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== R.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
2898
+ } catch (e) {
2899
+ throw o.rollback(), e;
2900
+ }
2901
+ return this._sheetOnVisibilityChange.forEach((e, t) => {
2902
+ r.id === t && e();
2903
+ }), this._emitter.notify("onSheetsChange"), i;
2904
+ }
2905
+ _moveSheet(e, t, n) {
2906
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2907
+ if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2908
+ let r = null, i = this.beginCommit(d("op.moveSheetNamed", { name: e.name }));
2909
+ try {
2910
+ let a = this._getState(), o = a.sheetRefsVisible;
2911
+ if (t < 0 || t > o.length - 1) throw new h(`Invalid to index: ${t}`);
2912
+ let s = this.getView().getActiveSheetId(), c = a.sheetRefsAll, l = this._getOffsetForId(e.id, c), u = this._getOffsetForId(o[t].id, c);
2913
+ if (l === u) return;
2914
+ let d = c[l], f = [...c];
2915
+ f.splice(l, 1), f.splice(u, 0, d), this._updateSheetRefStates(f), this._calculation._replaceSheetSpans?.(c.map((e) => e.sheet.getId()), f.map((e) => e.sheet.getId()), d.sheet.getId()), this._adjustSheetNamesIfRequired(), this._sheetOnIndexChange.forEach((e, t) => {
2916
+ t >= l && t <= u && e();
2917
+ }), this._tellSheets(), this._emitter.notify("onSheetsChange"), r = d.sheet, this._recordActiveSheet(i, s, this.getView().getActiveSheetId()), i.commit(n);
2918
+ } catch (e) {
2919
+ throw i.rollback(), e;
2920
+ }
2921
+ return r;
2922
+ }
2923
+ _setSelectedSheet(e) {
2924
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
2925
+ let t = this._getSheetRef(e);
2926
+ if (!t) throw new h(Z(e));
2927
+ let n = null;
2928
+ return t.visibility !== R.Visibility.Visible && this._setSheetVisibility(t, R.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
2929
+ }
2930
+ getProtection() {
2931
+ return this._protection;
2932
+ }
2933
+ getCodeName() {
2934
+ return this._codeName;
2935
+ }
2936
+ getNames() {
2937
+ return this._names;
2938
+ }
2939
+ getCalculation() {
2940
+ return this._calculation;
2941
+ }
2942
+ getFonts() {
2943
+ return G.getShared();
2944
+ }
2945
+ createFormula(e, t, n) {
2946
+ return this.getCalculation().createFormula(e, t, n);
2947
+ }
2948
+ evaluate(e, t) {
2949
+ return this.getCalculation().evaluate(e, t);
2950
+ }
2951
+ async whenCalculationReady() {
2952
+ let e = this._starting;
2953
+ return e ? e.then(() => this.getCalculation().ready()) : this.getCalculation().ready();
2954
+ }
2955
+ getScripts() {
2956
+ return this._scripts ||= this._createScripts(), this._scripts;
2957
+ }
2958
+ getModules() {
2959
+ return this.getScripts().getModules();
2960
+ }
2961
+ _notifyAllChange() {
2962
+ this._emitter.notify("onSheetsChange"), this._emitter.notify("onSelectedSheetChange"), this._emitter.notify("onViewChange");
2963
+ }
2964
+ addListeners(e, t) {
2965
+ return this._emitter.addListeners(e, t);
2966
+ }
2967
+ _sheetToWBEvent(e) {
2968
+ let t = this;
2969
+ return (n) => {
2970
+ let r = () => {
2971
+ let e = n.getSource();
2972
+ if (e.isInvalid()) return e;
2973
+ if (e.isICellRanges) {
2974
+ let n = [...e.getCoords()], r = n.length;
2975
+ for (let t = 0; t < r; t++) {
2976
+ let r = n[t];
2977
+ !r.scope && e.getSheet().getName() && (n[t] = {
2978
+ ...r,
2979
+ scope: e.getSheet().getName()
2980
+ });
2981
+ }
2982
+ return t.getRanges(n);
2983
+ }
2984
+ if (e.isICellRange) {
2985
+ let n = e.getCoords(), r = e.getSheet().getName();
2986
+ return t.getRange({
2987
+ ...n,
2988
+ scope: r
2989
+ });
2990
+ }
2991
+ };
2992
+ e({
2993
+ getSource: r,
2994
+ trigger: n.trigger,
2995
+ getFrom: () => t.getRanges(n.getFrom()),
2996
+ getTo: () => t.getRange(n.getTo()),
2997
+ isDataChange: n.isDataChange,
2998
+ getTransactionId: n.getTransactionId,
2999
+ isUndo: n.isUndo,
3000
+ toString: () => `WorkbookRangeEvent: ('${n.trigger}', ${r().toString()})`,
3001
+ timeStamp: Date.now()
3002
+ });
3003
+ };
3004
+ }
3005
+ _holdPivotCaches() {
3006
+ let e = this._pivotCaches;
3007
+ if (e.length === 0) return;
3008
+ let t = (e) => {
3009
+ let t = this._getSheetRef(e)?.sheet;
3010
+ return t ? t._contentAddWatch(() => null) : null;
3011
+ };
3012
+ for (let n = 0; n < e.length; n++) e[n]._hold(t);
3013
+ }
3014
+ _fromJSON(e, t) {
3015
+ if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || e.sheets.length === 0) throw new h(d("error.workbook.sheetOne"));
3016
+ e.theme && (this._theme = new me(e.theme), this._styles.setTheme(this._theme));
3017
+ let n = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist();
3018
+ try {
3019
+ n.fromJSON(e.strings), r.fromJSON(e.resources), i.fromJSON(e.styles), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view ||= {};
3020
+ let a = [], o = e.pivotCaches;
3021
+ if (o) {
3022
+ let e = r.fromResourceId.bind(r);
3023
+ for (let t = 0; t < o.length; t++) {
3024
+ let n = o[t];
3025
+ n && typeof n.cacheId == "number" && a.push(new on(n.cacheId, Fe.fromJSON(n.part, e)));
3026
+ }
3027
+ }
3028
+ this._pivotCaches = a, this._people.fromJSON(e.people);
3029
+ let s = e.sheets, c = s.length, l = e.view.activeSheetId ?? null;
3030
+ l !== null && (l = Math.min(Math.max(0, l), c - 1));
3031
+ let u = null, d = null;
3032
+ this._isLoadingSheets = !0;
3033
+ for (let e = 0; e < c; e++) {
3034
+ let n = s[e], r = n.visibility || R.Visibility.Visible, i = e;
3035
+ d = i, r === R.Visibility.Visible ? u === null && (u = i) : l !== null && l === i && (l = null);
3036
+ try {
3037
+ this._createSheet(i, n.name, r, e, n.sheetId, n.sheet, t?.[e]);
3038
+ } catch (e) {
3039
+ throw this._isLoadingSheets = !1, e;
3040
+ }
3041
+ }
3042
+ this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = l ?? u, this.setView(new pn({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3043
+ let f = this;
3044
+ this._protection = new hn(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3045
+ f._emitter.notify("onProtectionChange", { source: e });
3046
+ } }), this._emitter.notify("onLoad");
3047
+ } finally {
3048
+ i.endPersist(), r.endPersist(), n.endPersist();
3049
+ }
3050
+ }
3051
+ _createScripts(e) {
3052
+ let t = this;
3053
+ return new ln({
3054
+ transactions: this._transactions,
3055
+ json: e,
3056
+ workbook: t,
3057
+ getBuiltInFunctions: () => t._calculation?.getFunctions(),
3058
+ onAdd: (e, n) => {
3059
+ let r = t._calculation;
3060
+ r.getStatus() !== Xe.Status.Off && r.start().then(async () => {
3061
+ let e = n.getFunctions().getItems({
3062
+ type: "formula",
3063
+ includeHidden: !0
3064
+ }), t = e.length;
3065
+ for (let n = 0; n < t; n++) {
3066
+ let t = e[n];
3067
+ try {
3068
+ await this._calculation.getFunctions().add(t);
3069
+ } catch (e) {
3070
+ m.error(e?.message ?? String(e), e);
3071
+ }
3072
+ }
3073
+ }).catch(() => {});
3074
+ },
3075
+ onRemove: (e, t) => {}
3076
+ });
3077
+ }
3078
+ async toJSON(e) {
3079
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
3080
+ await Promise.resolve(this._starting);
3081
+ let t = this.getCalculation();
3082
+ t.getStatus() !== Xe.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3083
+ let n = { sheets: [] }, r = e?.ignoreStyles ?? !1;
3084
+ if (!r) {
3085
+ let e = this._theme.toJSON();
3086
+ (e ? Object.keys(e).length : 0) > 0 && (n.theme = e);
3087
+ }
3088
+ if (this._scripts) {
3089
+ let e = this._scripts.toJSON();
3090
+ e && Object.keys(e).length > 0 && (n.modules = e);
3091
+ }
3092
+ this._isDate1904 && (n.date1904 = !0), this._codeName && (n.codeName = this._codeName), this._updateLinks && (n.updateLinks = this._updateLinks), this._locale && (n.locale = this._locale), this._localeOverrides && (n.localeOverrides = this._localeOverrides);
3093
+ let i = e?.resources ?? "embed", a = i === "ignore", o = this._strings.beginPersist(), s = a ? null : this._resources.beginPersist(), c = this._styles.beginPersist();
3094
+ try {
3095
+ let t = this._getSheetRef(this.getSelectedSheetIndex()).id, l = t, u = null, d = this._getState(), f = d.sheetRefsAll, p = d.sheetsById, m = f.length;
3096
+ for (let r = 0; r < m; r++) {
3097
+ let i = f[r], a = r + 1, o = await p.get(i.id).toJSON(e), s = {
3098
+ name: i.name,
3099
+ sheet: o
3100
+ };
3101
+ i.sheetId !== void 0 && (s.sheetId = i.sheetId), i.visibility === R.Visibility.Visible ? u === null && (u = a) : s.visibility = i.visibility, i.id === t && (l = a), n.sheets.push(s);
3102
+ }
3103
+ if (!r) {
3104
+ let e = c.toJSON();
3105
+ e && Object.keys(e).length > 0 && (n.styles = e);
3106
+ }
3107
+ let h = this.getProtection().toJSON();
3108
+ h && (n.protection = h);
3109
+ let g = this._calculation.toJSON();
3110
+ Object.keys(g).length > 0 && (n.calc = g);
3111
+ let _ = await o.toJSONAsync();
3112
+ _ && _.length > 0 && (n.strings = _);
3113
+ let v = this._calculation.getExternalBooks().toJSON();
3114
+ v && (n.externalBooks = v);
3115
+ let y = this._pivotCaches;
3116
+ if (y.length > 0) {
3117
+ let e = s ? s.toResourceId.bind(s) : () => null, t = /* @__PURE__ */ new Set();
3118
+ for (let e of this.getPivotTables()) t.add(e.getCacheId());
3119
+ let r = [];
3120
+ for (let n = 0; n < y.length; n++) t.has(y[n].cacheId) && r.push(y[n].toJSON(e));
3121
+ r.length > 0 && (n.pivotCaches = r);
3122
+ }
3123
+ let b = this._people.toJSON();
3124
+ if (b && (n.people = b), !a) {
3125
+ let e = await s.toJSONAsync(typeof i == "function" ? i : void 0);
3126
+ e && e.length > 0 && (n.resources = e);
3127
+ }
3128
+ let x = this._calculation.getNamedFormulas().toJSON();
3129
+ x && x.length > 0 && (n.names = x);
3130
+ let S = this._view.toJSON();
3131
+ S && (l === u ? delete S.activeSheetId : S.activeSheetId = l, Object.keys(S).length > 0 && (n.view = S));
3132
+ } finally {
3133
+ c.endPersist(), a || s.endPersist(), o.endPersist();
3134
+ }
3135
+ return this._emitter.notify("onSave", { params: n }), n;
3136
+ }
3137
+ isClosed() {
3138
+ return this._closed;
3139
+ }
3140
+ close() {
3141
+ if (this._closed) return;
3142
+ this._emitter.notify("onClose");
3143
+ let e = this._getState();
3144
+ e.listenersSheets.forEach((e) => {
3145
+ e();
3146
+ }), e.listenersSheets.clear();
3147
+ let t = e.sheetRefsAll;
3148
+ for (let e = t.length - 1; e >= 0; e--) try {
3149
+ t[e].sheet.close();
3150
+ } catch (e) {
3151
+ console.warn("error on close", e);
3152
+ }
3153
+ this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof pt && this._originProvider.release(), this._closed = !0;
3154
+ }
3155
+ beginCommit(e) {
3156
+ if (this._closed) throw Error(d("error.workbook.modelClosed"));
3157
+ return this._beginCommit(typeof e == "string" ? { description: e } : e);
3158
+ }
3159
+ doBatch(e, t) {
3160
+ let n = this;
3161
+ return t = typeof t == "string" ? { description: t } : {
3162
+ description: l("op.updateWorkbook"),
3163
+ ...t
3164
+ }, this._transactions.doBatch(e, t, (e, t) => {
3165
+ e.getDepth() === 0 && (n._lastTransactionUUID = e.getId());
3166
+ });
3167
+ }
3168
+ _beginCommit(e) {
3169
+ let t = this;
3170
+ return this._transactions.beginCommit(typeof e == "string" ? { description: e } : e, (e) => {
3171
+ e.getDepth() === 0 && (t._lastTransactionUUID = e.getId());
3172
+ });
3173
+ }
3174
+ _getState() {
3175
+ return this._transactions.getState(this._id);
3176
+ }
3177
+ _updateState(e, t = l("op.updateWorkbook"), n) {
3178
+ if (!e) return;
3179
+ let r = this._beginCommit(t);
3180
+ try {
3181
+ r.updateState(this._id, e), r.commit(n);
3182
+ } catch (e) {
3183
+ throw r.rollback(), e;
3184
+ }
3185
+ }
3186
+ get options() {
3187
+ return this._options;
3188
+ }
3189
+ get [Symbol.toStringTag]() {
3190
+ return "[Workbook]";
3191
+ }
3192
+ toString() {
3193
+ return `[${this.getName() ?? "(untitled)"}]`;
3194
+ }
3195
+ get isIWorkbook() {
3196
+ return !0;
3197
+ }
3198
+ }, jn = { address: null }, Mn = class {
3199
+ constructor() {
3200
+ this._readFormats = [], this._writeFormats = [], this._encryptions = [];
3201
+ }
3202
+ async registerReadFormat(e) {
3203
+ this._readFormats = await this._registerFormatType(e, this._readFormats);
3204
+ }
3205
+ async registerWriteFormat(e) {
3206
+ this._writeFormats = await this._registerFormatType(e, this._writeFormats);
3207
+ }
3208
+ async registerEncryption(e) {
3209
+ if (!e) throw Error("encryption must be provided.");
3210
+ if (!e.key) throw Error("encryption.key must be provided.");
3211
+ let t = e.key.toLowerCase(), n = this._encryptions.findIndex((e) => e.key.toLowerCase() === t);
3212
+ if (n !== -1) {
3213
+ let t = [...this._encryptions];
3214
+ t[n] = e, this._encryptions = Object.freeze(t);
3215
+ } else this._encryptions = Object.freeze([...this._encryptions, e]);
3216
+ }
3217
+ async getEncryption(e) {
3218
+ return this.peekEncryption(e);
3219
+ }
3220
+ peekEncryption(e) {
3221
+ if (!e) return this._encryptions[0] ?? null;
3222
+ let t = e.toLowerCase();
3223
+ return this._encryptions.find((e) => e.key.toLowerCase() === t) ?? null;
3224
+ }
3225
+ async detectEncryption(e) {
3226
+ for (let t of this._encryptions) if (await t.detect(e)) return t;
3227
+ return null;
3228
+ }
3229
+ async getReadFormats(e) {
3230
+ return e ? this._filterFormats(e, this._readFormats) : [...this._readFormats];
3231
+ }
3232
+ async getWriteFormats(e) {
3233
+ return this._writeFormats ? e ? this._filterFormats(e, this._writeFormats) : [...this._writeFormats] : [];
3234
+ }
3235
+ async _registerFormatType(e, t) {
3236
+ return this._registerFormatTypeSync(e, t);
3237
+ }
3238
+ _registerFormatTypeSync(e, t) {
3239
+ if (!e) throw Error("format must be provided.");
3240
+ if (!e.key) throw Error("format.key must be provided.");
3241
+ let n = e.key.toLowerCase(), r = t.findIndex((e) => e.key.toLowerCase() === n);
3242
+ if (r !== -1) {
3243
+ let n = [...t];
3244
+ return n[r] = e, Object.freeze(n);
3245
+ }
3246
+ return Object.freeze([...t, e]);
3247
+ }
3248
+ _filterFormats(e, t, n) {
3249
+ if (!e || Object.keys(e).length === 0) {
3250
+ if (!n) return [...t];
3251
+ e = { ext: n };
3252
+ }
3253
+ let r = e.search?.toLocaleLowerCase();
3254
+ return t.filter((t) => {
3255
+ if (r) {
3256
+ let e = t.key.toLocaleLowerCase().includes(r), n = !!t.exts && t.exts.some((e) => e.toLocaleLowerCase().includes(r)), i = !!t.mimeType && t.mimeType.toLocaleLowerCase().includes(r), a = !!t.tags && t.tags.some((e) => e.toLocaleLowerCase().includes(r)), o = !!t.description && t.description.toLocaleLowerCase().includes(r);
3257
+ if (!(e || n || i || a || o)) return !1;
3258
+ }
3259
+ let i = e.ext || n;
3260
+ if (i) {
3261
+ let e = i.toLocaleLowerCase();
3262
+ if (!t.exts.some((t) => t.toLocaleLowerCase() === e)) return !1;
3263
+ }
3264
+ if (e.mimeType && t.mimeType !== e.mimeType || e.key && t.key.toLocaleLowerCase() !== e.key.toLocaleLowerCase()) return !1;
3265
+ if (e.tags) {
3266
+ let n = t.tags || [];
3267
+ if (!(typeof e.tags == "string" ? [e.tags] : e.tags).every((e) => n.includes(e))) return !1;
3268
+ }
3269
+ return !0;
3270
+ });
3271
+ }
3272
+ }, $ = /* @__PURE__ */ new WeakMap(), Nn = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", Pn = new class {
3273
+ constructor() {
3274
+ this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new y(this), this._registry = new Mn(), this._defaultStore = new ht(() => this.getWriteFormats(), () => this.getReadFormats());
3275
+ }
3276
+ getBackingStore() {
3277
+ return this._backingStore ?? this._defaultStore;
3278
+ }
3279
+ setBackingStore(e) {
3280
+ this._backingStore = e ?? null;
3281
+ }
3282
+ canWrite() {
3283
+ return typeof this.getBackingStore().write == "function";
3284
+ }
3285
+ canRead() {
3286
+ return typeof this.getBackingStore().read == "function";
3287
+ }
3288
+ async install(e) {
3289
+ this._setInstalled.has(e) || (await e.register(this._registry), this._setInstalled.add(e));
3290
+ }
3291
+ addListeners(e, t) {
3292
+ return this._emitter.addListeners(e, t);
3293
+ }
3294
+ addCommitListener(e) {
3295
+ return this._emitter.addListeners({ onWrite: (t, n) => {
3296
+ n.save && e.onCommit?.({
3297
+ store: n.workbook.getTransactions(),
3298
+ commitId: n.commitId
3299
+ });
3300
+ } });
3301
+ }
3302
+ async getReadFormats(e) {
3303
+ return this._registry.getReadFormats(e);
3304
+ }
3305
+ async getWriteFormats(e) {
3306
+ return this._registry.getWriteFormats(e);
3307
+ }
3308
+ getOrigin(e) {
3309
+ return new B(e);
3310
+ }
3311
+ async read(e) {
3312
+ let t = null;
3313
+ if (typeof e == "string") e = { source: e };
3314
+ else if (Nn(e)) {
3315
+ let n = e.getPath();
3316
+ if (!n) throw Error("Cannot read from an unbound origin (no path).");
3317
+ dt(e) ? e = {
3318
+ source: n,
3319
+ asCopy: !0
3320
+ } : (t = e, e = { source: n });
3321
+ }
3322
+ let n = e ?? {}, { source: r = null, ...i } = n, a = this.getBackingStore();
3323
+ return (a.read ? a : this._defaultStore).read({
3324
+ source: r,
3325
+ options: i,
3326
+ decode: (e, r) => this._decodeBuffer(e, r, n, t)
3327
+ });
3328
+ }
3329
+ async _decodeBuffer(e, t = {}, n, r = null) {
3330
+ let i = t.format, a = t.ext;
3331
+ if (!i && !a) throw Error("Either format or file extension must be provided to determine read type.");
3332
+ let o = (await this._registry.getReadFormats({
3333
+ search: i,
3334
+ ext: a
3335
+ }))[0];
3336
+ if (!o) throw new h(d("error.io.readFormatUnavailable", { format: i ?? a }));
3337
+ let s = n?.typedCreateWorkbookOptions, c = s ? Object.keys(s).find((e) => e.toLowerCase() === o.key.toLowerCase()) : void 0, l = {
3338
+ ...n,
3339
+ ...c === void 0 ? void 0 : s[c]
3340
+ };
3341
+ delete l.typedCreateWorkbookOptions, delete l.source, delete l.asCopy;
3342
+ let u = r ?? new B(t.absolutePath ?? null, {
3343
+ name: t.name ?? null,
3344
+ format: o.key,
3345
+ size: t.size ?? null,
3346
+ lastModified: t.lastModified ?? null,
3347
+ canWrite: t.canWrite ?? !1
3348
+ });
3349
+ r instanceof B && r.update({
3350
+ format: o.key,
3351
+ size: t.size ?? null,
3352
+ lastModified: t.lastModified ?? null
3353
+ }), l.createWorkbookOptions = {
3354
+ ...l.createWorkbookOptions || {},
3355
+ origin: u
3356
+ }, l.readonly !== void 0 && (l.createWorkbookOptions = {
3357
+ readonly: l.readonly,
3358
+ ...l.createWorkbookOptions
3359
+ }, delete l.readonly), l.calcOnly && (l.createWorkbookOptions = {
3360
+ disableLoadAutoFit: !0,
3361
+ ...l.createWorkbookOptions
3362
+ });
3363
+ let f = await this._decrypt(e, u, l);
3364
+ if (f === null) return null;
3365
+ e = f.bytes;
3366
+ let p = l?.progress?.onStart?.bind(l.progress);
3367
+ p && await Promise.resolve(p(u, t.size));
3368
+ try {
3369
+ let t = await this._readArrayBuffer(e, o, l);
3370
+ return f.password !== null && u.setPassword(f.password), l?.progress?.onComplete?.(u), this._emitter.notify("onRead", {
3371
+ params: {
3372
+ workbook: t,
3373
+ origin: u
3374
+ },
3375
+ transactional: !1
3376
+ }), t;
3377
+ } catch (e) {
3378
+ throw l?.progress?.onError?.(e), l?.progress?.onComplete?.(null), e;
3379
+ }
3380
+ }
3381
+ async _decrypt(e, n, r) {
3382
+ let i = await this._registry.detectEncryption(e);
3383
+ if (n instanceof B && n.update({ encryption: i ? i.key : null }), !i) return {
3384
+ bytes: e,
3385
+ password: null
3386
+ };
3387
+ let a = null, o = async (t) => {
3388
+ try {
3389
+ return a = await i.decode(e, t), !0;
3390
+ } catch (e) {
3391
+ if (!(e instanceof u)) throw e;
3392
+ return !1;
3393
+ }
3394
+ };
3395
+ if (r?.password && await o(r.password)) return {
3396
+ bytes: a,
3397
+ password: r.password
3398
+ };
3399
+ if (!r?.onPassword) {
3400
+ let e = n.getName();
3401
+ throw new t(e ? d("error.io.passwordRequired", { name: e }) : d("error.io.passwordRequiredUnnamed"));
3402
+ }
3403
+ let s = await Promise.resolve(r.onPassword({
3404
+ origin: n,
3405
+ encryption: i.key,
3406
+ validate: o
3407
+ }));
3408
+ if (s == null) return null;
3409
+ if (a !== null || await o(s)) return {
3410
+ bytes: a,
3411
+ password: s
3412
+ };
3413
+ throw new u(d("error.io.passwordIncorrect"));
3414
+ }
3415
+ async writeArrayBuffer(e, t) {
3416
+ if (!t?.format) throw Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
3417
+ let n = (await this._registry.getWriteFormats({ search: t.format }))[0];
3418
+ if (!n) throw new h(d("error.io.writeFormatUnavailable", { format: t.format }));
3419
+ return this._writeArrayBuffer(e, n, t);
3420
+ }
3421
+ async write(e, t, n) {
3422
+ return typeof t == "string" || Nn(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
3423
+ }
3424
+ async writeAs(e, t, n) {
3425
+ if (!t) throw Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
3426
+ return this._write(e, t, !0, n);
3427
+ }
3428
+ async _write(e, n, r, i) {
3429
+ if (!e) throw Error("Workbook must be provided.");
3430
+ if (!e.isIWorkbook) throw Error("Invalid workbook model provided. Must be an instance of IWorkbook.");
3431
+ let a, o = typeof n == "string" ? this.getOrigin(n) : n, s = o.getFormat();
3432
+ if ((i?.format || s) && (a = (await this._registry.getWriteFormats({ search: i?.format ?? s ?? void 0 }))[0]), a || o.getPath() && o.canWrite() && o.getExtension() || (a = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !a) throw new h(d("error.io.writeFormatUnresolved"));
3433
+ let c = o.getExtension();
3434
+ if (i?.format && c && o.getPath() && o.canWrite() && !a.exts.includes(c)) {
3435
+ let e = (await this._registry.getWriteFormats({ ext: c }))[0];
3436
+ if (e && e.key !== a.key) {
3437
+ let e = o.getPath().split(/[/\\]/).pop();
3438
+ throw new h(d("error.io.writeFormatMismatch", {
3439
+ format: i.format,
3440
+ file: e
3441
+ }));
3442
+ }
3443
+ }
3444
+ if (typeof n == "string") {
3445
+ let e = o.getPath();
3446
+ o = new B(z(e) ? e : `${e}.${a.exts[0]}`, { format: a.key });
3447
+ }
3448
+ let l = o.getEncryption(), u = e.getOrigin?.(), f = (o instanceof B ? o.getPassword() : null) ?? (u instanceof B ? u.getPassword() : null), p = o.isEncrypted() || (u?.isEncrypted() ?? !1), m = i?.password === void 0 ? f ?? (p ? void 0 : null) : i.password, g = null;
3449
+ if (m === void 0) {
3450
+ if (p) {
3451
+ let e = o.getName();
3452
+ throw new t(e ? d("error.io.passwordRequiredSave", { name: e }) : d("error.io.passwordRequiredSaveUnnamed"));
3453
+ }
3454
+ } else if (m !== null && (g = await this._registry.getEncryption(l), !g)) throw new h(d("error.io.encryptionUnavailable"));
3455
+ let _ = `${o.getName() ?? d("workbook.defaultName")}.${a.exts[0]}`, v = i?.progress, y = !o.getPath() || !o.canWrite() || !!i?.prompt, b = !1, x = this, S = null, C = [], w = {
3456
+ workbook: e,
3457
+ format: a,
3458
+ origin: o,
3459
+ suggestedName: _,
3460
+ prompt: i?.prompt,
3461
+ async encode(t, n) {
3462
+ let s = n ?? o;
3463
+ await (async (e) => {
3464
+ b || (b = !0, v?.onStart && await Promise.resolve(v.onStart(e)));
3465
+ })(s), S = e.getTransactions?.()?.getCurrentCommit() ?? S;
3466
+ let c = t ? (await x._registry.getWriteFormats({ search: t }))[0] ?? a : a, l = [], u = ((e, t) => ({
3467
+ onStart: e?.onStart ? (t, n) => e.onStart(t, n) : void 0,
3468
+ onProgress: e?.onProgress ? (t, n) => e.onProgress(t, n) : void 0,
3469
+ onError: e?.onError ? (t) => e.onError(t) : void 0,
3470
+ onComplete: e?.onComplete ? (t) => e.onComplete(t) : void 0,
3471
+ onWarning: (n, r) => {
3472
+ t.push({
3473
+ message: n ?? "",
3474
+ context: r
3475
+ }), e?.onWarning?.(n, r);
3476
+ }
3477
+ }))(v, l), d = await x._writeArrayBuffer(e, c, {
3478
+ ...i,
3479
+ progress: u
3480
+ }), f = $.get(s);
3481
+ if (l.some((e) => !f?.has(e.message)) && i?.onWarnings) {
3482
+ let t = await Promise.resolve(i.onWarnings({
3483
+ workbook: e,
3484
+ origin: s,
3485
+ warnings: l,
3486
+ save: r,
3487
+ canCancel: !y
3488
+ }));
3489
+ if (!y && !1 === t) return null;
3490
+ }
3491
+ return C = l, g ? g.encode(d, m) : d;
3492
+ }
3493
+ }, T = null;
3494
+ try {
3495
+ let t = this.getBackingStore();
3496
+ if (!t.write) throw Error("The active backing store is read-only (no write implementation).");
3497
+ if (T = await t.write(w), T) {
3498
+ if (m !== void 0 && T instanceof B && (T.setPassword(m), T.update({ encryption: g ? g.key : null })), C.length) {
3499
+ let e = $.get(T) ?? /* @__PURE__ */ new Set();
3500
+ for (let t of C) e.add(t.message);
3501
+ $.set(T, e);
3502
+ }
3503
+ r && T !== e.getOrigin() && dt(e.getOrigin())?.setOrigin(T);
3504
+ let t = S ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
3505
+ this._emitter.notify("onWrite", {
3506
+ params: {
3507
+ workbook: e,
3508
+ origin: T,
3509
+ commitId: t?.getId() ?? null,
3510
+ save: r
3511
+ },
3512
+ transactional: !1
3513
+ });
3514
+ }
3515
+ v?.onComplete && await Promise.resolve(v.onComplete(T));
3516
+ } catch (e) {
3517
+ let t = e instanceof Error ? e : Error(String(e));
3518
+ throw v?.onError && await Promise.resolve(v.onError(t)), v?.onComplete && await Promise.resolve(v.onComplete(null)), t instanceof h ? t : Error(d("error.io.writeFailed", { reason: t.message }), { cause: e });
3519
+ }
3520
+ return T;
3521
+ }
3522
+ _stripExtension(e) {
3523
+ let t = z(e);
3524
+ return t ? e.slice(0, e.length - t.length - 1) : e;
3525
+ }
3526
+ _baseName(e) {
3527
+ if (!e) return null;
3528
+ let t = e.split(/[?#]/)[0], n = t.split(/[/\\]/).pop() ?? t;
3529
+ return this._stripExtension(n) || null;
3530
+ }
3531
+ async _writeArrayBuffer(e, t, n) {
3532
+ if (!t) throw Error("A write format must be provided.");
3533
+ let r = t.handler;
3534
+ if (!r) throw Error(`Unable to resolve a write handler for '${t.key}'.`);
3535
+ return r(e, {
3536
+ ...n,
3537
+ format: t.key
3538
+ });
3539
+ }
3540
+ async _readArrayBuffer(e, t, n) {
3541
+ if (!e) throw Error("ArrayBuffer must be specified.");
3542
+ if (!t) throw Error("format must be specified.");
3543
+ if (e.byteLength === 0) return new An(n?.createWorkbookOptions);
3544
+ let r, i = t.handler;
3545
+ if (!i) throw Error(`Unable to resolve a read handler for '${t.key}'.`);
3546
+ try {
3547
+ r = await i(e, n);
3548
+ } catch (e) {
3549
+ throw e instanceof h ? e : new h(d("error.io.readFailed", {
3550
+ format: t.description ?? t.key,
3551
+ reason: e?.message ?? String(e)
3552
+ }), { cause: e });
3553
+ }
3554
+ return await Ee(), r;
3555
+ }
3556
+ get isIWorkbookIO() {
3557
+ return !0;
3558
+ }
3559
+ }();
3560
+ [
3561
+ ".woff2",
3562
+ ".woff",
3563
+ ".ttf",
3564
+ ".otf",
3565
+ ".ttc"
3566
+ ].map((e) => ({
3567
+ suffix: e,
3568
+ place: (e, t) => t ? `${t}/${e}` : e
3569
+ })), gn ||= {}, _n ||= {}, Cn ||= {}, (wn ||= {}).Type = {
3570
+ Button: "button",
3571
+ CheckBox: "checkBox",
3572
+ OptionButton: "optionButton",
3573
+ ListBox: "listBox",
3574
+ DropDown: "dropDown",
3575
+ ScrollBar: "scrollBar",
3576
+ Spinner: "spinner",
3577
+ GroupBox: "groupBox",
3578
+ Label: "label",
3579
+ EditBox: "editBox",
3580
+ Dialog: "dialog",
3581
+ Unknown: "formControl"
3582
+ }, (Tn ||= {}).DropStyle = {
3583
+ Combo: "combo",
3584
+ ComboEdit: "comboEdit",
3585
+ Simple: "simple"
3586
+ };
3587
+ var Fn = class extends Ke {
3588
+ constructor(e) {
3589
+ super(e);
3590
+ }
3591
+ _initializeOptions(e) {
3592
+ return e = {
3593
+ ...e,
3594
+ coords: {
3595
+ colStart: 0,
3596
+ rowStart: 0,
3597
+ colEnd: (e?.size?.width ?? 5) - 1,
3598
+ rowEnd: (e?.size?.height ?? 5) - 1
3599
+ },
3600
+ getRanges: (e) => new he(null)
3601
+ }, super._initializeOptions(e);
3602
+ }
3603
+ }, In = "0.8.0-beta.10";
3604
+ export { Ct as _, zt as a, dn as c, G as d, ut as f, fn as g, In as h, B as i, $t as l, cn as m, Pn as n, Ut as o, st as p, An as r, Zt as s, It as t, Fn as u };