fundus 0.0.2 → 0.0.4

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 (303) hide show
  1. package/README.md +73 -0
  2. package/build/client/_app/immutable/assets/0.DLhIsYA_.css.br +0 -0
  3. package/build/client/_app/immutable/assets/0.DLhIsYA_.css.gz +0 -0
  4. package/build/client/_app/immutable/assets/2.ohi-TClG.css +1 -0
  5. package/build/client/_app/immutable/assets/2.ohi-TClG.css.br +0 -0
  6. package/build/client/_app/immutable/assets/2.ohi-TClG.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/3.JwgtcTEd.css +1 -0
  8. package/build/client/_app/immutable/assets/3.JwgtcTEd.css.br +0 -0
  9. package/build/client/_app/immutable/assets/3.JwgtcTEd.css.gz +0 -0
  10. package/build/client/_app/immutable/assets/4.p004hmEN.css +1 -0
  11. package/build/client/_app/immutable/assets/4.p004hmEN.css.br +0 -0
  12. package/build/client/_app/immutable/assets/4.p004hmEN.css.gz +0 -0
  13. package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css +1 -0
  14. package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css.br +0 -0
  15. package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css.gz +0 -0
  16. package/build/client/_app/immutable/assets/LibraryContextMenu.CMefGNE2.css +1 -0
  17. package/build/client/_app/immutable/assets/LibraryContextMenu.CMefGNE2.css.br +0 -0
  18. package/build/client/_app/immutable/assets/LibraryContextMenu.CMefGNE2.css.gz +0 -0
  19. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  20. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/CNRz3sSw.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/CNRz3sSw.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/CO4RBJfa.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/CO4RBJfa.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/DOpBpjxS.js +108 -0
  26. package/build/client/_app/immutable/chunks/DOpBpjxS.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/DOpBpjxS.js.gz +0 -0
  28. package/{dist/editor/_app/immutable/chunks/BfPE5wdt.js → build/client/_app/immutable/chunks/DVEQFclp.js} +1 -1
  29. package/build/client/_app/immutable/chunks/DVEQFclp.js.br +1 -0
  30. package/build/client/_app/immutable/chunks/DVEQFclp.js.gz +0 -0
  31. package/{dist/editor/_app/immutable/chunks/DjvOiDmq.js → build/client/_app/immutable/chunks/DiFoWL2c.js} +1 -1
  32. package/build/client/_app/immutable/chunks/DiFoWL2c.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/DiFoWL2c.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/DkADHpZF.js +1 -0
  35. package/build/client/_app/immutable/chunks/DkADHpZF.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/DkADHpZF.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
  38. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  39. package/{dist/editor/_app/immutable/entry/app.BkqbfI8n.js → build/client/_app/immutable/entry/app.CKgtYXQb.js} +2 -2
  40. package/build/client/_app/immutable/entry/app.CKgtYXQb.js.br +0 -0
  41. package/build/client/_app/immutable/entry/app.CKgtYXQb.js.gz +0 -0
  42. package/build/client/_app/immutable/entry/start.CYZu5qE1.js +1 -0
  43. package/build/client/_app/immutable/entry/start.CYZu5qE1.js.br +0 -0
  44. package/build/client/_app/immutable/entry/start.CYZu5qE1.js.gz +0 -0
  45. package/{dist/editor/_app/immutable/nodes/0.xdMI5GEU.js → build/client/_app/immutable/nodes/0.I_1SApYQ.js} +1 -1
  46. package/build/client/_app/immutable/nodes/0.I_1SApYQ.js.br +0 -0
  47. package/build/client/_app/immutable/nodes/0.I_1SApYQ.js.gz +0 -0
  48. package/{dist/editor/_app/immutable/nodes/1.D9p2tfoJ.js → build/client/_app/immutable/nodes/1.v6eUTnWq.js} +1 -1
  49. package/build/client/_app/immutable/nodes/1.v6eUTnWq.js.br +2 -0
  50. package/build/client/_app/immutable/nodes/1.v6eUTnWq.js.gz +0 -0
  51. package/build/client/_app/immutable/nodes/2.DoA7Dfl-.js +3 -0
  52. package/build/client/_app/immutable/nodes/2.DoA7Dfl-.js.br +0 -0
  53. package/build/client/_app/immutable/nodes/2.DoA7Dfl-.js.gz +0 -0
  54. package/build/client/_app/immutable/nodes/3.C-DO70Bs.js +1 -0
  55. package/build/client/_app/immutable/nodes/3.C-DO70Bs.js.br +0 -0
  56. package/build/client/_app/immutable/nodes/3.C-DO70Bs.js.gz +0 -0
  57. package/build/client/_app/immutable/nodes/4.CALOuSyz.js +2 -0
  58. package/build/client/_app/immutable/nodes/4.CALOuSyz.js.br +0 -0
  59. package/build/client/_app/immutable/nodes/4.CALOuSyz.js.gz +0 -0
  60. package/build/client/_app/version.json +1 -0
  61. package/build/client/_app/version.json.br +0 -0
  62. package/build/client/_app/version.json.gz +0 -0
  63. package/build/env.js +100 -0
  64. package/build/env.js.map +1 -0
  65. package/build/handler.js +22 -0
  66. package/build/handler.js.map +1 -0
  67. package/build/index.js +145 -0
  68. package/build/index.js.map +1 -0
  69. package/build/server/chunks/chunks/context.js-BUZqFfWG.js +429 -0
  70. package/build/server/chunks/chunks/context.js-BUZqFfWG.js.map +1 -0
  71. package/build/server/chunks/chunks/core.js-xfrkaQpS.js +458 -0
  72. package/build/server/chunks/chunks/core.js-xfrkaQpS.js.map +1 -0
  73. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  74. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js.map +1 -0
  75. package/build/server/chunks/chunks/exports.js-C0rwMMtk.js +152 -0
  76. package/build/server/chunks/chunks/exports.js-C0rwMMtk.js.map +1 -0
  77. package/build/server/chunks/chunks/folder-path.js-ytx9ucgg.js +64 -0
  78. package/build/server/chunks/chunks/folder-path.js-ytx9ucgg.js.map +1 -0
  79. package/build/server/chunks/chunks/http.js-DvopzwKh.js +100 -0
  80. package/build/server/chunks/chunks/http.js-DvopzwKh.js.map +1 -0
  81. package/build/server/chunks/chunks/internal.js-DGo2jPcg.js +5753 -0
  82. package/build/server/chunks/chunks/internal.js-DGo2jPcg.js.map +1 -0
  83. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js +22 -0
  84. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -0
  85. package/{dist/operations-DYM-5KVl.js → build/server/chunks/chunks/library-store.js-ZLudCJlT.js} +463 -492
  86. package/build/server/chunks/chunks/library-store.js-ZLudCJlT.js.map +1 -0
  87. package/build/server/chunks/chunks/manifest-appearance.js-DTk355LQ.js +146 -0
  88. package/build/server/chunks/chunks/manifest-appearance.js-DTk355LQ.js.map +1 -0
  89. package/build/server/chunks/chunks/routing.js-y-tryuip.js +213 -0
  90. package/build/server/chunks/chunks/routing.js-y-tryuip.js.map +1 -0
  91. package/build/server/chunks/chunks/shared.js-B1gC9MiJ.js +255 -0
  92. package/build/server/chunks/chunks/shared.js-B1gC9MiJ.js.map +1 -0
  93. package/build/server/chunks/chunks/utils.js-DnEJ3UjO.js +1048 -0
  94. package/build/server/chunks/chunks/utils.js-DnEJ3UjO.js.map +1 -0
  95. package/build/server/chunks/entries/endpoints/api/_...path_/_server.ts.js-Cq5gXVQT.js +27 -0
  96. package/build/server/chunks/entries/endpoints/api/_...path_/_server.ts.js-Cq5gXVQT.js.map +1 -0
  97. package/build/server/chunks/entries/endpoints/api/assets/_id_/_server.ts.js-RXbedi8q.js +24 -0
  98. package/build/server/chunks/entries/endpoints/api/assets/_id_/_server.ts.js-RXbedi8q.js.map +1 -0
  99. package/build/server/chunks/entries/endpoints/api/assets/_server.ts.js-D7Qae9vU.js +45 -0
  100. package/build/server/chunks/entries/endpoints/api/assets/_server.ts.js-D7Qae9vU.js.map +1 -0
  101. package/build/server/chunks/entries/endpoints/api/assets/delete/_server.ts.js-DtO20kgB.js +31 -0
  102. package/build/server/chunks/entries/endpoints/api/assets/delete/_server.ts.js-DtO20kgB.js.map +1 -0
  103. package/build/server/chunks/entries/endpoints/api/assets/move/_server.ts.js-BUebPbd5.js +31 -0
  104. package/build/server/chunks/entries/endpoints/api/assets/move/_server.ts.js-BUebPbd5.js.map +1 -0
  105. package/build/server/chunks/entries/endpoints/api/folders/_path_/_server.ts.js-BjT2qPMT.js +38 -0
  106. package/build/server/chunks/entries/endpoints/api/folders/_path_/_server.ts.js-BjT2qPMT.js.map +1 -0
  107. package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-DYRLsoT7.js +31 -0
  108. package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-DYRLsoT7.js.map +1 -0
  109. package/build/server/chunks/entries/endpoints/api/manifests/_name_/_server.ts.js-BbN2fGNN.js +24 -0
  110. package/build/server/chunks/entries/endpoints/api/manifests/_name_/_server.ts.js-BbN2fGNN.js.map +1 -0
  111. package/build/server/chunks/entries/endpoints/api/manifests/_server.ts.js-b_MKZ41b.js +31 -0
  112. package/build/server/chunks/entries/endpoints/api/manifests/_server.ts.js-b_MKZ41b.js.map +1 -0
  113. package/build/server/chunks/entries/endpoints/api/state/_server.ts.js-evEfMpvn.js +24 -0
  114. package/build/server/chunks/entries/endpoints/api/state/_server.ts.js-evEfMpvn.js.map +1 -0
  115. package/build/server/chunks/entries/endpoints/files/_...path_/_server.ts.js-C04XE_1w.js +27 -0
  116. package/build/server/chunks/entries/endpoints/files/_...path_/_server.ts.js-C04XE_1w.js.map +1 -0
  117. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/_server.ts.js-DB8TdoEv.js +24 -0
  118. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/_server.ts.js-DB8TdoEv.js.map +1 -0
  119. package/build/server/chunks/entries/endpoints/files/raw/_...path_/_server.ts.js-BrpaijZO.js +24 -0
  120. package/build/server/chunks/entries/endpoints/files/raw/_...path_/_server.ts.js-BrpaijZO.js.map +1 -0
  121. package/build/server/chunks/entries/hooks.server.js-BJJwZW_I.js +23 -0
  122. package/build/server/chunks/entries/hooks.server.js-BJJwZW_I.js.map +1 -0
  123. package/build/server/chunks/handler-DnbS2t1B.js +1475 -0
  124. package/build/server/chunks/handler-DnbS2t1B.js.map +1 -0
  125. package/build/server/chunks/index.js-g77q3Boj.js +3789 -0
  126. package/build/server/chunks/index.js-g77q3Boj.js.map +1 -0
  127. package/build/server/chunks/manifest.js-qmEXbstS.js +149 -0
  128. package/build/server/chunks/manifest.js-qmEXbstS.js.map +1 -0
  129. package/build/server/chunks/nodes/0.js-Bk6IZ-vD.js +11 -0
  130. package/build/server/chunks/nodes/0.js-Bk6IZ-vD.js.map +1 -0
  131. package/build/server/chunks/nodes/1.js-H-qwo4GJ.js +7 -0
  132. package/build/server/chunks/nodes/1.js-H-qwo4GJ.js.map +1 -0
  133. package/build/server/chunks/nodes/2.js-DRpXVLwp.js +7 -0
  134. package/build/server/chunks/nodes/2.js-DRpXVLwp.js.map +1 -0
  135. package/build/server/chunks/nodes/3.js-CDEzNFeU.js +7 -0
  136. package/build/server/chunks/nodes/3.js-CDEzNFeU.js.map +1 -0
  137. package/build/server/chunks/nodes/4.js-BKL7LSSm.js +7 -0
  138. package/build/server/chunks/nodes/4.js-BKL7LSSm.js.map +1 -0
  139. package/build/shims.js +33 -0
  140. package/build/shims.js.map +1 -0
  141. package/dist/cli.d.ts +2 -1
  142. package/dist/cli.js +116 -1336
  143. package/dist/config.d.ts +3 -2
  144. package/dist/config.js +2 -2
  145. package/dist/core/api-types.d.ts +141 -0
  146. package/dist/core/api-types.js +1 -0
  147. package/dist/core/asset-id.d.ts +28 -0
  148. package/dist/core/asset-id.js +59 -0
  149. package/dist/core/asset-reference.d.ts +23 -0
  150. package/dist/core/asset-reference.js +15 -0
  151. package/dist/core/canonicalize.d.ts +9 -0
  152. package/dist/core/canonicalize.js +36 -0
  153. package/dist/core/chroma-key.d.ts +30 -0
  154. package/dist/core/chroma-key.js +55 -0
  155. package/dist/core/config.d.ts +35 -0
  156. package/dist/core/config.js +4 -0
  157. package/dist/core/folder-path.d.ts +19 -0
  158. package/dist/core/folder-path.js +86 -0
  159. package/dist/core/index.d.ts +33 -499
  160. package/dist/core/index.js +17 -962
  161. package/dist/core/ingest.d.ts +24 -0
  162. package/dist/core/ingest.js +42 -0
  163. package/dist/core/library.d.ts +54 -0
  164. package/dist/core/library.js +138 -0
  165. package/dist/core/manifest-appearance.d.ts +35 -0
  166. package/dist/core/manifest-appearance.js +123 -0
  167. package/dist/core/manifest-entry.d.ts +104 -0
  168. package/dist/core/manifest-entry.js +1 -0
  169. package/dist/core/manifest-membership.d.ts +56 -0
  170. package/dist/core/manifest-membership.js +54 -0
  171. package/dist/core/plugins/audio.d.ts +26 -0
  172. package/dist/core/plugins/audio.js +44 -0
  173. package/dist/core/plugins/chroma-key-video.d.ts +29 -0
  174. package/dist/core/plugins/chroma-key-video.js +69 -0
  175. package/dist/core/plugins/contract.d.ts +35 -0
  176. package/dist/core/plugins/contract.js +1 -0
  177. package/dist/core/plugins/image.d.ts +30 -0
  178. package/dist/core/plugins/image.js +45 -0
  179. package/dist/core/plugins/registry.d.ts +16 -0
  180. package/dist/core/plugins/registry.js +52 -0
  181. package/dist/core/plugins/slice.d.ts +22 -0
  182. package/dist/core/plugins/slice.js +60 -0
  183. package/dist/core/plugins/video.d.ts +45 -0
  184. package/dist/core/plugins/video.js +77 -0
  185. package/dist/core/reference-graph.d.ts +41 -0
  186. package/dist/core/reference-graph.js +138 -0
  187. package/dist/core/slice-data.d.ts +61 -0
  188. package/dist/core/slice-data.js +49 -0
  189. package/dist/runtime/chroma-key-gl.d.ts +40 -22
  190. package/dist/runtime/chroma-key-gl.js +189 -183
  191. package/dist/runtime/components/ChromaKeyVideo.svelte +3 -3
  192. package/dist/runtime/components/ChromaKeyVideo.svelte.d.ts +21 -0
  193. package/dist/runtime/components/Image.svelte +1 -1
  194. package/dist/runtime/components/Image.svelte.d.ts +9 -0
  195. package/dist/runtime/components/Slice.svelte +1 -1
  196. package/dist/runtime/components/Slice.svelte.d.ts +19 -0
  197. package/dist/runtime/components/SliceCanvas.svelte +3 -3
  198. package/dist/runtime/components/SliceCanvas.svelte.d.ts +10 -0
  199. package/dist/runtime/components/SliceDom.svelte +3 -3
  200. package/dist/runtime/components/SliceDom.svelte.d.ts +10 -0
  201. package/dist/runtime/components/Video.svelte +2 -2
  202. package/dist/runtime/components/Video.svelte.d.ts +18 -0
  203. package/dist/runtime/geometry.d.ts +55 -35
  204. package/dist/runtime/geometry.js +186 -191
  205. package/dist/runtime/index.d.ts +9 -9
  206. package/dist/runtime/index.js +9 -9
  207. package/dist/runtime/kind-handlers.d.ts +33 -30
  208. package/dist/runtime/kind-handlers.js +85 -67
  209. package/dist/runtime/manifest.d.ts +53 -47
  210. package/dist/runtime/manifest.js +133 -113
  211. package/dist/runtime/observe-border-box-size.d.ts +1 -4
  212. package/dist/runtime/observe-border-box-size.js +9 -10
  213. package/dist/runtime/preload-registry.d.ts +22 -8
  214. package/dist/runtime/preload-registry.js +65 -62
  215. package/dist/server/build.d.ts +8 -0
  216. package/dist/server/build.js +25 -0
  217. package/dist/server/check.d.ts +24 -0
  218. package/dist/server/check.js +199 -0
  219. package/dist/server/cli-commands.d.ts +25 -0
  220. package/dist/server/cli-commands.js +1178 -0
  221. package/dist/server/cli-init.d.ts +3 -0
  222. package/dist/server/cli-init.js +53 -0
  223. package/dist/server/cli-io.d.ts +46 -0
  224. package/dist/server/cli-io.js +105 -0
  225. package/dist/server/codegen.d.ts +58 -0
  226. package/dist/server/codegen.js +185 -0
  227. package/dist/server/config-loader.d.ts +35 -0
  228. package/dist/server/config-loader.js +79 -0
  229. package/dist/server/context.d.ts +8 -0
  230. package/dist/server/context.js +19 -0
  231. package/dist/server/folder-filesystem.d.ts +7 -0
  232. package/dist/server/folder-filesystem.js +39 -0
  233. package/dist/server/http.d.ts +12 -0
  234. package/dist/server/http.js +100 -0
  235. package/dist/server/index.d.ts +17 -0
  236. package/dist/server/index.js +9 -0
  237. package/dist/server/job-hash.d.ts +10 -0
  238. package/dist/server/job-hash.js +23 -0
  239. package/dist/server/library-store.d.ts +82 -0
  240. package/dist/server/library-store.js +763 -0
  241. package/dist/server/operations.d.ts +87 -0
  242. package/dist/server/operations.js +427 -0
  243. package/dist/server/plugins/audio.d.ts +8 -0
  244. package/dist/server/plugins/audio.js +41 -0
  245. package/dist/server/plugins/chroma-key-video.d.ts +9 -0
  246. package/dist/server/plugins/chroma-key-video.js +40 -0
  247. package/dist/server/plugins/config.d.ts +13 -0
  248. package/dist/server/plugins/config.js +32 -0
  249. package/dist/server/plugins/contract.d.ts +114 -0
  250. package/dist/server/plugins/contract.js +16 -0
  251. package/dist/server/plugins/image.d.ts +9 -0
  252. package/dist/server/plugins/image.js +43 -0
  253. package/dist/server/plugins/slice.d.ts +15 -0
  254. package/dist/server/plugins/slice.js +76 -0
  255. package/dist/server/plugins/video.d.ts +7 -0
  256. package/dist/server/plugins/video.js +54 -0
  257. package/dist/server/plugins.d.ts +23 -0
  258. package/dist/server/plugins.js +35 -0
  259. package/dist/server/processing/audio-processing.d.ts +17 -0
  260. package/dist/server/processing/audio-processing.js +46 -0
  261. package/dist/server/processing/ffmpeg.d.ts +9 -0
  262. package/dist/server/processing/ffmpeg.js +50 -0
  263. package/dist/server/processing/image-processing.d.ts +16 -0
  264. package/dist/server/processing/image-processing.js +26 -0
  265. package/dist/server/processing/media-probe.d.ts +15 -0
  266. package/dist/server/processing/media-probe.js +27 -0
  267. package/dist/server/processing/processor.d.ts +50 -0
  268. package/dist/server/processing/processor.js +158 -0
  269. package/dist/server/processing/video-processing.d.ts +35 -0
  270. package/dist/server/processing/video-processing.js +87 -0
  271. package/dist/server/server.d.ts +13 -0
  272. package/dist/server/server.js +57 -0
  273. package/dist/server/start.d.ts +13 -0
  274. package/dist/server/start.js +80 -0
  275. package/package.json +31 -16
  276. package/dist/build-CZYFLLvl.js +0 -191
  277. package/dist/core/image-Dqmz8FXS.js +0 -54
  278. package/dist/core/reference-graph-CjuHbLDw.d.ts +0 -280
  279. package/dist/core/testing.d.ts +0 -27
  280. package/dist/core/testing.js +0 -80
  281. package/dist/editor/200.html +0 -37
  282. package/dist/editor/_app/immutable/assets/2.DIbbW7U1.css +0 -1
  283. package/dist/editor/_app/immutable/assets/3.C-9vFQ9A.css +0 -1
  284. package/dist/editor/_app/immutable/assets/4.BS8ElpOV.css +0 -1
  285. package/dist/editor/_app/immutable/assets/ConfirmDialog.CHEISE-L.css +0 -1
  286. package/dist/editor/_app/immutable/assets/LibraryContextMenu.CDjCmdV-.css +0 -1
  287. package/dist/editor/_app/immutable/chunks/Cx6qtxJg.js +0 -1
  288. package/dist/editor/_app/immutable/chunks/DjdrdRzT.js +0 -1
  289. package/dist/editor/_app/immutable/chunks/n7mvYc42.js +0 -5
  290. package/dist/editor/_app/immutable/entry/start.C8HHOLly.js +0 -1
  291. package/dist/editor/_app/immutable/nodes/2.BrA0Hyzu.js +0 -3
  292. package/dist/editor/_app/immutable/nodes/3.WO7tZH_d.js +0 -104
  293. package/dist/editor/_app/immutable/nodes/4.DQtx17aW.js +0 -2
  294. package/dist/editor/_app/version.json +0 -1
  295. package/dist/index.d.ts +0 -370
  296. package/dist/index.js +0 -4
  297. package/dist/start-Bhnqt9Dc.js +0 -279
  298. package/dist/start-D2IXOrni.js +0 -2
  299. /package/{dist/editor → build/client}/_app/immutable/assets/0.DLhIsYA_.css +0 -0
  300. /package/{dist/editor → build/client}/_app/immutable/chunks/Bjy-W4x2.js +0 -0
  301. /package/{dist/editor → build/client}/_app/immutable/chunks/CNRz3sSw.js +0 -0
  302. /package/{dist/editor → build/client}/_app/immutable/chunks/CO4RBJfa.js +0 -0
  303. /package/{dist/editor → build/client}/_app/immutable/chunks/xihTtKlq.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js-BUZqFfWG.js","sources":["../../../../.svelte-kit/output/server/chunks/context.js"],"sourcesContent":["import \"./core.js\";\nimport { d as rawFileNameOfPath, i as folderOfRawPath } from \"./folder-path.js\";\nimport { a as encodeRelativePathForUrl, c as serverPluginForType, d as allDeliveredAssetIds, f as computeLibraryMembership, i as readCurrentProxy, l as serverPluginsByType, m as compareCodeUnits, o as generateManifestModules, p as collectAllReferences, r as processAssets, s as descriptorsByType, t as LibraryStore, u as isRecord } from \"./library-store.js\";\nimport { isAbsolute, join, resolve } from \"node:path\";\nimport { existsSync } from \"node:fs\";\nimport { createJiti } from \"jiti\";\n//#region src/lib/server/config-loader.ts\n/**\n* Loads and resolves the host's `fundus.config.ts` through jiti, validates\n* the shape, resolves all paths to\n* absolute, and merges the built-in plugin preset defaults under the host's.\n*/\nfunction requiredString(config, key) {\n\tconst value = config[key];\n\tif (typeof value !== \"string\" || value.length === 0) throw new Error(`fundus.config: \"${key}\" must be a non-empty string.`);\n\treturn value;\n}\nfunction resolvePath(projectRoot, value) {\n\treturn resolve(projectRoot, value);\n}\nfunction configDefinitionsFor(registry) {\n\tconst byNamespace = /* @__PURE__ */ new Map();\n\tfor (const plugin of Object.values(registry)) for (const definition of plugin.configDefinitions) {\n\t\tconst existing = byNamespace.get(definition.namespace);\n\t\tif (existing && existing !== definition) throw new Error(`Plugins provide conflicting config definitions for \"plugins.${definition.namespace}\".`);\n\t\tbyNamespace.set(definition.namespace, definition);\n\t}\n\treturn [...byNamespace.values()];\n}\n/** Pure resolution step (testable without a config file on disk). */\nfunction resolveConfig(projectRoot, value, registry = serverPluginsByType) {\n\tif (!isRecord(value)) throw new Error(\"fundus.config must default-export a configuration object.\");\n\tconst proxyBasePath = requiredString(value, \"proxyBasePath\");\n\tif (!proxyBasePath.endsWith(\"/\")) throw new Error(\"fundus.config: \\\"proxyBasePath\\\" must end with \\\"/\\\".\");\n\tconst plugins = value.plugins === void 0 ? {} : value.plugins;\n\tif (!isRecord(plugins)) throw new Error(\"fundus.config: \\\"plugins\\\" must be an object.\");\n\tconst resolvedPlugins = {};\n\tfor (const definition of configDefinitionsFor(registry)) resolvedPlugins[definition.namespace] = definition.resolve({\n\t\tprojectRoot,\n\t\tvalue: plugins[definition.namespace]\n\t});\n\treturn {\n\t\trawDir: resolvePath(projectRoot, requiredString(value, \"rawDir\")),\n\t\tproxyDir: resolvePath(projectRoot, requiredString(value, \"proxyDir\")),\n\t\tlibrary: resolvePath(projectRoot, requiredString(value, \"library\")),\n\t\tmanifestsDir: resolvePath(projectRoot, requiredString(value, \"manifestsDir\")),\n\t\tproxyBasePath,\n\t\tplugins: resolvedPlugins\n\t};\n}\n/** Load `fundus.config.ts` from the host project root. */\nasync function loadConfig(projectRoot) {\n\tconst root = resolve(projectRoot);\n\tconst configPath = resolve(root, \"fundus.config.ts\");\n\tif (!existsSync(configPath)) throw new Error(`No fundus.config.ts found in ${root}.`);\n\tlet module;\n\ttry {\n\t\tmodule = await createJiti(import.meta.url, { interopDefault: false }).import(configPath);\n\t} catch (cause) {\n\t\tthrow new Error(`Cannot load fundus.config.ts: ${cause instanceof Error ? cause.message : String(cause)}`);\n\t}\n\treturn resolveConfig(root, isRecord(module) && \"default\" in module ? module.default : module);\n}\n//#endregion\n//#region src/lib/server/operations.ts\n/**\n* The one operations layer: builds the state payload and runs\n* every mutation through the autosave chain — write library → process affected\n* assets → regenerate codegen → return fresh state. Both the REST server\n* and the CLI consume this class, so every\n* operation has exactly one implementation and there is no other save path.\n*/\n/**\n* The CLI's `--parameters` merge semantics (M7): a SHALLOW merge at the top\n* level onto the current parameters — a nested object value replaces the whole\n* current object under that key, a top-level `null` clears an optional field,\n* and an asset reference is set with the normal `{\"$asset\": \"<id>\"}` marker.\n* The merged result still passes the owning plugin's full validation.\n*/\nfunction mergeParameterPatch(currentParameters, patch) {\n\tif (typeof patch !== \"object\" || patch === null || Array.isArray(patch)) throw new Error(\"The parameter patch must be a JSON object, e.g. {\\\"preset\\\": \\\"default\\\"}.\");\n\tconst merged = typeof currentParameters === \"object\" && currentParameters !== null && !Array.isArray(currentParameters) ? { ...currentParameters } : {};\n\tfor (const [key, value] of Object.entries(patch)) if (value === null) delete merged[key];\n\telse merged[key] = value;\n\treturn merged;\n}\nvar FundusOperations = class {\n\t#config;\n\t#registry;\n\t#store;\n\tconstructor(config, registry = serverPluginsByType) {\n\t\tthis.#config = config;\n\t\tthis.#registry = registry;\n\t\tthis.#store = new LibraryStore(config, registry);\n\t}\n\tget config() {\n\t\treturn this.#config;\n\t}\n\tget store() {\n\t\treturn this.#store;\n\t}\n\t/** Read-only state snapshot (no processing). */\n\tasync state() {\n\t\treturn this.#buildState(await this.#store.read(), []);\n\t}\n\t/**\n\t* Ingest an upload: store the raw file + record, then let the owning\n\t* plugin's optional `seedIngestParameters` derive better starting\n\t* parameters from the stored raw file (slices: insets from the image\n\t* dimensions, pixel ratio from the file name — the schema default can't\n\t* know either). The CLI additionally applies a parameter patch and/or an\n\t* explicit membership set in the same operation; a failing application\n\t* rolls the whole ingest back, so a failed ingest leaves nothing behind.\n\t*/\n\tasync ingest(options) {\n\t\tlet library = await this.#store.ingest(options);\n\t\ttry {\n\t\t\tconst plugin = serverPluginForType(options.type, this.#registry);\n\t\t\tif (plugin.seedIngestParameters) {\n\t\t\t\tconst record = library.assets[options.id];\n\t\t\t\tconst seeded = await plugin.seedIngestParameters({\n\t\t\t\t\trawPath: join(this.#config.rawDir, record.raw),\n\t\t\t\t\trawFileName: rawFileNameOfPath(record.raw),\n\t\t\t\t\tparameters: plugin.descriptor.validateParameters(record.parameters),\n\t\t\t\t\tconfig: this.#config\n\t\t\t\t});\n\t\t\t\tif (seeded !== void 0) library = await this.#store.updateParameters(options.id, seeded);\n\t\t\t}\n\t\t\tif (options.parametersPatch !== void 0 || options.manifests !== void 0) library = await this.#applyAssetChanges(library, options.id, {\n\t\t\t\tparametersPatch: options.parametersPatch,\n\t\t\t\tmanifests: options.manifests\n\t\t\t});\n\t\t} catch (cause) {\n\t\t\tawait this.#store.deleteAsset(options.id);\n\t\t\tthrow cause;\n\t\t}\n\t\treturn this.#afterMutation(library);\n\t}\n\t/** Apply a PATCH body: parameters and/or manifests and/or a rename — in that order. */\n\tasync patchAsset(id, body) {\n\t\tlet library = await this.#store.read();\n\t\tthis.#requireAsset(library, id);\n\t\tif (body.parameters !== void 0) library = await this.#store.updateParameters(id, body.parameters);\n\t\tif (body.manifests !== void 0) {\n\t\t\tif (!Array.isArray(body.manifests) || body.manifests.some((name) => typeof name !== \"string\")) throw new Error(\"\\\"manifests\\\" must be an array of manifest names.\");\n\t\t\tlibrary = await this.#store.setManifests(id, body.manifests);\n\t\t}\n\t\tif (body.renameTo !== void 0) {\n\t\t\tif (typeof body.renameTo !== \"string\") throw new Error(\"\\\"renameTo\\\" must be a string.\");\n\t\t\tlibrary = await this.#store.renameAsset(id, body.renameTo);\n\t\t}\n\t\tif (body.folder !== void 0) {\n\t\t\tif (typeof body.folder !== \"string\") throw new Error(\"\\\"folder\\\" must be a string.\");\n\t\t\tlibrary = await this.#store.moveAsset(body.renameTo ?? id, body.folder);\n\t\t}\n\t\treturn this.#afterMutation(library);\n\t}\n\tasync moveAsset(id, folder) {\n\t\treturn this.#afterMutation(await this.#store.moveAsset(id, folder));\n\t}\n\t/** Move a selected asset set as one editor action and roll back on any failure. */\n\tasync moveAssets(assetIds, folder) {\n\t\tconst uniqueIds = [...new Set(assetIds)];\n\t\tif (uniqueIds.length === 0) throw new Error(\"At least one asset id is required.\");\n\t\tconst originalFolders = /* @__PURE__ */ new Map();\n\t\tconst library = await this.#store.read();\n\t\tfor (const id of uniqueIds) {\n\t\t\tthis.#requireAsset(library, id);\n\t\t\toriginalFolders.set(id, folderOfRawPath(library.assets[id].raw));\n\t\t}\n\t\tconst movedIds = [];\n\t\ttry {\n\t\t\tlet updated = library;\n\t\t\tfor (const id of uniqueIds) {\n\t\t\t\tif (originalFolders.get(id) === folder) continue;\n\t\t\t\tupdated = await this.#store.moveAsset(id, folder);\n\t\t\t\tmovedIds.push(id);\n\t\t\t}\n\t\t\treturn this.#afterMutation(updated);\n\t\t} catch (cause) {\n\t\t\tfor (const id of movedIds.reverse()) await this.#store.moveAsset(id, originalFolders.get(id) ?? \"\");\n\t\t\tthrow cause;\n\t\t}\n\t}\n\tasync createFolder(path) {\n\t\treturn this.#afterMutation(await this.#store.createFolder(path));\n\t}\n\tasync renameFolder(path, newName) {\n\t\treturn this.#afterMutation(await this.#store.renameFolder(path, newName));\n\t}\n\tasync moveFolder(path, parent) {\n\t\treturn this.#afterMutation(await this.#store.moveFolder(path, parent));\n\t}\n\tasync deleteFolder(path) {\n\t\tconst result = await this.#store.deleteFolder(path);\n\t\treturn this.#afterMutation(result.library);\n\t}\n\t/**\n\t* CLI-facing asset update (M7): shallow-merge a parameter patch and/or\n\t* replace the explicit manifest membership — validating the *result* before\n\t* anything is persisted, so a change that would leave the library invalid\n\t* (dangling or cyclic reference, unknown manifest, invalid parameters) is\n\t* rejected with nothing written. The REST `patchAsset` keeps the editor's\n\t* lenient replace semantics.\n\t*/\n\tasync setAsset(id, changes) {\n\t\tconst library = await this.#store.read();\n\t\tthis.#requireAsset(library, id);\n\t\treturn this.#afterMutation(await this.#applyAssetChanges(library, id, changes));\n\t}\n\t/**\n\t* CLI-facing rename (M7): rejects a rename that would break references —\n\t* a referrer keeps pointing at the old id, so renaming a referenced asset\n\t* introduces dangling-reference errors. Update the referrers first.\n\t*/\n\tasync renameAsset(id, newId) {\n\t\tconst library = await this.#store.read();\n\t\tthis.#requireAsset(library, id);\n\t\tif (newId !== id && !Object.hasOwn(library.assets, newId)) {\n\t\t\tconst candidate = structuredClone(library);\n\t\t\tcandidate.assets[newId] = candidate.assets[id];\n\t\t\tdelete candidate.assets[id];\n\t\t\tawait this.#assertNoIntroducedIssues(library, candidate);\n\t\t}\n\t\treturn this.#afterMutation(await this.#store.renameAsset(id, newId));\n\t}\n\t/**\n\t* Delete an asset: the record, its raw file, and its proxies. With\n\t* `failOnIntroducedIssues` (the CLI), a delete that would break references\n\t* (the asset is a reference target) is rejected before anything —\n\t* including the raw file — is removed; the REST route stays lenient.\n\t*/\n\tasync deleteAsset(id, options) {\n\t\tif (options?.failOnIntroducedIssues) {\n\t\t\tconst library = await this.#store.read();\n\t\t\tthis.#requireAsset(library, id);\n\t\t\tconst candidate = structuredClone(library);\n\t\t\tdelete candidate.assets[id];\n\t\t\tawait this.#assertNoIntroducedIssues(library, candidate);\n\t\t}\n\t\treturn this.#afterMutation(await this.#store.deleteAsset(id));\n\t}\n\t/** Delete a selected asset set as one lenient editor mutation. */\n\tasync deleteAssets(assetIds) {\n\t\tconst uniqueIds = [...new Set(assetIds)];\n\t\tif (uniqueIds.length === 0) throw new Error(\"At least one asset id is required.\");\n\t\treturn this.#afterMutation(await this.#store.deleteAssets(uniqueIds));\n\t}\n\tasync createManifest(name) {\n\t\treturn this.#afterMutation(await this.#store.createManifest(name));\n\t}\n\tasync setManifestAppearance(name, appearance) {\n\t\treturn this.#afterMutation(await this.#store.setManifestAppearance(name, appearance));\n\t}\n\t/** Apply a PATCH body: appearance fields and/or a rename — in that order. */\n\tasync patchManifest(name, body) {\n\t\tlet library = await this.#store.setManifestAppearance(name, {\n\t\t\tcolor: body.color,\n\t\t\temoji: body.emoji\n\t\t});\n\t\tif (body.renameTo !== void 0) {\n\t\t\tif (typeof body.renameTo !== \"string\") throw new Error(\"\\\"renameTo\\\" must be a string.\");\n\t\t\tlibrary = await this.#store.renameManifest(name, body.renameTo);\n\t\t}\n\t\treturn this.#afterMutation(library);\n\t}\n\t/**\n\t* Rename a manifest: rewrites every asset's membership and replaces the\n\t* generated module (the old one is pruned as a stray). Host code importing\n\t* the module must be updated by hand — both the file name and the exported\n\t* const change with the manifest name.\n\t*/\n\tasync renameManifest(name, newName) {\n\t\treturn this.#afterMutation(await this.#store.renameManifest(name, newName));\n\t}\n\tasync deleteManifest(name) {\n\t\treturn this.#afterMutation(await this.#store.deleteManifest(name));\n\t}\n\t/** The autosave chain tail: process + regenerate, then report fresh state. */\n\tasync #afterMutation(library) {\n\t\tconst pipelineIssues = [];\n\t\tconst issues = await this.#store.validate(library);\n\t\tif (issues.length === 0) try {\n\t\t\tconst report = await processAssets(this.#config, library, this.#registry);\n\t\t\tawait generateManifestModules(this.#config, library, report.proxies, this.#registry);\n\t\t} catch (cause) {\n\t\t\tpipelineIssues.push({ message: `Processing failed: ${cause instanceof Error ? cause.message : String(cause)}` });\n\t\t}\n\t\treturn this.#buildState(library, pipelineIssues, issues);\n\t}\n\tasync #buildState(library, extraIssues, precomputedIssues) {\n\t\tconst issues = [...precomputedIssues ?? await this.#store.validate(library), ...extraIssues];\n\t\tconst referencesByAsset = collectAllReferences(library, descriptorsByType(this.#registry));\n\t\tconst membershipByManifest = computeLibraryMembership(library, referencesByAsset);\n\t\tconst delivered = allDeliveredAssetIds(membershipByManifest);\n\t\tconst passiveManifestsByAsset = /* @__PURE__ */ new Map();\n\t\tfor (const manifestName of Object.keys(library.manifests).sort(compareCodeUnits)) for (const passiveMember of membershipByManifest[manifestName].passiveMembers) {\n\t\t\tconst passiveManifests = passiveManifestsByAsset.get(passiveMember.assetId) ?? [];\n\t\t\tpassiveManifests.push({\n\t\t\t\tmanifest: manifestName,\n\t\t\t\tvia: passiveMember.via\n\t\t\t});\n\t\t\tpassiveManifestsByAsset.set(passiveMember.assetId, passiveManifests);\n\t\t}\n\t\tconst incomingByAsset = /* @__PURE__ */ new Map();\n\t\tfor (const [referrerId, references] of Object.entries(referencesByAsset)) for (const reference of references) {\n\t\t\tconst incoming = incomingByAsset.get(reference.assetId) ?? [];\n\t\t\tincoming.push({\n\t\t\t\tfield: reference.field,\n\t\t\t\tassetId: referrerId\n\t\t\t});\n\t\t\tincomingByAsset.set(reference.assetId, incoming);\n\t\t}\n\t\tconst assets = [];\n\t\tfor (const assetId of Object.keys(library.assets).sort(compareCodeUnits)) {\n\t\t\tconst record = library.assets[assetId];\n\t\t\tconst warnings = [];\n\t\t\tfor (const issue of issues) if (issue.assetId === assetId) warnings.push(issue.message);\n\t\t\tif (record.manifests.length === 0 && !delivered.has(assetId)) warnings.push(\"In no manifest and not referenced by any delivered asset — nothing is processed or generated for it.\");\n\t\t\tlet proxy = null;\n\t\t\tif (delivered.has(assetId)) try {\n\t\t\t\tconst currentProxy = await readCurrentProxy(assetId, record, this.#config, this.#registry);\n\t\t\t\tif (currentProxy) proxy = {\n\t\t\t\t\turl: `/files/proxy/${encodeRelativePathForUrl(currentProxy.relativePath)}`,\n\t\t\t\t\tupToDate: true,\n\t\t\t\t\t...currentProxy\n\t\t\t\t};\n\t\t\t\telse warnings.push(\"Proxy is stale or missing — it will be (re)processed on the next save.\");\n\t\t\t} catch (cause) {\n\t\t\t\twarnings.push(cause instanceof Error ? cause.message : String(cause));\n\t\t\t}\n\t\t\tassets.push({\n\t\t\t\tid: assetId,\n\t\t\t\ttype: record.type,\n\t\t\t\traw: record.raw,\n\t\t\t\tfolder: folderOfRawPath(record.raw),\n\t\t\t\trawUrl: `/files/raw/${encodeRelativePathForUrl(record.raw)}`,\n\t\t\t\trawHash: record.rawHash,\n\t\t\t\tparameters: record.parameters,\n\t\t\t\tmanifests: record.manifests,\n\t\t\t\tpassiveManifests: passiveManifestsByAsset.get(assetId) ?? [],\n\t\t\t\tproxy,\n\t\t\t\twarnings,\n\t\t\t\treferences: {\n\t\t\t\t\toutgoing: referencesByAsset[assetId].map((reference) => ({\n\t\t\t\t\t\tfield: reference.field,\n\t\t\t\t\t\tassetId: reference.assetId\n\t\t\t\t\t})),\n\t\t\t\t\tincoming: incomingByAsset.get(assetId) ?? []\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tconst proxySizeByAssetId = new Map(assets.filter((asset) => asset.proxy).map((asset) => [asset.id, asset.proxy?.fileSize ?? 0]));\n\t\tconst manifestMemberships = {};\n\t\tconst manifestDeliveredBytes = {};\n\t\tfor (const manifestName of Object.keys(library.manifests).sort(compareCodeUnits)) {\n\t\t\tconst membership = membershipByManifest[manifestName];\n\t\t\tmanifestMemberships[manifestName] = {\n\t\t\t\texplicitMemberIds: membership.explicitMemberIds,\n\t\t\t\tpassiveMembers: membership.passiveMembers\n\t\t\t};\n\t\t\tlet deliveredBytes = 0;\n\t\t\tfor (const deliveredAssetId of membership.deliveredAssetIds) deliveredBytes += proxySizeByAssetId.get(deliveredAssetId) ?? 0;\n\t\t\tmanifestDeliveredBytes[manifestName] = deliveredBytes;\n\t\t}\n\t\tconst presetNames = {};\n\t\tfor (const [type, plugin] of Object.entries(this.#registry)) presetNames[type] = Object.keys(plugin.presets(this.#config)).sort();\n\t\treturn {\n\t\t\tlibrary,\n\t\t\tassets,\n\t\t\tissues,\n\t\t\tpresetNames,\n\t\t\tmanifestMemberships,\n\t\t\tmanifestDeliveredBytes\n\t\t};\n\t}\n\t#requireAsset(library, id) {\n\t\tif (!Object.hasOwn(library.assets, id)) throw new Error(`Unknown asset \"${id}\".`);\n\t}\n\t/**\n\t* Apply a CLI asset change to the store, validating the resulting library\n\t* on an in-memory candidate first — nothing is persisted when the change\n\t* would introduce validation issues. Pre-existing issues never block an\n\t* unrelated mutation (only *introduced* issues are rejected).\n\t*/\n\tasync #applyAssetChanges(library, id, changes) {\n\t\tconst candidate = structuredClone(library);\n\t\tconst candidateRecord = candidate.assets[id];\n\t\tif (changes.parametersPatch !== void 0) candidateRecord.parameters = serverPluginForType(candidateRecord.type, this.#registry).descriptor.validateParameters(mergeParameterPatch(candidateRecord.parameters, changes.parametersPatch));\n\t\tif (changes.manifests !== void 0) candidateRecord.manifests = [...new Set(changes.manifests)].sort();\n\t\tawait this.#assertNoIntroducedIssues(library, candidate);\n\t\tlet updated = library;\n\t\tif (changes.parametersPatch !== void 0) updated = await this.#store.updateParameters(id, candidateRecord.parameters);\n\t\tif (changes.manifests !== void 0) updated = await this.#store.setManifests(id, changes.manifests);\n\t\treturn updated;\n\t}\n\t/** Reject a candidate library that has validation issues the current one lacks. */\n\tasync #assertNoIntroducedIssues(library, candidate) {\n\t\tconst existingIssueKeys = new Set((await this.#store.validate(library)).map((issue) => `${issue.assetId ?? \"\"}|${issue.message}`));\n\t\tconst introduced = (await this.#store.validate(candidate)).filter((issue) => !existingIssueKeys.has(`${issue.assetId ?? \"\"}|${issue.message}`));\n\t\tif (introduced.length > 0) {\n\t\t\tconst lines = introduced.map((issue) => ` - ${issue.assetId ? `[${issue.assetId}] ` : \"\"}${issue.message}`);\n\t\t\tthrow new Error(`Rejected — the change would leave the library invalid (nothing was written):\\n${lines.join(\"\\n\")}`);\n\t\t}\n\t}\n};\n//#endregion\n//#region src/lib/server/context.ts\nvar context;\nfunction initializeFundusContext() {\n\tcontext ??= createFundusContext();\n\treturn context;\n}\nfunction getFundusContext() {\n\treturn initializeFundusContext();\n}\nasync function createFundusContext() {\n\tconst projectRoot = process.env.FUNDUS_PROJECT_ROOT;\n\tif (!projectRoot || !isAbsolute(projectRoot)) throw new Error(\"FUNDUS_PROJECT_ROOT must be set to an absolute host project directory.\");\n\tconst config = await loadConfig(projectRoot);\n\treturn {\n\t\tconfig,\n\t\toperations: new FundusOperations(config)\n\t};\n}\n//#endregion\nexport { initializeFundusContext as n, getFundusContext as t };\n"],"names":[],"mappings":";;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;AACrC,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;AAC1B,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,gBAAgB,EAAE,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC5H,CAAC,OAAO,KAAK;AACb;AACA,SAAS,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE;AACzC,CAAC,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC;AACnC;AACA,SAAS,oBAAoB,CAAC,QAAQ,EAAE;AACxC,CAAC,MAAM,WAAW,mBAAmB,IAAI,GAAG,EAAE;AAC9C,CAAC,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,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AAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/G,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8EAA8E,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACvH,EAAE;AACF,CAAC;AACD,CAAC;AACD;AACA;AACA,IAAI,OAAO;AACX,SAAS,uBAAuB,GAAG;AACnC,CAAC,OAAO,KAAK,mBAAmB,EAAE;AAClC,CAAC,OAAO,OAAO;AACf;AACA,SAAS,gBAAgB,GAAG;AAC5B,CAAC,OAAO,uBAAuB,EAAE;AACjC;AACA,eAAe,mBAAmB,GAAG;AACrC,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB;AACpD,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC;AACxI,CAAC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC;AAC7C,CAAC,OAAO;AACR,EAAE,MAAM;AACR,EAAE,UAAU,EAAE,IAAI,gBAAgB,CAAC,MAAM;AACzC,EAAE;AACF;;;;"}
@@ -0,0 +1,458 @@
1
+ //#region src/lib/core/plugins/audio.ts
2
+ /** Built-in presets, always available; host config merges over them. */
3
+ var AUDIO_BUILT_IN_PRESETS = { default: {
4
+ codec: "opus",
5
+ bitrateKbps: 96,
6
+ container: "webm"
7
+ } };
8
+ /** Each codec's muxable container — a mismatch is a config error, not an ffmpeg one. */
9
+ var CONTAINER_BY_CODEC = {
10
+ opus: "webm",
11
+ aac: "m4a"
12
+ };
13
+ function validateAudioPreset(name, value) {
14
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`Audio preset "${name}" must be an object.`);
15
+ const record = value;
16
+ if (record.codec !== "opus" && record.codec !== "aac") throw new Error(`Audio preset "${name}" needs a "codec" of 'opus' | 'aac'.`);
17
+ if (typeof record.bitrateKbps !== "number" || !Number.isInteger(record.bitrateKbps) || record.bitrateKbps <= 0) throw new Error(`Audio preset "${name}" needs a positive integer "bitrateKbps".`);
18
+ const expectedContainer = CONTAINER_BY_CODEC[record.codec];
19
+ if (record.container !== expectedContainer) throw new Error(`Audio preset "${name}": codec '${record.codec}' requires container '${expectedContainer}'.`);
20
+ return {
21
+ codec: record.codec,
22
+ bitrateKbps: record.bitrateKbps,
23
+ container: expectedContainer
24
+ };
25
+ }
26
+ var audioPlugin = {
27
+ type: "audio",
28
+ accepts: [...[
29
+ "mp3",
30
+ "wav",
31
+ "m4a",
32
+ "ogg",
33
+ "flac"
34
+ ]],
35
+ defaultParameters: () => ({ preset: "default" }),
36
+ validateParameters(value) {
37
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("Audio parameters must be an object.");
38
+ const record = value;
39
+ if (typeof record.preset !== "string" || record.preset.length === 0) throw new Error("Audio parameters need a non-empty string \"preset\".");
40
+ return { preset: record.preset };
41
+ }
42
+ };
43
+ //#endregion
44
+ //#region src/lib/core/asset-reference.ts
45
+ /** Whether a value is a well-formed asset-reference marker. */
46
+ function isAssetReference(value) {
47
+ return typeof value === "object" && value !== null && !Array.isArray(value) && typeof value.$asset === "string" && value.$asset !== "";
48
+ }
49
+ //#endregion
50
+ //#region src/lib/core/chroma-key.ts
51
+ /** The upstream shader's property defaults — a freshly ingested asset starts here. */
52
+ var DEFAULT_CHROMA_KEY_PARAMETERS = {
53
+ keyColor: [
54
+ 0,
55
+ 1,
56
+ 0
57
+ ],
58
+ colorCutoff: .2,
59
+ colorFeathering: .33,
60
+ maskFeathering: 1,
61
+ sharpening: .5,
62
+ despill: 1,
63
+ despillLuminanceAdd: .2
64
+ };
65
+ var SCALAR_KEYS = [
66
+ "colorCutoff",
67
+ "colorFeathering",
68
+ "maskFeathering",
69
+ "sharpening",
70
+ "despill",
71
+ "despillLuminanceAdd"
72
+ ];
73
+ function clampUnit(value) {
74
+ return Math.min(1, Math.max(0, value));
75
+ }
76
+ /**
77
+ * Validate an unknown chroma-key blob: every field required, every channel and
78
+ * scalar a finite number. Values are clamped into 0–1 (slider float artifacts
79
+ * must not invalidate a library), non-numbers throw.
80
+ */
81
+ function validateChromaKeyParameters(value) {
82
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("\"chromaKey\" must be an object.");
83
+ const record = value;
84
+ const keyColor = record.keyColor;
85
+ if (!Array.isArray(keyColor) || keyColor.length !== 3 || keyColor.some((channel) => typeof channel !== "number" || !Number.isFinite(channel))) throw new Error("\"chromaKey.keyColor\" must be an array of three numbers (RGB, 0–1 each).");
86
+ const result = { keyColor: [
87
+ clampUnit(keyColor[0]),
88
+ clampUnit(keyColor[1]),
89
+ clampUnit(keyColor[2])
90
+ ] };
91
+ for (const key of SCALAR_KEYS) {
92
+ const scalar = record[key];
93
+ if (typeof scalar !== "number" || !Number.isFinite(scalar)) throw new Error(`"chromaKey.${key}" must be a number (0–1).`);
94
+ result[key] = clampUnit(scalar);
95
+ }
96
+ return result;
97
+ }
98
+ //#endregion
99
+ //#region src/lib/core/plugins/video.ts
100
+ /**
101
+ * Built-in presets, always available; host config merges over them. The
102
+ * default is the proven committed-video formula: H.264, slow preset, animation
103
+ * tune, CRF 28, yuv420p, faststart MP4.
104
+ */
105
+ var VIDEO_BUILT_IN_PRESETS = { default: {
106
+ codec: "h264",
107
+ crf: 28,
108
+ encoderPreset: "slow",
109
+ tune: "animation",
110
+ pixelFormat: "yuv420p",
111
+ container: "mp4"
112
+ } };
113
+ function validateVideoPreset(name, value) {
114
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`Video preset "${name}" must be an object.`);
115
+ const record = value;
116
+ if (record.codec !== "h264") throw new Error(`Video preset "${name}" needs a "codec" of 'h264'.`);
117
+ if (typeof record.crf !== "number" || !Number.isInteger(record.crf) || record.crf < 0) throw new Error(`Video preset "${name}" needs an integer "crf" ≥ 0.`);
118
+ if (typeof record.encoderPreset !== "string" || record.encoderPreset.length === 0) throw new Error(`Video preset "${name}" needs a non-empty string "encoderPreset".`);
119
+ if (record.tune !== void 0 && (typeof record.tune !== "string" || record.tune.length === 0)) throw new Error(`Video preset "${name}" has a non-string "tune".`);
120
+ if (typeof record.pixelFormat !== "string" || record.pixelFormat.length === 0) throw new Error(`Video preset "${name}" needs a non-empty string "pixelFormat".`);
121
+ if (record.container !== "mp4") throw new Error(`Video preset "${name}" needs a "container" of 'mp4'.`);
122
+ return {
123
+ codec: "h264",
124
+ crf: record.crf,
125
+ encoderPreset: record.encoderPreset,
126
+ ...record.tune !== void 0 ? { tune: record.tune } : {},
127
+ pixelFormat: record.pixelFormat,
128
+ container: "mp4"
129
+ };
130
+ }
131
+ var VIDEO_EXTENSIONS = [
132
+ "mp4",
133
+ "mov",
134
+ "webm",
135
+ "m4v"
136
+ ];
137
+ /** Shared by the video and chroma-key-video plugins (identical transcode inputs). */
138
+ function validateVideoParameters(label, value) {
139
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`${label} parameters must be an object.`);
140
+ const record = value;
141
+ if (typeof record.preset !== "string" || record.preset.length === 0) throw new Error(`${label} parameters need a non-empty string "preset".`);
142
+ if (record.maxWidth !== void 0) {
143
+ if (typeof record.maxWidth !== "number" || !Number.isInteger(record.maxWidth) || record.maxWidth <= 0) throw new Error(`${label} "maxWidth" must be a positive integer when set.`);
144
+ }
145
+ return {
146
+ preset: record.preset,
147
+ ...record.maxWidth !== void 0 ? { maxWidth: record.maxWidth } : {}
148
+ };
149
+ }
150
+ var videoPlugin = {
151
+ type: "video",
152
+ accepts: [...VIDEO_EXTENSIONS],
153
+ defaultParameters: () => ({ preset: "default" }),
154
+ validateParameters(value) {
155
+ return validateVideoParameters("Video", value);
156
+ }
157
+ };
158
+ //#endregion
159
+ //#region src/lib/core/plugins/chroma-key-video.ts
160
+ /**
161
+ * Chroma-key-video plugin (core part): a greenscreen video delivered through
162
+ * the video plugin's transcode pipeline, plus the keying data the runtime's
163
+ * WebGL renderer needs — chroma-key parameters and two optional image
164
+ * references: a grayscale shape `mask` multiplied onto the keyed
165
+ * alpha, and a static `fallback` image shown when WebGL2 is unavailable.
166
+ *
167
+ * The keying values and references are entry-only data: they travel into the
168
+ * generated manifest entry but never touch the ffmpeg job, so
169
+ * `processingParameters` narrows the job-hash input to the transcode inputs
170
+ * (preset + maxWidth) — retuning a slider must not re-transcode the proxy.
171
+ */
172
+ function validateOptionalReference(label, value) {
173
+ if (value === void 0) return void 0;
174
+ if (!isAssetReference(value)) throw new Error(`"${label}" must be an asset reference ({ "$asset": "<id>" }).`);
175
+ return { $asset: value.$asset };
176
+ }
177
+ var chromaKeyVideoPlugin = {
178
+ type: "chroma-key-video",
179
+ accepts: [...VIDEO_EXTENSIONS],
180
+ defaultParameters: () => ({
181
+ preset: "default",
182
+ chromaKey: {
183
+ ...DEFAULT_CHROMA_KEY_PARAMETERS,
184
+ keyColor: [...DEFAULT_CHROMA_KEY_PARAMETERS.keyColor]
185
+ }
186
+ }),
187
+ validateParameters(value) {
188
+ const videoParameters = validateVideoParameters("Chroma-key-video", value);
189
+ const record = value;
190
+ const chromaKey = validateChromaKeyParameters(record.chromaKey);
191
+ const mask = validateOptionalReference("mask", record.mask);
192
+ const fallback = validateOptionalReference("fallback", record.fallback);
193
+ return {
194
+ ...videoParameters,
195
+ chromaKey,
196
+ ...mask !== void 0 ? { mask } : {},
197
+ ...fallback !== void 0 ? { fallback } : {}
198
+ };
199
+ },
200
+ collectReferences(parameters) {
201
+ const references = [];
202
+ if (parameters.mask) references.push({
203
+ field: "mask",
204
+ assetId: parameters.mask.$asset,
205
+ expectedTypes: ["image"]
206
+ });
207
+ if (parameters.fallback) references.push({
208
+ field: "fallback",
209
+ assetId: parameters.fallback.$asset,
210
+ expectedTypes: ["image"]
211
+ });
212
+ return references;
213
+ },
214
+ processingParameters(parameters) {
215
+ return {
216
+ preset: parameters.preset,
217
+ ...parameters.maxWidth !== void 0 ? { maxWidth: parameters.maxWidth } : {}
218
+ };
219
+ }
220
+ };
221
+ //#endregion
222
+ //#region src/lib/core/plugins/image.ts
223
+ var IMAGE_FORMATS = [
224
+ "webp",
225
+ "png",
226
+ "avif",
227
+ "jpeg"
228
+ ];
229
+ /** Built-in presets, always available; host config merges over them. */
230
+ var IMAGE_BUILT_IN_PRESETS = { default: {
231
+ format: "webp",
232
+ quality: 82
233
+ } };
234
+ function validateImagePreset(name, value) {
235
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`Image preset "${name}" must be an object.`);
236
+ const record = value;
237
+ if (typeof record.format !== "string" || !IMAGE_FORMATS.includes(record.format)) throw new Error(`Image preset "${name}" needs a "format" of ${IMAGE_FORMATS.map((format) => `'${format}'`).join(" | ")}.`);
238
+ if (record.quality !== void 0 && typeof record.quality !== "number") throw new Error(`Image preset "${name}" has a non-number "quality".`);
239
+ return {
240
+ format: record.format,
241
+ quality: record.quality
242
+ };
243
+ }
244
+ var RASTER_IMAGE_EXTENSIONS = [
245
+ "png",
246
+ "jpg",
247
+ "jpeg",
248
+ "webp",
249
+ "avif"
250
+ ];
251
+ var imagePlugin = {
252
+ type: "image",
253
+ accepts: [...RASTER_IMAGE_EXTENSIONS],
254
+ defaultParameters: () => ({ preset: "default" }),
255
+ validateParameters(value) {
256
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("Image parameters must be an object.");
257
+ const record = value;
258
+ if (typeof record.preset !== "string" || record.preset.length === 0) throw new Error("Image parameters need a non-empty string \"preset\".");
259
+ if (record.targetWidth !== void 0) {
260
+ if (typeof record.targetWidth !== "number" || !Number.isInteger(record.targetWidth) || record.targetWidth <= 0) throw new Error("Image \"targetWidth\" must be a positive integer when set.");
261
+ }
262
+ return {
263
+ preset: record.preset,
264
+ ...record.targetWidth !== void 0 ? { targetWidth: record.targetWidth } : {}
265
+ };
266
+ }
267
+ };
268
+ //#endregion
269
+ //#region src/lib/core/slice-data.ts
270
+ /**
271
+ * The slice data model keeps the source image separate from slicing metadata
272
+ * (Fundus tracks raw files and
273
+ * proxy dimensions separately), so there is no `SliceSource` here.
274
+ *
275
+ * The geometry is stored as **insets** (border thickness in source pixels), the
276
+ * canonical, render-ready form — equivalent to CSS `border-image-slice`.
277
+ * `slicedAxesFor` is the single source of truth for which axes each mode uses.
278
+ */
279
+ var SLICE_MODES = [
280
+ "nine",
281
+ "three-horizontal",
282
+ "three-vertical",
283
+ "one"
284
+ ];
285
+ /** All-zero insets — the "no overdraw" value. */
286
+ function createZeroInsets() {
287
+ return {
288
+ top: 0,
289
+ right: 0,
290
+ bottom: 0,
291
+ left: 0
292
+ };
293
+ }
294
+ /**
295
+ * Default insets for a freshly ingested image: each border a quarter of the
296
+ * corresponding dimension (at least 1px where the image is large enough),
297
+ * always clamped so a center of at least one source pixel remains on each
298
+ * axis. For an axis too small for insets + a 1px center (width/height ≤ 2)
299
+ * the insets on that axis are 0 — structurally valid slicing for any size ≥ 1.
300
+ */
301
+ function defaultInsetsForSize(width, height) {
302
+ const horizontal = Math.min(Math.max(1, Math.floor(width / 4)), Math.floor((width - 1) / 2));
303
+ const vertical = Math.min(Math.max(1, Math.floor(height / 4)), Math.floor((height - 1) / 2));
304
+ return {
305
+ top: vertical,
306
+ right: horizontal,
307
+ bottom: vertical,
308
+ left: horizontal
309
+ };
310
+ }
311
+ //#endregion
312
+ //#region src/lib/core/plugins/slice.ts
313
+ /** Built-in presets, always available; host config merges over them. */
314
+ var SLICE_BUILT_IN_PRESETS = { default: {
315
+ format: "webp",
316
+ quality: 82
317
+ } };
318
+ function validateInsets(label, value) {
319
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`Slice ${label} must be an object with top/right/bottom/left.`);
320
+ const record = value;
321
+ const sides = [
322
+ "top",
323
+ "right",
324
+ "bottom",
325
+ "left"
326
+ ];
327
+ const result = createZeroInsets();
328
+ for (const side of sides) {
329
+ const sideValue = record[side];
330
+ if (typeof sideValue !== "number" || !Number.isInteger(sideValue) || sideValue < 0) throw new Error(`Slice ${label}.${side} must be a non-negative integer.`);
331
+ result[side] = sideValue;
332
+ }
333
+ return result;
334
+ }
335
+ var slicePlugin = {
336
+ type: "slice",
337
+ accepts: [...RASTER_IMAGE_EXTENSIONS],
338
+ defaultParameters: () => ({
339
+ mode: "nine",
340
+ insets: createZeroInsets(),
341
+ pixelRatio: 1,
342
+ preset: "default"
343
+ }),
344
+ validateParameters(value) {
345
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("Slice parameters must be an object.");
346
+ const record = value;
347
+ if (typeof record.mode !== "string" || !SLICE_MODES.includes(record.mode)) throw new Error(`Slice "mode" must be one of ${SLICE_MODES.map((mode) => `'${mode}'`).join(" | ")}.`);
348
+ const insets = validateInsets("insets", record.insets);
349
+ if (typeof record.pixelRatio !== "number" || !Number.isInteger(record.pixelRatio) || record.pixelRatio < 1) throw new Error("Slice \"pixelRatio\" must be an integer ≥ 1.");
350
+ const overdraw = record.overdraw === void 0 ? void 0 : validateInsets("overdraw", record.overdraw);
351
+ if (typeof record.preset !== "string" || record.preset.length === 0) throw new Error("Slice parameters need a non-empty string \"preset\".");
352
+ return {
353
+ mode: record.mode,
354
+ insets,
355
+ pixelRatio: record.pixelRatio,
356
+ ...overdraw !== void 0 ? { overdraw } : {},
357
+ preset: record.preset
358
+ };
359
+ }
360
+ };
361
+ //#endregion
362
+ //#region src/lib/core/plugins/registry.ts
363
+ /**
364
+ * The composition root for Fundus asset-type plugins.
365
+ *
366
+ * A plugin is registered exactly once here. Environment-specific surfaces
367
+ * (server processing, editor panels, runtime handlers) keep their imports on
368
+ * the correct side of SvelteKit's browser/server boundary and project this
369
+ * registered set onto their local implementation catalogues.
370
+ */
371
+ var PluginRegistry = class {
372
+ #byType = /* @__PURE__ */ new Map();
373
+ register(plugin) {
374
+ if (this.#byType.has(plugin.type)) throw new Error(`Plugin type "${plugin.type}" is already registered.`);
375
+ this.#byType.set(plugin.type, plugin);
376
+ }
377
+ has(type) {
378
+ return this.#byType.has(type);
379
+ }
380
+ values() {
381
+ return [...this.#byType.values()];
382
+ }
383
+ types() {
384
+ return [...this.#byType.keys()];
385
+ }
386
+ /**
387
+ * Select the environment-specific implementation for every registered
388
+ * plugin. Unregistered catalogue entries remain dormant; a registered
389
+ * plugin without the requested facet fails immediately during startup.
390
+ */
391
+ project(catalogue, facet) {
392
+ const projected = Object.create(null);
393
+ for (const type of this.#byType.keys()) {
394
+ if (!Object.hasOwn(catalogue, type)) throw new Error(`Registered plugin "${type}" has no ${facet}.`);
395
+ projected[type] = catalogue[type];
396
+ }
397
+ return projected;
398
+ }
399
+ };
400
+ var plugins = new PluginRegistry();
401
+ plugins.register(imagePlugin);
402
+ plugins.register(slicePlugin);
403
+ plugins.register(videoPlugin);
404
+ plugins.register(chromaKeyVideoPlugin);
405
+ plugins.register(audioPlugin);
406
+ //#endregion
407
+ //#region src/lib/core/asset-id.ts
408
+ /**
409
+ * Asset ids are the SSOT keys and the generated property names on manifests
410
+ * are stable, human-readable camelCase slugs that must be valid JS
411
+ * identifiers and must not collide with `Manifest` class members.
412
+ */
413
+ /**
414
+ * Names an asset id may never take: current and future members of the runtime
415
+ * `Manifest` class (entries become direct properties on it), plus inherited
416
+ * `Object.prototype` members that would shadow-collide, plus keys that are
417
+ * prototype-pollution hazards when used as record keys (`prototype`;
418
+ * `__proto__` already fails the camelCase pattern).
419
+ */
420
+ var RESERVED_ASSET_IDS = [
421
+ "preload",
422
+ "release",
423
+ "entries",
424
+ "constructor",
425
+ "prototype",
426
+ "hasOwnProperty",
427
+ "isPrototypeOf",
428
+ "propertyIsEnumerable",
429
+ "toLocaleString",
430
+ "toString",
431
+ "valueOf"
432
+ ];
433
+ var ASSET_ID_PATTERN = /^[a-z][A-Za-z0-9]*$/;
434
+ /**
435
+ * Why an id is invalid, as a human-readable message — or `null` when valid.
436
+ * Lets the editor and the validator surface the precise reason.
437
+ */
438
+ function assetIdError(id) {
439
+ if (!ASSET_ID_PATTERN.test(id)) return `"${id}" is not a valid asset id — use a camelCase identifier starting with a lowercase letter (e.g. "navigationPanel").`;
440
+ if (RESERVED_ASSET_IDS.includes(id)) return `"${id}" is reserved (it collides with a Manifest member name).`;
441
+ return null;
442
+ }
443
+ /**
444
+ * Manifest names deliberately share the asset-id grammar because each name
445
+ * becomes a generated JavaScript module export.
446
+ */
447
+ function manifestNameError(name) {
448
+ if (!ASSET_ID_PATTERN.test(name)) return `"${name}" is not a valid manifest name — use a camelCase identifier starting with a lowercase letter (e.g. "mainCatalog").`;
449
+ if (RESERVED_ASSET_IDS.includes(name)) return `"${name}" is reserved (it collides with a Manifest member name).`;
450
+ return null;
451
+ }
452
+ //#endregion
453
+ //#region src/lib/core/ingest.ts
454
+ /** The registered descriptors, in registration order. */
455
+ plugins.values();
456
+
457
+ export { AUDIO_BUILT_IN_PRESETS as A, IMAGE_BUILT_IN_PRESETS as I, SLICE_BUILT_IN_PRESETS as S, VIDEO_BUILT_IN_PRESETS as V, audioPlugin as a, assetIdError as b, chromaKeyVideoPlugin as c, defaultInsetsForSize as d, isAssetReference as e, validateVideoPreset as f, validateAudioPreset as g, validateImagePreset as h, imagePlugin as i, manifestNameError as m, plugins as p, slicePlugin as s, videoPlugin as v };
458
+ //# sourceMappingURL=core.js-xfrkaQpS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js-xfrkaQpS.js","sources":["../../../../.svelte-kit/output/server/chunks/core.js"],"sourcesContent":["//#region src/lib/core/plugins/audio.ts\n/** Built-in presets, always available; host config merges over them. */\nvar AUDIO_BUILT_IN_PRESETS = { default: {\n\tcodec: \"opus\",\n\tbitrateKbps: 96,\n\tcontainer: \"webm\"\n} };\n/** Each codec's muxable container — a mismatch is a config error, not an ffmpeg one. */\nvar CONTAINER_BY_CODEC = {\n\topus: \"webm\",\n\taac: \"m4a\"\n};\nfunction validateAudioPreset(name, value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(`Audio preset \"${name}\" must be an object.`);\n\tconst record = value;\n\tif (record.codec !== \"opus\" && record.codec !== \"aac\") throw new Error(`Audio preset \"${name}\" needs a \"codec\" of 'opus' | 'aac'.`);\n\tif (typeof record.bitrateKbps !== \"number\" || !Number.isInteger(record.bitrateKbps) || record.bitrateKbps <= 0) throw new Error(`Audio preset \"${name}\" needs a positive integer \"bitrateKbps\".`);\n\tconst expectedContainer = CONTAINER_BY_CODEC[record.codec];\n\tif (record.container !== expectedContainer) throw new Error(`Audio preset \"${name}\": codec '${record.codec}' requires container '${expectedContainer}'.`);\n\treturn {\n\t\tcodec: record.codec,\n\t\tbitrateKbps: record.bitrateKbps,\n\t\tcontainer: expectedContainer\n\t};\n}\nvar audioPlugin = {\n\ttype: \"audio\",\n\taccepts: [...[\n\t\t\"mp3\",\n\t\t\"wav\",\n\t\t\"m4a\",\n\t\t\"ogg\",\n\t\t\"flac\"\n\t]],\n\tdefaultParameters: () => ({ preset: \"default\" }),\n\tvalidateParameters(value) {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(\"Audio parameters must be an object.\");\n\t\tconst record = value;\n\t\tif (typeof record.preset !== \"string\" || record.preset.length === 0) throw new Error(\"Audio parameters need a non-empty string \\\"preset\\\".\");\n\t\treturn { preset: record.preset };\n\t}\n};\n//#endregion\n//#region src/lib/core/asset-reference.ts\n/** Whether a value is a well-formed asset-reference marker. */\nfunction isAssetReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && typeof value.$asset === \"string\" && value.$asset !== \"\";\n}\n//#endregion\n//#region src/lib/core/chroma-key.ts\n/** The upstream shader's property defaults — a freshly ingested asset starts here. */\nvar DEFAULT_CHROMA_KEY_PARAMETERS = {\n\tkeyColor: [\n\t\t0,\n\t\t1,\n\t\t0\n\t],\n\tcolorCutoff: .2,\n\tcolorFeathering: .33,\n\tmaskFeathering: 1,\n\tsharpening: .5,\n\tdespill: 1,\n\tdespillLuminanceAdd: .2\n};\nvar SCALAR_KEYS = [\n\t\"colorCutoff\",\n\t\"colorFeathering\",\n\t\"maskFeathering\",\n\t\"sharpening\",\n\t\"despill\",\n\t\"despillLuminanceAdd\"\n];\nfunction clampUnit(value) {\n\treturn Math.min(1, Math.max(0, value));\n}\n/**\n* Validate an unknown chroma-key blob: every field required, every channel and\n* scalar a finite number. Values are clamped into 0–1 (slider float artifacts\n* must not invalidate a library), non-numbers throw.\n*/\nfunction validateChromaKeyParameters(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(\"\\\"chromaKey\\\" must be an object.\");\n\tconst record = value;\n\tconst keyColor = record.keyColor;\n\tif (!Array.isArray(keyColor) || keyColor.length !== 3 || keyColor.some((channel) => typeof channel !== \"number\" || !Number.isFinite(channel))) throw new Error(\"\\\"chromaKey.keyColor\\\" must be an array of three numbers (RGB, 0–1 each).\");\n\tconst result = { keyColor: [\n\t\tclampUnit(keyColor[0]),\n\t\tclampUnit(keyColor[1]),\n\t\tclampUnit(keyColor[2])\n\t] };\n\tfor (const key of SCALAR_KEYS) {\n\t\tconst scalar = record[key];\n\t\tif (typeof scalar !== \"number\" || !Number.isFinite(scalar)) throw new Error(`\"chromaKey.${key}\" must be a number (0–1).`);\n\t\tresult[key] = clampUnit(scalar);\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/lib/core/plugins/video.ts\n/**\n* Built-in presets, always available; host config merges over them. The\n* default is the proven committed-video formula: H.264, slow preset, animation\n* tune, CRF 28, yuv420p, faststart MP4.\n*/\nvar VIDEO_BUILT_IN_PRESETS = { default: {\n\tcodec: \"h264\",\n\tcrf: 28,\n\tencoderPreset: \"slow\",\n\ttune: \"animation\",\n\tpixelFormat: \"yuv420p\",\n\tcontainer: \"mp4\"\n} };\nfunction validateVideoPreset(name, value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(`Video preset \"${name}\" must be an object.`);\n\tconst record = value;\n\tif (record.codec !== \"h264\") throw new Error(`Video preset \"${name}\" needs a \"codec\" of 'h264'.`);\n\tif (typeof record.crf !== \"number\" || !Number.isInteger(record.crf) || record.crf < 0) throw new Error(`Video preset \"${name}\" needs an integer \"crf\" ≥ 0.`);\n\tif (typeof record.encoderPreset !== \"string\" || record.encoderPreset.length === 0) throw new Error(`Video preset \"${name}\" needs a non-empty string \"encoderPreset\".`);\n\tif (record.tune !== void 0 && (typeof record.tune !== \"string\" || record.tune.length === 0)) throw new Error(`Video preset \"${name}\" has a non-string \"tune\".`);\n\tif (typeof record.pixelFormat !== \"string\" || record.pixelFormat.length === 0) throw new Error(`Video preset \"${name}\" needs a non-empty string \"pixelFormat\".`);\n\tif (record.container !== \"mp4\") throw new Error(`Video preset \"${name}\" needs a \"container\" of 'mp4'.`);\n\treturn {\n\t\tcodec: \"h264\",\n\t\tcrf: record.crf,\n\t\tencoderPreset: record.encoderPreset,\n\t\t...record.tune !== void 0 ? { tune: record.tune } : {},\n\t\tpixelFormat: record.pixelFormat,\n\t\tcontainer: \"mp4\"\n\t};\n}\nvar VIDEO_EXTENSIONS = [\n\t\"mp4\",\n\t\"mov\",\n\t\"webm\",\n\t\"m4v\"\n];\n/** Shared by the video and chroma-key-video plugins (identical transcode inputs). */\nfunction validateVideoParameters(label, value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(`${label} parameters must be an object.`);\n\tconst record = value;\n\tif (typeof record.preset !== \"string\" || record.preset.length === 0) throw new Error(`${label} parameters need a non-empty string \"preset\".`);\n\tif (record.maxWidth !== void 0) {\n\t\tif (typeof record.maxWidth !== \"number\" || !Number.isInteger(record.maxWidth) || record.maxWidth <= 0) throw new Error(`${label} \"maxWidth\" must be a positive integer when set.`);\n\t}\n\treturn {\n\t\tpreset: record.preset,\n\t\t...record.maxWidth !== void 0 ? { maxWidth: record.maxWidth } : {}\n\t};\n}\nvar videoPlugin = {\n\ttype: \"video\",\n\taccepts: [...VIDEO_EXTENSIONS],\n\tdefaultParameters: () => ({ preset: \"default\" }),\n\tvalidateParameters(value) {\n\t\treturn validateVideoParameters(\"Video\", value);\n\t}\n};\n//#endregion\n//#region src/lib/core/plugins/chroma-key-video.ts\n/**\n* Chroma-key-video plugin (core part): a greenscreen video delivered through\n* the video plugin's transcode pipeline, plus the keying data the runtime's\n* WebGL renderer needs — chroma-key parameters and two optional image\n* references: a grayscale shape `mask` multiplied onto the keyed\n* alpha, and a static `fallback` image shown when WebGL2 is unavailable.\n*\n* The keying values and references are entry-only data: they travel into the\n* generated manifest entry but never touch the ffmpeg job, so\n* `processingParameters` narrows the job-hash input to the transcode inputs\n* (preset + maxWidth) — retuning a slider must not re-transcode the proxy.\n*/\nfunction validateOptionalReference(label, value) {\n\tif (value === void 0) return void 0;\n\tif (!isAssetReference(value)) throw new Error(`\"${label}\" must be an asset reference ({ \"$asset\": \"<id>\" }).`);\n\treturn { $asset: value.$asset };\n}\nvar chromaKeyVideoPlugin = {\n\ttype: \"chroma-key-video\",\n\taccepts: [...VIDEO_EXTENSIONS],\n\tdefaultParameters: () => ({\n\t\tpreset: \"default\",\n\t\tchromaKey: {\n\t\t\t...DEFAULT_CHROMA_KEY_PARAMETERS,\n\t\t\tkeyColor: [...DEFAULT_CHROMA_KEY_PARAMETERS.keyColor]\n\t\t}\n\t}),\n\tvalidateParameters(value) {\n\t\tconst videoParameters = validateVideoParameters(\"Chroma-key-video\", value);\n\t\tconst record = value;\n\t\tconst chromaKey = validateChromaKeyParameters(record.chromaKey);\n\t\tconst mask = validateOptionalReference(\"mask\", record.mask);\n\t\tconst fallback = validateOptionalReference(\"fallback\", record.fallback);\n\t\treturn {\n\t\t\t...videoParameters,\n\t\t\tchromaKey,\n\t\t\t...mask !== void 0 ? { mask } : {},\n\t\t\t...fallback !== void 0 ? { fallback } : {}\n\t\t};\n\t},\n\tcollectReferences(parameters) {\n\t\tconst references = [];\n\t\tif (parameters.mask) references.push({\n\t\t\tfield: \"mask\",\n\t\t\tassetId: parameters.mask.$asset,\n\t\t\texpectedTypes: [\"image\"]\n\t\t});\n\t\tif (parameters.fallback) references.push({\n\t\t\tfield: \"fallback\",\n\t\t\tassetId: parameters.fallback.$asset,\n\t\t\texpectedTypes: [\"image\"]\n\t\t});\n\t\treturn references;\n\t},\n\tprocessingParameters(parameters) {\n\t\treturn {\n\t\t\tpreset: parameters.preset,\n\t\t\t...parameters.maxWidth !== void 0 ? { maxWidth: parameters.maxWidth } : {}\n\t\t};\n\t}\n};\n//#endregion\n//#region src/lib/core/plugins/image.ts\nvar IMAGE_FORMATS = [\n\t\"webp\",\n\t\"png\",\n\t\"avif\",\n\t\"jpeg\"\n];\n/** Built-in presets, always available; host config merges over them. */\nvar IMAGE_BUILT_IN_PRESETS = { default: {\n\tformat: \"webp\",\n\tquality: 82\n} };\nfunction validateImagePreset(name, value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(`Image preset \"${name}\" must be an object.`);\n\tconst record = value;\n\tif (typeof record.format !== \"string\" || !IMAGE_FORMATS.includes(record.format)) throw new Error(`Image preset \"${name}\" needs a \"format\" of ${IMAGE_FORMATS.map((format) => `'${format}'`).join(\" | \")}.`);\n\tif (record.quality !== void 0 && typeof record.quality !== \"number\") throw new Error(`Image preset \"${name}\" has a non-number \"quality\".`);\n\treturn {\n\t\tformat: record.format,\n\t\tquality: record.quality\n\t};\n}\nvar RASTER_IMAGE_EXTENSIONS = [\n\t\"png\",\n\t\"jpg\",\n\t\"jpeg\",\n\t\"webp\",\n\t\"avif\"\n];\nvar imagePlugin = {\n\ttype: \"image\",\n\taccepts: [...RASTER_IMAGE_EXTENSIONS],\n\tdefaultParameters: () => ({ preset: \"default\" }),\n\tvalidateParameters(value) {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(\"Image parameters must be an object.\");\n\t\tconst record = value;\n\t\tif (typeof record.preset !== \"string\" || record.preset.length === 0) throw new Error(\"Image parameters need a non-empty string \\\"preset\\\".\");\n\t\tif (record.targetWidth !== void 0) {\n\t\t\tif (typeof record.targetWidth !== \"number\" || !Number.isInteger(record.targetWidth) || record.targetWidth <= 0) throw new Error(\"Image \\\"targetWidth\\\" must be a positive integer when set.\");\n\t\t}\n\t\treturn {\n\t\t\tpreset: record.preset,\n\t\t\t...record.targetWidth !== void 0 ? { targetWidth: record.targetWidth } : {}\n\t\t};\n\t}\n};\n//#endregion\n//#region src/lib/core/slice-data.ts\n/**\n* The slice data model keeps the source image separate from slicing metadata\n* (Fundus tracks raw files and\n* proxy dimensions separately), so there is no `SliceSource` here.\n*\n* The geometry is stored as **insets** (border thickness in source pixels), the\n* canonical, render-ready form — equivalent to CSS `border-image-slice`.\n* `slicedAxesFor` is the single source of truth for which axes each mode uses.\n*/\nvar SLICE_MODES = [\n\t\"nine\",\n\t\"three-horizontal\",\n\t\"three-vertical\",\n\t\"one\"\n];\n/** All-zero insets — the \"no overdraw\" value. */\nfunction createZeroInsets() {\n\treturn {\n\t\ttop: 0,\n\t\tright: 0,\n\t\tbottom: 0,\n\t\tleft: 0\n\t};\n}\n/**\n* Default insets for a freshly ingested image: each border a quarter of the\n* corresponding dimension (at least 1px where the image is large enough),\n* always clamped so a center of at least one source pixel remains on each\n* axis. For an axis too small for insets + a 1px center (width/height ≤ 2)\n* the insets on that axis are 0 — structurally valid slicing for any size ≥ 1.\n*/\nfunction defaultInsetsForSize(width, height) {\n\tconst horizontal = Math.min(Math.max(1, Math.floor(width / 4)), Math.floor((width - 1) / 2));\n\tconst vertical = Math.min(Math.max(1, Math.floor(height / 4)), Math.floor((height - 1) / 2));\n\treturn {\n\t\ttop: vertical,\n\t\tright: horizontal,\n\t\tbottom: vertical,\n\t\tleft: horizontal\n\t};\n}\n/** Which source-image axes are sliced for a mode. */\nfunction slicedAxesFor(mode) {\n\treturn {\n\t\thorizontal: mode === \"nine\" || mode === \"three-horizontal\",\n\t\tvertical: mode === \"nine\" || mode === \"three-vertical\"\n\t};\n}\n/** Maximum inset on one side while preserving the opposite inset. */\nfunction maxInset(insets, side, width, height) {\n\tif (side === \"left\") return width - insets.right;\n\tif (side === \"right\") return width - insets.left;\n\tif (side === \"top\") return height - insets.bottom;\n\treturn height - insets.top;\n}\n/** Maximum overdraw on one side while preserving at least one core source pixel. */\nfunction maxOverdraw(overdraw, side, width, height) {\n\treturn maxInset(overdraw, side, width, height) - 1;\n}\n//#endregion\n//#region src/lib/core/plugins/slice.ts\n/** Built-in presets, always available; host config merges over them. */\nvar SLICE_BUILT_IN_PRESETS = { default: {\n\tformat: \"webp\",\n\tquality: 82\n} };\nfunction validateInsets(label, value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(`Slice ${label} must be an object with top/right/bottom/left.`);\n\tconst record = value;\n\tconst sides = [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t];\n\tconst result = createZeroInsets();\n\tfor (const side of sides) {\n\t\tconst sideValue = record[side];\n\t\tif (typeof sideValue !== \"number\" || !Number.isInteger(sideValue) || sideValue < 0) throw new Error(`Slice ${label}.${side} must be a non-negative integer.`);\n\t\tresult[side] = sideValue;\n\t}\n\treturn result;\n}\nvar slicePlugin = {\n\ttype: \"slice\",\n\taccepts: [...RASTER_IMAGE_EXTENSIONS],\n\tdefaultParameters: () => ({\n\t\tmode: \"nine\",\n\t\tinsets: createZeroInsets(),\n\t\tpixelRatio: 1,\n\t\tpreset: \"default\"\n\t}),\n\tvalidateParameters(value) {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(\"Slice parameters must be an object.\");\n\t\tconst record = value;\n\t\tif (typeof record.mode !== \"string\" || !SLICE_MODES.includes(record.mode)) throw new Error(`Slice \"mode\" must be one of ${SLICE_MODES.map((mode) => `'${mode}'`).join(\" | \")}.`);\n\t\tconst insets = validateInsets(\"insets\", record.insets);\n\t\tif (typeof record.pixelRatio !== \"number\" || !Number.isInteger(record.pixelRatio) || record.pixelRatio < 1) throw new Error(\"Slice \\\"pixelRatio\\\" must be an integer ≥ 1.\");\n\t\tconst overdraw = record.overdraw === void 0 ? void 0 : validateInsets(\"overdraw\", record.overdraw);\n\t\tif (typeof record.preset !== \"string\" || record.preset.length === 0) throw new Error(\"Slice parameters need a non-empty string \\\"preset\\\".\");\n\t\treturn {\n\t\t\tmode: record.mode,\n\t\t\tinsets,\n\t\t\tpixelRatio: record.pixelRatio,\n\t\t\t...overdraw !== void 0 ? { overdraw } : {},\n\t\t\tpreset: record.preset\n\t\t};\n\t}\n};\n//#endregion\n//#region src/lib/core/plugins/registry.ts\n/**\n* The composition root for Fundus asset-type plugins.\n*\n* A plugin is registered exactly once here. Environment-specific surfaces\n* (server processing, editor panels, runtime handlers) keep their imports on\n* the correct side of SvelteKit's browser/server boundary and project this\n* registered set onto their local implementation catalogues.\n*/\nvar PluginRegistry = class {\n\t#byType = /* @__PURE__ */ new Map();\n\tregister(plugin) {\n\t\tif (this.#byType.has(plugin.type)) throw new Error(`Plugin type \"${plugin.type}\" is already registered.`);\n\t\tthis.#byType.set(plugin.type, plugin);\n\t}\n\thas(type) {\n\t\treturn this.#byType.has(type);\n\t}\n\tvalues() {\n\t\treturn [...this.#byType.values()];\n\t}\n\ttypes() {\n\t\treturn [...this.#byType.keys()];\n\t}\n\t/**\n\t* Select the environment-specific implementation for every registered\n\t* plugin. Unregistered catalogue entries remain dormant; a registered\n\t* plugin without the requested facet fails immediately during startup.\n\t*/\n\tproject(catalogue, facet) {\n\t\tconst projected = Object.create(null);\n\t\tfor (const type of this.#byType.keys()) {\n\t\t\tif (!Object.hasOwn(catalogue, type)) throw new Error(`Registered plugin \"${type}\" has no ${facet}.`);\n\t\t\tprojected[type] = catalogue[type];\n\t\t}\n\t\treturn projected;\n\t}\n};\nvar plugins = new PluginRegistry();\nplugins.register(imagePlugin);\nplugins.register(slicePlugin);\nplugins.register(videoPlugin);\nplugins.register(chromaKeyVideoPlugin);\nplugins.register(audioPlugin);\n//#endregion\n//#region src/lib/core/asset-id.ts\n/**\n* Asset ids are the SSOT keys and the generated property names on manifests\n* are stable, human-readable camelCase slugs that must be valid JS\n* identifiers and must not collide with `Manifest` class members.\n*/\n/**\n* Names an asset id may never take: current and future members of the runtime\n* `Manifest` class (entries become direct properties on it), plus inherited\n* `Object.prototype` members that would shadow-collide, plus keys that are\n* prototype-pollution hazards when used as record keys (`prototype`;\n* `__proto__` already fails the camelCase pattern).\n*/\nvar RESERVED_ASSET_IDS = [\n\t\"preload\",\n\t\"release\",\n\t\"entries\",\n\t\"constructor\",\n\t\"prototype\",\n\t\"hasOwnProperty\",\n\t\"isPrototypeOf\",\n\t\"propertyIsEnumerable\",\n\t\"toLocaleString\",\n\t\"toString\",\n\t\"valueOf\"\n];\nvar ASSET_ID_PATTERN = /^[a-z][A-Za-z0-9]*$/;\n/**\n* Why an id is invalid, as a human-readable message — or `null` when valid.\n* Lets the editor and the validator surface the precise reason.\n*/\nfunction assetIdError(id) {\n\tif (!ASSET_ID_PATTERN.test(id)) return `\"${id}\" is not a valid asset id — use a camelCase identifier starting with a lowercase letter (e.g. \"navigationPanel\").`;\n\tif (RESERVED_ASSET_IDS.includes(id)) return `\"${id}\" is reserved (it collides with a Manifest member name).`;\n\treturn null;\n}\n/**\n* Manifest names deliberately share the asset-id grammar because each name\n* becomes a generated JavaScript module export.\n*/\nfunction manifestNameError(name) {\n\tif (!ASSET_ID_PATTERN.test(name)) return `\"${name}\" is not a valid manifest name — use a camelCase identifier starting with a lowercase letter (e.g. \"mainCatalog\").`;\n\tif (RESERVED_ASSET_IDS.includes(name)) return `\"${name}\" is reserved (it collides with a Manifest member name).`;\n\treturn null;\n}\n//#endregion\n//#region src/lib/core/ingest.ts\n/** The registered descriptors, in registration order. */\nvar BUILT_IN_DESCRIPTORS = plugins.values();\n/** Unique HTML file-picker accept extensions derived from descriptor claims. */\nfunction acceptedExtensions(descriptors = BUILT_IN_DESCRIPTORS) {\n\treturn [...new Set(descriptors.flatMap((descriptor) => descriptor.accepts))].sort().map((extension) => `.${extension}`);\n}\n/**\n* Types an ingested file of this extension could become — derived from the\n* descriptors' `accepts` claims. Raster images and video containers are\n* ambiguous (image/slice, video/chroma-key-video) — the editor dialog prompts\n* once, the CLI requires `--type`; audio is unambiguous.\n*/\nfunction typesForFileName(fileName, descriptors = BUILT_IN_DESCRIPTORS) {\n\tconst extension = fileName.slice(fileName.lastIndexOf(\".\") + 1).toLowerCase();\n\treturn descriptors.filter((descriptor) => descriptor.accepts.includes(extension)).map((descriptor) => descriptor.type);\n}\n//#endregion\nexport { validateAudioPreset as C, audioPlugin as S, VIDEO_BUILT_IN_PRESETS as _, plugins as a, isAssetReference as b, createZeroInsets as c, maxOverdraw as d, slicedAxesFor as f, chromaKeyVideoPlugin as g, validateImagePreset as h, manifestNameError as i, defaultInsetsForSize as l, imagePlugin as m, typesForFileName as n, SLICE_BUILT_IN_PRESETS as o, IMAGE_BUILT_IN_PRESETS as p, assetIdError as r, slicePlugin as s, acceptedExtensions as t, maxInset as u, validateVideoPreset as v, AUDIO_BUILT_IN_PRESETS as x, videoPlugin as y };\n"],"names":[],"mappings":"AAAA;AACA;AACG,IAAC,sBAAsB,GAAG,EAAE,OAAO,EAAE;AACxC,CAAC,KAAK,EAAE,MAAM;AACd,CAAC,WAAW,EAAE,EAAE;AAChB,CAAC,SAAS,EAAE;AACZ,CAAC;AACD;AACA,IAAI,kBAAkB,GAAG;AACzB,CAAC,IAAI,EAAE,MAAM;AACb,CAAC,GAAG,EAAE;AACN,CAAC;AACD,SAAS,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE;AAC1C,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;AACtI,CAAC,MAAM,MAAM,GAAG,KAAK;AACrB,CAAC,IAAI,MAAM,CAAC,KAAK,KAAK,MAAM,IAAI,MAAM,CAAC,KAAK,KAAK,KAAK,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,oCAAoC,CAAC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