@sheetxl/mcp 0.8.0-beta.23 → 0.8.0-beta.25

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 (215) hide show
  1. package/assets/{qjyVXZeVSr_qZfX5.js → 45FAgD1JyG2a1Rti.js} +2 -2
  2. package/assets/{L9RIicOHtZd2Rx8g.js → 70weNsvW2LMx5QcW.js} +1 -1
  3. package/assets/{CndRpNCcV89ncnqz.js → APcHum0Riw3QhLBQ.js} +1 -1
  4. package/assets/{NDe-uS1n_Q7u1H3m.js → Abkx7KJ6_X5avkR4.js} +3 -3
  5. package/assets/{2xkoVdiI70Gpaxoc.js → B0FfnXdiZxExcdjB.js} +2 -2
  6. package/assets/{DV3PnM9lo0AW-YOA.js → B6e_DsVO4i91IYEO.js} +3 -3
  7. package/assets/{D-PYDPXobSWiPh1D.js → B940vbTfpMYACpDE.js} +2 -2
  8. package/assets/{BZaXHnsJ6RkCZsnz.js → BAowTO-7Utmg0UvM.js} +3 -3
  9. package/assets/{CCBQDcCHI47PZ0YQ.js → BBccc8pDH-6AJdoT.js} +5 -5
  10. package/assets/{CQCPJBQD0qv9y8qE.js → BD3Bc7ZHxenj4S7Q.js} +1 -1
  11. package/assets/{dep8oZGwBmUpxjHl.js → BFKj2ik7h-yM6oCR.js} +1 -1
  12. package/assets/{BcWSfKJ9Atkc0X_p.js → BHIi-cAKnh_sAifV.js} +1 -1
  13. package/assets/{CSisGJ4hiDhTi19U.js → BHeXL-Lo390ZSNV0.js} +1 -1
  14. package/assets/{a9lvcAd7rWsWSWAo.js → BNvsIyBwweYnfUz3.js} +1 -1
  15. package/assets/{t4qTfgdlstczTs2z.js → BSJ_L1gNOejEih6N.js} +40 -40
  16. package/assets/{CeVCLRwjkH3_OXJu.js → BV13tLgNXZ8MDaE_.js} +1 -1
  17. package/assets/{CHG4ZuzhyjGRuKBg.js → BW8ReYzx-CEJ-lAG.js} +1 -1
  18. package/assets/{DcO0gub7cRKVw4xB.js → BXxUz-sB48Z9nSFi.js} +1 -1
  19. package/assets/{DL7_uGw6KiZhlvR8.js → B_GZxEqqpKtEPbWC.js} +1 -1
  20. package/assets/{BPorbjbkH-VoV1M0.js → Bb7ZxgjHwiKgARXs.js} +1 -1
  21. package/assets/{BomatnedZsGMF7MW.js → BbfSzxx5EzAvn-_F.js} +1432 -1352
  22. package/assets/{CGLapmkNccH1g_ZJ.js → BktUuVP0Jew8_-ff.js} +1 -1
  23. package/assets/{BBuB6ffvyg2Cd7V5.js → Brlza6Jd2oGGX9vB.js} +1 -1
  24. package/assets/{DZt1ONN8CTTfmHGn.js → BtNEVWQWEp_Ie1nT.js} +642 -642
  25. package/assets/{jKIDENA_QP4bEX49.js → Bwk-CZuGiTRT2ox_.js} +4 -4
  26. package/assets/{CyhngJo16o7G18lq.js → BzLwCwXsh7eXQpeK.js} +1 -1
  27. package/assets/{CPZgEZ2jKoo7hS6g.js → BzU8BhgrkSoh-XJF.js} +8 -8
  28. package/assets/{DrKr8dXQEQ3Aukmt.js → C-FJab2sVwBbOTiA.js} +1 -1
  29. package/assets/{KhdF512BKcJXZMvq.js → C-Vt758qtn8QeCrw.js} +1 -1
  30. package/assets/{aTxgpOOxLenli4af.js → C2kYWrsx5mg4XOES.js} +1 -1
  31. package/assets/{2XwVsSfo5wF5K-HA.js → C6Vsz4e_ASJdx3LP.js} +1 -1
  32. package/assets/{DN1RRp4qQfCq3JAO.js → C9DvPNfuz_0hun6C.js} +1 -1
  33. package/assets/{PiFW6uPRJABzK3V1.js → CAI8p60cuWlgnlko.js} +14 -14
  34. package/assets/{BI8kb-rd9dW85XJs.js → CCOaNx5_BfWCc9yz.js} +1 -1
  35. package/assets/{B2zUUqxAJ1RiM7YI.js → CD2yoEhIT8DyXBou.js} +52 -52
  36. package/assets/{DPjWOMoJ-elAAOmS.js → CDiutOsLAzu4c0Ej.js} +1 -1
  37. package/assets/{DfBERTJjS9LP0RSp.js → CFrOPd_UcD7qclCq.js} +1 -1
  38. package/assets/{CH8DNTUgM79xk8Tt.js → CGS7apShLtnlmF8D.js} +1 -1
  39. package/assets/{CgYef9dYxY8YyUTE.js → CGdayif_qNMtoATI.js} +1 -1
  40. package/assets/{bsnhRuD-K-qhW-y5.js → CJubVukzHBNJb_Wf.js} +91 -91
  41. package/assets/{MzfM7zDcnyOFK1lK.js → COXWiXy3DCfmXSm5.js} +1 -1
  42. package/assets/{Bbmh8_bdk_HrQ5Y6.js → COZ-bhj463kGINFA.js} +1 -1
  43. package/assets/{BdUFL3lVdwifHrf0.js → CSMsn9bKgR9kWG0m.js} +1 -1
  44. package/assets/{WH1Vl-MDWX3vSMn1.js → CVWoX7wNwrZwm5XB.js} +2 -2
  45. package/assets/{DLuQ_rdu0XjYF7Jq.js → CX-KrjVgXM-7o--S.js} +2 -2
  46. package/assets/{BNEBXKAh-N4Tygk7.js → CYtkZMCX6dyEqjb9.js} +44 -44
  47. package/assets/{CE5DhB5As59VJ-Ig.js → Cb7FKT3S78r6IYHi.js} +1 -1
  48. package/assets/{Cidwv57sKqhIrpHP.js → CcTDxlAqw6HuYmmm.js} +42 -42
  49. package/assets/CehVpkp73IfWGN_b.js +14 -0
  50. package/assets/{f_dBJuakO_BJ7Tvm.js → CfWSdzSpbErVA_1h.js} +309 -309
  51. package/assets/{E-KM5RFByUxjlkId.js → Ci3R5B7bLke8NZRo.js} +6 -6
  52. package/assets/{DbbNJyL67KdOK7nc.js → ClRgSo0axU3lAOwR.js} +1 -1
  53. package/assets/{DJ2jlogB1DWlGM-J.js → Cmf4eJow6AIuPH_w.js} +1 -1
  54. package/assets/{CE-9VKh5-Xwxnxmu.js → Cplall3oc-_3AhCB.js} +1 -1
  55. package/assets/{BJMeWtr7TiLNpt17.js → Cu4ok_jTnQif8QtX.js} +1 -1
  56. package/assets/{D7oYfHgO0kEqAnPV.js → D053O1kZ7JtMwiqh.js} +1 -1
  57. package/assets/{BPtf3_nlovO4r9Bm.js → D5aWcMLJ2wyLm9Ws.js} +1 -1
  58. package/assets/{B3YRTBFhX61z6rJv.js → D6qQAWN_5p3FAshK.js} +375 -370
  59. package/assets/{DvkBNkPyR5kuS0Uo.js → D7NjohknztgMLqhT.js} +2 -2
  60. package/assets/{CBMMHYgUAhgiJhJE.js → D8cqT2lbcP5Yp1Or.js} +3 -3
  61. package/assets/{DACd4ZjYwzNE7Koc.js → D8wjcRGgRdU34Ata.js} +1 -1
  62. package/assets/{DtETpSxSR8C1voac.js → DAnTpFc2vx3CmP8e.js} +83 -83
  63. package/assets/{BWeaY19OpTJK5v0n.js → DB2MrmDLZ-OzVRQu.js} +2 -2
  64. package/assets/{ChbkkN_JqbAGrUwB.js → DBgHcEP-FcgSHLvx.js} +332 -332
  65. package/assets/{CnUYevzhUJYNqLad.js → DFd0JAiw5dkbnULM.js} +1 -1
  66. package/assets/{CC7EfXPwp7_nSBIz.js → DG9KGapq8eHlcTC7.js} +1 -1
  67. package/assets/{C6_KHS3-ROddeSbS.js → DHCl7HWDbT3xqx8W.js} +2 -2
  68. package/assets/{BDSNdgf_hbhX1DhN.js → DJlQxf99HCszeCCD.js} +1 -1
  69. package/assets/{DiJexWBIzdGj1H0H.js → DLW76uSURiQM07DD.js} +1 -1
  70. package/assets/{Cx1bc-Dsja7W3GlB.js → DQBqVPRLkZFb2P_x.js} +2 -2
  71. package/assets/{D60N4r1a2YsNEwqj.js → DQlLgxA592HvgKzh.js} +1 -1
  72. package/assets/{D5O3m16KeyU_oXqH.js → DRvzD5Tkcb2OU0G2.js} +1 -1
  73. package/assets/{5MnsnJcajdtAujE2.js → DUfrvQDZKh_22F91.js} +1 -1
  74. package/assets/{DL8wUEe2Kx7bjDYP.js → DX94YgmfoL_ngS60.js} +1 -1
  75. package/assets/{BazhmjGvrL7pqVQP.js → DXDhH3F4N4OOigqN.js} +1 -1
  76. package/assets/{CpyybSV2kR6b-SIB.js → DXVfJfT6ftWk5kYi.js} +497 -497
  77. package/assets/{DSyZaCML62gSnudE.js → DYx_I-o0yjx056Dq.js} +1 -1
  78. package/assets/{YtxPcFPURJF6CxWu.js → DZBfVpnngvY9Ra3C.js} +1 -1
  79. package/assets/{Dawi8y7JWn6A9gAx.js → DZOzgVEOXfHTE3YC.js} +1 -1
  80. package/assets/{PVGDjdR9C4stMNpM.js → DZTVTdrwu05fNZk_.js} +1 -1
  81. package/assets/{BYbzf-TVwbKQPCyK.js → DaB9iRVJj3TmKH92.js} +3 -3
  82. package/assets/{BLr8y5StL65VZQxG.js → DbHVXEt9qwlb8Gou.js} +154 -155
  83. package/assets/{wKkW4LO-iUp92LVC.js → DbXqd8hGNQEyS-s0.js} +1 -1
  84. package/assets/{BULbMlvQuB2WFBFE.js → DcHo7BC8Ny3hWq0j.js} +2 -2
  85. package/assets/{DAliB9N1z6qnw4NO.js → DcHvH_I64hbnNh9G.js} +1 -1
  86. package/assets/{DoP6myQHGI-X1gNy.js → DfaQvLAaU7HHPnSe.js} +89 -89
  87. package/assets/{BVUfaOAGhdMim8yB.js → DgE30NwKzEjZI1W6.js} +3 -3
  88. package/assets/{KMTTqSwDthnXnD4F.js → Djl7cjJyCIS_Qvbd.js} +1 -1
  89. package/assets/{CzoRlNMlpFz4iax3.js → DkS3EQvuEuPDvCws.js} +2 -2
  90. package/assets/{CrTLWpsRNBSyTLor.js → DkT0-_t9Xgp4l-Mh.js} +1 -1
  91. package/assets/{DuQU8JjPLBIK804w.js → DlOCT6DI5bhPtQ8j.js} +26 -26
  92. package/assets/{Bjk1Twm0RFO_3fS8.js → DpGFb3hbAT5Murcv.js} +1 -1
  93. package/assets/{D5PpcRuJYSv0i2y9.js → DunKnm-bQd0oHn9n.js} +2 -2
  94. package/assets/{Bz08KxFupjbdsoFx.js → Duw8QQGcrPmesb-M.js} +1 -1
  95. package/assets/{DUytcsu0MV3GnsrM.js → DvkgborRc2vRq8E-.js} +1 -1
  96. package/assets/{WuKVkvMPAOmRaCDY.js → DwmlBb640xWfAMV2.js} +2 -2
  97. package/assets/{CtlrxXVgZDIOcuc1.js → GfAXkT_vctdRX_9f.js} +162 -162
  98. package/assets/{Dg5QmWm0uBTEjZy4.js → H40qXR3Gazmnq4Mv.js} +1 -1
  99. package/assets/{DgLQfXTWavoBetna.js → HLtC2gb8SfNmJU5q.js} +5 -5
  100. package/assets/{1J1R3dclFOh322Yr.js → H_6CBe3t27jHlBHk.js} +182 -182
  101. package/assets/{Dol52NFQzLCbObuC.js → LQNEL4KjDxwZNwWq.js} +176 -176
  102. package/assets/{Cl8_HMhRgzPzqFc7.js → O8YGVK4vtz39jQ84.js} +1 -1
  103. package/assets/{gver5Sz7ZO6ZyrOi.js → TqxFLhPz3zbgi95t.js} +1 -1
  104. package/assets/{C8G_px4dGuR2KjJh.js → UdhH9UX9jQ4IV11J.js} +1 -1
  105. package/assets/{BEsnJS5jYwkHNcZd.js → V4pGXJr6fe-CPg7i.js} +1 -1
  106. package/assets/{DXmebUOAhtW4V6BO.js → V_VVW06vjWkmlbdh.js} +463 -463
  107. package/assets/{Cg1tSmK_AGJa2VeI.js → VkeNTI1TMsA1ZbGz.js} +3 -3
  108. package/assets/{BbU6aT_c6-4tkcCw.js → cTLYCAhDs2fR2ITC.js} +1 -1
  109. package/assets/{BynbAjhJnLjyP7HH.js → cU78RT4WJKAp5mU_.js} +1 -1
  110. package/assets/{Cl04_aSpBHTwfsQR.js → ckvxz2tZRlY1UPpg.js} +11464 -11420
  111. package/assets/{CwrOCbcS4IHLsERQ.js → eCD6fmcTsgv76IZm.js} +90 -90
  112. package/assets/{q1rCdlJA6Z7tA6om.js → irrAIfw6CnCOHmPE.js} +1 -1
  113. package/assets/{DIAQ_WlBCWhgHt-z.js → ixHQtoul8ubEJfWS.js} +12 -7
  114. package/assets/{CEsRqYMd5IjnAzzX.js → kmiMiNIUc6rS8DG8.js} +4 -4
  115. package/assets/{CqP4H_-kRRjcxO91.js → m9BgbF-NgPIYW4kc.js} +1 -1
  116. package/assets/{BlhJHu9ni2T9IaM1.js → s56uiNHMGbBV6xgZ.js} +1 -1
  117. package/assets/{BKpicdc9H5WnZPb-.js → u8xtjHo43n-S_O6j.js} +1 -1
  118. package/assets/{sIWsnPhnHm_MeeM9.js → u9le-qZ3tbYKK1kU.js} +2 -2
  119. package/assets/{BGxwDpW8DkO8W0Ig.js → xMi-tFxI2s6e18L1.js} +1 -1
  120. package/assets/{DKKLWACR9GsidnkS.js → xSUMX6J9-MJIGgmG.js} +2 -2
  121. package/index.js +191 -191
  122. package/lib.js +1 -1
  123. package/licenses/dependencies.txt +69 -69
  124. package/package.json +2 -2
  125. package/screenshot-page/assets/{DMbFr7oWja7Qpsm6.js → 0P0DnZolMnjPhiea.js} +2 -2
  126. package/screenshot-page/assets/3L7CY5dA_kT2UBjv.js +1 -0
  127. package/screenshot-page/assets/{FcTM4SB17cEX1M3X.js → 5Y11BWntgqmzo9dz.js} +1 -1
  128. package/screenshot-page/assets/{CXwbGzavyvYgDbWU.js → B0CDAMDdxSN4en9k.js} +1 -1
  129. package/screenshot-page/assets/B6UwT0pG4sQeG7fA.js +3 -0
  130. package/screenshot-page/assets/BCmGLxQEUabeee6Q.js +2 -0
  131. package/screenshot-page/assets/{Cengqc8q8BTmNfb_.js → BGIujWi3UayyIWlg.js} +1 -1
  132. package/screenshot-page/assets/BH2IWQ-8AfNbhYZJ.js +39 -0
  133. package/screenshot-page/assets/BNjmzbnQlBmX-HPQ.js +1 -0
  134. package/screenshot-page/assets/{DcrVJCyDwGKeil2U.js → BQTLEc84Eql61S2m.js} +1 -1
  135. package/screenshot-page/assets/{BjJ_nnNDZEPLpapa.js → BVnzv_sY_58zEJyM.js} +1 -1
  136. package/screenshot-page/assets/{Cx1kZ2u_8JFV2Q8D.js → BiRVjUOUI8Qv0CE1.js} +1 -1
  137. package/screenshot-page/assets/BkU12U7IqW7qjopk.js +13 -0
  138. package/screenshot-page/assets/{D4hvW_TF7vwc-Xlq.js → Bne-AygyF1USkPAy.js} +2 -2
  139. package/screenshot-page/assets/{Dkf51CnZh2zPEGMd.js → BpJaTpbR_CQzXj9M.js} +1 -1
  140. package/screenshot-page/assets/Bs-IXwX9BKsCxwcJ.js +2 -0
  141. package/screenshot-page/assets/{ONNSfQ8RDOqBDsvw.js → Bt7fKk5ZupUuo_xD.js} +2 -2
  142. package/screenshot-page/assets/{CGx-ZSMV9cPOzbu4.js → C-2hBFk27roWkIrQ.js} +2 -2
  143. package/screenshot-page/assets/C7MXfx6zf_uTwcpu.js +1 -0
  144. package/screenshot-page/assets/CALWodHqzUTIv9le.js +5 -0
  145. package/screenshot-page/assets/{Ce8b0lOBuWKlfLzJ.js → CCYEWK5QyGSnUAfh.js} +1 -1
  146. package/screenshot-page/assets/{CEL5lzj2NDYwJ-HC.js → CFS0h-wE9YlZRk_1.js} +1 -1
  147. package/screenshot-page/assets/CKdQfdZJGJFgnrr9.js +586 -0
  148. package/screenshot-page/assets/{DvRXbyteeo_8sy8T.js → CL_hAngRQwm_KGdR.js} +1 -1
  149. package/screenshot-page/assets/{BTKdl-XR9TlWaFe7.js → CMryHLEhCyKGuRSW.js} +6 -6
  150. package/screenshot-page/assets/COL9dj40ytErlGak.js +2 -0
  151. package/screenshot-page/assets/{BAxPBeFudRJ3OqIC.js → CRtk9ixuBWxhPfPU.js} +1 -1
  152. package/screenshot-page/assets/CUQsrLir5jYpnRPM.js +1 -0
  153. package/screenshot-page/assets/CUgX7ETRCJsvqa2x.js +1 -0
  154. package/screenshot-page/assets/{C7mXat-6esc1AmRD.js → CXeDqC02BZcixiHS.js} +2 -2
  155. package/screenshot-page/assets/{Cv0zGWEBpmC07Jps.js → CZaKvnrRdlLj1_X8.js} +1 -1
  156. package/screenshot-page/assets/CfD1bn6b-NM38iZV.js +1 -0
  157. package/screenshot-page/assets/{BJct69niPZc8L_gZ.js → Ck5onwb1w_19WrtG.js} +1 -1
  158. package/screenshot-page/assets/{DyxJBLjUkeDuu96F.js → CltB1nb5HHSmYrNG.js} +1 -1
  159. package/screenshot-page/assets/{D6Yv5cc1JE7DGd6j.js → CqBSIwwGzWl8mrBe.js} +1 -1
  160. package/screenshot-page/assets/CvBPH5c-gnUG8Jen.js +1 -0
  161. package/screenshot-page/assets/D-jd_TJCN7AAn125.js +48 -0
  162. package/screenshot-page/assets/{ChSvXfVMLxZsP9zG.js → D4RZZdlItfrgQHcE.js} +1 -1
  163. package/screenshot-page/assets/{B2PWru6Ty7ODc2Ie.js → D53hpXNHxIgSWl80.js} +1 -1
  164. package/screenshot-page/assets/{J73KTOmdZGNmnq-z.js → D72Rp__0TEqJ972a.js} +1 -1
  165. package/screenshot-page/assets/D8EmNst-H2v0eWcf.js +1 -0
  166. package/screenshot-page/assets/{Cbbl3H042tb0krfe.js → D98PlIA4qQ_6ciCu.js} +2 -2
  167. package/screenshot-page/assets/{Tj3B5At0OAN3tDza.js → DACqwpSwlZka3b7s.js} +1 -1
  168. package/screenshot-page/assets/{CI3Z1f4amZ9G2rPD.js → DJebrQ5mu8uxpX3b.js} +1 -1
  169. package/screenshot-page/assets/{DtQFcMvZesaQ4xRf.js → DTAKTGn53yF_B621.js} +1 -1
  170. package/screenshot-page/assets/{CaOsWPeN_FXseSNg.js → DYYzsN95gWMsxOaj.js} +1 -1
  171. package/screenshot-page/assets/{C5-sm7wuk62Nzm_p.js → Da_VIghRFdNrmfZT.js} +1 -1
  172. package/screenshot-page/assets/{Be1S5czBx0lxhYLW.js → DbnmgPTSEii4OGkB.js} +1 -1
  173. package/screenshot-page/assets/{0UZBKpOOsp7P-DkP.js → DdmX3djBOA6UCZtf.js} +2 -2
  174. package/screenshot-page/assets/{DEpn6VGd30cHEJOS.js → DfQS5zAy3pN31xNb.js} +1 -1
  175. package/screenshot-page/assets/{BT2nkqpteSR9booH.js → DkTX5ZjGNQ5SrwJa.js} +1 -1
  176. package/screenshot-page/assets/{Bml69dFBVggmVWda.js → DmIjTb4kKfUHxWaF.js} +9 -9
  177. package/screenshot-page/assets/DqOrgSpuJhQRhMoG.js +4 -0
  178. package/screenshot-page/assets/{JM0_BaBZ3yF6lnHC.js → Dz_yLNMXKWGx1O6V.js} +2 -2
  179. package/screenshot-page/assets/{B-8IMo2f1yGNXOyz.js → GxbRmvyoKhHl0ZYY.js} +13 -8
  180. package/screenshot-page/assets/{C-n8BDiksNjX6Orz.js → MqGbtsji4DVGCAMR.js} +1 -1
  181. package/screenshot-page/assets/{zvxBjll3jnL0-vNn.js → Np3jWxG724t5hLHZ.js} +2 -2
  182. package/screenshot-page/assets/eR9_DaySoB72PvMo.js +1 -0
  183. package/screenshot-page/assets/hB5riGkPy0wXVIig.js +1 -0
  184. package/screenshot-page/assets/hHvAGynpTvAb97GX.js +1 -0
  185. package/screenshot-page/assets/{CiFaOHqsDQTE4RRi.js → jKvAZg0Tp701aw1o.js} +2 -2
  186. package/screenshot-page/assets/{DACSL7FA_J91Z_H7.js → jteb4n23QwBT9m_4.js} +1 -1
  187. package/screenshot-page/assets/mzrDp0emvkWnkXBt.js +1 -0
  188. package/screenshot-page/assets/x1O923k1mN-CduO_.js +1 -0
  189. package/screenshot-page/index.html +15 -15
  190. package/types/scripting-api.json +5745 -5743
  191. package/types/scripting.d.ts +23 -4
  192. package/assets/DU2Dzzu0oY_eDN6i.js +0 -14
  193. package/screenshot-page/assets/37LAUhU1_yKtsBlH.js +0 -2
  194. package/screenshot-page/assets/B3c6NBI22E5SZWG-.js +0 -1
  195. package/screenshot-page/assets/B3yyoGGGl8ICyeoC.js +0 -39
  196. package/screenshot-page/assets/B56KxTxcAXDom0g4.js +0 -13
  197. package/screenshot-page/assets/BPMQ22uISGOm3ymr.js +0 -1
  198. package/screenshot-page/assets/Bh2DVAOWvWfylt77.js +0 -1
  199. package/screenshot-page/assets/BoiQQ-37KQn6NcLT.js +0 -1
  200. package/screenshot-page/assets/C9a-cNha8mBw5q-l.js +0 -1
  201. package/screenshot-page/assets/CAQ7QWes7j7Fq8o5.js +0 -2
  202. package/screenshot-page/assets/CaP_vH0sJFjNrSkW.js +0 -1
  203. package/screenshot-page/assets/CcVllJMjVF6SvVVq.js +0 -2
  204. package/screenshot-page/assets/CyfTQE0Z76Rp4Fbt.js +0 -586
  205. package/screenshot-page/assets/D2CxEHjkPQMAxzWl.js +0 -1
  206. package/screenshot-page/assets/D7Y0npF3FMsGUjgO.js +0 -1
  207. package/screenshot-page/assets/DEAD_MduPNVoT_T6.js +0 -5
  208. package/screenshot-page/assets/DMhOGCTy8V0N14gY.js +0 -1
  209. package/screenshot-page/assets/DVQnEWIisXaOXb_G.js +0 -4
  210. package/screenshot-page/assets/DXbOBAxx4_2rt5KM.js +0 -1
  211. package/screenshot-page/assets/DgLZb-StwCd9ftop.js +0 -1
  212. package/screenshot-page/assets/DrnzLCa7NIirMxno.js +0 -3
  213. package/screenshot-page/assets/EOw6vVvEfYNga9b4.js +0 -1
  214. package/screenshot-page/assets/_zzVe2R8R4vwuc5q.js +0 -48
  215. package/screenshot-page/assets/qFyplGXRu7IepHio.js +0 -1
@@ -0,0 +1 @@
1
+ import"./CnXLpFE_vFrJ5Jbf.js";import"./BiRVjUOUI8Qv0CE1.js";export{r as ScriptCompiler,n as loadCompiledModule}from"./Np3jWxG724t5hLHZ.js";
@@ -1 +1 @@
1
- import{I as e,Z as t,f as n,y as r}from"./ChSvXfVMLxZsP9zG.js";var i=(e,t)=>{let n=new Map;return e.forEach((e,r)=>{t.get(r)!==e&&n.set(r,e)}),n},a=!1,o=0,s=e=>{if(typeof e!=`string`)throw Error(`A stateId (string) is required. Register with 'ITransaction.IStore.create'.`);return e},c=class extends Error{constructor(e,t,n){super(e===`open`?`Transaction conflict: an operation is open on commit '${t}' and this write is not part of it.`:`Transaction conflict: expected commit '${t}' but current is '${n}'.`),this.name=`TransactionConflictError`,this.reason=e,this.expectedCommitId=t,this.actualCommitId=n}},l=(e,t,n=0)=>{for(let r=n;r<t.length;r++){let[n,i]=t[r];e[n]=typeof i==`function`?i(e[n]):i}},u=class{constructor(e){this._record=e}getId(){return this._record.id}getDescription(){return this._record.description}getMeta(){return Object.freeze(this._record.meta)}getAuthor(){return this._record.author}getTimestamp(){return this._record.timestamp}getOperation(){return this._record.operation}getIntents(){return Object.freeze({...this._record.intents})}},d=class{constructor(e){this._listeners=new Set,this._listenersState=new Map,this._commits=new Map,this._locked=!1,this._pending=null,this._versionCounter=0,this._flushOnRead=0,this._isSync=e?.sync??a,this._isTransient=e?.transient??!1,this._author=e?.author,this._maxCommits=e?.maxCommits??1e3;let t={id:`0`,description:`initial`,meta:{},author:this._author,timestamp:Date.now(),states:new Map,intents:{},intentWrites:[],version:0,previousId:null},n={record:t,commit:new u(t)};this._current=n,this._cacheId=null,this._cacheState=null,this._states=t.states,this._transactionStack=[],this._restoring=!1;let r=new Map;r.set(t.id,n),this._commits=r,this._tipId=t.id}static{this.setDefaultSync=e=>{a=e}}getLog(e,t=100){let n=[],r=e;do{let e=this._commits.get(r);if(!e)throw Error(`Invalid commit id: '${r}'`);if(n.push(e.commit),r=e.record.previousId,!r)return n}while(n.length<t);return n}getCommitCount(){return this._commits.size}isOpenTransaction(){return this._transactionStack.length>0}isRestoring(){return this._restoring}isAmendingOtherCommit(){let e=this._transactionStack[0];return e instanceof p&&e._isRetargeted()}getPendingTransaction(){return this._transactionStack[0]??null}getCurrentTransaction(){let e=this._transactionStack;return e[e.length-1]??null}amend(e,t){let n=this.beginCommit(),r=n.getDepth()===0?this._commits.get(e):void 0;n.getDepth()===0&&(n._setAmendOf(e),r&&r!==this._current&&n._retarget(r));try{let e=t(r?r.commit:this._current.commit);return n.commit(),e}catch(e){throw n.rollback(),e}}_squashTip(e){if(this._transactionStack.length>0)return!1;let t=this._commits.get(this._tipId),n=t?.record.previousId;if(!t||!n)return!1;let r=this._commits.get(n);return!!r&&(r.record.states=t.record.states,r.record.intents=e(r.record.intents,t.record.intents),r.record.timestamp=t.record.timestamp,this._commits.delete(t.record.id),this._tipId=n,this._current===t&&(this._current=r,this._states=r.record.states,this._cacheId=null,this._cacheState=null),!0)}create(t){let n=e.uuidV4();if(t!==void 0){let e=this.beginCommit();try{e.updateState(n,t),e.commit()}catch(t){throw e.rollback(),t}}return n}getStateAt(e,t){return s(t),this._commits.get(e)?.record.states.get(t)}getState(e){s(e);let t=this._transactionStack;if(t.length===0){if(this._cacheId===e)return this._cacheState;let t=this._states.get(e);return this._cacheId=e,this._cacheState=t,t}if(this._flushOnRead>0)for(let n=t.length-1;n>=0;n--)t[n]._isFlushedBy(e)&&t[n]._flush();return t[t.length-1].getState(e)}getCurrentCommit(e=!0){return(e?this._pending?.commit:null)??this._current.commit}getTipCommit(){return this._commits.get(this._tipId).commit}getVersionId(e){return s(e),this._states.get(e)?.version??0}restore(e,t){let n=this._getCommitContainer(e,t);if(this._current.commit.getId()===n.commit.getId())return n.commit;let r=i(n.record.states,this._current.record.states);this._notifyStates(`onBeforeCommitStart`,this._current,r,!0,!1,!1,n);let a=this._current.commit;this._current=n,this._states=this._current.record.states,this._cacheId=null,this._cacheState=null,this._notifyStates(`onAfterStateChange`,n,r,!1,!0,!0,n,a),this._notify(`onCommitChange`,n.commit,!0),this._restoring=!0;try{this._notifyStates(`onRestoreOrRevert`,n,n.record.states,!1,!0)}finally{this._restoring=!1}return n.commit}revert(e,t){let n=this._getCommitContainer(e,t),r=this._commits.get(n.record.previousId);if(!r)throw Error(`Invalid commit id: '${n.record.previousId}'`);let a=i(r.record.states,this._current.record.states);this._notifyStates(`onBeforeCommitStart`,this._current,a,!0,!1,!1,n);let o=this._current.commit;this._current=r,this._states=this._current.record.states,this._cacheId=null,this._cacheState=null,this._notifyStates(`onAfterStateChange`,r,a,!0,!1,!0,n,o),this._notify(`onCommitChange`,r.commit,!0),this._restoring=!0;try{this._notifyStates(`onRestoreOrRevert`,r,r.record.states,!0,!0,!1,n)}finally{this._restoring=!1}return r.commit}_getCommitContainer(e,t){let n=this._commits.get(e);if(!n)throw Error(`Invalid commit id: '${e}'`);if(this._isTransient)throw Error(`Cannot revert transient store`);if(t?.force&&this._transactionStack.length>0&&this._transactionStack[0].rollback(),this._transactionStack.length!==0)throw Error(`Open transactions.`);return n}_pruneForwards(e){let t=this._tipId;for(;t&&t!==e;){let e=this._commits.get(t);if(!e)break;this._commits.delete(t),t=e.record.previousId}}_trimOldest(){if(this._commits.size<=this._maxCommits)return;let e=this._commits.keys();for(;this._commits.size>this._maxCommits;)this._commits.delete(e.next().value);let t=this._commits.get(e.next().value);t&&(t.record.previousId=null)}beginCommit(t,n){let r=this._transactionStack;r.length>0&&r[r.length-1]._flush();let i=r.length;typeof t==`string`&&(t={description:t});let a=t?.expectedCommitId;if(a!==void 0){let e=this._current.record.id;if(i>0||this._restoring)throw new c(`open`,a,e);if(e!==a)throw new c(`stale`,a,e)}if(this._locked)throw console.warn(`TransactionStore locked`,r),Error(`TransactionStore is locked by '${r[i-1].getDescription()}`);let o=t?.preventFurtherTransactions,s=this,l=(e,t,r)=>{let a=s._transactionStack;i!==a.length-1&&console.warn(`Transaction stack out of sync`,i,a.length,a),o&&(this._locked=!1),a.pop(),e._isFlushedOnRead()&&s._flushOnRead--,n?.(e,t,r),a.length===0&&(s._pending=null,s._notifyClose(e._getCommit(),t,e._isElided(),e._isAmendClose()))},d;if(r.length===0){let n=this._current.record,r={states:new Map,id:e.uuidV4(),description:typeof t==`string`?t:t?.description??null,meta:{},timestamp:Date.now(),author:(typeof t==`object`?t?.author:void 0)??this._author??null,version:n.version+1,previousId:n.id,intents:{},intentWrites:[],operation:t?.operation},i={record:r,commit:new u(r)};this._pending=i,this._notify(`onCommitStart`,i.commit),d=new p(this,i,n?.states,t,l)}else d=r[r.length-1].beginTransaction(t,l);return o&&(this._locked=!0),this._transactionStack.push(d),d._isFlushedOnRead()&&this._flushOnRead++,d}doBatch(e,t,n){let r,i=this.beginCommit(t,n),a=this.getCurrentCommit();try{r=e?.(a);let n=()=>{i.commit(t)};if(r&&typeof r.then==`function`)return new Promise((e,t)=>{r.then(r=>{try{n(),e(r)}catch(e){t(e)}}).catch(e=>{i.rollback(),t(e)})});n()}catch(e){throw i.rollback(),e}return r}remove(e){s(e);let t=!1,n=this._listenersState.get(e);if(n){let r=this.getCurrentCommit();n.forEach(e=>{e.onClose?.(r)}),this._listenersState.delete(e),t=!0}this._current.record.states.delete(e)&&(t=!0),this._commits.forEach(n=>{n.record.states.delete(e)&&(t=!0)});let r=this._transactionStack;return r.length>0&&r[0]._purgeState(e),this._cacheId=null,this._cacheState=null,t}addListener(e){let t=this._listeners;return t.add(e),()=>{t.delete(e)}}addStateListener(e,t){if(s(e),!t)throw Error(`Listener is required`);let n=this._listenersState.get(e);return n||(n=new Set,this._listenersState.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this._listenersState.delete(e)}}dispatchEvents(e,t=!1){!t||this._isSync?e():setTimeout(e,0)}_commitRecord(t,n,r){let i=t.record,a=t.commit,o=t,s=++this._versionCounter;if(n.forEach((e,t)=>{e!=null&&((e,t,n)=>{Object.defineProperty(e,"id",{value:t,enumerable:!1,configurable:!0,writable:!1}),Object.defineProperty(e,"version",{value:n,enumerable:!1,configurable:!0,writable:!1})})(e,t,s)}),!this._isTransient){let n=!1;if(r!==null){let s=this._current,c=this._commits.get(r)??s,u=c.record,d=c!==s,f=d?u.states:s.record.states;if(i.states.forEach((e,t)=>{f.set(t,e)}),l(u.intents,i.intentWrites),u.meta={...u.meta,...i.meta},u.timestamp=i.timestamp,n=!0,d)return void(o.record.intentWrites=e.EmptyArray);i=s.record,a=s.commit,t=s}this._commits.set(i.id,t),n||(i.previousId!==this._tipId&&this._pruneForwards(i.previousId),this._tipId=i.id,this._trimOldest())}this._current=t,this._states=this._current.record.states,this._cacheId=null,this._cacheState=null,o.record.intentWrites=e.EmptyArray,r===null&&this._notify(`onCommitChange`,a);let c=i.previousId?this._commits.get(i.previousId)?.commit??null:null;this._notifyStates(`onAfterStateChange`,t,n,!1,!1,!0,o,c),this._notify(r===null?`onCommitEnd`:`onAmendEnd`,a,!0)}_notifyStates(e,t,n,r=!1,i=!1,a=!1,o=t,s=null){let c=t.commit,l=o.record.intents,u=this._listenersState;n.forEach((t,n)=>{let o=u.get(n);o&&this.dispatchEvents(()=>{o.forEach(n=>{n[e]?.(t,c,r,i,l,s)})},a)})}_notifyClose(e,t,n=!1,r=!1){this._listeners.forEach(i=>{i.onCommitClose?.(e,t,n,r)})}_notify(e,t,n=!1){return this.dispatchEvents(()=>{this._listeners.forEach(n=>{n[e]?.(t)})},n)}},f=class{constructor(e,t,n){if(this._children=new Set,this._depth=0,this._closed=!1,this._isAmend=!1,this._readOnly=!1,this._hooks=null,this._flushing=!1,this._outcomes=null,this._intentMark=-1,this._store=e,this._container=t,n=typeof n==`string`?{description:n}:n,this._description=n?.description??``,this._operation=n?.operation??null,this._readOnly=n?.readOnly??!1,n?.flush||n?.onCommit||n?.onRollback||n?.onChildCommit){let e={flush:n.flush,writes:n.writes,onCommit:n.onCommit,onRollback:n.onRollback,onChildCommit:n.onChildCommit};this._hooks=e,(e.onCommit||e.onRollback)&&(this._outcomes=[e])}}_isFlushedOnRead(){return!(!this._hooks?.flush||!this._hooks.writes?.length)}_isFlushedBy(e){let t=this._hooks?.writes;return!!t&&t.includes(e)}_flush(){let e=this._hooks?.flush;if(e&&!this._flushing){this._flushing=!0;try{e()}finally{this._flushing=!1}}}_settle(e){let t=this._children;for(;t.size>0;)t.values().next().value.commit(e);this._flush()}_adoptOutcomes(e){let t=e._outcomes;if(t){if(this._outcomes)for(let e=0;e<t.length;e++)this._outcomes.push(t[e]);else this._outcomes=t}}_childCommitted(e){let t=this._hooks?.onChildCommit;if(!t)return;let n={};l(n,this._container.record.intentWrites,e._intentMark),t(e,n)}_notifyOutcome(e){let t=this._outcomes;if(t){this._outcomes=null;for(let n=0;n<t.length;n++)try{e?t[n].onCommit?.(e):t[n].onRollback?.()}catch(e){console.warn(e)}}}_getCommit(){return this._container.commit}_isElided(){return!1}_setAmendOf(e){this._container.amendOf=e}_isAmendClose(){return this._isAmend||this._container.amendOf!==void 0}getIntent(e){return this._container.record.intents?.[e]}setIntent(e,t){let n=this._container.record,r=n.intents??={};r[e]=typeof t==`function`?t(r[e]):t,(n.intentWrites??=[]).push([e,t])}getDepth(){return this._depth}getDescription(){return this._description}getOperation(){return this._operation}getStates(){return this._states}beginTransaction(e,t){this._ensureOpen();let n=new m(this._store,this,this._container,typeof e==`string`?{description:e}:e,t);return this._hooks?.onChildCommit&&(n._intentMark=this._container.record.intentWrites.length),this._children||this._children,this._children.add(n),n}isReadOnly(){return this._readOnly}updateState(e,t){if(this._ensureOpen(),s(e),this._readOnly)throw Error(`Transaction is read-only`+(this._description?`: '${this._description}'`:``));let n=this.getState(e),r;if(typeof t==`function`){if(r=t(n),r===n)return n;r&&={...r}}else{if(t===void 0)return n;r={...n,...t}}if(r){let t=this._states;t||(t=new Map,this._states=t),t.set(e,r)}return r}amend(e){return this._isAmend=!0,this.commit(e)}commit(t){return this._ensureOpen(),typeof t==`string`&&(t={description:t}),t&&(t.description&&(this._description=t.description),t.meta&&(this._meta=e.mergeContentful(t.meta,this._meta))),this._children&&this._children.forEach(e=>{e.commit(t)}),this}isClose(){return this._closed}_ensureOpen(){if(this._closed)throw this._descriptions?console.warn(`stack: [${this._descriptions.join(`,`)}]`):this._description&&console.warn(`description: [${this._description}]`),Error(`Transaction already closed`)}_removeChild(e,t=!1){this._children.delete(e),t||this._mergeStates(e._states)}_purgeState(e){this._states?.delete(e),this._children.forEach(t=>{t._purgeState(e)})}_mergeStates(e){if(!e||e.size===0)return;let t=this._states;return t?(e.forEach((e,n)=>{t.set(n,e)}),t):(this._states=e,e)}get isITransaction(){return!0}},p=class extends f{constructor(e,t,n,r,i){super(e,t,r),this._retargeted=!1,this._elided=!1,this._prevStates=n,this._onClose=i,this._states=new Map,this._meta=t.record.meta}_isElided(){return this._elided}_retarget(e){this._prevStates=e.record.states,this._retargeted=!0}_isRetargeted(){return this._retargeted}getId(){return this._container.commit.getId()}getSavepointId(){return this.getId()}getParent(){return this}commit(e){this._ensureOpen(),this._settle(e);let t=this._states,n=this._container;if(this._store._notifyStates(`onBeforeCommitStart`,n,t,!1,!1),super.commit(e),this._states.size===0)return this._closed=!0,this._elided=!0,this._onClose?.(this,!1,e),this._notifyOutcome(n.commit),this;this._store._notifyStates(`onBeforeCommitEnd`,n,t,!1,!1),this._settle(e);let r=new Map(this._prevStates);this._states.forEach((e,t)=>{e===null?r.delete(t):r.set(t,e)}),this._states=r,this._description&&(n.record.description=this._description),this._meta&&(n.record.meta=this._meta),n.record.states=r,this._closed=!0,this._onClose?.(this,!1,e);let i=n.amendOf??(this._isAmend?n.record.previousId:null);return this._store._commitRecord(n,t,i),this._notifyOutcome(n.commit),this}rollback(){return this._ensureOpen(),this._children&&this._children.forEach(e=>{e.rollback()}),this._notifyOutcome(null),this._closed=!0,this._onClose?.(this,!0,null),this}updateState(e,t){let n=this.getState(e),r=super.updateState(e,t);return r===n||this._states.set(e,r),r}getState(e){s(e);let t=this._states.get(e);return t||=this._prevStates.get(e),t}},m=class extends f{constructor(e,t,n,r,i){if(super(e,n,r),this._savepointId=null,!t)throw Error(`Parent transaction required`);this._parent=t,this._depth=this._parent.getDepth()+1,!1!==(typeof r==`string`?void 0:r?.savepoint)&&(this._savepointId=`${t.getId()}:${++o}`),t.isReadOnly()&&(this._readOnly=!0),this._onClose=i}getId(){return this._parent.getId()}getSavepointId(){return this._savepointId??this._parent.getSavepointId()}getParent(){return this._parent}getState(e){if(this._states){let t=this._states.get(e);if(t!==void 0)return t}return this._parent.getState(e)}commit(e){return this._ensureOpen(),this._settle(e),super.commit(e),this._parent._removeChild(this),this._parent._adoptOutcomes(this),this._closed=!0,this._onClose?.(this,!1,e),this._intentMark>=0&&this._parent._childCommitted(this),this._parent??this}rollback(){return this._ensureOpen(),this._children&&this._children.forEach(e=>{e.rollback()}),this._notifyOutcome(null),this._parent._removeChild(this,!0),this._closed=!0,this._onClose?.(this,!0,null),this._parent??this}},h=class e{constructor(e){this._closed=!1,this._commitId=null,this._stepListeners=null,this._toWrapped=new WeakMap,this._methods=new WeakMap,this._callbacks=new WeakMap,this._outward=new WeakMap,this._inward=new WeakMap,this._store=e}getStore(){return this._store}getCommitId(){return this._commitId}isClosed(){return this._closed}close(){this._closed||(this._closed=!0,this._stepListeners&&b(this._store,-1),this._stepListeners=null)}addStepListener(e){return this._closed?M:(this._stepListeners||(this._stepListeners=new Set,b(this._store,1)),this._stepListeners.add(e),()=>{this._stepListeners?.delete(e)})}_onStep(e,t){let n=this._stepListeners;if(n&&n.size!==0)for(let r of[...n])r(e,t)}wrap(e){if(typeof e==`function`)return this._wrapFunction(e,!0);if(typeof e!=`object`||!e)return e;let t=e;if(_.has(t))return e;let n=this._toWrapped.get(t);return n===void 0?t instanceof Promise?t.then(e=>this.wrap(e)):Array.isArray(t)?this._wrapArray(t):T(t)?this._wrapModel(t):O(t)?this._wrapIterator(t):e:n}unwrap(e){if(typeof e!=`object`||!e)return e;let t=e,n=g.get(t);return n===void 0?Array.isArray(t)?k(t):Object.getPrototypeOf(t)===Object.prototype?A(t):e:n}_wrapModel(e){let t=this,n=new Proxy(e,{get(e,n){let r=Reflect.get(e,n,e);if(r===null||typeof r!=`object`&&typeof r!=`function`)return r;let i=Object.getOwnPropertyDescriptor(e,n);return!i||i.configurable||i.writable?typeof r==`function`?t._wrapMethod(e,r):t.wrap(r):r},set:(e,n,r)=>Reflect.set(e,n,t.unwrap(r),e)});return this._toWrapped.set(e,n),g.set(n,e),_.set(n,this),n}_wrapMethod(e,t){let n=this._methods.get(e);n||(n=new Map,this._methods.set(e,n));let r=n.get(t);if(r)return r;let i=this;return r=function(...n){let r=n.length;for(let e=0;e<r;e++)n[e]=i._unwrapArg(n[e]);return i._inScope(()=>i.wrap(t.apply(e,n)))},n.set(t,r),r}_unwrapArg(e){return typeof e==`function`?this._wrapFunction(e,!1):typeof e!=`object`||!e||Object.getPrototypeOf(e)!==Object.prototype||g.has(e)?this.unwrap(e):this._unwrapCallbacks(e)}_unwrapCallbacks(e){let t=!1;for(let n in e)if(typeof e[n]==`function`){t=!0;break}if(!t)return this.unwrap(e);let n=this._callbacks.get(e);if(n)return n;let r={};for(let t in e){let n=e[t];r[t]=typeof n==`function`?this._wrapFunction(n,!1):this.unwrap(n)}return this._callbacks.set(e,r),r}_wrapFunction(e,t){let n=t?this._outward:this._inward,r=n.get(e);if(r)return r;let i=this;return r=t?function(...t){let n=t.length;for(let e=0;e<n;e++)t[e]=i._unwrapArg(t[e]);return i._inScope(()=>i.wrap(e.apply(i.unwrap(this),t)))}:function(...t){let n=t.length;for(let e=0;e<n;e++)t[e]=i.wrap(t[e]);return i.unwrap(e.apply(i.wrap(this),t))},n.set(e,r),r}_wrapArray(e){let t=e.length>0?e[0]:void 0;return typeof t!=`object`||!t||Array.isArray(t)||!T(t)?e:e.map(e=>this.wrap(e))}_wrapIterator(e){let t=this,n={next(...n){let r=e.next(...n);return r.done?r:{done:!1,value:t.wrap(r.value)}},[Symbol.iterator]:()=>n};return e.return&&(n.return=t=>e.return(t)),n}_inScope(e){if(this._closed)return e();let t=v;v=this;try{return e()}finally{v=t}}static bind(t,n,r){let i=new e(t);return{callback:e=>{i._commitId=e.getId();let t=r(e,i.wrap(n));return t instanceof Promise?t.then(e=>i.unwrap(e)):i.unwrap(t)},close:()=>i.close(),onChildCommit:(e,n)=>{i._onStep(t.getCurrentCommit(),n)}}}static isStepping(e){return(y.get(e)??0)>0}static of(e){return e===null||typeof e!=`object`&&typeof e!=`function`?null:_.get(e)??null}},g=new WeakMap,_=new WeakMap,v=null,y=new WeakMap,b=(e,t)=>{y.set(e,(y.get(e)??0)+t)},x=()=>v,S=e=>v!==null&&v.getStore()===e,C=new WeakMap,w=[`addListener`,`addListeners`,`doBatch`,`getWorkbook`,`getWorksheet`,`update`],T=e=>{let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype||t===Array.prototype)return!1;let n=C.get(t);return n===void 0&&(n=!E(e)&&D(t),C.set(t,n)),n},E=e=>e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet||e instanceof Error||e instanceof ArrayBuffer||ArrayBuffer.isView(e),D=e=>{for(let t=0;t<w.length;t++)if(typeof e[w[t]]==`function`)return!0;let t=e;for(;t&&t!==Object.prototype;){let e=Object.getOwnPropertyNames(t);for(let n=0;n<e.length;n++){let r=e[n];if(r.length>3&&r.startsWith(`set`)&&r.charCodeAt(3)>=65&&r.charCodeAt(3)<=90&&typeof Object.getOwnPropertyDescriptor(t,r)?.value==`function`)return!0}t=Object.getPrototypeOf(t)}return!1},O=e=>typeof e.next==`function`&&typeof e[Symbol.iterator]==`function`,k=e=>{let t=null,n=e.length;for(let r=0;r<n;r++){let n=e[r];if(typeof n!=`object`||!n)continue;let i=j(n);i!==n&&(t??=e.slice(),t[r]=i)}return t??e},A=e=>{let t=null;for(let n in e){let r=e[n];if(typeof r!=`object`||!r)continue;let i=j(r);i!==r&&(t??={...e},t[n]=i)}return t??e},j=e=>{let t=g.get(e);return t===void 0?Array.isArray(e)?k(e):Object.getPrototypeOf(e)===Object.prototype?A(e):e:t},M=()=>{},N=(e,t,...n)=>{let r=globalThis.__SXL_LOG_EVENTS;r&&(typeof r!=`string`||e.includes(r))&&console.log(`[sxl:${e}] ${t}`,...n)},P=class{constructor(e,t){this._listeners=new Set,this._pending=null,this._landing=null,this._listeners=new Set,this._transactions=t??new d({transient:!0}),this._stateId=this._transactions.create(),this._src=e;let n=this,r=()=>{let e=n._landing;if(N(n._label(),`drain landing=${e?e.length:`null`}`),!e)return;n._landing=null;let t=new Set,r=e.length,i=null;for(let t=0;t<r;t++){let n=e[t].options,r=n?.merge;if(!r)continue;i??=new Map;let a=e[t].listeners;for(let e=0;e<a.length;e++){let t=a[e];i.set(t,i.has(t)?r(i.get(t),n.params):n.params)}}for(let a=0;a<r;a++){let r=e[a];n._doNotify(r.listeners,r.removes,r.options,t,i)}};this._transactionsRemoveListener=this._transactions.addListener({onCommitClose(e,t,i){let a=n._pending;N(n._label(),`commitClose rollback=${t} elided=${i} pending=${a?a.length:`null`}`),n._pending=null,t||(a&&(n._landing?n._landing.push(...a):n._landing=a),i&&r())},onCommitEnd:r,onAmendEnd:r})}_label(){return this._src?.constructor?.name??`unknown`}_inOperation(){return this._transactions.isOpenTransaction()||this._transactions.isRestoring()}addListeners(e,t){let n=t?.transactional??S(this._transactions),r={listeners:e},i=this,a=()=>{n?i._updateEntries(e=>{e.delete(r)}):i._listeners.delete(r)};return r.remove=t?.once?a:null,n?i._updateEntries(e=>{e.add(r)}):i._listeners.add(r),a}_updateEntries(e){let t=this._transactions,n=t.getState(this._stateId)?.listeners,r=new Set(n);e(r);let i=t.beginCommit();try{i.updateState(this._stateId,{listeners:r}),i.amend()}catch(e){throw i.rollback(),e}}async _doNotify(e,t=null,n,r,i){let a=n?.source??this._src,o=[],s=n?.params,c=e.length;for(let t=0;t<c;t++){let n=e[t];r&&r.has(n)||(r?.add(n),o.push(n(a,i?.has(n)?i.get(n):s)))}let l=null;if(t&&(l=()=>{let e=t.length;for(let n=0;n<e;n++)t[n]()}),n?.async)return new Promise(async(e,t)=>{try{let t=await Promise.all(o);l?.(),e(t)}catch(e){l?.(),t(e)}});l?.()}hasTransactional(e){let t=this._transactions.getState(this._stateId)?.listeners;if(!t||t.size===0)return!1;for(let n of t)if(n.listeners[e])return!0;return!1}_collect(e,t){if(!e)return null;let n=null,r=null;return e.forEach(e=>{let i=e.listeners[t];i&&((n??=[]).push(i),e.remove&&(r??=[]).push(e.remove))}),n?{listeners:n,removes:r}:null}notify(e,t){let n=this._transactions,r=t?.transactional??this._inOperation();if(r){let r=this._collect(n.getState(this._stateId)?.listeners,e);r&&this._doNotify(r.listeners,r.removes,t)}let i=this._collect(this._listeners,e);if(i)return!r||n.isRestoring()||t?.async?(N(this._label(),`notify ${String(e)} delivered to ${i.listeners.length}`),this._doNotify(i.listeners,i.removes,t)):((this._pending??=[]).push({listeners:i.listeners,removes:i.removes,options:t}),void N(this._label(),`notify ${String(e)} QUEUED (open transaction) pending=${this._pending.length}`));N(this._label(),`notify ${String(e)} inOperation=${r} listeners=0`)}close(){this._transactions.remove(this._stateId),this._transactionsRemoveListener(),this._listeners.clear(),this._pending=null,this._landing=null}},F=`Item has been closed. No further operations are allowed.`,I=(e=t(`op.update`))=>r(`error.anchor.protected`,{description:r(e)}),L=class{constructor(e){this._closed=!1,this._options={...e};let t=this;this._transactions=this._options?.transactions??new d({transient:!0}),this._id=this._transactions.create({isDeleted:!1}),this._emitter=new P(this,this._transactions),e?.json&&this._fromJSON(e.json),this._options?.setContainerReadOnlyCallback?.(()=>{t._processOnContainerReadOnly()}),this._transactionsRemoveListener=this._transactions.addStateListener(this._id,{onAfterStateChange(e,n){t._processAfterStateChange(e,n)},onRestoreOrRevert(e,n){t._processRestoreOrRevert(e,n)}}),this._processInit()}_fromJSON(e){}isReadOnly(){return this._options.isReadOnly?.()??!1}isDeleted(){let e=this._getState();return e===void 0||(e.isDeleted??!1)}getType(){return this._options.type}get isIModel(){return!0}_processTransactionDone(e){}_getActionDescription(e){return null}_getState(){if(this._closed)throw Error(r(`error.model.modelClosed`));return this._transactions.getState(this._id)}_beginCommit(e){return this._transactions.beginCommit(typeof e==`string`?{description:e}:e)}_getTransactions(){return this._transactions}_updateState(e,t,n){return this._writeState(e,t,n,!1)}_amendState(e,t,n){return this._writeState(e,t,n,!0)}_writeState(e,t,n,i=!1){if(this._closed)throw Error(r(`error.model.modelClosed`));if(!e)return this;let a=this._beginCommit(t?.description);try{a.updateState(this._id,e);let r=!1,o=n?n.length:0;for(let e=0;e<o;e++){let t=n[e];r||=t===`onAnyChange`,this._emitter.notify(t)}!r&&n&&o>0&&this._emitter.notify(`onAnyChange`),i?a.amend(t):a.commit(t)}catch(e){throw a.rollback(),e}return this}_getEmitter(){return this._emitter}_processInit(){}_processAfterStateChange(e,t){}_processRestoreOrRevert(e,t){this._emitter.notify(`onInvalidated`)}delete(e){this._getState().isDeleted||this._delete(e)}_delete(e){e={description:this._getActionDescription(`delete`)??t(`op.delete`),...e};let n=this._beginCommit(e?.description);try{this._options.deleteFromContainer&&this._options.deleteFromContainer?.(e),this._processDelete(),n.commit()}catch(e){throw n.rollback(),e}}_processOnContainerDeleted(){this._processDelete()}_processDelete(){this._updateState({isDeleted:!0},void 0,[`onDelete`])}_processOnContainerReadOnly(){this._emitter.notify(`onReadOnlyChange`)}addListeners(e,t){return this._emitter.addListeners(e,t)}getId(){return this._id}getVersionId(){return this._transactions.getVersionId(this._id)}beginCommit(e){return this._beginCommit(e)}doBatch(e,t){let n=this;return this._transactions.doBatch(e,typeof t==`string`?{description:t}:t,e=>{n._processTransactionDone(e)})}isClosed(){return this._closed}close(){this._closed||(this._emitter.notify(`onClose`),this._closed=!0,this._transactionsRemoveListener?.(),this._transactions.remove(this._id))}},R=class e extends L{static{this.instanceCounter=0}constructor(t){super(t),this._watches=new Set,this._watchesReleased=!1,this._getMovable=t.getMovable??null,this._addWatchOption=t.addWatch??null,this._getRangeOption=t.getRange??null;let n=t.name??null;!n&&this._getMovable&&(n=`${this.getTypeDescription()} ${++e.instanceCounter}`);let r=t.description??null;n===null&&r===null||this._updateState({name:n,description:r})}getName(){return this._closed?null:this._getState()?.name??null}setName(e){let n={description:t(`op.setMovableName`)};return this._protectionCheck(n.description),this._updateState({name:e},n,[`onAnyChange`]),this}getDescription(){return this._closed?null:this._getState()?.description??null}setDescription(e){let n={description:t(`op.setMovableDescription`)};return this._protectionCheck(n.description),this._updateState({description:e||null},n,[`onAnyChange`]),this}getMovable(){return this._getMovable?.()??null}getReferences(){if(this._closed||this._watchesReleased||this._watches.size===0)return null;let e=[],t=new Set;for(let n of this._watches){let r=n.formula?.getReferences()??this._parseReference(n.expression);if(!r)continue;let i=r.getCount();for(let n=0;n<i;n++){let i=r.at(n);if(i.isInvalid())continue;let a=`${i.getWorksheet().getId()}!${i.getAddress()}`;t.has(a)||(t.add(a),e.push(i))}}return e.length===0?null:e[0].getWorksheet().getRanges(e)}_addWatch(e,t,n){let r=typeof e==`string`?e:e.getExpression(),i={expression:r.startsWith(`=`)?r.substring(1):r,formula:null,callback:t,options:n,release:null};return this._watches.add(i),this._watchesReleased||this._hold(i,typeof e==`string`?void 0:e),()=>{this._watches.delete(i)&&(i.release?.(),i.release=null,this._notifyReferencesChange())}}_resolveRange(e){return this._getRangeOption?.(e)??null}_hold(e,t){let n=this._addWatchOption;n&&(e.release=n(t??e.expression,t=>{e.formula=t.formula,e.expression=t.formula.getExpression(),e.callback?.(t),this._notifyReferencesChange()},e.options))}_parseReference(e){if(!e||e.includes(`#REF!`))return null;try{let t=e.includes(`!`)?null:this.getMovable()?.getRange().getWorksheet(),n=t?t.getRange(e):this._resolveRange(e);return n&&!n.isInvalid()?n.getWorksheet().getRanges([n]):null}catch{return null}}_notifyReferencesChange(){this._closed||(this._emitter.notify(`onReferencesChange`),this._emitter.notify(`onAnyChange`))}_releaseWatches(){this._watchesReleased=!0;for(let e of this._watches)e.release?.(),e.release=null}_holdWatches(){this._watchesReleased=!1;for(let e of this._watches)this._hold(e,e.formula??void 0)}_processDelete(){this._releaseWatches(),super._processDelete()}_processRestoreOrRevert(e,t){super._processRestoreOrRevert(e,t);let n=e===void 0||!0===e.isDeleted;n&&!this._watchesReleased?this._releaseWatches():!n&&this._watchesReleased&&this._holdWatches()}_getSourceId(){let e=this._getState()?.data;return typeof e?.sourceId==`number`?e.sourceId:void 0}_ensureSourceId(e){let n=this._getSourceId();if(n!==void 0)return n;let r=e(),i=this._getState()?.data??{};return this._updateState({data:{...i,sourceId:r}},{description:t(`op.connectShape`)}),r}_protectionCheck(e){if(this.isReadOnly())throw new n(I(e))}};export{R as a,h as c,P as i,x as l,I as n,S as o,L as r,d as s,F as t};
1
+ import{I as e,Z as t,f as n,y as r}from"./D4RZZdlItfrgQHcE.js";var i=(e,t)=>{let n=new Map;return e.forEach((e,r)=>{t.get(r)!==e&&n.set(r,e)}),n},a=!1,o=0,s=e=>{if(typeof e!=`string`)throw Error(`A stateId (string) is required. Register with 'ITransaction.IStore.create'.`);return e},c=class extends Error{constructor(e,t,n){super(e===`open`?`Transaction conflict: an operation is open on commit '${t}' and this write is not part of it.`:`Transaction conflict: expected commit '${t}' but current is '${n}'.`),this.name=`TransactionConflictError`,this.reason=e,this.expectedCommitId=t,this.actualCommitId=n}},l=(e,t,n=0)=>{for(let r=n;r<t.length;r++){let[n,i]=t[r];e[n]=typeof i==`function`?i(e[n]):i}},u=class{constructor(e){this._record=e}getId(){return this._record.id}getDescription(){return this._record.description}getMeta(){return Object.freeze(this._record.meta)}getAuthor(){return this._record.author}getTimestamp(){return this._record.timestamp}getOperation(){return this._record.operation}getIntents(){return Object.freeze({...this._record.intents})}},d=class{constructor(e){this._listeners=new Set,this._listenersState=new Map,this._commits=new Map,this._locked=!1,this._pending=null,this._versionCounter=0,this._flushOnRead=0,this._isSync=e?.sync??a,this._isTransient=e?.transient??!1,this._author=e?.author,this._maxCommits=e?.maxCommits??1e3;let t={id:`0`,description:`initial`,meta:{},author:this._author,timestamp:Date.now(),states:new Map,intents:{},intentWrites:[],version:0,previousId:null},n={record:t,commit:new u(t)};this._current=n,this._cacheId=null,this._cacheState=null,this._states=t.states,this._transactionStack=[],this._restoring=!1;let r=new Map;r.set(t.id,n),this._commits=r,this._tipId=t.id}static{this.setDefaultSync=e=>{a=e}}getLog(e,t=100){let n=[],r=e;do{let e=this._commits.get(r);if(!e)throw Error(`Invalid commit id: '${r}'`);if(n.push(e.commit),r=e.record.previousId,!r)return n}while(n.length<t);return n}getCommitCount(){return this._commits.size}isOpenTransaction(){return this._transactionStack.length>0}isRestoring(){return this._restoring}isAmendingOtherCommit(){let e=this._transactionStack[0];return e instanceof p&&e._isRetargeted()}getPendingTransaction(){return this._transactionStack[0]??null}getCurrentTransaction(){let e=this._transactionStack;return e[e.length-1]??null}amend(e,t){let n=this.beginCommit(),r=n.getDepth()===0?this._commits.get(e):void 0;n.getDepth()===0&&(n._setAmendOf(e),r&&r!==this._current&&n._retarget(r));try{let e=t(r?r.commit:this._current.commit);return n.commit(),e}catch(e){throw n.rollback(),e}}_squashTip(e){if(this._transactionStack.length>0)return!1;let t=this._commits.get(this._tipId),n=t?.record.previousId;if(!t||!n)return!1;let r=this._commits.get(n);return!!r&&(r.record.states=t.record.states,r.record.intents=e(r.record.intents,t.record.intents),r.record.timestamp=t.record.timestamp,this._commits.delete(t.record.id),this._tipId=n,this._current===t&&(this._current=r,this._states=r.record.states,this._cacheId=null,this._cacheState=null),!0)}create(t){let n=e.uuidV4();if(t!==void 0){let e=this.beginCommit();try{e.updateState(n,t),e.commit()}catch(t){throw e.rollback(),t}}return n}getStateAt(e,t){return s(t),this._commits.get(e)?.record.states.get(t)}getState(e){s(e);let t=this._transactionStack;if(t.length===0){if(this._cacheId===e)return this._cacheState;let t=this._states.get(e);return this._cacheId=e,this._cacheState=t,t}if(this._flushOnRead>0)for(let n=t.length-1;n>=0;n--)t[n]._isFlushedBy(e)&&t[n]._flush();return t[t.length-1].getState(e)}getCurrentCommit(e=!0){return(e?this._pending?.commit:null)??this._current.commit}getTipCommit(){return this._commits.get(this._tipId).commit}getVersionId(e){return s(e),this._states.get(e)?.version??0}restore(e,t){let n=this._getCommitContainer(e,t);if(this._current.commit.getId()===n.commit.getId())return n.commit;let r=i(n.record.states,this._current.record.states);this._notifyStates(`onBeforeCommitStart`,this._current,r,!0,!1,!1,n);let a=this._current.commit;this._current=n,this._states=this._current.record.states,this._cacheId=null,this._cacheState=null,this._notifyStates(`onAfterStateChange`,n,r,!1,!0,!0,n,a),this._notify(`onCommitChange`,n.commit,!0),this._restoring=!0;try{this._notifyStates(`onRestoreOrRevert`,n,n.record.states,!1,!0)}finally{this._restoring=!1}return n.commit}revert(e,t){let n=this._getCommitContainer(e,t),r=this._commits.get(n.record.previousId);if(!r)throw Error(`Invalid commit id: '${n.record.previousId}'`);let a=i(r.record.states,this._current.record.states);this._notifyStates(`onBeforeCommitStart`,this._current,a,!0,!1,!1,n);let o=this._current.commit;this._current=r,this._states=this._current.record.states,this._cacheId=null,this._cacheState=null,this._notifyStates(`onAfterStateChange`,r,a,!0,!1,!0,n,o),this._notify(`onCommitChange`,r.commit,!0),this._restoring=!0;try{this._notifyStates(`onRestoreOrRevert`,r,r.record.states,!0,!0,!1,n)}finally{this._restoring=!1}return r.commit}_getCommitContainer(e,t){let n=this._commits.get(e);if(!n)throw Error(`Invalid commit id: '${e}'`);if(this._isTransient)throw Error(`Cannot revert transient store`);if(t?.force&&this._transactionStack.length>0&&this._transactionStack[0].rollback(),this._transactionStack.length!==0)throw Error(`Open transactions.`);return n}_pruneForwards(e){let t=this._tipId;for(;t&&t!==e;){let e=this._commits.get(t);if(!e)break;this._commits.delete(t),t=e.record.previousId}}_trimOldest(){if(this._commits.size<=this._maxCommits)return;let e=this._commits.keys();for(;this._commits.size>this._maxCommits;)this._commits.delete(e.next().value);let t=this._commits.get(e.next().value);t&&(t.record.previousId=null)}beginCommit(t,n){let r=this._transactionStack;r.length>0&&r[r.length-1]._flush();let i=r.length;typeof t==`string`&&(t={description:t});let a=t?.expectedCommitId;if(a!==void 0){let e=this._current.record.id;if(i>0||this._restoring)throw new c(`open`,a,e);if(e!==a)throw new c(`stale`,a,e)}if(this._locked)throw console.warn(`TransactionStore locked`,r),Error(`TransactionStore is locked by '${r[i-1].getDescription()}`);let o=t?.preventFurtherTransactions,s=this,l=(e,t,r)=>{let a=s._transactionStack;i!==a.length-1&&console.warn(`Transaction stack out of sync`,i,a.length,a),o&&(this._locked=!1),a.pop(),e._isFlushedOnRead()&&s._flushOnRead--,n?.(e,t,r),a.length===0&&(s._pending=null,s._notifyClose(e._getCommit(),t,e._isElided(),e._isAmendClose()))},d;if(r.length===0){let n=this._current.record,r={states:new Map,id:e.uuidV4(),description:typeof t==`string`?t:t?.description??null,meta:{},timestamp:Date.now(),author:(typeof t==`object`?t?.author:void 0)??this._author??null,version:n.version+1,previousId:n.id,intents:{},intentWrites:[],operation:t?.operation},i={record:r,commit:new u(r)};this._pending=i,this._notify(`onCommitStart`,i.commit),d=new p(this,i,n?.states,t,l)}else d=r[r.length-1].beginTransaction(t,l);return o&&(this._locked=!0),this._transactionStack.push(d),d._isFlushedOnRead()&&this._flushOnRead++,d}doBatch(e,t,n){let r,i=this.beginCommit(t,n),a=this.getCurrentCommit();try{r=e?.(a);let n=()=>{i.commit(t)};if(r&&typeof r.then==`function`)return new Promise((e,t)=>{r.then(r=>{try{n(),e(r)}catch(e){t(e)}}).catch(e=>{i.rollback(),t(e)})});n()}catch(e){throw i.rollback(),e}return r}remove(e){s(e);let t=!1,n=this._listenersState.get(e);if(n){let r=this.getCurrentCommit();n.forEach(e=>{e.onClose?.(r)}),this._listenersState.delete(e),t=!0}this._current.record.states.delete(e)&&(t=!0),this._commits.forEach(n=>{n.record.states.delete(e)&&(t=!0)});let r=this._transactionStack;return r.length>0&&r[0]._purgeState(e),this._cacheId=null,this._cacheState=null,t}addListener(e){let t=this._listeners;return t.add(e),()=>{t.delete(e)}}addStateListener(e,t){if(s(e),!t)throw Error(`Listener is required`);let n=this._listenersState.get(e);return n||(n=new Set,this._listenersState.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this._listenersState.delete(e)}}dispatchEvents(e,t=!1){!t||this._isSync?e():setTimeout(e,0)}_commitRecord(t,n,r){let i=t.record,a=t.commit,o=t,s=++this._versionCounter;if(n.forEach((e,t)=>{e!=null&&((e,t,n)=>{Object.defineProperty(e,"id",{value:t,enumerable:!1,configurable:!0,writable:!1}),Object.defineProperty(e,"version",{value:n,enumerable:!1,configurable:!0,writable:!1})})(e,t,s)}),!this._isTransient){let n=!1;if(r!==null){let s=this._current,c=this._commits.get(r)??s,u=c.record,d=c!==s,f=d?u.states:s.record.states;if(i.states.forEach((e,t)=>{f.set(t,e)}),l(u.intents,i.intentWrites),u.meta={...u.meta,...i.meta},u.timestamp=i.timestamp,n=!0,d)return void(o.record.intentWrites=e.EmptyArray);i=s.record,a=s.commit,t=s}this._commits.set(i.id,t),n||(i.previousId!==this._tipId&&this._pruneForwards(i.previousId),this._tipId=i.id,this._trimOldest())}this._current=t,this._states=this._current.record.states,this._cacheId=null,this._cacheState=null,o.record.intentWrites=e.EmptyArray,r===null&&this._notify(`onCommitChange`,a);let c=i.previousId?this._commits.get(i.previousId)?.commit??null:null;this._notifyStates(`onAfterStateChange`,t,n,!1,!1,!0,o,c),this._notify(r===null?`onCommitEnd`:`onAmendEnd`,a,!0)}_notifyStates(e,t,n,r=!1,i=!1,a=!1,o=t,s=null){let c=t.commit,l=o.record.intents,u=this._listenersState;n.forEach((t,n)=>{let o=u.get(n);o&&this.dispatchEvents(()=>{o.forEach(n=>{n[e]?.(t,c,r,i,l,s)})},a)})}_notifyClose(e,t,n=!1,r=!1){this._listeners.forEach(i=>{i.onCommitClose?.(e,t,n,r)})}_notify(e,t,n=!1){return this.dispatchEvents(()=>{this._listeners.forEach(n=>{n[e]?.(t)})},n)}},f=class{constructor(e,t,n){if(this._children=new Set,this._depth=0,this._closed=!1,this._isAmend=!1,this._readOnly=!1,this._hooks=null,this._flushing=!1,this._outcomes=null,this._intentMark=-1,this._store=e,this._container=t,n=typeof n==`string`?{description:n}:n,this._description=n?.description??``,this._operation=n?.operation??null,this._readOnly=n?.readOnly??!1,n?.flush||n?.onCommit||n?.onRollback||n?.onChildCommit){let e={flush:n.flush,writes:n.writes,onCommit:n.onCommit,onRollback:n.onRollback,onChildCommit:n.onChildCommit};this._hooks=e,(e.onCommit||e.onRollback)&&(this._outcomes=[e])}}_isFlushedOnRead(){return!(!this._hooks?.flush||!this._hooks.writes?.length)}_isFlushedBy(e){let t=this._hooks?.writes;return!!t&&t.includes(e)}_flush(){let e=this._hooks?.flush;if(e&&!this._flushing){this._flushing=!0;try{e()}finally{this._flushing=!1}}}_settle(e){let t=this._children;for(;t.size>0;)t.values().next().value.commit(e);this._flush()}_adoptOutcomes(e){let t=e._outcomes;if(t){if(this._outcomes)for(let e=0;e<t.length;e++)this._outcomes.push(t[e]);else this._outcomes=t}}_childCommitted(e){let t=this._hooks?.onChildCommit;if(!t)return;let n={};l(n,this._container.record.intentWrites,e._intentMark),t(e,n)}_notifyOutcome(e){let t=this._outcomes;if(t){this._outcomes=null;for(let n=0;n<t.length;n++)try{e?t[n].onCommit?.(e):t[n].onRollback?.()}catch(e){console.warn(e)}}}_getCommit(){return this._container.commit}_isElided(){return!1}_setAmendOf(e){this._container.amendOf=e}_isAmendClose(){return this._isAmend||this._container.amendOf!==void 0}getIntent(e){return this._container.record.intents?.[e]}setIntent(e,t){let n=this._container.record,r=n.intents??={};r[e]=typeof t==`function`?t(r[e]):t,(n.intentWrites??=[]).push([e,t])}getDepth(){return this._depth}getDescription(){return this._description}getOperation(){return this._operation}getStates(){return this._states}beginTransaction(e,t){this._ensureOpen();let n=new m(this._store,this,this._container,typeof e==`string`?{description:e}:e,t);return this._hooks?.onChildCommit&&(n._intentMark=this._container.record.intentWrites.length),this._children||this._children,this._children.add(n),n}isReadOnly(){return this._readOnly}updateState(e,t){if(this._ensureOpen(),s(e),this._readOnly)throw Error(`Transaction is read-only`+(this._description?`: '${this._description}'`:``));let n=this.getState(e),r;if(typeof t==`function`){if(r=t(n),r===n)return n;r&&={...r}}else{if(t===void 0)return n;r={...n,...t}}if(r){let t=this._states;t||(t=new Map,this._states=t),t.set(e,r)}return r}amend(e){return this._isAmend=!0,this.commit(e)}commit(t){return this._ensureOpen(),typeof t==`string`&&(t={description:t}),t&&(t.description&&(this._description=t.description),t.meta&&(this._meta=e.mergeContentful(t.meta,this._meta))),this._children&&this._children.forEach(e=>{e.commit(t)}),this}isClose(){return this._closed}_ensureOpen(){if(this._closed)throw this._descriptions?console.warn(`stack: [${this._descriptions.join(`,`)}]`):this._description&&console.warn(`description: [${this._description}]`),Error(`Transaction already closed`)}_removeChild(e,t=!1){this._children.delete(e),t||this._mergeStates(e._states)}_purgeState(e){this._states?.delete(e),this._children.forEach(t=>{t._purgeState(e)})}_mergeStates(e){if(!e||e.size===0)return;let t=this._states;return t?(e.forEach((e,n)=>{t.set(n,e)}),t):(this._states=e,e)}get isITransaction(){return!0}},p=class extends f{constructor(e,t,n,r,i){super(e,t,r),this._retargeted=!1,this._elided=!1,this._prevStates=n,this._onClose=i,this._states=new Map,this._meta=t.record.meta}_isElided(){return this._elided}_retarget(e){this._prevStates=e.record.states,this._retargeted=!0}_isRetargeted(){return this._retargeted}getId(){return this._container.commit.getId()}getSavepointId(){return this.getId()}getParent(){return this}commit(e){this._ensureOpen(),this._settle(e);let t=this._states,n=this._container;if(this._store._notifyStates(`onBeforeCommitStart`,n,t,!1,!1),super.commit(e),this._states.size===0)return this._closed=!0,this._elided=!0,this._onClose?.(this,!1,e),this._notifyOutcome(n.commit),this;this._store._notifyStates(`onBeforeCommitEnd`,n,t,!1,!1),this._settle(e);let r=new Map(this._prevStates);this._states.forEach((e,t)=>{e===null?r.delete(t):r.set(t,e)}),this._states=r,this._description&&(n.record.description=this._description),this._meta&&(n.record.meta=this._meta),n.record.states=r,this._closed=!0,this._onClose?.(this,!1,e);let i=n.amendOf??(this._isAmend?n.record.previousId:null);return this._store._commitRecord(n,t,i),this._notifyOutcome(n.commit),this}rollback(){return this._ensureOpen(),this._children&&this._children.forEach(e=>{e.rollback()}),this._notifyOutcome(null),this._closed=!0,this._onClose?.(this,!0,null),this}updateState(e,t){let n=this.getState(e),r=super.updateState(e,t);return r===n||this._states.set(e,r),r}getState(e){s(e);let t=this._states.get(e);return t||=this._prevStates.get(e),t}},m=class extends f{constructor(e,t,n,r,i){if(super(e,n,r),this._savepointId=null,!t)throw Error(`Parent transaction required`);this._parent=t,this._depth=this._parent.getDepth()+1,!1!==(typeof r==`string`?void 0:r?.savepoint)&&(this._savepointId=`${t.getId()}:${++o}`),t.isReadOnly()&&(this._readOnly=!0),this._onClose=i}getId(){return this._parent.getId()}getSavepointId(){return this._savepointId??this._parent.getSavepointId()}getParent(){return this._parent}getState(e){if(this._states){let t=this._states.get(e);if(t!==void 0)return t}return this._parent.getState(e)}commit(e){return this._ensureOpen(),this._settle(e),super.commit(e),this._parent._removeChild(this),this._parent._adoptOutcomes(this),this._closed=!0,this._onClose?.(this,!1,e),this._intentMark>=0&&this._parent._childCommitted(this),this._parent??this}rollback(){return this._ensureOpen(),this._children&&this._children.forEach(e=>{e.rollback()}),this._notifyOutcome(null),this._parent._removeChild(this,!0),this._closed=!0,this._onClose?.(this,!0,null),this._parent??this}},h=class e{constructor(e){this._closed=!1,this._commitId=null,this._stepListeners=null,this._toWrapped=new WeakMap,this._methods=new WeakMap,this._callbacks=new WeakMap,this._outward=new WeakMap,this._inward=new WeakMap,this._store=e}getStore(){return this._store}getCommitId(){return this._commitId}isClosed(){return this._closed}close(){this._closed||(this._closed=!0,this._stepListeners&&b(this._store,-1),this._stepListeners=null)}addStepListener(e){return this._closed?M:(this._stepListeners||(this._stepListeners=new Set,b(this._store,1)),this._stepListeners.add(e),()=>{this._stepListeners?.delete(e)})}_onStep(e,t){let n=this._stepListeners;if(n&&n.size!==0)for(let r of[...n])r(e,t)}wrap(e){if(typeof e==`function`)return this._wrapFunction(e,!0);if(typeof e!=`object`||!e)return e;let t=e;if(_.has(t))return e;let n=this._toWrapped.get(t);return n===void 0?t instanceof Promise?t.then(e=>this.wrap(e)):Array.isArray(t)?this._wrapArray(t):T(t)?this._wrapModel(t):O(t)?this._wrapIterator(t):e:n}unwrap(e){if(typeof e!=`object`||!e)return e;let t=e,n=g.get(t);return n===void 0?Array.isArray(t)?k(t):Object.getPrototypeOf(t)===Object.prototype?A(t):e:n}_wrapModel(e){let t=this,n=new Proxy(e,{get(e,n){let r=Reflect.get(e,n,e);if(r===null||typeof r!=`object`&&typeof r!=`function`)return r;let i=Object.getOwnPropertyDescriptor(e,n);return!i||i.configurable||i.writable?typeof r==`function`?t._wrapMethod(e,r):t.wrap(r):r},set:(e,n,r)=>Reflect.set(e,n,t.unwrap(r),e)});return this._toWrapped.set(e,n),g.set(n,e),_.set(n,this),n}_wrapMethod(e,t){let n=this._methods.get(e);n||(n=new Map,this._methods.set(e,n));let r=n.get(t);if(r)return r;let i=this;return r=function(...n){let r=n.length;for(let e=0;e<r;e++)n[e]=i._unwrapArg(n[e]);return i._inScope(()=>i.wrap(t.apply(e,n)))},n.set(t,r),r}_unwrapArg(e){return typeof e==`function`?this._wrapFunction(e,!1):typeof e!=`object`||!e||Object.getPrototypeOf(e)!==Object.prototype||g.has(e)?this.unwrap(e):this._unwrapCallbacks(e)}_unwrapCallbacks(e){let t=!1;for(let n in e)if(typeof e[n]==`function`){t=!0;break}if(!t)return this.unwrap(e);let n=this._callbacks.get(e);if(n)return n;let r={};for(let t in e){let n=e[t];r[t]=typeof n==`function`?this._wrapFunction(n,!1):this.unwrap(n)}return this._callbacks.set(e,r),r}_wrapFunction(e,t){let n=t?this._outward:this._inward,r=n.get(e);if(r)return r;let i=this;return r=t?function(...t){let n=t.length;for(let e=0;e<n;e++)t[e]=i._unwrapArg(t[e]);return i._inScope(()=>i.wrap(e.apply(i.unwrap(this),t)))}:function(...t){let n=t.length;for(let e=0;e<n;e++)t[e]=i.wrap(t[e]);return i.unwrap(e.apply(i.wrap(this),t))},n.set(e,r),r}_wrapArray(e){let t=e.length>0?e[0]:void 0;return typeof t!=`object`||!t||Array.isArray(t)||!T(t)?e:e.map(e=>this.wrap(e))}_wrapIterator(e){let t=this,n={next(...n){let r=e.next(...n);return r.done?r:{done:!1,value:t.wrap(r.value)}},[Symbol.iterator]:()=>n};return e.return&&(n.return=t=>e.return(t)),n}_inScope(e){if(this._closed)return e();let t=v;v=this;try{return e()}finally{v=t}}static bind(t,n,r){let i=new e(t);return{callback:e=>{i._commitId=e.getId();let t=r(e,i.wrap(n));return t instanceof Promise?t.then(e=>i.unwrap(e)):i.unwrap(t)},close:()=>i.close(),onChildCommit:(e,n)=>{i._onStep(t.getCurrentCommit(),n)}}}static isStepping(e){return(y.get(e)??0)>0}static of(e){return e===null||typeof e!=`object`&&typeof e!=`function`?null:_.get(e)??null}},g=new WeakMap,_=new WeakMap,v=null,y=new WeakMap,b=(e,t)=>{y.set(e,(y.get(e)??0)+t)},x=()=>v,S=e=>v!==null&&v.getStore()===e,C=new WeakMap,w=[`addListener`,`addListeners`,`doBatch`,`getWorkbook`,`getWorksheet`,`update`],T=e=>{let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype||t===Array.prototype)return!1;let n=C.get(t);return n===void 0&&(n=!E(e)&&D(t),C.set(t,n)),n},E=e=>e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet||e instanceof Error||e instanceof ArrayBuffer||ArrayBuffer.isView(e),D=e=>{for(let t=0;t<w.length;t++)if(typeof e[w[t]]==`function`)return!0;let t=e;for(;t&&t!==Object.prototype;){let e=Object.getOwnPropertyNames(t);for(let n=0;n<e.length;n++){let r=e[n];if(r.length>3&&r.startsWith(`set`)&&r.charCodeAt(3)>=65&&r.charCodeAt(3)<=90&&typeof Object.getOwnPropertyDescriptor(t,r)?.value==`function`)return!0}t=Object.getPrototypeOf(t)}return!1},O=e=>typeof e.next==`function`&&typeof e[Symbol.iterator]==`function`,k=e=>{let t=null,n=e.length;for(let r=0;r<n;r++){let n=e[r];if(typeof n!=`object`||!n)continue;let i=j(n);i!==n&&(t??=e.slice(),t[r]=i)}return t??e},A=e=>{let t=null;for(let n in e){let r=e[n];if(typeof r!=`object`||!r)continue;let i=j(r);i!==r&&(t??={...e},t[n]=i)}return t??e},j=e=>{let t=g.get(e);return t===void 0?Array.isArray(e)?k(e):Object.getPrototypeOf(e)===Object.prototype?A(e):e:t},M=()=>{},N=(e,t,...n)=>{let r=globalThis.__SXL_LOG_EVENTS;r&&(typeof r!=`string`||e.includes(r))&&console.log(`[sxl:${e}] ${t}`,...n)},P=class{constructor(e,t){this._listeners=new Set,this._pending=null,this._landing=null,this._listeners=new Set,this._transactions=t??new d({transient:!0}),this._stateId=this._transactions.create(),this._src=e;let n=this,r=()=>{let e=n._landing;if(N(n._label(),`drain landing=${e?e.length:`null`}`),!e)return;n._landing=null;let t=new Set,r=e.length,i=null;for(let t=0;t<r;t++){let n=e[t].options,r=n?.merge;if(!r)continue;i??=new Map;let a=e[t].listeners;for(let e=0;e<a.length;e++){let t=a[e];i.set(t,i.has(t)?r(i.get(t),n.params):n.params)}}for(let a=0;a<r;a++){let r=e[a];n._doNotify(r.listeners,r.removes,r.options,t,i)}};this._transactionsRemoveListener=this._transactions.addListener({onCommitClose(e,t,i){let a=n._pending;N(n._label(),`commitClose rollback=${t} elided=${i} pending=${a?a.length:`null`}`),n._pending=null,t||(a&&(n._landing?n._landing.push(...a):n._landing=a),i&&r())},onCommitEnd:r,onAmendEnd:r})}_label(){return this._src?.constructor?.name??`unknown`}_inOperation(){return this._transactions.isOpenTransaction()||this._transactions.isRestoring()}addListeners(e,t){let n=t?.transactional??S(this._transactions),r={listeners:e},i=this,a=()=>{n?i._updateEntries(e=>{e.delete(r)}):i._listeners.delete(r)};return r.remove=t?.once?a:null,n?i._updateEntries(e=>{e.add(r)}):i._listeners.add(r),a}_updateEntries(e){let t=this._transactions,n=t.getState(this._stateId)?.listeners,r=new Set(n);e(r);let i=t.beginCommit();try{i.updateState(this._stateId,{listeners:r}),i.amend()}catch(e){throw i.rollback(),e}}async _doNotify(e,t=null,n,r,i){let a=n?.source??this._src,o=[],s=n?.params,c=e.length;for(let t=0;t<c;t++){let n=e[t];r&&r.has(n)||(r?.add(n),o.push(n(a,i?.has(n)?i.get(n):s)))}let l=null;if(t&&(l=()=>{let e=t.length;for(let n=0;n<e;n++)t[n]()}),n?.async)return new Promise(async(e,t)=>{try{let t=await Promise.all(o);l?.(),e(t)}catch(e){l?.(),t(e)}});l?.()}hasTransactional(e){let t=this._transactions.getState(this._stateId)?.listeners;if(!t||t.size===0)return!1;for(let n of t)if(n.listeners[e])return!0;return!1}_collect(e,t){if(!e)return null;let n=null,r=null;return e.forEach(e=>{let i=e.listeners[t];i&&((n??=[]).push(i),e.remove&&(r??=[]).push(e.remove))}),n?{listeners:n,removes:r}:null}notify(e,t){let n=this._transactions,r=t?.transactional??this._inOperation();if(r){let r=this._collect(n.getState(this._stateId)?.listeners,e);r&&this._doNotify(r.listeners,r.removes,t)}let i=this._collect(this._listeners,e);if(i)return!r||n.isRestoring()||t?.async?(N(this._label(),`notify ${String(e)} delivered to ${i.listeners.length}`),this._doNotify(i.listeners,i.removes,t)):((this._pending??=[]).push({listeners:i.listeners,removes:i.removes,options:t}),void N(this._label(),`notify ${String(e)} QUEUED (open transaction) pending=${this._pending.length}`));N(this._label(),`notify ${String(e)} inOperation=${r} listeners=0`)}close(){this._transactions.remove(this._stateId),this._transactionsRemoveListener(),this._listeners.clear(),this._pending=null,this._landing=null}},F=`Item has been closed. No further operations are allowed.`,I=(e=t(`op.update`))=>r(`error.anchor.protected`,{description:r(e)}),L=class{constructor(e){this._closed=!1,this._options={...e};let t=this;this._transactions=this._options?.transactions??new d({transient:!0}),this._id=this._transactions.create({isDeleted:!1}),this._emitter=new P(this,this._transactions),e?.json&&this._fromJSON(e.json),this._options?.setContainerReadOnlyCallback?.(()=>{t._processOnContainerReadOnly()}),this._transactionsRemoveListener=this._transactions.addStateListener(this._id,{onAfterStateChange(e,n){t._processAfterStateChange(e,n)},onRestoreOrRevert(e,n){t._processRestoreOrRevert(e,n)}}),this._processInit()}_fromJSON(e){}isReadOnly(){return this._options.isReadOnly?.()??!1}isDeleted(){let e=this._getState();return e===void 0||(e.isDeleted??!1)}getType(){return this._options.type}get isIModel(){return!0}_processTransactionDone(e){}_getActionDescription(e){return null}_getState(){if(this._closed)throw Error(r(`error.model.modelClosed`));return this._transactions.getState(this._id)}_beginCommit(e){return this._transactions.beginCommit(typeof e==`string`?{description:e}:e)}_getTransactions(){return this._transactions}_updateState(e,t,n){return this._writeState(e,t,n,!1)}_amendState(e,t,n){return this._writeState(e,t,n,!0)}_writeState(e,t,n,i=!1){if(this._closed)throw Error(r(`error.model.modelClosed`));if(!e)return this;let a=this._beginCommit(t?.description);try{a.updateState(this._id,e);let r=!1,o=n?n.length:0;for(let e=0;e<o;e++){let t=n[e];r||=t===`onAnyChange`,this._emitter.notify(t)}!r&&n&&o>0&&this._emitter.notify(`onAnyChange`),i?a.amend(t):a.commit(t)}catch(e){throw a.rollback(),e}return this}_getEmitter(){return this._emitter}_processInit(){}_processAfterStateChange(e,t){}_processRestoreOrRevert(e,t){this._emitter.notify(`onInvalidated`)}delete(e){this._getState().isDeleted||this._delete(e)}_delete(e){e={description:this._getActionDescription(`delete`)??t(`op.delete`),...e};let n=this._beginCommit(e?.description);try{this._options.deleteFromContainer&&this._options.deleteFromContainer?.(e),this._processDelete(),n.commit()}catch(e){throw n.rollback(),e}}_processOnContainerDeleted(){this._processDelete()}_processDelete(){this._updateState({isDeleted:!0},void 0,[`onDelete`])}_processOnContainerReadOnly(){this._emitter.notify(`onReadOnlyChange`)}addListeners(e,t){return this._emitter.addListeners(e,t)}getId(){return this._id}getVersionId(){return this._transactions.getVersionId(this._id)}beginCommit(e){return this._beginCommit(e)}doBatch(e,t){let n=this;return this._transactions.doBatch(e,typeof t==`string`?{description:t}:t,e=>{n._processTransactionDone(e)})}isClosed(){return this._closed}close(){this._closed||(this._emitter.notify(`onClose`),this._closed=!0,this._transactionsRemoveListener?.(),this._transactions.remove(this._id))}},R=class e extends L{static{this.instanceCounter=0}constructor(t){super(t),this._watches=new Set,this._watchesReleased=!1,this._getMovable=t.getMovable??null,this._addWatchOption=t.addWatch??null,this._getRangeOption=t.getRange??null;let n=t.name??null;!n&&this._getMovable&&(n=`${this.getTypeDescription()} ${++e.instanceCounter}`);let r=t.description??null;n===null&&r===null||this._updateState({name:n,description:r})}getName(){return this._closed?null:this._getState()?.name??null}setName(e){let n={description:t(`op.setMovableName`)};return this._protectionCheck(n.description),this._updateState({name:e},n,[`onAnyChange`]),this}getDescription(){return this._closed?null:this._getState()?.description??null}setDescription(e){let n={description:t(`op.setMovableDescription`)};return this._protectionCheck(n.description),this._updateState({description:e||null},n,[`onAnyChange`]),this}getMovable(){return this._getMovable?.()??null}getReferences(){if(this._closed||this._watchesReleased||this._watches.size===0)return null;let e=[],t=new Set;for(let n of this._watches){let r=n.formula?.getReferences()??this._parseReference(n.expression);if(!r)continue;let i=r.getCount();for(let n=0;n<i;n++){let i=r.at(n);if(i.isInvalid())continue;let a=`${i.getWorksheet().getId()}!${i.getAddress()}`;t.has(a)||(t.add(a),e.push(i))}}return e.length===0?null:e[0].getWorksheet().getRanges(e)}_addWatch(e,t,n){let r=typeof e==`string`?e:e.getExpression(),i={expression:r.startsWith(`=`)?r.substring(1):r,formula:null,callback:t,options:n,release:null};return this._watches.add(i),this._watchesReleased||this._hold(i,typeof e==`string`?void 0:e),()=>{this._watches.delete(i)&&(i.release?.(),i.release=null,this._notifyReferencesChange())}}_resolveRange(e){return this._getRangeOption?.(e)??null}_hold(e,t){let n=this._addWatchOption;n&&(e.release=n(t??e.expression,t=>{e.formula=t.formula,e.expression=t.formula.getExpression(),e.callback?.(t),this._notifyReferencesChange()},e.options))}_parseReference(e){if(!e||e.includes(`#REF!`))return null;try{let t=e.includes(`!`)?null:this.getMovable()?.getRange().getWorksheet(),n=t?t.getRange(e):this._resolveRange(e);return n&&!n.isInvalid()?n.getWorksheet().getRanges([n]):null}catch{return null}}_notifyReferencesChange(){this._closed||(this._emitter.notify(`onReferencesChange`),this._emitter.notify(`onAnyChange`))}_releaseWatches(){this._watchesReleased=!0;for(let e of this._watches)e.release?.(),e.release=null}_holdWatches(){this._watchesReleased=!1;for(let e of this._watches)this._hold(e,e.formula??void 0)}_processDelete(){this._releaseWatches(),super._processDelete()}_processRestoreOrRevert(e,t){super._processRestoreOrRevert(e,t);let n=e===void 0||!0===e.isDeleted;n&&!this._watchesReleased?this._releaseWatches():!n&&this._watchesReleased&&this._holdWatches()}_getSourceId(){let e=this._getState()?.data;return typeof e?.sourceId==`number`?e.sourceId:void 0}_ensureSourceId(e){let n=this._getSourceId();if(n!==void 0)return n;let r=e(),i=this._getState()?.data??{};return this._updateState({data:{...i,sourceId:r}},{description:t(`op.connectShape`)}),r}_protectionCheck(e){if(this.isReadOnly())throw new n(I(e))}};export{R as a,h as c,P as i,x as l,I as n,S as o,L as r,d as s,F as t};