unspaghettit 0.2.0 → 0.4.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 (772) hide show
  1. package/README.md +56 -18
  2. package/build/client/_app/immutable/assets/0.DCOD5ne_.css +1 -0
  3. package/build/client/_app/immutable/assets/0.DCOD5ne_.css.br +0 -0
  4. package/build/client/_app/immutable/assets/0.DCOD5ne_.css.gz +0 -0
  5. package/build/client/_app/immutable/assets/12.nv0I59TU.css.gz +0 -0
  6. package/build/client/_app/immutable/assets/3.B3akUL9A.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css +1 -0
  8. package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css.br +0 -0
  9. package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css.gz +0 -0
  10. package/build/client/_app/immutable/chunks/B3vnQs252.js +1 -0
  11. package/build/client/_app/immutable/chunks/B3vnQs252.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/B3vnQs252.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{CxyLMlpt2.js → BANF9BhQ2.js} +1 -1
  14. package/build/client/_app/immutable/chunks/BANF9BhQ2.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/BANF9BhQ2.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/BJdTO_n6.js +1 -0
  17. package/build/client/_app/immutable/chunks/BJdTO_n6.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/BJdTO_n6.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/BPl9BITm.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/BQ9GodWX2.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/Bcyn5YUg.js +4 -0
  22. package/build/client/_app/immutable/chunks/Bcyn5YUg.js.br +0 -0
  23. package/build/client/_app/immutable/chunks/Bcyn5YUg.js.gz +0 -0
  24. package/build/client/_app/immutable/chunks/Bfc9rQXP.js +1 -0
  25. package/build/client/_app/immutable/chunks/Bfc9rQXP.js.br +0 -0
  26. package/build/client/_app/immutable/chunks/Bfc9rQXP.js.gz +0 -0
  27. package/build/client/_app/immutable/chunks/{BfMYiIUi.js → BjxqhpPG.js} +1 -1
  28. package/build/client/_app/immutable/chunks/BjxqhpPG.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/BjxqhpPG.js.gz +0 -0
  30. package/build/client/_app/immutable/chunks/ByaoVvNB.js +1 -0
  31. package/build/client/_app/immutable/chunks/ByaoVvNB.js.br +0 -0
  32. package/build/client/_app/immutable/chunks/ByaoVvNB.js.gz +0 -0
  33. package/build/client/_app/immutable/chunks/BzLd0mTH.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/C8b3IMj8.js +1 -0
  35. package/build/client/_app/immutable/chunks/C8b3IMj8.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/C8b3IMj8.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/CXvvf4uQ.js +1 -0
  38. package/build/client/_app/immutable/chunks/CXvvf4uQ.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/CXvvf4uQ.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/Cl7Z3e6-.js.gz +0 -0
  41. package/build/client/_app/immutable/chunks/ClC4qR7W2.js +2 -0
  42. package/build/client/_app/immutable/chunks/ClC4qR7W2.js.br +0 -0
  43. package/build/client/_app/immutable/chunks/ClC4qR7W2.js.gz +0 -0
  44. package/build/client/_app/immutable/chunks/CuGlh1c2.js +1 -0
  45. package/build/client/_app/immutable/chunks/CuGlh1c2.js.br +0 -0
  46. package/build/client/_app/immutable/chunks/CuGlh1c2.js.gz +0 -0
  47. package/build/client/_app/immutable/chunks/CwzIdrQR.js +1 -0
  48. package/build/client/_app/immutable/chunks/CwzIdrQR.js.br +0 -0
  49. package/build/client/_app/immutable/chunks/CwzIdrQR.js.gz +0 -0
  50. package/build/client/_app/immutable/chunks/D5speDV82.js +908 -0
  51. package/build/client/_app/immutable/chunks/D5speDV82.js.br +0 -0
  52. package/build/client/_app/immutable/chunks/D5speDV82.js.gz +0 -0
  53. package/build/client/_app/immutable/chunks/D64sGJRN.js +1 -0
  54. package/build/client/_app/immutable/chunks/D64sGJRN.js.br +0 -0
  55. package/build/client/_app/immutable/chunks/D64sGJRN.js.gz +0 -0
  56. package/build/client/_app/immutable/chunks/DNaA4QRO2.js +1 -0
  57. package/build/client/_app/immutable/chunks/DNaA4QRO2.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/DNaA4QRO2.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/Da59TXPe.js +1 -0
  60. package/build/client/_app/immutable/chunks/Da59TXPe.js.br +2 -0
  61. package/build/client/_app/immutable/chunks/Da59TXPe.js.gz +0 -0
  62. package/build/client/_app/immutable/chunks/DhTiE3j02.js +2 -0
  63. package/build/client/_app/immutable/chunks/DhTiE3j02.js.br +0 -0
  64. package/build/client/_app/immutable/chunks/DhTiE3j02.js.gz +0 -0
  65. package/build/client/_app/immutable/chunks/Dhqg7r_2.js.gz +0 -0
  66. package/build/client/_app/immutable/chunks/DmyaDy4d2.js +1 -0
  67. package/build/client/_app/immutable/chunks/DmyaDy4d2.js.br +0 -0
  68. package/build/client/_app/immutable/chunks/DmyaDy4d2.js.gz +0 -0
  69. package/build/client/_app/immutable/chunks/DryaQyjN2.js +1 -0
  70. package/build/client/_app/immutable/chunks/DryaQyjN2.js.br +0 -0
  71. package/build/client/_app/immutable/chunks/DryaQyjN2.js.gz +0 -0
  72. package/build/client/_app/immutable/chunks/DtK8qK5Q2.js +1 -0
  73. package/build/client/_app/immutable/chunks/DtK8qK5Q2.js.br +0 -0
  74. package/build/client/_app/immutable/chunks/DtK8qK5Q2.js.gz +0 -0
  75. package/build/client/_app/immutable/chunks/DtblIi6X2.js +1 -0
  76. package/build/client/_app/immutable/chunks/DtblIi6X2.js.br +1 -0
  77. package/build/client/_app/immutable/chunks/DtblIi6X2.js.gz +0 -0
  78. package/build/client/_app/immutable/chunks/UkzDDeO42.js +1 -0
  79. package/build/client/_app/immutable/chunks/UkzDDeO42.js.br +0 -0
  80. package/build/client/_app/immutable/chunks/UkzDDeO42.js.gz +0 -0
  81. package/build/client/_app/immutable/chunks/Vu8LzrwP2.js +1 -0
  82. package/build/client/_app/immutable/chunks/Vu8LzrwP2.js.br +0 -0
  83. package/build/client/_app/immutable/chunks/Vu8LzrwP2.js.gz +0 -0
  84. package/build/client/_app/immutable/chunks/_b612aVb.js +1 -0
  85. package/build/client/_app/immutable/chunks/_b612aVb.js.br +0 -0
  86. package/build/client/_app/immutable/chunks/_b612aVb.js.gz +0 -0
  87. package/build/client/_app/immutable/chunks/aNMRV4sP2.js.gz +0 -0
  88. package/build/client/_app/immutable/chunks/cMamJTsF.js.gz +0 -0
  89. package/build/client/_app/immutable/chunks/ib21i2T_.js.gz +0 -0
  90. package/build/client/_app/immutable/chunks/kNaey6uv.js.gz +0 -0
  91. package/build/client/_app/immutable/chunks/oVMDLirx.js +1 -0
  92. package/build/client/_app/immutable/chunks/oVMDLirx.js.br +0 -0
  93. package/build/client/_app/immutable/chunks/oVMDLirx.js.gz +0 -0
  94. package/build/client/_app/immutable/chunks/olAc024e.js +1 -0
  95. package/build/client/_app/immutable/chunks/olAc024e.js.br +0 -0
  96. package/build/client/_app/immutable/chunks/olAc024e.js.gz +0 -0
  97. package/build/client/_app/immutable/chunks/suTxxv1t.js.gz +0 -0
  98. package/build/client/_app/immutable/chunks/wXIHzLMQ2.js +1 -0
  99. package/build/client/_app/immutable/chunks/wXIHzLMQ2.js.br +0 -0
  100. package/build/client/_app/immutable/chunks/wXIHzLMQ2.js.gz +0 -0
  101. package/build/client/_app/immutable/chunks/wrqalH0a.js +1 -0
  102. package/build/client/_app/immutable/chunks/wrqalH0a.js.br +0 -0
  103. package/build/client/_app/immutable/chunks/wrqalH0a.js.gz +0 -0
  104. package/build/client/_app/immutable/chunks/x60Tn5kT.js +1 -0
  105. package/build/client/_app/immutable/chunks/x60Tn5kT.js.br +0 -0
  106. package/build/client/_app/immutable/chunks/x60Tn5kT.js.gz +0 -0
  107. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  108. package/build/client/_app/immutable/chunks/{BOrLmFwJ.js → yShDxCNj.js} +1 -1
  109. package/build/client/_app/immutable/chunks/yShDxCNj.js.br +2 -0
  110. package/build/client/_app/immutable/chunks/yShDxCNj.js.gz +0 -0
  111. package/build/client/_app/immutable/entry/app.Etd-exTb.js +2 -0
  112. package/build/client/_app/immutable/entry/app.Etd-exTb.js.br +0 -0
  113. package/build/client/_app/immutable/entry/app.Etd-exTb.js.gz +0 -0
  114. package/build/client/_app/immutable/entry/start.DY2B3u4g.js +1 -0
  115. package/build/client/_app/immutable/entry/start.DY2B3u4g.js.br +0 -0
  116. package/build/client/_app/immutable/entry/start.DY2B3u4g.js.gz +0 -0
  117. package/build/client/_app/immutable/nodes/0.tKfYV3__.js +8 -0
  118. package/build/client/_app/immutable/nodes/0.tKfYV3__.js.br +0 -0
  119. package/build/client/_app/immutable/nodes/0.tKfYV3__.js.gz +0 -0
  120. package/build/client/_app/immutable/nodes/{1.KYdA6ppX.js → 1.CER5ICKt.js} +1 -1
  121. package/build/client/_app/immutable/nodes/1.CER5ICKt.js.br +1 -0
  122. package/build/client/_app/immutable/nodes/1.CER5ICKt.js.gz +0 -0
  123. package/build/client/_app/immutable/nodes/10.rT7cD8kX.js +1 -0
  124. package/build/client/_app/immutable/nodes/10.rT7cD8kX.js.br +0 -0
  125. package/build/client/_app/immutable/nodes/10.rT7cD8kX.js.gz +0 -0
  126. package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js +2 -0
  127. package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js.br +0 -0
  128. package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js.gz +0 -0
  129. package/build/client/_app/immutable/nodes/{9.CMW6a2Lg.js → 12.DCTRFMqo.js} +4 -3
  130. package/build/client/_app/immutable/nodes/12.DCTRFMqo.js.br +0 -0
  131. package/build/client/_app/immutable/nodes/12.DCTRFMqo.js.gz +0 -0
  132. package/build/client/_app/immutable/nodes/{2.DBz20KgG.js → 2.CF488WWF.js} +1 -1
  133. package/build/client/_app/immutable/nodes/2.CF488WWF.js.br +0 -0
  134. package/build/client/_app/immutable/nodes/2.CF488WWF.js.gz +0 -0
  135. package/build/client/_app/immutable/nodes/3.CP7CPPVH.js +1 -0
  136. package/build/client/_app/immutable/nodes/3.CP7CPPVH.js.br +0 -0
  137. package/build/client/_app/immutable/nodes/3.CP7CPPVH.js.gz +0 -0
  138. package/build/client/_app/immutable/nodes/4.D1bxCSiM.js +3 -0
  139. package/build/client/_app/immutable/nodes/4.D1bxCSiM.js.br +0 -0
  140. package/build/client/_app/immutable/nodes/4.D1bxCSiM.js.gz +0 -0
  141. package/build/client/_app/immutable/nodes/5.D6jZgh9y.js +48 -0
  142. package/build/client/_app/immutable/nodes/5.D6jZgh9y.js.br +0 -0
  143. package/build/client/_app/immutable/nodes/5.D6jZgh9y.js.gz +0 -0
  144. package/build/client/_app/immutable/nodes/6.BrBFUA0s.js +1 -0
  145. package/build/client/_app/immutable/nodes/6.BrBFUA0s.js.br +0 -0
  146. package/build/client/_app/immutable/nodes/6.BrBFUA0s.js.gz +0 -0
  147. package/build/client/_app/immutable/nodes/7.pajo8MfM.js +3 -0
  148. package/build/client/_app/immutable/nodes/7.pajo8MfM.js.br +0 -0
  149. package/build/client/_app/immutable/nodes/7.pajo8MfM.js.gz +0 -0
  150. package/build/client/_app/immutable/nodes/8.Cc80_Igi.js +5 -0
  151. package/build/client/_app/immutable/nodes/8.Cc80_Igi.js.br +0 -0
  152. package/build/client/_app/immutable/nodes/8.Cc80_Igi.js.gz +0 -0
  153. package/build/client/_app/immutable/nodes/{7.CemgNJfw.js → 9.D72NaL3l.js} +1 -1
  154. package/build/client/_app/immutable/nodes/9.D72NaL3l.js.br +1 -0
  155. package/build/client/_app/immutable/nodes/9.D72NaL3l.js.gz +0 -0
  156. package/build/client/_app/version.json +1 -1
  157. package/build/client/_app/version.json.br +0 -0
  158. package/build/client/_app/version.json.gz +0 -0
  159. package/build/client/lyriks_logo.svg +148 -0
  160. package/build/client/lyriks_logo.svg.br +0 -0
  161. package/build/client/lyriks_logo.svg.gz +0 -0
  162. package/build/server/chunks/0-8YZc572z.js +15 -0
  163. package/build/server/chunks/0-8YZc572z.js.map +1 -0
  164. package/build/server/chunks/1-DxkfSJLu.js +9 -0
  165. package/build/server/chunks/{1-DPpKAKXV.js.map → 1-DxkfSJLu.js.map} +1 -1
  166. package/build/server/chunks/10-DkObdGtU.js +9 -0
  167. package/build/server/chunks/10-DkObdGtU.js.map +1 -0
  168. package/build/server/chunks/11-DL94HxpZ.js +9 -0
  169. package/build/server/chunks/11-DL94HxpZ.js.map +1 -0
  170. package/build/server/chunks/12-CI74sCkt.js +9 -0
  171. package/build/server/chunks/12-CI74sCkt.js.map +1 -0
  172. package/build/server/chunks/2-qhWwQ4eL.js +9 -0
  173. package/build/server/chunks/2-qhWwQ4eL.js.map +1 -0
  174. package/build/server/chunks/3-CzoZtSTp.js +16 -0
  175. package/build/server/chunks/3-CzoZtSTp.js.map +1 -0
  176. package/build/server/chunks/4-CDa9DBsh.js +16 -0
  177. package/build/server/chunks/4-CDa9DBsh.js.map +1 -0
  178. package/build/server/chunks/5-qD2xxOrq.js +9 -0
  179. package/build/server/chunks/5-qD2xxOrq.js.map +1 -0
  180. package/build/server/chunks/6-B4mWzvDn.js +9 -0
  181. package/build/server/chunks/6-B4mWzvDn.js.map +1 -0
  182. package/build/server/chunks/7-zExv-fTN.js +9 -0
  183. package/build/server/chunks/7-zExv-fTN.js.map +1 -0
  184. package/build/server/chunks/8-BVrGdQg4.js +9 -0
  185. package/build/server/chunks/{6-QQ7r8Rd5.js.map → 8-BVrGdQg4.js.map} +1 -1
  186. package/build/server/chunks/9-BnZLRMYA.js +9 -0
  187. package/build/server/chunks/9-BnZLRMYA.js.map +1 -0
  188. package/build/server/chunks/BehaviorGraph-C-9z37Sm.js +788 -0
  189. package/build/server/chunks/BehaviorGraph-C-9z37Sm.js.map +1 -0
  190. package/build/server/chunks/Clock-BfMWQpmJ.js +5 -0
  191. package/build/server/chunks/Clock-BfMWQpmJ.js.map +1 -0
  192. package/build/server/chunks/DeleteDomain-BvHEgAyp.js +24 -0
  193. package/build/server/chunks/DeleteDomain-BvHEgAyp.js.map +1 -0
  194. package/build/server/chunks/{FeatureValidator-B8qEjAUW.js → DeleteFeature-DnK8sBJI.js} +142 -77
  195. package/build/server/chunks/DeleteFeature-DnK8sBJI.js.map +1 -0
  196. package/build/server/chunks/DeleteProject-BXZcehHZ.js +41 -0
  197. package/build/server/chunks/DeleteProject-BXZcehHZ.js.map +1 -0
  198. package/build/server/chunks/Effect-BJtLR-6l.js +46 -0
  199. package/build/server/chunks/Effect-BJtLR-6l.js.map +1 -0
  200. package/build/server/chunks/{FeatureCard-BQOY6gJQ.js → FeatureCard-Bb50FEfp.js} +4 -4
  201. package/build/server/chunks/{FeatureCard-BQOY6gJQ.js.map → FeatureCard-Bb50FEfp.js.map} +1 -1
  202. package/build/server/chunks/{FeatureJson-Bv-qiOSf.js → FeatureJson-DYvMEAub.js} +2 -2
  203. package/build/server/chunks/{FeatureJson-Bv-qiOSf.js.map → FeatureJson-DYvMEAub.js.map} +1 -1
  204. package/build/server/chunks/{FeatureTransforms-UWDHmWEg.js → FeatureTransforms-B0aI_CJD.js} +10 -3
  205. package/build/server/chunks/FeatureTransforms-B0aI_CJD.js.map +1 -0
  206. package/build/server/chunks/{ManageTagsDialog-DBxA3tM2.js → ManageTagsDialog-D5xbAVNB.js} +5 -5
  207. package/build/server/chunks/ManageTagsDialog-D5xbAVNB.js.map +1 -0
  208. package/build/server/chunks/{ProgressBar-CfhccQ83.js → ProgressBar-CUC2EZqG.js} +3 -3
  209. package/build/server/chunks/ProgressBar-CUC2EZqG.js.map +1 -0
  210. package/build/server/chunks/{ProjectsIndex-CoDrvRya.js → ProjectsIndex-FgIu9dBp.js} +135 -14
  211. package/build/server/chunks/ProjectsIndex-FgIu9dBp.js.map +1 -0
  212. package/build/server/chunks/{RenameTag-BuWLMl1m.js → RenameTag-DWIIR4Bx.js} +3 -6
  213. package/build/server/chunks/RenameTag-DWIIR4Bx.js.map +1 -0
  214. package/build/server/chunks/ScenarioApplier-YPKECfZe.js +55 -0
  215. package/build/server/chunks/ScenarioApplier-YPKECfZe.js.map +1 -0
  216. package/build/server/chunks/SimulatorEngine-DM1F9nCO.js +1391 -0
  217. package/build/server/chunks/SimulatorEngine-DM1F9nCO.js.map +1 -0
  218. package/build/server/chunks/StateValue-BBjWox8f.js +105 -0
  219. package/build/server/chunks/StateValue-BBjWox8f.js.map +1 -0
  220. package/build/server/chunks/{TagDotStrip-B1XQ0m0Y.js → TagDotStrip-0rn-IJVE.js} +4 -4
  221. package/build/server/chunks/TagDotStrip-0rn-IJVE.js.map +1 -0
  222. package/build/server/chunks/{TagFilterSelect-DbO0Qduh.js → TagFilterSelect-Dbu-7Dg4.js} +5 -5
  223. package/build/server/chunks/{TagFilterSelect-DbO0Qduh.js.map → TagFilterSelect-Dbu-7Dg4.js.map} +1 -1
  224. package/build/server/chunks/{TagPalette-CtMNYCmu.js → TagPalette-CpdTiC_7.js} +101 -9
  225. package/build/server/chunks/TagPalette-CpdTiC_7.js.map +1 -0
  226. package/build/server/chunks/TransitionCatalog-CYXUANy6.js +271 -0
  227. package/build/server/chunks/TransitionCatalog-CYXUANy6.js.map +1 -0
  228. package/build/server/chunks/_layout.svelte-pSSG85WT.js +1342 -0
  229. package/build/server/chunks/_layout.svelte-pSSG85WT.js.map +1 -0
  230. package/build/server/chunks/{_page.svelte-BKTveFAj.js → _page.svelte-BNH3szkk.js} +22 -17
  231. package/build/server/chunks/{_page.svelte-BKTveFAj.js.map → _page.svelte-BNH3szkk.js.map} +1 -1
  232. package/build/server/chunks/_page.svelte-BcuGvUt1.js +37 -0
  233. package/build/server/chunks/{_page.svelte-B7hT3P8E.js.map → _page.svelte-BcuGvUt1.js.map} +1 -1
  234. package/build/server/chunks/_page.svelte-BoOMG5Y0.js +37 -0
  235. package/build/server/chunks/{_page.svelte-De508ek8.js.map → _page.svelte-BoOMG5Y0.js.map} +1 -1
  236. package/build/server/chunks/{_page.svelte-BqSC-1vK.js → _page.svelte-C4PRh_wP.js} +104 -54
  237. package/build/server/chunks/_page.svelte-C4PRh_wP.js.map +1 -0
  238. package/build/server/chunks/_page.svelte-Cqn34NXy.js +74 -0
  239. package/build/server/chunks/_page.svelte-Cqn34NXy.js.map +1 -0
  240. package/build/server/chunks/{_page.svelte-B1s7jxaQ.js → _page.svelte-DSCeOGv7.js} +15 -10
  241. package/build/server/chunks/_page.svelte-DSCeOGv7.js.map +1 -0
  242. package/build/server/chunks/_page.svelte-DqWdGt48.js +182 -0
  243. package/build/server/chunks/_page.svelte-DqWdGt48.js.map +1 -0
  244. package/build/server/chunks/_page.svelte-DsQHSEl4.js +49 -0
  245. package/build/server/chunks/_page.svelte-DsQHSEl4.js.map +1 -0
  246. package/build/server/chunks/{_page.svelte-BKKCa9H5.js → _page.svelte-Uioz8hsG.js} +18 -11
  247. package/build/server/chunks/{_page.svelte-BKKCa9H5.js.map → _page.svelte-Uioz8hsG.js.map} +1 -1
  248. package/build/server/chunks/{_page.svelte-Zf9H4KOP.js → _page.svelte-p38jot9e.js} +81 -478
  249. package/build/server/chunks/_page.svelte-p38jot9e.js.map +1 -0
  250. package/build/server/chunks/{_page.svelte-BtI2zZ_Z.js → _page.svelte-yN5kzgJ9.js} +251 -447
  251. package/build/server/chunks/_page.svelte-yN5kzgJ9.js.map +1 -0
  252. package/build/server/chunks/{_server.ts-DsbbVoOn.js → _server.ts-1CtrHhte.js} +4 -4
  253. package/build/server/chunks/{_server.ts-DsbbVoOn.js.map → _server.ts-1CtrHhte.js.map} +1 -1
  254. package/build/server/chunks/{_server.ts-CWvU15tL.js → _server.ts-71Qx1lQb.js} +4 -4
  255. package/build/server/chunks/{_server.ts-CWvU15tL.js.map → _server.ts-71Qx1lQb.js.map} +1 -1
  256. package/build/server/chunks/_server.ts-BAyekGHB.js +961 -0
  257. package/build/server/chunks/_server.ts-BAyekGHB.js.map +1 -0
  258. package/build/server/chunks/{_server.ts-BihpbxOW.js → _server.ts-BLWhU22T.js} +4 -4
  259. package/build/server/chunks/{_server.ts-BihpbxOW.js.map → _server.ts-BLWhU22T.js.map} +1 -1
  260. package/build/server/chunks/{_server.ts-YnfXkeMJ.js → _server.ts-C7EVZVxv.js} +22 -13
  261. package/build/server/chunks/_server.ts-C7EVZVxv.js.map +1 -0
  262. package/build/server/chunks/{_server.ts-vcaqdwxS.js → _server.ts-CGjYuLmo.js} +12 -7
  263. package/build/server/chunks/_server.ts-CGjYuLmo.js.map +1 -0
  264. package/build/server/chunks/{_server.ts-Dy5zQHe2.js → _server.ts-CX6H8fSE.js} +8 -31
  265. package/build/server/chunks/_server.ts-CX6H8fSE.js.map +1 -0
  266. package/build/server/chunks/{_server.ts-BuoQ02BW.js → _server.ts-CyEdTCLr.js} +4 -4
  267. package/build/server/chunks/{_server.ts-BuoQ02BW.js.map → _server.ts-CyEdTCLr.js.map} +1 -1
  268. package/build/server/chunks/_server.ts-DKVTM9Pj.js +77 -0
  269. package/build/server/chunks/_server.ts-DKVTM9Pj.js.map +1 -0
  270. package/build/server/chunks/{_server.ts-0uNTZKwF.js → _server.ts-Dip65hLJ.js} +15 -9
  271. package/build/server/chunks/_server.ts-Dip65hLJ.js.map +1 -0
  272. package/build/server/chunks/{_server.ts-D4EO0VHu.js → _server.ts-Dm0tCs2i.js} +5 -5
  273. package/build/server/chunks/{_server.ts-D4EO0VHu.js.map → _server.ts-Dm0tCs2i.js.map} +1 -1
  274. package/build/server/chunks/{_server.ts-BIBWjQI-.js → _server.ts-DsYwK_uW.js} +4 -4
  275. package/build/server/chunks/{_server.ts-BIBWjQI-.js.map → _server.ts-DsYwK_uW.js.map} +1 -1
  276. package/build/server/chunks/{_server.ts-DDa0Nk_S.js → _server.ts-RCEgegYU.js} +4 -4
  277. package/build/server/chunks/{_server.ts-DDa0Nk_S.js.map → _server.ts-RCEgegYU.js.map} +1 -1
  278. package/build/server/chunks/_server.ts-XOLAT4dd.js +146 -0
  279. package/build/server/chunks/_server.ts-XOLAT4dd.js.map +1 -0
  280. package/build/server/chunks/_server.ts-afh_zLVi.js +69 -0
  281. package/build/server/chunks/_server.ts-afh_zLVi.js.map +1 -0
  282. package/build/server/chunks/{browserContainer-CNX7ANld.js → browserContainer-BdldtueJ.js} +71 -1378
  283. package/build/server/chunks/browserContainer-BdldtueJ.js.map +1 -0
  284. package/build/server/chunks/buildSearchDocs-Cyfrnw9G.js +337 -0
  285. package/build/server/chunks/buildSearchDocs-Cyfrnw9G.js.map +1 -0
  286. package/build/server/chunks/{builderModeStore.svelte-ihupr-3p.js → builderModeStore.svelte-BEZMQEqn.js} +223 -11
  287. package/build/server/chunks/builderModeStore.svelte-BEZMQEqn.js.map +1 -0
  288. package/build/server/chunks/client-C9Cat4DK.js +51 -0
  289. package/build/server/chunks/{client-DfpLcAZ9.js.map → client-C9Cat4DK.js.map} +1 -1
  290. package/build/server/chunks/{error.svelte-C35KOpru.js → error.svelte-CzVR_A6P.js} +5 -5
  291. package/build/server/chunks/{error.svelte-C35KOpru.js.map → error.svelte-CzVR_A6P.js.map} +1 -1
  292. package/build/server/chunks/featureQueueContext-DuXpyTdC.js +32 -0
  293. package/build/server/chunks/featureQueueContext-DuXpyTdC.js.map +1 -0
  294. package/build/server/chunks/featureStore.svelte-DHZf88gu.js +162 -0
  295. package/build/server/chunks/featureStore.svelte-DHZf88gu.js.map +1 -0
  296. package/build/server/chunks/{projectsStore.svelte-QDz5PchX.js → featuresStore.svelte-bUyQBg1-.js} +95 -3
  297. package/build/server/chunks/featuresStore.svelte-bUyQBg1-.js.map +1 -0
  298. package/build/server/chunks/{hooks.server-Rv301GTB.js → hooks.server-y3jdg_sB.js} +6 -2
  299. package/build/server/chunks/hooks.server-y3jdg_sB.js.map +1 -0
  300. package/build/server/chunks/humanize-CkCPfeWi.js +53 -0
  301. package/build/server/chunks/humanize-CkCPfeWi.js.map +1 -0
  302. package/build/server/chunks/{index-server-7H0jzj0M.js → index-server-DvBux_Gf.js} +47 -2
  303. package/build/server/chunks/{index-server-7H0jzj0M.js.map → index-server-DvBux_Gf.js.map} +1 -1
  304. package/build/server/chunks/{internal-BPKrFkK1.js → internal-BFt8yDlf.js} +5 -5
  305. package/build/server/chunks/{internal-BPKrFkK1.js.map → internal-BFt8yDlf.js.map} +1 -1
  306. package/build/server/chunks/projectBundleClient-BtvWPh87.js +168 -0
  307. package/build/server/chunks/projectBundleClient-BtvWPh87.js.map +1 -0
  308. package/build/server/chunks/projectContextStore.svelte-jRJGJZ42.js +141 -0
  309. package/build/server/chunks/projectContextStore.svelte-jRJGJZ42.js.map +1 -0
  310. package/build/server/chunks/projectFeaturesStore.svelte-BwNEtDIL.js +87 -0
  311. package/build/server/chunks/projectFeaturesStore.svelte-BwNEtDIL.js.map +1 -0
  312. package/build/server/chunks/projectStore.svelte-BNuLNxk_.js +230 -0
  313. package/build/server/chunks/projectStore.svelte-BNuLNxk_.js.map +1 -0
  314. package/build/server/chunks/{reconcile-Dv7jS3C8.js → reconcile-CVG2LSlW.js} +54 -267
  315. package/build/server/chunks/reconcile-CVG2LSlW.js.map +1 -0
  316. package/build/server/chunks/registry-DqAn_hVE.js +21 -0
  317. package/build/server/chunks/registry-DqAn_hVE.js.map +1 -0
  318. package/build/server/chunks/{snapshotRepository-BPXCjX92.js → snapshotRepository-8f-2wTrb.js} +30 -5
  319. package/build/server/chunks/snapshotRepository-8f-2wTrb.js.map +1 -0
  320. package/build/server/chunks/{state-CpLVNZq7.js → state-CZZtjXLE.js} +3 -3
  321. package/build/server/chunks/{state-CpLVNZq7.js.map → state-CZZtjXLE.js.map} +1 -1
  322. package/build/server/chunks/{sync-DZ3dn761.js → sync-Bn6eSUhC.js} +3 -3
  323. package/build/server/chunks/{sync-DZ3dn761.js.map → sync-Bn6eSUhC.js.map} +1 -1
  324. package/build/server/chunks/{syncBridge-BwXzPdjJ.js → syncAwareRepositories-DvUjq5Q6.js} +27 -3
  325. package/build/server/chunks/syncAwareRepositories-DvUjq5Q6.js.map +1 -0
  326. package/build/server/chunks/{tagPaletteStore.svelte-DfZOBvgY.js → tagPaletteStore.svelte-C71bdzDl.js} +4 -4
  327. package/build/server/chunks/{tagPaletteStore.svelte-DfZOBvgY.js.map → tagPaletteStore.svelte-C71bdzDl.js.map} +1 -1
  328. package/build/server/index.js +2 -2
  329. package/build/server/index.js.map +1 -1
  330. package/build/server/manifest.js +74 -29
  331. package/build/server/manifest.js.map +1 -1
  332. package/cli/README.md +70 -2
  333. package/cli/commands/check.ts +190 -0
  334. package/cli/commands/ci.ts +71 -0
  335. package/cli/commands/coverage-ingest.ts +112 -0
  336. package/cli/commands/dashboard.ts +14 -0
  337. package/cli/commands/init.ts +26 -0
  338. package/cli/commands/scenarios-adapter.ts +96 -0
  339. package/cli/commands/theme.ts +62 -0
  340. package/cli/scenarios/adapter-scaffold.ts +99 -0
  341. package/cli/scenarios/codegen.ts +7 -1
  342. package/cli/scenarios/results.ts +85 -0
  343. package/cli/skills/unspa-audit/SKILL.md +19 -0
  344. package/cli/skills/unspa-edit/SKILL.md +20 -3
  345. package/cli/skills/unspa-implement/SKILL.md +28 -0
  346. package/cli/unspa.ts +136 -2
  347. package/cli/util/context-files.ts +18 -2
  348. package/cli/util/theme.ts +34 -0
  349. package/mcp-server/bin.ts +104 -104
  350. package/mcp-server/migrate-defaults.ts +164 -164
  351. package/mcp-server/repo-link.ts +142 -134
  352. package/mcp-server/resources/guide.ts +24 -4
  353. package/mcp-server/resources/operations.ts +3 -0
  354. package/mcp-server/seed-snapshots.ts +22 -22
  355. package/mcp-server/server.ts +8 -4
  356. package/mcp-server/sync-aware-repos.ts +79 -79
  357. package/mcp-server/sync-notifier.ts +180 -127
  358. package/mcp-server/tools/_codegen.ts +115 -115
  359. package/mcp-server/tools/_entity_builders.ts +30 -0
  360. package/mcp-server/tools/_shared.ts +210 -210
  361. package/mcp-server/tools/action.ts +210 -210
  362. package/mcp-server/tools/batch.ts +29 -5
  363. package/mcp-server/tools/effect.ts +139 -135
  364. package/mcp-server/tools/entity.ts +132 -132
  365. package/mcp-server/tools/entityField.ts +132 -132
  366. package/mcp-server/tools/event.ts +116 -116
  367. package/mcp-server/tools/feature.ts +264 -264
  368. package/mcp-server/tools/invariant.ts +275 -275
  369. package/mcp-server/tools/persona.ts +141 -141
  370. package/mcp-server/tools/project.ts +500 -391
  371. package/mcp-server/tools/reachabilityGoal.ts +97 -0
  372. package/mcp-server/tools/read.ts +526 -483
  373. package/mcp-server/tools/reorder.ts +114 -114
  374. package/mcp-server/tools/resource.ts +194 -194
  375. package/mcp-server/tools/rule.ts +302 -302
  376. package/mcp-server/tools/scenario.ts +4 -1
  377. package/mcp-server/tools/specGaps.ts +221 -221
  378. package/mcp-server/tools/state.ts +10 -2
  379. package/mcp-server/tools/surface.ts +102 -102
  380. package/mcp-server/tools/transition.ts +96 -96
  381. package/mcp-server/tools/verification.ts +131 -0
  382. package/package.json +15 -2
  383. package/src/app.css +208 -9
  384. package/src/app.html +15 -1
  385. package/src/features/behavior-model/application/ports/FeatureRepository.ts +16 -16
  386. package/src/features/behavior-model/application/use-cases/CreateFeature.ts +24 -24
  387. package/src/features/behavior-model/application/use-cases/DeleteFeature.ts +8 -8
  388. package/src/features/behavior-model/application/use-cases/GetFeature.ts +9 -9
  389. package/src/features/behavior-model/application/use-cases/ListFeatures.ts +10 -10
  390. package/src/features/behavior-model/application/use-cases/MutateFeature.ts +90 -90
  391. package/src/features/behavior-model/application/use-cases/SaveFeature.ts +31 -31
  392. package/src/features/behavior-model/domain/entities/Entity.ts +45 -45
  393. package/src/features/behavior-model/domain/entities/EventDefinition.ts +35 -35
  394. package/src/features/behavior-model/domain/entities/Feature.ts +10 -0
  395. package/src/features/behavior-model/domain/entities/Persona.ts +33 -33
  396. package/src/features/behavior-model/domain/entities/ReachabilityGoal.ts +39 -0
  397. package/src/features/behavior-model/domain/entities/Resource.ts +54 -54
  398. package/src/features/behavior-model/domain/entities/Scenario.ts +15 -0
  399. package/src/features/behavior-model/domain/entities/StateDefinition.ts +13 -0
  400. package/src/features/behavior-model/domain/entities/Surface.ts +75 -75
  401. package/src/features/behavior-model/domain/entities/index.ts +9 -9
  402. package/src/features/behavior-model/domain/services/BehaviorGraphModel.ts +556 -0
  403. package/src/features/behavior-model/domain/services/DerivedState.ts +67 -0
  404. package/src/features/behavior-model/domain/services/EffectApplier.ts +112 -3
  405. package/src/features/behavior-model/domain/services/EffectiveEntities.ts +166 -166
  406. package/src/features/behavior-model/domain/services/EntityDeducer.ts +83 -83
  407. package/src/features/behavior-model/domain/services/EventCatalog.ts +141 -141
  408. package/src/features/behavior-model/domain/services/FeatureExpressionNormalizer.ts +43 -5
  409. package/src/features/behavior-model/domain/services/FeatureSharedStateNormalizer.ts +24 -3
  410. package/src/features/behavior-model/domain/services/FeatureTransforms.ts +33 -0
  411. package/src/features/behavior-model/domain/services/FeatureValidator.ts +124 -16
  412. package/src/features/behavior-model/domain/services/PersonaApplier.ts +39 -39
  413. package/src/features/behavior-model/domain/services/ResourceDeducer.ts +64 -64
  414. package/src/features/behavior-model/domain/services/ResourceUsage.ts +79 -79
  415. package/src/features/behavior-model/domain/services/ScenarioApplier.ts +40 -40
  416. package/src/features/behavior-model/domain/services/SharedStateDefinitions.ts +32 -32
  417. package/src/features/behavior-model/domain/services/StatePathReferences.ts +249 -217
  418. package/src/features/behavior-model/domain/services/TransitionCatalog.ts +173 -173
  419. package/src/features/behavior-model/domain/value-objects/Effect.ts +100 -3
  420. package/src/features/behavior-model/domain/value-objects/EntityFieldType.ts +57 -57
  421. package/src/features/behavior-model/domain/value-objects/Expression.ts +22 -2
  422. package/src/features/behavior-model/domain/value-objects/ParameterType.ts +57 -57
  423. package/src/features/behavior-model/domain/value-objects/Resource.ts +210 -210
  424. package/src/features/behavior-model/domain/value-objects/RuleCategory.ts +57 -57
  425. package/src/features/behavior-model/domain/value-objects/RuleCondition.ts +52 -1
  426. package/src/features/behavior-model/domain/value-objects/SimulationClock.ts +35 -0
  427. package/src/features/behavior-model/domain/value-objects/ids.ts +2 -0
  428. package/src/features/behavior-model/infrastructure/io/FeatureJson.ts +89 -89
  429. package/src/features/behavior-model/infrastructure/persistence/HttpFeatureRepository.ts +43 -43
  430. package/src/features/behavior-model/infrastructure/persistence/JsonFolderFeatureRepository.ts +10 -0
  431. package/src/features/behavior-model/infrastructure/persistence/snapshot-discovery.ts +76 -76
  432. package/src/features/behavior-model/infrastructure/seed/seedStorefront.ts +967 -967
  433. package/src/features/behavior-model/presentation/adapters/VisBehaviorGraphRenderer.ts +501 -0
  434. package/src/features/behavior-model/presentation/components/ActionEditor.svelte +683 -682
  435. package/src/features/behavior-model/presentation/components/ActionsEditor.svelte +232 -232
  436. package/src/features/behavior-model/presentation/components/BehaviorGraph.svelte +568 -0
  437. package/src/features/behavior-model/presentation/components/EffectEditor.svelte +168 -168
  438. package/src/features/behavior-model/presentation/components/EntityEditor.svelte +241 -248
  439. package/src/features/behavior-model/presentation/components/EntityFieldRow.svelte +180 -181
  440. package/src/features/behavior-model/presentation/components/EntityManager.svelte +252 -251
  441. package/src/features/behavior-model/presentation/components/EventsManager.svelte +373 -372
  442. package/src/features/behavior-model/presentation/components/FeatureEditor.svelte +396 -348
  443. package/src/features/behavior-model/presentation/components/FeatureHeader.svelte +165 -148
  444. package/src/features/behavior-model/presentation/components/FeatureHealthStrip.svelte +110 -110
  445. package/src/features/behavior-model/presentation/components/HistoryPanel.svelte +154 -154
  446. package/src/features/behavior-model/presentation/components/NewFeatureForm.svelte +66 -66
  447. package/src/features/behavior-model/presentation/components/ParameterNameSelect.svelte +84 -84
  448. package/src/features/behavior-model/presentation/components/ParametersEditor.svelte +411 -411
  449. package/src/features/behavior-model/presentation/components/PersonaEditor.svelte +244 -244
  450. package/src/features/behavior-model/presentation/components/PersonasManager.svelte +130 -130
  451. package/src/features/behavior-model/presentation/components/ReachabilityGoalEditor.svelte +230 -0
  452. package/src/features/behavior-model/presentation/components/ReachabilityGoalsEditor.svelte +86 -0
  453. package/src/features/behavior-model/presentation/components/ResourcesManager.svelte +291 -290
  454. package/src/features/behavior-model/presentation/components/ScenariosEditor.svelte +496 -496
  455. package/src/features/behavior-model/presentation/components/StateDefinitionsEditor.svelte +356 -356
  456. package/src/features/behavior-model/presentation/components/SurfaceEntitiesView.svelte +88 -88
  457. package/src/features/behavior-model/presentation/components/SurfaceInvariantsEditor.svelte +76 -76
  458. package/src/features/behavior-model/presentation/components/SurfaceList.svelte +300 -300
  459. package/src/features/behavior-model/presentation/components/SurfaceMetaEditor.svelte +158 -156
  460. package/src/features/behavior-model/presentation/components/SurfacePanel.svelte +198 -198
  461. package/src/features/behavior-model/presentation/components/SurfacePersonasView.svelte +122 -122
  462. package/src/features/behavior-model/presentation/components/SurfaceResourcesView.svelte +113 -113
  463. package/src/features/behavior-model/presentation/components/SurfaceRulesEditor.svelte +69 -69
  464. package/src/features/behavior-model/presentation/components/TransitionsManager.svelte +322 -321
  465. package/src/features/behavior-model/presentation/context/featureQueueContext.ts +78 -0
  466. package/src/features/behavior-model/presentation/stores/editorStore.svelte.ts +132 -131
  467. package/src/features/behavior-model/presentation/stores/featureStore.svelte.ts +177 -177
  468. package/src/features/behavior-model/presentation/stores/featuresStore.svelte.ts +98 -98
  469. package/src/features/behavior-model/presentation/view-models/BehaviorGraphTheme.ts +44 -0
  470. package/src/features/behavior-model/presentation/view-models/factories.ts +181 -132
  471. package/src/features/builder-mode/domain/BuilderModeDashboard.ts +7 -1
  472. package/src/features/builder-mode/presentation/components/BuilderModeDashboard.svelte +78 -16
  473. package/src/features/builder-mode/presentation/components/BuilderTagChips.svelte +25 -0
  474. package/src/features/builder-mode/presentation/stores/builderModeStore.svelte.ts +247 -3
  475. package/src/features/domains/infrastructure/persistence/JsonFolderDomainRepository.ts +9 -0
  476. package/src/features/global-search/application/use-cases/LoadSearchIndex.ts +70 -0
  477. package/src/features/global-search/domain/SearchDoc.ts +111 -0
  478. package/src/features/global-search/domain/buildSearchDocs.ts +483 -0
  479. package/src/features/global-search/domain/searchNav.ts +58 -0
  480. package/src/features/global-search/domain/searchScoring.ts +81 -0
  481. package/src/features/global-search/infrastructure/adapters/defaultSearchHost.ts +28 -0
  482. package/src/features/global-search/presentation/components/GlobalSearch.svelte +262 -0
  483. package/src/features/global-search/presentation/ports/SearchHostPorts.ts +41 -0
  484. package/src/features/global-search/presentation/searchKindMeta.ts +108 -0
  485. package/src/features/global-search/presentation/stores/globalSearchStore.svelte.ts +171 -0
  486. package/src/features/implementation-queue/presentation/components/FloatingQueueWidget.svelte +264 -0
  487. package/src/features/implementation-queue/presentation/stores/globalQueueStore.svelte.ts +172 -0
  488. package/src/features/implementation-status/application/ports/ImplementationStatusRepository.ts +8 -8
  489. package/src/features/implementation-status/application/use-cases/GetImplementationStatus.ts +8 -8
  490. package/src/features/implementation-status/domain/ApplyCapturedToSpec.ts +323 -322
  491. package/src/features/implementation-status/domain/FieldDiff.ts +238 -236
  492. package/src/features/implementation-status/infrastructure/persistence/InMemoryImplementationStatusRepository.ts +21 -21
  493. package/src/features/implementation-status/presentation/components/ImplementationStatusPanel.svelte +831 -831
  494. package/src/features/implementation-status/presentation/stores/implementationStatusStore.svelte.ts +97 -97
  495. package/src/features/library/application/use-cases/ApplyBlueprintsToFeature.ts +33 -33
  496. package/src/features/library/domain/services/BlueprintApplier.ts +94 -94
  497. package/src/features/library/infrastructure/blueprints/auth/ResetPasswordBlueprint.ts +332 -332
  498. package/src/features/library/infrastructure/blueprints/auth/SignInBlueprint.ts +281 -281
  499. package/src/features/library/infrastructure/blueprints/auth/SignUpBlueprint.ts +299 -299
  500. package/src/features/library/infrastructure/blueprints/auth/VerifyEmailBlueprint.ts +288 -288
  501. package/src/features/library/infrastructure/blueprints/auth/shared.ts +146 -146
  502. package/src/features/library/infrastructure/blueprints/commerce/CartBlueprint.ts +222 -222
  503. package/src/features/library/infrastructure/blueprints/commerce/CatalogBlueprint.ts +190 -190
  504. package/src/features/library/infrastructure/blueprints/commerce/CheckoutBlueprint.ts +322 -322
  505. package/src/features/library/infrastructure/blueprints/commerce/OrderConfirmationBlueprint.ts +172 -172
  506. package/src/features/library/infrastructure/blueprints/commerce/ProductDetailsBlueprint.ts +290 -290
  507. package/src/features/library/infrastructure/blueprints/content/ReviewsBlueprint.ts +392 -392
  508. package/src/features/library/infrastructure/blueprints/onboarding/OnboardingWizardBlueprint.ts +344 -344
  509. package/src/features/library/infrastructure/blueprints/utility/CanvasBlueprint.ts +419 -419
  510. package/src/features/library/infrastructure/blueprints/utility/CookieConsentBlueprint.ts +195 -195
  511. package/src/features/library/infrastructure/blueprints/utility/NotFoundBlueprint.ts +86 -86
  512. package/src/features/library/infrastructure/blueprints/utility/SearchPaletteBlueprint.ts +192 -192
  513. package/src/features/library/infrastructure/blueprints/utility/StoreLocatorBlueprint.ts +221 -221
  514. package/src/features/library/infrastructure/blueprints/utility/TaskBoardBlueprint.ts +196 -196
  515. package/src/features/maturity/application/use-cases/ScoreFeature.ts +7 -7
  516. package/src/features/maturity/domain/MaturityReport.ts +70 -70
  517. package/src/features/maturity/domain/MaturityScorer.ts +1001 -985
  518. package/src/features/maturity/presentation/components/MaturityPanel.svelte +376 -372
  519. package/src/features/mcp-tools/application/tools/dryRunSimulate.ts +24 -24
  520. package/src/features/mcp-tools/application/tools/findStateReferences.ts +19 -19
  521. package/src/features/mcp-tools/application/tools/generateTypes.ts +0 -1
  522. package/src/features/mcp-tools/application/tools/getAction.ts +165 -165
  523. package/src/features/mcp-tools/application/tools/getFeature.ts +5 -5
  524. package/src/features/mcp-tools/application/tools/getFeatureIndex.ts +79 -79
  525. package/src/features/mcp-tools/application/tools/getNeighborhood.ts +319 -319
  526. package/src/features/mcp-tools/application/tools/getSurface.ts +86 -86
  527. package/src/features/mcp-tools/application/tools/index.ts +56 -56
  528. package/src/features/mcp-tools/application/tools/listActions.ts +49 -49
  529. package/src/features/mcp-tools/application/tools/listFeatures.ts +7 -7
  530. package/src/features/mcp-tools/application/tools/scoreFeature.ts +153 -153
  531. package/src/features/projects/application/ports/ProjectRepository.ts +14 -14
  532. package/src/features/projects/application/use-cases/AddFeatureToProject.ts +23 -23
  533. package/src/features/projects/application/use-cases/CreateProject.ts +16 -16
  534. package/src/features/projects/application/use-cases/FindProjectContainingFeature.ts +23 -23
  535. package/src/features/projects/application/use-cases/GetProjectAggregate.ts +131 -131
  536. package/src/features/projects/application/use-cases/ImportProjectBundle.ts +45 -0
  537. package/src/features/projects/application/use-cases/MoveFeatureInProject.ts +36 -36
  538. package/src/features/projects/application/use-cases/RemoveFeatureFromProject.ts +23 -23
  539. package/src/features/projects/domain/entities/Project.ts +12 -0
  540. package/src/features/projects/domain/services/InheritedFromProject.ts +130 -130
  541. package/src/features/projects/infrastructure/persistence/JsonFolderProjectRepository.ts +9 -0
  542. package/src/features/projects/presentation/components/ProjectCard.svelte +27 -8
  543. package/src/features/projects/presentation/components/ProjectEditor.svelte +23 -19
  544. package/src/features/projects/presentation/components/ProjectFeaturesPanel.svelte +433 -433
  545. package/src/features/projects/presentation/components/ProjectsIndex.svelte +54 -10
  546. package/src/features/projects/presentation/stores/projectContextStore.svelte.ts +170 -170
  547. package/src/features/projects/presentation/stores/projectFeaturesStore.svelte.ts +114 -114
  548. package/src/features/projects/presentation/stores/projectStore.svelte.ts +265 -266
  549. package/src/features/projects/presentation/stores/projectsStore.svelte.ts +134 -134
  550. package/src/features/simulator/application/use-cases/RunScenarios.ts +27 -1
  551. package/src/features/simulator/application/use-cases/SimulateAction.ts +47 -47
  552. package/src/features/simulator/domain/SimulationResult.ts +79 -79
  553. package/src/features/simulator/domain/SimulatorEngine.ts +43 -9
  554. package/src/features/simulator/domain/StateExplorer.ts +369 -0
  555. package/src/features/simulator/domain/SurfaceReachability.ts +130 -0
  556. package/src/features/simulator/presentation/components/ParameterInputs.svelte +277 -277
  557. package/src/features/simulator/presentation/components/PersonaPicker.svelte +52 -52
  558. package/src/features/simulator/presentation/components/ScenarioPicker.svelte +42 -45
  559. package/src/features/simulator/presentation/components/SidePanel.svelte +170 -170
  560. package/src/features/simulator/presentation/components/SimulationResultView.svelte +394 -394
  561. package/src/features/simulator/presentation/components/SimulatorPanel.svelte +293 -293
  562. package/src/features/simulator/presentation/components/StateInspector.svelte +101 -101
  563. package/src/features/simulator/presentation/stores/simulatorStore.svelte.ts +268 -268
  564. package/src/features/tutorial/presentation/components/CodeBlock.svelte +5 -1
  565. package/src/features/verification/application/ports/BehavioralIndexReader.ts +12 -0
  566. package/src/features/verification/application/use-cases/VerifyFeatures.ts +151 -0
  567. package/src/features/verification/domain/DriftReport.ts +37 -0
  568. package/src/features/verification/domain/EventCoherenceReport.ts +27 -0
  569. package/src/features/verification/domain/IndexedImplementation.ts +27 -0
  570. package/src/features/verification/domain/VerificationReport.ts +59 -0
  571. package/src/features/verification/domain/VerificationThresholds.ts +52 -0
  572. package/src/features/verification/domain/VerificationVerdict.ts +43 -0
  573. package/src/features/verification/domain/aggregateVerdict.ts +244 -0
  574. package/src/features/verification/domain/analyzeEventCoherence.ts +43 -0
  575. package/src/features/verification/domain/detectDrift.ts +166 -0
  576. package/src/features/verification/domain/verifiedCoverage.ts +37 -0
  577. package/src/features/verification/infrastructure/persistence/FileBehavioralIndexReader.ts +81 -0
  578. package/src/features/verification/infrastructure/persistence/StaticBehavioralIndexReader.ts +15 -0
  579. package/src/features/verification/presentation/components/VerifyPanel.svelte +74 -0
  580. package/src/features/verification/presentation/stores/verificationStore.svelte.ts +64 -0
  581. package/src/hooks.server.ts +11 -1
  582. package/src/lib/server/openLocalDirectory.ts +40 -0
  583. package/src/lib/server/searchIndex.ts +161 -0
  584. package/src/lib/server/snapshotRepository.ts +37 -37
  585. package/src/lib/server/sync/YDocManager.ts +391 -391
  586. package/src/lib/server/sync/historyStore.ts +276 -276
  587. package/src/lib/server/sync/wsServer.ts +1 -1
  588. package/src/lib/sync/protocol.ts +147 -147
  589. package/src/lib/sync/roomId.ts +33 -33
  590. package/src/lib/theme/registry.ts +77 -0
  591. package/src/lib/theme/themeStore.svelte.ts +64 -0
  592. package/src/routes/+layout.svelte +288 -30
  593. package/src/routes/api/domains/[id]/+server.ts +7 -3
  594. package/src/routes/api/projects/[id]/+server.ts +14 -4
  595. package/src/routes/api/projects/import/+server.ts +16 -38
  596. package/src/routes/api/search-index/+server.ts +16 -0
  597. package/src/routes/api/snapshots/[id]/+server.ts +56 -44
  598. package/src/routes/api/snapshots/[id]/implementation-status/+server.ts +13 -13
  599. package/src/routes/api/snapshots/[id]/verify/+server.ts +37 -0
  600. package/src/routes/api/sync/reload/+server.ts +157 -157
  601. package/src/routes/api/system/hub-directory/+server.ts +24 -0
  602. package/src/routes/features/+page.svelte +484 -484
  603. package/src/routes/features/[id]/+page.svelte +55 -49
  604. package/src/routes/features/[id]/graph/+page.svelte +39 -0
  605. package/src/routes/features/[id]/verify/+page.svelte +89 -0
  606. package/src/routes/mcp/+page.svelte +16 -1
  607. package/src/routes/projects/[id]/+page.svelte +70 -70
  608. package/src/routes/projects/[id]/graph/+page.svelte +79 -0
  609. package/src/routes/tutorial/+page.svelte +3 -2
  610. package/src/shared/infrastructure/browserContainer.ts +61 -61
  611. package/src/shared/presentation/components/KebabMenu.svelte +95 -0
  612. package/src/shared/presentation/components/MenuItem.svelte +29 -0
  613. package/src/shared/presentation/components/ProgressBar.svelte +1 -1
  614. package/src/shared/presentation/toast/SyncToast.svelte +14 -3
  615. package/src/shared/presentation/toast/viewLinkResolver.ts +32 -0
  616. package/static/lyriks_logo.svg +148 -0
  617. package/vite.config.ts +47 -47
  618. package/build/client/_app/immutable/assets/0.DFMDYAU9.css +0 -1
  619. package/build/client/_app/immutable/assets/0.DFMDYAU9.css.br +0 -0
  620. package/build/client/_app/immutable/assets/0.DFMDYAU9.css.gz +0 -0
  621. package/build/client/_app/immutable/assets/9.nv0I59TU.css.gz +0 -0
  622. package/build/client/_app/immutable/chunks/BO66rBOa2.js +0 -1
  623. package/build/client/_app/immutable/chunks/BO66rBOa2.js.br +0 -0
  624. package/build/client/_app/immutable/chunks/BO66rBOa2.js.gz +0 -0
  625. package/build/client/_app/immutable/chunks/BOrLmFwJ.js.br +0 -0
  626. package/build/client/_app/immutable/chunks/BOrLmFwJ.js.gz +0 -0
  627. package/build/client/_app/immutable/chunks/BfMYiIUi.js.br +0 -0
  628. package/build/client/_app/immutable/chunks/BfMYiIUi.js.gz +0 -0
  629. package/build/client/_app/immutable/chunks/Bp2_Vghh.js +0 -1
  630. package/build/client/_app/immutable/chunks/Bp2_Vghh.js.br +0 -0
  631. package/build/client/_app/immutable/chunks/Bp2_Vghh.js.gz +0 -0
  632. package/build/client/_app/immutable/chunks/Bp8HpEPe2.js +0 -4
  633. package/build/client/_app/immutable/chunks/Bp8HpEPe2.js.br +0 -0
  634. package/build/client/_app/immutable/chunks/Bp8HpEPe2.js.gz +0 -0
  635. package/build/client/_app/immutable/chunks/C8rRKIXT.js +0 -1
  636. package/build/client/_app/immutable/chunks/C8rRKIXT.js.br +0 -0
  637. package/build/client/_app/immutable/chunks/C8rRKIXT.js.gz +0 -0
  638. package/build/client/_app/immutable/chunks/CJjJLwzv2.js +0 -1
  639. package/build/client/_app/immutable/chunks/CJjJLwzv2.js.br +0 -0
  640. package/build/client/_app/immutable/chunks/CJjJLwzv2.js.gz +0 -0
  641. package/build/client/_app/immutable/chunks/CxyLMlpt2.js.br +0 -0
  642. package/build/client/_app/immutable/chunks/CxyLMlpt2.js.gz +0 -0
  643. package/build/client/_app/immutable/chunks/D6jhrpTg.js +0 -1
  644. package/build/client/_app/immutable/chunks/D6jhrpTg.js.br +0 -0
  645. package/build/client/_app/immutable/chunks/D6jhrpTg.js.gz +0 -0
  646. package/build/client/_app/immutable/chunks/D8YEa1po.js +0 -1
  647. package/build/client/_app/immutable/chunks/D8YEa1po.js.br +0 -0
  648. package/build/client/_app/immutable/chunks/D8YEa1po.js.gz +0 -0
  649. package/build/client/_app/immutable/chunks/D9dKmajw.js +0 -1
  650. package/build/client/_app/immutable/chunks/D9dKmajw.js.br +0 -0
  651. package/build/client/_app/immutable/chunks/D9dKmajw.js.gz +0 -0
  652. package/build/client/_app/immutable/chunks/DBJWcC6Y.js +0 -1
  653. package/build/client/_app/immutable/chunks/DBJWcC6Y.js.br +0 -0
  654. package/build/client/_app/immutable/chunks/DBJWcC6Y.js.gz +0 -0
  655. package/build/client/_app/immutable/chunks/DHoA038D.js +0 -1
  656. package/build/client/_app/immutable/chunks/DHoA038D.js.br +0 -2
  657. package/build/client/_app/immutable/chunks/DHoA038D.js.gz +0 -0
  658. package/build/client/_app/immutable/chunks/DKgYpi6_.js +0 -1
  659. package/build/client/_app/immutable/chunks/DKgYpi6_.js.br +0 -0
  660. package/build/client/_app/immutable/chunks/DKgYpi6_.js.gz +0 -0
  661. package/build/client/_app/immutable/chunks/DatGSObE.js +0 -1
  662. package/build/client/_app/immutable/chunks/DatGSObE.js.br +0 -0
  663. package/build/client/_app/immutable/chunks/DatGSObE.js.gz +0 -0
  664. package/build/client/_app/immutable/chunks/Dg0acPpT.js +0 -1
  665. package/build/client/_app/immutable/chunks/Dg0acPpT.js.br +0 -0
  666. package/build/client/_app/immutable/chunks/Dg0acPpT.js.gz +0 -0
  667. package/build/client/_app/immutable/chunks/DjWKKtqp.js +0 -1
  668. package/build/client/_app/immutable/chunks/DjWKKtqp.js.br +0 -1
  669. package/build/client/_app/immutable/chunks/DjWKKtqp.js.gz +0 -0
  670. package/build/client/_app/immutable/chunks/Dq0DUAz1.js +0 -1
  671. package/build/client/_app/immutable/chunks/Dq0DUAz1.js.br +0 -0
  672. package/build/client/_app/immutable/chunks/Dq0DUAz1.js.gz +0 -0
  673. package/build/client/_app/immutable/chunks/HKLi1Yz3.js +0 -1
  674. package/build/client/_app/immutable/chunks/HKLi1Yz3.js.br +0 -0
  675. package/build/client/_app/immutable/chunks/HKLi1Yz3.js.gz +0 -0
  676. package/build/client/_app/immutable/chunks/N7PXjlRH.js +0 -1
  677. package/build/client/_app/immutable/chunks/N7PXjlRH.js.br +0 -0
  678. package/build/client/_app/immutable/chunks/N7PXjlRH.js.gz +0 -0
  679. package/build/client/_app/immutable/chunks/hpWJNn0t2.js +0 -2
  680. package/build/client/_app/immutable/chunks/hpWJNn0t2.js.br +0 -0
  681. package/build/client/_app/immutable/chunks/hpWJNn0t2.js.gz +0 -0
  682. package/build/client/_app/immutable/chunks/iQu0D9Ux.js +0 -1
  683. package/build/client/_app/immutable/chunks/iQu0D9Ux.js.br +0 -0
  684. package/build/client/_app/immutable/chunks/iQu0D9Ux.js.gz +0 -0
  685. package/build/client/_app/immutable/entry/app.CLgh6Mx_.js +0 -2
  686. package/build/client/_app/immutable/entry/app.CLgh6Mx_.js.br +0 -0
  687. package/build/client/_app/immutable/entry/app.CLgh6Mx_.js.gz +0 -0
  688. package/build/client/_app/immutable/entry/start.D5GPCQZD.js +0 -1
  689. package/build/client/_app/immutable/entry/start.D5GPCQZD.js.br +0 -0
  690. package/build/client/_app/immutable/entry/start.D5GPCQZD.js.gz +0 -0
  691. package/build/client/_app/immutable/nodes/0.BOoI-hsu.js +0 -4
  692. package/build/client/_app/immutable/nodes/0.BOoI-hsu.js.br +0 -0
  693. package/build/client/_app/immutable/nodes/0.BOoI-hsu.js.gz +0 -0
  694. package/build/client/_app/immutable/nodes/1.KYdA6ppX.js.br +0 -2
  695. package/build/client/_app/immutable/nodes/1.KYdA6ppX.js.gz +0 -0
  696. package/build/client/_app/immutable/nodes/2.DBz20KgG.js.br +0 -0
  697. package/build/client/_app/immutable/nodes/2.DBz20KgG.js.gz +0 -0
  698. package/build/client/_app/immutable/nodes/3.19DIoFtw.js +0 -1
  699. package/build/client/_app/immutable/nodes/3.19DIoFtw.js.br +0 -0
  700. package/build/client/_app/immutable/nodes/3.19DIoFtw.js.gz +0 -0
  701. package/build/client/_app/immutable/nodes/4.BvMzqBJj.js +0 -3
  702. package/build/client/_app/immutable/nodes/4.BvMzqBJj.js.br +0 -0
  703. package/build/client/_app/immutable/nodes/4.BvMzqBJj.js.gz +0 -0
  704. package/build/client/_app/immutable/nodes/5.Dq6obSGG.js +0 -42
  705. package/build/client/_app/immutable/nodes/5.Dq6obSGG.js.br +0 -0
  706. package/build/client/_app/immutable/nodes/5.Dq6obSGG.js.gz +0 -0
  707. package/build/client/_app/immutable/nodes/6.BOHISqs-.js +0 -5
  708. package/build/client/_app/immutable/nodes/6.BOHISqs-.js.br +0 -0
  709. package/build/client/_app/immutable/nodes/6.BOHISqs-.js.gz +0 -0
  710. package/build/client/_app/immutable/nodes/7.CemgNJfw.js.br +0 -0
  711. package/build/client/_app/immutable/nodes/7.CemgNJfw.js.gz +0 -0
  712. package/build/client/_app/immutable/nodes/8.DejSfIYh.js +0 -5
  713. package/build/client/_app/immutable/nodes/8.DejSfIYh.js.br +0 -0
  714. package/build/client/_app/immutable/nodes/8.DejSfIYh.js.gz +0 -0
  715. package/build/client/_app/immutable/nodes/9.CMW6a2Lg.js.br +0 -0
  716. package/build/client/_app/immutable/nodes/9.CMW6a2Lg.js.gz +0 -0
  717. package/build/server/chunks/0-C_o0oz-N.js +0 -15
  718. package/build/server/chunks/0-C_o0oz-N.js.map +0 -1
  719. package/build/server/chunks/1-DPpKAKXV.js +0 -9
  720. package/build/server/chunks/2-AlfFqtL1.js +0 -9
  721. package/build/server/chunks/2-AlfFqtL1.js.map +0 -1
  722. package/build/server/chunks/3-vbjUt_51.js +0 -16
  723. package/build/server/chunks/3-vbjUt_51.js.map +0 -1
  724. package/build/server/chunks/4-BNow4x6D.js +0 -16
  725. package/build/server/chunks/4-BNow4x6D.js.map +0 -1
  726. package/build/server/chunks/5-D7OCJpxD.js +0 -9
  727. package/build/server/chunks/5-D7OCJpxD.js.map +0 -1
  728. package/build/server/chunks/6-QQ7r8Rd5.js +0 -9
  729. package/build/server/chunks/7-CbPLGaIG.js +0 -9
  730. package/build/server/chunks/7-CbPLGaIG.js.map +0 -1
  731. package/build/server/chunks/8-CVO-E-sf.js +0 -9
  732. package/build/server/chunks/8-CVO-E-sf.js.map +0 -1
  733. package/build/server/chunks/9-DxT1baO5.js +0 -9
  734. package/build/server/chunks/9-DxT1baO5.js.map +0 -1
  735. package/build/server/chunks/FeatureTransforms-UWDHmWEg.js.map +0 -1
  736. package/build/server/chunks/FeatureValidator-B8qEjAUW.js.map +0 -1
  737. package/build/server/chunks/ManageTagsDialog-DBxA3tM2.js.map +0 -1
  738. package/build/server/chunks/ProgressBar-CfhccQ83.js.map +0 -1
  739. package/build/server/chunks/ProjectsIndex-CoDrvRya.js.map +0 -1
  740. package/build/server/chunks/RenameTag-BuWLMl1m.js.map +0 -1
  741. package/build/server/chunks/TagDotStrip-B1XQ0m0Y.js.map +0 -1
  742. package/build/server/chunks/TagPalette-CtMNYCmu.js.map +0 -1
  743. package/build/server/chunks/_layout.svelte-BREws55o.js +0 -616
  744. package/build/server/chunks/_layout.svelte-BREws55o.js.map +0 -1
  745. package/build/server/chunks/_page.svelte-B1s7jxaQ.js.map +0 -1
  746. package/build/server/chunks/_page.svelte-B7hT3P8E.js +0 -29
  747. package/build/server/chunks/_page.svelte-BqSC-1vK.js.map +0 -1
  748. package/build/server/chunks/_page.svelte-BtI2zZ_Z.js.map +0 -1
  749. package/build/server/chunks/_page.svelte-De508ek8.js +0 -29
  750. package/build/server/chunks/_page.svelte-Zf9H4KOP.js.map +0 -1
  751. package/build/server/chunks/_server.ts-0uNTZKwF.js.map +0 -1
  752. package/build/server/chunks/_server.ts-DcZPhyhK.js +0 -59
  753. package/build/server/chunks/_server.ts-DcZPhyhK.js.map +0 -1
  754. package/build/server/chunks/_server.ts-Dy5zQHe2.js.map +0 -1
  755. package/build/server/chunks/_server.ts-YnfXkeMJ.js.map +0 -1
  756. package/build/server/chunks/_server.ts-vcaqdwxS.js.map +0 -1
  757. package/build/server/chunks/browserContainer-CNX7ANld.js.map +0 -1
  758. package/build/server/chunks/builderModeStore.svelte-ihupr-3p.js.map +0 -1
  759. package/build/server/chunks/client-DfpLcAZ9.js +0 -24
  760. package/build/server/chunks/featuresStore.svelte-DR1gYZyu.js +0 -98
  761. package/build/server/chunks/featuresStore.svelte-DR1gYZyu.js.map +0 -1
  762. package/build/server/chunks/hooks.server-Rv301GTB.js.map +0 -1
  763. package/build/server/chunks/identityStore.svelte-IIvW2_3b.js +0 -59
  764. package/build/server/chunks/identityStore.svelte-IIvW2_3b.js.map +0 -1
  765. package/build/server/chunks/projectsStore.svelte-QDz5PchX.js.map +0 -1
  766. package/build/server/chunks/reconcile-Dv7jS3C8.js.map +0 -1
  767. package/build/server/chunks/snapshotRepository-BPXCjX92.js.map +0 -1
  768. package/build/server/chunks/syncBridge-BwXzPdjJ.js.map +0 -1
  769. package/src/features/implementation-queue/presentation/components/QueuePanel.svelte +0 -204
  770. package/src/features/implementation-queue/presentation/stores/queueStore.svelte.ts +0 -143
  771. /package/build/client/_app/immutable/assets/{9.nv0I59TU.css → 12.nv0I59TU.css} +0 -0
  772. /package/build/client/_app/immutable/assets/{9.nv0I59TU.css.br → 12.nv0I59TU.css.br} +0 -0
@@ -0,0 +1,230 @@
1
+ import { q as derived } from './index-server-DvBux_Gf.js';
2
+ import { i as getBrowserContainer } from './browserContainer-BdldtueJ.js';
3
+ import { e as emit } from './eventBus-B9k-Vzso.js';
4
+ import { r as reconcileInPlace, g as getRoomClient } from './reconcile-CVG2LSlW.js';
5
+
6
+ //#region src/features/projects/presentation/stores/projectStore.svelte.ts
7
+ var ProjectStore = class {
8
+ loading = true;
9
+ project = null;
10
+ #id = derived(() => this.project ? String(this.project.id) : "");
11
+ get id() {
12
+ return this.#id();
13
+ }
14
+ set id($$value) {
15
+ return this.#id($$value);
16
+ }
17
+ #name = derived(() => this.project?.name ?? "");
18
+ get name() {
19
+ return this.#name();
20
+ }
21
+ set name($$value) {
22
+ return this.#name($$value);
23
+ }
24
+ #featureIds = derived(() => this.project ? this.project.featureIds.map(String) : []);
25
+ get featureIds() {
26
+ return this.#featureIds();
27
+ }
28
+ set featureIds($$value) {
29
+ return this.#featureIds($$value);
30
+ }
31
+ error = null;
32
+ saveError = null;
33
+ saving = false;
34
+ dirty = false;
35
+ lastSavedAt = "";
36
+ activePanel = "features";
37
+ selectedFeatureId = "";
38
+ search = "";
39
+ historyEntries = [];
40
+ historyCursor = -1;
41
+ currentId = null;
42
+ client = null;
43
+ clientUnsubscribe = null;
44
+ historyUnsubscribe = null;
45
+ async load(id) {
46
+ try {
47
+ this.loading = true;
48
+ this.error = null;
49
+ this.currentId = id;
50
+ const fresh = await (await getBrowserContainer()).useCases.getProject(id);
51
+ this.project = fresh;
52
+ this.dirty = false;
53
+ this.lastSavedAt = fresh?.updatedAt ?? "";
54
+ this.subscribeRoom(id);
55
+ } catch (e) {
56
+ this.error = e.message;
57
+ } finally {
58
+ this.loading = false;
59
+ }
60
+ }
61
+ setActivePanel(panel) {
62
+ this.activePanel = panel;
63
+ emit("project.panel_switched", { panel });
64
+ }
65
+ setSearch(query) {
66
+ this.search = query;
67
+ emit("project.editor_search_updated", { query });
68
+ }
69
+ setSelectedFeature(id) {
70
+ this.selectedFeatureId = id;
71
+ if (id) emit("project.feature_opened", { featureId: id });
72
+ }
73
+ async addFeature(featureId) {
74
+ if (!this.project || !this.currentId) return;
75
+ this.saving = true;
76
+ this.saveError = null;
77
+ try {
78
+ const next = await (await getBrowserContainer()).useCases.addFeatureToProject(this.currentId, featureId);
79
+ this.applyProject(next);
80
+ emit("project.feature_added", {
81
+ projectId: String(this.currentId),
82
+ featureId: String(featureId)
83
+ });
84
+ } catch (e) {
85
+ this.saveError = e.message;
86
+ } finally {
87
+ this.saving = false;
88
+ }
89
+ }
90
+ async removeFeature(featureId) {
91
+ if (!this.project || !this.currentId) return;
92
+ this.saving = true;
93
+ this.saveError = null;
94
+ try {
95
+ const next = await (await getBrowserContainer()).useCases.removeFeatureFromProject(this.currentId, featureId);
96
+ this.applyProject(next);
97
+ emit("project.feature_removed", {
98
+ projectId: String(this.currentId),
99
+ featureId: String(featureId)
100
+ });
101
+ } catch (e) {
102
+ this.saveError = e.message;
103
+ } finally {
104
+ this.saving = false;
105
+ }
106
+ }
107
+ async rename(name) {
108
+ if (!this.project) return;
109
+ this.saving = true;
110
+ this.saveError = null;
111
+ try {
112
+ const next = await (await getBrowserContainer()).useCases.saveProject({
113
+ ...this.project,
114
+ name: name.trim()
115
+ });
116
+ this.applyProject(next);
117
+ } catch (e) {
118
+ this.saveError = e.message;
119
+ } finally {
120
+ this.saving = false;
121
+ }
122
+ }
123
+ async updateMetadata(name, description) {
124
+ if (!this.project) return;
125
+ const trimmedName = name.trim();
126
+ if (trimmedName.length === 0) return;
127
+ this.saving = true;
128
+ this.saveError = null;
129
+ try {
130
+ const container = await getBrowserContainer();
131
+ const trimmedDescription = description.trim();
132
+ const next = await container.useCases.saveProject({
133
+ ...this.project,
134
+ name: trimmedName,
135
+ description: trimmedDescription.length > 0 ? trimmedDescription : void 0
136
+ });
137
+ this.applyProject(next);
138
+ emit("project.saved", {
139
+ id: String(next.id),
140
+ name: next.name
141
+ });
142
+ } catch (e) {
143
+ this.saveError = e.message;
144
+ } finally {
145
+ this.saving = false;
146
+ }
147
+ }
148
+ async setDescription(description) {
149
+ if (!this.project) return;
150
+ this.saving = true;
151
+ this.saveError = null;
152
+ try {
153
+ const container = await getBrowserContainer();
154
+ const trimmed = description.trim();
155
+ const next = await container.useCases.saveProject({
156
+ ...this.project,
157
+ description: trimmed.length > 0 ? trimmed : void 0
158
+ });
159
+ this.applyProject(next);
160
+ } catch (e) {
161
+ this.saveError = e.message;
162
+ } finally {
163
+ this.saving = false;
164
+ }
165
+ }
166
+ dismissSaveError() {
167
+ this.saveError = null;
168
+ }
169
+ reset() {
170
+ if (this.clientUnsubscribe) {
171
+ this.clientUnsubscribe();
172
+ this.clientUnsubscribe = null;
173
+ }
174
+ if (this.historyUnsubscribe) {
175
+ this.historyUnsubscribe();
176
+ this.historyUnsubscribe = null;
177
+ }
178
+ this.client = null;
179
+ this.currentId = null;
180
+ this.project = null;
181
+ this.historyEntries = [];
182
+ this.historyCursor = -1;
183
+ this.error = null;
184
+ this.saveError = null;
185
+ this.loading = true;
186
+ this.saving = false;
187
+ this.dirty = false;
188
+ this.lastSavedAt = "";
189
+ this.activePanel = "features";
190
+ this.selectedFeatureId = "";
191
+ this.search = "";
192
+ }
193
+ applyProject(next) {
194
+ if (this.project) reconcileInPlace(this.project, next);
195
+ else this.project = next;
196
+ this.dirty = false;
197
+ this.lastSavedAt = next.updatedAt;
198
+ }
199
+ subscribeRoom(id) {
200
+ if (this.clientUnsubscribe) {
201
+ this.clientUnsubscribe();
202
+ this.clientUnsubscribe = null;
203
+ }
204
+ if (this.historyUnsubscribe) {
205
+ this.historyUnsubscribe();
206
+ this.historyUnsubscribe = null;
207
+ }
208
+ const client = getRoomClient("project", id);
209
+ this.client = client;
210
+ this.clientUnsubscribe = client.observe((next, origin) => {
211
+ if (origin === "local") return;
212
+ if (!next) return;
213
+ if (this.currentId !== id) return;
214
+ if (this.project) reconcileInPlace(this.project, next);
215
+ else this.project = next;
216
+ this.lastSavedAt = next.updatedAt;
217
+ });
218
+ this.historyEntries = client.history.entries;
219
+ this.historyCursor = client.history.cursor;
220
+ this.historyUnsubscribe = client.observeHistory((view) => {
221
+ if (this.currentId !== id) return;
222
+ this.historyEntries = view.entries;
223
+ this.historyCursor = view.cursor;
224
+ });
225
+ }
226
+ };
227
+ var projectStore = new ProjectStore();
228
+
229
+ export { projectStore as p };
230
+ //# sourceMappingURL=projectStore.svelte-BNuLNxk_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectStore.svelte-BNuLNxk_.js","sources":["../../../.svelte-kit/adapter-node/chunks/projectStore.svelte.js"],"sourcesContent":["import { l as derived } from \"./index-server.js\";\nimport { t as getBrowserContainer } from \"./browserContainer.js\";\nimport { t as emit } from \"./eventBus.js\";\nimport { n as reconcileInPlace, r as getRoomClient } from \"./reconcile.js\";\n//#region src/features/projects/presentation/stores/projectStore.svelte.ts\nvar ProjectStore = class {\n\tloading = true;\n\tproject = null;\n\t#id = derived(() => this.project ? String(this.project.id) : \"\");\n\tget id() {\n\t\treturn this.#id();\n\t}\n\tset id($$value) {\n\t\treturn this.#id($$value);\n\t}\n\t#name = derived(() => this.project?.name ?? \"\");\n\tget name() {\n\t\treturn this.#name();\n\t}\n\tset name($$value) {\n\t\treturn this.#name($$value);\n\t}\n\t#featureIds = derived(() => this.project ? this.project.featureIds.map(String) : []);\n\tget featureIds() {\n\t\treturn this.#featureIds();\n\t}\n\tset featureIds($$value) {\n\t\treturn this.#featureIds($$value);\n\t}\n\terror = null;\n\tsaveError = null;\n\tsaving = false;\n\tdirty = false;\n\tlastSavedAt = \"\";\n\tactivePanel = \"features\";\n\tselectedFeatureId = \"\";\n\tsearch = \"\";\n\thistoryEntries = [];\n\thistoryCursor = -1;\n\tcurrentId = null;\n\tclient = null;\n\tclientUnsubscribe = null;\n\thistoryUnsubscribe = null;\n\tasync load(id) {\n\t\ttry {\n\t\t\tthis.loading = true;\n\t\t\tthis.error = null;\n\t\t\tthis.currentId = id;\n\t\t\tconst fresh = await (await getBrowserContainer()).useCases.getProject(id);\n\t\t\tthis.project = fresh;\n\t\t\tthis.dirty = false;\n\t\t\tthis.lastSavedAt = fresh?.updatedAt ?? \"\";\n\t\t\tthis.subscribeRoom(id);\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t} finally {\n\t\t\tthis.loading = false;\n\t\t}\n\t}\n\tsetActivePanel(panel) {\n\t\tthis.activePanel = panel;\n\t\temit(\"project.panel_switched\", { panel });\n\t}\n\tsetSearch(query) {\n\t\tthis.search = query;\n\t\temit(\"project.editor_search_updated\", { query });\n\t}\n\tsetSelectedFeature(id) {\n\t\tthis.selectedFeatureId = id;\n\t\tif (id) emit(\"project.feature_opened\", { featureId: id });\n\t}\n\tasync addFeature(featureId) {\n\t\tif (!this.project || !this.currentId) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.addFeatureToProject(this.currentId, featureId);\n\t\t\tthis.applyProject(next);\n\t\t\temit(\"project.feature_added\", {\n\t\t\t\tprojectId: String(this.currentId),\n\t\t\t\tfeatureId: String(featureId)\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync removeFeature(featureId) {\n\t\tif (!this.project || !this.currentId) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.removeFeatureFromProject(this.currentId, featureId);\n\t\t\tthis.applyProject(next);\n\t\t\temit(\"project.feature_removed\", {\n\t\t\t\tprojectId: String(this.currentId),\n\t\t\t\tfeatureId: String(featureId)\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync rename(name) {\n\t\tif (!this.project) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.saveProject({\n\t\t\t\t...this.project,\n\t\t\t\tname: name.trim()\n\t\t\t});\n\t\t\tthis.applyProject(next);\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync updateMetadata(name, description) {\n\t\tif (!this.project) return;\n\t\tconst trimmedName = name.trim();\n\t\tif (trimmedName.length === 0) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst trimmedDescription = description.trim();\n\t\t\tconst next = await container.useCases.saveProject({\n\t\t\t\t...this.project,\n\t\t\t\tname: trimmedName,\n\t\t\t\tdescription: trimmedDescription.length > 0 ? trimmedDescription : void 0\n\t\t\t});\n\t\t\tthis.applyProject(next);\n\t\t\temit(\"project.saved\", {\n\t\t\t\tid: String(next.id),\n\t\t\t\tname: next.name\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync setDescription(description) {\n\t\tif (!this.project) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst trimmed = description.trim();\n\t\t\tconst next = await container.useCases.saveProject({\n\t\t\t\t...this.project,\n\t\t\t\tdescription: trimmed.length > 0 ? trimmed : void 0\n\t\t\t});\n\t\t\tthis.applyProject(next);\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tdismissSaveError() {\n\t\tthis.saveError = null;\n\t}\n\treset() {\n\t\tif (this.clientUnsubscribe) {\n\t\t\tthis.clientUnsubscribe();\n\t\t\tthis.clientUnsubscribe = null;\n\t\t}\n\t\tif (this.historyUnsubscribe) {\n\t\t\tthis.historyUnsubscribe();\n\t\t\tthis.historyUnsubscribe = null;\n\t\t}\n\t\tthis.client = null;\n\t\tthis.currentId = null;\n\t\tthis.project = null;\n\t\tthis.historyEntries = [];\n\t\tthis.historyCursor = -1;\n\t\tthis.error = null;\n\t\tthis.saveError = null;\n\t\tthis.loading = true;\n\t\tthis.saving = false;\n\t\tthis.dirty = false;\n\t\tthis.lastSavedAt = \"\";\n\t\tthis.activePanel = \"features\";\n\t\tthis.selectedFeatureId = \"\";\n\t\tthis.search = \"\";\n\t}\n\tapplyProject(next) {\n\t\tif (this.project) reconcileInPlace(this.project, next);\n\t\telse this.project = next;\n\t\tthis.dirty = false;\n\t\tthis.lastSavedAt = next.updatedAt;\n\t}\n\tsubscribeRoom(id) {\n\t\tif (this.clientUnsubscribe) {\n\t\t\tthis.clientUnsubscribe();\n\t\t\tthis.clientUnsubscribe = null;\n\t\t}\n\t\tif (this.historyUnsubscribe) {\n\t\t\tthis.historyUnsubscribe();\n\t\t\tthis.historyUnsubscribe = null;\n\t\t}\n\t\tconst client = getRoomClient(\"project\", id);\n\t\tthis.client = client;\n\t\tthis.clientUnsubscribe = client.observe((next, origin) => {\n\t\t\tif (origin === \"local\") return;\n\t\t\tif (!next) return;\n\t\t\tif (this.currentId !== id) return;\n\t\t\tif (this.project) reconcileInPlace(this.project, next);\n\t\t\telse this.project = next;\n\t\t\tthis.lastSavedAt = next.updatedAt;\n\t\t});\n\t\tthis.historyEntries = client.history.entries;\n\t\tthis.historyCursor = client.history.cursor;\n\t\tthis.historyUnsubscribe = client.observeHistory((view) => {\n\t\t\tif (this.currentId !== id) return;\n\t\t\tthis.historyEntries = view.entries;\n\t\t\tthis.historyCursor = view.cursor;\n\t\t});\n\t}\n};\nvar projectStore = new ProjectStore();\n//#endregion\nexport { projectStore as t };\n"],"names":[],"mappings":";;;;;AAIA;AACA,IAAI,YAAY,GAAG,MAAM;AACzB,CAAC,OAAO,GAAG,IAAI;AACf,CAAC,OAAO,GAAG,IAAI;AACf,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;AACjE,CAAC,IAAI,EAAE,GAAG;AACV,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE;AACnB,CAAC;AACD,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;AAC1B,CAAC;AACD,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;AAChD,CAAC,IAAI,IAAI,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,KAAK,EAAE;AACrB,CAAC;AACD,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE;AACnB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AAC5B,CAAC;AACD,CAAC,WAAW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E,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,EAAE,EAAE,CAAC;AAC7C,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM;AACtB,EAAE,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK;AAC5D,GAAG,IAAI,MAAM,KAAK,OAAO,EAAE;AAC3B,GAAG,IAAI,CAAC,IAAI,EAAE;AACd,GAAG,IAAI,IAAI,CAAC,SAAS,KAAK,EAAE,EAAE;AAC9B,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;AACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS;AACpC,EAAE,CAAC,CAAC;AACJ,EAAE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO;AAC9C,EAAE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM;AAC5C,EAAE,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,KAAK;AAC5D,GAAG,IAAI,IAAI,CAAC,SAAS,KAAK,EAAE,EAAE;AAC9B,GAAG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO;AACrC,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM;AACnC,EAAE,CAAC,CAAC;AACJ,CAAC;AACD,CAAC;AACE,IAAC,YAAY,GAAG,IAAI,YAAY;;;;"}
@@ -1,277 +1,64 @@
1
- import './client-DfpLcAZ9.js';
2
- import { i as humanizeStatePath, a as authStore } from './browserContainer-CNX7ANld.js';
3
1
  import { m as makeRoomId, a as ROOM_DOC_MAP, e as encode, R as ROOM_DOC_FIELD, d as decode } from './protocol-3LlFyPP_.js';
4
- import { i as identityStore } from './identityStore.svelte-IIvW2_3b.js';
2
+ import { c as authStore } from './browserContainer-BdldtueJ.js';
5
3
  import * as Y from 'yjs';
6
4
 
7
- //#endregion
8
- //#region src/features/behavior-model/domain/services/EffectiveEntities.ts
9
- var capitalize = (s) => s.length === 0 ? s : s.charAt(0).toUpperCase() + s.slice(1);
10
- var fieldNameFromPath = (path) => {
11
- const segments = path.split(".");
12
- if (segments.length <= 1) return path;
13
- return segments[segments.length - 1];
14
- };
15
- /**
16
- * Produce the list of all Entity entities visible in the feature. Every
17
- * state-path namespace, enriched with metadata from any matching authored
18
- * `Entity` record. Authored entries with no matching state paths still appear
19
- * (so the user doesn't lose explicit work).
20
- */
21
- var getEffectiveEntities = (feature) => {
22
- const deduced = /* @__PURE__ */ new Map();
23
- for (const surface of feature.surfaces) for (const def of surface.stateDefinitions) {
24
- const namespace = def.path.split(".")[0] ?? def.path;
25
- let acc = deduced.get(namespace);
26
- if (!acc) {
27
- acc = {
28
- fields: /* @__PURE__ */ new Map(),
29
- surfaces: /* @__PURE__ */ new Set()
30
- };
31
- deduced.set(namespace, acc);
32
- }
33
- if (!acc.fields.has(def.path)) acc.fields.set(def.path, {
34
- name: fieldNameFromPath(def.path),
35
- path: def.path,
36
- type: def.type,
37
- source: "deduced"
38
- });
39
- acc.surfaces.add(surface.name);
40
- }
41
- const declaredByNamespace = /* @__PURE__ */ new Map();
42
- for (const data of feature.entities) declaredByNamespace.set(data.namespace, data);
43
- const namespaces = new Set([...deduced.keys(), ...declaredByNamespace.keys()]);
44
- const results = [];
45
- for (const namespace of namespaces) {
46
- const declared = declaredByNamespace.get(namespace);
47
- const acc = deduced.get(namespace);
48
- const fieldByPath = /* @__PURE__ */ new Map();
49
- if (acc) for (const [path, f] of acc.fields) fieldByPath.set(path, f);
50
- if (declared) for (const f of declared.fields) {
51
- if (!f.path) continue;
52
- fieldByPath.set(String(f.path), {
53
- id: f.id,
54
- name: f.name,
55
- path: f.path,
56
- type: f.type,
57
- source: "declared",
58
- fields: f.fields,
59
- items: f.items
60
- });
61
- }
62
- const fields = Array.from(fieldByPath.values()).sort((a, b) => a.path.localeCompare(b.path));
63
- results.push({
64
- id: declared?.id,
65
- name: capitalize(humanizeStatePath(namespace)),
66
- namespace,
67
- description: declared?.description,
68
- resourceId: declared?.resourceId,
69
- fields,
70
- isMaterialized: declared !== void 0,
71
- usedBySurfaces: acc ? Array.from(acc.surfaces).sort() : []
72
- });
73
- }
74
- results.sort((a, b) => a.namespace.localeCompare(b.namespace));
75
- return results;
76
- };
77
- //#endregion
78
- //#region src/features/behavior-model/domain/services/EventCatalog.ts
79
- var groupOf = (name) => {
80
- const seg = name.split(".")[0];
81
- return seg && seg.length > 0 ? seg : "_root";
82
- };
83
- /**
84
- * Walk the feature and collect every event emitted across:
85
- * - action.emittedEvents (intent-level declarations)
86
- * - action.effects (emit_event default effects)
87
- * - action.rules.effect (emit_event when a rule fires)
88
- * - surface.rules.effect (emit_event surface-level rules)
89
- *
90
- * Output is grouped by the event's namespace and sorted alphabetically. Each
91
- * unique event collapses every occurrence into a single entry with all its
92
- * emission sources, so the user sees "order.placed (3 places)" once instead
93
- * of three times.
94
- */
95
- var buildEventCatalog = (feature) => {
96
- const byName = /* @__PURE__ */ new Map();
97
- const push = (name, source) => {
98
- let list = byName.get(name);
99
- if (!list) {
100
- list = [];
101
- byName.set(name, list);
102
- }
103
- list.push(source);
104
- };
105
- for (const surface of feature.surfaces) {
106
- for (const cap of surface.actions) {
107
- for (const evt of cap.emittedEvents) push(String(evt), {
108
- surfaceId: surface.id,
109
- surfaceName: surface.name,
110
- actionId: cap.id,
111
- actionName: cap.name,
112
- origin: "action_default"
113
- });
114
- for (const effect of cap.effects) if (effect.type === "emit_event") push(String(effect.event), {
115
- surfaceId: surface.id,
116
- surfaceName: surface.name,
117
- actionId: cap.id,
118
- actionName: cap.name,
119
- origin: "action_effect",
120
- description: effect.description
121
- });
122
- for (const rule of cap.rules) if (rule.effect.type === "emit_event") push(String(rule.effect.event), {
123
- surfaceId: surface.id,
124
- surfaceName: surface.name,
125
- actionId: cap.id,
126
- actionName: cap.name,
127
- origin: "action_rule_effect",
128
- description: rule.description
129
- });
130
- }
131
- for (const rule of surface.rules) if (rule.effect.type === "emit_event") push(String(rule.effect.event), {
132
- surfaceId: surface.id,
133
- surfaceName: surface.name,
134
- origin: "surface_rule_effect",
135
- description: rule.description
136
- });
5
+ //#region src/shared/identity/identityStore.svelte.ts
6
+ var STORAGE_KEY = "unspa.identity.name";
7
+ var ASKED_STORAGE_KEY = "unspa.identity.asked";
8
+ var MAX_LENGTH = 40;
9
+ var ANONYMOUS = "Anonymous";
10
+ var sanitize = (raw) => raw.replace(/[^\p{L}\p{N} \-_.@'’]/gu, "").trim().slice(0, MAX_LENGTH);
11
+ var IdentityStore = class {
12
+ /**
13
+ * Current name as typed by the user. Empty string when nothing has
14
+ * been set UI components render a "Set your name" affordance in
15
+ * that case.
16
+ */
17
+ name = "";
18
+ initialized = false;
19
+ /** Hydrate from localStorage. Idempotent. */
20
+ init() {
21
+ if (this.initialized) return;
22
+ this.initialized = true;
23
+ if (typeof localStorage === "undefined") return;
24
+ const stored = localStorage.getItem(STORAGE_KEY);
25
+ if (stored) this.name = sanitize(stored);
137
26
  }
138
- const entries = [];
139
- for (const [name, emissions] of byName) entries.push({
140
- name,
141
- group: groupOf(name),
142
- emissions
143
- });
144
- entries.sort((a, b) => {
145
- if (a.group !== b.group) return a.group.localeCompare(b.group);
146
- return String(a.name).localeCompare(String(b.name));
147
- });
148
- return entries;
149
- };
150
- var groupEventCatalog = (entries) => {
151
- const map = /* @__PURE__ */ new Map();
152
- for (const entry of entries) {
153
- let list = map.get(entry.group);
154
- if (!list) {
155
- list = [];
156
- map.set(entry.group, list);
157
- }
158
- list.push(entry);
27
+ setName(next) {
28
+ const cleaned = sanitize(next);
29
+ this.name = cleaned;
30
+ if (typeof localStorage === "undefined") return;
31
+ if (cleaned.length > 0) localStorage.setItem(STORAGE_KEY, cleaned);
32
+ else localStorage.removeItem(STORAGE_KEY);
159
33
  }
160
- return Array.from(map.entries()).map(([group, events]) => ({
161
- group,
162
- events
163
- })).sort((a, b) => a.group.localeCompare(b.group));
164
- };
165
- //#endregion
166
- //#region src/features/behavior-model/domain/services/TransitionCatalog.ts
167
- /**
168
- * Walk every surface and collect every authored transition between two
169
- * surfaces, regardless of where it lives in the model:
170
- * - `surface.transitions` (declared navigation hints)
171
- * - action default effects of type `transition_surface`
172
- * - action rule effects of type `transition_surface`
173
- * - surface-level rule effects of type `transition_surface`
174
- *
175
- * Edges with the same (from, to) pair collapse into one entry whose
176
- * `sources` lists every contribution. Output is sorted by source surface
177
- * order (matches the feature editor's surface list), then by target surface name.
178
- */
179
- var buildTransitionCatalog = (feature) => {
180
- const surfaceById = /* @__PURE__ */ new Map();
181
- feature.surfaces.forEach((s, index) => {
182
- surfaceById.set(s.id, {
183
- name: s.name,
184
- index
185
- });
186
- });
187
- const byEdge = /* @__PURE__ */ new Map();
188
- const targetExists = (id) => id !== void 0 && surfaceById.has(id);
189
- const push = (fromId, toId, source) => {
190
- if (!targetExists(toId)) return;
191
- const key = `${fromId}__${toId}`;
192
- let acc = byEdge.get(key);
193
- if (!acc) {
194
- acc = {
195
- sources: [],
196
- fromIndex: surfaceById.get(fromId)?.index ?? 0
197
- };
198
- byEdge.set(key, acc);
199
- }
200
- acc.sources.push(source);
201
- };
202
- for (const surface of feature.surfaces) {
203
- const fromId = surface.id;
204
- const fromName = surface.name;
205
- for (const transition of surface.transitions) push(fromId, transition.target, {
206
- surfaceId: fromId,
207
- surfaceName: fromName,
208
- origin: "declared",
209
- description: transition.label ?? transition.description
210
- });
211
- for (const cap of surface.actions) {
212
- for (const effect of cap.effects) if (effect.type === "transition_surface") push(fromId, effect.target, {
213
- surfaceId: fromId,
214
- surfaceName: fromName,
215
- actionId: cap.id,
216
- actionName: cap.name,
217
- origin: "action_effect",
218
- description: effect.description
219
- });
220
- for (const rule of cap.rules) if (rule.effect.type === "transition_surface") push(fromId, rule.effect.target, {
221
- surfaceId: fromId,
222
- surfaceName: fromName,
223
- actionId: cap.id,
224
- actionName: cap.name,
225
- origin: "action_rule_effect",
226
- description: rule.description
227
- });
228
- }
229
- for (const rule of surface.rules) if (rule.effect.type === "transition_surface") push(fromId, rule.effect.target, {
230
- surfaceId: fromId,
231
- surfaceName: fromName,
232
- origin: "surface_rule_effect",
233
- description: rule.description
234
- });
34
+ /**
35
+ * Whether the layout has already shown the auto-prompt for this
36
+ * browser. The flag survives reloads (localStorage), so once the user
37
+ * has been asked — even if they cancelled without entering a name —
38
+ * we don't keep popping up the dialog on every navigation. The
39
+ * header avatar stays the explicit way to set a name later.
40
+ */
41
+ get hasBeenAsked() {
42
+ if (typeof localStorage === "undefined") return true;
43
+ return localStorage.getItem(ASKED_STORAGE_KEY) === "1";
235
44
  }
236
- const entries = [];
237
- for (const [key, acc] of byEdge) {
238
- const [fromId, toId] = key.split("__");
239
- const from = surfaceById.get(fromId);
240
- const to = surfaceById.get(toId);
241
- if (!from || !to) continue;
242
- entries.push({
243
- fromSurfaceId: fromId,
244
- fromSurfaceName: from.name,
245
- toSurfaceId: toId,
246
- toSurfaceName: to.name,
247
- sources: acc.sources
248
- });
45
+ /** Mark the auto-prompt as fired so it doesn't run again. */
46
+ markAsked() {
47
+ if (typeof localStorage === "undefined") return;
48
+ localStorage.setItem(ASKED_STORAGE_KEY, "1");
249
49
  }
250
- entries.sort((a, b) => {
251
- const fa = surfaceById.get(a.fromSurfaceId)?.index ?? 0;
252
- const fb = surfaceById.get(b.fromSurfaceId)?.index ?? 0;
253
- if (fa !== fb) return fa - fb;
254
- return (surfaceById.get(a.toSurfaceId)?.index ?? 0) - (surfaceById.get(b.toSurfaceId)?.index ?? 0);
255
- });
256
- return entries;
257
- };
258
- var groupTransitionCatalog = (entries) => {
259
- const map = /* @__PURE__ */ new Map();
260
- for (const entry of entries) {
261
- let group = map.get(entry.fromSurfaceId);
262
- if (!group) {
263
- group = {
264
- fromSurfaceId: entry.fromSurfaceId,
265
- fromSurfaceName: entry.fromSurfaceName,
266
- transitions: []
267
- };
268
- map.set(entry.fromSurfaceId, group);
269
- }
270
- group.transitions.push(entry);
50
+ /**
51
+ * Author tag for sync transport. The wsServer treats this as the
52
+ * connection's identity for every history entry produced over that
53
+ * socket. Always non-empty so the server doesn't have to special-case
54
+ * a missing/blank value.
55
+ */
56
+ get author() {
57
+ return this.name.length > 0 ? this.name : ANONYMOUS;
271
58
  }
272
- return Array.from(map.values());
273
59
  };
274
-
60
+ var identityStore = new IdentityStore();
61
+ //#endregion
275
62
  //#region src/lib/client/sync/YDocClient.ts
276
63
  /**
277
64
  * Browser-side per-room sync client. Lazy-connects a WebSocket to /sync/<roomId>,
@@ -602,5 +389,5 @@ var reconcileInPlace = (target, next) => {
602
389
  */
603
390
  var deepClonePlain = (value) => JSON.parse(JSON.stringify(value));
604
391
 
605
- export { buildTransitionCatalog as a, buildEventCatalog as b, getRoomClient as c, deepClonePlain as d, groupEventCatalog as e, groupTransitionCatalog as f, getEffectiveEntities as g, reconcileInPlace as r };
606
- //# sourceMappingURL=reconcile-Dv7jS3C8.js.map
392
+ export { deepClonePlain as d, getRoomClient as g, identityStore as i, reconcileInPlace as r };
393
+ //# sourceMappingURL=reconcile-CVG2LSlW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconcile-CVG2LSlW.js","sources":["../../../.svelte-kit/adapter-node/chunks/reconcile.js"],"sourcesContent":["import \"./index-server.js\";\nimport { a as makeRoomId, i as ROOM_DOC_MAP, n as encode, r as ROOM_DOC_FIELD, t as decode } from \"./protocol.js\";\nimport { s as authStore } from \"./browserContainer.js\";\nimport * as Y from \"yjs\";\n//#region src/shared/identity/identityStore.svelte.ts\nvar STORAGE_KEY = \"unspa.identity.name\";\nvar ASKED_STORAGE_KEY = \"unspa.identity.asked\";\nvar MAX_LENGTH = 40;\nvar ANONYMOUS = \"Anonymous\";\nvar sanitize = (raw) => raw.replace(/[^\\p{L}\\p{N} \\-_.@'’]/gu, \"\").trim().slice(0, MAX_LENGTH);\nvar IdentityStore = class {\n\t/**\n\t* Current name as typed by the user. Empty string when nothing has\n\t* been set — UI components render a \"Set your name\" affordance in\n\t* that case.\n\t*/\n\tname = \"\";\n\tinitialized = false;\n\t/** Hydrate from localStorage. Idempotent. */\n\tinit() {\n\t\tif (this.initialized) return;\n\t\tthis.initialized = true;\n\t\tif (typeof localStorage === \"undefined\") return;\n\t\tconst stored = localStorage.getItem(STORAGE_KEY);\n\t\tif (stored) this.name = sanitize(stored);\n\t}\n\tsetName(next) {\n\t\tconst cleaned = sanitize(next);\n\t\tthis.name = cleaned;\n\t\tif (typeof localStorage === \"undefined\") return;\n\t\tif (cleaned.length > 0) localStorage.setItem(STORAGE_KEY, cleaned);\n\t\telse localStorage.removeItem(STORAGE_KEY);\n\t}\n\t/**\n\t* Whether the layout has already shown the auto-prompt for this\n\t* browser. The flag survives reloads (localStorage), so once the user\n\t* has been asked — even if they cancelled without entering a name —\n\t* we don't keep popping up the dialog on every navigation. The\n\t* header avatar stays the explicit way to set a name later.\n\t*/\n\tget hasBeenAsked() {\n\t\tif (typeof localStorage === \"undefined\") return true;\n\t\treturn localStorage.getItem(ASKED_STORAGE_KEY) === \"1\";\n\t}\n\t/** Mark the auto-prompt as fired so it doesn't run again. */\n\tmarkAsked() {\n\t\tif (typeof localStorage === \"undefined\") return;\n\t\tlocalStorage.setItem(ASKED_STORAGE_KEY, \"1\");\n\t}\n\t/**\n\t* Author tag for sync transport. The wsServer treats this as the\n\t* connection's identity for every history entry produced over that\n\t* socket. Always non-empty so the server doesn't have to special-case\n\t* a missing/blank value.\n\t*/\n\tget author() {\n\t\treturn this.name.length > 0 ? this.name : ANONYMOUS;\n\t}\n};\nvar identityStore = new IdentityStore();\n//#endregion\n//#region src/lib/client/sync/YDocClient.ts\n/**\n* Browser-side per-room sync client. Lazy-connects a WebSocket to /sync/<roomId>,\n* keeps a local Y.Doc in step with the server, and exposes the snapshot value\n* + a typed mutate() helper.\n*\n* Reconnects with exponential backoff (1s → 8s, capped). Buffers local writes\n* during disconnects in the Y.Doc itself; on reconnect the sync_step1 / step2\n* handshake catches both sides up.\n*\n* Undo/redo and time travel are both served by the server-side shared\n* history: Ctrl+Z / Ctrl+Y / the toolbar buttons all route through jumpTo()\n* to step the shared cursor. Never replay an inverse Y.Map write locally,\n* because that would land back on the server as a fresh edit and produce a\n* duplicate history entry.\n*/\nvar WS_SCHEME = () => location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\nvar WS_BASE = () => `${WS_SCHEME()}//${location.host}/sync`;\nvar BACKOFF_START_MS = 1e3;\nvar BACKOFF_MAX_MS = 8e3;\nvar YDocClient = class {\n\troomId;\n\tdoc = new Y.Doc();\n\tmap = this.doc.getMap(ROOM_DOC_MAP);\n\tws = null;\n\tlisteners = /* @__PURE__ */ new Set();\n\thistoryListeners = /* @__PURE__ */ new Set();\n\thistoryView = {\n\t\tentries: [],\n\t\tcursor: -1\n\t};\n\tconnected = false;\n\tclosed = false;\n\tbackoffMs = BACKOFF_START_MS;\n\treconnectTimer = null;\n\tbuffered = [];\n\tconstructor(roomId) {\n\t\tthis.roomId = roomId;\n\t\tthis.doc.on(\"update\", (update, origin) => {\n\t\t\tconst isRemote = origin === \"remote\";\n\t\t\tif (!isRemote) this.send(encode({\n\t\t\t\tkind: \"update\",\n\t\t\t\tupdate\n\t\t\t}));\n\t\t\tconst value = this.map.get(ROOM_DOC_FIELD);\n\t\t\tconst fanOrigin = isRemote ? \"remote\" : \"local\";\n\t\t\tfor (const l of this.listeners) l(value ?? null, fanOrigin);\n\t\t});\n\t}\n\tconnect() {\n\t\tif (this.ws || this.closed) return;\n\t\tconst author = identityStore.author;\n\t\tconst token = authStore.token;\n\t\tconst params = new URLSearchParams({ author });\n\t\tif (token.length > 0) params.set(\"token\", token);\n\t\tconst url = `${WS_BASE()}/${encodeURIComponent(this.roomId)}?${params.toString()}`;\n\t\tconst ws = new WebSocket(url);\n\t\tws.binaryType = \"arraybuffer\";\n\t\tthis.ws = ws;\n\t\tws.addEventListener(\"open\", () => {\n\t\t\tthis.connected = true;\n\t\t\tthis.backoffMs = BACKOFF_START_MS;\n\t\t\tfor (const u of this.buffered) ws.send(u);\n\t\t\tthis.buffered = [];\n\t\t\tws.send(encode({\n\t\t\t\tkind: \"sync_step1\",\n\t\t\t\tstateVector: Y.encodeStateVector(this.doc)\n\t\t\t}));\n\t\t});\n\t\tws.addEventListener(\"message\", (event) => {\n\t\t\tconst data = event.data instanceof ArrayBuffer ? new Uint8Array(event.data) : null;\n\t\t\tif (!data) return;\n\t\t\tconst msg = decode(data);\n\t\t\tif (!msg) return;\n\t\t\tif (msg.kind === \"sync_step1\") {\n\t\t\t\tconst diff = Y.encodeStateAsUpdate(this.doc, msg.stateVector);\n\t\t\t\tws.send(encode({\n\t\t\t\t\tkind: \"sync_step2\",\n\t\t\t\t\tupdate: diff\n\t\t\t\t}));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (msg.kind === \"sync_step2\" || msg.kind === \"update\") {\n\t\t\t\tY.applyUpdate(this.doc, msg.update, \"remote\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (msg.kind === \"history_snapshot\") {\n\t\t\t\tthis.historyView = msg.view;\n\t\t\t\tthis.fanHistoryChange();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (msg.kind === \"history_append\") {\n\t\t\t\tif (msg.cursor < this.historyView.entries.length) this.historyView = {\n\t\t\t\t\tentries: this.historyView.entries.slice(0, msg.cursor),\n\t\t\t\t\tcursor: msg.cursor\n\t\t\t\t};\n\t\t\t\tthis.historyView = {\n\t\t\t\t\tentries: [...this.historyView.entries, msg.entry],\n\t\t\t\t\tcursor: msg.cursor\n\t\t\t\t};\n\t\t\t\tthis.fanHistoryChange();\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\tws.addEventListener(\"close\", () => {\n\t\t\tthis.ws = null;\n\t\t\tthis.connected = false;\n\t\t\tif (this.closed) return;\n\t\t\tthis.scheduleReconnect();\n\t\t});\n\t\tws.addEventListener(\"error\", () => {});\n\t}\n\tscheduleReconnect() {\n\t\tif (this.reconnectTimer) return;\n\t\tconst delay = this.backoffMs;\n\t\tthis.backoffMs = Math.min(this.backoffMs * 2, BACKOFF_MAX_MS);\n\t\tthis.reconnectTimer = setTimeout(() => {\n\t\t\tthis.reconnectTimer = null;\n\t\t\tthis.connect();\n\t\t}, delay);\n\t}\n\tsend(frame) {\n\t\tif (this.connected && this.ws && this.ws.readyState === WebSocket.OPEN) {\n\t\t\tthis.ws.send(frame);\n\t\t\treturn;\n\t\t}\n\t\tthis.buffered.push(frame);\n\t}\n\t/** Read the current snapshot from the Y.Map. */\n\tget snapshot() {\n\t\treturn this.map.get(\"data\") ?? null;\n\t}\n\t/** Set the whole snapshot. Yjs encodes the diff under the hood. */\n\tsetSnapshot(next) {\n\t\tthis.doc.transact(() => {\n\t\t\tthis.map.set(ROOM_DOC_FIELD, next);\n\t\t});\n\t}\n\t/** Subscribe to snapshot changes (both remote and local). */\n\tobserve(listener) {\n\t\tthis.listeners.add(listener);\n\t\treturn () => {\n\t\t\tthis.listeners.delete(listener);\n\t\t};\n\t}\n\t/** Current shared history view (entries + cursor). */\n\tget history() {\n\t\treturn this.historyView;\n\t}\n\t/** Look up an entry by id. Convenience for the panel. */\n\thistoryEntry(entryId) {\n\t\treturn this.historyView.entries.find((e) => e.id === entryId) ?? null;\n\t}\n\t/** Subscribe to shared history changes. */\n\tobserveHistory(listener) {\n\t\tthis.historyListeners.add(listener);\n\t\treturn () => {\n\t\t\tthis.historyListeners.delete(listener);\n\t\t};\n\t}\n\t/**\n\t* Step the shared cursor to the entry one before the current one. No-op if\n\t* the cursor is already at the oldest entry. This is what Ctrl+Z / the\n\t* toolbar undo button call into. Never a local Y.UndoManager replay.\n\t*/\n\tundo() {\n\t\tconst target = this.historyView.entries[this.historyView.cursor - 1];\n\t\tif (target) this.jumpTo(target.id);\n\t}\n\t/** Step the shared cursor forward by one entry. */\n\tredo() {\n\t\tconst target = this.historyView.entries[this.historyView.cursor + 1];\n\t\tif (target) this.jumpTo(target.id);\n\t}\n\t/** True when there's a previous entry to step back to. */\n\tget canUndo() {\n\t\treturn this.historyView.cursor > 0;\n\t}\n\t/** True when there's a forward entry to step to. */\n\tget canRedo() {\n\t\treturn this.historyView.cursor < this.historyView.entries.length - 1;\n\t}\n\t/**\n\t* Request the server to time-travel to the entry with id. The server applies\n\t* the snapshot to the Y.Doc and broadcasts a fresh history_snapshot, which\n\t* keeps cursors aligned across peers.\n\t*/\n\tjumpTo(entryId) {\n\t\tthis.send(encode({\n\t\t\tkind: \"history_jump\",\n\t\t\tentryId\n\t\t}));\n\t}\n\t/**\n\t* Wipe the shared history log for this room. The server replies with a\n\t* fresh history_snapshot containing a single \"Cleared history\" anchor\n\t* entry that points at the current snapshot, so time-travel still works\n\t* — there's just nothing prior to jump back to.\n\t*/\n\tclearHistory() {\n\t\tthis.send(encode({ kind: \"history_clear\" }));\n\t}\n\tfanHistoryChange() {\n\t\tfor (const l of this.historyListeners) l(this.historyView);\n\t}\n\tdestroy() {\n\t\tthis.closed = true;\n\t\tthis.listeners.clear();\n\t\tthis.historyListeners.clear();\n\t\tif (this.reconnectTimer) {\n\t\t\tclearTimeout(this.reconnectTimer);\n\t\t\tthis.reconnectTimer = null;\n\t\t}\n\t\tif (this.ws) {\n\t\t\ttry {\n\t\t\t\tthis.ws.close();\n\t\t\t} catch {}\n\t\t\tthis.ws = null;\n\t\t}\n\t\tthis.doc.destroy();\n\t}\n};\n//#endregion\n//#region src/lib/client/sync/index.ts\nvar registry = /* @__PURE__ */ new Map();\nvar ensureBrowser = () => {\n\tthrow new Error(\"Sync client is only available in the browser\");\n};\nvar getRoomClient = (kind, id) => {\n\tensureBrowser();\n\tconst room = makeRoomId(kind, id);\n\tconst existing = registry.get(room);\n\tif (existing) return existing;\n\tconst client = new YDocClient(room);\n\tregistry.set(room, client);\n\tclient.connect();\n\treturn client;\n};\n//#endregion\n//#region src/lib/client/reconcile.ts\n/**\n* In-place reconciliation of a `target` object/array to match `next`, with\n* **id-keyed array reordering**. Use this when you need Svelte's `{#each ... (id)}`\n* blocks to preserve DOM identity across a structural change. Naively applying\n* a JSON patch field-by-field briefly produces duplicate ids (Svelte throws\n* `each_key_duplicate` mid-flush) and rewrites every leaf bound to a moved row.\n*\n* Rules:\n* - Arrays whose every item has an `id` string are reconciled by id:\n* splice items into their new positions, then recurse into each pair.\n* - Other arrays are reconciled by index (length-first, then per-element).\n* - Plain objects recurse key-by-key; keys missing from `next` are deleted.\n* - Primitives or type mismatches are replaced via the parent's setter.\n*\n* Returns the mutated target for convenience.\n*/\nvar isPlainObject = (v) => !!v && typeof v === \"object\" && !Array.isArray(v);\nvar isIdItem = (v) => !!v && typeof v === \"object\" && typeof v.id === \"string\";\nvar reconcileObject = (target, next) => {\n\tfor (const key of Object.keys(target)) if (!(key in next)) delete target[key];\n\tfor (const key of Object.keys(next)) {\n\t\tconst nv = next[key];\n\t\tif (!(key in target)) {\n\t\t\ttarget[key] = nv;\n\t\t\tcontinue;\n\t\t}\n\t\tconst tv = target[key];\n\t\tif (Array.isArray(tv) && Array.isArray(nv)) reconcileArray(tv, nv);\n\t\telse if (isPlainObject(tv) && isPlainObject(nv)) reconcileObject(tv, nv);\n\t\telse if (tv !== nv) target[key] = nv;\n\t}\n};\nvar reconcileArray = (target, next) => {\n\tconst targetKeyed = target.every(isIdItem);\n\tconst nextKeyed = next.every(isIdItem);\n\tif (targetKeyed && nextKeyed) {\n\t\tconst targetItems = target;\n\t\tconst nextItems = next;\n\t\tconst byId = /* @__PURE__ */ new Map();\n\t\tfor (const it of targetItems) byId.set(it.id, it);\n\t\tfor (let i = 0; i < nextItems.length; i += 1) {\n\t\t\tconst desired = nextItems[i];\n\t\t\tconst existing = byId.get(desired.id);\n\t\t\tconst here = targetItems[i];\n\t\t\tif (existing && here && here.id === desired.id) {\n\t\t\t\treconcileObject(existing, desired);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (existing) {\n\t\t\t\tconst fromIdx = targetItems.indexOf(existing);\n\t\t\t\tif (fromIdx !== i) {\n\t\t\t\t\ttargetItems.splice(fromIdx, 1);\n\t\t\t\t\ttargetItems.splice(i, 0, existing);\n\t\t\t\t}\n\t\t\t\treconcileObject(existing, desired);\n\t\t\t} else {\n\t\t\t\ttargetItems.splice(i, 0, desired);\n\t\t\t\tbyId.set(desired.id, desired);\n\t\t\t}\n\t\t}\n\t\tif (targetItems.length > nextItems.length) targetItems.splice(nextItems.length, targetItems.length - nextItems.length);\n\t\treturn;\n\t}\n\tif (target.length > next.length) target.splice(next.length, target.length - next.length);\n\tfor (let i = 0; i < next.length; i += 1) {\n\t\tconst nv = next[i];\n\t\tif (i >= target.length) {\n\t\t\ttarget.push(nv);\n\t\t\tcontinue;\n\t\t}\n\t\tconst tv = target[i];\n\t\tif (Array.isArray(tv) && Array.isArray(nv)) reconcileArray(tv, nv);\n\t\telse if (isPlainObject(tv) && isPlainObject(nv)) reconcileObject(tv, nv);\n\t\telse if (tv !== nv) target[i] = nv;\n\t}\n};\nvar reconcileInPlace = (target, next) => {\n\tif (Array.isArray(target) && Array.isArray(next)) reconcileArray(target, next);\n\telse if (isPlainObject(target) && isPlainObject(next)) reconcileObject(target, next);\n\treturn target;\n};\n/**\n* Deep-clone an object built from a mix of Svelte $state proxies and plain\n* objects to a fully plain POJO tree. Cheap, safe, and breaks proxy identity\n* sharing. Critical before handing the value to in-place mutation or to a\n* Yjs setter (which serializes the value and would otherwise see the live,\n* shared proxy state).\n*/\nvar deepClonePlain = (value) => JSON.parse(JSON.stringify(value));\n//#endregion\nexport { identityStore as i, reconcileInPlace as n, getRoomClient as r, deepClonePlain as t };\n"],"names":[],"mappings":";;;;AAIA;AACA,IAAI,WAAW,GAAG,qBAAqB;AACvC,IAAI,iBAAiB,GAAG,sBAAsB;AAC9C,IAAI,UAAU,GAAG,EAAE;AACnB,IAAI,SAAS,GAAG,WAAW;AAC3B,IAAI,QAAQ,GAAG,CAAC,GAAG,KAAK,GAAG,C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