@juspay/shooter 1.9.1 → 1.9.3

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 (236) hide show
  1. package/build/client/_app/immutable/assets/ColorPicker.CV4IKef4.css +1 -0
  2. package/build/client/_app/immutable/assets/ColorPicker.CV4IKef4.css.br +0 -0
  3. package/build/client/_app/immutable/assets/ColorPicker.CV4IKef4.css.gz +0 -0
  4. package/build/client/_app/immutable/chunks/BDcFu3l7.js +61 -0
  5. package/build/client/_app/immutable/chunks/BDcFu3l7.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/BDcFu3l7.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/BRqaaL5D.js +5 -0
  8. package/build/client/_app/immutable/chunks/BRqaaL5D.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/BRqaaL5D.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/C5VOyQCG.js +1 -0
  11. package/build/client/_app/immutable/chunks/C5VOyQCG.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/C5VOyQCG.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{3EfvnCrr.js → CRkG7oE4.js} +1 -1
  14. package/build/client/_app/immutable/chunks/CRkG7oE4.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/CRkG7oE4.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/{B-XSrufh.js → C_9BZILB.js} +1 -1
  17. package/build/client/_app/immutable/chunks/C_9BZILB.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/C_9BZILB.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/Cg3dlX05.js +2 -0
  20. package/build/client/_app/immutable/chunks/Cg3dlX05.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/Cg3dlX05.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/DYuMZGL5.js +1 -0
  23. package/build/client/_app/immutable/chunks/DYuMZGL5.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/DYuMZGL5.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/DZQMsHM5.js +1 -0
  26. package/build/client/_app/immutable/chunks/DZQMsHM5.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/DZQMsHM5.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/DZvnhU_8.js +21 -0
  29. package/build/client/_app/immutable/chunks/DZvnhU_8.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/DZvnhU_8.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/{DaomQix1.js → Dl_UrWML.js} +1 -1
  32. package/build/client/_app/immutable/chunks/Dl_UrWML.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/{DaomQix1.js.gz → Dl_UrWML.js.gz} +0 -0
  34. package/build/client/_app/immutable/chunks/Pw0jDB7M.js +1 -0
  35. package/build/client/_app/immutable/chunks/Pw0jDB7M.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/Pw0jDB7M.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/Woyb7K_R.js +3 -0
  38. package/build/client/_app/immutable/chunks/Woyb7K_R.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/Woyb7K_R.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/{DuaEmHXZ.js → heMtFUOe.js} +1 -1
  41. package/build/client/_app/immutable/chunks/heMtFUOe.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/heMtFUOe.js.gz +0 -0
  43. package/build/client/_app/immutable/entry/app.yF5DyySX.js +2 -0
  44. package/build/client/_app/immutable/entry/app.yF5DyySX.js.br +0 -0
  45. package/build/client/_app/immutable/entry/app.yF5DyySX.js.gz +0 -0
  46. package/build/client/_app/immutable/entry/start.qT_T2NM7.js +1 -0
  47. package/build/client/_app/immutable/entry/start.qT_T2NM7.js.br +2 -0
  48. package/build/client/_app/immutable/entry/start.qT_T2NM7.js.gz +0 -0
  49. package/build/client/_app/immutable/nodes/{0.BgwfOZTV.js → 0.B8ldaXrw.js} +2 -2
  50. package/build/client/_app/immutable/nodes/0.B8ldaXrw.js.br +0 -0
  51. package/build/client/_app/immutable/nodes/0.B8ldaXrw.js.gz +0 -0
  52. package/build/client/_app/immutable/nodes/{1.DunuP0ec.js → 1.BaQFc0zK.js} +1 -1
  53. package/build/client/_app/immutable/nodes/1.BaQFc0zK.js.br +0 -0
  54. package/build/client/_app/immutable/nodes/1.BaQFc0zK.js.gz +0 -0
  55. package/build/client/_app/immutable/nodes/{2.dWYUfDXP.js → 2.DzMPM9CG.js} +1 -1
  56. package/build/client/_app/immutable/nodes/2.DzMPM9CG.js.br +0 -0
  57. package/build/client/_app/immutable/nodes/2.DzMPM9CG.js.gz +0 -0
  58. package/build/client/_app/immutable/nodes/{3.rBWJMWFr.js → 3.Bj2gzFb0.js} +1 -1
  59. package/build/client/_app/immutable/nodes/3.Bj2gzFb0.js.br +0 -0
  60. package/build/client/_app/immutable/nodes/3.Bj2gzFb0.js.gz +0 -0
  61. package/build/client/_app/immutable/nodes/{4.BcK1571T.js → 4.BSVqdrrD.js} +3 -3
  62. package/build/client/_app/immutable/nodes/4.BSVqdrrD.js.br +0 -0
  63. package/build/client/_app/immutable/nodes/4.BSVqdrrD.js.gz +0 -0
  64. package/build/client/_app/immutable/nodes/{5.BN2SM61w.js → 5.Cfj35gpY.js} +1 -1
  65. package/build/client/_app/immutable/nodes/5.Cfj35gpY.js.br +0 -0
  66. package/build/client/_app/immutable/nodes/5.Cfj35gpY.js.gz +0 -0
  67. package/build/client/_app/immutable/nodes/{6.DDMVIiVk.js → 6.YxEM6HVV.js} +1 -1
  68. package/build/client/_app/immutable/nodes/6.YxEM6HVV.js.br +0 -0
  69. package/build/client/_app/immutable/nodes/6.YxEM6HVV.js.gz +0 -0
  70. package/build/client/_app/immutable/nodes/{7.DijtBcpt.js → 7.CYSmE4eH.js} +1 -1
  71. package/build/client/_app/immutable/nodes/7.CYSmE4eH.js.br +0 -0
  72. package/build/client/_app/immutable/nodes/7.CYSmE4eH.js.gz +0 -0
  73. package/build/client/_app/immutable/nodes/{8.Y_8EIs9h.js → 8.BiyoREYq.js} +2 -2
  74. package/build/client/_app/immutable/nodes/8.BiyoREYq.js.br +0 -0
  75. package/build/client/_app/immutable/nodes/8.BiyoREYq.js.gz +0 -0
  76. package/build/client/_app/immutable/nodes/{9.BoJIHqox.js → 9.DetO0mOw.js} +1 -1
  77. package/build/client/_app/immutable/nodes/9.DetO0mOw.js.br +0 -0
  78. package/build/client/_app/immutable/nodes/9.DetO0mOw.js.gz +0 -0
  79. package/build/client/_app/version.json +1 -1
  80. package/build/client/_app/version.json.br +0 -0
  81. package/build/client/_app/version.json.gz +0 -0
  82. package/build/server/chunks/{0-0CZFKlE-.js → 0-B2E6heaO.js} +4 -4
  83. package/build/server/chunks/{0-0CZFKlE-.js.map → 0-B2E6heaO.js.map} +1 -1
  84. package/build/server/chunks/1-G_9ph7fY.js +9 -0
  85. package/build/server/chunks/{1-DLzdA7q9.js.map → 1-G_9ph7fY.js.map} +1 -1
  86. package/build/server/chunks/2-Bn0siTxF.js +21 -0
  87. package/build/server/chunks/{2-DssNCbHE.js.map → 2-Bn0siTxF.js.map} +1 -1
  88. package/build/server/chunks/3-Ckkb4IvB.js +21 -0
  89. package/build/server/chunks/{3-xYdrp1JC.js.map → 3-Ckkb4IvB.js.map} +1 -1
  90. package/build/server/chunks/{4-DXZnoGK3.js → 4-CbejE1SC.js} +4 -4
  91. package/build/server/chunks/{4-DXZnoGK3.js.map → 4-CbejE1SC.js.map} +1 -1
  92. package/build/server/chunks/{5-DRhcUdp_.js → 5-BwqumuR1.js} +4 -4
  93. package/build/server/chunks/{5-DRhcUdp_.js.map → 5-BwqumuR1.js.map} +1 -1
  94. package/build/server/chunks/6-BBZkhy6X.js +9 -0
  95. package/build/server/chunks/{6-DpmjM0Zz.js.map → 6-BBZkhy6X.js.map} +1 -1
  96. package/build/server/chunks/7-BCSmnzEz.js +9 -0
  97. package/build/server/chunks/{7-fZr6V0jx.js.map → 7-BCSmnzEz.js.map} +1 -1
  98. package/build/server/chunks/8-D1orKzaf.js +9 -0
  99. package/build/server/chunks/{8-C92Y2pM_.js.map → 8-D1orKzaf.js.map} +1 -1
  100. package/build/server/chunks/9-BpBG1IO-.js +9 -0
  101. package/build/server/chunks/{9-xiLWXynw.js.map → 9-BpBG1IO-.js.map} +1 -1
  102. package/build/server/chunks/{Button-DPcpECFE.js → Button-Dpueno77.js} +9 -9
  103. package/build/server/chunks/Button-Dpueno77.js.map +1 -0
  104. package/build/server/chunks/{Icon-C2-613_Z.js → Icon-aOLx5ELI.js} +7 -7
  105. package/build/server/chunks/Icon-aOLx5ELI.js.map +1 -0
  106. package/build/server/chunks/{Input-M7rFN1IJ.js → Input-Cq7ZdLxS.js} +8 -8
  107. package/build/server/chunks/{Input-M7rFN1IJ.js.map → Input-Cq7ZdLxS.js.map} +1 -1
  108. package/build/server/chunks/{Pill-CbH1G79Z.js → Pill-Bn597jm0.js} +5 -5
  109. package/build/server/chunks/Pill-Bn597jm0.js.map +1 -0
  110. package/build/server/chunks/Shimmer-5o7MVwXF.js +10 -0
  111. package/build/server/chunks/Shimmer-5o7MVwXF.js.map +1 -0
  112. package/build/server/chunks/{_error.svelte-BfckZRui.js → _error.svelte-C85mEsv9.js} +8 -8
  113. package/build/server/chunks/{_error.svelte-BfckZRui.js.map → _error.svelte-C85mEsv9.js.map} +1 -1
  114. package/build/server/chunks/{_layout.svelte-B6wbenkT.js → _layout.svelte-rpYLLajc.js} +10 -10
  115. package/build/server/chunks/{_layout.svelte-B6wbenkT.js.map → _layout.svelte-rpYLLajc.js.map} +1 -1
  116. package/build/server/chunks/{_page.svelte-CKydRPy6.js → _page.svelte-B6O0uTrK.js} +4 -4
  117. package/build/server/chunks/{_page.svelte-CKydRPy6.js.map → _page.svelte-B6O0uTrK.js.map} +1 -1
  118. package/build/server/chunks/{_page.svelte-io210vyT.js → _page.svelte-BfCXobKv.js} +11 -11
  119. package/build/server/chunks/{_page.svelte-io210vyT.js.map → _page.svelte-BfCXobKv.js.map} +1 -1
  120. package/build/server/chunks/{_page.svelte-DKdaYz0t.js → _page.svelte-CA46TyHk.js} +5 -5
  121. package/build/server/chunks/{_page.svelte-DKdaYz0t.js.map → _page.svelte-CA46TyHk.js.map} +1 -1
  122. package/build/server/chunks/{_page.svelte-BRz-x9-s.js → _page.svelte-CCpVmMpU.js} +9 -9
  123. package/build/server/chunks/{_page.svelte-BRz-x9-s.js.map → _page.svelte-CCpVmMpU.js.map} +1 -1
  124. package/build/server/chunks/{_page.svelte-COFpm-S2.js → _page.svelte-D0FBtMtH.js} +11 -11
  125. package/build/server/chunks/{_page.svelte-COFpm-S2.js.map → _page.svelte-D0FBtMtH.js.map} +1 -1
  126. package/build/server/chunks/{_page.svelte-DpUVuiqQ.js → _page.svelte-DUj1mSq0.js} +7 -7
  127. package/build/server/chunks/{_page.svelte-DpUVuiqQ.js.map → _page.svelte-DUj1mSq0.js.map} +1 -1
  128. package/build/server/chunks/{_page.svelte-CwCypx0G.js → _page.svelte-DjADcbfZ.js} +34 -34
  129. package/build/server/chunks/_page.svelte-DjADcbfZ.js.map +1 -0
  130. package/build/server/chunks/{_page.svelte-DfZBq0p5.js → _page.svelte-fkR4xqGu.js} +20 -20
  131. package/build/server/chunks/_page.svelte-fkR4xqGu.js.map +1 -0
  132. package/build/server/chunks/{cache-tQqq4VCX.js → cache-5_eamjtv.js} +6 -6
  133. package/build/server/chunks/cache-5_eamjtv.js.map +1 -0
  134. package/build/server/chunks/{client-Do_WijF3.js → client-w1WsLDGu.js} +4 -4
  135. package/build/server/chunks/{client-Do_WijF3.js.map → client-w1WsLDGu.js.map} +1 -1
  136. package/build/server/chunks/client2-B5wCRDQi.js +7 -0
  137. package/build/server/chunks/{client2-DQ2fYrJe.js.map → client2-B5wCRDQi.js.map} +1 -1
  138. package/build/server/chunks/index-CoD1IJuy.js.map +1 -1
  139. package/build/server/chunks/{index-BHoOpAe1.js → index-DMikC9Qy.js} +443 -175
  140. package/build/server/chunks/index-DMikC9Qy.js.map +1 -0
  141. package/build/server/chunks/{index-server-BVf8_1QW.js → index-server-DHNcb_Bd.js} +2 -2
  142. package/build/server/chunks/{index-server-BVf8_1QW.js.map → index-server-DHNcb_Bd.js.map} +1 -1
  143. package/build/server/chunks/{index2-CKh4I94n.js → index2-BTTf6mSG.js} +2 -2
  144. package/build/server/chunks/{index2-CKh4I94n.js.map → index2-BTTf6mSG.js.map} +1 -1
  145. package/build/server/chunks/{root-CW7Ox2wn.js → root-DhBbA8QD.js} +20 -15
  146. package/build/server/chunks/root-DhBbA8QD.js.map +1 -0
  147. package/build/server/chunks/{state.svelte-Cg5VK5nH.js → state.svelte-M8y8rROy.js} +3 -3
  148. package/build/server/chunks/{state.svelte-Cg5VK5nH.js.map → state.svelte-M8y8rROy.js.map} +1 -1
  149. package/build/server/chunks/{stores-D6TajUdj.js → stores-CwkRmCHA.js} +4 -4
  150. package/build/server/chunks/{stores-D6TajUdj.js.map → stores-CwkRmCHA.js.map} +1 -1
  151. package/build/server/index.js +311 -242
  152. package/build/server/index.js.map +1 -1
  153. package/build/server/manifest.js +11 -11
  154. package/build/server/manifest.js.map +1 -1
  155. package/package.json +17 -5
  156. package/build/client/_app/immutable/assets/ColorPicker.Hf6zQzuB.css +0 -1
  157. package/build/client/_app/immutable/assets/ColorPicker.Hf6zQzuB.css.br +0 -0
  158. package/build/client/_app/immutable/assets/ColorPicker.Hf6zQzuB.css.gz +0 -0
  159. package/build/client/_app/immutable/chunks/3EfvnCrr.js.br +0 -0
  160. package/build/client/_app/immutable/chunks/3EfvnCrr.js.gz +0 -0
  161. package/build/client/_app/immutable/chunks/3MMtouT7.js +0 -2
  162. package/build/client/_app/immutable/chunks/3MMtouT7.js.br +0 -0
  163. package/build/client/_app/immutable/chunks/3MMtouT7.js.gz +0 -0
  164. package/build/client/_app/immutable/chunks/B-XSrufh.js.br +0 -0
  165. package/build/client/_app/immutable/chunks/B-XSrufh.js.gz +0 -0
  166. package/build/client/_app/immutable/chunks/BCwT4WOg.js +0 -60
  167. package/build/client/_app/immutable/chunks/BCwT4WOg.js.br +0 -0
  168. package/build/client/_app/immutable/chunks/BCwT4WOg.js.gz +0 -0
  169. package/build/client/_app/immutable/chunks/BTu-2gkj.js +0 -21
  170. package/build/client/_app/immutable/chunks/BTu-2gkj.js.br +0 -0
  171. package/build/client/_app/immutable/chunks/BTu-2gkj.js.gz +0 -0
  172. package/build/client/_app/immutable/chunks/BsNWiLas.js +0 -1
  173. package/build/client/_app/immutable/chunks/BsNWiLas.js.br +0 -0
  174. package/build/client/_app/immutable/chunks/BsNWiLas.js.gz +0 -0
  175. package/build/client/_app/immutable/chunks/CMQw-Fc-.js +0 -1
  176. package/build/client/_app/immutable/chunks/CMQw-Fc-.js.br +0 -0
  177. package/build/client/_app/immutable/chunks/CMQw-Fc-.js.gz +0 -0
  178. package/build/client/_app/immutable/chunks/Ce0VRwE1.js +0 -1
  179. package/build/client/_app/immutable/chunks/Ce0VRwE1.js.br +0 -0
  180. package/build/client/_app/immutable/chunks/Ce0VRwE1.js.gz +0 -0
  181. package/build/client/_app/immutable/chunks/DFPEaIHz.js +0 -1
  182. package/build/client/_app/immutable/chunks/DFPEaIHz.js.br +0 -0
  183. package/build/client/_app/immutable/chunks/DFPEaIHz.js.gz +0 -0
  184. package/build/client/_app/immutable/chunks/DaomQix1.js.br +0 -0
  185. package/build/client/_app/immutable/chunks/DdpA9n1s.js +0 -5
  186. package/build/client/_app/immutable/chunks/DdpA9n1s.js.br +0 -4
  187. package/build/client/_app/immutable/chunks/DdpA9n1s.js.gz +0 -0
  188. package/build/client/_app/immutable/chunks/Dfn9ME_a.js +0 -3
  189. package/build/client/_app/immutable/chunks/Dfn9ME_a.js.br +0 -0
  190. package/build/client/_app/immutable/chunks/Dfn9ME_a.js.gz +0 -0
  191. package/build/client/_app/immutable/chunks/DuaEmHXZ.js.br +0 -0
  192. package/build/client/_app/immutable/chunks/DuaEmHXZ.js.gz +0 -0
  193. package/build/client/_app/immutable/entry/app.C23A4_LP.js +0 -2
  194. package/build/client/_app/immutable/entry/app.C23A4_LP.js.br +0 -0
  195. package/build/client/_app/immutable/entry/app.C23A4_LP.js.gz +0 -0
  196. package/build/client/_app/immutable/entry/start.Dzoby1AT.js +0 -1
  197. package/build/client/_app/immutable/entry/start.Dzoby1AT.js.br +0 -2
  198. package/build/client/_app/immutable/entry/start.Dzoby1AT.js.gz +0 -0
  199. package/build/client/_app/immutable/nodes/0.BgwfOZTV.js.br +0 -0
  200. package/build/client/_app/immutable/nodes/0.BgwfOZTV.js.gz +0 -0
  201. package/build/client/_app/immutable/nodes/1.DunuP0ec.js.br +0 -0
  202. package/build/client/_app/immutable/nodes/1.DunuP0ec.js.gz +0 -0
  203. package/build/client/_app/immutable/nodes/2.dWYUfDXP.js.br +0 -0
  204. package/build/client/_app/immutable/nodes/2.dWYUfDXP.js.gz +0 -0
  205. package/build/client/_app/immutable/nodes/3.rBWJMWFr.js.br +0 -0
  206. package/build/client/_app/immutable/nodes/3.rBWJMWFr.js.gz +0 -0
  207. package/build/client/_app/immutable/nodes/4.BcK1571T.js.br +0 -0
  208. package/build/client/_app/immutable/nodes/4.BcK1571T.js.gz +0 -0
  209. package/build/client/_app/immutable/nodes/5.BN2SM61w.js.br +0 -0
  210. package/build/client/_app/immutable/nodes/5.BN2SM61w.js.gz +0 -0
  211. package/build/client/_app/immutable/nodes/6.DDMVIiVk.js.br +0 -0
  212. package/build/client/_app/immutable/nodes/6.DDMVIiVk.js.gz +0 -0
  213. package/build/client/_app/immutable/nodes/7.DijtBcpt.js.br +0 -0
  214. package/build/client/_app/immutable/nodes/7.DijtBcpt.js.gz +0 -0
  215. package/build/client/_app/immutable/nodes/8.Y_8EIs9h.js.br +0 -0
  216. package/build/client/_app/immutable/nodes/8.Y_8EIs9h.js.gz +0 -0
  217. package/build/client/_app/immutable/nodes/9.BoJIHqox.js.br +0 -0
  218. package/build/client/_app/immutable/nodes/9.BoJIHqox.js.gz +0 -0
  219. package/build/server/chunks/1-DLzdA7q9.js +0 -9
  220. package/build/server/chunks/2-DssNCbHE.js +0 -21
  221. package/build/server/chunks/3-xYdrp1JC.js +0 -21
  222. package/build/server/chunks/6-DpmjM0Zz.js +0 -9
  223. package/build/server/chunks/7-fZr6V0jx.js +0 -9
  224. package/build/server/chunks/8-C92Y2pM_.js +0 -9
  225. package/build/server/chunks/9-xiLWXynw.js +0 -9
  226. package/build/server/chunks/Button-DPcpECFE.js.map +0 -1
  227. package/build/server/chunks/Icon-C2-613_Z.js.map +0 -1
  228. package/build/server/chunks/Pill-CbH1G79Z.js.map +0 -1
  229. package/build/server/chunks/Shimmer-BrakrBeG.js +0 -10
  230. package/build/server/chunks/Shimmer-BrakrBeG.js.map +0 -1
  231. package/build/server/chunks/_page.svelte-CwCypx0G.js.map +0 -1
  232. package/build/server/chunks/_page.svelte-DfZBq0p5.js.map +0 -1
  233. package/build/server/chunks/cache-tQqq4VCX.js.map +0 -1
  234. package/build/server/chunks/client2-DQ2fYrJe.js +0 -7
  235. package/build/server/chunks/index-BHoOpAe1.js.map +0 -1
  236. package/build/server/chunks/root-CW7Ox2wn.js.map +0 -1
@@ -1,4 +1,13 @@
1
1
  const browser = false;
2
+ const UNDEFINED = -1;
3
+ const HOLE = -2;
4
+ const NAN = -3;
5
+ const POSITIVE_INFINITY = -4;
6
+ const NEGATIVE_INFINITY = -5;
7
+ const NEGATIVE_ZERO = -6;
8
+ const SPARSE = -7;
9
+ const MAX_ARRAY_LEN = 2 ** 32 - 1;
10
+ const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
2
11
  const escaped = {
3
12
  "<": "\\u003C",
4
13
  "\\": "\\\\",
@@ -26,11 +35,9 @@ class DevalueError extends Error {
26
35
  }
27
36
  }
28
37
  function is_primitive(thing) {
29
- return Object(thing) !== thing;
38
+ return thing === null || typeof thing !== "object" && typeof thing !== "function";
30
39
  }
31
- const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(
32
- Object.prototype
33
- ).sort().join("\0");
40
+ const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
34
41
  function is_plain_object(thing) {
35
42
  const proto = Object.getPrototypeOf(thing);
36
43
  return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
@@ -87,22 +94,31 @@ const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
87
94
  function stringify_key(key) {
88
95
  return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
89
96
  }
90
- function is_valid_array_index(s) {
97
+ function is_valid_array_index(n) {
98
+ if (!Number.isInteger(n)) return false;
99
+ if (n < 0) return false;
100
+ if (n > MAX_ARRAY_INDEX) return false;
101
+ return true;
102
+ }
103
+ function is_valid_array_len(n) {
104
+ if (!Number.isInteger(n)) return false;
105
+ if (n < 0) return false;
106
+ if (n > MAX_ARRAY_LEN) return false;
107
+ return true;
108
+ }
109
+ function is_valid_array_index_string(s) {
91
110
  if (s.length === 0) return false;
92
111
  if (s.length > 1 && s.charCodeAt(0) === 48) return false;
93
112
  for (let i = 0; i < s.length; i++) {
94
113
  const c = s.charCodeAt(i);
95
114
  if (c < 48 || c > 57) return false;
96
115
  }
97
- const n = +s;
98
- if (n >= 2 ** 32 - 1) return false;
99
- if (n < 0) return false;
100
- return true;
116
+ return is_valid_array_index(+s);
101
117
  }
102
118
  function valid_array_indices(array) {
103
119
  const keys = Object.keys(array);
104
120
  for (var i = keys.length - 1; i >= 0; i--) {
105
- if (is_valid_array_index(keys[i])) {
121
+ if (is_valid_array_index_string(keys[i])) {
106
122
  break;
107
123
  }
108
124
  }
@@ -157,9 +173,7 @@ function uneval(value, replacer) {
157
173
  break;
158
174
  case "Map":
159
175
  for (const [key, value2] of thing) {
160
- keys.push(
161
- `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`
162
- );
176
+ keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
163
177
  walk(value2);
164
178
  keys.pop();
165
179
  }
@@ -169,12 +183,14 @@ function uneval(value, replacer) {
169
183
  case "Uint8ClampedArray":
170
184
  case "Int16Array":
171
185
  case "Uint16Array":
186
+ case "Float16Array":
172
187
  case "Int32Array":
173
188
  case "Uint32Array":
174
189
  case "Float32Array":
175
190
  case "Float64Array":
176
191
  case "BigInt64Array":
177
192
  case "BigUint64Array":
193
+ case "DataView":
178
194
  walk(thing.buffer);
179
195
  return;
180
196
  case "ArrayBuffer":
@@ -190,20 +206,10 @@ function uneval(value, replacer) {
190
206
  return;
191
207
  default:
192
208
  if (!is_plain_object(thing)) {
193
- throw new DevalueError(
194
- `Cannot stringify arbitrary non-POJOs`,
195
- keys,
196
- thing,
197
- value
198
- );
209
+ throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
199
210
  }
200
211
  if (enumerable_symbols(thing).length > 0) {
201
- throw new DevalueError(
202
- `Cannot stringify POJOs with symbolic keys`,
203
- keys,
204
- thing,
205
- value
206
- );
212
+ throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
207
213
  }
208
214
  for (const key of Object.keys(thing)) {
209
215
  if (key === "__proto__") {
@@ -219,6 +225,8 @@ function uneval(value, replacer) {
219
225
  keys.pop();
220
226
  }
221
227
  }
228
+ } else if (typeof thing === "symbol") {
229
+ throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
222
230
  }
223
231
  }
224
232
  walk(value);
@@ -241,9 +249,11 @@ function uneval(value, replacer) {
241
249
  case "Number":
242
250
  case "String":
243
251
  case "Boolean":
252
+ case "BigInt":
244
253
  return `Object(${stringify2(thing.valueOf())})`;
245
254
  case "RegExp":
246
- return `new RegExp(${stringify_string(thing.source)}, "${thing.flags}")`;
255
+ const { source: source2, flags } = thing;
256
+ return flags ? `new RegExp(${stringify_string(source2)},"${flags}")` : `new RegExp(${stringify_string(source2)})`;
247
257
  case "Date":
248
258
  return `new Date(${thing.getTime()})`;
249
259
  case "URL":
@@ -285,6 +295,7 @@ function uneval(value, replacer) {
285
295
  case "Uint8ClampedArray":
286
296
  case "Int16Array":
287
297
  case "Uint16Array":
298
+ case "Float16Array":
288
299
  case "Int32Array":
289
300
  case "Uint32Array":
290
301
  case "Float32Array":
@@ -292,20 +303,31 @@ function uneval(value, replacer) {
292
303
  case "BigInt64Array":
293
304
  case "BigUint64Array": {
294
305
  let str2 = `new ${type}`;
295
- if (counts.get(thing.buffer) === 1) {
306
+ if (!names.has(thing.buffer)) {
296
307
  const array = new thing.constructor(thing.buffer);
297
308
  str2 += `([${array}])`;
298
309
  } else {
299
- str2 += `([${stringify2(thing.buffer)}])`;
310
+ str2 += `(${stringify2(thing.buffer)})`;
300
311
  }
301
- const a = thing.byteOffset;
302
- const b = a + thing.byteLength;
303
- if (a > 0 || b !== thing.buffer.byteLength) {
304
- const m = +/(\d+)/.exec(type)[1] / 8;
305
- str2 += `.subarray(${a / m},${b / m})`;
312
+ if (thing.byteLength !== thing.buffer.byteLength) {
313
+ const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
314
+ const end = start + thing.length;
315
+ str2 += `.subarray(${start},${end})`;
306
316
  }
307
317
  return str2;
308
318
  }
319
+ case "DataView": {
320
+ let str2 = `new DataView`;
321
+ if (!names.has(thing.buffer)) {
322
+ str2 += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
323
+ } else {
324
+ str2 += `(${stringify2(thing.buffer)}`;
325
+ }
326
+ if (thing.byteLength !== thing.buffer.byteLength) {
327
+ str2 += `,${thing.startOffset},${thing.byteLength}`;
328
+ }
329
+ return str2 + ")";
330
+ }
309
331
  case "ArrayBuffer": {
310
332
  const ui8 = new Uint8Array(thing);
311
333
  return `new Uint8Array([${ui8.toString()}]).buffer`;
@@ -352,14 +374,23 @@ function uneval(value, replacer) {
352
374
  case "Number":
353
375
  case "String":
354
376
  case "Boolean":
377
+ case "BigInt":
355
378
  values.push(`Object(${stringify2(thing.valueOf())})`);
356
379
  break;
357
380
  case "RegExp":
358
- values.push(thing.toString());
381
+ const { source: source2, flags } = thing;
382
+ const regexp = flags ? `new RegExp(${stringify_string(source2)},"${flags}")` : `new RegExp(${stringify_string(source2)})`;
383
+ values.push(regexp);
359
384
  break;
360
385
  case "Date":
361
386
  values.push(`new Date(${thing.getTime()})`);
362
387
  break;
388
+ case "URL":
389
+ values.push(`new URL(${stringify_string(thing.toString())})`);
390
+ break;
391
+ case "URLSearchParams":
392
+ values.push(`new URLSearchParams(${stringify_string(thing.toString())})`);
393
+ break;
363
394
  case "Array":
364
395
  values.push(`Array(${thing.length})`);
365
396
  thing.forEach((v, i) => {
@@ -378,26 +409,61 @@ function uneval(value, replacer) {
378
409
  `${name}.${Array.from(thing).map(([k, v]) => `set(${stringify2(k)}, ${stringify2(v)})`).join(".")}`
379
410
  );
380
411
  break;
412
+ case "Int8Array":
413
+ case "Uint8Array":
414
+ case "Uint8ClampedArray":
415
+ case "Int16Array":
416
+ case "Uint16Array":
417
+ case "Float16Array":
418
+ case "Int32Array":
419
+ case "Uint32Array":
420
+ case "Float32Array":
421
+ case "Float64Array":
422
+ case "BigInt64Array":
423
+ case "BigUint64Array": {
424
+ let str2 = `new ${type}`;
425
+ if (!names.has(thing.buffer)) {
426
+ const array = new thing.constructor(thing.buffer);
427
+ str2 += `([${array}])`;
428
+ } else {
429
+ str2 += `(${stringify2(thing.buffer)})`;
430
+ }
431
+ if (thing.byteLength !== thing.buffer.byteLength) {
432
+ const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
433
+ const end = start + thing.length;
434
+ str2 += `.subarray(${start},${end})`;
435
+ }
436
+ values.push(`{}`);
437
+ statements.push(`${name}=${str2}`);
438
+ break;
439
+ }
440
+ case "DataView": {
441
+ let str2 = `new DataView`;
442
+ if (!names.has(thing.buffer)) {
443
+ str2 += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
444
+ } else {
445
+ str2 += `(${stringify2(thing.buffer)}`;
446
+ }
447
+ if (thing.byteLength !== thing.buffer.byteLength) {
448
+ str2 += `,${thing.byteOffset},${thing.byteLength}`;
449
+ }
450
+ str2 += ")";
451
+ values.push(`{}`);
452
+ statements.push(`${name}=${str2}`);
453
+ break;
454
+ }
381
455
  case "ArrayBuffer":
382
- values.push(
383
- `new Uint8Array([${new Uint8Array(thing).join(",")}]).buffer`
384
- );
456
+ values.push(`new Uint8Array([${new Uint8Array(thing)}]).buffer`);
385
457
  break;
386
458
  default:
387
- values.push(
388
- Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}"
389
- );
459
+ values.push(Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}");
390
460
  Object.keys(thing).forEach((key) => {
391
- statements.push(
392
- `${name}${safe_prop(key)}=${stringify2(thing[key])}`
393
- );
461
+ statements.push(`${name}${safe_prop(key)}=${stringify2(thing[key])}`);
394
462
  });
395
463
  }
396
464
  });
397
465
  statements.push(`return ${str}`);
398
- return `(function(${params.join(",")}){${statements.join(
399
- ";"
400
- )}}(${values.join(",")}))`;
466
+ return `(function(${params.join(",")}){${statements.join(";")}}(${values.join(",")}))`;
401
467
  } else {
402
468
  return str;
403
469
  }
@@ -423,12 +489,13 @@ function safe_prop(key) {
423
489
  return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? `.${key}` : `[${escape_unsafe_chars(JSON.stringify(key))}]`;
424
490
  }
425
491
  function stringify_primitive(thing) {
426
- if (typeof thing === "string") return stringify_string(thing);
492
+ const type = typeof thing;
493
+ if (type === "string") return stringify_string(thing);
427
494
  if (thing === void 0) return "void 0";
428
495
  if (thing === 0 && 1 / thing < 0) return "-0";
429
496
  const str = String(thing);
430
- if (typeof thing === "number") return str.replace(/^(-)?0\./, "$1.");
431
- if (typeof thing === "bigint") return thing + "n";
497
+ if (type === "number") return str.replace(/^(-)?0\./, "$1.");
498
+ if (type === "bigint") return thing + "n";
432
499
  return str;
433
500
  }
434
501
  var is_array = Array.isArray;
@@ -494,6 +561,10 @@ const ASYNC = 1 << 22;
494
561
  const ERROR_VALUE = 1 << 23;
495
562
  const STATE_SYMBOL = /* @__PURE__ */ Symbol("$state");
496
563
  const LEGACY_PROPS = /* @__PURE__ */ Symbol("legacy props");
564
+ const ATTRIBUTES_CACHE = /* @__PURE__ */ Symbol("attributes");
565
+ const CLASS_CACHE = /* @__PURE__ */ Symbol("class");
566
+ const STYLE_CACHE = /* @__PURE__ */ Symbol("style");
567
+ const TEXT_CACHE = /* @__PURE__ */ Symbol("text");
497
568
  const STALE_REACTION = new class StaleReactionError extends Error {
498
569
  name = "StaleReactionError";
499
570
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
@@ -543,6 +614,21 @@ const ELEMENT_IS_NAMESPACED = 1;
543
614
  const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
544
615
  const ELEMENT_IS_INPUT = 1 << 2;
545
616
  const UNINITIALIZED = /* @__PURE__ */ Symbol();
617
+ function derived_inert() {
618
+ {
619
+ console.warn(`https://svelte.dev/e/derived_inert`);
620
+ }
621
+ }
622
+ function hydration_mismatch(location) {
623
+ {
624
+ console.warn(`https://svelte.dev/e/hydration_mismatch`);
625
+ }
626
+ }
627
+ function svelte_boundary_reset_noop() {
628
+ {
629
+ console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
630
+ }
631
+ }
546
632
  let tracing_mode_flag = false;
547
633
  let component_context = null;
548
634
  function set_component_context(context) {
@@ -666,8 +752,10 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
666
752
  clear_marked(effect.deps);
667
753
  set_signal_status(effect, CLEAN);
668
754
  }
669
- const batches = /* @__PURE__ */ new Set();
755
+ let first_batch = null;
756
+ let last_batch = null;
670
757
  let current_batch = null;
758
+ let previous_batch = null;
671
759
  let batch_values = null;
672
760
  let last_scheduled_effect = null;
673
761
  let is_flushing_sync = false;
@@ -678,6 +766,15 @@ var flush_count = 0;
678
766
  let uid = 1;
679
767
  class Batch {
680
768
  id = uid++;
769
+ /** True as soon as `#process` was called */
770
+ #started = false;
771
+ linked = true;
772
+ /** @type {Batch | null} */
773
+ #prev = null;
774
+ /** @type {Batch | null} */
775
+ #next = null;
776
+ /** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
777
+ async_deriveds = /* @__PURE__ */ new Map();
681
778
  /**
682
779
  * The current values of any signals that are updated in this batch.
683
780
  * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
@@ -691,6 +788,12 @@ class Batch {
691
788
  * @type {Map<Value, any>}
692
789
  */
693
790
  previous = /* @__PURE__ */ new Map();
791
+ /**
792
+ * Async effects which this batch doesn't take into account anymore when calculating blockers,
793
+ * as it has a value for it already.
794
+ * @type {Set<Effect>}
795
+ */
796
+ unblocked = /* @__PURE__ */ new Set();
694
797
  /**
695
798
  * When the batch is committed (and the DOM is updated), we need to remove old branches
696
799
  * and append new ones by calling the functions added inside (if/each/key/etc) blocks
@@ -703,10 +806,14 @@ class Batch {
703
806
  */
704
807
  #discard_callbacks = /* @__PURE__ */ new Set();
705
808
  /**
706
- * Async effects that are currently in flight
707
- * @type {Map<Effect, number>}
809
+ * Callbacks that should run only when a fork is committed.
810
+ * @type {Set<(batch: Batch) => void>}
708
811
  */
709
- #pending = /* @__PURE__ */ new Map();
812
+ #fork_commit_callbacks = /* @__PURE__ */ new Set();
813
+ /**
814
+ * The number of async effects that are currently in flight
815
+ */
816
+ #pending = 0;
710
817
  /**
711
818
  * Async effects that are currently in flight, _not_ inside a pending boundary
712
819
  * @type {Map<Effect, number>}
@@ -723,6 +830,11 @@ class Batch {
723
830
  * @type {Effect[]}
724
831
  */
725
832
  #roots = [];
833
+ /**
834
+ * Effects created while this batch was active.
835
+ * @type {Effect[]}
836
+ */
837
+ #new_effects = [];
726
838
  /**
727
839
  * Deferred effects (which run after async work has completed) that are DIRTY
728
840
  * @type {Set<Effect>}
@@ -741,28 +853,27 @@ class Batch {
741
853
  * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
742
854
  */
743
855
  #skipped_branches = /* @__PURE__ */ new Map();
856
+ /**
857
+ * Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
858
+ * @type {Set<Effect>}
859
+ */
860
+ #unskipped_branches = /* @__PURE__ */ new Set();
744
861
  is_fork = false;
745
862
  #decrement_queued = false;
746
- /** @type {Set<Batch>} */
747
- #blockers = /* @__PURE__ */ new Set();
748
863
  #is_deferred() {
749
- return this.is_fork || this.#blocking_pending.size > 0;
750
- }
751
- #is_blocked() {
752
- for (const batch of this.#blockers) {
753
- for (const effect of batch.#blocking_pending.keys()) {
754
- var skipped = false;
755
- var e = effect;
756
- while (e.parent !== null) {
757
- if (this.#skipped_branches.has(e)) {
758
- skipped = true;
759
- break;
760
- }
761
- e = e.parent;
762
- }
763
- if (!skipped) {
764
- return true;
864
+ if (this.is_fork) return true;
865
+ for (const effect of this.#blocking_pending.keys()) {
866
+ var e = effect;
867
+ var skipped = false;
868
+ while (e.parent !== null) {
869
+ if (this.#skipped_branches.has(e)) {
870
+ skipped = true;
871
+ break;
765
872
  }
873
+ e = e.parent;
874
+ }
875
+ if (!skipped) {
876
+ return true;
766
877
  }
767
878
  }
768
879
  return false;
@@ -775,29 +886,33 @@ class Batch {
775
886
  if (!this.#skipped_branches.has(effect)) {
776
887
  this.#skipped_branches.set(effect, { d: [], m: [] });
777
888
  }
889
+ this.#unskipped_branches.delete(effect);
778
890
  }
779
891
  /**
780
892
  * Remove an effect from the #skipped_branches map and reschedule
781
893
  * any tracked dirty/maybe_dirty child effects
782
894
  * @param {Effect} effect
895
+ * @param {(e: Effect) => void} callback
783
896
  */
784
- unskip_effect(effect) {
897
+ unskip_effect(effect, callback = (e) => this.schedule(e)) {
785
898
  var tracked = this.#skipped_branches.get(effect);
786
899
  if (tracked) {
787
900
  this.#skipped_branches.delete(effect);
788
901
  for (var e of tracked.d) {
789
902
  set_signal_status(e, DIRTY);
790
- this.schedule(e);
903
+ callback(e);
791
904
  }
792
905
  for (e of tracked.m) {
793
906
  set_signal_status(e, MAYBE_DIRTY);
794
- this.schedule(e);
907
+ callback(e);
795
908
  }
796
909
  }
910
+ this.#unskipped_branches.add(effect);
797
911
  }
798
912
  #process() {
913
+ this.#started = true;
799
914
  if (flush_count++ > 1e3) {
800
- batches.delete(this);
915
+ this.#unlink();
801
916
  infinite_loop_guard();
802
917
  }
803
918
  if (!this.#is_deferred()) {
@@ -834,40 +949,51 @@ class Batch {
834
949
  }
835
950
  collected_effects = null;
836
951
  legacy_updates = null;
837
- if (this.#is_deferred() || this.#is_blocked()) {
952
+ if (this.#is_deferred()) {
838
953
  this.#defer_effects(render_effects);
839
954
  this.#defer_effects(effects);
840
955
  for (const [e, t] of this.#skipped_branches) {
841
956
  reset_branch(e, t);
842
957
  }
843
- } else {
844
- if (this.#pending.size === 0) {
845
- batches.delete(this);
958
+ if (updates.length > 0) {
959
+ /** @type {unknown} */
960
+ current_batch.#process();
846
961
  }
847
- this.#dirty_effects.clear();
848
- this.#maybe_dirty_effects.clear();
849
- for (const fn of this.#commit_callbacks) fn(this);
850
- this.#commit_callbacks.clear();
851
- flush_queued_effects(render_effects);
852
- flush_queued_effects(effects);
853
- this.#deferred?.resolve();
962
+ return;
963
+ }
964
+ const earlier_batch = this.#find_earlier_batch();
965
+ if (earlier_batch) {
966
+ earlier_batch.#merge(this);
967
+ return;
854
968
  }
969
+ this.#dirty_effects.clear();
970
+ this.#maybe_dirty_effects.clear();
971
+ for (const fn of this.#commit_callbacks) fn(this);
972
+ this.#commit_callbacks.clear();
973
+ previous_batch = this;
974
+ flush_queued_effects(render_effects);
975
+ flush_queued_effects(effects);
976
+ previous_batch = null;
977
+ this.#deferred?.resolve();
855
978
  var next_batch = (
856
979
  /** @type {Batch | null} */
857
980
  /** @type {unknown} */
858
981
  current_batch
859
982
  );
983
+ if (this.linked && this.#pending === 0) {
984
+ this.#unlink();
985
+ }
860
986
  if (this.#roots.length > 0) {
861
- const batch2 = next_batch ??= this;
987
+ if (next_batch === null) {
988
+ next_batch = this;
989
+ this.#link();
990
+ }
991
+ const batch2 = next_batch;
862
992
  batch2.#roots.push(...this.#roots.filter((r2) => !batch2.#roots.includes(r2)));
863
993
  }
864
994
  if (next_batch !== null) {
865
- batches.add(next_batch);
866
995
  next_batch.#process();
867
996
  }
868
- if (!batches.has(this)) {
869
- this.#commit();
870
- }
871
997
  }
872
998
  /**
873
999
  * Traverse the effect tree, executing effects or stashing
@@ -909,6 +1035,65 @@ class Batch {
909
1035
  }
910
1036
  }
911
1037
  }
1038
+ #find_earlier_batch() {
1039
+ var batch = this.#prev;
1040
+ while (batch !== null) {
1041
+ if (!batch.is_fork) {
1042
+ for (const [value, [, is_derived]] of this.current) {
1043
+ if (batch.current.has(value) && !is_derived) {
1044
+ return batch;
1045
+ }
1046
+ }
1047
+ }
1048
+ batch = batch.#prev;
1049
+ }
1050
+ return null;
1051
+ }
1052
+ /**
1053
+ * @param {Batch} batch
1054
+ */
1055
+ #merge(batch) {
1056
+ for (const [source2, value] of batch.current) {
1057
+ if (!this.previous.has(source2) && batch.previous.has(source2)) {
1058
+ this.previous.set(source2, batch.previous.get(source2));
1059
+ }
1060
+ this.current.set(source2, value);
1061
+ }
1062
+ for (const [effect, deferred2] of batch.async_deriveds) {
1063
+ const d = this.async_deriveds.get(effect);
1064
+ if (d) deferred2.promise.then(d.resolve);
1065
+ }
1066
+ const mark = (value) => {
1067
+ var reactions = value.reactions;
1068
+ if (reactions === null) return;
1069
+ for (const reaction of reactions) {
1070
+ var flags = reaction.f;
1071
+ if ((flags & DERIVED) !== 0) {
1072
+ mark(
1073
+ /** @type {Derived} */
1074
+ reaction
1075
+ );
1076
+ } else {
1077
+ var effect = (
1078
+ /** @type {Effect} */
1079
+ reaction
1080
+ );
1081
+ if (flags & (ASYNC | BLOCK_EFFECT) && !this.async_deriveds.has(effect)) {
1082
+ this.#maybe_dirty_effects.delete(effect);
1083
+ set_signal_status(effect, DIRTY);
1084
+ this.schedule(effect);
1085
+ }
1086
+ }
1087
+ }
1088
+ };
1089
+ for (const source2 of this.current.keys()) {
1090
+ mark(source2);
1091
+ }
1092
+ this.oncommit(() => batch.discard());
1093
+ batch.#unlink();
1094
+ current_batch = this;
1095
+ this.#process();
1096
+ }
912
1097
  /**
913
1098
  * @param {Effect[]} effects
914
1099
  */
@@ -921,16 +1106,19 @@ class Batch {
921
1106
  * Associate a change to a given source with the current
922
1107
  * batch, noting its previous and current values
923
1108
  * @param {Value} source
924
- * @param {any} old_value
1109
+ * @param {any} value
925
1110
  * @param {boolean} [is_derived]
926
1111
  */
927
- capture(source2, old_value, is_derived = false) {
928
- if (old_value !== UNINITIALIZED && !this.previous.has(source2)) {
929
- this.previous.set(source2, old_value);
1112
+ capture(source2, value, is_derived = false) {
1113
+ if (source2.v !== UNINITIALIZED && !this.previous.has(source2)) {
1114
+ this.previous.set(source2, source2.v);
930
1115
  }
931
1116
  if ((source2.f & ERROR_VALUE) === 0) {
932
- this.current.set(source2, [source2.v, is_derived]);
933
- batch_values?.set(source2, source2.v);
1117
+ this.current.set(source2, [value, is_derived]);
1118
+ batch_values?.set(source2, value);
1119
+ }
1120
+ if (!this.is_fork) {
1121
+ source2.v = value;
934
1122
  }
935
1123
  }
936
1124
  activate() {
@@ -942,6 +1130,7 @@ class Batch {
942
1130
  }
943
1131
  flush() {
944
1132
  try {
1133
+ if (browser) ;
945
1134
  is_processing = true;
946
1135
  current_batch = this;
947
1136
  this.#process();
@@ -959,10 +1148,18 @@ class Batch {
959
1148
  discard() {
960
1149
  for (const fn of this.#discard_callbacks) fn(this);
961
1150
  this.#discard_callbacks.clear();
962
- batches.delete(this);
1151
+ this.#fork_commit_callbacks.clear();
1152
+ this.#unlink();
1153
+ }
1154
+ /**
1155
+ * @param {Effect} effect
1156
+ */
1157
+ register_created_effect(effect) {
1158
+ this.#new_effects.push(effect);
963
1159
  }
964
1160
  #commit() {
965
- for (const batch of batches) {
1161
+ this.#unlink();
1162
+ for (let batch = first_batch; batch !== null; batch = batch.#next) {
966
1163
  var is_earlier = batch.id < this.id;
967
1164
  var sources = [];
968
1165
  for (const [source3, [value, is_derived]] of this.current) {
@@ -979,18 +1176,55 @@ class Batch {
979
1176
  }
980
1177
  sources.push(source3);
981
1178
  }
1179
+ if (is_earlier) {
1180
+ for (const [effect, deferred2] of this.async_deriveds) {
1181
+ const d = batch.async_deriveds.get(effect);
1182
+ if (d) deferred2.promise.then(d.resolve);
1183
+ }
1184
+ }
1185
+ if (!batch.#started) continue;
982
1186
  var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
983
1187
  if (others.length === 0) {
984
1188
  if (is_earlier) {
985
1189
  batch.discard();
986
1190
  }
987
1191
  } else if (sources.length > 0) {
1192
+ if (is_earlier) {
1193
+ for (const unskipped of this.#unskipped_branches) {
1194
+ batch.unskip_effect(unskipped, (e) => {
1195
+ if ((e.f & (BLOCK_EFFECT | ASYNC)) !== 0) {
1196
+ batch.schedule(e);
1197
+ } else {
1198
+ batch.#defer_effects([e]);
1199
+ }
1200
+ });
1201
+ }
1202
+ }
988
1203
  batch.activate();
989
1204
  var marked = /* @__PURE__ */ new Set();
990
1205
  var checked = /* @__PURE__ */ new Map();
991
1206
  for (var source2 of sources) {
992
1207
  mark_effects(source2, others, marked, checked);
993
1208
  }
1209
+ checked = /* @__PURE__ */ new Map();
1210
+ var current_unequal = [...batch.current.keys()].filter(
1211
+ (c) => this.current.has(c) ? (
1212
+ /** @type {[any, boolean]} */
1213
+ this.current.get(c)[0] !== c.v
1214
+ ) : true
1215
+ );
1216
+ if (current_unequal.length > 0) {
1217
+ for (const effect of this.#new_effects) {
1218
+ if ((effect.f & (DESTROYED | INERT | EAGER_EFFECT)) === 0 && depends_on(effect, current_unequal, checked)) {
1219
+ if ((effect.f & (ASYNC | BLOCK_EFFECT)) !== 0) {
1220
+ set_signal_status(effect, DIRTY);
1221
+ batch.schedule(effect);
1222
+ } else {
1223
+ batch.#dirty_effects.add(effect);
1224
+ }
1225
+ }
1226
+ }
1227
+ }
994
1228
  if (batch.#roots.length > 0) {
995
1229
  batch.apply();
996
1230
  for (var root of batch.#roots) {
@@ -1001,23 +1235,13 @@ class Batch {
1001
1235
  batch.deactivate();
1002
1236
  }
1003
1237
  }
1004
- for (const batch of batches) {
1005
- if (batch.#blockers.has(this)) {
1006
- batch.#blockers.delete(this);
1007
- if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
1008
- batch.activate();
1009
- batch.#process();
1010
- }
1011
- }
1012
- }
1013
1238
  }
1014
1239
  /**
1015
1240
  * @param {boolean} blocking
1016
1241
  * @param {Effect} effect
1017
1242
  */
1018
1243
  increment(blocking, effect) {
1019
- let pending_count = this.#pending.get(effect) ?? 0;
1020
- this.#pending.set(effect, pending_count + 1);
1244
+ this.#pending += 1;
1021
1245
  if (blocking) {
1022
1246
  let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1023
1247
  this.#blocking_pending.set(effect, blocking_pending_count + 1);
@@ -1026,15 +1250,9 @@ class Batch {
1026
1250
  /**
1027
1251
  * @param {boolean} blocking
1028
1252
  * @param {Effect} effect
1029
- * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
1030
1253
  */
1031
- decrement(blocking, effect, skip) {
1032
- let pending_count = this.#pending.get(effect) ?? 0;
1033
- if (pending_count === 1) {
1034
- this.#pending.delete(effect);
1035
- } else {
1036
- this.#pending.set(effect, pending_count - 1);
1037
- }
1254
+ decrement(blocking, effect) {
1255
+ this.#pending -= 1;
1038
1256
  if (blocking) {
1039
1257
  let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1040
1258
  if (blocking_pending_count === 1) {
@@ -1043,11 +1261,13 @@ class Batch {
1043
1261
  this.#blocking_pending.set(effect, blocking_pending_count - 1);
1044
1262
  }
1045
1263
  }
1046
- if (this.#decrement_queued || skip) return;
1264
+ if (this.#decrement_queued) return;
1047
1265
  this.#decrement_queued = true;
1048
1266
  queue_micro_task(() => {
1049
1267
  this.#decrement_queued = false;
1050
- this.flush();
1268
+ if (this.linked) {
1269
+ this.flush();
1270
+ }
1051
1271
  });
1052
1272
  }
1053
1273
  /**
@@ -1072,22 +1292,27 @@ class Batch {
1072
1292
  ondiscard(fn) {
1073
1293
  this.#discard_callbacks.add(fn);
1074
1294
  }
1295
+ /** @param {(batch: Batch) => void} fn */
1296
+ on_fork_commit(fn) {
1297
+ this.#fork_commit_callbacks.add(fn);
1298
+ }
1299
+ run_fork_commit_callbacks() {
1300
+ for (const fn of this.#fork_commit_callbacks) fn(this);
1301
+ this.#fork_commit_callbacks.clear();
1302
+ }
1075
1303
  settled() {
1076
1304
  return (this.#deferred ??= deferred()).promise;
1077
1305
  }
1078
1306
  static ensure() {
1079
1307
  if (current_batch === null) {
1080
1308
  const batch = current_batch = new Batch();
1081
- if (!is_processing) {
1082
- batches.add(current_batch);
1083
- if (!is_flushing_sync) {
1084
- queue_micro_task(() => {
1085
- if (current_batch !== batch) {
1086
- return;
1087
- }
1309
+ batch.#link();
1310
+ if (!is_processing && !is_flushing_sync) {
1311
+ queue_micro_task(() => {
1312
+ if (!batch.#started) {
1088
1313
  batch.flush();
1089
- });
1090
- }
1314
+ }
1315
+ });
1091
1316
  }
1092
1317
  }
1093
1318
  return current_batch;
@@ -1126,6 +1351,30 @@ class Batch {
1126
1351
  }
1127
1352
  this.#roots.push(e);
1128
1353
  }
1354
+ #link() {
1355
+ if (last_batch === null) {
1356
+ first_batch = last_batch = this;
1357
+ } else {
1358
+ last_batch.#next = this;
1359
+ this.#prev = last_batch;
1360
+ }
1361
+ last_batch = this;
1362
+ }
1363
+ #unlink() {
1364
+ var prev = this.#prev;
1365
+ var next = this.#next;
1366
+ if (prev === null) {
1367
+ first_batch = next;
1368
+ } else {
1369
+ prev.#next = next;
1370
+ }
1371
+ if (next === null) {
1372
+ last_batch = prev;
1373
+ } else {
1374
+ next.#prev = prev;
1375
+ }
1376
+ this.linked = false;
1377
+ }
1129
1378
  }
1130
1379
  function flushSync(fn) {
1131
1380
  var was_flushing_sync = is_flushing_sync;
@@ -1281,23 +1530,15 @@ function destroy_derived_effects(derived2) {
1281
1530
  }
1282
1531
  }
1283
1532
  }
1284
- function get_derived_parent_effect(derived2) {
1285
- var parent = derived2.parent;
1286
- while (parent !== null) {
1287
- if ((parent.f & DERIVED) === 0) {
1288
- return (parent.f & DESTROYED) === 0 ? (
1289
- /** @type {Effect} */
1290
- parent
1291
- ) : null;
1292
- }
1293
- parent = parent.parent;
1294
- }
1295
- return null;
1296
- }
1297
1533
  function execute_derived(derived2) {
1298
1534
  var value;
1299
1535
  var prev_active_effect = active_effect;
1300
- set_active_effect(get_derived_parent_effect(derived2));
1536
+ var parent = derived2.parent;
1537
+ if (!is_destroying_effect && parent !== null && (parent.f & (DESTROYED | INERT)) !== 0) {
1538
+ derived_inert();
1539
+ return derived2.v;
1540
+ }
1541
+ set_active_effect(parent);
1301
1542
  {
1302
1543
  try {
1303
1544
  derived2.f &= ~WAS_MARKED;
@@ -1310,13 +1551,16 @@ function execute_derived(derived2) {
1310
1551
  return value;
1311
1552
  }
1312
1553
  function update_derived(derived2) {
1313
- var old_value = derived2.v;
1314
1554
  var value = execute_derived(derived2);
1315
1555
  if (!derived2.equals(value)) {
1316
1556
  derived2.wv = increment_write_version();
1317
1557
  if (!current_batch?.is_fork || derived2.deps === null) {
1318
- derived2.v = value;
1319
- current_batch?.capture(derived2, old_value, true);
1558
+ if (current_batch !== null) {
1559
+ current_batch.capture(derived2, value, true);
1560
+ previous_batch?.capture(derived2, value, true);
1561
+ } else {
1562
+ derived2.v = value;
1563
+ }
1320
1564
  if (derived2.deps === null) {
1321
1565
  set_signal_status(derived2, CLEAN);
1322
1566
  return;
@@ -1395,15 +1639,9 @@ function set(source2, value, should_proxy = false) {
1395
1639
  }
1396
1640
  function internal_set(source2, value, updated_during_traversal = null) {
1397
1641
  if (!source2.equals(value)) {
1398
- var old_value = source2.v;
1399
- if (is_destroying_effect) {
1400
- old_values.set(source2, value);
1401
- } else {
1402
- old_values.set(source2, old_value);
1403
- }
1404
- source2.v = value;
1642
+ old_values.set(source2, is_destroying_effect ? value : source2.v);
1405
1643
  var batch = Batch.ensure();
1406
- batch.capture(source2, old_value);
1644
+ batch.capture(source2, value);
1407
1645
  if ((source2.f & DERIVED) !== 0) {
1408
1646
  const derived2 = (
1409
1647
  /** @type {Derived} */
@@ -1437,7 +1675,13 @@ function flush_eager_effects() {
1437
1675
  if ((effect.f & CLEAN) !== 0) {
1438
1676
  set_signal_status(effect, MAYBE_DIRTY);
1439
1677
  }
1440
- if (is_dirty(effect)) {
1678
+ let dirty;
1679
+ try {
1680
+ dirty = is_dirty(effect);
1681
+ } catch {
1682
+ dirty = true;
1683
+ }
1684
+ if (dirty) {
1441
1685
  update_effect(effect);
1442
1686
  }
1443
1687
  }
@@ -1457,14 +1701,19 @@ function mark_reactions(signal, status, updated_during_traversal) {
1457
1701
  if (not_dirty) {
1458
1702
  set_signal_status(reaction, status);
1459
1703
  }
1460
- if ((flags & DERIVED) !== 0) {
1704
+ if ((flags & EAGER_EFFECT) !== 0) {
1705
+ eager_effects.add(
1706
+ /** @type {Effect} */
1707
+ reaction
1708
+ );
1709
+ } else if ((flags & DERIVED) !== 0) {
1461
1710
  var derived2 = (
1462
1711
  /** @type {Derived} */
1463
1712
  reaction
1464
1713
  );
1465
1714
  batch_values?.delete(derived2);
1466
1715
  if ((flags & WAS_MARKED) === 0) {
1467
- if (flags & CONNECTED) {
1716
+ if (flags & CONNECTED && (active_effect === null || (active_effect.f & REACTION_IS_UPDATING) === 0)) {
1468
1717
  reaction.f |= WAS_MARKED;
1469
1718
  }
1470
1719
  mark_reactions(derived2, MAYBE_DIRTY, updated_during_traversal);
@@ -1689,14 +1938,13 @@ function init_operations() {
1689
1938
  first_child_getter = get_descriptor(node_prototype, "firstChild").get;
1690
1939
  next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
1691
1940
  if (is_extensible(element_prototype)) {
1692
- element_prototype.__click = void 0;
1693
- element_prototype.__className = void 0;
1694
- element_prototype.__attributes = null;
1695
- element_prototype.__style = void 0;
1941
+ element_prototype[CLASS_CACHE] = void 0;
1942
+ element_prototype[ATTRIBUTES_CACHE] = null;
1943
+ element_prototype[STYLE_CACHE] = void 0;
1696
1944
  element_prototype.__e = void 0;
1697
1945
  }
1698
1946
  if (is_extensible(text_prototype)) {
1699
- text_prototype.__t = void 0;
1947
+ text_prototype[TEXT_CACHE] = void 0;
1700
1948
  }
1701
1949
  }
1702
1950
  function create_text(value = "") {
@@ -1762,6 +2010,7 @@ function create_effect(type, fn) {
1762
2010
  wv: 0,
1763
2011
  ac: null
1764
2012
  };
2013
+ current_batch?.register_created_effect(effect);
1765
2014
  var e = effect;
1766
2015
  if ((type & EFFECT) !== 0) {
1767
2016
  if (collected_effects !== null) {
@@ -1953,11 +2202,13 @@ function pause_children(effect, transitions, local) {
1953
2202
  var child = effect.first;
1954
2203
  while (child !== null) {
1955
2204
  var sibling = child.next;
1956
- var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || // If this is a branch effect without a block effect parent,
1957
- // it means the parent block effect was pruned. In that case,
1958
- // transparency information was transferred to the branch effect.
1959
- (child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0;
1960
- pause_children(child, transitions, transparent ? local : false);
2205
+ if ((child.f & ROOT_EFFECT) === 0) {
2206
+ var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || // If this is a branch effect without a block effect parent,
2207
+ // it means the parent block effect was pruned. In that case,
2208
+ // transparency information was transferred to the branch effect.
2209
+ (child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0;
2210
+ pause_children(child, transitions, transparent ? local : false);
2211
+ }
1961
2212
  child = sibling;
1962
2213
  }
1963
2214
  }
@@ -2207,7 +2458,9 @@ function remove_reaction(signal, dependency) {
2207
2458
  derived2.f ^= CONNECTED;
2208
2459
  derived2.f &= ~WAS_MARKED;
2209
2460
  }
2210
- update_derived_status(derived2);
2461
+ if (derived2.v !== UNINITIALIZED) {
2462
+ update_derived_status(derived2);
2463
+ }
2211
2464
  freeze_derived_effects(derived2);
2212
2465
  remove_reactions(derived2, 0);
2213
2466
  }
@@ -2597,6 +2850,13 @@ https://svelte.dev/e/invalid_csp`);
2597
2850
  error.name = "Svelte error";
2598
2851
  throw error;
2599
2852
  }
2853
+ function invalid_id_prefix() {
2854
+ const error = new Error(`invalid_id_prefix
2855
+ The \`idPrefix\` option cannot include \`--\`.
2856
+ https://svelte.dev/e/invalid_id_prefix`);
2857
+ error.name = "Svelte error";
2858
+ throw error;
2859
+ }
2600
2860
  function server_context_required() {
2601
2861
  const error = new Error(`server_context_required
2602
2862
  Could not resolve \`render\` context.
@@ -3039,9 +3299,11 @@ class Renderer {
3039
3299
  );
3040
3300
  }
3041
3301
  this.local = other.local;
3042
- this.#out = other.#out.map((item) => {
3043
- if (item instanceof Renderer) {
3044
- item.subsume(item);
3302
+ this.#out = other.#out.map((item, i) => {
3303
+ const current = this.#out[i];
3304
+ if (current instanceof Renderer && item instanceof Renderer) {
3305
+ current.subsume(item);
3306
+ return current;
3045
3307
  }
3046
3308
  return item;
3047
3309
  });
@@ -3246,7 +3508,10 @@ class Renderer {
3246
3508
  } catch (error) {
3247
3509
  const { context, failed, transformError } = item.#boundary;
3248
3510
  set_ssr_context(context);
3249
- let transformed = await transformError(error);
3511
+ let promise = transformError(error);
3512
+ set_ssr_context(null);
3513
+ let transformed = await promise;
3514
+ set_ssr_context(context);
3250
3515
  const failed_renderer = new Renderer(item.global, item);
3251
3516
  failed_renderer.type = item.type;
3252
3517
  failed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed));
@@ -3279,6 +3544,9 @@ class Renderer {
3279
3544
  * @returns {Renderer}
3280
3545
  */
3281
3546
  static #open_render(mode, component, options) {
3547
+ if (options.idPrefix?.includes("--")) {
3548
+ invalid_id_prefix();
3549
+ }
3282
3550
  var previous_context = ssr_context;
3283
3551
  try {
3284
3552
  const renderer = new Renderer(
@@ -3453,7 +3721,7 @@ function attributes(attrs, css_hash, classes, styles, flags = 0) {
3453
3721
  for (name of Object.keys(attrs)) {
3454
3722
  if (typeof attrs[name] === "function") continue;
3455
3723
  if (name[0] === "$" && name[1] === "$") continue;
3456
- if (INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
3724
+ if (name === "" || INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
3457
3725
  var value = attrs[name];
3458
3726
  var lower = name.toLowerCase();
3459
3727
  if (lowercase) name = lower;
@@ -3554,5 +3822,5 @@ function derived(fn) {
3554
3822
  };
3555
3823
  }
3556
3824
 
3557
- export { handle_error as $, get_next_sibling as A, HYDRATION_ERROR as B, COMMENT_NODE as C, DevalueError as D, hydration_failed as E, clear_text_content as F, component_root as G, HYDRATION_START as H, create_text as I, array_from as J, is_passive_event as K, LEGACY_PROPS as L, set_active_reaction as M, set_active_effect as N, active_reaction as O, active_effect as P, setContext as Q, BOUNDARY_EFFECT as R, block as S, branch as T, queue_micro_task as U, pause_effect as V, current_batch as W, move_effect as X, defer_effect as Y, set_component_context as Z, Batch as _, is_plain_object as a, component_context as a0, internal_set as a1, destroy_effect as a2, invoke_error_boundary as a3, effect_tracking as a4, render_effect as a5, HYDRATION_END as a6, HYDRATION_START_ELSE as a7, svelte_boundary_reset_onerror as a8, source as a9, untrack as aa, increment as ab, HYDRATION_START_FAILED as ac, push$1 as ad, pop$1 as ae, EFFECT_TRANSPARENT as af, EFFECT_PRESERVED as ag, noop as ah, safe_not_equal as ai, attr as aj, bind_props as ak, spread_props as al, ssr_context as am, attr_style as an, clsx as ao, stringify_string as b, browser as c, stringify as d, enumerable_symbols as e, store_get as f, get_type as g, attr_class as h, is_primitive as i, unsubscribe_stores as j, head as k, escape_html as l, getContext as m, derived as n, ensure_array_like as o, set as p, get as q, render as r, stringify_key as s, flushSync as t, uneval as u, valid_array_indices as v, define_property as w, mutable_source as x, init_operations as y, get_first_child as z };
3558
- //# sourceMappingURL=index-BHoOpAe1.js.map
3825
+ export { setContext as $, define_property as A, mutable_source as B, init_operations as C, DevalueError as D, get_first_child as E, COMMENT_NODE as F, HYDRATION_START as G, HOLE as H, get_next_sibling as I, HYDRATION_ERROR as J, hydration_failed as K, LEGACY_PROPS as L, MAX_ARRAY_INDEX as M, NAN as N, clear_text_content as O, POSITIVE_INFINITY as P, hydration_mismatch as Q, component_root as R, SPARSE as S, create_text as T, UNDEFINED as U, array_from as V, is_passive_event as W, set_active_reaction as X, set_active_effect as Y, active_reaction as Z, active_effect as _, NEGATIVE_INFINITY as a, BOUNDARY_EFFECT as a0, block as a1, branch as a2, queue_micro_task as a3, pause_effect as a4, current_batch as a5, move_effect as a6, defer_effect as a7, set_component_context as a8, Batch as a9, clsx as aA, handle_error as aa, component_context as ab, internal_set as ac, destroy_effect as ad, invoke_error_boundary as ae, effect_tracking as af, render_effect as ag, HYDRATION_END as ah, HYDRATION_START_ELSE as ai, svelte_boundary_reset_onerror as aj, source as ak, untrack as al, increment as am, HYDRATION_START_FAILED as an, svelte_boundary_reset_noop as ao, push$1 as ap, pop$1 as aq, EFFECT_TRANSPARENT as ar, EFFECT_PRESERVED as as, noop as at, safe_not_equal as au, attr as av, bind_props as aw, spread_props as ax, ssr_context as ay, attr_style as az, NEGATIVE_ZERO as b, is_valid_array_index as c, is_primitive as d, is_plain_object as e, enumerable_symbols as f, get_type as g, stringify_string as h, is_valid_array_len as i, browser as j, stringify as k, store_get as l, attr_class as m, unsubscribe_stores as n, head as o, escape_html as p, getContext as q, derived as r, stringify_key as s, ensure_array_like as t, uneval as u, valid_array_indices as v, render as w, set as x, get as y, flushSync as z };
3826
+ //# sourceMappingURL=index-DMikC9Qy.js.map