@claude-sessions/web 0.3.7 → 0.4.1-beta.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 (177) hide show
  1. package/build/client/_app/immutable/assets/0.D2FnNtrO.css +1 -0
  2. package/build/client/_app/immutable/assets/0.D2FnNtrO.css.br +0 -0
  3. package/build/client/_app/immutable/assets/0.D2FnNtrO.css.gz +0 -0
  4. package/build/client/_app/immutable/assets/Toast.CQSY_S6M.css.gz +0 -0
  5. package/build/client/_app/immutable/chunks/{pOdkXMWy.js → B-Z9hXPk.js} +1 -1
  6. package/build/client/_app/immutable/chunks/B-Z9hXPk.js.br +0 -0
  7. package/build/client/_app/immutable/chunks/B-Z9hXPk.js.gz +0 -0
  8. package/build/client/_app/immutable/chunks/{Ck-YPZB6.js → BAHJNsIv.js} +1 -1
  9. package/build/client/_app/immutable/chunks/BAHJNsIv.js.br +0 -0
  10. package/build/client/_app/immutable/chunks/BAHJNsIv.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/BUqdiQ8V.js +90 -0
  12. package/build/client/_app/immutable/chunks/BUqdiQ8V.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/BUqdiQ8V.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/{Dbjp-HdT.js → Bt_HBaBk.js} +1 -1
  15. package/build/client/_app/immutable/chunks/Bt_HBaBk.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/Bt_HBaBk.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/Cr0eW1j3.js +1 -0
  18. package/build/client/_app/immutable/chunks/Cr0eW1j3.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/Cr0eW1j3.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/DOXVKi87.js +2 -0
  21. package/build/client/_app/immutable/chunks/DOXVKi87.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/DOXVKi87.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/YXuXYbOb.js +1 -0
  24. package/build/client/_app/immutable/chunks/YXuXYbOb.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/YXuXYbOb.js.gz +0 -0
  26. package/build/client/_app/immutable/entry/app.B37sNVm4.js +2 -0
  27. package/build/client/_app/immutable/entry/app.B37sNVm4.js.br +0 -0
  28. package/build/client/_app/immutable/entry/app.B37sNVm4.js.gz +0 -0
  29. package/build/client/_app/immutable/entry/start.CUKKnspj.js +1 -0
  30. package/build/client/_app/immutable/entry/start.CUKKnspj.js.br +2 -0
  31. package/build/client/_app/immutable/entry/start.CUKKnspj.js.gz +0 -0
  32. package/build/client/_app/immutable/nodes/{0.D4LDvqQb.js → 0.DD0gH91e.js} +1 -1
  33. package/build/client/_app/immutable/nodes/0.DD0gH91e.js.br +0 -0
  34. package/build/client/_app/immutable/nodes/0.DD0gH91e.js.gz +0 -0
  35. package/build/client/_app/immutable/nodes/1.j1rqa9HA.js +1 -0
  36. package/build/client/_app/immutable/nodes/1.j1rqa9HA.js.br +0 -0
  37. package/build/client/_app/immutable/nodes/1.j1rqa9HA.js.gz +0 -0
  38. package/build/client/_app/immutable/nodes/2.5x79czX-.js +4 -0
  39. package/build/client/_app/immutable/nodes/2.5x79czX-.js.br +0 -0
  40. package/build/client/_app/immutable/nodes/2.5x79czX-.js.gz +0 -0
  41. package/build/client/_app/immutable/nodes/3.CkQ0QnVZ.js +4 -0
  42. package/build/client/_app/immutable/nodes/3.CkQ0QnVZ.js.br +0 -0
  43. package/build/client/_app/immutable/nodes/3.CkQ0QnVZ.js.gz +0 -0
  44. package/build/client/_app/version.json +1 -1
  45. package/build/client/_app/version.json.br +0 -0
  46. package/build/client/_app/version.json.gz +0 -0
  47. package/build/env.js +51 -2
  48. package/build/handler.js +46 -4
  49. package/build/index.js +25 -14
  50. package/build/server/chunks/0-BhPy9YZY.js +17 -0
  51. package/build/server/chunks/{0-DkD09WcK.js.map → 0-BhPy9YZY.js.map} +1 -1
  52. package/build/server/chunks/1-CTTD_wla.js +9 -0
  53. package/build/server/chunks/{1-CjtVgNYW.js.map → 1-CTTD_wla.js.map} +1 -1
  54. package/build/server/chunks/2-Bvyspg6i.js +9 -0
  55. package/build/server/chunks/{2-wstlfOP5.js.map → 2-Bvyspg6i.js.map} +1 -1
  56. package/build/server/chunks/3-BHD2c0Ph.js +9 -0
  57. package/build/server/chunks/{3-Cdn9_0OG.js.map → 3-BHD2c0Ph.js.map} +1 -1
  58. package/build/server/chunks/{InputModal-XaplAR5y.js → InputModal-CbpiMXy3.js} +3 -3
  59. package/build/server/chunks/InputModal-CbpiMXy3.js.map +1 -0
  60. package/build/server/chunks/{Toast-ihrVamsT.js → Toast-Dr8M-5Wk.js} +4 -4
  61. package/build/server/chunks/Toast-Dr8M-5Wk.js.map +1 -0
  62. package/build/server/chunks/{_layout.svelte-COfbk473.js → _layout.svelte-CkIsNl4s.js} +7 -6
  63. package/build/server/chunks/_layout.svelte-CkIsNl4s.js.map +1 -0
  64. package/build/server/chunks/{_page.svelte-CKSi7jlX.js → _page.svelte-BdKbLK1W.js} +8 -7
  65. package/build/server/chunks/_page.svelte-BdKbLK1W.js.map +1 -0
  66. package/build/server/chunks/{_page.svelte-C5Xngf9U.js → _page.svelte-DWKQDFXZ.js} +452 -240
  67. package/build/server/chunks/_page.svelte-DWKQDFXZ.js.map +1 -0
  68. package/build/server/chunks/{_server.ts-CFQ3_7g1.js → _server.ts-8OBR5eCA.js} +3 -2
  69. package/build/server/chunks/{_server.ts-CFQ3_7g1.js.map → _server.ts-8OBR5eCA.js.map} +1 -1
  70. package/build/server/chunks/_server.ts-B2LLvx6I.js +41 -0
  71. package/build/server/chunks/_server.ts-B2LLvx6I.js.map +1 -0
  72. package/build/server/chunks/{_server.ts-Bzg6xSYv.js → _server.ts-B4SnxrOX.js} +3 -2
  73. package/build/server/chunks/{_server.ts-Bzg6xSYv.js.map → _server.ts-B4SnxrOX.js.map} +1 -1
  74. package/build/server/chunks/{_server.ts-a85289si.js → _server.ts-B9gP-Tri.js} +7 -3
  75. package/build/server/chunks/_server.ts-B9gP-Tri.js.map +1 -0
  76. package/build/server/chunks/{_server.ts-IjEZJmtD.js → _server.ts-BQxGBeCg.js} +3 -2
  77. package/build/server/chunks/{_server.ts-IjEZJmtD.js.map → _server.ts-BQxGBeCg.js.map} +1 -1
  78. package/build/server/chunks/{_server.ts-CF7wNACi.js → _server.ts-Bcdjougg.js} +3 -2
  79. package/build/server/chunks/{_server.ts-CF7wNACi.js.map → _server.ts-Bcdjougg.js.map} +1 -1
  80. package/build/server/chunks/{_server.ts-CBabn3Le.js → _server.ts-BeWDhgJ_.js} +3 -2
  81. package/build/server/chunks/{_server.ts-CBabn3Le.js.map → _server.ts-BeWDhgJ_.js.map} +1 -1
  82. package/build/server/chunks/{_server.ts-bj28Awpj.js → _server.ts-CEGd9zNn.js} +3 -2
  83. package/build/server/chunks/_server.ts-CEGd9zNn.js.map +1 -0
  84. package/build/server/chunks/{_server.ts-QYg-pRKw.js → _server.ts-CMsFINkl.js} +3 -2
  85. package/build/server/chunks/{_server.ts-QYg-pRKw.js.map → _server.ts-CMsFINkl.js.map} +1 -1
  86. package/build/server/chunks/{_server.ts-BNGntgHD.js → _server.ts-CUginV8c.js} +7 -3
  87. package/build/server/chunks/_server.ts-CUginV8c.js.map +1 -0
  88. package/build/server/chunks/{_server.ts-DRy1BtKz.js → _server.ts-Crip_Csr.js} +3 -2
  89. package/build/server/chunks/{_server.ts-DRy1BtKz.js.map → _server.ts-Crip_Csr.js.map} +1 -1
  90. package/build/server/chunks/{_server.ts-C46vcb_V.js → _server.ts-CuAlKvWH.js} +3 -2
  91. package/build/server/chunks/{_server.ts-C46vcb_V.js.map → _server.ts-CuAlKvWH.js.map} +1 -1
  92. package/build/server/chunks/{_server.ts-msjVztXK.js → _server.ts-DfNIRtb5.js} +3 -2
  93. package/build/server/chunks/{_server.ts-msjVztXK.js.map → _server.ts-DfNIRtb5.js.map} +1 -1
  94. package/build/server/chunks/{_server.ts-CBCUnjeX.js → _server.ts-DnfpkUoI.js} +3 -2
  95. package/build/server/chunks/{_server.ts-CBCUnjeX.js.map → _server.ts-DnfpkUoI.js.map} +1 -1
  96. package/build/server/chunks/_server.ts-cVOhu8ub.js +26 -0
  97. package/build/server/chunks/_server.ts-cVOhu8ub.js.map +1 -0
  98. package/build/server/chunks/{_server.ts-Dtvv8PMc.js → _server.ts-dXxEqPlK.js} +3 -2
  99. package/build/server/chunks/{_server.ts-Dtvv8PMc.js.map → _server.ts-dXxEqPlK.js.map} +1 -1
  100. package/build/server/chunks/{error.svelte-C43AeaaJ.js → error.svelte-BNCG_dZH.js} +3 -3
  101. package/build/server/chunks/{error.svelte-C43AeaaJ.js.map → error.svelte-BNCG_dZH.js.map} +1 -1
  102. package/build/server/chunks/exports-BXvEiaiv.js.map +1 -1
  103. package/build/server/chunks/{index2-Da0doXJY.js → index-BEaiIYry.js} +388 -4
  104. package/build/server/chunks/index-BEaiIYry.js.map +1 -0
  105. package/build/server/chunks/index-CoD1IJuy.js.map +1 -1
  106. package/build/server/chunks/{index-DzYX9r1_.js → index2-ybZwlzIk.js} +110 -116
  107. package/build/server/chunks/index2-ybZwlzIk.js.map +1 -0
  108. package/build/server/chunks/{index3-DkgTDgY2.js → index3-D8wHvUHX.js} +781 -597
  109. package/build/server/chunks/index3-D8wHvUHX.js.map +1 -0
  110. package/build/server/chunks/{index4-BUZEWk-I.js → index4-B6vRxXfo.js} +2 -2
  111. package/build/server/chunks/index4-B6vRxXfo.js.map +1 -0
  112. package/build/server/chunks/shared-server-DaWdgxVh.js +11 -0
  113. package/build/server/chunks/shared-server-DaWdgxVh.js.map +1 -0
  114. package/build/server/index.js +115 -439
  115. package/build/server/index.js.map +1 -1
  116. package/build/server/manifest.js +21 -21
  117. package/build/server/manifest.js.map +1 -1
  118. package/dist/cli.js +26 -1
  119. package/package.json +19 -18
  120. package/build/client/_app/immutable/assets/0.DYXbBCWs.css +0 -1
  121. package/build/client/_app/immutable/assets/0.DYXbBCWs.css.br +0 -0
  122. package/build/client/_app/immutable/assets/0.DYXbBCWs.css.gz +0 -0
  123. package/build/client/_app/immutable/chunks/CT0aV1AN.js +0 -90
  124. package/build/client/_app/immutable/chunks/CT0aV1AN.js.br +0 -0
  125. package/build/client/_app/immutable/chunks/CT0aV1AN.js.gz +0 -0
  126. package/build/client/_app/immutable/chunks/Ck-YPZB6.js.br +0 -0
  127. package/build/client/_app/immutable/chunks/Ck-YPZB6.js.gz +0 -0
  128. package/build/client/_app/immutable/chunks/Dbjp-HdT.js.br +0 -0
  129. package/build/client/_app/immutable/chunks/Dbjp-HdT.js.gz +0 -0
  130. package/build/client/_app/immutable/chunks/HaThayHP.js +0 -1
  131. package/build/client/_app/immutable/chunks/HaThayHP.js.br +0 -0
  132. package/build/client/_app/immutable/chunks/HaThayHP.js.gz +0 -0
  133. package/build/client/_app/immutable/chunks/fuY-CvTV.js +0 -1
  134. package/build/client/_app/immutable/chunks/fuY-CvTV.js.br +0 -0
  135. package/build/client/_app/immutable/chunks/fuY-CvTV.js.gz +0 -0
  136. package/build/client/_app/immutable/chunks/nUq5tIUU.js +0 -2
  137. package/build/client/_app/immutable/chunks/nUq5tIUU.js.br +0 -0
  138. package/build/client/_app/immutable/chunks/nUq5tIUU.js.gz +0 -0
  139. package/build/client/_app/immutable/chunks/pOdkXMWy.js.br +0 -0
  140. package/build/client/_app/immutable/chunks/pOdkXMWy.js.gz +0 -0
  141. package/build/client/_app/immutable/entry/app.DMBaTVWt.js +0 -2
  142. package/build/client/_app/immutable/entry/app.DMBaTVWt.js.br +0 -0
  143. package/build/client/_app/immutable/entry/app.DMBaTVWt.js.gz +0 -0
  144. package/build/client/_app/immutable/entry/start.C3tcesOa.js +0 -1
  145. package/build/client/_app/immutable/entry/start.C3tcesOa.js.br +0 -2
  146. package/build/client/_app/immutable/entry/start.C3tcesOa.js.gz +0 -0
  147. package/build/client/_app/immutable/nodes/0.D4LDvqQb.js.br +0 -0
  148. package/build/client/_app/immutable/nodes/0.D4LDvqQb.js.gz +0 -0
  149. package/build/client/_app/immutable/nodes/1.5BEtqK67.js +0 -1
  150. package/build/client/_app/immutable/nodes/1.5BEtqK67.js.br +0 -0
  151. package/build/client/_app/immutable/nodes/1.5BEtqK67.js.gz +0 -0
  152. package/build/client/_app/immutable/nodes/2.C-xl-nxy.js +0 -4
  153. package/build/client/_app/immutable/nodes/2.C-xl-nxy.js.br +0 -0
  154. package/build/client/_app/immutable/nodes/2.C-xl-nxy.js.gz +0 -0
  155. package/build/client/_app/immutable/nodes/3.BqDX5X09.js +0 -4
  156. package/build/client/_app/immutable/nodes/3.BqDX5X09.js.br +0 -0
  157. package/build/client/_app/immutable/nodes/3.BqDX5X09.js.gz +0 -0
  158. package/build/server/chunks/0-DkD09WcK.js +0 -17
  159. package/build/server/chunks/1-CjtVgNYW.js +0 -9
  160. package/build/server/chunks/2-wstlfOP5.js +0 -9
  161. package/build/server/chunks/3-Cdn9_0OG.js +0 -9
  162. package/build/server/chunks/InputModal-XaplAR5y.js.map +0 -1
  163. package/build/server/chunks/Toast-ihrVamsT.js.map +0 -1
  164. package/build/server/chunks/_layout.svelte-COfbk473.js.map +0 -1
  165. package/build/server/chunks/_page.svelte-C5Xngf9U.js.map +0 -1
  166. package/build/server/chunks/_page.svelte-CKSi7jlX.js.map +0 -1
  167. package/build/server/chunks/_server.ts-BNGntgHD.js.map +0 -1
  168. package/build/server/chunks/_server.ts-BbeQOMoJ.js +0 -19
  169. package/build/server/chunks/_server.ts-BbeQOMoJ.js.map +0 -1
  170. package/build/server/chunks/_server.ts-CHX8x48n.js +0 -27
  171. package/build/server/chunks/_server.ts-CHX8x48n.js.map +0 -1
  172. package/build/server/chunks/_server.ts-a85289si.js.map +0 -1
  173. package/build/server/chunks/_server.ts-bj28Awpj.js.map +0 -1
  174. package/build/server/chunks/index-DzYX9r1_.js.map +0 -1
  175. package/build/server/chunks/index2-Da0doXJY.js.map +0 -1
  176. package/build/server/chunks/index3-DkgTDgY2.js.map +0 -1
  177. package/build/server/chunks/index4-BUZEWk-I.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index-CoD1IJuy.js","sources":["../../../../../node_modules/.pnpm/@sveltejs+kit@2.49.4_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.1_vite@7.3.1_@types+node@_aqfvmsb7kmczygcquwrlf3yk4m/node_modules/@sveltejs/kit/src/exports/internal/index.js","../../../../../node_modules/.pnpm/@sveltejs+kit@2.49.4_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.1_vite@7.3.1_@types+node@_aqfvmsb7kmczygcquwrlf3yk4m/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@2.49.4_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.1_vite@7.3.1_@types+node@_aqfvmsb7kmczygcquwrlf3yk4m/node_modules/@sveltejs/kit/src/exports/index.js"],"sourcesContent":["/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nexport class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.\n * `SvelteKitError` goes through `handleError`.\n * @extends Error\n */\nexport class SvelteKitError extends Error {\n\t/**\n\t * @param {number} status\n\t * @param {string} text\n\t * @param {string} message\n\t */\n\tconstructor(status, text, message) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.text = text;\n\t}\n}\n\n/**\n * @template [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} data\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * Error thrown when form validation fails imperatively\n */\nexport class ValidationError extends Error {\n\t/**\n\t * @param {StandardSchemaV1.Issue[]} issues\n\t */\n\tconstructor(issues) {\n\t\tsuper('Validation failed');\n\t\tthis.name = 'ValidationError';\n\t\tthis.issues = issues;\n\t}\n}\n\nexport { init_remote_functions } from './remote-functions.js';\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\nexport const text_decoder = new TextDecoder();\n\n/**\n * Like node's path.relative, but without using node\n * @param {string} from\n * @param {string} to\n */\nexport function get_relative_path(from, to) {\n\tconst from_parts = from.split(/[/\\\\]/);\n\tconst to_parts = to.split(/[/\\\\]/);\n\tfrom_parts.pop(); // get dirname\n\n\twhile (from_parts[0] === to_parts[0]) {\n\t\tfrom_parts.shift();\n\t\tto_parts.shift();\n\t}\n\n\tlet i = from_parts.length;\n\twhile (i--) from_parts[i] = '..';\n\n\treturn from_parts.concat(to_parts).join('/');\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js';\nimport { BROWSER, DEV } from 'esm-env';\nimport {\n\tadd_data_suffix,\n\tadd_resolution_suffix,\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../runtime/pathname.js';\nimport { text_encoder } from '../runtime/utils.js';\n\nexport { VERSION } from '../version.js';\n\n// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)\n/**\n * @template {number} TNumber\n * @template {any[]} [TArray=[]]\n * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan\n */\n\n/**\n * @template {number} TStart\n * @template {number} TEnd\n * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange\n */\n\n// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits\n// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780\n\n// we have to repeat the JSDoc because the display for function overloads is broken\n// see https://github.com/microsoft/TypeScript/issues/55056\n\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {App.Error} body\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\nexport function error(status, body) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) {\n\t\tthrow new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n\t}\n\n\tthrow new HttpError(status, body);\n}\n\n/**\n * Checks whether this is an error thrown by {@link error}.\n * @template {number} T\n * @param {unknown} e\n * @param {T} [status] The status to filter for.\n * @return {e is (HttpError & { status: T extends undefined ? never : T })}\n */\nexport function isHttpError(e, status) {\n\tif (!(e instanceof HttpError)) return false;\n\treturn !status || e.status === status;\n}\n\n/**\n * Redirect a request. When called during request handling, SvelteKit will return a redirect response.\n * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.\n *\n * Most common status codes:\n * * `303 See Other`: redirect as a GET request (often used after a form POST request)\n * * `307 Temporary Redirect`: redirect will keep the request method\n * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page\n *\n * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)\n *\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.\n * @param {string | URL} location The location to redirect to.\n * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.\n * @throws {Error} If the provided status is invalid.\n * @return {never}\n */\nexport function redirect(status, location) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) {\n\t\tthrow new Error('Invalid status code');\n\t}\n\n\tthrow new Redirect(\n\t\t// @ts-ignore\n\t\tstatus,\n\t\tlocation.toString()\n\t);\n}\n\n/**\n * Checks whether this is a redirect thrown by {@link redirect}.\n * @param {unknown} e The object to check.\n * @return {e is Redirect}\n */\nexport function isRedirect(e) {\n\treturn e instanceof Redirect;\n}\n\n/**\n * Create a JSON `Response` object from the supplied data.\n * @param {any} data The value that will be serialized as JSON.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.\n */\nexport function json(data, init) {\n\t// TODO deprecate this in favour of `Response.json` when it's\n\t// more widely supported\n\tconst body = JSON.stringify(data);\n\n\t// we can't just do `text(JSON.stringify(data), init)` because\n\t// it will set a default `content-type` header. duplicated code\n\t// means less duplicated work\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\theaders.set('content-length', text_encoder.encode(body).byteLength.toString());\n\t}\n\n\tif (!headers.has('content-type')) {\n\t\theaders.set('content-type', 'application/json');\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create a `Response` object from the supplied body.\n * @param {string} body The value that will be used as-is.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.\n */\nexport function text(body, init) {\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\tconst encoded = text_encoder.encode(body);\n\t\theaders.set('content-length', encoded.byteLength.toString());\n\t\treturn new Response(encoded, {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @overload\n * @param {number} status\n * @returns {import('./public.js').ActionFailure<undefined>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @template [T=undefined]\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {T} data Data associated with the failure (e.g. validation errors)\n * @overload\n * @param {number} status\n * @param {T} data\n * @returns {import('./public.js').ActionFailure<T>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status\n * @param {any} [data]\n * @returns {import('./public.js').ActionFailure<any>}\n */\nexport function fail(status, data) {\n\t// @ts-expect-error unique symbol missing\n\treturn new ActionFailure(status, data);\n}\n\n/**\n * Checks whether this is an action failure thrown by {@link fail}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n */\nexport function isActionFailure(e) {\n\treturn e instanceof ActionFailure;\n}\n\n/**\n * Use this to throw a validation error to imperatively fail form validation.\n * Can be used in combination with `issue` passed to form actions to create field-specific issues.\n *\n * @example\n * ```ts\n * import { invalid } from '@sveltejs/kit';\n * import { form } from '$app/server';\n * import { tryLogin } from '$lib/server/auth';\n * import * as v from 'valibot';\n *\n * export const login = form(\n * v.object({ name: v.string(), _password: v.string() }),\n * async ({ name, _password }) => {\n * const success = tryLogin(name, _password);\n * if (!success) {\n * invalid('Incorrect username or password');\n * }\n *\n * // ...\n * }\n * );\n * ```\n * @param {...(StandardSchemaV1.Issue | string)} issues\n * @returns {never}\n * @since 2.47.3\n */\nexport function invalid(...issues) {\n\tthrow new ValidationError(\n\t\tissues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue))\n\t);\n}\n\n/**\n * Checks whether this is an validation error thrown by {@link invalid}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n * @since 2.47.3\n */\nexport function isValidationError(e) {\n\treturn e instanceof ValidationError;\n}\n\n/**\n * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname.\n * Returns the normalized URL as well as a method for adding the potential suffix back\n * based on a new pathname (possibly including search) or URL.\n * ```js\n * import { normalizeUrl } from '@sveltejs/kit';\n *\n * const { url, denormalize } = normalizeUrl('/blog/post/__data.json');\n * console.log(url.pathname); // /blog/post\n * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json\n * ```\n * @param {URL | string} url\n * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}\n * @since 2.18.0\n */\nexport function normalizeUrl(url) {\n\turl = new URL(url, 'http://internal');\n\n\tconst is_route_resolution = has_resolution_suffix(url.pathname);\n\tconst is_data_request = has_data_suffix(url.pathname);\n\tconst has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/');\n\n\tif (is_route_resolution) {\n\t\turl.pathname = strip_resolution_suffix(url.pathname);\n\t} else if (is_data_request) {\n\t\turl.pathname = strip_data_suffix(url.pathname);\n\t} else if (has_trailing_slash) {\n\t\turl.pathname = url.pathname.slice(0, -1);\n\t}\n\n\treturn {\n\t\turl,\n\t\twasNormalized: is_data_request || is_route_resolution || has_trailing_slash,\n\t\tdenormalize: (new_url = url) => {\n\t\t\tnew_url = new URL(new_url, url);\n\t\t\tif (is_route_resolution) {\n\t\t\t\tnew_url.pathname = add_resolution_suffix(new_url.pathname);\n\t\t\t} else if (is_data_request) {\n\t\t\t\tnew_url.pathname = add_data_suffix(new_url.pathname);\n\t\t\t} else if (has_trailing_slash && !new_url.pathname.endsWith('/')) {\n\t\t\t\tnew_url.pathname += '/';\n\t\t\t}\n\t\t\treturn new_url;\n\t\t}\n\t};\n}\n"],"names":[],"mappings":"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","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index-CoD1IJuy.js","sources":["../../../../../node_modules/.pnpm/@sveltejs+kit@2.50.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.4_vite@7.3.1_@types+node@_7rfifmkgyfz45focxtgjon73im/node_modules/@sveltejs/kit/src/exports/internal/index.js","../../../../../node_modules/.pnpm/@sveltejs+kit@2.50.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.4_vite@7.3.1_@types+node@_7rfifmkgyfz45focxtgjon73im/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@2.50.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.4_vite@7.3.1_@types+node@_7rfifmkgyfz45focxtgjon73im/node_modules/@sveltejs/kit/src/exports/index.js"],"sourcesContent":["/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nexport class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.\n * `SvelteKitError` goes through `handleError`.\n * @extends Error\n */\nexport class SvelteKitError extends Error {\n\t/**\n\t * @param {number} status\n\t * @param {string} text\n\t * @param {string} message\n\t */\n\tconstructor(status, text, message) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.text = text;\n\t}\n}\n\n/**\n * @template [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} data\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * Error thrown when form validation fails imperatively\n */\nexport class ValidationError extends Error {\n\t/**\n\t * @param {StandardSchemaV1.Issue[]} issues\n\t */\n\tconstructor(issues) {\n\t\tsuper('Validation failed');\n\t\tthis.name = 'ValidationError';\n\t\tthis.issues = issues;\n\t}\n}\n\nexport { init_remote_functions } from './remote-functions.js';\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\nexport const text_decoder = new TextDecoder();\n\n/**\n * Like node's path.relative, but without using node\n * @param {string} from\n * @param {string} to\n */\nexport function get_relative_path(from, to) {\n\tconst from_parts = from.split(/[/\\\\]/);\n\tconst to_parts = to.split(/[/\\\\]/);\n\tfrom_parts.pop(); // get dirname\n\n\twhile (from_parts[0] === to_parts[0]) {\n\t\tfrom_parts.shift();\n\t\tto_parts.shift();\n\t}\n\n\tlet i = from_parts.length;\n\twhile (i--) from_parts[i] = '..';\n\n\treturn from_parts.concat(to_parts).join('/');\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js';\nimport { BROWSER, DEV } from 'esm-env';\nimport {\n\tadd_data_suffix,\n\tadd_resolution_suffix,\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../runtime/pathname.js';\nimport { text_encoder } from '../runtime/utils.js';\n\nexport { VERSION } from '../version.js';\n\n// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)\n/**\n * @template {number} TNumber\n * @template {any[]} [TArray=[]]\n * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan\n */\n\n/**\n * @template {number} TStart\n * @template {number} TEnd\n * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange\n */\n\n// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits\n// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780\n\n// we have to repeat the JSDoc because the display for function overloads is broken\n// see https://github.com/microsoft/TypeScript/issues/55056\n\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {App.Error} body\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\nexport function error(status, body) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) {\n\t\tthrow new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n\t}\n\n\tthrow new HttpError(status, body);\n}\n\n/**\n * Checks whether this is an error thrown by {@link error}.\n * @template {number} T\n * @param {unknown} e\n * @param {T} [status] The status to filter for.\n * @return {e is (HttpError & { status: T extends undefined ? never : T })}\n */\nexport function isHttpError(e, status) {\n\tif (!(e instanceof HttpError)) return false;\n\treturn !status || e.status === status;\n}\n\n/**\n * Redirect a request. When called during request handling, SvelteKit will return a redirect response.\n * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.\n *\n * Most common status codes:\n * * `303 See Other`: redirect as a GET request (often used after a form POST request)\n * * `307 Temporary Redirect`: redirect will keep the request method\n * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page\n *\n * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)\n *\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.\n * @param {string | URL} location The location to redirect to.\n * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.\n * @throws {Error} If the provided status is invalid.\n * @return {never}\n */\nexport function redirect(status, location) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) {\n\t\tthrow new Error('Invalid status code');\n\t}\n\n\tthrow new Redirect(\n\t\t// @ts-ignore\n\t\tstatus,\n\t\tlocation.toString()\n\t);\n}\n\n/**\n * Checks whether this is a redirect thrown by {@link redirect}.\n * @param {unknown} e The object to check.\n * @return {e is Redirect}\n */\nexport function isRedirect(e) {\n\treturn e instanceof Redirect;\n}\n\n/**\n * Create a JSON `Response` object from the supplied data.\n * @param {any} data The value that will be serialized as JSON.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.\n */\nexport function json(data, init) {\n\t// TODO deprecate this in favour of `Response.json` when it's\n\t// more widely supported\n\tconst body = JSON.stringify(data);\n\n\t// we can't just do `text(JSON.stringify(data), init)` because\n\t// it will set a default `content-type` header. duplicated code\n\t// means less duplicated work\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\theaders.set('content-length', text_encoder.encode(body).byteLength.toString());\n\t}\n\n\tif (!headers.has('content-type')) {\n\t\theaders.set('content-type', 'application/json');\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create a `Response` object from the supplied body.\n * @param {string} body The value that will be used as-is.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.\n */\nexport function text(body, init) {\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\tconst encoded = text_encoder.encode(body);\n\t\theaders.set('content-length', encoded.byteLength.toString());\n\t\treturn new Response(encoded, {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @overload\n * @param {number} status\n * @returns {import('./public.js').ActionFailure<undefined>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @template [T=undefined]\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {T} data Data associated with the failure (e.g. validation errors)\n * @overload\n * @param {number} status\n * @param {T} data\n * @returns {import('./public.js').ActionFailure<T>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status\n * @param {any} [data]\n * @returns {import('./public.js').ActionFailure<any>}\n */\nexport function fail(status, data) {\n\t// @ts-expect-error unique symbol missing\n\treturn new ActionFailure(status, data);\n}\n\n/**\n * Checks whether this is an action failure thrown by {@link fail}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n */\nexport function isActionFailure(e) {\n\treturn e instanceof ActionFailure;\n}\n\n/**\n * Use this to throw a validation error to imperatively fail form validation.\n * Can be used in combination with `issue` passed to form actions to create field-specific issues.\n *\n * @example\n * ```ts\n * import { invalid } from '@sveltejs/kit';\n * import { form } from '$app/server';\n * import { tryLogin } from '$lib/server/auth';\n * import * as v from 'valibot';\n *\n * export const login = form(\n * v.object({ name: v.string(), _password: v.string() }),\n * async ({ name, _password }) => {\n * const success = tryLogin(name, _password);\n * if (!success) {\n * invalid('Incorrect username or password');\n * }\n *\n * // ...\n * }\n * );\n * ```\n * @param {...(StandardSchemaV1.Issue | string)} issues\n * @returns {never}\n * @since 2.47.3\n */\nexport function invalid(...issues) {\n\tthrow new ValidationError(\n\t\tissues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue))\n\t);\n}\n\n/**\n * Checks whether this is an validation error thrown by {@link invalid}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n * @since 2.47.3\n */\nexport function isValidationError(e) {\n\treturn e instanceof ValidationError;\n}\n\n/**\n * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname.\n * Returns the normalized URL as well as a method for adding the potential suffix back\n * based on a new pathname (possibly including search) or URL.\n * ```js\n * import { normalizeUrl } from '@sveltejs/kit';\n *\n * const { url, denormalize } = normalizeUrl('/blog/post/__data.json');\n * console.log(url.pathname); // /blog/post\n * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json\n * ```\n * @param {URL | string} url\n * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}\n * @since 2.18.0\n */\nexport function normalizeUrl(url) {\n\turl = new URL(url, 'http://internal');\n\n\tconst is_route_resolution = has_resolution_suffix(url.pathname);\n\tconst is_data_request = has_data_suffix(url.pathname);\n\tconst has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/');\n\n\tif (is_route_resolution) {\n\t\turl.pathname = strip_resolution_suffix(url.pathname);\n\t} else if (is_data_request) {\n\t\turl.pathname = strip_data_suffix(url.pathname);\n\t} else if (has_trailing_slash) {\n\t\turl.pathname = url.pathname.slice(0, -1);\n\t}\n\n\treturn {\n\t\turl,\n\t\twasNormalized: is_data_request || is_route_resolution || has_trailing_slash,\n\t\tdenormalize: (new_url = url) => {\n\t\t\tnew_url = new URL(new_url, url);\n\t\t\tif (is_route_resolution) {\n\t\t\t\tnew_url.pathname = add_resolution_suffix(new_url.pathname);\n\t\t\t} else if (is_data_request) {\n\t\t\t\tnew_url.pathname = add_data_suffix(new_url.pathname);\n\t\t\t} else if (has_trailing_slash && !new_url.pathname.endsWith('/')) {\n\t\t\t\tnew_url.pathname += '/';\n\t\t\t}\n\t\t\treturn new_url;\n\t\t}\n\t};\n}\n"],"names":[],"mappings":"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","x_google_ignoreList":[0,1,2]}
@@ -198,6 +198,39 @@ function invoke_error_boundary(error, effect) {
198
198
  }
199
199
  throw error;
200
200
  }
201
+ const STATUS_MASK = -7169;
202
+ function set_signal_status(signal, status) {
203
+ signal.f = signal.f & STATUS_MASK | status;
204
+ }
205
+ function update_derived_status(derived) {
206
+ if ((derived.f & CONNECTED) !== 0 || derived.deps === null) {
207
+ set_signal_status(derived, CLEAN);
208
+ } else {
209
+ set_signal_status(derived, MAYBE_DIRTY);
210
+ }
211
+ }
212
+ function clear_marked(deps) {
213
+ if (deps === null) return;
214
+ for (const dep of deps) {
215
+ if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {
216
+ continue;
217
+ }
218
+ dep.f ^= WAS_MARKED;
219
+ clear_marked(
220
+ /** @type {Derived} */
221
+ dep.deps
222
+ );
223
+ }
224
+ }
225
+ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
226
+ if ((effect.f & DIRTY) !== 0) {
227
+ dirty_effects.add(effect);
228
+ } else if ((effect.f & MAYBE_DIRTY) !== 0) {
229
+ maybe_dirty_effects.add(effect);
230
+ }
231
+ clear_marked(effect.deps);
232
+ set_signal_status(effect, CLEAN);
233
+ }
201
234
  const batches = /* @__PURE__ */ new Set();
202
235
  let current_batch = null;
203
236
  let batch_values = null;
@@ -271,25 +304,21 @@ class Batch {
271
304
  process(root_effects) {
272
305
  queued_root_effects = [];
273
306
  this.apply();
274
- var target = {
275
- parent: null,
276
- effect: null,
277
- effects: [],
278
- render_effects: []
279
- };
307
+ var effects = [];
308
+ var render_effects = [];
280
309
  for (const root of root_effects) {
281
- this.#traverse_effect_tree(root, target);
310
+ this.#traverse_effect_tree(root, effects, render_effects);
282
311
  }
283
312
  if (!this.is_fork) {
284
313
  this.#resolve();
285
314
  }
286
315
  if (this.is_deferred()) {
287
- this.#defer_effects(target.effects);
288
- this.#defer_effects(target.render_effects);
316
+ this.#defer_effects(render_effects);
317
+ this.#defer_effects(effects);
289
318
  } else {
290
319
  current_batch = null;
291
- flush_queued_effects(target.render_effects);
292
- flush_queued_effects(target.effects);
320
+ flush_queued_effects(render_effects);
321
+ flush_queued_effects(effects);
293
322
  this.#deferred?.resolve();
294
323
  }
295
324
  batch_values = null;
@@ -298,31 +327,27 @@ class Batch {
298
327
  * Traverse the effect tree, executing effects or stashing
299
328
  * them for later execution as appropriate
300
329
  * @param {Effect} root
301
- * @param {EffectTarget} target
330
+ * @param {Effect[]} effects
331
+ * @param {Effect[]} render_effects
302
332
  */
303
- #traverse_effect_tree(root, target) {
333
+ #traverse_effect_tree(root, effects, render_effects) {
304
334
  root.f ^= CLEAN;
305
335
  var effect = root.first;
336
+ var pending_boundary = null;
306
337
  while (effect !== null) {
307
338
  var flags = effect.f;
308
339
  var is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;
309
340
  var is_skippable_branch = is_branch && (flags & CLEAN) !== 0;
310
341
  var skip = is_skippable_branch || (flags & INERT) !== 0 || this.skipped_effects.has(effect);
311
- if ((effect.f & BOUNDARY_EFFECT) !== 0 && effect.b?.is_pending()) {
312
- target = {
313
- parent: target,
314
- effect,
315
- effects: [],
316
- render_effects: []
317
- };
318
- }
319
342
  if (!skip && effect.fn !== null) {
320
343
  if (is_branch) {
321
344
  effect.f ^= CLEAN;
345
+ } else if (pending_boundary !== null && (flags & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0) {
346
+ pending_boundary.b.defer_effect(effect);
322
347
  } else if ((flags & EFFECT) !== 0) {
323
- target.effects.push(effect);
348
+ effects.push(effect);
324
349
  } else if (is_dirty(effect)) {
325
- if ((effect.f & BLOCK_EFFECT) !== 0) this.#dirty_effects.add(effect);
350
+ if ((flags & BLOCK_EFFECT) !== 0) this.#dirty_effects.add(effect);
326
351
  update_effect(effect);
327
352
  }
328
353
  var child = effect.first;
@@ -334,11 +359,8 @@ class Batch {
334
359
  var parent = effect.parent;
335
360
  effect = effect.next;
336
361
  while (effect === null && parent !== null) {
337
- if (parent === target.effect) {
338
- this.#defer_effects(target.effects);
339
- this.#defer_effects(target.render_effects);
340
- target = /** @type {EffectTarget} */
341
- target.parent;
362
+ if (parent === pending_boundary) {
363
+ pending_boundary = null;
342
364
  }
343
365
  effect = parent.next;
344
366
  parent = parent.parent;
@@ -349,30 +371,8 @@ class Batch {
349
371
  * @param {Effect[]} effects
350
372
  */
351
373
  #defer_effects(effects) {
352
- for (const e of effects) {
353
- if ((e.f & DIRTY) !== 0) {
354
- this.#dirty_effects.add(e);
355
- } else if ((e.f & MAYBE_DIRTY) !== 0) {
356
- this.#maybe_dirty_effects.add(e);
357
- }
358
- this.#clear_marked(e.deps);
359
- set_signal_status(e, CLEAN);
360
- }
361
- }
362
- /**
363
- * @param {Value[] | null} deps
364
- */
365
- #clear_marked(deps) {
366
- if (deps === null) return;
367
- for (const dep of deps) {
368
- if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {
369
- continue;
370
- }
371
- dep.f ^= WAS_MARKED;
372
- this.#clear_marked(
373
- /** @type {Derived} */
374
- dep.deps
375
- );
374
+ for (var i = 0; i < effects.length; i += 1) {
375
+ defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
376
376
  }
377
377
  }
378
378
  /**
@@ -382,7 +382,7 @@ class Batch {
382
382
  * @param {any} value
383
383
  */
384
384
  capture(source2, value) {
385
- if (!this.previous.has(source2)) {
385
+ if (value !== UNINITIALIZED && !this.previous.has(source2)) {
386
386
  this.previous.set(source2, value);
387
387
  }
388
388
  if ((source2.f & ERROR_VALUE) === 0) {
@@ -429,12 +429,6 @@ class Batch {
429
429
  this.previous.clear();
430
430
  var previous_batch_values = batch_values;
431
431
  var is_earlier = true;
432
- var dummy_target = {
433
- parent: null,
434
- effect: null,
435
- effects: [],
436
- render_effects: []
437
- };
438
432
  for (const batch of batches) {
439
433
  if (batch === this) {
440
434
  is_earlier = false;
@@ -467,7 +461,7 @@ class Batch {
467
461
  current_batch = batch;
468
462
  batch.apply();
469
463
  for (const root of queued_root_effects) {
470
- batch.#traverse_effect_tree(root, dummy_target);
464
+ batch.#traverse_effect_tree(root, [], []);
471
465
  }
472
466
  batch.deactivate();
473
467
  }
@@ -747,10 +741,14 @@ function execute_derived(derived) {
747
741
  function update_derived(derived) {
748
742
  var value = execute_derived(derived);
749
743
  if (!derived.equals(value)) {
750
- if (!current_batch?.is_fork) {
744
+ derived.wv = increment_write_version();
745
+ if (!current_batch?.is_fork || derived.deps === null) {
751
746
  derived.v = value;
747
+ if (derived.deps === null) {
748
+ set_signal_status(derived, CLEAN);
749
+ return;
750
+ }
752
751
  }
753
- derived.wv = increment_write_version();
754
752
  }
755
753
  if (is_destroying_effect) {
756
754
  return;
@@ -760,8 +758,7 @@ function update_derived(derived) {
760
758
  batch_values.set(derived, value);
761
759
  }
762
760
  } else {
763
- var status = (derived.f & CONNECTED) === 0 ? MAYBE_DIRTY : CLEAN;
764
- set_signal_status(derived, status);
761
+ update_derived_status(derived);
765
762
  }
766
763
  }
767
764
  let eager_effects = /* @__PURE__ */ new Set();
@@ -814,13 +811,14 @@ function internal_set(source2, value) {
814
811
  var batch = Batch.ensure();
815
812
  batch.capture(source2, old_value);
816
813
  if ((source2.f & DERIVED) !== 0) {
814
+ const derived = (
815
+ /** @type {Derived} */
816
+ source2
817
+ );
817
818
  if ((source2.f & DIRTY) !== 0) {
818
- execute_derived(
819
- /** @type {Derived} */
820
- source2
821
- );
819
+ execute_derived(derived);
822
820
  }
823
- set_signal_status(source2, (source2.f & CONNECTED) !== 0 ? CLEAN : MAYBE_DIRTY);
821
+ update_derived_status(derived);
824
822
  }
825
823
  source2.wv = increment_write_version();
826
824
  mark_reactions(source2, DIRTY);
@@ -1428,23 +1426,24 @@ function is_dirty(reaction) {
1428
1426
  reaction.f &= ~WAS_MARKED;
1429
1427
  }
1430
1428
  if ((flags & MAYBE_DIRTY) !== 0) {
1431
- var dependencies = reaction.deps;
1432
- if (dependencies !== null) {
1433
- var length = dependencies.length;
1434
- for (var i = 0; i < length; i++) {
1435
- var dependency = dependencies[i];
1436
- if (is_dirty(
1429
+ var dependencies = (
1430
+ /** @type {Value[]} */
1431
+ reaction.deps
1432
+ );
1433
+ var length = dependencies.length;
1434
+ for (var i = 0; i < length; i++) {
1435
+ var dependency = dependencies[i];
1436
+ if (is_dirty(
1437
+ /** @type {Derived} */
1438
+ dependency
1439
+ )) {
1440
+ update_derived(
1437
1441
  /** @type {Derived} */
1438
1442
  dependency
1439
- )) {
1440
- update_derived(
1441
- /** @type {Derived} */
1442
- dependency
1443
- );
1444
- }
1445
- if (dependency.wv > reaction.wv) {
1446
- return true;
1447
- }
1443
+ );
1444
+ }
1445
+ if (dependency.wv > reaction.wv) {
1446
+ return true;
1448
1447
  }
1449
1448
  }
1450
1449
  if ((flags & CONNECTED) !== 0 && // During time traveling we don't want to reset the status so that
@@ -1593,20 +1592,17 @@ function remove_reaction(signal, dependency) {
1593
1592
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1594
1593
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1595
1594
  (new_deps === null || !new_deps.includes(dependency))) {
1596
- set_signal_status(dependency, MAYBE_DIRTY);
1597
- if ((dependency.f & CONNECTED) !== 0) {
1598
- dependency.f ^= CONNECTED;
1599
- dependency.f &= ~WAS_MARKED;
1600
- }
1601
- destroy_derived_effects(
1602
- /** @type {Derived} **/
1595
+ var derived = (
1596
+ /** @type {Derived} */
1603
1597
  dependency
1604
1598
  );
1605
- remove_reactions(
1606
- /** @type {Derived} **/
1607
- dependency,
1608
- 0
1609
- );
1599
+ if ((derived.f & CONNECTED) !== 0) {
1600
+ derived.f ^= CONNECTED;
1601
+ derived.f &= ~WAS_MARKED;
1602
+ }
1603
+ update_derived_status(derived);
1604
+ destroy_derived_effects(derived);
1605
+ remove_reactions(derived, 0);
1610
1606
  }
1611
1607
  }
1612
1608
  function remove_reactions(signal, start_index) {
@@ -1672,15 +1668,15 @@ function get$1(signal) {
1672
1668
  }
1673
1669
  }
1674
1670
  }
1675
- if (is_destroying_effect) {
1676
- if (old_values.has(signal)) {
1677
- return old_values.get(signal);
1678
- }
1679
- if (is_derived) {
1680
- var derived = (
1681
- /** @type {Derived} */
1682
- signal
1683
- );
1671
+ if (is_destroying_effect && old_values.has(signal)) {
1672
+ return old_values.get(signal);
1673
+ }
1674
+ if (is_derived) {
1675
+ var derived = (
1676
+ /** @type {Derived} */
1677
+ signal
1678
+ );
1679
+ if (is_destroying_effect) {
1684
1680
  var value = derived.v;
1685
1681
  if ((derived.f & CLEAN) === 0 && derived.reactions !== null || depends_on_old_values(derived)) {
1686
1682
  value = execute_derived(derived);
@@ -1688,13 +1684,15 @@ function get$1(signal) {
1688
1684
  old_values.set(derived, value);
1689
1685
  return value;
1690
1686
  }
1691
- } else if (is_derived && (!batch_values?.has(signal) || current_batch?.is_fork && !effect_tracking())) {
1692
- derived = /** @type {Derived} */
1693
- signal;
1687
+ var should_connect = (derived.f & CONNECTED) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & CONNECTED) !== 0);
1688
+ var is_new = derived.deps === null;
1694
1689
  if (is_dirty(derived)) {
1690
+ if (should_connect) {
1691
+ derived.f |= CONNECTED;
1692
+ }
1695
1693
  update_derived(derived);
1696
1694
  }
1697
- if (is_updating_effect && effect_tracking() && (derived.f & CONNECTED) === 0) {
1695
+ if (should_connect && !is_new) {
1698
1696
  reconnect(derived);
1699
1697
  }
1700
1698
  }
@@ -1708,7 +1706,7 @@ function get$1(signal) {
1708
1706
  }
1709
1707
  function reconnect(derived) {
1710
1708
  if (derived.deps === null) return;
1711
- derived.f ^= CONNECTED;
1709
+ derived.f |= CONNECTED;
1712
1710
  for (const dep of derived.deps) {
1713
1711
  (dep.reactions ??= []).push(derived);
1714
1712
  if ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) {
@@ -1744,10 +1742,6 @@ function untrack(fn) {
1744
1742
  untracking = previous_untracking;
1745
1743
  }
1746
1744
  }
1747
- const STATUS_MASK = -7169;
1748
- function set_signal_status(signal, status) {
1749
- signal.f = signal.f & STATUS_MASK | status;
1750
- }
1751
1745
  const ATTR_REGEX = /[&"<]/g;
1752
1746
  const CONTENT_REGEX = /[&<]/g;
1753
1747
  function escape_html(value, is_attr) {
@@ -1927,5 +1921,5 @@ function get(store) {
1927
1921
  return value;
1928
1922
  }
1929
1923
 
1930
- export { object_prototype as $, internal_set as A, Batch as B, COMMENT_NODE as C, destroy_effect as D, invoke_error_boundary as E, queue_micro_task as F, svelte_boundary_reset_onerror as G, HYDRATION_START as H, effect_tracking as I, source as J, render_effect as K, LEGACY_PROPS as L, HYDRATION_END as M, HYDRATION_START_ELSE as N, untrack as O, increment as P, push$1 as Q, pop$1 as R, EFFECT_TRANSPARENT as S, EFFECT_PRESERVED as T, BOUNDARY_EFFECT as U, BROWSER as V, readable as W, writable as X, escape_html as Y, is_array as Z, get_prototype_of as _, get_first_child as a, getContext as a0, noop as a1, ssr_context as a2, get as a3, derived as a4, set_ssr_context as a5, push as a6, pop as a7, STALE_REACTION as a8, ELEMENT_PRESERVE_ATTRIBUTE_CASE as a9, ELEMENT_IS_INPUT as aa, ELEMENT_IS_NAMESPACED as ab, subscribe_to_store as ac, is_promise as ad, get_next_sibling as b, HYDRATION_ERROR as c, define_property as d, clear_text_content as e, flushSync as f, get$1 as g, hydration_failed as h, init_operations as i, array_from as j, component_root as k, set_active_reaction as l, mutable_source as m, set_active_effect as n, active_effect as o, active_reaction as p, create_text as q, setContext as r, set as s, block as t, branch as u, pause_effect as v, set_component_context as w, handle_error as x, component_context as y, move_effect as z };
1931
- //# sourceMappingURL=index-DzYX9r1_.js.map
1924
+ export { readable as $, move_effect as A, Batch as B, COMMENT_NODE as C, set_signal_status as D, DIRTY as E, schedule_effect as F, internal_set as G, HYDRATION_START as H, destroy_effect as I, invoke_error_boundary as J, queue_micro_task as K, LEGACY_PROPS as L, MAYBE_DIRTY as M, svelte_boundary_reset_onerror as N, effect_tracking as O, source as P, render_effect as Q, HYDRATION_END as R, HYDRATION_START_ELSE as S, untrack as T, increment as U, push$1 as V, pop$1 as W, EFFECT_TRANSPARENT as X, EFFECT_PRESERVED as Y, BOUNDARY_EFFECT as Z, BROWSER as _, get_first_child as a, writable as a0, escape_html as a1, is_array as a2, get_prototype_of as a3, object_prototype as a4, getContext as a5, noop as a6, ssr_context as a7, get as a8, derived as a9, set_ssr_context as aa, push as ab, pop as ac, STALE_REACTION as ad, ELEMENT_PRESERVE_ATTRIBUTE_CASE as ae, ELEMENT_IS_INPUT as af, ELEMENT_IS_NAMESPACED as ag, subscribe_to_store as ah, is_promise as ai, get_next_sibling as b, HYDRATION_ERROR as c, define_property as d, clear_text_content as e, flushSync as f, get$1 as g, hydration_failed as h, init_operations as i, array_from as j, component_root as k, set_active_reaction as l, mutable_source as m, set_active_effect as n, active_effect as o, active_reaction as p, create_text as q, setContext as r, set as s, block as t, branch as u, pause_effect as v, defer_effect as w, set_component_context as x, handle_error as y, component_context as z };
1925
+ //# sourceMappingURL=index2-ybZwlzIk.js.map