konoha-mcp 2.1.3 → 2.1.5

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 (367) hide show
  1. package/.agents/skills.fingerprint +1 -1
  2. package/README.md +4 -4
  3. package/apps/web/build/adapter-node.js +11 -0
  4. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js +1 -0
  5. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.br +2 -0
  6. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.gz +0 -0
  7. package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js +1 -0
  8. package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js.br +0 -0
  9. package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js.gz +0 -0
  10. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js +1 -0
  11. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.br +1 -0
  12. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.gz +0 -0
  13. package/apps/web/build/client/_app/immutable/chunks/{Bv85lp2r.js → CBY268r4.js} +1 -1
  14. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.br +3 -0
  15. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.gz +0 -0
  16. package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js +1 -0
  17. package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js.br +4 -0
  18. package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js.gz +0 -0
  19. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js +1 -0
  20. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.br +0 -0
  21. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.gz +0 -0
  22. package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js +1 -0
  23. package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js.br +0 -0
  24. package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js.gz +0 -0
  25. package/apps/web/build/client/_app/immutable/chunks/{CP4ze5kR.js → Dzm74gVd.js} +1 -1
  26. package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.br +0 -0
  27. package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.gz +0 -0
  28. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js +2 -0
  29. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.br +0 -0
  30. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.gz +0 -0
  31. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js +3 -0
  32. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.br +0 -0
  33. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.gz +0 -0
  34. package/apps/web/build/client/_app/immutable/chunks/{tFx9Vkzn.js → fbrtLByB.js} +1 -1
  35. package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.br +0 -0
  36. package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.gz +0 -0
  37. package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js +2 -0
  38. package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js.br +0 -0
  39. package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js.gz +0 -0
  40. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js +2 -0
  41. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.br +0 -0
  42. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.gz +0 -0
  43. package/apps/web/build/client/_app/immutable/nodes/{0.BV_U6rd9.js → 0.5uSjyTy0.js} +1 -1
  44. package/apps/web/build/client/_app/immutable/nodes/0.5uSjyTy0.js.br +0 -0
  45. package/apps/web/build/client/_app/immutable/nodes/0.5uSjyTy0.js.gz +0 -0
  46. package/apps/web/build/client/_app/immutable/nodes/{1.317ei_PM.js → 1.BZu6jsAH.js} +1 -1
  47. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.br +0 -0
  48. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.gz +0 -0
  49. package/apps/web/build/client/_app/immutable/nodes/{10.C9BHUF6_.js → 10.CZKScTFN.js} +1 -1
  50. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.br +0 -0
  51. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.gz +0 -0
  52. package/apps/web/build/client/_app/immutable/nodes/{11._7rmywnA.js → 11.DFglFW_i.js} +1 -1
  53. package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.br +0 -0
  54. package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.gz +0 -0
  55. package/apps/web/build/client/_app/immutable/nodes/{12.B_UJh_Cw.js → 12.CSShcv5z.js} +1 -1
  56. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.br +0 -0
  57. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.gz +0 -0
  58. package/apps/web/build/client/_app/immutable/nodes/{13.FtUj7AO8.js → 13.jWUWoBcs.js} +1 -1
  59. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.br +0 -0
  60. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.gz +0 -0
  61. package/apps/web/build/client/_app/immutable/nodes/{14.CsMWcbH2.js → 14.H-jSqqen.js} +1 -1
  62. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.br +0 -0
  63. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.gz +0 -0
  64. package/apps/web/build/client/_app/immutable/nodes/{15.DbSoDlZF.js → 15.CpAoyhzV.js} +1 -1
  65. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.br +0 -0
  66. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.gz +0 -0
  67. package/apps/web/build/client/_app/immutable/nodes/{16.BcMZYQJR.js → 16.DT_-MxCT.js} +1 -1
  68. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.br +0 -0
  69. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.gz +0 -0
  70. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js +1 -0
  71. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.br +0 -0
  72. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.gz +0 -0
  73. package/apps/web/build/client/_app/immutable/nodes/{3.Co5hy99T.js → 3.Cgc-xN3x.js} +1 -1
  74. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.br +0 -0
  75. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.gz +0 -0
  76. package/apps/web/build/client/_app/immutable/nodes/{4.Ckjmv74-.js → 4.CYJQ4bWz.js} +1 -1
  77. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.br +0 -0
  78. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.gz +0 -0
  79. package/apps/web/build/client/_app/immutable/nodes/{5.jG4rh5-7.js → 5.DbHL-3Es.js} +1 -1
  80. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.br +0 -0
  81. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.gz +0 -0
  82. package/apps/web/build/client/_app/immutable/nodes/{6.am-4Bf0e.js → 6.BvWH2qas.js} +1 -1
  83. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.br +0 -0
  84. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.gz +0 -0
  85. package/apps/web/build/client/_app/immutable/nodes/{7.DpWtqqaL.js → 7.CmbiPMU3.js} +1 -1
  86. package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.br +0 -0
  87. package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.gz +0 -0
  88. package/apps/web/build/client/_app/immutable/nodes/{8.CbbKDJTU.js → 8.B9897Zm9.js} +1 -1
  89. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.br +0 -0
  90. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.gz +0 -0
  91. package/apps/web/build/client/_app/immutable/nodes/{9.CB21-Q9D.js → 9.CGMmeMVC.js} +2 -2
  92. package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.br +0 -0
  93. package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.gz +0 -0
  94. package/apps/web/build/client/_app/version.json +1 -1
  95. package/apps/web/build/client/_app/version.json.br +0 -0
  96. package/apps/web/build/client/_app/version.json.gz +0 -0
  97. package/apps/web/build/handler.js +1 -2
  98. package/apps/web/build/index.js +1 -74
  99. package/apps/web/build/server/.vite/manifest.json +419 -0
  100. package/apps/web/build/server/_app/immutable/assets/_layout.CsjxL1aa.css +2 -0
  101. package/apps/web/build/server/adapter-env.js +2 -0
  102. package/apps/web/build/server/adapter-index.js +74 -0
  103. package/apps/web/build/server/adapter-index.js.map +1 -0
  104. package/apps/web/build/server/{chunks/env-RhfAqpCd.js → adapter-node-env.js} +28 -7
  105. package/apps/web/build/server/adapter-node-env.js.map +1 -0
  106. package/apps/web/build/server/adapter-node-handler.js +584 -0
  107. package/apps/web/build/server/adapter-node-handler.js.map +1 -0
  108. package/apps/web/build/server/chunks/api.js +81 -0
  109. package/apps/web/build/server/chunks/api.js.map +1 -0
  110. package/apps/web/build/server/chunks/{env-DU2WieJy.js → config.js} +2 -2
  111. package/apps/web/build/server/chunks/config.js.map +1 -0
  112. package/apps/web/build/server/chunks/exports.js +625 -0
  113. package/apps/web/build/server/chunks/exports.js.map +1 -0
  114. package/apps/web/build/server/chunks/functions.js +30 -0
  115. package/apps/web/build/server/chunks/functions.js.map +1 -0
  116. package/apps/web/build/server/chunks/index-server.js +2 -0
  117. package/apps/web/build/server/chunks/instance.js +3600 -0
  118. package/apps/web/build/server/chunks/instance.js.map +1 -0
  119. package/apps/web/build/server/chunks/internal.js +2849 -0
  120. package/apps/web/build/server/chunks/internal.js.map +1 -0
  121. package/apps/web/build/server/chunks/scrollLock.svelte.js +7 -0
  122. package/apps/web/build/server/chunks/scrollLock.svelte.js.map +1 -0
  123. package/apps/web/build/server/chunks/server-errors.js +489 -0
  124. package/apps/web/build/server/chunks/server-errors.js.map +1 -0
  125. package/apps/web/build/server/chunks/server.js +9 -0
  126. package/apps/web/build/server/chunks/server.js.map +1 -0
  127. package/apps/web/build/server/chunks/{server2-xUKEUzWG.js → server2.js} +140 -718
  128. package/apps/web/build/server/chunks/server2.js.map +1 -0
  129. package/apps/web/build/server/chunks/shared.js +84 -0
  130. package/apps/web/build/server/chunks/shared.js.map +1 -0
  131. package/apps/web/build/server/chunks/{state-C6VH2NAw.js → state.js} +5 -4
  132. package/apps/web/build/server/chunks/state.js.map +1 -0
  133. package/apps/web/build/server/chunks/{sweetAlert.svelte-BKTpmvHp.js → sweetAlert.svelte.js} +3 -3
  134. package/apps/web/build/server/chunks/sweetAlert.svelte.js.map +1 -0
  135. package/apps/web/build/server/chunks/{uiState.svelte-NgyZk5Jz.js → uiState.svelte.js} +3 -3
  136. package/apps/web/build/server/chunks/uiState.svelte.js.map +1 -0
  137. package/apps/web/build/server/chunks/uneval.js +645 -0
  138. package/apps/web/build/server/chunks/uneval.js.map +1 -0
  139. package/apps/web/build/server/entries/fallbacks/error.svelte.js +12 -0
  140. package/apps/web/build/server/entries/fallbacks/error.svelte.js.map +1 -0
  141. package/apps/web/build/server/entries/hooks.server.js +8 -0
  142. package/apps/web/build/server/entries/hooks.server.js.map +1 -0
  143. package/apps/web/build/server/entries/pages/_layout.js +7 -0
  144. package/apps/web/build/server/entries/pages/_layout.js.map +1 -0
  145. package/apps/web/build/server/{chunks/_layout.svelte-FKDEmK4m.js → entries/pages/_layout.svelte.js} +15 -8
  146. package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -0
  147. package/apps/web/build/server/entries/pages/_page.js +9 -0
  148. package/apps/web/build/server/entries/pages/_page.js.map +1 -0
  149. package/apps/web/build/server/entries/pages/_page.svelte.js +7 -0
  150. package/apps/web/build/server/entries/pages/_page.svelte.js.map +1 -0
  151. package/apps/web/build/server/{chunks/_page.svelte-K0WRgefN.js → entries/pages/agents/_page.svelte.js} +8 -5
  152. package/apps/web/build/server/entries/pages/agents/_page.svelte.js.map +1 -0
  153. package/apps/web/build/server/{chunks/_page.svelte-BKU-UjQ2.js → entries/pages/bridges/_page.svelte.js} +9 -6
  154. package/apps/web/build/server/entries/pages/bridges/_page.svelte.js.map +1 -0
  155. package/apps/web/build/server/{chunks/_page.svelte-DBQMj6O8.js → entries/pages/clients/_page.svelte.js} +8 -5
  156. package/apps/web/build/server/entries/pages/clients/_page.svelte.js.map +1 -0
  157. package/apps/web/build/server/{chunks/_page.svelte-BQP0Z2mg.js → entries/pages/context/_page.svelte.js} +9 -6
  158. package/apps/web/build/server/entries/pages/context/_page.svelte.js.map +1 -0
  159. package/apps/web/build/server/{chunks/_page.svelte-D_bQaPtJ.js → entries/pages/dashboard/_page.svelte.js} +7 -4
  160. package/apps/web/build/server/entries/pages/dashboard/_page.svelte.js.map +1 -0
  161. package/apps/web/build/server/{chunks/_page.svelte-CxxsZeRm.js → entries/pages/detector/_page.svelte.js} +5 -3
  162. package/apps/web/build/server/entries/pages/detector/_page.svelte.js.map +1 -0
  163. package/apps/web/build/server/{chunks/_page.svelte-DJp9fAk8.js → entries/pages/docs/_page.svelte.js} +8 -5
  164. package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -0
  165. package/apps/web/build/server/{chunks/_page.svelte-DFBbcBLc.js → entries/pages/doctor/_page.svelte.js} +8 -5
  166. package/apps/web/build/server/entries/pages/doctor/_page.svelte.js.map +1 -0
  167. package/apps/web/build/server/{chunks/_page.svelte-yXv2Aj6-.js → entries/pages/persona/_page.svelte.js} +9 -6
  168. package/apps/web/build/server/entries/pages/persona/_page.svelte.js.map +1 -0
  169. package/apps/web/build/server/{chunks/_page.svelte-CvH3pIDb.js → entries/pages/savings/_page.svelte.js} +7 -4
  170. package/apps/web/build/server/entries/pages/savings/_page.svelte.js.map +1 -0
  171. package/apps/web/build/server/{chunks/_page.svelte-FUbd8bWv.js → entries/pages/search/_page.svelte.js} +9 -6
  172. package/apps/web/build/server/entries/pages/search/_page.svelte.js.map +1 -0
  173. package/apps/web/build/server/{chunks/_page.svelte-Bu5RfcD4.js → entries/pages/semble/_page.svelte.js} +8 -5
  174. package/apps/web/build/server/entries/pages/semble/_page.svelte.js.map +1 -0
  175. package/apps/web/build/server/{chunks/_page.svelte-B4DKG2sO.js → entries/pages/skills/_page.svelte.js} +10 -7
  176. package/apps/web/build/server/entries/pages/skills/_page.svelte.js.map +1 -0
  177. package/apps/web/build/server/{chunks/_page.svelte-D1yHfBBh.js → entries/pages/tasks/_page.svelte.js} +8 -83
  178. package/apps/web/build/server/entries/pages/tasks/_page.svelte.js.map +1 -0
  179. package/apps/web/build/{env.js → server/env.js} +1 -1
  180. package/apps/web/build/server/handler.js +2 -0
  181. package/apps/web/build/server/index.js +68 -0
  182. package/apps/web/build/server/index.js.map +1 -0
  183. package/apps/web/build/server/manifest-full.js +149 -0
  184. package/apps/web/build/server/manifest.js +149 -0
  185. package/apps/web/build/server/nodes/0.js +10 -0
  186. package/apps/web/build/server/nodes/1.js +8 -0
  187. package/apps/web/build/server/nodes/10.js +8 -0
  188. package/apps/web/build/server/nodes/11.js +8 -0
  189. package/apps/web/build/server/nodes/12.js +8 -0
  190. package/apps/web/build/server/nodes/13.js +8 -0
  191. package/apps/web/build/server/nodes/14.js +8 -0
  192. package/apps/web/build/server/nodes/15.js +8 -0
  193. package/apps/web/build/server/nodes/16.js +8 -0
  194. package/apps/web/build/server/nodes/2.js +10 -0
  195. package/apps/web/build/server/nodes/3.js +8 -0
  196. package/apps/web/build/server/nodes/4.js +8 -0
  197. package/apps/web/build/server/nodes/5.js +8 -0
  198. package/apps/web/build/server/nodes/6.js +8 -0
  199. package/apps/web/build/server/nodes/7.js +8 -0
  200. package/apps/web/build/server/nodes/8.js +8 -0
  201. package/apps/web/build/server/nodes/9.js +8 -0
  202. package/apps/web/build/server/remote-entry.js +1565 -0
  203. package/apps/web/build/server/remote-entry.js.map +1 -0
  204. package/apps/web/build/server/server.js +151 -0
  205. package/apps/web/package.json +10 -9
  206. package/bin/cli.js +6 -6
  207. package/bin/lib/ui_commands.js +4 -3
  208. package/docs/SecurityCompliance/qa_report_2.1.5_2026-10-07.md +65 -0
  209. package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.4_2026-10-06.md +77 -0
  210. package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.5_2026-10-07.md +74 -0
  211. package/docs/SecurityCompliance/socket_baseline_2026-10-07.md +60 -0
  212. package/docs/SecurityCompliance/socket_burndown_2.1.5_2026-10-07.md +73 -0
  213. package/docs/SecurityCompliance/socket_report_2.1.5_2026-10-07.md +54 -0
  214. package/docs/architecture/TOKEN-BASELINE.md +1 -1
  215. package/package.json +6 -18
  216. package/src/antigravity_manager.js +81 -15
  217. package/src/db.js +2 -2
  218. package/src/db_agents.js +1 -1
  219. package/src/db_bridges.js +1 -1
  220. package/src/db_savings.js +1 -1
  221. package/src/db_stats.js +1 -1
  222. package/src/deploy_utils.js +4 -5
  223. package/src/doctor.js +10 -0
  224. package/src/migrate.js +1 -1
  225. package/src/persona_memory.js +1 -1
  226. package/src/sqlite_driver.js +211 -0
  227. package/src/vector_search.js +1 -1
  228. package/apps/web/build/adapter-env.js +0 -2
  229. package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js +0 -3
  230. package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js.br +0 -0
  231. package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js.gz +0 -0
  232. package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js +0 -1
  233. package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js.br +0 -1
  234. package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js.gz +0 -0
  235. package/apps/web/build/client/_app/immutable/chunks/Bv85lp2r.js.br +0 -3
  236. package/apps/web/build/client/_app/immutable/chunks/Bv85lp2r.js.gz +0 -0
  237. package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js +0 -2
  238. package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js.br +0 -0
  239. package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js.gz +0 -0
  240. package/apps/web/build/client/_app/immutable/chunks/CP4ze5kR.js.br +0 -0
  241. package/apps/web/build/client/_app/immutable/chunks/CP4ze5kR.js.gz +0 -0
  242. package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js +0 -1
  243. package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js.br +0 -0
  244. package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js.gz +0 -0
  245. package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js +0 -1
  246. package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js.br +0 -2
  247. package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js.gz +0 -0
  248. package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js +0 -1
  249. package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js.br +0 -0
  250. package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js.gz +0 -0
  251. package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js +0 -1
  252. package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js.br +0 -0
  253. package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js.gz +0 -0
  254. package/apps/web/build/client/_app/immutable/chunks/tFx9Vkzn.js.br +0 -0
  255. package/apps/web/build/client/_app/immutable/chunks/tFx9Vkzn.js.gz +0 -0
  256. package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js +0 -2
  257. package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js.br +0 -0
  258. package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js.gz +0 -0
  259. package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js +0 -2
  260. package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js.br +0 -2
  261. package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js.gz +0 -0
  262. package/apps/web/build/client/_app/immutable/nodes/0.BV_U6rd9.js.br +0 -0
  263. package/apps/web/build/client/_app/immutable/nodes/0.BV_U6rd9.js.gz +0 -0
  264. package/apps/web/build/client/_app/immutable/nodes/1.317ei_PM.js.br +0 -1
  265. package/apps/web/build/client/_app/immutable/nodes/1.317ei_PM.js.gz +0 -0
  266. package/apps/web/build/client/_app/immutable/nodes/10.C9BHUF6_.js.br +0 -0
  267. package/apps/web/build/client/_app/immutable/nodes/10.C9BHUF6_.js.gz +0 -0
  268. package/apps/web/build/client/_app/immutable/nodes/11._7rmywnA.js.br +0 -0
  269. package/apps/web/build/client/_app/immutable/nodes/11._7rmywnA.js.gz +0 -0
  270. package/apps/web/build/client/_app/immutable/nodes/12.B_UJh_Cw.js.br +0 -0
  271. package/apps/web/build/client/_app/immutable/nodes/12.B_UJh_Cw.js.gz +0 -0
  272. package/apps/web/build/client/_app/immutable/nodes/13.FtUj7AO8.js.br +0 -0
  273. package/apps/web/build/client/_app/immutable/nodes/13.FtUj7AO8.js.gz +0 -0
  274. package/apps/web/build/client/_app/immutable/nodes/14.CsMWcbH2.js.br +0 -0
  275. package/apps/web/build/client/_app/immutable/nodes/14.CsMWcbH2.js.gz +0 -0
  276. package/apps/web/build/client/_app/immutable/nodes/15.DbSoDlZF.js.br +0 -0
  277. package/apps/web/build/client/_app/immutable/nodes/15.DbSoDlZF.js.gz +0 -0
  278. package/apps/web/build/client/_app/immutable/nodes/16.BcMZYQJR.js.br +0 -0
  279. package/apps/web/build/client/_app/immutable/nodes/16.BcMZYQJR.js.gz +0 -0
  280. package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js +0 -1
  281. package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js.br +0 -0
  282. package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js.gz +0 -0
  283. package/apps/web/build/client/_app/immutable/nodes/3.Co5hy99T.js.br +0 -0
  284. package/apps/web/build/client/_app/immutable/nodes/3.Co5hy99T.js.gz +0 -0
  285. package/apps/web/build/client/_app/immutable/nodes/4.Ckjmv74-.js.br +0 -0
  286. package/apps/web/build/client/_app/immutable/nodes/4.Ckjmv74-.js.gz +0 -0
  287. package/apps/web/build/client/_app/immutable/nodes/5.jG4rh5-7.js.br +0 -0
  288. package/apps/web/build/client/_app/immutable/nodes/5.jG4rh5-7.js.gz +0 -0
  289. package/apps/web/build/client/_app/immutable/nodes/6.am-4Bf0e.js.br +0 -0
  290. package/apps/web/build/client/_app/immutable/nodes/6.am-4Bf0e.js.gz +0 -0
  291. package/apps/web/build/client/_app/immutable/nodes/7.DpWtqqaL.js.br +0 -0
  292. package/apps/web/build/client/_app/immutable/nodes/7.DpWtqqaL.js.gz +0 -0
  293. package/apps/web/build/client/_app/immutable/nodes/8.CbbKDJTU.js.br +0 -0
  294. package/apps/web/build/client/_app/immutable/nodes/8.CbbKDJTU.js.gz +0 -0
  295. package/apps/web/build/client/_app/immutable/nodes/9.CB21-Q9D.js.br +0 -0
  296. package/apps/web/build/client/_app/immutable/nodes/9.CB21-Q9D.js.gz +0 -0
  297. package/apps/web/build/dir.js +0 -8
  298. package/apps/web/build/dir.js.map +0 -1
  299. package/apps/web/build/index.js.map +0 -1
  300. package/apps/web/build/server/chunks/0-D09zEpvl.js +0 -31
  301. package/apps/web/build/server/chunks/0-D09zEpvl.js.map +0 -1
  302. package/apps/web/build/server/chunks/1-2My56RES.js +0 -17
  303. package/apps/web/build/server/chunks/1-2My56RES.js.map +0 -1
  304. package/apps/web/build/server/chunks/10-M1HtRrZp.js +0 -17
  305. package/apps/web/build/server/chunks/10-M1HtRrZp.js.map +0 -1
  306. package/apps/web/build/server/chunks/11-BDyQuE2U.js +0 -18
  307. package/apps/web/build/server/chunks/11-BDyQuE2U.js.map +0 -1
  308. package/apps/web/build/server/chunks/12-DR3YohxS.js +0 -16
  309. package/apps/web/build/server/chunks/12-DR3YohxS.js.map +0 -1
  310. package/apps/web/build/server/chunks/13-BJri0QNV.js +0 -18
  311. package/apps/web/build/server/chunks/13-BJri0QNV.js.map +0 -1
  312. package/apps/web/build/server/chunks/14-DJhiE2DY.js +0 -17
  313. package/apps/web/build/server/chunks/14-DJhiE2DY.js.map +0 -1
  314. package/apps/web/build/server/chunks/15-CJUlxcu3.js +0 -19
  315. package/apps/web/build/server/chunks/15-CJUlxcu3.js.map +0 -1
  316. package/apps/web/build/server/chunks/16-BCncPEHV.js +0 -17
  317. package/apps/web/build/server/chunks/16-BCncPEHV.js.map +0 -1
  318. package/apps/web/build/server/chunks/2-B_JPNlak.js +0 -26
  319. package/apps/web/build/server/chunks/2-B_JPNlak.js.map +0 -1
  320. package/apps/web/build/server/chunks/3-BSOfGnYr.js +0 -17
  321. package/apps/web/build/server/chunks/3-BSOfGnYr.js.map +0 -1
  322. package/apps/web/build/server/chunks/4-DUmAi2o6.js +0 -18
  323. package/apps/web/build/server/chunks/4-DUmAi2o6.js.map +0 -1
  324. package/apps/web/build/server/chunks/5-DSM_rY93.js +0 -17
  325. package/apps/web/build/server/chunks/5-DSM_rY93.js.map +0 -1
  326. package/apps/web/build/server/chunks/6-CquXfuY3.js +0 -18
  327. package/apps/web/build/server/chunks/6-CquXfuY3.js.map +0 -1
  328. package/apps/web/build/server/chunks/7-CBNvUHPu.js +0 -16
  329. package/apps/web/build/server/chunks/7-CBNvUHPu.js.map +0 -1
  330. package/apps/web/build/server/chunks/8-BlIFjRiQ.js +0 -16
  331. package/apps/web/build/server/chunks/8-BlIFjRiQ.js.map +0 -1
  332. package/apps/web/build/server/chunks/9-sa0-Zgfq.js +0 -16
  333. package/apps/web/build/server/chunks/9-sa0-Zgfq.js.map +0 -1
  334. package/apps/web/build/server/chunks/_layout.svelte-FKDEmK4m.js.map +0 -1
  335. package/apps/web/build/server/chunks/_page.svelte-B4DKG2sO.js.map +0 -1
  336. package/apps/web/build/server/chunks/_page.svelte-BKU-UjQ2.js.map +0 -1
  337. package/apps/web/build/server/chunks/_page.svelte-BQP0Z2mg.js.map +0 -1
  338. package/apps/web/build/server/chunks/_page.svelte-Bu5RfcD4.js.map +0 -1
  339. package/apps/web/build/server/chunks/_page.svelte-CvH3pIDb.js.map +0 -1
  340. package/apps/web/build/server/chunks/_page.svelte-CxxsZeRm.js.map +0 -1
  341. package/apps/web/build/server/chunks/_page.svelte-D1yHfBBh.js.map +0 -1
  342. package/apps/web/build/server/chunks/_page.svelte-DBQMj6O8.js.map +0 -1
  343. package/apps/web/build/server/chunks/_page.svelte-DFBbcBLc.js.map +0 -1
  344. package/apps/web/build/server/chunks/_page.svelte-DJp9fAk8.js.map +0 -1
  345. package/apps/web/build/server/chunks/_page.svelte-D_bQaPtJ.js.map +0 -1
  346. package/apps/web/build/server/chunks/_page.svelte-FUbd8bWv.js.map +0 -1
  347. package/apps/web/build/server/chunks/_page.svelte-K0WRgefN.js.map +0 -1
  348. package/apps/web/build/server/chunks/_page.svelte-LJxJVjMb.js +0 -7
  349. package/apps/web/build/server/chunks/_page.svelte-LJxJVjMb.js.map +0 -1
  350. package/apps/web/build/server/chunks/_page.svelte-yXv2Aj6-.js.map +0 -1
  351. package/apps/web/build/server/chunks/env-DU2WieJy.js.map +0 -1
  352. package/apps/web/build/server/chunks/env-RhfAqpCd.js.map +0 -1
  353. package/apps/web/build/server/chunks/error.svelte-CNqmrJIT.js +0 -12
  354. package/apps/web/build/server/chunks/error.svelte-CNqmrJIT.js.map +0 -1
  355. package/apps/web/build/server/chunks/exports-DzZ-4-Dy.js +0 -327
  356. package/apps/web/build/server/chunks/exports-DzZ-4-Dy.js.map +0 -1
  357. package/apps/web/build/server/chunks/handler-CNvIc1cp.js +0 -7301
  358. package/apps/web/build/server/chunks/handler-CNvIc1cp.js.map +0 -1
  359. package/apps/web/build/server/chunks/hooks.server-DqbY7q70.js +0 -8
  360. package/apps/web/build/server/chunks/hooks.server-DqbY7q70.js.map +0 -1
  361. package/apps/web/build/server/chunks/index-server-ULRIL6sb.js +0 -2
  362. package/apps/web/build/server/chunks/rolldown-runtime-D7D4PA-g.js +0 -13
  363. package/apps/web/build/server/chunks/scrollLock.svelte-ULRIL6sb.js +0 -2
  364. package/apps/web/build/server/chunks/server2-xUKEUzWG.js.map +0 -1
  365. package/apps/web/build/server/chunks/state-C6VH2NAw.js.map +0 -1
  366. package/apps/web/build/server/chunks/sweetAlert.svelte-BKTpmvHp.js.map +0 -1
  367. package/apps/web/build/server/chunks/uiState.svelte-NgyZk5Jz.js.map +0 -1
@@ -0,0 +1,584 @@
1
+ import { a as SvelteKitError } from "./chunks/shared.js";
2
+ import { n as noop } from "./chunks/functions.js";
3
+ import { t as env } from "./adapter-node-env.js";
4
+ import fs, { createReadStream } from "node:fs";
5
+ import process from "node:process";
6
+ import { Readable, pipeline } from "node:stream";
7
+ import { app_path, assets, base, dir, env_prefix, mime_types, origin, prerendered_assets, server } from "../adapter-node.js";
8
+ import { format } from "node:url";
9
+ import path from "node:path";
10
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/exports/node/index.js
11
+ /** @type {WeakMap<import('http').IncomingMessage, (chunk: Buffer) => void>} */
12
+ var body_data_listeners = /* @__PURE__ */ new WeakMap();
13
+ /**
14
+ * @param {import('http').IncomingMessage} req
15
+ * @param {number} [body_size_limit]
16
+ */
17
+ function get_raw_body(req, body_size_limit) {
18
+ const h = req.headers;
19
+ const content_length = Number(h["content-length"]);
20
+ const has_content_length = Number.isFinite(content_length);
21
+ if (req.httpVersionMajor === 1 && !has_content_length && h["transfer-encoding"] == null || content_length === 0) return null;
22
+ if (req.destroyed) {
23
+ const readable = new ReadableStream();
24
+ readable.cancel();
25
+ return readable;
26
+ }
27
+ let size = 0;
28
+ let cancelled = false;
29
+ return new ReadableStream({
30
+ start(controller) {
31
+ if (body_size_limit !== void 0 && has_content_length && content_length > body_size_limit) {
32
+ const error = new SvelteKitError(413, "Payload Too Large", `Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`);
33
+ controller.error(error);
34
+ return;
35
+ }
36
+ /** @param {Error} error */
37
+ const on_error = (error) => {
38
+ cancelled = true;
39
+ controller.error(error);
40
+ };
41
+ const on_end = () => {
42
+ if (cancelled) return;
43
+ controller.close();
44
+ };
45
+ /** @param {Buffer} chunk */
46
+ const on_data = (chunk) => {
47
+ if (cancelled) return;
48
+ size += chunk.length;
49
+ if (body_size_limit !== void 0 && size > body_size_limit) {
50
+ cancelled = true;
51
+ const message = `request body size exceeded BODY_SIZE_LIMIT of ${body_size_limit}`;
52
+ const error = new SvelteKitError(413, "Payload Too Large", message);
53
+ controller.error(error);
54
+ return;
55
+ }
56
+ if (has_content_length && size > content_length) {
57
+ cancelled = true;
58
+ const message = `request body size exceeded content-length of ${content_length}`;
59
+ const error = new SvelteKitError(413, "Payload Too Large", message);
60
+ controller.error(error);
61
+ return;
62
+ }
63
+ controller.enqueue(chunk);
64
+ if (controller.desiredSize === null || controller.desiredSize <= 0) req.pause();
65
+ };
66
+ req.on("error", on_error);
67
+ req.on("end", on_end);
68
+ req.on("data", on_data);
69
+ body_data_listeners.set(req, on_data);
70
+ },
71
+ pull() {
72
+ req.resume();
73
+ },
74
+ cancel(reason) {
75
+ cancelled = true;
76
+ req.destroy(reason);
77
+ }
78
+ });
79
+ }
80
+ /**
81
+ * @param {{
82
+ * request: import('http').IncomingMessage;
83
+ * response?: import('http').ServerResponse;
84
+ * base: string;
85
+ * bodySizeLimit?: number;
86
+ * }} options
87
+ * @returns {Request}
88
+ */
89
+ function getRequest({ request, response, base, bodySizeLimit }) {
90
+ let headers = request.headers;
91
+ if (request.httpVersionMajor >= 2) {
92
+ headers = Object.assign({}, headers);
93
+ if (headers[":authority"]) headers.host = headers[":authority"];
94
+ delete headers[":authority"];
95
+ delete headers[":method"];
96
+ delete headers[":path"];
97
+ delete headers[":scheme"];
98
+ }
99
+ const controller = new AbortController();
100
+ request.once("close", () => {
101
+ if (request.readableAborted) controller.abort();
102
+ });
103
+ response?.once("close", () => {
104
+ if (!response.writableEnded) controller.abort();
105
+ });
106
+ return new Request(base + request.url, {
107
+ duplex: "half",
108
+ method: request.method,
109
+ headers: Object.entries(headers),
110
+ signal: controller.signal,
111
+ body: request.method === "GET" || request.method === "HEAD" ? void 0 : get_raw_body(request, bodySizeLimit)
112
+ });
113
+ }
114
+ /**
115
+ * Drains any unconsumed request body once the response has been sent. When a
116
+ * route doesn't read the request body (for example a page route receiving a
117
+ * POST), the unread bytes remain buffered in the socket. On keep-alive
118
+ * connections Node's HTTP parser then reads those leftover bytes as the next
119
+ * request, fails to parse them, and resets the connection — losing any
120
+ * pipelined request. Resuming the request discards the bytes so the connection
121
+ * stays usable.
122
+ *
123
+ * Because `get_raw_body` attaches a `data` listener, Node marks the request as
124
+ * being consumed (`req._consuming`) and skips its own automatic drain, so we
125
+ * have to do it ourselves. The whole remaining body is read and discarded; this
126
+ * is the intended trade-off (keeping the connection reusable) over destroying it.
127
+ * @see https://github.com/sveltejs/kit/issues/14916
128
+ * @see https://github.com/sveltejs/kit/issues/15526
129
+ * @param {import('http').ServerResponse} res
130
+ */
131
+ function drain_request(res) {
132
+ const req = res.req;
133
+ if (!req || req.readableEnded || req.destroyed) return;
134
+ const on_data = body_data_listeners.get(req);
135
+ if (on_data) {
136
+ req.removeListener("data", on_data);
137
+ body_data_listeners.delete(req);
138
+ }
139
+ req.resume();
140
+ }
141
+ /**
142
+ * @param {import('http').ServerResponse} res
143
+ * @param {Response} response
144
+ * @returns {void}
145
+ */
146
+ function setResponse(res, response) {
147
+ res.once("finish", () => drain_request(res));
148
+ res.once("close", () => drain_request(res));
149
+ for (const [key, value] of response.headers) try {
150
+ res.setHeader(key, key === "set-cookie" ? response.headers.getSetCookie() : value);
151
+ } catch (error) {
152
+ res.getHeaderNames().forEach((name) => res.removeHeader(name));
153
+ res.writeHead(500).end(String(error));
154
+ return;
155
+ }
156
+ if (!response.body) {
157
+ res.writeHead(response.status);
158
+ res.end();
159
+ return;
160
+ }
161
+ if (response.body.locked) {
162
+ res.writeHead(response.status);
163
+ res.end("Fatal error: Response body is locked. This can happen when the response was already read (for example through 'response.json()' or 'response.text()').");
164
+ return;
165
+ }
166
+ const reader = response.body.getReader();
167
+ if (res.destroyed) {
168
+ reader.cancel();
169
+ return;
170
+ }
171
+ const cancel = (error) => {
172
+ res.off("close", cancel);
173
+ res.off("error", cancel);
174
+ reader.cancel(error).catch(noop);
175
+ if (error) res.destroy(error);
176
+ };
177
+ res.on("close", cancel);
178
+ res.on("error", cancel);
179
+ /** @type {Uint8Array<ArrayBuffer>[]} */
180
+ const buffered = [];
181
+ /** @type {ReturnType<typeof reader.read> | null} */
182
+ let pending = null;
183
+ probe();
184
+ async function probe() {
185
+ try {
186
+ /** @type {Promise<undefined>} */
187
+ const deadline = new Promise((fulfil) => setImmediate(() => fulfil(void 0)));
188
+ while (buffered.length < 2) {
189
+ pending = reader.read();
190
+ const result = await Promise.race([pending, deadline]);
191
+ if (!result) break;
192
+ pending = null;
193
+ if (result.done) {
194
+ if (!res.hasHeader("content-length") && !res.hasHeader("transfer-encoding")) res.setHeader("content-length", buffered.reduce((total, chunk) => total + chunk.byteLength, 0));
195
+ break;
196
+ }
197
+ buffered.push(result.value);
198
+ }
199
+ if (res.destroyed) return;
200
+ res.writeHead(response.status);
201
+ await next();
202
+ } catch (error) {
203
+ if (!res.headersSent) res.writeHead(response.status);
204
+ cancel(error instanceof Error ? error : new Error(String(error)));
205
+ }
206
+ }
207
+ async function next() {
208
+ try {
209
+ for (;;) {
210
+ /** @type {Awaited<ReturnType<typeof reader.read>>} */
211
+ let result;
212
+ if (buffered.length > 0) result = {
213
+ done: false,
214
+ value: buffered.shift()
215
+ };
216
+ else if (pending) {
217
+ result = await pending;
218
+ pending = null;
219
+ } else result = await reader.read();
220
+ const { done, value } = result;
221
+ if (done) break;
222
+ if (!res.write(value)) {
223
+ res.once("drain", next);
224
+ return;
225
+ }
226
+ }
227
+ res.end();
228
+ } catch (error) {
229
+ cancel(error instanceof Error ? error : new Error(String(error)));
230
+ }
231
+ }
232
+ }
233
+ /**
234
+ * Converts a file on disk to a readable stream
235
+ * @param {string} file
236
+ * @returns {ReadableStream}
237
+ * @since 2.4.0
238
+ */
239
+ function createReadableStream(file) {
240
+ return Readable.toWeb(createReadStream(file));
241
+ }
242
+ //#endregion
243
+ //#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_426de5c69245335bd04c92378b0166a8/node_modules/@sveltejs/adapter-node/src/utils.js
244
+ /**
245
+ * Parses the given value into number of bytes.
246
+ *
247
+ * @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G).
248
+ * @returns {number}
249
+ */
250
+ function parse_as_bytes(value) {
251
+ const multiplier = {
252
+ K: 1024,
253
+ M: 1048576,
254
+ G: 1073741824
255
+ }[value[value.length - 1]?.toUpperCase()] ?? 1;
256
+ return Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier;
257
+ }
258
+ /**
259
+ * Formats the address the server is listening on.
260
+ *
261
+ * @param {string | false} path
262
+ * @param {string} host
263
+ * @param {string | false} port
264
+ * @param {import('node:net').AddressInfo | string | null} address
265
+ * @returns {string}
266
+ */
267
+ function format_listening_address(path, host, port, address) {
268
+ if (path) return path;
269
+ if (address && typeof address === "object") return format({
270
+ protocol: "http:",
271
+ hostname: address.address,
272
+ port: address.port
273
+ });
274
+ return format({
275
+ protocol: "http:",
276
+ hostname: host,
277
+ port: String(port)
278
+ });
279
+ }
280
+ //#endregion
281
+ //#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_426de5c69245335bd04c92378b0166a8/node_modules/@sveltejs/adapter-node/src/static.js
282
+ /** @import { IncomingMessage, ServerResponse } from 'node:http' */
283
+ /**
284
+ * @typedef {(req: IncomingMessage, res: ServerResponse, next: () => void | Promise<void>) => void | Promise<void>} Middleware
285
+ * @typedef {AssetEntry & { type?: string, cache_control?: string }} Asset
286
+ * @typedef {Asset | { location: string }} Entry
287
+ */
288
+ /**
289
+ * Splits `req.url` into a decoded pathname and the search string.
290
+ * Decoding follows kit's router: reserved characters such as `%2F` stay
291
+ * encoded. An undecodable pathname is returned as-is, so it misses the
292
+ * asset table and falls through to SvelteKit's 400
293
+ * @param {import('node:http').IncomingMessage} req
294
+ */
295
+ function split_url(req) {
296
+ let pathname = req.url;
297
+ let search = "";
298
+ const query_index = pathname.indexOf("?");
299
+ if (query_index !== -1) {
300
+ search = pathname.slice(query_index);
301
+ pathname = pathname.slice(0, query_index);
302
+ }
303
+ if (pathname.includes("%")) try {
304
+ pathname = pathname.split("%25").map(decodeURI).join("%25");
305
+ } catch {}
306
+ return {
307
+ pathname,
308
+ search
309
+ };
310
+ }
311
+ /**
312
+ * Relative reference from `from` to `to`, which must differ only by a trailing slash.
313
+ * Keep in sync with the copy in `packages/kit/src/utils/url.js`
314
+ * @param {string} from
315
+ * @param {string} to
316
+ * @returns {string}
317
+ */
318
+ function relative_pathname(from, to) {
319
+ const segment = to.replace(/\/$/, "").split("/").at(-1);
320
+ return from.endsWith("/") ? `../${segment}` : `./${segment}/`;
321
+ }
322
+ /**
323
+ * Parses `Accept-Encoding` and picks the preferred variant that exists
324
+ * @param {string | undefined} header
325
+ * @param {Asset} asset
326
+ * @returns {'br' | 'gz' | undefined}
327
+ */
328
+ function negotiate(header, asset) {
329
+ if (!header || !(asset.br || asset.gz)) return;
330
+ /** @type {Map<string, number>} */
331
+ const weights = /* @__PURE__ */ new Map();
332
+ for (const part of header.toLowerCase().split(",")) {
333
+ const [coding, ...params] = part.split(";");
334
+ let weight = 1;
335
+ for (const param of params) {
336
+ const [name, value] = param.split("=");
337
+ if (name.trim() === "q") weight = parseFloat(value) || 0;
338
+ }
339
+ weights.set(coding.trim(), weight);
340
+ }
341
+ /** @param {string} coding */
342
+ const weight = (coding) => weights.get(coding) ?? weights.get("*") ?? 0;
343
+ const br = asset.br ? weight("br") : 0;
344
+ if ((asset.gz ? weight("gzip") : 0) > br) return "gz";
345
+ if (br > 0) return "br";
346
+ }
347
+ /**
348
+ * Whether an `If-None-Match` value matches `etag`, using weak comparison
349
+ * @param {string | undefined} header
350
+ * @param {string} etag
351
+ */
352
+ function etag_matches(header, etag) {
353
+ if (!header) return false;
354
+ if (header.trim() === "*") return true;
355
+ return header.split(",").some((tag) => tag.trim().replace(/^W\//, "") === etag);
356
+ }
357
+ /**
358
+ * Absolute file paths and content types for one table
359
+ * @param {string} dir
360
+ * @param {AssetTable} table
361
+ * @param {Record<string, string>} mime_types
362
+ * @returns {Map<string, Asset>}
363
+ */
364
+ function resolve(dir, table, mime_types) {
365
+ /** @type {Map<string, Asset>} */
366
+ const files = /* @__PURE__ */ new Map();
367
+ for (const [key, entry] of table.entries) {
368
+ let type = mime_types[entry.file.slice(entry.file.lastIndexOf("."))];
369
+ if (type === "text/html") type += ";charset=utf-8";
370
+ files.set(key, {
371
+ ...entry,
372
+ file: path.join(dir, entry.file),
373
+ type
374
+ });
375
+ }
376
+ for (const [alias, key] of table.aliases) files.set(alias, files.get(key));
377
+ return files;
378
+ }
379
+ /**
380
+ * One lookup for every request, decided at boot: client assets (immutable below
381
+ * `app_path`), prerendered pages, and a 308 from the non-canonical trailing-slash
382
+ * form of a prerendered path to the canonical one. Client assets win a collision
383
+ * @param {{
384
+ * dir: string,
385
+ * base: string,
386
+ * app_path: string,
387
+ * mime_types: Record<string, string>,
388
+ * assets: AssetTable,
389
+ * prerendered_assets: AssetTable
390
+ * }} opts
391
+ * @returns {Map<string, Entry>}
392
+ */
393
+ function create_file_map({ dir, base, app_path, mime_types, assets, prerendered_assets }) {
394
+ /** @type {Map<string, Entry>} */
395
+ const files = resolve(`${dir}/client${base}`, assets, mime_types);
396
+ const immutable = `/${app_path}/immutable/`;
397
+ for (const [key, asset] of files) if (key.startsWith(immutable))
398
+ /** @type {Asset} */ asset.cache_control = "public,max-age=31536000,immutable";
399
+ const prerendered = resolve(`${dir}/prerendered${base}`, prerendered_assets, mime_types);
400
+ for (const [key, asset] of prerendered) if (!files.has(key)) files.set(key, asset);
401
+ for (const key of prerendered.keys()) {
402
+ const inverted = key.at(-1) === "/" ? key.slice(0, -1) : key + "/";
403
+ if (inverted && !files.has(inverted)) files.set(inverted, { location: relative_pathname(inverted, key) });
404
+ }
405
+ return files;
406
+ }
407
+ /**
408
+ * Serves the closed set of files recorded at adapt time. Everything about a
409
+ * response is decided before the first request, so a request is one map
410
+ * lookup, header negotiation and a stream
411
+ * @param {Map<string, Entry>} files
412
+ * @returns {Middleware}
413
+ */
414
+ function serve_static(files) {
415
+ return (req, res, next) => {
416
+ const { pathname, search } = split_url(req);
417
+ const asset = files.get(pathname);
418
+ if (!asset) return next();
419
+ if (req.method !== "GET" && req.method !== "HEAD") {
420
+ res.writeHead(405, { allow: "GET, HEAD" }).end();
421
+ return;
422
+ }
423
+ if ("location" in asset) {
424
+ res.writeHead(308, { location: asset.location + search }).end();
425
+ return;
426
+ }
427
+ let file = asset.file;
428
+ let size = asset.size;
429
+ let etag = `"${asset.etag}"`;
430
+ const variant = negotiate(req.headers["accept-encoding"], asset);
431
+ if (variant) {
432
+ size = asset[variant];
433
+ file += `.${variant}`;
434
+ etag = `"${asset.etag}.${variant}"`;
435
+ }
436
+ /** @type {Record<string, string | number>} */
437
+ const headers = { etag };
438
+ if (asset.br || asset.gz) headers.vary = "Accept-Encoding";
439
+ if (asset.cache_control) headers["cache-control"] = asset.cache_control;
440
+ if (etag_matches(req.headers["if-none-match"], etag)) {
441
+ res.writeHead(304, headers).end();
442
+ return;
443
+ }
444
+ headers["content-length"] = size;
445
+ headers["accept-ranges"] = "bytes";
446
+ if (asset.type) headers["content-type"] = asset.type;
447
+ if (variant) headers["content-encoding"] = variant === "gz" ? "gzip" : "br";
448
+ /** @type {{ start?: number, end?: number }} */
449
+ const range = {};
450
+ let status = 200;
451
+ const if_range = req.headers["if-range"];
452
+ if (req.headers.range && (!if_range || if_range === etag)) {
453
+ const match = /^bytes=(\d*)-(\d*)$/.exec(req.headers.range);
454
+ if (match && (match[1] || match[2])) {
455
+ let start = match[1] ? parseInt(match[1], 10) : NaN;
456
+ let end = match[2] ? parseInt(match[2], 10) : size - 1;
457
+ if (isNaN(start)) {
458
+ start = Math.max(size - end, 0);
459
+ end = size - 1;
460
+ } else end = Math.min(end, size - 1);
461
+ if (start >= size || start > end) {
462
+ res.writeHead(416, { "content-range": `bytes */${size}` }).end();
463
+ return;
464
+ }
465
+ status = 206;
466
+ headers["content-range"] = `bytes ${start}-${end}/${size}`;
467
+ headers["content-length"] = end - start + 1;
468
+ range.start = start;
469
+ range.end = end;
470
+ }
471
+ }
472
+ res.writeHead(status, headers);
473
+ if (req.method === "HEAD") {
474
+ res.end();
475
+ return;
476
+ }
477
+ pipeline(fs.createReadStream(file, range), res, () => {});
478
+ };
479
+ }
480
+ //#endregion
481
+ //#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_426de5c69245335bd04c92378b0166a8/node_modules/@sveltejs/adapter-node/src/handler.js
482
+ /** @import { IncomingHttpHeaders } from 'node:http' */
483
+ /** @import { Middleware } from './static.js' */
484
+ var xff_depth = parseInt(env("XFF_DEPTH", "1"));
485
+ var address_header = env("ADDRESS_HEADER", "").toLowerCase();
486
+ var protocol_header = env("PROTOCOL_HEADER", "").toLowerCase();
487
+ var host_header = env("HOST_HEADER", "").toLowerCase();
488
+ var port_header = env("PORT_HEADER", "").toLowerCase();
489
+ var body_size_limit = parse_as_bytes(env("BODY_SIZE_LIMIT", "512K"));
490
+ if (isNaN(body_size_limit)) throw new Error(`Invalid BODY_SIZE_LIMIT: '${env("BODY_SIZE_LIMIT")}'. Please provide a numeric value.`);
491
+ var asset_dir = `${dir}/client${base}`;
492
+ await server.init({
493
+ env: process.env,
494
+ read: (file) => createReadableStream(`${asset_dir}/${file}`)
495
+ });
496
+ /** @type {Middleware} */
497
+ var ssr = async (req, res) => {
498
+ /** @type {Request} */
499
+ let request;
500
+ let request_origin = origin;
501
+ if (!request_origin) try {
502
+ request_origin = get_origin(req.headers);
503
+ } catch (error) {
504
+ console.error(`Could not determine request origin: ${error instanceof Error ? error.message : String(error)}`);
505
+ res.statusCode = 400;
506
+ res.end("Bad Request");
507
+ return;
508
+ }
509
+ try {
510
+ request = getRequest({
511
+ base: request_origin,
512
+ request: req,
513
+ response: res,
514
+ bodySizeLimit: body_size_limit
515
+ });
516
+ } catch {
517
+ res.statusCode = 400;
518
+ res.end("Bad Request");
519
+ return;
520
+ }
521
+ const response = await server.respond(request, {
522
+ platform: { req },
523
+ getClientAddress: () => {
524
+ if (address_header) {
525
+ if (!(address_header in req.headers)) throw new Error(`Address header was specified with ${env_prefix + "ADDRESS_HEADER"}=${address_header} but is absent from request`);
526
+ const value = req.headers[address_header] || "";
527
+ if (address_header === "x-forwarded-for") {
528
+ const addresses = value.split(",");
529
+ if (xff_depth < 1) throw new Error(`${env_prefix + "XFF_DEPTH"} must be a positive integer`);
530
+ if (xff_depth > addresses.length) throw new Error(`${env_prefix + "XFF_DEPTH"} is ${xff_depth}, but only found ${addresses.length} addresses`);
531
+ return addresses[addresses.length - xff_depth].trim();
532
+ }
533
+ return value;
534
+ }
535
+ return req.connection?.remoteAddress || req.connection?.socket?.remoteAddress || req.socket?.remoteAddress || req.info?.remoteAddress;
536
+ }
537
+ });
538
+ if (response.headers.get("content-type") === "text/event-stream") response.headers.set("x-accel-buffering", "no");
539
+ setResponse(res, response);
540
+ };
541
+ /**
542
+ * @param {string} name
543
+ * @param {string | string[] | undefined} value
544
+ * @returns {string | undefined}
545
+ */
546
+ function normalise_header(name, value) {
547
+ if (!name) return void 0;
548
+ if (Array.isArray(value)) {
549
+ if (value.length === 0) return void 0;
550
+ if (value.length === 1) return value[0];
551
+ throw new Error(`Multiple values provided for ${name} header where only one expected: ${value}`);
552
+ }
553
+ return value;
554
+ }
555
+ /**
556
+ * @param {IncomingHttpHeaders} headers
557
+ * @returns {string}
558
+ */
559
+ function get_origin(headers) {
560
+ const protocol = decodeURIComponent(normalise_header(protocol_header, headers[protocol_header]) || "https");
561
+ if (protocol.includes(":")) throw new Error(`The ${protocol_header} header specified ${protocol} which is an invalid because it includes \`:\`. It should only contain the protocol scheme (e.g. \`https\`)`);
562
+ const host = normalise_header(host_header, headers[host_header]) || normalise_header("host", headers["host"]);
563
+ if (!host) {
564
+ const header_names = host_header ? `${host_header} or host headers` : "host header";
565
+ throw new Error(`Could not determine host. The request must have a value provided by the ${header_names}`);
566
+ }
567
+ const port = normalise_header(port_header, headers[port_header]);
568
+ if (port && isNaN(+port)) throw new Error(`The ${port_header} header specified ${port} which is an invalid port because it is not a number. The value should only contain the port number (e.g. 443)`);
569
+ return port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;
570
+ }
571
+ var serve = serve_static(create_file_map({
572
+ dir,
573
+ base,
574
+ app_path,
575
+ mime_types,
576
+ assets,
577
+ prerendered_assets
578
+ }));
579
+ /** @type {Middleware} */
580
+ var handler = (req, res, next) => serve(req, res, () => ssr(req, res, next));
581
+ //#endregion
582
+ export { format_listening_address as n, handler as t };
583
+
584
+ //# sourceMappingURL=adapter-node-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-node-handler.js","names":[],"sources":["../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/exports/node/index.js","../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_426de5c69245335bd04c92378b0166a8/node_modules/@sveltejs/adapter-node/src/utils.js","../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_426de5c69245335bd04c92378b0166a8/node_modules/@sveltejs/adapter-node/src/static.js","../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_426de5c69245335bd04c92378b0166a8/node_modules/@sveltejs/adapter-node/src/handler.js"],"sourcesContent":["import { createReadStream } from 'node:fs';\nimport { Readable } from 'node:stream';\nimport { SvelteKitError } from '../internal/shared.js';\nimport { noop } from '../../utils/functions.js';\n\n/** @type {WeakMap<import('http').IncomingMessage, (chunk: Buffer) => void>} */\nconst body_data_listeners = new WeakMap();\n\n/**\n * @param {import('http').IncomingMessage} req\n * @param {number} [body_size_limit]\n */\nfunction get_raw_body(req, body_size_limit) {\n\tconst h = req.headers;\n\n\tconst content_length = Number(h['content-length']);\n\tconst has_content_length = Number.isFinite(content_length);\n\n\t// check if no request body\n\tif (\n\t\t(req.httpVersionMajor === 1 && !has_content_length && h['transfer-encoding'] == null) ||\n\t\tcontent_length === 0\n\t) {\n\t\treturn null;\n\t}\n\n\tif (req.destroyed) {\n\t\tconst readable = new ReadableStream();\n\t\tvoid readable.cancel();\n\t\treturn readable;\n\t}\n\n\tlet size = 0;\n\tlet cancelled = false;\n\n\treturn new ReadableStream({\n\t\tstart(controller) {\n\t\t\tif (body_size_limit !== undefined && has_content_length && content_length > body_size_limit) {\n\t\t\t\tconst error = new SvelteKitError(\n\t\t\t\t\t413,\n\t\t\t\t\t'Payload Too Large',\n\t\t\t\t\t`Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`\n\t\t\t\t);\n\n\t\t\t\tcontroller.error(error);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/** @param {Error} error */\n\t\t\tconst on_error = (error) => {\n\t\t\t\tcancelled = true;\n\t\t\t\tcontroller.error(error);\n\t\t\t};\n\n\t\t\tconst on_end = () => {\n\t\t\t\tif (cancelled) return;\n\t\t\t\tcontroller.close();\n\t\t\t};\n\n\t\t\t/** @param {Buffer} chunk */\n\t\t\tconst on_data = (chunk) => {\n\t\t\t\tif (cancelled) return;\n\n\t\t\t\tsize += chunk.length;\n\n\t\t\t\tif (body_size_limit !== undefined && size > body_size_limit) {\n\t\t\t\t\tcancelled = true;\n\n\t\t\t\t\tconst message = `request body size exceeded BODY_SIZE_LIMIT of ${body_size_limit}`;\n\n\t\t\t\t\tconst error = new SvelteKitError(413, 'Payload Too Large', message);\n\t\t\t\t\tcontroller.error(error);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (has_content_length && size > content_length) {\n\t\t\t\t\tcancelled = true;\n\n\t\t\t\t\tconst message = `request body size exceeded content-length of ${content_length}`;\n\n\t\t\t\t\tconst error = new SvelteKitError(413, 'Payload Too Large', message);\n\t\t\t\t\tcontroller.error(error);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontroller.enqueue(chunk);\n\n\t\t\t\tif (controller.desiredSize === null || controller.desiredSize <= 0) {\n\t\t\t\t\treq.pause();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treq.on('error', on_error);\n\t\t\treq.on('end', on_end);\n\t\t\treq.on('data', on_data);\n\t\t\tbody_data_listeners.set(req, on_data);\n\t\t},\n\n\t\tpull() {\n\t\t\treq.resume();\n\t\t},\n\n\t\tcancel(reason) {\n\t\t\tcancelled = true;\n\t\t\treq.destroy(reason);\n\t\t}\n\t});\n}\n\n/**\n * @param {{\n * request: import('http').IncomingMessage;\n * response?: import('http').ServerResponse;\n * base: string;\n * bodySizeLimit?: number;\n * }} options\n * @returns {Request}\n */\nexport function getRequest({ request, response, base, bodySizeLimit }) {\n\tlet headers = /** @type {Record<string, string>} */ (request.headers);\n\tif (request.httpVersionMajor >= 2) {\n\t\t// the Request constructor rejects headers with ':' in the name\n\t\theaders = Object.assign({}, headers);\n\t\t// https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.5\n\t\tif (headers[':authority']) {\n\t\t\theaders.host = headers[':authority'];\n\t\t}\n\t\tdelete headers[':authority'];\n\t\tdelete headers[':method'];\n\t\tdelete headers[':path'];\n\t\tdelete headers[':scheme'];\n\t}\n\n\tconst controller = new AbortController();\n\n\trequest.once('close', () => {\n\t\tif (request.readableAborted) {\n\t\t\tcontroller.abort();\n\t\t}\n\t});\n\n\t// `readableAborted` stays false once the request has been fully read (or drained),\n\t// so a client disconnect must also be detected on the response side. `writableEnded`\n\t// rather than `writableFinished` because HTTP/2 marks cancelled streams as finished\n\tresponse?.once('close', () => {\n\t\tif (!response.writableEnded) {\n\t\t\tcontroller.abort();\n\t\t}\n\t});\n\n\treturn new Request(base + request.url, {\n\t\t// @ts-expect-error\n\t\tduplex: 'half',\n\t\tmethod: request.method,\n\t\theaders: Object.entries(headers),\n\t\tsignal: controller.signal,\n\t\tbody:\n\t\t\trequest.method === 'GET' || request.method === 'HEAD'\n\t\t\t\t? undefined\n\t\t\t\t: get_raw_body(request, bodySizeLimit)\n\t});\n}\n\n/**\n * Drains any unconsumed request body once the response has been sent. When a\n * route doesn't read the request body (for example a page route receiving a\n * POST), the unread bytes remain buffered in the socket. On keep-alive\n * connections Node's HTTP parser then reads those leftover bytes as the next\n * request, fails to parse them, and resets the connection — losing any\n * pipelined request. Resuming the request discards the bytes so the connection\n * stays usable.\n *\n * Because `get_raw_body` attaches a `data` listener, Node marks the request as\n * being consumed (`req._consuming`) and skips its own automatic drain, so we\n * have to do it ourselves. The whole remaining body is read and discarded; this\n * is the intended trade-off (keeping the connection reusable) over destroying it.\n * @see https://github.com/sveltejs/kit/issues/14916\n * @see https://github.com/sveltejs/kit/issues/15526\n * @param {import('http').ServerResponse} res\n */\nfunction drain_request(res) {\n\tconst req = res.req;\n\tif (!req || req.readableEnded || req.destroyed) return;\n\n\t// When the body went unread, get_raw_body's `data` listener is still attached\n\t// and enqueues into a ReadableStream nobody consumes; it pauses the request at\n\t// the high water mark, so one chunk sits in memory and the rest stays buffered\n\t// in the socket. Remove only that `data` listener so the resumed stream drops\n\t// the remaining bytes instead of re-buffering them. The `end` and `error`\n\t// listeners stay attached so the body's ReadableStream is still closed (or\n\t// errored) once draining completes, and a consumer that stopped reading\n\t// mid-body sees a clean end instead of hanging.\n\tconst on_data = body_data_listeners.get(req);\n\tif (on_data) {\n\t\treq.removeListener('data', on_data);\n\t\tbody_data_listeners.delete(req);\n\t}\n\n\treq.resume();\n}\n\n/**\n * @param {import('http').ServerResponse} res\n * @param {Response} response\n * @returns {void}\n */\nexport function setResponse(res, response) {\n\tres.once('finish', () => drain_request(res));\n\tres.once('close', () => drain_request(res));\n\n\tfor (const [key, value] of response.headers) {\n\t\ttry {\n\t\t\tres.setHeader(key, key === 'set-cookie' ? response.headers.getSetCookie() : value);\n\t\t} catch (error) {\n\t\t\tres.getHeaderNames().forEach((name) => res.removeHeader(name));\n\t\t\tres.writeHead(500).end(String(error));\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (!response.body) {\n\t\tres.writeHead(response.status);\n\t\tres.end();\n\t\treturn;\n\t}\n\n\tif (response.body.locked) {\n\t\tres.writeHead(response.status);\n\t\tres.end(\n\t\t\t'Fatal error: Response body is locked. ' +\n\t\t\t\t\"This can happen when the response was already read (for example through 'response.json()' or 'response.text()').\"\n\t\t);\n\t\treturn;\n\t}\n\n\tconst reader = response.body.getReader();\n\n\tif (res.destroyed) {\n\t\tvoid reader.cancel();\n\t\treturn;\n\t}\n\n\tconst cancel = (/** @type {Error|undefined} */ error) => {\n\t\tres.off('close', cancel);\n\t\tres.off('error', cancel);\n\n\t\t// If the reader has already been interrupted with an error earlier,\n\t\t// then it will appear here, it is useless, but it needs to be catch.\n\t\treader.cancel(error).catch(noop);\n\t\tif (error) res.destroy(error);\n\t};\n\n\tres.on('close', cancel);\n\tres.on('error', cancel);\n\n\t/** @type {Uint8Array<ArrayBuffer>[]} */\n\tconst buffered = [];\n\n\t/** @type {ReturnType<typeof reader.read> | null} */\n\tlet pending = null;\n\n\tvoid probe();\n\n\t// a fixed body (a string, buffer or blob, however constructed) settles all its\n\t// reads before the next macrotask, so it can be measured and sent with a\n\t// `content-length`; a genuine stream leaves a read pending and only has its\n\t// headers delayed by a single tick\n\tasync function probe() {\n\t\ttry {\n\t\t\t/** @type {Promise<undefined>} */\n\t\t\tconst deadline = new Promise((fulfil) => setImmediate(() => fulfil(undefined)));\n\n\t\t\twhile (buffered.length < 2) {\n\t\t\t\tpending = reader.read();\n\t\t\t\tconst result = await Promise.race([pending, deadline]);\n\n\t\t\t\tif (!result) break; // deadline hit — treat the body as a stream\n\n\t\t\t\tpending = null;\n\n\t\t\t\tif (result.done) {\n\t\t\t\t\t// a `content-length` next to a `transfer-encoding` would be invalid\n\t\t\t\t\tif (!res.hasHeader('content-length') && !res.hasHeader('transfer-encoding')) {\n\t\t\t\t\t\tres.setHeader(\n\t\t\t\t\t\t\t'content-length',\n\t\t\t\t\t\t\tbuffered.reduce((total, chunk) => total + chunk.byteLength, 0)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbuffered.push(result.value);\n\t\t\t}\n\n\t\t\tif (res.destroyed) return;\n\n\t\t\tres.writeHead(response.status);\n\t\t\tawait next();\n\t\t} catch (error) {\n\t\t\tif (!res.headersSent) res.writeHead(response.status);\n\t\t\tcancel(error instanceof Error ? error : new Error(String(error)));\n\t\t}\n\t}\n\n\tasync function next() {\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\t/** @type {Awaited<ReturnType<typeof reader.read>>} */\n\t\t\t\tlet result;\n\t\t\t\tif (buffered.length > 0) {\n\t\t\t\t\tresult = {\n\t\t\t\t\t\tdone: false,\n\t\t\t\t\t\tvalue: /** @type {Uint8Array<ArrayBuffer>} */ (buffered.shift())\n\t\t\t\t\t};\n\t\t\t\t} else if (pending) {\n\t\t\t\t\tresult = await pending;\n\t\t\t\t\tpending = null;\n\t\t\t\t} else {\n\t\t\t\t\tresult = await reader.read();\n\t\t\t\t}\n\n\t\t\t\tconst { done, value } = result;\n\n\t\t\t\tif (done) break;\n\n\t\t\t\tif (!res.write(value)) {\n\t\t\t\t\tres.once('drain', next);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tres.end();\n\t\t} catch (error) {\n\t\t\tcancel(error instanceof Error ? error : new Error(String(error)));\n\t\t}\n\t}\n}\n\n/**\n * Converts a file on disk to a readable stream\n * @param {string} file\n * @returns {ReadableStream}\n * @since 2.4.0\n */\nexport function createReadableStream(file) {\n\treturn /** @type {ReadableStream} */ (Readable.toWeb(createReadStream(file)));\n}\n","import { format } from 'node:url';\n\n/**\n * Parses the given value into number of bytes.\n *\n * @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G).\n * @returns {number}\n */\nexport function parse_as_bytes(value) {\n\tconst multiplier =\n\t\t{\n\t\t\tK: 1024,\n\t\t\tM: 1024 * 1024,\n\t\t\tG: 1024 * 1024 * 1024\n\t\t}[value[value.length - 1]?.toUpperCase()] ?? 1;\n\treturn Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier;\n}\n\n/**\n * Formats the address the server is listening on.\n *\n * @param {string | false} path\n * @param {string} host\n * @param {string | false} port\n * @param {import('node:net').AddressInfo | string | null} address\n * @returns {string}\n */\nexport function format_listening_address(path, host, port, address) {\n\tif (path) {\n\t\treturn path;\n\t}\n\n\tif (address && typeof address === 'object') {\n\t\treturn format({\n\t\t\tprotocol: 'http:',\n\t\t\thostname: address.address,\n\t\t\tport: address.port\n\t\t});\n\t}\n\n\treturn format({\n\t\tprotocol: 'http:',\n\t\thostname: host,\n\t\tport: String(port)\n\t});\n}\n","/** @import { IncomingMessage, ServerResponse } from 'node:http' */\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { pipeline } from 'node:stream';\n\n/**\n * @typedef {(req: IncomingMessage, res: ServerResponse, next: () => void | Promise<void>) => void | Promise<void>} Middleware\n * @typedef {AssetEntry & { type?: string, cache_control?: string }} Asset\n * @typedef {Asset | { location: string }} Entry\n */\n\n/**\n * Splits `req.url` into a decoded pathname and the search string.\n * Decoding follows kit's router: reserved characters such as `%2F` stay\n * encoded. An undecodable pathname is returned as-is, so it misses the\n * asset table and falls through to SvelteKit's 400\n * @param {import('node:http').IncomingMessage} req\n */\nfunction split_url(req) {\n\tlet pathname = /** @type {string} */ (req.url);\n\tlet search = '';\n\n\tconst query_index = pathname.indexOf('?');\n\tif (query_index !== -1) {\n\t\tsearch = pathname.slice(query_index);\n\t\tpathname = pathname.slice(0, query_index);\n\t}\n\n\tif (pathname.includes('%')) {\n\t\ttry {\n\t\t\tpathname = pathname.split('%25').map(decodeURI).join('%25');\n\t\t} catch {\n\t\t\t// invalid URI\n\t\t}\n\t}\n\n\treturn { pathname, search };\n}\n\n/**\n * Relative reference from `from` to `to`, which must differ only by a trailing slash.\n * Keep in sync with the copy in `packages/kit/src/utils/url.js`\n * @param {string} from\n * @param {string} to\n * @returns {string}\n */\nfunction relative_pathname(from, to) {\n\tconst segment = to.replace(/\\/$/, '').split('/').at(-1);\n\n\t// The prefix prevents a colon in the segment from being interpreted as a URL scheme.\n\treturn from.endsWith('/') ? `../${segment}` : `./${segment}/`;\n}\n\n/**\n * Parses `Accept-Encoding` and picks the preferred variant that exists\n * @param {string | undefined} header\n * @param {Asset} asset\n * @returns {'br' | 'gz' | undefined}\n */\nfunction negotiate(header, asset) {\n\tif (!header || !(asset.br || asset.gz)) return;\n\n\t/** @type {Map<string, number>} */\n\tconst weights = new Map();\n\n\tfor (const part of header.toLowerCase().split(',')) {\n\t\tconst [coding, ...params] = part.split(';');\n\t\tlet weight = 1;\n\n\t\tfor (const param of params) {\n\t\t\tconst [name, value] = param.split('=');\n\t\t\tif (name.trim() === 'q') weight = parseFloat(value) || 0;\n\t\t}\n\n\t\tweights.set(coding.trim(), weight);\n\t}\n\n\t/** @param {string} coding */\n\tconst weight = (coding) => weights.get(coding) ?? weights.get('*') ?? 0;\n\n\tconst br = asset.br ? weight('br') : 0;\n\tconst gzip = asset.gz ? weight('gzip') : 0;\n\n\tif (gzip > br) return 'gz';\n\tif (br > 0) return 'br';\n}\n\n/**\n * Whether an `If-None-Match` value matches `etag`, using weak comparison\n * @param {string | undefined} header\n * @param {string} etag\n */\nfunction etag_matches(header, etag) {\n\tif (!header) return false;\n\tif (header.trim() === '*') return true;\n\n\treturn header.split(',').some((tag) => tag.trim().replace(/^W\\//, '') === etag);\n}\n\n/**\n * Absolute file paths and content types for one table\n * @param {string} dir\n * @param {AssetTable} table\n * @param {Record<string, string>} mime_types\n * @returns {Map<string, Asset>}\n */\nfunction resolve(dir, table, mime_types) {\n\t/** @type {Map<string, Asset>} */\n\tconst files = new Map();\n\n\tfor (const [key, entry] of table.entries) {\n\t\tlet type = mime_types[entry.file.slice(entry.file.lastIndexOf('.'))];\n\t\tif (type === 'text/html') type += ';charset=utf-8';\n\t\tfiles.set(key, { ...entry, file: path.join(dir, entry.file), type });\n\t}\n\n\tfor (const [alias, key] of table.aliases) {\n\t\tfiles.set(alias, /** @type {Asset} */ (files.get(key)));\n\t}\n\n\treturn files;\n}\n\n/**\n * One lookup for every request, decided at boot: client assets (immutable below\n * `app_path`), prerendered pages, and a 308 from the non-canonical trailing-slash\n * form of a prerendered path to the canonical one. Client assets win a collision\n * @param {{\n * dir: string,\n * base: string,\n * app_path: string,\n * mime_types: Record<string, string>,\n * assets: AssetTable,\n * prerendered_assets: AssetTable\n * }} opts\n * @returns {Map<string, Entry>}\n */\nexport function create_file_map({ dir, base, app_path, mime_types, assets, prerendered_assets }) {\n\t/** @type {Map<string, Entry>} */\n\tconst files = resolve(`${dir}/client${base}`, assets, mime_types);\n\n\tconst immutable = `/${app_path}/immutable/`;\n\tfor (const [key, asset] of files) {\n\t\tif (key.startsWith(immutable)) {\n\t\t\t/** @type {Asset} */ (asset).cache_control = 'public,max-age=31536000,immutable';\n\t\t}\n\t}\n\n\tconst prerendered = resolve(`${dir}/prerendered${base}`, prerendered_assets, mime_types);\n\tfor (const [key, asset] of prerendered) {\n\t\tif (!files.has(key)) files.set(key, asset);\n\t}\n\n\tfor (const key of prerendered.keys()) {\n\t\tconst inverted = key.at(-1) === '/' ? key.slice(0, -1) : key + '/';\n\t\tif (inverted && !files.has(inverted)) {\n\t\t\tfiles.set(inverted, { location: relative_pathname(inverted, key) });\n\t\t}\n\t}\n\n\treturn files;\n}\n\n/**\n * Serves the closed set of files recorded at adapt time. Everything about a\n * response is decided before the first request, so a request is one map\n * lookup, header negotiation and a stream\n * @param {Map<string, Entry>} files\n * @returns {Middleware}\n */\nexport function serve_static(files) {\n\treturn (req, res, next) => {\n\t\tconst { pathname, search } = split_url(req);\n\n\t\tconst asset = files.get(pathname);\n\t\tif (!asset) return next();\n\n\t\tif (req.method !== 'GET' && req.method !== 'HEAD') {\n\t\t\tres.writeHead(405, { allow: 'GET, HEAD' }).end();\n\t\t\treturn;\n\t\t}\n\n\t\tif ('location' in asset) {\n\t\t\tres.writeHead(308, { location: asset.location + search }).end();\n\t\t\treturn;\n\t\t}\n\n\t\tlet file = asset.file;\n\t\tlet size = asset.size;\n\t\tlet etag = `\"${asset.etag}\"`;\n\n\t\tconst variant = negotiate(req.headers['accept-encoding'], asset);\n\t\tif (variant) {\n\t\t\tsize = /** @type {number} */ (asset[variant]);\n\t\t\tfile += `.${variant}`;\n\t\t\tetag = `\"${asset.etag}.${variant}\"`;\n\t\t}\n\n\t\t/** @type {Record<string, string | number>} */\n\t\tconst headers = { etag };\n\n\t\tif (asset.br || asset.gz) headers.vary = 'Accept-Encoding';\n\t\tif (asset.cache_control) headers['cache-control'] = asset.cache_control;\n\n\t\tif (etag_matches(req.headers['if-none-match'], etag)) {\n\t\t\tres.writeHead(304, headers).end();\n\t\t\treturn;\n\t\t}\n\t\theaders['content-length'] = size;\n\t\theaders['accept-ranges'] = 'bytes';\n\t\tif (asset.type) headers['content-type'] = asset.type;\n\t\tif (variant) headers['content-encoding'] = variant === 'gz' ? 'gzip' : 'br';\n\n\t\t/** @type {{ start?: number, end?: number }} */\n\t\tconst range = {};\n\t\tlet status = 200;\n\n\t\t// a stale `If-Range` validator means the client's partial copy is of an older\n\t\t// representation, so it gets the whole current one\n\t\tconst if_range = req.headers['if-range'];\n\t\tif (req.headers.range && (!if_range || if_range === etag)) {\n\t\t\tconst match = /^bytes=(\\d*)-(\\d*)$/.exec(req.headers.range);\n\n\t\t\tif (match && (match[1] || match[2])) {\n\t\t\t\tlet start = match[1] ? parseInt(match[1], 10) : NaN;\n\t\t\t\tlet end = match[2] ? parseInt(match[2], 10) : size - 1;\n\n\t\t\t\tif (isNaN(start)) {\n\t\t\t\t\t// suffix range: the last `match[2]` bytes\n\t\t\t\t\tstart = Math.max(size - end, 0);\n\t\t\t\t\tend = size - 1;\n\t\t\t\t} else {\n\t\t\t\t\tend = Math.min(end, size - 1);\n\t\t\t\t}\n\n\t\t\t\tif (start >= size || start > end) {\n\t\t\t\t\tres.writeHead(416, { 'content-range': `bytes */${size}` }).end();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstatus = 206;\n\t\t\t\theaders['content-range'] = `bytes ${start}-${end}/${size}`;\n\t\t\t\theaders['content-length'] = end - start + 1;\n\t\t\t\trange.start = start;\n\t\t\t\trange.end = end;\n\t\t\t}\n\t\t}\n\n\t\tres.writeHead(status, headers);\n\n\t\tif (req.method === 'HEAD') {\n\t\t\tres.end();\n\t\t\treturn;\n\t\t}\n\n\t\t// the headers are already sent, so a failed read can only drop the connection.\n\t\t// `pipeline` also closes the file when the client goes away mid-transfer\n\t\tpipeline(fs.createReadStream(file, range), res, () => {});\n\t};\n}\n","/** @import { IncomingHttpHeaders } from 'node:http' */\nimport process from 'node:process';\nimport { getRequest, setResponse, createReadableStream } from '@sveltejs/kit/node';\nimport {\n\tserver,\n\tdir,\n\tenv_prefix,\n\tbase,\n\tapp_path,\n\torigin,\n\tmime_types,\n\tassets,\n\tprerendered_assets\n} from '#@sveltejs/adapter-node';\nimport { env } from './env.js';\nimport { parse_as_bytes } from './utils.js';\nimport { create_file_map, serve_static } from './static.js';\n\n/** @import { Middleware } from './static.js' */\n\nconst xff_depth = parseInt(env('XFF_DEPTH', '1'));\nconst address_header = env('ADDRESS_HEADER', '').toLowerCase();\nconst protocol_header = env('PROTOCOL_HEADER', '').toLowerCase();\nconst host_header = env('HOST_HEADER', '').toLowerCase();\nconst port_header = env('PORT_HEADER', '').toLowerCase();\n\nconst body_size_limit = parse_as_bytes(env('BODY_SIZE_LIMIT', '512K'));\n\nif (isNaN(body_size_limit)) {\n\tthrow new Error(\n\t\t`Invalid BODY_SIZE_LIMIT: '${env('BODY_SIZE_LIMIT')}'. Please provide a numeric value.`\n\t);\n}\n\nconst asset_dir = `${dir}/client${base}`;\n\nawait server.init({\n\tenv: process.env,\n\tread: (file) => createReadableStream(`${asset_dir}/${file}`)\n});\n\n/** @type {Middleware} */\nconst ssr = async (req, res) => {\n\t/** @type {Request} */\n\tlet request;\n\tlet request_origin = origin;\n\n\tif (!request_origin) {\n\t\ttry {\n\t\t\trequest_origin = get_origin(req.headers);\n\t\t} catch (error) {\n\t\t\tconsole.error(\n\t\t\t\t`Could not determine request origin: ${error instanceof Error ? error.message : String(error)}`\n\t\t\t);\n\t\t\tres.statusCode = 400;\n\t\t\tres.end('Bad Request');\n\t\t\treturn;\n\t\t}\n\t}\n\n\ttry {\n\t\trequest = getRequest({\n\t\t\tbase: request_origin,\n\t\t\trequest: req,\n\t\t\tresponse: res,\n\t\t\tbodySizeLimit: body_size_limit\n\t\t});\n\t} catch {\n\t\tres.statusCode = 400;\n\t\tres.end('Bad Request');\n\t\treturn;\n\t}\n\n\tconst response = await server.respond(request, {\n\t\tplatform: { req },\n\t\tgetClientAddress: () => {\n\t\t\tif (address_header) {\n\t\t\t\tif (!(address_header in req.headers)) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Address header was specified with ${\n\t\t\t\t\t\t\tenv_prefix + 'ADDRESS_HEADER'\n\t\t\t\t\t\t}=${address_header} but is absent from request`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst value = /** @type {string} */ (req.headers[address_header]) || '';\n\n\t\t\t\tif (address_header === 'x-forwarded-for') {\n\t\t\t\t\tconst addresses = value.split(',');\n\n\t\t\t\t\tif (xff_depth < 1) {\n\t\t\t\t\t\tthrow new Error(`${env_prefix + 'XFF_DEPTH'} must be a positive integer`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (xff_depth > addresses.length) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`${env_prefix + 'XFF_DEPTH'} is ${xff_depth}, but only found ${\n\t\t\t\t\t\t\t\taddresses.length\n\t\t\t\t\t\t\t} addresses`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn addresses[addresses.length - xff_depth].trim();\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\treq.connection?.remoteAddress ||\n\t\t\t\t// @ts-expect-error\n\t\t\t\treq.connection?.socket?.remoteAddress ||\n\t\t\t\treq.socket?.remoteAddress ||\n\t\t\t\t// @ts-expect-error\n\t\t\t\treq.info?.remoteAddress\n\t\t\t);\n\t\t}\n\t});\n\n\t// Reverse proxies such as nginx buffer responses by default (ignoring\n\t// `cache-control`), which breaks streaming responses like server-sent events.\n\t// `X-Accel-Buffering: no` opts out of that buffering and is a no-op on proxies\n\t// that don't recognise it. See https://github.com/sveltejs/kit/issues/15790\n\tif (response.headers.get('content-type') === 'text/event-stream') {\n\t\tresponse.headers.set('x-accel-buffering', 'no');\n\t}\n\n\tsetResponse(res, response);\n};\n\n/**\n * @param {string} name\n * @param {string | string[] | undefined} value\n * @returns {string | undefined}\n */\nfunction normalise_header(name, value) {\n\tif (!name) return undefined;\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 0) return undefined;\n\t\tif (value.length === 1) return value[0];\n\t\tthrow new Error(\n\t\t\t`Multiple values provided for ${name} header where only one expected: ${value}`\n\t\t);\n\t}\n\treturn value;\n}\n\n/**\n * @param {IncomingHttpHeaders} headers\n * @returns {string}\n */\nfunction get_origin(headers) {\n\tconst protocol = decodeURIComponent(\n\t\tnormalise_header(protocol_header, headers[protocol_header]) || 'https'\n\t);\n\n\t// this helps us avoid host injections through the protocol header\n\tif (protocol.includes(':')) {\n\t\tthrow new Error(\n\t\t\t`The ${protocol_header} header specified ${protocol} which is an invalid because it includes \\`:\\`. It should only contain the protocol scheme (e.g. \\`https\\`)`\n\t\t);\n\t}\n\n\tconst host =\n\t\tnormalise_header(host_header, headers[host_header]) ||\n\t\tnormalise_header('host', headers['host']);\n\tif (!host) {\n\t\tconst header_names = host_header ? `${host_header} or host headers` : 'host header';\n\t\tthrow new Error(\n\t\t\t`Could not determine host. The request must have a value provided by the ${header_names}`\n\t\t);\n\t}\n\n\tconst port = normalise_header(port_header, headers[port_header]);\n\tif (port && isNaN(+port)) {\n\t\tthrow new Error(\n\t\t\t`The ${port_header} header specified ${port} which is an invalid port because it is not a number. The value should only contain the port number (e.g. 443)`\n\t\t);\n\t}\n\n\treturn port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;\n}\n\nconst serve = serve_static(\n\tcreate_file_map({ dir, base, app_path, mime_types, assets, prerendered_assets })\n);\n\n/** @type {Middleware} */\nexport const handler = (req, res, next) => serve(req, res, () => ssr(req, res, next));\n"],"ignoreList":[0,1,2,3],"mappings":";;;;;;;;;;;AAMA,IAAM,sCAAsB,IAAI,QAAQ;;;;;AAMxC,SAAS,aAAa,KAAK,iBAAiB;CAC3C,MAAM,IAAI,IAAI;CAEd,MAAM,iBAAiB,OAAO,EAA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