@better-svelte-email/preview-server 2.1.3 → 2.2.0

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 (506) hide show
  1. package/build/client/_app/immutable/chunks/{BzltqjU8.js → -zmNDWiK.js} +1 -1
  2. package/build/client/_app/immutable/chunks/-zmNDWiK.js.br +0 -0
  3. package/build/client/_app/immutable/chunks/-zmNDWiK.js.gz +0 -0
  4. package/build/client/_app/immutable/chunks/{GPf5fMLC2.js → 0nhrQ1lI2.js} +1 -1
  5. package/build/client/_app/immutable/chunks/0nhrQ1lI2.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/0nhrQ1lI2.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/{BHIi3qVr2.js → 13-zcMcL2.js} +1 -1
  8. package/build/client/_app/immutable/chunks/13-zcMcL2.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/13-zcMcL2.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/{CogqGmtf2.js → 2MieKtHj2.js} +1 -1
  11. package/build/client/_app/immutable/chunks/2MieKtHj2.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/2MieKtHj2.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{pk7CcyRt2.js → 4Et-fZuz2.js} +1 -1
  14. package/build/client/_app/immutable/chunks/4Et-fZuz2.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/4Et-fZuz2.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/{sDfmG-q52.js → 4ZbjVoiO2.js} +1 -1
  17. package/build/client/_app/immutable/chunks/4ZbjVoiO2.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/4ZbjVoiO2.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/{CsCG9XlY2.js → 8Q-NQKe02.js} +1 -1
  20. package/build/client/_app/immutable/chunks/8Q-NQKe02.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/8Q-NQKe02.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/{DaM5BcfV.js → B3OW8jzr.js} +1 -1
  23. package/build/client/_app/immutable/chunks/B3OW8jzr.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/B3OW8jzr.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/BEvJij71.js +1 -0
  26. package/build/client/_app/immutable/chunks/BEvJij71.js.br +1 -0
  27. package/build/client/_app/immutable/chunks/BEvJij71.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/{Bf_OO4m5.js → BMZyeqAe.js} +1 -1
  29. package/build/client/_app/immutable/chunks/BMZyeqAe.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/BMZyeqAe.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/{CyOMC1H12.js → BMda5uUP2.js} +1 -1
  32. package/build/client/_app/immutable/chunks/BMda5uUP2.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/BMda5uUP2.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/{b4xeCETc.js → BPVbnECt.js} +1 -1
  35. package/build/client/_app/immutable/chunks/BPVbnECt.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/BPVbnECt.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/{Dtv7UOty2.js → BRQFqPwU2.js} +1 -1
  38. package/build/client/_app/immutable/chunks/BRQFqPwU2.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/BRQFqPwU2.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/{CJy9scTx2.js → BTE6_myI2.js} +1 -1
  41. package/build/client/_app/immutable/chunks/BTE6_myI2.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/BTE6_myI2.js.gz +0 -0
  43. package/build/client/_app/immutable/chunks/{DRtTh9R_.js → BUS8rUeV.js} +1 -1
  44. package/build/client/_app/immutable/chunks/BUS8rUeV.js.br +0 -0
  45. package/build/client/_app/immutable/chunks/BUS8rUeV.js.gz +0 -0
  46. package/build/client/_app/immutable/chunks/{BLb6t9Lh.js → BXjDaEwA.js} +1 -1
  47. package/build/client/_app/immutable/chunks/BXjDaEwA.js.br +0 -0
  48. package/build/client/_app/immutable/chunks/BXjDaEwA.js.gz +0 -0
  49. package/build/client/_app/immutable/chunks/{D8mc0qWB.js → BgXOYHyH.js} +1 -1
  50. package/build/client/_app/immutable/chunks/BgXOYHyH.js.br +0 -0
  51. package/build/client/_app/immutable/chunks/BgXOYHyH.js.gz +0 -0
  52. package/build/client/_app/immutable/chunks/{DatEshCS.js → BoP3ZIjj.js} +1 -1
  53. package/build/client/_app/immutable/chunks/BoP3ZIjj.js.br +0 -0
  54. package/build/client/_app/immutable/chunks/BoP3ZIjj.js.gz +0 -0
  55. package/build/client/_app/immutable/chunks/{CLbN30Ww2.js → Bq9vyKXU2.js} +1 -1
  56. package/build/client/_app/immutable/chunks/Bq9vyKXU2.js.br +0 -0
  57. package/build/client/_app/immutable/chunks/Bq9vyKXU2.js.gz +0 -0
  58. package/build/client/_app/immutable/chunks/{MfeErNn-.js → BsxVhP78.js} +1 -1
  59. package/build/client/_app/immutable/chunks/BsxVhP78.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/BsxVhP78.js.gz +0 -0
  61. package/build/client/_app/immutable/chunks/{BLs_XbWi2.js → BzqSJT3G2.js} +1 -1
  62. package/build/client/_app/immutable/chunks/BzqSJT3G2.js.br +0 -0
  63. package/build/client/_app/immutable/chunks/BzqSJT3G2.js.gz +0 -0
  64. package/build/client/_app/immutable/chunks/{Dtn6NLbI.js → C-11nlsK.js} +1 -1
  65. package/build/client/_app/immutable/chunks/C-11nlsK.js.br +0 -0
  66. package/build/client/_app/immutable/chunks/C-11nlsK.js.gz +0 -0
  67. package/build/client/_app/immutable/chunks/{Dbkyqgda2.js → C1YEx5K52.js} +1 -1
  68. package/build/client/_app/immutable/chunks/C1YEx5K52.js.br +0 -0
  69. package/build/client/_app/immutable/chunks/C1YEx5K52.js.gz +0 -0
  70. package/build/client/_app/immutable/chunks/{D8y1tx0e2.js → C4NOgEC42.js} +1 -1
  71. package/build/client/_app/immutable/chunks/C4NOgEC42.js.br +0 -0
  72. package/build/client/_app/immutable/chunks/C4NOgEC42.js.gz +0 -0
  73. package/build/client/_app/immutable/chunks/{2pZ28JA1.js → CC8pn3NZ.js} +1 -1
  74. package/build/client/_app/immutable/chunks/CC8pn3NZ.js.br +0 -0
  75. package/build/client/_app/immutable/chunks/CC8pn3NZ.js.gz +0 -0
  76. package/build/client/_app/immutable/chunks/{DIA3aJp6.js → CFnFEeY2.js} +1 -1
  77. package/build/client/_app/immutable/chunks/CFnFEeY2.js.br +0 -0
  78. package/build/client/_app/immutable/chunks/CFnFEeY2.js.gz +0 -0
  79. package/build/client/_app/immutable/chunks/{BCyR5SPb.js → CRbQg6uw.js} +1 -1
  80. package/build/client/_app/immutable/chunks/CRbQg6uw.js.br +0 -0
  81. package/build/client/_app/immutable/chunks/CRbQg6uw.js.gz +0 -0
  82. package/build/client/_app/immutable/chunks/CTQibyhI.js +24 -0
  83. package/build/client/_app/immutable/chunks/CTQibyhI.js.br +0 -0
  84. package/build/client/_app/immutable/chunks/CTQibyhI.js.gz +0 -0
  85. package/build/client/_app/immutable/chunks/{AoC3-GXO2.js → CXz1wjEO2.js} +1 -1
  86. package/build/client/_app/immutable/chunks/CXz1wjEO2.js.br +0 -0
  87. package/build/client/_app/immutable/chunks/CXz1wjEO2.js.gz +0 -0
  88. package/build/client/_app/immutable/chunks/{D8qrblp8.js → CYch3rwW.js} +1 -1
  89. package/build/client/_app/immutable/chunks/CYch3rwW.js.br +0 -0
  90. package/build/client/_app/immutable/chunks/CYch3rwW.js.gz +0 -0
  91. package/build/client/_app/immutable/chunks/CZIGq9KL.js +3 -0
  92. package/build/client/_app/immutable/chunks/CZIGq9KL.js.br +0 -0
  93. package/build/client/_app/immutable/chunks/CZIGq9KL.js.gz +0 -0
  94. package/build/client/_app/immutable/chunks/{DHhcNfbx.js → CZSUQC6s.js} +1 -1
  95. package/build/client/_app/immutable/chunks/CZSUQC6s.js.br +0 -0
  96. package/build/client/_app/immutable/chunks/CZSUQC6s.js.gz +0 -0
  97. package/build/client/_app/immutable/chunks/{DXvs48Yn.js → C_VjiH2S.js} +1 -1
  98. package/build/client/_app/immutable/chunks/C_VjiH2S.js.br +0 -0
  99. package/build/client/_app/immutable/chunks/C_VjiH2S.js.gz +0 -0
  100. package/build/client/_app/immutable/chunks/CbXvFmL8.js +2 -0
  101. package/build/client/_app/immutable/chunks/CbXvFmL8.js.br +0 -0
  102. package/build/client/_app/immutable/chunks/CbXvFmL8.js.gz +0 -0
  103. package/build/client/_app/immutable/chunks/{C_ew8g7J2.js → CdYiZtb-2.js} +1 -1
  104. package/build/client/_app/immutable/chunks/CdYiZtb-2.js.br +0 -0
  105. package/build/client/_app/immutable/chunks/CdYiZtb-2.js.gz +0 -0
  106. package/build/client/_app/immutable/chunks/{CmhtYr-H.js → Cf-MySyP.js} +1 -1
  107. package/build/client/_app/immutable/chunks/Cf-MySyP.js.br +0 -0
  108. package/build/client/_app/immutable/chunks/Cf-MySyP.js.gz +0 -0
  109. package/build/client/_app/immutable/chunks/{BPpVW1t9.js → CgWnF1ld.js} +1 -1
  110. package/build/client/_app/immutable/chunks/CgWnF1ld.js.br +0 -0
  111. package/build/client/_app/immutable/chunks/CgWnF1ld.js.gz +0 -0
  112. package/build/client/_app/immutable/chunks/Cjv9mauX.js +29 -0
  113. package/build/client/_app/immutable/chunks/Cjv9mauX.js.br +0 -0
  114. package/build/client/_app/immutable/chunks/Cjv9mauX.js.gz +0 -0
  115. package/build/client/_app/immutable/chunks/{B92yCKkz2.js → Ck_y1oMD2.js} +1 -1
  116. package/build/client/_app/immutable/chunks/Ck_y1oMD2.js.br +0 -0
  117. package/build/client/_app/immutable/chunks/Ck_y1oMD2.js.gz +0 -0
  118. package/build/client/_app/immutable/chunks/{DqNF_brF2.js → CtlRemE32.js} +1 -1
  119. package/build/client/_app/immutable/chunks/CtlRemE32.js.br +0 -0
  120. package/build/client/_app/immutable/chunks/CtlRemE32.js.gz +0 -0
  121. package/build/client/_app/immutable/chunks/{C3eVgNwp2.js → CujlemUM2.js} +1 -1
  122. package/build/client/_app/immutable/chunks/CujlemUM2.js.br +0 -0
  123. package/build/client/_app/immutable/chunks/CujlemUM2.js.gz +0 -0
  124. package/build/client/_app/immutable/chunks/{BO_NcNPW.js → CuuFrnnj.js} +1 -1
  125. package/build/client/_app/immutable/chunks/CuuFrnnj.js.br +0 -0
  126. package/build/client/_app/immutable/chunks/CuuFrnnj.js.gz +0 -0
  127. package/build/client/_app/immutable/chunks/{Cc8H0qaz.js → CwS0E2RE.js} +1 -1
  128. package/build/client/_app/immutable/chunks/CwS0E2RE.js.br +0 -0
  129. package/build/client/_app/immutable/chunks/CwS0E2RE.js.gz +0 -0
  130. package/build/client/_app/immutable/chunks/{CjRP0NjD2.js → D6g3LM2c2.js} +1 -1
  131. package/build/client/_app/immutable/chunks/D6g3LM2c2.js.br +0 -0
  132. package/build/client/_app/immutable/chunks/D6g3LM2c2.js.gz +0 -0
  133. package/build/client/_app/immutable/chunks/{DlX1gWpk.js → D6rb1NFY.js} +1 -1
  134. package/build/client/_app/immutable/chunks/D6rb1NFY.js.br +0 -0
  135. package/build/client/_app/immutable/chunks/D6rb1NFY.js.gz +0 -0
  136. package/build/client/_app/immutable/chunks/{CJteGSc7.js → D7ZBkzjz.js} +1 -1
  137. package/build/client/_app/immutable/chunks/D7ZBkzjz.js.br +0 -0
  138. package/build/client/_app/immutable/chunks/D7ZBkzjz.js.gz +0 -0
  139. package/build/client/_app/immutable/chunks/{B1eC0VY6.js → D82K7ltp.js} +1 -1
  140. package/build/client/_app/immutable/chunks/D82K7ltp.js.br +0 -0
  141. package/build/client/_app/immutable/chunks/D82K7ltp.js.gz +0 -0
  142. package/build/client/_app/immutable/chunks/{b1-zR7XP.js → DAoG-c2U.js} +1 -1
  143. package/build/client/_app/immutable/chunks/DAoG-c2U.js.br +0 -0
  144. package/build/client/_app/immutable/chunks/DAoG-c2U.js.gz +0 -0
  145. package/build/client/_app/immutable/chunks/{V5Yjt9wD2.js → DEyD5ozc2.js} +1 -1
  146. package/build/client/_app/immutable/chunks/DEyD5ozc2.js.br +0 -0
  147. package/build/client/_app/immutable/chunks/DEyD5ozc2.js.gz +0 -0
  148. package/build/client/_app/immutable/chunks/{B3OdPoN_.js → DFai7nk7.js} +1 -1
  149. package/build/client/_app/immutable/chunks/DFai7nk7.js.br +0 -0
  150. package/build/client/_app/immutable/chunks/DFai7nk7.js.gz +0 -0
  151. package/build/client/_app/immutable/chunks/{BuyVToAU.js → DLALkM19.js} +1 -1
  152. package/build/client/_app/immutable/chunks/DLALkM19.js.br +0 -0
  153. package/build/client/_app/immutable/chunks/DLALkM19.js.gz +0 -0
  154. package/build/client/_app/immutable/chunks/{D_kqbw5z.js → DLQ1jY3Q.js} +1 -1
  155. package/build/client/_app/immutable/chunks/DLQ1jY3Q.js.br +0 -0
  156. package/build/client/_app/immutable/chunks/DLQ1jY3Q.js.gz +0 -0
  157. package/build/client/_app/immutable/chunks/{DPeYfO_X.js → DNsv-6KV.js} +1 -1
  158. package/build/client/_app/immutable/chunks/DNsv-6KV.js.br +0 -0
  159. package/build/client/_app/immutable/chunks/DNsv-6KV.js.gz +0 -0
  160. package/build/client/_app/immutable/chunks/{D2hLgkL3.js → DQb0txHr.js} +1 -1
  161. package/build/client/_app/immutable/chunks/DQb0txHr.js.br +0 -0
  162. package/build/client/_app/immutable/chunks/DQb0txHr.js.gz +0 -0
  163. package/build/client/_app/immutable/chunks/{DJARFHrx.js → DRtQzejv.js} +1 -1
  164. package/build/client/_app/immutable/chunks/DRtQzejv.js.br +0 -0
  165. package/build/client/_app/immutable/chunks/DRtQzejv.js.gz +0 -0
  166. package/build/client/_app/immutable/chunks/{PMQDBV5J.js → DUSk5caH.js} +1 -1
  167. package/build/client/_app/immutable/chunks/DUSk5caH.js.br +0 -0
  168. package/build/client/_app/immutable/chunks/DUSk5caH.js.gz +0 -0
  169. package/build/client/_app/immutable/chunks/{DNvRKwb02.js → DUnHXTD32.js} +1 -1
  170. package/build/client/_app/immutable/chunks/DUnHXTD32.js.br +0 -0
  171. package/build/client/_app/immutable/chunks/DUnHXTD32.js.gz +0 -0
  172. package/build/client/_app/immutable/chunks/{C5bbMRzS.js → DVRIdhsZ.js} +1 -1
  173. package/build/client/_app/immutable/chunks/DVRIdhsZ.js.br +0 -0
  174. package/build/client/_app/immutable/chunks/DVRIdhsZ.js.gz +0 -0
  175. package/build/client/_app/immutable/chunks/{KNb_0kK5.js → DWSoargy.js} +1 -1
  176. package/build/client/_app/immutable/chunks/DWSoargy.js.br +0 -0
  177. package/build/client/_app/immutable/chunks/DWSoargy.js.gz +0 -0
  178. package/build/client/_app/immutable/chunks/{i9_wZDsL2.js → DXKtLEqt2.js} +1 -1
  179. package/build/client/_app/immutable/chunks/DXKtLEqt2.js.br +0 -0
  180. package/build/client/_app/immutable/chunks/DXKtLEqt2.js.gz +0 -0
  181. package/build/client/_app/immutable/chunks/{Cx4VUS55.js → DXRUTNo3.js} +1 -1
  182. package/build/client/_app/immutable/chunks/DXRUTNo3.js.br +0 -0
  183. package/build/client/_app/immutable/chunks/DXRUTNo3.js.gz +0 -0
  184. package/build/client/_app/immutable/chunks/{OOMz51rW.js → DdYvdtOm.js} +1 -1
  185. package/build/client/_app/immutable/chunks/DdYvdtOm.js.br +0 -0
  186. package/build/client/_app/immutable/chunks/DdYvdtOm.js.gz +0 -0
  187. package/build/client/_app/immutable/chunks/{o5QeSYPS2.js → DeAN7OF52.js} +1 -1
  188. package/build/client/_app/immutable/chunks/DeAN7OF52.js.br +0 -0
  189. package/build/client/_app/immutable/chunks/DeAN7OF52.js.gz +0 -0
  190. package/build/client/_app/immutable/chunks/{C4aeQxkf2.js → DfWQkxcR2.js} +1 -1
  191. package/build/client/_app/immutable/chunks/DfWQkxcR2.js.br +0 -0
  192. package/build/client/_app/immutable/chunks/DfWQkxcR2.js.gz +0 -0
  193. package/build/client/_app/immutable/chunks/{BL4DOeuO.js → DnRTvscr.js} +1 -1
  194. package/build/client/_app/immutable/chunks/DnRTvscr.js.br +0 -0
  195. package/build/client/_app/immutable/chunks/DnRTvscr.js.gz +0 -0
  196. package/build/client/_app/immutable/chunks/{DeSyfjfB.js → DopI_Aro.js} +1 -1
  197. package/build/client/_app/immutable/chunks/DopI_Aro.js.br +0 -0
  198. package/build/client/_app/immutable/chunks/DopI_Aro.js.gz +0 -0
  199. package/build/client/_app/immutable/chunks/{CWbY0LAI.js → DwrAFPpy.js} +1 -1
  200. package/build/client/_app/immutable/chunks/DwrAFPpy.js.br +0 -0
  201. package/build/client/_app/immutable/chunks/DwrAFPpy.js.gz +0 -0
  202. package/build/client/_app/immutable/chunks/{C2tE-Xb62.js → H0INDQMU2.js} +1 -1
  203. package/build/client/_app/immutable/chunks/H0INDQMU2.js.br +0 -0
  204. package/build/client/_app/immutable/chunks/H0INDQMU2.js.gz +0 -0
  205. package/build/client/_app/immutable/chunks/{DJoGK9kf.js → MFBwMmQQ.js} +1 -1
  206. package/build/client/_app/immutable/chunks/MFBwMmQQ.js.br +0 -0
  207. package/build/client/_app/immutable/chunks/MFBwMmQQ.js.gz +0 -0
  208. package/build/client/_app/immutable/chunks/{DET9eGgo.js → Ply3gfWB.js} +1 -1
  209. package/build/client/_app/immutable/chunks/Ply3gfWB.js.br +0 -0
  210. package/build/client/_app/immutable/chunks/Ply3gfWB.js.gz +0 -0
  211. package/build/client/_app/immutable/chunks/{CDG3PAdG.js → ToV1T_TV.js} +1 -1
  212. package/build/client/_app/immutable/chunks/ToV1T_TV.js.br +0 -0
  213. package/build/client/_app/immutable/chunks/ToV1T_TV.js.gz +0 -0
  214. package/build/client/_app/immutable/chunks/{CVhNsCIr.js → Y25eRjiK.js} +1 -1
  215. package/build/client/_app/immutable/chunks/Y25eRjiK.js.br +0 -0
  216. package/build/client/_app/immutable/chunks/Y25eRjiK.js.gz +0 -0
  217. package/build/client/_app/immutable/chunks/{XT7mgm2-.js → YdMASkWP.js} +1 -1
  218. package/build/client/_app/immutable/chunks/YdMASkWP.js.br +0 -0
  219. package/build/client/_app/immutable/chunks/YdMASkWP.js.gz +0 -0
  220. package/build/client/_app/immutable/chunks/{DmoyGeAS2.js → gm_N5lMW2.js} +1 -1
  221. package/build/client/_app/immutable/chunks/gm_N5lMW2.js.br +0 -0
  222. package/build/client/_app/immutable/chunks/gm_N5lMW2.js.gz +0 -0
  223. package/build/client/_app/immutable/chunks/{fhodw31A2.js → kCJGRPZn2.js} +1 -1
  224. package/build/client/_app/immutable/chunks/kCJGRPZn2.js.br +0 -0
  225. package/build/client/_app/immutable/chunks/kCJGRPZn2.js.gz +0 -0
  226. package/build/client/_app/immutable/chunks/{B0iNQslz.js → lH39YlJ5.js} +1 -1
  227. package/build/client/_app/immutable/chunks/lH39YlJ5.js.br +0 -0
  228. package/build/client/_app/immutable/chunks/lH39YlJ5.js.gz +0 -0
  229. package/build/client/_app/immutable/chunks/{QtN_jOZp.js → sbUxT0qP.js} +1 -1
  230. package/build/client/_app/immutable/chunks/sbUxT0qP.js.br +0 -0
  231. package/build/client/_app/immutable/chunks/sbUxT0qP.js.gz +0 -0
  232. package/build/client/_app/immutable/chunks/{Dgfk8zCU.js → uMGAhrQH.js} +1 -1
  233. package/build/client/_app/immutable/chunks/uMGAhrQH.js.br +0 -0
  234. package/build/client/_app/immutable/chunks/uMGAhrQH.js.gz +0 -0
  235. package/build/client/_app/immutable/chunks/{cM1P9coc.js → vw_ri9HA.js} +1 -1
  236. package/build/client/_app/immutable/chunks/vw_ri9HA.js.br +0 -0
  237. package/build/client/_app/immutable/chunks/vw_ri9HA.js.gz +0 -0
  238. package/build/client/_app/immutable/chunks/{B4nfriop.js → zsdBiTN_.js} +1 -1
  239. package/build/client/_app/immutable/chunks/zsdBiTN_.js.br +0 -0
  240. package/build/client/_app/immutable/chunks/zsdBiTN_.js.gz +0 -0
  241. package/build/client/_app/immutable/entry/app.BRpXmNDO.js +2 -0
  242. package/build/client/_app/immutable/entry/app.BRpXmNDO.js.br +0 -0
  243. package/build/client/_app/immutable/entry/app.BRpXmNDO.js.gz +0 -0
  244. package/build/client/_app/immutable/entry/start.DwmeLwoP.js +1 -0
  245. package/build/client/_app/immutable/entry/start.DwmeLwoP.js.br +0 -0
  246. package/build/client/_app/immutable/entry/start.DwmeLwoP.js.gz +0 -0
  247. package/build/client/_app/immutable/nodes/0.DE4cH2YD.js +1 -0
  248. package/build/client/_app/immutable/nodes/0.DE4cH2YD.js.br +0 -0
  249. package/build/client/_app/immutable/nodes/0.DE4cH2YD.js.gz +0 -0
  250. package/build/client/_app/immutable/nodes/1.4lGVEmaM.js +1 -0
  251. package/build/client/_app/immutable/nodes/1.4lGVEmaM.js.br +0 -0
  252. package/build/client/_app/immutable/nodes/1.4lGVEmaM.js.gz +0 -0
  253. package/build/client/_app/immutable/nodes/2.CwMTyEBD.js +1 -0
  254. package/build/client/_app/immutable/nodes/2.CwMTyEBD.js.br +0 -0
  255. package/build/client/_app/immutable/nodes/2.CwMTyEBD.js.gz +0 -0
  256. package/build/client/_app/immutable/nodes/3.CwMTyEBD.js +1 -0
  257. package/build/client/_app/immutable/nodes/3.CwMTyEBD.js.br +0 -0
  258. package/build/client/_app/immutable/nodes/3.CwMTyEBD.js.gz +0 -0
  259. package/build/client/_app/version.json +1 -1
  260. package/build/client/_app/version.json.br +0 -0
  261. package/build/client/_app/version.json.gz +0 -0
  262. package/build/handler.js +9 -9
  263. package/build/index.js +9 -9
  264. package/build/server/chunks/chunks/{client.js-tu1i9JSN.js → client.js-BpUHQO7i.js} +5 -5
  265. package/build/server/chunks/chunks/client.js-BpUHQO7i.js.map +1 -0
  266. package/build/server/chunks/chunks/{dist.js-BLAtjEg2.js → dist.js-BsI2byNy.js} +8 -8
  267. package/build/server/chunks/chunks/dist.js-BsI2byNy.js.map +1 -0
  268. package/build/server/chunks/chunks/{exports.js-B4EFw4Ji.js → exports.js-DcikzMRR.js} +8 -8
  269. package/build/server/chunks/chunks/{exports.js-B4EFw4Ji.js.map → exports.js-DcikzMRR.js.map} +1 -1
  270. package/build/server/chunks/chunks/{internal.js-B7HEnRRn.js → internal.js-D20lTOcu.js} +1433 -1278
  271. package/build/server/chunks/chunks/internal.js-D20lTOcu.js.map +1 -0
  272. package/build/server/chunks/chunks/{internal2.js-Bkb6J7OW.js → internal2.js-MPgbkD6r.js} +2 -2
  273. package/build/server/chunks/chunks/{internal2.js-Bkb6J7OW.js.map → internal2.js-MPgbkD6r.js.map} +1 -1
  274. package/build/server/chunks/chunks/{preview-api.js-DFLf7Qia.js → preview-api.js-DupQw5lu.js} +2 -2
  275. package/build/server/chunks/chunks/{preview-api.js-DFLf7Qia.js.map → preview-api.js-DupQw5lu.js.map} +1 -1
  276. package/build/server/chunks/chunks/{preview-workbench.js-D-KCnrMA.js → preview-workbench.js-FFkxz5kp.js} +219 -263
  277. package/build/server/chunks/chunks/preview-workbench.js-FFkxz5kp.js.map +1 -0
  278. package/build/server/chunks/chunks/{shared-server.js-X-h81DQm.js → shared-server.js-C12Yq3T7.js} +2 -2
  279. package/build/server/chunks/chunks/{shared-server.js-X-h81DQm.js.map → shared-server.js-C12Yq3T7.js.map} +1 -1
  280. package/build/server/chunks/chunks/{shared.js-CMUZRVdw.js → shared.js-DWVN8B4y.js} +5 -5
  281. package/build/server/chunks/chunks/{shared.js-CMUZRVdw.js.map → shared.js-DWVN8B4y.js.map} +1 -1
  282. package/build/server/chunks/chunks/{state.js-BwqObSDl.js → state.js-CeDU2glb.js} +5 -5
  283. package/build/server/chunks/chunks/state.js-CeDU2glb.js.map +1 -0
  284. package/build/server/chunks/chunks/{utils.js-BulZbGp_.js → utils.js-DdA1SLel.js} +7 -7
  285. package/build/server/chunks/chunks/{utils.js-BulZbGp_.js.map → utils.js-DdA1SLel.js.map} +1 -1
  286. package/build/server/chunks/entries/fallbacks/error.svelte.js-GGW3JKeX.js +19 -0
  287. package/build/server/chunks/entries/fallbacks/{error.svelte.js-dtmsjrQ-.js.map → error.svelte.js-GGW3JKeX.js.map} +1 -1
  288. package/build/server/chunks/entries/pages/_...email_/{_page.server.ts.js-veRKlqKf.js → _page.server.ts.js-Bg1EJRBA.js} +2 -2
  289. package/build/server/chunks/entries/pages/_...email_/{_page.server.ts.js-veRKlqKf.js.map → _page.server.ts.js-Bg1EJRBA.js.map} +1 -1
  290. package/build/server/chunks/entries/pages/_...email_/{_page.svelte.js-zoNYaW-w.js → _page.svelte.js-BEi6piR5.js} +9 -9
  291. package/build/server/chunks/entries/pages/_...email_/{_page.svelte.js-zoNYaW-w.js.map → _page.svelte.js-BEi6piR5.js.map} +1 -1
  292. package/build/server/chunks/entries/pages/{_layout.server.ts.js-CxDOHZpA.js → _layout.server.ts.js-o2XJMadL.js} +3 -3
  293. package/build/server/chunks/entries/pages/{_layout.server.ts.js-CxDOHZpA.js.map → _layout.server.ts.js-o2XJMadL.js.map} +1 -1
  294. package/build/server/chunks/entries/pages/{_layout.svelte.js-DZjqaZyY.js → _layout.svelte.js-rXy2z4B2.js} +7 -7
  295. package/build/server/chunks/entries/pages/{_layout.svelte.js-DZjqaZyY.js.map → _layout.svelte.js-rXy2z4B2.js.map} +1 -1
  296. package/build/server/chunks/entries/pages/{_page.server.ts.js-CmdnlMr9.js → _page.server.ts.js-BVAw3SkZ.js} +2 -2
  297. package/build/server/chunks/entries/pages/{_page.server.ts.js-CmdnlMr9.js.map → _page.server.ts.js-BVAw3SkZ.js.map} +1 -1
  298. package/build/server/chunks/entries/pages/{_page.svelte.js-e4D6kjEV.js → _page.svelte.js-29xbFbxQ.js} +9 -9
  299. package/build/server/chunks/entries/pages/{_page.svelte.js-e4D6kjEV.js.map → _page.svelte.js-29xbFbxQ.js.map} +1 -1
  300. package/build/server/chunks/{handler-D1Al3aSN.js → handler-Dotyk3N2.js} +3 -3
  301. package/build/server/chunks/{handler-D1Al3aSN.js.map → handler-Dotyk3N2.js.map} +1 -1
  302. package/build/server/chunks/{index.js-aEkQ90X-.js → index.js-Us6e1cjR.js} +32 -32
  303. package/build/server/chunks/{index.js-aEkQ90X-.js.map → index.js-Us6e1cjR.js.map} +1 -1
  304. package/build/server/chunks/{manifest.js-D1l2PWoe.js → manifest.js-DkJRY23b.js} +6 -6
  305. package/build/server/chunks/{manifest.js-D1l2PWoe.js.map → manifest.js-DkJRY23b.js.map} +1 -1
  306. package/build/server/chunks/nodes/{0.js-0i5mP-xS.js → 0.js-QqRCGOCe.js} +6 -6
  307. package/build/server/chunks/nodes/{0.js-0i5mP-xS.js.map → 0.js-QqRCGOCe.js.map} +1 -1
  308. package/build/server/chunks/nodes/1.js-BZNzDKQZ.js +9 -0
  309. package/build/server/chunks/nodes/{1.js-D6kUTsHM.js.map → 1.js-BZNzDKQZ.js.map} +1 -1
  310. package/build/server/chunks/nodes/2.js-DuXcJGBg.js +15 -0
  311. package/build/server/chunks/nodes/{2.js-DBRm5Mec.js.map → 2.js-DuXcJGBg.js.map} +1 -1
  312. package/build/server/chunks/nodes/3.js-CGbkoOPk.js +15 -0
  313. package/build/server/chunks/nodes/{3.js-hASuDVIY.js.map → 3.js-CGbkoOPk.js.map} +1 -1
  314. package/package.json +5 -5
  315. package/build/client/_app/immutable/chunks/2MRX-TVL.js +0 -24
  316. package/build/client/_app/immutable/chunks/2MRX-TVL.js.br +0 -0
  317. package/build/client/_app/immutable/chunks/2MRX-TVL.js.gz +0 -0
  318. package/build/client/_app/immutable/chunks/2pZ28JA1.js.br +0 -0
  319. package/build/client/_app/immutable/chunks/2pZ28JA1.js.gz +0 -0
  320. package/build/client/_app/immutable/chunks/AoC3-GXO2.js.br +0 -0
  321. package/build/client/_app/immutable/chunks/AoC3-GXO2.js.gz +0 -0
  322. package/build/client/_app/immutable/chunks/B0iNQslz.js.br +0 -0
  323. package/build/client/_app/immutable/chunks/B0iNQslz.js.gz +0 -0
  324. package/build/client/_app/immutable/chunks/B1eC0VY6.js.br +0 -0
  325. package/build/client/_app/immutable/chunks/B1eC0VY6.js.gz +0 -0
  326. package/build/client/_app/immutable/chunks/B3OdPoN_.js.br +0 -0
  327. package/build/client/_app/immutable/chunks/B3OdPoN_.js.gz +0 -0
  328. package/build/client/_app/immutable/chunks/B4nfriop.js.br +0 -0
  329. package/build/client/_app/immutable/chunks/B4nfriop.js.gz +0 -0
  330. package/build/client/_app/immutable/chunks/B92yCKkz2.js.br +0 -0
  331. package/build/client/_app/immutable/chunks/B92yCKkz2.js.gz +0 -0
  332. package/build/client/_app/immutable/chunks/BCyR5SPb.js.br +0 -0
  333. package/build/client/_app/immutable/chunks/BCyR5SPb.js.gz +0 -0
  334. package/build/client/_app/immutable/chunks/BHIi3qVr2.js.br +0 -0
  335. package/build/client/_app/immutable/chunks/BHIi3qVr2.js.gz +0 -0
  336. package/build/client/_app/immutable/chunks/BL4DOeuO.js.br +0 -0
  337. package/build/client/_app/immutable/chunks/BL4DOeuO.js.gz +0 -0
  338. package/build/client/_app/immutable/chunks/BLb6t9Lh.js.br +0 -0
  339. package/build/client/_app/immutable/chunks/BLb6t9Lh.js.gz +0 -0
  340. package/build/client/_app/immutable/chunks/BLs_XbWi2.js.br +0 -0
  341. package/build/client/_app/immutable/chunks/BLs_XbWi2.js.gz +0 -0
  342. package/build/client/_app/immutable/chunks/BO_NcNPW.js.br +0 -0
  343. package/build/client/_app/immutable/chunks/BO_NcNPW.js.gz +0 -0
  344. package/build/client/_app/immutable/chunks/BPpVW1t9.js.br +0 -0
  345. package/build/client/_app/immutable/chunks/BPpVW1t9.js.gz +0 -0
  346. package/build/client/_app/immutable/chunks/BVT4tdIN.js +0 -29
  347. package/build/client/_app/immutable/chunks/BVT4tdIN.js.br +0 -0
  348. package/build/client/_app/immutable/chunks/BVT4tdIN.js.gz +0 -0
  349. package/build/client/_app/immutable/chunks/Bf_OO4m5.js.br +0 -0
  350. package/build/client/_app/immutable/chunks/Bf_OO4m5.js.gz +0 -0
  351. package/build/client/_app/immutable/chunks/BuyVToAU.js.br +0 -0
  352. package/build/client/_app/immutable/chunks/BuyVToAU.js.gz +0 -0
  353. package/build/client/_app/immutable/chunks/BzltqjU8.js.br +0 -0
  354. package/build/client/_app/immutable/chunks/BzltqjU8.js.gz +0 -0
  355. package/build/client/_app/immutable/chunks/C2tE-Xb62.js.br +0 -0
  356. package/build/client/_app/immutable/chunks/C2tE-Xb62.js.gz +0 -0
  357. package/build/client/_app/immutable/chunks/C3eVgNwp2.js.br +0 -0
  358. package/build/client/_app/immutable/chunks/C3eVgNwp2.js.gz +0 -0
  359. package/build/client/_app/immutable/chunks/C4aeQxkf2.js.br +0 -0
  360. package/build/client/_app/immutable/chunks/C4aeQxkf2.js.gz +0 -0
  361. package/build/client/_app/immutable/chunks/C5bbMRzS.js.br +0 -0
  362. package/build/client/_app/immutable/chunks/C5bbMRzS.js.gz +0 -0
  363. package/build/client/_app/immutable/chunks/CDG3PAdG.js.br +0 -0
  364. package/build/client/_app/immutable/chunks/CDG3PAdG.js.gz +0 -0
  365. package/build/client/_app/immutable/chunks/CJteGSc7.js.br +0 -0
  366. package/build/client/_app/immutable/chunks/CJteGSc7.js.gz +0 -0
  367. package/build/client/_app/immutable/chunks/CJy9scTx2.js.br +0 -0
  368. package/build/client/_app/immutable/chunks/CJy9scTx2.js.gz +0 -0
  369. package/build/client/_app/immutable/chunks/CLbN30Ww2.js.br +0 -0
  370. package/build/client/_app/immutable/chunks/CLbN30Ww2.js.gz +0 -0
  371. package/build/client/_app/immutable/chunks/CVhNsCIr.js.br +0 -0
  372. package/build/client/_app/immutable/chunks/CVhNsCIr.js.gz +0 -0
  373. package/build/client/_app/immutable/chunks/CWbY0LAI.js.br +0 -0
  374. package/build/client/_app/immutable/chunks/CWbY0LAI.js.gz +0 -0
  375. package/build/client/_app/immutable/chunks/C_ew8g7J2.js.br +0 -0
  376. package/build/client/_app/immutable/chunks/C_ew8g7J2.js.gz +0 -0
  377. package/build/client/_app/immutable/chunks/Cc8H0qaz.js.br +0 -0
  378. package/build/client/_app/immutable/chunks/Cc8H0qaz.js.gz +0 -0
  379. package/build/client/_app/immutable/chunks/CjRP0NjD2.js.br +0 -0
  380. package/build/client/_app/immutable/chunks/CjRP0NjD2.js.gz +0 -0
  381. package/build/client/_app/immutable/chunks/CmhtYr-H.js.br +0 -0
  382. package/build/client/_app/immutable/chunks/CmhtYr-H.js.gz +0 -0
  383. package/build/client/_app/immutable/chunks/CogqGmtf2.js.br +0 -0
  384. package/build/client/_app/immutable/chunks/CogqGmtf2.js.gz +0 -0
  385. package/build/client/_app/immutable/chunks/CsCG9XlY2.js.br +0 -0
  386. package/build/client/_app/immutable/chunks/CsCG9XlY2.js.gz +0 -0
  387. package/build/client/_app/immutable/chunks/Cx4VUS55.js.br +0 -0
  388. package/build/client/_app/immutable/chunks/Cx4VUS55.js.gz +0 -0
  389. package/build/client/_app/immutable/chunks/CyOMC1H12.js.br +0 -0
  390. package/build/client/_app/immutable/chunks/CyOMC1H12.js.gz +0 -0
  391. package/build/client/_app/immutable/chunks/D2hLgkL3.js.br +0 -0
  392. package/build/client/_app/immutable/chunks/D2hLgkL3.js.gz +0 -0
  393. package/build/client/_app/immutable/chunks/D3_lVCrH.js +0 -3
  394. package/build/client/_app/immutable/chunks/D3_lVCrH.js.br +0 -0
  395. package/build/client/_app/immutable/chunks/D3_lVCrH.js.gz +0 -0
  396. package/build/client/_app/immutable/chunks/D8mc0qWB.js.br +0 -0
  397. package/build/client/_app/immutable/chunks/D8mc0qWB.js.gz +0 -0
  398. package/build/client/_app/immutable/chunks/D8qrblp8.js.br +0 -0
  399. package/build/client/_app/immutable/chunks/D8qrblp8.js.gz +0 -0
  400. package/build/client/_app/immutable/chunks/D8y1tx0e2.js.br +0 -0
  401. package/build/client/_app/immutable/chunks/D8y1tx0e2.js.gz +0 -0
  402. package/build/client/_app/immutable/chunks/DET9eGgo.js.br +0 -0
  403. package/build/client/_app/immutable/chunks/DET9eGgo.js.gz +0 -0
  404. package/build/client/_app/immutable/chunks/DHhcNfbx.js.br +0 -0
  405. package/build/client/_app/immutable/chunks/DHhcNfbx.js.gz +0 -0
  406. package/build/client/_app/immutable/chunks/DIA3aJp6.js.br +0 -0
  407. package/build/client/_app/immutable/chunks/DIA3aJp6.js.gz +0 -0
  408. package/build/client/_app/immutable/chunks/DJARFHrx.js.br +0 -0
  409. package/build/client/_app/immutable/chunks/DJARFHrx.js.gz +0 -0
  410. package/build/client/_app/immutable/chunks/DJoGK9kf.js.br +0 -0
  411. package/build/client/_app/immutable/chunks/DJoGK9kf.js.gz +0 -0
  412. package/build/client/_app/immutable/chunks/DNvRKwb02.js.br +0 -0
  413. package/build/client/_app/immutable/chunks/DNvRKwb02.js.gz +0 -0
  414. package/build/client/_app/immutable/chunks/DPeYfO_X.js.br +0 -0
  415. package/build/client/_app/immutable/chunks/DPeYfO_X.js.gz +0 -0
  416. package/build/client/_app/immutable/chunks/DRtTh9R_.js.br +0 -0
  417. package/build/client/_app/immutable/chunks/DRtTh9R_.js.gz +0 -0
  418. package/build/client/_app/immutable/chunks/DXvs48Yn.js.br +0 -0
  419. package/build/client/_app/immutable/chunks/DXvs48Yn.js.gz +0 -0
  420. package/build/client/_app/immutable/chunks/D_kqbw5z.js.br +0 -0
  421. package/build/client/_app/immutable/chunks/D_kqbw5z.js.gz +0 -0
  422. package/build/client/_app/immutable/chunks/DaM5BcfV.js.br +0 -0
  423. package/build/client/_app/immutable/chunks/DaM5BcfV.js.gz +0 -0
  424. package/build/client/_app/immutable/chunks/DatEshCS.js.br +0 -0
  425. package/build/client/_app/immutable/chunks/DatEshCS.js.gz +0 -0
  426. package/build/client/_app/immutable/chunks/Dbkyqgda2.js.br +0 -0
  427. package/build/client/_app/immutable/chunks/Dbkyqgda2.js.gz +0 -0
  428. package/build/client/_app/immutable/chunks/DeSyfjfB.js.br +0 -0
  429. package/build/client/_app/immutable/chunks/DeSyfjfB.js.gz +0 -0
  430. package/build/client/_app/immutable/chunks/Dgfk8zCU.js.br +0 -0
  431. package/build/client/_app/immutable/chunks/Dgfk8zCU.js.gz +0 -0
  432. package/build/client/_app/immutable/chunks/DlX1gWpk.js.br +0 -0
  433. package/build/client/_app/immutable/chunks/DlX1gWpk.js.gz +0 -0
  434. package/build/client/_app/immutable/chunks/DmoyGeAS2.js.br +0 -0
  435. package/build/client/_app/immutable/chunks/DmoyGeAS2.js.gz +0 -0
  436. package/build/client/_app/immutable/chunks/DqNF_brF2.js.br +0 -0
  437. package/build/client/_app/immutable/chunks/DqNF_brF2.js.gz +0 -0
  438. package/build/client/_app/immutable/chunks/Dtn6NLbI.js.br +0 -0
  439. package/build/client/_app/immutable/chunks/Dtn6NLbI.js.gz +0 -0
  440. package/build/client/_app/immutable/chunks/Dtv7UOty2.js.br +0 -0
  441. package/build/client/_app/immutable/chunks/Dtv7UOty2.js.gz +0 -0
  442. package/build/client/_app/immutable/chunks/GPf5fMLC2.js.br +0 -0
  443. package/build/client/_app/immutable/chunks/GPf5fMLC2.js.gz +0 -0
  444. package/build/client/_app/immutable/chunks/KNb_0kK5.js.br +0 -0
  445. package/build/client/_app/immutable/chunks/KNb_0kK5.js.gz +0 -0
  446. package/build/client/_app/immutable/chunks/MfeErNn-.js.br +0 -0
  447. package/build/client/_app/immutable/chunks/MfeErNn-.js.gz +0 -0
  448. package/build/client/_app/immutable/chunks/OOMz51rW.js.br +0 -0
  449. package/build/client/_app/immutable/chunks/OOMz51rW.js.gz +0 -0
  450. package/build/client/_app/immutable/chunks/PMQDBV5J.js.br +0 -0
  451. package/build/client/_app/immutable/chunks/PMQDBV5J.js.gz +0 -0
  452. package/build/client/_app/immutable/chunks/QtN_jOZp.js.br +0 -0
  453. package/build/client/_app/immutable/chunks/QtN_jOZp.js.gz +0 -0
  454. package/build/client/_app/immutable/chunks/V5Yjt9wD2.js.br +0 -0
  455. package/build/client/_app/immutable/chunks/V5Yjt9wD2.js.gz +0 -0
  456. package/build/client/_app/immutable/chunks/V76vKrr3.js +0 -1
  457. package/build/client/_app/immutable/chunks/V76vKrr3.js.br +0 -0
  458. package/build/client/_app/immutable/chunks/V76vKrr3.js.gz +0 -0
  459. package/build/client/_app/immutable/chunks/WBW9X-Hs.js +0 -2
  460. package/build/client/_app/immutable/chunks/WBW9X-Hs.js.br +0 -0
  461. package/build/client/_app/immutable/chunks/WBW9X-Hs.js.gz +0 -0
  462. package/build/client/_app/immutable/chunks/XT7mgm2-.js.br +0 -0
  463. package/build/client/_app/immutable/chunks/XT7mgm2-.js.gz +0 -0
  464. package/build/client/_app/immutable/chunks/b1-zR7XP.js.br +0 -0
  465. package/build/client/_app/immutable/chunks/b1-zR7XP.js.gz +0 -0
  466. package/build/client/_app/immutable/chunks/b4xeCETc.js.br +0 -0
  467. package/build/client/_app/immutable/chunks/b4xeCETc.js.gz +0 -0
  468. package/build/client/_app/immutable/chunks/cM1P9coc.js.br +0 -0
  469. package/build/client/_app/immutable/chunks/cM1P9coc.js.gz +0 -0
  470. package/build/client/_app/immutable/chunks/fhodw31A2.js.br +0 -0
  471. package/build/client/_app/immutable/chunks/fhodw31A2.js.gz +0 -0
  472. package/build/client/_app/immutable/chunks/i9_wZDsL2.js.br +0 -0
  473. package/build/client/_app/immutable/chunks/i9_wZDsL2.js.gz +0 -0
  474. package/build/client/_app/immutable/chunks/o5QeSYPS2.js.br +0 -0
  475. package/build/client/_app/immutable/chunks/o5QeSYPS2.js.gz +0 -0
  476. package/build/client/_app/immutable/chunks/pk7CcyRt2.js.br +0 -0
  477. package/build/client/_app/immutable/chunks/pk7CcyRt2.js.gz +0 -0
  478. package/build/client/_app/immutable/chunks/sDfmG-q52.js.br +0 -0
  479. package/build/client/_app/immutable/chunks/sDfmG-q52.js.gz +0 -0
  480. package/build/client/_app/immutable/entry/app.42egGAL-.js +0 -2
  481. package/build/client/_app/immutable/entry/app.42egGAL-.js.br +0 -0
  482. package/build/client/_app/immutable/entry/app.42egGAL-.js.gz +0 -0
  483. package/build/client/_app/immutable/entry/start.B2why4Bn.js +0 -1
  484. package/build/client/_app/immutable/entry/start.B2why4Bn.js.br +0 -1
  485. package/build/client/_app/immutable/entry/start.B2why4Bn.js.gz +0 -0
  486. package/build/client/_app/immutable/nodes/0.CKw__0XK.js +0 -1
  487. package/build/client/_app/immutable/nodes/0.CKw__0XK.js.br +0 -0
  488. package/build/client/_app/immutable/nodes/0.CKw__0XK.js.gz +0 -0
  489. package/build/client/_app/immutable/nodes/1.BoepTJZq.js +0 -1
  490. package/build/client/_app/immutable/nodes/1.BoepTJZq.js.br +0 -1
  491. package/build/client/_app/immutable/nodes/1.BoepTJZq.js.gz +0 -0
  492. package/build/client/_app/immutable/nodes/2.D5ztFITe.js +0 -1
  493. package/build/client/_app/immutable/nodes/2.D5ztFITe.js.br +0 -0
  494. package/build/client/_app/immutable/nodes/2.D5ztFITe.js.gz +0 -0
  495. package/build/client/_app/immutable/nodes/3.D5ztFITe.js +0 -1
  496. package/build/client/_app/immutable/nodes/3.D5ztFITe.js.br +0 -0
  497. package/build/client/_app/immutable/nodes/3.D5ztFITe.js.gz +0 -0
  498. package/build/server/chunks/chunks/client.js-tu1i9JSN.js.map +0 -1
  499. package/build/server/chunks/chunks/dist.js-BLAtjEg2.js.map +0 -1
  500. package/build/server/chunks/chunks/internal.js-B7HEnRRn.js.map +0 -1
  501. package/build/server/chunks/chunks/preview-workbench.js-D-KCnrMA.js.map +0 -1
  502. package/build/server/chunks/chunks/state.js-BwqObSDl.js.map +0 -1
  503. package/build/server/chunks/entries/fallbacks/error.svelte.js-dtmsjrQ-.js +0 -19
  504. package/build/server/chunks/nodes/1.js-D6kUTsHM.js +0 -9
  505. package/build/server/chunks/nodes/2.js-DBRm5Mec.js +0 -15
  506. package/build/server/chunks/nodes/3.js-hASuDVIY.js +0 -15
@@ -1,4 +1,4 @@
1
- import { u as uneval } from './internal2.js-Bkb6J7OW.js';
1
+ import { u as uneval } from './internal2.js-MPgbkD6r.js';
2
2
  import { clsx } from 'clsx';
3
3
 
4
4
  //#region \0rolldown/runtime.js
@@ -33,7 +33,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  enumerable: true
34
34
  }) , mod));
35
35
  //#endregion
36
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/shared/utils.js
36
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/shared/utils.js
37
37
  var is_array = Array.isArray;
38
38
  var index_of = Array.prototype.indexOf;
39
39
  var includes = Array.prototype.includes;
@@ -73,7 +73,7 @@ function deferred() {
73
73
  };
74
74
  }
75
75
  //#endregion
76
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/reactivity/equality.js
76
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/reactivity/equality.js
77
77
  /** @import { Equals } from '#client' */
78
78
  /** @type {Equals} */
79
79
  function equals(value) {
@@ -117,6 +117,8 @@ var WAS_MARKED = 65536;
117
117
  var REACTION_IS_UPDATING = 1 << 21;
118
118
  var ERROR_VALUE = 1 << 23;
119
119
  var STATE_SYMBOL = Symbol("$state");
120
+ /** Marks component export objects, so that `proxy(...)` leaves them untouched */
121
+ var COMPONENT_SYMBOL = Symbol("component");
120
122
  var LEGACY_PROPS = Symbol("legacy props");
121
123
  var ATTRIBUTES_CACHE = Symbol("attributes");
122
124
  var CLASS_CACHE = Symbol("class");
@@ -128,74 +130,7 @@ var STALE_REACTION = new class StaleReactionError extends Error {
128
130
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
129
131
  }();
130
132
  //#endregion
131
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/shared/errors.js
132
- /**
133
- * Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`
134
- * @param {string} name
135
- * @returns {never}
136
- */
137
- function experimental_async_required(name) {
138
- throw new Error(`https://svelte.dev/e/experimental_async_required`);
139
- }
140
- /**
141
- * `%name%(...)` can only be used during component initialisation
142
- * @param {string} name
143
- * @returns {never}
144
- */
145
- function lifecycle_outside_component(name) {
146
- throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
147
- }
148
- /**
149
- * Context was not set in a parent component
150
- * @returns {never}
151
- */
152
- function missing_context() {
153
- throw new Error(`https://svelte.dev/e/missing_context`);
154
- }
155
- /**
156
- * Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
157
- * @returns {never}
158
- */
159
- function effect_update_depth_exceeded() {
160
- throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);
161
- }
162
- /**
163
- * Failed to hydrate the application
164
- * @returns {never}
165
- */
166
- function hydration_failed() {
167
- throw new Error(`https://svelte.dev/e/hydration_failed`);
168
- }
169
- /**
170
- * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
171
- * @returns {never}
172
- */
173
- function state_descriptors_fixed() {
174
- throw new Error(`https://svelte.dev/e/state_descriptors_fixed`);
175
- }
176
- /**
177
- * Cannot set prototype of `$state` object
178
- * @returns {never}
179
- */
180
- function state_prototype_fixed() {
181
- throw new Error(`https://svelte.dev/e/state_prototype_fixed`);
182
- }
183
- /**
184
- * Updating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
185
- * @returns {never}
186
- */
187
- function state_unsafe_mutation() {
188
- throw new Error(`https://svelte.dev/e/state_unsafe_mutation`);
189
- }
190
- /**
191
- * A `<svelte:boundary>` `reset` function cannot be called while an error is still being handled
192
- * @returns {never}
193
- */
194
- function svelte_boundary_reset_onerror() {
195
- throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
196
- }
197
- //#endregion
198
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/constants.js
133
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/constants.js
199
134
  var HYDRATION_ERROR = {};
200
135
  var UNINITIALIZED = Symbol("uninitialized");
201
136
  var ATTACHMENT_KEY = "@attach";
@@ -219,7 +154,7 @@ function svelte_boundary_reset_noop() {
219
154
  console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
220
155
  }
221
156
  //#endregion
222
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/hydration.js
157
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/hydration.js
223
158
  /** @import { TemplateNode } from '#client' */
224
159
  /**
225
160
  * Use this variable to guard everything related to hydration code so it can be treeshaken out
@@ -278,7 +213,74 @@ function skip_nodes(remove = true) {
278
213
  }
279
214
  }
280
215
  //#endregion
281
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/shared/clone.js
216
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/shared/errors.js
217
+ /**
218
+ * Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`
219
+ * @param {string} name
220
+ * @returns {never}
221
+ */
222
+ function experimental_async_required(name) {
223
+ throw new Error(`https://svelte.dev/e/experimental_async_required`);
224
+ }
225
+ /**
226
+ * `%name%(...)` can only be used during component initialisation
227
+ * @param {string} name
228
+ * @returns {never}
229
+ */
230
+ function lifecycle_outside_component(name) {
231
+ throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
232
+ }
233
+ /**
234
+ * Context was not set in the current component or any of its ancestors
235
+ * @returns {never}
236
+ */
237
+ function missing_context() {
238
+ throw new Error(`https://svelte.dev/e/missing_context`);
239
+ }
240
+ /**
241
+ * Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
242
+ * @returns {never}
243
+ */
244
+ function effect_update_depth_exceeded() {
245
+ throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);
246
+ }
247
+ /**
248
+ * Failed to hydrate the application
249
+ * @returns {never}
250
+ */
251
+ function hydration_failed() {
252
+ throw new Error(`https://svelte.dev/e/hydration_failed`);
253
+ }
254
+ /**
255
+ * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
256
+ * @returns {never}
257
+ */
258
+ function state_descriptors_fixed() {
259
+ throw new Error(`https://svelte.dev/e/state_descriptors_fixed`);
260
+ }
261
+ /**
262
+ * Cannot set prototype of `$state` object
263
+ * @returns {never}
264
+ */
265
+ function state_prototype_fixed() {
266
+ throw new Error(`https://svelte.dev/e/state_prototype_fixed`);
267
+ }
268
+ /**
269
+ * Updating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
270
+ * @returns {never}
271
+ */
272
+ function state_unsafe_mutation() {
273
+ throw new Error(`https://svelte.dev/e/state_unsafe_mutation`);
274
+ }
275
+ /**
276
+ * A `<svelte:boundary>` `reset` function cannot be called while an error is still being handled
277
+ * @returns {never}
278
+ */
279
+ function svelte_boundary_reset_onerror() {
280
+ throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
281
+ }
282
+ //#endregion
283
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/shared/clone.js
282
284
  /** @import { Snapshot } from './types' */
283
285
  /**
284
286
  * In dev, we keep track of which properties could not be cloned. In prod
@@ -331,7 +333,10 @@ function clone(value, cloned, path, paths, original = null, no_tojson = false) {
331
333
  for (var key of Object.keys(value)) copy[key] = clone(value[key], cloned, path, paths, null, no_tojson);
332
334
  return copy;
333
335
  }
334
- if (value instanceof Date) return structuredClone(value);
336
+ if (value instanceof Date) {
337
+ value.getTime();
338
+ return structuredClone(value);
339
+ }
335
340
  if (typeof value.toJSON === "function" && !no_tojson) return clone(
336
341
  /** @type {T & { toJSON(): any } } */
337
342
  value.toJSON(),
@@ -349,7 +354,48 @@ function clone(value, cloned, path, paths, original = null, no_tojson = false) {
349
354
  }
350
355
  }
351
356
  //#endregion
352
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/context.js
357
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/shared/context.js
358
+ /**
359
+ * @template T
360
+ * @param {(key: object) => T} get_context
361
+ * @param {(key: object, context: T) => T} set_context
362
+ * @param {(key: object) => boolean} has_context
363
+ * @returns {[() => T, (context: T) => T, () => boolean]}
364
+ */
365
+ function create_context(get_context, set_context, has_context) {
366
+ const key = {};
367
+ return [
368
+ () => {
369
+ if (!has_context(key)) missing_context();
370
+ return get_context(key);
371
+ },
372
+ (context) => set_context(key, context),
373
+ () => has_context(key)
374
+ ];
375
+ }
376
+ /**
377
+ * @typedef {{ p: Context | null, c: Map<unknown, unknown> | null }} Context
378
+ */
379
+ /**
380
+ * @param {Context} context
381
+ * @returns {Map<unknown, unknown> | null}
382
+ */
383
+ function get_parent_context(context) {
384
+ let parent = context.p;
385
+ while (parent !== null && parent.c === null) parent = parent.p;
386
+ return parent?.c ?? null;
387
+ }
388
+ /**
389
+ * @param {Context | null} context
390
+ * @param {string} name
391
+ * @returns {Map<unknown, unknown>}
392
+ */
393
+ function get_or_init_context_map(context, name) {
394
+ if (context === null) lifecycle_outside_component();
395
+ return context.c ??= new Map(get_parent_context(context) || void 0);
396
+ }
397
+ //#endregion
398
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/context.js
353
399
  /** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
354
400
  /** @type {ComponentContext | null} */
355
401
  var component_context = null;
@@ -389,14 +435,22 @@ function pop$1(component) {
389
435
  }
390
436
  context.i = true;
391
437
  component_context = context.p;
392
- return {};
438
+ return mark_as_component(component);
439
+ }
440
+ /**
441
+ * Add a symbol to the object (or create one if undefined) to mark it as a component so it isn't proxified.
442
+ * @param {any} component
443
+ */
444
+ function mark_as_component(component = {}) {
445
+ define_property(component, COMPONENT_SYMBOL, { value: true });
446
+ return component;
393
447
  }
394
448
  /** @returns {boolean} */
395
449
  function is_runes() {
396
450
  return true;
397
451
  }
398
452
  //#endregion
399
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/task.js
453
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/task.js
400
454
  /** @type {Array<() => void>} */
401
455
  var micro_tasks = [];
402
456
  function run_micro_tasks() {
@@ -422,40 +476,8 @@ function queue_micro_task(fn) {
422
476
  function flush_tasks() {
423
477
  while (micro_tasks.length > 0) run_micro_tasks();
424
478
  }
425
- /**
426
- * @param {unknown} error
427
- */
428
- function handle_error(error) {
429
- var effect = active_effect;
430
- if (effect === null) {
431
- /** @type {Derived} */ active_reaction.f |= ERROR_VALUE;
432
- return error;
433
- }
434
- if ((effect.f & 32768) === 0 && (effect.f & 4) === 0) throw error;
435
- invoke_error_boundary(error, effect);
436
- }
437
- /**
438
- * @param {unknown} error
439
- * @param {Effect | null} effect
440
- */
441
- function invoke_error_boundary(error, effect) {
442
- if (effect !== null && (effect.f & 16384) !== 0) return;
443
- while (effect !== null) {
444
- if ((effect.f & 128) !== 0) {
445
- if ((effect.f & 32768) === 0) throw error;
446
- try {
447
- /** @type {Boundary} */ effect.b.error(error);
448
- return;
449
- } catch (e) {
450
- error = e;
451
- }
452
- }
453
- effect = effect.parent;
454
- }
455
- throw error;
456
- }
457
479
  //#endregion
458
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/reactivity/status.js
480
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/reactivity/status.js
459
481
  /** @import { Derived, Signal } from '#client' */
460
482
  var STATUS_MASK = -7169;
461
483
  /**
@@ -474,7 +496,7 @@ function update_derived_status(derived) {
474
496
  else set_signal_status(derived, MAYBE_DIRTY);
475
497
  }
476
498
  //#endregion
477
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/reactivity/utils.js
499
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/reactivity/utils.js
478
500
  /** @import { Derived, Effect, Value } from '#client' */
479
501
  /**
480
502
  * @param {Value[] | null} deps
@@ -502,7 +524,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
502
524
  set_signal_status(effect, CLEAN);
503
525
  }
504
526
  //#endregion
505
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
527
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
506
528
  /**
507
529
  * @template T
508
530
  * @param {() => T} fn
@@ -519,1083 +541,654 @@ function without_reactive_context(fn) {
519
541
  set_active_effect(previous_effect);
520
542
  }
521
543
  }
522
- //#endregion
523
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/reactivity/create-subscriber.js
544
+ var OBSOLETE = Symbol("obsolete");
524
545
  /**
525
- * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
526
- * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
527
- *
528
- * If `subscribe` is called inside an effect (including indirectly, for example inside a getter),
529
- * the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.
530
- *
531
- * If `start` returns a cleanup function, it will be called when the effect is destroyed.
532
- *
533
- * If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
534
- * are active, and the returned teardown function will only be called when all effects are destroyed.
535
- *
536
- * It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
537
- *
538
- * ```js
539
- * import { createSubscriber } from 'svelte/reactivity';
540
- * import { on } from 'svelte/events';
541
- *
542
- * export class MediaQuery {
543
- * #query;
544
- * #subscribe;
545
- *
546
- * constructor(query) {
547
- * this.#query = window.matchMedia(`(${query})`);
548
- *
549
- * this.#subscribe = createSubscriber((update) => {
550
- * // when the `change` event occurs, re-run any effects that read `this.current`
551
- * const off = on(this.#query, 'change', update);
552
- *
553
- * // stop listening when all the effects are destroyed
554
- * return () => off();
555
- * });
556
- * }
557
- *
558
- * get current() {
559
- * // This makes the getter reactive, if read in an effect
560
- * this.#subscribe();
561
- *
562
- * // Return the current state of the query, whether or not we're in an effect
563
- * return this.#query.matches;
564
- * }
565
- * }
566
- * ```
567
- * @param {(update: () => void) => (() => void) | void} start
568
- * @since 5.7.0
546
+ * @param {Derived} derived
547
+ * @returns {void}
569
548
  */
570
- function createSubscriber(start) {
571
- let subscribers = 0;
572
- let version = source(0);
573
- /** @type {(() => void) | void} */
574
- let stop;
575
- return () => {
576
- if (effect_tracking()) {
577
- get(version);
578
- render_effect(() => {
579
- if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
580
- subscribers += 1;
581
- return () => {
582
- queue_micro_task(() => {
583
- subscribers -= 1;
584
- if (subscribers === 0) {
585
- stop?.();
586
- stop = void 0;
587
- increment(version);
588
- }
589
- });
590
- };
591
- });
592
- }
593
- };
549
+ function destroy_derived_effects(derived) {
550
+ var effects = derived.effects;
551
+ if (effects !== null) {
552
+ derived.effects = null;
553
+ for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
554
+ }
594
555
  }
595
- //#endregion
596
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
597
- /** @import { Effect, Source, TemplateNode, } from '#client' */
598
556
  /**
599
- * @typedef {{
600
- * onerror?: ((error: unknown, reset: () => void) => void) | null;
601
- * failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
602
- * pending?: ((anchor: Node) => void) | null;
603
- * }} BoundaryProps
557
+ * @template T
558
+ * @param {Derived} derived
559
+ * @returns {T}
604
560
  */
605
- var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
561
+ function execute_derived(derived) {
562
+ var value;
563
+ var prev_active_effect = active_effect;
564
+ var parent = derived.parent;
565
+ if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
566
+ derived_inert();
567
+ return derived.v;
568
+ }
569
+ set_active_effect(parent);
570
+ try {
571
+ derived.f &= ~WAS_MARKED;
572
+ destroy_derived_effects(derived);
573
+ value = update_reaction(derived);
574
+ } finally {
575
+ set_active_effect(prev_active_effect);
576
+ }
577
+ return value;
578
+ }
606
579
  /**
607
- * @param {TemplateNode} node
608
- * @param {BoundaryProps} props
609
- * @param {((anchor: Node) => void)} children
610
- * @param {((error: unknown) => unknown) | undefined} [transform_error]
580
+ * @param {Derived} derived
611
581
  * @returns {void}
612
582
  */
613
- function boundary(node, props, children, transform_error) {
614
- new Boundary(node, props, children, transform_error);
583
+ function update_derived(derived) {
584
+ var value = execute_derived(derived);
585
+ if (!derived.equals(value)) {
586
+ derived.wv = increment_write_version();
587
+ if (!current_batch?.is_fork || derived.deps === null) {
588
+ if (current_batch !== null) {
589
+ current_batch.capture(derived, value, true);
590
+ previous_batch?.capture(derived, value, true);
591
+ } else derived.v = value;
592
+ if (derived.deps === null) {
593
+ set_signal_status(derived, CLEAN);
594
+ return;
595
+ }
596
+ }
597
+ }
598
+ if (is_destroying_effect) return;
599
+ if (batch_values !== null) {
600
+ if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
601
+ } else update_derived_status(derived);
615
602
  }
616
- var Boundary = class {
617
- /** @type {Boundary | null} */
618
- parent;
619
- is_pending = false;
603
+ /**
604
+ * @param {Derived} derived
605
+ */
606
+ function freeze_derived_effects(derived) {
607
+ if (derived.effects === null) return;
608
+ for (const e of derived.effects) if (e.teardown || e.ac) {
609
+ e.teardown?.();
610
+ if (e.ac !== null) without_reactive_context(() => {
611
+ /** @type {AbortController} */ e.ac.abort(STALE_REACTION);
612
+ e.ac = null;
613
+ });
614
+ if (e.fn !== null) e.teardown = noop;
615
+ remove_reactions(e, 0);
616
+ destroy_effect_children(e);
617
+ }
618
+ }
619
+ /**
620
+ * @param {Derived} derived
621
+ */
622
+ function unfreeze_derived_effects(derived) {
623
+ if (derived.effects === null) return;
624
+ for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
625
+ }
626
+ //#endregion
627
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/reactivity/batch.js
628
+ /** @import { Fork } from 'svelte' */
629
+ /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
630
+ /** @type {Batch | null} */
631
+ var first_batch = null;
632
+ /** @type {Batch | null} */
633
+ var last_batch = null;
634
+ /** @type {Batch | null} */
635
+ var current_batch = null;
636
+ /**
637
+ * This is needed to avoid overwriting inputs
638
+ * @type {Batch | null}
639
+ */
640
+ var previous_batch = null;
641
+ /**
642
+ * When time travelling (i.e. working in one batch, while other batches
643
+ * still have ongoing work), we ignore the real values of affected
644
+ * signals in favour of their values within the batch
645
+ * @type {Map<Value, any> | null}
646
+ */
647
+ var batch_values = null;
648
+ /** @type {Effect | null} */
649
+ var last_scheduled_effect = null;
650
+ var is_flushing_sync = false;
651
+ var is_processing = false;
652
+ /**
653
+ * During traversal, this is an array. Newly created effects are (if not immediately
654
+ * executed) pushed to this array, rather than going through the scheduling
655
+ * rigamarole that would cause another turn of the flush loop.
656
+ * @type {Effect[] | null}
657
+ */
658
+ var collected_effects = null;
659
+ /**
660
+ * An array of effects that are marked during traversal as a result of a `set`
661
+ * (not `internal_set`) call. These will be added to the next batch and
662
+ * trigger another `batch.process()`
663
+ * @type {Effect[] | null}
664
+ * @deprecated when we get rid of legacy mode and stores, we can get rid of this
665
+ */
666
+ var legacy_updates = null;
667
+ var flush_count = 0;
668
+ var uid = 1;
669
+ var Batch = class Batch {
670
+ id = uid++;
671
+ /** True as soon as `#process` was called */
672
+ #started = false;
673
+ linked = true;
674
+ /** @type {Batch | null} */
675
+ #prev = null;
676
+ /** @type {Batch | null} */
677
+ #next = null;
678
+ /** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
679
+ async_deriveds = /* @__PURE__ */ new Map();
620
680
  /**
621
- * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
622
- * Inherited from parent boundary, or defaults to identity.
623
- * @type {(error: unknown) => unknown}
681
+ * The current values of any signals that are updated in this batch.
682
+ * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
683
+ * They keys of this map are identical to `this.#previous`
684
+ * @type {Map<Value, [any, boolean]>}
624
685
  */
625
- transform_error;
626
- /** @type {TemplateNode} */
627
- #anchor;
628
- /** @type {TemplateNode | null} */
629
- #hydrate_open = hydrating ? hydrate_node : null;
630
- /** @type {BoundaryProps} */
631
- #props;
632
- /** @type {((anchor: Node) => void)} */
633
- #children;
634
- /** @type {Effect} */
635
- #effect;
636
- /** @type {Effect | null} */
637
- #main_effect = null;
638
- /** @type {Effect | null} */
639
- #pending_effect = null;
640
- /** @type {Effect | null} */
641
- #failed_effect = null;
642
- /** @type {DocumentFragment | null} */
643
- #offscreen_fragment = null;
644
- #local_pending_count = 0;
645
- #pending_count = 0;
646
- #pending_count_update_queued = false;
647
- /** @type {Set<Effect>} */
648
- #dirty_effects = /* @__PURE__ */ new Set();
649
- /** @type {Set<Effect>} */
650
- #maybe_dirty_effects = /* @__PURE__ */ new Set();
686
+ current = /* @__PURE__ */ new Map();
651
687
  /**
652
- * A source containing the number of pending async deriveds/expressions.
653
- * Only created if `$effect.pending()` is used inside the boundary,
654
- * otherwise updating the source results in needless `Batch.ensure()`
655
- * calls followed by no-op flushes
656
- * @type {Source<number> | null}
688
+ * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
689
+ * They keys of this map are identical to `this.#current`
690
+ * @type {Map<Value, any>}
657
691
  */
658
- #effect_pending = null;
659
- #effect_pending_subscriber = createSubscriber(() => {
660
- this.#effect_pending = source(this.#local_pending_count);
661
- return () => {
662
- this.#effect_pending = null;
663
- };
664
- });
692
+ previous = /* @__PURE__ */ new Map();
665
693
  /**
666
- * @param {TemplateNode} node
667
- * @param {BoundaryProps} props
668
- * @param {((anchor: Node) => void)} children
669
- * @param {((error: unknown) => unknown) | undefined} [transform_error]
694
+ * When the batch is committed (and the DOM is updated), we need to remove old branches
695
+ * and append new ones by calling the functions added inside (if/each/key/etc) blocks
696
+ * @type {Set<(batch: Batch) => void>}
670
697
  */
671
- constructor(node, props, children, transform_error) {
672
- this.#anchor = node;
673
- this.#props = props;
674
- this.#children = (anchor) => {
675
- var effect = active_effect;
676
- effect.b = this;
677
- effect.f |= 128;
678
- children(anchor);
679
- };
680
- this.parent = active_effect.b;
681
- this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
682
- this.#effect = block(() => {
683
- if (hydrating) {
684
- const comment = this.#hydrate_open;
685
- hydrate_next();
686
- const server_rendered_pending = comment.data === "[!";
687
- if (comment.data.startsWith("[?")) {
688
- const serialized_error = JSON.parse(comment.data.slice(2));
689
- this.#hydrate_failed_content(serialized_error);
690
- } else if (server_rendered_pending) this.#hydrate_pending_content();
691
- else this.#hydrate_resolved_content();
692
- } else this.#render();
693
- }, flags);
694
- if (hydrating) this.#anchor = hydrate_node;
695
- }
696
- #hydrate_resolved_content() {
697
- try {
698
- this.#main_effect = branch(() => this.#children(this.#anchor));
699
- } catch (error) {
700
- this.error(error);
701
- }
702
- }
698
+ #commit_callbacks = /* @__PURE__ */ new Set();
703
699
  /**
704
- * @param {unknown} error The deserialized error from the server's hydration comment
700
+ * If a fork is discarded, we need to destroy any effects that are no longer needed
701
+ * @type {Set<(batch: Batch) => void>}
705
702
  */
706
- #hydrate_failed_content(error) {
707
- const failed = this.#props.failed;
708
- const { reset, invoke_onerror } = this.#create_reset(error);
709
- queue_micro_task(invoke_onerror);
710
- if (!failed) return;
711
- this.#failed_effect = branch(() => {
712
- failed(this.#anchor, () => error, () => reset);
713
- });
714
- }
703
+ #discard_callbacks = /* @__PURE__ */ new Set();
715
704
  /**
716
- * Creates the `reset` function for a failed boundary, along with a function
717
- * that invokes `onerror` with it (if provided)
718
- * @param {unknown} error
719
- * @returns {{ reset: () => void, invoke_onerror: () => void }}
705
+ * The number of async effects that are currently in flight
720
706
  */
721
- #create_reset(error) {
722
- var did_reset = false;
723
- var calling_on_error = false;
724
- const reset = () => {
725
- if (did_reset) {
726
- svelte_boundary_reset_noop();
727
- return;
728
- }
729
- did_reset = true;
730
- if (calling_on_error) svelte_boundary_reset_onerror();
731
- if (this.#failed_effect !== null) pause_effect(this.#failed_effect, () => {
732
- this.#failed_effect = null;
733
- });
734
- this.#run(() => {
735
- this.#render();
736
- });
737
- };
738
- const invoke_onerror = () => {
739
- try {
740
- calling_on_error = true;
741
- this.#props.onerror?.(error, reset);
742
- calling_on_error = false;
743
- } catch (err) {
744
- invoke_error_boundary(err, this.#effect && this.#effect.parent);
745
- }
746
- };
747
- return {
748
- reset,
749
- invoke_onerror
750
- };
751
- }
752
- #hydrate_pending_content() {
753
- const pending = this.#props.pending;
754
- if (!pending) return;
755
- this.is_pending = true;
756
- this.#pending_effect = branch(() => pending(this.#anchor));
757
- queue_micro_task(() => {
758
- var fragment = this.#offscreen_fragment = document.createDocumentFragment();
759
- var anchor = create_text();
760
- fragment.append(anchor);
761
- this.#main_effect = this.#run(() => {
762
- return branch(() => this.#children(anchor));
763
- });
764
- if (this.#pending_count === 0) {
765
- this.#anchor.before(fragment);
766
- this.#offscreen_fragment = null;
767
- pause_effect(this.#pending_effect, () => {
768
- this.#pending_effect = null;
769
- });
770
- this.#resolve(current_batch);
771
- }
772
- });
773
- }
774
- #render() {
775
- try {
776
- this.is_pending = this.has_pending_snippet();
777
- this.#pending_count = 0;
778
- this.#local_pending_count = 0;
779
- this.#main_effect = branch(() => {
780
- this.#children(this.#anchor);
781
- });
782
- if (this.#pending_count > 0) {
783
- var fragment = this.#offscreen_fragment = document.createDocumentFragment();
784
- move_effect(this.#main_effect, fragment);
785
- const pending = this.#props.pending;
786
- this.#pending_effect = branch(() => pending(this.#anchor));
787
- } else this.#resolve(current_batch);
788
- } catch (error) {
789
- this.error(error);
790
- }
791
- }
707
+ #pending = 0;
792
708
  /**
793
- * @param {Batch} batch
709
+ * Async effects that are currently in flight, _not_ inside a pending boundary
710
+ * @type {Map<Effect, number>}
794
711
  */
795
- #resolve(batch) {
796
- this.is_pending = false;
797
- batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
798
- }
712
+ #blocking_pending = /* @__PURE__ */ new Map();
799
713
  /**
800
- * Defer an effect inside a pending boundary until the boundary resolves
801
- * @param {Effect} effect
714
+ * A deferred that resolves when the batch is committed, used with `settled()`
715
+ * TODO replace with Promise.withResolvers once supported widely enough
716
+ * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
802
717
  */
803
- defer_effect(effect) {
804
- defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
805
- }
718
+ #deferred = null;
806
719
  /**
807
- * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
808
- * @returns {boolean}
720
+ * The root effects that need to be flushed
721
+ * @type {Effect[]}
809
722
  */
810
- is_rendered() {
811
- return !this.is_pending && (!this.parent || this.parent.is_rendered());
812
- }
813
- has_pending_snippet() {
814
- return !!this.#props.pending;
815
- }
723
+ #roots = [];
816
724
  /**
817
- * @template T
818
- * @param {() => T} fn
725
+ * Effects created while this batch was active.
726
+ * @type {Effect[]}
819
727
  */
820
- #run(fn) {
821
- var previous_effect = active_effect;
822
- var previous_reaction = active_reaction;
823
- var previous_ctx = component_context;
824
- set_active_effect(this.#effect);
825
- set_active_reaction(this.#effect);
826
- set_component_context(this.#effect.ctx);
827
- try {
828
- Batch.ensure();
829
- return fn();
830
- } catch (e) {
831
- handle_error(e);
832
- return null;
833
- } finally {
834
- set_active_effect(previous_effect);
835
- set_active_reaction(previous_reaction);
836
- set_component_context(previous_ctx);
837
- }
838
- }
728
+ #new_effects = [];
839
729
  /**
840
- * Updates the pending count associated with the currently visible pending snippet,
841
- * if any, such that we can replace the snippet with content once work is done
842
- * @param {1 | -1} d
843
- * @param {Batch} batch
730
+ * Deferred effects (which run after async work has completed) that are DIRTY
731
+ * @type {Set<Effect>}
844
732
  */
845
- #update_pending_count(d, batch) {
846
- if (!this.has_pending_snippet()) {
847
- if (this.parent) this.parent.#update_pending_count(d, batch);
848
- return;
733
+ #dirty_effects = /* @__PURE__ */ new Set();
734
+ /**
735
+ * Deferred effects that are MAYBE_DIRTY
736
+ * @type {Set<Effect>}
737
+ */
738
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
739
+ /**
740
+ * A map of branches that still exist, but will be destroyed when this batch
741
+ * is committed — we skip over these during `process`.
742
+ * The value contains child effects that were dirty/maybe_dirty before being reset,
743
+ * so they can be rescheduled if the branch survives.
744
+ * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
745
+ */
746
+ #skipped_branches = /* @__PURE__ */ new Map();
747
+ /**
748
+ * Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
749
+ * @type {Set<Effect>}
750
+ */
751
+ #unskipped_branches = /* @__PURE__ */ new Set();
752
+ is_fork = false;
753
+ #decrement_queued = false;
754
+ constructor() {
755
+ if (last_batch === null) first_batch = last_batch = this;
756
+ else {
757
+ last_batch.#next = this;
758
+ this.#prev = last_batch;
849
759
  }
850
- this.#pending_count += d;
851
- if (this.#pending_count === 0) {
852
- this.#resolve(batch);
853
- if (this.#pending_effect) pause_effect(this.#pending_effect, () => {
854
- this.#pending_effect = null;
855
- });
856
- if (this.#offscreen_fragment) {
857
- this.#anchor.before(this.#offscreen_fragment);
858
- this.#offscreen_fragment = null;
760
+ last_batch = this;
761
+ }
762
+ #is_deferred() {
763
+ if (this.is_fork) return true;
764
+ for (const effect of this.#blocking_pending.keys()) {
765
+ var e = effect;
766
+ var skipped = false;
767
+ while (e.parent !== null) {
768
+ if (this.#skipped_branches.has(e)) {
769
+ skipped = true;
770
+ break;
771
+ }
772
+ e = e.parent;
859
773
  }
774
+ if (!skipped) return true;
860
775
  }
776
+ return false;
861
777
  }
862
778
  /**
863
- * Update the source that powers `$effect.pending()` inside this boundary,
864
- * and controls when the current `pending` snippet (if any) is removed.
865
- * Do not call from inside the class
866
- * @param {1 | -1} d
867
- * @param {Batch} batch
779
+ * Add an effect to the #skipped_branches map and reset its children
780
+ * @param {Effect} effect
868
781
  */
869
- update_pending_count(d, batch) {
870
- this.#update_pending_count(d, batch);
871
- this.#local_pending_count += d;
872
- if (!this.#effect_pending || this.#pending_count_update_queued) return;
873
- this.#pending_count_update_queued = true;
874
- queue_micro_task(() => {
875
- this.#pending_count_update_queued = false;
876
- if (this.#effect_pending) internal_set(this.#effect_pending, this.#local_pending_count);
782
+ skip_effect(effect) {
783
+ if (!this.#skipped_branches.has(effect)) this.#skipped_branches.set(effect, {
784
+ d: [],
785
+ m: []
877
786
  });
878
- }
879
- get_effect_pending() {
880
- this.#effect_pending_subscriber();
881
- return get(this.#effect_pending);
882
- }
883
- /** @param {unknown} error */
884
- error(error) {
885
- if (!this.#props.onerror && !this.#props.failed) throw error;
886
- if (current_batch?.is_fork) {
887
- if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
888
- if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
889
- if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
890
- current_batch.oncommit(() => {
891
- this.#handle_error(error);
892
- });
893
- } else this.#handle_error(error);
787
+ this.#unskipped_branches.delete(effect);
894
788
  }
895
789
  /**
896
- * @param {unknown} error
790
+ * Remove an effect from the #skipped_branches map and reschedule
791
+ * any tracked dirty/maybe_dirty child effects
792
+ * @param {Effect} effect
793
+ * @param {(e: Effect) => void} callback
897
794
  */
898
- #handle_error(error) {
899
- if (this.#main_effect) {
900
- destroy_effect(this.#main_effect);
901
- this.#main_effect = null;
795
+ unskip_effect(effect, callback = (e) => this.schedule(e)) {
796
+ var tracked = this.#skipped_branches.get(effect);
797
+ if (tracked) {
798
+ this.#skipped_branches.delete(effect);
799
+ for (var e of tracked.d) {
800
+ set_signal_status(e, DIRTY);
801
+ callback(e);
802
+ }
803
+ for (e of tracked.m) {
804
+ set_signal_status(e, MAYBE_DIRTY);
805
+ callback(e);
806
+ }
902
807
  }
903
- if (this.#pending_effect) {
904
- destroy_effect(this.#pending_effect);
905
- this.#pending_effect = null;
808
+ this.#unskipped_branches.add(effect);
809
+ }
810
+ #process() {
811
+ this.#started = true;
812
+ if (flush_count++ > 1e3) {
813
+ this.#unlink();
814
+ infinite_loop_guard();
906
815
  }
907
- if (this.#failed_effect) {
908
- destroy_effect(this.#failed_effect);
909
- this.#failed_effect = null;
816
+ for (const e of this.#dirty_effects) {
817
+ this.#maybe_dirty_effects.delete(e);
818
+ set_signal_status(e, DIRTY);
819
+ this.schedule(e);
910
820
  }
911
- if (hydrating) {
912
- set_hydrate_node(this.#hydrate_open);
913
- next();
914
- set_hydrate_node(skip_nodes());
821
+ for (const e of this.#maybe_dirty_effects) {
822
+ set_signal_status(e, MAYBE_DIRTY);
823
+ this.schedule(e);
915
824
  }
916
- let failed = this.#props.failed;
917
- /** @param {unknown} transformed_error */
918
- const handle_error_result = (transformed_error) => {
919
- const { reset, invoke_onerror } = this.#create_reset(transformed_error);
920
- invoke_onerror();
921
- if (failed) this.#failed_effect = this.#run(() => {
922
- try {
923
- return branch(() => {
924
- var effect = active_effect;
925
- effect.b = this;
926
- effect.f |= 128;
927
- failed(this.#anchor, () => transformed_error, () => reset);
928
- });
929
- } catch (error) {
930
- invoke_error_boundary(error, this.#effect.parent);
931
- return null;
825
+ const roots = this.#roots;
826
+ this.#roots = [];
827
+ this.apply();
828
+ /** @type {Effect[]} */
829
+ var effects = collected_effects = [];
830
+ /** @type {Effect[]} */
831
+ var render_effects = [];
832
+ /**
833
+ * @type {Effect[]}
834
+ * @deprecated when we get rid of legacy mode and stores, we can get rid of this
835
+ */
836
+ var updates = legacy_updates = [];
837
+ for (const root of roots) try {
838
+ this.#traverse(root, effects, render_effects);
839
+ } catch (e) {
840
+ reset_all(root);
841
+ if (!this.#is_deferred()) this.discard();
842
+ throw e;
843
+ }
844
+ current_batch = null;
845
+ if (updates.length > 0) {
846
+ var batch = Batch.ensure();
847
+ for (const e of updates) batch.schedule(e);
848
+ }
849
+ collected_effects = null;
850
+ legacy_updates = null;
851
+ if (this.#is_deferred()) {
852
+ this.#defer_effects(render_effects);
853
+ this.#defer_effects(effects);
854
+ for (const [e, t] of this.#skipped_branches) reset_branch(e, t);
855
+ if (updates.length > 0)
856
+ /** @type {Batch} */ current_batch.#process();
857
+ return;
858
+ }
859
+ const earlier_batch = this.#find_earlier_batch();
860
+ if (earlier_batch) {
861
+ this.#defer_effects(render_effects);
862
+ this.#defer_effects(effects);
863
+ earlier_batch.#merge(this);
864
+ return;
865
+ }
866
+ this.#dirty_effects.clear();
867
+ this.#maybe_dirty_effects.clear();
868
+ for (const fn of this.#commit_callbacks) fn(this);
869
+ this.#commit_callbacks.clear();
870
+ previous_batch = this;
871
+ flush_queued_effects(render_effects);
872
+ flush_queued_effects(effects);
873
+ previous_batch = null;
874
+ this.#deferred?.resolve();
875
+ var next_batch = current_batch;
876
+ if (this.#pending === 0 && (this.#roots.length === 0 || next_batch !== null)) {
877
+ this.#unlink();
878
+ }
879
+ if (this.#roots.length > 0) {
880
+ if (next_batch !== null) {
881
+ const batch = next_batch;
882
+ batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
883
+ } else next_batch = this;
884
+ }
885
+ if (next_batch !== null) {
886
+ old_values.clear();
887
+ next_batch.#process();
888
+ }
889
+ }
890
+ /**
891
+ * Traverse the effect tree, executing effects or stashing
892
+ * them for later execution as appropriate
893
+ * @param {Effect} root
894
+ * @param {Effect[]} effects
895
+ * @param {Effect[]} render_effects
896
+ */
897
+ #traverse(root, effects, render_effects) {
898
+ root.f ^= CLEAN;
899
+ var effect = root.first;
900
+ while (effect !== null) {
901
+ var flags = effect.f;
902
+ var is_branch = (flags & 96) !== 0;
903
+ if (!(is_branch && (flags & 1024) !== 0 || (flags & 8192) !== 0 || this.#skipped_branches.has(effect)) && effect.fn !== null) {
904
+ if (is_branch) effect.f ^= CLEAN;
905
+ else if ((flags & 4) !== 0) effects.push(effect);
906
+ else if (is_dirty(effect)) {
907
+ if ((flags & 16) !== 0) this.#maybe_dirty_effects.add(effect);
908
+ update_effect(effect);
909
+ }
910
+ var child = effect.first;
911
+ if (child !== null) {
912
+ effect = child;
913
+ continue;
932
914
  }
933
- });
934
- };
935
- queue_micro_task(() => {
936
- /** @type {unknown} */
937
- var result;
938
- try {
939
- result = this.transform_error(error);
940
- } catch (e) {
941
- invoke_error_boundary(e, this.#effect && this.#effect.parent);
942
- return;
943
915
  }
944
- if (result !== null && typeof result === "object" && typeof result.then === "function")
945
- /** @type {any} */ result.then(
946
- handle_error_result,
947
- /** @param {unknown} e */
948
- (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
949
- );
950
- else handle_error_result(result);
951
- });
916
+ while (effect !== null) {
917
+ var next = effect.next;
918
+ if (next !== null) {
919
+ effect = next;
920
+ break;
921
+ }
922
+ effect = effect.parent;
923
+ }
924
+ }
952
925
  }
953
- };
954
- var OBSOLETE = Symbol("obsolete");
955
- /**
956
- * @param {Derived} derived
957
- * @returns {void}
958
- */
959
- function destroy_derived_effects(derived) {
960
- var effects = derived.effects;
961
- if (effects !== null) {
962
- derived.effects = null;
963
- for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
926
+ #find_earlier_batch() {
927
+ var batch = this.#prev;
928
+ while (batch !== null) {
929
+ if (!batch.is_fork) {
930
+ for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
931
+ }
932
+ batch = batch.#prev;
933
+ }
934
+ return null;
964
935
  }
965
- }
966
- /**
967
- * @template T
968
- * @param {Derived} derived
969
- * @returns {T}
970
- */
971
- function execute_derived(derived) {
972
- var value;
973
- var prev_active_effect = active_effect;
974
- var parent = derived.parent;
975
- if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
976
- derived_inert();
977
- return derived.v;
936
+ /**
937
+ * @param {Batch} batch
938
+ */
939
+ #merge(batch) {
940
+ for (const [source, value] of batch.current) {
941
+ if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
942
+ this.current.set(source, value);
943
+ }
944
+ for (const [effect, deferred] of batch.async_deriveds) {
945
+ const d = this.async_deriveds.get(effect);
946
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
947
+ }
948
+ batch.async_deriveds.clear();
949
+ this.transfer_effects(batch.#dirty_effects, batch.#maybe_dirty_effects);
950
+ /**
951
+ * mark all effects that depend on `batch.current`, except the
952
+ * async effects that we just resolved (TODO unless they depend
953
+ * on values in this batch that are NOT in the later batch?).
954
+ * Through this we also will populate the correct #skipped_branches,
955
+ * oncommit callbacks etc, so we don't need to merge them separately.
956
+ * @param {Value} value
957
+ */
958
+ const mark = (value) => {
959
+ var reactions = value.reactions;
960
+ if (reactions === null) return;
961
+ if ((value.f & 2) !== 0 && (value.f & 6144) === 0) return;
962
+ for (const reaction of reactions) {
963
+ var flags = reaction.f;
964
+ if ((flags & 2) !== 0) mark(reaction);
965
+ else {
966
+ var effect = reaction;
967
+ if (flags & 4194320 && !this.async_deriveds.has(effect)) {
968
+ this.#maybe_dirty_effects.delete(effect);
969
+ set_signal_status(effect, DIRTY);
970
+ this.schedule(effect);
971
+ }
972
+ }
973
+ }
974
+ };
975
+ for (const source of this.current.keys()) mark(source);
976
+ this.oncommit(() => batch.discard());
977
+ batch.#unlink();
978
+ current_batch = this;
979
+ this.#process();
978
980
  }
979
- set_active_effect(parent);
980
- try {
981
- derived.f &= ~WAS_MARKED;
982
- destroy_derived_effects(derived);
983
- value = update_reaction(derived);
984
- } finally {
985
- set_active_effect(prev_active_effect);
981
+ /**
982
+ * @param {Effect[]} effects
983
+ */
984
+ #defer_effects(effects) {
985
+ for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
986
986
  }
987
- return value;
988
- }
989
- /**
990
- * @param {Derived} derived
991
- * @returns {void}
992
- */
993
- function update_derived(derived) {
994
- var value = execute_derived(derived);
995
- if (!derived.equals(value)) {
996
- derived.wv = increment_write_version();
997
- if (!current_batch?.is_fork || derived.deps === null) {
998
- if (current_batch !== null) {
999
- current_batch.capture(derived, value, true);
1000
- previous_batch?.capture(derived, value, true);
1001
- } else derived.v = value;
1002
- if (derived.deps === null) {
1003
- set_signal_status(derived, CLEAN);
1004
- return;
1005
- }
987
+ /**
988
+ * Associate a change to a given source with the current
989
+ * batch, noting its previous and current values
990
+ * @param {Value} source
991
+ * @param {any} value
992
+ * @param {boolean} [is_derived]
993
+ */
994
+ capture(source, value, is_derived = false) {
995
+ if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
996
+ if ((source.f & 8388608) === 0) {
997
+ this.current.set(source, [value, is_derived]);
998
+ batch_values?.set(source, value);
1006
999
  }
1000
+ if (!this.is_fork) source.v = value;
1007
1001
  }
1008
- if (is_destroying_effect) return;
1009
- if (batch_values !== null) {
1010
- if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
1011
- } else update_derived_status(derived);
1012
- }
1013
- /**
1014
- * @param {Derived} derived
1015
- */
1016
- function freeze_derived_effects(derived) {
1017
- if (derived.effects === null) return;
1018
- for (const e of derived.effects) if (e.teardown || e.ac) {
1019
- e.teardown?.();
1020
- if (e.ac !== null) without_reactive_context(() => {
1021
- /** @type {AbortController} */ e.ac.abort(STALE_REACTION);
1022
- e.ac = null;
1023
- });
1024
- if (e.fn !== null) e.teardown = noop;
1025
- remove_reactions(e, 0);
1026
- destroy_effect_children(e);
1002
+ activate() {
1003
+ current_batch = this;
1004
+ }
1005
+ deactivate() {
1006
+ current_batch = null;
1007
+ batch_values = null;
1008
+ }
1009
+ flush() {
1010
+ try {
1011
+ is_processing = true;
1012
+ current_batch = this;
1013
+ this.#process();
1014
+ } finally {
1015
+ flush_count = 0;
1016
+ last_scheduled_effect = null;
1017
+ collected_effects = null;
1018
+ legacy_updates = null;
1019
+ is_processing = false;
1020
+ current_batch = null;
1021
+ batch_values = null;
1022
+ old_values.clear();
1023
+ }
1024
+ }
1025
+ discard() {
1026
+ for (const fn of this.#discard_callbacks) fn(this);
1027
+ this.#discard_callbacks.clear();
1028
+ for (const deferred of this.async_deriveds.values()) deferred.reject(OBSOLETE);
1029
+ this.#unlink();
1030
+ this.#deferred?.resolve();
1027
1031
  }
1028
- }
1029
- /**
1030
- * @param {Derived} derived
1031
- */
1032
- function unfreeze_derived_effects(derived) {
1033
- if (derived.effects === null) return;
1034
- for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
1035
- }
1036
- //#endregion
1037
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/reactivity/batch.js
1038
- /** @import { Fork } from 'svelte' */
1039
- /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
1040
- /** @type {Batch | null} */
1041
- var first_batch = null;
1042
- /** @type {Batch | null} */
1043
- var last_batch = null;
1044
- /** @type {Batch | null} */
1045
- var current_batch = null;
1046
- /**
1047
- * This is needed to avoid overwriting inputs
1048
- * @type {Batch | null}
1049
- */
1050
- var previous_batch = null;
1051
- /**
1052
- * When time travelling (i.e. working in one batch, while other batches
1053
- * still have ongoing work), we ignore the real values of affected
1054
- * signals in favour of their values within the batch
1055
- * @type {Map<Value, any> | null}
1056
- */
1057
- var batch_values = null;
1058
- /** @type {Effect | null} */
1059
- var last_scheduled_effect = null;
1060
- var is_flushing_sync = false;
1061
- var is_processing = false;
1062
- /**
1063
- * During traversal, this is an array. Newly created effects are (if not immediately
1064
- * executed) pushed to this array, rather than going through the scheduling
1065
- * rigamarole that would cause another turn of the flush loop.
1066
- * @type {Effect[] | null}
1067
- */
1068
- var collected_effects = null;
1069
- /**
1070
- * An array of effects that are marked during traversal as a result of a `set`
1071
- * (not `internal_set`) call. These will be added to the next batch and
1072
- * trigger another `batch.process()`
1073
- * @type {Effect[] | null}
1074
- * @deprecated when we get rid of legacy mode and stores, we can get rid of this
1075
- */
1076
- var legacy_updates = null;
1077
- var flush_count = 0;
1078
- var uid = 1;
1079
- var Batch = class Batch {
1080
- id = uid++;
1081
- /** True as soon as `#process` was called */
1082
- #started = false;
1083
- linked = true;
1084
- /** @type {Batch | null} */
1085
- #prev = null;
1086
- /** @type {Batch | null} */
1087
- #next = null;
1088
- /** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
1089
- async_deriveds = /* @__PURE__ */ new Map();
1090
- /**
1091
- * The current values of any signals that are updated in this batch.
1092
- * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
1093
- * They keys of this map are identical to `this.#previous`
1094
- * @type {Map<Value, [any, boolean]>}
1095
- */
1096
- current = /* @__PURE__ */ new Map();
1097
- /**
1098
- * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
1099
- * They keys of this map are identical to `this.#current`
1100
- * @type {Map<Value, any>}
1101
- */
1102
- previous = /* @__PURE__ */ new Map();
1103
- /**
1104
- * When the batch is committed (and the DOM is updated), we need to remove old branches
1105
- * and append new ones by calling the functions added inside (if/each/key/etc) blocks
1106
- * @type {Set<(batch: Batch) => void>}
1107
- */
1108
- #commit_callbacks = /* @__PURE__ */ new Set();
1109
- /**
1110
- * If a fork is discarded, we need to destroy any effects that are no longer needed
1111
- * @type {Set<(batch: Batch) => void>}
1112
- */
1113
- #discard_callbacks = /* @__PURE__ */ new Set();
1114
- /**
1115
- * The number of async effects that are currently in flight
1116
- */
1117
- #pending = 0;
1118
- /**
1119
- * Async effects that are currently in flight, _not_ inside a pending boundary
1120
- * @type {Map<Effect, number>}
1121
- */
1122
- #blocking_pending = /* @__PURE__ */ new Map();
1123
- /**
1124
- * A deferred that resolves when the batch is committed, used with `settled()`
1125
- * TODO replace with Promise.withResolvers once supported widely enough
1126
- * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
1127
- */
1128
- #deferred = null;
1129
- /**
1130
- * The root effects that need to be flushed
1131
- * @type {Effect[]}
1132
- */
1133
- #roots = [];
1134
- /**
1135
- * Effects created while this batch was active.
1136
- * @type {Effect[]}
1137
- */
1138
- #new_effects = [];
1139
- /**
1140
- * Deferred effects (which run after async work has completed) that are DIRTY
1141
- * @type {Set<Effect>}
1142
- */
1143
- #dirty_effects = /* @__PURE__ */ new Set();
1144
- /**
1145
- * Deferred effects that are MAYBE_DIRTY
1146
- * @type {Set<Effect>}
1147
- */
1148
- #maybe_dirty_effects = /* @__PURE__ */ new Set();
1149
- /**
1150
- * A map of branches that still exist, but will be destroyed when this batch
1151
- * is committed — we skip over these during `process`.
1152
- * The value contains child effects that were dirty/maybe_dirty before being reset,
1153
- * so they can be rescheduled if the branch survives.
1154
- * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
1155
- */
1156
- #skipped_branches = /* @__PURE__ */ new Map();
1157
1032
  /**
1158
- * Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
1159
- * @type {Set<Effect>}
1033
+ * @param {Effect} effect
1160
1034
  */
1161
- #unskipped_branches = /* @__PURE__ */ new Set();
1162
- is_fork = false;
1163
- #decrement_queued = false;
1164
- constructor() {
1165
- if (last_batch === null) first_batch = last_batch = this;
1166
- else {
1167
- last_batch.#next = this;
1168
- this.#prev = last_batch;
1169
- }
1170
- last_batch = this;
1035
+ register_created_effect(effect) {
1036
+ this.#new_effects.push(effect);
1171
1037
  }
1172
- #is_deferred() {
1173
- if (this.is_fork) return true;
1174
- for (const effect of this.#blocking_pending.keys()) {
1175
- var e = effect;
1176
- var skipped = false;
1177
- while (e.parent !== null) {
1178
- if (this.#skipped_branches.has(e)) {
1179
- skipped = true;
1180
- break;
1038
+ #commit() {
1039
+ for (let batch = first_batch; batch !== null; batch = batch.#next) {
1040
+ var is_earlier = batch.id < this.id;
1041
+ /** @type {Source[]} */
1042
+ var sources = [];
1043
+ for (const [source, [value, is_derived]] of this.current) {
1044
+ if (batch.current.has(source)) {
1045
+ var batch_value = batch.current.get(source)[0];
1046
+ if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
1047
+ else continue;
1181
1048
  }
1182
- e = e.parent;
1049
+ sources.push(source);
1050
+ }
1051
+ if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
1052
+ const d = batch.async_deriveds.get(effect);
1053
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
1054
+ }
1055
+ var current = [...batch.current.keys()].filter((source) => !batch.current.get(source)[1]);
1056
+ if (!batch.#started || current.length === 0) continue;
1057
+ var others = current.filter((source) => !this.current.has(source));
1058
+ if (others.length === 0) {
1059
+ if (is_earlier) batch.discard();
1060
+ } else if (sources.length > 0) {
1061
+ if (is_earlier) for (const unskipped of this.#unskipped_branches) batch.unskip_effect(unskipped, (e) => {
1062
+ if ((e.f & 4194320) !== 0) batch.schedule(e);
1063
+ else batch.#defer_effects([e]);
1064
+ });
1065
+ batch.activate();
1066
+ /** @type {Set<Value>} */
1067
+ var marked = /* @__PURE__ */ new Set();
1068
+ /** @type {Map<Reaction, boolean>} */
1069
+ var checked = /* @__PURE__ */ new Map();
1070
+ for (var source of sources) mark_effects(source, others, marked, checked);
1071
+ checked = /* @__PURE__ */ new Map();
1072
+ var current_unequal = [...batch.current].filter(([c, v1]) => {
1073
+ const v2 = this.current.get(c);
1074
+ if (!v2) return true;
1075
+ return v2[0] !== v1[0] || v2[1] !== v1[1];
1076
+ }).map(([c]) => c);
1077
+ if (current_unequal.length > 0) {
1078
+ for (const effect of this.#new_effects) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) {
1079
+ if ((effect.f & 4194320) !== 0) {
1080
+ set_signal_status(effect, DIRTY);
1081
+ batch.schedule(effect);
1082
+ } else batch.#dirty_effects.add(effect);
1083
+ }
1084
+ }
1085
+ if (batch.#roots.length > 0 && !batch.#decrement_queued) {
1086
+ batch.apply();
1087
+ for (var root of batch.#roots) batch.#traverse(root, [], []);
1088
+ batch.#roots = [];
1089
+ }
1090
+ batch.deactivate();
1183
1091
  }
1184
- if (!skipped) return true;
1185
1092
  }
1186
- return false;
1187
1093
  }
1188
1094
  /**
1189
- * Add an effect to the #skipped_branches map and reset its children
1095
+ * @param {boolean} blocking
1190
1096
  * @param {Effect} effect
1191
1097
  */
1192
- skip_effect(effect) {
1193
- if (!this.#skipped_branches.has(effect)) this.#skipped_branches.set(effect, {
1194
- d: [],
1195
- m: []
1196
- });
1197
- this.#unskipped_branches.delete(effect);
1098
+ increment(blocking, effect) {
1099
+ this.#pending += 1;
1100
+ if (blocking) {
1101
+ let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1102
+ this.#blocking_pending.set(effect, blocking_pending_count + 1);
1103
+ }
1198
1104
  }
1199
1105
  /**
1200
- * Remove an effect from the #skipped_branches map and reschedule
1201
- * any tracked dirty/maybe_dirty child effects
1106
+ * @param {boolean} blocking
1202
1107
  * @param {Effect} effect
1203
- * @param {(e: Effect) => void} callback
1204
1108
  */
1205
- unskip_effect(effect, callback = (e) => this.schedule(e)) {
1206
- var tracked = this.#skipped_branches.get(effect);
1207
- if (tracked) {
1208
- this.#skipped_branches.delete(effect);
1209
- for (var e of tracked.d) {
1210
- set_signal_status(e, DIRTY);
1211
- callback(e);
1212
- }
1213
- for (e of tracked.m) {
1214
- set_signal_status(e, MAYBE_DIRTY);
1215
- callback(e);
1216
- }
1217
- }
1218
- this.#unskipped_branches.add(effect);
1219
- }
1220
- #process() {
1221
- this.#started = true;
1222
- if (flush_count++ > 1e3) {
1223
- this.#unlink();
1224
- infinite_loop_guard();
1225
- }
1226
- for (const e of this.#dirty_effects) {
1227
- this.#maybe_dirty_effects.delete(e);
1228
- set_signal_status(e, DIRTY);
1229
- this.schedule(e);
1230
- }
1231
- for (const e of this.#maybe_dirty_effects) {
1232
- set_signal_status(e, MAYBE_DIRTY);
1233
- this.schedule(e);
1234
- }
1235
- const roots = this.#roots;
1236
- this.#roots = [];
1237
- this.apply();
1238
- /** @type {Effect[]} */
1239
- var effects = collected_effects = [];
1240
- /** @type {Effect[]} */
1241
- var render_effects = [];
1242
- /**
1243
- * @type {Effect[]}
1244
- * @deprecated when we get rid of legacy mode and stores, we can get rid of this
1245
- */
1246
- var updates = legacy_updates = [];
1247
- for (const root of roots) try {
1248
- this.#traverse(root, effects, render_effects);
1249
- } catch (e) {
1250
- reset_all(root);
1251
- if (!this.#is_deferred()) this.discard();
1252
- throw e;
1253
- }
1254
- current_batch = null;
1255
- if (updates.length > 0) {
1256
- var batch = Batch.ensure();
1257
- for (const e of updates) batch.schedule(e);
1258
- }
1259
- collected_effects = null;
1260
- legacy_updates = null;
1261
- if (this.#is_deferred()) {
1262
- this.#defer_effects(render_effects);
1263
- this.#defer_effects(effects);
1264
- for (const [e, t] of this.#skipped_branches) reset_branch(e, t);
1265
- if (updates.length > 0)
1266
- /** @type {Batch} */ current_batch.#process();
1267
- return;
1268
- }
1269
- const earlier_batch = this.#find_earlier_batch();
1270
- if (earlier_batch) {
1271
- this.#defer_effects(render_effects);
1272
- this.#defer_effects(effects);
1273
- earlier_batch.#merge(this);
1274
- return;
1275
- }
1276
- this.#dirty_effects.clear();
1277
- this.#maybe_dirty_effects.clear();
1278
- for (const fn of this.#commit_callbacks) fn(this);
1279
- this.#commit_callbacks.clear();
1280
- previous_batch = this;
1281
- flush_queued_effects(render_effects);
1282
- flush_queued_effects(effects);
1283
- previous_batch = null;
1284
- this.#deferred?.resolve();
1285
- var next_batch = current_batch;
1286
- if (this.#pending === 0 && (this.#roots.length === 0 || next_batch !== null)) {
1287
- this.#unlink();
1288
- }
1289
- if (this.#roots.length > 0) {
1290
- if (next_batch !== null) {
1291
- const batch = next_batch;
1292
- batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
1293
- } else next_batch = this;
1109
+ decrement(blocking, effect) {
1110
+ this.#pending -= 1;
1111
+ if (blocking) {
1112
+ let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1113
+ if (blocking_pending_count === 1) this.#blocking_pending.delete(effect);
1114
+ else this.#blocking_pending.set(effect, blocking_pending_count - 1);
1294
1115
  }
1295
- if (next_batch !== null) next_batch.#process();
1116
+ if (this.#decrement_queued) return;
1117
+ this.#decrement_queued = true;
1118
+ queue_micro_task(() => {
1119
+ this.#decrement_queued = false;
1120
+ if (this.linked) this.flush();
1121
+ });
1296
1122
  }
1297
1123
  /**
1298
- * Traverse the effect tree, executing effects or stashing
1299
- * them for later execution as appropriate
1300
- * @param {Effect} root
1301
- * @param {Effect[]} effects
1302
- * @param {Effect[]} render_effects
1124
+ * @param {Set<Effect>} dirty_effects
1125
+ * @param {Set<Effect>} maybe_dirty_effects
1303
1126
  */
1304
- #traverse(root, effects, render_effects) {
1305
- root.f ^= CLEAN;
1306
- var effect = root.first;
1307
- while (effect !== null) {
1308
- var flags = effect.f;
1309
- var is_branch = (flags & 96) !== 0;
1310
- if (!(is_branch && (flags & 1024) !== 0 || (flags & 8192) !== 0 || this.#skipped_branches.has(effect)) && effect.fn !== null) {
1311
- if (is_branch) effect.f ^= CLEAN;
1312
- else if ((flags & 4) !== 0) effects.push(effect);
1313
- else if (is_dirty(effect)) {
1314
- if ((flags & 16) !== 0) this.#maybe_dirty_effects.add(effect);
1315
- update_effect(effect);
1316
- }
1317
- var child = effect.first;
1318
- if (child !== null) {
1319
- effect = child;
1320
- continue;
1321
- }
1322
- }
1323
- while (effect !== null) {
1324
- var next = effect.next;
1325
- if (next !== null) {
1326
- effect = next;
1327
- break;
1328
- }
1329
- effect = effect.parent;
1330
- }
1127
+ transfer_effects(dirty_effects, maybe_dirty_effects) {
1128
+ for (const e of dirty_effects) this.#dirty_effects.add(e);
1129
+ for (const e of maybe_dirty_effects) this.#maybe_dirty_effects.add(e);
1130
+ dirty_effects.clear();
1131
+ maybe_dirty_effects.clear();
1132
+ }
1133
+ /** @param {(batch: Batch) => void} fn */
1134
+ oncommit(fn) {
1135
+ this.#commit_callbacks.add(fn);
1136
+ }
1137
+ /** @param {(batch: Batch) => void} fn */
1138
+ ondiscard(fn) {
1139
+ this.#discard_callbacks.add(fn);
1140
+ }
1141
+ settled() {
1142
+ return (this.#deferred ??= deferred()).promise;
1143
+ }
1144
+ static ensure() {
1145
+ if (current_batch === null) {
1146
+ const batch = current_batch = new Batch();
1147
+ if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
1148
+ if (!batch.#started) batch.flush();
1149
+ });
1331
1150
  }
1151
+ return current_batch;
1332
1152
  }
1333
- #find_earlier_batch() {
1334
- var batch = this.#prev;
1335
- while (batch !== null) {
1336
- if (!batch.is_fork) {
1337
- for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
1338
- }
1339
- batch = batch.#prev;
1153
+ apply() {
1154
+ {
1155
+ batch_values = null;
1156
+ return;
1340
1157
  }
1341
- return null;
1342
1158
  }
1343
1159
  /**
1344
- * @param {Batch} batch
1160
+ *
1161
+ * @param {Effect} effect
1345
1162
  */
1346
- #merge(batch) {
1347
- for (const [source, value] of batch.current) {
1348
- if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
1349
- this.current.set(source, value);
1350
- }
1351
- for (const [effect, deferred] of batch.async_deriveds) {
1352
- const d = this.async_deriveds.get(effect);
1353
- if (d) deferred.promise.then(d.resolve).catch(d.reject);
1163
+ schedule(effect) {
1164
+ last_scheduled_effect = effect;
1165
+ if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
1166
+ effect.b.defer_effect(effect);
1167
+ return;
1354
1168
  }
1355
- batch.async_deriveds.clear();
1356
- this.transfer_effects(batch.#dirty_effects, batch.#maybe_dirty_effects);
1357
- /**
1358
- * mark all effects that depend on `batch.current`, except the
1359
- * async effects that we just resolved (TODO unless they depend
1360
- * on values in this batch that are NOT in the later batch?).
1361
- * Through this we also will populate the correct #skipped_branches,
1362
- * oncommit callbacks etc, so we don't need to merge them separately.
1363
- * @param {Value} value
1364
- */
1365
- const mark = (value) => {
1366
- var reactions = value.reactions;
1367
- if (reactions === null) return;
1368
- if ((value.f & 2) !== 0 && (value.f & 6144) === 0) return;
1369
- for (const reaction of reactions) {
1370
- var flags = reaction.f;
1371
- if ((flags & 2) !== 0) mark(reaction);
1372
- else {
1373
- var effect = reaction;
1374
- if (flags & 4194320 && !this.async_deriveds.has(effect)) {
1375
- this.#maybe_dirty_effects.delete(effect);
1376
- set_signal_status(effect, DIRTY);
1377
- this.schedule(effect);
1378
- }
1379
- }
1169
+ var e = effect;
1170
+ while (e.parent !== null) {
1171
+ e = e.parent;
1172
+ var flags = e.f;
1173
+ if (collected_effects !== null && e === active_effect) {
1174
+ if ((active_reaction === null || (active_reaction.f & 2) === 0) && true) return;
1380
1175
  }
1381
- };
1382
- for (const source of this.current.keys()) mark(source);
1383
- this.oncommit(() => batch.discard());
1384
- batch.#unlink();
1385
- current_batch = this;
1386
- this.#process();
1176
+ if ((flags & 96) !== 0) {
1177
+ if ((flags & 1024) === 0) return;
1178
+ e.f ^= CLEAN;
1179
+ }
1180
+ }
1181
+ this.#roots.push(e);
1387
1182
  }
1388
- /**
1389
- * @param {Effect[]} effects
1390
- */
1391
- #defer_effects(effects) {
1392
- for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
1393
- }
1394
- /**
1395
- * Associate a change to a given source with the current
1396
- * batch, noting its previous and current values
1397
- * @param {Value} source
1398
- * @param {any} value
1399
- * @param {boolean} [is_derived]
1400
- */
1401
- capture(source, value, is_derived = false) {
1402
- if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
1403
- if ((source.f & 8388608) === 0) {
1404
- this.current.set(source, [value, is_derived]);
1405
- batch_values?.set(source, value);
1406
- }
1407
- if (!this.is_fork) source.v = value;
1408
- }
1409
- activate() {
1410
- current_batch = this;
1411
- }
1412
- deactivate() {
1413
- current_batch = null;
1414
- batch_values = null;
1415
- }
1416
- flush() {
1417
- try {
1418
- is_processing = true;
1419
- current_batch = this;
1420
- this.#process();
1421
- } finally {
1422
- flush_count = 0;
1423
- last_scheduled_effect = null;
1424
- collected_effects = null;
1425
- legacy_updates = null;
1426
- is_processing = false;
1427
- current_batch = null;
1428
- batch_values = null;
1429
- old_values.clear();
1430
- }
1431
- }
1432
- discard() {
1433
- for (const fn of this.#discard_callbacks) fn(this);
1434
- this.#discard_callbacks.clear();
1435
- for (const deferred of this.async_deriveds.values()) deferred.reject(OBSOLETE);
1436
- this.#unlink();
1437
- this.#deferred?.resolve();
1438
- }
1439
- /**
1440
- * @param {Effect} effect
1441
- */
1442
- register_created_effect(effect) {
1443
- this.#new_effects.push(effect);
1444
- }
1445
- #commit() {
1446
- for (let batch = first_batch; batch !== null; batch = batch.#next) {
1447
- var is_earlier = batch.id < this.id;
1448
- /** @type {Source[]} */
1449
- var sources = [];
1450
- for (const [source, [value, is_derived]] of this.current) {
1451
- if (batch.current.has(source)) {
1452
- var batch_value = batch.current.get(source)[0];
1453
- if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
1454
- else continue;
1455
- }
1456
- sources.push(source);
1457
- }
1458
- if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
1459
- const d = batch.async_deriveds.get(effect);
1460
- if (d) deferred.promise.then(d.resolve).catch(d.reject);
1461
- }
1462
- var current = [...batch.current.keys()].filter((source) => !batch.current.get(source)[1]);
1463
- if (!batch.#started || current.length === 0) continue;
1464
- var others = current.filter((source) => !this.current.has(source));
1465
- if (others.length === 0) {
1466
- if (is_earlier) batch.discard();
1467
- } else if (sources.length > 0) {
1468
- if (is_earlier) for (const unskipped of this.#unskipped_branches) batch.unskip_effect(unskipped, (e) => {
1469
- if ((e.f & 4194320) !== 0) batch.schedule(e);
1470
- else batch.#defer_effects([e]);
1471
- });
1472
- batch.activate();
1473
- /** @type {Set<Value>} */
1474
- var marked = /* @__PURE__ */ new Set();
1475
- /** @type {Map<Reaction, boolean>} */
1476
- var checked = /* @__PURE__ */ new Map();
1477
- for (var source of sources) mark_effects(source, others, marked, checked);
1478
- checked = /* @__PURE__ */ new Map();
1479
- var current_unequal = [...batch.current].filter(([c, v1]) => {
1480
- const v2 = this.current.get(c);
1481
- if (!v2) return true;
1482
- return v2[0] !== v1[0] || v2[1] !== v1[1];
1483
- }).map(([c]) => c);
1484
- if (current_unequal.length > 0) {
1485
- for (const effect of this.#new_effects) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) {
1486
- if ((effect.f & 4194320) !== 0) {
1487
- set_signal_status(effect, DIRTY);
1488
- batch.schedule(effect);
1489
- } else batch.#dirty_effects.add(effect);
1490
- }
1491
- }
1492
- if (batch.#roots.length > 0 && !batch.#decrement_queued) {
1493
- batch.apply();
1494
- for (var root of batch.#roots) batch.#traverse(root, [], []);
1495
- batch.#roots = [];
1496
- }
1497
- batch.deactivate();
1498
- }
1499
- }
1500
- }
1501
- /**
1502
- * @param {boolean} blocking
1503
- * @param {Effect} effect
1504
- */
1505
- increment(blocking, effect) {
1506
- this.#pending += 1;
1507
- if (blocking) {
1508
- let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1509
- this.#blocking_pending.set(effect, blocking_pending_count + 1);
1510
- }
1511
- }
1512
- /**
1513
- * @param {boolean} blocking
1514
- * @param {Effect} effect
1515
- */
1516
- decrement(blocking, effect) {
1517
- this.#pending -= 1;
1518
- if (blocking) {
1519
- let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1520
- if (blocking_pending_count === 1) this.#blocking_pending.delete(effect);
1521
- else this.#blocking_pending.set(effect, blocking_pending_count - 1);
1522
- }
1523
- if (this.#decrement_queued) return;
1524
- this.#decrement_queued = true;
1525
- queue_micro_task(() => {
1526
- this.#decrement_queued = false;
1527
- if (this.linked) this.flush();
1528
- });
1529
- }
1530
- /**
1531
- * @param {Set<Effect>} dirty_effects
1532
- * @param {Set<Effect>} maybe_dirty_effects
1533
- */
1534
- transfer_effects(dirty_effects, maybe_dirty_effects) {
1535
- for (const e of dirty_effects) this.#dirty_effects.add(e);
1536
- for (const e of maybe_dirty_effects) this.#maybe_dirty_effects.add(e);
1537
- dirty_effects.clear();
1538
- maybe_dirty_effects.clear();
1539
- }
1540
- /** @param {(batch: Batch) => void} fn */
1541
- oncommit(fn) {
1542
- this.#commit_callbacks.add(fn);
1543
- }
1544
- /** @param {(batch: Batch) => void} fn */
1545
- ondiscard(fn) {
1546
- this.#discard_callbacks.add(fn);
1547
- }
1548
- settled() {
1549
- return (this.#deferred ??= deferred()).promise;
1550
- }
1551
- static ensure() {
1552
- if (current_batch === null) {
1553
- const batch = current_batch = new Batch();
1554
- if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
1555
- if (!batch.#started) batch.flush();
1556
- });
1557
- }
1558
- return current_batch;
1559
- }
1560
- apply() {
1561
- {
1562
- batch_values = null;
1563
- return;
1564
- }
1565
- }
1566
- /**
1567
- *
1568
- * @param {Effect} effect
1569
- */
1570
- schedule(effect) {
1571
- last_scheduled_effect = effect;
1572
- if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
1573
- effect.b.defer_effect(effect);
1574
- return;
1575
- }
1576
- var e = effect;
1577
- while (e.parent !== null) {
1578
- e = e.parent;
1579
- var flags = e.f;
1580
- if (collected_effects !== null && e === active_effect) {
1581
- if ((active_reaction === null || (active_reaction.f & 2) === 0) && true) return;
1582
- }
1583
- if ((flags & 96) !== 0) {
1584
- if ((flags & 1024) === 0) return;
1585
- e.f ^= CLEAN;
1586
- }
1587
- }
1588
- this.#roots.push(e);
1589
- }
1590
- #unlink() {
1591
- if (!this.linked) return;
1592
- var prev = this.#prev;
1593
- var next = this.#next;
1594
- if (prev === null) first_batch = next;
1595
- else prev.#next = next;
1596
- if (next === null) last_batch = prev;
1597
- else next.#prev = prev;
1598
- this.linked = false;
1183
+ #unlink() {
1184
+ if (!this.linked) return;
1185
+ var prev = this.#prev;
1186
+ var next = this.#next;
1187
+ if (prev === null) first_batch = next;
1188
+ else prev.#next = next;
1189
+ if (next === null) last_batch = prev;
1190
+ else next.#prev = prev;
1191
+ this.linked = false;
1599
1192
  }
1600
1193
  };
1601
1194
  /**
@@ -1746,7 +1339,7 @@ function reset_all(effect) {
1746
1339
  }
1747
1340
  }
1748
1341
  //#endregion
1749
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/reactivity/sources.js
1342
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/reactivity/sources.js
1750
1343
  /** @import { Derived, Effect, Source, Value } from '#client' */
1751
1344
  /** @type {Set<Effect>} */
1752
1345
  var eager_effects = /* @__PURE__ */ new Set();
@@ -1812,7 +1405,8 @@ function set(source, value, should_proxy = false) {
1812
1405
  */
1813
1406
  function internal_set(source, value, updated_during_traversal = null) {
1814
1407
  if (!source.equals(value)) {
1815
- old_values.set(source, is_destroying_effect ? value : source.v);
1408
+ if (is_destroying_effect) old_values.set(source, value);
1409
+ else if (!old_values.has(source)) old_values.set(source, source.v);
1816
1410
  var batch = Batch.ensure();
1817
1411
  batch.capture(source, value);
1818
1412
  if ((source.f & 2) !== 0) {
@@ -1888,7 +1482,7 @@ function mark_reactions(signal, status, updated_during_traversal) {
1888
1482
  * @returns {T}
1889
1483
  */
1890
1484
  function proxy(value) {
1891
- if (typeof value !== "object" || value === null || STATE_SYMBOL in value) return value;
1485
+ if (typeof value !== "object" || value === null || STATE_SYMBOL in value || COMPONENT_SYMBOL in value) return value;
1892
1486
  const prototype = get_prototype_of(value);
1893
1487
  if (prototype !== object_prototype && prototype !== array_prototype) return value;
1894
1488
  /** @type {Map<any, Source<any>>} */
@@ -2038,7 +1632,7 @@ function proxy(value) {
2038
1632
  });
2039
1633
  }
2040
1634
  //#endregion
2041
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/operations.js
1635
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/operations.js
2042
1636
  /** @type {Window} */
2043
1637
  var $window;
2044
1638
  /** @type {() => Node | null} */
@@ -2097,8 +1691,40 @@ function get_next_sibling(node) {
2097
1691
  function clear_text_content(node) {
2098
1692
  node.textContent = "";
2099
1693
  }
1694
+ /**
1695
+ * @param {unknown} error
1696
+ */
1697
+ function handle_error(error) {
1698
+ var effect = active_effect;
1699
+ if (effect === null) {
1700
+ /** @type {Derived} */ active_reaction.f |= ERROR_VALUE;
1701
+ return error;
1702
+ }
1703
+ if ((effect.f & 32768) === 0 && (effect.f & 4) === 0) throw error;
1704
+ invoke_error_boundary(error, effect);
1705
+ }
1706
+ /**
1707
+ * @param {unknown} error
1708
+ * @param {Effect | null} effect
1709
+ */
1710
+ function invoke_error_boundary(error, effect) {
1711
+ if (effect !== null && (effect.f & 16384) !== 0) return;
1712
+ while (effect !== null) {
1713
+ if ((effect.f & 128) !== 0 && (effect.f & 33570816) === 0) {
1714
+ if ((effect.f & 32768) === 0) throw error;
1715
+ try {
1716
+ /** @type {Boundary} */ effect.b.error(error);
1717
+ return;
1718
+ } catch (e) {
1719
+ error = e;
1720
+ }
1721
+ }
1722
+ effect = effect.parent;
1723
+ }
1724
+ throw error;
1725
+ }
2100
1726
  //#endregion
2101
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/reactivity/effects.js
1727
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/reactivity/effects.js
2102
1728
  /** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
2103
1729
  /**
2104
1730
  * @param {Effect} effect
@@ -2232,6 +1858,8 @@ function execute_effect_teardown(effect) {
2232
1858
  set_active_reaction(null);
2233
1859
  try {
2234
1860
  teardown.call(null);
1861
+ } catch (error) {
1862
+ invoke_error_boundary(error, effect.parent);
2235
1863
  } finally {
2236
1864
  set_is_destroying_effect(previously_destroying_effect);
2237
1865
  set_active_reaction(previous_reaction);
@@ -2334,6 +1962,7 @@ function unlink_effect(effect) {
2334
1962
  function pause_effect(effect, callback, destroy = true) {
2335
1963
  /** @type {TransitionManager[]} */
2336
1964
  var transitions = [];
1965
+ effect.f |= 256;
2337
1966
  pause_children(effect, transitions, true);
2338
1967
  var fn = () => {
2339
1968
  if (destroy) destroy_effect(effect);
@@ -2384,7 +2013,7 @@ function move_effect(effect, fragment) {
2384
2013
  }
2385
2014
  }
2386
2015
  //#endregion
2387
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/runtime.js
2016
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/runtime.js
2388
2017
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
2389
2018
  /**
2390
2019
  * True if updating in an effect context that is reactive (i.e. not branch/root effects)
@@ -2441,7 +2070,7 @@ function set_untracked_writes(value) {
2441
2070
  * Version starts from 1 so that unowned deriveds differentiate between a created effect and a run one for tracing
2442
2071
  **/
2443
2072
  var write_version = 1;
2444
- /** @type {number} Used to version each read of a source of derived to avoid duplicating depedencies inside a reaction */
2073
+ /** @type {number} Used to version each read of a source of derived to avoid duplicating dependencies inside a reaction */
2445
2074
  var read_version = 0;
2446
2075
  var update_version = read_version;
2447
2076
  /** @param {number} value */
@@ -2522,21 +2151,8 @@ function update_reaction(reaction) {
2522
2151
  var fn = reaction.fn;
2523
2152
  var result = fn();
2524
2153
  reaction.f |= REACTION_RAN;
2525
- var deps = reaction.deps;
2526
- var is_fork = current_batch?.is_fork;
2527
- if (new_deps !== null) {
2528
- var i;
2529
- if (!is_fork) remove_reactions(reaction, skipped_deps);
2530
- if (deps !== null && skipped_deps > 0) {
2531
- deps.length = skipped_deps + new_deps.length;
2532
- for (i = 0; i < new_deps.length; i++) deps[skipped_deps + i] = new_deps[i];
2533
- } else reaction.deps = deps = new_deps;
2534
- if (effect_tracking() && (reaction.f & 512) !== 0) for (i = skipped_deps; i < deps.length; i++) (deps[i].reactions ??= []).push(reaction);
2535
- } else if (!is_fork && deps !== null && skipped_deps < deps.length) {
2536
- remove_reactions(reaction, skipped_deps);
2537
- deps.length = skipped_deps;
2538
- }
2539
- if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & 6146) === 0) for (i = 0; i < untracked_writes.length; i++) schedule_possible_effect_self_invalidation(untracked_writes[i], reaction);
2154
+ var deps = update_dependencies(reaction);
2155
+ if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & 6146) === 0) for (var i = 0; i < untracked_writes.length; i++) schedule_possible_effect_self_invalidation(untracked_writes[i], reaction);
2540
2156
  if (previous_reaction !== null && previous_reaction !== reaction) {
2541
2157
  read_version++;
2542
2158
  if (previous_reaction.deps !== null) for (let i = 0; i < previous_skipped_deps; i += 1) previous_reaction.deps[i].rv = read_version;
@@ -2549,6 +2165,7 @@ function update_reaction(reaction) {
2549
2165
  if ((reaction.f & 8388608) !== 0) reaction.f ^= ERROR_VALUE;
2550
2166
  return result;
2551
2167
  } catch (error) {
2168
+ update_dependencies(reaction);
2552
2169
  return handle_error(error);
2553
2170
  } finally {
2554
2171
  reaction.f ^= REACTION_IS_UPDATING;
@@ -2563,6 +2180,26 @@ function update_reaction(reaction) {
2563
2180
  }
2564
2181
  }
2565
2182
  /**
2183
+ * @param {Reaction} reaction
2184
+ */
2185
+ function update_dependencies(reaction) {
2186
+ var deps = reaction.deps;
2187
+ var is_fork = current_batch?.is_fork;
2188
+ if (new_deps !== null) {
2189
+ var i;
2190
+ if (!is_fork) remove_reactions(reaction, skipped_deps);
2191
+ if (deps !== null && skipped_deps > 0) {
2192
+ deps.length = skipped_deps + new_deps.length;
2193
+ for (i = 0; i < new_deps.length; i++) deps[skipped_deps + i] = new_deps[i];
2194
+ } else reaction.deps = deps = new_deps;
2195
+ if (effect_tracking() && (reaction.f & 512) !== 0) for (i = skipped_deps; i < deps.length; i++) (deps[i].reactions ??= []).push(reaction);
2196
+ } else if (!is_fork && deps !== null && skipped_deps < deps.length) {
2197
+ remove_reactions(reaction, skipped_deps);
2198
+ deps.length = skipped_deps;
2199
+ }
2200
+ return deps;
2201
+ }
2202
+ /**
2566
2203
  * @template V
2567
2204
  * @param {Reaction} signal
2568
2205
  * @param {Value<V>} dependency
@@ -2733,7 +2370,7 @@ function untrack(fn) {
2733
2370
  }
2734
2371
  }
2735
2372
  //#endregion
2736
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/store/shared/index.js
2373
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/store/shared/index.js
2737
2374
  /** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
2738
2375
  /** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */
2739
2376
  /**
@@ -2823,7 +2460,7 @@ function set_read_implementation(fn) {
2823
2460
  read_implementation = fn;
2824
2461
  }
2825
2462
  //#endregion
2826
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/elements/events.js
2463
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/elements/events.js
2827
2464
  /**
2828
2465
  * Used on elements, as a map of event type -> event handler,
2829
2466
  * and on events themselves to track which element handled an event
@@ -2872,6 +2509,7 @@ function on(element, type, handler, options = {}) {
2872
2509
  };
2873
2510
  }
2874
2511
  var last_propagated_event = null;
2512
+ var last_propagated_event_clear_scheduled = false;
2875
2513
  /**
2876
2514
  * @this {EventTarget}
2877
2515
  * @param {Event} event
@@ -2884,6 +2522,13 @@ function handle_event_propagation(event) {
2884
2522
  var path = event.composedPath?.() || [];
2885
2523
  var current_target = path[0] || event.target;
2886
2524
  last_propagated_event = event;
2525
+ if (!last_propagated_event_clear_scheduled) {
2526
+ last_propagated_event_clear_scheduled = true;
2527
+ setTimeout(() => {
2528
+ last_propagated_event_clear_scheduled = false;
2529
+ last_propagated_event = null;
2530
+ });
2531
+ }
2887
2532
  var path_idx = 0;
2888
2533
  var handled_at = last_propagated_event === event && event[event_symbol];
2889
2534
  if (handled_at) {
@@ -2944,7 +2589,7 @@ function handle_event_propagation(event) {
2944
2589
  }
2945
2590
  }
2946
2591
  //#endregion
2947
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/client/dom/template.js
2592
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/template.js
2948
2593
  /** @import { Effect, EffectNodes, TemplateNode } from '#client' */
2949
2594
  /** @import { TemplateStructure } from './types' */
2950
2595
  /**
@@ -3054,6 +2699,451 @@ function is_raw_text_element(name) {
3054
2699
  return RAW_TEXT_ELEMENTS.includes(name);
3055
2700
  }
3056
2701
  var REGEX_VALID_TAG_NAME = /^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u;
2702
+ //#endregion
2703
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/reactivity/create-subscriber.js
2704
+ /**
2705
+ * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
2706
+ * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
2707
+ *
2708
+ * If `subscribe` is called inside an effect (including indirectly, for example inside a getter),
2709
+ * the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.
2710
+ *
2711
+ * If `start` returns a cleanup function, it will be called when the effect is destroyed.
2712
+ *
2713
+ * If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
2714
+ * are active, and the returned teardown function will only be called when all effects are destroyed.
2715
+ *
2716
+ * It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
2717
+ *
2718
+ * ```js
2719
+ * import { createSubscriber } from 'svelte/reactivity';
2720
+ * import { on } from 'svelte/events';
2721
+ *
2722
+ * export class MediaQuery {
2723
+ * #query;
2724
+ * #subscribe;
2725
+ *
2726
+ * constructor(query) {
2727
+ * this.#query = window.matchMedia(`(${query})`);
2728
+ *
2729
+ * this.#subscribe = createSubscriber((update) => {
2730
+ * // when the `change` event occurs, re-run any effects that read `this.current`
2731
+ * const off = on(this.#query, 'change', update);
2732
+ *
2733
+ * // stop listening when all the effects are destroyed
2734
+ * return () => off();
2735
+ * });
2736
+ * }
2737
+ *
2738
+ * get current() {
2739
+ * // This makes the getter reactive, if read in an effect
2740
+ * this.#subscribe();
2741
+ *
2742
+ * // Return the current state of the query, whether or not we're in an effect
2743
+ * return this.#query.matches;
2744
+ * }
2745
+ * }
2746
+ * ```
2747
+ * @param {(update: () => void) => (() => void) | void} start
2748
+ * @since 5.7.0
2749
+ */
2750
+ function createSubscriber(start) {
2751
+ let subscribers = 0;
2752
+ let version = source(0);
2753
+ /** @type {(() => void) | void} */
2754
+ let stop;
2755
+ return () => {
2756
+ if (effect_tracking()) {
2757
+ get(version);
2758
+ render_effect(() => {
2759
+ if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
2760
+ subscribers += 1;
2761
+ return () => {
2762
+ queue_micro_task(() => {
2763
+ subscribers -= 1;
2764
+ if (subscribers === 0) {
2765
+ stop?.();
2766
+ stop = void 0;
2767
+ increment(version);
2768
+ }
2769
+ });
2770
+ };
2771
+ });
2772
+ }
2773
+ };
2774
+ }
2775
+ //#endregion
2776
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
2777
+ /** @import { Effect, Source, TemplateNode, } from '#client' */
2778
+ /**
2779
+ * @typedef {{
2780
+ * onerror?: ((error: unknown, reset: () => void) => void) | null;
2781
+ * failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
2782
+ * pending?: ((anchor: Node) => void) | null;
2783
+ * }} BoundaryProps
2784
+ */
2785
+ var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
2786
+ /**
2787
+ * @param {TemplateNode} node
2788
+ * @param {BoundaryProps} props
2789
+ * @param {((anchor: Node) => void)} children
2790
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
2791
+ * @returns {void}
2792
+ */
2793
+ function boundary(node, props, children, transform_error) {
2794
+ new Boundary(node, props, children, transform_error);
2795
+ }
2796
+ var Boundary = class {
2797
+ /** @type {Boundary | null} */
2798
+ parent;
2799
+ is_pending = false;
2800
+ /**
2801
+ * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
2802
+ * Inherited from parent boundary, or defaults to identity.
2803
+ * @type {(error: unknown) => unknown}
2804
+ */
2805
+ transform_error;
2806
+ /** @type {TemplateNode} */
2807
+ #anchor;
2808
+ /** @type {TemplateNode | null} */
2809
+ #hydrate_open = hydrating ? hydrate_node : null;
2810
+ /** @type {BoundaryProps} */
2811
+ #props;
2812
+ /** @type {((anchor: Node) => void)} */
2813
+ #children;
2814
+ /** @type {Effect} */
2815
+ #effect;
2816
+ /** @type {Effect | null} */
2817
+ #main_effect = null;
2818
+ /** @type {Effect | null} */
2819
+ #pending_effect = null;
2820
+ /** @type {Effect | null} */
2821
+ #failed_effect = null;
2822
+ /** @type {DocumentFragment | null} */
2823
+ #offscreen_fragment = null;
2824
+ #local_pending_count = 0;
2825
+ #pending_count = 0;
2826
+ #pending_count_update_queued = false;
2827
+ /** @type {Set<Effect>} */
2828
+ #dirty_effects = /* @__PURE__ */ new Set();
2829
+ /** @type {Set<Effect>} */
2830
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
2831
+ /**
2832
+ * A source containing the number of pending async deriveds/expressions.
2833
+ * Only created if `$effect.pending()` is used inside the boundary,
2834
+ * otherwise updating the source results in needless `Batch.ensure()`
2835
+ * calls followed by no-op flushes
2836
+ * @type {Source<number> | null}
2837
+ */
2838
+ #effect_pending = null;
2839
+ #effect_pending_subscriber = createSubscriber(() => {
2840
+ this.#effect_pending = source(this.#local_pending_count);
2841
+ return () => {
2842
+ this.#effect_pending = null;
2843
+ };
2844
+ });
2845
+ /**
2846
+ * @param {TemplateNode} node
2847
+ * @param {BoundaryProps} props
2848
+ * @param {((anchor: Node) => void)} children
2849
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
2850
+ */
2851
+ constructor(node, props, children, transform_error) {
2852
+ this.#anchor = node;
2853
+ this.#props = props;
2854
+ this.#children = (anchor) => {
2855
+ var effect = active_effect;
2856
+ effect.b = this;
2857
+ effect.f |= 128;
2858
+ children(anchor);
2859
+ };
2860
+ this.parent = active_effect.b;
2861
+ this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
2862
+ this.#effect = block(() => {
2863
+ if (hydrating) {
2864
+ const comment = this.#hydrate_open;
2865
+ hydrate_next();
2866
+ const server_rendered_pending = comment.data === "[!";
2867
+ if (comment.data.startsWith("[?")) {
2868
+ const serialized_error = JSON.parse(comment.data.slice(2));
2869
+ this.#hydrate_failed_content(serialized_error);
2870
+ } else if (server_rendered_pending) this.#hydrate_pending_content();
2871
+ else this.#hydrate_resolved_content();
2872
+ } else this.#render();
2873
+ }, flags);
2874
+ if (hydrating) this.#anchor = hydrate_node;
2875
+ }
2876
+ #hydrate_resolved_content() {
2877
+ try {
2878
+ this.#main_effect = branch(() => this.#children(this.#anchor));
2879
+ } catch (error) {
2880
+ this.error(error);
2881
+ }
2882
+ }
2883
+ /**
2884
+ * @param {unknown} error The deserialized error from the server's hydration comment
2885
+ */
2886
+ #hydrate_failed_content(error) {
2887
+ const failed = this.#props.failed;
2888
+ const { reset, invoke_onerror } = this.#create_reset(error);
2889
+ queue_micro_task(invoke_onerror);
2890
+ if (!failed) return;
2891
+ this.#failed_effect = branch(() => {
2892
+ failed(this.#anchor, () => error, () => reset);
2893
+ });
2894
+ }
2895
+ /**
2896
+ * Creates the `reset` function for a failed boundary, along with a function
2897
+ * that invokes `onerror` with it (if provided)
2898
+ * @param {unknown} error
2899
+ * @returns {{ reset: () => void, invoke_onerror: () => void }}
2900
+ */
2901
+ #create_reset(error) {
2902
+ var did_reset = false;
2903
+ var calling_on_error = false;
2904
+ const reset = () => {
2905
+ if (did_reset) {
2906
+ svelte_boundary_reset_noop();
2907
+ return;
2908
+ }
2909
+ did_reset = true;
2910
+ if (calling_on_error) svelte_boundary_reset_onerror();
2911
+ if (this.#failed_effect !== null) pause_effect(this.#failed_effect, () => {
2912
+ this.#failed_effect = null;
2913
+ });
2914
+ this.#run(() => {
2915
+ this.#render();
2916
+ });
2917
+ };
2918
+ const invoke_onerror = () => {
2919
+ try {
2920
+ calling_on_error = true;
2921
+ this.#props.onerror?.(error, reset);
2922
+ calling_on_error = false;
2923
+ } catch (err) {
2924
+ invoke_error_boundary(err, this.#effect && this.#effect.parent);
2925
+ }
2926
+ };
2927
+ return {
2928
+ reset,
2929
+ invoke_onerror
2930
+ };
2931
+ }
2932
+ #hydrate_pending_content() {
2933
+ const pending = this.#props.pending;
2934
+ if (!pending) return;
2935
+ this.is_pending = true;
2936
+ this.#pending_effect = branch(() => pending(this.#anchor));
2937
+ queue_micro_task(() => {
2938
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
2939
+ var anchor = create_text();
2940
+ var handled = false;
2941
+ fragment.append(anchor);
2942
+ this.#main_effect = this.#run(() => {
2943
+ try {
2944
+ return branch(() => this.#children(anchor));
2945
+ } catch (error) {
2946
+ try {
2947
+ this.error(error);
2948
+ handled = true;
2949
+ } catch (error) {
2950
+ invoke_error_boundary(error, this.#effect.parent);
2951
+ }
2952
+ return null;
2953
+ }
2954
+ });
2955
+ if (this.#main_effect === null) {
2956
+ this.#offscreen_fragment = null;
2957
+ if (handled) this.#resolve(current_batch);
2958
+ return;
2959
+ }
2960
+ if (this.#pending_count === 0) {
2961
+ this.#anchor.before(fragment);
2962
+ this.#offscreen_fragment = null;
2963
+ pause_effect(this.#pending_effect, () => {
2964
+ this.#pending_effect = null;
2965
+ });
2966
+ this.#resolve(current_batch);
2967
+ }
2968
+ });
2969
+ }
2970
+ #render() {
2971
+ try {
2972
+ this.is_pending = this.has_pending_snippet();
2973
+ this.#pending_count = 0;
2974
+ this.#local_pending_count = 0;
2975
+ this.#main_effect = branch(() => {
2976
+ this.#children(this.#anchor);
2977
+ });
2978
+ if (this.#pending_count > 0) {
2979
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
2980
+ move_effect(this.#main_effect, fragment);
2981
+ const pending = this.#props.pending;
2982
+ this.#pending_effect = branch(() => pending(this.#anchor));
2983
+ } else this.#resolve(current_batch);
2984
+ } catch (error) {
2985
+ this.error(error);
2986
+ }
2987
+ }
2988
+ /**
2989
+ * @param {Batch} batch
2990
+ */
2991
+ #resolve(batch) {
2992
+ this.is_pending = false;
2993
+ batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
2994
+ }
2995
+ /**
2996
+ * Defer an effect inside a pending boundary until the boundary resolves
2997
+ * @param {Effect} effect
2998
+ */
2999
+ defer_effect(effect) {
3000
+ defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
3001
+ }
3002
+ /**
3003
+ * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
3004
+ * @returns {boolean}
3005
+ */
3006
+ is_rendered() {
3007
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
3008
+ }
3009
+ has_pending_snippet() {
3010
+ return !!this.#props.pending;
3011
+ }
3012
+ /**
3013
+ * @template T
3014
+ * @param {() => T} fn
3015
+ */
3016
+ #run(fn) {
3017
+ var previous_effect = active_effect;
3018
+ var previous_reaction = active_reaction;
3019
+ var previous_ctx = component_context;
3020
+ set_active_effect(this.#effect);
3021
+ set_active_reaction(this.#effect);
3022
+ set_component_context(this.#effect.ctx);
3023
+ try {
3024
+ Batch.ensure();
3025
+ return fn();
3026
+ } finally {
3027
+ set_active_effect(previous_effect);
3028
+ set_active_reaction(previous_reaction);
3029
+ set_component_context(previous_ctx);
3030
+ }
3031
+ }
3032
+ /**
3033
+ * Updates the pending count associated with the currently visible pending snippet,
3034
+ * if any, such that we can replace the snippet with content once work is done
3035
+ * @param {1 | -1} d
3036
+ * @param {Batch} batch
3037
+ */
3038
+ #update_pending_count(d, batch) {
3039
+ if (!this.has_pending_snippet()) {
3040
+ if (this.parent) this.parent.#update_pending_count(d, batch);
3041
+ return;
3042
+ }
3043
+ this.#pending_count += d;
3044
+ if (this.#pending_count === 0) {
3045
+ this.#resolve(batch);
3046
+ if (this.#pending_effect) pause_effect(this.#pending_effect, () => {
3047
+ this.#pending_effect = null;
3048
+ });
3049
+ if (this.#offscreen_fragment) {
3050
+ this.#anchor.before(this.#offscreen_fragment);
3051
+ this.#offscreen_fragment = null;
3052
+ }
3053
+ }
3054
+ }
3055
+ /**
3056
+ * Update the source that powers `$effect.pending()` inside this boundary,
3057
+ * and controls when the current `pending` snippet (if any) is removed.
3058
+ * Do not call from inside the class
3059
+ * @param {1 | -1} d
3060
+ * @param {Batch} batch
3061
+ */
3062
+ update_pending_count(d, batch) {
3063
+ this.#update_pending_count(d, batch);
3064
+ this.#local_pending_count += d;
3065
+ if (!this.#effect_pending || this.#pending_count_update_queued) return;
3066
+ this.#pending_count_update_queued = true;
3067
+ queue_micro_task(() => {
3068
+ this.#pending_count_update_queued = false;
3069
+ if (this.#effect_pending) internal_set(this.#effect_pending, this.#local_pending_count);
3070
+ });
3071
+ }
3072
+ get_effect_pending() {
3073
+ this.#effect_pending_subscriber();
3074
+ return get(this.#effect_pending);
3075
+ }
3076
+ /** @param {unknown} error */
3077
+ error(error) {
3078
+ if (!this.#props.onerror && !this.#props.failed) throw error;
3079
+ if (current_batch?.is_fork) {
3080
+ if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
3081
+ if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
3082
+ if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
3083
+ current_batch.oncommit(() => {
3084
+ this.#handle_error(error);
3085
+ });
3086
+ } else this.#handle_error(error);
3087
+ }
3088
+ /**
3089
+ * @param {unknown} error
3090
+ */
3091
+ #handle_error(error) {
3092
+ if (this.#main_effect) {
3093
+ destroy_effect(this.#main_effect);
3094
+ this.#main_effect = null;
3095
+ }
3096
+ if (this.#pending_effect) {
3097
+ destroy_effect(this.#pending_effect);
3098
+ this.#pending_effect = null;
3099
+ }
3100
+ if (this.#failed_effect) {
3101
+ destroy_effect(this.#failed_effect);
3102
+ this.#failed_effect = null;
3103
+ }
3104
+ if (hydrating) {
3105
+ set_hydrate_node(this.#hydrate_open);
3106
+ next();
3107
+ set_hydrate_node(skip_nodes());
3108
+ }
3109
+ let failed = this.#props.failed;
3110
+ /** @param {unknown} transformed_error */
3111
+ const handle_error_result = (transformed_error) => {
3112
+ const { reset, invoke_onerror } = this.#create_reset(transformed_error);
3113
+ invoke_onerror();
3114
+ if (failed) this.#failed_effect = this.#run(() => {
3115
+ try {
3116
+ return branch(() => {
3117
+ var effect = active_effect;
3118
+ effect.b = this;
3119
+ effect.f |= 128;
3120
+ failed(this.#anchor, () => transformed_error, () => reset);
3121
+ });
3122
+ } catch (error) {
3123
+ invoke_error_boundary(error, this.#effect.parent);
3124
+ return null;
3125
+ }
3126
+ });
3127
+ };
3128
+ queue_micro_task(() => {
3129
+ /** @type {unknown} */
3130
+ var result;
3131
+ try {
3132
+ result = this.transform_error(error);
3133
+ } catch (e) {
3134
+ invoke_error_boundary(e, this.#effect && this.#effect.parent);
3135
+ return;
3136
+ }
3137
+ if (result !== null && typeof result === "object" && typeof result.then === "function")
3138
+ /** @type {any} */ result.then(
3139
+ handle_error_result,
3140
+ /** @param {unknown} e */
3141
+ (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
3142
+ );
3143
+ else handle_error_result(result);
3144
+ });
3145
+ }
3146
+ };
3057
3147
  /**
3058
3148
  * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
3059
3149
  * Transitions will play during the initial render unless the `intro` option is set to `false`.
@@ -3144,7 +3234,7 @@ function _mount(Component, { target, anchor, props = {}, events, context, intro
3144
3234
  if (events)
3145
3235
  /** @type {any} */ props.$$events = events;
3146
3236
  if (hydrating) assign_nodes(anchor_node, null);
3147
- component = Component(anchor_node, props) || {};
3237
+ component = Component(anchor_node, props) || mark_as_component();
3148
3238
  if (hydrating) {
3149
3239
  /** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
3150
3240
  if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
@@ -3352,7 +3442,7 @@ var Svelte4Component = class {
3352
3442
  }
3353
3443
  };
3354
3444
  //#endregion
3355
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/escaping.js
3445
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/escaping.js
3356
3446
  var ATTR_REGEX = /[&"<]/g;
3357
3447
  var CONTENT_REGEX = /[&<]/g;
3358
3448
  /**
@@ -3375,7 +3465,7 @@ function escape_html(value, is_attr) {
3375
3465
  return escaped + str.substring(last);
3376
3466
  }
3377
3467
  //#endregion
3378
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/shared/attributes.js
3468
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/shared/attributes.js
3379
3469
  /**
3380
3470
  * `<div translate={false}>` should be rendered as `<div translate="no">` and _not_
3381
3471
  * `<div translate="false">`, which is equivalent to `<div translate="yes">`. There
@@ -3392,7 +3482,7 @@ var replacements = { translate: /* @__PURE__ */ new Map([[true, "yes"], [false,
3392
3482
  */
3393
3483
  function attr(name, value, is_boolean = false) {
3394
3484
  if (name === "hidden" && value !== "until-found") is_boolean = true;
3395
- if (value == null || !value && is_boolean) return "";
3485
+ if (value == null || is_boolean && !value && value !== "") return "";
3396
3486
  const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value;
3397
3487
  return ` ${name}${is_boolean ? `=""` : `="${escape_html(normalized, true)}"`}`;
3398
3488
  }
@@ -3468,7 +3558,7 @@ function to_style(value, styles) {
3468
3558
  important_styles = styles[1];
3469
3559
  } else normal_styles = styles;
3470
3560
  if (value) {
3471
- value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
3561
+ value = String(value).replaceAll(/\/\*.*?\*\//g, "").trim();
3472
3562
  /** @type {boolean | '"' | "'"} */
3473
3563
  var in_str = false;
3474
3564
  var in_apo = 0;
@@ -3514,20 +3604,68 @@ function to_style(value, styles) {
3514
3604
  return value == null ? null : String(value);
3515
3605
  }
3516
3606
  //#endregion
3517
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/hydration.js
3607
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/hydration.js
3518
3608
  var BLOCK_OPEN = `<!--[-->`;
3519
3609
  var BLOCK_CLOSE = `<!--]-->`;
3520
3610
  var EMPTY_COMMENT = `<!---->`;
3521
3611
  //#endregion
3522
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/abort-signal.js
3523
- /** @type {AbortController | null} */
3524
- var controller = null;
3525
- function abort() {
3526
- controller?.abort(STALE_REACTION);
3527
- controller = null;
3612
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/context.js
3613
+ /** @import { SSRContext } from '#server' */
3614
+ /** @type {SSRContext | null} */
3615
+ var ssr_context = null;
3616
+ /** @param {SSRContext | null} v */
3617
+ function set_ssr_context(v) {
3618
+ ssr_context = v;
3528
3619
  }
3529
- function getAbortSignal() {
3530
- return (controller ??= new AbortController()).signal;
3620
+ /**
3621
+ * @template T
3622
+ * @returns {[() => T, (context: T) => T, () => boolean]}
3623
+ * @since 5.40.0
3624
+ */
3625
+ function createContext() {
3626
+ return create_context(getContext, setContext, hasContext);
3627
+ }
3628
+ /**
3629
+ * @template T
3630
+ * @param {any} key
3631
+ * @returns {T}
3632
+ */
3633
+ function getContext(key) {
3634
+ return get_or_init_context_map(ssr_context).get(key);
3635
+ }
3636
+ /**
3637
+ * @template T
3638
+ * @param {any} key
3639
+ * @param {T} context
3640
+ * @returns {T}
3641
+ */
3642
+ function setContext(key, context) {
3643
+ get_or_init_context_map(ssr_context).set(key, context);
3644
+ return context;
3645
+ }
3646
+ /**
3647
+ * @param {any} key
3648
+ * @returns {boolean}
3649
+ */
3650
+ function hasContext(key) {
3651
+ return get_or_init_context_map(ssr_context).has(key);
3652
+ }
3653
+ /** @returns {Map<any, any>} */
3654
+ function getAllContexts() {
3655
+ return get_or_init_context_map(ssr_context);
3656
+ }
3657
+ /**
3658
+ * @param {Function} [fn]
3659
+ */
3660
+ function push(fn) {
3661
+ ssr_context = {
3662
+ p: ssr_context,
3663
+ c: null,
3664
+ r: null
3665
+ };
3666
+ }
3667
+ function pop() {
3668
+ ssr_context = ssr_context.p;
3531
3669
  }
3532
3670
  /**
3533
3671
  * Encountered asynchronous work while rendering synchronously.
@@ -3606,90 +3744,6 @@ function server_context_required() {
3606
3744
  error.name = "Svelte error";
3607
3745
  throw error;
3608
3746
  }
3609
- //#endregion
3610
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/context.js
3611
- /** @import { SSRContext } from '#server' */
3612
- /** @type {SSRContext | null} */
3613
- var ssr_context = null;
3614
- /** @param {SSRContext | null} v */
3615
- function set_ssr_context(v) {
3616
- ssr_context = v;
3617
- }
3618
- /**
3619
- * @template T
3620
- * @returns {[() => T, (context: T) => T]}
3621
- * @since 5.40.0
3622
- */
3623
- function createContext() {
3624
- const key = {};
3625
- return [() => {
3626
- if (!hasContext(key)) missing_context();
3627
- return getContext(key);
3628
- }, (context) => setContext(key, context)];
3629
- }
3630
- /**
3631
- * @template T
3632
- * @param {any} key
3633
- * @returns {T}
3634
- */
3635
- function getContext(key) {
3636
- return get_or_init_context_map().get(key);
3637
- }
3638
- /**
3639
- * @template T
3640
- * @param {any} key
3641
- * @param {T} context
3642
- * @returns {T}
3643
- */
3644
- function setContext(key, context) {
3645
- get_or_init_context_map().set(key, context);
3646
- return context;
3647
- }
3648
- /**
3649
- * @param {any} key
3650
- * @returns {boolean}
3651
- */
3652
- function hasContext(key) {
3653
- return get_or_init_context_map().has(key);
3654
- }
3655
- /** @returns {Map<any, any>} */
3656
- function getAllContexts() {
3657
- return get_or_init_context_map();
3658
- }
3659
- /**
3660
- * @param {string} name
3661
- * @returns {Map<unknown, unknown>}
3662
- */
3663
- function get_or_init_context_map(name) {
3664
- if (ssr_context === null) lifecycle_outside_component();
3665
- return ssr_context.c ??= new Map(get_parent_context(ssr_context) || void 0);
3666
- }
3667
- /**
3668
- * @param {Function} [fn]
3669
- */
3670
- function push(fn) {
3671
- ssr_context = {
3672
- p: ssr_context,
3673
- c: null,
3674
- r: null
3675
- };
3676
- }
3677
- function pop() {
3678
- ssr_context = ssr_context.p;
3679
- }
3680
- /**
3681
- * @param {SSRContext} ssr_context
3682
- * @returns {Map<unknown, unknown> | null}
3683
- */
3684
- function get_parent_context(ssr_context) {
3685
- let parent = ssr_context.p;
3686
- while (parent !== null) {
3687
- const context_map = parent.c;
3688
- if (context_map !== null) return context_map;
3689
- parent = parent.p;
3690
- }
3691
- return null;
3692
- }
3693
3747
  /**
3694
3748
  * A `hydratable` value with key `%key%` was created, but at least part of it was not used during the render.
3695
3749
  *
@@ -3710,7 +3764,7 @@ function get_render_context() {
3710
3764
  /** @type {AsyncLocalStorage<RenderContext | null> | null} */
3711
3765
  var als = null;
3712
3766
  //#endregion
3713
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/crypto.js
3767
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/crypto.js
3714
3768
  var text_encoder;
3715
3769
  var crypto;
3716
3770
  /** @param {string} module_name */
@@ -3735,9 +3789,10 @@ function base64_encode(bytes) {
3735
3789
  return btoa(binary);
3736
3790
  }
3737
3791
  //#endregion
3738
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/renderer.js
3792
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/renderer.js
3739
3793
  /** @import { Component } from 'svelte' */
3740
- /** @import { Csp, HydratableContext, RenderOutput, SSRContext, SyncRenderOutput, Sha256Source } from './types.js' */
3794
+ /** @import { HydratableContext, SSRContext } from './types.js' */
3795
+ /** @import { Csp, RenderOutput, SyncRenderOutput, Sha256Source } from '../../server/public.js' */
3741
3796
  /** @import { MaybePromise } from '#shared' */
3742
3797
  /** @typedef {'head' | 'body'} RendererType */
3743
3798
  /** @typedef {{ [key in RendererType]: string }} AccumulatedContent */
@@ -3802,7 +3857,7 @@ var Renderer = class Renderer {
3802
3857
  * State that is local to the branch it is declared in.
3803
3858
  * It will be shallow-copied to all children.
3804
3859
  *
3805
- * @type {{ select_value: string | undefined }}
3860
+ * @type {{ select_value: any, multiple: boolean }}
3806
3861
  */
3807
3862
  local;
3808
3863
  /**
@@ -3812,7 +3867,10 @@ var Renderer = class Renderer {
3812
3867
  constructor(global, parent) {
3813
3868
  this.#parent = parent;
3814
3869
  this.global = global;
3815
- this.local = parent ? { ...parent.local } : { select_value: void 0 };
3870
+ this.local = parent ? { ...parent.local } : {
3871
+ select_value: void 0,
3872
+ multiple: false
3873
+ };
3816
3874
  this.type = parent ? parent.type : "body";
3817
3875
  }
3818
3876
  /**
@@ -3875,7 +3933,7 @@ var Renderer = class Renderer {
3875
3933
  promises.push(promise);
3876
3934
  }
3877
3935
  promise.catch(noop);
3878
- this.promise = promise;
3936
+ this.promise = this.global.track(promise);
3879
3937
  return promises;
3880
3938
  }
3881
3939
  /**
@@ -3907,7 +3965,7 @@ var Renderer = class Renderer {
3907
3965
  result.catch(noop);
3908
3966
  result.finally(() => set_ssr_context(null)).catch(noop);
3909
3967
  if (child.global.mode === "sync") await_invalid();
3910
- child.promise = result;
3968
+ child.promise = child.global.track(result);
3911
3969
  }
3912
3970
  return child;
3913
3971
  }
@@ -3940,7 +3998,7 @@ var Renderer = class Renderer {
3940
3998
  if (result instanceof Promise) {
3941
3999
  if (child.global.mode === "sync") await_invalid();
3942
4000
  result.catch(noop);
3943
- child.promise = result;
4001
+ child.promise = child.global.track(result);
3944
4002
  }
3945
4003
  } catch (error) {
3946
4004
  set_ssr_context(parent_context);
@@ -3951,12 +4009,15 @@ var Renderer = class Renderer {
3951
4009
  child.#boundary = null;
3952
4010
  if (result instanceof Promise) {
3953
4011
  if (this.global.mode === "sync") await_invalid();
3954
- child.promise = result.then((transformed) => {
3955
- set_ssr_context(parent_context);
3956
- child.#out.push(Renderer.#serialize_failed_boundary(transformed));
3957
- failed_snippet(child, transformed, noop);
3958
- child.#out.push(BLOCK_CLOSE);
3959
- });
4012
+ child.promise = child.global.track(
4013
+ /** @type {Promise<unknown>} */
4014
+ result.then((transformed) => {
4015
+ set_ssr_context(parent_context);
4016
+ child.#out.push(Renderer.#serialize_failed_boundary(transformed));
4017
+ failed_snippet(child, transformed, noop);
4018
+ child.#out.push(BLOCK_CLOSE);
4019
+ })
4020
+ );
3960
4021
  child.promise.catch(noop);
3961
4022
  } else {
3962
4023
  child.#out.push(Renderer.#serialize_failed_boundary(result));
@@ -3974,8 +4035,10 @@ var Renderer = class Renderer {
3974
4035
  */
3975
4036
  component(fn, component_fn) {
3976
4037
  push();
3977
- const child = this.child(fn);
3978
- child.#is_component_body = true;
4038
+ this.child((renderer) => {
4039
+ renderer.#is_component_body = true;
4040
+ return fn(renderer);
4041
+ });
3979
4042
  pop();
3980
4043
  }
3981
4044
  /**
@@ -3989,10 +4052,12 @@ var Renderer = class Renderer {
3989
4052
  * @returns {void}
3990
4053
  */
3991
4054
  select(attrs, fn, css_hash, classes, styles, flags, is_rich) {
3992
- const { value, ...select_attrs } = attrs;
4055
+ const { value, defaultValue, ...select_attrs } = attrs;
4056
+ if (select_attrs.multiple === "") select_attrs.multiple = true;
3993
4057
  this.push(`<select${attributes(select_attrs, css_hash, classes, styles, flags)}>`);
3994
4058
  this.child((renderer) => {
3995
- renderer.local.select_value = value;
4059
+ renderer.local.select_value = value === void 0 ? defaultValue : value;
4060
+ renderer.local.multiple = !!select_attrs.multiple;
3996
4061
  fn(renderer);
3997
4062
  });
3998
4063
  this.push(`${is_rich ? "<!>" : ""}</select>`);
@@ -4015,7 +4080,8 @@ var Renderer = class Renderer {
4015
4080
  */
4016
4081
  const close = (renderer, value, { head, body }) => {
4017
4082
  if (has_own_property.call(attrs, "value")) value = attrs.value;
4018
- if (value === this.local.select_value) renderer.#out.push(" selected=\"\"");
4083
+ var select_value = this.local.select_value;
4084
+ if (this.local.multiple && is_array(select_value) ? select_value.includes(value) : value === select_value) renderer.#out.push(" selected=\"\"");
4019
4085
  renderer.#out.push(`>${body}${is_rich ? "<!>" : ""}</option>`);
4020
4086
  if (head) renderer.head((child) => child.push(head));
4021
4087
  };
@@ -4077,6 +4143,7 @@ var Renderer = class Renderer {
4077
4143
  */
4078
4144
  copy() {
4079
4145
  const copy = new Renderer(this.global, this.#parent);
4146
+ copy.type = this.type;
4080
4147
  copy.#out = this.#out.map((item) => item instanceof Renderer ? item.copy() : item);
4081
4148
  copy.promise = this.promise;
4082
4149
  return copy;
@@ -4188,6 +4255,33 @@ var Renderer = class Renderer {
4188
4255
  for (const child of this.#out) if (child instanceof Renderer && !child.#is_component_body) yield* child.#collect_ondestroy();
4189
4256
  }
4190
4257
  /**
4258
+ * Runs every `onDestroy` callback in this renderer tree. On a failed render,
4259
+ * cleanup errors are suppressed so they do not mask the render error.
4260
+ * @param {boolean} suppress_errors
4261
+ */
4262
+ #run_on_destroy(suppress_errors) {
4263
+ let first_error;
4264
+ let has_error = false;
4265
+ for (const cleanup of this.#collect_on_destroy()) try {
4266
+ cleanup();
4267
+ } catch (error) {
4268
+ if (!suppress_errors && !has_error) {
4269
+ first_error = error;
4270
+ has_error = true;
4271
+ }
4272
+ }
4273
+ if (has_error) throw first_error;
4274
+ }
4275
+ /**
4276
+ * @param {'sync' | 'async'} mode
4277
+ * @param {{ idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options
4278
+ * @returns {Renderer}
4279
+ */
4280
+ static #create(mode, options) {
4281
+ if (options.idPrefix?.includes("--")) invalid_id_prefix();
4282
+ return new Renderer(new SSRState(mode, options.idPrefix ? options.idPrefix + "-" : "", options.csp, options.transformError));
4283
+ }
4284
+ /**
4191
4285
  * Render a component. Throws if any of the children are performing asynchronous work.
4192
4286
  *
4193
4287
  * @template {Record<string, any>} Props
@@ -4197,12 +4291,24 @@ var Renderer = class Renderer {
4197
4291
  */
4198
4292
  static #render(component, options) {
4199
4293
  var previous_context = ssr_context;
4294
+ const renderer = Renderer.#create("sync", options);
4295
+ /** @type {AccumulatedContent | undefined} */
4296
+ let result;
4297
+ let render_error;
4298
+ let failed = false;
4200
4299
  try {
4201
- const renderer = Renderer.#open_render("sync", component, options);
4202
- const content = renderer.#collect_content();
4203
- return Renderer.#close_render(content, renderer);
4300
+ try {
4301
+ Renderer.#open_render(renderer, component, options);
4302
+ result = Renderer.#close_render(renderer.#collect_content(), renderer);
4303
+ } catch (error) {
4304
+ render_error = error;
4305
+ failed = true;
4306
+ }
4307
+ renderer.#run_on_destroy(failed);
4308
+ if (failed) throw render_error;
4309
+ return result;
4204
4310
  } finally {
4205
- abort();
4311
+ renderer.global.abort();
4206
4312
  set_ssr_context(previous_context);
4207
4313
  }
4208
4314
  }
@@ -4216,15 +4322,30 @@ var Renderer = class Renderer {
4216
4322
  */
4217
4323
  static async #render_async(component, options) {
4218
4324
  const previous_context = ssr_context;
4325
+ const renderer = Renderer.#create("async", options);
4326
+ /** @type {(AccumulatedContent & { hashes: { script: Sha256Source[] } }) | undefined} */
4327
+ let result;
4328
+ let render_error;
4329
+ let failed = false;
4219
4330
  try {
4220
- const renderer = Renderer.#open_render("async", component, options);
4221
- const content = await renderer.#collect_content_async();
4222
- const hydratables = await renderer.#collect_hydratables();
4223
- if (hydratables !== null) content.head = hydratables + content.head;
4224
- return Renderer.#close_render(content, renderer);
4331
+ try {
4332
+ Renderer.#open_render(renderer, component, options);
4333
+ const content = await renderer.#collect_content_async();
4334
+ const hydratables = await renderer.#collect_hydratables();
4335
+ if (hydratables !== null) content.head = hydratables + content.head;
4336
+ result = Renderer.#close_render(content, renderer);
4337
+ } catch (error) {
4338
+ render_error = error;
4339
+ failed = true;
4340
+ renderer.global.abort();
4341
+ await renderer.global.settle();
4342
+ }
4343
+ renderer.#run_on_destroy(failed);
4344
+ if (failed) throw render_error;
4345
+ return result;
4225
4346
  } finally {
4226
4347
  set_ssr_context(previous_context);
4227
- abort();
4348
+ renderer.global.abort();
4228
4349
  }
4229
4350
  }
4230
4351
  /**
@@ -4288,16 +4409,14 @@ var Renderer = class Renderer {
4288
4409
  }
4289
4410
  /**
4290
4411
  * @template {Record<string, any>} Props
4291
- * @param {'sync' | 'async'} mode
4412
+ * @param {Renderer} renderer
4292
4413
  * @param {import('svelte').Component<Props>} component
4293
4414
  * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options
4294
- * @returns {Renderer}
4415
+ * @returns {void}
4295
4416
  */
4296
- static #open_render(mode, component, options) {
4297
- if (options.idPrefix?.includes("--")) invalid_id_prefix();
4417
+ static #open_render(renderer, component, options) {
4298
4418
  var previous_context = ssr_context;
4299
4419
  try {
4300
- const renderer = new Renderer(new SSRState(mode, options.idPrefix ? options.idPrefix + "-" : "", options.csp, options.transformError));
4301
4420
  set_ssr_context({
4302
4421
  p: null,
4303
4422
  c: options.context ?? null,
@@ -4306,7 +4425,6 @@ var Renderer = class Renderer {
4306
4425
  renderer.push(BLOCK_OPEN);
4307
4426
  component(renderer, options.props ?? {});
4308
4427
  renderer.push(BLOCK_CLOSE);
4309
- return renderer;
4310
4428
  } finally {
4311
4429
  set_ssr_context(previous_context);
4312
4430
  }
@@ -4317,7 +4435,6 @@ var Renderer = class Renderer {
4317
4435
  * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }}
4318
4436
  */
4319
4437
  static #close_render(content, renderer) {
4320
- for (const cleanup of renderer.#collect_on_destroy()) cleanup();
4321
4438
  let head = content.head + renderer.global.get_title();
4322
4439
  let body = content.body;
4323
4440
  for (const { hash, code } of renderer.global.css) head += `<style id="${hash}">${code}</style>`;
@@ -4373,6 +4490,11 @@ var SSRState = class {
4373
4490
  uid;
4374
4491
  /** @readonly @type {Set<{ hash: string; code: string }>} */
4375
4492
  css = /* @__PURE__ */ new Set();
4493
+ /** @type {Set<Promise<unknown>>} */
4494
+ #pending = /* @__PURE__ */ new Set();
4495
+ /** @type {AbortController | null} */
4496
+ #controller = null;
4497
+ #aborted = false;
4376
4498
  /**
4377
4499
  * `transformError` passed to `render`. Called when an error boundary catches an error.
4378
4500
  * Throws by default if unset in `render`.
@@ -4402,6 +4524,29 @@ var SSRState = class {
4402
4524
  let uid = 1;
4403
4525
  this.uid = () => `${id_prefix}s${uid++}`;
4404
4526
  }
4527
+ /**
4528
+ * @template T
4529
+ * @param {Promise<T>} promise
4530
+ * @returns {Promise<T>}
4531
+ */
4532
+ track(promise) {
4533
+ this.#pending.add(promise);
4534
+ promise.then(() => this.#pending.delete(promise), () => this.#pending.delete(promise));
4535
+ return promise;
4536
+ }
4537
+ async settle() {
4538
+ while (this.#pending.size > 0) await Promise.allSettled([...this.#pending]);
4539
+ }
4540
+ abort() {
4541
+ if (this.#aborted) return;
4542
+ this.#aborted = true;
4543
+ this.#controller?.abort(STALE_REACTION);
4544
+ }
4545
+ get_abort_signal() {
4546
+ const controller = this.#controller ??= new AbortController();
4547
+ if (this.#aborted) controller.abort(STALE_REACTION);
4548
+ return controller.signal;
4549
+ }
4405
4550
  get_title() {
4406
4551
  return this.#title.value;
4407
4552
  }
@@ -4424,7 +4569,7 @@ var SSRState = class {
4424
4569
  }
4425
4570
  };
4426
4571
  //#endregion
4427
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/blocks/html.js
4572
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/blocks/html.js
4428
4573
  /**
4429
4574
  * @param {string} value
4430
4575
  */
@@ -4432,7 +4577,7 @@ function html(value) {
4432
4577
  return "<!---->" + String(value ?? "") + "<!---->";
4433
4578
  }
4434
4579
  //#endregion
4435
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/index.js
4580
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/index.js
4436
4581
  var INVALID_ATTR_NAME_CHAR_REGEX = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
4437
4582
  /**
4438
4583
  * @param {Renderer} renderer
@@ -4614,9 +4759,9 @@ function derived(fn) {
4614
4759
  };
4615
4760
  }
4616
4761
  //#endregion
4617
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/legacy/legacy-server.js
4762
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/legacy/legacy-server.js
4618
4763
  /** @import { SvelteComponent } from '../index.js' */
4619
- /** @import { Csp } from '#server' */
4764
+ /** @import { Csp } from '../server/public.js' */
4620
4765
  /** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
4621
4766
  /**
4622
4767
  * Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.
@@ -4674,7 +4819,17 @@ value: (onfulfilled, onrejected) => {
4674
4819
  return component_constructor;
4675
4820
  }
4676
4821
  //#endregion
4677
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/hydratable.js
4822
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/abort-signal.js
4823
+ function getAbortSignal() {
4824
+ let context = ssr_context;
4825
+ while (context !== null) {
4826
+ if (context.r !== null) return context.r.global.get_abort_signal();
4827
+ context = context.p;
4828
+ }
4829
+ return new AbortController().signal;
4830
+ }
4831
+ //#endregion
4832
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/hydratable.js
4678
4833
  /** @import { HydratableLookupEntry } from '#server' */
4679
4834
  /**
4680
4835
  * @template T
@@ -4735,7 +4890,7 @@ function serialization_stack(root_stack, uneval_stack) {
4735
4890
  return out || "<missing stack trace>";
4736
4891
  }
4737
4892
  //#endregion
4738
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/internal/server/blocks/snippet.js
4893
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/internal/server/blocks/snippet.js
4739
4894
  /** @import { Snippet } from 'svelte' */
4740
4895
  /** @import { Renderer } from '../renderer' */
4741
4896
  /** @import { Getters } from '#shared' */
@@ -4755,7 +4910,7 @@ function createRawSnippet(fn) {
4755
4910
  };
4756
4911
  }
4757
4912
  //#endregion
4758
- //#region ../../node_modules/.bun/svelte@5.56.8+ed7c73fb52e3b564/node_modules/svelte/src/index-server.js
4913
+ //#region ../../node_modules/.bun/svelte@5.57.0+ca81d4509358e51d/node_modules/svelte/src/index-server.js
4759
4914
  /** @import { SSRContext } from '#server' */
4760
4915
  /** @import { Renderer } from './internal/server/renderer.js' */
4761
4916
  var index_server_exports = /* @__PURE__ */ __exportAll({
@@ -4899,7 +5054,7 @@ var options = {
4899
5054
  app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.svg\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
4900
5055
  error: error_template_default
4901
5056
  },
4902
- version_hash: "164as4d"
5057
+ version_hash: "m22kw"
4903
5058
  };
4904
5059
  async function get_hooks() {
4905
5060
  let handle;
@@ -4922,4 +5077,4 @@ async function get_hooks() {
4922
5077
  }
4923
5078
 
4924
5079
  export { hasContext as A, tick as B, props_id as C, getAllContexts as D, mount as E, unmount as F, on as G, ATTACHMENT_KEY as H, snapshot as I, __commonJSMin as _, readable as a, bind_props as b, setContext as c, derived as d, getContext as e, html as f, get_hooks as g, head as h, index_server_exports as i, escape_html as j, attr as k, ensure_array_like as l, attr_class as m, noop as n, options as o, clsx$1 as p, stringify as q, read_implementation as r, set_read_implementation as s, attr_style as t, spread_props as u, attributes as v, writable as w, run as x, element as y, __toESM as z };
4925
- //# sourceMappingURL=internal.js-B7HEnRRn.js.map
5080
+ //# sourceMappingURL=internal.js-D20lTOcu.js.map