thursday-agent 0.9.0 → 0.10.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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/probe/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +56 -56
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0oo-wlv._.js → [root-of-the-server]__0cxqzfc._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0zuns7e._.js → [root-of-the-server]__1-d2tgh._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1se25x0._.js +1 -1
- package/.next/server/chunks/ssr/{_0scf7xy._.js → _05rxyf9._.js} +2 -2
- package/.next/server/chunks/ssr/_070nv1_._.js +1 -1
- package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
- package/.next/server/chunks/ssr/{_1uy0xom._.js → _0bp-_fi._.js} +3 -3
- package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
- package/.next/server/chunks/ssr/{_0ltz2q5._.js → _0hlxij-._.js} +2 -2
- package/.next/server/chunks/ssr/{_1a-nuxx._.js → _0p9pmxe._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ital-2._.js → _0s41irp._.js} +2 -2
- package/.next/server/chunks/ssr/{_1z74dmq._.js → _0tg0vf8._.js} +4 -4
- package/.next/server/chunks/ssr/{_1tmu8z-._.js → _173siic._.js} +2 -2
- package/.next/server/chunks/ssr/{_1x-kojb._.js → _17v-33v._.js} +3 -3
- package/.next/server/chunks/ssr/{_0l_mcfz._.js → _19n08g5._.js} +2 -2
- package/.next/server/chunks/ssr/{_0urj3mc._.js → _1doidrw._.js} +2 -2
- package/.next/server/chunks/ssr/{_1-zyvdb._.js → _1flsjeo._.js} +2 -2
- package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ng831c._.js +3 -0
- package/.next/server/chunks/ssr/{_0kjj5ts._.js → _1u2jw0i._.js} +3 -3
- package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
- package/.next/server/chunks/ssr/{_1flbs77._.js → _1yk6yak._.js} +2 -2
- package/.next/server/chunks/ssr/features_bot_1yr-_pm._.js +3 -0
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ogczzz._.js → node_modules_048wmmj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1af3w91._.js → node_modules_04t200t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wbkzl9._.js → node_modules_0511ha-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0wnlddw._.js → node_modules_08g12f-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0uyh_vb._.js → node_modules_0cdu6jq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03d0rfz._.js → node_modules_0eb4rx7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_05ybmta._.js → node_modules_0f2k5l0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0sgy-dc._.js → node_modules_0piws2a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12et8d5._.js → node_modules_0pk6i-e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04_sbbc._.js → node_modules_0s1lwc9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_068ws5v._.js → node_modules_0wq4-ts._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13kwejm._.js → node_modules_0zjqwz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07rs_p2._.js → node_modules_11hbkuj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1z1lrbk._.js → node_modules_18woe20._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yvz9e0._.js → node_modules_1_afpz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0t_ez6-._.js → node_modules_1_ban4u._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1uwg-gz._.js → node_modules_1cxc8kn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0th357h._.js → node_modules_1dcbvfw._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06bb4q8._.js → node_modules_1expacw._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1s-gb-1._.js → node_modules_1ksh9gy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ubdtk-._.js → node_modules_1m2ho33._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bucjlk._.js → node_modules_1n0h9sf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1lkix61._.js → node_modules_1qehmwm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0x630an._.js → node_modules_1xzo2wn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jljel9._.js → node_modules_1zf46lp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0dzm4um._.js → node_modules_1zkpek5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0avl8-1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_14oslro._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +57 -57
- package/.next/static/chunks/03kgfyrli_0gz.js +1 -0
- package/.next/static/chunks/{245hb85nsy6j4.js → 09120tms63y21.js} +1 -1
- package/.next/static/chunks/{2c64drdevdla3.js → 0o980477kfqez.js} +1 -1
- package/.next/static/chunks/{13ixzheqw7o-w.js → 0oz3rs47yy3p8.js} +2 -2
- package/.next/static/chunks/0w20wnnfrscq7.js +1 -0
- package/.next/static/chunks/{3bbzsitgiltnt.js → 19ojn4lomsk0r.js} +1 -1
- package/.next/static/chunks/{38301ji-85i30.js → 1mwee7xvitlp9.js} +1 -1
- package/.next/static/chunks/1p764d75_0lhv.js +18 -0
- package/.next/static/chunks/{27tvv1i-smrck.js → 1pjygp7hqib6j.js} +1 -1
- package/.next/static/chunks/{0_awn8tucznxc.js → 22shnca_6zfzs.js} +1 -1
- package/.next/static/chunks/{0ge-hx0ed83a1.js → 24dst4mgurbsh.js} +1 -1
- package/.next/static/chunks/{06nt9tatr-dug.js → 25zq8gzhbdsr7.js} +1 -1
- package/.next/static/chunks/{37j27b3e1gt7r.js → 2d4z3er53ng8r.js} +1 -1
- package/.next/static/chunks/2ky81z-jgvasc.js +1 -0
- package/.next/static/chunks/2m6jd3586ijb-.js +1 -0
- package/.next/static/chunks/{1grkt5gr8pbg1.js → 2qod5tqlpz8b7.js} +7 -7
- package/.next/static/chunks/{1yugpvvi8qrbu.js → 30skcjexa57zn.js} +2 -2
- package/.next/static/chunks/{427qsc6kahxyo.js → 35kwn237o4wdn.js} +1 -1
- package/.next/static/chunks/{0qmd8n52hp-6v.js → 3exjsi8pfdvzj.js} +1 -1
- package/.next/static/chunks/3qq4o8w2rv_e9.css +1 -0
- package/.next/static/chunks/{3h2e-xv1zxh_f.js → 3vynnr71ghvom.js} +2 -2
- package/.next/static/chunks/42890jqk049q1.js +1 -0
- package/README.md +4 -0
- package/components/ui/radio-group.tsx +2 -2
- package/features/bot/components/bot-setting.tsx +4 -4
- package/features/routine/components/routine-setting.tsx +1 -1
- package/features/thursday/components/thursday-setting.tsx +5 -5
- package/guide/bots.md +1 -1
- package/knip.json +1 -0
- package/package.json +1 -1
- package/seed-skills/analyst/README.md +19 -0
- package/seed-skills/analyst/data-report/SKILL.md +59 -0
- package/seed-skills/analyst/data-report/references/brief.md +31 -0
- package/seed-skills/analyst/data-report/references/company.md +41 -0
- package/seed-skills/analyst/data-report/references/comparison.md +42 -0
- package/seed-skills/analyst/data-report/references/decision.md +28 -0
- package/seed-skills/analyst/data-report/references/market-size.md +49 -0
- package/seed-skills/analyst/data-report/references/price-check.md +33 -0
- package/seed-skills/analyst/data-report/references/sources.md +51 -0
- package/seed-skills/analyst/data-report/references/trend.md +39 -0
- package/seed-skills/analyst/data-report/scripts/chart.mjs +679 -0
- package/seed-skills/analyst/data-report/scripts/fetch.mjs +521 -0
- package/seed-skills/insta/instagram/SKILL.md +33 -0
- package/seed-skills/insta/instagram/references/dm.md +49 -0
- package/seed-skills/insta/instagram/references/post.md +74 -0
- package/seed-skills/insta/instagram/scripts/compose.mjs +329 -0
- package/seed-skills/insta/instagram/scripts/image-size.mjs +30 -0
- package/seed-skills/insta/instagram/scripts/inbox.mjs +159 -0
- package/seed-skills/insta/instagram/scripts/lib.mjs +91 -0
- package/seed-skills/insta/instagram/scripts/media.mjs +104 -0
- package/seed-skills/insta/instagram/scripts/profile.mjs +139 -0
- package/seed-skills/insta/instagram/scripts/read.mjs +240 -0
- package/seed-skills/insta/instagram/scripts/render.mjs +126 -0
- package/seed-skills/insta/instagram/scripts/search.mjs +133 -0
- package/seed-skills/insta/instagram/scripts/selectors.mjs +56 -0
- package/seed-skills/insta/instagram/scripts/sheet.mjs +100 -0
- package/seed-skills/insta/instagram/scripts/webimage.mjs +105 -0
- package/seed-skills/insta/instagram/templates/carousel.html +62 -0
- package/seed-skills/mail/mail/SKILL.md +37 -0
- package/seed-skills/mail/mail/recipes/gmail.mjs +448 -0
- package/seed-skills/mail/mail/references/recipes.md +55 -0
- package/seed-skills/mail/mail/scripts/mail.mjs +202 -0
- package/seed-skills/marketer/README.md +6 -4
- package/seed-skills/marketer/copywriting/SKILL.md +1 -1
- package/seed-skills/marketer/emails/SKILL.md +1 -1
- package/seed-skills/marketer/launch/SKILL.md +1 -1
- package/seed-skills/marketer/product-marketing/SKILL.md +5 -5
- package/seed-skills/marketer/seo-audit/SKILL.md +1 -1
- package/seed-skills/marketer/social/SKILL.md +1 -1
- package/.next/server/chunks/ssr/_0dshsh4._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +0 -3
- package/.next/static/chunks/0pda_vf-abwvx.js +0 -1
- package/.next/static/chunks/0rowp9rx3qbxu.js +0 -18
- package/.next/static/chunks/27lkanxvtdn09.js +0 -1
- package/.next/static/chunks/3fec-aeteddr-.js +0 -1
- package/.next/static/chunks/3go3hwp1z2_h2.css +0 -1
- package/.next/static/chunks/3h2bun3hcggg8.js +0 -1
- package/.next/static/chunks/3j1y335o95mj7.js +0 -1
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → Ar5V4kMdL4CE1trx8anrH}/_buildManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → Ar5V4kMdL4CE1trx8anrH}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → Ar5V4kMdL4CE1trx8anrH}/_ssgManifest.js +0 -0
|
@@ -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(738835),g=a.i(403512),h=a.i(164831);let i={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"}]]};i.node;let j=(0,h.default)(i),k={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"}]]};k.node;let l=(0,h.default)(k);var m=a.i(951675),n=a.i(474215),o=a.i(572131),p=a.i(767561),q=a.i(340695),r=a.i(316474),s=a.i(205522),t=a.i(497895);let u=(0,o.memo)(({data:a,name:c,initialExpandDepth:d=2})=>{let e=(0,o.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)(v,{data:e,name:c,depth:0,initialExpandDepth:d})})});u.displayName="JsonView";let v=(0,o.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,o.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)(v,{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)(v,{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,t.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)})]})}});v.displayName="JsonNode";var w=a.i(446181),x=a.i(341889),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)("7f9f7203d69588d2a7607491fa423f8974ed7d8271",C.callServer,void 0,C.findSourceMapURL,"callToolAction"),E=(0,C.createServerReference)("7f3ffbe43cd0e53bcef209cec6c741a97021df5ec0",C.callServer,void 0,C.findSourceMapURL,"deleteServerAction"),F=(0,C.createServerReference)("7f37aeae9f639b84e3375d6c3d50d4e5c13c749973",C.callServer,void 0,C.findSourceMapURL,"refreshServerAction"),G=(0,C.createServerReference)("7f86f9bf2207bdccd91bb068c5bbbb14fb0b889db9",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:"todoist",icon:"todoist.com",description:"Tasks, projects, and due dates",config:{url:"https://ai.todoist.net/mcp"}},{name:"home-assistant",icon:"home-assistant.io",description:"Lights, switches, and the rest of the house — your address and a long-lived token",config:{url:"http://homeassistant.local:8123/api/mcp",headers:{Authorization:"Bearer <your-home-assistant-token>"}}},{name:"kiwi",icon:"kiwi.com",description:"Flight search — no account",config:{url:"https://mcp.kiwi.com"}},{name:"zapier",icon:"zapier.com",description:"Gmail, Google Calendar, and thousands of apps you connect there",config:{url:"https://mcp.zapier.com/api/v1/connect"}},{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/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:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/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:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/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:"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:"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)(p.queryKey.mcpServer(a)),[f,g]=(0,V.useServerAction)(F,{...ah,onOk:b=>{ah.onOk(b),(0,W.revalidate)(p.queryKey.mcpServer(a))}}),[h,i]=(0,V.useServerAction)(E,{okMessage:"Server deleted",onOk:()=>{c(),(0,W.revalidate)(p.queryKey.mcp)}}),k=async()=>{await w.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,n=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:n}),(0,b.jsx)("span",{className:"truncate font-mono",children:aj(d.config)})]}),footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(q.Button,{variant:"ghost",loading:i,onClick:k,children:[(0,b.jsx)(m.Trash2,{}),"Delete"]}),(0,b.jsxs)(q.Button,{variant:"outline",loading:g,onClick:()=>f(d.name),children:[(0,b.jsx)(j,{}),"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:()=>{w.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:[" · ",aj(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)(x.SiteIcon,{host:d,className:"size-5",fallback:(0,b.jsx)(l,{className:"size-4"})}):(0,b.jsx)(l,{className:"size-4"})}function $({tool:a,serverName:c}){let[f,g]=(0,o.useState)(!1),[h,i]=(0,o.useState)(!1),[j,k]=(0,o.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,t.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)(q.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)(q.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(738835),g=a.i(403512),h=a.i(164831);let i={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"}]]};i.node;let j=(0,h.default)(i),k={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"}]]};k.node;let l=(0,h.default)(k);var m=a.i(951675),n=a.i(474215),o=a.i(572131),p=a.i(767561),q=a.i(340695),r=a.i(316474),s=a.i(205522),t=a.i(497895);let u=(0,o.memo)(({data:a,name:c,initialExpandDepth:d=2})=>{let e=(0,o.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)(v,{data:e,name:c,depth:0,initialExpandDepth:d})})});u.displayName="JsonView";let v=(0,o.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,o.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)(v,{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)(v,{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,t.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)})]})}});v.displayName="JsonNode";var w=a.i(446181),x=a.i(341889),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)("7fc9bd0484b5b4b65afce61e08bb4b081b722062a7",C.callServer,void 0,C.findSourceMapURL,"callToolAction"),E=(0,C.createServerReference)("7ffc4f8976ca439e4f44019e683bc444c71c014251",C.callServer,void 0,C.findSourceMapURL,"deleteServerAction"),F=(0,C.createServerReference)("7f7d31d4bbb2f6d0be7e97608270f1907961cf468f",C.callServer,void 0,C.findSourceMapURL,"refreshServerAction"),G=(0,C.createServerReference)("7f660f86909754f6a891992ea2110184e1bcfb482a",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:"todoist",icon:"todoist.com",description:"Tasks, projects, and due dates",config:{url:"https://ai.todoist.net/mcp"}},{name:"home-assistant",icon:"home-assistant.io",description:"Lights, switches, and the rest of the house — your address and a long-lived token",config:{url:"http://homeassistant.local:8123/api/mcp",headers:{Authorization:"Bearer <your-home-assistant-token>"}}},{name:"kiwi",icon:"kiwi.com",description:"Flight search — no account",config:{url:"https://mcp.kiwi.com"}},{name:"zapier",icon:"zapier.com",description:"Gmail, Google Calendar, and thousands of apps you connect there",config:{url:"https://mcp.zapier.com/api/v1/connect"}},{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/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:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/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:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/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:"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:"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)(p.queryKey.mcpServer(a)),[f,g]=(0,V.useServerAction)(F,{...ah,onOk:b=>{ah.onOk(b),(0,W.revalidate)(p.queryKey.mcpServer(a))}}),[h,i]=(0,V.useServerAction)(E,{okMessage:"Server deleted",onOk:()=>{c(),(0,W.revalidate)(p.queryKey.mcp)}}),k=async()=>{await w.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,n=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:n}),(0,b.jsx)("span",{className:"truncate font-mono",children:aj(d.config)})]}),footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(q.Button,{variant:"ghost",loading:i,onClick:k,children:[(0,b.jsx)(m.Trash2,{}),"Delete"]}),(0,b.jsxs)(q.Button,{variant:"outline",loading:g,onClick:()=>f(d.name),children:[(0,b.jsx)(j,{}),"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:()=>{w.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:[" · ",aj(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)(x.SiteIcon,{host:d,className:"size-5",fallback:(0,b.jsx)(l,{className:"size-4"})}):(0,b.jsx)(l,{className:"size-4"})}function $({tool:a,serverName:c}){let[f,g]=(0,o.useState)(!1),[h,i]=(0,o.useState)(!1),[j,k]=(0,o.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,t.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)(q.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)(q.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,o.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)),[g,h]=(0,o.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:g||l}),(0,b.jsxs)(q.Button,{size:"sm",loading:j,onClick:()=>{let b;try{b=d.trim()?JSON.parse(d):void 0}catch{h("Not valid JSON");return}h(""),m(),i(c,a.name,b)},children:[!j&&(0,b.jsx)(f.Play,{}),"Run"]})]}),void 0!==k&&(0,b.jsx)("div",{className:"overflow-x-auto rounded-lg bg-muted/40 p-3",children:(0,b.jsx)(u,{data:k,initialExpandDepth:3})})]})}function aa(a){return w.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:p,env:t,raw:u}=f,[v,w]=(0,V.useServerAction)(G,{...ah,onOk:a=>{ah.onOk(a),"error"!==a.status&&c()}}),x=(0,o.useMemo)(()=>{var a,b,c,d,e,f,g;let i,o;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=p,g=t,(o=K.safeParse({command:e.trim(),args:f.split(/\s+/).filter(Boolean),env:af(g)})).success?{value:{name:null,config:o.data},error:""}:{value:null,error:e.trim()?"Needs a command":""})},[h,u,j,k,l,m,n,p,t]),B="json"===h?u:JSON.stringify([h,j,k,l,m,n,p,t]),[C,D]=(0,o.useState)(B);(0,o.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)(q.Button,{variant:"ghost",onClick:c,children:"Cancel"}),(0,b.jsx)(q.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)(r.Field,{children:[(0,b.jsx)(r.FieldLabel,{children:"Name"}),(0,b.jsx)(s.Input,{value:F,onChange:a=>g({name:a.target.value}),placeholder:"notion",spellCheck:!1})]}),"json"===h?(0,b.jsxs)(r.Field,{children:[(0,b.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,b.jsx)(r.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)(r.Field,{children:[(0,b.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,b.jsx)(r.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)(r.Field,{children:[(0,b.jsx)(r.FieldLabel,{children:"URL"}),(0,b.jsx)(s.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)(r.Field,{children:[(0,b.jsx)(r.FieldLabel,{children:"OAuth client"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(s.Input,{value:l,onChange:a=>g({clientId:a.target.value}),placeholder:"Client ID",spellCheck:!1,className:"font-mono text-xs"}),(0,b.jsx)(s.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)(r.Field,{children:[(0,b.jsx)(r.FieldLabel,{children:"Command"}),(0,b.jsx)(s.Input,{value:n,onChange:a=>g({command:a.target.value}),placeholder:"npx",spellCheck:!1,className:"font-mono text-xs"})]}),(0,b.jsxs)(r.Field,{children:[(0,b.jsx)(r.FieldLabel,{children:"Args"}),(0,b.jsx)(s.Input,{value:p,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:t,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 h=(a,b)=>d(c.map(c=>c.id===a?{...c,...b}:c));return(0,b.jsxs)(r.Field,{children:[(0,b.jsx)(r.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)(s.Input,{value:a.key,onChange:b=>h(a.id,{key:b.target.value}),placeholder:e,spellCheck:!1,className:"font-mono text-xs"}),(0,b.jsx)(s.Input,{value:a.value,onChange:b=>h(a.id,{value:b.target.value}),placeholder:f,spellCheck:!1,className:"font-mono text-xs"}),(0,b.jsx)(q.Button,{variant:"ghost",size:"icon",onClick:()=>d(c.filter(b=>b.id!==a.id)),children:(0,b.jsx)(n.X,{})})]},a.id)),(0,b.jsxs)(q.Button,{variant:"outline",size:"sm",onClick:()=>d([...c,ad()]),children:[(0,b.jsx)(g.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,4 +1,4 @@
|
|
|
1
|
-
module.exports=[857022,a=>{"use strict";var b=a.i(187924),c=a.i(256711),d=a.i(752562),e=a.i(141146),f=a.i(164831);let g={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};g.node;let h=(0,f.default)(g),i={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};i.node;let j=(0,f.default)(i);var k=a.i(403512),l=a.i(951675),m=a.i(474215),n=a.i(572131),o=a.i(767561),p=a.i(340695),q=a.i(316474),r=a.i(205522),s=a.i(446181),t=a.i(950463),u=a.i(621958),v=a.i(546893),w=a.i(287702),x=a.i(379630),y=a.i(61876),z=a.i(275086),A=a.i(172654),B=a.i(327598);let C={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};C.node;let D=(0,f.default)(C);var E=a.i(589027),F=a.i(875160);let G={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};G.node;let H=(0,f.default)(G);var I=a.i(545097),J=a.i(608902),K=a.i(421042),L=a.i(497895);let M=new A.DefaultChatTransport({api:o.queryKey.memoryEdit});function N({notes:a}){let[c,d]=(0,n.useState)(""),[e,f]=(0,n.useState)({provider:null,model:""}),[g,h]=(0,n.useState)(!1),{messages:i,sendMessage:j,setMessages:k,status:l,stop:m,error:o,clearError:q}=(0,z.useChat)({transport:M}),r=(0,n.useRef)(m);r.current=m,(0,n.useEffect)(()=>()=>{r.current()},[]);let s=(0,n.useRef)(new Map);for(let b of a)for(let a of b.facts)s.current.set(a.id,{text:a.text,path:b.path});let t="submitted"===l||"streaming"===l,u=!!(e.provider&&e.model.trim()),v=[...i].reverse().find(a=>"assistant"===a.role),w=v?.parts??[],y=w.filter(A.isToolUIPart),C=w.flatMap(a=>"text"===a.type?[a.text]:[]).join(" ").trim(),D=!!o||y.some(a=>"output-error"===a.state),F=y.filter(a=>"output-available"===a.state&&(0,A.getToolName)(a)!==K.TOOL_NAMES.memory_recall).length;(0,n.useEffect)(()=>{if("ready"!==l||D||0===i.length)return;let a=setTimeout(()=>k([]),4e3);return()=>clearTimeout(a)},[l,D,i.length,k]);let G=t?(0,b.jsx)(I.ShinyText,{text:"Working on memory",className:"text-xs"}):o?(0,b.jsx)("span",{className:"text-xs text-destructive",children:o.message}):v?(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:C||(0===F?"Nothing to change":1===F?"1 change saved":`${F} changes saved`)}):null;return(0,b.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-18 z-10 flex justify-center px-8",children:(0,b.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-120 flex-col items-center gap-2",children:[g&&(0,b.jsx)("div",{className:"w-full rounded-xl bg-popover p-2 shadow-lg ring-1 ring-foreground/10",children:(0,b.jsx)(J.ModelPicker,{provider:e.provider,model:e.model,unset:"Provider",onChange:f})}),y.length>0&&(0,b.jsx)("ul",{className:"w-full divide-y divide-border/60 overflow-hidden rounded-xl bg-popover shadow-lg ring-1 ring-foreground/10",children:y.map(a=>(0,b.jsx)(P,{name:(0,A.getToolName)(a),input:a.input,state:a.state,errorText:"output-error"===a.state?a.errorText:void 0,known:s.current},a.toolCallId))}),G&&(0,b.jsx)("p",{className:"max-w-full truncate px-1",children:G}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault();let b=c.trim();b&&u&&!t&&(d(""),h(!1),q(),k([]),j({text:b},{body:{model:e}}))},className:"flex h-10 w-full items-center gap-1.5 rounded-xl bg-popover pr-1.5 pl-3.5 shadow-lg ring-1 ring-foreground/10",children:[(0,b.jsx)("input",{autoFocus:!0,value:c,onChange:a=>d(a.target.value),disabled:t,"aria-label":"Edit memory",placeholder:"Tell memory what changed",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:opacity-60"}),(0,b.jsxs)(p.Button,{type:"button",size:"xs",variant:"ghost",onClick:()=>h(!g),className:(0,L.cn)("max-w-44",!u&&"text-muted-foreground"),children:[u&&e.provider?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.ProviderIcon,{provider:e.provider,className:"size-3"}),(0,b.jsx)("span",{className:"truncate",children:e.model})]}):"Model",(0,b.jsx)(E.ChevronDown,{className:"text-muted-foreground"})]}),(0,b.jsx)(p.Button,{type:"submit",size:"icon-sm",loading:t,disabled:!c.trim()||!u||t,"aria-label":"Send",children:!t&&(0,b.jsx)(B.ArrowUp,{})})]})]})})}let O={Remember:k.Plus,Replace:h,Forget:H,Rename:h,Opened:D};function P({name:a,input:c,state:e,errorText:f,known:g}){let h=function(a,b,c){let d=b??{};if(a===K.TOOL_NAMES.memory_recall)return{kind:"Opened",path:d.path??"",lines:[],carried:!1};if(a===K.TOOL_NAMES.memory_forget){let a=(d.factIds??[]).filter(a=>null!=a),b=a.map(a=>c.get(a));return{kind:"Forget",path:b.find(a=>a)?.path??"",lines:a.map((a,c)=>({before:b[c]?.text??`Fact #${a}`})),carried:!1}}let e=(d.facts??[]).filter(a=>null!=a),f=e.map(a=>null!=a.replaces?{before:c.get(a.replaces)?.text??`Fact #${a.replaces}`,after:a.text}:{after:a.text});d.description&&f.push({after:`“${d.description}”`});let g=(d.aliases??[]).filter(Boolean);return g.length&&f.push({after:`Called ${g.map(a=>`“${a}”`).join(", ")}`}),{kind:e.some(a=>null!=a.replaces)?"Replace":e.length?"Remember":"Rename",path:d.path??"",lines:f,carried:e.some(a=>a.alwaysLoad)}}(a,c,g),i=O[h.kind],j="output-error"===e;return(0,b.jsxs)("li",{className:"flex animate-in items-start gap-2.5 px-3 py-2.5 duration-200 fade-in slide-in-from-bottom-1",children:[(0,b.jsx)(i,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[h.lines.map((a,c)=>(0,b.jsxs)("div",{children:[a.before&&(0,b.jsx)("p",{className:"text-[13px] leading-5 text-muted-foreground/60 line-through",children:a.before}),a.after&&(0,b.jsx)("p",{className:"text-sm leading-5 text-foreground/90",children:a.after})]},`${h.kind}-${c}`)),(0,b.jsxs)("p",{className:"pt-0.5 font-mono text-[11px] text-muted-foreground",children:[h.kind,h.path&&` \xb7 ${h.path}`,h.carried&&" · carried into every call"]}),j&&f&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:f})]}),(0,b.jsx)("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground",children:j?(0,b.jsx)(m.X,{className:"size-3.5 text-destructive"}):"output-available"===e?(0,b.jsx)(d.Check,{className:"size-3.5"}):(0,b.jsx)(F.Loader2,{className:"size-3.5 animate-spin"})})]})}var Q=a.i(405050);let R=(0,Q.createServerReference)("7f32b4bee4dbad000bc8017f0a9d78d688106dd349",Q.callServer,void 0,Q.findSourceMapURL,"addFactsAction"),S=(0,Q.createServerReference)("7fbe28e5e0f298648026a88c55afae8f760e35ab01",Q.callServer,void 0,Q.findSourceMapURL,"createNoteAction"),T=(0,Q.createServerReference)("7f1ff41ed843d7940bf53ed5f354252aa4f6ffd46b",Q.callServer,void 0,Q.findSourceMapURL,"deleteNoteAction"),U=(0,Q.createServerReference)("7ff7c3db8b4cf8739b10e17fbd47b1aa1dbe492047",Q.callServer,void 0,Q.findSourceMapURL,"forgetFactAction"),V=(0,Q.createServerReference)("7fdbfcc59d39e08337aa61aaaf088a0570cceba437",Q.callServer,void 0,Q.findSourceMapURL,"reviseFactAction"),W=(0,Q.createServerReference)("7f815912a92651a576a95f03ebab717c68769254fa",Q.callServer,void 0,Q.findSourceMapURL,"setFactAlwaysLoadAction"),X=(0,Q.createServerReference)("7f47f28f779f3429cd440598830eb48af5df0c2394",Q.callServer,void 0,Q.findSourceMapURL,"updateNoteAction");var Y=a.i(156757),Z=a.i(199169);let $=Y.z.enum(["user","call","bot"]),_=Y.z.object({id:Y.z.number(),text:Y.z.string(),alwaysLoad:Y.z.boolean(),source:$.nullish(),createdAt:Z.DateLikeSchema});Y.z.object({id:Y.z.number(),path:Y.z.string(),description:Y.z.string(),aliases:Y.z.string().array().nullish(),ownedByUser:Y.z.boolean(),hits:Y.z.number(),lastReadAt:Z.DateLikeSchema.nullable(),createdAt:Z.DateLikeSchema,updatedAt:Z.DateLikeSchema,factCount:Y.z.number(),facts:_.array()});let aa=[{path:"profile",of:"The user themselves — their name, age, what they do, where they live, and whatever else says who they are"},{path:"preferences",of:"How they want things done, and said"},{path:"people/",of:"Someone in their life, and what matters about them"},{path:"projects/",of:"Something with an end — a trip, a purchase, a deadline, a thing being built"},{path:"topics/",of:"Something ongoing that keeps coming back"}],ab=aa.filter(a=>!a.path.endsWith("/")).map(a=>a.path),ac=aa.filter(a=>a.path.endsWith("/")).map(a=>a.path.slice(0,-1));RegExp(`^(?:${ab.join("|")}|(?:${ac.join("|")})/.+)$`);let ad=["profile","preferences"];var ae=a.i(619477),af=a.i(313237),ag=a.i(862966),ah=a.i(759497);let ai=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"topics",label:"Topics"},{key:"other",label:"Other"}],aj={onOk:()=>(0,ah.revalidate)(o.queryKey.memory)},ak=y.textModelProviderSchema.options.filter(a=>"chatgpt"!==a);function al(){return(0,b.jsx)("span",{className:"mr-0.5 flex items-center",children:ak.map(a=>(0,b.jsx)("span",{className:"-ml-1.5 grid size-5 place-items-center rounded-full bg-background ring-1 ring-border first:ml-0",children:(0,b.jsx)(x.ProviderIcon,{provider:a,className:"size-3"})},a))})}function am(a,b){return c=>{c.nativeEvent.isComposing||229===c.keyCode||("Enter"===c.key&&(c.preventDefault(),a()),"Escape"===c.key&&(c.stopPropagation(),b()))}}function an({note:a,open:c,onToggle:d}){var f;let g,i,j,k,m,[o,q]=(0,n.useState)(!1),[r,t]=(0,af.useServerAction)(T,aj),u=async()=>{await s.notify.confirm({title:`Forget ${a.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&r(a.id)},v=(0,b.jsx)("span",{className:"w-36 shrink-0 truncate text-sm font-medium",children:-1===(g=(f=a.path).indexOf("/"))?f:f.slice(g+1)});return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"flex h-12 items-center gap-3 pr-2 pl-4",children:o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.ChevronRight,{className:"size-3.5 shrink-0 rotate-90 text-muted-foreground"}),v,(0,b.jsx)(ao,{note:a,onDone:()=>q(!1)})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button","aria-expanded":c,onClick:d,className:(0,L.cn)("flex h-full min-w-0 flex-1 items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",(i=a.path,!ad.includes(i)&&.15>(j=(0,Z.toDate)(a.lastReadAt??a.createdAt),k=Math.max(0,(Date.now()-j.getTime())/864e5),(a.hits+1)/(1+k))&&!c&&"opacity-55")),children:[(0,b.jsx)(e.ChevronRight,{className:(0,L.cn)("size-3.5 shrink-0 text-muted-foreground transition-transform",c&&"rotate-90")}),v,(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-muted-foreground",children:a.description}),(0,b.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-[11px] text-muted-foreground/70",children:[a.factCount," ",1===a.factCount?"fact":"facts"]}),(0,b.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground/50",title:a.lastReadAt?"Last read back":"Never read back",children:a.lastReadAt?(0,Z.shortAgo)(a.lastReadAt):"—"})]}),(0,b.jsx)("span",{className:"flex w-15 shrink-0 justify-end",children:c&&(0,b.jsxs)(b.Fragment,{children:[(m=a.path,!ad.includes(m)&&(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit the note's line",onClick:()=>q(!0),children:(0,b.jsx)(h,{})})),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this note",loading:t,onClick:u,children:!t&&(0,b.jsx)(l.Trash2,{})})]})})]})}),c&&(0,b.jsxs)("div",{className:"space-y-1 border-t border-border/60 bg-muted/40 py-2.5 pr-2 pl-10",children:[(0,b.jsx)(ap,{noteId:a.id}),a.facts.map(c=>(0,b.jsx)(aq,{noteId:a.id,fact:c},c.id))]})]})}function ao({note:a,onDone:c}){let[e,f]=(0,n.useState)(a.description),[g,h]=(0,af.useServerAction)(X,{onOk:()=>{c(),(0,ah.revalidate)(o.queryKey.memory)}}),i=()=>{let b=e.trim();if(!b||b===a.description)return c();g(a.id,{description:b})};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Input,{autoFocus:!0,value:e,onChange:a=>f(a.target.value),onKeyDown:am(i,c),"aria-label":"The note's line",placeholder:"One line the agent sees in its note list",className:"h-8 min-w-0 flex-1 text-[13px]"}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:h,onClick:i,children:!h&&(0,b.jsx)(d.Check,{})}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:c,children:(0,b.jsx)(m.X,{})})]})}function ap({noteId:a}){let[c,d]=(0,n.useState)(""),[e,f]=(0,af.useServerAction)(R,{onOk:()=>{d(""),(0,ah.revalidate)(o.queryKey.memory)}}),g=()=>{let b=c.trim();b&&!f&&e(a,[b])};return(0,b.jsxs)("div",{className:"flex items-center gap-1.5 pb-1",children:[(0,b.jsx)(r.Input,{value:c,onChange:a=>d(a.target.value),onKeyDown:am(g,()=>d("")),"aria-label":"Add a fact",placeholder:"Add a fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,b.jsxs)(p.Button,{size:"sm",variant:"outline",loading:f,disabled:!c.trim(),onClick:g,children:[!f&&(0,b.jsx)(k.Plus,{}),"Add"]})]})}function aq({noteId:a,fact:e}){let f,[g,i]=(0,n.useState)(!1),[k,q]=(0,n.useState)(e.text),[s,t]=(0,af.useServerAction)(V,{onOk:()=>{i(!1),(0,ah.revalidate)(o.queryKey.memory)}}),[u,v]=(0,af.useServerAction)(W,aj),[w,x]=(0,af.useServerAction)(U,aj),y=()=>{let b=k.trim();if(!b||b===e.text)return i(!1);s(a,e.id,b)},z="user"===(f=e.source)?"you":"call"===f?"on a call":"bot"===f?"a bot":"";return(0,b.jsxs)("div",{className:"flex min-h-10 items-center gap-1.5",children:[(0,b.jsx)(p.Button,{size:"icon-sm",variant:e.alwaysLoad?"secondary":"ghost","aria-pressed":e.alwaysLoad,"aria-label":e.alwaysLoad?"Stop carrying into calls":"Carry into every call",title:"Carried into every call, without opening this note",loading:v,onClick:()=>u(a,e.id,!e.alwaysLoad),children:!v&&(0,b.jsx)(j,{className:(0,L.cn)(!e.alwaysLoad&&"text-muted-foreground/45")})}),g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Input,{autoFocus:!0,value:k,onChange:a=>q(a.target.value),onKeyDown:am(y,()=>i(!1)),"aria-label":"Fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:t,onClick:y,children:!t&&(0,b.jsx)(d.Check,{})}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:()=>i(!1),children:(0,b.jsx)(m.X,{})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 pl-1 text-sm leading-relaxed text-foreground/90",children:e.text}),(0,b.jsxs)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground/50",children:[(0,c.format)(e.createdAt,"yyyy.MM.dd"),z&&` \xb7 ${z}`]}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit this fact",onClick:()=>{q(e.text),i(!0)},children:(0,b.jsx)(h,{})}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this fact",loading:x,onClick:()=>w(a,e.id),children:!x&&(0,b.jsx)(l.Trash2,{})})]})]})}let ar=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function as(){return s.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,b.jsx)(at,{onDone:a})})}function at({onDone:a}){let[c,d]=(0,n.useState)("people"),[e,f]=(0,n.useState)(""),[g,h]=(0,n.useState)(""),[i,j]=(0,n.useState)(""),[l,m,,s]=(0,af.useServerAction)(S,{errorMessage:!1,onOk:()=>{(0,ah.revalidate)(o.queryKey.memory),a()}}),t=ar.find(a=>a.key===c),w=e.trim()&&g.trim()&&!m,x=()=>{w&&l(`${c}/${e.trim()}`,g.trim(),i.split("\n").map(a=>a.trim()).filter(Boolean))};return(0,b.jsxs)(ae.SettingDialogContent,{title:"New note",description:"Where the agent files what it learns about this subject.",footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p.Button,{variant:"ghost",onClick:a,children:"Cancel"}),(0,b.jsxs)(p.Button,{disabled:!w,loading:m,onClick:x,children:[!m&&(0,b.jsx)(k.Plus,{}),"Create"]})]}),children:[(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{children:"Kind"}),(0,b.jsx)(u.Tabs,{value:c,onValueChange:a=>d(a),children:(0,b.jsx)(u.TabsList,{className:"w-full",children:ar.map(a=>(0,b.jsx)(u.TabsTrigger,{value:a.key,children:a.label},a.key))})})]}),(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,b.jsxs)(q.FieldContent,{children:[(0,b.jsx)(r.Input,{id:"note-name",value:e,onChange:a=>f(a.target.value),placeholder:t?.placeholder,spellCheck:!1,required:!0}),(0,b.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[c,"/",e.trim()||"…"]})]})]}),(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,b.jsx)(q.FieldContent,{children:(0,b.jsx)(r.Input,{id:"note-summary",value:g,onChange:a=>h(a.target.value),onKeyDown:a=>"Enter"===a.key&&x(),placeholder:"One line the agent sees in its note list",required:!0})})]}),(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,b.jsx)(v.Textarea,{id:"note-facts",value:i,onChange:a=>j(a.target.value),placeholder:`One per line
|
|
1
|
+
module.exports=[857022,a=>{"use strict";var b=a.i(187924),c=a.i(256711),d=a.i(752562),e=a.i(141146),f=a.i(164831);let g={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};g.node;let h=(0,f.default)(g),i={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};i.node;let j=(0,f.default)(i);var k=a.i(403512),l=a.i(951675),m=a.i(474215),n=a.i(572131),o=a.i(767561),p=a.i(340695),q=a.i(316474),r=a.i(205522),s=a.i(446181),t=a.i(950463),u=a.i(621958),v=a.i(546893),w=a.i(287702),x=a.i(379630),y=a.i(61876),z=a.i(275086),A=a.i(172654),B=a.i(327598);let C={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};C.node;let D=(0,f.default)(C);var E=a.i(589027),F=a.i(875160);let G={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};G.node;let H=(0,f.default)(G);var I=a.i(545097),J=a.i(608902),K=a.i(421042),L=a.i(497895);let M=new A.DefaultChatTransport({api:o.queryKey.memoryEdit});function N({notes:a}){let[c,d]=(0,n.useState)(""),[e,f]=(0,n.useState)({provider:null,model:""}),[g,h]=(0,n.useState)(!1),{messages:i,sendMessage:j,setMessages:k,status:l,stop:m,error:o,clearError:q}=(0,z.useChat)({transport:M}),r=(0,n.useRef)(m);r.current=m,(0,n.useEffect)(()=>()=>{r.current()},[]);let s=(0,n.useRef)(new Map);for(let b of a)for(let a of b.facts)s.current.set(a.id,{text:a.text,path:b.path});let t="submitted"===l||"streaming"===l,u=!!(e.provider&&e.model.trim()),v=[...i].reverse().find(a=>"assistant"===a.role),w=v?.parts??[],y=w.filter(A.isToolUIPart),C=w.flatMap(a=>"text"===a.type?[a.text]:[]).join(" ").trim(),D=!!o||y.some(a=>"output-error"===a.state),F=y.filter(a=>"output-available"===a.state&&(0,A.getToolName)(a)!==K.TOOL_NAMES.memory_recall).length;(0,n.useEffect)(()=>{if("ready"!==l||D||0===i.length)return;let a=setTimeout(()=>k([]),4e3);return()=>clearTimeout(a)},[l,D,i.length,k]);let G=t?(0,b.jsx)(I.ShinyText,{text:"Working on memory",className:"text-xs"}):o?(0,b.jsx)("span",{className:"text-xs text-destructive",children:o.message}):v?(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:C||(0===F?"Nothing to change":1===F?"1 change saved":`${F} changes saved`)}):null;return(0,b.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-18 z-10 flex justify-center px-8",children:(0,b.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-120 flex-col items-center gap-2",children:[g&&(0,b.jsx)("div",{className:"w-full rounded-xl bg-popover p-2 shadow-lg ring-1 ring-foreground/10",children:(0,b.jsx)(J.ModelPicker,{provider:e.provider,model:e.model,unset:"Provider",onChange:f})}),y.length>0&&(0,b.jsx)("ul",{className:"w-full divide-y divide-border/60 overflow-hidden rounded-xl bg-popover shadow-lg ring-1 ring-foreground/10",children:y.map(a=>(0,b.jsx)(P,{name:(0,A.getToolName)(a),input:a.input,state:a.state,errorText:"output-error"===a.state?a.errorText:void 0,known:s.current},a.toolCallId))}),G&&(0,b.jsx)("p",{className:"max-w-full truncate px-1",children:G}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault();let b=c.trim();b&&u&&!t&&(d(""),h(!1),q(),k([]),j({text:b},{body:{model:e}}))},className:"flex h-10 w-full items-center gap-1.5 rounded-xl bg-popover pr-1.5 pl-3.5 shadow-lg ring-1 ring-foreground/10",children:[(0,b.jsx)("input",{autoFocus:!0,value:c,onChange:a=>d(a.target.value),disabled:t,"aria-label":"Edit memory",placeholder:"Tell memory what changed",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:opacity-60"}),(0,b.jsxs)(p.Button,{type:"button",size:"xs",variant:"ghost",onClick:()=>h(!g),className:(0,L.cn)("max-w-44",!u&&"text-muted-foreground"),children:[u&&e.provider?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.ProviderIcon,{provider:e.provider,className:"size-3"}),(0,b.jsx)("span",{className:"truncate",children:e.model})]}):"Model",(0,b.jsx)(E.ChevronDown,{className:"text-muted-foreground"})]}),(0,b.jsx)(p.Button,{type:"submit",size:"icon-sm",loading:t,disabled:!c.trim()||!u||t,"aria-label":"Send",children:!t&&(0,b.jsx)(B.ArrowUp,{})})]})]})})}let O={Remember:k.Plus,Replace:h,Forget:H,Rename:h,Opened:D};function P({name:a,input:c,state:e,errorText:f,known:g}){let h=function(a,b,c){let d=b??{};if(a===K.TOOL_NAMES.memory_recall)return{kind:"Opened",path:d.path??"",lines:[],carried:!1};if(a===K.TOOL_NAMES.memory_forget){let a=(d.factIds??[]).filter(a=>null!=a),b=a.map(a=>c.get(a));return{kind:"Forget",path:b.find(a=>a)?.path??"",lines:a.map((a,c)=>({before:b[c]?.text??`Fact #${a}`})),carried:!1}}let e=(d.facts??[]).filter(a=>null!=a),f=e.map(a=>null!=a.replaces?{before:c.get(a.replaces)?.text??`Fact #${a.replaces}`,after:a.text}:{after:a.text});d.description&&f.push({after:`“${d.description}”`});let g=(d.aliases??[]).filter(Boolean);return g.length&&f.push({after:`Called ${g.map(a=>`“${a}”`).join(", ")}`}),{kind:e.some(a=>null!=a.replaces)?"Replace":e.length?"Remember":"Rename",path:d.path??"",lines:f,carried:e.some(a=>a.alwaysLoad)}}(a,c,g),i=O[h.kind],j="output-error"===e;return(0,b.jsxs)("li",{className:"flex animate-in items-start gap-2.5 px-3 py-2.5 duration-200 fade-in slide-in-from-bottom-1",children:[(0,b.jsx)(i,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[h.lines.map((a,c)=>(0,b.jsxs)("div",{children:[a.before&&(0,b.jsx)("p",{className:"text-[13px] leading-5 text-muted-foreground/60 line-through",children:a.before}),a.after&&(0,b.jsx)("p",{className:"text-sm leading-5 text-foreground/90",children:a.after})]},`${h.kind}-${c}`)),(0,b.jsxs)("p",{className:"pt-0.5 font-mono text-[11px] text-muted-foreground",children:[h.kind,h.path&&` \xb7 ${h.path}`,h.carried&&" · carried into every call"]}),j&&f&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:f})]}),(0,b.jsx)("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground",children:j?(0,b.jsx)(m.X,{className:"size-3.5 text-destructive"}):"output-available"===e?(0,b.jsx)(d.Check,{className:"size-3.5"}):(0,b.jsx)(F.Loader2,{className:"size-3.5 animate-spin"})})]})}var Q=a.i(405050);let R=(0,Q.createServerReference)("7f0971ae6f804e41d67f1025aa120d5aae7b54122d",Q.callServer,void 0,Q.findSourceMapURL,"addFactsAction"),S=(0,Q.createServerReference)("7f613c3180e5ebe6d59ccfdb49ca64857370285950",Q.callServer,void 0,Q.findSourceMapURL,"createNoteAction"),T=(0,Q.createServerReference)("7f0cae0b4f090c99dc36fb2f27c0fa185ea70396d5",Q.callServer,void 0,Q.findSourceMapURL,"deleteNoteAction"),U=(0,Q.createServerReference)("7fc84c5e9af8ab7c523daaf9bbcacce53b587a4eae",Q.callServer,void 0,Q.findSourceMapURL,"forgetFactAction"),V=(0,Q.createServerReference)("7f53dfd755ddd439971369bb94a70c6eb12e46535a",Q.callServer,void 0,Q.findSourceMapURL,"reviseFactAction"),W=(0,Q.createServerReference)("7f8a5abfc7504ee1eb38c762125d4ee3e7a62002b8",Q.callServer,void 0,Q.findSourceMapURL,"setFactAlwaysLoadAction"),X=(0,Q.createServerReference)("7f3167c5fbd04ab35ebd4b0e96777d21c1fcbe437d",Q.callServer,void 0,Q.findSourceMapURL,"updateNoteAction");var Y=a.i(156757),Z=a.i(199169);let $=Y.z.enum(["user","call","bot"]),_=Y.z.object({id:Y.z.number(),text:Y.z.string(),alwaysLoad:Y.z.boolean(),source:$.nullish(),createdAt:Z.DateLikeSchema});Y.z.object({id:Y.z.number(),path:Y.z.string(),description:Y.z.string(),aliases:Y.z.string().array().nullish(),ownedByUser:Y.z.boolean(),hits:Y.z.number(),lastReadAt:Z.DateLikeSchema.nullable(),createdAt:Z.DateLikeSchema,updatedAt:Z.DateLikeSchema,factCount:Y.z.number(),facts:_.array()});let aa=[{path:"profile",of:"The user themselves — their name, age, what they do, where they live, and whatever else says who they are"},{path:"preferences",of:"How they want things done, and said"},{path:"people/",of:"Someone in their life, and what matters about them"},{path:"projects/",of:"Something with an end — a trip, a purchase, a deadline, a thing being built"},{path:"topics/",of:"Something ongoing that keeps coming back"}],ab=aa.filter(a=>!a.path.endsWith("/")).map(a=>a.path),ac=aa.filter(a=>a.path.endsWith("/")).map(a=>a.path.slice(0,-1));RegExp(`^(?:${ab.join("|")}|(?:${ac.join("|")})/.+)$`);let ad=["profile","preferences"];var ae=a.i(619477),af=a.i(313237),ag=a.i(862966),ah=a.i(759497);let ai=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"topics",label:"Topics"},{key:"other",label:"Other"}],aj={onOk:()=>(0,ah.revalidate)(o.queryKey.memory)},ak=y.textModelProviderSchema.options.filter(a=>"chatgpt"!==a);function al(){return(0,b.jsx)("span",{className:"mr-0.5 flex items-center",children:ak.map(a=>(0,b.jsx)("span",{className:"-ml-1.5 grid size-5 place-items-center rounded-full bg-background ring-1 ring-border first:ml-0",children:(0,b.jsx)(x.ProviderIcon,{provider:a,className:"size-3"})},a))})}function am(a,b){return c=>{c.nativeEvent.isComposing||229===c.keyCode||("Enter"===c.key&&(c.preventDefault(),a()),"Escape"===c.key&&(c.stopPropagation(),b()))}}function an({note:a,open:c,onToggle:d}){var f;let g,i,j,k,m,[o,q]=(0,n.useState)(!1),[r,t]=(0,af.useServerAction)(T,aj),u=async()=>{await s.notify.confirm({title:`Forget ${a.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&r(a.id)},v=(0,b.jsx)("span",{className:"w-36 shrink-0 truncate text-sm font-medium",children:-1===(g=(f=a.path).indexOf("/"))?f:f.slice(g+1)});return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"flex h-12 items-center gap-3 pr-2 pl-4",children:o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.ChevronRight,{className:"size-3.5 shrink-0 rotate-90 text-muted-foreground"}),v,(0,b.jsx)(ao,{note:a,onDone:()=>q(!1)})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button","aria-expanded":c,onClick:d,className:(0,L.cn)("flex h-full min-w-0 flex-1 items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",(i=a.path,!ad.includes(i)&&.15>(j=(0,Z.toDate)(a.lastReadAt??a.createdAt),k=Math.max(0,(Date.now()-j.getTime())/864e5),(a.hits+1)/(1+k))&&!c&&"opacity-55")),children:[(0,b.jsx)(e.ChevronRight,{className:(0,L.cn)("size-3.5 shrink-0 text-muted-foreground transition-transform",c&&"rotate-90")}),v,(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-muted-foreground",children:a.description}),(0,b.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-[11px] text-muted-foreground/70",children:[a.factCount," ",1===a.factCount?"fact":"facts"]}),(0,b.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground/50",title:a.lastReadAt?"Last read back":"Never read back",children:a.lastReadAt?(0,Z.shortAgo)(a.lastReadAt):"—"})]}),(0,b.jsx)("span",{className:"flex w-15 shrink-0 justify-end",children:c&&(0,b.jsxs)(b.Fragment,{children:[(m=a.path,!ad.includes(m)&&(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit the note's line",onClick:()=>q(!0),children:(0,b.jsx)(h,{})})),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this note",loading:t,onClick:u,children:!t&&(0,b.jsx)(l.Trash2,{})})]})})]})}),c&&(0,b.jsxs)("div",{className:"space-y-1 border-t border-border/60 bg-muted/40 py-2.5 pr-2 pl-10",children:[(0,b.jsx)(ap,{noteId:a.id}),a.facts.map(c=>(0,b.jsx)(aq,{noteId:a.id,fact:c},c.id))]})]})}function ao({note:a,onDone:c}){let[e,f]=(0,n.useState)(a.description),[g,h]=(0,af.useServerAction)(X,{onOk:()=>{c(),(0,ah.revalidate)(o.queryKey.memory)}}),i=()=>{let b=e.trim();if(!b||b===a.description)return c();g(a.id,{description:b})};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Input,{autoFocus:!0,value:e,onChange:a=>f(a.target.value),onKeyDown:am(i,c),"aria-label":"The note's line",placeholder:"One line the agent sees in its note list",className:"h-8 min-w-0 flex-1 text-[13px]"}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:h,onClick:i,children:!h&&(0,b.jsx)(d.Check,{})}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:c,children:(0,b.jsx)(m.X,{})})]})}function ap({noteId:a}){let[c,d]=(0,n.useState)(""),[e,f]=(0,af.useServerAction)(R,{onOk:()=>{d(""),(0,ah.revalidate)(o.queryKey.memory)}}),g=()=>{let b=c.trim();b&&!f&&e(a,[b])};return(0,b.jsxs)("div",{className:"flex items-center gap-1.5 pb-1",children:[(0,b.jsx)(r.Input,{value:c,onChange:a=>d(a.target.value),onKeyDown:am(g,()=>d("")),"aria-label":"Add a fact",placeholder:"Add a fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,b.jsxs)(p.Button,{size:"sm",variant:"outline",loading:f,disabled:!c.trim(),onClick:g,children:[!f&&(0,b.jsx)(k.Plus,{}),"Add"]})]})}function aq({noteId:a,fact:e}){let f,[g,i]=(0,n.useState)(!1),[k,q]=(0,n.useState)(e.text),[s,t]=(0,af.useServerAction)(V,{onOk:()=>{i(!1),(0,ah.revalidate)(o.queryKey.memory)}}),[u,v]=(0,af.useServerAction)(W,aj),[w,x]=(0,af.useServerAction)(U,aj),y=()=>{let b=k.trim();if(!b||b===e.text)return i(!1);s(a,e.id,b)},z="user"===(f=e.source)?"you":"call"===f?"on a call":"bot"===f?"a bot":"";return(0,b.jsxs)("div",{className:"flex min-h-10 items-center gap-1.5",children:[(0,b.jsx)(p.Button,{size:"icon-sm",variant:e.alwaysLoad?"secondary":"ghost","aria-pressed":e.alwaysLoad,"aria-label":e.alwaysLoad?"Stop carrying into calls":"Carry into every call",title:"Carried into every call, without opening this note",loading:v,onClick:()=>u(a,e.id,!e.alwaysLoad),children:!v&&(0,b.jsx)(j,{className:(0,L.cn)(!e.alwaysLoad&&"text-muted-foreground/45")})}),g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Input,{autoFocus:!0,value:k,onChange:a=>q(a.target.value),onKeyDown:am(y,()=>i(!1)),"aria-label":"Fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:t,onClick:y,children:!t&&(0,b.jsx)(d.Check,{})}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:()=>i(!1),children:(0,b.jsx)(m.X,{})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 pl-1 text-sm leading-relaxed text-foreground/90",children:e.text}),(0,b.jsxs)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground/50",children:[(0,c.format)(e.createdAt,"yyyy.MM.dd"),z&&` \xb7 ${z}`]}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit this fact",onClick:()=>{q(e.text),i(!0)},children:(0,b.jsx)(h,{})}),(0,b.jsx)(p.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this fact",loading:x,onClick:()=>w(a,e.id),children:!x&&(0,b.jsx)(l.Trash2,{})})]})]})}let ar=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function as(){return s.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,b.jsx)(at,{onDone:a})})}function at({onDone:a}){let[c,d]=(0,n.useState)("people"),[e,f]=(0,n.useState)(""),[g,h]=(0,n.useState)(""),[i,j]=(0,n.useState)(""),[l,m,,s]=(0,af.useServerAction)(S,{errorMessage:!1,onOk:()=>{(0,ah.revalidate)(o.queryKey.memory),a()}}),t=ar.find(a=>a.key===c),w=e.trim()&&g.trim()&&!m,x=()=>{w&&l(`${c}/${e.trim()}`,g.trim(),i.split("\n").map(a=>a.trim()).filter(Boolean))};return(0,b.jsxs)(ae.SettingDialogContent,{title:"New note",description:"Where the agent files what it learns about this subject.",footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p.Button,{variant:"ghost",onClick:a,children:"Cancel"}),(0,b.jsxs)(p.Button,{disabled:!w,loading:m,onClick:x,children:[!m&&(0,b.jsx)(k.Plus,{}),"Create"]})]}),children:[(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{children:"Kind"}),(0,b.jsx)(u.Tabs,{value:c,onValueChange:a=>d(a),children:(0,b.jsx)(u.TabsList,{className:"w-full",children:ar.map(a=>(0,b.jsx)(u.TabsTrigger,{value:a.key,children:a.label},a.key))})})]}),(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,b.jsxs)(q.FieldContent,{children:[(0,b.jsx)(r.Input,{id:"note-name",value:e,onChange:a=>f(a.target.value),placeholder:t?.placeholder,spellCheck:!1,required:!0}),(0,b.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[c,"/",e.trim()||"…"]})]})]}),(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,b.jsx)(q.FieldContent,{children:(0,b.jsx)(r.Input,{id:"note-summary",value:g,onChange:a=>h(a.target.value),onKeyDown:a=>"Enter"===a.key&&x(),placeholder:"One line the agent sees in its note list",required:!0})})]}),(0,b.jsxs)(q.Field,{children:[(0,b.jsx)(q.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,b.jsx)(v.Textarea,{id:"note-facts",value:i,onChange:a=>j(a.target.value),placeholder:`One per line
|
|
2
2
|
${t?.fact??""}`,className:"min-h-24 resize-none text-sm"})]})]}),s&&(0,b.jsx)("p",{className:"font-mono text-xs text-destructive",children:s})]})}a.s(["MemorySetting",0,function(){let{items:a,isLoading:c,isLoadingMore:d,error:e,hasMore:f,sentinelRef:g}=(0,ag.useServerPages)({key:a=>o.queryKey.memoryPage(a*w.PAGE_SIZE)}),[h,i]=(0,n.useState)(""),[j,l]=(0,n.useState)(new Set),[m,q]=(0,n.useState)(!1);if(c)return(0,b.jsx)(ae.SettingSkeleton,{});if(e)return(0,b.jsx)(ae.SettingError,{message:e.message});let r=h.trim().toLowerCase(),s=r?a.filter(a=>[a.path,a.description,...a.aliases??[],...a.facts.map(a=>a.text)].some(a=>a.toLowerCase().includes(r))):a,u=a.reduce((a,b)=>a+b.factCount,0),v=a.reduce((a,b)=>a+b.facts.filter(a=>a.alwaysLoad).length,0),x=f?"+":"";return(0,b.jsxs)("div",{className:"relative h-full min-h-0",children:[(0,b.jsxs)(ae.SettingScreen,{footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ae.SettingRailNote,{children:(0,b.jsxs)("span",{className:"font-mono",children:[v," of ",w.MEMORY_LIMITS.carried," carried into every call"]})}),(0,b.jsxs)(p.Button,{size:"sm",variant:m?"secondary":"ghost","aria-pressed":m,onClick:()=>q(!m),children:[(0,b.jsx)(al,{}),"Edit with a model"]})]}),children:[(0,b.jsx)(ae.SettingToolbar,{count:(0,b.jsxs)("span",{className:"flex items-center gap-3",children:[`${a.length}${x} notes \xb7 ${u}${x} facts`,(0,b.jsxs)(p.Button,{size:"sm",variant:"outline",className:"font-sans",onClick:as,children:[(0,b.jsx)(k.Plus,{}),"New note"]})]}),children:(0,b.jsx)(ae.SettingFilter,{value:h,onChange:i,placeholder:"Filter memory"})}),r&&0===s.length&&(0,b.jsx)("p",{className:"px-1 text-xs text-muted-foreground/60",children:"Nothing matches"}),ai.map(({key:a,label:c})=>{let d=s.filter(b=>(function(a){if("profile"===a||"preferences"===a)return"you";let b=a.slice(0,a.indexOf("/"));return ac.includes(b)?b:"other"})(b.path)===a);return 0===d.length?null:(0,b.jsx)(ae.SettingGroup,{label:c,children:(0,b.jsx)(ae.SettingItems,{children:d.map(a=>(0,b.jsx)(an,{note:a,open:j.has(a.id)!==!!r,onToggle:()=>{let b;return b=a.id,l(a=>{let c=new Set(a);return c.delete(b)||c.add(b),c})}},a.id))})},a)}),(0,b.jsx)(ae.SettingMore,{hasMore:f,loading:d,sentinelRef:g,ghost:(0,b.jsxs)("div",{className:"flex h-12 items-center gap-3 px-4",children:[(0,b.jsx)(t.Skeleton,{className:"h-3 w-24"}),(0,b.jsx)(t.Skeleton,{className:"h-3 w-56"})]})})]}),m&&(0,b.jsx)(N,{notes:a})]})}],857022)}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=features_memory_components_memory-setting_tsx_0oa43sw._.js.map
|
package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[41014,a=>{"use strict";var b=a.i(187924),c=a.i(256711),d=a.i(987234),e=a.i(164831);let f={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};f.node;let g=(0,e.default)(f);var h=a.i(589027),i=a.i(141146),j=a.i(875160),k=a.i(272944),l=a.i(738835),m=a.i(951675),n=a.i(474215),o=a.i(572131),p=a.i(767561),q=a.i(340695),r=a.i(965733),s=a.i(676504),t=a.i(205522),u=a.i(446181),v=a.i(777794),w=a.i(545097),x=a.i(280281),y=a.i(546893),z=a.i(287702),A=a.i(913834),B=a.i(869480),C=a.i(135432),D=a.i(619477),E=a.i(28996),F=a.i(199169),G=a.i(313237),H=a.i(759497),I=a.i(497895),J=a.i(405050);let K=(0,J.createServerReference)("7fcce53089b7d9ab37e1ede476aa5dedc0b0d35e12",J.callServer,void 0,J.findSourceMapURL,"createRoutineAction"),L=(0,J.createServerReference)("7fdc335db44dcf20b0412b805f81e431a0f5686511",J.callServer,void 0,J.findSourceMapURL,"deleteRoutineAction"),M=(0,J.createServerReference)("7fa185f09203bb0a1f39243fa623f48a736f8dd739",J.callServer,void 0,J.findSourceMapURL,"runRoutineNowAction"),N=(0,J.createServerReference)("7f07a02cdabcb5642ab071031c8335e8f0ba101a04",J.callServer,void 0,J.findSourceMapURL,"updateRoutineAction");var O=a.i(702080);let P=[1,2,3,4,5,6,7],Q=O.default.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"A time is HH:MM, 00:00 to 23:59");function R(a){let[b,c]=a.split(" "),[d,e,f]=b.split("-").map(Number),[g,h]=c.split(":").map(Number);return new Date(d,e-1,f,g,h)}let S=/^\d{4}-\d\d-\d\d ([01]\d|2[0-3]):[0-5]\d$/,T=O.default.string().regex(S,'A moment is "YYYY-MM-DD HH:MM"').refine(a=>{if(!S.test(a))return!0;let b=R(a);return b.getMonth()===Number(a.slice(5,7))-1&&b.getDate()===Number(a.slice(8,10))},"There is no such day"),U=O.default.discriminatedUnion("kind",[O.default.object({kind:O.default.literal("once"),at:T}),O.default.object({kind:O.default.literal("daily"),time:Q,days:O.default.array(O.default.number().int().min(1).max(7)).min(1,"Pick at least one day").transform(a=>[...new Set(a)].sort((a,b)=>a-b))}),O.default.object({kind:O.default.literal("every"),hours:O.default.number().int().min(z.ROUTINE.minHours,`No more often than every ${z.ROUTINE.minHours}h`).max(168)})]),V=O.default.object({bot:O.default.string().trim().min(1,"Pick a bot"),label:O.default.string().trim().min(1,"Give it a name").max(80),request:O.default.string().trim().min(1,"Say what it should do"),schedule:U}),W=O.default.object({id:O.default.string(),status:O.default.enum(["running","waiting","done","cancelled"]),outcome:O.default.string().nullable(),updatedAt:F.DateLikeSchema});V.extend({id:O.default.string(),enabled:O.default.boolean(),nextRunAt:F.DateLikeSchema,runs:O.default.array(W)});let X=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(a){if("once"===a.kind){let[b,c]=a.at.split(" "),[,d,e]=b.split("-").map(Number);return`Once \xb7 ${Y[d-1]} ${e} ${c}`}if("every"===a.kind)return 1===a.hours?"Every hour":`Every ${a.hours} hours`;let{days:b,time:c}=a;if(7===b.length)return`Daily ${c}`;if(1===b.length)return`${X[b[0]-1]} ${c}`;let d=b.every((a,c)=>0===c||a===b[c-1]+1)?`${X[b[0]-1]}–${X[b.at(-1)-1]}`:b.map(a=>X[a-1]).join(" ");return`Daily ${c} \xb7 ${d}`}var $=a.i(156819);let _=(a,b)=>{let c=b?.find(b=>b.name===a)?.icon;return{color:c?.color,shape:c?.shape,outline:c?.outline,paint:c?.paint}};function aa({routine:a,bots:c,open:d,onOpen:e,onSwitch:f}){let g=function(a,b){let c=a.runs[0],d=c?.outcome?(0,I.plainText)(c.outcome):"",e=c?`${(0,F.whenOf)(c.updatedAt)}${d?` — ${d}`:""}`:"Not run yet";if(!a.enabled)return{text:`Off \xb7 ${e}`,tone:"text-muted-foreground"};let f=b?.find(b=>b.name===a.bot);return b&&(!f||f.disabled)?{text:f?`${a.bot} is switched off`:`${a.bot} is gone — pick another bot`,tone:I.WAITING_INK,waits:!0}:c?.status==="running"?{text:"Running now",tone:"",shine:!0}:c?.status==="waiting"?{text:`The last run waits on you${d?`: ${d}`:""}`,tone:I.WAITING_INK,waits:!0}:{text:e,tone:"text-muted-foreground"}}(a,c),h=a.runs[0]?.status==="running";return(0,b.jsxs)("div",{className:(0,I.cn)("flex items-center gap-3 p-4 transition-colors",d?"bg-muted/80":"hover:bg-muted/50"),children:[(0,b.jsxs)("button",{type:"button",onClick:e,className:(0,I.cn)("flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",!a.enabled&&"opacity-70"),children:[(0,b.jsx)(A.BotMark,{size:40,seed:a.bot,..._(a.bot,c),state:h?"thinking":"idle",notify:!!g.waits,className:"shrink-0"}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a.label}),h&&(0,b.jsx)(j.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),(0,b.jsx)("span",{className:"flex min-w-0 text-[13px] leading-snug",children:g.shine?(0,b.jsx)(w.ShinyText,{text:g.text,speed:2.2,className:"min-w-0 truncate"}):(0,b.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",g.tone),children:g.text})})]}),(0,b.jsxs)("span",{className:"flex w-44 shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",children:[(0,b.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 text-foreground",children:[(0,b.jsx)($.RoutineMark,{className:"size-3 shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"truncate",children:Z(a.schedule)})]}),(0,b.jsx)("span",{className:"max-w-full truncate text-muted-foreground/70",children:a.enabled?`next ${(0,F.whenOf)(a.nextRunAt)}`:"off"})]})]}),(0,b.jsx)(x.Switch,{checked:a.enabled,onCheckedChange:f,"aria-label":`${a.label} on or off`,className:"shrink-0"}),(0,b.jsx)("button",{type:"button",onClick:e,"aria-label":`Open ${a.label}`,className:"shrink-0 rounded-md text-muted-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(i.ChevronRight,{className:"size-4"})})]})}let ab=a=>String(a).padStart(2,"0");function ac(a,b=new Date){let c=new Date(b);return c.setDate(c.getDate()+a),`${c.getFullYear()}-${ab(c.getMonth()+1)}-${ab(c.getDate())}`}let ad=(a,b)=>{let c=a?.schedule;return{label:a?.label??"",bot:a?.bot??b.find(a=>!a.disabled)?.name??"",request:a?.request??"",kind:c?.kind??"daily",time:c?.kind==="daily"?c.time:c?.kind==="once"?c.at.slice(11):"09:00",days:c?.kind==="daily"?c.days:[...P],hours:c?.kind==="every"?c.hours:6,date:c?.kind==="once"?c.at.slice(0,10):ac(1)}};function ae(a){let b=/^\d\d:\d\d$/.test(a.time);return"once"===a.kind?b&&a.date?{kind:"once",at:`${a.date} ${a.time}`}:null:"daily"===a.kind?a.days.length&&b?{kind:"daily",time:a.time,days:a.days}:null:{kind:"every",hours:a.hours}}let af=a=>a?.kind==="once"&&R(a.at)<=new Date,ag=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ah=[{label:"Every day",days:[1,2,3,4,5,6,7]},{label:"Weekdays",days:[1,2,3,4,5]},{label:"Weekends",days:[6,7]}],ai=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],aj=[1,2,3,6,12,24].filter(a=>a>=z.ROUTINE.minHours);function ak({routine:a,bots:c,onClose:d,onMade:e}){var f,g;let j,[w,z]=(0,o.useState)(null),B=(0,o.useCallback)(a=>{z(a?.closest("[data-slot=dialog-content]")??null)},[]),D="new"===a?null:a,J="new"===a?"new":a?.id??"",[O,Q]=(0,o.useState)(()=>ad(D,c));(0,o.useEffect)(()=>Q(ad(D,c)),[J]);let R=a=>Q(b=>({...b,...a})),S=()=>(0,H.revalidate)(p.queryKey.routines),[T,U]=(0,G.useServerAction)(K,{onOk:a=>{S(),e(a.id)}}),[V]=(0,G.useServerAction)(N,{onOk:S}),[W]=(0,G.useServerAction)(L,{onOk:S}),[X,Y]=(0,G.useServerAction)(M,{onOk:()=>{S(),(0,H.revalidate)(p.queryKey.threads)}}),aa=ae(O),ao=aa&&!af(aa)&&O.label.trim()&&O.bot&&O.request.trim()?{label:O.label.trim(),bot:O.bot,request:O.request.trim(),schedule:aa}:null,at=a=>{D&&V(D.id,a).catch(()=>{})},au=a=>{R(a);let b=ae({...O,...a});!b||af(b)||at({schedule:b,..."once"===b.kind?{enabled:!0}:{}})},av=async()=>{!D||await u.notify.confirm({title:`Delete "${D.label}"?`,description:"It starts no more. The jobs it already opened stay.",okText:"Delete",destructive:!0})&&(await W(D.id).catch(()=>{}),d())},aw=c.find(a=>a.name===O.bot),ax=D?.runs[0]?.status==="running"||D?.runs[0]?.status==="waiting";return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{ref:B,hidden:!0}),(0,b.jsx)(r.Dialog,{open:!!(a&&w),onOpenChange:a=>!a&&d(),modal:!1,disablePointerDismissal:!0,children:(0,b.jsx)(r.DialogPortal,{container:w,children:(0,b.jsx)(r.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:a&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[aw?(0,b.jsx)(A.BotMark,{size:28,seed:aw.name,..._(aw.name,c),notify:!1,className:"shrink-0"}):(0,b.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,b.jsx)($.RoutineMark,{className:"size-3.5"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)(r.DialogTitle,{className:"sr-only",children:D?D.label:"New routine"}),(0,b.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:D?D.label:"New routine"}),D&&(0,b.jsxs)("p",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[(0,b.jsx)($.RoutineMark,{className:"size-3 shrink-0"}),(0,b.jsxs)("span",{className:"truncate",children:[D.bot," · ",Z(D.schedule),D.enabled&&` \xb7 next ${(0,F.whenOf)(D.nextRunAt)}`]})]})]}),D&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.Switch,{checked:D.enabled,onCheckedChange:a=>void V(D.id,{enabled:a}).catch(()=>{}),"aria-label":`${D.label} on or off`,className:"mr-1 shrink-0"}),(0,b.jsxs)(s.DropdownMenu,{children:[(0,b.jsx)(s.DropdownMenuTrigger,{render:(0,b.jsx)(q.Button,{size:"icon-sm",variant:"ghost","aria-label":"More",className:"text-muted-foreground"}),children:(0,b.jsx)(k.MoreHorizontal,{})}),(0,b.jsx)(s.DropdownMenuContent,{align:"end",children:(0,b.jsxs)(s.DropdownMenuItem,{variant:"destructive",onClick:av,children:[(0,b.jsx)(m.Trash2,{}),"Delete"]})})]})]}),(0,b.jsx)(r.DialogClose,{render:(0,b.jsx)(q.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the routine"}),children:(0,b.jsx)(n.X,{})})]}),(0,b.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto px-5 pt-3 pb-5",children:[(0,b.jsxs)(as,{label:"Name",htmlFor:"routine-name",children:[(0,b.jsx)(t.Input,{id:"routine-name",value:O.label,onChange:a=>R({label:a.target.value}),onBlur:()=>{let a=O.label.trim();a&&a!==D?.label&&at({label:a})},placeholder:"Morning mail",maxLength:80,autoFocus:!D}),(0,b.jsx)(al,{children:"What it is called in this list, and what she calls it on a call."})]}),(0,b.jsxs)(as,{label:"Bot",children:[(0,b.jsxs)(s.DropdownMenu,{children:[(0,b.jsxs)(s.DropdownMenuTrigger,{render:(0,b.jsx)(q.Button,{variant:"outline",className:"justify-start gap-2 pl-1.5 font-normal"}),children:[aw?(0,b.jsx)(A.BotMark,{size:20,seed:aw.name,..._(aw.name,c),notify:!1,className:"shrink-0"}):null,(0,b.jsx)("span",{className:(0,I.cn)(!aw&&"pl-1.5 text-muted-foreground"),children:aw?.name??(O.bot||"Pick a bot")}),(0,b.jsx)(h.ChevronDown,{className:"ml-1 size-3.5 text-muted-foreground"})]}),(0,b.jsx)(s.DropdownMenuContent,{align:"start",children:(0,b.jsx)(s.DropdownMenuGroup,{children:c.filter(a=>!a.disabled).map(a=>(0,b.jsxs)(s.DropdownMenuItem,{onClick:()=>{R({bot:a.name}),a.name!==D?.bot&&at({bot:a.name})},children:[(0,b.jsx)(A.BotMark,{size:16,seed:a.name,..._(a.name,c),notify:!1,className:"shrink-0"}),a.name]},a.name))})})]}),(0,b.jsx)(al,{children:"Who does the job each time it starts."})]}),(0,b.jsx)(as,{label:"When",children:(0,b.jsxs)("div",{className:"space-y-3.5",children:[(0,b.jsx)(v.Segmented,{"aria-label":"How it starts",value:O.kind,onChange:a=>au({kind:a}),options:[{value:"once",label:"Once"},{value:"daily",label:"On set days"},{value:"every",label:"Every few hours"}]}),(0,b.jsx)("div",{className:"space-y-2.5",children:"once"===O.kind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(an,{word:"On",children:(0,b.jsx)(ap,{value:O.date,onPick:a=>au({date:a})})}),(0,b.jsxs)(an,{word:"At",children:[(0,b.jsx)(aq,{value:O.time,onChange:a=>R({time:a}),onDone:()=>au({})}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"or"}),(0,b.jsx)(am,{picked:!1,onClick:()=>{let a;return au(((a=new Date(Date.now()+36e5)).setMinutes(5*Math.ceil(a.getMinutes()/5),0,0),{date:ac(0,a),time:`${ab(a.getHours())}:${ab(a.getMinutes())}`}))},children:"In an hour"})]})]}):"daily"===O.kind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(an,{word:"On",children:P.map(a=>{let c=O.days.includes(a);return(0,b.jsx)(am,{picked:c,"aria-label":ai[a-1],onClick:()=>au({days:c?O.days.filter(b=>b!==a):[...O.days,a].sort((a,b)=>a-b)}),children:ag[a-1]},a)})}),(0,b.jsx)(an,{children:ah.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>au({days:[...a.days]}),className:"h-6.5 rounded-full bg-muted px-2.5 text-xs text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:a.label},a.label))}),(0,b.jsx)(an,{word:"At",children:(0,b.jsx)(aq,{value:O.time,onChange:a=>R({time:a}),onDone:()=>au({})})})]}):(0,b.jsxs)(an,{word:"Every",children:[(aj.includes(O.hours)?aj:[...aj,O.hours].sort((a,b)=>a-b)).map(a=>(0,b.jsx)(am,{picked:a===O.hours,onClick:()=>au({hours:a}),className:"min-w-10 px-3",children:a},a)),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"hours"})]})}),(0,b.jsx)(ar,{schedule:aa,kind:O.kind})]})}),(0,b.jsxs)(as,{label:"Job",htmlFor:"routine-request",children:[(0,b.jsx)(y.Textarea,{id:"routine-request",value:O.request,onChange:a=>R({request:a.target.value}),onBlur:()=>{let a=O.request.trim();a&&a!==D?.request&&at({request:a})},placeholder:"Go through the mail that came since the last run and draft replies to what needs one. Send nothing.",className:"min-h-28"}),(0,b.jsx)(al,{children:"Handed to the bot as a new thread each time, with a line on how the last run ended. Nobody is there to ask, so say everything it needs."})]}),D&&(0,b.jsxs)("div",{className:"pt-1",children:[(0,b.jsx)("div",{className:"flex h-6 items-center",children:(0,b.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Runs"})}),0===D.runs.length?(0,b.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Not run yet."}):D.runs.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>{var b;return b=a.id,void(E.useSettingsStore.getState().hide(),C.roomOpens.open(b))},className:"flex h-9 w-full items-center gap-3 border-t border-border/60 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,b.jsx)("span",{className:"w-28 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,F.whenOf)(a.updatedAt)}),(0,b.jsx)("span",{className:(0,I.cn)("min-w-0 flex-1 truncate","waiting"===a.status?I.WAITING_INK:"text-muted-foreground"),children:"running"===a.status?"Running now":a.outcome?(0,I.plainText)(a.outcome):"cancelled"===a.status?"Stopped":"No words"}),(0,b.jsx)(i.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground"})]},a.id))]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-5 py-3",children:[(0,b.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-4 text-muted-foreground",children:D||ao?"Starts while Thursday is running on this computer, with a tab open unless work goes on with the app closed. A time that passed meanwhile starts once, not once for each.":`Still needs ${f=O,g=aa,(j=[f.label.trim()?null:"a name",f.bot?null:"a bot",!g?"a time":af(g)?"a time still ahead":null,f.request.trim()?null:"a job"].filter(a=>null!==a)).length>1?`${j.slice(0,-1).join(", ")} and ${j.at(-1)}`:j[0]??"nothing"}.`}),D?(0,b.jsxs)(q.Button,{variant:"outline",size:"sm",loading:Y,disabled:ax,title:ax?"Its last run is still open":void 0,onClick:()=>void X(D.id).catch(()=>{}),children:[(0,b.jsx)(l.Play,{}),"Run now"]}):(0,b.jsx)(q.Button,{variant:"brand",size:"sm",loading:U,disabled:!ao,onClick:()=>ao&&void T(ao).catch(()=>{}),children:"Create"})]})]})})})})]})}let al=({children:a})=>(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a});function am({picked:a,className:c,...d}){return(0,b.jsx)("button",{type:"button","aria-pressed":a,className:(0,I.cn)("inline-flex h-8 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] whitespace-nowrap outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"bg-primary font-medium text-primary-foreground":"text-foreground ring-1 ring-border ring-inset hover:bg-muted",c),...d})}function an({word:a,children:c}){return(0,b.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,b.jsx)("span",{className:"flex h-8 w-9 shrink-0 items-center text-[13px] text-muted-foreground",children:a}),(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:c})]})}function ao(a){let b=R(`${a} 00:00`),d=(b.getTime()-R(`${ac(0)} 00:00`).getTime())/864e5;return(0,c.format)(b,d<7?"EEE d":"EEE, MMM d")}function ap({value:a,onPick:c}){let d=(0,o.useRef)(null),e=[0,1,2,3].map(a=>ac(a)),f=()=>d.current?.showPicker();return(0,b.jsxs)(b.Fragment,{children:[e.map((d,e)=>(0,b.jsx)(am,{picked:d===a,onClick:()=>c(d),children:0===e?"Today":1===e?"Tomorrow":ao(d)},d)),!e.includes(a)&&(0,b.jsx)(am,{picked:!0,onClick:f,children:ao(a)}),(0,b.jsxs)("span",{className:"relative",children:[(0,b.jsx)(am,{picked:!1,"aria-label":"Another day",onClick:f,className:"w-8 px-0",children:(0,b.jsx)(g,{className:"size-3.5"})}),(0,b.jsx)("input",{ref:d,type:"date",tabIndex:-1,"aria-hidden":!0,min:e[0],value:a,onChange:a=>a.target.value&&c(a.target.value),className:"pointer-events-none absolute inset-0 opacity-0"})]})]})}function aq({value:a,onChange:c,onDone:d}){return(0,b.jsx)(t.Input,{type:"time","aria-label":"Time of day",value:a,onChange:a=>c(a.target.value),onBlur:d,onClick:a=>a.currentTarget.showPicker?.(),className:"h-8.5 w-28 px-3 text-[15px] tabular-nums md:text-[15px] [&::-webkit-calendar-picker-indicator]:hidden"})}function ar({schedule:a,kind:c}){if(!a||af(a))return(0,b.jsx)("p",{className:"text-xs text-destructive",children:a?"That time has passed. Pick a later one.":"daily"===c?"Pick a time and at least one day.":"Pick a time."});let e=function(a,b){if("once"===a.kind)return R(a.at);if("every"===a.kind)return new Date(b.getTime()+36e5*a.hours);let[c,d]=a.time.split(":").map(Number);for(let e=0;e<=7;e++){let f=new Date(b);f.setDate(f.getDate()+e),f.setHours(c,d,0,0);let g=0===f.getDay()?7:f.getDay();if(f>b&&a.days.includes(g))return f}return new Date(b.getTime()+864e5)}(a,new Date);return(0,b.jsxs)("p",{className:"flex items-start gap-2 text-[13px] leading-5",children:[(0,b.jsx)($.RoutineMark,{className:"mt-0.75 size-3.5 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:"min-w-0",children:[Z(a),(0,b.jsxs)("span",{className:"text-muted-foreground",children:[" · ","once"===a.kind?`${(0,d.formatDistanceToNowStrict)(e,{addSuffix:!0})}, then it switches itself off`:`first start ${(0,F.whenOf)(e)}`]})]})]})}function as({label:a,htmlFor:c,children:d}){return(0,b.jsxs)("div",{className:"flex gap-3",children:[(0,b.jsx)("label",{htmlFor:c,className:"w-14 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:a}),(0,b.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:d})]})}a.s(["RoutineSetting",0,function(){let[a,c]=(0,o.useState)(null),{data:d,isLoading:e,error:f}=(0,H.useServerRoute)(p.queryKey.routines),{data:g}=(0,H.useServerRoute)(p.queryKey.bot),[h]=(0,G.useServerAction)(N,{onOk:()=>(0,H.revalidate)(p.queryKey.routines)});if(e)return(0,b.jsx)(D.SettingSkeleton,{rows:3});if(f)return(0,b.jsx)(D.SettingError,{message:f.message});let i=d??[],j=i.filter(a=>a.enabled).length,k=i.find(b=>b.id===a);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(D.SettingScreen,{footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(D.SettingRailNote,{children:[i.length," of ",z.ROUTINE.max," · ",j," on"]}),(0,b.jsx)(B.KeepWorkingSwitch,{})]}),children:(0,b.jsx)(D.SettingItems,{addRow:i.length<z.ROUTINE.max?{label:"New routine",onClick:()=>c("new")}:void 0,children:0===i.length?(0,b.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:'Nothing starts by itself yet. Tell Thursday what should — "every weekday at nine, go through my mail" — or make one here.'}):i.map(d=>(0,b.jsx)(aa,{routine:d,bots:g,open:d.id===a,onOpen:()=>c(d.id),onSwitch:a=>h(d.id,{enabled:a})},d.id))})}),(0,b.jsx)(ak,{routine:"new"===a?"new":k??null,bots:g??[],onClose:()=>c(null),onMade:a=>c(a)})]})}],41014)}];
|
|
1
|
+
module.exports=[41014,a=>{"use strict";var b=a.i(187924),c=a.i(256711),d=a.i(987234),e=a.i(164831);let f={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};f.node;let g=(0,e.default)(f);var h=a.i(589027),i=a.i(141146),j=a.i(875160),k=a.i(272944),l=a.i(738835),m=a.i(951675),n=a.i(474215),o=a.i(572131),p=a.i(767561),q=a.i(340695),r=a.i(965733),s=a.i(676504),t=a.i(205522),u=a.i(446181),v=a.i(777794),w=a.i(545097),x=a.i(280281),y=a.i(546893),z=a.i(287702),A=a.i(913834),B=a.i(869480),C=a.i(135432),D=a.i(619477),E=a.i(28996),F=a.i(199169),G=a.i(313237),H=a.i(759497),I=a.i(497895),J=a.i(405050);let K=(0,J.createServerReference)("7f69ad8af4cb47a2951021d9fd4d319363923a906f",J.callServer,void 0,J.findSourceMapURL,"createRoutineAction"),L=(0,J.createServerReference)("7f8b83867e2893787e9ee5c356c1b5027f9aba9d43",J.callServer,void 0,J.findSourceMapURL,"deleteRoutineAction"),M=(0,J.createServerReference)("7f4b2db9339530bc040c2ef87e040c478a32455442",J.callServer,void 0,J.findSourceMapURL,"runRoutineNowAction"),N=(0,J.createServerReference)("7fd6af6c30beee0e6503ec41db633fb4079ed09786",J.callServer,void 0,J.findSourceMapURL,"updateRoutineAction");var O=a.i(702080);let P=[1,2,3,4,5,6,7],Q=O.default.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"A time is HH:MM, 00:00 to 23:59");function R(a){let[b,c]=a.split(" "),[d,e,f]=b.split("-").map(Number),[g,h]=c.split(":").map(Number);return new Date(d,e-1,f,g,h)}let S=/^\d{4}-\d\d-\d\d ([01]\d|2[0-3]):[0-5]\d$/,T=O.default.string().regex(S,'A moment is "YYYY-MM-DD HH:MM"').refine(a=>{if(!S.test(a))return!0;let b=R(a);return b.getMonth()===Number(a.slice(5,7))-1&&b.getDate()===Number(a.slice(8,10))},"There is no such day"),U=O.default.discriminatedUnion("kind",[O.default.object({kind:O.default.literal("once"),at:T}),O.default.object({kind:O.default.literal("daily"),time:Q,days:O.default.array(O.default.number().int().min(1).max(7)).min(1,"Pick at least one day").transform(a=>[...new Set(a)].sort((a,b)=>a-b))}),O.default.object({kind:O.default.literal("every"),hours:O.default.number().int().min(z.ROUTINE.minHours,`No more often than every ${z.ROUTINE.minHours}h`).max(168)})]),V=O.default.object({bot:O.default.string().trim().min(1,"Pick a bot"),label:O.default.string().trim().min(1,"Give it a name").max(80),request:O.default.string().trim().min(1,"Say what it should do"),schedule:U}),W=O.default.object({id:O.default.string(),status:O.default.enum(["running","waiting","done","cancelled"]),outcome:O.default.string().nullable(),updatedAt:F.DateLikeSchema});V.extend({id:O.default.string(),enabled:O.default.boolean(),nextRunAt:F.DateLikeSchema,runs:O.default.array(W)});let X=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(a){if("once"===a.kind){let[b,c]=a.at.split(" "),[,d,e]=b.split("-").map(Number);return`Once \xb7 ${Y[d-1]} ${e} ${c}`}if("every"===a.kind)return 1===a.hours?"Every hour":`Every ${a.hours} hours`;let{days:b,time:c}=a;if(7===b.length)return`Daily ${c}`;if(1===b.length)return`${X[b[0]-1]} ${c}`;let d=b.every((a,c)=>0===c||a===b[c-1]+1)?`${X[b[0]-1]}–${X[b.at(-1)-1]}`:b.map(a=>X[a-1]).join(" ");return`Daily ${c} \xb7 ${d}`}var $=a.i(156819);let _=(a,b)=>{let c=b?.find(b=>b.name===a)?.icon;return{color:c?.color,shape:c?.shape,outline:c?.outline,paint:c?.paint}};function aa({routine:a,bots:c,open:d,onOpen:e,onSwitch:f}){let g=function(a,b){let c=a.runs[0],d=c?.outcome?(0,I.plainText)(c.outcome):"",e=c?`${(0,F.whenOf)(c.updatedAt)}${d?` — ${d}`:""}`:"Not run yet";if(!a.enabled)return{text:`Off \xb7 ${e}`,tone:"text-muted-foreground"};let f=b?.find(b=>b.name===a.bot);return b&&(!f||f.disabled)?{text:f?`${a.bot} is switched off`:`${a.bot} is gone — pick another bot`,tone:I.WAITING_INK,waits:!0}:c?.status==="running"?{text:"Running now",tone:"",shine:!0}:c?.status==="waiting"?{text:`The last run waits on you${d?`: ${d}`:""}`,tone:I.WAITING_INK,waits:!0}:{text:e,tone:"text-muted-foreground"}}(a,c),h=a.runs[0]?.status==="running";return(0,b.jsxs)("div",{className:(0,I.cn)("flex items-center gap-3 p-4 transition-colors",d?"bg-muted/80":"hover:bg-muted/50"),children:[(0,b.jsxs)("button",{type:"button",onClick:e,className:(0,I.cn)("flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",!a.enabled&&"opacity-70"),children:[(0,b.jsx)(A.BotMark,{size:40,seed:a.bot,..._(a.bot,c),state:h?"thinking":"idle",notify:!!g.waits,className:"shrink-0"}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a.label}),h&&(0,b.jsx)(j.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),(0,b.jsx)("span",{className:"flex min-w-0 text-[13px] leading-snug",children:g.shine?(0,b.jsx)(w.ShinyText,{text:g.text,speed:2.2,className:"min-w-0 truncate"}):(0,b.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",g.tone),children:g.text})})]}),(0,b.jsxs)("span",{className:"flex w-44 shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",children:[(0,b.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 text-foreground",children:[(0,b.jsx)($.RoutineMark,{className:"size-3 shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"truncate",children:Z(a.schedule)})]}),(0,b.jsx)("span",{className:"max-w-full truncate text-muted-foreground/70",children:a.enabled?`next ${(0,F.whenOf)(a.nextRunAt)}`:"off"})]})]}),(0,b.jsx)(x.Switch,{checked:a.enabled,onCheckedChange:f,"aria-label":`${a.label} on or off`,className:"shrink-0"}),(0,b.jsx)("button",{type:"button",onClick:e,"aria-label":`Open ${a.label}`,className:"shrink-0 rounded-md text-muted-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(i.ChevronRight,{className:"size-4"})})]})}let ab=a=>String(a).padStart(2,"0");function ac(a,b=new Date){let c=new Date(b);return c.setDate(c.getDate()+a),`${c.getFullYear()}-${ab(c.getMonth()+1)}-${ab(c.getDate())}`}let ad=(a,b)=>{let c=a?.schedule;return{label:a?.label??"",bot:a?.bot??b.find(a=>!a.disabled)?.name??"",request:a?.request??"",kind:c?.kind??"daily",time:c?.kind==="daily"?c.time:c?.kind==="once"?c.at.slice(11):"09:00",days:c?.kind==="daily"?c.days:[...P],hours:c?.kind==="every"?c.hours:6,date:c?.kind==="once"?c.at.slice(0,10):ac(1)}};function ae(a){let b=/^\d\d:\d\d$/.test(a.time);return"once"===a.kind?b&&a.date?{kind:"once",at:`${a.date} ${a.time}`}:null:"daily"===a.kind?a.days.length&&b?{kind:"daily",time:a.time,days:a.days}:null:{kind:"every",hours:a.hours}}let af=a=>a?.kind==="once"&&R(a.at)<=new Date,ag=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ah=[{label:"Every day",days:[1,2,3,4,5,6,7]},{label:"Weekdays",days:[1,2,3,4,5]},{label:"Weekends",days:[6,7]}],ai=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],aj=[1,2,3,6,12,24].filter(a=>a>=z.ROUTINE.minHours);function ak({routine:a,bots:c,onClose:d,onMade:e}){var f,g;let j,[w,z]=(0,o.useState)(null),B=(0,o.useCallback)(a=>{z(a?.closest("[data-slot=dialog-content]")??null)},[]),D="new"===a?null:a,J="new"===a?"new":a?.id??"",[O,Q]=(0,o.useState)(()=>ad(D,c));(0,o.useEffect)(()=>Q(ad(D,c)),[J]);let R=a=>Q(b=>({...b,...a})),S=()=>(0,H.revalidate)(p.queryKey.routines),[T,U]=(0,G.useServerAction)(K,{onOk:a=>{S(),e(a.id)}}),[V]=(0,G.useServerAction)(N,{onOk:S}),[W]=(0,G.useServerAction)(L,{onOk:S}),[X,Y]=(0,G.useServerAction)(M,{onOk:()=>{S(),(0,H.revalidate)(p.queryKey.threads)}}),aa=ae(O),ao=aa&&!af(aa)&&O.label.trim()&&O.bot&&O.request.trim()?{label:O.label.trim(),bot:O.bot,request:O.request.trim(),schedule:aa}:null,at=a=>{D&&V(D.id,a).catch(()=>{})},au=a=>{R(a);let b=ae({...O,...a});!b||af(b)||at({schedule:b,..."once"===b.kind?{enabled:!0}:{}})},av=async()=>{!D||await u.notify.confirm({title:`Delete "${D.label}"?`,description:"It starts no more. The jobs it already opened stay.",okText:"Delete",destructive:!0})&&(await W(D.id).catch(()=>{}),d())},aw=c.find(a=>a.name===O.bot),ax=D?.runs[0]?.status==="running"||D?.runs[0]?.status==="waiting";return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{ref:B,hidden:!0}),(0,b.jsx)(r.Dialog,{open:!!(a&&w),onOpenChange:a=>!a&&d(),modal:!1,disablePointerDismissal:!0,children:(0,b.jsx)(r.DialogPortal,{container:w,children:(0,b.jsx)(r.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:a&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[aw?(0,b.jsx)(A.BotMark,{size:28,seed:aw.name,..._(aw.name,c),notify:!1,className:"shrink-0"}):(0,b.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,b.jsx)($.RoutineMark,{className:"size-3.5"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)(r.DialogTitle,{className:"sr-only",children:D?D.label:"New routine"}),(0,b.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:D?D.label:"New routine"}),D&&(0,b.jsxs)("p",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[(0,b.jsx)($.RoutineMark,{className:"size-3 shrink-0"}),(0,b.jsxs)("span",{className:"truncate",children:[D.bot," · ",Z(D.schedule),D.enabled&&` \xb7 next ${(0,F.whenOf)(D.nextRunAt)}`]})]})]}),D&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.Switch,{checked:D.enabled,onCheckedChange:a=>void V(D.id,{enabled:a}).catch(()=>{}),"aria-label":`${D.label} on or off`,className:"mr-1 shrink-0"}),(0,b.jsxs)(s.DropdownMenu,{children:[(0,b.jsx)(s.DropdownMenuTrigger,{render:(0,b.jsx)(q.Button,{size:"icon-sm",variant:"ghost","aria-label":"More",className:"text-muted-foreground"}),children:(0,b.jsx)(k.MoreHorizontal,{})}),(0,b.jsx)(s.DropdownMenuContent,{align:"end",children:(0,b.jsxs)(s.DropdownMenuItem,{variant:"destructive",onClick:av,children:[(0,b.jsx)(m.Trash2,{}),"Delete"]})})]})]}),(0,b.jsx)(r.DialogClose,{render:(0,b.jsx)(q.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the routine"}),children:(0,b.jsx)(n.X,{})})]}),(0,b.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto px-5 pt-3 pb-5",children:[(0,b.jsxs)(as,{label:"Name",htmlFor:"routine-name",children:[(0,b.jsx)(t.Input,{id:"routine-name",value:O.label,onChange:a=>R({label:a.target.value}),onBlur:()=>{let a=O.label.trim();a&&a!==D?.label&&at({label:a})},placeholder:"Morning mail",maxLength:80,autoFocus:!D}),(0,b.jsx)(al,{children:"What it is called in this list, and what she calls it on a call."})]}),(0,b.jsxs)(as,{label:"Bot",children:[(0,b.jsxs)(s.DropdownMenu,{children:[(0,b.jsxs)(s.DropdownMenuTrigger,{render:(0,b.jsx)(q.Button,{variant:"outline",className:"justify-start gap-2 pl-1.5 font-normal"}),children:[aw?(0,b.jsx)(A.BotMark,{size:20,seed:aw.name,..._(aw.name,c),notify:!1,className:"shrink-0"}):null,(0,b.jsx)("span",{className:(0,I.cn)(!aw&&"pl-1.5 text-muted-foreground"),children:aw?.name??(O.bot||"Pick a bot")}),(0,b.jsx)(h.ChevronDown,{className:"ml-1 size-3.5 text-muted-foreground"})]}),(0,b.jsx)(s.DropdownMenuContent,{align:"start",children:(0,b.jsx)(s.DropdownMenuGroup,{children:c.filter(a=>!a.disabled).map(a=>(0,b.jsxs)(s.DropdownMenuItem,{onClick:()=>{R({bot:a.name}),a.name!==D?.bot&&at({bot:a.name})},children:[(0,b.jsx)(A.BotMark,{size:16,seed:a.name,..._(a.name,c),notify:!1,className:"shrink-0"}),a.name]},a.name))})})]}),(0,b.jsx)(al,{children:"Who does the job each time it starts."})]}),(0,b.jsx)(as,{label:"When",children:(0,b.jsxs)("div",{className:"space-y-3.5",children:[(0,b.jsx)(v.Segmented,{"aria-label":"How it starts",value:O.kind,onChange:a=>au({kind:a}),options:[{value:"once",label:"Once"},{value:"daily",label:"On set days"},{value:"every",label:"Every few hours"}]}),(0,b.jsx)("div",{className:"space-y-2.5",children:"once"===O.kind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(an,{word:"On",children:(0,b.jsx)(ap,{value:O.date,onPick:a=>au({date:a})})}),(0,b.jsxs)(an,{word:"At",children:[(0,b.jsx)(aq,{value:O.time,onChange:a=>R({time:a}),onDone:()=>au({})}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"or"}),(0,b.jsx)(am,{picked:!1,onClick:()=>{let a;return au(((a=new Date(Date.now()+36e5)).setMinutes(5*Math.ceil(a.getMinutes()/5),0,0),{date:ac(0,a),time:`${ab(a.getHours())}:${ab(a.getMinutes())}`}))},children:"In an hour"})]})]}):"daily"===O.kind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(an,{word:"On",children:P.map(a=>{let c=O.days.includes(a);return(0,b.jsx)(am,{picked:c,"aria-label":ai[a-1],onClick:()=>au({days:c?O.days.filter(b=>b!==a):[...O.days,a].sort((a,b)=>a-b)}),children:ag[a-1]},a)})}),(0,b.jsx)(an,{children:ah.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>au({days:[...a.days]}),className:"h-6.5 rounded-full bg-muted px-2.5 text-xs text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:a.label},a.label))}),(0,b.jsx)(an,{word:"At",children:(0,b.jsx)(aq,{value:O.time,onChange:a=>R({time:a}),onDone:()=>au({})})})]}):(0,b.jsxs)(an,{word:"Every",children:[(aj.includes(O.hours)?aj:[...aj,O.hours].sort((a,b)=>a-b)).map(a=>(0,b.jsx)(am,{picked:a===O.hours,onClick:()=>au({hours:a}),className:"min-w-10 px-3",children:a},a)),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"hours"})]})}),(0,b.jsx)(ar,{schedule:aa,kind:O.kind})]})}),(0,b.jsxs)(as,{label:"Job",htmlFor:"routine-request",children:[(0,b.jsx)(y.Textarea,{id:"routine-request",value:O.request,onChange:a=>R({request:a.target.value}),onBlur:()=>{let a=O.request.trim();a&&a!==D?.request&&at({request:a})},placeholder:"Go through the mail that came since the last run and draft replies to what needs one. Send nothing.",className:"min-h-28"}),(0,b.jsx)(al,{children:"Handed to the bot as a new thread each time, with a line on how the last run ended. Nobody is there to ask, so say everything it needs."})]}),D&&(0,b.jsxs)("div",{className:"pt-1",children:[(0,b.jsx)("div",{className:"flex h-6 items-center",children:(0,b.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Runs"})}),0===D.runs.length?(0,b.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Not run yet."}):D.runs.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>{var b;return b=a.id,void(E.useSettingsStore.getState().hide(),C.roomOpens.open(b))},className:"flex h-9 w-full items-center gap-3 border-t border-border/60 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,b.jsx)("span",{className:"w-28 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,F.whenOf)(a.updatedAt)}),(0,b.jsx)("span",{className:(0,I.cn)("min-w-0 flex-1 truncate","waiting"===a.status?I.WAITING_INK:"text-muted-foreground"),children:"running"===a.status?"Running now":a.outcome?(0,I.plainText)(a.outcome):"cancelled"===a.status?"Stopped":"No words"}),(0,b.jsx)(i.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground"})]},a.id))]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-5 py-3",children:[(0,b.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-4 text-muted-foreground",children:D||ao?"Starts while Thursday is running on this computer, with a tab open unless work goes on with the app closed. A time that passed meanwhile starts once, not once for each.":`Still needs ${f=O,g=aa,(j=[f.label.trim()?null:"a name",f.bot?null:"a bot",!g?"a time":af(g)?"a time still ahead":null,f.request.trim()?null:"a job"].filter(a=>null!==a)).length>1?`${j.slice(0,-1).join(", ")} and ${j.at(-1)}`:j[0]??"nothing"}.`}),D?(0,b.jsxs)(q.Button,{variant:"outline",size:"sm",loading:Y,disabled:ax,title:ax?"Its last run is still open":void 0,onClick:()=>void X(D.id).catch(()=>{}),children:[(0,b.jsx)(l.Play,{}),"Run now"]}):(0,b.jsx)(q.Button,{variant:"brand",size:"sm",loading:U,disabled:!ao,onClick:()=>ao&&void T(ao).catch(()=>{}),children:"Create"})]})]})})})})]})}let al=({children:a})=>(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a});function am({picked:a,className:c,...d}){return(0,b.jsx)("button",{type:"button","aria-pressed":a,className:(0,I.cn)("inline-flex h-8 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] whitespace-nowrap outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"bg-brand font-medium text-brand-foreground":"text-foreground ring-1 ring-border ring-inset hover:bg-muted",c),...d})}function an({word:a,children:c}){return(0,b.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,b.jsx)("span",{className:"flex h-8 w-9 shrink-0 items-center text-[13px] text-muted-foreground",children:a}),(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:c})]})}function ao(a){let b=R(`${a} 00:00`),d=(b.getTime()-R(`${ac(0)} 00:00`).getTime())/864e5;return(0,c.format)(b,d<7?"EEE d":"EEE, MMM d")}function ap({value:a,onPick:c}){let d=(0,o.useRef)(null),e=[0,1,2,3].map(a=>ac(a)),f=()=>d.current?.showPicker();return(0,b.jsxs)(b.Fragment,{children:[e.map((d,e)=>(0,b.jsx)(am,{picked:d===a,onClick:()=>c(d),children:0===e?"Today":1===e?"Tomorrow":ao(d)},d)),!e.includes(a)&&(0,b.jsx)(am,{picked:!0,onClick:f,children:ao(a)}),(0,b.jsxs)("span",{className:"relative",children:[(0,b.jsx)(am,{picked:!1,"aria-label":"Another day",onClick:f,className:"w-8 px-0",children:(0,b.jsx)(g,{className:"size-3.5"})}),(0,b.jsx)("input",{ref:d,type:"date",tabIndex:-1,"aria-hidden":!0,min:e[0],value:a,onChange:a=>a.target.value&&c(a.target.value),className:"pointer-events-none absolute inset-0 opacity-0"})]})]})}function aq({value:a,onChange:c,onDone:d}){return(0,b.jsx)(t.Input,{type:"time","aria-label":"Time of day",value:a,onChange:a=>c(a.target.value),onBlur:d,onClick:a=>a.currentTarget.showPicker?.(),className:"h-8.5 w-28 px-3 text-[15px] tabular-nums md:text-[15px] [&::-webkit-calendar-picker-indicator]:hidden"})}function ar({schedule:a,kind:c}){if(!a||af(a))return(0,b.jsx)("p",{className:"text-xs text-destructive",children:a?"That time has passed. Pick a later one.":"daily"===c?"Pick a time and at least one day.":"Pick a time."});let e=function(a,b){if("once"===a.kind)return R(a.at);if("every"===a.kind)return new Date(b.getTime()+36e5*a.hours);let[c,d]=a.time.split(":").map(Number);for(let e=0;e<=7;e++){let f=new Date(b);f.setDate(f.getDate()+e),f.setHours(c,d,0,0);let g=0===f.getDay()?7:f.getDay();if(f>b&&a.days.includes(g))return f}return new Date(b.getTime()+864e5)}(a,new Date);return(0,b.jsxs)("p",{className:"flex items-start gap-2 text-[13px] leading-5",children:[(0,b.jsx)($.RoutineMark,{className:"mt-0.75 size-3.5 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:"min-w-0",children:[Z(a),(0,b.jsxs)("span",{className:"text-muted-foreground",children:[" · ","once"===a.kind?`${(0,d.formatDistanceToNowStrict)(e,{addSuffix:!0})}, then it switches itself off`:`first start ${(0,F.whenOf)(e)}`]})]})]})}function as({label:a,htmlFor:c,children:d}){return(0,b.jsxs)("div",{className:"flex gap-3",children:[(0,b.jsx)("label",{htmlFor:c,className:"w-14 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:a}),(0,b.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:d})]})}a.s(["RoutineSetting",0,function(){let[a,c]=(0,o.useState)(null),{data:d,isLoading:e,error:f}=(0,H.useServerRoute)(p.queryKey.routines),{data:g}=(0,H.useServerRoute)(p.queryKey.bot),[h]=(0,G.useServerAction)(N,{onOk:()=>(0,H.revalidate)(p.queryKey.routines)});if(e)return(0,b.jsx)(D.SettingSkeleton,{rows:3});if(f)return(0,b.jsx)(D.SettingError,{message:f.message});let i=d??[],j=i.filter(a=>a.enabled).length,k=i.find(b=>b.id===a);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(D.SettingScreen,{footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(D.SettingRailNote,{children:[i.length," of ",z.ROUTINE.max," · ",j," on"]}),(0,b.jsx)(B.KeepWorkingSwitch,{})]}),children:(0,b.jsx)(D.SettingItems,{addRow:i.length<z.ROUTINE.max?{label:"New routine",onClick:()=>c("new")}:void 0,children:0===i.length?(0,b.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:'Nothing starts by itself yet. Tell Thursday what should — "every weekday at nine, go through my mail" — or make one here.'}):i.map(d=>(0,b.jsx)(aa,{routine:d,bots:g,open:d.id===a,onOpen:()=>c(d.id),onSwitch:a=>h(d.id,{enabled:a})},d.id))})}),(0,b.jsx)(ak,{routine:"new"===a?"new":k??null,bots:g??[],onClose:()=>c(null),onMade:a=>c(a)})]})}],41014)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=features_routine_components_routine-setting_tsx_055fknz._.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(" "," ")),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(" "," ")+"<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=
|
|
3
|
+
//# sourceMappingURL=node_modules_048wmmj._.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=
|
|
3
|
+
//# sourceMappingURL=node_modules_04t200t._.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=
|
|
3
|
+
//# sourceMappingURL=node_modules_0511ha-._.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=
|
|
43
|
+
//# sourceMappingURL=node_modules_08g12f-._.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=
|
|
3
|
+
//# sourceMappingURL=node_modules_0cdu6jq._.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=
|
|
29
|
+
//# sourceMappingURL=node_modules_0eb4rx7._.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=
|
|
3
|
+
//# sourceMappingURL=node_modules_0f2k5l0._.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=
|
|
64
|
+
//# sourceMappingURL=node_modules_0piws2a._.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=
|
|
26
|
+
//# sourceMappingURL=node_modules_0pk6i-e._.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=
|
|
3
|
+
//# sourceMappingURL=node_modules_0s1lwc9._.js.map
|