thursday-agent 0.6.0 → 0.7.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 (193) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +1 -1
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +2 -2
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  16. package/.next/server/app/api/artifact/route.js +3 -3
  17. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  23. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  24. package/.next/server/app/api/memory/edit/route.js +1 -1
  25. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  26. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  28. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  29. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  30. package/.next/server/app/api/thursday/tool-call/route.js +1 -1
  31. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  32. package/.next/server/app/api/workspace/missing/route.js +2 -2
  33. package/.next/server/app/api/workspace/missing/route.js.nft.json +1 -1
  34. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  35. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  36. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  37. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/page/server-reference-manifest.json +42 -42
  39. package/.next/server/app/page.js +5 -4
  40. package/.next/server/app/page.js.nft.json +1 -1
  41. package/.next/server/app/page_client-reference-manifest.js +1 -1
  42. package/.next/server/chunks/[root-of-the-server]__0-06t3f._.js +8 -0
  43. package/.next/server/chunks/{[root-of-the-server]__049f521._.js → [root-of-the-server]__06l05n_._.js} +1 -1
  44. package/.next/server/chunks/[root-of-the-server]__0_ue8oe._.js +1 -1
  45. package/.next/server/chunks/{[root-of-the-server]__0ye3da2._.js → [root-of-the-server]__0btqrct._.js} +1 -1
  46. package/.next/server/chunks/[root-of-the-server]__0c9fgca._.js +1 -1
  47. package/.next/server/chunks/[root-of-the-server]__0zp35ul._.js +1 -1
  48. package/.next/server/chunks/[root-of-the-server]__1kv8p3e._.js +1 -1
  49. package/.next/server/chunks/_02szwk8._.js +1 -1
  50. package/.next/server/chunks/_06c9kie._.js +24 -24
  51. package/.next/server/chunks/_0i55en5._.js +6 -6
  52. package/.next/server/chunks/_0p56fn0._.js +1 -1
  53. package/.next/server/chunks/_11ujpya._.js +1 -1
  54. package/.next/server/chunks/_1dbixxz._.js +1 -1
  55. package/.next/server/chunks/_1dc_d1q._.js +16 -16
  56. package/.next/server/chunks/_1gnjfli._.js +3 -0
  57. package/.next/server/chunks/_1klbcft._.js +1 -1
  58. package/.next/server/chunks/features_0-cnt0l._.js +1 -1
  59. package/.next/server/chunks/features_0hdaci0._.js +1 -1
  60. package/.next/server/chunks/ssr/[root-of-the-server]__0-e011f._.js +3 -0
  61. package/.next/server/chunks/ssr/[root-of-the-server]__0pd8yr7._.js +3 -0
  62. package/.next/server/chunks/ssr/[root-of-the-server]__1nygfik._.js +1 -1
  63. package/.next/server/chunks/ssr/[root-of-the-server]__1sdphb0._.js +1 -1
  64. package/.next/server/chunks/ssr/{[root-of-the-server]__1fll8dc._.js → [root-of-the-server]__1vdmfbe._.js} +2 -2
  65. package/.next/server/chunks/ssr/[root-of-the-server]__1waa3rc._.js +34 -49
  66. package/.next/server/chunks/ssr/{_1anqots._.js → _0-2qsxo._.js} +2 -2
  67. package/.next/server/chunks/ssr/_02oc_h5._.js +9 -9
  68. package/.next/server/chunks/ssr/_05yghx6._.js +1 -1
  69. package/.next/server/chunks/ssr/_07nbwap._.js +3 -0
  70. package/.next/server/chunks/ssr/_08c4z-9._.js +1 -1
  71. package/.next/server/chunks/ssr/_0_qfdlw._.js +1 -1
  72. package/.next/server/chunks/ssr/_0b6_jv-._.js +3 -0
  73. package/.next/server/chunks/ssr/_0hxt2ul._.js +1 -1
  74. package/.next/server/chunks/ssr/_0i_6q1w._.js +1 -1
  75. package/.next/server/chunks/ssr/{_18xqmny._.js → _0no7i1o._.js} +2 -2
  76. package/.next/server/chunks/ssr/_0tzg--b._.js +3 -0
  77. package/.next/server/chunks/ssr/{_1ztk7p6._.js → _114ylv7._.js} +3 -3
  78. package/.next/server/chunks/ssr/{_1k0spz7._.js → _12c-iwh._.js} +2 -2
  79. package/.next/server/chunks/ssr/_12w42gi._.js +1 -1
  80. package/.next/server/chunks/ssr/{_0eaog6_._.js → _167hchk._.js} +2 -2
  81. package/.next/server/chunks/ssr/{_1x9pskj._.js → _1_x5spz._.js} +3 -3
  82. package/.next/server/chunks/ssr/{_0dr-ddg._.js → _1a61fc9._.js} +2 -2
  83. package/.next/server/chunks/ssr/_1jmz33w._.js +1 -1
  84. package/.next/server/chunks/ssr/{_1y6b5mr._.js → _1w_t7h7._.js} +2 -2
  85. package/.next/server/chunks/ssr/{_0dh2e1j._.js → _1wyfaq_._.js} +7 -7
  86. package/.next/server/chunks/ssr/{[root-of-the-server]__0bxsfyn._.js → _200gt-m._.js} +4 -3
  87. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  88. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  89. package/.next/server/chunks/ssr/{_0c9e5w6._.js → features_workspace_00jz2hu._.js} +3 -4
  90. package/.next/server/chunks/ssr/{node_modules_0746rzi._.js → node_modules_02ai7br._.js} +1 -1
  91. package/.next/server/chunks/ssr/{node_modules_0vsxbzp._.js → node_modules_02deexj._.js} +1 -1
  92. package/.next/server/chunks/ssr/{node_modules_1g1eihe._.js → node_modules_07za262._.js} +1 -1
  93. package/.next/server/chunks/ssr/{node_modules_0332gw4._.js → node_modules_0_s9get._.js} +1 -1
  94. package/.next/server/chunks/ssr/{node_modules_1gpednh._.js → node_modules_0n3c7h0._.js} +1 -1
  95. package/.next/server/chunks/ssr/{node_modules_0t-9nup._.js → node_modules_0od6jwr._.js} +1 -1
  96. package/.next/server/chunks/ssr/{node_modules_0mxvg8h._.js → node_modules_0rdt7pk._.js} +1 -1
  97. package/.next/server/chunks/ssr/{node_modules_0vv0-fg._.js → node_modules_0w1z7kz._.js} +1 -1
  98. package/.next/server/chunks/ssr/{node_modules_1d53yiq._.js → node_modules_0wdupfz._.js} +1 -1
  99. package/.next/server/chunks/ssr/{node_modules_1u6w1pb._.js → node_modules_1720w0a._.js} +1 -1
  100. package/.next/server/chunks/ssr/{node_modules_1gu1pph._.js → node_modules_18lsg7d._.js} +1 -1
  101. package/.next/server/chunks/ssr/{node_modules_1he1w8_._.js → node_modules_1b94fxf._.js} +1 -1
  102. package/.next/server/chunks/ssr/{node_modules_0qbfyjh._.js → node_modules_1ecdo1s._.js} +1 -1
  103. package/.next/server/chunks/ssr/{node_modules_0qapgjr._.js → node_modules_1fa9ag7._.js} +1 -1
  104. package/.next/server/chunks/ssr/{node_modules_0d5uzof._.js → node_modules_1fv-_si._.js} +1 -1
  105. package/.next/server/chunks/ssr/{node_modules_1lnjapm._.js → node_modules_1hf461g._.js} +1 -1
  106. package/.next/server/chunks/ssr/{node_modules_1-urho9._.js → node_modules_1m71ta-._.js} +1 -1
  107. package/.next/server/chunks/ssr/{node_modules_1lynj9m._.js → node_modules_1n93n-g._.js} +1 -1
  108. package/.next/server/chunks/ssr/{node_modules_0fr-ml8._.js → node_modules_1n9lqu9._.js} +1 -1
  109. package/.next/server/chunks/ssr/{node_modules_04vxchl._.js → node_modules_1npnsvd._.js} +1 -1
  110. package/.next/server/chunks/ssr/{node_modules_0exkwcm._.js → node_modules_1rn2r0n._.js} +1 -1
  111. package/.next/server/chunks/ssr/{node_modules_022sipm._.js → node_modules_1vq-mfk._.js} +1 -1
  112. package/.next/server/chunks/ssr/{node_modules_00_51_v._.js → node_modules_1vzyw1t._.js} +1 -1
  113. package/.next/server/chunks/ssr/{node_modules_0wsvp00._.js → node_modules_1w359w4._.js} +1 -1
  114. package/.next/server/chunks/ssr/{node_modules_1xn6saw._.js → node_modules_1yajbl6._.js} +1 -1
  115. package/.next/server/chunks/ssr/{node_modules_16pi_dd._.js → node_modules_20eqhy8._.js} +1 -1
  116. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_067_exa._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_019sbis._.js} +1 -1
  117. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0nrrdaq._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0s6piq3._.js} +1 -1
  118. package/.next/server/chunks/ssr/{node_modules_@vercel_oidc_dist_21a5haa._.js → node_modules_@vercel_oidc_dist_05itbb1._.js} +1 -1
  119. package/.next/server/middleware-build-manifest.js +3 -3
  120. package/.next/server/pages/404.html +1 -1
  121. package/.next/server/pages/500.html +1 -1
  122. package/.next/server/server-reference-manifest.js +1 -1
  123. package/.next/server/server-reference-manifest.json +43 -43
  124. package/.next/static/chunks/{0dr16v67vj4n7.js → 07vqbk_9t4em4.js} +2 -2
  125. package/.next/static/chunks/{2nvepds1fu2ux.js → 08krja1zx7nqg.js} +1 -1
  126. package/.next/static/chunks/{42wcg3wfg_m_p.js → 0qcuwdk132jjt.js} +1 -1
  127. package/.next/static/chunks/{2_pnccjp6j1ca.js → 0z69gvysmave7.js} +1 -1
  128. package/.next/static/chunks/12fvz1w5ows75.js +1 -0
  129. package/.next/static/chunks/14t03ned286iu.js +1 -0
  130. package/.next/static/chunks/{2jlz8zp4jax_m.js → 156xxbkrz5lzu.js} +1 -1
  131. package/.next/static/chunks/1fz14reod4lft.js +1 -0
  132. package/.next/static/chunks/{0joan-69kbspd.js → 1g23dbabl-vkr.js} +1 -1
  133. package/.next/static/chunks/{18mkhstgiqcbt.js → 1qy_rc3oxfxok.js} +1 -1
  134. package/.next/static/chunks/1zea7qdl-7365.js +1 -0
  135. package/.next/static/chunks/1zvqumkg7kmo0.css +1 -0
  136. package/.next/static/chunks/26hpqt3y6bogl.js +12 -0
  137. package/.next/static/chunks/{3zk6q3-3f9swq.js → 2_j5mqm6d-z18.js} +1 -1
  138. package/.next/static/chunks/{1vj_5bnbxx84e.js → 2dt6tu7a22svs.js} +1 -1
  139. package/.next/static/chunks/2h5ls3d86kya6.js +1 -0
  140. package/.next/static/chunks/2wc6y1ht6dfuy.js +1 -0
  141. package/.next/static/chunks/{1i-u2wzub_to1.js → 2xr0zpll7thyi.js} +6 -6
  142. package/.next/static/chunks/{26ql4y-43xwhp.js → 31jztc-yq30m7.js} +1 -1
  143. package/.next/static/chunks/391af0i8eljzk.js +1 -0
  144. package/.next/static/chunks/{1kp5nfp06nj9h.js → 3p2s2cjokx1aa.js} +2 -2
  145. package/.next/static/chunks/{1wlo979mx-y3w.js → 41s3fml5oivsa.js} +1 -1
  146. package/README.md +60 -19
  147. package/docs/how-it-works.md +2 -0
  148. package/docs/live-calls.md +38 -33
  149. package/features/ai/load-tools.ts +4 -2
  150. package/features/ai/prompts/bot.prompt.ts +5 -5
  151. package/features/ai/prompts/live.prompt.ts +36 -132
  152. package/features/ai/prompts/prompt-helper.ts +5 -4
  153. package/features/ai/prompts/thursday.prompt.ts +75 -54
  154. package/features/ai/tools/call.tool.ts +32 -4
  155. package/features/ai/tools/tool-name.ts +1 -0
  156. package/features/bot/bot.runner.ts +5 -5
  157. package/features/thursday/ascii.const.ts +74 -0
  158. package/features/thursday/components/ascii-orb.tsx +173 -30
  159. package/features/thursday/components/face.tsx +6 -1
  160. package/features/thursday/components/side-captions.tsx +273 -0
  161. package/features/thursday/components/tab-state.tsx +11 -3
  162. package/features/thursday/components/thursday-setting.tsx +6 -5
  163. package/features/thursday/components/thursday.tsx +227 -251
  164. package/features/thursday/face.store.ts +5 -0
  165. package/features/thursday/thursday.action.ts +4 -6
  166. package/features/thursday/thursday.schema.ts +10 -5
  167. package/features/thursday/thursday.store.ts +3 -0
  168. package/features/thursday/use-thursday.ts +461 -392
  169. package/features/workspace/file-kind.ts +9 -0
  170. package/hooks/use-hotkey.ts +3 -2
  171. package/lib/live/live.schema.ts +0 -21
  172. package/lib/live/live.server.ts +1 -3
  173. package/package.json +1 -1
  174. package/scripts/artifact-paths.test.mts +13 -0
  175. package/scripts/live-session.test.mts +56 -66
  176. package/.next/server/chunks/[root-of-the-server]__0g-ueei._.js +0 -8
  177. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1kipdeo._.js +0 -3
  178. package/.next/server/chunks/ssr/[root-of-the-server]__172cq4x._.js +0 -3
  179. package/.next/server/chunks/ssr/_03_928f._.js +0 -3
  180. package/.next/server/chunks/ssr/_0g_rlog._.js +0 -3
  181. package/.next/server/chunks/ssr/_123ttsf._.js +0 -3
  182. package/.next/static/chunks/10k2xvap03z20.css +0 -1
  183. package/.next/static/chunks/1t9qms5pwwa3n.js +0 -1
  184. package/.next/static/chunks/2a51-ywz9b2a3.js +0 -1
  185. package/.next/static/chunks/2fvdgxih7x7hr.js +0 -1
  186. package/.next/static/chunks/3addj3i4-izma.js +0 -1
  187. package/.next/static/chunks/3gfh7nxwusbt0.js +0 -1
  188. package/.next/static/chunks/3gwa44cvz4qoi.js +0 -1
  189. package/.next/static/chunks/3zkg5iup3v4a2.js +0 -12
  190. package/.next/static/chunks/405m0bqtoihev.js +0 -1
  191. /package/.next/static/{0qzGoKn2wTERVZtblX1tp → yyRVBc0xxYQsh3GpbQX9b}/_buildManifest.js +0 -0
  192. /package/.next/static/{0qzGoKn2wTERVZtblX1tp → yyRVBc0xxYQsh3GpbQX9b}/_clientMiddlewareManifest.js +0 -0
  193. /package/.next/static/{0qzGoKn2wTERVZtblX1tp → yyRVBc0xxYQsh3GpbQX9b}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[70729,a=>{a.v(a=>Promise.resolve().then(()=>a(666680)))},133300,a=>{a.v(a=>Promise.resolve().then(()=>a(203469)))},276307,a=>{a.v(a=>Promise.resolve().then(()=>a(221214)))},763543,a=>{a.v(a=>Promise.resolve().then(()=>a(674986)))},636616,a=>{"use strict";var b=a.i(569572),c=a.i(762008),d=a.i(446957);let e=[{name:"Jarvis",description:"Anything nobody else is for — orders, bookings, forms, the web, this computer",hint:"Takes whatever nobody else is for",recommended:!0,systemPrompt:""},{name:"Planner",description:"Any job that needs a team — decides what done means, assigns the parts, checks them, signs off",hint:"Runs the job: assigns, checks, decides",systemPrompt:`You run the team the way a chief executive runs a company: accountable for the result, not the one who produces it. A job comes in as a request and goes out as one finished result. Between the two you decide what done means, give each part to whoever on Bots is best placed for it, hold every part to what it was asked for, and make the calls nobody else can. A part is yours only when nobody on Bots fits it.
1
+ module.exports=[636616,a=>{"use strict";var b=a.i(569572),c=a.i(762008),d=a.i(446957);let e=[{name:"Jarvis",description:"Anything nobody else is for — orders, bookings, forms, the web, this computer",hint:"Takes whatever nobody else is for",recommended:!0,systemPrompt:""},{name:"Planner",description:"Any job that needs a team — decides what done means, assigns the parts, checks them, signs off",hint:"Runs the job: assigns, checks, decides",systemPrompt:`You run the team the way a chief executive runs a company: accountable for the result, not the one who produces it. A job comes in as a request and goes out as one finished result. Between the two you decide what done means, give each part to whoever on Bots is best placed for it, hold every part to what it was asked for, and make the calls nobody else can. A part is yours only when nobody on Bots fits it.
2
2
 
3
3
  **Decide what done means, first.** Before anything is handed out, send Thursday one \`${c.TOOL_NAMES.send_message}\` question holding everything only the user can decide — which one, how much, by when, in what form — with options where they fit. What you can find out, or the request already says, is not asked. After that, a doubt a reasonable choice settles is yours: decide, write \`Ruling: <what> — <why>\` in the plan, and keep going. Only what cannot be undone goes back to Thursday.
4
4
 
@@ -96,6 +96,7 @@ The composer is the one part not to memorise. Its refs change on every snapshot,
96
96
 
97
97
  Ask before it goes up: a \`${c.TOOL_NAMES.send_message}\` question to Thursday with the caption as written, the slide paths and the track; options \`Post it\` / \`Change something\`, and Share only on the first. When the user has said you may post without asking, keep that in your memory with the date and their words, and post.
98
98
 
99
- Once it is up, open the post and check its image is the size you built; a cut one is deleted and posted again. Answer with the post's url and the file paths.`}];e.filter(a=>a.recommended),a.s(["findBotSeed",0,a=>e.find(b=>b.name===a)??null,"rollSeedIcons",0,()=>(0,d.randomBotIcons)(e.length)])},951922,a=>{a.v(a=>Promise.resolve().then(()=>a(839430)))},343064,a=>{a.v(a=>Promise.resolve().then(()=>a(344853)))},682672,a=>{a.v(a=>Promise.resolve().then(()=>a(72918)))},966249,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@vercel_oidc_dist_token_16gdpgb.js"].map(b=>a.l(b))).then(()=>b(860544)))},832030,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_readline_1u65a-m._.js","server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_1j4x-_j._.js"].map(b=>a.l(b))).then(()=>b(322479)))}];
99
+ Once it is up, open the post and check its image is the size you built; a cut one is deleted and posted again. Answer with the post's url and the file paths.`}];e.filter(a=>a.recommended),a.s(["findBotSeed",0,a=>e.find(b=>b.name===a)??null,"rollSeedIcons",0,()=>(0,d.randomBotIcons)(e.length)])},451208,a=>{"use strict";var b=a.i(137936),c=a.i(821415),d=a.i(912714),e=a.i(750227),f=a.i(569572),g=a.i(293480);async function h(a){let b=await (0,c.insideWorkspace)(a);b||(0,g.publicError)("Outside the workspace");let e=await (0,d.stat)(b).catch(()=>null);e||(0,g.publicError)("File not found"),e.isFile()||(0,g.publicError)("That is a folder, not a file"),await (0,d.rm)(b)}async function i(){let a=(0,e.join)(c.WORKSPACE,f.PATHS.scratch);for(let b of(await (0,d.readdir)(a).catch(()=>[])))await (0,d.rm)((0,e.join)(a,b),{recursive:!0,force:!0})}a.i(684321);var j=a.i(225689),k=a.i(874533),l=a.i(812057);let m={darwin:a=>["open",[a]],win32:a=>["cmd.exe",["/c","start","",a]],linux:a=>["xdg-open",[a]]};async function n(a){await (0,d.access)(a);let b=m[process.platform]?.(a);if(!b)throw Error(`Opening files is not wired up on ${process.platform}.`);let[c,e]=b;await (0,l.promisify)(k.execFile)(c,e,{windowsHide:!0})}var o=a.i(182248),p=a.i(713095);let q=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?");let d=(await (0,c.openWorkspace)()).resolve(b);try{await n(d)}catch(a){(0,g.publicError)(`Could not open ${b}: ${(0,o.errorToString)(a)}`)}}),r=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?"),await h(b)}),s=(0,j.serverAction)(async()=>i());(0,p.ensureServerEntryExports)([q,r,s]),(0,b.registerServerReference)(q,"7f82c7e8d420b33957d9cd9585a395848aea8e24e9",null),(0,b.registerServerReference)(r,"7f5cb090bc50765e05bcbe51a3e9787de458d2c2d7",null),(0,b.registerServerReference)(s,"7fdb0e583cb0c8a4cbf774bb658d5815c8148fe93b",null),a.s(["deleteWorkspaceFileAction",0,r,"emptyScratchAction",0,s,"openFileAction",0,q],451208)},225689,a=>{"use strict";a.i(570396);var b=a.i(673727),c=a.i(975160),d=a.i(176668),e=a.i(293480);let f=a=>!!a&&"object"==typeof a&&(!0===a.$ok||!1===a.$ok),g=a=>f(a)&&a.$ok,h=a=>({$ok:!0,data:a}),i=a=>({$ok:!1,message:a});async function j(a){try{let b=h(await a());for(;g(b)&&f(b.data);)b=b.data;return b}catch(a){if((0,b.unstable_rethrow)(a),(0,e.isPublicError)(a))return i(a.message);if(a instanceof c.ZodError)return i(a.issues[0]?.message);if(f(a)&&!a.$ok)return a;return d.logger.error(a),i()}}a.s(["serverAction",0,a=>(...b)=>j(()=>a(...b))],225689)},713095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
100
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},137936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(211857)}];
100
101
 
101
- //# sourceMappingURL=%5Broot-of-the-server%5D__0bxsfyn._.js.map
102
+ //# sourceMappingURL=_200gt-m._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[405593,a=>{"use strict";var b=a.i(187924),c=a.i(987234),d=a.i(164831);let e={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};e.node;let f=(0,d.default)(e),g={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};g.node;let h=(0,d.default)(g);var i=a.i(752562),j=a.i(141146);let k={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};k.node;let l=(0,d.default)(k);var m=a.i(71215),n=a.i(126766),o=a.i(233540),p=a.i(26268),q=a.i(572131),r=a.i(767561),s=a.i(340695),t=a.i(205522),u=a.i(446181),v=a.i(950463),w=a.i(852307),x=a.i(608902),y=a.i(379630),z=a.i(61876),A=a.i(913834),B=a.i(405050);let C=(0,B.createServerReference)("7f008a27595d5d6e96e1685cb7afd843882426f54b",B.callServer,void 0,B.findSourceMapURL,"removeConfigAction");var D=a.i(760374),E=a.i(478978),F=a.i(619477),G=a.i(313237),H=a.i(759497),I=a.i(497895);let J={[E.EXA_API_KEY]:o.Search},K={image:m.Image,video:l,speech:f,transcription:h};function L({section:a}){let{data:c,isLoading:d,error:e}=(0,H.useServerRoute)(r.queryKey.config);if(d)return(0,b.jsx)(F.SettingSkeleton,{rows:4});if(e)return(0,b.jsx)(F.SettingError,{message:e.message});let f=a=>(0,E.isConfigSet)(c,a),g=a=>c?.find(b=>b.key===a)?.value,h=E.CONFIG_GROUPS.filter(b=>b.section===a),i=h.flatMap(a=>a.entries);return(0,b.jsx)(F.SettingScreen,{footer:(0,b.jsx)(F.SettingRailNote,{children:"keys"===a?(0,b.jsxs)(b.Fragment,{children:[i.filter(a=>f(a.key)).length," of"," ",i.length," set",h.some(a=>!(0,E.groupSatisfied)(a,f))?" · a call needs one voice key":" · your keys stay on this machine"]}):(0,b.jsxs)(b.Fragment,{children:[i.length," of ",i.length," resolved ·"," ",i.filter(a=>g(a.key)).length," pinned"]})}),children:h.map(a=>(0,b.jsx)(F.SettingGroup,{label:a.title,hint:a.hint,right:(0,b.jsx)(M,{group:a,isSet:f}),children:(0,b.jsx)(F.SettingItems,{children:a.entries.map(c=>c.choices?(0,b.jsx)(W,{entry:c,choices:c.choices,value:g(c.key),isSet:f},c.key):(0,b.jsx)(N,{entry:c,set:f(c.key),needed:!(0,E.groupSatisfied)(a,f)},c.key))})},a.id))})}function M({group:a,isSet:c}){return"none"===a.require?null:(0,E.groupSatisfied)(a,c)?(0,b.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,b.jsx)(i.Check,{className:"size-3"}),"ready"]}):(0,b.jsxs)("span",{className:(0,I.cn)("flex items-center gap-1 font-mono text-[11px]",I.WAITING_INK),children:[(0,b.jsx)(p.TriangleAlert,{className:"size-3"}),a.note??"Required"]})}function N({entry:a,set:c,needed:d}){let e=Q(a,c),f=S(a,c),g=R(a,c),h=f.data?T(f.data):P(c,d,e.data,a.signIn);return(0,b.jsxs)("button",{type:"button",onClick:()=>{var d,e,f;return a.signIn?(d=a,u.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)(Z,{entry:d,onDone:a})})):(e=a,f=c,u.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)($,{entry:e,set:f,onDone:a})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,b.jsx)(V,{entry:a})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsx)("span",{className:"block truncate text-sm font-medium",children:a.label}),(0,b.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:a.signIn?c?U(f.data,g):"sign in with your account":a.key})]}),e.isLoading||f.isLoading?(0,b.jsx)(v.Skeleton,{className:"h-3 w-20 shrink-0"}):(0,b.jsxs)("span",{className:(0,I.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",h.ink),children:[h.warn?(0,b.jsx)(p.TriangleAlert,{className:"size-3"}):c&&(0,b.jsx)(i.Check,{className:"size-3"}),h.text]}),(0,b.jsx)(j.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let O=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function P(a,b,c,d){return a?c?"refused"in c?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${O.format(c.balance)} left`,ink:c.low?I.WAITING_INK:"text-muted-foreground",warn:c.low}:{text:d?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:b?{text:"Needed",ink:I.WAITING_INK,warn:!0}:{text:d?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function Q(a,b){return(0,H.useServerRoute)(b&&"vercel-ai-gateway"===a.provider?r.queryKey.gatewayCredits:null)}function R(a,b){let{data:c}=(0,H.useServerRoute)(b&&a.signIn?r.queryKey.llmModel:null);return c?.find(b=>b.id===a.provider)?.plan??null}function S(a,b){return(0,H.useServerRoute)(b&&a.signIn?r.queryKey.subscriptionUsage:null)}function T(a){return"refused"in a?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:a.spent?"Limit reached":`${a.usedPercent}% used`,ink:a.high?I.WAITING_INK:"text-muted-foreground",warn:a.high}}function U(a,b){let d=!a||"refused"in a?null:a,e=`${d?.plan??b??"unknown"} plan`;return d?.resetsAt?`${e} \xb7 resets in ${(0,c.formatDistanceToNowStrict)(new Date(d.resetsAt))}`:e}function V({entry:a}){if(a.provider)return(0,b.jsx)(y.ProviderIcon,{provider:a.provider,className:"size-4"});let c=J[a.key]??n.KeyRound;return(0,b.jsx)(c,{className:"size-4 text-muted-foreground"})}function W({entry:a,choices:c,value:d,isSet:e}){let f=c.find(a=>a.value===d),g=c.filter(a=>e(a.needs)),h=d&&!f?d:null,i=a.kind?K[a.kind]:A.BotsMark;return(0,b.jsxs)("button",{type:"button",onClick:()=>{var d,e,f;return a.kind||a.text?(d=a,u.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,b.jsx)(X,{entry:d,onDone:a})})):(e=a,f=c,u.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)(Y,{entry:e,choices:f,onDone:a})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,b.jsx)(i,{className:"size-4 text-muted-foreground"})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,b.jsx)("span",{className:"block truncate text-sm font-medium",children:a.label}),(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!f&&!h&&(0,b.jsx)("span",{className:(0,I.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",a.kind?I.WAITING_INK:"text-muted-foreground"),children:a.kind?"off":"auto"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:f?.label??h??(a.kind?"Not offered to bots until you pick one":g[0]?.label??"No key for any of these yet")})]})]}),(0,b.jsx)(j.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({entry:a,onDone:c}){let{data:d}=(0,H.useServerRoute)(r.queryKey.config),e=d?.find(b=>b.key===a.key)?.value,[f,g]=(0,q.useState)(()=>{let b=a.text?(0,z.parseTextModel)(e):(0,z.parseMediaModel)(e);return{provider:b?.provider??null,model:b?.model??""}}),h=()=>{(0,H.revalidate)(r.queryKey.config),c()},[i]=(0,G.useServerAction)(D.setConfigAction,{okMessage:`${a.label} saved`,onOk:h}),[j,k]=(0,G.useServerAction)(C,{okMessage:a.kind?`${a.label} switched off`:`${a.label} back to automatic`,onOk:h});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:a.hint,footer:(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)(s.Button,{variant:"ghost",loading:k,onClick:()=>j(a.key),children:a.kind?"Turn off":"Automatic"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:c,children:"Close"})]}),children:(0,b.jsx)(x.ModelPicker,{kind:a.kind,provider:f.provider,model:f.model,onChange:b=>{g(b),b.model.trim()&&i(a.key,`${b.provider}/${b.model.trim()}`)}})})}function Y({entry:a,choices:c,onDone:d}){let{data:e}=(0,H.useServerRoute)(r.queryKey.config),f=e?.find(b=>b.key===a.key)?.value,g=()=>{(0,H.revalidate)(r.queryKey.config),d()},[h,i]=(0,G.useServerAction)(D.setConfigAction,{okMessage:`${a.label} saved`,onOk:g}),[j,k]=(0,G.useServerAction)(C,{okMessage:a.kind?`${a.label} switched off`:`${a.label} back to automatic`,onOk:g});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:a.hint,footer:(0,b.jsxs)(b.Fragment,{children:[f&&(0,b.jsx)(s.Button,{variant:"ghost",loading:k,onClick:()=>j(a.key),children:a.kind?"Turn off":"Automatic"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:d,children:"Close"})]}),children:(0,b.jsx)(F.SettingChoiceRows,{options:c.map(a=>({value:a.value,label:a.label,disabled:!(0,E.isConfigSet)(e,a.needs)&&`needs ${a.needs}`})),value:f,onChange:b=>h(a.key,b),disabled:i})})}function Z({entry:a,onDone:c}){let{data:d}=(0,H.useServerRoute)(r.queryKey.config),e=(0,E.isConfigSet)(d,a.key),f=R(a,e),g=S(a,e),h=g.data?T(g.data):null,[i,j]=(0,G.useServerAction)(C,{okMessage:`Signed out of ${a.label}`,onOk:()=>{(0,H.revalidate)(r.queryKey.config),(0,H.revalidate)(r.queryKey.llmModel),c()}});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:e?(0,b.jsxs)(b.Fragment,{children:["Signed in ·"," ",(0,b.jsx)("span",{className:"font-mono",children:U(g.data,f)}),h&&(0,b.jsxs)(b.Fragment,{children:[" · ",(0,b.jsx)("span",{className:(0,I.cn)("font-mono",h.ink),children:h.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)(s.Button,{variant:"ghost",loading:j,onClick:()=>i(a.key),children:"Sign out"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:c,children:e?"Close":"Cancel"}),!e&&(0,b.jsx)(w.ChatGptSignIn,{})]}),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(F.SettingNote,{children:e?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),g.data&&"refused"in g.data&&(0,b.jsx)(F.SettingNote,{className:"wrap-break-word text-destructive",children:g.data.refused})]})})}function $({entry:a,set:c,onDone:d}){let[e,f]=(0,q.useState)(""),{data:g}=Q(a,c),h=g?P(c,!1,g):null,i=()=>{(0,H.revalidate)(r.queryKey.config),(0,H.revalidate)(r.queryKey.llmModel)},[j,k]=(0,G.useServerAction)(D.setConfigAction,{okMessage:`${a.label} key saved`,onOk:()=>{i(),d()}}),[l,m]=(0,G.useServerAction)(C,{okMessage:`${a.label} key removed`,onOk:()=>{i(),d()}});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.key}),a.hint&&(0,b.jsxs)(b.Fragment,{children:[" · ",a.hint]}),h&&(0,b.jsxs)(b.Fragment,{children:[" · ",(0,b.jsx)("span",{className:(0,I.cn)("font-mono",h.ink),children:h.text})]})]}),footer:(0,b.jsxs)(b.Fragment,{children:[c&&(0,b.jsx)(s.Button,{variant:"ghost",loading:m,onClick:()=>l(a.key),children:"Remove"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:d,children:"Cancel"}),(0,b.jsx)(s.Button,{loading:k,disabled:e.trim().length<8,onClick:()=>j(a.key,e),children:c?"Replace":"Save"})]}),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(t.Input,{value:e,onChange:a=>f(a.target.value),onKeyDown:b=>{"Enter"===b.key&&e.trim().length>=8&&j(a.key,e)},placeholder:c?"New value — replaces the current key":a.key,spellCheck:!1,type:"password",autoFocus:!0}),g&&"refused"in g&&(0,b.jsx)(F.SettingNote,{className:"wrap-break-word text-destructive",children:g.refused})]})})}a.s(["ConfigGroups",0,L,"ConfigSetting",0,function(){return(0,b.jsx)(L,{section:"keys"})}],405593)}];
1
+ module.exports=[405593,a=>{"use strict";var b=a.i(187924),c=a.i(987234),d=a.i(164831);let e={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};e.node;let f=(0,d.default)(e),g={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};g.node;let h=(0,d.default)(g);var i=a.i(752562),j=a.i(141146);let k={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};k.node;let l=(0,d.default)(k);var m=a.i(71215),n=a.i(126766),o=a.i(233540),p=a.i(26268),q=a.i(572131),r=a.i(767561),s=a.i(340695),t=a.i(205522),u=a.i(446181),v=a.i(950463),w=a.i(852307),x=a.i(608902),y=a.i(379630),z=a.i(61876),A=a.i(913834),B=a.i(405050);let C=(0,B.createServerReference)("7ff28dc5f254ed7fecc4fc2197f95a4732ea0d8ad1",B.callServer,void 0,B.findSourceMapURL,"removeConfigAction");var D=a.i(449546),E=a.i(478978),F=a.i(619477),G=a.i(313237),H=a.i(759497),I=a.i(497895);let J={[E.EXA_API_KEY]:o.Search},K={image:m.Image,video:l,speech:f,transcription:h};function L({section:a}){let{data:c,isLoading:d,error:e}=(0,H.useServerRoute)(r.queryKey.config);if(d)return(0,b.jsx)(F.SettingSkeleton,{rows:4});if(e)return(0,b.jsx)(F.SettingError,{message:e.message});let f=a=>(0,E.isConfigSet)(c,a),g=a=>c?.find(b=>b.key===a)?.value,h=E.CONFIG_GROUPS.filter(b=>b.section===a),i=h.flatMap(a=>a.entries);return(0,b.jsx)(F.SettingScreen,{footer:(0,b.jsx)(F.SettingRailNote,{children:"keys"===a?(0,b.jsxs)(b.Fragment,{children:[i.filter(a=>f(a.key)).length," of"," ",i.length," set",h.some(a=>!(0,E.groupSatisfied)(a,f))?" · a call needs one voice key":" · your keys stay on this machine"]}):(0,b.jsxs)(b.Fragment,{children:[i.length," of ",i.length," resolved ·"," ",i.filter(a=>g(a.key)).length," pinned"]})}),children:h.map(a=>(0,b.jsx)(F.SettingGroup,{label:a.title,hint:a.hint,right:(0,b.jsx)(M,{group:a,isSet:f}),children:(0,b.jsx)(F.SettingItems,{children:a.entries.map(c=>c.choices?(0,b.jsx)(W,{entry:c,choices:c.choices,value:g(c.key),isSet:f},c.key):(0,b.jsx)(N,{entry:c,set:f(c.key),needed:!(0,E.groupSatisfied)(a,f)},c.key))})},a.id))})}function M({group:a,isSet:c}){return"none"===a.require?null:(0,E.groupSatisfied)(a,c)?(0,b.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,b.jsx)(i.Check,{className:"size-3"}),"ready"]}):(0,b.jsxs)("span",{className:(0,I.cn)("flex items-center gap-1 font-mono text-[11px]",I.WAITING_INK),children:[(0,b.jsx)(p.TriangleAlert,{className:"size-3"}),a.note??"Required"]})}function N({entry:a,set:c,needed:d}){let e=Q(a,c),f=S(a,c),g=R(a,c),h=f.data?T(f.data):P(c,d,e.data,a.signIn);return(0,b.jsxs)("button",{type:"button",onClick:()=>{var d,e,f;return a.signIn?(d=a,u.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)(Z,{entry:d,onDone:a})})):(e=a,f=c,u.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)($,{entry:e,set:f,onDone:a})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,b.jsx)(V,{entry:a})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsx)("span",{className:"block truncate text-sm font-medium",children:a.label}),(0,b.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:a.signIn?c?U(f.data,g):"sign in with your account":a.key})]}),e.isLoading||f.isLoading?(0,b.jsx)(v.Skeleton,{className:"h-3 w-20 shrink-0"}):(0,b.jsxs)("span",{className:(0,I.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",h.ink),children:[h.warn?(0,b.jsx)(p.TriangleAlert,{className:"size-3"}):c&&(0,b.jsx)(i.Check,{className:"size-3"}),h.text]}),(0,b.jsx)(j.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let O=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function P(a,b,c,d){return a?c?"refused"in c?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${O.format(c.balance)} left`,ink:c.low?I.WAITING_INK:"text-muted-foreground",warn:c.low}:{text:d?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:b?{text:"Needed",ink:I.WAITING_INK,warn:!0}:{text:d?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function Q(a,b){return(0,H.useServerRoute)(b&&"vercel-ai-gateway"===a.provider?r.queryKey.gatewayCredits:null)}function R(a,b){let{data:c}=(0,H.useServerRoute)(b&&a.signIn?r.queryKey.llmModel:null);return c?.find(b=>b.id===a.provider)?.plan??null}function S(a,b){return(0,H.useServerRoute)(b&&a.signIn?r.queryKey.subscriptionUsage:null)}function T(a){return"refused"in a?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:a.spent?"Limit reached":`${a.usedPercent}% used`,ink:a.high?I.WAITING_INK:"text-muted-foreground",warn:a.high}}function U(a,b){let d=!a||"refused"in a?null:a,e=`${d?.plan??b??"unknown"} plan`;return d?.resetsAt?`${e} \xb7 resets in ${(0,c.formatDistanceToNowStrict)(new Date(d.resetsAt))}`:e}function V({entry:a}){if(a.provider)return(0,b.jsx)(y.ProviderIcon,{provider:a.provider,className:"size-4"});let c=J[a.key]??n.KeyRound;return(0,b.jsx)(c,{className:"size-4 text-muted-foreground"})}function W({entry:a,choices:c,value:d,isSet:e}){let f=c.find(a=>a.value===d),g=c.filter(a=>e(a.needs)),h=d&&!f?d:null,i=a.kind?K[a.kind]:A.BotsMark;return(0,b.jsxs)("button",{type:"button",onClick:()=>{var d,e,f;return a.kind||a.text?(d=a,u.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,b.jsx)(X,{entry:d,onDone:a})})):(e=a,f=c,u.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)(Y,{entry:e,choices:f,onDone:a})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,b.jsx)(i,{className:"size-4 text-muted-foreground"})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,b.jsx)("span",{className:"block truncate text-sm font-medium",children:a.label}),(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!f&&!h&&(0,b.jsx)("span",{className:(0,I.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",a.kind?I.WAITING_INK:"text-muted-foreground"),children:a.kind?"off":"auto"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:f?.label??h??(a.kind?"Not offered to bots until you pick one":g[0]?.label??"No key for any of these yet")})]})]}),(0,b.jsx)(j.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({entry:a,onDone:c}){let{data:d}=(0,H.useServerRoute)(r.queryKey.config),e=d?.find(b=>b.key===a.key)?.value,[f,g]=(0,q.useState)(()=>{let b=a.text?(0,z.parseTextModel)(e):(0,z.parseMediaModel)(e);return{provider:b?.provider??null,model:b?.model??""}}),h=()=>{(0,H.revalidate)(r.queryKey.config),c()},[i]=(0,G.useServerAction)(D.setConfigAction,{okMessage:`${a.label} saved`,onOk:h}),[j,k]=(0,G.useServerAction)(C,{okMessage:a.kind?`${a.label} switched off`:`${a.label} back to automatic`,onOk:h});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:a.hint,footer:(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)(s.Button,{variant:"ghost",loading:k,onClick:()=>j(a.key),children:a.kind?"Turn off":"Automatic"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:c,children:"Close"})]}),children:(0,b.jsx)(x.ModelPicker,{kind:a.kind,provider:f.provider,model:f.model,onChange:b=>{g(b),b.model.trim()&&i(a.key,`${b.provider}/${b.model.trim()}`)}})})}function Y({entry:a,choices:c,onDone:d}){let{data:e}=(0,H.useServerRoute)(r.queryKey.config),f=e?.find(b=>b.key===a.key)?.value,g=()=>{(0,H.revalidate)(r.queryKey.config),d()},[h,i]=(0,G.useServerAction)(D.setConfigAction,{okMessage:`${a.label} saved`,onOk:g}),[j,k]=(0,G.useServerAction)(C,{okMessage:a.kind?`${a.label} switched off`:`${a.label} back to automatic`,onOk:g});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:a.hint,footer:(0,b.jsxs)(b.Fragment,{children:[f&&(0,b.jsx)(s.Button,{variant:"ghost",loading:k,onClick:()=>j(a.key),children:a.kind?"Turn off":"Automatic"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:d,children:"Close"})]}),children:(0,b.jsx)(F.SettingChoiceRows,{options:c.map(a=>({value:a.value,label:a.label,disabled:!(0,E.isConfigSet)(e,a.needs)&&`needs ${a.needs}`})),value:f,onChange:b=>h(a.key,b),disabled:i})})}function Z({entry:a,onDone:c}){let{data:d}=(0,H.useServerRoute)(r.queryKey.config),e=(0,E.isConfigSet)(d,a.key),f=R(a,e),g=S(a,e),h=g.data?T(g.data):null,[i,j]=(0,G.useServerAction)(C,{okMessage:`Signed out of ${a.label}`,onOk:()=>{(0,H.revalidate)(r.queryKey.config),(0,H.revalidate)(r.queryKey.llmModel),c()}});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:e?(0,b.jsxs)(b.Fragment,{children:["Signed in ·"," ",(0,b.jsx)("span",{className:"font-mono",children:U(g.data,f)}),h&&(0,b.jsxs)(b.Fragment,{children:[" · ",(0,b.jsx)("span",{className:(0,I.cn)("font-mono",h.ink),children:h.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)(s.Button,{variant:"ghost",loading:j,onClick:()=>i(a.key),children:"Sign out"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:c,children:e?"Close":"Cancel"}),!e&&(0,b.jsx)(w.ChatGptSignIn,{})]}),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(F.SettingNote,{children:e?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),g.data&&"refused"in g.data&&(0,b.jsx)(F.SettingNote,{className:"wrap-break-word text-destructive",children:g.data.refused})]})})}function $({entry:a,set:c,onDone:d}){let[e,f]=(0,q.useState)(""),{data:g}=Q(a,c),h=g?P(c,!1,g):null,i=()=>{(0,H.revalidate)(r.queryKey.config),(0,H.revalidate)(r.queryKey.llmModel)},[j,k]=(0,G.useServerAction)(D.setConfigAction,{okMessage:`${a.label} key saved`,onOk:()=>{i(),d()}}),[l,m]=(0,G.useServerAction)(C,{okMessage:`${a.label} key removed`,onOk:()=>{i(),d()}});return(0,b.jsx)(F.SettingDialogContent,{title:a.label,description:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.key}),a.hint&&(0,b.jsxs)(b.Fragment,{children:[" · ",a.hint]}),h&&(0,b.jsxs)(b.Fragment,{children:[" · ",(0,b.jsx)("span",{className:(0,I.cn)("font-mono",h.ink),children:h.text})]})]}),footer:(0,b.jsxs)(b.Fragment,{children:[c&&(0,b.jsx)(s.Button,{variant:"ghost",loading:m,onClick:()=>l(a.key),children:"Remove"}),(0,b.jsx)(s.Button,{variant:"ghost",onClick:d,children:"Cancel"}),(0,b.jsx)(s.Button,{loading:k,disabled:e.trim().length<8,onClick:()=>j(a.key,e),children:c?"Replace":"Save"})]}),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(t.Input,{value:e,onChange:a=>f(a.target.value),onKeyDown:b=>{"Enter"===b.key&&e.trim().length>=8&&j(a.key,e)},placeholder:c?"New value — replaces the current key":a.key,spellCheck:!1,type:"password",autoFocus:!0}),g&&"refused"in g&&(0,b.jsx)(F.SettingNote,{className:"wrap-break-word text-destructive",children:g.refused})]})})}a.s(["ConfigGroups",0,L,"ConfigSetting",0,function(){return(0,b.jsx)(L,{section:"keys"})}],405593)}];
2
2
 
3
3
  //# sourceMappingURL=features_config_components_config-setting_tsx_0xfwqdg._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[26444,a=>{"use strict";var b=a.i(187924),c=a.i(752562),d=a.i(589027),e=a.i(141146),f=a.i(164831);let g={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};g.node;let h=(0,f.default)(g);var i=a.i(403512);let j={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};j.node;let k=(0,f.default)(j),l={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};l.node;let m=(0,f.default)(l);var n=a.i(951675),o=a.i(474215),p=a.i(572131),q=a.i(767561),r=a.i(340695),s=a.i(316474),t=a.i(205522),u=a.i(497895);let v=(0,p.memo)(({data:a,name:c,initialExpandDepth:d=2})=>{let e=(0,p.useMemo)(()=>"string"==typeof a?function(a){let b=a.trim();if(!(b.startsWith("{")&&b.endsWith("}"))&&!(b.startsWith("[")&&b.endsWith("]")))return{success:!1,data:a};try{return{success:!0,data:JSON.parse(a)}}catch{return{success:!1,data:a}}}(a).data:a,[a]);return(0,b.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,b.jsx)(w,{data:e,name:c,depth:0,initialExpandDepth:d})})});v.displayName="JsonView";let w=(0,p.memo)(({data:a,name:c,depth:d=0,initialExpandDepth:e})=>{var f;let g=void 0===a?"undefined":Array.isArray(a)?"array":null===a?"null":typeof a,[h,i]=(0,p.useState)("string"!==g&&d<e),j={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(g){case"object":case"array":let k,l,m;return l=(k=(f="array"===g)?a:Object.entries(a)).length,m={open:f?"[":"{",close:f?"]":"}",collapsed:f?"[ ... ]":"{ ... }",empty:f?"[]":"{}"},0===l?(0,b.jsxs)("div",{className:"flex items-center",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:m.empty})]}):(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>i(!h),children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[c,":"]}),h?(0,b.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:m.open}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:m.collapsed}),(0,b.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[l," ",1===l?"item":"items"]})]})]}),h&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:f?k.map((a,c)=>(0,b.jsx)("div",{className:"my-1",children:(0,b.jsx)(w,{data:a,name:`${c}`,depth:d+1,initialExpandDepth:e})},c)):k.map(([a,c])=>(0,b.jsx)("div",{className:"my-1",children:(0,b.jsx)(w,{data:c,name:a,depth:d+1,initialExpandDepth:e})},a))}),(0,b.jsx)("div",{className:"text-muted-foreground",children:m.close})]})]});case"string":return a.length>100?(0,b.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[c,":"]}),(0,b.jsx)("pre",{className:(0,u.cn)(j.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>i(!h),title:h?"Click to collapse":"Click to expand",children:h?`"${a}"`:`"${a.slice(0,100)}..."`})]}):(0,b.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsxs)("pre",{className:j.string,children:['"',a,'"']})]});case"undefined":return(0,b.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsx)("span",{className:j.undefined,children:"undefined"})]});default:return(0,b.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsx)("span",{className:j[g]||j.default,children:null===a?"null":String(a)})]})}});w.displayName="JsonNode";var x=a.i(446181),y=a.i(280281),z=a.i(621958),A=a.i(546893),B=a.i(864037),C=a.i(405050);let D=(0,C.createServerReference)("7fee33e06c7949c9115a2d9d6fe41af5ace83a4e06",C.callServer,void 0,C.findSourceMapURL,"callToolAction"),E=(0,C.createServerReference)("7fa3265273969b2f06c444fae58fd0dff4146dd041",C.callServer,void 0,C.findSourceMapURL,"deleteServerAction"),F=(0,C.createServerReference)("7f94c3fa4cf21252412cebf5bc09f3c41b683622af",C.callServer,void 0,C.findSourceMapURL,"refreshServerAction"),G=(0,C.createServerReference)("7f163c4d9598d15a4906a7963afe8e78c6e974aae2",C.callServer,void 0,C.findSourceMapURL,"registerServerAction");var H=a.i(156757),I=a.i(199169);let J=H.z.object({url:H.z.url(),headers:H.z.record(H.z.string(),H.z.string()).optional(),oauthClient:H.z.object({clientId:H.z.string().min(1),clientSecret:H.z.string().optional()}).optional()}),K=H.z.object({command:H.z.string().min(1),args:H.z.array(H.z.string()).optional(),env:H.z.record(H.z.string(),H.z.string()).optional()}),L=H.z.union([J,K]),M=H.z.object({name:H.z.string(),description:H.z.string().optional(),inputSchema:H.z.looseObject({}).optional(),outputSchema:H.z.looseObject({}).optional()});function N(a){return"url"in a}H.z.object({clientInformation:H.z.looseObject({}).optional(),tokens:H.z.looseObject({}).optional(),authorizationServer:H.z.looseObject({}).optional(),codeVerifier:H.z.string().optional(),state:H.z.string().optional()});let O=H.z.object({name:H.z.string().min(1).max(40),config:L,toolCount:H.z.number().int(),lastError:H.z.string().nullish()}),P=M.extend({id:H.z.number().int(),description:H.z.string().nullish()});O.omit({toolCount:!0}).extend({tools:P.array().default([]),toolsSyncedAt:I.DateLikeSchema});let Q=H.z.object({name:H.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:L}),R=H.z.union([H.z.object({mcpServers:H.z.record(H.z.string(),L)}),H.z.record(H.z.string(),L)]),S=[{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var T=a.i(619477),U=a.i(30681),V=a.i(313237),W=a.i(759497);function X({name:a,onDone:c}){let{data:d,isLoading:e}=(0,W.useServerRoute)(q.queryKey.mcpServer(a)),[f,g]=(0,V.useServerAction)(F,{...ai,onOk:b=>{ai.onOk(b),(0,W.revalidate)(q.queryKey.mcpServer(a))}}),[h,i]=(0,V.useServerAction)(E,{okMessage:"Server deleted",onOk:()=>{c(),(0,W.revalidate)(q.queryKey.mcp)}}),j=async()=>{await x.notify.confirm({title:`Delete ${a}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&h(a)};if(e)return(0,b.jsx)(T.SettingSkeleton,{rows:4});if(!d)return null;let l=d.tools.length,m=N(d.config)?"HTTP":"STDIO";return(0,b.jsxs)(T.SettingDialogContent,{title:d.name,description:(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,b.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:m}),(0,b.jsx)("span",{className:"truncate font-mono",children:ak(d.config)})]}),footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(r.Button,{variant:"ghost",loading:i,onClick:j,children:[(0,b.jsx)(n.Trash2,{}),"Delete"]}),(0,b.jsxs)(r.Button,{variant:"outline",loading:g,onClick:()=>f(d.name),children:[(0,b.jsx)(k,{}),"Reconnect"]})]}),children:[d.lastError&&(0,b.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:d.lastError}),(0,b.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[l," ",1===l?"tool":"tools"]}),d.tools.map(a=>(0,b.jsx)($,{tool:a,serverName:d.name},a.name))]})}function Y({server:a}){let d=a.toolCount,f=a.lastError?"error":d>0?"connected":"idle";return(0,b.jsxs)("button",{type:"button",onClick:()=>{x.notify.component({className:"sm:max-w-3xl",renderer:({close:c})=>(0,b.jsx)(X,{name:a.name,onDone:c})})},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,b.jsx)(Z,{server:a})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a.name}),"connected"===f&&(0,b.jsx)(c.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,b.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===f?(0,b.jsx)("span",{className:"text-destructive",children:a.lastError}):(0,b.jsxs)(b.Fragment,{children:[d>0?`${d} ${1===d?"tool":"tools"}`:"No tools yet",(0,b.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",ak(a.config)]})]})})]}),(0,b.jsx)(e.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function Z({server:a}){let c,d=(c=S.find(b=>N(b.config)?N(a.config)&&b.config.url.replace(/\/+$/,"")===a.config.url.replace(/\/+$/,""):!N(a.config)&&b.config.command===a.config.command&&(b.config.args??[]).join(" ")===(a.config.args??[]).join(" "))??S.find(b=>b.name===a.name),c?.icon);return d?(0,b.jsx)("img",{src:(0,u.faviconUrl)(d),alt:"",className:"size-5"}):(0,b.jsx)(m,{className:"size-4"})}function $({tool:a,serverName:c}){let[f,g]=(0,p.useState)(!1),[h,i]=(0,p.useState)(!1),[j,k]=(0,p.useState)(!1),l=[["inputSchema",a.inputSchema],["outputSchema",a.outputSchema]].filter(([,a])=>a);return(0,b.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,b.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,b.jsx)("span",{className:"block truncate font-mono text-sm",children:a.name}),a.description?(0,b.jsx)("p",{className:(0,u.cn)("text-xs text-muted-foreground",!j&&"line-clamp-2",a.description.length>140&&"cursor-pointer"),onClick:()=>k(!j),children:a.description}):null]}),(0,b.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[l.length>0&&(0,b.jsxs)(r.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>g(!f),children:[f?(0,b.jsx)(d.ChevronDown,{}):(0,b.jsx)(e.ChevronRight,{}),"Schema"]}),(0,b.jsxs)(r.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>i(!h),children:[h?(0,b.jsx)(d.ChevronDown,{}):(0,b.jsx)(e.ChevronRight,{}),"Test"]})]}),f?(0,b.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:l.map(([a,c])=>(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===a?"in":"out"}),(0,b.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function a(b,c=0){if(!b||"object"!=typeof b)return"unknown";let d=" ".repeat(c+1),e=" ".repeat(c);if(Array.isArray(b.enum))return b.enum.map(a=>JSON.stringify(a)).join(" | ");let f=b.anyOf??b.oneOf;if(Array.isArray(f))return f.map(b=>a(b,c)).join(" | ");if("array"===b.type){let d=a(b.items,c);return/[|{]/.test(d)?`(${d})[]`:`${d}[]`}if("object"===b.type||b.properties){let f=b.properties;if(!f||0===Object.keys(f).length)return"{}";let g=b.required??[],h=Object.entries(f).map(([b,e])=>{let f=g.includes(b)?"":"?",h=e?.description,i="string"==typeof h&&h.length<=60?` // ${h}`:"";return`${d}${b}${f}: ${a(e,c+1)}${i}`});return`{
1
+ module.exports=[26444,a=>{"use strict";var b=a.i(187924),c=a.i(752562),d=a.i(589027),e=a.i(141146),f=a.i(164831);let g={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};g.node;let h=(0,f.default)(g);var i=a.i(403512);let j={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};j.node;let k=(0,f.default)(j),l={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};l.node;let m=(0,f.default)(l);var n=a.i(951675),o=a.i(474215),p=a.i(572131),q=a.i(767561),r=a.i(340695),s=a.i(316474),t=a.i(205522),u=a.i(497895);let v=(0,p.memo)(({data:a,name:c,initialExpandDepth:d=2})=>{let e=(0,p.useMemo)(()=>"string"==typeof a?function(a){let b=a.trim();if(!(b.startsWith("{")&&b.endsWith("}"))&&!(b.startsWith("[")&&b.endsWith("]")))return{success:!1,data:a};try{return{success:!0,data:JSON.parse(a)}}catch{return{success:!1,data:a}}}(a).data:a,[a]);return(0,b.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,b.jsx)(w,{data:e,name:c,depth:0,initialExpandDepth:d})})});v.displayName="JsonView";let w=(0,p.memo)(({data:a,name:c,depth:d=0,initialExpandDepth:e})=>{var f;let g=void 0===a?"undefined":Array.isArray(a)?"array":null===a?"null":typeof a,[h,i]=(0,p.useState)("string"!==g&&d<e),j={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(g){case"object":case"array":let k,l,m;return l=(k=(f="array"===g)?a:Object.entries(a)).length,m={open:f?"[":"{",close:f?"]":"}",collapsed:f?"[ ... ]":"{ ... }",empty:f?"[]":"{}"},0===l?(0,b.jsxs)("div",{className:"flex items-center",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:m.empty})]}):(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>i(!h),children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[c,":"]}),h?(0,b.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:m.open}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:m.collapsed}),(0,b.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[l," ",1===l?"item":"items"]})]})]}),h&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:f?k.map((a,c)=>(0,b.jsx)("div",{className:"my-1",children:(0,b.jsx)(w,{data:a,name:`${c}`,depth:d+1,initialExpandDepth:e})},c)):k.map(([a,c])=>(0,b.jsx)("div",{className:"my-1",children:(0,b.jsx)(w,{data:c,name:a,depth:d+1,initialExpandDepth:e})},a))}),(0,b.jsx)("div",{className:"text-muted-foreground",children:m.close})]})]});case"string":return a.length>100?(0,b.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[c,":"]}),(0,b.jsx)("pre",{className:(0,u.cn)(j.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>i(!h),title:h?"Click to collapse":"Click to expand",children:h?`"${a}"`:`"${a.slice(0,100)}..."`})]}):(0,b.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsxs)("pre",{className:j.string,children:['"',a,'"']})]});case"undefined":return(0,b.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsx)("span",{className:j.undefined,children:"undefined"})]});default:return(0,b.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[c&&(0,b.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[c,":"]}),(0,b.jsx)("span",{className:j[g]||j.default,children:null===a?"null":String(a)})]})}});w.displayName="JsonNode";var x=a.i(446181),y=a.i(280281),z=a.i(621958),A=a.i(546893),B=a.i(864037),C=a.i(405050);let D=(0,C.createServerReference)("7f4445663d57fd7f02ff93357e6fd107c529294652",C.callServer,void 0,C.findSourceMapURL,"callToolAction"),E=(0,C.createServerReference)("7f871a6c3cd8661c02c3d9bef4be2c4792dd86711a",C.callServer,void 0,C.findSourceMapURL,"deleteServerAction"),F=(0,C.createServerReference)("7f4929468bc6ea5d691dec0a59d7667a1f1c6f1f0d",C.callServer,void 0,C.findSourceMapURL,"refreshServerAction"),G=(0,C.createServerReference)("7ff8f4ddc456f01900d893c142d580a2682ece8ee9",C.callServer,void 0,C.findSourceMapURL,"registerServerAction");var H=a.i(156757),I=a.i(199169);let J=H.z.object({url:H.z.url(),headers:H.z.record(H.z.string(),H.z.string()).optional(),oauthClient:H.z.object({clientId:H.z.string().min(1),clientSecret:H.z.string().optional()}).optional()}),K=H.z.object({command:H.z.string().min(1),args:H.z.array(H.z.string()).optional(),env:H.z.record(H.z.string(),H.z.string()).optional()}),L=H.z.union([J,K]),M=H.z.object({name:H.z.string(),description:H.z.string().optional(),inputSchema:H.z.looseObject({}).optional(),outputSchema:H.z.looseObject({}).optional()});function N(a){return"url"in a}H.z.object({clientInformation:H.z.looseObject({}).optional(),tokens:H.z.looseObject({}).optional(),authorizationServer:H.z.looseObject({}).optional(),codeVerifier:H.z.string().optional(),state:H.z.string().optional()});let O=H.z.object({name:H.z.string().min(1).max(40),config:L,toolCount:H.z.number().int(),lastError:H.z.string().nullish()}),P=M.extend({id:H.z.number().int(),description:H.z.string().nullish()});O.omit({toolCount:!0}).extend({tools:P.array().default([]),toolsSyncedAt:I.DateLikeSchema});let Q=H.z.object({name:H.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:L}),R=H.z.union([H.z.object({mcpServers:H.z.record(H.z.string(),L)}),H.z.record(H.z.string(),L)]),S=[{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var T=a.i(619477),U=a.i(30681),V=a.i(313237),W=a.i(759497);function X({name:a,onDone:c}){let{data:d,isLoading:e}=(0,W.useServerRoute)(q.queryKey.mcpServer(a)),[f,g]=(0,V.useServerAction)(F,{...ai,onOk:b=>{ai.onOk(b),(0,W.revalidate)(q.queryKey.mcpServer(a))}}),[h,i]=(0,V.useServerAction)(E,{okMessage:"Server deleted",onOk:()=>{c(),(0,W.revalidate)(q.queryKey.mcp)}}),j=async()=>{await x.notify.confirm({title:`Delete ${a}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&h(a)};if(e)return(0,b.jsx)(T.SettingSkeleton,{rows:4});if(!d)return null;let l=d.tools.length,m=N(d.config)?"HTTP":"STDIO";return(0,b.jsxs)(T.SettingDialogContent,{title:d.name,description:(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,b.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:m}),(0,b.jsx)("span",{className:"truncate font-mono",children:ak(d.config)})]}),footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(r.Button,{variant:"ghost",loading:i,onClick:j,children:[(0,b.jsx)(n.Trash2,{}),"Delete"]}),(0,b.jsxs)(r.Button,{variant:"outline",loading:g,onClick:()=>f(d.name),children:[(0,b.jsx)(k,{}),"Reconnect"]})]}),children:[d.lastError&&(0,b.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:d.lastError}),(0,b.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[l," ",1===l?"tool":"tools"]}),d.tools.map(a=>(0,b.jsx)($,{tool:a,serverName:d.name},a.name))]})}function Y({server:a}){let d=a.toolCount,f=a.lastError?"error":d>0?"connected":"idle";return(0,b.jsxs)("button",{type:"button",onClick:()=>{x.notify.component({className:"sm:max-w-3xl",renderer:({close:c})=>(0,b.jsx)(X,{name:a.name,onDone:c})})},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,b.jsx)(Z,{server:a})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a.name}),"connected"===f&&(0,b.jsx)(c.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,b.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===f?(0,b.jsx)("span",{className:"text-destructive",children:a.lastError}):(0,b.jsxs)(b.Fragment,{children:[d>0?`${d} ${1===d?"tool":"tools"}`:"No tools yet",(0,b.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",ak(a.config)]})]})})]}),(0,b.jsx)(e.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function Z({server:a}){let c,d=(c=S.find(b=>N(b.config)?N(a.config)&&b.config.url.replace(/\/+$/,"")===a.config.url.replace(/\/+$/,""):!N(a.config)&&b.config.command===a.config.command&&(b.config.args??[]).join(" ")===(a.config.args??[]).join(" "))??S.find(b=>b.name===a.name),c?.icon);return d?(0,b.jsx)("img",{src:(0,u.faviconUrl)(d),alt:"",className:"size-5"}):(0,b.jsx)(m,{className:"size-4"})}function $({tool:a,serverName:c}){let[f,g]=(0,p.useState)(!1),[h,i]=(0,p.useState)(!1),[j,k]=(0,p.useState)(!1),l=[["inputSchema",a.inputSchema],["outputSchema",a.outputSchema]].filter(([,a])=>a);return(0,b.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,b.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,b.jsx)("span",{className:"block truncate font-mono text-sm",children:a.name}),a.description?(0,b.jsx)("p",{className:(0,u.cn)("text-xs text-muted-foreground",!j&&"line-clamp-2",a.description.length>140&&"cursor-pointer"),onClick:()=>k(!j),children:a.description}):null]}),(0,b.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[l.length>0&&(0,b.jsxs)(r.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>g(!f),children:[f?(0,b.jsx)(d.ChevronDown,{}):(0,b.jsx)(e.ChevronRight,{}),"Schema"]}),(0,b.jsxs)(r.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>i(!h),children:[h?(0,b.jsx)(d.ChevronDown,{}):(0,b.jsx)(e.ChevronRight,{}),"Test"]})]}),f?(0,b.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:l.map(([a,c])=>(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===a?"in":"out"}),(0,b.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function a(b,c=0){if(!b||"object"!=typeof b)return"unknown";let d=" ".repeat(c+1),e=" ".repeat(c);if(Array.isArray(b.enum))return b.enum.map(a=>JSON.stringify(a)).join(" | ");let f=b.anyOf??b.oneOf;if(Array.isArray(f))return f.map(b=>a(b,c)).join(" | ");if("array"===b.type){let d=a(b.items,c);return/[|{]/.test(d)?`(${d})[]`:`${d}[]`}if("object"===b.type||b.properties){let f=b.properties;if(!f||0===Object.keys(f).length)return"{}";let g=b.required??[],h=Object.entries(f).map(([b,e])=>{let f=g.includes(b)?"":"?",h=e?.description,i="string"==typeof h&&h.length<=60?` // ${h}`:"";return`${d}${b}${f}: ${a(e,c+1)}${i}`});return`{
2
2
  ${h.join("\n")}
3
3
  ${e}}`}return Array.isArray(b.type)?b.type.join(" | "):"string"==typeof b.type?b.type:"unknown"}(c)})]},a))}):null,h?(0,b.jsx)(_,{tool:a,serverName:c}):null]})}function _({tool:a,serverName:c}){let[d,e]=(0,p.useState)(()=>(function(a){let b=a.inputSchema?.properties;if(!b||"object"!=typeof b)return"{}";let c={};for(let[a,d]of Object.entries(b))c[a]=d?.type==="number"||d?.type==="integer"?0:d?.type!=="boolean"&&(d?.type==="array"?[]:d?.type==="object"?{}:"");return JSON.stringify(c,null,2)})(a)),[f,g]=(0,p.useState)(""),[i,j,k,l,m]=(0,V.useServerAction)(D,{errorMessage:!1});return(0,b.jsxs)("div",{className:"mt-2 space-y-2 rounded-lg border border-input p-3",children:[(0,b.jsx)(A.Textarea,{value:d,onChange:a=>e(a.target.value),spellCheck:!1,className:"min-h-24 resize-none font-mono text-xs"}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-xs text-destructive",children:f||l}),(0,b.jsxs)(r.Button,{size:"sm",loading:j,onClick:()=>{let b;try{b=d.trim()?JSON.parse(d):void 0}catch{g("Not valid JSON");return}g(""),m(),i(c,a.name,b)},children:[!j&&(0,b.jsx)(h,{}),"Run"]})]}),void 0!==k&&(0,b.jsx)("div",{className:"overflow-x-auto rounded-lg bg-muted/40 p-3",children:(0,b.jsx)(v,{data:k,initialExpandDepth:3})})]})}function aa(a){return x.notify.component({className:"sm:max-w-lg",renderer:({close:c})=>(0,b.jsx)(ab,{initial:a,onDone:c})})}function ab({initial:a,onDone:c}){let d=a&&N(a.config)?a.config:void 0,e=a&&!N(a.config)?a.config:void 0,[f,g]=(0,U.useObjectState)({mode:e?"stdio":"http",name:a?.name??"",url:d?.url??"",headers:ae(d?.headers),clientId:d?.oauthClient?.clientId??"",clientSecret:d?.oauthClient?.clientSecret??"",command:e?.command??"",args:(e?.args??[]).join(" "),env:ae(e?.env),raw:""}),{mode:h,name:i,url:j,headers:k,clientId:l,clientSecret:m,command:n,args:o,env:q,raw:u}=f,[v,w]=(0,V.useServerAction)(G,{...ai,onOk:a=>{ai.onOk(a),"error"!==a.status&&c()}}),x=(0,p.useMemo)(()=>{var a,b,c,d,e,f,g;let i,p;return"json"===h?function(a){let b,c=a.trim();if(!c)return{value:null,error:""};try{b=JSON.parse(c)}catch{return{value:null,error:"Not valid JSON"}}let d=L.safeParse(b);if(d.success)return{value:{name:null,config:d.data},error:""};let e=R.safeParse(b);if(!e.success)return{value:null,error:"Needs a url or a command"};let f=Object.entries("mcpServers"in e.data?e.data.mcpServers:e.data)[0];return f?{value:{name:f[0],config:f[1]},error:""}:{value:null,error:"No server in there"}}(u):"http"===h?(a=j,b=k,c=l,d=m,(i=J.safeParse({url:a.trim(),headers:af(b),oauthClient:c.trim()?{clientId:c.trim(),clientSecret:d.trim()}:void 0})).success?{value:{name:null,config:i.data},error:""}:{value:null,error:a.trim()?"Needs a valid url":""}):(e=n,f=o,g=q,(p=K.safeParse({command:e.trim(),args:f.split(/\s+/).filter(Boolean),env:af(g)})).success?{value:{name:null,config:p.data},error:""}:{value:null,error:e.trim()?"Needs a command":""})},[h,u,j,k,l,m,n,o,q]),B="json"===h?u:JSON.stringify([h,j,k,l,m,n,o,q]),[C,D]=(0,p.useState)(B);(0,p.useEffect)(()=>{let a=setTimeout(()=>D(B),700);return()=>clearTimeout(a)},[B]);let E=C===B?x.error:"",F=i||x.value?.name||"",H=Q.safeParse({name:F,config:x.value?.config});function I(a){let b=x.value?.config;return b?"json"===a?g({mode:a,raw:JSON.stringify(b,null,2)}):"http"===a&&N(b)?g({mode:a,url:b.url,headers:ae(b.headers),clientId:b.oauthClient?.clientId??"",clientSecret:b.oauthClient?.clientSecret??""}):"stdio"!==a||N(b)?void g({mode:a}):g({mode:a,command:b.command,args:(b.args??[]).join(" "),env:ae(b.env)}):g({mode:a})}let M=(0,b.jsxs)("span",{className:"flex items-center gap-2 font-mono text-xs text-muted-foreground",children:["JSON",(0,b.jsx)(y.Switch,{size:"sm",checked:"json"===h,onCheckedChange:a=>{let b;return a?I("json"):void I((b=x.value?.config)&&!N(b)?"stdio":"http")}})]});return(0,b.jsx)(T.SettingDialogContent,{title:"Add MCP server",description:"Its tools become available to Thursday and every sub-agent.",footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Button,{variant:"ghost",onClick:c,children:"Cancel"}),(0,b.jsx)(r.Button,{disabled:!H.success,loading:w,onClick:()=>{H.success&&!w&&v(H.data)},children:"Connect"})]}),children:(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)(s.Field,{children:[(0,b.jsx)(s.FieldLabel,{children:"Name"}),(0,b.jsx)(t.Input,{value:F,onChange:a=>g({name:a.target.value}),placeholder:"notion",spellCheck:!1})]}),"json"===h?(0,b.jsxs)(s.Field,{children:[(0,b.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,b.jsx)(s.FieldLabel,{children:"JSON"}),M]}),(0,b.jsx)(A.Textarea,{value:u,onChange:a=>g({raw:a.target.value}),spellCheck:!1,placeholder:ag,className:"min-h-64 resize-none font-mono text-xs"})]}):(0,b.jsxs)(z.Tabs,{value:h,onValueChange:a=>I(a),className:"gap-6",children:[(0,b.jsxs)(s.Field,{children:[(0,b.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,b.jsx)(s.FieldLabel,{children:"Transport"}),M]}),(0,b.jsxs)(z.TabsList,{className:"w-full",children:[(0,b.jsx)(z.TabsTrigger,{value:"http",children:"HTTP"}),(0,b.jsx)(z.TabsTrigger,{value:"stdio",children:"STDIO"})]})]}),(0,b.jsxs)(z.TabsContent,{value:"http",className:"space-y-6",children:[(0,b.jsxs)(s.Field,{children:[(0,b.jsx)(s.FieldLabel,{children:"URL"}),(0,b.jsx)(t.Input,{value:j,onChange:a=>g({url:a.target.value}),placeholder:"https://mcp.notion.com/mcp",spellCheck:!1,className:"font-mono text-xs"})]}),(0,b.jsx)(ac,{label:"Headers",pairs:k,onChange:a=>g({headers:a}),keyPlaceholder:"Authorization",valuePlaceholder:"Bearer sk-..."}),(0,b.jsxs)(s.Field,{children:[(0,b.jsx)(s.FieldLabel,{children:"OAuth client"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(t.Input,{value:l,onChange:a=>g({clientId:a.target.value}),placeholder:"Client ID",spellCheck:!1,className:"font-mono text-xs"}),(0,b.jsx)(t.Input,{value:m,onChange:a=>g({clientSecret:a.target.value}),placeholder:"Client secret",spellCheck:!1,type:"password",className:"font-mono text-xs"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Only for servers that refuse to register clients on their own, like Figma. Leave empty and one is created during sign-in."})]})]}),(0,b.jsxs)(z.TabsContent,{value:"stdio",className:"space-y-6",children:[(0,b.jsxs)(s.Field,{children:[(0,b.jsx)(s.FieldLabel,{children:"Command"}),(0,b.jsx)(t.Input,{value:n,onChange:a=>g({command:a.target.value}),placeholder:"npx",spellCheck:!1,className:"font-mono text-xs"})]}),(0,b.jsxs)(s.Field,{children:[(0,b.jsx)(s.FieldLabel,{children:"Args"}),(0,b.jsx)(t.Input,{value:o,onChange:a=>g({args:a.target.value}),placeholder:"-y @notionhq/notion-mcp-server",spellCheck:!1,className:"font-mono text-xs"})]}),(0,b.jsx)(ac,{label:"Env",pairs:q,onChange:a=>g({env:a}),keyPlaceholder:"NOTION_TOKEN",valuePlaceholder:"ntn_..."})]})]}),E&&(0,b.jsx)("p",{className:"font-mono text-xs text-destructive",children:E})]})})}function ac({label:a,pairs:c,onChange:d,keyPlaceholder:e,valuePlaceholder:f}){let g=(a,b)=>d(c.map(c=>c.id===a?{...c,...b}:c));return(0,b.jsxs)(s.Field,{children:[(0,b.jsx)(s.FieldLabel,{children:a}),(0,b.jsxs)("div",{className:"space-y-2",children:[c.map(a=>(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(t.Input,{value:a.key,onChange:b=>g(a.id,{key:b.target.value}),placeholder:e,spellCheck:!1,className:"font-mono text-xs"}),(0,b.jsx)(t.Input,{value:a.value,onChange:b=>g(a.id,{value:b.target.value}),placeholder:f,spellCheck:!1,className:"font-mono text-xs"}),(0,b.jsx)(r.Button,{variant:"ghost",size:"icon",onClick:()=>d(c.filter(b=>b.id!==a.id)),children:(0,b.jsx)(o.X,{})})]},a.id)),(0,b.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>d([...c,ad()]),children:[(0,b.jsx)(i.Plus,{}),"Add"]})]})]})}let ad=(a="",b="")=>({id:crypto.randomUUID(),key:a,value:b}),ae=a=>Object.entries(a??{}).map(([a,b])=>ad(a,b)),af=a=>{let b=a.filter(a=>a.key.trim());if(b.length)return Object.fromEntries(b.map(a=>[a.key.trim(),a.value]))},ag=`/** STDIO Example */
4
4
  {
@@ -1,9 +1,8 @@
1
- module.exports=[684321,a=>{"use strict";var b=a.i(569572);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),f=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${e.join("|")})\b`,"giu"),g=`${b.PATHS.workspace}/`;a.s(["pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(f)??[]){let b=function(a){let b,c,d=(c=(b=a.trim()).indexOf(g))>=0?b.slice(c+g.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null;if(!d)return null;let[e,...f]=d.split("/");return f.length&&e.includes(".")?null:d}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[a.split(".").pop()?.toLowerCase()??""]?.kind??"none"])},451208,a=>{"use strict";var b=a.i(137936),c=a.i(821415),d=a.i(912714),e=a.i(750227),f=a.i(569572),g=a.i(293480);async function h(a){let b=await (0,c.insideWorkspace)(a);b||(0,g.publicError)("Outside the workspace");let e=await (0,d.stat)(b).catch(()=>null);e||(0,g.publicError)("File not found"),e.isFile()||(0,g.publicError)("That is a folder, not a file"),await (0,d.rm)(b)}async function i(){let a=(0,e.join)(c.WORKSPACE,f.PATHS.scratch);for(let b of(await (0,d.readdir)(a).catch(()=>[])))await (0,d.rm)((0,e.join)(a,b),{recursive:!0,force:!0})}a.i(684321);var j=a.i(225689),k=a.i(874533),l=a.i(812057);let m={darwin:a=>["open",[a]],win32:a=>["cmd.exe",["/c","start","",a]],linux:a=>["xdg-open",[a]]};async function n(a){await (0,d.access)(a);let b=m[process.platform]?.(a);if(!b)throw Error(`Opening files is not wired up on ${process.platform}.`);let[c,e]=b;await (0,l.promisify)(k.execFile)(c,e,{windowsHide:!0})}var o=a.i(182248),p=a.i(713095);let q=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?");let d=(await (0,c.openWorkspace)()).resolve(b);try{await n(d)}catch(a){(0,g.publicError)(`Could not open ${b}: ${(0,o.errorToString)(a)}`)}}),r=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?"),await h(b)}),s=(0,j.serverAction)(async()=>i());(0,p.ensureServerEntryExports)([q,r,s]),(0,b.registerServerReference)(q,"7fbd6f0e49811eccb94c49c5cb9f649b9a03d6a678",null),(0,b.registerServerReference)(r,"7f376ce11e02bd8623e15e8cff16afba68bbafc52f",null),(0,b.registerServerReference)(s,"7fefd295187e02f4444371c90821d90314c11d3fe1",null),a.s(["deleteWorkspaceFileAction",0,r,"emptyScratchAction",0,s,"openFileAction",0,q],451208)},821415,a=>{"use strict";var b=a.i(666680),c=a.i(902157),d=a.i(912714),e=a.i(750227),f=a.i(569572);a.i(176668);var g=a.i(874533),h=f;let i=new Set(["node_modules",".git",".next","dist","build",".venv","__pycache__",".turbo","coverage"]);async function*j(a){let b;try{b=await (0,d.readdir)(a,{withFileTypes:!0})}catch{return}for(let c of b){if(i.has(c.name)||c.name.startsWith("."))continue;let b=(0,e.join)(a,c.name);c.isDirectory()?yield*j(b):c.isFile()&&(yield b)}}async function k(a,b,c,f){if(a.length<=f.max)return a;let g=(0,e.join)(c,f.dir),h=(0,e.join)(g,`${new Date().toISOString().replace(/[:.]/g,"-")}-${b.replace(/[^a-zA-Z0-9_-]+/g,"_")}.txt`),i=h;try{await (0,d.mkdir)(g,{recursive:!0}),await (0,d.writeFile)(h,a),i=(0,e.relative)(c,h)||h}catch{i="(could not be written to a file)"}let j=(a.match(/\n/g)?.length??0)+1;return`${a.slice(0,f.head).trimEnd()}
1
+ module.exports=[684321,a=>{"use strict";var b=a.i(569572);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=a=>a.split(".").pop()?.toLowerCase()??"",f=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),g=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${f.join("|")})\b`,"giu"),h=`${b.PATHS.workspace}/`;a.s(["opensOnFinish",0,a=>a.startsWith(`${b.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(e(a)),"pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(g)??[]){let b=function(a){let b,c,d=(c=(b=a.trim()).indexOf(h))>=0?b.slice(c+h.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null;if(!d)return null;let[e,...f]=d.split("/");return f.length&&e.includes(".")?null:d}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[e(a)]?.kind??"none"])},821415,a=>{"use strict";var b=a.i(666680),c=a.i(902157),d=a.i(912714),e=a.i(750227),f=a.i(569572);a.i(176668);var g=a.i(874533),h=f;let i=new Set(["node_modules",".git",".next","dist","build",".venv","__pycache__",".turbo","coverage"]);async function*j(a){let b;try{b=await (0,d.readdir)(a,{withFileTypes:!0})}catch{return}for(let c of b){if(i.has(c.name)||c.name.startsWith("."))continue;let b=(0,e.join)(a,c.name);c.isDirectory()?yield*j(b):c.isFile()&&(yield b)}}async function k(a,b,c,f){if(a.length<=f.max)return a;let g=(0,e.join)(c,f.dir),h=(0,e.join)(g,`${new Date().toISOString().replace(/[:.]/g,"-")}-${b.replace(/[^a-zA-Z0-9_-]+/g,"_")}.txt`),i=h;try{await (0,d.mkdir)(g,{recursive:!0}),await (0,d.writeFile)(h,a),i=(0,e.relative)(c,h)||h}catch{i="(could not be written to a file)"}let j=(a.match(/\n/g)?.length??0)+1;return`${a.slice(0,f.head).trimEnd()}
2
2
 
3
3
  [${b} cut at ${f.max.toLocaleString("en")} chars — the whole thing (${j} lines) is at ${i}. Read the part you need with \`sed -n\`.]
4
4
 
5
5
  ${a.slice(-f.tail).trimStart()}`}let l=f.APP_DIR,m=(0,e.join)(f.DATA_DIR,f.PATHS.workspace),n=(process.env.THURSDAY_TOOL_PATH?.split(":")??[(0,e.join)(l,"node_modules",".bin")]).filter(Boolean),o=(0,e.join)(m,f.PATHS.artifacts),p=[f.PATHS.artifacts,f.PATHS.projects,f.PATHS.scratch,f.PATHS.bots],q=new Set([...p,".agents"]),r=(a,b)=>b===a||b.startsWith(a+e.sep),s=a=>(0,d.realpath)(a).catch(()=>null);async function t(a){let b=await s(m)??m,c=(0,e.resolve)(m,a);if(!r(m,c))return null;let d=c,f=await s(d);for(;null===f&&(0,e.dirname)(d)!==d;)d=(0,e.dirname)(d),f=await s(d);if(null===f)return null;let g=(0,e.relative)(d,c),h=g?(0,e.join)(f,g):f;return r(b,h)?h:null}function u(a,b){let c=b.trim().toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)||"job";return`${f.PATHS.scratch}/${c}-${a.slice(0,6)}`}let v=a=>a.replace(/[^\p{L}\p{N}_-]+/gu,"-"),w=a=>`${f.PATHS.bots}/${v(a)}`,x=a=>`${f.PATHS.artifacts}/${v(a)}`;async function y(a){let b=w(a),c=x(a);return await Promise.all([b,c].map(a=>(0,d.mkdir)((0,e.join)(m,a),{recursive:!0}))),{own:b,artifacts:c}}async function z(a,b){let c=u(a,b);return await (0,d.mkdir)((0,e.join)(m,c),{recursive:!0}),c}let A=a=>a?{PLAYWRIGHT_CLI_SESSION:`thread-${a}`,PLAYWRIGHT_MCP_VIEWPORT_SIZE:f.BROWSER_VIEWPORT}:{},B={runtimes:["node","python3","uv","bun","deno"],managers:["pnpm","npm","yarn"]};async function C(a){let b=Object.values(B).flat(),{stdout:c}=await a.exec(b.map(a=>`command -v ${a} >/dev/null 2>&1 && printf '%s ' ${a}`).join("; "),{timeoutMs:1e4}),d=new Set(c.trim().split(/\s+/).filter(Boolean)),e=a=>({found:a.filter(a=>d.has(a)),missing:a.filter(a=>!d.has(a))});return{runtimes:e(B.runtimes),managers:e(B.managers),browser:null}}async function D(){await H(),await G()}async function E(a){await F(a,!0)}async function F(a,b){let c=await K(),d=A(a),e=await c.exec("playwright-cli list --json",{env:d,timeoutMs:15e3}).catch(()=>null),f=[];try{let{browsers:a}=JSON.parse(e?.stdout??"");f=a?.filter(a=>a.name===d.PLAYWRIGHT_CLI_SESSION||a.name.startsWith(`${d.PLAYWRIGHT_CLI_SESSION}-`))??[]}catch{}for(let a of f)!a.attached&&(b||!1===a.headed)&&await c.exec("playwright-cli close",{env:{...d,PLAYWRIGHT_CLI_SESSION:a.name},timeoutMs:15e3}).catch(()=>{});await D()}let G=()=>I(f.PATHS.output),H=()=>I(".playwright-cli");async function I(a){let b=(0,e.join)(m,a),c=await (0,d.readdir)(b,{withFileTypes:!0}).catch(()=>[]),g=Date.now()-f.WORKSPACE_KEEP.forMs;for(let a of c){if(!a.isFile())continue;let c=(0,e.join)(b,a.name),f=await (0,d.stat)(c).catch(()=>null);f&&f.mtimeMs<g&&await (0,d.unlink)(c).catch(()=>{})}}let J={"pnpm-workspace.yaml":"packages:\n - '**'\n",".npmrc":"recursive-install=false\n"};async function K(){for(let a of p)await (0,d.mkdir)((0,e.join)(m,a),{recursive:!0});for(let[a,b]of Object.entries(J))await (0,d.writeFile)((0,e.join)(m,a),b,{flag:"wx"}).catch(()=>{});return(({workingDirectory:a,spill:b,toolPath:c})=>{let f=(0,e.resolve)(a),i=(c??[]).filter(Boolean).join(":"),l=a=>a.startsWith("/")||/^[A-Za-z]:/.test(a)?a:(0,e.resolve)(f,a);return{cwd:f,resolve:l,readFile:(a,b)=>(0,d.readFile)(l(a),b),async writeFile(a,b){let c=l(a);await (0,d.mkdir)((0,e.join)(c,".."),{recursive:!0}),await (0,d.writeFile)(c,b)},readdir:(a,b)=>(0,d.readdir)(l(a),b),fold:(a,c="output")=>k(a,c,f,b),async glob(a,{path:b=".",limit:c=200}={}){let d=l(b),f=RegExp("^"+a.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*\//g,"(?:.*/)?").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]")+"$"),g=[];for await(let a of j(d)){let b=(0,e.relative)(d,a).split(e.sep).join("/");if((f.test(b)||f.test(a))&&g.push(a),g.length>=c)break}return g},exec:(a,{cwd:c,timeoutMs:d=h.EXEC_TIMEOUT_MS,signal:e,env:j}={})=>new Promise(m=>{let n,o,p=function(){let a={...process.env};for(let b of Object.keys(a))/KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|_AUTH/i.test(b)&&delete a[b];return a.TERM="dumb",a.PAGER="cat",a.GIT_PAGER="cat",a}();i&&(p.PATH=`${p.PATH??""}:${i}`);let q=(0,g.spawn)(a,{shell:!0,cwd:c?l(c):f,env:{...p,...j},detached:!0}),r="",s="";q.stdout?.on("data",a=>r+=a),q.stderr?.on("data",a=>s+=a);let t=a=>{try{q.pid&&process.kill(-q.pid,a)}catch{q.kill(a)}},u=!1,v=async a=>{u||(u=!0,clearTimeout(x),clearTimeout(n),clearTimeout(o),e?.removeEventListener("abort",y),m({...a,stdout:await k(a.stdout,"stdout",f,b),stderr:await k(a.stderr,"stderr",f,b)}))},w=a=>{n||u||(s+=`
6
- [${a}]`,t("SIGTERM"),n=setTimeout(()=>{s+="\n[Killed: it did not exit on SIGTERM]",t("SIGKILL"),o=setTimeout(()=>{q.stdout?.destroy(),q.stderr?.destroy(),v({stdout:r,stderr:s,exitCode:-1})},1e3)},h.EXEC_KILL_GRACE_MS))},x=setTimeout(()=>w(`Timed out after ${d}ms`),d),y=()=>w("Aborted");e?.aborted?y():e?.addEventListener("abort",y,{once:!0}),q.on("close",a=>v({stdout:r,stderr:s,exitCode:a??-1})),q.on("error",a=>v({stdout:r,stderr:s+String(a),exitCode:-1}))})}})({workingDirectory:m,spill:{dir:f.PATHS.output,...f.TOOL_OUTPUT},toolPath:n})}async function L(a,b){let c=a.map(a=>(0,e.resolve)(m,a));if(b){let a=0;for await(let d of j((0,e.join)(m,b)))if(c.push(d),(a+=1)>=500)break}let f=new Map;for(let a of c){let b=await (0,d.stat)(a).catch(()=>null);if(!b?.isFile())continue;let c=(0,e.relative)(m,a);f.set(c&&!c.startsWith("..")?c:a,b.mtimeMs)}return[...f].sort((a,b)=>a[1]-b[1]).map(([a])=>a)}async function M(a,b){await (0,d.rm)((0,e.join)(m,u(a,b)),{recursive:!0,force:!0}).catch(()=>{})}a.s(["ARTIFACTS",0,o,"WORKSPACE",0,m,"botArtifacts",0,x,"botBrowserSession",0,(a,c)=>`${a}-bot-${(0,b.createHash)("sha256").update(c.trim().toLowerCase()).digest("hex").slice(0,20)}`,"botFolder",0,w,"botFolderName",0,v,"botShellEnv",0,a=>({THURSDAY_ARTIFACTS:x(a)}),"closeJobShell",0,E,"filesOnDisk",0,L,"insideWorkspace",0,t,"jobShellEnv",0,A,"openBotFolders",0,y,"openJobScratch",0,z,"openWorkspace",0,K,"readMachineTools",0,C,"removeJobScratch",0,M,"writeRefusal",0,function(a,b){if(r(m,a)){let d=(0,e.relative)(m,a),[g,h]=d.split(e.sep);return g&&q.has(g)?b&&g===f.PATHS.artifacts&&h&&h.toLowerCase()!==v(b).toLowerCase()&&!(0,c.existsSync)((0,e.join)(o,h))?`Not written: ${d} would sit loose at the top of ${f.PATHS.artifacts}/. Your finished work goes in ${x(b)}/.`:null:`Not written: ${d||"the workspace root"} is outside the workspace's folders. Finished work goes under ${b?x(b):f.PATHS.artifacts}/, code under ${f.PATHS.projects}/, your own kit under ${f.PATHS.bots}/, and this job's working material under ${f.PATHS.scratch}/.`}return r(l,a)?`Not written: ${a} is inside the app that is running you, not the user's files. Work in ${m}; outside it, write only where the user pointed you.`:null}],821415)},225689,a=>{"use strict";a.i(570396);var b=a.i(673727),c=a.i(975160),d=a.i(176668),e=a.i(293480);let f=a=>!!a&&"object"==typeof a&&(!0===a.$ok||!1===a.$ok),g=a=>f(a)&&a.$ok,h=a=>({$ok:!0,data:a}),i=a=>({$ok:!1,message:a});async function j(a){try{let b=h(await a());for(;g(b)&&f(b.data);)b=b.data;return b}catch(a){if((0,b.unstable_rethrow)(a),(0,e.isPublicError)(a))return i(a.message);if(a instanceof c.ZodError)return i(a.issues[0]?.message);if(f(a)&&!a.$ok)return a;return d.logger.error(a),i()}}a.s(["serverAction",0,a=>(...b)=>j(()=>a(...b))],225689)},713095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
7
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},137936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(211857)}];
6
+ [${a}]`,t("SIGTERM"),n=setTimeout(()=>{s+="\n[Killed: it did not exit on SIGTERM]",t("SIGKILL"),o=setTimeout(()=>{q.stdout?.destroy(),q.stderr?.destroy(),v({stdout:r,stderr:s,exitCode:-1})},1e3)},h.EXEC_KILL_GRACE_MS))},x=setTimeout(()=>w(`Timed out after ${d}ms`),d),y=()=>w("Aborted");e?.aborted?y():e?.addEventListener("abort",y,{once:!0}),q.on("close",a=>v({stdout:r,stderr:s,exitCode:a??-1})),q.on("error",a=>v({stdout:r,stderr:s+String(a),exitCode:-1}))})}})({workingDirectory:m,spill:{dir:f.PATHS.output,...f.TOOL_OUTPUT},toolPath:n})}async function L(a,b){let c=a.map(a=>(0,e.resolve)(m,a));if(b){let a=0;for await(let d of j((0,e.join)(m,b)))if(c.push(d),(a+=1)>=500)break}let f=new Map;for(let a of c){let b=await (0,d.stat)(a).catch(()=>null);if(!b?.isFile())continue;let c=(0,e.relative)(m,a);f.set(c&&!c.startsWith("..")?c:a,b.mtimeMs)}return[...f].sort((a,b)=>a[1]-b[1]).map(([a])=>a)}async function M(a,b){await (0,d.rm)((0,e.join)(m,u(a,b)),{recursive:!0,force:!0}).catch(()=>{})}a.s(["ARTIFACTS",0,o,"WORKSPACE",0,m,"botArtifacts",0,x,"botBrowserSession",0,(a,c)=>`${a}-bot-${(0,b.createHash)("sha256").update(c.trim().toLowerCase()).digest("hex").slice(0,20)}`,"botFolder",0,w,"botFolderName",0,v,"botShellEnv",0,a=>({THURSDAY_ARTIFACTS:x(a)}),"closeJobShell",0,E,"filesOnDisk",0,L,"insideWorkspace",0,t,"jobShellEnv",0,A,"openBotFolders",0,y,"openJobScratch",0,z,"openWorkspace",0,K,"readMachineTools",0,C,"removeJobScratch",0,M,"writeRefusal",0,function(a,b){if(r(m,a)){let d=(0,e.relative)(m,a),[g,h]=d.split(e.sep);return g&&q.has(g)?b&&g===f.PATHS.artifacts&&h&&h.toLowerCase()!==v(b).toLowerCase()&&!(0,c.existsSync)((0,e.join)(o,h))?`Not written: ${d} would sit loose at the top of ${f.PATHS.artifacts}/. Your finished work goes in ${x(b)}/.`:null:`Not written: ${d||"the workspace root"} is outside the workspace's folders. Finished work goes under ${b?x(b):f.PATHS.artifacts}/, code under ${f.PATHS.projects}/, your own kit under ${f.PATHS.bots}/, and this job's working material under ${f.PATHS.scratch}/.`}return r(l,a)?`Not written: ${a} is inside the app that is running you, not the user's files. Work in ${m}; outside it, write only where the user pointed you.`:null}],821415)}];
8
7
 
9
- //# sourceMappingURL=_0c9e5w6._.js.map
8
+ //# sourceMappingURL=features_workspace_00jz2hu._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])},617803,a=>{"use strict";var b=a.i(361055),c=a.i(887370),d=a.i(261234),e=a.i(875117),f=a.i(539110),g=a.i(838673),h=a.i(841243);a.i(975930);var i=a.i(671731),j="position frame",k="frame positioned",l="position relation",m="relation positioned",n=(0,f.__name)(function(a){e.log.debug("options str",a)},"setOptions"),o=(0,f.__name)(function(){return{}},"getOptions"),p=(0,f.__name)(function(){q(),(0,d.clear)()},"clear");function q(){t={}}(0,f.__name)(q,"reset");var r=d.defaultConfig_default.eventmodeling,s=(0,f.__name)(()=>(0,c.cleanAndMerge)({...r,...(0,d.getConfig)().eventmodeling}),"getConfig"),t={};function u(){let a=y,{ast:b}=t,c=x();if(!b)throw Error("No data for EventModel");return b.frames.forEach((d,f)=>{let g=F(d,b.dataEntities,c);a=V(a,{$kind:j,index:f,frame:d,textProps:g}),M(d)?(e.log.debug("source frame",d.sourceFrames),b.frames.filter(a=>d.sourceFrames.some(b=>b.$refText===a.name)).forEach(b=>{a=V(a,{$kind:l,index:f,frame:d,sourceFrame:b})})):a=V(a,{$kind:l,index:f,frame:d})}),a={...a,sortedSwimlanesArray:J(a.swimlanes)}}function v(a){t.ast=a}(0,f.__name)(u,"getState"),(0,f.__name)(v,"setAst");var w={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function x(){return w}(0,f.__name)(x,"getDiagramProps");var y={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function z(a){let b=a.split(".");if(2===b.length)return b[0]}function A(a){let b=a.split(".");return 2===b.length?b[1]:a}function B(a,b){if(b&&0!==b.length)return Object.values(a).find(a=>a.namespace===b)}function C(a,b,c){return Math.max(b,...Object.keys(a).filter(a=>{let d=Number.parseInt(a);return d>b&&d<c}).map(a=>Number.parseInt(a)))+1}function D(a,b){let c=z(a.entityIdentifier),d=B(b,c);switch(a.modelEntityType){case"ui":case"pcr":case"processor":if(d)return{index:d.index,label:d.namespace||w.labelUiAutomation};if(c)return{index:C(b,0,100),label:w.labelUiAutomationPrefix+c};return{index:0,label:w.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(d)return{index:d.index,label:d.namespace||w.labelCommandReadModel};if(c)return{index:C(b,100,200),label:w.labelCommandReadModelPrefix+c};return{index:100,label:w.labelCommandReadModel};default:if(d)return{index:d.index,label:d.namespace||w.labelEvents};if(c)return{index:C(b,200,300),label:w.labelEventsPrefix+c};return{index:200,label:w.labelEvents}}}function E(a){let{themeVariables:b}=(0,d.getConfig)();switch(a.modelEntityType){case"ui":return{fill:b.emUiFill??"white",stroke:b.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:b.emProcessorFill??"#edb3f6",stroke:b.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:b.emReadModelFill??"#d3f1a2",stroke:b.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:b.emCommandFill??"#bcd6fe",stroke:b.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:b.emEventFill??"#ffb778",stroke:b.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function F(a,b,f){let g,h=(0,d.getConfig)(),i=(0,d.sanitizeText)(A(a.entityIdentifier)??"",h),j={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},k=(0,c.wrapLabel)(i,f.textMaxWidth,j),l=`<b>${k}</b>`;if(a.dataInlineValue&&(g=(g=(g=a.dataInlineValue).substring(g.indexOf("{")+1)).substring(0,g.lastIndexOf("}")-1),g=(0,d.sanitizeText)(g,h),g=(g=(0,c.wrapLabel)(g,f.textMaxWidth,j)).replaceAll(" ","&nbsp;")),a.dataReference){let e=b.find(b=>b.name===a.dataReference?.$refText);e&&(g=(g=(g=e.dataBlockValue).substring(g.indexOf("{\n")+2)).substring(0,g.lastIndexOf("}")-1),g=(0,d.sanitizeText)(g,h),g=(g=(0,c.wrapLabel)(g,f.textMaxWidth,j)).replaceAll(" ","&nbsp;")+"<br/>")}let m=void 0!==g;m&&(l+=`<br/><br/><code style="text-align: left; display: block;max-width:${f.textMaxWidth}px">${g}</code>`);let n={fontSize:j.fontSize,fontWeight:j.fontWeight,fontFamily:j.fontFamily},o=(0,c.calculateTextDimensions)(l,n),p={content:l,width:m?o.width/3:o.width,height:o.height};return e.log.debug(`[${a.name}] ${a.entityIdentifier} text`,p),p}function G(a,b){let c=E(b.frame),d={width:b.textProps.width+2*w.boxTextPadding,height:b.textProps.height+2*w.boxTextPadding};return[{$kind:k,frame:b.frame,index:b.index,visual:c,dimension:d,textProps:b.textProps}]}function H(a,b,c){return void 0===b?w.contentStartX:b.index===a.index&&a.r?a.r+w.boxPadding:void 0===c?w.contentStartX:c.r-w.boxOverlap+w.boxPadding}function I(a,b){return Math.max(...a.map(a=>a.r),b)}function J(a){return Object.values(a).sort((a,b)=>a.index-b.index)}function K(a,b){let c,d=D(b.frame,a.swimlanes);c=d.index in a.swimlanes?a.swimlanes[d.index]:{index:d.index,label:d.label,r:0,y:d.index*w.swimlaneMinHeight+w.swimlaneGap,height:w.swimlaneMinHeight,maxHeight:w.swimlaneMinHeight};let e=a.boxes.length>0?a.boxes[a.boxes.length-1]:void 0,f=void 0!==a.previousSwimlaneNumber?a.swimlanes[a.previousSwimlaneNumber]:void 0,g={width:Math.max(w.boxMinWidth,Math.min(w.boxMaxWidth,b.dimension.width))+2*w.boxPadding,height:Math.max(w.boxMinHeight,Math.min(w.boxMaxHeight,b.dimension.height))+2*w.boxPadding},h=H(c,f,e),i=h+g.width+w.boxPadding,j=I(Object.values(a.swimlanes),i);c.r=h+g.width,c.maxHeight=Math.max(c.maxHeight,g.height),c.height=Math.max(w.swimlaneMinHeight,c.maxHeight)+2*w.swimlanePadding;let k={x:h,y:w.swimlanePadding+c.y,r:i,dimension:g,leftSibling:!1,swimlane:c,visual:b.visual,text:b.textProps.content,frame:b.frame,index:b.index},l={...a,boxes:[...a.boxes,k],swimlanes:{...a.swimlanes,[`${c.index}`]:c},previousSwimlaneNumber:d.index,previousFrame:b.frame,maxR:j},m=J(l.swimlanes);m.length>0&&(m[0].y=0);for(let a=1;a<m.length;a++){let b=m[a],c=m[a-1];b.y=c.y+c.height+w.swimlaneGap}return l}function L(a,b){return 0===a&&0===b.sourceFrames.length}function M(a){return void 0!==a.sourceFrames&&null!==a.sourceFrames&&a.sourceFrames.length>0}function N(a,b){if(null!=b)return a.find(a=>a.frame.name===b.name)}function O(a,b,c){if(!(c<0))for(let d=c;d>=0;d--){let c=a[d];if(c.swimlane.index!==b)return c}}function P(a,b){let c;if((0,h.isEmResetFrame)(b.frame)||L(b.index,b.frame))return[];let d=N(a.boxes,b.frame);if(void 0===d)throw Error(`Target box not found for frame ${b.frame.name}`);return void 0===(c=b.sourceFrame?N(a.boxes,b.sourceFrame):O(a.boxes,d.swimlane.index,b.index-1))?[]:[{$kind:m,frame:b.frame,index:b.index,sourceBox:c,targetBox:d}]}function Q(a,b){let c={visual:{fill:"none",stroke:"#000"},source:{x:b.sourceBox.x,y:b.sourceBox.y},target:{x:b.targetBox.x,y:b.targetBox.y},sourceBox:b.sourceBox,targetBox:b.targetBox};return{...a,relations:[...a.relations,c]}}(0,f.__name)(z,"extractNamespace"),(0,f.__name)(A,"extractName"),(0,f.__name)(B,"findSwimlaneByNamespace"),(0,f.__name)(C,"findNextAvailableIndex"),(0,f.__name)(D,"calculateSwimlaneProps"),(0,f.__name)(E,"calculateEntityVisualProps"),(0,f.__name)(F,"calculateTextProps"),(0,f.__name)(G,"decidePositionFrame"),(0,f.__name)(H,"calculateX"),(0,f.__name)(I,"calculateMaxRight"),(0,f.__name)(J,"sortedSwimlanesArray"),(0,f.__name)(K,"evolveFramePositioned"),(0,f.__name)(L,"isFirstFrame"),(0,f.__name)(M,"hasSourceFrame"),(0,f.__name)(N,"findBoxByFrame"),(0,f.__name)(O,"findBoxByLineIndex"),(0,f.__name)(P,"decidePositionRelation"),(0,f.__name)(Q,"evolveRelationPositioned");var R={[j]:G,[l]:P},S={[k]:K,[m]:Q};function T(a,b){let c=R[b.$kind];if(null==c)return[];let d=c(a,b);return e.log.debug("decided events",d),d}function U(a,b){let c=b.reduce((a,b)=>{let c=S[b.$kind];return null==c?a:c(a,b)},a);return e.log.debug("evolve events",{state:a,newState:c,events:b}),c}function V(a,b){let c=T(a,b);return U(a,c)}(0,f.__name)(T,"decide"),(0,f.__name)(U,"evolve"),(0,f.__name)(V,"dispatch");var W={getConfig:s,setOptions:n,getOptions:o,clear:p,setAccTitle:d.setAccTitle,getAccTitle:d.getAccTitle,getAccDescription:d.getAccDescription,setAccDescription:d.setAccDescription,setDiagramTitle:d.setDiagramTitle,getDiagramTitle:d.getDiagramTitle,setAst:v,getDiagramProps:x,getState:u},X={parse:(0,f.__name)(async a=>{let c=await (0,g.parse)("eventmodeling",a);e.log.debug(c),W.setAst(c),(0,b.populateCommonDb)(c,W)},"parse")},Y=(0,d.getConfig2)(),Z=Y?.eventmodeling;function $(a,b){return c=>{let d=c.swimlane.y+b.swimlanePadding,e=a.append("g").attr("class","em-box");e.append("rect").attr("x",c.x).attr("y",d).attr("rx","3").attr("width",c.dimension.width).attr("height",c.dimension.height).attr("stroke",c.visual.stroke).attr("fill",c.visual.fill),e.append("foreignObject").attr("x",c.x+b.boxPadding).attr("y",d+10).attr("width",c.dimension.width-2*b.boxPadding).attr("height",c.dimension.height-2*b.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(c.text)}}function _(a,b){return a>b}function aa(a,b,c,d){return f=>{let g,h,i=f.sourceBox.swimlane.y+b.swimlanePadding,j=f.targetBox.swimlane.y+b.swimlanePadding,k=_(i,j),l=f.sourceBox.x+2*f.sourceBox.dimension.width/3,m=f.targetBox.x+f.targetBox.dimension.width/3;e.log.debug(`rendering relation up=${k} for `,{sourceBox:f.sourceBox,targetBox:f.targetBox}),k?(g=i,h=j+f.targetBox.dimension.height):(g=i+f.sourceBox.dimension.height,h=j);let n=d.emRelationStroke??f.visual.stroke;a.append("path").attr("class","em-relation").attr("fill",f.visual.fill).attr("stroke",n).attr("stroke-width","1").attr("marker-end",`url(#${c})`).attr("d",`M${l} ${g} L${m} ${h}`)}}function ab(a,b,c,d){return e=>{let f=a.append("g").attr("class","em-swimlane"),g=d.emSwimlaneBackgroundOdd??"rgb(250,250,250)",h=d.emSwimlaneBackgroundStroke??"rgb(240,240,240)";f.append("rect").attr("x",0).attr("y",e.y).attr("rx","3").attr("width",b+c.swimlanePadding).attr("height",e.height).attr("fill",g).attr("stroke",h),f.append("text").attr("font-weight",c.swimlaneTextFontWeight).attr("x",30).attr("y",e.y+30).text(e.label)}}(0,f.__name)($,"renderD3Box"),(0,f.__name)(_,"dirUpwards"),(0,f.__name)(aa,"renderD3Relation"),(0,f.__name)(ab,"renderD3Swimlane");var ac=(0,f.__name)(function(a,b,c,f){if(e.log.debug("in eventmodeling renderer",a+"\n","id:",b,c),!Z)throw Error("EventModeling config not found");let g=f.db,{themeVariables:h,eventmodeling:j}=(0,d.getConfig2)(),k=(0,i.select)(`[id="${b}"]`),l=g.getDiagramProps(),m=g.getState(),n=`em-arrowhead-${b}`,o=h.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ab(k,m.maxR,l,h)),m.boxes.forEach($(k,l)),m.relations.forEach(aa(k,l,n,h)),k.append("defs").append("marker").attr("id",n).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",o),(0,d.setupGraphViewbox2)(void 0,k,j?.padding??30,j?.useMaxWidth)},"draw"),ad=(0,f.__name)(a=>"","getStyles");a.s(["diagram",0,{parser:X,db:W,renderer:{draw:ac},styles:ad}])}];
2
2
 
3
- //# sourceMappingURL=node_modules_0746rzi._.js.map
3
+ //# sourceMappingURL=node_modules_02ai7br._.js.map
@@ -23,4 +23,4 @@ module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@
23
23
  }
24
24
  `},"styles");a.s(["diagram",0,{parser:m,get db(){return new j},renderer:{draw:n},styles:q}])}];
25
25
 
26
- //# sourceMappingURL=node_modules_0vsxbzp._.js.map
26
+ //# sourceMappingURL=node_modules_02deexj._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])}];
2
2
 
3
- //# sourceMappingURL=node_modules_1g1eihe._.js.map
3
+ //# sourceMappingURL=node_modules_07za262._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])},617803,a=>{"use strict";var b=a.i(361055),c=a.i(887370),d=a.i(261234),e=a.i(875117),f=a.i(539110),g=a.i(838673),h=a.i(841243);a.i(975930);var i=a.i(671731),j="position frame",k="frame positioned",l="position relation",m="relation positioned",n=(0,f.__name)(function(a){e.log.debug("options str",a)},"setOptions"),o=(0,f.__name)(function(){return{}},"getOptions"),p=(0,f.__name)(function(){q(),(0,d.clear)()},"clear");function q(){t={}}(0,f.__name)(q,"reset");var r=d.defaultConfig_default.eventmodeling,s=(0,f.__name)(()=>(0,c.cleanAndMerge)({...r,...(0,d.getConfig)().eventmodeling}),"getConfig"),t={};function u(){let a=y,{ast:b}=t,c=x();if(!b)throw Error("No data for EventModel");return b.frames.forEach((d,f)=>{let g=F(d,b.dataEntities,c);a=V(a,{$kind:j,index:f,frame:d,textProps:g}),M(d)?(e.log.debug("source frame",d.sourceFrames),b.frames.filter(a=>d.sourceFrames.some(b=>b.$refText===a.name)).forEach(b=>{a=V(a,{$kind:l,index:f,frame:d,sourceFrame:b})})):a=V(a,{$kind:l,index:f,frame:d})}),a={...a,sortedSwimlanesArray:J(a.swimlanes)}}function v(a){t.ast=a}(0,f.__name)(u,"getState"),(0,f.__name)(v,"setAst");var w={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function x(){return w}(0,f.__name)(x,"getDiagramProps");var y={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function z(a){let b=a.split(".");if(2===b.length)return b[0]}function A(a){let b=a.split(".");return 2===b.length?b[1]:a}function B(a,b){if(b&&0!==b.length)return Object.values(a).find(a=>a.namespace===b)}function C(a,b,c){return Math.max(b,...Object.keys(a).filter(a=>{let d=Number.parseInt(a);return d>b&&d<c}).map(a=>Number.parseInt(a)))+1}function D(a,b){let c=z(a.entityIdentifier),d=B(b,c);switch(a.modelEntityType){case"ui":case"pcr":case"processor":if(d)return{index:d.index,label:d.namespace||w.labelUiAutomation};if(c)return{index:C(b,0,100),label:w.labelUiAutomationPrefix+c};return{index:0,label:w.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(d)return{index:d.index,label:d.namespace||w.labelCommandReadModel};if(c)return{index:C(b,100,200),label:w.labelCommandReadModelPrefix+c};return{index:100,label:w.labelCommandReadModel};default:if(d)return{index:d.index,label:d.namespace||w.labelEvents};if(c)return{index:C(b,200,300),label:w.labelEventsPrefix+c};return{index:200,label:w.labelEvents}}}function E(a){let{themeVariables:b}=(0,d.getConfig)();switch(a.modelEntityType){case"ui":return{fill:b.emUiFill??"white",stroke:b.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:b.emProcessorFill??"#edb3f6",stroke:b.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:b.emReadModelFill??"#d3f1a2",stroke:b.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:b.emCommandFill??"#bcd6fe",stroke:b.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:b.emEventFill??"#ffb778",stroke:b.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function F(a,b,f){let g,h=(0,d.getConfig)(),i=(0,d.sanitizeText)(A(a.entityIdentifier)??"",h),j={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},k=(0,c.wrapLabel)(i,f.textMaxWidth,j),l=`<b>${k}</b>`;if(a.dataInlineValue&&(g=(g=(g=a.dataInlineValue).substring(g.indexOf("{")+1)).substring(0,g.lastIndexOf("}")-1),g=(0,d.sanitizeText)(g,h),g=(g=(0,c.wrapLabel)(g,f.textMaxWidth,j)).replaceAll(" ","&nbsp;")),a.dataReference){let e=b.find(b=>b.name===a.dataReference?.$refText);e&&(g=(g=(g=e.dataBlockValue).substring(g.indexOf("{\n")+2)).substring(0,g.lastIndexOf("}")-1),g=(0,d.sanitizeText)(g,h),g=(g=(0,c.wrapLabel)(g,f.textMaxWidth,j)).replaceAll(" ","&nbsp;")+"<br/>")}let m=void 0!==g;m&&(l+=`<br/><br/><code style="text-align: left; display: block;max-width:${f.textMaxWidth}px">${g}</code>`);let n={fontSize:j.fontSize,fontWeight:j.fontWeight,fontFamily:j.fontFamily},o=(0,c.calculateTextDimensions)(l,n),p={content:l,width:m?o.width/3:o.width,height:o.height};return e.log.debug(`[${a.name}] ${a.entityIdentifier} text`,p),p}function G(a,b){let c=E(b.frame),d={width:b.textProps.width+2*w.boxTextPadding,height:b.textProps.height+2*w.boxTextPadding};return[{$kind:k,frame:b.frame,index:b.index,visual:c,dimension:d,textProps:b.textProps}]}function H(a,b,c){return void 0===b?w.contentStartX:b.index===a.index&&a.r?a.r+w.boxPadding:void 0===c?w.contentStartX:c.r-w.boxOverlap+w.boxPadding}function I(a,b){return Math.max(...a.map(a=>a.r),b)}function J(a){return Object.values(a).sort((a,b)=>a.index-b.index)}function K(a,b){let c,d=D(b.frame,a.swimlanes);c=d.index in a.swimlanes?a.swimlanes[d.index]:{index:d.index,label:d.label,r:0,y:d.index*w.swimlaneMinHeight+w.swimlaneGap,height:w.swimlaneMinHeight,maxHeight:w.swimlaneMinHeight};let e=a.boxes.length>0?a.boxes[a.boxes.length-1]:void 0,f=void 0!==a.previousSwimlaneNumber?a.swimlanes[a.previousSwimlaneNumber]:void 0,g={width:Math.max(w.boxMinWidth,Math.min(w.boxMaxWidth,b.dimension.width))+2*w.boxPadding,height:Math.max(w.boxMinHeight,Math.min(w.boxMaxHeight,b.dimension.height))+2*w.boxPadding},h=H(c,f,e),i=h+g.width+w.boxPadding,j=I(Object.values(a.swimlanes),i);c.r=h+g.width,c.maxHeight=Math.max(c.maxHeight,g.height),c.height=Math.max(w.swimlaneMinHeight,c.maxHeight)+2*w.swimlanePadding;let k={x:h,y:w.swimlanePadding+c.y,r:i,dimension:g,leftSibling:!1,swimlane:c,visual:b.visual,text:b.textProps.content,frame:b.frame,index:b.index},l={...a,boxes:[...a.boxes,k],swimlanes:{...a.swimlanes,[`${c.index}`]:c},previousSwimlaneNumber:d.index,previousFrame:b.frame,maxR:j},m=J(l.swimlanes);m.length>0&&(m[0].y=0);for(let a=1;a<m.length;a++){let b=m[a],c=m[a-1];b.y=c.y+c.height+w.swimlaneGap}return l}function L(a,b){return 0===a&&0===b.sourceFrames.length}function M(a){return void 0!==a.sourceFrames&&null!==a.sourceFrames&&a.sourceFrames.length>0}function N(a,b){if(null!=b)return a.find(a=>a.frame.name===b.name)}function O(a,b,c){if(!(c<0))for(let d=c;d>=0;d--){let c=a[d];if(c.swimlane.index!==b)return c}}function P(a,b){let c;if((0,h.isEmResetFrame)(b.frame)||L(b.index,b.frame))return[];let d=N(a.boxes,b.frame);if(void 0===d)throw Error(`Target box not found for frame ${b.frame.name}`);return void 0===(c=b.sourceFrame?N(a.boxes,b.sourceFrame):O(a.boxes,d.swimlane.index,b.index-1))?[]:[{$kind:m,frame:b.frame,index:b.index,sourceBox:c,targetBox:d}]}function Q(a,b){let c={visual:{fill:"none",stroke:"#000"},source:{x:b.sourceBox.x,y:b.sourceBox.y},target:{x:b.targetBox.x,y:b.targetBox.y},sourceBox:b.sourceBox,targetBox:b.targetBox};return{...a,relations:[...a.relations,c]}}(0,f.__name)(z,"extractNamespace"),(0,f.__name)(A,"extractName"),(0,f.__name)(B,"findSwimlaneByNamespace"),(0,f.__name)(C,"findNextAvailableIndex"),(0,f.__name)(D,"calculateSwimlaneProps"),(0,f.__name)(E,"calculateEntityVisualProps"),(0,f.__name)(F,"calculateTextProps"),(0,f.__name)(G,"decidePositionFrame"),(0,f.__name)(H,"calculateX"),(0,f.__name)(I,"calculateMaxRight"),(0,f.__name)(J,"sortedSwimlanesArray"),(0,f.__name)(K,"evolveFramePositioned"),(0,f.__name)(L,"isFirstFrame"),(0,f.__name)(M,"hasSourceFrame"),(0,f.__name)(N,"findBoxByFrame"),(0,f.__name)(O,"findBoxByLineIndex"),(0,f.__name)(P,"decidePositionRelation"),(0,f.__name)(Q,"evolveRelationPositioned");var R={[j]:G,[l]:P},S={[k]:K,[m]:Q};function T(a,b){let c=R[b.$kind];if(null==c)return[];let d=c(a,b);return e.log.debug("decided events",d),d}function U(a,b){let c=b.reduce((a,b)=>{let c=S[b.$kind];return null==c?a:c(a,b)},a);return e.log.debug("evolve events",{state:a,newState:c,events:b}),c}function V(a,b){let c=T(a,b);return U(a,c)}(0,f.__name)(T,"decide"),(0,f.__name)(U,"evolve"),(0,f.__name)(V,"dispatch");var W={getConfig:s,setOptions:n,getOptions:o,clear:p,setAccTitle:d.setAccTitle,getAccTitle:d.getAccTitle,getAccDescription:d.getAccDescription,setAccDescription:d.setAccDescription,setDiagramTitle:d.setDiagramTitle,getDiagramTitle:d.getDiagramTitle,setAst:v,getDiagramProps:x,getState:u},X={parse:(0,f.__name)(async a=>{let c=await (0,g.parse)("eventmodeling",a);e.log.debug(c),W.setAst(c),(0,b.populateCommonDb)(c,W)},"parse")},Y=(0,d.getConfig2)(),Z=Y?.eventmodeling;function $(a,b){return c=>{let d=c.swimlane.y+b.swimlanePadding,e=a.append("g").attr("class","em-box");e.append("rect").attr("x",c.x).attr("y",d).attr("rx","3").attr("width",c.dimension.width).attr("height",c.dimension.height).attr("stroke",c.visual.stroke).attr("fill",c.visual.fill),e.append("foreignObject").attr("x",c.x+b.boxPadding).attr("y",d+10).attr("width",c.dimension.width-2*b.boxPadding).attr("height",c.dimension.height-2*b.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(c.text)}}function _(a,b){return a>b}function aa(a,b,c,d){return f=>{let g,h,i=f.sourceBox.swimlane.y+b.swimlanePadding,j=f.targetBox.swimlane.y+b.swimlanePadding,k=_(i,j),l=f.sourceBox.x+2*f.sourceBox.dimension.width/3,m=f.targetBox.x+f.targetBox.dimension.width/3;e.log.debug(`rendering relation up=${k} for `,{sourceBox:f.sourceBox,targetBox:f.targetBox}),k?(g=i,h=j+f.targetBox.dimension.height):(g=i+f.sourceBox.dimension.height,h=j);let n=d.emRelationStroke??f.visual.stroke;a.append("path").attr("class","em-relation").attr("fill",f.visual.fill).attr("stroke",n).attr("stroke-width","1").attr("marker-end",`url(#${c})`).attr("d",`M${l} ${g} L${m} ${h}`)}}function ab(a,b,c,d){return e=>{let f=a.append("g").attr("class","em-swimlane"),g=d.emSwimlaneBackgroundOdd??"rgb(250,250,250)",h=d.emSwimlaneBackgroundStroke??"rgb(240,240,240)";f.append("rect").attr("x",0).attr("y",e.y).attr("rx","3").attr("width",b+c.swimlanePadding).attr("height",e.height).attr("fill",g).attr("stroke",h),f.append("text").attr("font-weight",c.swimlaneTextFontWeight).attr("x",30).attr("y",e.y+30).text(e.label)}}(0,f.__name)($,"renderD3Box"),(0,f.__name)(_,"dirUpwards"),(0,f.__name)(aa,"renderD3Relation"),(0,f.__name)(ab,"renderD3Swimlane");var ac=(0,f.__name)(function(a,b,c,f){if(e.log.debug("in eventmodeling renderer",a+"\n","id:",b,c),!Z)throw Error("EventModeling config not found");let g=f.db,{themeVariables:h,eventmodeling:j}=(0,d.getConfig2)(),k=(0,i.select)(`[id="${b}"]`),l=g.getDiagramProps(),m=g.getState(),n=`em-arrowhead-${b}`,o=h.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ab(k,m.maxR,l,h)),m.boxes.forEach($(k,l)),m.relations.forEach(aa(k,l,n,h)),k.append("defs").append("marker").attr("id",n).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",o),(0,d.setupGraphViewbox2)(void 0,k,j?.padding??30,j?.useMaxWidth)},"draw"),ad=(0,f.__name)(a=>"","getStyles");a.s(["diagram",0,{parser:X,db:W,renderer:{draw:ac},styles:ad}])}];
2
2
 
3
- //# sourceMappingURL=node_modules_0332gw4._.js.map
3
+ //# sourceMappingURL=node_modules_0_s9get._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},474394,328939,782970,a=>{"use strict";function b(a,b){if(!isFinite(a)||0===a)return null;var c=(a=b?a.toExponential(b-1):a.toExponential()).indexOf("e"),d=a.slice(0,c);return[d.length>1?d[0]+d.slice(2):d,+a.slice(c+1)]}function c(a){return(a=b(Math.abs(a)))?a[1]:NaN}a.s(["default",0,c],328939);var d,e,f,g,h=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(a){var b;if(!(b=h.exec(a)))throw Error("invalid format: "+a);return new j({fill:b[1],align:b[2],sign:b[3],symbol:b[4],zero:b[5],width:b[6],comma:b[7],precision:b[8]&&b[8].slice(1),trim:b[9],type:b[10]})}function j(a){this.fill=void 0===a.fill?" ":a.fill+"",this.align=void 0===a.align?">":a.align+"",this.sign=void 0===a.sign?"-":a.sign+"",this.symbol=void 0===a.symbol?"":a.symbol+"",this.zero=!!a.zero,this.width=void 0===a.width?void 0:+a.width,this.comma=!!a.comma,this.precision=void 0===a.precision?void 0:+a.precision,this.trim=!!a.trim,this.type=void 0===a.type?"":a.type+""}function k(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1];return f<0?"0."+Array(-f).join("0")+e:e.length>f+1?e.slice(0,f+1)+"."+e.slice(f+1):e+Array(f-e.length+2).join("0")}i.prototype=j.prototype,j.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},a.s(["default",0,i],782970);let l={"%":(a,b)=>(100*a).toFixed(b),b:a=>Math.round(a).toString(2),c:a=>a+"",d:function(a){return Math.abs(a=Math.round(a))>=1e21?a.toLocaleString("en").replace(/,/g,""):a.toString(10)},e:(a,b)=>a.toExponential(b),f:(a,b)=>a.toFixed(b),g:(a,b)=>a.toPrecision(b),o:a=>Math.round(a).toString(8),p:(a,b)=>k(100*a,b),r:k,s:function(a,c){var e=b(a,c);if(!e)return d=void 0,a.toPrecision(c);var f=e[0],g=e[1],h=g-(d=3*Math.max(-8,Math.min(8,Math.floor(g/3))))+1,i=f.length;return h===i?f:h>i?f+Array(h-i+1).join("0"):h>0?f.slice(0,h)+"."+f.slice(h):"0."+Array(1-h).join("0")+b(a,Math.max(0,c+h-1))[0]},X:a=>Math.round(a).toString(16).toUpperCase(),x:a=>Math.round(a).toString(16)};function m(a){return a}var n=Array.prototype.map,o=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];f=(e=function(a){var b,e,f,g=void 0===a.grouping||void 0===a.thousands?m:(b=n.call(a.grouping,Number),e=a.thousands+"",function(a,c){for(var d=a.length,f=[],g=0,h=b[0],i=0;d>0&&h>0&&(i+h+1>c&&(h=Math.max(1,c-i)),f.push(a.substring(d-=h,d+h)),!((i+=h+1)>c));)h=b[g=(g+1)%b.length];return f.reverse().join(e)}),h=void 0===a.currency?"":a.currency[0]+"",j=void 0===a.currency?"":a.currency[1]+"",k=void 0===a.decimal?".":a.decimal+"",p=void 0===a.numerals?m:(f=n.call(a.numerals,String),function(a){return a.replace(/[0-9]/g,function(a){return f[+a]})}),q=void 0===a.percent?"%":a.percent+"",r=void 0===a.minus?"−":a.minus+"",s=void 0===a.nan?"NaN":a.nan+"";function t(a,b){var c=(a=i(a)).fill,e=a.align,f=a.sign,m=a.symbol,n=a.zero,t=a.width,u=a.comma,v=a.precision,w=a.trim,x=a.type;"n"===x?(u=!0,x="g"):l[x]||(void 0===v&&(v=12),w=!0,x="g"),(n||"0"===c&&"="===e)&&(n=!0,c="0",e="=");var y=(b&&void 0!==b.prefix?b.prefix:"")+("$"===m?h:"#"===m&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),z=("$"===m?j:/[%p]/.test(x)?q:"")+(b&&void 0!==b.suffix?b.suffix:""),A=l[x],B=/[defgprs%]/.test(x);function C(a){var b,h,i,j=y,l=z;if("c"===x)l=A(a)+l,a="";else{var m=(a*=1)<0||1/a<0;if(a=isNaN(a)?s:A(Math.abs(a),v),w&&(a=function(a){a:for(var b,c=a.length,d=1,e=-1;d<c;++d)switch(a[d]){case".":e=b=d;break;case"0":0===e&&(e=d),b=d;break;default:if(!+a[d])break a;e>0&&(e=0)}return e>0?a.slice(0,e)+a.slice(b+1):a}(a)),m&&0==+a&&"+"!==f&&(m=!1),j=(m?"("===f?f:r:"-"===f||"("===f?"":f)+j,l=("s"!==x||isNaN(a)||void 0===d?"":o[8+d/3])+l+(m&&"("===f?")":""),B){for(b=-1,h=a.length;++b<h;)if(48>(i=a.charCodeAt(b))||i>57){l=(46===i?k+a.slice(b+1):a.slice(b))+l,a=a.slice(0,b);break}}}u&&!n&&(a=g(a,1/0));var q=j.length+a.length+l.length,C=q<t?Array(t-q+1).join(c):"";switch(u&&n&&(a=g(C+a,C.length?t-l.length:1/0),C=""),e){case"<":a=j+a+l+C;break;case"=":a=j+C+a+l;break;case"^":a=C.slice(0,q=C.length>>1)+j+a+l+C.slice(q);break;default:a=C+j+a+l}return p(a)}return v=void 0===v?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),C.toString=function(){return a+""},C}return{format:t,formatPrefix:function(a,b){var d=3*Math.max(-8,Math.min(8,Math.floor(c(b)/3))),e=Math.pow(10,-d),f=t(((a=i(a)).type="f",a),{suffix:o[8+d/3]});return function(a){return f(e*a)}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,g=e.formatPrefix,a.s(["format",()=>f,"formatPrefix",()=>g],474394)},88935,a=>{"use strict";a.s(["initRange",0,function(a,b){switch(arguments.length){case 0:break;case 1:this.range(a);break;default:this.range(b).domain(a)}return this}])},482464,a=>{"use strict";class b extends Map{constructor(a,b=d){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:b}}),null!=a)for(const[b,c]of a)this.set(b,c)}get(a){return super.get(c(this,a))}has(a){return super.has(c(this,a))}set(a,b){return super.set(function({_intern:a,_key:b},c){let d=b(c);return a.has(d)?a.get(d):(a.set(d,c),c)}(this,a),b)}delete(a){return super.delete(function({_intern:a,_key:b},c){let d=b(c);return a.has(d)&&(c=a.get(d),a.delete(d)),c}(this,a))}}function c({_intern:a,_key:b},d){let e=b(d);return a.has(e)?a.get(e):d}function d(a){return null!==a&&"object"==typeof a?a.valueOf():a}var e=a.i(88935);let f=Symbol("implicit");a.s(["default",0,function a(){var c=new b,d=[],g=[],h=f;function i(a){let b=c.get(a);if(void 0===b){if(h!==f)return h;c.set(a,b=d.push(a)-1)}return g[b%g.length]}return i.domain=function(a){if(!arguments.length)return d.slice();for(let e of(d=[],c=new b,a))c.has(e)||c.set(e,d.push(e)-1);return i},i.range=function(a){return arguments.length?(g=Array.from(a),i):g.slice()},i.unknown=function(a){return arguments.length?(h=a,i):h},i.copy=function(){return a(d,g).unknown(h)},e.initRange.apply(i,arguments),i}],482464)},444668,a=>{"use strict";var b=a.i(482464);a.s(["scaleOrdinal",()=>b.default])},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])},671199,a=>{"use strict";var b=a.i(261234),c=a.i(875117),d=a.i(539110),e=(0,d.__name)((a,d,e,h)=>{a.attr("class",e);let{width:i,height:j,x:k,y:l}=f(a,d);(0,b.configureSvgSize)(a,j,i,h);let m=g(k,l,i,j,d);a.attr("viewBox",m),c.log.debug(`viewBox configured: ${m} with padding: ${d}`)},"setupViewPortForSVG"),f=(0,d.__name)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),g=(0,d.__name)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox");a.s(["setupViewPortForSVG",0,e])}];
2
2
 
3
- //# sourceMappingURL=node_modules_1gpednh._.js.map
3
+ //# sourceMappingURL=node_modules_0n3c7h0._.js.map
@@ -40,4 +40,4 @@ module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@
40
40
  ${E(b,c)}
41
41
  `},"styles");a.s(["diagram",0,{parser:v,db:t,renderer:{draw:w},styles:G}])}];
42
42
 
43
- //# sourceMappingURL=node_modules_0t-9nup._.js.map
43
+ //# sourceMappingURL=node_modules_0od6jwr._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},525902,a=>{"use strict";var b=a.i(53467),c=a.i(261234),d=a.i(875117),e=a.i(539110),f=a.i(838673),g={parse:(0,e.__name)(async a=>{let b=await (0,f.parse)("info",a);d.log.debug(b)},"parse")},h=(0,e.__name)(()=>"11.17.2","getVersion"),i=(0,e.__name)((a,e,f)=>{d.log.debug("rendering info diagram\n"+a);let g=(0,b.selectSvgElement)(e);(0,c.configureSvgSize)(g,100,400,!0),g.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${f}`)},"draw");a.s(["diagram",0,{parser:g,db:{getVersion:h},renderer:{draw:i}}])}];
2
2
 
3
- //# sourceMappingURL=node_modules_0mxvg8h._.js.map
3
+ //# sourceMappingURL=node_modules_0rdt7pk._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},21026,a=>{"use strict";var b=a.i(539110),c=class{constructor(a){this.init=a,this.records=this.init()}static{(0,b.__name)(this,"ImperativeState")}reset(){this.records=this.init()}};a.s(["ImperativeState",0,c])},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])}];
2
2
 
3
- //# sourceMappingURL=node_modules_0vv0-fg._.js.map
3
+ //# sourceMappingURL=node_modules_0w1z7kz._.js.map
@@ -23,4 +23,4 @@ module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@
23
23
  }
24
24
  `},"styles");a.s(["diagram",0,{parser:m,get db(){return new j},renderer:{draw:n},styles:q}])}];
25
25
 
26
- //# sourceMappingURL=node_modules_1d53yiq._.js.map
26
+ //# sourceMappingURL=node_modules_0wdupfz._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])},137554,a=>{"use strict";var b=a.i(149213),c=a.i(361055);a.i(53467),a.i(261234);var d=a.i(875117),e=a.i(539110),f=a.i(838673),g=(0,a.i(1552).createRailroadEbnfServices)().RailroadEbnf.parser.LangiumParser,h=(0,e.__name)(a=>{let b=a.alternatives.map(i);return 1===b.length?b[0]:{type:"choice",alternatives:b}},"transformChoice"),i=(0,e.__name)(a=>{let b=a.elements.map(l);return 1===b.length?b[0]:{type:"sequence",elements:b}},"transformSequence"),j=(0,e.__name)(a=>{switch(a.$type){case"EbnfTerminal":return{type:"terminal",value:a.value};case"EbnfNonTerminal":return{type:"nonterminal",name:a.name};case"EbnfSpecial":return{type:"special",text:a.text};case"EbnfGroup":return h(a.element);case"EbnfOptional":return{type:"optional",element:h(a.element)};case"EbnfRepetition":return{type:"repetition",element:h(a.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${a.$type}`)}},"transformPrimary"),k=(0,e.__name)((a,b)=>{switch(b.$type){case"EbnfOptionalPostfix":return{type:"optional",element:a};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:a,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:a,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[a,{type:"terminal",value:"-"},j(b.except)]};default:throw Error(`Unsupported EBNF postfix node: ${b.$type}`)}},"transformPostfix"),l=(0,e.__name)(a=>a.postfixes.reduce((a,b)=>k(a,b),j(a.base)),"transformTerm"),m=(0,e.__name)(a=>({name:a.name,definition:h(a.definition)}),"transformRule"),n=(0,e.__name)(a=>{(0,c.populateCommonDb)(a,b.db),a.title&&b.db.setTitle(a.title),a.rules.map(a=>b.db.addRule(m(a)))},"populateDb"),o={parser:{parse:(0,e.__name)(a=>{b.db.clear(),d.log.debug("[EBNF Parser] Starting Langium parse");let c=g.parse(a);if(c.lexerErrors.length>0||c.parserErrors.length>0)throw new f.MermaidParseError(c);let e=c.value;d.log.debug("[EBNF Parser] Parsed rules:",e.rules.length),n(e),d.log.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:b.db}},db:b.db,renderer:b.renderer,styles:b.getStyles};a.s(["diagram",0,o])}];
2
2
 
3
- //# sourceMappingURL=node_modules_1u6w1pb._.js.map
3
+ //# sourceMappingURL=node_modules_1720w0a._.js.map
@@ -26,4 +26,4 @@ module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@
26
26
  }
27
27
  `},"styles");a.s(["diagram",0,{db:A,renderer:{draw:L},parser:C,styles:N}])}];
28
28
 
29
- //# sourceMappingURL=node_modules_1gu1pph._.js.map
29
+ //# sourceMappingURL=node_modules_18lsg7d._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00ptcss._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(726362)))},568773,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1p161c7._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(702288)))},409811,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0xbyurn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(33048)))},879004,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0mkvkrn._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(959346)))},240897,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10l-aox._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(78860)))},979209,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11iptmm._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(731813)))},265949,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c6uq4c._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(995889)))},788089,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d8brvh._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(580288)))},414059,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1lr-xqr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(566552)))},158161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1t9e3ef._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(931663)))},621173,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_iovbk._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(493860)))},594722,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_98arq._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(337649)))},685272,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_183vuvb._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(898437)))},219771,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ha29gs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(650794)))},510010,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0a2p_6-._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(613650)))},161868,a=>{"use strict";var b=a.i(149213),c=a.i(361055);a.i(53467),a.i(261234);var d=a.i(875117),e=a.i(539110),f=a.i(838673),g=(0,a.i(644289).createRailroadAbnfServices)().RailroadAbnf.parser.LangiumParser,h=(0,e.__name)(a=>{let b=a.alternatives.map(i);return 1===b.length?b[0]:{type:"choice",alternatives:b}},"transformAlternation"),i=(0,e.__name)(a=>{let b=a.elements.map(k);return 1===b.length?b[0]:{type:"sequence",elements:b}},"transformConcatenation"),j=(0,e.__name)(a=>{if(a.includes("*")){let[b,c]=a.split("*");return{min:b?parseInt(b,10):0,max:c?parseInt(c,10):1/0}}let b=parseInt(a,10);return{min:b,max:b}},"parseRepeat"),k=(0,e.__name)(a=>{let b=l(a.primary);if(!a.repeat)return b;let{min:c,max:d}=j(a.repeat);return 0===c&&1===d?{type:"optional",element:b}:{type:"repetition",element:b,min:c,max:d}},"transformElement"),l=(0,e.__name)(a=>{switch(a.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:a.value};case"AbnfRuleName":return{type:"nonterminal",name:a.name};case"AbnfGroup":return h(a.element);case"AbnfOptionalGroup":return{type:"optional",element:h(a.element)};default:throw Error(`Unsupported ABNF primary node: ${a.$type}`)}},"transformPrimary"),m=(0,e.__name)(a=>({name:a.name,definition:h(a.definition)}),"transformRule"),n=(0,e.__name)(a=>{(0,c.populateCommonDb)(a,b.db),a.title&&b.db.setTitle(a.title),a.rules.map(a=>b.db.addRule(m(a)))},"populateDb"),o={parser:{parse:(0,e.__name)(a=>{b.db.clear(),d.log.debug("[ABNF Parser] Starting Langium parse");let c=g.parse(a);if(c.lexerErrors.length>0||c.parserErrors.length>0)throw new f.MermaidParseError(c);let e=c.value;d.log.debug("[ABNF Parser] Parsed rules:",e.rules.length),n(e),d.log.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:b.db}},db:b.db,renderer:b.renderer,styles:b.getStyles};a.s(["diagram",0,o])},361055,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(539110).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])}];
2
2
 
3
- //# sourceMappingURL=node_modules_1he1w8_._.js.map
3
+ //# sourceMappingURL=node_modules_1b94fxf._.js.map
@@ -61,4 +61,4 @@ module.exports=[529285,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@
61
61
  }
62
62
  `},"styles");a.s(["diagram",0,{parser:o,db:m,renderer:{draw:z},styles:B}])}];
63
63
 
64
- //# sourceMappingURL=node_modules_0qbfyjh._.js.map
64
+ //# sourceMappingURL=node_modules_1ecdo1s._.js.map