@sheetxl/studio-vanilla 0.6.9 → 0.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/browser/cjs/{CXUE5rWOVjcuv0l_.cjs → 0g1QZyv2wrvbRsdS.cjs} +1 -1
  2. package/browser/cjs/{D-qChmIFBCv1KOJi.cjs → 2EWWcHVDCZl4KBZh.cjs} +1 -1
  3. package/browser/cjs/{BjPuP-3W9W6NYT9V.cjs → 8kr1vhDEGTvGJAzA.cjs} +1 -1
  4. package/browser/cjs/B-iy63zNyyCfawO7.cjs +11 -0
  5. package/browser/cjs/{BJolSqJdWmY2L4Ef.cjs → B256ouyF_cklxHtX.cjs} +1 -1
  6. package/browser/cjs/{BpKRXhkK43wUi3CT.cjs → B6FgF4mYdSVu9k73.cjs} +1 -1
  7. package/browser/cjs/{BQLogR50C1MmG-XE.cjs → BAhbxVlq2_8drv_m.cjs} +1 -1
  8. package/browser/cjs/{CG4-r53H7Fj0-ZIR.cjs → BBrRZz5B2zoHAN9Y.cjs} +2 -2
  9. package/browser/cjs/{CLR2tw7tediAT4i3.cjs → BLDPuLeHWaJWwDmS.cjs} +1 -1
  10. package/browser/cjs/{BfsUYILdtXqrRJcT.cjs → BOq6rTMNi2H5ziRF.cjs} +1 -1
  11. package/browser/cjs/{DGfuDq_pQpahk68H.cjs → BOyoY_HQ258IRL7A.cjs} +2 -2
  12. package/browser/cjs/{BDcqdbUbeR_-OhaB.cjs → BR2feSbxQhiUx0ve.cjs} +1 -1
  13. package/browser/cjs/BWTZzkrzhBVcZcVO.cjs +6 -0
  14. package/browser/cjs/{DIWL3lIzZf2aFofI.cjs → BXsNN5OIqFIISk8z.cjs} +2 -2
  15. package/browser/cjs/{CdZ9xkB0-a1lq_sb.cjs → BjBwKyqsdtwBZmra.cjs} +1 -1
  16. package/browser/cjs/{BaEJI0g_NZYXRqmi.cjs → Bsh4gxB-AZa6vrho.cjs} +2 -2
  17. package/browser/cjs/BykeMXuqQ1Tsu8VV.cjs +330 -0
  18. package/browser/cjs/C46TuR3F7SprGoGG.cjs +6 -0
  19. package/browser/cjs/CA-866I7v6Zutlv9.cjs +6 -0
  20. package/browser/cjs/{4cCHMenOpUoMX-ey.cjs → CKHVD5SXHioheGLB.cjs} +1 -1
  21. package/browser/cjs/{CtPiMI5aoPJOoZPJ.cjs → CM5hMK1pUIh1eBbC.cjs} +4 -4
  22. package/browser/cjs/{BwdB25GiF1GKOWgl.cjs → CMpcVmK6NyIHZbQe.cjs} +1 -1
  23. package/browser/cjs/{BKPebwj1mIm-UfnC.cjs → CS2tXWHBVQIU67gY.cjs} +2 -2
  24. package/browser/cjs/{CZCl2XsgHAVVRgdU.cjs → CUIFforYlaNEvC1I.cjs} +4 -4
  25. package/browser/cjs/{1ZoSnZDEnt4sv55J.cjs → CW9Eb3taF--hyjO6.cjs} +2 -2
  26. package/browser/cjs/{Dy2m6bBCyB88enAm.cjs → CXy8i5LdgNECIsU8.cjs} +1 -1
  27. package/browser/cjs/{BaJWOQgGQnlMkxle.cjs → CaxLcPMfTfCP3HVM.cjs} +1 -1
  28. package/browser/cjs/{hv5j4S3_A-WFYwNc.cjs → Ce_zwBSNT8mlAnXL.cjs} +1 -1
  29. package/browser/cjs/{B1wfwwcJt9yQ9pny.cjs → Chy6NUkZXtPqgrZR.cjs} +2 -2
  30. package/browser/cjs/{B_q-1a6tXu_2TCnG.cjs → CkUIJkk4tGcBLDzt.cjs} +1 -1
  31. package/browser/cjs/{BmEqdu_KT06_KPmp.cjs → Ck_XSvnhc4XECkOd.cjs} +1 -1
  32. package/browser/cjs/{BulFNFFGWG7Q9Qqf.cjs → Cn41imsLOCTVlRxR.cjs} +2 -2
  33. package/browser/cjs/{C0QVeL8Oz6OLWY4S.cjs → Cq7t367tAjzZiHrA.cjs} +1 -1
  34. package/browser/cjs/{CYbqkA-I7eIMNbFC.cjs → CxhPRHgwpIAMDc_a.cjs} +2 -2
  35. package/browser/cjs/{DMLO1Nqc6wPdNt6e.cjs → CyCkK_PTjuR-1olP.cjs} +1 -1
  36. package/browser/cjs/{CuXA1jL8nYqRNyHC.cjs → CzmxW1qMzEA20ta2.cjs} +2 -2
  37. package/browser/cjs/{DXaK7ErUogYPqrbF.cjs → D-tsTUrXJ9H8SVUo.cjs} +1 -1
  38. package/browser/cjs/{Bqv1apOdfGQ8HWku.cjs → D1nvLhV8dNYsMbTo.cjs} +3 -3
  39. package/browser/cjs/{CizXrDFtnDzvp5GD.cjs → DEC-4LETKmaxAyGk.cjs} +1 -1
  40. package/browser/cjs/{CJSHJZnpGkEHxwTv.cjs → DLeD6vyjEjWPn6HD.cjs} +2 -2
  41. package/browser/cjs/{CH8vR45FnfXkvrJK.cjs → DM_MA2z9EviuPzoA.cjs} +1 -1
  42. package/browser/cjs/{D7vhUxv7ilVI5dOy.cjs → DSCY0h0k7_NGFAa9.cjs} +1 -1
  43. package/browser/cjs/{BTN3kUQ33wHj3-SE.cjs → D_q5Ft7rHeY_SEc_.cjs} +1 -1
  44. package/browser/cjs/{DdeWYeqiG6oDZOLT.cjs → DfHcrDlwCCeVJVws.cjs} +1 -1
  45. package/browser/cjs/{D3C8w3J8yEW_mK07.cjs → DgmHf9dI4VJCZbDp.cjs} +1 -1
  46. package/browser/cjs/{Bsibmu1cGnqOhDce.cjs → Dko_G-DbgBQsU8gK.cjs} +3 -3
  47. package/browser/cjs/{DzUtl3xEaPr2h5py.cjs → DtVW16ZMhSlBHrUI.cjs} +2 -2
  48. package/browser/cjs/{BIHX7SNYLh8tESWI.cjs → Dvswt6wd4E_kc9U6.cjs} +4 -4
  49. package/browser/cjs/{N-l_Uv53y3rLMUwH.cjs → DxTLX-Xu-p7q-rx1.cjs} +1 -1
  50. package/browser/cjs/{DBOfqYF0FuaGdU2_.cjs → U2nILmJF7mZ0IwB0.cjs} +2 -2
  51. package/browser/cjs/bJoZrtU3DvP8WHgg.cjs +6 -0
  52. package/browser/cjs/{Cch1zyhCk3YWvO-A.cjs → fCZqW0EpUS-vX5Ub.cjs} +1 -1
  53. package/browser/cjs/{CeeZ0BYOlyVekqjR.cjs → hvbMSwM_KarZIwXU.cjs} +2 -2
  54. package/browser/cjs/index.cjs +2 -2
  55. package/browser/cjs/{NpqJS8IvavlIoQ7p.cjs → kUPfWN5_ixae-NhP.cjs} +1 -1
  56. package/browser/cjs/{P5bweAaALnbuUnFz.cjs → lVAnc94189QEW85A.cjs} +2 -2
  57. package/browser/cjs/{CRH3t4ElGYXJai5K.cjs → sTEaI4C-lqFBtWvq.cjs} +2 -2
  58. package/browser/cjs/{CKgIw2SxEAIMBJnl.cjs → yXhxuzgDDWBV547R.cjs} +1 -1
  59. package/{cdn/assets/BW5l6iS-31FNFEUx.js → browser/esm/4BPCTIlF0pqI05ht.mjs} +1 -1
  60. package/browser/esm/{BWj7rV2MefNCGjZk.mjs → 7Dybvm0k5M0Rgxi9.mjs} +3 -3
  61. package/browser/esm/{CJjQplFdYThKlGF6.mjs → A0mKJagiIIafETKt.mjs} +6 -6
  62. package/browser/esm/{4zACS7fi_-m4_ce9.mjs → B371bLYYzBAadUNu.mjs} +2 -2
  63. package/{cdn/assets/Bng9ix9sfxbQZqg-.js → browser/esm/B3lbG_j1N1BUm4A1.mjs} +1 -1
  64. package/browser/esm/{Bd_TWnJ56S2tc933.mjs → B413hlEwLRdL7jdK.mjs} +5 -5
  65. package/browser/esm/{3ipr8iZEA2Lr1bGA.mjs → B6EnN2PTngU4fW3X.mjs} +4 -4
  66. package/browser/esm/{LWUa7tpq7j9-n6Ef.mjs → BBSmKE3PyYmNnNG5.mjs} +4 -4
  67. package/browser/esm/{B7XHld4IQbV1dmD8.mjs → BEPO_VFY_vEEcx57.mjs} +1 -1
  68. package/{cdn/assets/XQ_lEQBwU6Yc24dZ.js → browser/esm/BHC5dYgDe-yxi9pL.mjs} +1 -1
  69. package/browser/esm/{DrBLmfEvbDdCLYHg.mjs → BHguDOHteRDQL56G.mjs} +1 -1
  70. package/{cdn/assets/xfzdS0frUCeEtUbz.js → browser/esm/BKB3NbD6Z1Zx00fn.mjs} +1 -1
  71. package/{cdn/assets/DLv9_A2FRBPPugOR.js → browser/esm/BWVfVWPfko24QQTK.mjs} +1 -1
  72. package/browser/esm/{Dl7WapPl0fLnWm-o.mjs → BYLVMtwTimlP_9hg.mjs} +3 -3
  73. package/browser/esm/{3Dpm5egDa1V9NdGx.mjs → BZ1qIk9UaulOvJeC.mjs} +1 -1
  74. package/browser/esm/{BD1fmHO9kWVYpTn1.mjs → BaiPAiVsT4N84J6g.mjs} +2 -2
  75. package/{cdn/assets/BTWAhZsiVaprBGuq.js → browser/esm/BjsepRAVD0aE76wy.mjs} +2 -2
  76. package/{cdn/assets/91OCWp65Lh5ppevX.js → browser/esm/BrEA-Ll98LSBU5pb.mjs} +1 -1
  77. package/browser/esm/{HW-V5yVryy6T8xzs.mjs → BtxyhWlEL5IaY_hm.mjs} +7 -7
  78. package/{cdn/assets/C8wjkakCU0WmC5Dn.js → browser/esm/BxFQDHGfap0k7f8z.mjs} +1 -1
  79. package/browser/esm/{BM1G3_OQLbZr0rnk.mjs → CAD2eGmHD0r_Cj4u.mjs} +3 -3
  80. package/browser/esm/{CwQX6aDhumT_9Q1K.mjs → CBZnNZe8v548iJ_R.mjs} +1 -1
  81. package/browser/esm/{BQdwnK_VSkFn4lCK.mjs → CCfcJvj7nqz0qwrf.mjs} +1 -1
  82. package/browser/esm/{BkL2pHNfEpgy5AjI.mjs → CGkWXHIuW7Zea8eC.mjs} +16 -16
  83. package/{cdn/assets/5qa-WBpZKEe4Ogh2.js → browser/esm/CMnJNhH4Ay8dZGXp.mjs} +1 -1
  84. package/{cdn/assets/DY20lrCHUieeDicO.js → browser/esm/CPOvQuec4xYzOXDx.mjs} +1 -1
  85. package/{cdn/assets/Bsch6gORnudqZwVq.js → browser/esm/CT8OrAikF_X8OlTe.mjs} +6 -8
  86. package/browser/esm/{DPkY06F0vQMWpBCC.mjs → Cb39jxbqw2Riaewe.mjs} +2 -2
  87. package/browser/esm/{i89czqIGWW-6IN90.mjs → CcUOUH3-vLOcNeWo.mjs} +1 -1
  88. package/browser/esm/{CwHSQHPfeogKoBoY.mjs → Cecgq9vdu7WniaRl.mjs} +1 -1
  89. package/browser/esm/{CwPlu0AeEpe0XYsE.mjs → CjHEGzsBP2ps07ya.mjs} +1 -1
  90. package/browser/esm/{0MTYz8tJRkoCGZzF.mjs → CjHoMkU6X3s9wTwJ.mjs} +1 -1
  91. package/{cdn/assets/CJWcf9kZErAGQkK1.js → browser/esm/Ckz0-uTyB9pPnWVd.mjs} +1 -1
  92. package/browser/esm/{B-cjDIBT2VklBYeC.mjs → CtlaeZi8a0W6xVye.mjs} +1 -1
  93. package/{cdn/assets/Ble3ihgcekQfK3B_.js → browser/esm/D3eToVxChBm1vskm.mjs} +1 -1
  94. package/browser/esm/{jjEKB6Jbsh3AjdA_.mjs → DJVSp6k73bUNcSEM.mjs} +1 -1
  95. package/browser/esm/{CUSevRNH6XNYSTMz.mjs → DJfa0QB-LbuVDa-x.mjs} +193 -192
  96. package/browser/esm/{dT2-g9AtdFbAepFd.mjs → DMe6xRvjt3iQ0qa4.mjs} +2 -2
  97. package/{cdn/assets/C9LjcFsOsH-T9RE1.js → browser/esm/DeQF8cAfpEj04GBF.mjs} +1 -1
  98. package/browser/esm/{DvVNH_i2C7DSqkej.mjs → DgY0aShDtY6hxbQh.mjs} +2 -2
  99. package/browser/esm/{dccJ0Zb4ezHbdHlw.mjs → DmbiRnIM6oc8lzbG.mjs} +1 -1
  100. package/browser/esm/{CgvYxl-8vcaaqQNn.mjs → DqBww2VmIy1kjaRI.mjs} +1 -1
  101. package/browser/esm/{DgoERJBX4ar9cKe7.mjs → DqvsG_Kt5h7OXOD4.mjs} +1 -1
  102. package/browser/esm/{CJRNrFY2_fuYhFzN.mjs → Dr3-VaDEehS5r3lW.mjs} +1 -1
  103. package/{cdn/assets/CSf8GiBiZnrqHDpM.js → browser/esm/Ds6-ZtMzNBnapRPR.mjs} +1 -1
  104. package/browser/esm/Dz_Xpa7-vaKrl6gi.mjs +10 -0
  105. package/{cdn/assets/VlS6qOo0BApKuraY.js → browser/esm/Jo81Ec76yqof_D2n.mjs} +2 -2
  106. package/{cdn/assets/7d1Vn9ZPowvw8KGz.js → browser/esm/QnOc_115EfuiMrV9.mjs} +2 -2
  107. package/browser/esm/XrnAhMT2xm37Qcui.mjs +10 -0
  108. package/browser/esm/{B48YCRMiJCy8-uo5.mjs → be56x0hvyZjriF-C.mjs} +2 -2
  109. package/browser/esm/{D_-y8IhesILZ4tnZ.mjs → cMpuf0nUKBKIvP6-.mjs} +9 -9
  110. package/browser/esm/{MD_E4lvBRo_augAU.mjs → e9sNJT-C4juKOvPJ.mjs} +1 -1
  111. package/{cdn/assets/OxSKnyWAEpg5PsII.js → browser/esm/f1sPjK-5gCikEO7x.mjs} +1 -1
  112. package/browser/esm/index.mjs +2 -2
  113. package/browser/esm/{DwIBlukg9B0cEOp-.mjs → j8k5EUdYa05M8Dx4.mjs} +4 -4
  114. package/browser/esm/{DaD2MU-2RQc5gMNJ.mjs → n5ivgVEV9XXtLNNI.mjs} +4 -4
  115. package/browser/esm/{CAJ6C5VMtWhyJJx2.mjs → nSlm8uWfv0TKCPMH.mjs} +2 -2
  116. package/browser/esm/{B_CyYygjLPHMFaOs.mjs → sFj63f4s74BFpJl4.mjs} +14099 -14078
  117. package/cdn/assets/{BLuNQHXC-V-MfDcj.js → -sMQ5ptS-I77owZz.js} +7 -7
  118. package/{browser/esm/BW5l6iS-31FNFEUx.mjs → cdn/assets/4BPCTIlF0pqI05ht.js} +1 -1
  119. package/cdn/assets/{Dz1xMt8FctgB2-OB.js → 4_eVc_NHveHr_iYh.js} +10 -10
  120. package/{browser/esm/Bng9ix9sfxbQZqg-.mjs → cdn/assets/B3lbG_j1N1BUm4A1.js} +1 -1
  121. package/cdn/assets/{C0G3pUQkCol3zN7U.js → B5ggAX8if47B8zgf.js} +33 -33
  122. package/cdn/assets/{DUpAuNDCz94KK39E.js → B9M_HdQR_7nCf0PF.js} +4 -4
  123. package/cdn/assets/{BJ8br6jkSlp0O4YB.js → BA84bb8x6bfiOlla.js} +1 -1
  124. package/cdn/assets/{B7XHld4IQbV1dmD8.js → BEPO_VFY_vEEcx57.js} +1 -1
  125. package/{browser/esm/XQ_lEQBwU6Yc24dZ.mjs → cdn/assets/BHC5dYgDe-yxi9pL.js} +1 -1
  126. package/cdn/assets/{DrBLmfEvbDdCLYHg.js → BHguDOHteRDQL56G.js} +1 -1
  127. package/cdn/assets/{UVD__1wXHI_R_JrB.js → BHqxKaUWRnqlOIwU.js} +4 -4
  128. package/{browser/esm/xfzdS0frUCeEtUbz.mjs → cdn/assets/BKB3NbD6Z1Zx00fn.js} +1 -1
  129. package/cdn/assets/{2AGc6eLTYagfdb_F.js → BWPDJIAKkspYDjeG.js} +2 -2
  130. package/{browser/esm/DLv9_A2FRBPPugOR.mjs → cdn/assets/BWVfVWPfko24QQTK.js} +1 -1
  131. package/cdn/assets/{BlQb8YFDM-0GCRen.js → BXtrrp3TwXPldY5p.js} +3 -3
  132. package/cdn/assets/{3Dpm5egDa1V9NdGx.js → BZ1qIk9UaulOvJeC.js} +1 -1
  133. package/cdn/assets/{JSGLcwOt970MLSz_.js → BkDeNlXS9IF_cU9l.js} +10 -10
  134. package/{browser/esm/91OCWp65Lh5ppevX.mjs → cdn/assets/BrEA-Ll98LSBU5pb.js} +1 -1
  135. package/cdn/assets/{DpHg8vSuOwzhZ8va.js → Bt7MaehKrr9HHrl_.js} +193 -192
  136. package/{browser/esm/C8wjkakCU0WmC5Dn.mjs → cdn/assets/BxFQDHGfap0k7f8z.js} +1 -1
  137. package/cdn/assets/{CwQX6aDhumT_9Q1K.js → CBZnNZe8v548iJ_R.js} +1 -1
  138. package/cdn/assets/{DO15jgHFM8r_cd4h.js → CC_ssLj3EZenV9ci.js} +3 -3
  139. package/cdn/assets/{BQdwnK_VSkFn4lCK.js → CCfcJvj7nqz0qwrf.js} +1 -1
  140. package/cdn/assets/{CqDkvFWJ5TTkA4An.js → CDl3cGYRe3FVTAa0.js} +2 -2
  141. package/cdn/assets/{CfbUY4iA-KC-HwMd.js → CHBYGIRMkPSTfKHz.js} +9 -9
  142. package/{browser/esm/5qa-WBpZKEe4Ogh2.mjs → cdn/assets/CMnJNhH4Ay8dZGXp.js} +1 -1
  143. package/{browser/esm/DY20lrCHUieeDicO.mjs → cdn/assets/CPOvQuec4xYzOXDx.js} +1 -1
  144. package/cdn/assets/{Bdj5knA_qC0CeQP_.js → CRGvn7E4ngCBM7q1.js} +2 -2
  145. package/cdn/assets/{Cu4iM0RF98ZktjPQ.js → CZ8wwk5mEEEIq0FP.js} +3 -3
  146. package/cdn/assets/{i89czqIGWW-6IN90.js → CcUOUH3-vLOcNeWo.js} +1 -1
  147. package/cdn/assets/{CwHSQHPfeogKoBoY.js → Cecgq9vdu7WniaRl.js} +1 -1
  148. package/{browser/esm/DvnbTrr1a25Bw3Q0.mjs → cdn/assets/CiQ1bXvali4tgsRH.js} +2 -2
  149. package/cdn/assets/{CwPlu0AeEpe0XYsE.js → CjHEGzsBP2ps07ya.js} +1 -1
  150. package/cdn/assets/{0MTYz8tJRkoCGZzF.js → CjHoMkU6X3s9wTwJ.js} +1 -1
  151. package/{browser/esm/CJWcf9kZErAGQkK1.mjs → cdn/assets/Ckz0-uTyB9pPnWVd.js} +1 -1
  152. package/cdn/assets/{DYUSMk7zgJjlElMh.js → CqLqtJUqZ_vShU25.js} +4 -4
  153. package/cdn/assets/{DYZBZ7zWUU5S9N4t.js → CwiZnPVW2X9r3FKB.js} +3 -3
  154. package/{browser/esm/Ble3ihgcekQfK3B_.mjs → cdn/assets/D3eToVxChBm1vskm.js} +1 -1
  155. package/cdn/assets/{BpHqnjG6_A_iZy--.js → D556jZ6f2NRUvUyF.js} +14936 -14915
  156. package/{browser/esm/C5toxLwX1xly5ni4.mjs → cdn/assets/D6KyT1Esxw1TEgUu.js} +2 -2
  157. package/cdn/assets/{jjEKB6Jbsh3AjdA_.js → DJVSp6k73bUNcSEM.js} +1 -1
  158. package/cdn/assets/{D_17PMRsUyONTQLp.js → DNwggyYaFafLdQV0.js} +21 -21
  159. package/cdn/assets/{CQxER7Aq1ua_kdwa.js → DUeMOZjhpvJ_6uhS.js} +2 -2
  160. package/cdn/assets/{D_abAgUd-7o05Qwa.js → DaB2B7Zar-aUVirp.js} +2 -2
  161. package/cdn/assets/Dc1kMbzWjvllPqe1.js +43 -0
  162. package/{browser/esm/C9LjcFsOsH-T9RE1.mjs → cdn/assets/DeQF8cAfpEj04GBF.js} +1 -1
  163. package/cdn/assets/{DdUcB5l48Pr_Qyce.js → DfFtQgx2dh9vIP0c.js} +9 -9
  164. package/cdn/assets/{BkDRMMQpYcDJo_LF.js → DiiI8CNWqen-tunB.js} +4 -4
  165. package/cdn/assets/{dccJ0Zb4ezHbdHlw.js → DmbiRnIM6oc8lzbG.js} +1 -1
  166. package/cdn/assets/{CgvYxl-8vcaaqQNn.js → DqBww2VmIy1kjaRI.js} +1 -1
  167. package/cdn/assets/{DgoERJBX4ar9cKe7.js → DqvsG_Kt5h7OXOD4.js} +1 -1
  168. package/cdn/assets/{CJRNrFY2_fuYhFzN.js → Dr3-VaDEehS5r3lW.js} +1 -1
  169. package/{browser/esm/CSf8GiBiZnrqHDpM.mjs → cdn/assets/Ds6-ZtMzNBnapRPR.js} +1 -1
  170. package/cdn/assets/Dz_Xpa7-vaKrl6gi.js +10 -0
  171. package/{browser/esm/DrCApYAgM59b1gkb.mjs → cdn/assets/IzSH40VnDHnVyGKo.js} +2 -2
  172. package/cdn/assets/{5gQ_mS4isigP5ESA.js → KtA9rkFunJ_pznZ7.js} +4 -4
  173. package/cdn/assets/{UqIDPaqYrdp_CbFM.js → L1HZTkI2V44CIIqF.js} +11 -11
  174. package/cdn/assets/XrnAhMT2xm37Qcui.js +10 -0
  175. package/cdn/assets/{Dl-a7-_qzDbgeRKv.js → dBypFeuqSOAN27DS.js} +4 -4
  176. package/cdn/assets/{MD_E4lvBRo_augAU.js → e9sNJT-C4juKOvPJ.js} +1 -1
  177. package/{browser/esm/OxSKnyWAEpg5PsII.mjs → cdn/assets/f1sPjK-5gCikEO7x.js} +1 -1
  178. package/cdn/assets/{vAlH-fnjW9UgVoQL.js → jCSnsi7oZvNEZ68R.js} +1 -1
  179. package/cdn/assets/{ev6SuzxjaCmJsLou.js → o4XtjKEYah97mq2L.js} +27 -27
  180. package/cdn/assets/{BmbVMB14jDSRfeyg.js → rS6lMMOdCvbDI366.js} +2 -2
  181. package/cdn/index.js +2 -2
  182. package/cdn/loader.js +1 -1
  183. package/package.json +3 -3
  184. package/browser/cjs/1yauO7dmzjUaAZLh.cjs +0 -11
  185. package/browser/cjs/BD2XOp_mCEDiU1Vc.cjs +0 -6
  186. package/browser/cjs/BQroH-EqHlkbCQXw.cjs +0 -6
  187. package/browser/cjs/DPCTm_ZmEZ2rV5oX.cjs +0 -6
  188. package/browser/cjs/Dl3Vea8PMrr9yITV.cjs +0 -6
  189. package/browser/cjs/h--y53Cz6XBstcC3.cjs +0 -330
  190. package/browser/esm/DKtZ47pCqe_X87ze.mjs +0 -10
  191. package/browser/esm/DdccOJLGMMaxHZ2C.mjs +0 -41
  192. package/browser/esm/DivcJTGEgdJhrXuv.mjs +0 -10
  193. package/cdn/assets/DKtZ47pCqe_X87ze.js +0 -10
  194. package/cdn/assets/DivcJTGEgdJhrXuv.js +0 -10
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default={ADDRESS:{s:"Creates a cell reference as text, given specified row and column numbers",p:{rowNum:{d:"is the row number to use in the cell reference: Row_number = 1 for row 1"},columnNum:{d:"is the column number to use in the cell reference. For example, Column_number = 4 for column D"},absNum:{d:"specifies the reference type: absolute = 1; absolute row/relative column = 2; relative row/absolute column = 3; relative = 4",v:1},a1:{d:"is a logical value that specifies the reference style: A1 style = 1 or TRUE; R1C1 style = 0 or FALSE",v:!0},sheetText:{d:"is text specifying the name of the worksheet to be used as the external reference",v:""}}},AREAS:{s:"Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell",p:{references:{d:"is a reference to a cell or range of cells and can refer to multiple areas"}}},CHOOSE:{s:"Chooses a value or action to perform from a list of values, based on an index number",p:{indexNum:{d:"specifies which value argument is selected. Index_num must be between 1 and 254, or a formula or a reference to a number between 1 and 254"},value1:{d:"value1,value2,... are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects"},value:{}}},CHOOSECOLS:{s:"Returns columns from an array or reference.",p:{array:{d:"The array or reference from which to choose columns."},colNum1:{d:"col_num1,col_num2,... The number of the column to be returned."},colNum:{}}},CHOOSEROWS:{s:"Returns rows from an array or reference.",p:{array:{d:"The array or reference from which to choose rows."},rowNum1:{d:"row_num1,row_num2,... The number of the row to be returned."},rowNum:{}}},COLUMN:{s:"Returns the column number of a reference",p:{reference:{d:"is the cell or range of contiguous cells for which you want the column number. If omitted, the cell containing the COLUMN function is used"}}},COLUMNS:{s:"Returns the number of columns in an array or reference",p:{array:{d:"is an array or array formula, or a reference to a range of cells for which you want the number of columns"}}},DROP:{s:"Drops rows or columns from array start or end.",p:{array:{d:"The array from which to drop rows or columns."},row:{d:"The number of rows to drop. A negative value drops from the end of the array."},columns:{d:"The number of columns to drop. A negative value drops from the end of the array.",v:0}},h:"Unimplemented"},EXPAND:{s:"Expands an array to the specified dimensions.",p:{array:{d:"The array to expand."},row:{d:"The number of rows in the expanded array. If missing, rows will not be expanded."},columns:{d:"The number of columns in the expanded array. If missing, columns will not be expanded.",v:0},padWidth:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},FIELDVALUE:{s:"Extracts a value from a field of a given record",p:{value:{d:"The record from which you want to extract the field"},fieldName:{d:"The names of the field or fields that you want to extract"}},h:"Unimplemented"},FILTER:{s:"Filter a range or array",p:{array:{d:"the range or array to filter"},include:{d:"an array of booleans where TRUE represents a row or column to retain"},ifEmpty:{d:"return if no items are retained"}},h:"Unimplemented"},FORMULATEXT:{s:"Returns a formula as a string",p:{reference:{d:"is a reference to a formula"}}},GETPIVOTDATA:{s:"Extracts data stored in a PivotTable.",p:{dataField:{d:"is the name of the data field to extract data from"},pivotTable:{d:"is a reference to a cell or range of cells in the PivotTable that contains the data you want to retrieve"},field1:{d:"field1,field2,... field to refer to"},item1:{d:"item1,item2,... field item to refer to"}},h:"Unimplemented"},GROUPBY:{s:"Aggregate values by row fields",p:{rowFields:{d:"The range or array containing the row fields"},values:{d:"The range or array containing the values to aggregate"},fn:{d:"The function used to do the aggregations"},fieldHeaders:{d:"A number between 0 and 3 that specifies whether the field data has headers and whether field headers should be returned in the results",v:null},totalDepth:{d:"Show totals for the row fields. 0 for none, 1 for grand totals, 2 for grand total and first level subtotals, etc",v:2},sortOrder:{d:"The column index to sort the row fields on. A negative index will sort in reverse order",v:null},filterArray:{d:"param-534 paramName-535",v:null},fieldRelationship:{d:"The relationship of fields when multiple columns are supplied to the row_fields argument",v:0}},h:"Unimplemented"},HLOOKUP:{s:"Looks for a value in the top row of a table or array of values and returns the value in the same column from a row you specify",p:{lookupValue:{d:"is the value to be found in the first row of the table and can be a value, a reference, or a text string"},tableArray:{d:"is a table of text, numbers, or logical values in which data is looked up. Table_array can be a reference to a range or a range name"},rowIndexNum:{d:"is the row number in table_array from which the matching value should be returned. The first row of values in the table is row 1"},rangeLookup:{d:"is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE; find an exact match = FALSE",v:!0}}},HSTACK:{s:"Horizontally stacks arrays into one array.",p:{array1:{},array:{d:"array1,array2,... An array or reference to be stacked."}},h:"Unimplemented"},HYPERLINK:{s:"Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet",p:{linkLocation:{d:"is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path"},friendlyName:{d:"is text or a number that is displayed in the cell. If omitted, the cell displays the Link_location text"}},h:"Unimplemented"},IMAGE:{s:"Returns an image from a given source",p:{source:{d:"The path of the source that points to the image"},alternateText:{d:"The alternative text that describes the image for accessibility"},sizing:{d:"The setting that determines the dimensions in which the image will be rendered in the cell"},height:{d:"The custom height of the image in pixels"},width:{d:"The custom width of the image in pixels"}},h:"Unimplemented"},INDEX:{s:"Returns a value or reference of the cell at the intersection of a particular row and column, in a given range",p:{array:{d:"is a range of cells or an array constant."},rowNum:{d:"selects the row in Array or Reference from which to return a value. If omitted, Column_num is required",v:0},colNum:{d:"selects the column in Array or Reference from which to return a value. If omitted, Row_num is required",v:0},areaNum:{d:"selects the area in Array or Reference from which to return a value. If omitted, the first area is used",v:1}}},INDIRECT:{s:"Returns the reference specified by a text string",p:{refText:{d:"is a reference to a cell that contains an A1- or R1C1-style reference, a name defined as a reference, or a reference to a cell as a text string"},a1:{d:"is a logical value that specifies the type of reference in Ref_text: R1C1-style = FALSE; A1-style = TRUE.",v:!0}}},LOOKUP:{s:"Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility",p:{lookupValue:{d:"is a value that LOOKUP searches for in Lookup_vector and can be a number, text, a logical value, or a name or reference to a value"},lookupVector:{d:"is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order"},resultVector:{d:"is a range that contains only one row or column, the same size as Lookup_vector"}},h:"Unimplemented"},MATCH:{s:"Returns the relative position of an item in an array that matches a specified value in a specified order",p:{lookupValue:{d:"is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these"},lookupArray:{d:"is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array"},matchType:{d:"is a number 1, 0, or -1 indicating which value to return."}},h:"Unimplemented"},OFFSET:{s:"Returns a reference to a range that is a given number of rows and columns from a given reference",p:{reference:{d:"is the reference from which you want to base the offset, a reference to a cell or range of adjacent cells"},rows:{d:"is the number of rows, up or down, that you want the upper-left cell of the result to refer to"},cols:{d:"is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to"},height:{d:"is the height, in number of rows, that you want the result to be, the same height as Reference if omitted"},width:{d:"is the width, in number of columns, that you want the result to be, the same width as Reference if omitted"}}},PIVOTBY:{p:{rowFields:{},colFields:{},values:{},fn:{},fieldHeaders:{v:null},rowTotalDepth:{v:2},rowSortOrder:{v:null},colTotalDepth:{v:2},colSortOrder:{v:null},filterArray:{v:null},relativeTo:{v:0}},h:"Unimplemented"},ROW:{s:"Returns the row number of a reference",p:{reference:{d:"is the cell or a single range of cells for which you want the row number; if omitted, returns the cell containing the ROW function"}}},ROWS:{s:"Returns the number of rows in a reference or array",p:{array:{d:"is an array, an array formula, or a reference to a range of cells for which you want the number of rows"}}},RTD:{s:"Retrieves the real-time data (RTD) from a program that supports COM automation",p:{progId:{d:"is the programmatic identifier (ProgID) of a registered COM automation add-in. Enclose the id in quotation marks"},server:{d:"is the name of the server that provides the real-time data. If running locally us an empty string"},topic:{d:"topic1,topic2,... are 1 to 38 parameters that specify a piece of data"}},h:"Unimplemented"},SORT:{s:"Sorts a range or array",p:{array:{d:"the range or array to sort"},sortIndex:{d:"a number indicating the row or column to sort by"},sortOrder:{d:"a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order"},byCol:{d:"a logical value indicating the desired sort direction: FALSE to sort by row (default), TRUE to sort by column",v:!1}},h:"Unimplemented"},SORTBY:{s:"Sorts a range or array based on the values in a corresponding range or array",p:{array:{d:"the range or array to sort"},byArray1:{d:"by_array1,by_array2,... the range or array to sort on"},sortOrder:{d:"sort_order1,sort_order2,... a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order"}},h:"Unimplemented"},TAKE:{s:"Returns rows or columns from array start or end.",p:{array:{d:"The array from which to take rows or columns."},rows:{d:"The number of rows to take. A negative value takes from the end of the array."},columns:{d:"The number of columns to take. A negative value takes from the end of the array.",v:0}},h:"Unimplemented"},TOCOL:{s:"Returns the array as one column.",p:{array:{d:"The array or reference to return as a column."},ignore:{d:"Whether to ignore certain types of values. By default, no values are ignored.",v:0},scanByColumn:{d:"Scan the array by column. By default, the array is scanned by row.",v:!1}},h:"Unimplemented"},TOROW:{s:"Returns the array as one row.",p:{array:{d:"The array or reference to return as a column."},ignore:{d:"Whether to ignore certain types of values. By default, no values are ignored.",v:0},scanByColumn:{d:"Scan the array by column. By default, the array is scanned by row.",v:!1}},h:"Unimplemented"},TRANSPOSE:{s:"Converts a vertical range of cells to a horizontal range, or vice versa",p:{array:{d:"is a range of cells on a worksheet or an array of values that you want to transpose"}}},TRIMRANGE:{s:"Trims a range to the last used cell in any direction.",p:{range:{d:"The range to be trimmed"},rowTrimMode:{d:"Row trim direction. 0 - none, 1 - leading, 2 - trailing, 3 - both.",v:3},colTrimMode:{d:"Column trim direction. 0 - none. 1 - leading, 2 - trailing, 3 - both.",v:3}}},UNIQUE:{s:"Returns the unique values from a range or array.",p:{array:{d:"the range or array from which to return unique rows or columns"},byCol:{d:"is a logical value: compare rows against each other and return the unique rows = FALSE; compare columns against each other and return the unique columns = TRUE",v:!1},exactlyOnce:{d:"is a logical value: return rows or columns that occur exactly once from the array = TRUE; return all distinct rows or columns from the array = FALSE",v:!1}},h:"Unimplemented"},VLOOKUP:{s:"Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order",p:{lookupValue:{d:"is the value to be found in the first column of the table, and can be a value, a reference, or a text string"},tableArray:{d:"is a table of text, numbers, or logical values, in which data is retrieved. Table_array can be a reference to a range or a range name"},colIndexNum:{d:"is the column number in table_array from which the matching value should be returned. The first column of values in the table is column 1"},rangeLookup:{d:"is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE; find an exact match = FALSE",v:!0}}},VSTACK:{s:"Vertically stacks arrays into one array.",p:{array1:{d:"array1,array2,... An array or reference to be stacked."},array:{d:"array1,array2,... An array or reference to be stacked."}},h:"Unimplemented"},WRAPCOLS:{s:"Wraps a row or column vector after a specified number of values.",p:{vector:{d:"The vector or reference to wrap."},wrapCount:{d:"The maximum number of values per column."},padWith:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},WRAPROWS:{s:"Wraps a row or column vector after a specified number of values.",p:{vector:{d:"The vector or reference to wrap."},wrapCount:{d:"The maximum number of values per column."},padWith:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},XLOOKUP:{s:"Searches a range or an array for a match and returns the corresponding item from a second range or array. By default, an exact match is used",p:{lookupValue:{d:"is the value to search for"},lookupArray:{d:"is the array or range to search"},returnArray:{d:"is the array or range to return"},ifNotFound:{d:"returned if no match is found"},rangeLookup:{v:!0},matchMode:{d:"specify how to match lookup_value against the values in lookup_array"},searchMode:{d:"specify the search mode to use. By default, a first to last search will be used",v:!0}},h:"Unimplemented"},XMATCH:{s:"Returns the relative position of an item in an array. By default, an exact match is required",p:{lookupValue:{d:"is the value to search for"},lookupArray:{d:"is the array or range to search"},matchMode:{d:"specify how to match the lookup_value against the values in lookup_array"},searchMode:{d:"specify the search mode to use. By default, a first to last search will be used",v:!0}},h:"Unimplemented"}};
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./BykeMXuqQ1Tsu8VV.cjs"),g=require("./B-iy63zNyyCfawO7.cjs");class z{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const G=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,X=u=>{const t=parseInt(u);return isNaN(t)?null:t},W=u=>{const t=parseFloat(u);return isNaN(t)?null:t},$=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??$}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new z(s)}getFromPath(t,e){return p.Xt.getFromPath(t,e)}setToPath(t,e,s){return p.Xt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return G}get INT_COPY(){return X}get FLOAT_COPY(){return W}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class K{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Xt.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Z{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(!r||r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class J extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const M=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class Q{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){M(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class tt{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),f(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),M(t,e,i),i}}class et{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class x{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),f(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),A(t,e,r,"majorTickMark","majorTickMarks"),A(t,e,r,"minorTickMark","minorTickMarks"),A(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),A(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),A(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),A(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let d=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),d?h.text=d.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&Y(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[p.rt.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class st{visit(t,e,s){const r={};return f(t,e,r,"overlay","overlay"),A(t,e,r,"legendPos","position"),s.legend=r,r}}class ot extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class _ extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};f(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class it{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),A(t,r,o,"xMode","xMode"),A(t,r,o,"yMode","yMode"),A(t,r,o,"wMode","wMode"),A(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class nt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class lt extends D{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class at{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[p.rt.getPanoseFallback(i)]),s}}class ct{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ut{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:p.xd.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:p.xd.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:p.xd.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:p.xd.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:p.xd.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:p.xd.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=g.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=g.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class ht{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=g.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?p.io$1.CaseSensitiveOptions:p.io$1.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&g.b(e.getAttribute("columnSort"))&&(r.orientation=p.w.Orientation.Column);const i=p.go.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=p.go.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=g.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class U{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=g.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=p.rt.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||p.rt.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.rt.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.rt.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Z$1.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Z$1.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Z$1.BuiltInSheetPattern.Solid:p.Z$1.BuiltInSheetPattern.None);if(o===p.Z$1.BuiltInSheetPattern.None)return{none:!0};s.type=p.Z$1.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Z$1.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.U.Edge.Left),this.processBorderStroke(t,e,i,p.U.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.U.Edge.Vertical),this.processBorderStroke(t,e,i,p.U.Edge.Top),this.processBorderStroke(t,e,i,p.U.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.U.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends U{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:p.Z$1.Type.None},r.fills[1]={type:p.Z$1.Type.Pattern,patternType:p.Z$1.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.ct.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||g.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let d;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(d=b.get(h)),s.numberFormat=d??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=g.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=p.Y.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.Y.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,g.b(e?.getAttribute("wrapText"))?r.overflow=p.Y.Overflow.Wrap:r.overflow=p.Y.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.Y.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=g.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=p.Y.ReadingDirection.Auto:o==="1"?r.readingDirection=p.Y.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.Y.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!g.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&g.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=g.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=g.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),d=c.getAttribute("dxfId");let m=r?.[d];m||(console.warn("invalid dfx id",d),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const d=a.item(h);d.nodeType===1&&d.localName==="tableStyle"&&this.processTableStyle(t,d,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=g.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class gt extends U{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class dt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class mt{visit(t,e,s){return s}}class k{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.n.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new K),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Z),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new q),this.registerVisitor("c:barChart",new J),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Q),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new x),this.registerVisitor("c:valAx",new x),this.registerVisitor("c:dateAx",new x),this.registerVisitor("c:majorGridlines",new S("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new S("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new st),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new rt),this.registerVisitor("c:ser",new ot,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new _),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new it),this.registerVisitor("c:dispUnits",new S("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new _("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new nt),this.registerVisitor("a:theme",new lt,"themeElements/clrScheme"),this.registerVisitor("a:theme",new at,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ut),this.registerVisitor("sortState",new ht),this.registerVisitor("s:workbook",new gt),this.registerVisitor("styleSheet",new pt),this.registerVisitor("table",new dt),this.registerVisitor("hlinkClick",new ct),this.registerVisitor("wsDr",new mt),this.registerVisitor("twoCellAnchor",new k),this.registerVisitor("oneCellAnchor",new k),this.registerVisitor("absoluteAnchor",new k),this.registerVisitor("graphicFrame",new bt),this.registerVisitor("sp",new B),this.registerVisitor("grpSp",new At),this.registerVisitor("cxnSp",new yt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new vt),this.registerVisitor("rvData",new Ft),this.registerVisitor("comments",new Ct),this.registerVisitor("commentList",new wt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Pt),this.registerVisitor("threadedComment",new Nt),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Ot)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Tt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new V(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(d){console.warn(`Error in afterVisit: ${h.context.getPath()}`,d)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const d=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)d(m.item(b))}else d(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const d=c.item(h);if(d.nodeType===1){const m=d,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=E,exports.default=E;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,9 +1,9 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./h--y53Cz6XBstcC3.cjs");var xo=typeof global=="object"&&global&&global.Object===Object&&global,Ms=typeof self=="object"&&self&&self.Object===Object&&self,Pt=xo||Ms||Function("return this")(),At=Pt.Symbol,Co=Object.prototype,Us=Co.hasOwnProperty,Fs=Co.toString,Ae=At?At.toStringTag:void 0,Ds=Object.prototype.toString,Kr=At?At.toStringTag:void 0;function Zt(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Kr&&Kr in Object(t)?(function(n){var r=Us.call(n,Ae),i=n[Ae];try{n[Ae]=void 0;var o=!0}catch{}var s=Fs.call(n);return o&&(r?n[Ae]=i:delete n[Ae]),s})(t):(e=t,Ds.call(e));var e}function vt(t){return t!=null&&typeof t=="object"}function Tn(t){return typeof t=="symbol"||vt(t)&&Zt(t)=="[object Symbol]"}function An(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var B=Array.isArray,Vr=At?At.prototype:void 0,Hr=Vr?Vr.toString:void 0;function ko(t){if(typeof t=="string")return t;if(B(t))return An(t,ko)+"";if(Tn(t))return Hr?Hr.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var js=/\s/,Bs=/^\s+/;function It(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var $s=/^[-+]0x[0-9a-f]+$/i,Ws=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,zs=parseInt,Ks=1/0;function Vs(t){return t?(t=(function(e){if(typeof e=="number")return e;if(Tn(e))return NaN;if(It(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=It(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=(function(i){return i&&i.slice(0,(function(o){for(var s=o.length;s--&&js.test(o.charAt(s)););return s})(i)+1).replace(Bs,"")})(e);var r=Ws.test(e);return r||Gs.test(e)?zs(e.slice(2),r?2:8):$s.test(e)?NaN:+e})(t))===Ks||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:t===0?t:0}function In(t){var e=Vs(t),n=e%1;return e==e?n?e-n:e:0}function de(t){return t}function Ht(t){if(!It(t))return!1;var e=Zt(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"}var Yr,bn=Pt["__core-js_shared__"],Xr=(Yr=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+Yr:"",Hs=Function.prototype.toString;function ie(t){if(t!=null){try{return Hs.call(t)}catch{}try{return t+""}catch{}}return""}var Ys=/^\[object .+?Constructor\]$/,Xs=Function.prototype,qs=Object.prototype,Zs=Xs.toString,Qs=qs.hasOwnProperty,Js=RegExp("^"+Zs.call(Qs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oe(t,e){var n,r,i=(n=t,r=e,n?.[r]);return(function(o){return!(!It(o)||(s=o,Xr&&Xr in s))&&(Ht(o)?Js:Ys).test(ie(o));var s})(i)?i:void 0}var ar=oe(Pt,"WeakMap"),qr=Object.create,ta=(function(){function t(){}return function(e){if(!It(e))return{};if(qr)return qr(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Z(){}var Zr,Pn,wn,ea=Date.now,an=(function(){try{var t=oe(Object,"defineProperty");return t({},"",{}),t}catch{}})(),na=an?function(t,e){return an(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:de,ra=(Zr=na,Pn=0,wn=0,function(){var t=ea(),e=16-(t-wn);if(wn=t,e>0){if(++Pn>=800)return arguments[0]}else Pn=0;return Zr.apply(void 0,arguments)});function bo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function Po(t,e,n,r){for(var i=t.length,o=n+-1;++o<i;)if(e(t[o],o,t))return o;return-1}function ia(t){return t!=t}function Cr(t,e,n){return e==e?(function(r,i,o){for(var s=o-1,a=r.length;++s<a;)if(r[s]===i)return s;return-1})(t,e,n):Po(t,ia,n)}function wo(t,e){return!(t==null||!t.length)&&Cr(t,e,0)>-1}var oa=/^(?:0|[1-9]\d*)$/;function Nn(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&(n=="number"||n!="symbol"&&oa.test(t))&&t>-1&&t%1==0&&t<e}function kr(t,e,n){e=="__proto__"&&an?an(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Be(t,e){return t===e||t!=t&&e!=e}var sa=Object.prototype.hasOwnProperty;function yn(t,e,n){var r=t[e];sa.call(t,e)&&Be(r,n)&&(n!==void 0||e in t)||kr(t,e,n)}function cr(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=void 0;c===void 0&&(c=t[a]),i?kr(n,a,c):yn(n,a,c)}return n}var Qr=Math.max;function br(t,e){return ra((n=t,i=de,r=Qr((r=e)===void 0?n.length-1:r,0),function(){for(var o=arguments,s=-1,a=Qr(o.length-r,0),c=Array(a);++s<a;)c[s]=o[r+s];s=-1;for(var u=Array(r+1);++s<r;)u[s]=o[s];return u[r]=i(c),(function(l,h,N){switch(N.length){case 0:return l.call(h);case 1:return l.call(h,N[0]);case 2:return l.call(h,N[0],N[1]);case 3:return l.call(h,N[0],N[1],N[2])}return l.apply(h,N)})(n,this,u)}),t+"");var n,r,i}function Pr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991}function wt(t){return t!=null&&Pr(t.length)&&!Ht(t)}function Mo(t,e,n){if(!It(n))return!1;var r=typeof e;return!!(r=="number"?wt(n)&&Nn(e,n.length):r=="string"&&e in n)&&Be(n[e],t)}var aa=Object.prototype;function $e(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||aa)}function Jr(t){return vt(t)&&Zt(t)=="[object Arguments]"}var Uo=Object.prototype,ca=Uo.hasOwnProperty,ua=Uo.propertyIsEnumerable,Rn=Jr((function(){return arguments})())?Jr:function(t){return vt(t)&&ca.call(t,"callee")&&!ua.call(t,"callee")},Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ti=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,ei=ti&&ti.exports===Fo?Pt.Buffer:void 0,Pe=(ei?ei.isBuffer:void 0)||function(){return!1},K={};function vn(t){return function(e){return t(e)}}K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Arguments]"]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object Boolean]"]=K["[object DataView]"]=K["[object Date]"]=K["[object Error]"]=K["[object Function]"]=K["[object Map]"]=K["[object Number]"]=K["[object Object]"]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object WeakMap]"]=!1;var Do=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Le=Do&&typeof module=="object"&&module&&!module.nodeType&&module,Mn=Le&&Le.exports===Do&&xo.process,Xt=(function(){try{return Le&&Le.require&&Le.require("util").types||Mn&&Mn.binding&&Mn.binding("util")}catch{}})(),ni=Xt&&Xt.isTypedArray,wr=ni?vn(ni):function(t){return vt(t)&&Pr(t.length)&&!!K[Zt(t)]},la=Object.prototype.hasOwnProperty;function jo(t,e){var n=B(t),r=!n&&Rn(t),i=!n&&!r&&Pe(t),o=!n&&!r&&!i&&wr(t),s=n||r||i||o,a=s?(function(l,h){for(var N=-1,S=Array(l);++N<l;)S[N]=h(N);return S})(t.length,String):[],c=a.length;for(var u in t)!e&&!la.call(t,u)||s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Nn(u,c))||a.push(u);return a}function Bo(t,e){return function(n){return t(e(n))}}var ha=Bo(Object.keys,Object),fa=Object.prototype.hasOwnProperty;function $o(t){if(!$e(t))return ha(t);var e=[];for(var n in Object(t))fa.call(t,n)&&n!="constructor"&&e.push(n);return e}function Nt(t){return wt(t)?jo(t):$o(t)}var Un,da=Object.prototype.hasOwnProperty,dt=(Un=function(t,e){if($e(e)||wt(e))cr(e,Nt(e),t);else for(var n in e)da.call(e,n)&&yn(t,n,e[n])},br(function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Un.length>3&&typeof i=="function"?(r--,i):void 0,o&&Mo(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Un(t,s)}return t})),pa=Object.prototype.hasOwnProperty;function Wo(t){return wt(t)?jo(t,!0):(function(e){if(!It(e))return(function(o){var s=[];if(o!=null)for(var a in Object(o))s.push(a);return s})(e);var n=$e(e),r=[];for(var i in e)(i!="constructor"||!n&&pa.call(e,i))&&r.push(i);return r})(t)}var ma=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ea=/^\w*$/;function ur(t,e){if(B(t))return!1;var n=typeof t;return!(n!="number"&&n!="symbol"&&n!="boolean"&&t!=null&&!Tn(t))||Ea.test(t)||!ma.test(t)||e!=null&&t in Object(e)}var Ie=oe(Object,"create"),ga=Object.prototype.hasOwnProperty,Ta=Object.prototype.hasOwnProperty;function ee(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ge(t,e){for(var n=t.length;n--;)if(Be(t[n][0],e))return n;return-1}ee.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},ee.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ee.prototype.get=function(t){var e=this.__data__;if(Ie){var n=e[t];return n==="__lodash_hash_undefined__"?void 0:n}return ga.call(e,t)?e[t]:void 0},ee.prototype.has=function(t){var e=this.__data__;return Ie?e[t]!==void 0:Ta.call(e,t)},ee.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ie&&e===void 0?"__lodash_hash_undefined__":e,this};var Aa=Array.prototype.splice;function Kt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kt.prototype.clear=function(){this.__data__=[],this.size=0},Kt.prototype.delete=function(t){var e=this.__data__,n=Ge(e,t);return!(n<0||(n==e.length-1?e.pop():Aa.call(e,n,1),--this.size,0))},Kt.prototype.get=function(t){var e=this.__data__,n=Ge(e,t);return n<0?void 0:e[n][1]},Kt.prototype.has=function(t){return Ge(this.__data__,t)>-1},Kt.prototype.set=function(t,e){var n=this.__data__,r=Ge(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var we=oe(Pt,"Map");function ze(t,e){var n,r,i=t.__data__;return((r=typeof(n=e))=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null)?i[typeof e=="string"?"string":"hash"]:i.map}function Wt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Mr.Cache||Wt),n}Wt.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(we||Kt),string:new ee}},Wt.prototype.delete=function(t){var e=ze(this,t).delete(t);return this.size-=e?1:0,e},Wt.prototype.get=function(t){return ze(this,t).get(t)},Wt.prototype.has=function(t){return ze(this,t).has(t)},Wt.prototype.set=function(t,e){var n=ze(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Mr.Cache=Wt;var Fn,Dn,Ia=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Na=/\\(\\)?/g,ya=(Fn=Mr(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ia,function(n,r,i,o){e.push(i?o.replace(Na,"$1"):r||n)}),e},function(t){return Dn.size===500&&Dn.clear(),t}),Dn=Fn.cache,Fn);function On(t,e){return B(t)?t:ur(t,e)?[t]:ya((function(n){return n==null?"":ko(n)})(t))}function Me(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function lr(t,e){for(var n=0,r=(e=On(e,t)).length;t!=null&&n<r;)t=t[Me(e[n++])];return n&&n==r?t:void 0}function Ur(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ri=At?At.isConcatSpreadable:void 0;function Ra(t){return B(t)||Rn(t)||!!(ri&&t&&t[ri])}function Fr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Ra),i||(i=[]);++o<s;){var a=t[o];n(a)?Ur(i,a):r||(i[i.length]=a)}return i}function yt(t){return t!=null&&t.length?Fr(t):[]}var Go=Bo(Object.getPrototypeOf,Object);function zo(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function va(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function kt(t){var e=this.__data__=new Kt(t);this.size=e.size}kt.prototype.clear=function(){this.__data__=new Kt,this.size=0},kt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},kt.prototype.get=function(t){return this.__data__.get(t)},kt.prototype.has=function(t){return this.__data__.has(t)},kt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kt){var r=n.__data__;if(!we||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wt(r)}return n.set(t,e),this.size=n.size,this};var Ko=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ii=Ko&&typeof module=="object"&&module&&!module.nodeType&&module,oi=ii&&ii.exports===Ko?Pt.Buffer:void 0,si=oi?oi.allocUnsafe:void 0;function Dr(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Vo(){return[]}var Oa=Object.prototype.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,jr=ai?function(t){return t==null?[]:(t=Object(t),Dr(ai(t),function(e){return Oa.call(t,e)}))}:Vo,Sa=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ur(e,jr(t)),t=Go(t);return e}:Vo;function Ho(t,e,n){var r=e(t);return B(t)?r:Ur(r,n(t))}function hr(t){return Ho(t,Nt,jr)}var fr=oe(Pt,"DataView"),dr=oe(Pt,"Promise"),he=oe(Pt,"Set"),ci="[object Map]",ui="[object Promise]",li="[object Set]",hi="[object WeakMap]",fi="[object DataView]",_a=ie(fr),La=ie(we),xa=ie(dr),Ca=ie(he),ka=ie(ar),Tt=Zt;(fr&&Tt(new fr(new ArrayBuffer(1)))!=fi||we&&Tt(new we)!=ci||dr&&Tt(dr.resolve())!=ui||he&&Tt(new he)!=li||ar&&Tt(new ar)!=hi)&&(Tt=function(t){var e=Zt(t),n=e=="[object Object]"?t.constructor:void 0,r=n?ie(n):"";if(r)switch(r){case _a:return fi;case La:return ci;case xa:return ui;case Ca:return li;case ka:return hi}return e});var ba=Object.prototype.hasOwnProperty,cn=Pt.Uint8Array,Pa=/\w*$/,di=At?At.prototype:void 0,pi=di?di.valueOf:void 0,mi=Xt&&Xt.isMap,wa=mi?vn(mi):function(t){return vt(t)&&Tt(t)=="[object Map]"},Ei=Xt&&Xt.isSet,Ma=Ei?vn(Ei):function(t){return vt(t)&&Tt(t)=="[object Set]"},Yo="[object Arguments]",Xo="[object Function]",qo="[object Object]",G={};function Qe(t,e,n,r,i,o){var s;if(s!==void 0)return s;if(!It(t))return t;var a,c,u,l=B(t);if(l)return c=(a=t).length,u=new a.constructor(c),c&&typeof a[0]=="string"&&ba.call(a,"index")&&(u.index=a.index,u.input=a.input),(function(m,y){var p=-1,T=m.length;for(y||(y=Array(T));++p<T;)y[p]=m[p];return y})(t,s=u);var h=Tt(t),N=h==Xo||h=="[object GeneratorFunction]";if(Pe(t))return(function(m){var y=m.length,p=si?si(y):new m.constructor(y);return m.copy(p),p})(t);if(h==qo||h==Yo||N&&!i)return s=N?{}:(function(m){return typeof m.constructor!="function"||$e(m)?{}:ta(Go(m))})(t),(function(m,y){return cr(m,jr(m),y)})(t,(function(m,y){return m&&cr(y,Nt(y),m)})(s,t));if(!G[h])return i?t:{};s=(function(m,y){var p,T,g,A,v,f,d,I=m.constructor;switch(y){case"[object ArrayBuffer]":return v=new(A=m).constructor(A.byteLength),new cn(v).set(new cn(A)),v;case"[object Boolean]":case"[object Date]":return new I(+m);case"[object DataView]":return g=(T=m).buffer,new T.constructor(g,T.byteOffset,T.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return d=(f=m).buffer,new f.constructor(d,f.byteOffset,f.length);case"[object Map]":case"[object Set]":return new I;case"[object Number]":case"[object String]":return new I(m);case"[object RegExp]":return(function(E){var R=new E.constructor(E.source,Pa.exec(E));return R.lastIndex=E.lastIndex,R})(m);case"[object Symbol]":return p=m,pi?Object(pi.call(p)):{}}})(t,h),o||(o=new kt);var S=o.get(t);if(S)return S;o.set(t,s),Ma(t)?t.forEach(function(m){s.add(Qe(m,e,n,m,t,o))}):wa(t)&&t.forEach(function(m,y){s.set(y,Qe(m,e,n,y,t,o))});var L=l?void 0:hr(t);return bo(L||t,function(m,y){L&&(m=t[y=m]),yn(s,y,Qe(m,e,n,y,t,o))}),s}function et(t){return Qe(t,4)}function Ue(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function fe(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Wt;++e<n;)this.add(t[e])}function Zo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Br(t,e){return t.has(e)}function gi(t,e,n,r,i,o){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var h=-1,N=!0,S=2&n?new fe:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var L=t[h],m=e[h];if(r)var y=s?r(m,L,h,e,t,o):r(L,m,h,t,e,o);if(y!==void 0){if(y)continue;N=!1;break}if(S){if(!Zo(e,function(p,T){if(!Br(S,T)&&(L===p||i(L,p,n,r,o)))return S.push(T)})){N=!1;break}}else if(L!==m&&!i(L,m,n,r,o)){N=!1;break}}return o.delete(t),o.delete(e),N}function Ua(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function $r(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}G[Yo]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object DataView]"]=G["[object Boolean]"]=G["[object Date]"]=G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Map]"]=G["[object Number]"]=G[qo]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object Symbol]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Error]"]=G[Xo]=G["[object WeakMap]"]=!1,fe.prototype.add=fe.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},fe.prototype.has=function(t){return this.__data__.has(t)};var Ti=At?At.prototype:void 0,jn=Ti?Ti.valueOf:void 0,Fa=Object.prototype.hasOwnProperty,Ai="[object Arguments]",Ii="[object Array]",Ke="[object Object]",Ni=Object.prototype.hasOwnProperty;function pr(t,e,n,r,i){return t===e||(t==null||e==null||!vt(t)&&!vt(e)?t!=t&&e!=e:(function(o,s,a,c,u,l){var h=B(o),N=B(s),S=h?Ii:Tt(o),L=N?Ii:Tt(s),m=(S=S==Ai?Ke:S)==Ke,y=(L=L==Ai?Ke:L)==Ke,p=S==L;if(p&&Pe(o)){if(!Pe(s))return!1;h=!0,m=!1}if(p&&!m)return l||(l=new kt),h||wr(o)?gi(o,s,a,c,u,l):(function(f,d,I,E,R,U,x){switch(I){case"[object DataView]":if(f.byteLength!=d.byteLength||f.byteOffset!=d.byteOffset)return!1;f=f.buffer,d=d.buffer;case"[object ArrayBuffer]":return!(f.byteLength!=d.byteLength||!U(new cn(f),new cn(d)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Be(+f,+d);case"[object Error]":return f.name==d.name&&f.message==d.message;case"[object RegExp]":case"[object String]":return f==d+"";case"[object Map]":var O=Ua;case"[object Set]":var w=1&E;if(O||(O=$r),f.size!=d.size&&!w)return!1;var C=x.get(f);if(C)return C==d;E|=2,x.set(f,d);var k=gi(O(f),O(d),E,R,U,x);return x.delete(f),k;case"[object Symbol]":if(jn)return jn.call(f)==jn.call(d)}return!1})(o,s,S,a,c,u,l);if(!(1&a)){var T=m&&Ni.call(o,"__wrapped__"),g=y&&Ni.call(s,"__wrapped__");if(T||g){var A=T?o.value():o,v=g?s.value():s;return l||(l=new kt),u(A,v,a,c,l)}}return!!p&&(l||(l=new kt),(function(f,d,I,E,R,U){var x=1&I,O=hr(f),w=O.length;if(w!=hr(d).length&&!x)return!1;for(var C=w;C--;){var k=O[C];if(!(x?k in d:Fa.call(d,k)))return!1}var $=U.get(f),X=U.get(d);if($&&X)return $==d&&X==f;var W=!0;U.set(f,d),U.set(d,f);for(var rt=x;++C<w;){var mt=f[k=O[C]],xt=d[k];if(E)var Te=x?E(xt,mt,k,d,f,U):E(mt,xt,k,f,d,U);if(!(Te===void 0?mt===xt||R(mt,xt,I,E,U):Te)){W=!1;break}rt||(rt=k=="constructor")}if(W&&!rt){var nt=f.constructor,Qt=d.constructor;nt==Qt||!("constructor"in f)||!("constructor"in d)||typeof nt=="function"&&nt instanceof nt&&typeof Qt=="function"&&Qt instanceof Qt||(W=!1)}return U.delete(f),U.delete(d),W})(o,s,a,c,u,l))})(t,e,n,r,pr,i))}function yi(t){return t==t&&!It(t)}function Ri(t,e){return function(n){return n!=null&&n[t]===e&&(e!==void 0||t in Object(n))}}function Da(t,e){return t!=null&&e in Object(t)}function Qo(t,e,n){for(var r=-1,i=(e=On(e,t)).length,o=!1;++r<i;){var s=Me(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=t==null?0:t.length)&&Pr(i)&&Nn(s,i)&&(B(t)||Rn(t))}function bt(t){return typeof t=="function"?t:t==null?de:typeof t=="object"?B(t)?(function(e,n){return ur(e)&&yi(n)?Ri(Me(e),n):function(r){var i,o,s=(o=(i=r)==null?void 0:lr(i,e))===void 0?void 0:o;return s===void 0&&s===n?(function(a,c){return a!=null&&Qo(a,c,Da)})(r,e):pr(n,s,3)}})(t[0],t[1]):(function(e){var n=(function(r){for(var i=Nt(r),o=i.length;o--;){var s=i[o],a=r[s];i[o]=[s,a,yi(a)]}return i})(e);return n.length==1&&n[0][2]?Ri(n[0][0],n[0][1]):function(r){return r===e||(function(i,o,s){var a=s.length,c=a;if(i==null)return!c;for(i=Object(i);a--;){var u=s[a];if(u[2]?u[1]!==i[u[0]]:!(u[0]in i))return!1}for(;++a<c;){var l=(u=s[a])[0],h=i[l],N=u[1];if(u[2]){if(h===void 0&&!(l in i))return!1}else if(!pr(N,h,3,void 0,new kt))return!1}return!0})(r,0,n)}})(t):(function(e){return ur(e)?(n=Me(e),function(r){return r?.[n]}):(function(r){return function(i){return lr(i,r)}})(e);var n})(t)}function ja(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}var vi,se=(vi=function(t,e){return t&&(function(n,r,i){for(var o=-1,s=Object(n),a=i(n),c=a.length;c--;){var u=a[++o];if(r(s[u],u,s)===!1)break}return n})(t,e,Nt)},function(t,e){if(t==null)return t;if(!wt(t))return vi(t,e);for(var n=t.length,r=-1,i=Object(t);++r<n&&e(i[r],r,i)!==!1;);return t});function Ba(t,e,n,r){return se(t,function(i,o,s){e(r,i,n(i),s)}),r}var Jo=Object.prototype,$a=Jo.hasOwnProperty,mr=br(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Mo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=Wo(o),a=-1,c=s.length;++a<c;){var u=s[a],l=t[u];(l===void 0||Be(l,Jo[u])&&!$a.call(t,u))&&(t[u]=o[u])}return t});function Oi(t){return vt(t)&&wt(t)}var un=br(function(t,e){return Oi(t)?(function(n,r){var i=-1,o=wo,s=!0,a=n.length,c=[],u=r.length;if(!a)return c;r.length>=200&&(o=Br,s=!1,r=new fe(r));t:for(;++i<a;){var l=n[i],h=l;if(l=l!==0?l:0,s&&h==h){for(var N=u;N--;)if(r[N]===h)continue t;c.push(l)}else o(r,h,void 0)||c.push(l)}return c})(t,Fr(e,0,Oi,!0)):[]});function pe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function tt(t,e,n){var r=t==null?0:t.length;return r?zo(t,(e=e===void 0?1:In(e))<0?0:e,r):[]}function Fe(t,e,n){var r=t==null?0:t.length;return r?zo(t,0,(e=r-(e=e===void 0?1:In(e)))<0?0:e):[]}function M(t,e){var n;return(B(t)?bo:se)(t,typeof(n=e)=="function"?n:de)}function Wa(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ga(t,e){var n=!0;return se(t,function(r,i,o){return n=!!e(r,i,o)}),n}function Rt(t,e,n){return(B(t)?Wa:Ga)(t,bt(e))}function ts(t,e){var n=[];return se(t,function(r,i,o){e(r,i,o)&&n.push(r)}),n}function Et(t,e){return(B(t)?Dr:ts)(t,bt(e))}var Si,za=Math.max,me=(Si=function(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:In(n);return i<0&&(i=za(r+i,0)),Po(t,bt(e),i)},function(t,e,n){var r=Object(t);if(!wt(t)){var i=bt(e);t=Nt(t),e=function(s){return i(r[s],s,r)}}var o=Si(t,e,n);return o>-1?r[i?t[o]:o]:void 0});function Ot(t){return t&&t.length?t[0]:void 0}function Ka(t,e){var n=-1,r=wt(t)?Array(t.length):[];return se(t,function(i,o,s){r[++n]=e(i,o,s)}),r}function b(t,e){return(B(t)?An:Ka)(t,bt(e))}function gt(t,e){return Fr(b(t,e))}var _i,Va=Object.prototype.hasOwnProperty,Ha=(_i=function(t,e,n){Va.call(t,n)?t[n].push(e):kr(t,n,[e])},function(t,e){return(B(t)?ja:Ba)(t,_i,bt(e),{})}),Ya=Object.prototype.hasOwnProperty;function Xa(t,e){return t!=null&&Ya.call(t,e)}function P(t,e){return t!=null&&Qo(t,e,Xa)}function ut(t){return typeof t=="string"||!B(t)&&vt(t)&&Zt(t)=="[object String]"}function Q(t){return t==null?[]:(function(e,n){return An(n,function(r){return e[r]})})(t,Nt(t))}var qa=Math.max;function at(t,e,n,r){t=wt(t)?t:Q(t),n=n?In(n):0;var i=t.length;return n<0&&(n=qa(i+n,0)),ut(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Cr(t,e,n)>-1}function Li(t,e,n){return t!=null&&t.length?Cr(t,e,0):-1}var Za=Object.prototype.hasOwnProperty;function z(t){if(t==null)return!0;if(wt(t)&&(B(t)||typeof t=="string"||typeof t.splice=="function"||Pe(t)||wr(t)||Rn(t)))return!t.length;var e=Tt(t);if(e=="[object Map]"||e=="[object Set]")return!t.size;if($e(t))return!$o(t).length;for(var n in t)if(Za.call(t,n))return!1;return!0}var xi=Xt&&Xt.isRegExp,Gt=xi?vn(xi):function(t){return vt(t)&&Zt(t)=="[object RegExp]"};function Vt(t){return t===void 0}function Qa(t,e,n,r){if(!It(t))return t;for(var i=-1,o=(e=On(e,t)).length,s=o-1,a=t;a!=null&&++i<o;){var c=Me(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=s){var l=a[c];(u=void 0)==null&&(u=It(l)?l:Nn(e[i+1])?[]:{})}yn(a,c,u),a=a[c]}return t}function St(t,e){if(t==null)return{};var n=An(Ho(t,Wo,Sa),function(r){return[r]});return e=bt(e),(function(r,i,o){for(var s=-1,a=i.length,c={};++s<a;){var u=i[s],l=lr(r,u);o(l,u)&&Qa(c,On(u,r),l)}return c})(t,n,function(r,i){return e(r,i[0])})}function Ja(t,e,n,r,i){return i(t,function(o,s,a){n=r?(r=!1,o):e(n,o,s,a)}),n}function ft(t,e,n){var r=B(t)?va:Ja,i=arguments.length<3;return r(t,bt(e),n,i,se)}function Je(t,e){return(B(t)?Dr:ts)(t,(function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!n.call(this);case 1:return!n.call(this,r[0]);case 2:return!n.call(this,r[0],r[1]);case 3:return!n.call(this,r[0],r[1],r[2])}return!n.apply(this,r)}})(bt(e)))}function tc(t,e){var n;return se(t,function(r,i,o){return!(n=e(r,i,o))}),!!n}function es(t,e,n){return(B(t)?Zo:tc)(t,bt(e))}var ec=he&&1/$r(new he([,-0]))[1]==1/0?function(t){return new he(t)}:Z;function Er(t){return t&&t.length?(function(e){var n=-1,r=wo,i=e.length,o=!0,s=[],a=s;if(i>=200){var c=ec(e);if(c)return $r(c);o=!1,r=Br,a=new fe}else a=s;t:for(;++n<i;){var u=e[n],l=u;if(u=u!==0?u:0,o&&l==l){for(var h=a.length;h--;)if(a[h]===l)continue t;s.push(u)}else r(a,l,void 0)||(a!==s&&a.push(l),s.push(u))}return s})(t):[]}function gr(t){console&&console.error&&console.error(`Error: ${t}`)}function ns(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function rs(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function is(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function nc(t){return ut((e=t).LABEL)&&e.LABEL!==""?t.LABEL:t.name;var e}class Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),M(this.definition,n=>{n.accept(e)})}}class pt extends Mt{constructor(e){super([]),this.idx=1,dt(this,St(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Ee extends Mt{constructor(e){super(e.definition),this.orgText="",dt(this,St(e,n=>n!==void 0))}}class ht extends Mt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,dt(this,St(e,n=>n!==void 0))}}class lt extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ut extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ft extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class J extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class _t extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Lt extends Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,dt(this,St(e,n=>n!==void 0))}}class V{constructor(e){this.idx=1,dt(this,St(e,n=>n!==void 0))}accept(e){e.visit(this)}}function tn(t){function e(n){return b(n,tn)}if(t instanceof pt){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ut(t.label)&&(n.label=t.label),n}if(t instanceof ht)return{type:"Alternative",definition:e(t.definition)};if(t instanceof lt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ut)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ft)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof J)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Lt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof V){const n={type:"Terminal",name:t.terminalType.name,label:nc(t.terminalType),idx:t.idx};ut(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Gt(r)?r.source:r),n}if(t instanceof Ee)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class ge{visit(e){const n=e;switch(n.constructor){case pt:return this.visitNonTerminal(n);case ht:return this.visitAlternative(n);case lt:return this.visitOption(n);case Ut:return this.visitRepetitionMandatory(n);case Ft:return this.visitRepetitionMandatoryWithSeparator(n);case _t:return this.visitRepetitionWithSeparator(n);case J:return this.visitRepetition(n);case Lt:return this.visitAlternation(n);case V:return this.visitTerminal(n);case Ee:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function ln(t,e=[]){return t instanceof lt||t instanceof J||t instanceof _t||(t instanceof Lt?es(t.definition,n=>ln(n,e)):!(t instanceof pt&&at(e,t))&&t instanceof Mt&&(t instanceof pt&&e.push(t),Rt(t.definition,n=>ln(n,e))))}function Ct(t){if(t instanceof pt)return"SUBRULE";if(t instanceof lt)return"OPTION";if(t instanceof Lt)return"OR";if(t instanceof Ut)return"AT_LEAST_ONE";if(t instanceof Ft)return"AT_LEAST_ONE_SEP";if(t instanceof _t)return"MANY_SEP";if(t instanceof J)return"MANY";if(t instanceof V)return"CONSUME";throw Error("non exhaustive match")}class Sn{walk(e,n=[]){M(e.definition,(r,i)=>{const o=tt(e.definition,i+1);if(r instanceof pt)this.walkProdRef(r,o,n);else if(r instanceof V)this.walkTerminal(r,o,n);else if(r instanceof ht)this.walkFlat(r,o,n);else if(r instanceof lt)this.walkOption(r,o,n);else if(r instanceof Ut)this.walkAtLeastOne(r,o,n);else if(r instanceof Ft)this.walkAtLeastOneSep(r,o,n);else if(r instanceof _t)this.walkManySep(r,o,n);else if(r instanceof J)this.walkMany(r,o,n);else{if(!(r instanceof Lt))throw Error("non exhaustive match");this.walkOr(r,o,n)}})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);M(e.definition,o=>{const s=new ht({definition:[o]});this.walk(s,i)})}}function Ci(t,e,n){return[new lt({definition:[new V({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function xe(t){if(t instanceof pt)return xe(t.referencedRule);if(t instanceof V)return[t.terminalType];if((function(e){return e instanceof ht||e instanceof lt||e instanceof J||e instanceof Ut||e instanceof Ft||e instanceof _t||e instanceof V||e instanceof Ee})(t))return(function(e){let n=[];const r=e.definition;let i,o=0,s=r.length>o,a=!0;for(;s&&a;)i=r[o],a=ln(i),n=n.concat(xe(i)),o+=1,s=r.length>o;return Er(n)})(t);if((function(e){return e instanceof Lt})(t))return(function(e){return Er(yt(b(e.definition,n=>xe(n))))})(t);throw Error("non exhaustive match")}const os="_~IN~_";class rc extends Sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=(o=e.referencedRule,s=e.idx,o.name+s+os+this.topProd.name);var o,s;const a=n.concat(r),c=xe(new ht({definition:a}));this.follows[i]=c}}function F(t){return t.charCodeAt(0)}function Bn(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Ne(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ae(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function ki(t){return t.type==="Character"}const hn=[];for(let t=F("0");t<=F("9");t++)hn.push(t);const fn=[F("_")].concat(hn);for(let t=F("a");t<=F("z");t++)fn.push(t);for(let t=F("A");t<=F("Z");t++)fn.push(t);const bi=[F(" "),F("\f"),F(`
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./BykeMXuqQ1Tsu8VV.cjs");var xo=typeof global=="object"&&global&&global.Object===Object&&global,Ms=typeof self=="object"&&self&&self.Object===Object&&self,Pt=xo||Ms||Function("return this")(),At=Pt.Symbol,Co=Object.prototype,Us=Co.hasOwnProperty,Fs=Co.toString,Ae=At?At.toStringTag:void 0,Ds=Object.prototype.toString,Kr=At?At.toStringTag:void 0;function Zt(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Kr&&Kr in Object(t)?(function(n){var r=Us.call(n,Ae),i=n[Ae];try{n[Ae]=void 0;var o=!0}catch{}var s=Fs.call(n);return o&&(r?n[Ae]=i:delete n[Ae]),s})(t):(e=t,Ds.call(e));var e}function vt(t){return t!=null&&typeof t=="object"}function Tn(t){return typeof t=="symbol"||vt(t)&&Zt(t)=="[object Symbol]"}function An(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var B=Array.isArray,Vr=At?At.prototype:void 0,Hr=Vr?Vr.toString:void 0;function ko(t){if(typeof t=="string")return t;if(B(t))return An(t,ko)+"";if(Tn(t))return Hr?Hr.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var js=/\s/,Bs=/^\s+/;function It(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var $s=/^[-+]0x[0-9a-f]+$/i,Ws=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,zs=parseInt,Ks=1/0;function Vs(t){return t?(t=(function(e){if(typeof e=="number")return e;if(Tn(e))return NaN;if(It(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=It(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=(function(i){return i&&i.slice(0,(function(o){for(var s=o.length;s--&&js.test(o.charAt(s)););return s})(i)+1).replace(Bs,"")})(e);var r=Ws.test(e);return r||Gs.test(e)?zs(e.slice(2),r?2:8):$s.test(e)?NaN:+e})(t))===Ks||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:t===0?t:0}function In(t){var e=Vs(t),n=e%1;return e==e?n?e-n:e:0}function de(t){return t}function Ht(t){if(!It(t))return!1;var e=Zt(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"}var Yr,bn=Pt["__core-js_shared__"],Xr=(Yr=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+Yr:"",Hs=Function.prototype.toString;function ie(t){if(t!=null){try{return Hs.call(t)}catch{}try{return t+""}catch{}}return""}var Ys=/^\[object .+?Constructor\]$/,Xs=Function.prototype,qs=Object.prototype,Zs=Xs.toString,Qs=qs.hasOwnProperty,Js=RegExp("^"+Zs.call(Qs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oe(t,e){var n,r,i=(n=t,r=e,n?.[r]);return(function(o){return!(!It(o)||(s=o,Xr&&Xr in s))&&(Ht(o)?Js:Ys).test(ie(o));var s})(i)?i:void 0}var ar=oe(Pt,"WeakMap"),qr=Object.create,ta=(function(){function t(){}return function(e){if(!It(e))return{};if(qr)return qr(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Z(){}var Zr,Pn,wn,ea=Date.now,an=(function(){try{var t=oe(Object,"defineProperty");return t({},"",{}),t}catch{}})(),na=an?function(t,e){return an(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:de,ra=(Zr=na,Pn=0,wn=0,function(){var t=ea(),e=16-(t-wn);if(wn=t,e>0){if(++Pn>=800)return arguments[0]}else Pn=0;return Zr.apply(void 0,arguments)});function bo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function Po(t,e,n,r){for(var i=t.length,o=n+-1;++o<i;)if(e(t[o],o,t))return o;return-1}function ia(t){return t!=t}function Cr(t,e,n){return e==e?(function(r,i,o){for(var s=o-1,a=r.length;++s<a;)if(r[s]===i)return s;return-1})(t,e,n):Po(t,ia,n)}function wo(t,e){return!(t==null||!t.length)&&Cr(t,e,0)>-1}var oa=/^(?:0|[1-9]\d*)$/;function Nn(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&(n=="number"||n!="symbol"&&oa.test(t))&&t>-1&&t%1==0&&t<e}function kr(t,e,n){e=="__proto__"&&an?an(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Be(t,e){return t===e||t!=t&&e!=e}var sa=Object.prototype.hasOwnProperty;function yn(t,e,n){var r=t[e];sa.call(t,e)&&Be(r,n)&&(n!==void 0||e in t)||kr(t,e,n)}function cr(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=void 0;c===void 0&&(c=t[a]),i?kr(n,a,c):yn(n,a,c)}return n}var Qr=Math.max;function br(t,e){return ra((n=t,i=de,r=Qr((r=e)===void 0?n.length-1:r,0),function(){for(var o=arguments,s=-1,a=Qr(o.length-r,0),c=Array(a);++s<a;)c[s]=o[r+s];s=-1;for(var u=Array(r+1);++s<r;)u[s]=o[s];return u[r]=i(c),(function(l,h,N){switch(N.length){case 0:return l.call(h);case 1:return l.call(h,N[0]);case 2:return l.call(h,N[0],N[1]);case 3:return l.call(h,N[0],N[1],N[2])}return l.apply(h,N)})(n,this,u)}),t+"");var n,r,i}function Pr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991}function wt(t){return t!=null&&Pr(t.length)&&!Ht(t)}function Mo(t,e,n){if(!It(n))return!1;var r=typeof e;return!!(r=="number"?wt(n)&&Nn(e,n.length):r=="string"&&e in n)&&Be(n[e],t)}var aa=Object.prototype;function $e(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||aa)}function Jr(t){return vt(t)&&Zt(t)=="[object Arguments]"}var Uo=Object.prototype,ca=Uo.hasOwnProperty,ua=Uo.propertyIsEnumerable,Rn=Jr((function(){return arguments})())?Jr:function(t){return vt(t)&&ca.call(t,"callee")&&!ua.call(t,"callee")},Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ti=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,ei=ti&&ti.exports===Fo?Pt.Buffer:void 0,Pe=(ei?ei.isBuffer:void 0)||function(){return!1},K={};function vn(t){return function(e){return t(e)}}K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Arguments]"]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object Boolean]"]=K["[object DataView]"]=K["[object Date]"]=K["[object Error]"]=K["[object Function]"]=K["[object Map]"]=K["[object Number]"]=K["[object Object]"]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object WeakMap]"]=!1;var Do=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Le=Do&&typeof module=="object"&&module&&!module.nodeType&&module,Mn=Le&&Le.exports===Do&&xo.process,Xt=(function(){try{return Le&&Le.require&&Le.require("util").types||Mn&&Mn.binding&&Mn.binding("util")}catch{}})(),ni=Xt&&Xt.isTypedArray,wr=ni?vn(ni):function(t){return vt(t)&&Pr(t.length)&&!!K[Zt(t)]},la=Object.prototype.hasOwnProperty;function jo(t,e){var n=B(t),r=!n&&Rn(t),i=!n&&!r&&Pe(t),o=!n&&!r&&!i&&wr(t),s=n||r||i||o,a=s?(function(l,h){for(var N=-1,S=Array(l);++N<l;)S[N]=h(N);return S})(t.length,String):[],c=a.length;for(var u in t)!e&&!la.call(t,u)||s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Nn(u,c))||a.push(u);return a}function Bo(t,e){return function(n){return t(e(n))}}var ha=Bo(Object.keys,Object),fa=Object.prototype.hasOwnProperty;function $o(t){if(!$e(t))return ha(t);var e=[];for(var n in Object(t))fa.call(t,n)&&n!="constructor"&&e.push(n);return e}function Nt(t){return wt(t)?jo(t):$o(t)}var Un,da=Object.prototype.hasOwnProperty,dt=(Un=function(t,e){if($e(e)||wt(e))cr(e,Nt(e),t);else for(var n in e)da.call(e,n)&&yn(t,n,e[n])},br(function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Un.length>3&&typeof i=="function"?(r--,i):void 0,o&&Mo(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Un(t,s)}return t})),pa=Object.prototype.hasOwnProperty;function Wo(t){return wt(t)?jo(t,!0):(function(e){if(!It(e))return(function(o){var s=[];if(o!=null)for(var a in Object(o))s.push(a);return s})(e);var n=$e(e),r=[];for(var i in e)(i!="constructor"||!n&&pa.call(e,i))&&r.push(i);return r})(t)}var ma=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ea=/^\w*$/;function ur(t,e){if(B(t))return!1;var n=typeof t;return!(n!="number"&&n!="symbol"&&n!="boolean"&&t!=null&&!Tn(t))||Ea.test(t)||!ma.test(t)||e!=null&&t in Object(e)}var Ie=oe(Object,"create"),ga=Object.prototype.hasOwnProperty,Ta=Object.prototype.hasOwnProperty;function ee(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ge(t,e){for(var n=t.length;n--;)if(Be(t[n][0],e))return n;return-1}ee.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},ee.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ee.prototype.get=function(t){var e=this.__data__;if(Ie){var n=e[t];return n==="__lodash_hash_undefined__"?void 0:n}return ga.call(e,t)?e[t]:void 0},ee.prototype.has=function(t){var e=this.__data__;return Ie?e[t]!==void 0:Ta.call(e,t)},ee.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ie&&e===void 0?"__lodash_hash_undefined__":e,this};var Aa=Array.prototype.splice;function Kt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kt.prototype.clear=function(){this.__data__=[],this.size=0},Kt.prototype.delete=function(t){var e=this.__data__,n=Ge(e,t);return!(n<0||(n==e.length-1?e.pop():Aa.call(e,n,1),--this.size,0))},Kt.prototype.get=function(t){var e=this.__data__,n=Ge(e,t);return n<0?void 0:e[n][1]},Kt.prototype.has=function(t){return Ge(this.__data__,t)>-1},Kt.prototype.set=function(t,e){var n=this.__data__,r=Ge(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var we=oe(Pt,"Map");function ze(t,e){var n,r,i=t.__data__;return((r=typeof(n=e))=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null)?i[typeof e=="string"?"string":"hash"]:i.map}function Wt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Mr.Cache||Wt),n}Wt.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(we||Kt),string:new ee}},Wt.prototype.delete=function(t){var e=ze(this,t).delete(t);return this.size-=e?1:0,e},Wt.prototype.get=function(t){return ze(this,t).get(t)},Wt.prototype.has=function(t){return ze(this,t).has(t)},Wt.prototype.set=function(t,e){var n=ze(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Mr.Cache=Wt;var Fn,Dn,Ia=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Na=/\\(\\)?/g,ya=(Fn=Mr(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ia,function(n,r,i,o){e.push(i?o.replace(Na,"$1"):r||n)}),e},function(t){return Dn.size===500&&Dn.clear(),t}),Dn=Fn.cache,Fn);function On(t,e){return B(t)?t:ur(t,e)?[t]:ya((function(n){return n==null?"":ko(n)})(t))}function Me(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function lr(t,e){for(var n=0,r=(e=On(e,t)).length;t!=null&&n<r;)t=t[Me(e[n++])];return n&&n==r?t:void 0}function Ur(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ri=At?At.isConcatSpreadable:void 0;function Ra(t){return B(t)||Rn(t)||!!(ri&&t&&t[ri])}function Fr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Ra),i||(i=[]);++o<s;){var a=t[o];n(a)?Ur(i,a):r||(i[i.length]=a)}return i}function yt(t){return t!=null&&t.length?Fr(t):[]}var Go=Bo(Object.getPrototypeOf,Object);function zo(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function va(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function kt(t){var e=this.__data__=new Kt(t);this.size=e.size}kt.prototype.clear=function(){this.__data__=new Kt,this.size=0},kt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},kt.prototype.get=function(t){return this.__data__.get(t)},kt.prototype.has=function(t){return this.__data__.has(t)},kt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kt){var r=n.__data__;if(!we||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wt(r)}return n.set(t,e),this.size=n.size,this};var Ko=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ii=Ko&&typeof module=="object"&&module&&!module.nodeType&&module,oi=ii&&ii.exports===Ko?Pt.Buffer:void 0,si=oi?oi.allocUnsafe:void 0;function Dr(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Vo(){return[]}var Oa=Object.prototype.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,jr=ai?function(t){return t==null?[]:(t=Object(t),Dr(ai(t),function(e){return Oa.call(t,e)}))}:Vo,Sa=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ur(e,jr(t)),t=Go(t);return e}:Vo;function Ho(t,e,n){var r=e(t);return B(t)?r:Ur(r,n(t))}function hr(t){return Ho(t,Nt,jr)}var fr=oe(Pt,"DataView"),dr=oe(Pt,"Promise"),he=oe(Pt,"Set"),ci="[object Map]",ui="[object Promise]",li="[object Set]",hi="[object WeakMap]",fi="[object DataView]",_a=ie(fr),La=ie(we),xa=ie(dr),Ca=ie(he),ka=ie(ar),Tt=Zt;(fr&&Tt(new fr(new ArrayBuffer(1)))!=fi||we&&Tt(new we)!=ci||dr&&Tt(dr.resolve())!=ui||he&&Tt(new he)!=li||ar&&Tt(new ar)!=hi)&&(Tt=function(t){var e=Zt(t),n=e=="[object Object]"?t.constructor:void 0,r=n?ie(n):"";if(r)switch(r){case _a:return fi;case La:return ci;case xa:return ui;case Ca:return li;case ka:return hi}return e});var ba=Object.prototype.hasOwnProperty,cn=Pt.Uint8Array,Pa=/\w*$/,di=At?At.prototype:void 0,pi=di?di.valueOf:void 0,mi=Xt&&Xt.isMap,wa=mi?vn(mi):function(t){return vt(t)&&Tt(t)=="[object Map]"},Ei=Xt&&Xt.isSet,Ma=Ei?vn(Ei):function(t){return vt(t)&&Tt(t)=="[object Set]"},Yo="[object Arguments]",Xo="[object Function]",qo="[object Object]",G={};function Qe(t,e,n,r,i,o){var s;if(s!==void 0)return s;if(!It(t))return t;var a,c,u,l=B(t);if(l)return c=(a=t).length,u=new a.constructor(c),c&&typeof a[0]=="string"&&ba.call(a,"index")&&(u.index=a.index,u.input=a.input),(function(m,y){var p=-1,T=m.length;for(y||(y=Array(T));++p<T;)y[p]=m[p];return y})(t,s=u);var h=Tt(t),N=h==Xo||h=="[object GeneratorFunction]";if(Pe(t))return(function(m){var y=m.length,p=si?si(y):new m.constructor(y);return m.copy(p),p})(t);if(h==qo||h==Yo||N&&!i)return s=N?{}:(function(m){return typeof m.constructor!="function"||$e(m)?{}:ta(Go(m))})(t),(function(m,y){return cr(m,jr(m),y)})(t,(function(m,y){return m&&cr(y,Nt(y),m)})(s,t));if(!G[h])return i?t:{};s=(function(m,y){var p,T,g,A,v,f,d,I=m.constructor;switch(y){case"[object ArrayBuffer]":return v=new(A=m).constructor(A.byteLength),new cn(v).set(new cn(A)),v;case"[object Boolean]":case"[object Date]":return new I(+m);case"[object DataView]":return g=(T=m).buffer,new T.constructor(g,T.byteOffset,T.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return d=(f=m).buffer,new f.constructor(d,f.byteOffset,f.length);case"[object Map]":case"[object Set]":return new I;case"[object Number]":case"[object String]":return new I(m);case"[object RegExp]":return(function(E){var R=new E.constructor(E.source,Pa.exec(E));return R.lastIndex=E.lastIndex,R})(m);case"[object Symbol]":return p=m,pi?Object(pi.call(p)):{}}})(t,h),o||(o=new kt);var S=o.get(t);if(S)return S;o.set(t,s),Ma(t)?t.forEach(function(m){s.add(Qe(m,e,n,m,t,o))}):wa(t)&&t.forEach(function(m,y){s.set(y,Qe(m,e,n,y,t,o))});var L=l?void 0:hr(t);return bo(L||t,function(m,y){L&&(m=t[y=m]),yn(s,y,Qe(m,e,n,y,t,o))}),s}function et(t){return Qe(t,4)}function Ue(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function fe(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Wt;++e<n;)this.add(t[e])}function Zo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Br(t,e){return t.has(e)}function gi(t,e,n,r,i,o){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var h=-1,N=!0,S=2&n?new fe:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var L=t[h],m=e[h];if(r)var y=s?r(m,L,h,e,t,o):r(L,m,h,t,e,o);if(y!==void 0){if(y)continue;N=!1;break}if(S){if(!Zo(e,function(p,T){if(!Br(S,T)&&(L===p||i(L,p,n,r,o)))return S.push(T)})){N=!1;break}}else if(L!==m&&!i(L,m,n,r,o)){N=!1;break}}return o.delete(t),o.delete(e),N}function Ua(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function $r(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}G[Yo]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object DataView]"]=G["[object Boolean]"]=G["[object Date]"]=G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Map]"]=G["[object Number]"]=G[qo]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object Symbol]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Error]"]=G[Xo]=G["[object WeakMap]"]=!1,fe.prototype.add=fe.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},fe.prototype.has=function(t){return this.__data__.has(t)};var Ti=At?At.prototype:void 0,jn=Ti?Ti.valueOf:void 0,Fa=Object.prototype.hasOwnProperty,Ai="[object Arguments]",Ii="[object Array]",Ke="[object Object]",Ni=Object.prototype.hasOwnProperty;function pr(t,e,n,r,i){return t===e||(t==null||e==null||!vt(t)&&!vt(e)?t!=t&&e!=e:(function(o,s,a,c,u,l){var h=B(o),N=B(s),S=h?Ii:Tt(o),L=N?Ii:Tt(s),m=(S=S==Ai?Ke:S)==Ke,y=(L=L==Ai?Ke:L)==Ke,p=S==L;if(p&&Pe(o)){if(!Pe(s))return!1;h=!0,m=!1}if(p&&!m)return l||(l=new kt),h||wr(o)?gi(o,s,a,c,u,l):(function(f,d,I,E,R,U,x){switch(I){case"[object DataView]":if(f.byteLength!=d.byteLength||f.byteOffset!=d.byteOffset)return!1;f=f.buffer,d=d.buffer;case"[object ArrayBuffer]":return!(f.byteLength!=d.byteLength||!U(new cn(f),new cn(d)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Be(+f,+d);case"[object Error]":return f.name==d.name&&f.message==d.message;case"[object RegExp]":case"[object String]":return f==d+"";case"[object Map]":var O=Ua;case"[object Set]":var w=1&E;if(O||(O=$r),f.size!=d.size&&!w)return!1;var C=x.get(f);if(C)return C==d;E|=2,x.set(f,d);var k=gi(O(f),O(d),E,R,U,x);return x.delete(f),k;case"[object Symbol]":if(jn)return jn.call(f)==jn.call(d)}return!1})(o,s,S,a,c,u,l);if(!(1&a)){var T=m&&Ni.call(o,"__wrapped__"),g=y&&Ni.call(s,"__wrapped__");if(T||g){var A=T?o.value():o,v=g?s.value():s;return l||(l=new kt),u(A,v,a,c,l)}}return!!p&&(l||(l=new kt),(function(f,d,I,E,R,U){var x=1&I,O=hr(f),w=O.length;if(w!=hr(d).length&&!x)return!1;for(var C=w;C--;){var k=O[C];if(!(x?k in d:Fa.call(d,k)))return!1}var $=U.get(f),X=U.get(d);if($&&X)return $==d&&X==f;var W=!0;U.set(f,d),U.set(d,f);for(var rt=x;++C<w;){var mt=f[k=O[C]],xt=d[k];if(E)var Te=x?E(xt,mt,k,d,f,U):E(mt,xt,k,f,d,U);if(!(Te===void 0?mt===xt||R(mt,xt,I,E,U):Te)){W=!1;break}rt||(rt=k=="constructor")}if(W&&!rt){var nt=f.constructor,Qt=d.constructor;nt==Qt||!("constructor"in f)||!("constructor"in d)||typeof nt=="function"&&nt instanceof nt&&typeof Qt=="function"&&Qt instanceof Qt||(W=!1)}return U.delete(f),U.delete(d),W})(o,s,a,c,u,l))})(t,e,n,r,pr,i))}function yi(t){return t==t&&!It(t)}function Ri(t,e){return function(n){return n!=null&&n[t]===e&&(e!==void 0||t in Object(n))}}function Da(t,e){return t!=null&&e in Object(t)}function Qo(t,e,n){for(var r=-1,i=(e=On(e,t)).length,o=!1;++r<i;){var s=Me(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=t==null?0:t.length)&&Pr(i)&&Nn(s,i)&&(B(t)||Rn(t))}function bt(t){return typeof t=="function"?t:t==null?de:typeof t=="object"?B(t)?(function(e,n){return ur(e)&&yi(n)?Ri(Me(e),n):function(r){var i,o,s=(o=(i=r)==null?void 0:lr(i,e))===void 0?void 0:o;return s===void 0&&s===n?(function(a,c){return a!=null&&Qo(a,c,Da)})(r,e):pr(n,s,3)}})(t[0],t[1]):(function(e){var n=(function(r){for(var i=Nt(r),o=i.length;o--;){var s=i[o],a=r[s];i[o]=[s,a,yi(a)]}return i})(e);return n.length==1&&n[0][2]?Ri(n[0][0],n[0][1]):function(r){return r===e||(function(i,o,s){var a=s.length,c=a;if(i==null)return!c;for(i=Object(i);a--;){var u=s[a];if(u[2]?u[1]!==i[u[0]]:!(u[0]in i))return!1}for(;++a<c;){var l=(u=s[a])[0],h=i[l],N=u[1];if(u[2]){if(h===void 0&&!(l in i))return!1}else if(!pr(N,h,3,void 0,new kt))return!1}return!0})(r,0,n)}})(t):(function(e){return ur(e)?(n=Me(e),function(r){return r?.[n]}):(function(r){return function(i){return lr(i,r)}})(e);var n})(t)}function ja(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}var vi,se=(vi=function(t,e){return t&&(function(n,r,i){for(var o=-1,s=Object(n),a=i(n),c=a.length;c--;){var u=a[++o];if(r(s[u],u,s)===!1)break}return n})(t,e,Nt)},function(t,e){if(t==null)return t;if(!wt(t))return vi(t,e);for(var n=t.length,r=-1,i=Object(t);++r<n&&e(i[r],r,i)!==!1;);return t});function Ba(t,e,n,r){return se(t,function(i,o,s){e(r,i,n(i),s)}),r}var Jo=Object.prototype,$a=Jo.hasOwnProperty,mr=br(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Mo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=Wo(o),a=-1,c=s.length;++a<c;){var u=s[a],l=t[u];(l===void 0||Be(l,Jo[u])&&!$a.call(t,u))&&(t[u]=o[u])}return t});function Oi(t){return vt(t)&&wt(t)}var un=br(function(t,e){return Oi(t)?(function(n,r){var i=-1,o=wo,s=!0,a=n.length,c=[],u=r.length;if(!a)return c;r.length>=200&&(o=Br,s=!1,r=new fe(r));t:for(;++i<a;){var l=n[i],h=l;if(l=l!==0?l:0,s&&h==h){for(var N=u;N--;)if(r[N]===h)continue t;c.push(l)}else o(r,h,void 0)||c.push(l)}return c})(t,Fr(e,0,Oi,!0)):[]});function pe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function tt(t,e,n){var r=t==null?0:t.length;return r?zo(t,(e=e===void 0?1:In(e))<0?0:e,r):[]}function Fe(t,e,n){var r=t==null?0:t.length;return r?zo(t,0,(e=r-(e=e===void 0?1:In(e)))<0?0:e):[]}function M(t,e){var n;return(B(t)?bo:se)(t,typeof(n=e)=="function"?n:de)}function Wa(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ga(t,e){var n=!0;return se(t,function(r,i,o){return n=!!e(r,i,o)}),n}function Rt(t,e,n){return(B(t)?Wa:Ga)(t,bt(e))}function ts(t,e){var n=[];return se(t,function(r,i,o){e(r,i,o)&&n.push(r)}),n}function Et(t,e){return(B(t)?Dr:ts)(t,bt(e))}var Si,za=Math.max,me=(Si=function(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:In(n);return i<0&&(i=za(r+i,0)),Po(t,bt(e),i)},function(t,e,n){var r=Object(t);if(!wt(t)){var i=bt(e);t=Nt(t),e=function(s){return i(r[s],s,r)}}var o=Si(t,e,n);return o>-1?r[i?t[o]:o]:void 0});function Ot(t){return t&&t.length?t[0]:void 0}function Ka(t,e){var n=-1,r=wt(t)?Array(t.length):[];return se(t,function(i,o,s){r[++n]=e(i,o,s)}),r}function b(t,e){return(B(t)?An:Ka)(t,bt(e))}function gt(t,e){return Fr(b(t,e))}var _i,Va=Object.prototype.hasOwnProperty,Ha=(_i=function(t,e,n){Va.call(t,n)?t[n].push(e):kr(t,n,[e])},function(t,e){return(B(t)?ja:Ba)(t,_i,bt(e),{})}),Ya=Object.prototype.hasOwnProperty;function Xa(t,e){return t!=null&&Ya.call(t,e)}function P(t,e){return t!=null&&Qo(t,e,Xa)}function ut(t){return typeof t=="string"||!B(t)&&vt(t)&&Zt(t)=="[object String]"}function Q(t){return t==null?[]:(function(e,n){return An(n,function(r){return e[r]})})(t,Nt(t))}var qa=Math.max;function at(t,e,n,r){t=wt(t)?t:Q(t),n=n?In(n):0;var i=t.length;return n<0&&(n=qa(i+n,0)),ut(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Cr(t,e,n)>-1}function Li(t,e,n){return t!=null&&t.length?Cr(t,e,0):-1}var Za=Object.prototype.hasOwnProperty;function z(t){if(t==null)return!0;if(wt(t)&&(B(t)||typeof t=="string"||typeof t.splice=="function"||Pe(t)||wr(t)||Rn(t)))return!t.length;var e=Tt(t);if(e=="[object Map]"||e=="[object Set]")return!t.size;if($e(t))return!$o(t).length;for(var n in t)if(Za.call(t,n))return!1;return!0}var xi=Xt&&Xt.isRegExp,Gt=xi?vn(xi):function(t){return vt(t)&&Zt(t)=="[object RegExp]"};function Vt(t){return t===void 0}function Qa(t,e,n,r){if(!It(t))return t;for(var i=-1,o=(e=On(e,t)).length,s=o-1,a=t;a!=null&&++i<o;){var c=Me(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=s){var l=a[c];(u=void 0)==null&&(u=It(l)?l:Nn(e[i+1])?[]:{})}yn(a,c,u),a=a[c]}return t}function St(t,e){if(t==null)return{};var n=An(Ho(t,Wo,Sa),function(r){return[r]});return e=bt(e),(function(r,i,o){for(var s=-1,a=i.length,c={};++s<a;){var u=i[s],l=lr(r,u);o(l,u)&&Qa(c,On(u,r),l)}return c})(t,n,function(r,i){return e(r,i[0])})}function Ja(t,e,n,r,i){return i(t,function(o,s,a){n=r?(r=!1,o):e(n,o,s,a)}),n}function ft(t,e,n){var r=B(t)?va:Ja,i=arguments.length<3;return r(t,bt(e),n,i,se)}function Je(t,e){return(B(t)?Dr:ts)(t,(function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!n.call(this);case 1:return!n.call(this,r[0]);case 2:return!n.call(this,r[0],r[1]);case 3:return!n.call(this,r[0],r[1],r[2])}return!n.apply(this,r)}})(bt(e)))}function tc(t,e){var n;return se(t,function(r,i,o){return!(n=e(r,i,o))}),!!n}function es(t,e,n){return(B(t)?Zo:tc)(t,bt(e))}var ec=he&&1/$r(new he([,-0]))[1]==1/0?function(t){return new he(t)}:Z;function Er(t){return t&&t.length?(function(e){var n=-1,r=wo,i=e.length,o=!0,s=[],a=s;if(i>=200){var c=ec(e);if(c)return $r(c);o=!1,r=Br,a=new fe}else a=s;t:for(;++n<i;){var u=e[n],l=u;if(u=u!==0?u:0,o&&l==l){for(var h=a.length;h--;)if(a[h]===l)continue t;s.push(u)}else r(a,l,void 0)||(a!==s&&a.push(l),s.push(u))}return s})(t):[]}function gr(t){console&&console.error&&console.error(`Error: ${t}`)}function ns(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function rs(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function is(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function nc(t){return ut((e=t).LABEL)&&e.LABEL!==""?t.LABEL:t.name;var e}class Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),M(this.definition,n=>{n.accept(e)})}}class pt extends Mt{constructor(e){super([]),this.idx=1,dt(this,St(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Ee extends Mt{constructor(e){super(e.definition),this.orgText="",dt(this,St(e,n=>n!==void 0))}}class ht extends Mt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,dt(this,St(e,n=>n!==void 0))}}class lt extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ut extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ft extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class J extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class _t extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Lt extends Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,dt(this,St(e,n=>n!==void 0))}}class V{constructor(e){this.idx=1,dt(this,St(e,n=>n!==void 0))}accept(e){e.visit(this)}}function tn(t){function e(n){return b(n,tn)}if(t instanceof pt){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ut(t.label)&&(n.label=t.label),n}if(t instanceof ht)return{type:"Alternative",definition:e(t.definition)};if(t instanceof lt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ut)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ft)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof J)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Lt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof V){const n={type:"Terminal",name:t.terminalType.name,label:nc(t.terminalType),idx:t.idx};ut(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Gt(r)?r.source:r),n}if(t instanceof Ee)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class ge{visit(e){const n=e;switch(n.constructor){case pt:return this.visitNonTerminal(n);case ht:return this.visitAlternative(n);case lt:return this.visitOption(n);case Ut:return this.visitRepetitionMandatory(n);case Ft:return this.visitRepetitionMandatoryWithSeparator(n);case _t:return this.visitRepetitionWithSeparator(n);case J:return this.visitRepetition(n);case Lt:return this.visitAlternation(n);case V:return this.visitTerminal(n);case Ee:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function ln(t,e=[]){return t instanceof lt||t instanceof J||t instanceof _t||(t instanceof Lt?es(t.definition,n=>ln(n,e)):!(t instanceof pt&&at(e,t))&&t instanceof Mt&&(t instanceof pt&&e.push(t),Rt(t.definition,n=>ln(n,e))))}function Ct(t){if(t instanceof pt)return"SUBRULE";if(t instanceof lt)return"OPTION";if(t instanceof Lt)return"OR";if(t instanceof Ut)return"AT_LEAST_ONE";if(t instanceof Ft)return"AT_LEAST_ONE_SEP";if(t instanceof _t)return"MANY_SEP";if(t instanceof J)return"MANY";if(t instanceof V)return"CONSUME";throw Error("non exhaustive match")}class Sn{walk(e,n=[]){M(e.definition,(r,i)=>{const o=tt(e.definition,i+1);if(r instanceof pt)this.walkProdRef(r,o,n);else if(r instanceof V)this.walkTerminal(r,o,n);else if(r instanceof ht)this.walkFlat(r,o,n);else if(r instanceof lt)this.walkOption(r,o,n);else if(r instanceof Ut)this.walkAtLeastOne(r,o,n);else if(r instanceof Ft)this.walkAtLeastOneSep(r,o,n);else if(r instanceof _t)this.walkManySep(r,o,n);else if(r instanceof J)this.walkMany(r,o,n);else{if(!(r instanceof Lt))throw Error("non exhaustive match");this.walkOr(r,o,n)}})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);M(e.definition,o=>{const s=new ht({definition:[o]});this.walk(s,i)})}}function Ci(t,e,n){return[new lt({definition:[new V({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function xe(t){if(t instanceof pt)return xe(t.referencedRule);if(t instanceof V)return[t.terminalType];if((function(e){return e instanceof ht||e instanceof lt||e instanceof J||e instanceof Ut||e instanceof Ft||e instanceof _t||e instanceof V||e instanceof Ee})(t))return(function(e){let n=[];const r=e.definition;let i,o=0,s=r.length>o,a=!0;for(;s&&a;)i=r[o],a=ln(i),n=n.concat(xe(i)),o+=1,s=r.length>o;return Er(n)})(t);if((function(e){return e instanceof Lt})(t))return(function(e){return Er(yt(b(e.definition,n=>xe(n))))})(t);throw Error("non exhaustive match")}const os="_~IN~_";class rc extends Sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=(o=e.referencedRule,s=e.idx,o.name+s+os+this.topProd.name);var o,s;const a=n.concat(r),c=xe(new ht({definition:a}));this.follows[i]=c}}function F(t){return t.charCodeAt(0)}function Bn(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Ne(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ae(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function ki(t){return t.type==="Character"}const hn=[];for(let t=F("0");t<=F("9");t++)hn.push(t);const fn=[F("_")].concat(hn);for(let t=F("a");t<=F("z");t++)fn.push(t);for(let t=F("A");t<=F("Z");t++)fn.push(t);const bi=[F(" "),F("\f"),F(`
7
7
  `),F("\r"),F(" "),F("\v"),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F("\u2028"),F("\u2029"),F(" "),F(" "),F(" "),F("\uFEFF")],ic=/[0-9a-fA-F]/,Ve=/[0-9]/,oc=/[1-9]/;class Tr{visitChildren(e){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}let en={};const sc=new class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");const e=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Ne(n,"global");break;case"i":Ne(n,"ignoreCase");break;case"m":Ne(n,"multiLine");break;case"u":Ne(n,"unicode");break;case"y":Ne(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}ae(e);const n=this.disjunction();return this.consumeChar(")"),{type:e,value:n,loc:this.loc(t)}}return(function(){throw Error("Internal Error - Should never get here!")})()}quantifier(t=!1){let e;const n=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:r,atMost:r};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),e={atLeast:r,atMost:i}):e={atLeast:r,atMost:1/0},this.consumeChar("}")}if(t===!0&&e===void 0)return;ae(e)}if(t!==!0||e!==void 0)return ae(e)?(this.peekChar(0)==="?"?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(n),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}if(t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),ae(t))return t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[F(`
8
8
  `),F("\r"),F("\u2028"),F("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=hn;break;case"D":t=hn,e=!0;break;case"s":t=bi;break;case"S":t=bi,e=!0;break;case"w":t=fn;break;case"W":t=fn,e=!0}if(ae(t))return{type:"Set",value:t,complement:e}}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=F("\f");break;case"n":t=F(`
9
9
  `);break;case"r":t=F("\r");break;case"t":t=F(" ");break;case"v":t=F("\v")}if(ae(t))return{type:"Character",value:t}}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:F("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:F(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -110,7 +110,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
110
110
  This error was thrown during the "grammar recording phase" For more info see:
111
111
  https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,e){return Re.call(this,lt,t,e)}atLeastOneInternalRecord(t,e){Re.call(this,Ut,e,t)}atLeastOneSepFirstInternalRecord(t,e){Re.call(this,Ft,e,t,oo)}manyInternalRecord(t,e){Re.call(this,J,e,t)}manySepFirstInternalRecord(t,e){Re.call(this,_t,e,t,oo)}orInternalRecord(t,e){return Uc.call(this,t,e)}subruleInternalRecord(t,e,n){if(En(e),!t||P(t,"ruleName")===!1){const s=new Error(`<SUBRULE${ao(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
112
112
  inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}const r=pe(this.recordingProdStack),i=t.ruleName,o=new pt({idx:e,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(o),this.outputCst?Mc:xn}consumeInternalRecord(t,e,n){if(En(e),!us(t)){const o=new Error(`<CONSUME${ao(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
113
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const r=pe(this.recordingProdStack),i=new V({idx:e,terminalType:t,label:n?.LABEL});return r.definition.push(i),vs}},class{initPerformanceTracer(t){if(P(t,"traceInitPerf")){const e=t.traceInitPerf,n=typeof e=="number";this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=zt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);const{time:r,value:i}=rs(e),o=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${t}> time: ${r}ms`),this.traceInitIndent--,i}return e()}}].forEach(t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach(n=>{if(n==="constructor")return;const r=Object.getOwnPropertyDescriptor(e,n);r&&(r.get||r.set)?Object.defineProperty(Yn.prototype,n,r):Yn.prototype[n]=t.prototype[n]})});class Fc extends De{constructor(e,n=zt){const r=et(n);r.outputCst=!1,super(e,r)}}const Dc=D({name:"WhiteSpace",pattern:/\s+/,group:ot.SKIPPED}),Os=D({name:"String",pattern:/"(""|[^"])*"/}),jc=D({name:"SingleQuotedString",pattern:/'(''|[^'])*'/}),Bc=D({name:"SheetQuoted",pattern:/'((?![\\/[\]*?:]).)+?'!/}),$c=D({name:"FunctionToken",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\(/}),Ss=D({name:"NamedTableReference",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\[/}),Wc=D({name:"BracketedString",pattern:/\[([^[\]]*)\]/,longer_alt:[Ss,Os]}),_s=D({name:"LiteralError",pattern:/#PARSE!|#NULL!|#DIV\/0!|#VALUE!|#NUM!|#FIELD!|#N\/A|#GETTING_DATA|#SPILL!|#CONNECT!|#BLOCKED!|#UNKNOWN!|#FIELD!|#CALC!|#BUSY!|#PYTHON!|#TIMEOUT!/}),Ls=D({name:"RefError",pattern:/#REF!|#NAME\?/}),Gc=D({name:"Sheet",pattern:/[A-Za-z_.\d\u007F-\uFFFF]+!/}),zc=/^[a-zA-Z_][a-zA-Z0-9_.?]*:?/,Cn=D({name:"Name",pattern:{exec:(t,e)=>{try{const n=zc.exec(t.substring(e));if(n){const r=n[0];if(r.endsWith(":")){const i=r.length;return r[i-2]==="."?[r.substring(0,i-2)]:[r.substring(0,i-1)]}return[r]}}catch(n){console.warn("Error parsing name",n)}return null}},line_breaks:!1,start_chars_hint:(()=>{const t=[];for(let e=65;e<=90;e++)t.push(e);for(let e=97;e<=122;e++)t.push(e);for(let e=48;e<=57;e++)t.push(e);return t})()}),Kc=D({name:"Cell",pattern:/[$]?[A-Za-z]{1,3}[$]?[1-9][0-9]*/,longer_alt:Cn}),Vc=D({name:"Column",pattern:/[$]?[A-Za-z]{1,3}/,longer_alt:Cn}),Hc=D({name:"AbsRow",pattern:/[$][0-9]+/,longer_alt:Cn}),Yc=D({name:"NumberToken",pattern:/[0-9]+[.]?[0-9]*([eE][+-][0-9]+)?/}),Xc=D({name:"Boolean",pattern:/TRUE|FALSE/i}),qc=D({name:"Comma",pattern:/,/}),Zc=D({name:"RangeUnion",pattern:/:/}),Qc=D({name:"RangeTrimFull",pattern:/\.:\./}),Jc=D({name:"RangeTrimLeading",pattern:/\.:/}),tu=D({name:"RangeTrimTrailing",pattern:/:\./}),eu=D({name:"Semicolon",pattern:/;/}),nu=D({name:"OpenParen",pattern:/\(/}),ru=D({name:"CloseParen",pattern:/\)/}),iu=D({name:"OpenSquareParen",pattern:/\[/}),ou=D({name:"CloseSquareParen",pattern:/]/});D({name:"exclamationMark",pattern:/!/});const su=D({name:"OpenCurlyParen",pattern:/{/}),au=D({name:"CloseCurlyParen",pattern:/}/}),cu=D({name:"QuoteS",pattern:/'/}),co=D({name:"MulOp",pattern:/\*/}),uu=D({name:"PlusOp",pattern:/\+/}),lu=D({name:"DivOp",pattern:/\//}),hu=D({name:"MinOp",pattern:/-/}),fu=D({name:"ImplicitIntersectOp",pattern:/@/}),du=D({name:"ConcatOp",pattern:/&/}),pu=D({name:"ExOp",pattern:/\^/}),mu=D({name:"PercentOp",pattern:/%/}),xs=D({name:"TableSpecifier",pattern:/#(All|Data|Headers|Totals|This Row)/i}),Eu=D({name:"ArrayAnchorOp",pattern:/#/,longer_alt:[xs,_s,Ls]}),gu=D({name:"GtOp",pattern:/>/}),Tu=D({name:"EqOp",pattern:/=/}),Au=D({name:"LtOp",pattern:/</}),Cs=[Dc,Os,Bc,jc,$c,Ss,Wc,_s,Ls,Gc,Kc,Xc,Vc,Hc,xs,Eu,fu,Cn,Yc,qc,Qc,Jc,tu,Zc,eu,nu,ru,iu,ou,su,au,cu,co,uu,lu,hu,du,pu,co,mu,D({name:"NeqOp",pattern:/<>/}),D({name:"GteOp",pattern:/>=/}),D({name:"LteOp",pattern:/<=/}),gu,Tu,Au],Iu=new ot(Cs,{ensureOptimizations:!0}),Gr={};Cs.forEach(t=>{Gr[t.name]=t});const qt={boolean:3,string:2,number:1},Nu=(t,e)=>{let n=t+e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},yu=(t,e)=>{let n=t-e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},ks=(t,e)=>{let n=t*e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},bs=(t,e)=>{if(e===0)return 1/0;let n=t/e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},Ru=(t,e)=>{const n=t**e;return isFinite(n)?n:Number.NaN},vu=(t="",e="")=>(t===null&&(t=""),e===null&&(e=""),typeof t=="boolean"&&(t=t?"TRUE":"FALSE"),typeof e=="boolean"&&(e=e?"TRUE":"FALSE"),""+t+e),Ou=(t=null,e=null)=>typeof t==typeof e&&t===e,Su=(t=null,e=null)=>typeof t!=typeof e||t!==e,_u=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>e:qt[n]>qt[r]},Lu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>=e:qt[n]>=qt[r]},xu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<e:qt[n]<qt[r]},Cu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<=e:qt[n]<=qt[r]},ku={type:_.M.Number,coerce:!0,includeBoolean:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},bu={type:_.M.String,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},Ps={type:null,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},le=(t,e,n,r)=>{if(e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),typeof e=="number"&&typeof n=="number")return r(e,n);let i,o;return e?.isIRange?i=e:n?.isIRange&&(o=n),i||o?(i||(i=t.getRange(e)),i.broadcast(n,r,ku).fillEmpty(0)):(e=_.rn(e,_.Ie(e,!0),_.M.Number,!0,!1),n=_.rn(n,_.Ie(n,!0),_.M.Number,!0,!1),e instanceof _.n.Value?e:n instanceof _.n.Value?n:r(e,n))},ce=(t,e,n,r)=>{let i,o;return e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),e?.isIRange?(i=e,o=n):n?.isIRange&&(i=n,o=e),i?i.broadcast(o,r,Ps):r(e,n)},uo=(t,e)=>{e==null&&(e=0);let n,r=1;if(t==="+")return e;if(t!=="-")throw new _.n.Value(`Unrecognized prefix: ${t}`);return r=-r,e?.isIRange&&(n=e),n?n.broadcast(r,ks,Ps):typeof(e=_.rn(e,_.Ie(e,!0),_.M.Number))!="number"||isNaN(e)?_.n.BuiltIn.Value:e*r},ve=(t,e,n,r)=>{if(!e||(e.isIReferenceRange&&(e=e.getCoords()),e.colStart===void 0)||(n.isIReferenceRange&&(n=n.getCoords()),n.colStart===void 0))return _.n.BuiltIn.Ref;const i=r(e,n);return i?t.getReference(i):_.n.BuiltIn.Null},Pu={"+":(t,e,n)=>le(t,e,n,Nu),"-":(t,e,n)=>le(t,e,n,yu),"*":(t,e,n)=>le(t,e,n,ks),"/":(t,e,n)=>le(t,e,n,bs),"^":(t,e,n)=>le(t,e,n,Ru)," ":(t,e,n,r)=>ve(t,e,n,_.Zt.intersectRanges),":":(t,e,n,r)=>ve(t,e,n,_.Zt.unionRanges),".:.":(t,e,n,r)=>{const i=ve(t,e,n,_.Zt.unionRanges);return t.getFunction("TRIMRANGE").execute(i,3,3)},".:":(t,e,n,r)=>{const i=ve(t,e,n,_.Zt.unionRanges);return t.getFunction("TRIMRANGE").execute(i,1,1)},":.":(t,e,n,r)=>{const i=ve(t,e,n,_.Zt.unionRanges);return t.getFunction("TRIMRANGE").execute(i,2,2)},"&":(t,e,n)=>((r,i,o,s)=>{if(i!==null&&i.colStart!==void 0&&(i=r.getValueAt(i.rowStart,i.colStart)),o!==null&&o.colStart!==void 0&&(o=r.getValueAt(o.rowStart,o.colStart)),typeof i=="string"&&typeof o=="string")return s(i,o);let a,c;return i?.isIRange?a=i:o?.isIRange&&(c=o),a||c?(a||(a=r.getRange(i)),a.broadcast(o,s,bu)):s(i=_.rn(i,_.Ie(i,!0),_.M.String),o=_.rn(o,_.Ie(o,!0),_.M.String))})(t,e,n,vu),"=":(t,e,n)=>ce(t,e,n,Ou),"<>":(t,e,n)=>ce(t,e,n,Su),">":(t,e,n)=>ce(t,e,n,_u),"<":(t,e,n)=>ce(t,e,n,xu),">=":(t,e,n)=>ce(t,e,n,Lu),"<=":(t,e,n)=>ce(t,e,n,Cu)},wu={"-":(t,e)=>uo("-",e),"+":(t,e)=>uo("+",e),"@":(t,e)=>{if(!e||!e.isIReferenceRange)return e;const n=e.getCoords(),r=e,i=t.getPosition(),o=r.getHeight(),s=r.getWidth();if(s>1&&o>1)return _.n.BuiltIn.Value;if(o>1){const a=i.rowIndex-n.rowStart;if(a>=0&&a<o)return r.getValueAt(a,0)}else{if(!(s>1))return r.getValueAt(0,0);{const a=i.colIndex-n.colStart;if(a>=0&&a<s)return r.getValueAt(0,a)}}return _.n.BuiltIn.Value}},Mu={"%":(t,e)=>le(t,e,100,bs),"#":(t,e)=>t.getSpillAt(e.rowStart,e.colStart)||_.n.BuiltIn.Ref};function lo(t){const e=(t=t.toUpperCase()).length;let n=0;for(let r=0;r<e;r++){const i=t.charCodeAt(r);isNaN(i)||(n+=(i-64)*26**(e-r-1))}return n}function Xn(t){return{type:"cell",value:Object.freeze({colIndex:t.colIndex,rowIndex:t.rowIndex,$colIndex:t.$colIndex||!1,$rowIndex:t.$rowIndex||!1}),inputs:null,isReference:!0}}function ho(t,e){const n=t.startsWith("$");n&&(t=t.substring(1));let r=parseInt(t)-1;return n||r===Number.MIN_SAFE_INTEGER||(r-=e.colIndex),{type:"cell",value:Object.freeze({colIndex:Number.MIN_SAFE_INTEGER,$colIndex:!1,rowIndex:r,$rowIndex:n}),inputs:null,isReference:!0}}function fo(t,e){return{type:"function",value:t=t.toUpperCase(),inputs:e}}function qn(t,e){return{type:"tableReference",value:t,inputs:e}}function Zn(t){return{type:"tableSpecifier",value:t,inputs:null,isReference:!0}}function Lr(t,e,n,r=!1){const i={type:"infix",value:t,inputs:[e,n]};return r&&(i.isReference=!0),i}function Qn(t,e,n=!1){const r={type:"postfix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function _e(t,e,n=!1){const r={type:"prefix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function Jn(t){return{type:"named",value:t,inputs:null,isReference:!0}}function po(t){return{type:"number",value:Number(t),isLiteral:!0}}function tr(t){let e=t;const n=t&&t.length>1&&t[0]==='"'&&t[t.length-1]==='"';return n&&(e=t.substring(1,t.length-1)),{type:n?"quotedString":"string",value:e,isLiteral:!0}}function mo(t){return{type:"boolean",value:t==="TRUE"||t.toUpperCase()==="TRUE",isLiteral:!0}}function Eo(t){return{type:"error",value:_.n.getBuiltInByLabel(t.toUpperCase()),isLiteral:!0}}function gn(t){return{type:"error",value:t?_.n.getBuiltInByLabel(t.toUpperCase()):_.n.BuiltIn.Ref,inputs:null,isReference:!0}}function je(t,e){return(function n(r,i){const o=r.inputs;let s;if(o){const u=o.length;for(let l=0;l<u;l++){const h=o[l],N=n(h,r);N!==h&&(s||(s=[...o]),s[l]=N)}}const a=s?{...r,inputs:s}:r,c=e(a,i);return c===void 0?a:c})(t,void 0)||this}function sn(t,e){let n=0,r=je(t,g=>{const A={...g};return A.evalIndex=n++,A});const i=new Array(n),o=new Set,s=new Map;let a;const c=new Map,u=[],l=[];r=je(r,(g,A)=>{const v=g.type,f=g.evalIndex;if(i[f]=null,g.isReference){const d=g,I={node:g,index:c.size,op:null,value:null,inputs:null};if(c.set(d,I),v==="cell"){const E=d.value;return E.$colIndex&&(I.hasHorizontalAbs=!0),E.$rowIndex&&(I.hasVerticalAbs=!0),I.value=s.size,s.set(d,s.size),o.add(I),g.refIndex=l.length,void l.push(I.index)}if(v==="infix"||v==="prefix"||v==="postfix"||v==="spill"){const E=d.inputs,R=E.length,U=g.value;I.op=U;const x=new Array(R);I.inputs=x;for(let O=0;O<R;O++){const w=E[O],C=c.get(w);C&&(C.hasHorizontalAbs&&(I.hasHorizontalAbs=!0),C.hasVerticalAbs&&(I.hasVerticalAbs=!0)),x[O]=C?C.index:-1,o.delete(C)}if(o.add(I),ws.includes(U)){const O=E[0],w=!!O&&O.type==="cell",C=E[1],k=!!C&&C.type==="cell";w&&k&&(l.splice(C.refIndex,1),C.refIndex=O.refIndex,g.refIndex=O.refIndex,l[O.refIndex]=I.index)}else U==="#"&&(g.refIndex=E[0].refIndex);return void u.push(g)}if(v==="error"||v==="named"){a||(a=new Map);const E=d.value;let R=a.get(E);return I.op=v,R===void 0&&(R=a.size,a.set(E,R)),I.value=R,o.add(I),g.refIndex=l.length,void l.push(I.index)}v==="tableReference"&&(I.op=v),v==="tableSpecifier"&&(I.op=v),v==="structuredArg"&&(I.op=v)}else if(A&&A.isReference){const d=g,I={node:g,index:c.size,op:"function",value:g.value,inputs:null};c.set(d,I)}if(g.isLiteral)if(v!=="array")i[f]=g.value;else{const d=g.value,I=d.length,E=new Array(I);for(let R=0;R<I;R++){const U=d[R].value,x=U.length,O=new Array(x);for(let w=0;w<x;w++){const C=U[w];let k=C.value;if(C.type==="prefix"){const $=C.value;k=C.inputs[0].value,$==="-"&&(k=-k)}O[w]=k}E[R]=O}i[f]=_.q0(E)}else{if(v!=="empty")return u.push(g),g;i[f]=void 0}});const h=new Array(s.size);s.forEach((g,A)=>{const v=A.value,f=v.colIndex,d=v.rowIndex,I=v.$colIndex,E=v.$rowIndex,R={colStart:f,rowStart:d,colEnd:f,rowEnd:d,$colStart:I,$rowStart:E,$colEnd:I,$rowEnd:E};f===Number.MIN_SAFE_INTEGER&&(R.colEnd=Number.MAX_SAFE_INTEGER),d===Number.MIN_SAFE_INTEGER&&(R.rowEnd=Number.MAX_SAFE_INTEGER),v.sheetName&&(R.sheetName=v.sheetName),h[g]=R});const N=h.length,S=new Array(N);for(let g=0;g<N;g++)S[g]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const L=new Array(c.size);let m;c.forEach(g=>{L[g.index]=g}),a&&(m=[],a.forEach((g,A)=>{m.push(A)}));const y=[];o.forEach(g=>{y.push(g.index)});const p=u.length;for(let g=0;g<p;g++){const A=u[g],v=A.type;if(v==="infix"){const f=A.value;A.fn=Pu[f]}else if(v==="prefix"){const f=A.value;A.fn=wu[f]}else if(v==="postfix"){const f=A.value;A.fn=Mu[f]}}const T=(function(g){const A=[],v=(I,E)=>{const R={type:I.type,value:I.value};I.evalIndex!==void 0&&(R.evalIndex=I.evalIndex),I.refIndex!==void 0&&(R.refIndex=I.refIndex),E&&(R.ctx=E),A.push(R)},f=(I,E,R,U)=>{if(E==null||A.length>1&&I==="whitespace"&&A[A.length-1].type==="whitespace")return;const x={type:I,value:E};R&&(x.ctx=R),U!==void 0&&(x.evalIndex=U),A.push(x)};(function I(E,R,U){const x=E.evalIndex??U??0,O=E.type,w=(C,k,$)=>{if(!C)return;const X=C.length;for(let W=0;W<X;W++)I(C[W],k,$),W<X-1&&f("comma",",",k)};if(E.isLiteral){if(f("whitespace",E.wsBefore,R),O==="array"){f("type","{",R);const C=E.value,k=C.length;for(let $=0;$<k;$++){const X=C[$],W=X.value,rt=W.length;for(let mt=0;mt<rt;mt++){const xt=W[mt];f("whitespace",xt.wsBefore,R),I(xt,R,x),f("whitespace",xt.wsAfter,R),mt<rt-1&&f("comma",",",R)}$<k-1&&(f("whitespace",X.wsBefore,R),f("comma",";",R),f("whitespace",X.wsAfter,R))}E.error||f("type","}",R)}else O==="quotedString"&&(E={type:O,value:'"'+E.value+'"'}),v(E,R);f("whitespace",E.wsAfter,R)}else if(O==="infix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[1],R,x);else if(O==="prefix")f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[0],R,x);else if(O==="postfix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R);else{f("whitespace",E.wsBefore,R);const C=E.inputs;switch(O){case"function":v(E,R);const k={name:String(E.value),argIndex:-1};if(f("paren","(",k,E.evalIndex),C){const X=C.length;for(let W=0;W<X;W++){const rt={...k,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren",")",k,E.evalIndex);break;case"cell":v(E,R);break;case"paren":f(O,"(",R,x),w(C,R,x),E.error||f(O,")",R,x);break;case"squareParen":f(O,"[",R,x),w(C,R,x),E.error||f(O,"]",R,x);break;case"tableReference":v(E,R);const $={name:String(E.value),argIndex:-1};if(f("paren","[",$),C){const X=C.length;for(let W=0;W<X;W++){const rt={...$,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren","]",$);break;default:E.value!==void 0&&v(E,R),C&&C.forEach(X=>I(X,R,x))}f("whitespace",E.wsAfter,R)}})(g);const d=A.length;for(let I=0;I<d;I++){const E=A[I];if(E.type==="whitespace"&&E.evalIndex===void 0){const R=A[I+1];R&&R.evalIndex!==void 0&&(E.evalIndex=R.evalIndex)}}return A})(r);return{ast:r,evaluations:i,executions:u,precedentsAbsolute:S,precedentsExecute:L,precedentsNamed:m,precedentsRelative:h,precedentsRoot:y,references:l,tokens:T,error:e}}function go(t,e){let n,r=-1,i="";Number.isSafeInteger(t.previousToken?.startLine)?(r=t.previousToken.startLine,n=t.previousToken.endColumn+1):Number.isSafeInteger(t.token?.startLine)&&(r=t.token.startLine,n=t.token.startColumn),r!==-1?(i+=`
113
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const r=pe(this.recordingProdStack),i=new V({idx:e,terminalType:t,label:n?.LABEL});return r.definition.push(i),vs}},class{initPerformanceTracer(t){if(P(t,"traceInitPerf")){const e=t.traceInitPerf,n=typeof e=="number";this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=zt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);const{time:r,value:i}=rs(e),o=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${t}> time: ${r}ms`),this.traceInitIndent--,i}return e()}}].forEach(t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach(n=>{if(n==="constructor")return;const r=Object.getOwnPropertyDescriptor(e,n);r&&(r.get||r.set)?Object.defineProperty(Yn.prototype,n,r):Yn.prototype[n]=t.prototype[n]})});class Fc extends De{constructor(e,n=zt){const r=et(n);r.outputCst=!1,super(e,r)}}const Dc=D({name:"WhiteSpace",pattern:/\s+/,group:ot.SKIPPED}),Os=D({name:"String",pattern:/"(""|[^"])*"/}),jc=D({name:"SingleQuotedString",pattern:/'(''|[^'])*'/}),Bc=D({name:"SheetQuoted",pattern:/'((?![\\/[\]*?:]).)+?'!/}),$c=D({name:"FunctionToken",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\(/}),Ss=D({name:"NamedTableReference",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\[/}),Wc=D({name:"BracketedString",pattern:/\[([^[\]]*)\]/,longer_alt:[Ss,Os]}),_s=D({name:"LiteralError",pattern:/#PARSE!|#NULL!|#DIV\/0!|#VALUE!|#NUM!|#FIELD!|#N\/A|#GETTING_DATA|#SPILL!|#CONNECT!|#BLOCKED!|#UNKNOWN!|#FIELD!|#CALC!|#BUSY!|#PYTHON!|#TIMEOUT!/}),Ls=D({name:"RefError",pattern:/#REF!|#NAME\?/}),Gc=D({name:"Sheet",pattern:/[A-Za-z_.\d\u007F-\uFFFF]+!/}),zc=/^[a-zA-Z_][a-zA-Z0-9_.?]*:?/,Cn=D({name:"Name",pattern:{exec:(t,e)=>{try{const n=zc.exec(t.substring(e));if(n){const r=n[0];if(r.endsWith(":")){const i=r.length;return r[i-2]==="."?[r.substring(0,i-2)]:[r.substring(0,i-1)]}return[r]}}catch(n){console.warn("Error parsing name",n)}return null}},line_breaks:!1,start_chars_hint:(()=>{const t=[];for(let e=65;e<=90;e++)t.push(e);for(let e=97;e<=122;e++)t.push(e);for(let e=48;e<=57;e++)t.push(e);return t})()}),Kc=D({name:"Cell",pattern:/[$]?[A-Za-z]{1,3}[$]?[1-9][0-9]*/,longer_alt:Cn}),Vc=D({name:"Column",pattern:/[$]?[A-Za-z]{1,3}/,longer_alt:Cn}),Hc=D({name:"AbsRow",pattern:/[$][0-9]+/,longer_alt:Cn}),Yc=D({name:"NumberToken",pattern:/[0-9]+[.]?[0-9]*([eE][+-][0-9]+)?/}),Xc=D({name:"Boolean",pattern:/TRUE|FALSE/i}),qc=D({name:"Comma",pattern:/,/}),Zc=D({name:"RangeUnion",pattern:/:/}),Qc=D({name:"RangeTrimFull",pattern:/\.:\./}),Jc=D({name:"RangeTrimLeading",pattern:/\.:/}),tu=D({name:"RangeTrimTrailing",pattern:/:\./}),eu=D({name:"Semicolon",pattern:/;/}),nu=D({name:"OpenParen",pattern:/\(/}),ru=D({name:"CloseParen",pattern:/\)/}),iu=D({name:"OpenSquareParen",pattern:/\[/}),ou=D({name:"CloseSquareParen",pattern:/]/});D({name:"exclamationMark",pattern:/!/});const su=D({name:"OpenCurlyParen",pattern:/{/}),au=D({name:"CloseCurlyParen",pattern:/}/}),cu=D({name:"QuoteS",pattern:/'/}),co=D({name:"MulOp",pattern:/\*/}),uu=D({name:"PlusOp",pattern:/\+/}),lu=D({name:"DivOp",pattern:/\//}),hu=D({name:"MinOp",pattern:/-/}),fu=D({name:"ImplicitIntersectOp",pattern:/@/}),du=D({name:"ConcatOp",pattern:/&/}),pu=D({name:"ExOp",pattern:/\^/}),mu=D({name:"PercentOp",pattern:/%/}),xs=D({name:"TableSpecifier",pattern:/#(All|Data|Headers|Totals|This Row)/i}),Eu=D({name:"ArrayAnchorOp",pattern:/#/,longer_alt:[xs,_s,Ls]}),gu=D({name:"GtOp",pattern:/>/}),Tu=D({name:"EqOp",pattern:/=/}),Au=D({name:"LtOp",pattern:/</}),Cs=[Dc,Os,Bc,jc,$c,Ss,Wc,_s,Ls,Gc,Kc,Xc,Vc,Hc,xs,Eu,fu,Cn,Yc,qc,Qc,Jc,tu,Zc,eu,nu,ru,iu,ou,su,au,cu,co,uu,lu,hu,du,pu,co,mu,D({name:"NeqOp",pattern:/<>/}),D({name:"GteOp",pattern:/>=/}),D({name:"LteOp",pattern:/<=/}),gu,Tu,Au],Iu=new ot(Cs,{ensureOptimizations:!0}),Gr={};Cs.forEach(t=>{Gr[t.name]=t});const qt={boolean:3,string:2,number:1},Nu=(t,e)=>{let n=t+e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},yu=(t,e)=>{let n=t-e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},ks=(t,e)=>{let n=t*e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},bs=(t,e)=>{if(e===0)return 1/0;let n=t/e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},Ru=(t,e)=>{const n=t**e;return isFinite(n)?n:Number.NaN},vu=(t="",e="")=>(t===null&&(t=""),e===null&&(e=""),typeof t=="boolean"&&(t=t?"TRUE":"FALSE"),typeof e=="boolean"&&(e=e?"TRUE":"FALSE"),""+t+e),Ou=(t=null,e=null)=>typeof t==typeof e&&t===e,Su=(t=null,e=null)=>typeof t!=typeof e||t!==e,_u=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>e:qt[n]>qt[r]},Lu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>=e:qt[n]>=qt[r]},xu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<e:qt[n]<qt[r]},Cu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<=e:qt[n]<=qt[r]},ku={type:_.M.Number,coerce:!0,includeBoolean:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},bu={type:_.M.String,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},Ps={type:null,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},le=(t,e,n,r)=>{if(e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),typeof e=="number"&&typeof n=="number")return r(e,n);let i,o;return e?.isIRange?i=e:n?.isIRange&&(o=n),i||o?(i||(i=t.getRange(e)),i.broadcast(n,r,ku).fillEmpty(0)):(e=_.nn(e,_.ve(e,!0),_.M.Number,!0,!1),n=_.nn(n,_.ve(n,!0),_.M.Number,!0,!1),e instanceof _.n.Value?e:n instanceof _.n.Value?n:r(e,n))},ce=(t,e,n,r)=>{let i,o;return e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),e?.isIRange?(i=e,o=n):n?.isIRange&&(i=n,o=e),i?i.broadcast(o,r,Ps):r(e,n)},uo=(t,e)=>{e==null&&(e=0);let n,r=1;if(t==="+")return e;if(t!=="-")throw new _.n.Value(`Unrecognized prefix: ${t}`);return r=-r,e?.isIRange&&(n=e),n?n.broadcast(r,ks,Ps):typeof(e=_.nn(e,_.ve(e,!0),_.M.Number))!="number"||isNaN(e)?_.n.BuiltIn.Value:e*r},ve=(t,e,n,r)=>{if(!e||(e.isIReferenceRange&&(e=e.getCoords()),e.colStart===void 0)||(n.isIReferenceRange&&(n=n.getCoords()),n.colStart===void 0))return _.n.BuiltIn.Ref;const i=r(e,n);return i?t.getReference(i):_.n.BuiltIn.Null},Pu={"+":(t,e,n)=>le(t,e,n,Nu),"-":(t,e,n)=>le(t,e,n,yu),"*":(t,e,n)=>le(t,e,n,ks),"/":(t,e,n)=>le(t,e,n,bs),"^":(t,e,n)=>le(t,e,n,Ru)," ":(t,e,n,r)=>ve(t,e,n,_.Zt.intersectRanges),":":(t,e,n,r)=>ve(t,e,n,_.Zt.unionRanges),".:.":(t,e,n,r)=>{const i=ve(t,e,n,_.Zt.unionRanges);return t.getFunction("TRIMRANGE").execute(i,3,3)},".:":(t,e,n,r)=>{const i=ve(t,e,n,_.Zt.unionRanges);return t.getFunction("TRIMRANGE").execute(i,1,1)},":.":(t,e,n,r)=>{const i=ve(t,e,n,_.Zt.unionRanges);return t.getFunction("TRIMRANGE").execute(i,2,2)},"&":(t,e,n)=>((r,i,o,s)=>{if(i!==null&&i.colStart!==void 0&&(i=r.getValueAt(i.rowStart,i.colStart)),o!==null&&o.colStart!==void 0&&(o=r.getValueAt(o.rowStart,o.colStart)),typeof i=="string"&&typeof o=="string")return s(i,o);let a,c;return i?.isIRange?a=i:o?.isIRange&&(c=o),a||c?(a||(a=r.getRange(i)),a.broadcast(o,s,bu)):s(i=_.nn(i,_.ve(i,!0),_.M.String),o=_.nn(o,_.ve(o,!0),_.M.String))})(t,e,n,vu),"=":(t,e,n)=>ce(t,e,n,Ou),"<>":(t,e,n)=>ce(t,e,n,Su),">":(t,e,n)=>ce(t,e,n,_u),"<":(t,e,n)=>ce(t,e,n,xu),">=":(t,e,n)=>ce(t,e,n,Lu),"<=":(t,e,n)=>ce(t,e,n,Cu)},wu={"-":(t,e)=>uo("-",e),"+":(t,e)=>uo("+",e),"@":(t,e)=>{if(!e||!e.isIReferenceRange)return e;const n=e.getCoords(),r=e,i=t.getPosition(),o=r.getHeight(),s=r.getWidth();if(s>1&&o>1)return _.n.BuiltIn.Value;if(o>1){const a=i.rowIndex-n.rowStart;if(a>=0&&a<o)return r.getValueAt(a,0)}else{if(!(s>1))return r.getValueAt(0,0);{const a=i.colIndex-n.colStart;if(a>=0&&a<s)return r.getValueAt(0,a)}}return _.n.BuiltIn.Value}},Mu={"%":(t,e)=>le(t,e,100,bs),"#":(t,e)=>t.getSpillAt(e.rowStart,e.colStart)||_.n.BuiltIn.Ref};function lo(t){const e=(t=t.toUpperCase()).length;let n=0;for(let r=0;r<e;r++){const i=t.charCodeAt(r);isNaN(i)||(n+=(i-64)*26**(e-r-1))}return n}function Xn(t){return{type:"cell",value:Object.freeze({colIndex:t.colIndex,rowIndex:t.rowIndex,$colIndex:t.$colIndex||!1,$rowIndex:t.$rowIndex||!1}),inputs:null,isReference:!0}}function ho(t,e){const n=t.startsWith("$");n&&(t=t.substring(1));let r=parseInt(t)-1;return n||r===Number.MIN_SAFE_INTEGER||(r-=e.colIndex),{type:"cell",value:Object.freeze({colIndex:Number.MIN_SAFE_INTEGER,$colIndex:!1,rowIndex:r,$rowIndex:n}),inputs:null,isReference:!0}}function fo(t,e){return{type:"function",value:t=t.toUpperCase(),inputs:e}}function qn(t,e){return{type:"tableReference",value:t,inputs:e}}function Zn(t){return{type:"tableSpecifier",value:t,inputs:null,isReference:!0}}function Lr(t,e,n,r=!1){const i={type:"infix",value:t,inputs:[e,n]};return r&&(i.isReference=!0),i}function Qn(t,e,n=!1){const r={type:"postfix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function _e(t,e,n=!1){const r={type:"prefix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function Jn(t){return{type:"named",value:t,inputs:null,isReference:!0}}function po(t){return{type:"number",value:Number(t),isLiteral:!0}}function tr(t){let e=t;const n=t&&t.length>1&&t[0]==='"'&&t[t.length-1]==='"';return n&&(e=t.substring(1,t.length-1)),{type:n?"quotedString":"string",value:e,isLiteral:!0}}function mo(t){return{type:"boolean",value:t==="TRUE"||t.toUpperCase()==="TRUE",isLiteral:!0}}function Eo(t){return{type:"error",value:_.n.getBuiltInByLabel(t.toUpperCase()),isLiteral:!0}}function gn(t){return{type:"error",value:t?_.n.getBuiltInByLabel(t.toUpperCase()):_.n.BuiltIn.Ref,inputs:null,isReference:!0}}function je(t,e){return(function n(r,i){const o=r.inputs;let s;if(o){const u=o.length;for(let l=0;l<u;l++){const h=o[l],N=n(h,r);N!==h&&(s||(s=[...o]),s[l]=N)}}const a=s?{...r,inputs:s}:r,c=e(a,i);return c===void 0?a:c})(t,void 0)||this}function sn(t,e){let n=0,r=je(t,g=>{const A={...g};return A.evalIndex=n++,A});const i=new Array(n),o=new Set,s=new Map;let a;const c=new Map,u=[],l=[];r=je(r,(g,A)=>{const v=g.type,f=g.evalIndex;if(i[f]=null,g.isReference){const d=g,I={node:g,index:c.size,op:null,value:null,inputs:null};if(c.set(d,I),v==="cell"){const E=d.value;return E.$colIndex&&(I.hasHorizontalAbs=!0),E.$rowIndex&&(I.hasVerticalAbs=!0),I.value=s.size,s.set(d,s.size),o.add(I),g.refIndex=l.length,void l.push(I.index)}if(v==="infix"||v==="prefix"||v==="postfix"||v==="spill"){const E=d.inputs,R=E.length,U=g.value;I.op=U;const x=new Array(R);I.inputs=x;for(let O=0;O<R;O++){const w=E[O],C=c.get(w);C&&(C.hasHorizontalAbs&&(I.hasHorizontalAbs=!0),C.hasVerticalAbs&&(I.hasVerticalAbs=!0)),x[O]=C?C.index:-1,o.delete(C)}if(o.add(I),ws.includes(U)){const O=E[0],w=!!O&&O.type==="cell",C=E[1],k=!!C&&C.type==="cell";w&&k&&(l.splice(C.refIndex,1),C.refIndex=O.refIndex,g.refIndex=O.refIndex,l[O.refIndex]=I.index)}else U==="#"&&(g.refIndex=E[0].refIndex);return void u.push(g)}if(v==="error"||v==="named"){a||(a=new Map);const E=d.value;let R=a.get(E);return I.op=v,R===void 0&&(R=a.size,a.set(E,R)),I.value=R,o.add(I),g.refIndex=l.length,void l.push(I.index)}v==="tableReference"&&(I.op=v),v==="tableSpecifier"&&(I.op=v),v==="structuredArg"&&(I.op=v)}else if(A&&A.isReference){const d=g,I={node:g,index:c.size,op:"function",value:g.value,inputs:null};c.set(d,I)}if(g.isLiteral)if(v!=="array")i[f]=g.value;else{const d=g.value,I=d.length,E=new Array(I);for(let R=0;R<I;R++){const U=d[R].value,x=U.length,O=new Array(x);for(let w=0;w<x;w++){const C=U[w];let k=C.value;if(C.type==="prefix"){const $=C.value;k=C.inputs[0].value,$==="-"&&(k=-k)}O[w]=k}E[R]=O}i[f]=_.J0(E)}else{if(v!=="empty")return u.push(g),g;i[f]=void 0}});const h=new Array(s.size);s.forEach((g,A)=>{const v=A.value,f=v.colIndex,d=v.rowIndex,I=v.$colIndex,E=v.$rowIndex,R={colStart:f,rowStart:d,colEnd:f,rowEnd:d,$colStart:I,$rowStart:E,$colEnd:I,$rowEnd:E};f===Number.MIN_SAFE_INTEGER&&(R.colEnd=Number.MAX_SAFE_INTEGER),d===Number.MIN_SAFE_INTEGER&&(R.rowEnd=Number.MAX_SAFE_INTEGER),v.sheetName&&(R.sheetName=v.sheetName),h[g]=R});const N=h.length,S=new Array(N);for(let g=0;g<N;g++)S[g]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const L=new Array(c.size);let m;c.forEach(g=>{L[g.index]=g}),a&&(m=[],a.forEach((g,A)=>{m.push(A)}));const y=[];o.forEach(g=>{y.push(g.index)});const p=u.length;for(let g=0;g<p;g++){const A=u[g],v=A.type;if(v==="infix"){const f=A.value;A.fn=Pu[f]}else if(v==="prefix"){const f=A.value;A.fn=wu[f]}else if(v==="postfix"){const f=A.value;A.fn=Mu[f]}}const T=(function(g){const A=[],v=(I,E)=>{const R={type:I.type,value:I.value};I.evalIndex!==void 0&&(R.evalIndex=I.evalIndex),I.refIndex!==void 0&&(R.refIndex=I.refIndex),E&&(R.ctx=E),A.push(R)},f=(I,E,R,U)=>{if(E==null||A.length>1&&I==="whitespace"&&A[A.length-1].type==="whitespace")return;const x={type:I,value:E};R&&(x.ctx=R),U!==void 0&&(x.evalIndex=U),A.push(x)};(function I(E,R,U){const x=E.evalIndex??U??0,O=E.type,w=(C,k,$)=>{if(!C)return;const X=C.length;for(let W=0;W<X;W++)I(C[W],k,$),W<X-1&&f("comma",",",k)};if(E.isLiteral){if(f("whitespace",E.wsBefore,R),O==="array"){f("type","{",R);const C=E.value,k=C.length;for(let $=0;$<k;$++){const X=C[$],W=X.value,rt=W.length;for(let mt=0;mt<rt;mt++){const xt=W[mt];f("whitespace",xt.wsBefore,R),I(xt,R,x),f("whitespace",xt.wsAfter,R),mt<rt-1&&f("comma",",",R)}$<k-1&&(f("whitespace",X.wsBefore,R),f("comma",";",R),f("whitespace",X.wsAfter,R))}E.error||f("type","}",R)}else O==="quotedString"&&(E={type:O,value:'"'+E.value+'"'}),v(E,R);f("whitespace",E.wsAfter,R)}else if(O==="infix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[1],R,x);else if(O==="prefix")f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[0],R,x);else if(O==="postfix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R);else{f("whitespace",E.wsBefore,R);const C=E.inputs;switch(O){case"function":v(E,R);const k={name:String(E.value),argIndex:-1};if(f("paren","(",k,E.evalIndex),C){const X=C.length;for(let W=0;W<X;W++){const rt={...k,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren",")",k,E.evalIndex);break;case"cell":v(E,R);break;case"paren":f(O,"(",R,x),w(C,R,x),E.error||f(O,")",R,x);break;case"squareParen":f(O,"[",R,x),w(C,R,x),E.error||f(O,"]",R,x);break;case"tableReference":v(E,R);const $={name:String(E.value),argIndex:-1};if(f("paren","[",$),C){const X=C.length;for(let W=0;W<X;W++){const rt={...$,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren","]",$);break;default:E.value!==void 0&&v(E,R),C&&C.forEach(X=>I(X,R,x))}f("whitespace",E.wsAfter,R)}})(g);const d=A.length;for(let I=0;I<d;I++){const E=A[I];if(E.type==="whitespace"&&E.evalIndex===void 0){const R=A[I+1];R&&R.evalIndex!==void 0&&(E.evalIndex=R.evalIndex)}}return A})(r);return{ast:r,evaluations:i,executions:u,precedentsAbsolute:S,precedentsExecute:L,precedentsNamed:m,precedentsRelative:h,precedentsRoot:y,references:l,tokens:T,error:e}}function go(t,e){let n,r=-1,i="";Number.isSafeInteger(t.previousToken?.startLine)?(r=t.previousToken.startLine,n=t.previousToken.endColumn+1):Number.isSafeInteger(t.token?.startLine)&&(r=t.token.startLine,n=t.token.startColumn),r!==-1?(i+=`
114
114
  `+e.split(`
115
115
  `)[r-1]+`
116
116
  `,i+=Array(n-1).fill(" ").join("")+`^
@@ -121,4 +121,4 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
121
121
  `)[l-1]+`
122
122
  `;throw N+=Array(h-1).fill(" ").join("")+`^
123
123
  `,u.message=N+`Error at position ${l}:${h}
124
- `+u.message,u.errorLocation={line:l,column:h},new _.n.Parse(u.message,{line:l,column:h,offset:u.offset,length:u.length})}return c})(n);let i;if(!r)return i={type:"text",value:n},i;const o=r.tokens;this.input=o,this.inputTextLength=n.length;const s=e.getPosition();return this.position=s,this.astErrors=[],this.reset(),i=this.intersectOp(),i=je(i,(a,c)=>{let u=a.type;if(u==="function"&&a.value&&a.value.toUpperCase().startsWith("_XLFN.")){const l=a.value.substring(6);let h=a.image.substring(6),N=a;l==="ANCHORARRAY"?(N=Qn("#",a.inputs[0],!0),h="#"):l==="SINGLE"?(N=_e("@",a.inputs[0],!0),h="@"):N=fo(l,a.inputs),er(N,a),N.image=h,u=(a=N).type}if(c?.isReference){const l=c.value;if((l===":"||l===".:."||l===".:"||l===":.")&&Number.isInteger(a.value)){const h=c.inputs[0]===a?c.inputs[1]:c.inputs[0];if(h&&Number.isInteger(h.value)){const N=ho(a.image,s);return er(N,a),N}}}else if(u==="cell"){const l=a.value;if(l.rowIndex===Number.MIN_SAFE_INTEGER||l.colIndex>=16384){const h=Jn(a.image);return er(h,a),h}}return a}),i}build(e,n){if(n.length===0)throw Error("Input must not be empty.");let r,i,o;try{r=this._createAST(e,n)}catch(c){o=c instanceof _.n.Parse?c:new _.n.Parse(c.message,c)}const s=this.errors;s.length>0&&(o=go(s[0],n));const a=this.astErrors;return a.length>0&&(o=go(a[0],n)),i=r?sn(r,o):{ast:null,evaluations:_.Xt.EmptyArray,executions:_.Xt.EmptyArray,precedentsAbsolute:_.Xt.EmptyArray,precedentsExecute:_.Xt.EmptyArray,precedentsNamed:null,precedentsRelative:_.Xt.EmptyArray,precedentsRoot:_.Xt.EmptyArray,references:_.Xt.EmptyArray,tokens:_.Xt.EmptyArray,error:o},i}}class be{constructor(e,n){this._options=e,this._compiled=n}getTextAt(e,n,r=!1){return r?_.zw(this._compiled.tokens):_.Pw(this._compiled.tokens,e,n)}getTokens(){return this._compiled.tokens}getError(){return this._compiled.error??null}isEquals(e){if(!(e&&e instanceof be))return!1;if(this===e)return!0;const n=this._compiled.tokens,r=e._compiled.tokens;return n.length===r.length&&_.zw(n)===_.zw(r)}getReferences(){const e=this._compiled,n=e.references,r=n.length;if(r===0)return _.Xt.EmptyArray;const i=e.precedentsExecute,o=e.precedentsRelative,s=new Array(r);for(let a=0;a<r;a++){const c=i[n[a]],u=c.inputs;if(u&&u.length===2){const l=o[i[u[0]].value],h=o[i[u[1]].value];s[a]={colStart:l.colStart,rowStart:l.rowStart,colEnd:h.colEnd,rowEnd:h.rowEnd,$colStart:l.$colStart,$rowStart:l.$rowStart,$colEnd:h.$colEnd,$rowEnd:h.$rowEnd,sheetName:l.sheetName}}else if(c.node.type==="cell"){const l=o[c.value];s[a]={...l}}else if(c.op==="named"){const l=e.precedentsNamed;s[a]=l[c.value]}else c.op==="error"&&(s[a]=c.node.value)}return s}setReferenceAt(e,n){const r=this._compiled,i=r.references;if(i.length===0)return _.Xt.EmptyArray;const o=r.precedentsExecute,s=i[e];if(s===void 0)throw new Error(`Invalid reference index: ${e}`);const a=o[s],c=a.node,u=c.inputs??_.Xt.EmptyArray;let l,h,N=!1;n&&(l={colIndex:n.colStart,rowIndex:n.rowStart,$colIndex:n.$colStart??!1,$rowIndex:n.$rowStart??!1},n.sheetName&&(l.sheetName=n.sheetName),N=!_.Zt.isSingleCell(n),N&&(h={colIndex:n.colEnd,rowIndex:n.rowEnd,$colIndex:n.$colEnd??!1,$rowIndex:n.$rowEnd??!1},n.colEnd===Number.MAX_SAFE_INTEGER&&(h.colIndex=Number.MIN_SAFE_INTEGER),n.rowEnd===Number.MAX_SAFE_INTEGER&&(h.rowIndex=Number.MIN_SAFE_INTEGER)));const S=u.length===2;let L=-1,m=-1;if(S)L=u[0].evalIndex,m=u[1].evalIndex;else{if(c.type!=="cell")throw a.op==="named"?new Error("Cannot setReference for a named reference"):new Error(`Invalidate reference index: ${e}`);L=c.evalIndex}const y=this._compiled.ast,p=je(y,A=>{if(!A||!A.isReference)return;const v=A.type;if(!n&&ws.includes(A.value)){const E=u[0],R=u[1];let U=E.evalIndex===L,x=R.evalIndex===m;if(U||x){const O=gn();return O.image="#REF!",O}}if(v!=="cell"&&v!=="error")return;const f=A.evalIndex;let d,I=f===L;if(I||f===m){if(n)if(S===N){let E=I?l:h;d={...A},d.value=E,d.image=null}else d=N?Lr(":",Xn(l),Xn(h),!0):Xn(l);else d=gn(),d.image="#REF!";return d}});if(p===y)return this;const T=sn(p,this._compiled.error),g=this._options;return new be(g,T)}_resolveNamed(e,n,r,i){const o=this._options?.getNamed;if(!o)return _.n.BuiltIn.Name;let s=o?.(e,this._options.getSheetName?.())?.[0];return s?(s.isFormulaError||(s=_.Sy(s,n,r,i)),s):_.n.BuiltIn.Name}getDirectPrecedentsAt(e,n,r=!1,i,o){const s=this._compiled,a=s.precedentsRoot,c=a.length;if(c===0)return _.Xt.EmptyArray;const u=s.precedentsRelative,l=s.precedentsAbsolute,h=u.length;for(let p=0;p<h;p++){const T=u[p];let g=l[p],A=_.Sy(T,e,n,g);l[p]=A}let N=!1;const S=s.precedentsExecute,L=S.length,m=xr;for(let p=0;p<L;p++){const T=S[p],g=T.op;if(!g){const I=l[T.value];m[T.index]=I;continue}if(g==="named"){N=!0,m[T.index]=this._resolveNamed(T.node.value,e,n);continue}if(g==="error"){m[T.index]=T.node.value;continue}if(g==="@"||g==="#"){m[T.index]=m[T.inputs[0]];continue}const A=T.inputs;if(!A)continue;let v=m[A[0]];if(v===void 0){m[T.index]=_.n.BuiltIn.Value;continue}if(v.isFormulaError){m[T.index]=v;continue}let f,d=m[A[1]];d!==void 0?d.isFormulaError?m[T.index]=d:(g===" "?f=_.Zt.intersectRanges(v,d):g!==":"&&g!==".:."&&g!==":."&&g!==".:"||(f=m[T.index]=_.Zt.unionRanges(v,d)),m[T.index]=f??_.n.BuiltIn.Null):m[T.index]=_.n.BuiltIn.Value}const y=new Array(c);for(let p=0;p<c;p++){const T=a[p],g=m[T];if(y[p]=g?.rowStart!==void 0?{...g}:g,i||o){const A=S[T];N&&A.op==="named"?(i&&(i[p]=g.$colStart||g.$colEnd),o&&(o[p]=g.$rowStart||g.$rowEnd)):(i&&(i[p]=A.hasVerticalAbs),o&&(o[p]=A.hasHorizontalAbs))}}return y}evaluate(e,n,r){const i=e.getPosition(),o=i?.rowIndex??0,s=i?.colIndex??0;let a=this._compiled;if(n!==void 0){let f;if(je(a.ast,d=>{d.evalIndex===n&&(f=d)}),!f)throw new Error(`Invalid evalIndex: ${n}`);a=sn(f,a.error)}if(a.error)return a.error;const c=a.evaluations,u=a.executions;let l,h;r||(r=this._resolvePrecedents(e));const N=a.precedentsExecute,S=a.precedentsRelative,L=a.precedentsAbsolute,m=N.length;for(let f=0;f<m;f++){const d=N[f],I=d.op;if(I){if(I==="named"){const E=d.node;let R=this._resolveNamed(d.node.value,o,s);R?.colStart!==void 0&&(R=e.getReference(R)),c[E.evalIndex]=R}else if(I==="error"){const E=d.node;c[E.evalIndex]=d.node.value}}else{const E=S[d.value];let R=L[f];const U=_.Sy(E,o,s,R),x=d.node;c[x.evalIndex]=U}}const y=a.precedentsRoot,p=y.length;if(p!==r.length)return _.n.BuiltIn.Parse;for(let f=0;f<p;f++){const d=N[y[f]].node;let I=r[f];I.isIRange&&d.type==="cell"&&I.size>1&&(I=I.getValueAt(0,0)??null),c[d.evalIndex]=I}let T;const g=f=>{const d=f.inputs,I=d?d.length:0;let E;switch(f.type){case"infix":const R=f.value;let U=c[d[0].evalIndex],x=c[d[1].evalIndex];if(R==="+"&&typeof U=="number"&&typeof x=="number"){const k=U+x;return Math.abs(k)<99e-14?0:k}if(R==="-"&&typeof U=="number"&&typeof x=="number"){const k=U-x;return Math.abs(k)<99e-14?0:k}if(U&&U.isFormulaError)return U;if(x&&x.isFormulaError)return x;const O=f.fn;return E=O?O(e,U,x):_.n.BuiltIn.Value,E=_.ca(E,null),E;case"function":T||(T=new Array(I)),T.length!==I&&(T.length=I);for(let k=0;k<I;k++)T[k]=c[d[k].evalIndex];return E=this._callFunction(e,f,T),E&&typeof E.then=="function"?E.then(k=>{k=_.ca(k,e),E instanceof _.n.Known&&(h=E),c[f.evalIndex]=k}).catch(k=>{const $=k instanceof _.n.Known?k:new _.n.Value("Uncaught error",{cause:k});c[f.evalIndex]=$}):E instanceof _.n.Known&&(h=E),E;case"prefix":case"postfix":let w=c[d[0].evalIndex];if(w&&w.isFormulaError)return w;const C=f.fn;return E=C?C(e,w):_.n.BuiltIn.Value,E;case"paren":if(I===1)return c[d[0].evalIndex];{const k=new Array(I);for(let $=0;$<I;$++)k[$]=c[d[$].evalIndex];return k}case"named":return null;case"empty":return}};let A=u.length;for(let f=0;f<A;f++){const d=u[f];if(h)return h;if(l)l=l.then(()=>{const I=g(d);return c[d.evalIndex]=I,I});else{const I=g(d);c[d.evalIndex]=I,I&&typeof I.then=="function"&&(l=I)}}if(l)return l.then(()=>{const f=c[c.length-1];return this._finalizeReturnValue(e,f)});const v=c[c.length-1];return this._finalizeReturnValue(e,v)}_resolvePrecedents(e){const n=e.getPosition(),r=n?.rowIndex??0,i=n?.colIndex??0,o=this.getDirectPrecedentsAt(r,i),s=o.length;let a;if(s>0){a=new Array(s);for(let c=0;c<s;c++){const u=o[c];if(u instanceof _.n.Known)a[c]=u;else if(Array.isArray(u)){const l=new Array(u.length);for(let h=0;h<u.length;h++)l[h]=e.getReference(u[h]);a[c]=l}else a[c]=e.getReference(u)}}else a=_.Xt.EmptyArray;return a}wrapImplicit(e,n,r){const i=this._compiled.ast;if(!i||!i.isReference)return this;if(i.type==="cell")return this;if(i.value==="@")return this;if(!r)return this;const o=_.ln(n)+_.Sn(e);if(r.has(o))return this;const s=sn(_e("@",i,!0),this._compiled.error);return new be(this._options,s)}_callFunction(e,n,r){const i=n?.cacheFn??e.getFunction(n.value);if(!i)return new _.n.Parse;const o=i.isBuiltIn();let s;o?n.cacheFn=i:this._context=e;try{s=i.execute(...r)}catch(a){s=a instanceof _.n.Known?a:new _.n.Value(a.message,{cause:a})}return o||(this._context=null),s===void 0?new _.n.Parse:s}_finalizeReturnValue(e,n){if(n&&n.colStart!==void 0&&(n=e.getValueAt(n.rowStart,n.colStart)),Array.isArray(n))if(n.length===1&&Array.isArray(n[0])&&n[0].length===1)n=n[0][0],Array.isArray(n)&&(n=_.n.BuiltIn.Value);else try{n=e.getRange(n)}catch{n=_.n.BuiltIn.Value}return n?.isIRange?n.size===1?(n=n.getValueAt(0,0,pl),(n=_.ca(n,e))===null&&(n=0)):n=n.fillEmpty(0):(n=_.ca(n,e))===null&&(n=0),n}get[Symbol.toStringTag](){return"[FormulaBlock]"}toString(){const e=this._compiled;if(e.error)return e.error.toString();const n=this._context;if(n){const r=n.getPosition();return this.getTextAt(r.rowIndex,r.colIndex)}return _.zw(e.tokens)}}const xr=new Array(20);for(let t=0;t<xr.length;t++)xr[t]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const pl={type:null};exports.FormulaParser=class{constructor(t){this._options={getEntireCoords:_.Yl,...t},this._astBuilder=new dl}parse(t,e){t.getPosition().sheetName;const n=this._astBuilder.build(t,e);return new be(this._options,n)}eval(t,e){return this.parse(t,e).evaluate(t)}};
124
+ `+u.message,u.errorLocation={line:l,column:h},new _.n.Parse(u.message,{line:l,column:h,offset:u.offset,length:u.length})}return c})(n);let i;if(!r)return i={type:"text",value:n},i;const o=r.tokens;this.input=o,this.inputTextLength=n.length;const s=e.getPosition();return this.position=s,this.astErrors=[],this.reset(),i=this.intersectOp(),i=je(i,(a,c)=>{let u=a.type;if(u==="function"&&a.value&&a.value.toUpperCase().startsWith("_XLFN.")){const l=a.value.substring(6);let h=a.image.substring(6),N=a;l==="ANCHORARRAY"?(N=Qn("#",a.inputs[0],!0),h="#"):l==="SINGLE"?(N=_e("@",a.inputs[0],!0),h="@"):N=fo(l,a.inputs),er(N,a),N.image=h,u=(a=N).type}if(c?.isReference){const l=c.value;if((l===":"||l===".:."||l===".:"||l===":.")&&Number.isInteger(a.value)){const h=c.inputs[0]===a?c.inputs[1]:c.inputs[0];if(h&&Number.isInteger(h.value)){const N=ho(a.image,s);return er(N,a),N}}}else if(u==="cell"){const l=a.value;if(l.rowIndex===Number.MIN_SAFE_INTEGER||l.colIndex>=16384){const h=Jn(a.image);return er(h,a),h}}return a}),i}build(e,n){if(n.length===0)throw Error("Input must not be empty.");let r,i,o;try{r=this._createAST(e,n)}catch(c){o=c instanceof _.n.Parse?c:new _.n.Parse(c.message,c)}const s=this.errors;s.length>0&&(o=go(s[0],n));const a=this.astErrors;return a.length>0&&(o=go(a[0],n)),i=r?sn(r,o):{ast:null,evaluations:_.Xt.EmptyArray,executions:_.Xt.EmptyArray,precedentsAbsolute:_.Xt.EmptyArray,precedentsExecute:_.Xt.EmptyArray,precedentsNamed:null,precedentsRelative:_.Xt.EmptyArray,precedentsRoot:_.Xt.EmptyArray,references:_.Xt.EmptyArray,tokens:_.Xt.EmptyArray,error:o},i}}class be{constructor(e,n){this._options=e,this._compiled=n}getTextAt(e,n,r=!1){return r?_.Bw(this._compiled.tokens):_.zw(this._compiled.tokens,e,n)}getTokens(){return this._compiled.tokens}getError(){return this._compiled.error??null}isEquals(e){if(!(e&&e instanceof be))return!1;if(this===e)return!0;const n=this._compiled.tokens,r=e._compiled.tokens;return n.length===r.length&&_.Bw(n)===_.Bw(r)}getReferences(){const e=this._compiled,n=e.references,r=n.length;if(r===0)return _.Xt.EmptyArray;const i=e.precedentsExecute,o=e.precedentsRelative,s=new Array(r);for(let a=0;a<r;a++){const c=i[n[a]],u=c.inputs;if(u&&u.length===2){const l=o[i[u[0]].value],h=o[i[u[1]].value];s[a]={colStart:l.colStart,rowStart:l.rowStart,colEnd:h.colEnd,rowEnd:h.rowEnd,$colStart:l.$colStart,$rowStart:l.$rowStart,$colEnd:h.$colEnd,$rowEnd:h.$rowEnd,sheetName:l.sheetName}}else if(c.node.type==="cell"){const l=o[c.value];s[a]={...l}}else if(c.op==="named"){const l=e.precedentsNamed;s[a]=l[c.value]}else c.op==="error"&&(s[a]=c.node.value)}return s}setReferenceAt(e,n){const r=this._compiled,i=r.references;if(i.length===0)return _.Xt.EmptyArray;const o=r.precedentsExecute,s=i[e];if(s===void 0)throw new Error(`Invalid reference index: ${e}`);const a=o[s],c=a.node,u=c.inputs??_.Xt.EmptyArray;let l,h,N=!1;n&&(l={colIndex:n.colStart,rowIndex:n.rowStart,$colIndex:n.$colStart??!1,$rowIndex:n.$rowStart??!1},n.sheetName&&(l.sheetName=n.sheetName),N=!_.Zt.isSingleCell(n),N&&(h={colIndex:n.colEnd,rowIndex:n.rowEnd,$colIndex:n.$colEnd??!1,$rowIndex:n.$rowEnd??!1},n.colEnd===Number.MAX_SAFE_INTEGER&&(h.colIndex=Number.MIN_SAFE_INTEGER),n.rowEnd===Number.MAX_SAFE_INTEGER&&(h.rowIndex=Number.MIN_SAFE_INTEGER)));const S=u.length===2;let L=-1,m=-1;if(S)L=u[0].evalIndex,m=u[1].evalIndex;else{if(c.type!=="cell")throw a.op==="named"?new Error("Cannot setReference for a named reference"):new Error(`Invalidate reference index: ${e}`);L=c.evalIndex}const y=this._compiled.ast,p=je(y,A=>{if(!A||!A.isReference)return;const v=A.type;if(!n&&ws.includes(A.value)){const E=u[0],R=u[1];let U=E.evalIndex===L,x=R.evalIndex===m;if(U||x){const O=gn();return O.image="#REF!",O}}if(v!=="cell"&&v!=="error")return;const f=A.evalIndex;let d,I=f===L;if(I||f===m){if(n)if(S===N){let E=I?l:h;d={...A},d.value=E,d.image=null}else d=N?Lr(":",Xn(l),Xn(h),!0):Xn(l);else d=gn(),d.image="#REF!";return d}});if(p===y)return this;const T=sn(p,this._compiled.error),g=this._options;return new be(g,T)}_resolveNamed(e,n,r,i){const o=this._options?.getNamed;if(!o)return _.n.BuiltIn.Name;let s=o?.(e,this._options.getSheetName?.())?.[0];return s?(s.isFormulaError||(s=_.Ey(s,n,r,i)),s):_.n.BuiltIn.Name}getDirectPrecedentsAt(e,n,r=!1,i,o){const s=this._compiled,a=s.precedentsRoot,c=a.length;if(c===0)return _.Xt.EmptyArray;const u=s.precedentsRelative,l=s.precedentsAbsolute,h=u.length;for(let p=0;p<h;p++){const T=u[p];let g=l[p],A=_.Ey(T,e,n,g);l[p]=A}let N=!1;const S=s.precedentsExecute,L=S.length,m=xr;for(let p=0;p<L;p++){const T=S[p],g=T.op;if(!g){const I=l[T.value];m[T.index]=I;continue}if(g==="named"){N=!0,m[T.index]=this._resolveNamed(T.node.value,e,n);continue}if(g==="error"){m[T.index]=T.node.value;continue}if(g==="@"||g==="#"){m[T.index]=m[T.inputs[0]];continue}const A=T.inputs;if(!A)continue;let v=m[A[0]];if(v===void 0){m[T.index]=_.n.BuiltIn.Value;continue}if(v.isFormulaError){m[T.index]=v;continue}let f,d=m[A[1]];d!==void 0?d.isFormulaError?m[T.index]=d:(g===" "?f=_.Zt.intersectRanges(v,d):g!==":"&&g!==".:."&&g!==":."&&g!==".:"||(f=m[T.index]=_.Zt.unionRanges(v,d)),m[T.index]=f??_.n.BuiltIn.Null):m[T.index]=_.n.BuiltIn.Value}const y=new Array(c);for(let p=0;p<c;p++){const T=a[p],g=m[T];if(y[p]=g?.rowStart!==void 0?{...g}:g,i||o){const A=S[T];N&&A.op==="named"?(i&&(i[p]=g.$colStart||g.$colEnd),o&&(o[p]=g.$rowStart||g.$rowEnd)):(i&&(i[p]=A.hasVerticalAbs),o&&(o[p]=A.hasHorizontalAbs))}}return y}evaluate(e,n,r){const i=e.getPosition(),o=i?.rowIndex??0,s=i?.colIndex??0;let a=this._compiled;if(n!==void 0){let f;if(je(a.ast,d=>{d.evalIndex===n&&(f=d)}),!f)throw new Error(`Invalid evalIndex: ${n}`);a=sn(f,a.error)}if(a.error)return a.error;const c=a.evaluations,u=a.executions;let l,h;r||(r=this._resolvePrecedents(e));const N=a.precedentsExecute,S=a.precedentsRelative,L=a.precedentsAbsolute,m=N.length;for(let f=0;f<m;f++){const d=N[f],I=d.op;if(I){if(I==="named"){const E=d.node;let R=this._resolveNamed(d.node.value,o,s);R?.colStart!==void 0&&(R=e.getReference(R)),c[E.evalIndex]=R}else if(I==="error"){const E=d.node;c[E.evalIndex]=d.node.value}}else{const E=S[d.value];let R=L[f];const U=_.Ey(E,o,s,R),x=d.node;c[x.evalIndex]=U}}const y=a.precedentsRoot,p=y.length;if(p!==r.length)return _.n.BuiltIn.Parse;for(let f=0;f<p;f++){const d=N[y[f]].node;let I=r[f];I.isIRange&&d.type==="cell"&&I.size>1&&(I=I.getValueAt(0,0)??null),c[d.evalIndex]=I}let T;const g=f=>{const d=f.inputs,I=d?d.length:0;let E;switch(f.type){case"infix":const R=f.value;let U=c[d[0].evalIndex],x=c[d[1].evalIndex];if(R==="+"&&typeof U=="number"&&typeof x=="number"){const k=U+x;return Math.abs(k)<99e-14?0:k}if(R==="-"&&typeof U=="number"&&typeof x=="number"){const k=U-x;return Math.abs(k)<99e-14?0:k}if(U&&U.isFormulaError)return U;if(x&&x.isFormulaError)return x;const O=f.fn;return E=O?O(e,U,x):_.n.BuiltIn.Value,E=_.ua(E,null),E;case"function":T||(T=new Array(I)),T.length!==I&&(T.length=I);for(let k=0;k<I;k++)T[k]=c[d[k].evalIndex];return E=this._callFunction(e,f,T),E&&typeof E.then=="function"?E.then(k=>{k=_.ua(k,e),E instanceof _.n.Known&&(h=E),c[f.evalIndex]=k}).catch(k=>{const $=k instanceof _.n.Known?k:new _.n.Value("Uncaught error",{cause:k});c[f.evalIndex]=$}):E instanceof _.n.Known&&(h=E),E;case"prefix":case"postfix":let w=c[d[0].evalIndex];if(w&&w.isFormulaError)return w;const C=f.fn;return E=C?C(e,w):_.n.BuiltIn.Value,E;case"paren":if(I===1)return c[d[0].evalIndex];{const k=new Array(I);for(let $=0;$<I;$++)k[$]=c[d[$].evalIndex];return k}case"named":return null;case"empty":return}};let A=u.length;for(let f=0;f<A;f++){const d=u[f];if(h)return h;if(l)l=l.then(()=>{const I=g(d);return c[d.evalIndex]=I,I});else{const I=g(d);c[d.evalIndex]=I,I&&typeof I.then=="function"&&(l=I)}}if(l)return l.then(()=>{const f=c[c.length-1];return this._finalizeReturnValue(e,f)});const v=c[c.length-1];return this._finalizeReturnValue(e,v)}_resolvePrecedents(e){const n=e.getPosition(),r=n?.rowIndex??0,i=n?.colIndex??0,o=this.getDirectPrecedentsAt(r,i),s=o.length;let a;if(s>0){a=new Array(s);for(let c=0;c<s;c++){const u=o[c];if(u instanceof _.n.Known)a[c]=u;else if(Array.isArray(u)){const l=new Array(u.length);for(let h=0;h<u.length;h++)l[h]=e.getReference(u[h]);a[c]=l}else a[c]=e.getReference(u)}}else a=_.Xt.EmptyArray;return a}wrapImplicit(e,n,r){const i=this._compiled.ast;if(!i||!i.isReference)return this;if(i.type==="cell")return this;if(i.value==="@")return this;if(!r)return this;const o=_.an(n)+_.wn(e);if(r.has(o))return this;const s=sn(_e("@",i,!0),this._compiled.error);return new be(this._options,s)}_callFunction(e,n,r){const i=n?.cacheFn??e.getFunction(n.value);if(!i)return new _.n.Parse;const o=i.isBuiltIn();let s;o?n.cacheFn=i:this._context=e;try{s=i.execute(...r)}catch(a){s=a instanceof _.n.Known?a:new _.n.Value(a.message,{cause:a})}return o||(this._context=null),s===void 0?new _.n.Parse:s}_finalizeReturnValue(e,n){if(n&&n.colStart!==void 0&&(n=e.getValueAt(n.rowStart,n.colStart)),Array.isArray(n))if(n.length===1&&Array.isArray(n[0])&&n[0].length===1)n=n[0][0],Array.isArray(n)&&(n=_.n.BuiltIn.Value);else try{n=e.getRange(n)}catch{n=_.n.BuiltIn.Value}return n?.isIRange?n.size===1?(n=n.getValueAt(0,0,pl),(n=_.ua(n,e))===null&&(n=0)):n=n.fillEmpty(0):(n=_.ua(n,e))===null&&(n=0),n}get[Symbol.toStringTag](){return"[FormulaBlock]"}toString(){const e=this._compiled;if(e.error)return e.error.toString();const n=this._context;if(n){const r=n.getPosition();return this.getTextAt(r.rowIndex,r.colIndex)}return _.Bw(e.tokens)}}const xr=new Array(20);for(let t=0;t<xr.length;t++)xr[t]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const pl={type:null};exports.FormulaParser=class{constructor(t){this._options={getEntireCoords:_.tc,...t},this._astBuilder=new dl}parse(t,e){t.getPosition().sheetName;const n=this._astBuilder.build(t,e);return new be(this._options,n)}eval(t,e){return this.parse(t,e).evaluate(t)}};
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.9
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.