nolzu 0.0.1 → 0.1.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 (491) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +24 -7
  3. package/build/client/_app/immutable/assets/0.SPD4wYkc.css +1 -0
  4. package/build/client/_app/immutable/assets/1.BRilEoOO.css +1 -0
  5. package/build/client/_app/immutable/assets/10.DwLiBGDj.css +1 -0
  6. package/build/client/_app/immutable/assets/11.D_TtWT3D.css +1 -0
  7. package/build/client/_app/immutable/assets/12.CSVGmtUY.css +1 -0
  8. package/build/client/_app/immutable/assets/13.qTa7IHbg.css +1 -0
  9. package/build/client/_app/immutable/assets/19.CbCFXKb8.css +1 -0
  10. package/build/client/_app/immutable/assets/2.CfHhgI77.css +1 -0
  11. package/build/client/_app/immutable/assets/20.C5CSZhyT.css +1 -0
  12. package/build/client/_app/immutable/assets/21.BBpYkZcc.css +1 -0
  13. package/build/client/_app/immutable/assets/22.C9RgY9kl.css +1 -0
  14. package/build/client/_app/immutable/assets/23.B6Dp9RJO.css +1 -0
  15. package/build/client/_app/immutable/assets/24.C7g2abUW.css +1 -0
  16. package/build/client/_app/immutable/assets/26.DTMI6ROV.css +1 -0
  17. package/build/client/_app/immutable/assets/27.AxXMpDkB.css +1 -0
  18. package/build/client/_app/immutable/assets/28.939ac-98.css +1 -0
  19. package/build/client/_app/immutable/assets/3.3lqex1t-.css +1 -0
  20. package/build/client/_app/immutable/assets/4.C52MzO_d.css +1 -0
  21. package/build/client/_app/immutable/assets/5.CsfJAwvS.css +1 -0
  22. package/build/client/_app/immutable/assets/8.ByspUp-s.css +1 -0
  23. package/build/client/_app/immutable/assets/9.BCSFZmce.css +1 -0
  24. package/build/client/_app/immutable/assets/Banner.DDqfpWLD.css +1 -0
  25. package/build/client/_app/immutable/assets/BoardOff.mpX08-Be.css +1 -0
  26. package/build/client/_app/immutable/assets/Button.BlwsEgUc.css +1 -0
  27. package/build/client/_app/immutable/assets/Chip.qAAa6_e5.css +1 -0
  28. package/build/client/_app/immutable/assets/Dialog.D5Ln60a8.css +1 -0
  29. package/build/client/_app/immutable/assets/FeaturePanels.DZ_Mth5M.css +1 -0
  30. package/build/client/_app/immutable/assets/FolderBrowser.DBmRWDCH.css +1 -0
  31. package/build/client/_app/immutable/assets/Geist-Variable.Bj2R_7yk.woff2 +0 -0
  32. package/build/client/_app/immutable/assets/GeistMono-Variable.Dispecij.woff2 +0 -0
  33. package/build/client/_app/immutable/assets/HelpTip.DF6T9nns.css +1 -0
  34. package/build/client/_app/immutable/assets/InfoBox.CpavOykF.css +1 -0
  35. package/build/client/_app/immutable/assets/KeyCaps.D2t-lY-8.css +1 -0
  36. package/build/client/_app/immutable/assets/LogLine.Bu4feLn5.css +1 -0
  37. package/build/client/_app/immutable/assets/Markdown.DI6AtWAc.css +1 -0
  38. package/build/client/_app/immutable/assets/ModelPicker.DQzj7Nj8.css +1 -0
  39. package/build/client/_app/immutable/assets/OptionButtons.BYiyOXOE.css +1 -0
  40. package/build/client/_app/immutable/assets/PeekPanel.DzMdHoqg.css +1 -0
  41. package/build/client/_app/immutable/assets/ScoutPage.CVIiLy5c.css +1 -0
  42. package/build/client/_app/immutable/assets/SetupSteps.B6pZP1Bk.css +1 -0
  43. package/build/client/_app/immutable/assets/Skeleton.BC-1_U5d.css +1 -0
  44. package/build/client/_app/immutable/assets/SlotsMeter.Dq7GGYlD.css +1 -0
  45. package/build/client/_app/immutable/assets/StartConfirm.DxNN2AOb.css +1 -0
  46. package/build/client/_app/immutable/assets/StatePill.CGWFVUUg.css +1 -0
  47. package/build/client/_app/immutable/assets/Streamed.DpZ6wgO2.css +1 -0
  48. package/build/client/_app/immutable/assets/card-pulls.C5uGMuAh.css +1 -0
  49. package/build/client/_app/immutable/assets/next-step.CKg1w06J.css +1 -0
  50. package/build/client/_app/immutable/chunks/-B5EclhK.js +1 -0
  51. package/build/client/_app/immutable/chunks/-Q3zApAy.js +1 -0
  52. package/build/client/_app/immutable/chunks/6-hwN_Ik.js +3 -0
  53. package/build/client/_app/immutable/chunks/B16UF4PA.js +11 -0
  54. package/build/client/_app/immutable/chunks/B1V3h1VF.js +1 -0
  55. package/build/client/_app/immutable/chunks/B2d2Mkuz.js +68 -0
  56. package/build/client/_app/immutable/chunks/B2yzhiEa.js +1 -0
  57. package/build/client/_app/immutable/chunks/B5zDDQUU.js +2 -0
  58. package/build/client/_app/immutable/chunks/B8DHSiWf.js +1 -0
  59. package/build/client/_app/immutable/chunks/B8z33EzI.js +1 -0
  60. package/build/client/_app/immutable/chunks/BCRkrH6c.js +1 -0
  61. package/build/client/_app/immutable/chunks/BCScjOxu.js +1 -0
  62. package/build/client/_app/immutable/chunks/BMUQtCEC.js +1 -0
  63. package/build/client/_app/immutable/chunks/BNnfkvZM.js +1 -0
  64. package/build/client/_app/immutable/chunks/BelWyZaW.js +1 -0
  65. package/build/client/_app/immutable/chunks/BhZpqODT.js +1 -0
  66. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  67. package/build/client/_app/immutable/chunks/BmafI-Bs.js +1 -0
  68. package/build/client/_app/immutable/chunks/BvRk9kiK.js +0 -0
  69. package/build/client/_app/immutable/chunks/C4i6bdQg.js +1 -0
  70. package/build/client/_app/immutable/chunks/C8u5TyIB.js +1 -0
  71. package/build/client/_app/immutable/chunks/CFs2xhoy.js +1 -0
  72. package/build/client/_app/immutable/chunks/CIm2DioU.js +1 -0
  73. package/build/client/_app/immutable/chunks/CONqGBXC.js +1 -0
  74. package/build/client/_app/immutable/chunks/CSOz40qO.js +1 -0
  75. package/build/client/_app/immutable/chunks/CXxuD1ef.js +3 -0
  76. package/build/client/_app/immutable/chunks/CarrGsZA.js +2 -0
  77. package/build/client/_app/immutable/chunks/CdrmTD44.js +1 -0
  78. package/build/client/_app/immutable/chunks/CfJRH9gh.js +2 -0
  79. package/build/client/_app/immutable/chunks/Ci7C9Cki.js +1 -0
  80. package/build/client/_app/immutable/chunks/CkOTL1vK.js +1 -0
  81. package/build/client/_app/immutable/chunks/CngTtGc_.js +1 -0
  82. package/build/client/_app/immutable/chunks/Cp3A1zR8.js +1 -0
  83. package/build/client/_app/immutable/chunks/CwtMnwNL.js +3 -0
  84. package/build/client/_app/immutable/chunks/Cy7f_oXg.js +1 -0
  85. package/build/client/_app/immutable/chunks/D-wwLm5t.js +1 -0
  86. package/build/client/_app/immutable/chunks/D2imbgaf.js +1 -0
  87. package/build/client/_app/immutable/chunks/D32mip60.js +1 -0
  88. package/build/client/_app/immutable/chunks/D46Vk19W.js +1 -0
  89. package/build/client/_app/immutable/chunks/DCUUgo-6.js +1 -0
  90. package/build/client/_app/immutable/chunks/DFjnjJjy.js +1 -0
  91. package/build/client/_app/immutable/chunks/DHMbSbMg.js +1 -0
  92. package/build/client/_app/immutable/chunks/DJOFx2wx.js +1 -0
  93. package/build/client/_app/immutable/chunks/DV4tvxHp.js +3 -0
  94. package/build/client/_app/immutable/chunks/DXk_5YEw.js +1 -0
  95. package/build/client/_app/immutable/chunks/DjgnRLJt.js +1 -0
  96. package/build/client/_app/immutable/chunks/DlWlQ_vP.js +1 -0
  97. package/build/client/_app/immutable/chunks/DpIAei2y.js +2 -0
  98. package/build/client/_app/immutable/chunks/Dt-HX3Vu.js +1 -0
  99. package/build/client/_app/immutable/chunks/DuSthUWX.js +1 -0
  100. package/build/client/_app/immutable/chunks/Ecfl8TOn.js +2 -0
  101. package/build/client/_app/immutable/chunks/ITHE99Aa.js +1 -0
  102. package/build/client/_app/immutable/chunks/Khdge0KS.js +1 -0
  103. package/build/client/_app/immutable/chunks/LMEKNlm0.js +1 -0
  104. package/build/client/_app/immutable/chunks/OnIeaiuO.js +1 -0
  105. package/build/client/_app/immutable/chunks/VFQLu55q.js +1 -0
  106. package/build/client/_app/immutable/chunks/ZsUxKnQw.js +1 -0
  107. package/build/client/_app/immutable/chunks/aWP8DVhV.js +1 -0
  108. package/build/client/_app/immutable/chunks/bB04Xp1f.js +1 -0
  109. package/build/client/_app/immutable/chunks/eylBqhv8.js +3 -0
  110. package/build/client/_app/immutable/chunks/hx0ssLL_.js +2 -0
  111. package/build/client/_app/immutable/chunks/mumDj17t.js +1 -0
  112. package/build/client/_app/immutable/chunks/pZYp3_TE.js +1 -0
  113. package/build/client/_app/immutable/chunks/tImwjqWn.js +1 -0
  114. package/build/client/_app/immutable/chunks/uBIymjUX.js +1 -0
  115. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  116. package/build/client/_app/immutable/entry/app.DVZ1wE36.js +2 -0
  117. package/build/client/_app/immutable/entry/start.DluCc61B.js +1 -0
  118. package/build/client/_app/immutable/nodes/0.CwNFevXf.js +1 -0
  119. package/build/client/_app/immutable/nodes/1.BR6FYiC-.js +1 -0
  120. package/build/client/_app/immutable/nodes/10.wNwBFtom.js +2 -0
  121. package/build/client/_app/immutable/nodes/11.DpoIbMNF.js +2 -0
  122. package/build/client/_app/immutable/nodes/12.CWdUJ8l3.js +2 -0
  123. package/build/client/_app/immutable/nodes/13.CZ2uTvNS.js +1 -0
  124. package/build/client/_app/immutable/nodes/14.CzgyXuvL.js +1 -0
  125. package/build/client/_app/immutable/nodes/15.CzgyXuvL.js +1 -0
  126. package/build/client/_app/immutable/nodes/16.odL9eB2N.js +1 -0
  127. package/build/client/_app/immutable/nodes/17.B-RnUeVU.js +1 -0
  128. package/build/client/_app/immutable/nodes/18.BLYKxyq2.js +1 -0
  129. package/build/client/_app/immutable/nodes/19.CgyFfPqF.js +3 -0
  130. package/build/client/_app/immutable/nodes/2.CCWT41Qr.js +1 -0
  131. package/build/client/_app/immutable/nodes/20.BBk5-krg.js +1 -0
  132. package/build/client/_app/immutable/nodes/21.CJoU3s1A.js +2 -0
  133. package/build/client/_app/immutable/nodes/22.CoRvPh8m.js +1 -0
  134. package/build/client/_app/immutable/nodes/23.zXO3NjnM.js +3 -0
  135. package/build/client/_app/immutable/nodes/24.CmO27TED.js +1 -0
  136. package/build/client/_app/immutable/nodes/26.TVKNr_xX.js +18 -0
  137. package/build/client/_app/immutable/nodes/27.RojtGU_o.js +1 -0
  138. package/build/client/_app/immutable/nodes/28.CVTdeeSI.js +2 -0
  139. package/build/client/_app/immutable/nodes/3.Cgib7Vi6.js +1 -0
  140. package/build/client/_app/immutable/nodes/4.CnMwOCec.js +1 -0
  141. package/build/client/_app/immutable/nodes/5.-NqYtQj_.js +1 -0
  142. package/build/client/_app/immutable/nodes/6.D5xk-UBM.js +1 -0
  143. package/build/client/_app/immutable/nodes/7.IL4b-DII.js +1 -0
  144. package/build/client/_app/immutable/nodes/8.DJrguHjO.js +11 -0
  145. package/build/client/_app/immutable/nodes/9.DTUSzWiK.js +1 -0
  146. package/build/client/_app/version.json +1 -0
  147. package/build/client/favicon.svg +7 -0
  148. package/build/env.js +70 -0
  149. package/build/handler.js +26 -0
  150. package/build/index.js +149 -0
  151. package/build/server/chunks/chunks/Banner.js-D4mtxUfF.js +17 -0
  152. package/build/server/chunks/chunks/BoardOff.js-Dg5-LoR3.js +1627 -0
  153. package/build/server/chunks/chunks/Button.js-Buh9rnpu.js +43 -0
  154. package/build/server/chunks/chunks/Chip.js-xZ7vFkHx.js +12 -0
  155. package/build/server/chunks/chunks/Dialog.js-CGpwdpM-.js +60 -0
  156. package/build/server/chunks/chunks/FeaturePanels.js-B2sKozgF.js +84 -0
  157. package/build/server/chunks/chunks/FolderBrowser.js-DUHFhDaX.js +28 -0
  158. package/build/server/chunks/chunks/HelpTip.js-CzemvmjC.js +19 -0
  159. package/build/server/chunks/chunks/InfoBox.js-BJiVzZgw.js +10 -0
  160. package/build/server/chunks/chunks/KeyCaps.js-BMI2Hrh2.js +37 -0
  161. package/build/server/chunks/chunks/LogLine.js-2b7uX__H.js +35 -0
  162. package/build/server/chunks/chunks/Markdown.js-Clud88KU.js +4233 -0
  163. package/build/server/chunks/chunks/ModelPicker.js-FuBgyKIA.js +141 -0
  164. package/build/server/chunks/chunks/OptionButtons.js-LQKrAwUX.js +28 -0
  165. package/build/server/chunks/chunks/PeekPanel.js-aZ-r_v3N.js +375 -0
  166. package/build/server/chunks/chunks/ScoutPage.js-2DcNia96.js +733 -0
  167. package/build/server/chunks/chunks/SetupSteps.js-D7TAF7xa.js +66 -0
  168. package/build/server/chunks/chunks/Skeleton.js-diCP2sd5.js +30 -0
  169. package/build/server/chunks/chunks/SlotsMeter.js-BV_sAGf5.js +18 -0
  170. package/build/server/chunks/chunks/StartConfirm.js-CzEdFtbO.js +124 -0
  171. package/build/server/chunks/chunks/StatePill.js-CM7-HXNM.js +27 -0
  172. package/build/server/chunks/chunks/Streamed.js-_NgwNMMs.js +43 -0
  173. package/build/server/chunks/chunks/_page.server.js-BaGoctEY.js +1419 -0
  174. package/build/server/chunks/chunks/activity.js-CSoPUQLq.js +84 -0
  175. package/build/server/chunks/chunks/add-repo.js-DtHEobfm.js +305 -0
  176. package/build/server/chunks/chunks/app-header.js-CCflgeEQ.js +13 -0
  177. package/build/server/chunks/chunks/app.js-CuPn8jtk.js +12 -0
  178. package/build/server/chunks/chunks/bin.js-Cyb2cYLc.js +58 -0
  179. package/build/server/chunks/chunks/board-keys.js-CW3qw-MC.js +32 -0
  180. package/build/server/chunks/chunks/board-page.js-D0tdsE9J.js +860 -0
  181. package/build/server/chunks/chunks/board.js-BxL3CjB1.js +203 -0
  182. package/build/server/chunks/chunks/browser-test.js-DJEpOoVz.js +170 -0
  183. package/build/server/chunks/chunks/card-pulls.js-d_uGmBB3.js +229 -0
  184. package/build/server/chunks/chunks/card-repos.js-QaMCxiyV.js +59 -0
  185. package/build/server/chunks/chunks/chain-store.js-D42m8DUo.js +91 -0
  186. package/build/server/chunks/chunks/chain.js-CJFRywIC.js +52 -0
  187. package/build/server/chunks/chunks/changes.js-D8ITRMgU.js +513 -0
  188. package/build/server/chunks/chunks/checkout.js-Ys5L_gA4.js +319 -0
  189. package/build/server/chunks/chunks/client.js-B7jIMDuS.js +68 -0
  190. package/build/server/chunks/chunks/clipboard.js-qXskOBim.js +12 -0
  191. package/build/server/chunks/chunks/cloud-status.js-hy-9zUVX.js +95 -0
  192. package/build/server/chunks/chunks/coach.js-BhNB14rV.js +296 -0
  193. package/build/server/chunks/chunks/comments.js-1nWJQptB.js +311 -0
  194. package/build/server/chunks/chunks/commit-message.js-CMcNZUZw.js +8 -0
  195. package/build/server/chunks/chunks/create-card.js-DKtprMG6.js +498 -0
  196. package/build/server/chunks/chunks/db.js-pqoVpAzG.js +80 -0
  197. package/build/server/chunks/chunks/diff-comments.js-BSCuay_U.js +95 -0
  198. package/build/server/chunks/chunks/discussion.js-rJ5OMfvX.js +355 -0
  199. package/build/server/chunks/chunks/display.js-Bf-vGQ7Q.js +61 -0
  200. package/build/server/chunks/chunks/elapsed.js-DikkNhaD.js +27 -0
  201. package/build/server/chunks/chunks/engine.js-DS5zUwsE.js +115 -0
  202. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  203. package/build/server/chunks/chunks/estimate.js-BHTYVTaQ.js +2484 -0
  204. package/build/server/chunks/chunks/evidence-timeline.js-Dk0dTZIy.js +253 -0
  205. package/build/server/chunks/chunks/evidence.js-CT3tWdbB.js +257 -0
  206. package/build/server/chunks/chunks/exports.js-Hn-WQRMB.js +150 -0
  207. package/build/server/chunks/chunks/features.svelte.js-DNsFmFZb.js +10 -0
  208. package/build/server/chunks/chunks/files.js-V46lE0-6.js +46 -0
  209. package/build/server/chunks/chunks/filter.js-CsmCtJMd.js +11 -0
  210. package/build/server/chunks/chunks/forms.js-03E8qnFz.js +35 -0
  211. package/build/server/chunks/chunks/gate.js-Cbqo8Yy0.js +82 -0
  212. package/build/server/chunks/chunks/getting-started.js-DKbHofN5.js +55 -0
  213. package/build/server/chunks/chunks/git.js-l43vBHqs.js +16 -0
  214. package/build/server/chunks/chunks/home-path.js-BXgrl3TP.js +11 -0
  215. package/build/server/chunks/chunks/hub-link.js-B5kjLyyd.js +1532 -0
  216. package/build/server/chunks/chunks/internal.js-DaSBO6jY.js +1239 -0
  217. package/build/server/chunks/chunks/internal2.js-D6AKyUgY.js +27 -0
  218. package/build/server/chunks/chunks/knowledge-page.js-D2ALB3v9.js +292 -0
  219. package/build/server/chunks/chunks/knowledge-revert.js-2eyN9Lcb.js +109 -0
  220. package/build/server/chunks/chunks/knowledge.js--eAgdzNx.js +394 -0
  221. package/build/server/chunks/chunks/last-board.js-BemeiK3t.js +23 -0
  222. package/build/server/chunks/chunks/log.js-R2zUph6T.js +228 -0
  223. package/build/server/chunks/chunks/loop.js-D3guWKLp.js +4038 -0
  224. package/build/server/chunks/chunks/loop2.js-B_Qd2m4y.js +67 -0
  225. package/build/server/chunks/chunks/navigation.js-DQJMz-SM.js +2 -0
  226. package/build/server/chunks/chunks/new-project.js-DNcr9JpB.js +305 -0
  227. package/build/server/chunks/chunks/next-step.js-B8Kl0Iv9.js +522 -0
  228. package/build/server/chunks/chunks/node.js-Bz2jT5wt.js +3381 -0
  229. package/build/server/chunks/chunks/now-live.svelte.js-hIaDgjJ3.js +13 -0
  230. package/build/server/chunks/chunks/now-snapshot.js-zGKLIzox.js +207 -0
  231. package/build/server/chunks/chunks/now.js-Dfm-o0Ha.js +765 -0
  232. package/build/server/chunks/chunks/onboard.js-LBqPOxyU.js +1525 -0
  233. package/build/server/chunks/chunks/ordinal.js-Bm_9QEBD.js +12 -0
  234. package/build/server/chunks/chunks/overview.js-C32iHkXD.js +1108 -0
  235. package/build/server/chunks/chunks/page-keys.svelte.js-D8vXA_8Z.js +14 -0
  236. package/build/server/chunks/chunks/patch.js-Bl7vwsUj.js +62 -0
  237. package/build/server/chunks/chunks/paths.js-DVRjNYFW.js +19 -0
  238. package/build/server/chunks/chunks/peek.js-D9sSjT9t.js +95 -0
  239. package/build/server/chunks/chunks/plan.js-DFq5ntMM.js +143 -0
  240. package/build/server/chunks/chunks/project-files-notice.js-CcqcBgUP.js +19 -0
  241. package/build/server/chunks/chunks/project-files.js-DTC4jUxy.js +52 -0
  242. package/build/server/chunks/chunks/project-folder.js-CoKgPiM0.js +22 -0
  243. package/build/server/chunks/chunks/projects.js-bw2V11od.js +989 -0
  244. package/build/server/chunks/chunks/prs.js-CLfImauu.js +118 -0
  245. package/build/server/chunks/chunks/publish.js-D2vWpIJU.js +195 -0
  246. package/build/server/chunks/chunks/pull-list.js-BCIBJdyz.js +691 -0
  247. package/build/server/chunks/chunks/qa-ask.svelte.js-8Hf1JWW2.js +47 -0
  248. package/build/server/chunks/chunks/qa-setup.js-DFOEcNxH.js +1241 -0
  249. package/build/server/chunks/chunks/quiet.js-1GKY40Ay.js +104 -0
  250. package/build/server/chunks/chunks/rail.js-BePBwOqZ.js +135 -0
  251. package/build/server/chunks/chunks/review.js-MPqnq9Gy.js +98 -0
  252. package/build/server/chunks/chunks/routing.js-B8s1QwSP.js +265 -0
  253. package/build/server/chunks/chunks/run-log.js-CnN2jOcg.js +94 -0
  254. package/build/server/chunks/chunks/run.js-COSejjLl.js +34 -0
  255. package/build/server/chunks/chunks/scout-findings.js-CqJti10a.js +940 -0
  256. package/build/server/chunks/chunks/scout.js-Bm7wQLX2.js +62 -0
  257. package/build/server/chunks/chunks/sentinels.js-BXvpnzr3.js +13 -0
  258. package/build/server/chunks/chunks/server.js-BR0D07DR.js +3803 -0
  259. package/build/server/chunks/chunks/settings-sections.js-V70W7BkZ.js +103 -0
  260. package/build/server/chunks/chunks/shared.js-BgfCUZUJ.js +776 -0
  261. package/build/server/chunks/chunks/sign-in.js-O-pBhi19.js +14 -0
  262. package/build/server/chunks/chunks/snapshot.js-BekzL_He.js +38 -0
  263. package/build/server/chunks/chunks/spend.js-BabnR69T.js +63 -0
  264. package/build/server/chunks/chunks/src.js-Cm8RAH_q.js +609 -0
  265. package/build/server/chunks/chunks/src2.js-CV8tsClO.js +1186 -0
  266. package/build/server/chunks/chunks/src3.js-h9tTEbVb.js +11222 -0
  267. package/build/server/chunks/chunks/stack.js-CMWXhMZS.js +13 -0
  268. package/build/server/chunks/chunks/standup.js-D-qBnMx4.js +103 -0
  269. package/build/server/chunks/chunks/state.js-BTDrgu7s.js +71 -0
  270. package/build/server/chunks/chunks/stream.js-D6r6iqjD.js +66 -0
  271. package/build/server/chunks/chunks/terms.js-DPZztSEn.js +88 -0
  272. package/build/server/chunks/chunks/ticket-system.js-Dj9R3XJw.js +147 -0
  273. package/build/server/chunks/chunks/ticket.js-6sj-2ZEM.js +110 -0
  274. package/build/server/chunks/chunks/timesheet.js-DfhIokoE.js +212 -0
  275. package/build/server/chunks/chunks/timesheet2.js-Cu95ddl3.js +84 -0
  276. package/build/server/chunks/chunks/to-workspace.js-DiOJP59J.js +308 -0
  277. package/build/server/chunks/chunks/toast-stack.svelte.js-CXIg3_KT.js +10 -0
  278. package/build/server/chunks/chunks/uneval.js-VnZcgzZr.js +488 -0
  279. package/build/server/chunks/chunks/utils.js-DQTBh7_6.js +1006 -0
  280. package/build/server/chunks/chunks/when-said.js-0F9asAma.js +35 -0
  281. package/build/server/chunks/chunks/workspace.js-BBdJRon9.js +212 -0
  282. package/build/server/chunks/entries/endpoints/api/board/_server.ts.js-BlYC_lpV.js +69 -0
  283. package/build/server/chunks/entries/endpoints/api/board/minimize/_server.ts.js-Wddt9YPR.js +68 -0
  284. package/build/server/chunks/entries/endpoints/api/board/move/_server.ts.js-BwZpCKx0.js +68 -0
  285. package/build/server/chunks/entries/endpoints/api/board/promote/_server.ts.js-Cw6kvkMq.js +68 -0
  286. package/build/server/chunks/entries/endpoints/api/board/pulls/_server.ts.js-DFhpbiMo.js +71 -0
  287. package/build/server/chunks/entries/endpoints/api/board/stop/_server.ts.js-D5eylDMw.js +68 -0
  288. package/build/server/chunks/entries/endpoints/api/card/_key_/answer/_server.ts.js-CG8xh52y.js +68 -0
  289. package/build/server/chunks/entries/endpoints/api/card/_key_/branch/_server.ts.js-a5_P9voA.js +40 -0
  290. package/build/server/chunks/entries/endpoints/api/card/_key_/chain/_server.ts.js-tJvQy6RK.js +70 -0
  291. package/build/server/chunks/entries/endpoints/api/card/_key_/checkouts/_server.ts.js-B2_gx6vF.js +41 -0
  292. package/build/server/chunks/entries/endpoints/api/card/_key_/choice/_server.ts.js-pmAdIQkK.js +34 -0
  293. package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_id_/_server.ts.js-C5NxGWw3.js +68 -0
  294. package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_server.ts.js-0rw7UNv8.js +64 -0
  295. package/build/server/chunks/entries/endpoints/api/card/_key_/commit/_server.ts.js-_yXWCOlQ.js +68 -0
  296. package/build/server/chunks/entries/endpoints/api/card/_key_/commit-diff/_server.ts.js-CRPV3z-g.js +61 -0
  297. package/build/server/chunks/entries/endpoints/api/card/_key_/commit-message/_server.ts.js-CO9mD3u6.js +82 -0
  298. package/build/server/chunks/entries/endpoints/api/card/_key_/context/_server.ts.js-7kzrigFz.js +42 -0
  299. package/build/server/chunks/entries/endpoints/api/card/_key_/delete/_server.ts.js-DH0nO9wG.js +516 -0
  300. package/build/server/chunks/entries/endpoints/api/card/_key_/file/_server.ts.js-D80SvJDi.js +35 -0
  301. package/build/server/chunks/entries/endpoints/api/card/_key_/files/_...path_/_server.ts.js-GxFjb2H0.js +34 -0
  302. package/build/server/chunks/entries/endpoints/api/card/_key_/fix/_server.ts.js-B-HAB050.js +68 -0
  303. package/build/server/chunks/entries/endpoints/api/card/_key_/knowledge/_server.ts.js-D4fN-j7X.js +81 -0
  304. package/build/server/chunks/entries/endpoints/api/card/_key_/link/_other_/_server.ts.js-C00pQDCu.js +42 -0
  305. package/build/server/chunks/entries/endpoints/api/card/_key_/log/_server.ts.js-BXW_tG-I.js +32 -0
  306. package/build/server/chunks/entries/endpoints/api/card/_key_/log/raw/_server.ts.js-pT8StZGR.js +32 -0
  307. package/build/server/chunks/entries/endpoints/api/card/_key_/message/_server.ts.js-ZMno2Hu6.js +68 -0
  308. package/build/server/chunks/entries/endpoints/api/card/_key_/models/_server.ts.js-DEZVpqO3.js +73 -0
  309. package/build/server/chunks/entries/endpoints/api/card/_key_/patch/_server.ts.js-BxfLi-Zs.js +61 -0
  310. package/build/server/chunks/entries/endpoints/api/card/_key_/peek/_server.ts.js-CsTKWIP_.js +169 -0
  311. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/_server.ts.js-CsOeAXkf.js +53 -0
  312. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/comments/_server.ts.js-DZ2XHOhF.js +71 -0
  313. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discuss/_server.ts.js-CO8eM0e8.js +72 -0
  314. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discussions/_server.ts.js-Lp7l0Yqv.js +71 -0
  315. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix/_server.ts.js-CeIhjpQ4.js +68 -0
  316. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix-all/_server.ts.js-D-DKoCpQ.js +68 -0
  317. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/links/_server.ts.js-B_q3jUP3.js +72 -0
  318. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/qa/_server.ts.js-BulVcJY9.js +68 -0
  319. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/seen/_server.ts.js-Z06A6MS1.js +71 -0
  320. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/triage/_server.ts.js-qADU4URF.js +68 -0
  321. package/build/server/chunks/entries/endpoints/api/card/_key_/pull/_server.ts.js-CHnTH9WK.js +58 -0
  322. package/build/server/chunks/entries/endpoints/api/card/_key_/push/_server.ts.js-BPdPwPo2.js +83 -0
  323. package/build/server/chunks/entries/endpoints/api/card/_key_/repos/_server.ts.js-Bjqa3Uoo.js +73 -0
  324. package/build/server/chunks/entries/endpoints/api/card/_key_/research/_server.ts.js-DzQjoHOZ.js +138 -0
  325. package/build/server/chunks/entries/endpoints/api/card/_key_/retry/_server.ts.js-CAodrXqd.js +68 -0
  326. package/build/server/chunks/entries/endpoints/api/card/_key_/send-back/_server.ts.js-CmJSnvTx.js +68 -0
  327. package/build/server/chunks/entries/endpoints/api/card/_key_/stack/_server.ts.js-DjI8S94J.js +82 -0
  328. package/build/server/chunks/entries/endpoints/api/card/_key_/tasks/_server.ts.js-BzX_nNJk.js +71 -0
  329. package/build/server/chunks/entries/endpoints/api/card/_key_/thread/_server.ts.js-Dn36Guxk.js +33 -0
  330. package/build/server/chunks/entries/endpoints/api/cards/_server.ts.js-DPMOBsvp.js +77 -0
  331. package/build/server/chunks/entries/endpoints/api/cards/context/_server.ts.js-D6y-g2O-.js +52 -0
  332. package/build/server/chunks/entries/endpoints/api/cards/next/_server.ts.js-C2se67rf.js +55 -0
  333. package/build/server/chunks/entries/endpoints/api/chain/_server.ts.js-DKO5Q8GV.js +70 -0
  334. package/build/server/chunks/entries/endpoints/api/clones/_server.ts.js-Bgcc_Beg.js +56 -0
  335. package/build/server/chunks/entries/endpoints/api/current-project/_server.ts.js-DZCtSlXs.js +81 -0
  336. package/build/server/chunks/entries/endpoints/api/evidence/timesheet/_server.ts.js-xJwzSrcl.js +32 -0
  337. package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-BdcE7k8S.js +83 -0
  338. package/build/server/chunks/entries/endpoints/api/gh/_server.ts.js-CGvM8fn7.js +66 -0
  339. package/build/server/chunks/entries/endpoints/api/gh/name/_server.ts.js-CHh3tAu7.js +36 -0
  340. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-DLUfrHo6.js +22 -0
  341. package/build/server/chunks/entries/endpoints/api/login-item/_server.ts.js-Cya7S7W6.js +77 -0
  342. package/build/server/chunks/entries/endpoints/api/notes/_server.ts.js-DaUFVqSM.js +26 -0
  343. package/build/server/chunks/entries/endpoints/api/notifications/_server.ts.js-DK6NFnII.js +76 -0
  344. package/build/server/chunks/entries/endpoints/api/now/_server.ts.js-xW0jeJdy.js +83 -0
  345. package/build/server/chunks/entries/endpoints/api/package/entry/_server.ts.js-DQyZanpo.js +35 -0
  346. package/build/server/chunks/entries/endpoints/api/projects/_server.ts.js-CzXJTj_l.js +58 -0
  347. package/build/server/chunks/entries/endpoints/api/qa-setup/_server.ts.js-DujrYbEP.js +76 -0
  348. package/build/server/chunks/entries/endpoints/api/remove-check/_server.ts.js-1KAi9LDi.js +58 -0
  349. package/build/server/chunks/entries/endpoints/api/setup/_server.ts.js-D0MKtjR7.js +69 -0
  350. package/build/server/chunks/entries/endpoints/api/tickets/jira/_server.ts.js-Z2LdOr5l.js +39 -0
  351. package/build/server/chunks/entries/endpoints/api/tickets/read/_server.ts.js-BziHtc8Y.js +68 -0
  352. package/build/server/chunks/entries/endpoints/api/tools/_server.ts.js-oyvq8i1y.js +30 -0
  353. package/build/server/chunks/entries/endpoints/api/workspace/_server.ts.js-CMGBL5cX.js +58 -0
  354. package/build/server/chunks/entries/endpoints/api/workspace/commit/_server.ts.js-BZQQJ1YG.js +66 -0
  355. package/build/server/chunks/entries/endpoints/api/workspace/patch/_server.ts.js-xrjgHECx.js +64 -0
  356. package/build/server/chunks/entries/endpoints/api/workspace/push/_server.ts.js-CTdia7Uz.js +66 -0
  357. package/build/server/chunks/entries/hooks.server.js-B0jE-ELC.js +211 -0
  358. package/build/server/chunks/entries/pages/_error.svelte.js-DPcKI5sX.js +25 -0
  359. package/build/server/chunks/entries/pages/_layout.server.ts.js-Jj3i2Th9.js +134 -0
  360. package/build/server/chunks/entries/pages/_layout.svelte.js-Cu3ghN80.js +1251 -0
  361. package/build/server/chunks/entries/pages/_page.svelte.js-DEYydBCm.js +662 -0
  362. package/build/server/chunks/entries/pages/accept/_page.server.ts.js-BF7MrA5s.js +29 -0
  363. package/build/server/chunks/entries/pages/accept/_page.svelte.js-8yPsedd-.js +54 -0
  364. package/build/server/chunks/entries/pages/b/_board_/_page.svelte.js-S9acLF3f.js +68 -0
  365. package/build/server/chunks/entries/pages/b/_board_/_page.ts.js-BcKdG_Tp.js +21 -0
  366. package/build/server/chunks/entries/pages/b/research/_page.svelte.js-FW6Hw9g5.js +68 -0
  367. package/build/server/chunks/entries/pages/b/research/_page.ts.js-Ds2AjFFK.js +13 -0
  368. package/build/server/chunks/entries/pages/evidence/_page.server.ts.js-uwu2X7bA.js +1382 -0
  369. package/build/server/chunks/entries/pages/evidence/_page.svelte.js-DBCjiT59.js +594 -0
  370. package/build/server/chunks/entries/pages/f/_...path_/_page.svelte.js-DxwJaJzh.js +58 -0
  371. package/build/server/chunks/entries/pages/knowledge/_page.server.ts.js-BAUvFEcM.js +80 -0
  372. package/build/server/chunks/entries/pages/knowledge/_page.svelte.js-D9117gHM.js +732 -0
  373. package/build/server/chunks/entries/pages/new/_page.server.ts.js-BNCQQpyw.js +110 -0
  374. package/build/server/chunks/entries/pages/new/_page.svelte.js-Ben8-N_h.js +503 -0
  375. package/build/server/chunks/entries/pages/new/idea/_page.server.ts.js-jssA29y3.js +46 -0
  376. package/build/server/chunks/entries/pages/new/idea/_page.svelte.js-XoKspqAc.js +210 -0
  377. package/build/server/chunks/entries/pages/new/task/_page.server.ts.js-CmZgfvyt.js +66 -0
  378. package/build/server/chunks/entries/pages/new/task/_page.svelte.js-BKpERKvm.js +169 -0
  379. package/build/server/chunks/entries/pages/onboard/_page.server.ts.js-pmc_pXvs.js +12 -0
  380. package/build/server/chunks/entries/pages/onboard/_page.svelte.js-C7LNK-ba.js +5 -0
  381. package/build/server/chunks/entries/pages/projects/_page.server.ts.js-BEhLRfJ_.js +12 -0
  382. package/build/server/chunks/entries/pages/projects/_page.svelte.js-OraOjsyb.js +5 -0
  383. package/build/server/chunks/entries/pages/scout/_page.server.ts.js-hQYnMHwY.js +10 -0
  384. package/build/server/chunks/entries/pages/scout/_page.svelte.js-7q4d044Z.js +40 -0
  385. package/build/server/chunks/entries/pages/scout/f/_id_/_page.server.ts.js-BN4TnSpB.js +22 -0
  386. package/build/server/chunks/entries/pages/scout/f/_id_/_page.svelte.js-GzpLhARi.js +40 -0
  387. package/build/server/chunks/entries/pages/settings/_layout.server.ts.js-B5LgqMMT.js +12 -0
  388. package/build/server/chunks/entries/pages/settings/_layout.svelte.js-CSCpV6qA.js +81 -0
  389. package/build/server/chunks/entries/pages/settings/_page.svelte.js-DNpsNFo0.js +25 -0
  390. package/build/server/chunks/entries/pages/settings/_section_/_page.server.ts.js-nRDEV3i_.js +348 -0
  391. package/build/server/chunks/entries/pages/settings/_section_/_page.svelte.js-BihUf-nY.js +1052 -0
  392. package/build/server/chunks/entries/pages/settings/integrations/_page.server.ts.js-BTuRpg8m.js +58 -0
  393. package/build/server/chunks/entries/pages/settings/integrations/_page.svelte.js-C8i8ZmZR.js +161 -0
  394. package/build/server/chunks/entries/pages/settings/mcp/_page.server.ts.js-TFISfO1a.js +925 -0
  395. package/build/server/chunks/entries/pages/settings/mcp/_page.svelte.js-D1X0TNOm.js +433 -0
  396. package/build/server/chunks/entries/pages/settings/phases/_page.server.ts.js-CgK7MTZf.js +48 -0
  397. package/build/server/chunks/entries/pages/settings/phases/_page.svelte.js-u-sTQ-ue.js +80 -0
  398. package/build/server/chunks/entries/pages/settings/project/_page.server.ts.js-CCnk9WbO.js +363 -0
  399. package/build/server/chunks/entries/pages/settings/project/_page.svelte.js-MxvNqYlQ.js +1269 -0
  400. package/build/server/chunks/entries/pages/settings/wall/_page.server.ts.js-Bt5siY_N.js +12 -0
  401. package/build/server/chunks/entries/pages/settings/wall/_page.svelte.js-CMR4zSAt.js +43 -0
  402. package/build/server/chunks/entries/pages/t/_key_/_layout.server.ts.js-W6YPvOCA.js +124 -0
  403. package/build/server/chunks/entries/pages/t/_key_/_layout.svelte.js-CK0PiWsz.js +543 -0
  404. package/build/server/chunks/entries/pages/t/_key_/_page.server.ts.js-CdB7v0WX.js +15 -0
  405. package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.server.ts.js-Bksaje8R.js +75 -0
  406. package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.svelte.js-9OQ2eQxu.js +4607 -0
  407. package/build/server/chunks/entries/pages/team/_page.svelte.js-BdUSXC04.js +18 -0
  408. package/build/server/chunks/entries/pages/team/_page.ts.js-DfhJmoZI.js +20 -0
  409. package/build/server/chunks/entries/pages/workspace/_page.svelte.js-DLaWe23r.js +579 -0
  410. package/build/server/chunks/handler-Dlwmumt5.js +1735 -0
  411. package/build/server/chunks/index.js-BX0fZD5G.js +3701 -0
  412. package/build/server/chunks/manifest.js-B2Of6Dj7.js +761 -0
  413. package/build/server/chunks/nodes/0.js-DSzhdY0D.js +87 -0
  414. package/build/server/chunks/nodes/1.js-j4osL1br.js +9 -0
  415. package/build/server/chunks/nodes/10.js-jkvevEFY.js +75 -0
  416. package/build/server/chunks/nodes/11.js-plyiDP2n.js +72 -0
  417. package/build/server/chunks/nodes/12.js-DwtvDAyM.js +78 -0
  418. package/build/server/chunks/nodes/13.js-BpxwqFh4.js +72 -0
  419. package/build/server/chunks/nodes/14.js-B5iNIKGy.js +15 -0
  420. package/build/server/chunks/nodes/15.js-CXCAqUsG.js +15 -0
  421. package/build/server/chunks/nodes/16.js-oxkLEH0n.js +76 -0
  422. package/build/server/chunks/nodes/17.js-B-ZJEo9K.js +76 -0
  423. package/build/server/chunks/nodes/18.js-C0OUCEux.js +9 -0
  424. package/build/server/chunks/nodes/19.js-M8EAQJdW.js +76 -0
  425. package/build/server/chunks/nodes/2.js-ZedduK-3.js +33 -0
  426. package/build/server/chunks/nodes/20.js-BHvsLNjD.js +72 -0
  427. package/build/server/chunks/nodes/21.js-eOaW4si1.js +76 -0
  428. package/build/server/chunks/nodes/22.js-CbJ6tQSs.js +38 -0
  429. package/build/server/chunks/nodes/23.js-DXk8ejlx.js +81 -0
  430. package/build/server/chunks/nodes/24.js-C4qGJc4X.js +33 -0
  431. package/build/server/chunks/nodes/25.js-Cal8uT5V.js +21 -0
  432. package/build/server/chunks/nodes/26.js-Cp5jBcrN.js +80 -0
  433. package/build/server/chunks/nodes/27.js-Do55o_cb.js +17 -0
  434. package/build/server/chunks/nodes/28.js-SNz3QVix.js +9 -0
  435. package/build/server/chunks/nodes/3.js-DyivQ5dN.js +75 -0
  436. package/build/server/chunks/nodes/4.js-BGgTTQFR.js +9 -0
  437. package/build/server/chunks/nodes/5.js-DQYA2BBI.js +31 -0
  438. package/build/server/chunks/nodes/6.js-BVTi2KFL.js +24 -0
  439. package/build/server/chunks/nodes/7.js-CnprIn3p.js +12 -0
  440. package/build/server/chunks/nodes/8.js-Bdicn369.js +50 -0
  441. package/build/server/chunks/nodes/9.js-DVclPGXf.js +9 -0
  442. package/build/shims.js +33 -0
  443. package/dist/THIRD-PARTY-NOTICES.md +659 -0
  444. package/dist/detect-BmI_gskA.js +585 -0
  445. package/dist/fonts/OFL.txt +92 -0
  446. package/dist/nolzu.js +48 -0
  447. package/dist/package-vezZOzhD.js +181 -0
  448. package/dist/shared/finish.md +110 -0
  449. package/dist/shared/knowledge.md +72 -0
  450. package/dist/shared/verdict.md +42 -0
  451. package/dist/skills/.gitkeep +0 -0
  452. package/dist/skills/nolzu-architecture/SKILL.md +140 -0
  453. package/dist/skills/nolzu-architecture/finish.md +110 -0
  454. package/dist/skills/nolzu-assess/SKILL.md +99 -0
  455. package/dist/skills/nolzu-assess/finish.md +110 -0
  456. package/dist/skills/nolzu-design/SKILL.md +115 -0
  457. package/dist/skills/nolzu-design/finish.md +110 -0
  458. package/dist/skills/nolzu-feedback/SKILL.md +107 -0
  459. package/dist/skills/nolzu-feedback/finish.md +110 -0
  460. package/dist/skills/nolzu-implement/SKILL.md +138 -0
  461. package/dist/skills/nolzu-implement/finish.md +110 -0
  462. package/dist/skills/nolzu-investigate/SKILL.md +139 -0
  463. package/dist/skills/nolzu-investigate/finish.md +110 -0
  464. package/dist/skills/nolzu-learn-repo/SKILL.md +115 -0
  465. package/dist/skills/nolzu-learn-repo/finish.md +110 -0
  466. package/dist/skills/nolzu-learn-repo/knowledge.md +72 -0
  467. package/dist/skills/nolzu-optimize/SKILL.md +82 -0
  468. package/dist/skills/nolzu-optimize/finish.md +110 -0
  469. package/dist/skills/nolzu-optimize/knowledge.md +72 -0
  470. package/dist/skills/nolzu-orient/SKILL.md +115 -0
  471. package/dist/skills/nolzu-orient/finish.md +110 -0
  472. package/dist/skills/nolzu-orient/knowledge.md +72 -0
  473. package/dist/skills/nolzu-plan/SKILL.md +165 -0
  474. package/dist/skills/nolzu-plan/finish.md +110 -0
  475. package/dist/skills/nolzu-pr-review/SKILL.md +150 -0
  476. package/dist/skills/nolzu-pr-review/finish.md +110 -0
  477. package/dist/skills/nolzu-qa/SKILL.md +177 -0
  478. package/dist/skills/nolzu-qa/finish.md +110 -0
  479. package/dist/skills/nolzu-qa/verdict.md +42 -0
  480. package/dist/skills/nolzu-refine/SKILL.md +145 -0
  481. package/dist/skills/nolzu-refine/finish.md +110 -0
  482. package/dist/skills/nolzu-research/SKILL.md +140 -0
  483. package/dist/skills/nolzu-research/finish.md +110 -0
  484. package/dist/skills/nolzu-wrapup/SKILL.md +126 -0
  485. package/dist/skills/nolzu-wrapup/finish.md +110 -0
  486. package/dist/skills/nolzu-wrapup/knowledge.md +72 -0
  487. package/dist/src-BG8LaXLS.js +723 -0
  488. package/dist/src-DPfcvRqs.js +4 -0
  489. package/dist/start-ItZOcBtM.js +362 -0
  490. package/package.json +49 -9
  491. package/bin/nolzu.js +0 -8
@@ -0,0 +1,3803 @@
1
+ import { u as uneval } from './uneval.js-VnZcgzZr.js';
2
+
3
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/shared/utils.js
4
+ var is_array = Array.isArray;
5
+ var index_of = Array.prototype.indexOf;
6
+ var includes = Array.prototype.includes;
7
+ var array_from = Array.from;
8
+ var define_property = Object.defineProperty;
9
+ var get_descriptor = Object.getOwnPropertyDescriptor;
10
+ var object_prototype = Object.prototype;
11
+ var array_prototype = Array.prototype;
12
+ var get_prototype_of = Object.getPrototypeOf;
13
+ var is_extensible = Object.isExtensible;
14
+ var has_own_property = Object.prototype.hasOwnProperty;
15
+ var noop = () => {};
16
+ /**
17
+ * @template [T=any]
18
+ * @param {any} value
19
+ * @returns {value is PromiseLike<T>}
20
+ */
21
+ function is_promise(value) {
22
+ return typeof value?.then === "function";
23
+ }
24
+ /** @param {Function} fn */
25
+ function run(fn) {
26
+ return fn();
27
+ }
28
+ /** @param {Array<() => void>} arr */
29
+ function run_all(arr) {
30
+ for (var i = 0; i < arr.length; i++) arr[i]();
31
+ }
32
+ /**
33
+ * TODO replace with Promise.withResolvers once supported widely enough
34
+ * @template [T=void]
35
+ */
36
+ function deferred() {
37
+ /** @type {(value: T) => void} */
38
+ var resolve;
39
+ /** @type {(reason: any) => void} */
40
+ var reject;
41
+ return {
42
+ promise: new Promise((res, rej) => {
43
+ resolve = res;
44
+ reject = rej;
45
+ }),
46
+ resolve,
47
+ reject
48
+ };
49
+ }
50
+ //#endregion
51
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/reactivity/equality.js
52
+ /** @import { Equals } from '#client' */
53
+ /** @type {Equals} */
54
+ function equals(value) {
55
+ return value === this.v;
56
+ }
57
+ /**
58
+ * @param {unknown} a
59
+ * @param {unknown} b
60
+ * @returns {boolean}
61
+ */
62
+ function safe_not_equal(a, b) {
63
+ return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
64
+ }
65
+ /** @type {Equals} */
66
+ function safe_equals(value) {
67
+ return !safe_not_equal(value, this.v);
68
+ }
69
+ var CLEAN = 1024;
70
+ var DIRTY = 2048;
71
+ var MAYBE_DIRTY = 4096;
72
+ var INERT = 8192;
73
+ var DESTROYED = 16384;
74
+ /** Set once a reaction has run for the first time */
75
+ var REACTION_RAN = 32768;
76
+ /** Effect is in the process of getting destroyed. Can be observed in child teardown functions */
77
+ var DESTROYING = 1 << 25;
78
+ /**
79
+ * 'Transparent' effects do not create a transition boundary.
80
+ * This is on a block effect 99% of the time but may also be on a branch effect if its parent block effect was pruned
81
+ */
82
+ var EFFECT_TRANSPARENT = 65536;
83
+ var EFFECT_PRESERVED = 1 << 19;
84
+ var USER_EFFECT = 1 << 20;
85
+ /**
86
+ * Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
87
+ * Will be lifted during execution of the derived and during checking its dirty state (both are necessary
88
+ * because a derived might be checked but not executed). This is a pure performance optimization flag and
89
+ * should not be used for any other purpose!
90
+ */
91
+ var WAS_MARKED = 65536;
92
+ var REACTION_IS_UPDATING = 1 << 21;
93
+ var ERROR_VALUE = 1 << 23;
94
+ var STATE_SYMBOL = Symbol("$state");
95
+ /** Marks component export objects, so that `proxy(...)` leaves them untouched */
96
+ var COMPONENT_SYMBOL = Symbol("component");
97
+ var LEGACY_PROPS = Symbol("legacy props");
98
+ var ATTRIBUTES_CACHE = Symbol("attributes");
99
+ var CLASS_CACHE = Symbol("class");
100
+ var STYLE_CACHE = Symbol("style");
101
+ var TEXT_CACHE = Symbol("text");
102
+ /** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */
103
+ var STALE_REACTION = new class StaleReactionError extends Error {
104
+ name = "StaleReactionError";
105
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
106
+ }();
107
+ //#endregion
108
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/constants.js
109
+ var HYDRATION_ERROR = {};
110
+ var UNINITIALIZED = Symbol("uninitialized");
111
+ /**
112
+ * Reading a derived belonging to a now-destroyed effect may result in stale values
113
+ */
114
+ function derived_inert() {
115
+ console.warn(`https://svelte.dev/e/derived_inert`);
116
+ }
117
+ /**
118
+ * Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
119
+ * @param {string | undefined | null} [location]
120
+ */
121
+ function hydration_mismatch(location) {
122
+ console.warn(`https://svelte.dev/e/hydration_mismatch`);
123
+ }
124
+ /**
125
+ * A `<svelte:boundary>` `reset` function only resets the boundary the first time it is called
126
+ */
127
+ function svelte_boundary_reset_noop() {
128
+ console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
129
+ }
130
+ //#endregion
131
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/dom/hydration.js
132
+ /** @import { TemplateNode } from '#client' */
133
+ /**
134
+ * Use this variable to guard everything related to hydration code so it can be treeshaken out
135
+ * if the user doesn't use the `hydrate` method and these code paths are therefore not needed.
136
+ */
137
+ var hydrating = false;
138
+ /** @param {boolean} value */
139
+ function set_hydrating(value) {
140
+ hydrating = value;
141
+ }
142
+ /**
143
+ * The node that is currently being hydrated. This starts out as the first node inside the opening
144
+ * <!--[--> comment, and updates each time a component calls `$.child(...)` or `$.sibling(...)`.
145
+ * When entering a block (e.g. `{#if ...}`), `hydrate_node` is the block opening comment; by the
146
+ * time we leave the block it is the closing comment, which serves as the block's anchor.
147
+ * @type {TemplateNode}
148
+ */
149
+ var hydrate_node;
150
+ /** @param {TemplateNode | null} node */
151
+ function set_hydrate_node(node) {
152
+ if (node === null) {
153
+ hydration_mismatch();
154
+ throw HYDRATION_ERROR;
155
+ }
156
+ return hydrate_node = node;
157
+ }
158
+ function hydrate_next() {
159
+ return set_hydrate_node(/* @__PURE__ */ get_next_sibling(hydrate_node));
160
+ }
161
+ function next(count = 1) {
162
+ if (hydrating) {
163
+ var i = count;
164
+ var node = hydrate_node;
165
+ while (i--) node = /* @__PURE__ */ get_next_sibling(node);
166
+ hydrate_node = node;
167
+ }
168
+ }
169
+ /**
170
+ * Skips or removes (depending on {@link remove}) all nodes starting at `hydrate_node` up until the next hydration end comment
171
+ * @param {boolean} remove
172
+ */
173
+ function skip_nodes(remove = true) {
174
+ var depth = 0;
175
+ var node = hydrate_node;
176
+ while (true) {
177
+ if (node.nodeType === 8) {
178
+ var data = node.data;
179
+ if (data === "]") {
180
+ if (depth === 0) return node;
181
+ depth -= 1;
182
+ } else if (data === "[" || data === "[!" || data[0] === "[" && !isNaN(Number(data.slice(1)))) depth += 1;
183
+ }
184
+ var next = /* @__PURE__ */ get_next_sibling(node);
185
+ if (remove) node.remove();
186
+ node = next;
187
+ }
188
+ }
189
+ //#endregion
190
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/shared/errors.js
191
+ /**
192
+ * Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`
193
+ * @param {string} name
194
+ * @returns {never}
195
+ */
196
+ function experimental_async_required(name) {
197
+ throw new Error(`https://svelte.dev/e/experimental_async_required`);
198
+ }
199
+ /**
200
+ * `%name%(...)` can only be used during component initialisation
201
+ * @param {string} name
202
+ * @returns {never}
203
+ */
204
+ function lifecycle_outside_component(name) {
205
+ throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
206
+ }
207
+ /**
208
+ * Context was not set in the current component or any of its ancestors
209
+ * @returns {never}
210
+ */
211
+ function missing_context() {
212
+ throw new Error(`https://svelte.dev/e/missing_context`);
213
+ }
214
+ /**
215
+ * Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
216
+ * @returns {never}
217
+ */
218
+ function effect_update_depth_exceeded() {
219
+ throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);
220
+ }
221
+ /**
222
+ * Failed to hydrate the application
223
+ * @returns {never}
224
+ */
225
+ function hydration_failed() {
226
+ throw new Error(`https://svelte.dev/e/hydration_failed`);
227
+ }
228
+ /**
229
+ * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
230
+ * @returns {never}
231
+ */
232
+ function state_descriptors_fixed() {
233
+ throw new Error(`https://svelte.dev/e/state_descriptors_fixed`);
234
+ }
235
+ /**
236
+ * Cannot set prototype of `$state` object
237
+ * @returns {never}
238
+ */
239
+ function state_prototype_fixed() {
240
+ throw new Error(`https://svelte.dev/e/state_prototype_fixed`);
241
+ }
242
+ /**
243
+ * Updating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
244
+ * @returns {never}
245
+ */
246
+ function state_unsafe_mutation() {
247
+ throw new Error(`https://svelte.dev/e/state_unsafe_mutation`);
248
+ }
249
+ /**
250
+ * A `<svelte:boundary>` `reset` function cannot be called while an error is still being handled
251
+ * @returns {never}
252
+ */
253
+ function svelte_boundary_reset_onerror() {
254
+ throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
255
+ }
256
+ //#endregion
257
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/shared/context.js
258
+ /**
259
+ * @template T
260
+ * @param {(key: object) => T} get_context
261
+ * @param {(key: object, context: T) => T} set_context
262
+ * @param {(key: object) => boolean} has_context
263
+ * @returns {[() => T, (context: T) => T, () => boolean]}
264
+ */
265
+ function create_context(get_context, set_context, has_context) {
266
+ const key = {};
267
+ return [
268
+ () => {
269
+ if (!has_context(key)) missing_context();
270
+ return get_context(key);
271
+ },
272
+ (context) => set_context(key, context),
273
+ () => has_context(key)
274
+ ];
275
+ }
276
+ /**
277
+ * @typedef {{ p: Context | null, c: Map<unknown, unknown> | null }} Context
278
+ */
279
+ /**
280
+ * @param {Context} context
281
+ * @returns {Map<unknown, unknown> | null}
282
+ */
283
+ function get_parent_context(context) {
284
+ let parent = context.p;
285
+ while (parent !== null && parent.c === null) parent = parent.p;
286
+ return parent?.c ?? null;
287
+ }
288
+ /**
289
+ * @param {Context | null} context
290
+ * @param {string} name
291
+ * @returns {Map<unknown, unknown>}
292
+ */
293
+ function get_or_init_context_map(context, name) {
294
+ if (context === null) lifecycle_outside_component();
295
+ return context.c ??= new Map(get_parent_context(context) || void 0);
296
+ }
297
+ //#endregion
298
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/context.js
299
+ /** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
300
+ /** @type {ComponentContext | null} */
301
+ var component_context = null;
302
+ /** @param {ComponentContext | null} context */
303
+ function set_component_context(context) {
304
+ component_context = context;
305
+ }
306
+ /**
307
+ * @param {Record<string, unknown>} props
308
+ * @param {any} runes
309
+ * @param {Function} [fn]
310
+ * @returns {void}
311
+ */
312
+ function push$1(props, runes = false, fn) {
313
+ component_context = {
314
+ p: component_context,
315
+ i: false,
316
+ c: null,
317
+ e: null,
318
+ s: props,
319
+ x: null,
320
+ r: active_effect,
321
+ l: null
322
+ };
323
+ }
324
+ /**
325
+ * @template {Record<string, any>} T
326
+ * @param {T} [component]
327
+ * @returns {T}
328
+ */
329
+ function pop$1(component) {
330
+ var context = component_context;
331
+ var effects = context.e;
332
+ if (effects !== null) {
333
+ context.e = null;
334
+ for (var fn of effects) create_user_effect(fn);
335
+ }
336
+ context.i = true;
337
+ component_context = context.p;
338
+ return mark_as_component(component);
339
+ }
340
+ /**
341
+ * Add a symbol to the object (or create one if undefined) to mark it as a component so it isn't proxified.
342
+ * @param {any} component
343
+ */
344
+ function mark_as_component(component = {}) {
345
+ define_property(component, COMPONENT_SYMBOL, { value: true });
346
+ return component;
347
+ }
348
+ /** @returns {boolean} */
349
+ function is_runes() {
350
+ return true;
351
+ }
352
+ //#endregion
353
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/dom/task.js
354
+ /** @type {Array<() => void>} */
355
+ var micro_tasks = [];
356
+ function run_micro_tasks() {
357
+ var tasks = micro_tasks;
358
+ micro_tasks = [];
359
+ run_all(tasks);
360
+ }
361
+ /**
362
+ * @param {() => void} fn
363
+ */
364
+ function queue_micro_task(fn) {
365
+ if (micro_tasks.length === 0 && !is_flushing_sync) {
366
+ var tasks = micro_tasks;
367
+ queueMicrotask(() => {
368
+ if (tasks === micro_tasks) run_micro_tasks();
369
+ });
370
+ }
371
+ micro_tasks.push(fn);
372
+ }
373
+ /**
374
+ * Synchronously run any queued tasks.
375
+ */
376
+ function flush_tasks() {
377
+ while (micro_tasks.length > 0) run_micro_tasks();
378
+ }
379
+ //#endregion
380
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/reactivity/status.js
381
+ /** @import { Derived, Signal } from '#client' */
382
+ var STATUS_MASK = -7169;
383
+ /**
384
+ * @param {Signal} signal
385
+ * @param {number} status
386
+ */
387
+ function set_signal_status(signal, status) {
388
+ signal.f = signal.f & STATUS_MASK | status;
389
+ }
390
+ /**
391
+ * Set a derived's status to CLEAN or MAYBE_DIRTY based on its connection state.
392
+ * @param {Derived} derived
393
+ */
394
+ function update_derived_status(derived) {
395
+ if ((derived.f & 512) !== 0 || derived.deps === null) set_signal_status(derived, CLEAN);
396
+ else set_signal_status(derived, MAYBE_DIRTY);
397
+ }
398
+ //#endregion
399
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/reactivity/utils.js
400
+ /** @import { Derived, Effect, Value } from '#client' */
401
+ /**
402
+ * @param {Value[] | null} deps
403
+ */
404
+ function clear_marked(deps) {
405
+ if (deps === null) return;
406
+ for (const dep of deps) {
407
+ if ((dep.f & 2) === 0 || (dep.f & 65536) === 0) continue;
408
+ dep.f ^= WAS_MARKED;
409
+ clear_marked(
410
+ /** @type {Derived} */
411
+ dep.deps
412
+ );
413
+ }
414
+ }
415
+ /**
416
+ * @param {Effect} effect
417
+ * @param {Set<Effect>} dirty_effects
418
+ * @param {Set<Effect>} maybe_dirty_effects
419
+ */
420
+ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
421
+ if ((effect.f & 2048) !== 0) dirty_effects.add(effect);
422
+ else if ((effect.f & 4096) !== 0) maybe_dirty_effects.add(effect);
423
+ clear_marked(effect.deps);
424
+ set_signal_status(effect, CLEAN);
425
+ }
426
+ //#endregion
427
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
428
+ /**
429
+ * @template T
430
+ * @param {() => T} fn
431
+ */
432
+ function without_reactive_context(fn) {
433
+ var previous_reaction = active_reaction;
434
+ var previous_effect = active_effect;
435
+ set_active_reaction(null);
436
+ set_active_effect(null);
437
+ try {
438
+ return fn();
439
+ } finally {
440
+ set_active_reaction(previous_reaction);
441
+ set_active_effect(previous_effect);
442
+ }
443
+ }
444
+ var OBSOLETE = Symbol("obsolete");
445
+ /**
446
+ * @param {Derived} derived
447
+ * @returns {void}
448
+ */
449
+ function destroy_derived_effects(derived) {
450
+ var effects = derived.effects;
451
+ if (effects !== null) {
452
+ derived.effects = null;
453
+ for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
454
+ }
455
+ }
456
+ /**
457
+ * @template T
458
+ * @param {Derived} derived
459
+ * @returns {T}
460
+ */
461
+ function execute_derived(derived) {
462
+ var value;
463
+ var prev_active_effect = active_effect;
464
+ var parent = derived.parent;
465
+ if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
466
+ derived_inert();
467
+ return derived.v;
468
+ }
469
+ set_active_effect(parent);
470
+ try {
471
+ derived.f &= ~WAS_MARKED;
472
+ destroy_derived_effects(derived);
473
+ value = update_reaction(derived);
474
+ } finally {
475
+ set_active_effect(prev_active_effect);
476
+ }
477
+ return value;
478
+ }
479
+ /**
480
+ * @param {Derived} derived
481
+ * @returns {void}
482
+ */
483
+ function update_derived(derived) {
484
+ var value = execute_derived(derived);
485
+ if (!derived.equals(value)) {
486
+ derived.wv = increment_write_version();
487
+ if (!current_batch?.is_fork || derived.deps === null) {
488
+ if (current_batch !== null) {
489
+ current_batch.capture(derived, value, true);
490
+ previous_batch?.capture(derived, value, true);
491
+ } else derived.v = value;
492
+ if (derived.deps === null) {
493
+ set_signal_status(derived, CLEAN);
494
+ return;
495
+ }
496
+ }
497
+ }
498
+ if (is_destroying_effect) return;
499
+ if (batch_values !== null) {
500
+ if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
501
+ } else update_derived_status(derived);
502
+ }
503
+ /**
504
+ * @param {Derived} derived
505
+ */
506
+ function freeze_derived_effects(derived) {
507
+ if (derived.effects === null) return;
508
+ for (const e of derived.effects) if (e.teardown || e.ac) {
509
+ e.teardown?.();
510
+ if (e.ac !== null) without_reactive_context(() => {
511
+ /** @type {AbortController} */ e.ac.abort(STALE_REACTION);
512
+ e.ac = null;
513
+ });
514
+ if (e.fn !== null) e.teardown = noop;
515
+ remove_reactions(e, 0);
516
+ destroy_effect_children(e);
517
+ }
518
+ }
519
+ /**
520
+ * @param {Derived} derived
521
+ */
522
+ function unfreeze_derived_effects(derived) {
523
+ if (derived.effects === null) return;
524
+ for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
525
+ }
526
+ //#endregion
527
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/reactivity/batch.js
528
+ /** @import { Fork } from 'svelte' */
529
+ /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
530
+ /** @type {Batch | null} */
531
+ var first_batch = null;
532
+ /** @type {Batch | null} */
533
+ var last_batch = null;
534
+ /** @type {Batch | null} */
535
+ var current_batch = null;
536
+ /**
537
+ * This is needed to avoid overwriting inputs
538
+ * @type {Batch | null}
539
+ */
540
+ var previous_batch = null;
541
+ /**
542
+ * When time travelling (i.e. working in one batch, while other batches
543
+ * still have ongoing work), we ignore the real values of affected
544
+ * signals in favour of their values within the batch
545
+ * @type {Map<Value, any> | null}
546
+ */
547
+ var batch_values = null;
548
+ /** @type {Effect | null} */
549
+ var last_scheduled_effect = null;
550
+ var is_flushing_sync = false;
551
+ var is_processing = false;
552
+ /**
553
+ * During traversal, this is an array. Newly created effects are (if not immediately
554
+ * executed) pushed to this array, rather than going through the scheduling
555
+ * rigamarole that would cause another turn of the flush loop.
556
+ * @type {Effect[] | null}
557
+ */
558
+ var collected_effects = null;
559
+ /**
560
+ * An array of effects that are marked during traversal as a result of a `set`
561
+ * (not `internal_set`) call. These will be added to the next batch and
562
+ * trigger another `batch.process()`
563
+ * @type {Effect[] | null}
564
+ * @deprecated when we get rid of legacy mode and stores, we can get rid of this
565
+ */
566
+ var legacy_updates = null;
567
+ var flush_count = 0;
568
+ var uid = 1;
569
+ var Batch = class Batch {
570
+ id = uid++;
571
+ /** True as soon as `#process` was called */
572
+ #started = false;
573
+ linked = true;
574
+ /** @type {Batch | null} */
575
+ #prev = null;
576
+ /** @type {Batch | null} */
577
+ #next = null;
578
+ /** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
579
+ async_deriveds = /* @__PURE__ */ new Map();
580
+ /**
581
+ * The current values of any signals that are updated in this batch.
582
+ * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
583
+ * They keys of this map are identical to `this.#previous`
584
+ * @type {Map<Value, [any, boolean]>}
585
+ */
586
+ current = /* @__PURE__ */ new Map();
587
+ /**
588
+ * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
589
+ * They keys of this map are identical to `this.#current`
590
+ * @type {Map<Value, any>}
591
+ */
592
+ previous = /* @__PURE__ */ new Map();
593
+ /**
594
+ * When the batch is committed (and the DOM is updated), we need to remove old branches
595
+ * and append new ones by calling the functions added inside (if/each/key/etc) blocks
596
+ * @type {Set<(batch: Batch) => void>}
597
+ */
598
+ #commit_callbacks = /* @__PURE__ */ new Set();
599
+ /**
600
+ * If a fork is discarded, we need to destroy any effects that are no longer needed
601
+ * @type {Set<(batch: Batch) => void>}
602
+ */
603
+ #discard_callbacks = /* @__PURE__ */ new Set();
604
+ /**
605
+ * The number of async effects that are currently in flight
606
+ */
607
+ #pending = 0;
608
+ /**
609
+ * Async effects that are currently in flight, _not_ inside a pending boundary
610
+ * @type {Map<Effect, number>}
611
+ */
612
+ #blocking_pending = /* @__PURE__ */ new Map();
613
+ /**
614
+ * A deferred that resolves when the batch is committed, used with `settled()`
615
+ * TODO replace with Promise.withResolvers once supported widely enough
616
+ * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
617
+ */
618
+ #deferred = null;
619
+ /**
620
+ * The root effects that need to be flushed
621
+ * @type {Effect[]}
622
+ */
623
+ #roots = [];
624
+ /**
625
+ * Effects created while this batch was active.
626
+ * @type {Effect[]}
627
+ */
628
+ #new_effects = [];
629
+ /**
630
+ * Deferred effects (which run after async work has completed) that are DIRTY
631
+ * @type {Set<Effect>}
632
+ */
633
+ #dirty_effects = /* @__PURE__ */ new Set();
634
+ /**
635
+ * Deferred effects that are MAYBE_DIRTY
636
+ * @type {Set<Effect>}
637
+ */
638
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
639
+ /**
640
+ * A map of branches that still exist, but will be destroyed when this batch
641
+ * is committed — we skip over these during `process`.
642
+ * The value contains child effects that were dirty/maybe_dirty before being reset,
643
+ * so they can be rescheduled if the branch survives.
644
+ * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
645
+ */
646
+ #skipped_branches = /* @__PURE__ */ new Map();
647
+ /**
648
+ * Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
649
+ * @type {Set<Effect>}
650
+ */
651
+ #unskipped_branches = /* @__PURE__ */ new Set();
652
+ is_fork = false;
653
+ #decrement_queued = false;
654
+ constructor() {
655
+ if (last_batch === null) first_batch = last_batch = this;
656
+ else {
657
+ last_batch.#next = this;
658
+ this.#prev = last_batch;
659
+ }
660
+ last_batch = this;
661
+ }
662
+ #is_deferred() {
663
+ if (this.is_fork) return true;
664
+ for (const effect of this.#blocking_pending.keys()) {
665
+ var e = effect;
666
+ var skipped = false;
667
+ while (e.parent !== null) {
668
+ if (this.#skipped_branches.has(e)) {
669
+ skipped = true;
670
+ break;
671
+ }
672
+ e = e.parent;
673
+ }
674
+ if (!skipped) return true;
675
+ }
676
+ return false;
677
+ }
678
+ /**
679
+ * Add an effect to the #skipped_branches map and reset its children
680
+ * @param {Effect} effect
681
+ */
682
+ skip_effect(effect) {
683
+ if (!this.#skipped_branches.has(effect)) this.#skipped_branches.set(effect, {
684
+ d: [],
685
+ m: []
686
+ });
687
+ this.#unskipped_branches.delete(effect);
688
+ }
689
+ /**
690
+ * Remove an effect from the #skipped_branches map and reschedule
691
+ * any tracked dirty/maybe_dirty child effects
692
+ * @param {Effect} effect
693
+ * @param {(e: Effect) => void} callback
694
+ */
695
+ unskip_effect(effect, callback = (e) => this.schedule(e)) {
696
+ var tracked = this.#skipped_branches.get(effect);
697
+ if (tracked) {
698
+ this.#skipped_branches.delete(effect);
699
+ for (var e of tracked.d) {
700
+ set_signal_status(e, DIRTY);
701
+ callback(e);
702
+ }
703
+ for (e of tracked.m) {
704
+ set_signal_status(e, MAYBE_DIRTY);
705
+ callback(e);
706
+ }
707
+ }
708
+ this.#unskipped_branches.add(effect);
709
+ }
710
+ #process() {
711
+ this.#started = true;
712
+ if (flush_count++ > 1e3) {
713
+ this.#unlink();
714
+ infinite_loop_guard();
715
+ }
716
+ for (const e of this.#dirty_effects) {
717
+ this.#maybe_dirty_effects.delete(e);
718
+ set_signal_status(e, DIRTY);
719
+ this.schedule(e);
720
+ }
721
+ for (const e of this.#maybe_dirty_effects) {
722
+ set_signal_status(e, MAYBE_DIRTY);
723
+ this.schedule(e);
724
+ }
725
+ const roots = this.#roots;
726
+ this.#roots = [];
727
+ this.apply();
728
+ /** @type {Effect[]} */
729
+ var effects = collected_effects = [];
730
+ /** @type {Effect[]} */
731
+ var render_effects = [];
732
+ /**
733
+ * @type {Effect[]}
734
+ * @deprecated when we get rid of legacy mode and stores, we can get rid of this
735
+ */
736
+ var updates = legacy_updates = [];
737
+ for (const root of roots) try {
738
+ this.#traverse(root, effects, render_effects);
739
+ } catch (e) {
740
+ reset_all(root);
741
+ if (!this.#is_deferred()) this.discard();
742
+ throw e;
743
+ }
744
+ current_batch = null;
745
+ if (updates.length > 0) {
746
+ var batch = Batch.ensure();
747
+ for (const e of updates) batch.schedule(e);
748
+ }
749
+ collected_effects = null;
750
+ legacy_updates = null;
751
+ if (this.#is_deferred()) {
752
+ this.#defer_effects(render_effects);
753
+ this.#defer_effects(effects);
754
+ for (const [e, t] of this.#skipped_branches) reset_branch(e, t);
755
+ if (updates.length > 0)
756
+ /** @type {Batch} */ current_batch.#process();
757
+ return;
758
+ }
759
+ const earlier_batch = this.#find_earlier_batch();
760
+ if (earlier_batch) {
761
+ this.#defer_effects(render_effects);
762
+ this.#defer_effects(effects);
763
+ earlier_batch.#merge(this);
764
+ return;
765
+ }
766
+ this.#dirty_effects.clear();
767
+ this.#maybe_dirty_effects.clear();
768
+ for (const fn of this.#commit_callbacks) fn(this);
769
+ this.#commit_callbacks.clear();
770
+ previous_batch = this;
771
+ flush_queued_effects(render_effects);
772
+ flush_queued_effects(effects);
773
+ previous_batch = null;
774
+ this.#deferred?.resolve();
775
+ var next_batch = current_batch;
776
+ if (this.#pending === 0 && (this.#roots.length === 0 || next_batch !== null)) {
777
+ this.#unlink();
778
+ }
779
+ if (this.#roots.length > 0) {
780
+ if (next_batch !== null) {
781
+ const batch = next_batch;
782
+ batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
783
+ } else next_batch = this;
784
+ }
785
+ if (next_batch !== null) {
786
+ old_values.clear();
787
+ next_batch.#process();
788
+ }
789
+ }
790
+ /**
791
+ * Traverse the effect tree, executing effects or stashing
792
+ * them for later execution as appropriate
793
+ * @param {Effect} root
794
+ * @param {Effect[]} effects
795
+ * @param {Effect[]} render_effects
796
+ */
797
+ #traverse(root, effects, render_effects) {
798
+ root.f ^= CLEAN;
799
+ var effect = root.first;
800
+ while (effect !== null) {
801
+ var flags = effect.f;
802
+ var is_branch = (flags & 96) !== 0;
803
+ if (!(is_branch && (flags & 1024) !== 0 || (flags & 8192) !== 0 || this.#skipped_branches.has(effect)) && effect.fn !== null) {
804
+ if (is_branch) effect.f ^= CLEAN;
805
+ else if ((flags & 4) !== 0) effects.push(effect);
806
+ else if (is_dirty(effect)) {
807
+ if ((flags & 16) !== 0) this.#maybe_dirty_effects.add(effect);
808
+ update_effect(effect);
809
+ }
810
+ var child = effect.first;
811
+ if (child !== null) {
812
+ effect = child;
813
+ continue;
814
+ }
815
+ }
816
+ while (effect !== null) {
817
+ var next = effect.next;
818
+ if (next !== null) {
819
+ effect = next;
820
+ break;
821
+ }
822
+ effect = effect.parent;
823
+ }
824
+ }
825
+ }
826
+ #find_earlier_batch() {
827
+ var batch = this.#prev;
828
+ while (batch !== null) {
829
+ if (!batch.is_fork) {
830
+ for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
831
+ }
832
+ batch = batch.#prev;
833
+ }
834
+ return null;
835
+ }
836
+ /**
837
+ * @param {Batch} batch
838
+ */
839
+ #merge(batch) {
840
+ for (const [source, value] of batch.current) {
841
+ if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
842
+ this.current.set(source, value);
843
+ }
844
+ for (const [effect, deferred] of batch.async_deriveds) {
845
+ const d = this.async_deriveds.get(effect);
846
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
847
+ }
848
+ batch.async_deriveds.clear();
849
+ this.transfer_effects(batch.#dirty_effects, batch.#maybe_dirty_effects);
850
+ /**
851
+ * mark all effects that depend on `batch.current`, except the
852
+ * async effects that we just resolved (TODO unless they depend
853
+ * on values in this batch that are NOT in the later batch?).
854
+ * Through this we also will populate the correct #skipped_branches,
855
+ * oncommit callbacks etc, so we don't need to merge them separately.
856
+ * @param {Value} value
857
+ */
858
+ const mark = (value) => {
859
+ var reactions = value.reactions;
860
+ if (reactions === null) return;
861
+ if ((value.f & 2) !== 0 && (value.f & 6144) === 0) return;
862
+ for (const reaction of reactions) {
863
+ var flags = reaction.f;
864
+ if ((flags & 2) !== 0) mark(reaction);
865
+ else {
866
+ var effect = reaction;
867
+ if (flags & 4194320 && !this.async_deriveds.has(effect)) {
868
+ this.#maybe_dirty_effects.delete(effect);
869
+ set_signal_status(effect, DIRTY);
870
+ this.schedule(effect);
871
+ }
872
+ }
873
+ }
874
+ };
875
+ for (const source of this.current.keys()) mark(source);
876
+ this.oncommit(() => batch.discard());
877
+ batch.#unlink();
878
+ current_batch = this;
879
+ this.#process();
880
+ }
881
+ /**
882
+ * @param {Effect[]} effects
883
+ */
884
+ #defer_effects(effects) {
885
+ for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
886
+ }
887
+ /**
888
+ * Associate a change to a given source with the current
889
+ * batch, noting its previous and current values
890
+ * @param {Value} source
891
+ * @param {any} value
892
+ * @param {boolean} [is_derived]
893
+ */
894
+ capture(source, value, is_derived = false) {
895
+ if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
896
+ if ((source.f & 8388608) === 0) {
897
+ this.current.set(source, [value, is_derived]);
898
+ batch_values?.set(source, value);
899
+ }
900
+ if (!this.is_fork) source.v = value;
901
+ }
902
+ activate() {
903
+ current_batch = this;
904
+ }
905
+ deactivate() {
906
+ current_batch = null;
907
+ batch_values = null;
908
+ }
909
+ flush() {
910
+ try {
911
+ is_processing = true;
912
+ current_batch = this;
913
+ this.#process();
914
+ } finally {
915
+ flush_count = 0;
916
+ last_scheduled_effect = null;
917
+ collected_effects = null;
918
+ legacy_updates = null;
919
+ is_processing = false;
920
+ current_batch = null;
921
+ batch_values = null;
922
+ old_values.clear();
923
+ }
924
+ }
925
+ discard() {
926
+ for (const fn of this.#discard_callbacks) fn(this);
927
+ this.#discard_callbacks.clear();
928
+ for (const deferred of this.async_deriveds.values()) deferred.reject(OBSOLETE);
929
+ this.#unlink();
930
+ this.#deferred?.resolve();
931
+ }
932
+ /**
933
+ * @param {Effect} effect
934
+ */
935
+ register_created_effect(effect) {
936
+ this.#new_effects.push(effect);
937
+ }
938
+ #commit() {
939
+ for (let batch = first_batch; batch !== null; batch = batch.#next) {
940
+ var is_earlier = batch.id < this.id;
941
+ /** @type {Source[]} */
942
+ var sources = [];
943
+ for (const [source, [value, is_derived]] of this.current) {
944
+ if (batch.current.has(source)) {
945
+ var batch_value = batch.current.get(source)[0];
946
+ if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
947
+ else continue;
948
+ }
949
+ sources.push(source);
950
+ }
951
+ if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
952
+ const d = batch.async_deriveds.get(effect);
953
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
954
+ }
955
+ var current = [...batch.current.keys()].filter((source) => !batch.current.get(source)[1]);
956
+ if (!batch.#started || current.length === 0) continue;
957
+ var others = current.filter((source) => !this.current.has(source));
958
+ if (others.length === 0) {
959
+ if (is_earlier) batch.discard();
960
+ } else if (sources.length > 0) {
961
+ if (is_earlier) for (const unskipped of this.#unskipped_branches) batch.unskip_effect(unskipped, (e) => {
962
+ if ((e.f & 4194320) !== 0) batch.schedule(e);
963
+ else batch.#defer_effects([e]);
964
+ });
965
+ batch.activate();
966
+ /** @type {Set<Value>} */
967
+ var marked = /* @__PURE__ */ new Set();
968
+ /** @type {Map<Reaction, boolean>} */
969
+ var checked = /* @__PURE__ */ new Map();
970
+ for (var source of sources) mark_effects(source, others, marked, checked);
971
+ checked = /* @__PURE__ */ new Map();
972
+ var current_unequal = [...batch.current].filter(([c, v1]) => {
973
+ const v2 = this.current.get(c);
974
+ if (!v2) return true;
975
+ return v2[0] !== v1[0] || v2[1] !== v1[1];
976
+ }).map(([c]) => c);
977
+ if (current_unequal.length > 0) {
978
+ for (const effect of this.#new_effects) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) {
979
+ if ((effect.f & 4194320) !== 0) {
980
+ set_signal_status(effect, DIRTY);
981
+ batch.schedule(effect);
982
+ } else batch.#dirty_effects.add(effect);
983
+ }
984
+ }
985
+ if (batch.#roots.length > 0 && !batch.#decrement_queued) {
986
+ batch.apply();
987
+ for (var root of batch.#roots) batch.#traverse(root, [], []);
988
+ batch.#roots = [];
989
+ }
990
+ batch.deactivate();
991
+ }
992
+ }
993
+ }
994
+ /**
995
+ * @param {boolean} blocking
996
+ * @param {Effect} effect
997
+ */
998
+ increment(blocking, effect) {
999
+ this.#pending += 1;
1000
+ if (blocking) {
1001
+ let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1002
+ this.#blocking_pending.set(effect, blocking_pending_count + 1);
1003
+ }
1004
+ }
1005
+ /**
1006
+ * @param {boolean} blocking
1007
+ * @param {Effect} effect
1008
+ */
1009
+ decrement(blocking, effect) {
1010
+ this.#pending -= 1;
1011
+ if (blocking) {
1012
+ let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
1013
+ if (blocking_pending_count === 1) this.#blocking_pending.delete(effect);
1014
+ else this.#blocking_pending.set(effect, blocking_pending_count - 1);
1015
+ }
1016
+ if (this.#decrement_queued) return;
1017
+ this.#decrement_queued = true;
1018
+ queue_micro_task(() => {
1019
+ this.#decrement_queued = false;
1020
+ if (this.linked) this.flush();
1021
+ });
1022
+ }
1023
+ /**
1024
+ * @param {Set<Effect>} dirty_effects
1025
+ * @param {Set<Effect>} maybe_dirty_effects
1026
+ */
1027
+ transfer_effects(dirty_effects, maybe_dirty_effects) {
1028
+ for (const e of dirty_effects) this.#dirty_effects.add(e);
1029
+ for (const e of maybe_dirty_effects) this.#maybe_dirty_effects.add(e);
1030
+ dirty_effects.clear();
1031
+ maybe_dirty_effects.clear();
1032
+ }
1033
+ /** @param {(batch: Batch) => void} fn */
1034
+ oncommit(fn) {
1035
+ this.#commit_callbacks.add(fn);
1036
+ }
1037
+ /** @param {(batch: Batch) => void} fn */
1038
+ ondiscard(fn) {
1039
+ this.#discard_callbacks.add(fn);
1040
+ }
1041
+ settled() {
1042
+ return (this.#deferred ??= deferred()).promise;
1043
+ }
1044
+ static ensure() {
1045
+ if (current_batch === null) {
1046
+ const batch = current_batch = new Batch();
1047
+ if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
1048
+ if (!batch.#started) batch.flush();
1049
+ });
1050
+ }
1051
+ return current_batch;
1052
+ }
1053
+ apply() {
1054
+ {
1055
+ batch_values = null;
1056
+ return;
1057
+ }
1058
+ }
1059
+ /**
1060
+ *
1061
+ * @param {Effect} effect
1062
+ */
1063
+ schedule(effect) {
1064
+ last_scheduled_effect = effect;
1065
+ if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
1066
+ effect.b.defer_effect(effect);
1067
+ return;
1068
+ }
1069
+ var e = effect;
1070
+ while (e.parent !== null) {
1071
+ e = e.parent;
1072
+ var flags = e.f;
1073
+ if (collected_effects !== null && e === active_effect) {
1074
+ if ((active_reaction === null || (active_reaction.f & 2) === 0) && true) return;
1075
+ }
1076
+ if ((flags & 96) !== 0) {
1077
+ if ((flags & 1024) === 0) return;
1078
+ e.f ^= CLEAN;
1079
+ }
1080
+ }
1081
+ this.#roots.push(e);
1082
+ }
1083
+ #unlink() {
1084
+ if (!this.linked) return;
1085
+ var prev = this.#prev;
1086
+ var next = this.#next;
1087
+ if (prev === null) first_batch = next;
1088
+ else prev.#next = next;
1089
+ if (next === null) last_batch = prev;
1090
+ else next.#prev = prev;
1091
+ this.linked = false;
1092
+ }
1093
+ };
1094
+ /**
1095
+ * Synchronously flush any pending updates.
1096
+ * Returns void if no callback is provided, otherwise returns the result of calling the callback.
1097
+ * @template [T=void]
1098
+ * @param {(() => T) | undefined} [fn]
1099
+ * @returns {T}
1100
+ */
1101
+ function flushSync(fn) {
1102
+ var was_flushing_sync = is_flushing_sync;
1103
+ is_flushing_sync = true;
1104
+ try {
1105
+ var result;
1106
+ if (fn) ;
1107
+ while (true) {
1108
+ flush_tasks();
1109
+ if (current_batch === null) return result;
1110
+ current_batch.flush();
1111
+ }
1112
+ } finally {
1113
+ is_flushing_sync = was_flushing_sync;
1114
+ }
1115
+ }
1116
+ function infinite_loop_guard() {
1117
+ try {
1118
+ effect_update_depth_exceeded();
1119
+ } catch (error) {
1120
+ invoke_error_boundary(error, last_scheduled_effect);
1121
+ }
1122
+ }
1123
+ /** @type {Set<Effect> | null} */
1124
+ var eager_block_effects = null;
1125
+ /**
1126
+ * @param {Array<Effect>} effects
1127
+ * @returns {void}
1128
+ */
1129
+ function flush_queued_effects(effects) {
1130
+ var length = effects.length;
1131
+ if (length === 0) return;
1132
+ var i = 0;
1133
+ while (i < length) {
1134
+ var effect = effects[i++];
1135
+ if ((effect.f & 24576) === 0 && is_dirty(effect)) {
1136
+ eager_block_effects = /* @__PURE__ */ new Set();
1137
+ update_effect(effect);
1138
+ if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) unlink_effect(effect);
1139
+ if (eager_block_effects?.size > 0) {
1140
+ old_values.clear();
1141
+ for (const e of eager_block_effects) {
1142
+ if ((e.f & 24576) !== 0) continue;
1143
+ /** @type {Effect[]} */
1144
+ const ordered_effects = [e];
1145
+ let ancestor = e.parent;
1146
+ while (ancestor !== null) {
1147
+ if (eager_block_effects.has(ancestor)) {
1148
+ eager_block_effects.delete(ancestor);
1149
+ ordered_effects.push(ancestor);
1150
+ }
1151
+ ancestor = ancestor.parent;
1152
+ }
1153
+ for (let j = ordered_effects.length - 1; j >= 0; j--) {
1154
+ const e = ordered_effects[j];
1155
+ if ((e.f & 24576) !== 0) continue;
1156
+ update_effect(e);
1157
+ }
1158
+ }
1159
+ eager_block_effects.clear();
1160
+ }
1161
+ }
1162
+ }
1163
+ eager_block_effects = null;
1164
+ }
1165
+ /**
1166
+ * This is similar to `mark_reactions`, but it only marks async/block effects
1167
+ * depending on `value` and at least one of the other `sources`, so that
1168
+ * these effects can re-run after another batch has been committed
1169
+ * @param {Value} value
1170
+ * @param {Source[]} sources
1171
+ * @param {Set<Value>} marked
1172
+ * @param {Map<Reaction, boolean>} checked
1173
+ */
1174
+ function mark_effects(value, sources, marked, checked) {
1175
+ if (marked.has(value)) return;
1176
+ marked.add(value);
1177
+ if (value.reactions !== null) for (const reaction of value.reactions) {
1178
+ const flags = reaction.f;
1179
+ if ((flags & 2) !== 0) mark_effects(reaction, sources, marked, checked);
1180
+ else if ((flags & 4194320) !== 0 && (flags & 2048) === 0 && depends_on(reaction, sources, checked)) {
1181
+ set_signal_status(reaction, DIRTY);
1182
+ schedule_effect(reaction);
1183
+ }
1184
+ }
1185
+ }
1186
+ /**
1187
+ * @param {Reaction} reaction
1188
+ * @param {Source[]} sources
1189
+ * @param {Map<Reaction, boolean>} checked
1190
+ */
1191
+ function depends_on(reaction, sources, checked) {
1192
+ const depends = checked.get(reaction);
1193
+ if (depends !== void 0) return depends;
1194
+ if (reaction.deps !== null) for (const dep of reaction.deps) {
1195
+ if (includes.call(sources, dep)) return true;
1196
+ if ((dep.f & 2) !== 0 && depends_on(dep, sources, checked)) {
1197
+ checked.set(dep, true);
1198
+ return true;
1199
+ }
1200
+ }
1201
+ checked.set(reaction, false);
1202
+ return false;
1203
+ }
1204
+ /**
1205
+ * @param {Effect} effect
1206
+ * @returns {void}
1207
+ */
1208
+ function schedule_effect(effect) {
1209
+ /** @type {Batch} */ current_batch.schedule(effect);
1210
+ }
1211
+ /**
1212
+ * Mark all the effects inside a skipped branch CLEAN, so that
1213
+ * they can be correctly rescheduled later. Tracks dirty and maybe_dirty
1214
+ * effects so they can be rescheduled if the branch survives.
1215
+ * @param {Effect} effect
1216
+ * @param {{ d: Effect[], m: Effect[] }} tracked
1217
+ */
1218
+ function reset_branch(effect, tracked) {
1219
+ if ((effect.f & 32) !== 0 && (effect.f & 1024) !== 0) return;
1220
+ if ((effect.f & 2048) !== 0) tracked.d.push(effect);
1221
+ else if ((effect.f & 4096) !== 0) tracked.m.push(effect);
1222
+ set_signal_status(effect, CLEAN);
1223
+ var e = effect.first;
1224
+ while (e !== null) {
1225
+ reset_branch(e, tracked);
1226
+ e = e.next;
1227
+ }
1228
+ }
1229
+ /**
1230
+ * Mark an entire effect tree clean following an error
1231
+ * @param {Effect} effect
1232
+ */
1233
+ function reset_all(effect) {
1234
+ set_signal_status(effect, CLEAN);
1235
+ var e = effect.first;
1236
+ while (e !== null) {
1237
+ reset_all(e);
1238
+ e = e.next;
1239
+ }
1240
+ }
1241
+ //#endregion
1242
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/reactivity/sources.js
1243
+ /** @import { Derived, Effect, Source, Value } from '#client' */
1244
+ /** @type {Set<Effect>} */
1245
+ var eager_effects = /* @__PURE__ */ new Set();
1246
+ /** @type {Map<Source, any>} */
1247
+ var old_values = /* @__PURE__ */ new Map();
1248
+ var eager_effects_deferred = false;
1249
+ /**
1250
+ * @template V
1251
+ * @param {V} v
1252
+ * @param {Error | null} [stack]
1253
+ * @returns {Source<V>}
1254
+ */
1255
+ function source(v, stack) {
1256
+ return {
1257
+ f: 0,
1258
+ v,
1259
+ reactions: null,
1260
+ equals,
1261
+ rv: 0,
1262
+ wv: 0
1263
+ };
1264
+ }
1265
+ /**
1266
+ * @template V
1267
+ * @param {V} v
1268
+ * @param {Error | null} [stack]
1269
+ */
1270
+ /*#__NO_SIDE_EFFECTS__*/
1271
+ function state(v, stack) {
1272
+ const s = source(v);
1273
+ push_reaction_value(s);
1274
+ return s;
1275
+ }
1276
+ /**
1277
+ * @template V
1278
+ * @param {V} initial_value
1279
+ * @param {boolean} [immutable]
1280
+ * @returns {Source<V>}
1281
+ */
1282
+ /*#__NO_SIDE_EFFECTS__*/
1283
+ function mutable_source(initial_value, immutable = false, trackable = true) {
1284
+ const s = source(initial_value);
1285
+ if (!immutable) s.equals = safe_equals;
1286
+ return s;
1287
+ }
1288
+ /**
1289
+ * @template V
1290
+ * @param {Source<V>} source
1291
+ * @param {V} value
1292
+ * @param {boolean} [should_proxy]
1293
+ * @returns {V}
1294
+ */
1295
+ function set(source, value, should_proxy = false) {
1296
+ if (active_reaction !== null && (!untracking || (active_reaction.f & 131072) !== 0) && is_runes() && (active_reaction.f & 4325394) !== 0 && (current_sources === null || !current_sources.has(source))) state_unsafe_mutation();
1297
+ return internal_set(source, should_proxy ? proxy(value) : value, legacy_updates);
1298
+ }
1299
+ /**
1300
+ * @template V
1301
+ * @param {Source<V>} source
1302
+ * @param {V} value
1303
+ * @param {Effect[] | null} [updated_during_traversal]
1304
+ * @returns {V}
1305
+ */
1306
+ function internal_set(source, value, updated_during_traversal = null) {
1307
+ if (!source.equals(value)) {
1308
+ if (is_destroying_effect) old_values.set(source, value);
1309
+ else if (!old_values.has(source)) old_values.set(source, source.v);
1310
+ var batch = Batch.ensure();
1311
+ batch.capture(source, value);
1312
+ if ((source.f & 2) !== 0) {
1313
+ const derived = source;
1314
+ if ((source.f & 2048) !== 0) execute_derived(derived);
1315
+ if (batch_values === null) update_derived_status(derived);
1316
+ }
1317
+ source.wv = increment_write_version();
1318
+ mark_reactions(source, DIRTY, updated_during_traversal);
1319
+ if (active_effect !== null && (active_effect.f & 1024) !== 0 && (active_effect.f & 96) === 0) {
1320
+ if (untracked_writes === null) set_untracked_writes([source]);
1321
+ else untracked_writes.push(source);
1322
+ }
1323
+ if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) flush_eager_effects();
1324
+ }
1325
+ return value;
1326
+ }
1327
+ function flush_eager_effects() {
1328
+ eager_effects_deferred = false;
1329
+ for (const effect of eager_effects) {
1330
+ if ((effect.f & 1024) !== 0) set_signal_status(effect, MAYBE_DIRTY);
1331
+ let dirty;
1332
+ try {
1333
+ dirty = is_dirty(effect);
1334
+ } catch {
1335
+ dirty = true;
1336
+ }
1337
+ if (dirty) update_effect(effect);
1338
+ }
1339
+ eager_effects.clear();
1340
+ }
1341
+ /**
1342
+ * Silently (without using `get`) increment a source
1343
+ * @param {Source<number>} source
1344
+ */
1345
+ function increment(source) {
1346
+ set(source, source.v + 1);
1347
+ }
1348
+ /**
1349
+ * @param {Value} signal
1350
+ * @param {number} status should be DIRTY or MAYBE_DIRTY
1351
+ * @param {Effect[] | null} updated_during_traversal
1352
+ * @returns {void}
1353
+ */
1354
+ function mark_reactions(signal, status, updated_during_traversal) {
1355
+ var reactions = signal.reactions;
1356
+ if (reactions === null) return;
1357
+ var length = reactions.length;
1358
+ for (var i = 0; i < length; i++) {
1359
+ var reaction = reactions[i];
1360
+ var flags = reaction.f;
1361
+ var not_dirty = (flags & DIRTY) === 0;
1362
+ if (not_dirty) set_signal_status(reaction, status);
1363
+ if ((flags & 131072) !== 0) eager_effects.add(reaction);
1364
+ else if ((flags & 2) !== 0) {
1365
+ var derived = reaction;
1366
+ batch_values?.delete(derived);
1367
+ if ((flags & 65536) === 0) {
1368
+ if (flags & 512 && (active_effect === null || (active_effect.f & 2097152) === 0)) reaction.f |= WAS_MARKED;
1369
+ mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
1370
+ }
1371
+ } else if (not_dirty) {
1372
+ var effect = reaction;
1373
+ if ((flags & 16) !== 0 && eager_block_effects !== null) eager_block_effects.add(effect);
1374
+ if (updated_during_traversal !== null) updated_during_traversal.push(effect);
1375
+ else schedule_effect(effect);
1376
+ }
1377
+ }
1378
+ }
1379
+ /**
1380
+ * @template T
1381
+ * @param {T} value
1382
+ * @returns {T}
1383
+ */
1384
+ function proxy(value) {
1385
+ if (typeof value !== "object" || value === null || STATE_SYMBOL in value || COMPONENT_SYMBOL in value) return value;
1386
+ const prototype = get_prototype_of(value);
1387
+ if (prototype !== object_prototype && prototype !== array_prototype) return value;
1388
+ /** @type {Map<any, Source<any>>} */
1389
+ var sources = /* @__PURE__ */ new Map();
1390
+ var is_proxied_array = is_array(value);
1391
+ var version = /* @__PURE__ */ state(0);
1392
+ var parent_version = update_version;
1393
+ /**
1394
+ * Executes the proxy in the context of the reaction it was originally created in, if any
1395
+ * @template T
1396
+ * @param {() => T} fn
1397
+ */
1398
+ var with_parent = (fn) => {
1399
+ if (update_version === parent_version) return fn();
1400
+ var reaction = active_reaction;
1401
+ var version = update_version;
1402
+ set_active_reaction(null);
1403
+ set_update_version(parent_version);
1404
+ var result = fn();
1405
+ set_active_reaction(reaction);
1406
+ set_update_version(version);
1407
+ return result;
1408
+ };
1409
+ if (is_proxied_array) sources.set("length", /* @__PURE__ */ state(
1410
+ /** @type {any[]} */
1411
+ value.length));
1412
+ return new Proxy(value, {
1413
+ defineProperty(_, prop, descriptor) {
1414
+ if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) state_descriptors_fixed();
1415
+ var s = sources.get(prop);
1416
+ if (s === void 0) with_parent(() => {
1417
+ var s = /* @__PURE__ */ state(descriptor.value);
1418
+ sources.set(prop, s);
1419
+ return s;
1420
+ });
1421
+ else set(s, descriptor.value, true);
1422
+ return true;
1423
+ },
1424
+ deleteProperty(target, prop) {
1425
+ var s = sources.get(prop);
1426
+ if (s === void 0) {
1427
+ if (prop in target) {
1428
+ const s = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED));
1429
+ sources.set(prop, s);
1430
+ increment(version);
1431
+ }
1432
+ } else {
1433
+ set(s, UNINITIALIZED);
1434
+ increment(version);
1435
+ }
1436
+ return true;
1437
+ },
1438
+ get(target, prop, receiver) {
1439
+ if (prop === STATE_SYMBOL) return value;
1440
+ var s = sources.get(prop);
1441
+ var exists = prop in target;
1442
+ if (s === void 0 && (!exists || get_descriptor(target, prop)?.writable)) {
1443
+ s = with_parent(() => {
1444
+ return /* @__PURE__ */ state(proxy(exists ? target[prop] : UNINITIALIZED));
1445
+ });
1446
+ sources.set(prop, s);
1447
+ }
1448
+ if (s !== void 0) {
1449
+ var v = get(s);
1450
+ return v === UNINITIALIZED ? void 0 : v;
1451
+ }
1452
+ return Reflect.get(target, prop, receiver);
1453
+ },
1454
+ getOwnPropertyDescriptor(target, prop) {
1455
+ var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
1456
+ if (descriptor && "value" in descriptor) {
1457
+ var s = sources.get(prop);
1458
+ if (s) descriptor.value = get(s);
1459
+ } else if (descriptor === void 0) {
1460
+ var source = sources.get(prop);
1461
+ var value = source?.v;
1462
+ if (source !== void 0 && value !== UNINITIALIZED) return {
1463
+ enumerable: true,
1464
+ configurable: true,
1465
+ value,
1466
+ writable: true
1467
+ };
1468
+ }
1469
+ return descriptor;
1470
+ },
1471
+ has(target, prop) {
1472
+ if (prop === STATE_SYMBOL) return true;
1473
+ var s = sources.get(prop);
1474
+ var has = s !== void 0 && s.v !== UNINITIALIZED || Reflect.has(target, prop);
1475
+ if (s !== void 0 || active_effect !== null && (!has || get_descriptor(target, prop)?.writable)) {
1476
+ if (s === void 0) {
1477
+ s = with_parent(() => {
1478
+ return /* @__PURE__ */ state(has ? proxy(target[prop]) : UNINITIALIZED);
1479
+ });
1480
+ sources.set(prop, s);
1481
+ }
1482
+ if (get(s) === UNINITIALIZED) return false;
1483
+ }
1484
+ return has;
1485
+ },
1486
+ set(target, prop, value, receiver) {
1487
+ var s = sources.get(prop);
1488
+ var has = prop in target;
1489
+ if (is_proxied_array && prop === "length") for (var i = value; i < s.v; i += 1) {
1490
+ var other_s = sources.get(i + "");
1491
+ if (other_s !== void 0) set(other_s, UNINITIALIZED);
1492
+ else if (i in target) {
1493
+ other_s = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED));
1494
+ sources.set(i + "", other_s);
1495
+ }
1496
+ }
1497
+ if (s === void 0) {
1498
+ if (!has || get_descriptor(target, prop)?.writable) {
1499
+ s = with_parent(() => /* @__PURE__ */ state(void 0));
1500
+ set(s, proxy(value));
1501
+ sources.set(prop, s);
1502
+ }
1503
+ } else {
1504
+ has = s.v !== UNINITIALIZED;
1505
+ var p = with_parent(() => proxy(value));
1506
+ set(s, p);
1507
+ }
1508
+ var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
1509
+ if (descriptor?.set) descriptor.set.call(receiver, value);
1510
+ if (!has) {
1511
+ if (is_proxied_array && typeof prop === "string") {
1512
+ var ls = sources.get("length");
1513
+ var n = Number(prop);
1514
+ if (Number.isInteger(n) && n >= ls.v) set(ls, n + 1);
1515
+ }
1516
+ increment(version);
1517
+ }
1518
+ return true;
1519
+ },
1520
+ ownKeys(target) {
1521
+ get(version);
1522
+ var own_keys = Reflect.ownKeys(target).filter((key) => {
1523
+ var source = sources.get(key);
1524
+ return source === void 0 || source.v !== UNINITIALIZED;
1525
+ });
1526
+ for (var [key, source] of sources) if (source.v !== UNINITIALIZED && !(key in target)) own_keys.push(key);
1527
+ return own_keys;
1528
+ },
1529
+ setPrototypeOf() {
1530
+ state_prototype_fixed();
1531
+ }
1532
+ });
1533
+ }
1534
+ //#endregion
1535
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/dom/operations.js
1536
+ /** @type {Window} */
1537
+ var $window;
1538
+ /** @type {() => Node | null} */
1539
+ var first_child_getter;
1540
+ /** @type {() => Node | null} */
1541
+ var next_sibling_getter;
1542
+ /**
1543
+ * Initialize these lazily to avoid issues when using the runtime in a server context
1544
+ * where these globals are not available while avoiding a separate server entry point
1545
+ */
1546
+ function init_operations() {
1547
+ if ($window !== void 0) return;
1548
+ $window = window;
1549
+ var element_prototype = Element.prototype;
1550
+ var node_prototype = Node.prototype;
1551
+ var text_prototype = Text.prototype;
1552
+ first_child_getter = get_descriptor(node_prototype, "firstChild").get;
1553
+ next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
1554
+ if (is_extensible(element_prototype)) {
1555
+ /** @type {any} */ element_prototype[CLASS_CACHE] = void 0;
1556
+ /** @type {any} */ element_prototype[ATTRIBUTES_CACHE] = null;
1557
+ /** @type {any} */ element_prototype[STYLE_CACHE] = void 0;
1558
+ element_prototype.__e = void 0;
1559
+ }
1560
+ if (is_extensible(text_prototype))
1561
+ /** @type {any} */ text_prototype[TEXT_CACHE] = void 0;
1562
+ }
1563
+ /**
1564
+ * @param {string} value
1565
+ * @returns {Text}
1566
+ */
1567
+ function create_text(value = "") {
1568
+ return document.createTextNode(value);
1569
+ }
1570
+ /**
1571
+ * @template {Node} N
1572
+ * @param {N} node
1573
+ */
1574
+ /*@__NO_SIDE_EFFECTS__*/
1575
+ function get_first_child(node) {
1576
+ return first_child_getter.call(node);
1577
+ }
1578
+ /**
1579
+ * @template {Node} N
1580
+ * @param {N} node
1581
+ */
1582
+ /*@__NO_SIDE_EFFECTS__*/
1583
+ function get_next_sibling(node) {
1584
+ return next_sibling_getter.call(node);
1585
+ }
1586
+ /**
1587
+ * @template {Node} N
1588
+ * @param {N} node
1589
+ * @returns {void}
1590
+ */
1591
+ function clear_text_content(node) {
1592
+ node.textContent = "";
1593
+ }
1594
+ /**
1595
+ * @param {unknown} error
1596
+ */
1597
+ function handle_error(error) {
1598
+ var effect = active_effect;
1599
+ if (effect === null) {
1600
+ /** @type {Derived} */ active_reaction.f |= ERROR_VALUE;
1601
+ return error;
1602
+ }
1603
+ if ((effect.f & 32768) === 0 && (effect.f & 4) === 0) throw error;
1604
+ invoke_error_boundary(error, effect);
1605
+ }
1606
+ /**
1607
+ * @param {unknown} error
1608
+ * @param {Effect | null} effect
1609
+ */
1610
+ function invoke_error_boundary(error, effect) {
1611
+ if (effect !== null && (effect.f & 16384) !== 0) return;
1612
+ while (effect !== null) {
1613
+ if ((effect.f & 128) !== 0 && (effect.f & 33570816) === 0) {
1614
+ if ((effect.f & 32768) === 0) throw error;
1615
+ try {
1616
+ /** @type {Boundary} */ effect.b.error(error);
1617
+ return;
1618
+ } catch (e) {
1619
+ error = e;
1620
+ }
1621
+ }
1622
+ effect = effect.parent;
1623
+ }
1624
+ throw error;
1625
+ }
1626
+ //#endregion
1627
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/reactivity/effects.js
1628
+ /** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
1629
+ /**
1630
+ * @param {Effect} effect
1631
+ * @param {Effect} parent_effect
1632
+ */
1633
+ function push_effect(effect, parent_effect) {
1634
+ var parent_last = parent_effect.last;
1635
+ if (parent_last === null) parent_effect.last = parent_effect.first = effect;
1636
+ else {
1637
+ parent_last.next = effect;
1638
+ effect.prev = parent_last;
1639
+ parent_effect.last = effect;
1640
+ }
1641
+ }
1642
+ /**
1643
+ * @param {number} type
1644
+ * @param {null | (() => void | (() => void))} fn
1645
+ * @returns {Effect}
1646
+ */
1647
+ function create_effect(type, fn) {
1648
+ var parent = active_effect;
1649
+ if (parent !== null && (parent.f & 8192) !== 0) type |= INERT;
1650
+ /** @type {Effect} */
1651
+ var effect = {
1652
+ ctx: component_context,
1653
+ deps: null,
1654
+ nodes: null,
1655
+ f: type | DIRTY | 512,
1656
+ first: null,
1657
+ fn,
1658
+ last: null,
1659
+ next: null,
1660
+ parent,
1661
+ b: parent && parent.b,
1662
+ prev: null,
1663
+ teardown: null,
1664
+ wv: 0,
1665
+ ac: null
1666
+ };
1667
+ current_batch?.register_created_effect(effect);
1668
+ /** @type {Effect | null} */
1669
+ var e = effect;
1670
+ if ((type & 4) !== 0) {
1671
+ if (collected_effects !== null) collected_effects.push(effect);
1672
+ else Batch.ensure().schedule(effect);
1673
+ } else if (fn !== null) {
1674
+ try {
1675
+ update_effect(effect);
1676
+ } catch (e) {
1677
+ destroy_effect(effect);
1678
+ throw e;
1679
+ }
1680
+ if (e.deps === null && e.teardown === null && e.nodes === null && e.first === e.last && (e.f & 524288) === 0) {
1681
+ e = e.first;
1682
+ if ((type & 16) !== 0 && (type & 65536) !== 0 && e !== null) e.f |= EFFECT_TRANSPARENT;
1683
+ }
1684
+ }
1685
+ if (e !== null) {
1686
+ e.parent = parent;
1687
+ if (parent !== null) push_effect(e, parent);
1688
+ if (active_reaction !== null && (active_reaction.f & 2) !== 0 && (type & 64) === 0) {
1689
+ var derived = active_reaction;
1690
+ (derived.effects ??= []).push(e);
1691
+ }
1692
+ }
1693
+ return effect;
1694
+ }
1695
+ /**
1696
+ * Internal representation of `$effect.tracking()`
1697
+ * @returns {boolean}
1698
+ */
1699
+ function effect_tracking() {
1700
+ return active_reaction !== null && !untracking;
1701
+ }
1702
+ /**
1703
+ * @param {() => void | (() => void)} fn
1704
+ */
1705
+ function create_user_effect(fn) {
1706
+ return create_effect(4 | USER_EFFECT, fn);
1707
+ }
1708
+ /**
1709
+ * An effect root whose children can transition out
1710
+ * @param {() => void} fn
1711
+ * @returns {(options?: { outro?: boolean }) => Promise<void>}
1712
+ */
1713
+ function component_root(fn) {
1714
+ Batch.ensure();
1715
+ const effect = create_effect(64 | EFFECT_PRESERVED, fn);
1716
+ return (options = {}) => {
1717
+ return new Promise((fulfil) => {
1718
+ if (options.outro) pause_effect(effect, () => {
1719
+ destroy_effect(effect);
1720
+ fulfil(void 0);
1721
+ });
1722
+ else {
1723
+ destroy_effect(effect);
1724
+ fulfil(void 0);
1725
+ }
1726
+ });
1727
+ };
1728
+ }
1729
+ /**
1730
+ * @param {() => void | (() => void)} fn
1731
+ * @returns {Effect}
1732
+ */
1733
+ function render_effect(fn, flags = 0) {
1734
+ return create_effect(8 | flags, fn);
1735
+ }
1736
+ /**
1737
+ * @param {(() => void)} fn
1738
+ * @param {number} flags
1739
+ */
1740
+ function block(fn, flags = 0) {
1741
+ return create_effect(16 | flags, fn);
1742
+ }
1743
+ /**
1744
+ * @param {(() => void)} fn
1745
+ */
1746
+ function branch(fn) {
1747
+ return create_effect(32 | EFFECT_PRESERVED, fn);
1748
+ }
1749
+ /**
1750
+ * @param {Effect} effect
1751
+ */
1752
+ function execute_effect_teardown(effect) {
1753
+ var teardown = effect.teardown;
1754
+ if (teardown !== null) {
1755
+ const previously_destroying_effect = is_destroying_effect;
1756
+ const previous_reaction = active_reaction;
1757
+ set_is_destroying_effect(true);
1758
+ set_active_reaction(null);
1759
+ try {
1760
+ teardown.call(null);
1761
+ } catch (error) {
1762
+ invoke_error_boundary(error, effect.parent);
1763
+ } finally {
1764
+ set_is_destroying_effect(previously_destroying_effect);
1765
+ set_active_reaction(previous_reaction);
1766
+ }
1767
+ }
1768
+ }
1769
+ /**
1770
+ * @param {Effect} signal
1771
+ * @param {boolean} remove_dom
1772
+ * @returns {void}
1773
+ */
1774
+ function destroy_effect_children(signal, remove_dom = false) {
1775
+ var effect = signal.first;
1776
+ signal.first = signal.last = null;
1777
+ while (effect !== null) {
1778
+ const controller = effect.ac;
1779
+ if (controller !== null) without_reactive_context(() => {
1780
+ controller.abort(STALE_REACTION);
1781
+ });
1782
+ var next = effect.next;
1783
+ if ((effect.f & 64) !== 0) effect.parent = null;
1784
+ else destroy_effect(effect, remove_dom);
1785
+ effect = next;
1786
+ }
1787
+ }
1788
+ /**
1789
+ * @param {Effect} signal
1790
+ * @returns {void}
1791
+ */
1792
+ function destroy_block_effect_children(signal) {
1793
+ var effect = signal.first;
1794
+ while (effect !== null) {
1795
+ var next = effect.next;
1796
+ if ((effect.f & 32) === 0) destroy_effect(effect);
1797
+ effect = next;
1798
+ }
1799
+ }
1800
+ /**
1801
+ * @param {Effect} effect
1802
+ * @param {boolean} [remove_dom]
1803
+ * @returns {void}
1804
+ */
1805
+ function destroy_effect(effect, remove_dom = true) {
1806
+ var removed = false;
1807
+ if ((remove_dom || (effect.f & 262144) !== 0) && effect.nodes !== null && effect.nodes.end !== null) {
1808
+ remove_effect_dom(effect.nodes.start, effect.nodes.end);
1809
+ removed = true;
1810
+ }
1811
+ effect.f |= DESTROYING;
1812
+ destroy_effect_children(effect, remove_dom && !removed);
1813
+ remove_reactions(effect, 0);
1814
+ var transitions = effect.nodes && effect.nodes.t;
1815
+ if (transitions !== null) for (const transition of transitions) transition.stop();
1816
+ execute_effect_teardown(effect);
1817
+ effect.f ^= DESTROYING;
1818
+ effect.f |= DESTROYED;
1819
+ var parent = effect.parent;
1820
+ if (parent !== null && parent.first !== null) unlink_effect(effect);
1821
+ effect.next = effect.prev = effect.teardown = effect.ctx = effect.deps = effect.fn = effect.nodes = effect.ac = effect.b = null;
1822
+ }
1823
+ /**
1824
+ *
1825
+ * @param {TemplateNode | null} node
1826
+ * @param {TemplateNode} end
1827
+ */
1828
+ function remove_effect_dom(node, end) {
1829
+ while (node !== null) {
1830
+ /** @type {TemplateNode | null} */
1831
+ var next = node === end ? null : /* @__PURE__ */ get_next_sibling(node);
1832
+ node.remove();
1833
+ node = next;
1834
+ }
1835
+ }
1836
+ /**
1837
+ * Detach an effect from the effect tree, freeing up memory and
1838
+ * reducing the amount of work that happens on subsequent traversals
1839
+ * @param {Effect} effect
1840
+ */
1841
+ function unlink_effect(effect) {
1842
+ var parent = effect.parent;
1843
+ var prev = effect.prev;
1844
+ var next = effect.next;
1845
+ if (prev !== null) prev.next = next;
1846
+ if (next !== null) next.prev = prev;
1847
+ if (parent !== null) {
1848
+ if (parent.first === effect) parent.first = next;
1849
+ if (parent.last === effect) parent.last = prev;
1850
+ }
1851
+ }
1852
+ /**
1853
+ * When a block effect is removed, we don't immediately destroy it or yank it
1854
+ * out of the DOM, because it might have transitions. Instead, we 'pause' it.
1855
+ * It stays around (in memory, and in the DOM) until outro transitions have
1856
+ * completed, and if the state change is reversed then we _resume_ it.
1857
+ * A paused effect does not update, and the DOM subtree becomes inert.
1858
+ * @param {Effect} effect
1859
+ * @param {() => void} [callback]
1860
+ * @param {boolean} [destroy]
1861
+ */
1862
+ function pause_effect(effect, callback, destroy = true) {
1863
+ /** @type {TransitionManager[]} */
1864
+ var transitions = [];
1865
+ effect.f |= 256;
1866
+ pause_children(effect, transitions, true);
1867
+ var fn = () => {
1868
+ if (destroy) destroy_effect(effect);
1869
+ if (callback) callback();
1870
+ };
1871
+ var remaining = transitions.length;
1872
+ if (remaining > 0) {
1873
+ var check = () => --remaining || fn();
1874
+ for (var transition of transitions) transition.out(check);
1875
+ } else fn();
1876
+ }
1877
+ /**
1878
+ * @param {Effect} effect
1879
+ * @param {TransitionManager[]} transitions
1880
+ * @param {boolean} local
1881
+ */
1882
+ function pause_children(effect, transitions, local) {
1883
+ if ((effect.f & 8192) !== 0) return;
1884
+ effect.f ^= INERT;
1885
+ var t = effect.nodes && effect.nodes.t;
1886
+ if (t !== null) {
1887
+ for (const transition of t) if (transition.is_global || local) transitions.push(transition);
1888
+ }
1889
+ var child = effect.first;
1890
+ while (child !== null) {
1891
+ var sibling = child.next;
1892
+ if ((child.f & 64) === 0) {
1893
+ var transparent = (child.f & 65536) !== 0 || (child.f & 32) !== 0 && (effect.f & 16) !== 0;
1894
+ pause_children(child, transitions, transparent ? local : false);
1895
+ }
1896
+ child = sibling;
1897
+ }
1898
+ }
1899
+ /**
1900
+ * @param {Effect} effect
1901
+ * @param {DocumentFragment} fragment
1902
+ */
1903
+ function move_effect(effect, fragment) {
1904
+ if (!effect.nodes) return;
1905
+ /** @type {TemplateNode | null} */
1906
+ var node = effect.nodes.start;
1907
+ var end = effect.nodes.end;
1908
+ while (node !== null) {
1909
+ /** @type {TemplateNode | null} */
1910
+ var next = node === end ? null : /* @__PURE__ */ get_next_sibling(node);
1911
+ fragment.append(node);
1912
+ node = next;
1913
+ }
1914
+ }
1915
+ //#endregion
1916
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/client/runtime.js
1917
+ /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
1918
+ /**
1919
+ * True if updating in an effect context that is reactive (i.e. not branch/root effects)
1920
+ */
1921
+ var is_updating_effect = false;
1922
+ var is_destroying_effect = false;
1923
+ /** @param {boolean} value */
1924
+ function set_is_destroying_effect(value) {
1925
+ is_destroying_effect = value;
1926
+ }
1927
+ /** @type {null | Reaction} */
1928
+ var active_reaction = null;
1929
+ var untracking = false;
1930
+ /** @param {null | Reaction} reaction */
1931
+ function set_active_reaction(reaction) {
1932
+ active_reaction = reaction;
1933
+ }
1934
+ /** @type {null | Effect} */
1935
+ var active_effect = null;
1936
+ /** @param {null | Effect} effect */
1937
+ function set_active_effect(effect) {
1938
+ active_effect = effect;
1939
+ }
1940
+ /**
1941
+ * When sources are created within a reaction, reading and writing
1942
+ * them within that reaction should not cause a re-run
1943
+ * @type {null | Set<Source>}
1944
+ */
1945
+ var current_sources = null;
1946
+ /** @param {Value} value */
1947
+ function push_reaction_value(value) {
1948
+ if (active_reaction !== null && (true)) (current_sources ??= /* @__PURE__ */ new Set()).add(value);
1949
+ }
1950
+ /**
1951
+ * The dependencies of the reaction that is currently being executed. In many cases,
1952
+ * the dependencies are unchanged between runs, and so this will be `null` unless
1953
+ * and until a new dependency is accessed — we track this via `skipped_deps`
1954
+ * @type {null | Value[]}
1955
+ */
1956
+ var new_deps = null;
1957
+ var skipped_deps = 0;
1958
+ /**
1959
+ * Tracks writes that the effect it's executed in doesn't listen to yet,
1960
+ * so that the dependency can be added to the effect later on if it then reads it
1961
+ * @type {null | Source[]}
1962
+ */
1963
+ var untracked_writes = null;
1964
+ /** @param {null | Source[]} value */
1965
+ function set_untracked_writes(value) {
1966
+ untracked_writes = value;
1967
+ }
1968
+ /**
1969
+ * @type {number} Used by sources and deriveds for handling updates.
1970
+ * Version starts from 1 so that unowned deriveds differentiate between a created effect and a run one for tracing
1971
+ **/
1972
+ var write_version = 1;
1973
+ /** @type {number} Used to version each read of a source of derived to avoid duplicating dependencies inside a reaction */
1974
+ var read_version = 0;
1975
+ var update_version = read_version;
1976
+ /** @param {number} value */
1977
+ function set_update_version(value) {
1978
+ update_version = value;
1979
+ }
1980
+ function increment_write_version() {
1981
+ return ++write_version;
1982
+ }
1983
+ /**
1984
+ * Determines whether a derived or effect is dirty.
1985
+ * If it is MAYBE_DIRTY, will set the status to CLEAN
1986
+ * @param {Reaction} reaction
1987
+ * @returns {boolean}
1988
+ */
1989
+ function is_dirty(reaction) {
1990
+ var flags = reaction.f;
1991
+ if ((flags & 2048) !== 0) return true;
1992
+ if (flags & 2) reaction.f &= ~WAS_MARKED;
1993
+ if ((flags & 4096) !== 0) {
1994
+ var dependencies = reaction.deps;
1995
+ var length = dependencies.length;
1996
+ for (var i = 0; i < length; i++) {
1997
+ var dependency = dependencies[i];
1998
+ if (is_dirty(dependency)) update_derived(dependency);
1999
+ if (dependency.wv > reaction.wv) return true;
2000
+ }
2001
+ if ((flags & 512) !== 0 && batch_values === null) set_signal_status(reaction, CLEAN);
2002
+ }
2003
+ return false;
2004
+ }
2005
+ /**
2006
+ * @param {Value} signal
2007
+ * @param {Effect} effect
2008
+ * @param {boolean} [root]
2009
+ */
2010
+ function schedule_possible_effect_self_invalidation(signal, effect, root = true) {
2011
+ var reactions = signal.reactions;
2012
+ if (reactions === null) return;
2013
+ if (current_sources !== null && current_sources.has(signal)) return;
2014
+ for (var i = 0; i < reactions.length; i++) {
2015
+ var reaction = reactions[i];
2016
+ if ((reaction.f & 2) !== 0) schedule_possible_effect_self_invalidation(reaction, effect, false);
2017
+ else if (effect === reaction) {
2018
+ if (root) set_signal_status(reaction, DIRTY);
2019
+ else if ((reaction.f & 1024) !== 0) set_signal_status(reaction, MAYBE_DIRTY);
2020
+ schedule_effect(reaction);
2021
+ }
2022
+ }
2023
+ }
2024
+ /** @param {Reaction} reaction */
2025
+ function update_reaction(reaction) {
2026
+ var previous_deps = new_deps;
2027
+ var previous_skipped_deps = skipped_deps;
2028
+ var previous_untracked_writes = untracked_writes;
2029
+ var previous_reaction = active_reaction;
2030
+ var previous_sources = current_sources;
2031
+ var previous_component_context = component_context;
2032
+ var previous_untracking = untracking;
2033
+ var previous_update_version = update_version;
2034
+ var flags = reaction.f;
2035
+ new_deps = null;
2036
+ skipped_deps = 0;
2037
+ untracked_writes = null;
2038
+ active_reaction = (flags & 96) === 0 ? reaction : null;
2039
+ current_sources = null;
2040
+ set_component_context(reaction.ctx);
2041
+ untracking = false;
2042
+ update_version = ++read_version;
2043
+ if (reaction.ac !== null) {
2044
+ without_reactive_context(() => {
2045
+ /** @type {AbortController} */ reaction.ac.abort(STALE_REACTION);
2046
+ });
2047
+ reaction.ac = null;
2048
+ }
2049
+ try {
2050
+ reaction.f |= REACTION_IS_UPDATING;
2051
+ var fn = reaction.fn;
2052
+ var result = fn();
2053
+ reaction.f |= REACTION_RAN;
2054
+ var deps = update_dependencies(reaction);
2055
+ 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);
2056
+ if (previous_reaction !== null && previous_reaction !== reaction) {
2057
+ read_version++;
2058
+ if (previous_reaction.deps !== null) for (let i = 0; i < previous_skipped_deps; i += 1) previous_reaction.deps[i].rv = read_version;
2059
+ if (previous_deps !== null) for (const dep of previous_deps) dep.rv = read_version;
2060
+ if (untracked_writes !== null) {
2061
+ if (previous_untracked_writes === null) previous_untracked_writes = untracked_writes;
2062
+ else previous_untracked_writes.push(...untracked_writes);
2063
+ }
2064
+ }
2065
+ if ((reaction.f & 8388608) !== 0) reaction.f ^= ERROR_VALUE;
2066
+ return result;
2067
+ } catch (error) {
2068
+ update_dependencies(reaction);
2069
+ return handle_error(error);
2070
+ } finally {
2071
+ reaction.f ^= REACTION_IS_UPDATING;
2072
+ new_deps = previous_deps;
2073
+ skipped_deps = previous_skipped_deps;
2074
+ untracked_writes = previous_untracked_writes;
2075
+ active_reaction = previous_reaction;
2076
+ current_sources = previous_sources;
2077
+ set_component_context(previous_component_context);
2078
+ untracking = previous_untracking;
2079
+ update_version = previous_update_version;
2080
+ }
2081
+ }
2082
+ /**
2083
+ * @param {Reaction} reaction
2084
+ */
2085
+ function update_dependencies(reaction) {
2086
+ var deps = reaction.deps;
2087
+ var is_fork = current_batch?.is_fork;
2088
+ if (new_deps !== null) {
2089
+ var i;
2090
+ if (!is_fork) remove_reactions(reaction, skipped_deps);
2091
+ if (deps !== null && skipped_deps > 0) {
2092
+ deps.length = skipped_deps + new_deps.length;
2093
+ for (i = 0; i < new_deps.length; i++) deps[skipped_deps + i] = new_deps[i];
2094
+ } else reaction.deps = deps = new_deps;
2095
+ if (effect_tracking() && (reaction.f & 512) !== 0) for (i = skipped_deps; i < deps.length; i++) (deps[i].reactions ??= []).push(reaction);
2096
+ } else if (!is_fork && deps !== null && skipped_deps < deps.length) {
2097
+ remove_reactions(reaction, skipped_deps);
2098
+ deps.length = skipped_deps;
2099
+ }
2100
+ return deps;
2101
+ }
2102
+ /**
2103
+ * @template V
2104
+ * @param {Reaction} signal
2105
+ * @param {Value<V>} dependency
2106
+ * @returns {void}
2107
+ */
2108
+ function remove_reaction(signal, dependency) {
2109
+ let reactions = dependency.reactions;
2110
+ if (reactions !== null) {
2111
+ var index = index_of.call(reactions, signal);
2112
+ if (index !== -1) {
2113
+ var new_length = reactions.length - 1;
2114
+ if (new_length === 0) reactions = dependency.reactions = null;
2115
+ else {
2116
+ reactions[index] = reactions[new_length];
2117
+ reactions.pop();
2118
+ }
2119
+ }
2120
+ }
2121
+ if (reactions === null && (dependency.f & 2) !== 0 && (new_deps === null || !includes.call(new_deps, dependency))) {
2122
+ var derived = dependency;
2123
+ if ((derived.f & 512) !== 0) {
2124
+ derived.f ^= 512;
2125
+ derived.f &= ~WAS_MARKED;
2126
+ }
2127
+ if (derived.v !== UNINITIALIZED) update_derived_status(derived);
2128
+ if (derived.ac !== null) without_reactive_context(() => {
2129
+ /** @type {AbortController} */ derived.ac.abort(STALE_REACTION);
2130
+ derived.ac = null;
2131
+ set_signal_status(derived, DIRTY);
2132
+ });
2133
+ freeze_derived_effects(derived);
2134
+ remove_reactions(derived, 0);
2135
+ }
2136
+ }
2137
+ /**
2138
+ * @param {Reaction} signal
2139
+ * @param {number} start_index
2140
+ * @returns {void}
2141
+ */
2142
+ function remove_reactions(signal, start_index) {
2143
+ var dependencies = signal.deps;
2144
+ if (dependencies === null) return;
2145
+ for (var i = start_index; i < dependencies.length; i++) remove_reaction(signal, dependencies[i]);
2146
+ }
2147
+ /**
2148
+ * @param {Effect} effect
2149
+ * @returns {void}
2150
+ */
2151
+ function update_effect(effect) {
2152
+ var flags = effect.f;
2153
+ if ((flags & 16384) !== 0) return;
2154
+ set_signal_status(effect, CLEAN);
2155
+ var previous_effect = active_effect;
2156
+ var was_updating_effect = is_updating_effect;
2157
+ active_effect = effect;
2158
+ is_updating_effect = (flags & 96) === 0;
2159
+ try {
2160
+ if ((flags & 16777232) !== 0) destroy_block_effect_children(effect);
2161
+ else destroy_effect_children(effect);
2162
+ execute_effect_teardown(effect);
2163
+ var teardown = update_reaction(effect);
2164
+ effect.teardown = typeof teardown === "function" ? teardown : null;
2165
+ effect.wv = write_version;
2166
+ } finally {
2167
+ is_updating_effect = was_updating_effect;
2168
+ active_effect = previous_effect;
2169
+ }
2170
+ }
2171
+ /**
2172
+ * @template V
2173
+ * @param {Value<V>} signal
2174
+ * @returns {V}
2175
+ */
2176
+ function get(signal) {
2177
+ var is_derived = (signal.f & 2) !== 0;
2178
+ if (active_reaction !== null && !untracking) {
2179
+ if (!(active_effect !== null && (active_effect.f & 16384) !== 0) && (current_sources === null || !current_sources.has(signal))) {
2180
+ var deps = active_reaction.deps;
2181
+ if ((active_reaction.f & 2097152) !== 0) {
2182
+ if (signal.rv < read_version) {
2183
+ signal.rv = read_version;
2184
+ if (new_deps === null && deps !== null && deps[skipped_deps] === signal) skipped_deps++;
2185
+ else if (new_deps === null) new_deps = [signal];
2186
+ else new_deps.push(signal);
2187
+ }
2188
+ } else {
2189
+ active_reaction.deps ??= [];
2190
+ if (!includes.call(active_reaction.deps, signal)) active_reaction.deps.push(signal);
2191
+ var reactions = signal.reactions;
2192
+ if (reactions === null) signal.reactions = [active_reaction];
2193
+ else if (!includes.call(reactions, active_reaction)) reactions.push(active_reaction);
2194
+ }
2195
+ }
2196
+ }
2197
+ if (is_destroying_effect && old_values.has(signal)) return old_values.get(signal);
2198
+ if (is_derived) {
2199
+ var derived = signal;
2200
+ if (is_destroying_effect) {
2201
+ var value = derived.v;
2202
+ if ((derived.f & 1024) === 0 && derived.reactions !== null || depends_on_old_values(derived)) value = execute_derived(derived);
2203
+ old_values.set(derived, value);
2204
+ return value;
2205
+ }
2206
+ var should_connect = (derived.f & 512) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & 512) !== 0);
2207
+ var is_new = (derived.f & REACTION_RAN) === 0;
2208
+ if (is_dirty(derived)) {
2209
+ if (should_connect) derived.f |= 512;
2210
+ update_derived(derived);
2211
+ }
2212
+ if (should_connect && !is_new) {
2213
+ unfreeze_derived_effects(derived);
2214
+ reconnect(derived);
2215
+ }
2216
+ }
2217
+ if (batch_values?.has(signal)) return batch_values.get(signal);
2218
+ if ((signal.f & 8388608) !== 0) throw signal.v;
2219
+ return signal.v;
2220
+ }
2221
+ /**
2222
+ * (Re)connect a disconnected derived, so that it is notified
2223
+ * of changes in `mark_reactions`
2224
+ * @param {Derived} derived
2225
+ */
2226
+ function reconnect(derived) {
2227
+ derived.f |= 512;
2228
+ if (derived.deps === null) return;
2229
+ for (const dep of derived.deps) {
2230
+ (dep.reactions ??= []).push(derived);
2231
+ if ((dep.f & 2) !== 0 && (dep.f & 512) === 0) {
2232
+ unfreeze_derived_effects(dep);
2233
+ reconnect(dep);
2234
+ }
2235
+ }
2236
+ }
2237
+ /** @param {Derived} derived */
2238
+ function depends_on_old_values(derived) {
2239
+ if (derived.v === UNINITIALIZED) return true;
2240
+ if (derived.deps === null) return false;
2241
+ for (const dep of derived.deps) {
2242
+ if (old_values.has(dep)) return true;
2243
+ if ((dep.f & 2) !== 0 && depends_on_old_values(dep)) return true;
2244
+ }
2245
+ return false;
2246
+ }
2247
+ /**
2248
+ * When used inside a [`$derived`](https://svelte.dev/docs/svelte/$derived) or [`$effect`](https://svelte.dev/docs/svelte/$effect),
2249
+ * any state read inside `fn` will not be treated as a dependency.
2250
+ *
2251
+ * ```ts
2252
+ * $effect(() => {
2253
+ * // this will run when `data` changes, but not when `time` changes
2254
+ * save(data, {
2255
+ * timestamp: untrack(() => time)
2256
+ * });
2257
+ * });
2258
+ * ```
2259
+ * @template T
2260
+ * @param {() => T} fn
2261
+ * @returns {T}
2262
+ */
2263
+ function untrack(fn) {
2264
+ var previous_untracking = untracking;
2265
+ try {
2266
+ untracking = true;
2267
+ return fn();
2268
+ } finally {
2269
+ untracking = previous_untracking;
2270
+ }
2271
+ }
2272
+ //#endregion
2273
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/store/shared/index.js
2274
+ /** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
2275
+ /** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */
2276
+ /**
2277
+ * @type {Array<SubscribeInvalidateTuple<any> | any>}
2278
+ */
2279
+ var subscriber_queue = [];
2280
+ /**
2281
+ * Creates a `Readable` store that allows reading by subscription.
2282
+ *
2283
+ * @template T
2284
+ * @param {T} [value] initial value
2285
+ * @param {StartStopNotifier<T>} [start]
2286
+ * @returns {Readable<T>}
2287
+ */
2288
+ function readable(value, start) {
2289
+ return { subscribe: writable(value, start).subscribe };
2290
+ }
2291
+ /**
2292
+ * Create a `Writable` store that allows both updating and reading by subscription.
2293
+ *
2294
+ * @template T
2295
+ * @param {T} [value] initial value
2296
+ * @param {StartStopNotifier<T>} [start]
2297
+ * @returns {Writable<T>}
2298
+ */
2299
+ function writable(value, start = noop) {
2300
+ /** @type {Unsubscriber | null} */
2301
+ let stop = null;
2302
+ /** @type {Set<SubscribeInvalidateTuple<T>>} */
2303
+ const subscribers = /* @__PURE__ */ new Set();
2304
+ /**
2305
+ * @param {T} new_value
2306
+ * @returns {void}
2307
+ */
2308
+ function set(new_value) {
2309
+ if (safe_not_equal(value, new_value)) {
2310
+ value = new_value;
2311
+ if (stop) {
2312
+ const run_queue = !subscriber_queue.length;
2313
+ for (const subscriber of subscribers) {
2314
+ subscriber[1]();
2315
+ subscriber_queue.push(subscriber, value);
2316
+ }
2317
+ if (run_queue) {
2318
+ for (let i = 0; i < subscriber_queue.length; i += 2) subscriber_queue[i][0](subscriber_queue[i + 1]);
2319
+ subscriber_queue.length = 0;
2320
+ }
2321
+ }
2322
+ }
2323
+ }
2324
+ /**
2325
+ * @param {Updater<T>} fn
2326
+ * @returns {void}
2327
+ */
2328
+ function update(fn) {
2329
+ set(fn(value));
2330
+ }
2331
+ /**
2332
+ * @param {Subscriber<T>} run
2333
+ * @param {() => void} [invalidate]
2334
+ * @returns {Unsubscriber}
2335
+ */
2336
+ function subscribe(run, invalidate = noop) {
2337
+ /** @type {SubscribeInvalidateTuple<T>} */
2338
+ const subscriber = [run, invalidate];
2339
+ subscribers.add(subscriber);
2340
+ if (subscribers.size === 1) stop = start(set, update) || noop;
2341
+ run(value);
2342
+ return () => {
2343
+ subscribers.delete(subscriber);
2344
+ if (subscribers.size === 0 && stop) {
2345
+ stop();
2346
+ stop = null;
2347
+ }
2348
+ };
2349
+ }
2350
+ return {
2351
+ set,
2352
+ update,
2353
+ subscribe
2354
+ };
2355
+ }
2356
+ var VOID_ELEMENT_NAMES = [
2357
+ "area",
2358
+ "base",
2359
+ "br",
2360
+ "col",
2361
+ "command",
2362
+ "embed",
2363
+ "hr",
2364
+ "img",
2365
+ "input",
2366
+ "keygen",
2367
+ "link",
2368
+ "meta",
2369
+ "param",
2370
+ "source",
2371
+ "track",
2372
+ "wbr"
2373
+ ];
2374
+ /**
2375
+ * Returns `true` if `name` is of a void element
2376
+ * @param {string} name
2377
+ */
2378
+ function is_void(name) {
2379
+ return VOID_ELEMENT_NAMES.includes(name) || name.toLowerCase() === "!doctype";
2380
+ }
2381
+ /**
2382
+ * Attributes that are boolean, i.e. they are present or not present.
2383
+ */
2384
+ var DOM_BOOLEAN_ATTRIBUTES = [
2385
+ "allowfullscreen",
2386
+ "async",
2387
+ "autofocus",
2388
+ "autoplay",
2389
+ "checked",
2390
+ "controls",
2391
+ "default",
2392
+ "disabled",
2393
+ "formnovalidate",
2394
+ "indeterminate",
2395
+ "inert",
2396
+ "ismap",
2397
+ "loop",
2398
+ "multiple",
2399
+ "muted",
2400
+ "nomodule",
2401
+ "novalidate",
2402
+ "open",
2403
+ "playsinline",
2404
+ "readonly",
2405
+ "required",
2406
+ "reversed",
2407
+ "seamless",
2408
+ "selected",
2409
+ "webkitdirectory",
2410
+ "defer",
2411
+ "disablepictureinpicture",
2412
+ "disableremoteplayback"
2413
+ ];
2414
+ /**
2415
+ * Returns `true` if `name` is a boolean attribute
2416
+ * @param {string} name
2417
+ */
2418
+ function is_boolean_attribute(name) {
2419
+ return DOM_BOOLEAN_ATTRIBUTES.includes(name);
2420
+ }
2421
+ /**
2422
+ * Subset of delegated events which should be passive by default.
2423
+ * These two are already passive via browser defaults on window, document and body.
2424
+ * But since
2425
+ * - we're delegating them
2426
+ * - they happen often
2427
+ * - they apply to mobile which is generally less performant
2428
+ * we're marking them as passive by default for other elements, too.
2429
+ */
2430
+ var PASSIVE_EVENTS = ["touchstart", "touchmove"];
2431
+ /**
2432
+ * Returns `true` if `name` is a passive event
2433
+ * @param {string} name
2434
+ */
2435
+ function is_passive_event(name) {
2436
+ return PASSIVE_EVENTS.includes(name);
2437
+ }
2438
+ /** List of elements that require raw contents and should not have SSR comments put in them */
2439
+ var RAW_TEXT_ELEMENTS = [
2440
+ "textarea",
2441
+ "script",
2442
+ "style",
2443
+ "title"
2444
+ ];
2445
+ /** @param {string} name */
2446
+ function is_raw_text_element(name) {
2447
+ return RAW_TEXT_ELEMENTS.includes(name);
2448
+ }
2449
+ 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;
2450
+ //#endregion
2451
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/escaping.js
2452
+ var ATTR_REGEX = /[&"<]/g;
2453
+ var CONTENT_REGEX = /[&<]/g;
2454
+ /**
2455
+ * @template V
2456
+ * @param {V} value
2457
+ * @param {boolean} [is_attr]
2458
+ */
2459
+ function escape_html(value, is_attr) {
2460
+ const str = String(value ?? "");
2461
+ const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;
2462
+ pattern.lastIndex = 0;
2463
+ let escaped = "";
2464
+ let last = 0;
2465
+ while (pattern.test(str)) {
2466
+ const i = pattern.lastIndex - 1;
2467
+ const ch = str[i];
2468
+ escaped += str.substring(last, i) + (ch === "&" ? "&amp;" : ch === "\"" ? "&quot;" : "&lt;");
2469
+ last = i + 1;
2470
+ }
2471
+ return escaped + str.substring(last);
2472
+ }
2473
+ //#endregion
2474
+ //#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
2475
+ function r(e) {
2476
+ var t, f, n = "";
2477
+ if ("string" == typeof e || "number" == typeof e) n += e;
2478
+ else if ("object" == typeof e) if (Array.isArray(e)) {
2479
+ var o = e.length;
2480
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
2481
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
2482
+ return n;
2483
+ }
2484
+ function clsx$1() {
2485
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
2486
+ return n;
2487
+ }
2488
+ //#endregion
2489
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/shared/attributes.js
2490
+ /**
2491
+ * `<div translate={false}>` should be rendered as `<div translate="no">` and _not_
2492
+ * `<div translate="false">`, which is equivalent to `<div translate="yes">`. There
2493
+ * may be other odd cases that need to be added to this list in future
2494
+ * @type {Record<string, Map<any, string>>}
2495
+ */
2496
+ var replacements = { translate: /* @__PURE__ */ new Map([[true, "yes"], [false, "no"]]) };
2497
+ /**
2498
+ * @template V
2499
+ * @param {string} name
2500
+ * @param {V} value
2501
+ * @param {boolean} [is_boolean]
2502
+ * @returns {string}
2503
+ */
2504
+ function attr(name, value, is_boolean = false) {
2505
+ if (name === "hidden" && value !== "until-found") is_boolean = true;
2506
+ if (value == null || is_boolean && !value && value !== "") return "";
2507
+ const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value;
2508
+ return ` ${name}${is_boolean ? `=""` : `="${escape_html(normalized, true)}"`}`;
2509
+ }
2510
+ /**
2511
+ * Small wrapper around clsx to preserve Svelte's (weird) handling of falsy values.
2512
+ * TODO Svelte 6 revisit this, and likely turn all falsy values into the empty string (what clsx also does)
2513
+ * @param {any} value
2514
+ */
2515
+ function clsx(value) {
2516
+ if (typeof value === "object") return clsx$1(value);
2517
+ else return value ?? "";
2518
+ }
2519
+ var whitespace = [..." \n\r\f\xA0\v"];
2520
+ /**
2521
+ * @param {any} value
2522
+ * @param {string | null} [hash]
2523
+ * @param {Record<string, boolean>} [directives]
2524
+ * @returns {string | null}
2525
+ */
2526
+ function to_class(value, hash, directives) {
2527
+ var classname = value == null ? "" : "" + value;
2528
+ if (hash) classname = classname ? classname + " " + hash : hash;
2529
+ if (directives) {
2530
+ for (var key of Object.keys(directives)) if (directives[key]) classname = classname ? classname + " " + key : key;
2531
+ else if (classname.length) {
2532
+ var len = key.length;
2533
+ var a = 0;
2534
+ while ((a = classname.indexOf(key, a)) >= 0) {
2535
+ var b = a + len;
2536
+ if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1);
2537
+ else a = b;
2538
+ }
2539
+ }
2540
+ }
2541
+ return classname === "" ? null : classname;
2542
+ }
2543
+ /**
2544
+ *
2545
+ * @param {Record<string,any>} styles
2546
+ * @param {boolean} important
2547
+ */
2548
+ function append_styles(styles, important = false) {
2549
+ var separator = important ? " !important;" : ";";
2550
+ var css = "";
2551
+ for (var key of Object.keys(styles)) {
2552
+ var value = styles[key];
2553
+ if (value != null && value !== "") css += " " + key + ": " + value + separator;
2554
+ }
2555
+ return css;
2556
+ }
2557
+ /**
2558
+ * @param {string} name
2559
+ * @returns {string}
2560
+ */
2561
+ function to_css_name(name) {
2562
+ if (name[0] !== "-" || name[1] !== "-") return name.toLowerCase();
2563
+ return name;
2564
+ }
2565
+ /**
2566
+ * @param {any} value
2567
+ * @param {Record<string, any> | [Record<string, any>, Record<string, any>]} [styles]
2568
+ * @returns {string | null}
2569
+ */
2570
+ function to_style(value, styles) {
2571
+ if (styles) {
2572
+ var new_style = "";
2573
+ /** @type {Record<string,any> | undefined} */
2574
+ var normal_styles;
2575
+ /** @type {Record<string,any> | undefined} */
2576
+ var important_styles;
2577
+ if (Array.isArray(styles)) {
2578
+ normal_styles = styles[0];
2579
+ important_styles = styles[1];
2580
+ } else normal_styles = styles;
2581
+ if (value) {
2582
+ value = String(value).replaceAll(/\/\*.*?\*\//g, "").trim();
2583
+ /** @type {boolean | '"' | "'"} */
2584
+ var in_str = false;
2585
+ var in_apo = 0;
2586
+ var in_comment = false;
2587
+ var reserved_names = [];
2588
+ if (normal_styles) reserved_names.push(...Object.keys(normal_styles).map(to_css_name));
2589
+ if (important_styles) reserved_names.push(...Object.keys(important_styles).map(to_css_name));
2590
+ var start_index = 0;
2591
+ var name_index = -1;
2592
+ const len = value.length;
2593
+ for (var i = 0; i < len; i++) {
2594
+ var c = value[i];
2595
+ if (in_comment) {
2596
+ if (c === "/" && value[i - 1] === "*") in_comment = false;
2597
+ } else if (in_str) {
2598
+ if (in_str === c) in_str = false;
2599
+ } else if (c === "/" && value[i + 1] === "*") in_comment = true;
2600
+ else if (c === "\"" || c === "'") in_str = c;
2601
+ else if (c === "(") in_apo++;
2602
+ else if (c === ")") in_apo--;
2603
+ if (!in_comment && in_str === false && in_apo === 0) {
2604
+ if (c === ":" && name_index === -1) name_index = i;
2605
+ else if (c === ";" || i === len - 1) {
2606
+ if (name_index !== -1) {
2607
+ var name = to_css_name(value.substring(start_index, name_index).trim());
2608
+ if (!reserved_names.includes(name)) {
2609
+ if (c !== ";") i++;
2610
+ var property = value.substring(start_index, i).trim();
2611
+ new_style += " " + property + ";";
2612
+ }
2613
+ }
2614
+ start_index = i + 1;
2615
+ name_index = -1;
2616
+ }
2617
+ }
2618
+ }
2619
+ }
2620
+ if (normal_styles) new_style += append_styles(normal_styles);
2621
+ if (important_styles) new_style += append_styles(important_styles, true);
2622
+ new_style = new_style.trim();
2623
+ return new_style === "" ? null : new_style;
2624
+ }
2625
+ return value == null ? null : String(value);
2626
+ }
2627
+ //#endregion
2628
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/server/hydration.js
2629
+ var BLOCK_OPEN = `<!--[-->`;
2630
+ var BLOCK_OPEN_ELSE = `<!--[!-->`;
2631
+ var BLOCK_CLOSE = `<!--]-->`;
2632
+ var EMPTY_COMMENT = `<!---->`;
2633
+ //#endregion
2634
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/server/context.js
2635
+ /** @import { SSRContext } from '#server' */
2636
+ /** @type {SSRContext | null} */
2637
+ var ssr_context = null;
2638
+ /** @param {SSRContext | null} v */
2639
+ function set_ssr_context(v) {
2640
+ ssr_context = v;
2641
+ }
2642
+ /**
2643
+ * @template T
2644
+ * @returns {[() => T, (context: T) => T, () => boolean]}
2645
+ * @since 5.40.0
2646
+ */
2647
+ function createContext() {
2648
+ return create_context(getContext, setContext, hasContext);
2649
+ }
2650
+ /**
2651
+ * @template T
2652
+ * @param {any} key
2653
+ * @returns {T}
2654
+ */
2655
+ function getContext(key) {
2656
+ return get_or_init_context_map(ssr_context).get(key);
2657
+ }
2658
+ /**
2659
+ * @template T
2660
+ * @param {any} key
2661
+ * @param {T} context
2662
+ * @returns {T}
2663
+ */
2664
+ function setContext(key, context) {
2665
+ get_or_init_context_map(ssr_context).set(key, context);
2666
+ return context;
2667
+ }
2668
+ /**
2669
+ * @param {any} key
2670
+ * @returns {boolean}
2671
+ */
2672
+ function hasContext(key) {
2673
+ return get_or_init_context_map(ssr_context).has(key);
2674
+ }
2675
+ /** @returns {Map<any, any>} */
2676
+ function getAllContexts() {
2677
+ return get_or_init_context_map(ssr_context);
2678
+ }
2679
+ /**
2680
+ * @param {Function} [fn]
2681
+ */
2682
+ function push(fn) {
2683
+ ssr_context = {
2684
+ p: ssr_context,
2685
+ c: null,
2686
+ r: null
2687
+ };
2688
+ }
2689
+ function pop() {
2690
+ ssr_context = ssr_context.p;
2691
+ }
2692
+ /**
2693
+ * Encountered asynchronous work while rendering synchronously.
2694
+ * @returns {never}
2695
+ */
2696
+ function await_invalid() {
2697
+ const error = /* @__PURE__ */ new Error(`await_invalid\nEncountered asynchronous work while rendering synchronously.\nhttps://svelte.dev/e/await_invalid`);
2698
+ error.name = "Svelte error";
2699
+ throw error;
2700
+ }
2701
+ /**
2702
+ * `<svelte:element this="%tag%">` is not a valid element name — the element will not be rendered
2703
+ * @param {string} tag
2704
+ * @returns {never}
2705
+ */
2706
+ function dynamic_element_invalid_tag(tag) {
2707
+ const error = /* @__PURE__ */ new Error(`dynamic_element_invalid_tag\n\`<svelte:element this="${tag}">\` is not a valid element name — the element will not be rendered\nhttps://svelte.dev/e/dynamic_element_invalid_tag`);
2708
+ error.name = "Svelte error";
2709
+ throw error;
2710
+ }
2711
+ /**
2712
+ * Failed to serialize `hydratable` data for key `%key%`.
2713
+ *
2714
+ * `hydratable` can serialize anything [`uneval` from `devalue`](https://npmjs.com/package/uneval) can, plus Promises.
2715
+ *
2716
+ * Cause:
2717
+ * %stack%
2718
+ * @param {string} key
2719
+ * @param {string} stack
2720
+ * @returns {never}
2721
+ */
2722
+ function hydratable_serialization_failed(key, stack) {
2723
+ const error = /* @__PURE__ */ new Error(`hydratable_serialization_failed\nFailed to serialize \`hydratable\` data for key \`${key}\`.
2724
+
2725
+ \`hydratable\` can serialize anything [\`uneval\` from \`devalue\`](https://npmjs.com/package/uneval) can, plus Promises.
2726
+
2727
+ Cause:
2728
+ ${stack}\nhttps://svelte.dev/e/hydratable_serialization_failed`);
2729
+ error.name = "Svelte error";
2730
+ throw error;
2731
+ }
2732
+ /**
2733
+ * `csp.nonce` was set while `csp.hash` was `true`. These options cannot be used simultaneously.
2734
+ * @returns {never}
2735
+ */
2736
+ function invalid_csp() {
2737
+ const error = /* @__PURE__ */ new Error(`invalid_csp\n\`csp.nonce\` was set while \`csp.hash\` was \`true\`. These options cannot be used simultaneously.\nhttps://svelte.dev/e/invalid_csp`);
2738
+ error.name = "Svelte error";
2739
+ throw error;
2740
+ }
2741
+ /**
2742
+ * The `idPrefix` option cannot include `--`.
2743
+ * @returns {never}
2744
+ */
2745
+ function invalid_id_prefix() {
2746
+ const error = /* @__PURE__ */ new Error(`invalid_id_prefix\nThe \`idPrefix\` option cannot include \`--\`.\nhttps://svelte.dev/e/invalid_id_prefix`);
2747
+ error.name = "Svelte error";
2748
+ throw error;
2749
+ }
2750
+ /**
2751
+ * `%name%(...)` is not available on the server
2752
+ * @param {string} name
2753
+ * @returns {never}
2754
+ */
2755
+ function lifecycle_function_unavailable(name) {
2756
+ const error = /* @__PURE__ */ new Error(`lifecycle_function_unavailable\n\`${name}(...)\` is not available on the server\nhttps://svelte.dev/e/lifecycle_function_unavailable`);
2757
+ error.name = "Svelte error";
2758
+ throw error;
2759
+ }
2760
+ /**
2761
+ * Could not resolve `render` context.
2762
+ * @returns {never}
2763
+ */
2764
+ function server_context_required() {
2765
+ const error = /* @__PURE__ */ new Error(`server_context_required\nCould not resolve \`render\` context.\nhttps://svelte.dev/e/server_context_required`);
2766
+ error.name = "Svelte error";
2767
+ throw error;
2768
+ }
2769
+ /**
2770
+ * A `hydratable` value with key `%key%` was created, but at least part of it was not used during the render.
2771
+ *
2772
+ * The `hydratable` was initialized in:
2773
+ * %stack%
2774
+ * @param {string} key
2775
+ * @param {string} stack
2776
+ */
2777
+ function unresolved_hydratable(key, stack) {
2778
+ console.warn(`https://svelte.dev/e/unresolved_hydratable`);
2779
+ }
2780
+ /** @returns {RenderContext} */
2781
+ function get_render_context() {
2782
+ const store = als?.getStore();
2783
+ server_context_required();
2784
+ return store;
2785
+ }
2786
+ /** @type {AsyncLocalStorage<RenderContext | null> | null} */
2787
+ var als = null;
2788
+ //#endregion
2789
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/server/crypto.js
2790
+ var text_encoder;
2791
+ var crypto;
2792
+ /** @param {string} module_name */
2793
+ var obfuscated_import = (module_name) => import(
2794
+ /* @vite-ignore */
2795
+ module_name
2796
+ );
2797
+ /** @param {string} data */
2798
+ async function sha256(data) {
2799
+ text_encoder ??= new TextEncoder();
2800
+ crypto ??= globalThis.crypto?.subtle?.digest ? globalThis.crypto : (await obfuscated_import("node:crypto")).webcrypto;
2801
+ return base64_encode(await crypto.subtle.digest("SHA-256", text_encoder.encode(data)));
2802
+ }
2803
+ /**
2804
+ * @param {Uint8Array} bytes
2805
+ * @returns {string}
2806
+ */
2807
+ function base64_encode(bytes) {
2808
+ if (globalThis.Buffer) return globalThis.Buffer.from(bytes).toString("base64");
2809
+ let binary = "";
2810
+ for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
2811
+ return btoa(binary);
2812
+ }
2813
+ //#endregion
2814
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/server/renderer.js
2815
+ /** @import { Component } from 'svelte' */
2816
+ /** @import { HydratableContext, SSRContext } from './types.js' */
2817
+ /** @import { Csp, RenderOutput, SyncRenderOutput, Sha256Source } from '../../server/public.js' */
2818
+ /** @import { MaybePromise } from '#shared' */
2819
+ /** @typedef {'head' | 'body'} RendererType */
2820
+ /** @typedef {{ [key in RendererType]: string }} AccumulatedContent */
2821
+ /**
2822
+ * @typedef {string | Renderer} RendererItem
2823
+ */
2824
+ /**
2825
+ * Renderers are basically a tree of `string | Renderer`s, where each `Renderer` in the tree represents
2826
+ * work that may or may not have completed. A renderer can be {@link collect}ed to aggregate the
2827
+ * content from itself and all of its children, but this will throw if any of the children are
2828
+ * performing asynchronous work. To asynchronously collect a renderer, just `await` it.
2829
+ *
2830
+ * The `string` values within a renderer are always associated with the {@link type} of that renderer. To switch types,
2831
+ * call {@link child} with a different `type` argument.
2832
+ */
2833
+ var Renderer = class Renderer {
2834
+ /**
2835
+ * The contents of the renderer.
2836
+ * @type {RendererItem[]}
2837
+ */
2838
+ #out = [];
2839
+ /**
2840
+ * Any `onDestroy` callbacks registered during execution of this renderer.
2841
+ * @type {(() => void)[] | undefined}
2842
+ */
2843
+ #on_destroy = void 0;
2844
+ /**
2845
+ * Whether this renderer is a component body.
2846
+ * @type {boolean}
2847
+ */
2848
+ #is_component_body = false;
2849
+ /**
2850
+ * If set, this renderer is an error boundary. When async collection
2851
+ * of the children fails, the failed snippet is rendered instead.
2852
+ * @type {{
2853
+ * failed: (renderer: Renderer, error: unknown, reset: () => void) => void;
2854
+ * transformError: (error: unknown) => unknown;
2855
+ * context: SSRContext | null;
2856
+ * } | null}
2857
+ */
2858
+ #boundary = null;
2859
+ /**
2860
+ * The type of string content that this renderer is accumulating.
2861
+ * @type {RendererType}
2862
+ */
2863
+ type;
2864
+ /** @type {Renderer | undefined} */
2865
+ #parent;
2866
+ /**
2867
+ * Asynchronous work associated with this renderer
2868
+ * @type {Promise<void> | undefined}
2869
+ */
2870
+ promise = void 0;
2871
+ /**
2872
+ * State which is associated with the content tree as a whole.
2873
+ * It will be re-exposed, uncopied, on all children.
2874
+ * @type {SSRState}
2875
+ * @readonly
2876
+ */
2877
+ global;
2878
+ /**
2879
+ * State that is local to the branch it is declared in.
2880
+ * It will be shallow-copied to all children.
2881
+ *
2882
+ * @type {{ select_value: any, multiple: boolean }}
2883
+ */
2884
+ local;
2885
+ /**
2886
+ * @param {SSRState} global
2887
+ * @param {Renderer | undefined} [parent]
2888
+ */
2889
+ constructor(global, parent) {
2890
+ this.#parent = parent;
2891
+ this.global = global;
2892
+ this.local = parent ? { ...parent.local } : {
2893
+ select_value: void 0,
2894
+ multiple: false
2895
+ };
2896
+ this.type = parent ? parent.type : "body";
2897
+ }
2898
+ /**
2899
+ * @param {(renderer: Renderer) => void} fn
2900
+ */
2901
+ head(fn) {
2902
+ const head = new Renderer(this.global, this);
2903
+ head.type = "head";
2904
+ this.#out.push(head);
2905
+ head.child(fn);
2906
+ }
2907
+ /**
2908
+ * @param {Array<Promise<void>>} blockers
2909
+ * @param {(renderer: Renderer) => void} fn
2910
+ */
2911
+ async_block(blockers, fn) {
2912
+ this.#out.push(BLOCK_OPEN);
2913
+ this.async(blockers, fn);
2914
+ this.#out.push(BLOCK_CLOSE);
2915
+ }
2916
+ /**
2917
+ * @param {Array<Promise<void>>} blockers
2918
+ * @param {(renderer: Renderer) => void} fn
2919
+ */
2920
+ async(blockers, fn) {
2921
+ let callback = fn;
2922
+ if (blockers.length > 0) {
2923
+ const context = ssr_context;
2924
+ callback = (renderer) => {
2925
+ return Promise.all(blockers).then(() => {
2926
+ const previous_context = ssr_context;
2927
+ try {
2928
+ set_ssr_context(context);
2929
+ return fn(renderer);
2930
+ } finally {
2931
+ set_ssr_context(previous_context);
2932
+ }
2933
+ });
2934
+ };
2935
+ }
2936
+ this.child(callback);
2937
+ }
2938
+ /**
2939
+ * @param {Array<() => void>} thunks
2940
+ */
2941
+ run(thunks) {
2942
+ const context = ssr_context;
2943
+ let promise = Promise.resolve(thunks[0]());
2944
+ const promises = [promise];
2945
+ for (const fn of thunks.slice(1)) {
2946
+ promise = promise.then(() => {
2947
+ const previous_context = ssr_context;
2948
+ set_ssr_context(context);
2949
+ try {
2950
+ return fn();
2951
+ } finally {
2952
+ set_ssr_context(previous_context);
2953
+ }
2954
+ });
2955
+ promises.push(promise);
2956
+ }
2957
+ promise.catch(noop);
2958
+ this.promise = this.global.track(promise);
2959
+ return promises;
2960
+ }
2961
+ /**
2962
+ * @param {(renderer: Renderer) => MaybePromise<void>} fn
2963
+ */
2964
+ child_block(fn) {
2965
+ this.#out.push(BLOCK_OPEN);
2966
+ this.child(fn);
2967
+ this.#out.push(BLOCK_CLOSE);
2968
+ }
2969
+ /**
2970
+ * Create a child renderer. The child renderer inherits the state from the parent,
2971
+ * but has its own content.
2972
+ * @param {(renderer: Renderer) => MaybePromise<void>} fn
2973
+ */
2974
+ child(fn) {
2975
+ const child = new Renderer(this.global, this);
2976
+ this.#out.push(child);
2977
+ const parent = ssr_context;
2978
+ set_ssr_context({
2979
+ ...ssr_context,
2980
+ p: parent,
2981
+ c: null,
2982
+ r: child
2983
+ });
2984
+ const result = fn(child);
2985
+ set_ssr_context(parent);
2986
+ if (result instanceof Promise) {
2987
+ result.catch(noop);
2988
+ result.finally(() => set_ssr_context(null)).catch(noop);
2989
+ if (child.global.mode === "sync") await_invalid();
2990
+ child.promise = child.global.track(result);
2991
+ }
2992
+ return child;
2993
+ }
2994
+ /**
2995
+ * Render children inside an error boundary. If the children throw and the API-level
2996
+ * `transformError` transform handles the error (doesn't re-throw), the `failed` snippet is
2997
+ * rendered instead. Otherwise the error propagates.
2998
+ *
2999
+ * @param {{ failed?: (renderer: Renderer, error: unknown, reset: () => void) => void }} props
3000
+ * @param {(renderer: Renderer) => MaybePromise<void>} children_fn
3001
+ */
3002
+ boundary(props, children_fn) {
3003
+ const child = new Renderer(this.global, this);
3004
+ this.#out.push(child);
3005
+ const parent_context = ssr_context;
3006
+ if (props.failed) child.#boundary = {
3007
+ failed: props.failed,
3008
+ transformError: this.global.transformError,
3009
+ context: parent_context
3010
+ };
3011
+ set_ssr_context({
3012
+ ...ssr_context,
3013
+ p: parent_context,
3014
+ c: null,
3015
+ r: child
3016
+ });
3017
+ try {
3018
+ const result = children_fn(child);
3019
+ set_ssr_context(parent_context);
3020
+ if (result instanceof Promise) {
3021
+ if (child.global.mode === "sync") await_invalid();
3022
+ result.catch(noop);
3023
+ child.promise = child.global.track(result);
3024
+ }
3025
+ } catch (error) {
3026
+ set_ssr_context(parent_context);
3027
+ const failed_snippet = props.failed;
3028
+ if (!failed_snippet) throw error;
3029
+ const result = this.global.transformError(error);
3030
+ child.#out.length = 0;
3031
+ child.#boundary = null;
3032
+ if (result instanceof Promise) {
3033
+ if (this.global.mode === "sync") await_invalid();
3034
+ child.promise = child.global.track(
3035
+ /** @type {Promise<unknown>} */
3036
+ result.then((transformed) => {
3037
+ set_ssr_context(parent_context);
3038
+ child.#out.push(Renderer.#serialize_failed_boundary(transformed));
3039
+ failed_snippet(child, transformed, noop);
3040
+ child.#out.push(BLOCK_CLOSE);
3041
+ })
3042
+ );
3043
+ child.promise.catch(noop);
3044
+ } else {
3045
+ child.#out.push(Renderer.#serialize_failed_boundary(result));
3046
+ failed_snippet(child, result, noop);
3047
+ child.#out.push(BLOCK_CLOSE);
3048
+ }
3049
+ }
3050
+ }
3051
+ /**
3052
+ * Create a component renderer. The component renderer inherits the state from the parent,
3053
+ * but has its own content. It is treated as an ordering boundary for ondestroy callbacks.
3054
+ * @param {(renderer: Renderer) => MaybePromise<void>} fn
3055
+ * @param {Function} [component_fn]
3056
+ * @returns {void}
3057
+ */
3058
+ component(fn, component_fn) {
3059
+ push();
3060
+ this.child((renderer) => {
3061
+ renderer.#is_component_body = true;
3062
+ return fn(renderer);
3063
+ });
3064
+ pop();
3065
+ }
3066
+ /**
3067
+ * @param {Record<string, any>} attrs
3068
+ * @param {(renderer: Renderer) => void} fn
3069
+ * @param {string | undefined} [css_hash]
3070
+ * @param {Record<string, boolean> | undefined} [classes]
3071
+ * @param {Record<string, string> | undefined} [styles]
3072
+ * @param {number | undefined} [flags]
3073
+ * @param {boolean | undefined} [is_rich]
3074
+ * @returns {void}
3075
+ */
3076
+ select(attrs, fn, css_hash, classes, styles, flags, is_rich) {
3077
+ const { value, defaultValue, ...select_attrs } = attrs;
3078
+ if (select_attrs.multiple === "") select_attrs.multiple = true;
3079
+ this.push(`<select${attributes(select_attrs, css_hash, classes, styles, flags)}>`);
3080
+ this.child((renderer) => {
3081
+ renderer.local.select_value = value === void 0 ? defaultValue : value;
3082
+ renderer.local.multiple = !!select_attrs.multiple;
3083
+ fn(renderer);
3084
+ });
3085
+ this.push(`${is_rich ? "<!>" : ""}</select>`);
3086
+ }
3087
+ /**
3088
+ * @param {Record<string, any>} attrs
3089
+ * @param {string | number | boolean | ((renderer: Renderer) => void)} body
3090
+ * @param {string | undefined} [css_hash]
3091
+ * @param {Record<string, boolean> | undefined} [classes]
3092
+ * @param {Record<string, string> | undefined} [styles]
3093
+ * @param {number | undefined} [flags]
3094
+ * @param {boolean | undefined} [is_rich]
3095
+ */
3096
+ option(attrs, body, css_hash, classes, styles, flags, is_rich) {
3097
+ this.#out.push(`<option${attributes(attrs, css_hash, classes, styles, flags)}`);
3098
+ /**
3099
+ * @param {Renderer} renderer
3100
+ * @param {any} value
3101
+ * @param {{ head?: string, body: any }} content
3102
+ */
3103
+ const close = (renderer, value, { head, body }) => {
3104
+ if (has_own_property.call(attrs, "value")) value = attrs.value;
3105
+ var select_value = this.local.select_value;
3106
+ if (this.local.multiple && is_array(select_value) ? select_value.includes(value) : value === select_value) renderer.#out.push(" selected=\"\"");
3107
+ renderer.#out.push(`>${body}${is_rich ? "<!>" : ""}</option>`);
3108
+ if (head) renderer.head((child) => child.push(head));
3109
+ };
3110
+ if (typeof body === "function") this.child((renderer) => {
3111
+ const r = new Renderer(this.global, this);
3112
+ body(r);
3113
+ if (this.global.mode === "async") return r.#collect_content_async().then((content) => {
3114
+ close(renderer, content.body.replaceAll("<!---->", ""), content);
3115
+ });
3116
+ else {
3117
+ const content = r.#collect_content();
3118
+ close(renderer, content.body.replaceAll("<!---->", ""), content);
3119
+ }
3120
+ });
3121
+ else close(this, body, { body: escape_html(body) });
3122
+ }
3123
+ /**
3124
+ * @param {(renderer: Renderer) => void} fn
3125
+ */
3126
+ title(fn) {
3127
+ const path = this.get_path();
3128
+ /** @param {string} head */
3129
+ const close = (head) => {
3130
+ this.global.set_title(head, path);
3131
+ };
3132
+ this.child((renderer) => {
3133
+ const r = new Renderer(renderer.global, renderer);
3134
+ fn(r);
3135
+ if (renderer.global.mode === "async") return r.#collect_content_async().then((content) => {
3136
+ close(content.head);
3137
+ });
3138
+ else {
3139
+ const content = r.#collect_content();
3140
+ close(content.head);
3141
+ }
3142
+ });
3143
+ }
3144
+ /**
3145
+ * @param {string | (() => Promise<string>)} content
3146
+ */
3147
+ push(content) {
3148
+ if (typeof content === "function") this.child(async (renderer) => renderer.push(await content()));
3149
+ else this.#out.push(content);
3150
+ }
3151
+ /**
3152
+ * @param {() => void} fn
3153
+ */
3154
+ on_destroy(fn) {
3155
+ (this.#on_destroy ??= []).push(fn);
3156
+ }
3157
+ /**
3158
+ * @returns {number[]}
3159
+ */
3160
+ get_path() {
3161
+ return this.#parent ? [...this.#parent.get_path(), this.#parent.#out.indexOf(this)] : [];
3162
+ }
3163
+ /**
3164
+ * @deprecated this is needed for legacy component bindings
3165
+ */
3166
+ copy() {
3167
+ const copy = new Renderer(this.global, this.#parent);
3168
+ copy.type = this.type;
3169
+ copy.#out = this.#out.map((item) => item instanceof Renderer ? item.copy() : item);
3170
+ copy.promise = this.promise;
3171
+ return copy;
3172
+ }
3173
+ /**
3174
+ * @param {Renderer} other
3175
+ * @deprecated this is needed for legacy component bindings
3176
+ */
3177
+ subsume(other) {
3178
+ if (this.global.mode !== other.global.mode) throw new Error("invariant: A renderer cannot switch modes. If you're seeing this, there's a compiler bug. File an issue!");
3179
+ this.local = other.local;
3180
+ this.#out = other.#out.map((item, i) => {
3181
+ const current = this.#out[i];
3182
+ if (current instanceof Renderer && item instanceof Renderer) {
3183
+ current.subsume(item);
3184
+ return current;
3185
+ }
3186
+ return item;
3187
+ });
3188
+ this.promise = other.promise;
3189
+ this.type = other.type;
3190
+ }
3191
+ get length() {
3192
+ return this.#out.length;
3193
+ }
3194
+ /**
3195
+ * Creates the hydration comment that marks the start of a failed boundary.
3196
+ * The error is JSON-serialized and embedded inside an HTML comment for the client
3197
+ * to parse during hydration. The JSON is escaped to prevent `-->` or `<!--` sequences
3198
+ * from breaking out of the comment (XSS). Uses unicode escapes which `JSON.parse()`
3199
+ * handles transparently.
3200
+ * @param {unknown} error
3201
+ * @returns {string}
3202
+ */
3203
+ static #serialize_failed_boundary(error) {
3204
+ return `<!--[?${JSON.stringify(error).replace(/>/g, "\\u003e").replace(/</g, "\\u003c")}-->`;
3205
+ }
3206
+ /**
3207
+ * Only available on the server and when compiling with the `server` option.
3208
+ * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.
3209
+ * @template {Record<string, any>} Props
3210
+ * @param {Component<Props>} component
3211
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp }} [options]
3212
+ * @returns {RenderOutput}
3213
+ */
3214
+ static render(component, options = {}) {
3215
+ /** @type {AccumulatedContent | undefined} */
3216
+ let sync;
3217
+ const result = {};
3218
+ Object.defineProperties(result, {
3219
+ html: { get: () => {
3220
+ return (sync ??= Renderer.#render(component, options)).body;
3221
+ } },
3222
+ head: { get: () => {
3223
+ return (sync ??= Renderer.#render(component, options)).head;
3224
+ } },
3225
+ body: { get: () => {
3226
+ return (sync ??= Renderer.#render(component, options)).body;
3227
+ } },
3228
+ hashes: { value: { script: "" } },
3229
+ then: { value:
3230
+ /**
3231
+ * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
3232
+ *
3233
+ * @template TResult1
3234
+ * @template [TResult2=never]
3235
+ * @param { (value: SyncRenderOutput) => TResult1 } onfulfilled
3236
+ * @param { (reason: unknown) => TResult2 } onrejected
3237
+ */
3238
+ (onfulfilled, onrejected) => {
3239
+ {
3240
+ const result = sync ??= Renderer.#render(component, options);
3241
+ const user_result = onfulfilled({
3242
+ head: result.head,
3243
+ body: result.body,
3244
+ html: result.body,
3245
+ hashes: { script: [] }
3246
+ });
3247
+ return Promise.resolve(user_result);
3248
+ }
3249
+ } }
3250
+ });
3251
+ return result;
3252
+ }
3253
+ /**
3254
+ * Collect all of the `onDestroy` callbacks registered during rendering. In an async context, this is only safe to call
3255
+ * after awaiting `collect_async`.
3256
+ *
3257
+ * Child renderers are "porous" and don't affect execution order, but component body renderers
3258
+ * create ordering boundaries. Within a renderer, callbacks run in order until hitting a component boundary.
3259
+ * @returns {Iterable<() => void>}
3260
+ */
3261
+ *#collect_on_destroy() {
3262
+ for (const component of this.#traverse_components()) yield* component.#collect_ondestroy();
3263
+ }
3264
+ /**
3265
+ * Performs a depth-first search of renderers, yielding the deepest components first, then additional components as we backtrack up the tree.
3266
+ * @returns {Iterable<Renderer>}
3267
+ */
3268
+ *#traverse_components() {
3269
+ for (const child of this.#out) if (typeof child !== "string") yield* child.#traverse_components();
3270
+ if (this.#is_component_body) yield this;
3271
+ }
3272
+ /**
3273
+ * @returns {Iterable<() => void>}
3274
+ */
3275
+ *#collect_ondestroy() {
3276
+ if (this.#on_destroy) for (const fn of this.#on_destroy) yield fn;
3277
+ for (const child of this.#out) if (child instanceof Renderer && !child.#is_component_body) yield* child.#collect_ondestroy();
3278
+ }
3279
+ /**
3280
+ * Runs every `onDestroy` callback in this renderer tree. On a failed render,
3281
+ * cleanup errors are suppressed so they do not mask the render error.
3282
+ * @param {boolean} suppress_errors
3283
+ */
3284
+ #run_on_destroy(suppress_errors) {
3285
+ let first_error;
3286
+ let has_error = false;
3287
+ for (const cleanup of this.#collect_on_destroy()) try {
3288
+ cleanup();
3289
+ } catch (error) {
3290
+ if (!suppress_errors && !has_error) {
3291
+ first_error = error;
3292
+ has_error = true;
3293
+ }
3294
+ }
3295
+ if (has_error) throw first_error;
3296
+ }
3297
+ /**
3298
+ * @param {'sync' | 'async'} mode
3299
+ * @param {{ idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options
3300
+ * @returns {Renderer}
3301
+ */
3302
+ static #create(mode, options) {
3303
+ if (options.idPrefix?.includes("--")) invalid_id_prefix();
3304
+ return new Renderer(new SSRState(mode, options.idPrefix ? options.idPrefix + "-" : "", options.csp, options.transformError));
3305
+ }
3306
+ /**
3307
+ * Render a component. Throws if any of the children are performing asynchronous work.
3308
+ *
3309
+ * @template {Record<string, any>} Props
3310
+ * @param {Component<Props>} component
3311
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string }} options
3312
+ * @returns {AccumulatedContent}
3313
+ */
3314
+ static #render(component, options) {
3315
+ var previous_context = ssr_context;
3316
+ const renderer = Renderer.#create("sync", options);
3317
+ /** @type {AccumulatedContent | undefined} */
3318
+ let result;
3319
+ let render_error;
3320
+ let failed = false;
3321
+ try {
3322
+ try {
3323
+ Renderer.#open_render(renderer, component, options);
3324
+ result = Renderer.#close_render(renderer.#collect_content(), renderer);
3325
+ } catch (error) {
3326
+ render_error = error;
3327
+ failed = true;
3328
+ }
3329
+ renderer.#run_on_destroy(failed);
3330
+ if (failed) throw render_error;
3331
+ return result;
3332
+ } finally {
3333
+ renderer.global.abort();
3334
+ set_ssr_context(previous_context);
3335
+ }
3336
+ }
3337
+ /**
3338
+ * Render a component.
3339
+ *
3340
+ * @template {Record<string, any>} Props
3341
+ * @param {Component<Props>} component
3342
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp }} options
3343
+ * @returns {Promise<AccumulatedContent & { hashes: { script: Sha256Source[] } }>}
3344
+ */
3345
+ static async #render_async(component, options) {
3346
+ const previous_context = ssr_context;
3347
+ const renderer = Renderer.#create("async", options);
3348
+ /** @type {(AccumulatedContent & { hashes: { script: Sha256Source[] } }) | undefined} */
3349
+ let result;
3350
+ let render_error;
3351
+ let failed = false;
3352
+ try {
3353
+ try {
3354
+ Renderer.#open_render(renderer, component, options);
3355
+ const content = await renderer.#collect_content_async();
3356
+ const hydratables = await renderer.#collect_hydratables();
3357
+ if (hydratables !== null) content.head = hydratables + content.head;
3358
+ result = Renderer.#close_render(content, renderer);
3359
+ } catch (error) {
3360
+ render_error = error;
3361
+ failed = true;
3362
+ renderer.global.abort();
3363
+ await renderer.global.settle();
3364
+ }
3365
+ renderer.#run_on_destroy(failed);
3366
+ if (failed) throw render_error;
3367
+ return result;
3368
+ } finally {
3369
+ set_ssr_context(previous_context);
3370
+ renderer.global.abort();
3371
+ }
3372
+ }
3373
+ /**
3374
+ * Collect all of the code from the `out` array and return it as a string, or a promise resolving to a string.
3375
+ * @param {AccumulatedContent} content
3376
+ * @returns {AccumulatedContent}
3377
+ */
3378
+ #collect_content(content = {
3379
+ head: "",
3380
+ body: ""
3381
+ }) {
3382
+ for (const item of this.#out) if (typeof item === "string") content[this.type] += item;
3383
+ else if (item instanceof Renderer) item.#collect_content(content);
3384
+ return content;
3385
+ }
3386
+ /**
3387
+ * Collect all of the code from the `out` array and return it as a string.
3388
+ * @param {AccumulatedContent} content
3389
+ * @returns {Promise<AccumulatedContent>}
3390
+ */
3391
+ async #collect_content_async(content = {
3392
+ head: "",
3393
+ body: ""
3394
+ }) {
3395
+ await this.promise;
3396
+ for (const item of this.#out) if (typeof item === "string") content[this.type] += item;
3397
+ else if (item instanceof Renderer) {
3398
+ if (item.#boundary) {
3399
+ /** @type {AccumulatedContent} */
3400
+ const boundary_content = {
3401
+ head: "",
3402
+ body: ""
3403
+ };
3404
+ try {
3405
+ await item.#collect_content_async(boundary_content);
3406
+ content.head += boundary_content.head;
3407
+ content.body += boundary_content.body;
3408
+ } catch (error) {
3409
+ const { context, failed, transformError } = item.#boundary;
3410
+ set_ssr_context(context);
3411
+ let promise = transformError(error);
3412
+ set_ssr_context(null);
3413
+ let transformed = await promise;
3414
+ set_ssr_context(context);
3415
+ const failed_renderer = new Renderer(item.global, item);
3416
+ failed_renderer.type = item.type;
3417
+ failed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed));
3418
+ failed(failed_renderer, transformed, noop);
3419
+ failed_renderer.#out.push(BLOCK_CLOSE);
3420
+ await failed_renderer.#collect_content_async(content);
3421
+ }
3422
+ } else await item.#collect_content_async(content);
3423
+ }
3424
+ return content;
3425
+ }
3426
+ async #collect_hydratables() {
3427
+ const ctx = get_render_context().hydratable;
3428
+ for (const [_, key] of ctx.unresolved_promises) unresolved_hydratable(key, ctx.lookup.get(key)?.stack ?? "<missing stack trace>");
3429
+ for (const comparison of ctx.comparisons) await comparison;
3430
+ return await this.#hydratable_block(ctx);
3431
+ }
3432
+ /**
3433
+ * @template {Record<string, any>} Props
3434
+ * @param {Renderer} renderer
3435
+ * @param {import('svelte').Component<Props>} component
3436
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options
3437
+ * @returns {void}
3438
+ */
3439
+ static #open_render(renderer, component, options) {
3440
+ var previous_context = ssr_context;
3441
+ try {
3442
+ set_ssr_context({
3443
+ p: null,
3444
+ c: options.context ?? null,
3445
+ r: renderer
3446
+ });
3447
+ renderer.push(BLOCK_OPEN);
3448
+ component(renderer, options.props ?? {});
3449
+ renderer.push(BLOCK_CLOSE);
3450
+ } finally {
3451
+ set_ssr_context(previous_context);
3452
+ }
3453
+ }
3454
+ /**
3455
+ * @param {AccumulatedContent} content
3456
+ * @param {Renderer} renderer
3457
+ * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }}
3458
+ */
3459
+ static #close_render(content, renderer) {
3460
+ let head = content.head + renderer.global.get_title();
3461
+ let body = content.body;
3462
+ for (const { hash, code } of renderer.global.css) head += `<style id="${hash}">${code}</style>`;
3463
+ return {
3464
+ head,
3465
+ body,
3466
+ hashes: { script: renderer.global.csp.script_hashes }
3467
+ };
3468
+ }
3469
+ /**
3470
+ * @param {HydratableContext} ctx
3471
+ */
3472
+ async #hydratable_block(ctx) {
3473
+ if (ctx.lookup.size === 0) return null;
3474
+ let entries = [];
3475
+ let has_promises = false;
3476
+ for (const [k, v] of ctx.lookup) {
3477
+ if (v.promises) {
3478
+ has_promises = true;
3479
+ for (const p of v.promises) await p;
3480
+ }
3481
+ entries.push(`[${uneval(k)},${v.serialized}]`);
3482
+ }
3483
+ let prelude = `const h = (window.__svelte ??= {}).h ??= new Map();`;
3484
+ if (has_promises) prelude = `const r = (v) => Promise.resolve(v);
3485
+ ${prelude}`;
3486
+ const body = `
3487
+ {
3488
+ ${prelude}
3489
+
3490
+ for (const [k, v] of [
3491
+ ${entries.join(",\n ")}
3492
+ ]) {
3493
+ h.set(k, v);
3494
+ }
3495
+ }
3496
+ `;
3497
+ let csp_attr = "";
3498
+ if (this.global.csp.nonce) csp_attr = ` nonce="${this.global.csp.nonce}"`;
3499
+ else if (this.global.csp.hash) {
3500
+ const hash = await sha256(body);
3501
+ this.global.csp.script_hashes.push(`sha256-${hash}`);
3502
+ }
3503
+ return `\n\t\t<script${csp_attr}>${body}<\/script>`;
3504
+ }
3505
+ };
3506
+ var SSRState = class {
3507
+ /** @readonly @type {Csp & { script_hashes: Sha256Source[] }} */
3508
+ csp;
3509
+ /** @readonly @type {'sync' | 'async'} */
3510
+ mode;
3511
+ /** @readonly @type {() => string} */
3512
+ uid;
3513
+ /** @readonly @type {Set<{ hash: string; code: string }>} */
3514
+ css = /* @__PURE__ */ new Set();
3515
+ /** @type {Set<Promise<unknown>>} */
3516
+ #pending = /* @__PURE__ */ new Set();
3517
+ /** @type {AbortController | null} */
3518
+ #controller = null;
3519
+ #aborted = false;
3520
+ /**
3521
+ * `transformError` passed to `render`. Called when an error boundary catches an error.
3522
+ * Throws by default if unset in `render`.
3523
+ * @type {(error: unknown) => unknown}
3524
+ */
3525
+ transformError;
3526
+ /** @type {{ path: number[], value: string }} */
3527
+ #title = {
3528
+ path: [],
3529
+ value: ""
3530
+ };
3531
+ /**
3532
+ * @param {'sync' | 'async'} mode
3533
+ * @param {string} id_prefix
3534
+ * @param {Csp} csp
3535
+ * @param {((error: unknown) => unknown) | undefined} [transformError]
3536
+ */
3537
+ constructor(mode, id_prefix = "", csp = { hash: false }, transformError) {
3538
+ this.mode = mode;
3539
+ this.csp = {
3540
+ ...csp,
3541
+ script_hashes: []
3542
+ };
3543
+ this.transformError = transformError ?? ((error) => {
3544
+ throw error;
3545
+ });
3546
+ let uid = 1;
3547
+ this.uid = () => `${id_prefix}s${uid++}`;
3548
+ }
3549
+ /**
3550
+ * @template T
3551
+ * @param {Promise<T>} promise
3552
+ * @returns {Promise<T>}
3553
+ */
3554
+ track(promise) {
3555
+ this.#pending.add(promise);
3556
+ promise.then(() => this.#pending.delete(promise), () => this.#pending.delete(promise));
3557
+ return promise;
3558
+ }
3559
+ async settle() {
3560
+ while (this.#pending.size > 0) await Promise.allSettled([...this.#pending]);
3561
+ }
3562
+ abort() {
3563
+ if (this.#aborted) return;
3564
+ this.#aborted = true;
3565
+ this.#controller?.abort(STALE_REACTION);
3566
+ }
3567
+ get_abort_signal() {
3568
+ const controller = this.#controller ??= new AbortController();
3569
+ if (this.#aborted) controller.abort(STALE_REACTION);
3570
+ return controller.signal;
3571
+ }
3572
+ get_title() {
3573
+ return this.#title.value;
3574
+ }
3575
+ /**
3576
+ * Performs a depth-first (lexicographic) comparison using the path. Rejects sets
3577
+ * from earlier than or equal to the current value.
3578
+ * @param {string} value
3579
+ * @param {number[]} path
3580
+ */
3581
+ set_title(value, path) {
3582
+ const current = this.#title.path;
3583
+ let i = 0;
3584
+ let l = Math.min(path.length, current.length);
3585
+ while (i < l && path[i] === current[i]) i += 1;
3586
+ if (path[i] === void 0) return;
3587
+ if (current[i] === void 0 || path[i] > current[i]) {
3588
+ this.#title.path = path;
3589
+ this.#title.value = value;
3590
+ }
3591
+ }
3592
+ };
3593
+ //#endregion
3594
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/server/blocks/html.js
3595
+ /**
3596
+ * @param {string} value
3597
+ */
3598
+ function html(value) {
3599
+ return "<!---->" + String(value ?? "") + "<!---->";
3600
+ }
3601
+ //#endregion
3602
+ //#region ../../node_modules/.pnpm/svelte@5.57.0_@typescript-eslint+types@8.70.0/node_modules/svelte/src/internal/server/index.js
3603
+ 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;
3604
+ /**
3605
+ * @param {Renderer} renderer
3606
+ * @param {string} tag
3607
+ * @param {() => void} attributes_fn
3608
+ * @param {() => void} children_fn
3609
+ * @returns {void}
3610
+ */
3611
+ function element(renderer, tag, attributes_fn = noop, children_fn = noop) {
3612
+ renderer.push("<!---->");
3613
+ if (tag) {
3614
+ if (!REGEX_VALID_TAG_NAME.test(tag)) dynamic_element_invalid_tag(tag);
3615
+ renderer.push(`<${tag}`);
3616
+ attributes_fn();
3617
+ renderer.push(`>`);
3618
+ if (!is_void(tag)) {
3619
+ children_fn();
3620
+ if (!is_raw_text_element(tag)) renderer.push(EMPTY_COMMENT);
3621
+ renderer.push(`</${tag}>`);
3622
+ }
3623
+ }
3624
+ renderer.push("<!---->");
3625
+ }
3626
+ /**
3627
+ * Only available on the server and when compiling with the `server` option.
3628
+ * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.
3629
+ * @template {Record<string, any>} Props
3630
+ * @param {Component<Props> | ComponentType<SvelteComponent<Props>>} component
3631
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} [options]
3632
+ * @returns {RenderOutput}
3633
+ */
3634
+ function render(component, options = {}) {
3635
+ if (options.csp?.hash && options.csp.nonce) invalid_csp();
3636
+ return Renderer.render(component, options);
3637
+ }
3638
+ /**
3639
+ * @param {string} hash
3640
+ * @param {Renderer} renderer
3641
+ * @param {(renderer: Renderer) => Promise<void> | void} fn
3642
+ * @returns {void}
3643
+ */
3644
+ function head(hash, renderer, fn) {
3645
+ renderer.head((renderer) => {
3646
+ renderer.push(`<!--${hash}-->`);
3647
+ renderer.child(fn);
3648
+ renderer.push(EMPTY_COMMENT);
3649
+ });
3650
+ }
3651
+ /**
3652
+ * @param {Record<string, unknown>} attrs
3653
+ * @param {string} [css_hash]
3654
+ * @param {Record<string, boolean>} [classes]
3655
+ * @param {Record<string, string>} [styles]
3656
+ * @param {number} [flags]
3657
+ * @returns {string}
3658
+ */
3659
+ function attributes(attrs, css_hash, classes, styles, flags = 0) {
3660
+ if (styles) attrs.style = to_style(attrs.style, styles);
3661
+ if (attrs.class) attrs.class = clsx(attrs.class);
3662
+ if (css_hash || classes) attrs.class = to_class(attrs.class, css_hash, classes);
3663
+ let attr_str = "";
3664
+ let name;
3665
+ const is_html = (flags & 1) === 0;
3666
+ const lowercase = (flags & 2) === 0;
3667
+ const is_input = (flags & 4) !== 0;
3668
+ for (name of Object.keys(attrs)) {
3669
+ if (typeof attrs[name] === "function") continue;
3670
+ if (name[0] === "$" && name[1] === "$") continue;
3671
+ if (name === "" || INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
3672
+ var value = attrs[name];
3673
+ var lower = name.toLowerCase();
3674
+ if (lowercase) name = lower;
3675
+ if (lower.length > 2 && lower.startsWith("on")) continue;
3676
+ if (is_input) {
3677
+ if (name === "defaultvalue" || name === "defaultchecked") {
3678
+ name = name === "defaultvalue" ? "value" : "checked";
3679
+ if (attrs[name]) continue;
3680
+ }
3681
+ }
3682
+ attr_str += attr(name, value, is_html && is_boolean_attribute(name));
3683
+ }
3684
+ return attr_str;
3685
+ }
3686
+ /**
3687
+ * @param {Record<string, unknown>[]} props
3688
+ * @returns {Record<string, unknown>}
3689
+ */
3690
+ function spread_props(props) {
3691
+ /** @type {Record<string, unknown>} */
3692
+ const merged_props = {};
3693
+ let key;
3694
+ for (let i = 0; i < props.length; i++) {
3695
+ const obj = props[i];
3696
+ if (obj == null) continue;
3697
+ for (key of Object.keys(obj)) {
3698
+ const desc = Object.getOwnPropertyDescriptor(obj, key);
3699
+ if (desc) Object.defineProperty(merged_props, key, desc);
3700
+ else merged_props[key] = obj[key];
3701
+ }
3702
+ }
3703
+ return merged_props;
3704
+ }
3705
+ /**
3706
+ * @param {unknown} value
3707
+ * @returns {string}
3708
+ */
3709
+ function stringify(value) {
3710
+ return typeof value === "string" ? value : value == null ? "" : value + "";
3711
+ }
3712
+ /**
3713
+ * @param {any} value
3714
+ * @param {string | undefined} [hash]
3715
+ * @param {Record<string, boolean>} [directives]
3716
+ */
3717
+ function attr_class(value, hash, directives) {
3718
+ var result = to_class(value, hash, directives);
3719
+ return result ? ` class="${escape_html(result, true)}"` : "";
3720
+ }
3721
+ /**
3722
+ * @param {any} value
3723
+ * @param {Record<string,any>|[Record<string,any>,Record<string,any>]} [directives]
3724
+ */
3725
+ function attr_style(value, directives) {
3726
+ var result = to_style(value, directives);
3727
+ return result ? ` style="${escape_html(result, true)}"` : "";
3728
+ }
3729
+ /**
3730
+ * Legacy mode: If the prop has a fallback and is bound in the
3731
+ * parent component, propagate the fallback value upwards.
3732
+ * @param {Record<string, unknown>} props_parent
3733
+ * @param {Record<string, unknown>} props_now
3734
+ */
3735
+ function bind_props(props_parent, props_now) {
3736
+ for (const key of Object.keys(props_now)) {
3737
+ const initial_value = props_parent[key];
3738
+ const value = props_now[key];
3739
+ if (initial_value === void 0 && value !== void 0 && Object.getOwnPropertyDescriptor(props_parent, key)?.set) props_parent[key] = value;
3740
+ }
3741
+ }
3742
+ /**
3743
+ * @template V
3744
+ * @param {Renderer} renderer
3745
+ * @param {Promise<V>} promise
3746
+ * @param {null | (() => void)} pending_fn
3747
+ * @param {(value: V) => void} then_fn
3748
+ * @returns {void}
3749
+ */
3750
+ function await_block(renderer, promise, pending_fn, then_fn) {
3751
+ if (is_promise(promise)) {
3752
+ renderer.push(BLOCK_OPEN);
3753
+ promise.then(null, noop);
3754
+ if (pending_fn !== null) pending_fn();
3755
+ } else if (then_fn !== null) {
3756
+ renderer.push(BLOCK_OPEN_ELSE);
3757
+ then_fn(promise);
3758
+ }
3759
+ }
3760
+ /** @param {any} array_like_or_iterator */
3761
+ function ensure_array_like(array_like_or_iterator) {
3762
+ if (array_like_or_iterator) return array_like_or_iterator.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator);
3763
+ return [];
3764
+ }
3765
+ /**
3766
+ * @template V
3767
+ * @param {() => V} get_value
3768
+ */
3769
+ function once(get_value) {
3770
+ let value = UNINITIALIZED;
3771
+ return () => {
3772
+ if (value === UNINITIALIZED) value = get_value();
3773
+ return value;
3774
+ };
3775
+ }
3776
+ /**
3777
+ * Create an unique ID
3778
+ * @param {Renderer} renderer
3779
+ * @returns {string}
3780
+ */
3781
+ function props_id(renderer) {
3782
+ const uid = renderer.global.uid();
3783
+ renderer.push("<!--$" + uid + "-->");
3784
+ return uid;
3785
+ }
3786
+ /**
3787
+ * @template T
3788
+ * @param {()=>T} fn
3789
+ * @returns {(new_value?: T) => (T | void)}
3790
+ */
3791
+ function derived(fn) {
3792
+ const get_value = ssr_context === null ? fn : once(fn);
3793
+ /** @type {T | undefined} */
3794
+ let updated_value;
3795
+ return function(new_value) {
3796
+ if (arguments.length === 0) return updated_value ?? get_value();
3797
+ updated_value = new_value;
3798
+ return updated_value;
3799
+ };
3800
+ }
3801
+
3802
+ export { pop$1 as $, queue_micro_task as A, invoke_error_boundary as B, current_batch as C, pause_effect as D, move_effect as E, defer_effect as F, set_component_context as G, HYDRATION_ERROR as H, Batch as I, component_context as J, internal_set as K, LEGACY_PROPS as L, destroy_effect as M, next as N, skip_nodes as O, derived as P, effect_tracking as Q, render_effect as R, svelte_boundary_reset_noop as S, svelte_boundary_reset_onerror as T, source as U, untrack as V, increment as W, hydrate_next as X, push$1 as Y, mark_as_component as Z, hydration_mismatch as _, get_first_child as a, run as a0, noop as a1, hasContext as a2, getContext as a3, getAllContexts as a4, createContext as a5, ssr_context as a6, lifecycle_function_unavailable as a7, EFFECT_TRANSPARENT as a8, EFFECT_PRESERVED as a9, experimental_async_required as aa, get_render_context as ab, hydratable_serialization_failed as ac, writable as ad, readable as ae, attributes as af, escape_html as ag, clsx as ah, attr as ai, props_id as aj, attr_class as ak, bind_props as al, ensure_array_like as am, attr_style as an, stringify as ao, head as ap, element as aq, spread_props as ar, html as as, await_block as at, get_next_sibling as b, set_hydrating as c, define_property as d, set_hydrate_node as e, flushSync as f, get as g, hydration_failed as h, init_operations as i, clear_text_content as j, component_root as k, hydrate_node as l, mutable_source as m, create_text as n, array_from as o, is_passive_event as p, set_active_reaction as q, render as r, set as s, set_active_effect as t, active_reaction as u, active_effect as v, setContext as w, hydrating as x, block as y, branch as z };
3803
+ //# sourceMappingURL=server.js-BR0D07DR.js.map