@stigmer/server-slim 3.13.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/README.md +3 -0
- package/console/404.html +1 -0
- package/console/Icon-bw.svg +10 -0
- package/console/Icon-light.svg +10 -0
- package/console/__next.__PAGE__.txt +5 -0
- package/console/__next._full.txt +28 -0
- package/console/__next._head.txt +6 -0
- package/console/__next._index.txt +17 -0
- package/console/__next._tree.txt +5 -0
- package/console/_next/static/XrBnttPHHP5Wmi7mT4uLM/_buildManifest.js +11 -0
- package/console/_next/static/XrBnttPHHP5Wmi7mT4uLM/_clientMiddlewareManifest.js +1 -0
- package/console/_next/static/XrBnttPHHP5Wmi7mT4uLM/_ssgManifest.js +1 -0
- package/console/_next/static/chunks/0-6znc4v4kg4~.js +1 -0
- package/console/_next/static/chunks/0-73gkqs33_.~.js +1 -0
- package/console/_next/static/chunks/0-l4jzu40dd8w.js +1 -0
- package/console/_next/static/chunks/0-z-fnjdx4ulh.js +1 -0
- package/console/_next/static/chunks/0-zcgxw8vt51~.js +1 -0
- package/console/_next/static/chunks/0.f-b71h~m9l_.js +1 -0
- package/console/_next/static/chunks/0.p57pbuzo8j7.js +90 -0
- package/console/_next/static/chunks/0.qu8zg6yocro.js +1 -0
- package/console/_next/static/chunks/00-fpv~l3r27l.js +1 -0
- package/console/_next/static/chunks/005ctashl3n1r.js +1 -0
- package/console/_next/static/chunks/0068d1zb538z~.js +1 -0
- package/console/_next/static/chunks/008b.zzs.t4bw.js +139 -0
- package/console/_next/static/chunks/00d~s.n2ue-_h.js +1 -0
- package/console/_next/static/chunks/00o8ud2dmna2j.js +1 -0
- package/console/_next/static/chunks/00r~itj4ekq5y.js +1 -0
- package/console/_next/static/chunks/01.9x7hzkgv7j.js +1 -0
- package/console/_next/static/chunks/016uwj-o-jqap.js +1 -0
- package/console/_next/static/chunks/01f1gh.2dzexy.js +1 -0
- package/console/_next/static/chunks/01ontipw7_pn-.js +1 -0
- package/console/_next/static/chunks/02fsq8lsaeu8j.js +1 -0
- package/console/_next/static/chunks/02qsbdquvk64o.js +1 -0
- package/console/_next/static/chunks/03.b9z-1o34dx.js +1 -0
- package/console/_next/static/chunks/038jxymv2x4u-.js +148 -0
- package/console/_next/static/chunks/03f2f6enzzhsy.js +1 -0
- package/console/_next/static/chunks/03l_lqxocp3uj.js +1 -0
- package/console/_next/static/chunks/03lth2le32c6r.js +201 -0
- package/console/_next/static/chunks/03v0v690_bw8u.js +62 -0
- package/console/_next/static/chunks/03yru4-m-450t.js +1 -0
- package/console/_next/static/chunks/03~yq9q893hmn.js +1 -0
- package/console/_next/static/chunks/04nu-nyhd8yfk.js +18 -0
- package/console/_next/static/chunks/04uzf6wcrofgt.js +1 -0
- package/console/_next/static/chunks/056bfxvkb8fd~.js +1 -0
- package/console/_next/static/chunks/06huuay3x3z07.js +1 -0
- package/console/_next/static/chunks/06o.rsm2b~dht.js +60 -0
- package/console/_next/static/chunks/07.l7154cu7z-.js +1 -0
- package/console/_next/static/chunks/07wnm1~gr1rx~.js +1 -0
- package/console/_next/static/chunks/08.rk-nar1l2t.js +25 -0
- package/console/_next/static/chunks/08iibm2~7e.mj.js +1 -0
- package/console/_next/static/chunks/08o5wsrurx9ux.js +5 -0
- package/console/_next/static/chunks/09~n7y-jkmjlj.js +152 -0
- package/console/_next/static/chunks/0_mhv9_2_g.-d.js +119 -0
- package/console/_next/static/chunks/0af53k.rxu1kn.js +1 -0
- package/console/_next/static/chunks/0amugang-25bm.js +1 -0
- package/console/_next/static/chunks/0awsj.h.eiuen.js +1 -0
- package/console/_next/static/chunks/0axtn1ln1j35_.js +79 -0
- package/console/_next/static/chunks/0c5xj4q0jmdu0.js +1 -0
- package/console/_next/static/chunks/0c7llz2igr3w7.js +1 -0
- package/console/_next/static/chunks/0cgp87bgoglgv.js +1 -0
- package/console/_next/static/chunks/0co3~00k0sae5.js +1 -0
- package/console/_next/static/chunks/0cq0zrqlu~xa7.js +1 -0
- package/console/_next/static/chunks/0cs_h74-ljzlt.js +77 -0
- package/console/_next/static/chunks/0cu8k_dz43e4y.js +1 -0
- package/console/_next/static/chunks/0d05q_m7mqj4o.js +1 -0
- package/console/_next/static/chunks/0dsde0n1co0l..js +1 -0
- package/console/_next/static/chunks/0e4xdug~7dxzk.js +1 -0
- package/console/_next/static/chunks/0e7hldxv930hc.js +12 -0
- package/console/_next/static/chunks/0ed3hfv95qark.js +10 -0
- package/console/_next/static/chunks/0f1nokqa6poai.js +1 -0
- package/console/_next/static/chunks/0f8bbcvfh6x_j.js +64 -0
- package/console/_next/static/chunks/0fy2-q-5a0j3r.js +1 -0
- package/console/_next/static/chunks/0g-98wql22rf4.css +1 -0
- package/console/_next/static/chunks/0g167wye7-x6z.js +1 -0
- package/console/_next/static/chunks/0g4_345f39a55.js +1 -0
- package/console/_next/static/chunks/0ge0mq0ea60lx.js +1 -0
- package/console/_next/static/chunks/0gepanyj709pr.js +1 -0
- package/console/_next/static/chunks/0glne1asott9e.js +2 -0
- package/console/_next/static/chunks/0hb.-vcj2w6kf.js +1 -0
- package/console/_next/static/chunks/0hdh_2akzrlxi.js +287 -0
- package/console/_next/static/chunks/0hhe78mplcj67.js +1 -0
- package/console/_next/static/chunks/0hori02zn~h3o.js +1 -0
- package/console/_next/static/chunks/0hq~c-~dp2g~1.js +1 -0
- package/console/_next/static/chunks/0i.l9589uvx0j.js +1 -0
- package/console/_next/static/chunks/0i8pgzf~hu-3m.js +24 -0
- package/console/_next/static/chunks/0icpvuwlmnlty.js +43 -0
- package/console/_next/static/chunks/0icsogze8wb_v.js +3 -0
- package/console/_next/static/chunks/0ij17mw0v0qd-.js +1 -0
- package/console/_next/static/chunks/0io-wgdji~5d0.js +1 -0
- package/console/_next/static/chunks/0ipk1er3w80bj.js +24 -0
- package/console/_next/static/chunks/0irq1yd9ix16u.js +1 -0
- package/console/_next/static/chunks/0iwpyv2wbln6f.js +1 -0
- package/console/_next/static/chunks/0ixo5_jc~m0~2.js +1 -0
- package/console/_next/static/chunks/0jxlubusvmdjm.js +1 -0
- package/console/_next/static/chunks/0j~3z.dgn_8ff.css +6 -0
- package/console/_next/static/chunks/0k9_1v72yx36d.js +226 -0
- package/console/_next/static/chunks/0ka-.7dww7nze.js +101 -0
- package/console/_next/static/chunks/0kt3942_0py-t.js +1 -0
- package/console/_next/static/chunks/0l3uvjh3oslhq.js +1 -0
- package/console/_next/static/chunks/0lp.du_t-~cqs.js +2 -0
- package/console/_next/static/chunks/0lq22-4n7_uyt.js +34 -0
- package/console/_next/static/chunks/0lypu-.xpph9..js +15 -0
- package/console/_next/static/chunks/0mb.pnhflhw95.js +1 -0
- package/console/_next/static/chunks/0mcz_room09fj.js +1 -0
- package/console/_next/static/chunks/0mo3-obfy2_6v.js +15 -0
- package/console/_next/static/chunks/0mtfbfe5xd3.6.js +1 -0
- package/console/_next/static/chunks/0mvcspqlkvjri.js +1 -0
- package/console/_next/static/chunks/0n2qydw3oc1oj.js +1 -0
- package/console/_next/static/chunks/0nnkdto25tilf.js +1 -0
- package/console/_next/static/chunks/0npm9l63~4j0v.js +1 -0
- package/console/_next/static/chunks/0nu6llqvg4741.js +1 -0
- package/console/_next/static/chunks/0n~glqz40m6gv.js +1 -0
- package/console/_next/static/chunks/0o-.19qua6web.js +5 -0
- package/console/_next/static/chunks/0omq5mq8dkd24.js +1 -0
- package/console/_next/static/chunks/0oprw5m.lmqln.js +1 -0
- package/console/_next/static/chunks/0ortphe030oky.js +1 -0
- package/console/_next/static/chunks/0oufb2b491l23.js +153 -0
- package/console/_next/static/chunks/0owq59irnycu5.js +1 -0
- package/console/_next/static/chunks/0ptwwlt0l20~o.js +1 -0
- package/console/_next/static/chunks/0q2tc-vqxe1_n.js +1 -0
- package/console/_next/static/chunks/0qfu4h5g.k-yt.js +1 -0
- package/console/_next/static/chunks/0qji_.pm~u8x3.js +1 -0
- package/console/_next/static/chunks/0qm2930z0c.8m.js +80 -0
- package/console/_next/static/chunks/0q~1rz_i~v0vs.js +1 -0
- package/console/_next/static/chunks/0r4lipg4xb6fx.js +1 -0
- package/console/_next/static/chunks/0rhvismtjivza.js +104 -0
- package/console/_next/static/chunks/0rmt10l3458p_.js +93 -0
- package/console/_next/static/chunks/0rob~86j~8vge.js +1 -0
- package/console/_next/static/chunks/0r~zu0c3j_b7p.js +1 -0
- package/console/_next/static/chunks/0s0v8xobo-2ok.js +34 -0
- package/console/_next/static/chunks/0s8nwq43gep9_.js +15 -0
- package/console/_next/static/chunks/0spswjguxbqfn.js +1 -0
- package/console/_next/static/chunks/0t6aq14rpn1.w.js +1 -0
- package/console/_next/static/chunks/0taiwi2j.k7mm.js +1 -0
- package/console/_next/static/chunks/0tj3k0t29gpn7.js +1 -0
- package/console/_next/static/chunks/0tq77.56bu2eu.js +1 -0
- package/console/_next/static/chunks/0ulcdeu8yx-cn.js +1 -0
- package/console/_next/static/chunks/0uvbqsa~x3_x6.js +1 -0
- package/console/_next/static/chunks/0uw8zy_zoej6s.js +1 -0
- package/console/_next/static/chunks/0uz5-~rqk9vr..js +1 -0
- package/console/_next/static/chunks/0w3ug0~zih~j2.js +1 -0
- package/console/_next/static/chunks/0wfrz3x.bxehc.js +1 -0
- package/console/_next/static/chunks/0wyb4nqlt6his.js +1 -0
- package/console/_next/static/chunks/0x.4919xjicc5.js +75 -0
- package/console/_next/static/chunks/0xr1dk~mec2dn.js +1 -0
- package/console/_next/static/chunks/0xxouzzjw_a6q.js +115 -0
- package/console/_next/static/chunks/0y0u4wm.3~_ac.js +1 -0
- package/console/_next/static/chunks/0y4vop46pw7ip.js +2 -0
- package/console/_next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
- package/console/_next/static/chunks/0y99xmlf_e2si.js +1 -0
- package/console/_next/static/chunks/0ydl92ezt_ppz.js +1 -0
- package/console/_next/static/chunks/0ywlzawl2ml3h.js +1 -0
- package/console/_next/static/chunks/0yysdfbgz-l8n.js +1 -0
- package/console/_next/static/chunks/0zjs5hlwbvch9.js +4 -0
- package/console/_next/static/chunks/0zsntdh42--v1.js +1 -0
- package/console/_next/static/chunks/104yvyc1ce3q5.js +1 -0
- package/console/_next/static/chunks/1051z1rwyse00.js +1 -0
- package/console/_next/static/chunks/10h6g4u9i~5h8.js +1 -0
- package/console/_next/static/chunks/10isn5~-bj4w5.js +4 -0
- package/console/_next/static/chunks/10ymqudg~95gr.js +1 -0
- package/console/_next/static/chunks/111eimn8nia.7.js +1 -0
- package/console/_next/static/chunks/1155_-gh-rcvi.js +1 -0
- package/console/_next/static/chunks/117cg_x8i7.ol.js +1 -0
- package/console/_next/static/chunks/11_7qxlc92f5s.js +1 -0
- package/console/_next/static/chunks/11h85j-8~tny3.js +36 -0
- package/console/_next/static/chunks/11t~35bechtea.js +1 -0
- package/console/_next/static/chunks/11uh-ttx4zin-.js +9 -0
- package/console/_next/static/chunks/11xfx57fbi3md.js +2 -0
- package/console/_next/static/chunks/12329wyw7127c.js +1 -0
- package/console/_next/static/chunks/123jshjvn0ocr.js +31 -0
- package/console/_next/static/chunks/128ahbvhdeeq-.js +1 -0
- package/console/_next/static/chunks/13hl4dngamd3l.js +127 -0
- package/console/_next/static/chunks/14.38bpm-d3-l.js +1 -0
- package/console/_next/static/chunks/14i46k409qlt0.js +1 -0
- package/console/_next/static/chunks/14j238ax8coge.js +29 -0
- package/console/_next/static/chunks/159151ghv9-cc.js +1 -0
- package/console/_next/static/chunks/15hlb71q~xfev.js +1 -0
- package/console/_next/static/chunks/15r_pfbdb2jhp.js +23 -0
- package/console/_next/static/chunks/15wc.2zpsy4wc.js +4 -0
- package/console/_next/static/chunks/16pzrphqjtyli.js +1 -0
- package/console/_next/static/chunks/16ukgtm3fhab~.js +1071 -0
- package/console/_next/static/chunks/170p3g7_6_620.js +2 -0
- package/console/_next/static/chunks/175hd_pl41_vh.js +15 -0
- package/console/_next/static/chunks/17glhyaxi4vs-.js +1 -0
- package/console/_next/static/chunks/17jhgtykn778_.js +1 -0
- package/console/_next/static/chunks/17v4twif7y~.b.js +1 -0
- package/console/_next/static/chunks/182b_f_n0-cdr.js +1 -0
- package/console/_next/static/chunks/187v8dzyf1l-f.js +80 -0
- package/console/_next/static/chunks/turbopack-0cvnq9zq1g68-.js +1 -0
- package/console/_next/static/chunks/turbopack-172c~.rma.yso.js +1 -0
- package/console/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
- package/console/_next/static/media/02263ebadd758ea4-s.0qg7j5o.yrclm.woff2 +0 -0
- package/console/_next/static/media/03fc1b4a8d284b5e-s.09.f.n_ccld80.woff2 +0 -0
- package/console/_next/static/media/07454f8ad8aaac57-s.0tqkxa-w3pk~c.woff2 +0 -0
- package/console/_next/static/media/1bcd0e671759a44c-s.0vnh8.d8wxa2x.woff2 +0 -0
- package/console/_next/static/media/1bffadaabf893a1e-s.16ipb6fqu393i.woff2 +0 -0
- package/console/_next/static/media/224e262ef877bfa4-s.0mo8vqgr8yagc.woff2 +0 -0
- package/console/_next/static/media/2bbe8d2671613f1f-s.067x_6k0k23tk.woff2 +0 -0
- package/console/_next/static/media/2c55a0e60120577a-s.0bjc5tiuqdqro.woff2 +0 -0
- package/console/_next/static/media/2fe89d53234c61d4-s.0k_.i63k_i_qa.woff2 +0 -0
- package/console/_next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
- package/console/_next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
- package/console/_next/static/media/5476f68d60460930-s.0wxq9webf.ew4.woff2 +0 -0
- package/console/_next/static/media/57215795b8570f5c-s.0vwgtotjdgnhr.woff2 +0 -0
- package/console/_next/static/media/59b15b4bcd7b1eb5-s.0x08jh8vondwt.woff2 +0 -0
- package/console/_next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
- package/console/_next/static/media/5e05ae5b48faa55e-s.0m9hhkgdlzukj.woff2 +0 -0
- package/console/_next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
- package/console/_next/static/media/68757d6cddeff913-s.0hkrq11n-dhos.woff2 +0 -0
- package/console/_next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
- package/console/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
- package/console/_next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
- package/console/_next/static/media/7f11d98043fdedc9-s.0r4w1y.tjq0ay.woff2 +0 -0
- package/console/_next/static/media/7fea77d1d19108bf-s.0xyeb7czu1stb.woff2 +0 -0
- package/console/_next/static/media/83afe278b6a6bb3c-s.0q-301v4kxxnr.woff2 +0 -0
- package/console/_next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
- package/console/_next/static/media/90c51ce8fb754fe8-s.00z~hoalba5dm.woff2 +0 -0
- package/console/_next/static/media/99e609270109b47d-s.16-z~2sp29ex6.woff2 +0 -0
- package/console/_next/static/media/9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2 +0 -0
- package/console/_next/static/media/a7afbb44bec2bb18-s.0juuwbcf7uz~t.woff2 +0 -0
- package/console/_next/static/media/ad66f9afd8947f86-s.11u06r12fd6v_.woff2 +0 -0
- package/console/_next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
- package/console/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
- package/console/_next/static/media/d8cb5ab3660140cd-s.0ri_id_kcagyz.woff2 +0 -0
- package/console/_next/static/media/e15f58668ad64cb8-s.0~.8lt~vdqmc3.woff2 +0 -0
- package/console/_next/static/media/e390973e931a41c5-s.08hd0g.321csk.woff2 +0 -0
- package/console/_next/static/media/e532fa1b9921e1cd-s.0~wrfy7sm-h4g.woff2 +0 -0
- package/console/_next/static/media/e6d00ff86ef9e699-s.0lcb62h0-.jh3.woff2 +0 -0
- package/console/_next/static/media/effe91970fc4db64-s.07ig5l8azj~hy.woff2 +0 -0
- package/console/_next/static/media/elk-worker.min.13hrbirt7_.ef.js +6401 -0
- package/console/_next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
- package/console/_next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
- package/console/_not-found/__next._full.txt +29 -0
- package/console/_not-found/__next._head.txt +6 -0
- package/console/_not-found/__next._index.txt +17 -0
- package/console/_not-found/__next._not-found.__PAGE__.txt +6 -0
- package/console/_not-found/__next._not-found.txt +5 -0
- package/console/_not-found/__next._tree.txt +3 -0
- package/console/_not-found.html +1 -0
- package/console/_not-found.txt +29 -0
- package/console/apple-touch-icon-dark.png +0 -0
- package/console/apple-touch-icon-light.png +0 -0
- package/console/auth/callback/__next._full.txt +36 -0
- package/console/auth/callback/__next._head.txt +6 -0
- package/console/auth/callback/__next._index.txt +17 -0
- package/console/auth/callback/__next._tree.txt +5 -0
- package/console/auth/callback/__next.auth.callback.__PAGE__.txt +9 -0
- package/console/auth/callback/__next.auth.callback.txt +5 -0
- package/console/auth/callback/__next.auth.txt +5 -0
- package/console/auth/callback.html +1 -0
- package/console/auth/callback.txt +36 -0
- package/console/auth/github/callback/__next._full.txt +37 -0
- package/console/auth/github/callback/__next._head.txt +6 -0
- package/console/auth/github/callback/__next._index.txt +17 -0
- package/console/auth/github/callback/__next._tree.txt +5 -0
- package/console/auth/github/callback/__next.auth.github.callback.__PAGE__.txt +9 -0
- package/console/auth/github/callback/__next.auth.github.callback.txt +5 -0
- package/console/auth/github/callback/__next.auth.github.txt +5 -0
- package/console/auth/github/callback/__next.auth.txt +5 -0
- package/console/auth/github/callback.html +1 -0
- package/console/auth/github/callback.txt +37 -0
- package/console/auth/oauth/callback/__next._full.txt +37 -0
- package/console/auth/oauth/callback/__next._head.txt +6 -0
- package/console/auth/oauth/callback/__next._index.txt +17 -0
- package/console/auth/oauth/callback/__next._tree.txt +5 -0
- package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +9 -0
- package/console/auth/oauth/callback/__next.auth.oauth.callback.txt +5 -0
- package/console/auth/oauth/callback/__next.auth.oauth.txt +5 -0
- package/console/auth/oauth/callback/__next.auth.txt +5 -0
- package/console/auth/oauth/callback.html +1 -0
- package/console/auth/oauth/callback.txt +37 -0
- package/console/chat/__placeholder__/__placeholder__/__next._full.txt +35 -0
- package/console/chat/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/chat/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/chat/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.txt +5 -0
- package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.txt +5 -0
- package/console/chat/__placeholder__/__placeholder__/__next.chat.txt +5 -0
- package/console/chat/__placeholder__/__placeholder__.html +1 -0
- package/console/chat/__placeholder__/__placeholder__.txt +35 -0
- package/console/conversations/__next._full.txt +32 -0
- package/console/conversations/__next._head.txt +6 -0
- package/console/conversations/__next._index.txt +17 -0
- package/console/conversations/__next._tree.txt +5 -0
- package/console/conversations/__next.conversations.__PAGE__.txt +6 -0
- package/console/conversations/__next.conversations.txt +5 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +35 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +6 -0
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.txt +5 -0
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.txt +5 -0
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.txt +5 -0
- package/console/conversations/__placeholder__/__placeholder__.html +1 -0
- package/console/conversations/__placeholder__/__placeholder__.txt +35 -0
- package/console/conversations.html +1 -0
- package/console/conversations.txt +32 -0
- package/console/dashboard/__next._full.txt +32 -0
- package/console/dashboard/__next._head.txt +6 -0
- package/console/dashboard/__next._index.txt +17 -0
- package/console/dashboard/__next._tree.txt +5 -0
- package/console/dashboard/__next.dashboard.__PAGE__.txt +6 -0
- package/console/dashboard/__next.dashboard.txt +5 -0
- package/console/dashboard.html +1 -0
- package/console/dashboard.txt +32 -0
- package/console/embed.js +1 -0
- package/console/executions/__placeholder__/__next._full.txt +32 -0
- package/console/executions/__placeholder__/__next._head.txt +6 -0
- package/console/executions/__placeholder__/__next._index.txt +17 -0
- package/console/executions/__placeholder__/__next._tree.txt +5 -0
- package/console/executions/__placeholder__/__next.executions.$d$id.__PAGE__.txt +5 -0
- package/console/executions/__placeholder__/__next.executions.$d$id.txt +5 -0
- package/console/executions/__placeholder__/__next.executions.txt +5 -0
- package/console/executions/__placeholder__.html +1 -0
- package/console/executions/__placeholder__.txt +32 -0
- package/console/favicon-dark-16x16.png +0 -0
- package/console/favicon-dark-32x32.png +0 -0
- package/console/favicon-dark.ico +0 -0
- package/console/favicon-dark.svg +11 -0
- package/console/favicon-light-16x16.png +0 -0
- package/console/favicon-light-32x32.png +0 -0
- package/console/favicon-light.ico +0 -0
- package/console/favicon-light.svg +11 -0
- package/console/favicon.ico +0 -0
- package/console/index.html +1 -0
- package/console/index.txt +28 -0
- package/console/invite/__placeholder__/__next._full.txt +33 -0
- package/console/invite/__placeholder__/__next._head.txt +6 -0
- package/console/invite/__placeholder__/__next._index.txt +17 -0
- package/console/invite/__placeholder__/__next._tree.txt +5 -0
- package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +6 -0
- package/console/invite/__placeholder__/__next.invite.$d$token.txt +5 -0
- package/console/invite/__placeholder__/__next.invite.txt +5 -0
- package/console/invite/__placeholder__.html +1 -0
- package/console/invite/__placeholder__.txt +33 -0
- package/console/library/__next._full.txt +33 -0
- package/console/library/__next._head.txt +6 -0
- package/console/library/__next._index.txt +17 -0
- package/console/library/__next._tree.txt +5 -0
- package/console/library/__next.library.__PAGE__.txt +6 -0
- package/console/library/__next.library.txt +7 -0
- package/console/library/agents/__next._full.txt +36 -0
- package/console/library/agents/__next._head.txt +6 -0
- package/console/library/agents/__next._index.txt +17 -0
- package/console/library/agents/__next._tree.txt +5 -0
- package/console/library/agents/__next.library.agents.__PAGE__.txt +6 -0
- package/console/library/agents/__next.library.agents.txt +5 -0
- package/console/library/agents/__next.library.txt +7 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +39 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.txt +5 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.txt +5 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.txt +5 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.txt +7 -0
- package/console/library/agents/__placeholder__/__placeholder__.html +1 -0
- package/console/library/agents/__placeholder__/__placeholder__.txt +39 -0
- package/console/library/agents/new/__next._full.txt +40 -0
- package/console/library/agents/new/__next._head.txt +6 -0
- package/console/library/agents/new/__next._index.txt +17 -0
- package/console/library/agents/new/__next._tree.txt +5 -0
- package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +9 -0
- package/console/library/agents/new/__next.library.agents.new.txt +5 -0
- package/console/library/agents/new/__next.library.agents.txt +5 -0
- package/console/library/agents/new/__next.library.txt +7 -0
- package/console/library/agents/new.html +1 -0
- package/console/library/agents/new.txt +40 -0
- package/console/library/agents.html +1 -0
- package/console/library/agents.txt +36 -0
- package/console/library/mcp-servers/__next._full.txt +36 -0
- package/console/library/mcp-servers/__next._head.txt +6 -0
- package/console/library/mcp-servers/__next._index.txt +17 -0
- package/console/library/mcp-servers/__next._tree.txt +5 -0
- package/console/library/mcp-servers/__next.library.mcp-servers.__PAGE__.txt +6 -0
- package/console/library/mcp-servers/__next.library.mcp-servers.txt +5 -0
- package/console/library/mcp-servers/__next.library.txt +7 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._full.txt +39 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.txt +5 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.txt +5 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.txt +5 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.txt +7 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__.html +1 -0
- package/console/library/mcp-servers/__placeholder__/__placeholder__.txt +39 -0
- package/console/library/mcp-servers/new/__next._full.txt +40 -0
- package/console/library/mcp-servers/new/__next._head.txt +6 -0
- package/console/library/mcp-servers/new/__next._index.txt +17 -0
- package/console/library/mcp-servers/new/__next._tree.txt +5 -0
- package/console/library/mcp-servers/new/__next.library.mcp-servers.new.__PAGE__.txt +9 -0
- package/console/library/mcp-servers/new/__next.library.mcp-servers.new.txt +5 -0
- package/console/library/mcp-servers/new/__next.library.mcp-servers.txt +5 -0
- package/console/library/mcp-servers/new/__next.library.txt +7 -0
- package/console/library/mcp-servers/new.html +1 -0
- package/console/library/mcp-servers/new.txt +40 -0
- package/console/library/mcp-servers.html +1 -0
- package/console/library/mcp-servers.txt +36 -0
- package/console/library/schedules/__next._full.txt +36 -0
- package/console/library/schedules/__next._head.txt +6 -0
- package/console/library/schedules/__next._index.txt +17 -0
- package/console/library/schedules/__next._tree.txt +5 -0
- package/console/library/schedules/__next.library.schedules.__PAGE__.txt +6 -0
- package/console/library/schedules/__next.library.schedules.txt +5 -0
- package/console/library/schedules/__next.library.txt +7 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next._full.txt +39 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.txt +5 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.txt +5 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.txt +5 -0
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.txt +7 -0
- package/console/library/schedules/__placeholder__/__placeholder__.html +1 -0
- package/console/library/schedules/__placeholder__/__placeholder__.txt +39 -0
- package/console/library/schedules/new/__next._full.txt +40 -0
- package/console/library/schedules/new/__next._head.txt +6 -0
- package/console/library/schedules/new/__next._index.txt +17 -0
- package/console/library/schedules/new/__next._tree.txt +5 -0
- package/console/library/schedules/new/__next.library.schedules.new.__PAGE__.txt +9 -0
- package/console/library/schedules/new/__next.library.schedules.new.txt +5 -0
- package/console/library/schedules/new/__next.library.schedules.txt +5 -0
- package/console/library/schedules/new/__next.library.txt +7 -0
- package/console/library/schedules/new.html +1 -0
- package/console/library/schedules/new.txt +40 -0
- package/console/library/schedules.html +1 -0
- package/console/library/schedules.txt +36 -0
- package/console/library/skills/__next._full.txt +36 -0
- package/console/library/skills/__next._head.txt +6 -0
- package/console/library/skills/__next._index.txt +17 -0
- package/console/library/skills/__next._tree.txt +5 -0
- package/console/library/skills/__next.library.skills.__PAGE__.txt +6 -0
- package/console/library/skills/__next.library.skills.txt +5 -0
- package/console/library/skills/__next.library.txt +7 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +39 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.txt +5 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.txt +5 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.txt +5 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.txt +7 -0
- package/console/library/skills/__placeholder__/__placeholder__.html +1 -0
- package/console/library/skills/__placeholder__/__placeholder__.txt +39 -0
- package/console/library/skills/new/__next._full.txt +40 -0
- package/console/library/skills/new/__next._head.txt +6 -0
- package/console/library/skills/new/__next._index.txt +17 -0
- package/console/library/skills/new/__next._tree.txt +5 -0
- package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +9 -0
- package/console/library/skills/new/__next.library.skills.new.txt +5 -0
- package/console/library/skills/new/__next.library.skills.txt +5 -0
- package/console/library/skills/new/__next.library.txt +7 -0
- package/console/library/skills/new.html +1 -0
- package/console/library/skills/new.txt +40 -0
- package/console/library/skills.html +1 -0
- package/console/library/skills.txt +36 -0
- package/console/library/workflows/__next._full.txt +36 -0
- package/console/library/workflows/__next._head.txt +6 -0
- package/console/library/workflows/__next._index.txt +17 -0
- package/console/library/workflows/__next._tree.txt +5 -0
- package/console/library/workflows/__next.library.txt +7 -0
- package/console/library/workflows/__next.library.workflows.__PAGE__.txt +6 -0
- package/console/library/workflows/__next.library.workflows.txt +5 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next._full.txt +39 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.txt +7 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.txt +5 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.txt +5 -0
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.txt +5 -0
- package/console/library/workflows/__placeholder__/__placeholder__.html +1 -0
- package/console/library/workflows/__placeholder__/__placeholder__.txt +39 -0
- package/console/library/workflows/executions/__next._full.txt +37 -0
- package/console/library/workflows/executions/__next._head.txt +6 -0
- package/console/library/workflows/executions/__next._index.txt +17 -0
- package/console/library/workflows/executions/__next._tree.txt +5 -0
- package/console/library/workflows/executions/__next.library.txt +7 -0
- package/console/library/workflows/executions/__next.library.workflows.executions.__PAGE__.txt +6 -0
- package/console/library/workflows/executions/__next.library.workflows.executions.txt +5 -0
- package/console/library/workflows/executions/__next.library.workflows.txt +5 -0
- package/console/library/workflows/executions.html +1 -0
- package/console/library/workflows/executions.txt +37 -0
- package/console/library/workflows/new/__next._full.txt +40 -0
- package/console/library/workflows/new/__next._head.txt +6 -0
- package/console/library/workflows/new/__next._index.txt +17 -0
- package/console/library/workflows/new/__next._tree.txt +5 -0
- package/console/library/workflows/new/__next.library.txt +7 -0
- package/console/library/workflows/new/__next.library.workflows.new.__PAGE__.txt +9 -0
- package/console/library/workflows/new/__next.library.workflows.new.txt +5 -0
- package/console/library/workflows/new/__next.library.workflows.txt +5 -0
- package/console/library/workflows/new.html +1 -0
- package/console/library/workflows/new.txt +40 -0
- package/console/library/workflows.html +1 -0
- package/console/library/workflows.txt +36 -0
- package/console/library.html +1 -0
- package/console/library.txt +33 -0
- package/console/login/__next._full.txt +35 -0
- package/console/login/__next._head.txt +6 -0
- package/console/login/__next._index.txt +17 -0
- package/console/login/__next._tree.txt +5 -0
- package/console/login/__next.login.__PAGE__.txt +9 -0
- package/console/login/__next.login.txt +5 -0
- package/console/login.html +1 -0
- package/console/login.txt +35 -0
- package/console/logo.svg +1 -0
- package/console/oauth/slack/callback/__next._full.txt +37 -0
- package/console/oauth/slack/callback/__next._head.txt +6 -0
- package/console/oauth/slack/callback/__next._index.txt +17 -0
- package/console/oauth/slack/callback/__next._tree.txt +5 -0
- package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +9 -0
- package/console/oauth/slack/callback/__next.oauth.slack.callback.txt +5 -0
- package/console/oauth/slack/callback/__next.oauth.slack.txt +5 -0
- package/console/oauth/slack/callback/__next.oauth.txt +5 -0
- package/console/oauth/slack/callback.html +1 -0
- package/console/oauth/slack/callback.txt +37 -0
- package/console/sessions/__placeholder__/__next._full.txt +32 -0
- package/console/sessions/__placeholder__/__next._head.txt +6 -0
- package/console/sessions/__placeholder__/__next._index.txt +17 -0
- package/console/sessions/__placeholder__/__next._tree.txt +5 -0
- package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +5 -0
- package/console/sessions/__placeholder__/__next.sessions.$d$id.txt +5 -0
- package/console/sessions/__placeholder__/__next.sessions.txt +5 -0
- package/console/sessions/__placeholder__.html +1 -0
- package/console/sessions/__placeholder__.txt +32 -0
- package/console/settings/__next._full.txt +35 -0
- package/console/settings/__next._head.txt +6 -0
- package/console/settings/__next._index.txt +17 -0
- package/console/settings/__next._tree.txt +5 -0
- package/console/settings/__next.settings.__PAGE__.txt +9 -0
- package/console/settings/__next.settings.txt +6 -0
- package/console/settings/account-preferences/__next._full.txt +35 -0
- package/console/settings/account-preferences/__next._head.txt +6 -0
- package/console/settings/account-preferences/__next._index.txt +17 -0
- package/console/settings/account-preferences/__next._tree.txt +5 -0
- package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +6 -0
- package/console/settings/account-preferences/__next.settings.account-preferences.txt +5 -0
- package/console/settings/account-preferences/__next.settings.txt +6 -0
- package/console/settings/account-preferences.html +1 -0
- package/console/settings/account-preferences.txt +35 -0
- package/console/settings/api-keys/__next._full.txt +35 -0
- package/console/settings/api-keys/__next._head.txt +6 -0
- package/console/settings/api-keys/__next._index.txt +17 -0
- package/console/settings/api-keys/__next._tree.txt +5 -0
- package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +6 -0
- package/console/settings/api-keys/__next.settings.api-keys.txt +5 -0
- package/console/settings/api-keys/__next.settings.txt +6 -0
- package/console/settings/api-keys.html +1 -0
- package/console/settings/api-keys.txt +35 -0
- package/console/settings/billing/__next._full.txt +38 -0
- package/console/settings/billing/__next._head.txt +6 -0
- package/console/settings/billing/__next._index.txt +17 -0
- package/console/settings/billing/__next._tree.txt +5 -0
- package/console/settings/billing/__next.settings.billing.__PAGE__.txt +9 -0
- package/console/settings/billing/__next.settings.billing.txt +5 -0
- package/console/settings/billing/__next.settings.txt +6 -0
- package/console/settings/billing.html +1 -0
- package/console/settings/billing.txt +38 -0
- package/console/settings/channel-apps/__next._full.txt +35 -0
- package/console/settings/channel-apps/__next._head.txt +6 -0
- package/console/settings/channel-apps/__next._index.txt +17 -0
- package/console/settings/channel-apps/__next._tree.txt +5 -0
- package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +6 -0
- package/console/settings/channel-apps/__next.settings.channel-apps.txt +5 -0
- package/console/settings/channel-apps/__next.settings.txt +6 -0
- package/console/settings/channel-apps.html +1 -0
- package/console/settings/channel-apps.txt +35 -0
- package/console/settings/cursor-accounts/__next._full.txt +38 -0
- package/console/settings/cursor-accounts/__next._head.txt +6 -0
- package/console/settings/cursor-accounts/__next._index.txt +17 -0
- package/console/settings/cursor-accounts/__next._tree.txt +5 -0
- package/console/settings/cursor-accounts/__next.settings.cursor-accounts.__PAGE__.txt +9 -0
- package/console/settings/cursor-accounts/__next.settings.cursor-accounts.txt +5 -0
- package/console/settings/cursor-accounts/__next.settings.txt +6 -0
- package/console/settings/cursor-accounts.html +1 -0
- package/console/settings/cursor-accounts.txt +38 -0
- package/console/settings/environments/__next._full.txt +35 -0
- package/console/settings/environments/__next._head.txt +6 -0
- package/console/settings/environments/__next._index.txt +17 -0
- package/console/settings/environments/__next._tree.txt +5 -0
- package/console/settings/environments/__next.settings.environments.__PAGE__.txt +6 -0
- package/console/settings/environments/__next.settings.environments.txt +5 -0
- package/console/settings/environments/__next.settings.txt +6 -0
- package/console/settings/environments.html +1 -0
- package/console/settings/environments.txt +35 -0
- package/console/settings/identity-providers/__next._full.txt +35 -0
- package/console/settings/identity-providers/__next._head.txt +6 -0
- package/console/settings/identity-providers/__next._index.txt +17 -0
- package/console/settings/identity-providers/__next._tree.txt +5 -0
- package/console/settings/identity-providers/__next.settings.identity-providers.__PAGE__.txt +6 -0
- package/console/settings/identity-providers/__next.settings.identity-providers.txt +5 -0
- package/console/settings/identity-providers/__next.settings.txt +6 -0
- package/console/settings/identity-providers.html +1 -0
- package/console/settings/identity-providers.txt +35 -0
- package/console/settings/invitations/__next._full.txt +35 -0
- package/console/settings/invitations/__next._head.txt +6 -0
- package/console/settings/invitations/__next._index.txt +17 -0
- package/console/settings/invitations/__next._tree.txt +5 -0
- package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +6 -0
- package/console/settings/invitations/__next.settings.invitations.txt +5 -0
- package/console/settings/invitations/__next.settings.txt +6 -0
- package/console/settings/invitations.html +1 -0
- package/console/settings/invitations.txt +35 -0
- package/console/settings/members/__next._full.txt +35 -0
- package/console/settings/members/__next._head.txt +6 -0
- package/console/settings/members/__next._index.txt +17 -0
- package/console/settings/members/__next._tree.txt +5 -0
- package/console/settings/members/__next.settings.members.__PAGE__.txt +6 -0
- package/console/settings/members/__next.settings.members.txt +5 -0
- package/console/settings/members/__next.settings.txt +6 -0
- package/console/settings/members.html +1 -0
- package/console/settings/members.txt +35 -0
- package/console/settings/memory/__next._full.txt +35 -0
- package/console/settings/memory/__next._head.txt +6 -0
- package/console/settings/memory/__next._index.txt +17 -0
- package/console/settings/memory/__next._tree.txt +5 -0
- package/console/settings/memory/__next.settings.memory.__PAGE__.txt +6 -0
- package/console/settings/memory/__next.settings.memory.txt +5 -0
- package/console/settings/memory/__next.settings.txt +6 -0
- package/console/settings/memory.html +1 -0
- package/console/settings/memory.txt +35 -0
- package/console/settings/oauth-apps/__next._full.txt +35 -0
- package/console/settings/oauth-apps/__next._head.txt +6 -0
- package/console/settings/oauth-apps/__next._index.txt +17 -0
- package/console/settings/oauth-apps/__next._tree.txt +5 -0
- package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +6 -0
- package/console/settings/oauth-apps/__next.settings.oauth-apps.txt +5 -0
- package/console/settings/oauth-apps/__next.settings.txt +6 -0
- package/console/settings/oauth-apps.html +1 -0
- package/console/settings/oauth-apps.txt +35 -0
- package/console/settings/org-preferences/__next._full.txt +35 -0
- package/console/settings/org-preferences/__next._head.txt +6 -0
- package/console/settings/org-preferences/__next._index.txt +17 -0
- package/console/settings/org-preferences/__next._tree.txt +5 -0
- package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +6 -0
- package/console/settings/org-preferences/__next.settings.org-preferences.txt +5 -0
- package/console/settings/org-preferences/__next.settings.txt +6 -0
- package/console/settings/org-preferences.html +1 -0
- package/console/settings/org-preferences.txt +35 -0
- package/console/settings/org-profile/__next._full.txt +35 -0
- package/console/settings/org-profile/__next._head.txt +6 -0
- package/console/settings/org-profile/__next._index.txt +17 -0
- package/console/settings/org-profile/__next._tree.txt +5 -0
- package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +6 -0
- package/console/settings/org-profile/__next.settings.org-profile.txt +5 -0
- package/console/settings/org-profile/__next.settings.txt +6 -0
- package/console/settings/org-profile.html +1 -0
- package/console/settings/org-profile.txt +35 -0
- package/console/settings/platform-clients/__next._full.txt +35 -0
- package/console/settings/platform-clients/__next._head.txt +6 -0
- package/console/settings/platform-clients/__next._index.txt +17 -0
- package/console/settings/platform-clients/__next._tree.txt +5 -0
- package/console/settings/platform-clients/__next.settings.platform-clients.__PAGE__.txt +6 -0
- package/console/settings/platform-clients/__next.settings.platform-clients.txt +5 -0
- package/console/settings/platform-clients/__next.settings.txt +6 -0
- package/console/settings/platform-clients.html +1 -0
- package/console/settings/platform-clients.txt +35 -0
- package/console/settings/pricing-governance/__next._full.txt +38 -0
- package/console/settings/pricing-governance/__next._head.txt +6 -0
- package/console/settings/pricing-governance/__next._index.txt +17 -0
- package/console/settings/pricing-governance/__next._tree.txt +5 -0
- package/console/settings/pricing-governance/__next.settings.pricing-governance.__PAGE__.txt +9 -0
- package/console/settings/pricing-governance/__next.settings.pricing-governance.txt +5 -0
- package/console/settings/pricing-governance/__next.settings.txt +6 -0
- package/console/settings/pricing-governance.html +1 -0
- package/console/settings/pricing-governance.txt +38 -0
- package/console/settings/provider-standing/__next._full.txt +38 -0
- package/console/settings/provider-standing/__next._head.txt +6 -0
- package/console/settings/provider-standing/__next._index.txt +17 -0
- package/console/settings/provider-standing/__next._tree.txt +5 -0
- package/console/settings/provider-standing/__next.settings.provider-standing.__PAGE__.txt +9 -0
- package/console/settings/provider-standing/__next.settings.provider-standing.txt +5 -0
- package/console/settings/provider-standing/__next.settings.txt +6 -0
- package/console/settings/provider-standing.html +1 -0
- package/console/settings/provider-standing.txt +38 -0
- package/console/settings/usage/__next._full.txt +35 -0
- package/console/settings/usage/__next._head.txt +6 -0
- package/console/settings/usage/__next._index.txt +17 -0
- package/console/settings/usage/__next._tree.txt +5 -0
- package/console/settings/usage/__next.settings.txt +6 -0
- package/console/settings/usage/__next.settings.usage.__PAGE__.txt +6 -0
- package/console/settings/usage/__next.settings.usage.txt +5 -0
- package/console/settings/usage.html +1 -0
- package/console/settings/usage.txt +35 -0
- package/console/settings.html +1 -0
- package/console/settings.txt +35 -0
- package/console/workflows/__next._full.txt +32 -0
- package/console/workflows/__next._head.txt +6 -0
- package/console/workflows/__next._index.txt +17 -0
- package/console/workflows/__next._tree.txt +5 -0
- package/console/workflows/__next.workflows.__PAGE__.txt +6 -0
- package/console/workflows/__next.workflows.txt +5 -0
- package/console/workflows/__placeholder__/__placeholder__/__next._full.txt +35 -0
- package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +6 -0
- package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +17 -0
- package/console/workflows/__placeholder__/__placeholder__/__next._tree.txt +5 -0
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.__PAGE__.txt +6 -0
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.txt +5 -0
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.txt +5 -0
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.txt +5 -0
- package/console/workflows/__placeholder__/__placeholder__.html +1 -0
- package/console/workflows/__placeholder__/__placeholder__.txt +35 -0
- package/console/workflows/executions/__next._full.txt +33 -0
- package/console/workflows/executions/__next._head.txt +6 -0
- package/console/workflows/executions/__next._index.txt +17 -0
- package/console/workflows/executions/__next._tree.txt +5 -0
- package/console/workflows/executions/__next.workflows.executions.__PAGE__.txt +6 -0
- package/console/workflows/executions/__next.workflows.executions.txt +5 -0
- package/console/workflows/executions/__next.workflows.txt +5 -0
- package/console/workflows/executions/__placeholder__/__next._full.txt +34 -0
- package/console/workflows/executions/__placeholder__/__next._head.txt +6 -0
- package/console/workflows/executions/__placeholder__/__next._index.txt +17 -0
- package/console/workflows/executions/__placeholder__/__next._tree.txt +5 -0
- package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.__PAGE__.txt +6 -0
- package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.txt +5 -0
- package/console/workflows/executions/__placeholder__/__next.workflows.executions.txt +5 -0
- package/console/workflows/executions/__placeholder__/__next.workflows.txt +5 -0
- package/console/workflows/executions/__placeholder__.html +1 -0
- package/console/workflows/executions/__placeholder__.txt +34 -0
- package/console/workflows/executions.html +1 -0
- package/console/workflows/executions.txt +33 -0
- package/console/workflows.html +1 -0
- package/console/workflows.txt +32 -0
- package/main.js +1138 -0
- package/mappings.wasm +0 -0
- package/package.json +25 -0
- package/workflow-bundle-agent-execution.js +31729 -0
- package/workflow-bundle-schedule.js +11315 -0
- package/workflow-bundle-workflow-execution.js +29297 -0
- package/workflow-worker-thread.cjs +111 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,297629,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(586108),i=e.i(941693);let n=(0,s.createContext)(null),a="stigmer:activeOrgSlug";function l(e){try{localStorage.setItem(a,e)}catch{}}function o(){let e=(0,s.useContext)(n);if(!e)throw Error("useOrg must be used within <OrgProvider>. Wrap your component tree with <OrgProvider> inside a <StigmerProvider>.");return e}e.s(["OrgProvider",0,function({children:e}){let o=(0,r.useStigmer)(),c=(0,i.useFetchCache)(),[d,g]=(0,s.useState)([]),[u,m]=(0,s.useState)(null),[p,x]=(0,s.useState)(!0),[h,f]=(0,s.useState)(null),v=(0,s.useRef)(0),b=(0,s.useCallback)(async e=>{let t=++v.current;x(!0),f(null);try{let s=(await o.organization.findMyOrganizations()).entries;if(t!==v.current)return;if(g(s),0===s.length)return void m(null);let r=e??function(){try{return localStorage.getItem(a)}catch{return null}}(),i=(r?s.find(e=>e.metadata?.slug===r):void 0)??s[0];m(i),i.metadata?.slug&&l(i.metadata.slug)}catch(e){if(t!==v.current)return;f(e instanceof Error?e.message:"Failed to load organizations"),g([]),m(null)}finally{t===v.current&&x(!1)}},[o]);(0,s.useEffect)(()=>{b()},[b]);let R=(0,s.useCallback)(e=>{m(e),e.metadata?.slug&&l(e.metadata.slug)},[]),y=(0,s.useRef)(null),w=u?.metadata?.slug??null;(0,s.useEffect)(()=>{let e=y.current;y.current=w,null!==e&&null!==w&&e!==w&&c?.clear()},[w,c]);let j=(0,s.useMemo)(()=>({orgs:d,activeOrg:u,setActiveOrg:R,isLoading:p,error:h,retry:b,refresh:b}),[d,u,R,p,h,b]);return(0,t.jsx)(n.Provider,{value:j,children:e})},"useActiveOrgId",0,function(){let{activeOrg:e}=o();return e?.metadata?.id??""},"useActiveOrgSlug",0,function(){let{activeOrg:e}=o();return e?.metadata?.slug??""},"useOrg",0,o])},869803,e=>{"use strict";e.s(["UNSTYLED_FIELDSET",0,"stg:m-0 stg:min-w-0 stg:p-0","UNSTYLED_LIST",0,"stg:m-0 stg:list-none stg:p-0"])},63209,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},691444,e=>{"use strict";var t=e.i(430182);let s={[t.IamRole.iam_role_unspecified]:"unspecified",[t.IamRole.owner]:"owner",[t.IamRole.admin]:"admin",[t.IamRole.member]:"member",[t.IamRole.viewer]:"viewer",[t.IamRole.participant]:"participant"},r={owner:t.IamRole.owner,admin:t.IamRole.admin,member:t.IamRole.member,viewer:t.IamRole.viewer,participant:t.IamRole.participant},i={[t.IamRole.iam_role_unspecified]:"Unspecified",[t.IamRole.owner]:"Owner",[t.IamRole.admin]:"Admin",[t.IamRole.member]:"Member",[t.IamRole.viewer]:"Viewer",[t.IamRole.participant]:"Participant"},n={[t.IamRole.iam_role_unspecified]:"",[t.IamRole.owner]:"Full access including delete and access management",[t.IamRole.admin]:"Edit access and member management",[t.IamRole.member]:"Standard access to organization resources",[t.IamRole.viewer]:"Read-only access",[t.IamRole.participant]:"Reply to customers and manage conversation takeover"};e.s(["iamRoleDescription",0,function(e){return n[e]??""},"iamRoleDisplayName",0,function(e){return i[e]??"Unknown"},"iamRoleFromString",0,function(e){return r[e]},"iamRoleToString",0,function(e){return s[e]??"unspecified"}])},146312,818094,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),i=e.i(869803),n=e.i(170255),a=e.i(430182);let l=new Map([[n.ApiResourceKind.identity_provider,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.oauth_app,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.platform_client,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.organization,[a.IamRole.owner,a.IamRole.admin,a.IamRole.member,a.IamRole.viewer]],[n.ApiResourceKind.agent,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.session,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.skill,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.mcp_server,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.agent_instance,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.agent_share,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.agent_channel,[a.IamRole.owner,a.IamRole.viewer,a.IamRole.participant]],[n.ApiResourceKind.channel_app,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.workflow,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.workflow_instance,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.workflow_execution,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.environment,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.artifact,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.schedule,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.project,[a.IamRole.owner,a.IamRole.viewer]]]),o=Object.freeze([]);function c(e){return l.get(e)??o}e.s(["getGrantableRoles",0,c,"hasGrantableRoles",0,function(e){let t=l.get(e);return void 0!==t&&t.length>0}],818094);var d=e.i(691444);e.s(["RoleSelector",0,function({kind:e,onSelect:n,selected:a,defaultRole:l,disabled:o=!1,className:g}){let u=(0,s.useId)(),{options:m,selected:p,select:x}=function(e,t){let[r,i]=(0,s.useState)(t??null),n=(0,s.useMemo)(()=>null===e?[]:c(e).map(e=>({role:e,label:(0,d.iamRoleDisplayName)(e),description:(0,d.iamRoleDescription)(e),value:(0,d.iamRoleToString)(e)})),[e]),a=(0,s.useMemo)(()=>null!==r?(0,d.iamRoleToString)(r):"",[r]);return{options:n,selected:r,selectedValue:a,select:(0,s.useCallback)(e=>i(e),[]),clear:(0,s.useCallback)(()=>i(null),[]),hasOptions:n.length>0}}(e,l),h=void 0!==a?a:p;return 0===m.length?null:(0,t.jsxs)("fieldset",{className:(0,r.cn)(i.UNSTYLED_FIELDSET,"stg:space-y-1.5",g),children:[(0,t.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Role"}),(0,t.jsx)("div",{className:"stg:flex stg:flex-wrap stg:gap-2",children:m.map(e=>{let s=h===e.role;return(0,t.jsxs)("label",{className:(0,r.cn)("stg:inline-flex stg:cursor-pointer stg:flex-col stg:rounded-md stg:border stg:px-3 stg:py-1.5 stg:text-xs stg:transition-colors",s?"stg:border-primary stg:bg-primary-subtle stg:text-primary stg:font-medium":"stg:border-input stg:bg-background stg:text-muted-foreground stg:hover:border-border stg:hover:text-foreground",o&&"stg:pointer-events-none stg:opacity-50"),children:[(0,t.jsx)("input",{type:"radio",name:u,value:e.value,checked:s,disabled:o,onChange:()=>{var t;x(t=e.role),n?.(t)},className:"stg:sr-only"}),(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"stg:text-[0.625rem] stg:text-muted-foreground stg:font-normal stg:mt-0.5",children:e.description})]},e.value)})})]})}],146312)},564035,288441,890079,32011,e=>{"use strict";var t=e.i(891287),s=e.i(452026),r=e.i(632897),i=e.i(586108),n=e.i(583093);e.s(["useResourceAccess",0,function(e,a){let l=(0,i.useStigmer)(),o=e?.kind??null,c=e?.id??null,d=a?.includeInherited??!1,{data:g,isLoading:u,isRefetching:m,error:p,refetch:x}=(0,n.useFetch)(o&&c?()=>{let e=(0,t.create)(s.ListResourceAccessInputSchema,{resource:(0,t.create)(r.ApiResourceRefSchema,{kind:o,id:c}),includeInherited:d});return l.iamPolicy.listResourceAccessByPrincipal(e).then(e=>[...e.entries])}:null,[o,c,d,l],[]);return{members:g,isLoading:u,isRefetching:m,error:p,refetch:x}}],564035);var a=e.i(271645),l=e.i(326283);e.s(["useCreateIamPolicy",0,function(){let e=(0,i.useStigmer)(),[t,s]=(0,a.useState)(!1),[r,n]=(0,a.useState)(null),o=(0,a.useCallback)(()=>n(null),[]);return{create:(0,a.useCallback)(async t=>{s(!0),n(null);try{return await e.iamPolicy.create(t)}catch(e){throw n((0,l.toError)(e)),e}finally{s(!1)}},[e]),isCreating:t,error:r,clearError:o}}],288441),e.s(["useDeleteIamPolicy",0,function(){let e=(0,i.useStigmer)(),[t,s]=(0,a.useState)(!1),[r,n]=(0,a.useState)(null),o=(0,a.useCallback)(()=>n(null),[]);return{remove:(0,a.useCallback)(async t=>{s(!0),n(null);try{return await e.iamPolicy.delete(t)}catch(e){throw n((0,l.toError)(e)),e}finally{s(!1)}},[e]),isDeleting:t,error:r,clearError:o}}],890079);var o=e.i(843476),c=e.i(893976),d=e.i(188482);function g(e){return e?.identityOrigin?.providerDisplayName??""}e.s(["ProviderBadge",0,function({principal:e,className:t}){let s=g(e);return s?(0,o.jsxs)(d.Tooltip,{children:[(0,o.jsx)(d.TooltipTrigger,{render:(0,o.jsx)("span",{className:(0,c.cn)("stg:inline-flex stg:items-center stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[0.6rem] stg:font-medium","stg:bg-muted-subtle stg:text-muted-foreground",t)}),children:s}),(0,o.jsx)(d.TooltipContent,{side:"top",children:`Identity provider: ${s}`})]}):null},"providerLabel",0,g],32011)},213149,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),i=e.i(468806),n=e.i(818094),a=e.i(869803),l=e.i(610595),o=e.i(891287),c=e.i(632897),d=e.i(564035),g=e.i(288441),u=e.i(890079),m=e.i(691444),p=e.i(146312),x=e.i(32011);function h({orgId:e,value:i,onChange:n,excludePrincipalIds:o,disabled:c=!1,className:g}){let u=(0,s.useId)(),{members:m,isLoading:p,error:v}=(0,d.useResourceAccess)(e?{kind:"organization",id:e}:null),[b,R]=(0,s.useState)(""),[y,w]=(0,s.useState)(!1),[j,I]=(0,s.useState)(0),k=(0,s.useRef)(null),N=(0,s.useMemo)(()=>new Set(o??[]),[o]),S=(0,s.useMemo)(()=>{let e=new Map;for(let t of m){let s=t.principal;s&&"identity_account"===s.kind&&s.id&&(e.has(s.id)||e.set(s.id,s))}return[...e.values()]},[m]),C=(0,s.useMemo)(()=>{let e=new Map;for(let t of S){let s=t.email?.toLowerCase();s&&e.set(s,(e.get(s)??0)+1)}return new Set([...e.entries()].filter(([,e])=>e>1).map(([e])=>e))},[S]),A=(0,s.useMemo)(()=>{let e=b.trim().toLowerCase();return e?S.filter(t=>{let s=(t.name??"").toLowerCase(),r=(t.email??"").toLowerCase();return s.includes(e)||r.includes(e)}):S},[S,b]),P=(0,s.useCallback)(e=>{N.has(e.id)||(n({id:e.id,name:e.name||e.email||e.id,email:e.email,view:e}),R(""),w(!1))},[N,n]),M=(0,s.useCallback)(e=>{if("ArrowDown"===e.key)e.preventDefault(),w(!0),I(e=>Math.min(e+1,A.length-1));else if("ArrowUp"===e.key)e.preventDefault(),I(e=>Math.max(e-1,0));else if("Enter"===e.key){e.preventDefault();let t=A[j];t&&!N.has(t.id)&&P(t)}else"Escape"===e.key&&w(!1)},[A,j,N,P]);return i?(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",g),children:[(0,t.jsx)("span",{className:"stg:block stg:text-xs stg:font-medium stg:text-foreground",children:"Person"}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:flex stg:h-6 stg:w-6 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground","aria-hidden":"true",children:(i.name[0]??"?").toUpperCase()}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-foreground",children:i.name}),(0,t.jsx)(x.ProviderBadge,{principal:i.view})]}),i.email&&i.email!==i.name&&(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-[0.6rem] stg:text-muted-foreground",children:i.email})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(null),disabled:c,"aria-label":"Clear selected person",className:(0,r.cn)("stg:shrink-0 stg:rounded stg:p-0.5 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,t.jsx)(f,{})})]})]}):(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",g),children:[(0,t.jsx)("label",{htmlFor:`${u}-input`,className:"stg:block stg:text-xs stg:font-medium stg:text-foreground",children:"Person"}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{id:`${u}-input`,ref:k,type:"text",role:"combobox","aria-expanded":y,"aria-controls":u,"aria-autocomplete":"list",autoComplete:"off",value:b,onChange:e=>{R(e.target.value),w(!0),I(0)},onFocus:()=>w(!0),onBlur:()=>{window.setTimeout(()=>w(!1),120)},onKeyDown:M,placeholder:"Search by name or email",disabled:c||p,autoFocus:!0,className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),y&&(0,t.jsxs)("ul",{id:u,role:"listbox","aria-label":"Organization members",className:(0,r.cn)(a.UNSTYLED_LIST,"stg:absolute stg:z-10 stg:mt-1 stg:max-h-56 stg:w-full stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-popover stg:py-1 stg:shadow-md"),children:[p&&(0,t.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-xs stg:text-muted-foreground",children:"Loading members…"}),!p&&v&&(0,t.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-[0.65rem] stg:text-destructive",role:"alert",children:(0,l.getUserMessage)(v)}),!p&&!v&&0===A.length&&(0,t.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-xs stg:text-muted-foreground",children:b.trim()?"No members match your search.":"No members to share with."}),!p&&!v&&A.map((e,s)=>{let i=N.has(e.id),n=s===j,a=e.name||e.email||e.id,l=!!(0,x.providerLabel)(e)&&(e.identityOrigin?.providerDisplayName!=="Stigmer"||!!e.email&&C.has(e.email.toLowerCase()));return(0,t.jsxs)("li",{role:"option","aria-selected":n,"aria-disabled":i,onMouseEnter:()=>I(s),onMouseDown:t=>{t.preventDefault(),i||P(e)},className:(0,r.cn)("stg:flex stg:items-center stg:justify-between stg:gap-2 stg:px-2.5 stg:py-1.5",i?"stg:cursor-not-allowed stg:opacity-50":"stg:cursor-pointer",n&&!i&&"stg:bg-accent-hover"),children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:flex stg:h-6 stg:w-6 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground","aria-hidden":"true",children:(a[0]??"?").toUpperCase()}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-foreground",children:a}),l&&(0,t.jsx)(x.ProviderBadge,{principal:e})]}),e.email&&e.email!==a&&(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-[0.6rem] stg:text-muted-foreground",children:e.email})]})]}),i&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[0.6rem] stg:text-muted-foreground",children:"Has access"})]},e.id)})]})]})]})}function f(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}var v=e.i(379410);function b({resourceKind:e,resourceKindString:i,resourceId:n,orgId:a,excludePrincipalIds:d,onGranted:u,onCancel:x,className:f}){let{create:R,isCreating:y,error:w,clearError:j}=(0,g.useCreateIamPolicy)(),[I,k]=(0,s.useState)(null),[N,S]=(0,s.useState)(null),C=null!==I&&null!==N&&!y,A=(0,s.useCallback)(async e=>{if(e.preventDefault(),C&&null!==N&&null!==I){j();try{let e=(0,o.create)(c.IamPolicySpecSchema,{principal:(0,o.create)(c.ApiResourceRefSchema,{kind:"identity_account",id:I.id}),resource:(0,o.create)(c.ApiResourceRefSchema,{kind:i,id:n}),relation:(0,m.iamRoleToString)(N)}),t=await R(e);u?.(t)}catch{}}},[C,N,I,i,n,R,j,u]);return(0,t.jsxs)("form",{onSubmit:A,className:(0,r.cn)("stg:space-y-3",f),children:[(0,t.jsxs)("div",{className:"stg:space-y-3",children:[(0,t.jsx)(h,{orgId:a,value:I,onChange:k,excludePrincipalIds:d,disabled:y}),(0,t.jsx)(p.RoleSelector,{kind:e,selected:N,onSelect:S,disabled:y})]}),w&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(w)}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsxs)("button",{type:"submit",disabled:!C,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-40"),children:[y&&(0,t.jsx)(v.SpinnerIcon,{size:12}),"Grant access"]}),x&&(0,t.jsx)("button",{type:"button",onClick:x,disabled:y,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"})]})]})}var R=e.i(590150);function y({resource:e,resourceKindString:i,resourceKind:m,orgId:p,className:x}){let{accessList:h,isLoading:f,fetchError:v,revokeAccess:j,isRevoking:I,revokeError:k,refetch:N,hasGrantableRoles:S}=function(e){var t;let r=(0,s.useMemo)(()=>e?{kind:e.kind,id:e.id}:null,[e?.kind,e?.id]),{members:i,isLoading:a,isRefetching:l,error:m,refetch:p}=(0,d.useResourceAccess)(r),{roles:x,hasRoles:h}=(t=e?.resourceKind??null,(0,s.useMemo)(()=>null===t?{roles:[],hasRoles:!1}:{roles:(0,n.getGrantableRoles)(t),hasRoles:(0,n.hasGrantableRoles)(t)},[t])),{create:f,isCreating:v,error:b,clearError:R}=(0,g.useCreateIamPolicy)(),{remove:y,isDeleting:w,error:j,clearError:I}=(0,u.useDeleteIamPolicy)(),k=(0,s.useRef)(e);k.current=e;let N=(0,s.useCallback)(async(e,t)=>{let s=k.current;if(!s)return;let r=(0,o.create)(c.IamPolicySpecSchema,{principal:(0,o.create)(c.ApiResourceRefSchema,{kind:"identity_account",id:e}),resource:(0,o.create)(c.ApiResourceRefSchema,{kind:s.kind,id:s.id}),relation:t});await f(r),p()},[f,p]);return{accessList:i,isLoading:a,isRefetching:l,fetchError:m,grantableRoles:x,hasGrantableRoles:h,grantAccess:N,isGranting:v,grantError:b,revokeAccess:(0,s.useCallback)(async(e,t)=>{let s=k.current;if(!s)return;let r=(0,o.create)(c.IamPolicySpecSchema,{principal:(0,o.create)(c.ApiResourceRefSchema,{kind:"identity_account",id:e}),resource:(0,o.create)(c.ApiResourceRefSchema,{kind:s.kind,id:s.id}),relation:t});await y(r),p()},[y,p]),isRevoking:w,revokeError:j,refetch:p,clearErrors:(0,s.useCallback)(()=>{R(),I()},[R,I])}}(e),[C,A]=(0,s.useState)(!1),P=h.map(e=>e.principal?.id).filter(e=>!!e),M={kind:i,id:e.id};return(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-4",x),children:[(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:f?"Loading access list...":`${h.length} ${1===h.length?"person":"people"} with access`}),v&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(v)}),!f&&h.length>0&&(0,t.jsx)("ul",{className:(0,r.cn)(a.UNSTYLED_LIST,"stg:space-y-1 stg:mt-2"),"aria-label":"People with access",children:h.map(e=>(0,t.jsx)(w,{entry:e,grantGate:M,onRevoke:j,isRevoking:I},e.principal?.id??"unknown"))}),k&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(k)})]}),S&&(0,t.jsx)(R.PermissionGate,{resource:M,relation:"can_grant_access",children:(0,t.jsx)("div",{className:"stg:border-t stg:border-border stg:pt-3",children:C?(0,t.jsx)(b,{resourceKind:m,resourceKindString:i,resourceId:e.id,orgId:p,excludePrincipalIds:P,onGranted:()=>{A(!1),N()},onCancel:()=>A(!1)}):(0,t.jsx)("button",{type:"button",onClick:()=>A(!0),className:(0,r.cn)("stg:w-full stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium stg:text-center","stg:border stg:border-dashed stg:border-border","stg:text-muted-foreground stg:hover:text-foreground stg:hover:border-foreground/30","stg:hover:bg-accent-hover stg:transition-colors"),children:"+ Add people"})})})]})}function w({entry:e,grantGate:i,onRevoke:n,isRevoking:a}){let l=e.principal,o=e.roles,c=l?.name||l?.email||l?.id||"Unknown",d=o[0]?.role,g=(0,s.useCallback)(async()=>{l?.id&&d?.code&&await n(l.id,d.code)},[l?.id,d?.code,n]);return(0,t.jsxs)("li",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:px-2 stg:py-1.5 stg:hover:bg-accent-hover stg:group",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:min-w-0",children:[(0,t.jsx)("div",{className:"stg:h-6 stg:w-6 stg:rounded-full stg:bg-muted stg:flex stg:items-center stg:justify-center stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground stg:shrink-0","aria-hidden":"true",children:(l?.name?.[0]??l?.email?.[0]??"?").toUpperCase()}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-foreground stg:truncate",children:c}),l?.email&&l.name&&(0,t.jsx)("p",{className:"stg:text-[0.6rem] stg:text-muted-foreground stg:truncate",children:l.email})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:shrink-0",children:[(0,t.jsx)("span",{className:"stg:text-[0.6rem] stg:text-muted-foreground stg:capitalize",children:d?.name??d?.code??"—"}),(0,t.jsx)(R.PermissionGate,{resource:i,relation:"can_grant_access",children:(0,t.jsx)("button",{type:"button",onClick:g,disabled:a,"aria-label":`Remove ${c}'s access`,className:(0,r.cn)("stg:rounded stg:p-0.5 stg:text-muted-foreground stg:opacity-0 stg:group-hover:opacity-100","stg:hover:text-destructive stg:hover:bg-destructive/10","stg:disabled:pointer-events-none stg:disabled:opacity-50","stg:transition-opacity"),children:(0,t.jsx)(j,{})})})]})]})}function j(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}var I=e.i(388023);function k({title:e,description:s,children:r}){return(0,t.jsxs)("section",{className:"stg:px-6 stg:py-4",children:[(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:e}),s&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-[0.65rem] stg:text-muted-foreground",children:s}),(0,t.jsx)("div",{className:"stg:mt-2.5",children:r})]})}function N(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}e.s(["ManageAccessDialog",0,function({open:e,onOpenChange:a,resource:l,visibility:o,extraSection:c}){let d=(0,s.useId)(),g=(0,s.useCallback)(()=>{a(!1)},[a]),u=(0,n.hasGrantableRoles)(l.kind);return(0,t.jsx)(i.DialogShell,{open:e,onOpenChange:a,width:"md","aria-labelledby":d,children:e&&(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:border-b stg:border-border stg:px-6 stg:py-4",children:[(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("h2",{id:d,className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Manage access"}),l.name&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:truncate stg:text-xs stg:text-muted-foreground",children:l.name})]}),(0,t.jsx)("button",{type:"button",onClick:g,"aria-label":"Close",className:(0,r.cn)("stg:rounded-md stg:p-1 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"),children:(0,t.jsx)(N,{})})]}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:[o&&(0,t.jsx)(k,{title:"General access",description:"Who can find and open this resource.",children:(0,t.jsx)(I.ResourceVisibilityControl,{kind:o.kind,resourceId:l.id,visibility:o.current,org:o.org,onChanged:o.onChanged})}),u&&(0,t.jsx)(k,{title:"People with access",children:(0,t.jsx)(y,{resource:{kind:l.kindString,id:l.id,resourceKind:l.kind},resourceKindString:l.kindString,resourceKind:l.kind,orgId:l.org})}),c&&(0,t.jsx)(k,{title:c.title,description:c.description,children:c.content})]}),(0,t.jsx)("div",{className:"stg:flex stg:items-center stg:justify-end stg:border-t stg:border-border stg:px-6 stg:py-3",children:(0,t.jsx)("button",{type:"button",onClick:g,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring stg:focus:ring-offset-2"),children:"Done"})})]})})}],213149)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65642,e=>{"use strict";var t=e.i(843476),s=e.i(893976);let r={primary:"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover",outline:"stg:border stg:border-border stg:text-foreground stg:hover:bg-accent-hover",ghost:"stg:text-foreground stg:hover:bg-accent-hover",destructive:"stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover"},a={xs:"stg:px-2.5 stg:py-1 stg:text-xs",sm:"stg:px-3 stg:py-1.5 stg:text-xs"};e.s(["Button",0,function({variant:e="primary",size:i="sm",icon:n,type:l="button",className:c,children:o,...u}){return(0,t.jsxs)("button",{type:l,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:font-medium stg:transition-colors","stg:motion-reduce:transition-none","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",a[i],r[e],c),...u,children:[n,o]})}])},311015,e=>{"use strict";var t=e.i(843476),s=e.i(893976),r=e.i(65642),a=e.i(271645),i=e.i(475254);let n=(0,i.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),l=(0,i.default)("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),c=(0,i.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var o=e.i(63209);let u="stg:h-10 stg:w-10";e.s(["EmptyState",0,function({variant:e,resourceLabel:i,icon:d,title:g,description:h,errorMessage:p,action:m,children:f,className:x}){let y=function(e){let{variant:t,resourceLabel:s="resources",title:r,description:i,errorMessage:d}=e;return(0,a.useMemo)(()=>{let e=function(e,t){switch(e){case"first-use":return{title:`No ${t} yet`,description:`Create ${"agents"===t?"an agent":`a ${t.replace(/s$/,"")}`} to get started.`};case"zero-results":return{title:"No results found",description:"Try adjusting your search or filters."};case"permission":return{title:`No access to ${t}`,description:"You don't have permission to view these resources. Contact your organization admin."};case"error":return{title:"Something went wrong",description:"We couldn't load this content. Please try again."}}}(t,s);return{title:r??e.title,description:"error"===t&&d?d:i??e.description,defaultIcon:function(e){switch(e){case"first-use":return(0,a.createElement)(n,{className:u});case"zero-results":return(0,a.createElement)(l,{className:u});case"permission":return(0,a.createElement)(c,{className:u});case"error":return(0,a.createElement)(o.AlertCircle,{className:u})}}(t),role:"error"===t?"alert":"status"}},[t,s,r,i,d])}({variant:e,resourceLabel:i,title:g,description:h,errorMessage:p});return(0,t.jsxs)("div",{role:y.role,className:(0,s.cn)("stg:flex stg:flex-col stg:items-center stg:gap-3 stg:py-12 stg:text-center",x),children:[(0,t.jsx)("div",{className:"stg:text-muted-foreground-faint",children:d??y.defaultIcon}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-muted-foreground",children:y.title}),(0,t.jsx)("p",{className:"stg:max-w-sm stg:text-xs stg:text-muted-foreground-subtle",children:y.description})]}),f?(0,t.jsx)("div",{className:"stg:mt-1",children:f}):m&&(0,t.jsx)(r.Button,{variant:"error"===e?"outline":"primary",icon:m.icon,onClick:m.onClick,className:"stg:mt-1",children:m.label})]})}],311015)},582458,e=>{"use strict";let t=(0,e.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},531245,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],531245)},543727,914118,582688,e=>{"use strict";var t=e.i(843476);function s({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M5.04 15.17a2.52 2.52 0 1 1-2.52-2.52h2.52v2.52zM6.31 15.17a2.52 2.52 0 0 1 5.04 0v6.31a2.52 2.52 0 1 1-5.04 0v-6.31zM8.83 5.04a2.52 2.52 0 1 1 2.52-2.52v2.52H8.83zM8.83 6.31a2.52 2.52 0 0 1 0 5.04H2.52a2.52 2.52 0 1 1 0-5.04h6.31zM18.96 8.83a2.52 2.52 0 1 1 2.52 2.52h-2.52V8.83zM17.69 8.83a2.52 2.52 0 0 1-5.04 0V2.52a2.52 2.52 0 1 1 5.04 0v6.31zM15.17 18.96a2.52 2.52 0 1 1-2.52 2.52v-2.52h2.52zM15.17 17.69a2.52 2.52 0 0 1 0-5.04h6.31a2.52 2.52 0 1 1 0 5.04h-6.31z"})})}function r({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z"})})}e.s(["SlackMarkIcon",0,s],914118),e.s(["WhatsAppMarkIcon",0,r],582688);let a=[{id:"slack",label:"Slack",Icon:s,installStyle:"redirect",supportsMessageTemplates:!1,supportsStaffReplies:!1,timelineIncludesCustomerMessages:!1},{id:"whatsapp",label:"WhatsApp",Icon:r,installStyle:"direct",supportsMessageTemplates:!0,supportsStaffReplies:!0,timelineIncludesCustomerMessages:!0}];e.s(["CHANNEL_PROVIDERS",0,a,"channelProviderOf",0,function(e){return a.find(t=>t.id===e)??null}],543727)},815907,e=>{"use strict";var t=e.i(891287),s=e.i(476487),r=e.i(586108),a=e.i(583093);e.s(["useOrgAgentChannelList",0,function(e){let i=(0,r.useStigmer)(),n=e?async()=>(await i.agentChannel.list((0,t.create)(s.ListAgentChannelsRequestSchema,{org:e}))).items:null,{data:l,isLoading:c,isRefetching:o,error:u,refetch:d}=(0,a.useFetch)(n,[e,i],[]);return{channels:l,isLoading:c,isRefetching:o,error:u,refetch:d}}])},385663,928240,182990,e=>{"use strict";let t=(0,e.i(475254).default)("layout-template",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);e.s(["LayoutTemplate",0,t],385663);let s=/\{\{\s*[A-Za-z0-9_]+\s*\}\}/g;e.s(["splitTemplateBody",0,function(e){let t=[],r=0;for(let a of e.matchAll(s))a.index>r&&t.push({kind:"text",value:e.slice(r,a.index)}),t.push({kind:"placeholder",value:a[0]}),r=a.index+a[0].length;return r<e.length&&t.push({kind:"text",value:e.slice(r)}),t},"templateStatusPhase",0,function(e){switch(e){case"APPROVED":return"ready";case"PENDING":case"IN_APPEAL":return"pending";case"PAUSED":case"LIMIT_EXCEEDED":return"degraded";case"REJECTED":case"DISABLED":return"failed";case"PENDING_DELETION":case"DELETED":return"disabled";default:return"draft"}}],928240);var r=e.i(271645),a=e.i(891287),i=e.i(730938),n=e.i(586108),l=e.i(583093);e.s(["useChannelTemplateList",0,function(e,t,s){let c=(0,n.useStigmer)(),o=s?.approvedOnly??!1,[u,d]=(0,r.useState)(!1),g=e&&t?async()=>(await c.agentChannel.listTemplates((0,a.create)(i.ListChannelTemplatesInputSchema,{channel:e,org:t,approvedOnly:o}))).entries:null,{data:h,isLoading:p,isRefetching:m,error:f,refetch:x}=(0,l.useFetch)(g,[e,t,o,c],[],{refetchInterval:u}),y=h.some(e=>"PENDING"===e.status);return(0,r.useEffect)(()=>{d(!!y&&6e4)},[y]),{templates:h,isLoading:p,isRefetching:m,error:f,refetch:x}}],182990)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,347171,e=>{"use strict";var r=e.i(725188);e.i(539927),e.s([],744414),e.i(744414),e.s(["createWardleyServices",()=>r.createWardleyServices],347171)}]);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,443578,e=>{"use strict";var t=e.i(908381),i=e.i(171206),s=(0,i.__name)((e,s,a,l)=>{e.attr("class",a);let{width:o,height:c,x:h,y:u}=n(e,s);(0,t.configureSvgSize)(e,c,o,l);let m=r(h,u,o,c,s);e.attr("viewBox",m),i.log.debug(`viewBox configured: ${m} with padding: ${s}`)},"setupViewPortForSVG"),n=(0,i.__name)((e,t)=>{let i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*t,height:i.height+2*t,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),r=(0,i.__name)((e,t,i,s,n)=>`${e-n} ${t-n} ${i} ${s}`,"createViewBox");e.s(["setupViewPortForSVG",0,s])},707510,e=>{"use strict";var t=e.i(171206);e.i(947716);var i=e.i(723685),s=(0,t.__name)((e,t)=>{let s;return"sandbox"===t&&(s=(0,i.select)("#i"+e)),("sandbox"===t?(0,i.select)(s.nodes()[0].contentDocument.body):(0,i.select)("body")).select(`[id="${e}"]`)},"getDiagramElement");e.s(["getDiagramElement",0,s])},427053,e=>{"use strict";var t=e.i(707510),i=e.i(443578),s=e.i(233755);e.i(95547),e.i(609003),e.i(347578),e.i(136013),e.i(620144),e.i(864421);var n=e.i(669587),r=e.i(908381),a=e.i(171206),l=function(){var e=(0,a.__name)(function(e,t,i,s){for(i=i||{},s=e.length;s--;i[e[s]]=t);return i},"o"),t=[1,3],i=[1,4],s=[1,5],n=[1,6],r=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],l=[1,22],o=[2,7],c=[1,26],h=[1,27],u=[1,28],m=[1,29],_=[1,33],y=[1,34],d=[1,35],E=[1,36],p=[1,37],R=[1,38],g=[1,24],f=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],L=[1,70],$=[1,71],v=[1,72],x=[1,73],w=[1,74],D=[1,75],O=[1,76],M=[1,83],F=[1,80],P=[1,84],V=[1,85],U=[1,86],B=[1,87],Y=[1,88],Q=[1,89],H=[1,90],K=[1,91],W=[1,92],j=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Z=[1,110],ee=[1,106],et=[1,107],ei=[1,108],es=[1,109],en=[1,111],er=[1,116],ea=[1,117],el=[1,114],eo=[1,115],ec={trace:(0,a.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,a.__name)(function(e,t,i,s,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(r[l-3],r[l-4]);break;case 22:s.addRequirement(r[l-5],r[l-6]),s.setClass([r[l-5]],r[l-3]);break;case 23:s.setNewReqId(r[l-2]);break;case 24:s.setNewReqText(r[l-2]);break;case 25:s.setNewReqRisk(r[l-2]);break;case 26:s.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(r[l-3]);break;case 43:s.addElement(r[l-5]),s.setClass([r[l-5]],r[l-3]);break;case 44:s.setNewElementType(r[l-2]);break;case 45:s.setNewElementDocRef(r[l-2]);break;case 48:s.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:s.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=r[l-2],s.defineClass(r[l-1],r[l]);break;case 58:s.setClass(r[l-1],r[l]);break;case 59:s.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],s.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}},"anonymous"),table:[{3:1,4:2,6:t,9:i,11:s,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:i,11:s,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(r,[2,6]),{3:12,4:2,6:t,9:i,11:s,13:n},{1:[2,2]},{4:17,5:l,7:13,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},e(r,[2,4]),e(r,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:l,7:42,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:43,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:44,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:45,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:46,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:47,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:48,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:49,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{4:17,5:l,7:50,8:o,9:i,11:s,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:m,25:23,33:25,41:_,42:y,43:d,44:E,45:p,46:R,54:g,72:f,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:L,66:$,67:v,68:x,69:w,70:D,71:O},{62:77,65:L,66:$,67:v,68:x,69:w,70:D,71:O},{30:78,33:62,75:N,89:b,90:T},{73:79,75:M,76:F,78:81,79:82,80:P,81:V,82:U,83:B,84:Y,85:Q,86:H,87:K,88:W},e(j,[2,60]),e(j,[2,62]),{73:93,75:M,76:F,78:81,79:82,80:P,81:V,82:U,83:B,84:Y,85:Q,86:H,87:K,88:W},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(G,[2,54]),e(G,[2,55]),e(G,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:z}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:M,80:P,81:V,82:U,83:B,84:Y,85:Q,86:H,87:K,88:W}),e(J,[2,67]),e(J,[2,69]),e(J,[2,70]),e(J,[2,71]),e(J,[2,72]),e(J,[2,73]),e(J,[2,74]),e(J,[2,75]),e(J,[2,76]),e(J,[2,77]),e(J,[2,78]),e(k,[2,57],{76:z}),e(k,[2,58],{76:F}),{5:Z,28:105,31:ee,34:et,36:ei,38:es,40:en},{27:[1,112],76:F},{5:er,40:ea,56:113,57:el,59:eo},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:M,78:121,79:82,80:P,81:V,82:U,83:B,84:Y,85:Q,86:H,87:K,88:W},e(j,[2,61]),e(j,[2,63]),e(J,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Z,28:126,31:ee,34:et,36:ei,38:es,40:en},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:er,40:ea,56:130,57:el,59:eo},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:M,80:P,81:V,82:U,83:B,84:Y,85:Q,86:H,87:K,88:W}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:Z,28:145,31:ee,34:et,36:ei,38:es,40:en},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:er,40:ea,56:152,57:el,59:eo},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:Z,28:159,31:ee,34:et,36:ei,38:es,40:en},{5:Z,28:160,31:ee,34:et,36:ei,38:es,40:en},{5:Z,28:161,31:ee,34:et,36:ei,38:es,40:en},{5:Z,28:162,31:ee,34:et,36:ei,38:es,40:en},{5:er,40:ea,56:163,57:el,59:eo},{5:er,40:ea,56:164,57:el,59:eo},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,a.__name)(function(e,t){if(t.recoverable)this.trace(e);else{var i=Error(e);throw i.hash=t,i}},"parseError"),parse:(0,a.__name)(function(e){var t=this,i=[0],s=[],n=[null],r=[],l=this.table,o="",c=0,h=0,u=0,m=r.slice.call(arguments,1),_=Object.create(this.lexer),y={};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y[d]=this.yy[d]);_.setInput(e,y),y.lexer=_,y.parser=this,void 0===_.yylloc&&(_.yylloc={});var E=_.yylloc;r.push(E);var p=_.options&&_.options.ranges;function R(){var e;return"number"!=typeof(e=s.pop()||_.lex()||1)&&(e instanceof Array&&(e=(s=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.__name)(function(e){i.length=i.length-2*e,n.length=n.length-e,r.length=r.length-e},"popStack"),(0,a.__name)(R,"lex");for(var g,f,S,I,b,T,k,N,q,C={};;){if(S=i[i.length-1],this.defaultActions[S]?I=this.defaultActions[S]:(null==g&&(g=R()),I=l[S]&&l[S][g]),void 0===I||!I.length||!I[0]){var A="";for(T in q=[],l[S])this.terminals_[T]&&T>2&&q.push("'"+this.terminals_[T]+"'");A=_.showPosition?"Parse error on line "+(c+1)+":\n"+_.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(A,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:E,expected:q})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+S+", token: "+g);switch(I[0]){case 1:i.push(g),n.push(_.yytext),r.push(_.yylloc),i.push(I[1]),g=null,f?(g=f,f=null):(h=_.yyleng,o=_.yytext,c=_.yylineno,E=_.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[I[1]][1],C.$=n[n.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},p&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[o,h,c,y,I[1],n,r].concat(m))))return b;k&&(i=i.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[I[1]][0]),n.push(C.$),r.push(C._$),N=l[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0},"parse")};function eh(){this.yy={}}return ec.lexer={EOF:1,parseError:(0,a.__name)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,a.__name)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.__name)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,a.__name)(function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.__name)(function(){return this._more=!0,this},"more"),reject:(0,a.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.__name)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,a.__name)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.__name)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.__name)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,a.__name)(function(e,t){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in n)this[r]=n[r];return!1},"test_match"),next:(0,a.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,i,s,n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!t||i[0].length>t[0].length)){if(t=i,s=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,n[r])))return e;if(!this._backtrack)return!1;t=!1;continue}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[s]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.__name)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,a.__name)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,a.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.__name)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,a.__name)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,a.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.__name)(function(e,t,i,s){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}},(0,a.__name)(eh,"Parser"),eh.prototype=ec,ec.Parser=eh,new eh}();l.parser=l;var o=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=r.setAccTitle,this.getAccTitle=r.getAccTitle,this.setAccDescription=r.setAccDescription,this.getAccDescription=r.getAccDescription,this.setDiagramTitle=r.setDiagramTitle,this.getDiagramTitle=r.getDiagramTitle,this.getConfig=(0,a.__name)(()=>(0,r.getConfig2)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,a.__name)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),a.log.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,i){this.relations.push({type:e,src:t,dst:i})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,r.clear)()}setCssStyle(e,t){for(let i of e){let e=this.requirements.get(i)??this.elements.get(i);if(!t||!e)return;for(let i of t)i.includes(",")?e.cssStyles.push(...i.split(",")):e.cssStyles.push(i)}}setClass(e,t){for(let i of e){let e=this.requirements.get(i)??this.elements.get(i);if(e)for(let i of t){e.classes.push(i);let t=this.classes.get(i)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let i of e){let e=this.classes.get(i);void 0===e&&(e={id:i,styles:[],textStyles:[]},this.classes.set(i,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let i=t.replace("fill","bgFill");e.textStyles.push(i)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(i)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(i)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){let e=(0,r.getConfig2)(),t=[],i=[];for(let i of this.requirements.values())i.id=i.name,i.cssStyles=i.cssStyles,i.cssClasses=i.classes.join(" "),i.shape="requirementBox",i.look=e.look,i.colorIndex=t.length,t.push(i);for(let i of this.elements.values())i.shape="requirementBox",i.look=e.look,i.id=i.name,i.cssStyles=i.cssStyles,i.cssClasses=i.classes.join(" "),i.colorIndex=t.length,t.push(i);for(let t of this.relations){let s=0,n=t.type===this.Relationships.CONTAINS,r={id:`${t.src}-${t.dst}-${s}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`<<${t.type}>>`,classes:"relationshipLine",style:["fill:none",n?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:n?"normal":"dashed",arrowTypeStart:n?"requirement_contains":"",arrowTypeEnd:n?"":"requirement_arrow",look:e.look,labelType:"markdown"};i.push(r),s++}return{nodes:t,edges:i,other:{},config:e,direction:this.getDirection()}}},c=(0,a.__name)(e=>{let{themeVariables:t,look:i}=(0,r.getConfig)(),{bkgColorArray:s,borderColorArray:n}=t;if(!n?.length)return"";let a="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)a+=`
|
|
2
|
+
|
|
3
|
+
[data-look="${i}"][data-color-id="color-${t}"].node path {
|
|
4
|
+
stroke: ${n[t]};
|
|
5
|
+
fill: ${s?.length?s[t]:""};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-look="${i}"][data-color-id="color-${t}"].node rect {
|
|
9
|
+
stroke: ${n[t]};
|
|
10
|
+
fill: ${s?.length?s[t]:""};
|
|
11
|
+
}
|
|
12
|
+
`;return a},"genColor"),h=(0,a.__name)(e=>{let{look:t,themeVariables:i}=(0,r.getConfig)(),{requirementEdgeLabelBackground:s}=i;return`
|
|
13
|
+
${c(e)}
|
|
14
|
+
marker {
|
|
15
|
+
fill: ${e.relationColor};
|
|
16
|
+
stroke: ${e.relationColor};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
marker.cross {
|
|
20
|
+
stroke: ${e.lineColor};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
svg {
|
|
24
|
+
font-family: ${e.fontFamily};
|
|
25
|
+
font-size: ${e.fontSize};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.reqBox {
|
|
29
|
+
fill: ${e.requirementBackground};
|
|
30
|
+
fill-opacity: 1.0;
|
|
31
|
+
stroke: ${e.requirementBorderColor};
|
|
32
|
+
stroke-width: ${e.requirementBorderSize};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.reqTitle, .reqLabel{
|
|
36
|
+
fill: ${e.requirementTextColor};
|
|
37
|
+
}
|
|
38
|
+
.reqLabelBox {
|
|
39
|
+
fill: ${e.relationLabelBackground};
|
|
40
|
+
fill-opacity: 1.0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.req-title-line {
|
|
44
|
+
stroke: ${e.requirementBorderColor};
|
|
45
|
+
stroke-width: ${e.requirementBorderSize};
|
|
46
|
+
}
|
|
47
|
+
.relationshipLine {
|
|
48
|
+
stroke: ${e.relationColor};
|
|
49
|
+
stroke-width: ${"neo"===t?e.strokeWidth:"1px"};
|
|
50
|
+
}
|
|
51
|
+
.relationshipLabel {
|
|
52
|
+
fill: ${e.relationLabelColor};
|
|
53
|
+
}
|
|
54
|
+
.edgeLabel {
|
|
55
|
+
background-color: ${e.edgeLabelBackground};
|
|
56
|
+
}
|
|
57
|
+
.edgeLabel .label rect {
|
|
58
|
+
fill: ${e.edgeLabelBackground};
|
|
59
|
+
}
|
|
60
|
+
.edgeLabel .label text {
|
|
61
|
+
fill: ${e.relationLabelColor};
|
|
62
|
+
}
|
|
63
|
+
.divider {
|
|
64
|
+
stroke: ${e.nodeBorder};
|
|
65
|
+
stroke-width: 1;
|
|
66
|
+
}
|
|
67
|
+
.label {
|
|
68
|
+
font-family: ${e.fontFamily};
|
|
69
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
70
|
+
}
|
|
71
|
+
.label text,span {
|
|
72
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
73
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
74
|
+
}
|
|
75
|
+
.labelBkg {
|
|
76
|
+
background-color: ${s??e.edgeLabelBackground};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
`},"getStyles"),u={};(0,a.__export)(u,{draw:()=>m});var m=(0,a.__name)(async function(e,l,o,c){a.log.info("REF0:"),a.log.info("Drawing requirement diagram (unified)",l);let{securityLevel:h,state:u,layout:m,look:_}=(0,r.getConfig2)(),y=c.db.getData(),d=(0,t.getDiagramElement)(l,h);y.type=c.type,y.layoutAlgorithm=(0,s.getRegisteredLayoutAlgorithm)(m),y.nodeSpacing=u?.nodeSpacing??50,y.rankSpacing=u?.rankSpacing??50,y.markers="neo"===_?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],y.diagramId=l,await (0,s.render)(y,d),n.utils_default.insertTitle(d,"requirementDiagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.setupViewPortForSVG)(d,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw");e.s(["diagram",0,{parser:l,get db(){return new o},renderer:u,styles:h}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,621501,t=>{"use strict";var e=t.i(908381),a=t.i(171206),r=t.i(139941);t.i(947716);var s=t.i(723685),i=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),s=t.append("text");s.attr("x",a.x),s.attr("y",a.y),s.attr("class","legend"),s.style("text-anchor",a.anchor),a.class&&s.attr("class",a.class);let i=s.append("tspan");return i.attr("x",a.x+2*a.textMargin),i.text(r),s},"drawText"),d=(0,a.__name)((t,e,a,s)=>{let i=t.append("image");i.attr("x",e),i.attr("y",a);let l=(0,r.sanitizeUrl)(s);i.attr("xlink:href",l)},"drawImage"),o=(0,a.__name)((t,e,a,s)=>{let i=t.append("use");i.attr("x",e),i.attr("y",a);let l=(0,r.sanitizeUrl)(s);i.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),p=(0,a.__name)(()=>{let t=(0,s.select)(".mermaidTooltip");return t.empty()&&(t=(0,s.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,p,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,o,"drawImage",0,d,"drawRect",0,i,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},857387,t=>{"use strict";var e=t.i(171206),a=class{constructor(t){this.init=t,this.records=this.init()}static{(0,e.__name)(this,"ImperativeState")}reset(){this.records=this.init()}};t.s(["ImperativeState",0,a])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65642,t=>{"use strict";var e=t.i(843476),s=t.i(893976);let r={primary:"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover",outline:"stg:border stg:border-border stg:text-foreground stg:hover:bg-accent-hover",ghost:"stg:text-foreground stg:hover:bg-accent-hover",destructive:"stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover"},g={xs:"stg:px-2.5 stg:py-1 stg:text-xs",sm:"stg:px-3 stg:py-1.5 stg:text-xs"};t.s(["Button",0,function({variant:t="primary",size:n="sm",icon:o,type:a="button",className:d,children:i,...l}){return(0,e.jsxs)("button",{type:a,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:font-medium stg:transition-colors","stg:motion-reduce:transition-none","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",g[n],r[t],d),...l,children:[o,i]})}])},624020,t=>{"use strict";var e=t.i(843476),s=t.i(893976),r=t.i(610595),g=t.i(910304),n=t.i(65642);function o({className:t}){return(0,e.jsxs)("div",{className:(0,s.cn)("stg:rounded-lg stg:border stg:border-border stg:bg-card stg:px-4 stg:py-6 stg:text-center",t),role:"status",children:[(0,e.jsx)("p",{className:"stg:text-xs stg:font-semibold stg:text-foreground",children:"Platform operator access required"}),(0,e.jsx)("p",{className:"stg:mx-auto stg:mt-1 stg:max-w-md stg:text-xs stg:text-muted-foreground",children:"Provider standing reports the health of the platform's own LLM provider accounts, which is Stigmer-internal. It needs the platform operator role — organization roles do not grant it. If you believe you should have access, contact a platform operator."})]})}var a=t.i(586108),d=t.i(583093);let i=BigInt(0),l={healthy:{label:"Healthy",tone:"ok"},platform_billing:{label:"Billing rejected",tone:"warn"},platform_auth:{label:"Auth rejected",tone:"warn"},unclassified_error:{label:"Erroring",tone:"warn"},unreachable:{label:"Unreachable",tone:"warn"},not_configured:{label:"Not configured",tone:"muted"}};function c({className:t}){let{standing:i,isLoading:l,isRefetching:m,error:x,refetch:p}=function(){let t=(0,a.useStigmer)(),e=(void 0)??!0,{data:s,isLoading:r,isRefetching:g,error:n,refetch:o}=(0,d.useFetch)(e?()=>t.providerStanding.getStandingView():null,[e,t],null);return{standing:s,isLoading:r,isRefetching:g,error:n,refetch:o}}();if(l)return(0,e.jsxs)("div",{className:(0,s.cn)("stg:space-y-2",t),"aria-busy":"true",children:[(0,e.jsx)("div",{className:"stg:h-4 stg:w-40 stg:animate-pulse stg:rounded stg:bg-muted-subtle"}),Array.from({length:2},(t,s)=>(0,e.jsx)("div",{className:"stg:h-16 stg:animate-pulse stg:rounded-lg stg:bg-muted-subtle"},s))]});if(x)return(0,g.isPermissionDenied)(x)?(0,e.jsx)(o,{className:t}):(0,e.jsx)("p",{className:(0,s.cn)("stg:text-destructive stg:text-xs",t),role:"alert",children:(0,r.getUserMessage)(x)});let h=i?.providers??[];return(0,e.jsxs)("div",{className:(0,s.cn)("stg:space-y-3",t),children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between",children:[(0,e.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"Latest canary verdict per platform provider account, probed hourly."}),(0,e.jsx)(n.Button,{variant:"outline",size:"sm",onClick:p,disabled:m,children:m?"Refreshing…":"Refresh"})]}),0===h.length?(0,e.jsx)("p",{className:"stg:rounded-lg stg:border stg:border-border stg:bg-card stg:px-4 stg:py-6 stg:text-center stg:text-xs stg:text-muted-foreground",children:"No probe verdicts recorded yet — the standing probe has not completed a pass since this deployment came up."}):(0,e.jsx)("ul",{className:"stg:m-0 stg:grid stg:list-none stg:gap-2 stg:p-0 sm:stg:grid-cols-2",children:h.map(t=>(0,e.jsx)(u,{entry:t},t.provider))})]})}function u({entry:t}){var r,g;let n=l[t.status]??{label:t.status||"unknown",tone:"muted"},o=!(r=t.checkedAt)||r.seconds===i||Date.now()-1e3*Number(r.seconds)>108e5;return(0,e.jsxs)("li",{className:"stg:rounded-lg stg:border stg:border-border stg:bg-card stg:p-3",children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2",children:[(0,e.jsx)("span",{className:"stg:text-sm stg:font-semibold stg:capitalize stg:text-foreground",children:t.provider}),(0,e.jsx)(m,{tone:n.tone,label:n.label})]}),(0,e.jsxs)("dl",{className:"stg:mt-2 stg:flex stg:flex-wrap stg:gap-x-4 stg:gap-y-1 stg:text-xs stg:text-muted-foreground",children:[t.latencyMs>i&&(0,e.jsxs)("div",{className:"stg:flex stg:gap-1",children:[(0,e.jsx)("dt",{children:"Latency"}),(0,e.jsx)("dd",{className:"stg:m-0 stg:text-foreground",children:`${t.latencyMs}ms`})]}),t.httpStatus>0&&(0,e.jsxs)("div",{className:"stg:flex stg:gap-1",children:[(0,e.jsx)("dt",{children:"HTTP"}),(0,e.jsx)("dd",{className:"stg:m-0 stg:text-foreground",children:t.httpStatus})]}),(0,e.jsxs)("div",{className:"stg:flex stg:gap-1",children:[(0,e.jsx)("dt",{children:"Probed"}),(0,e.jsxs)("dd",{className:(0,s.cn)("stg:m-0",o?"stg:font-medium stg:text-destructive":"stg:text-foreground"),children:[(g=t.checkedAt)&&g.seconds!==i?new Date(1e3*Number(g.seconds)).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"never",o?" — stale":""]})]})]}),t.errorSummary&&(0,e.jsx)("p",{className:"stg:mt-2 stg:break-words stg:rounded stg:bg-muted-subtle stg:px-2 stg:py-1 stg:text-[11px] stg:text-muted-foreground",children:t.errorSummary})]})}function m({tone:t,label:r}){return(0,e.jsx)("span",{className:(0,s.cn)("stg:inline-block stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium","ok"===t&&"stg:bg-accent stg:text-primary","warn"===t&&"stg:bg-muted-subtle stg:text-destructive","muted"===t&&"stg:bg-muted-subtle stg:text-muted-foreground"),children:r})}t.s(["default",0,function(){return(0,e.jsx)(c,{})}],624020)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65642,e=>{"use strict";var t=e.i(843476),s=e.i(893976);let r={primary:"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover",outline:"stg:border stg:border-border stg:text-foreground stg:hover:bg-accent-hover",ghost:"stg:text-foreground stg:hover:bg-accent-hover",destructive:"stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover"},n={xs:"stg:px-2.5 stg:py-1 stg:text-xs",sm:"stg:px-3 stg:py-1.5 stg:text-xs"};e.s(["Button",0,function({variant:e="primary",size:a="sm",icon:o,type:l="button",className:i,children:c,...d}){return(0,t.jsxs)("button",{type:l,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:font-medium stg:transition-colors","stg:motion-reduce:transition-none","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",n[a],r[e],i),...d,children:[o,c]})}])},424089,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(869803),a=e.i(610595),o=e.i(910304),l=e.i(65642);function i({tone:e,label:s}){return(0,t.jsx)("span",{className:(0,r.cn)("stg:inline-block stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium","ok"===e&&"stg:bg-accent stg:text-primary","warn"===e&&"stg:bg-muted-subtle stg:text-destructive","muted"===e&&"stg:bg-muted-subtle stg:text-muted-foreground"),children:s})}var c=e.i(891287),d=e.i(988467),u=e.i(933221);function g({initial:e,isSubmitting:n,submitError:o,onSubmit:i,onCancel:m,className:h}){let x=null===e,[p,b]=(0,s.useState)(e?.displayName??""),[y,f]=(0,s.useState)(x?"":"***REDACTED***"),[j,v]=(0,s.useState)(e?.enabled??!0),[k,N]=(0,s.useState)(!e?.onDemandUsageDisabled),[C,S]=(0,s.useState)((e?.orgIds??[]).join("\n")),[w,I]=(0,s.useState)(e?.teamInviteLink??""),A=""!==p.trim()&&""!==y.trim()&&!n;return(0,t.jsxs)("form",{className:(0,r.cn)("stg:max-w-xl stg:space-y-3",h),onSubmit:t=>{t.preventDefault(),A&&i((0,c.create)(d.CursorAccountSchema,{accountId:e?.accountId??"",displayName:p.trim(),adminApiKey:y.trim(),enabled:j,onDemandUsageDisabled:!k,teamInviteLink:w.trim(),orgIds:C.split(/[\s,]+/).map(e=>e.trim()).filter(e=>""!==e)}))},children:[(0,t.jsx)("h3",{className:"stg:text-sm stg:font-semibold stg:text-foreground",children:x?"Add Cursor account":`Edit ${e.displayName}`}),(0,t.jsx)(u.Field,{label:"Display name",required:!0,children:(0,t.jsx)("input",{className:u.INPUT_CLASSES,value:p,onChange:e=>b(e.target.value),placeholder:"e.g. scenar.ai team",disabled:n})}),(0,t.jsx)(u.Field,{label:"Team Admin API key",required:!0,children:(0,t.jsx)("input",{className:u.INPUT_CLASSES,type:"password",value:y,onChange:e=>f(e.target.value),placeholder:"key from Cursor dashboard → API → Team tab",disabled:n,autoComplete:"off"})}),!x&&(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:"Leave the masked value untouched to keep the stored key; typing a new key rotates it (validated against Cursor before saving)."}),(0,t.jsx)(u.Field,{label:"Team invite link",children:(0,t.jsx)("input",{className:u.INPUT_CLASSES,type:"url",value:w,onChange:e=>I(e.target.value),placeholder:"https://… (Cursor dashboard → Invite Members → Copy Invite Link)",disabled:n,autoComplete:"off",spellCheck:!1})}),(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:'Optional. Powers one-click "Copy invite" on coverage rows whose key owner is not on the team. The link is long-lived and joinable by anyone holding it (each join consumes a paid seat) — share it deliberately, and revoke or rotate it from the Cursor dashboard. Leave empty to clear.'}),(0,t.jsx)(u.Field,{label:"Dedicated organization ids",children:(0,t.jsx)("textarea",{className:(0,r.cn)(u.INPUT_CLASSES,"stg:min-h-16 stg:font-mono"),value:C,onChange:e=>S(e.target.value),placeholder:"one org id per line\n(leave empty for a shared-pool account)",disabled:n})}),(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:"Listing org ids DEDICATES this account to them: their sessions use only this account's keys and fail with a clear message when it runs dry. Leaving this empty makes the account part of the shared pool that serves every other org — pool sessions may move between pool accounts when one is depleted. Each org may appear in at most one account."}),(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",checked:j,onChange:e=>v(e.target.checked),disabled:n}),"Enabled for key selection"]}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:pl-[1.375rem] stg:text-[11px] stg:text-muted-foreground",children:"Leave checked for accounts that should serve traffic. Unchecking drains the account: new sessions stop routing here immediately, but sessions already pinned to one of its keys keep working."})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",checked:k,onChange:e=>N(e.target.checked),disabled:n}),"On-demand usage enabled (as configured in the Cursor dashboard)"]}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:pl-[1.375rem] stg:text-[11px] stg:text-muted-foreground",children:"Declared here because Cursor's Admin API cannot report the team's on-demand setting. Uncheck only when the dashboard has on-demand usage OFF: new sessions then avoid member keys whose included third-party (API) pool is nearly spent, since such keys can no longer serve third-party models at all."})]})]}),o&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,a.getUserMessage)(o)}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:!A,children:n?"Saving…":x?"Create account":"Save changes"}),(0,t.jsx)(l.Button,{type:"button",size:"sm",variant:"outline",onClick:m,disabled:n,children:"Cancel"})]})]})}function m({className:e}){return(0,t.jsxs)("div",{className:(0,r.cn)("stg:rounded-lg stg:border stg:border-border stg:bg-card stg:px-4 stg:py-6 stg:text-center",e),role:"status",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:font-semibold stg:text-foreground",children:"Platform operator access required"}),(0,t.jsx)("p",{className:"stg:mx-auto stg:mt-1 stg:max-w-md stg:text-xs stg:text-muted-foreground",children:"Cursor account management is a Stigmer-internal surface holding provider credentials and team spend. It needs the platform operator role — organization roles do not grant it. If you believe you should have access, contact a platform operator."})]})}var h=e.i(40253);let x=BigInt(0);function p(e){let t=Number(e)/1e6;return`$${t.toFixed(2)}`}function b(e){return e&&e.seconds!==x?new Date(1e3*Number(e.seconds)).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"never"}function y(e){return`${Math.round(e)}%`}var f=e.i(326283),j=e.i(193799),v=e.i(364802);let k="stg:grid stg:grid-cols-[minmax(0,2.2fr)_minmax(0,1fr)_4.5rem_4.5rem_4.5rem_4.5rem_minmax(6rem,auto)_minmax(10rem,auto)] stg:items-center stg:gap-2 stg:px-3 stg:py-2";function N({accountId:e,coverage:s,inviteLink:n,actions:a,onChanged:o}){return(0,t.jsxs)("div",{role:"table","aria-label":"Team coverage",className:"stg:rounded-lg stg:border stg:border-border stg:bg-card",children:[(0,t.jsxs)("div",{role:"row",className:(0,r.cn)(k,"stg:border-b stg:border-border stg:text-[11px] stg:font-medium stg:text-muted-foreground"),children:[(0,t.jsx)("span",{role:"columnheader",children:"Member"}),(0,t.jsx)("span",{role:"columnheader",children:"Key"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"First-party"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"API"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"Included"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"On-demand"}),(0,t.jsx)("span",{role:"columnheader",children:"Status"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"Actions"})]}),!s.hasRoster&&(0,t.jsx)(C,{title:"Execution keys — not yet classified",description:'No roster sync has run for this account. Run "Sync now" to load the team roster and classify these keys.',count:s.unclassified.length,children:s.unclassified.map(s=>(0,t.jsx)(w,{accountId:e,keyView:s,hasRoster:!1,inviteLink:"",actions:a,onChanged:o},s.key?.keyId))}),s.onTeamWithKey.length>0&&(0,t.jsx)(C,{title:"On the team — key held",count:s.onTeamWithKey.length,children:s.onTeamWithKey.map(s=>(0,t.jsx)(w,{accountId:e,keyView:s,hasRoster:!0,inviteLink:"",actions:a,onChanged:o},s.key?.keyId))}),s.hasRoster&&(0,t.jsx)(C,{title:"On the team — no execution key",description:s.onTeamWithoutKey.length>0?"Sessions can never run under these members' identity or included quota. Add their user-scoped keys below to close the gap.":"Every active roster member holds an execution key — the roster is fully covered.",count:s.onTeamWithoutKey.length,children:s.onTeamWithoutKey.map(e=>(0,t.jsx)(I,{memberView:e},e.member?.email))}),s.offTeamWithKey.length>0&&(0,t.jsx)(C,{title:"Key held — not on the team",description:""!==n?"These key owners must join the Cursor team before their usage counts against its quota. Copy the invite link, send it to them out-of-band, then “Sync now” reclassifies once they join.":"These key owners must join the Cursor team before their usage counts against its quota. Invites are sent from the Cursor dashboard (cursor.com → Invite Members); paste the team's invite link into the account editor to enable one-click copying here.",count:s.offTeamWithKey.length,children:s.offTeamWithKey.map(s=>(0,t.jsx)(w,{accountId:e,keyView:s,hasRoster:!0,inviteLink:n,actions:a,onChanged:o},s.key?.keyId))})]})}function C({title:e,description:s,count:r,children:n}){return(0,t.jsxs)("div",{role:"rowgroup",className:"stg:border-b stg:border-border stg:last:border-b-0",children:[(0,t.jsx)("div",{role:"row",className:"stg:bg-muted-subtle stg:px-3 stg:py-1.5",children:(0,t.jsxs)("div",{role:"cell","aria-colspan":8,children:[(0,t.jsxs)("span",{className:"stg:text-[11px] stg:font-semibold stg:text-foreground",children:[e,(0,t.jsx)("span",{className:"stg:ml-1.5 stg:font-normal stg:text-muted-foreground",children:r})]}),s&&(0,t.jsx)("span",{className:"stg:block stg:text-[11px] stg:text-muted-foreground",children:s})]})}),n]})}function S({email:e,name:s}){return(0,t.jsxs)("span",{role:"cell",className:"stg:min-w-0",children:[(0,t.jsx)("span",{className:"stg:block stg:break-words stg:font-medium stg:text-foreground",children:e}),s&&(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-[11px] stg:text-muted-foreground",children:s})]})}function w({accountId:e,keyView:s,hasRoster:n,inviteLink:a,actions:o,onChanged:c}){let d=s.key;return d?(0,t.jsxs)("div",{role:"row",className:(0,r.cn)(k,"stg:border-t stg:border-border-muted stg:text-xs"),children:[(0,t.jsx)(S,{email:d.boundEmail}),(0,t.jsxs)("span",{role:"cell",className:"stg:min-w-0",children:[(0,t.jsx)(v.TruncatedText,{text:d.cursorKeyName||"unnamed key",className:"stg:block stg:text-muted-foreground"}),d.label&&(0,t.jsx)(v.TruncatedText,{text:d.label,className:"stg:block stg:text-[11px] stg:text-muted-foreground"})]}),(0,t.jsx)(A,{spend:s.spend}),(0,t.jsxs)("span",{role:"cell",className:"stg:flex stg:flex-wrap stg:items-center stg:gap-1",children:[s.usageGuardTripped&&(0,t.jsx)(i,{tone:"warn",label:"Usage guard"}),(0,t.jsx)(K,{keyView:s,hasRoster:n})]}),(0,t.jsxs)("span",{role:"cell",className:"stg:flex stg:items-center stg:justify-end stg:gap-2",children:[""!==a&&(0,t.jsx)(T,{inviteLink:a}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",disabled:o.isSubmitting,onClick:()=>{o.setKeyEnabled(e,d.keyId,!d.enabled).then(c,()=>{})},children:d.enabled?"Disable":"Enable"}),(0,t.jsx)(l.Button,{size:"sm",variant:"destructive",disabled:o.isSubmitting,onClick:()=>{o.removeKey({accountId:e,keyId:d.keyId}).then(c,()=>{})},children:"Remove"})]})]}):null}function I({memberView:e}){let s=e.member;return s?(0,t.jsxs)("div",{role:"row",className:(0,r.cn)(k,"stg:border-t stg:border-border-muted stg:text-xs"),children:[(0,t.jsx)(S,{email:s.email,name:s.name}),(0,t.jsx)("span",{role:"cell",className:"stg:text-muted-foreground",children:"—"}),(0,t.jsx)(A,{spend:e.spend}),(0,t.jsx)("span",{role:"cell",children:(0,t.jsx)(i,{tone:"muted",label:"No key"})}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:text-muted-foreground",children:"—"})]}):null}function A({spend:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?y(e.autoPercentUsed):"—"}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?y(e.apiPercentUsed):"—"}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?p(e.includedSpendUsdMicros):"—"}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?p(e.overageSpendUsdMicros):"—"})]})}function K({keyView:e,hasRoster:s}){return s?e.state===h.CursorMemberKeyState.member_key_owner_removed?(0,t.jsx)(i,{tone:"warn",label:"Left team"}):e.state===h.CursorMemberKeyState.member_key_owner_unknown?(0,t.jsx)(i,{tone:"muted",label:"Not on team"}):e.key?.enabled?(0,t.jsx)(i,{tone:"ok",label:"Active"}):(0,t.jsx)(i,{tone:"muted",label:"Disabled"}):(0,t.jsx)(i,{tone:"muted",label:"Awaiting sync"})}function T({inviteLink:e}){let{copy:s,copied:r}=(0,j.useCopyFeedback)();return(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:()=>void s(e),children:r?"Copied":"Copy invite"})}function E(e){return[...new Set(e.split(/\r?\n/).map(e=>e.trim()).filter(e=>""!==e))]}function _(e,t){return e.length>=8?`key ${t+1} (…${e.slice(-4)})`:`key ${t+1}`}function L({accountId:e,view:o,coverage:i,actions:c,onChanged:d,onImported:g}){let[m,h]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),[b,y]=(0,s.useState)(!1),[j,v]=(0,s.useState)(""),[k,C]=(0,s.useState)(!1),[S,w]=(0,s.useState)(null),[I,A]=(0,s.useState)(null),K=o.keyViews,T=i.unclassified.length>0||i.onTeamWithKey.length>0||i.onTeamWithoutKey.length>0||i.offTeamWithKey.length>0,P=E(j).length,U=async t=>{t.preventDefault();let s=E(j);if(0===s.length||k)return;C(!0),A(null);let r=new Set(K.map(e=>e.key?.keyId).filter(e=>!!e)),n=[],o=[];for(let[t,l]of s.entries()){w({done:t,total:s.length});try{let s=(await c.addKey({accountId:e,apiKey:l})).memberKeys.find(e=>!r.has(e.keyId));s&&r.add(s.keyId),n.push({keyPreview:_(l,t),ok:!0,message:s?.boundEmail?`added — bound to ${s.boundEmail}`:"added"})}catch(e){c.clearError(),o.push(l),n.push({keyPreview:_(l,t),ok:!1,message:(0,a.getUserMessage)((0,f.toError)(e))})}}w(null),A(n),v(o.join("\n")),C(!1),o.length<s.length&&g()};return(0,t.jsxs)("section",{className:"stg:space-y-2",children:[(0,t.jsx)("h4",{className:"stg:text-xs stg:font-semibold stg:text-foreground",children:"Team coverage"}),0===K.length&&(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:["No execution keys — this account is ",(0,t.jsx)("strong",{children:"not routable"}),". Add a member's user-scoped API key below."]}),T&&(0,t.jsx)(N,{accountId:e,coverage:i,inviteLink:o.account?.teamInviteLink??"",actions:c,onChanged:d}),c.error&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,a.getUserMessage)(c.error)}),(0,t.jsxs)("form",{className:"stg:flex stg:flex-wrap stg:items-end stg:gap-2",onSubmit:t=>{t.preventDefault(),""===m.trim()||c.isSubmitting||c.addKey({accountId:e,apiKey:m.trim(),label:x.trim()||void 0}).then(()=>{h(""),p(""),d()},()=>{})},children:[(0,t.jsxs)("label",{className:"stg:block stg:min-w-56 stg:flex-1 stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:"User-scoped API key"}),(0,t.jsx)("input",{className:u.INPUT_CLASSES,type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"the member's personal Cursor API key",disabled:c.isSubmitting,autoComplete:"off"})]}),(0,t.jsxs)("label",{className:"stg:block stg:min-w-40 stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:"Label (optional)"}),(0,t.jsx)("input",{className:u.INPUT_CLASSES,value:x,onChange:e=>p(e.target.value),placeholder:"e.g. zane — prod",disabled:c.isSubmitting})]}),(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:""===m.trim()||c.isSubmitting,children:c.isSubmitting?"Verifying…":"Add key"}),(0,t.jsx)(l.Button,{type:"button",size:"sm",variant:"outline",disabled:k,onClick:()=>{y(e=>!e),A(null)},children:b?"Hide import":"Import keys"})]}),b&&(0,t.jsxs)("form",{className:"stg:space-y-2 stg:rounded-md stg:border stg:border-border stg:bg-card stg:p-3",onSubmit:U,children:[(0,t.jsxs)("label",{className:"stg:block stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:"Bulk import — one user-scoped API key per line"}),(0,t.jsx)("textarea",{className:(0,r.cn)(u.INPUT_CLASSES,"stg:min-h-24 stg:font-mono"),value:j,onChange:e=>v(e.target.value),placeholder:"key_...\nkey_...\nkey_...",disabled:k,autoComplete:"off",spellCheck:!1})]}),(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:"Each key is verified against Cursor and bound to its owning team member, one at a time. Lines that fail stay in the box so you can fix and retry them. A roster sync runs automatically afterwards, so the coverage table reflects current team membership."}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:0===P||k,children:k&&S?`Importing ${S.done+1} of ${S.total}…`:P>0?`Import ${P} ${1===P?"key":"keys"}`:"Import keys"}),(0,t.jsx)(l.Button,{type:"button",size:"sm",variant:"outline",disabled:k,onClick:()=>{y(!1),v(""),A(null)},children:"Close"})]}),I&&(0,t.jsx)("ul",{role:"list","aria-label":"Import results",className:(0,r.cn)(n.UNSTYLED_LIST,"stg:space-y-0.5 stg:text-[11px]"),children:I.map(e=>(0,t.jsxs)("li",{className:e.ok?"stg:text-muted-foreground":"stg:text-destructive",children:[e.keyPreview,": ",e.message]},e.keyPreview))})]})]})}var P=e.i(586108),U=e.i(583093);function D(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null);return{upsert:(0,s.useCallback)(async t=>{r(!0),a(null);try{return await e.cursorAccounts.upsertAccount({account:t})}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}function $({className:e}){let[i,c]=(0,s.useState)({phase:"list"}),d=function(){let e=(0,P.useStigmer)(),t=(void 0)??!0,{data:s,isLoading:r,isRefetching:n,error:a,refetch:o}=(0,U.useFetch)(t?()=>e.cursorAccounts.listAccounts():null,[t,e],null);return{accounts:s,isLoading:r,isRefetching:n,error:a,refetch:o}}(),u=(0,s.useCallback)(()=>c({phase:"list"}),[]);if(d.isLoading)return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-2",e),"aria-busy":"true",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-40 stg:animate-pulse stg:rounded stg:bg-muted-subtle"}),Array.from({length:3},(e,s)=>(0,t.jsx)("div",{className:"stg:h-10 stg:animate-pulse stg:rounded-lg stg:bg-muted-subtle"},s))]});if(d.error)return(0,o.isPermissionDenied)(d.error)?(0,t.jsx)(m,{className:e}):(0,t.jsx)("p",{className:(0,r.cn)("stg:text-destructive stg:text-xs",e),role:"alert",children:(0,a.getUserMessage)(d.error)});if("create"===i.phase)return(0,t.jsx)(W,{className:e,onSaved:()=>{d.refetch(),u()},onCancel:u});if("detail"===i.phase)return(0,t.jsx)(M,{className:e,accountId:i.accountId,editing:i.editing,onEditingChange:e=>c({phase:"detail",accountId:i.accountId,editing:e}),onDeleted:()=>{d.refetch(),u()},onChanged:d.refetch,onBack:u});let g=d.accounts?.accounts??[],h=function(e){let t=0,s=0,r=0;for(let n of e)t+=n.routableKeyCount,r+=n.guardTrippedKeyCount,n.account?.enabled===!0&&n.enabledKeyCount>0&&0===n.routableKeyCount&&(s+=1);return{totalAccounts:e.length,totalRoutableKeys:t,drainedAccounts:s,guardTrippedKeys:r}}(g);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-3",e),children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"stg:text-sm stg:font-semibold stg:text-foreground",children:"Cursor accounts"}),g.length>0&&(0,t.jsxs)("p",{className:(0,r.cn)("stg:text-[11px]",0===h.totalRoutableKeys?"stg:text-destructive":"stg:text-muted-foreground"),role:0===h.totalRoutableKeys?"alert":void 0,children:[0===h.totalRoutableKeys?"No routable execution key anywhere - executions on API-pool models are failing":`${h.totalRoutableKeys} routable ${1===h.totalRoutableKeys?"key":"keys"} across ${h.totalAccounts} ${1===h.totalAccounts?"account":"accounts"}`,h.drainedAccounts>0?` \xb7 ${h.drainedAccounts} ${1===h.drainedAccounts?"account":"accounts"} drained`:"",h.guardTrippedKeys>0?` \xb7 ${h.guardTrippedKeys} ${1===h.guardTrippedKeys?"key":"keys"} usage-drained`:""]})]}),(0,t.jsx)(l.Button,{size:"sm",onClick:()=>c({phase:"create"}),children:"Add account"})]}),(0,t.jsxs)("div",{className:"stg:rounded-lg stg:border stg:border-border stg:bg-card",children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"stg:grid stg:grid-cols-[2fr_1fr_1fr_1fr_1fr] stg:gap-2 stg:border-b stg:border-border stg:px-3 stg:py-2 stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:[(0,t.jsx)("span",{children:"Account"}),(0,t.jsx)("span",{children:"Orgs"}),(0,t.jsx)("span",{children:"Status"}),(0,t.jsx)("span",{children:"Routable keys"}),(0,t.jsx)("span",{className:"stg:text-right",children:"Last synced"})]}),0===g.length?(0,t.jsx)("p",{className:"stg:px-3 stg:py-2 stg:text-xs stg:text-muted-foreground",children:"No Cursor accounts yet. Add one with its team Admin API key, then add member execution keys to make it routable."}):(0,t.jsx)("ul",{role:"list","aria-label":"Cursor accounts",className:n.UNSTYLED_LIST,children:g.map(e=>(0,t.jsx)(B,{summary:e,onOpen:()=>c({phase:"detail",accountId:e.account?.accountId??"",editing:!1})},e.account?.accountId))})]})]})}function B({summary:e,onOpen:s}){let n=e.account;return n?(0,t.jsx)("li",{className:"stg:border-b stg:border-border stg:last:border-b-0",children:(0,t.jsxs)("button",{type:"button",onClick:s,className:(0,r.cn)("stg:grid stg:w-full stg:grid-cols-[2fr_1fr_1fr_1fr_1fr] stg:items-center stg:gap-2 stg:px-3 stg:py-2 stg:text-left stg:text-xs","stg:transition-colors stg:hover:bg-accent","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring"),children:[(0,t.jsxs)("span",{className:"stg:min-w-0",children:[(0,t.jsx)("span",{className:"stg:block stg:truncate stg:font-medium stg:text-foreground",children:n.displayName}),0===n.orgIds.length&&(0,t.jsx)("span",{className:"stg:block stg:text-[11px] stg:text-muted-foreground",children:"shared pool"})]}),(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:n.orgIds.length>0?n.orgIds.length:"—"}),(0,t.jsx)("span",{children:(0,t.jsx)(i,{tone:n.enabled?"ok":"muted",label:n.enabled?"Enabled":"Disabled"})}),(0,t.jsx)("span",{children:e.routableKeyCount>0?(0,t.jsxs)("span",{className:"stg:text-muted-foreground",children:[e.routableKeyCount," of ",e.enabledKeyCount]}):e.guardTrippedKeyCount>0?(0,t.jsx)(i,{tone:"warn",label:"Drained"}):(0,t.jsx)(i,{tone:"warn",label:"Not routable"})}),(0,t.jsx)("span",{className:"stg:text-right stg:text-muted-foreground",children:b(e.lastSyncedAt)})]})}):null}function W({className:e,onSaved:s,onCancel:r}){let{upsert:n,isSubmitting:a,error:o}=D();return(0,t.jsx)("div",{className:e,children:(0,t.jsx)(g,{initial:null,isSubmitting:a,submitError:o,onSubmit:e=>{n(e).then(s,()=>{})},onCancel:r})})}function M({className:e,accountId:n,editing:o,onEditingChange:i,onDeleted:c,onChanged:d,onBack:u}){let m,x=function(e){let t=(0,P.useStigmer)(),{data:s,isLoading:r,isRefetching:n,error:a,refetch:o}=(0,U.useFetch)(e?()=>t.cursorAccounts.getAccountView(e):null,[e,t],null);return{view:s,isLoading:r,isRefetching:n,error:a,refetch:o}}(n),{upsert:p,isSubmitting:y,error:j,clearError:v}=D(),{remove:k,isSubmitting:N,error:C}=function(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null);return{remove:(0,s.useCallback)(async t=>{r(!0),a(null);try{return await e.cursorAccounts.deleteAccount(t)}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}(),{sync:S,isSyncing:w,error:I}=function(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null);return{sync:(0,s.useCallback)(async t=>{r(!0),a(null);try{return await e.cursorAccounts.syncAccount(t)}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[e.cursorAccounts]),isSyncing:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}(),A=function(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null),o=(0,s.useCallback)(async e=>{r(!0),a(null);try{return await e()}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[]),l=(0,s.useCallback)(t=>o(()=>e.cursorAccounts.addMemberKey(t)),[o,e.cursorAccounts]),i=(0,s.useCallback)(t=>o(()=>e.cursorAccounts.removeMemberKey(t)),[o,e.cursorAccounts]);return{addKey:l,removeKey:i,setKeyEnabled:(0,s.useCallback)((t,s,r)=>o(()=>e.cursorAccounts.setMemberKeyEnabled({accountId:t,keyId:s,enabled:r})),[o,e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}(),K=(0,s.useCallback)(()=>{x.refetch(),d()},[x.refetch,d]),T=(0,s.useCallback)(()=>{S(n).then(K,K)},[S,n,K]);if(x.isLoading)return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-2",e),"aria-busy":"true",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-40 stg:animate-pulse stg:rounded stg:bg-muted-subtle"}),(0,t.jsx)("div",{className:"stg:h-24 stg:animate-pulse stg:rounded-lg stg:bg-muted-subtle"})]});if(x.error||!x.view?.account)return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-2",e),children:[(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:x.error?(0,a.getUserMessage)(x.error):"Account not found."}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:u,children:"Back to accounts"})]});let E=x.view,_=E.account,$=(m=void 0!==E.snapshot)?{hasRoster:m,onTeamWithKey:E.keyViews.filter(e=>e.state===h.CursorMemberKeyState.member_key_active),onTeamWithoutKey:E.membersWithoutKeysViews,offTeamWithKey:E.keyViews.filter(e=>e.state!==h.CursorMemberKeyState.member_key_active),unclassified:[]}:{hasRoster:m,onTeamWithKey:[],onTeamWithoutKey:[],offTeamWithKey:[],unclassified:E.keyViews},B=$.onTeamWithKey.length+$.onTeamWithoutKey.length,W=(E.snapshot?.members.length??0)-B;return o?(0,t.jsx)("div",{className:e,children:(0,t.jsx)(g,{initial:_,isSubmitting:y,submitError:j,onSubmit:e=>{p(e).then(()=>{K(),i(!1)},()=>{})},onCancel:()=>{v(),i(!1)}})}):(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-4",e),children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"stg:text-sm stg:font-semibold stg:text-foreground",children:_.displayName}),(0,t.jsxs)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:[_.orgIds.length>0?`Dedicated to ${_.orgIds.length} org(s): ${_.orgIds.join(", ")}`:"Shared pool — serves every org with no dedicated account"," · ",_.enabled?"enabled":"disabled",_.onDemandUsageDisabled?" · on-demand usage off (usage guard active)":""," · synced ",b(E.snapshot?.syncedAt),$.hasRoster?` \xb7 ${B} ${1===B?"member":"members"}`:"",$.hasRoster&&W>0?` \xb7 ${W} removed ${1===W?"seat":"seats"}`:""]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:u,children:"Back"}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",disabled:w,onClick:()=>{S(n).then(K,()=>{})},children:w?"Syncing…":"Sync now"}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:()=>i(!0),children:"Edit"}),(0,t.jsx)(l.Button,{size:"sm",variant:"destructive",disabled:N,onClick:()=>{k({accountId:n}).then(c,()=>{})},children:N?"Deleting…":"Delete"})]})]}),I&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,a.getUserMessage)(I)}),C&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,a.getUserMessage)(C)}),E.snapshot?.syncError&&(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:["Last sync was partial: ",E.snapshot.syncError]}),(0,t.jsx)(L,{accountId:n,view:E,coverage:$,actions:A,onChanged:K,onImported:T})]})}e.s(["default",0,function(){return(0,t.jsx)($,{})}],424089)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,940069,e=>{"use strict";let t={agents:"stigmer:library:agents:scope",skills:"stigmer:library:skills:scope","mcp-servers":"stigmer:library:mcp-servers:scope",workflows:"stigmer:workflows:scope"};e.s(["readPersistedScope",0,function(e){return"all"===localStorage.getItem(t[e])?"all":"org"},"writePersistedScope",0,function(e,s){localStorage.setItem(t[e],s)}])},658653,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),i=e.i(468806),n=e.i(869803),l=e.i(846696),a=e.i(774079),o=e.i(901501),c=e.i(864652),g=e.i(586108),d=e.i(326283);let u=(0,s.lazy)(()=>e.A(573374).then(e=>({default:e.YamlEditor})));function m(){return(0,t.jsx)("div",{className:"stg:flex stg:h-56 stg:items-center stg:justify-center stg:rounded-md stg:border stg:border-border stg:bg-muted stg:text-sm stg:text-muted-foreground",children:"Loading editor…"})}function p({entry:e}){return(0,t.jsxs)("li",{className:"stg:rounded-md stg:border stg:border-border stg:bg-card stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:inline-flex stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:e.document.handler.displayName}),(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.document.name}),(0,t.jsx)(f,{entry:e}),(0,t.jsx)("span",{className:"stg:ml-auto stg:text-xs stg:text-muted-foreground",children:e.document.org})]}),e.document.warning&&(0,t.jsx)("p",{className:"stg:mt-1 stg:text-xs stg:text-muted-foreground",children:e.document.warning}),"failed"===e.status&&e.errorMessage&&(0,t.jsx)("p",{role:"alert",className:"stg:mt-1 stg:text-xs stg:text-destructive",children:e.errorMessage})]})}function f({entry:e}){let s=function(e){switch(e.status){case"applying":return"Applying…";case"applied":return"Applied";case"failed":return"Failed";case"skipped":return"Skipped";case"pending":switch(e.action){case"create":return"Will create";case"update":return"Will update";case"unknown":return"Create or update"}}}(e);return(0,t.jsx)("span",{className:(0,r.cn)("stg:inline-flex stg:rounded stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium","failed"===e.status?"stg:bg-card stg:text-destructive stg:border stg:border-destructive":"stg:bg-muted stg:text-muted-foreground"),children:s})}e.s(["ApplyManifestDialog",0,function({open:e,onOpenChange:f,org:x,onApplied:h}){var b;let y=(0,s.useRef)(null),v=function(e){let t=(0,g.useStigmer)(),[r,i]=(0,s.useState)(""),[n,l]=(0,s.useState)(null),[a,u]=(0,s.useState)(null),[m,p]=(0,s.useState)(!1),[f,x]=(0,s.useState)(!1),h=(0,s.useRef)(e);h.current=e;let b=(0,s.useCallback)(e=>{i(e)},[]),y=(0,s.useCallback)(async e=>{let t;try{t=await e.text()}catch{i(""),l(null),u(`Failed to read ${e.name}.`);return}i(t)},[]),v=(0,s.useCallback)(()=>{i(""),l(null),u(null),p(!1),x(!1)},[]),w=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(f)return;let e=++w.current;if(!r.trim()){l(null),u(null),p(!1);return}p(!0);let s=setTimeout(async()=>{let s;try{s=(0,c.parseManifest)(r,{org:h.current})}catch(t){w.current===e&&(l(null),u((0,d.toError)(t).message),p(!1));return}let i=await Promise.all(s.map(async e=>{let s;try{let r=await t.manifest.getByReference(e.handler.yamlKind,e.org,e.slug);s=null!==r?"update":"create"}catch{s="unknown"}return{document:e,action:s,status:"pending"}}));w.current===e&&(l(i),u(null),p(!1))},500);return()=>clearTimeout(s)},[r,t,f]);let j=(0,s.useCallback)(async()=>{if(!n||0===n.length)return[];w.current++,x(!0);let e=n.map(e=>({...e,status:"pending"})),s=()=>l([...e]),r=!1;for(let i=0;i<e.length;i++){if(r){e[i]={...e[i],status:"skipped"};continue}e[i]={...e[i],status:"applying"},s();try{let s=await t.manifest.apply(e[i].document);e[i]={...e[i],status:"applied",result:s}}catch(t){e[i]={...e[i],status:"failed",errorMessage:(0,d.toError)(t).message},r=!0}s()}return s(),x(!1),e},[n,t]),k=(0,s.useMemo)(()=>(0,o.containsRedactedSecrets)(r),[r]);return(0,s.useMemo)(()=>({content:r,setContent:b,readFile:y,entries:n,validationError:a,isValidating:m,hasRedactedSecrets:k,applyAll:j,isApplying:f,reset:v}),[r,b,y,n,a,m,k,j,f,v])}(x),{reset:w}=v;(0,s.useEffect)(()=>{e&&(w(),y.current&&(y.current.value=""))},[e,w]);let j=(0,s.useCallback)(()=>{f(!1);let e=(v.entries??[]).filter(e=>"applied"===e.status);e.length>0&&h?.(e)},[f,v.entries,h]),k=(0,s.useCallback)(e=>{e||j()},[j]),N=(0,s.useCallback)(e=>{let t=e.target.files?.[0];t&&v.readFile(t)},[v]),C=(0,s.useCallback)(async()=>{let e=await v.applyAll(),t=e.filter(e=>"applied"===e.status);e.length>0&&t.length===e.length&&(l.toast.success(1===t.length?"Resource applied":`${t.length} resources applied`),f(!1),h?.(t))},[v,f,h]),A=null!==v.entries&&v.entries.length>0&&!v.isValidating&&!v.isApplying;return(0,t.jsx)(i.DialogShell,{open:e,onOpenChange:k,width:"3xl","aria-label":"Apply YAML",children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4 stg:p-6",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)("h3",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Apply YAML"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"Paste a resource manifest or upload a file. Resources are created when new and updated when they already exist."})]}),(0,t.jsx)("input",{ref:y,type:"file",accept:".yaml,.yml,.json",onChange:N,className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-3 stg:py-2 stg:text-sm stg:text-foreground","stg:file:mr-3 stg:file:rounded-md stg:file:border-0 stg:file:bg-primary stg:file:px-2.5 stg:file:py-1 stg:file:text-xs stg:file:font-medium stg:file:text-primary-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),"aria-label":"Select manifest file"}),(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(m,{}),children:(0,t.jsx)(u,{value:v.content,onChange:v.setContent,className:"stg:h-56"})}),v.hasRedactedSecrets&&(0,t.jsx)(a.RedactedSecretsNotice,{}),v.validationError&&(0,t.jsx)("div",{role:"alert",className:"stg:rounded-md stg:border stg:border-destructive stg:bg-card stg:px-3 stg:py-2.5 stg:text-sm stg:text-destructive",children:v.validationError}),v.entries&&v.entries.length>0&&(0,t.jsx)("ul",{className:(0,r.cn)(n.UNSTYLED_LIST,"stg:flex stg:max-h-48 stg:flex-col stg:gap-2 stg:overflow-y-auto"),"aria-label":"Resources to apply",children:v.entries.map((e,s)=>(0,t.jsx)(p,{entry:e},`${e.document.handler.yamlKind}/${e.document.org}/${e.document.slug}/${s}`))}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground","aria-live":"polite",children:v.isValidating?"Validating…":""}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:j,disabled:v.isApplying,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:border stg:border-input stg:bg-background stg:text-foreground","stg:hover:bg-accent stg:hover:text-accent-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:C,disabled:!A,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:v.isApplying?"Applying…":(b=v.entries?.length??0)<=1?"Apply":`Apply ${b} resources`})]})]})]})})}],658653)},569074,e=>{"use strict";let t=(0,e.i(475254).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],569074)},566338,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(522016);let i=(0,e.i(475254).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);var n=e.i(541071),l=e.i(174886),a=e.i(778917),o=e.i(727612),c=e.i(107233),g=e.i(569074),d=e.i(451241),u=e.i(940069),m=e.i(610008),p=e.i(845132),f=e.i(658653),x=e.i(586108),h=e.i(297629),b=e.i(966205),y=e.i(10337),v=e.i(846696);let w=[{id:"name",header:"Name",cell:e=>(0,t.jsx)("span",{className:"font-medium text-foreground",children:e.name||e.slug}),sortable:!0,flex:2},{id:"org",header:"Organization",cell:e=>(0,t.jsx)("span",{className:"text-muted-foreground",children:e.org}),flex:1},{id:"description",header:"Description",cell:e=>(0,t.jsx)("span",{className:"line-clamp-1 text-muted-foreground",children:e.description||"—"}),flex:3}];e.s(["WorkflowListPage",0,function(){let e=(0,h.useActiveOrgSlug)(),j=(0,x.useStigmer)(),{navigateToDetail:k}=(0,d.useLibraryNavigation)(),{confirmState:N,confirm:C,handleConfirm:A,handleCancel:S}=(0,b.useConfirmAction)(),[M,T]=(0,s.useState)(()=>(0,u.readPersistedScope)("workflows")),[P,R]=(0,s.useState)(!1),[$,z]=(0,s.useReducer)(e=>e+1,0),D="/library/workflows/new",L=(0,s.useCallback)(async e=>{if(await C({title:`Delete ${e.name||e.slug}?`,description:"This permanently removes the workflow and all of its instances. Past executions are preserved in the execution history. This action cannot be undone.",confirmLabel:"Delete",variant:"destructive"}))try{await j.workflow.delete(e.id),v.toast.success(`${e.name||e.slug} deleted`),z()}catch{v.toast.error("Failed to delete workflow")}},[C,j]),E=(0,s.useCallback)(e=>{T(e),(0,u.writePersistedScope)("workflows",e)},[]),I=(0,s.useMemo)(()=>e=>j.workflow.list(e),[j]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground",children:"Workflows"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage multi-step orchestration workflows."})]}),(0,t.jsx)(m.ResourceWorkbench,{refetchToken:$,listFn:I,org:e,columns:w,scope:M,onScopeChange:E,defaultViewMode:"cards",viewModes:["table","cards"],viewModeStorageKey:"stigmer:workbench:workflows:viewMode",searchPlaceholder:"Search workflows…",emptyIcon:(0,t.jsx)(i,{className:"size-10","aria-hidden":"true"}),emptyTitle:"No workflows yet",emptyDescription:"Workflows define multi-step orchestration for agents. Create one to get started.",headerAction:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("button",{type:"button",onClick:()=>R(!0),"aria-label":"Apply YAML",className:"inline-flex items-center justify-center rounded-md border border-input bg-background p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(g.Upload,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsxs)(r.default,{href:D,className:"inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(c.Plus,{className:"size-3.5","aria-hidden":"true"}),"Create workflow"]})]}),emptyAction:(0,t.jsxs)(r.default,{href:D,className:"inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(c.Plus,{className:"size-3.5","aria-hidden":"true"}),"Create workflow"]}),onItemClick:e=>k("workflows",e.org,e.slug),renderItemAction:e=>(0,t.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,t.jsxs)(p.ActionMenu,{children:[(0,t.jsx)(p.ActionMenu.Trigger,{"aria-label":`Actions for ${e.name||e.slug}`,children:(0,t.jsx)(n.MoreHorizontal,{className:"size-4"})}),(0,t.jsxs)(p.ActionMenu.Content,{children:[(0,t.jsx)(p.ActionMenu.Item,{icon:(0,t.jsx)(a.ExternalLink,{className:"size-4"}),onSelect:()=>k("workflows",e.org,e.slug),children:"View details"}),(0,t.jsx)(p.ActionMenu.Item,{icon:(0,t.jsx)(l.Copy,{className:"size-4"}),onSelect:()=>{navigator.clipboard.writeText(`${e.org}/${e.slug}`),v.toast.success("Copied workflow reference")},children:"Copy reference"}),(0,t.jsx)(p.ActionMenu.Separator,{}),(0,t.jsx)(p.ActionMenu.Item,{icon:(0,t.jsx)(o.Trash2,{className:"size-4"}),variant:"destructive",onSelect:()=>L(e),children:"Delete"})]})]})}),"aria-label":"Workflow workbench"}),(0,t.jsx)(f.ApplyManifestDialog,{open:P,onOpenChange:R,org:e??"",onApplied:z}),(0,t.jsx)(y.ConfirmDialog,{state:N,onConfirm:A,onCancel:S})]})}],566338)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10284,e=>{"use strict";var t=e.i(843476),s=e.i(271645),n=e.i(981997),a=e.i(893976),r=e.i(12556),i=e.i(730938),l=e.i(543727),o=e.i(815907),d=e.i(311015),g=e.i(582458),g=g,c=e.i(610595),u=e.i(65642);function m({conversation:e,participation:s,supportsStaffReplies:n=!0,className:i}){if(!e.needsAttention)return null;let{takeOver:l,clearAttention:o,pendingCommands:d,commandErrors:h}=s,x=h.get("clearAttention")??h.get("takeOver"),p=e.control===r.ConversationControl.control_human;return(0,t.jsxs)("div",{className:(0,a.cn)("stg:border-b stg:border-border stg:bg-destructive-subtle stg:px-4 stg:py-2",i),role:"status",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2",children:[(0,t.jsxs)("p",{className:"stg:flex stg:min-w-0 stg:items-start stg:gap-1.5 stg:text-sm stg:text-destructive",children:[(0,t.jsx)(g.default,{"aria-hidden":"true",className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,t.jsxs)("span",{className:"stg:min-w-0 stg:break-words",children:["The agent asked for a human",e.attentionReason?(0,t.jsxs)(t.Fragment,{children:[" — “",e.attentionReason,"”"]}):"."]})]}),(0,t.jsxs)("div",{className:"stg:ml-auto stg:flex stg:shrink-0 stg:items-center stg:gap-2",children:[(0,t.jsx)(u.Button,{variant:"outline",size:"xs",onClick:()=>void o().catch(()=>{}),disabled:d.has("clearAttention"),children:d.has("clearAttention")?"Dismissing…":"Dismiss"}),!p&&n&&(0,t.jsx)(u.Button,{variant:"primary",size:"xs",onClick:()=>void l().catch(()=>{}),disabled:d.has("takeOver"),children:d.has("takeOver")?"Taking over…":"Take over"})]})]}),x&&(0,t.jsx)("p",{className:"stg:mt-1 stg:text-xs stg:text-destructive",children:(0,c.getUserMessage)(x)})]})}var h=e.i(385663),x=e.i(475254);let p=(0,x.default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var g=g,f=e.i(379410),v=e.i(973621);function b({onSend:e,isSending:n,onOpenTemplatePicker:r,disabledReason:l,advisory:o,className:d}){let m=(0,s.useId)(),x=null!=o&&""!==o,[j,y]=(0,s.useState)(null),C=(0,v.useComposer)({onSubmit:t=>{y(null),e({kind:"text",body:t}).then(e=>{e.outcome===i.ChannelSendOutcome.refused?(C.setMessage(t),y({kind:"refused",text:e.detail||"The provider refused this message."})):e.outcome===i.ChannelSendOutcome.queued&&y({kind:"queued",text:"Delivery hit a transient issue — the platform is retrying in the background."})},e=>{C.setMessage(t),y({kind:"error",text:(0,c.getUserMessage)(e)})})},disabled:null!==l||n});return null!==l?(0,t.jsx)("div",{className:(0,a.cn)("stg:border-t stg:border-border stg:px-4 stg:py-3",d),children:(0,t.jsx)("p",{className:"stg:text-center stg:text-xs stg:text-muted-foreground",children:l})}):(0,t.jsxs)("div",{className:(0,a.cn)("stg:border-t stg:border-border stg:px-4 stg:py-3",d),children:[x&&(0,t.jsxs)("p",{id:m,className:"stg:mb-2 stg:flex stg:items-start stg:gap-1.5 stg:rounded-md stg:bg-status-degraded-subtle stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-status-degraded",children:[(0,t.jsx)(g.default,{"aria-hidden":"true",className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0"}),(0,t.jsx)("span",{className:"stg:min-w-0",children:o})]}),j&&(0,t.jsx)("p",{className:(0,a.cn)("stg:mb-2 stg:text-xs","queued"===j.kind?"stg:text-muted-foreground":"stg:text-destructive"),role:"status",children:j.text}),(0,t.jsxs)("div",{className:"stg:flex stg:items-end stg:gap-2",children:[(0,t.jsx)("textarea",{...C.textareaProps,rows:1,placeholder:"Reply as your business…","aria-label":"Reply to the customer","aria-describedby":x?m:void 0,className:(0,a.cn)("stg:min-h-9 stg:flex-1 stg:resize-none stg:rounded-md stg:border stg:border-border stg:bg-background","stg:px-3 stg:py-2 stg:text-sm stg:text-foreground stg:placeholder:text-muted-foreground-faint","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring")}),r&&(0,t.jsx)(u.Button,{variant:"outline",size:"sm",onClick:r,disabled:n,"aria-label":"Send a template reply",children:(0,t.jsx)(h.LayoutTemplate,{"aria-hidden":"true",className:"stg:size-4"})}),(0,t.jsxs)(u.Button,{variant:"primary",size:"sm",onClick:C.submit,disabled:!C.canSubmit||n,"aria-label":"Send reply",children:[n?(0,t.jsx)(f.SpinnerIcon,{}):(0,t.jsx)(p,{"aria-hidden":"true",className:"stg:size-4"}),n?"Sending…":"Send"]})]})]})}var j=e.i(531245),y=e.i(284614);function C({conversation:e,participation:n,unansweredCustomer:i,supportsStaffReplies:l,currentIdentityAccountId:o,className:d}){let[g,m]=(0,s.useState)(!1),h=e.control===r.ConversationControl.control_human,x=h&&void 0!==o&&e.controlledBy===o,{takeOver:p,handBack:f,pendingCommands:v,commandErrors:b}=n,N=b.get("takeOver")??b.get("handBack");return(0,t.jsxs)("div",{className:(0,a.cn)("stg:border-b stg:border-border stg:px-4 stg:py-2",h?"stg:bg-primary-subtle":"stg:bg-muted-faint",d),children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2",children:[(0,t.jsx)("p",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-sm stg:text-foreground",children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.User,{"aria-hidden":"true",className:"stg:size-4 stg:text-muted-foreground"}),x?"You have this conversation — the agent is quiet until you hand it back.":void 0!==o?"A teammate has this conversation — the agent is quiet until handback.":"This conversation is with a human — the agent is quiet until handback."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.Bot,{"aria-hidden":"true",className:"stg:size-4 stg:text-muted-foreground"}),"The agent is serving this conversation."]})}),g?(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:text-destructive",children:"The customer's last message has no reply — the agent stays quiet until they write again."}),(0,t.jsx)(u.Button,{variant:"outline",size:"xs",onClick:()=>{m(!1),f().catch(()=>{})},disabled:v.has("handBack"),children:"Hand back anyway"}),(0,t.jsx)(u.Button,{variant:"primary",size:"xs",onClick:()=>m(!1),children:"Keep the conversation"})]}):h?(0,t.jsx)(u.Button,{variant:"outline",size:"xs",onClick:()=>{i?m(!0):f().catch(()=>{})},disabled:v.has("handBack"),children:v.has("handBack")?"Handing back…":"Hand back to agent"}):(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[!l&&(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:"This channel's provider has no staff send lane yet — a takeover would silence the agent with no way to reply."}),(0,t.jsx)(u.Button,{variant:"outline",size:"xs",onClick:()=>void p().catch(()=>{}),disabled:!l||v.has("takeOver"),children:v.has("takeOver")?"Taking over…":"Take over"})]})]}),N&&(0,t.jsx)("p",{className:"stg:mt-1 stg:text-xs stg:text-destructive",children:(0,c.getUserMessage)(N)})]})}var N=e.i(17616),w=e.i(686311),g=g,k=e.i(869803),S=e.i(361353),I=e.i(188482),T=e.i(913668),M=e.i(215133);function L(e){switch(e.author){case r.ConversationItemAuthor.author_customer:return"customer";case r.ConversationItemAuthor.author_agent:return"agent";case r.ConversationItemAuthor.author_teammate:return"teammate";case r.ConversationItemAuthor.author_platform:return"platform";default:return"unknown"}}function _(e){switch(e.deliveryStatus){case T.ChannelDeliveryStatus.pending:return"pending";case T.ChannelDeliveryStatus.delivering:return"delivering";case T.ChannelDeliveryStatus.delivered:return"delivered";case T.ChannelDeliveryStatus.failed:return"failed";case T.ChannelDeliveryStatus.suppressed:return"suppressed";default:return null}}function A(e){switch(e.receiptState){case M.ChannelReceiptState.receipt_sent:return"sent";case M.ChannelReceiptState.receipt_delivered:return"delivered";case M.ChannelReceiptState.receipt_read:return"read";case M.ChannelReceiptState.receipt_failed:return"failed";default:return null}}function z(e,t){return""!==e.displayName?e.displayName:"slack"===t?"Slack thread":e.conversationKey}function R(e,t){return"whatsapp"!==t||""===e.displayName?null:e.conversationKey}function D(e,t){var s,n;let a,r,i=(s=t.at,n=e.at,a=s?.seconds??O,a!==(r=n?.seconds??O)?a<r?-1:1:(s?.nanos??0)-(n?.nanos??0));return 0!==i?i:e.itemId<t.itemId?1:e.itemId>t.itemId?-1:0}let O=BigInt(0);function E({conversations:e,isLoading:n,error:i,hasMore:o,loadMore:g,isLoadingMore:m,channels:h,channelFilter:x,onChannelFilterChange:p,filter:f=r.ChannelConversationListFilter.channel_conversation_list_filter_unspecified,onFilterChange:v,selected:b,onSelect:j,now:y,className:C}){let N=(0,s.useId)(),S=new Map(h.map(e=>[e.metadata?.id??"",(0,l.channelProviderOf)(e.spec?.providerConfig?.case)]));return(0,t.jsxs)("div",{"aria-label":"Conversation list",className:(0,a.cn)("stg:flex stg:min-h-0 stg:flex-col",C),children:[(void 0!==v||h.length>1)&&(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2 stg:border-b stg:border-border stg:px-3 stg:py-2",children:[void 0!==v&&(0,t.jsx)(F,{value:f,onChange:v}),h.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("label",{className:"stg:sr-only",htmlFor:N,children:"Filter by channel"}),(0,t.jsxs)("select",{id:N,value:x,onChange:e=>p(e.target.value),className:(0,a.cn)("stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background stg:px-2 stg:py-1.5","stg:text-sm stg:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[(0,t.jsx)("option",{value:"",children:"All channels"}),h.map(e=>(0,t.jsx)("option",{value:e.metadata?.id,children:e.metadata?.name||e.metadata?.slug},e.metadata?.id))]})]})]}),(0,t.jsx)("div",{className:"stg:min-h-0 stg:flex-1 stg:overflow-y-auto stg:p-2",children:n?(0,t.jsx)(U,{}):i?(0,t.jsx)("p",{className:"stg:px-2 stg:py-6 stg:text-center stg:text-sm stg:text-destructive",children:(0,c.getUserMessage)(i)}):0===e.length?0===h.length?(0,t.jsx)(d.EmptyState,{variant:"first-use",icon:(0,t.jsx)(w.MessageSquare,{className:"stg:size-8"}),title:"No channels to watch",description:"Conversations arrive through an agent's channels. Connect a channel — or ask a channel owner for access — and customer conversations appear here."}):f===r.ChannelConversationListFilter.filter_wants_human?(0,t.jsx)(d.EmptyState,{variant:"first-use",icon:(0,t.jsx)(w.MessageSquare,{className:"stg:size-8"}),title:"Nothing needs a human right now",description:"Conversations appear here when the agent asks for attention, or when a human-held conversation has a customer message awaiting a reply."}):(0,t.jsx)(d.EmptyState,{variant:"first-use",icon:(0,t.jsx)(w.MessageSquare,{className:"stg:size-8"}),title:"No conversations yet",description:"When a customer messages one of your channels, their conversation appears here."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.TooltipProvider,{children:(0,t.jsx)("ul",{className:(0,a.cn)(k.UNSTYLED_LIST,"stg:space-y-0.5"),children:e.map(e=>(0,t.jsx)($,{conversation:e,label:z(e,S.get(e.agentChannelId)?.id??null),contact:R(e,S.get(e.agentChannelId)?.id??null),isSelected:b?.agentChannelId===e.agentChannelId&&b?.conversationKey===e.conversationKey,onSelect:j,now:y},`${e.agentChannelId}:${e.conversationKey}`))})}),o&&(0,t.jsx)("div",{className:"stg:flex stg:justify-center stg:py-2",children:(0,t.jsx)(u.Button,{variant:"ghost",size:"xs",onClick:g,disabled:m,children:m?"Loading…":"Show more"})})]})})]})}let K=[{value:r.ChannelConversationListFilter.channel_conversation_list_filter_unspecified,label:"All",ariaLabel:"All conversations"},{value:r.ChannelConversationListFilter.filter_wants_human,label:"Needs human",ariaLabel:"Conversations where a human action is wanted"}];function F({value:e,onChange:n}){let r=(0,s.useRef)([]),i=(0,s.useCallback)(t=>{t!==e&&n(t)},[e,n]),l=(0,s.useCallback)((e,t)=>{let s=null;"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),s=(t+1)%K.length):("ArrowLeft"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),s=(t-1+K.length)%K.length),null!==s&&(r.current[s]?.focus(),i(K[s].value))},[i]);return(0,t.jsx)("div",{role:"radiogroup","aria-label":"Conversation filter",className:"stg:inline-flex stg:self-start stg:rounded-md stg:bg-muted stg:p-0.5",children:K.map((s,n)=>{let o=e===s.value;return(0,t.jsx)("button",{ref:e=>{r.current[n]=e},type:"button",role:"radio","aria-checked":o,"aria-label":s.ariaLabel,tabIndex:o?0:-1,onClick:()=>i(s.value),onKeyDown:e=>l(e,n),className:(0,a.cn)("stg:inline-flex stg:cursor-pointer stg:items-center stg:rounded-sm stg:px-2 stg:py-1 stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",o?"stg:bg-background stg:text-foreground stg:shadow-sm":"stg:text-muted-foreground stg:hover:text-foreground"),children:s.label},s.value)})})}let B={strong:"Customer awaiting reply — a human has this conversation; the agent will not answer",muted:"Customer awaiting reply — the agent has this conversation"},$=(0,s.memo)(function({conversation:e,label:s,contact:n,isSelected:i,onSelect:l,now:o}){let d=e.control===r.ConversationControl.control_human,c=e.awaitingReply?e.control===r.ConversationControl.control_human?"strong":"muted":null,u=e.lastActivityAt?(0,N.timestampDate)(e.lastActivityAt):null;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",onClick:()=>l(e),"aria-current":i?"true":void 0,className:(0,a.cn)("stg:flex stg:w-full stg:items-center stg:gap-2.5 stg:rounded-md stg:px-2.5 stg:py-2 stg:text-left","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",i?"stg:bg-primary-subtle":"stg:hover:bg-accent"),children:[(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("p",{className:"stg:truncate stg:text-sm stg:font-medium stg:text-foreground",children:s}),e.needsAttention&&(0,t.jsxs)(I.Tooltip,{children:[(0,t.jsxs)(I.TooltipTrigger,{render:(0,t.jsx)("span",{className:"stg:shrink-0"}),children:[(0,t.jsx)(g.default,{"aria-hidden":"true",className:"stg:size-3.5 stg:text-destructive"}),(0,t.jsx)("span",{className:"stg:sr-only",children:e.attentionReason?`Needs attention: ${e.attentionReason}`:"Needs attention"})]}),(0,t.jsx)(I.TooltipContent,{side:"top",children:e.attentionReason||"Needs attention"})]})]}),null!==n&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:truncate stg:text-xs stg:text-muted-foreground-faint",children:n}),d&&(0,t.jsxs)("p",{className:"stg:mt-0.5 stg:flex stg:items-center stg:gap-1 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsx)(y.User,{"aria-hidden":"true",className:"stg:size-3"}),"Human has the conversation"]})]}),(null!==u||null!==c)&&(0,t.jsxs)("span",{className:"stg:flex stg:shrink-0 stg:flex-col stg:items-end stg:gap-1",children:[u&&(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground-faint",children:(0,S.formatRelativeTime)(u,o)}),c&&(0,t.jsxs)(I.Tooltip,{children:[(0,t.jsxs)(I.TooltipTrigger,{render:(0,t.jsx)("span",{className:"stg:flex"}),children:[(0,t.jsx)("span",{"aria-hidden":"true",className:(0,a.cn)("stg:size-2 stg:rounded-full","strong"===c?"stg:bg-primary":"stg:border-2 stg:border-muted-foreground")}),(0,t.jsx)("span",{className:"stg:sr-only",children:B[c]})]}),(0,t.jsx)(I.TooltipContent,{side:"top",children:B[c]})]})]})]})})});function U(){return(0,t.jsx)("div",{className:"stg:space-y-1 stg:p-1","aria-hidden":"true",children:[1,2,3,4].map(e=>(0,t.jsx)("div",{className:"stg:h-11 stg:animate-pulse stg:rounded-md stg:bg-muted-faint"},e))})}var P=e.i(766354),q=e.i(37727),V=e.i(468806),H=e.i(364802),Y=e.i(928240),G=e.i(182990);function W({open:e,onOpenChange:n,channelSlug:a,org:r,onSend:i,isSending:l,modal:o=!0}){let d=(0,s.useId)();return(0,t.jsx)(V.DialogShell,{open:e,onOpenChange:n,modal:o,width:"2xl","aria-labelledby":d,children:e&&(0,t.jsx)(J,{titleId:d,channelSlug:a,org:r,onSend:i,isSending:l,onClose:()=>n(!1)})})}function J({titleId:e,channelSlug:n,org:a,onSend:r,isSending:i,onClose:l}){let{templates:o,isLoading:d,error:g}=(0,G.useChannelTemplateList)(n,a,{approvedOnly:!0}),[c,m]=(0,s.useState)(null);return(0,t.jsxs)("div",{className:"stg:flex stg:max-h-[75vh] stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-3 stg:border-b stg:border-border stg:px-5 stg:py-4",children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[null!==c&&(0,t.jsx)(u.Button,{variant:"ghost",size:"xs",onClick:()=>m(null),disabled:i,"aria-label":"Back to the template list",children:(0,t.jsx)(P.ArrowLeft,{className:"stg:size-4"})}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("h2",{id:e,className:"stg:text-sm stg:font-semibold stg:text-popover-foreground",children:null===c?"Send a template":c.name}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:null===c?"Approved templates deliver even after the 24-hour reply window closes.":"Fill the template's variables — the preview is the exact message the customer receives."})]})]}),(0,t.jsx)(u.Button,{variant:"ghost",size:"xs",onClick:l,"aria-label":"Close template picker",children:(0,t.jsx)(q.X,{className:"stg:size-4"})})]}),(0,t.jsx)("div",{className:"stg:min-h-0 stg:flex-1 stg:overflow-y-auto stg:p-4",children:null===c?(0,t.jsx)(X,{templates:o,isLoading:d,error:g,onChoose:m}):(0,t.jsx)(Z,{template:c,onSend:r,isSending:i,onClose:l})})]})}function X({templates:e,isLoading:s,error:n,onChoose:r}){return s?(0,t.jsx)("div",{className:"stg:space-y-2 stg:p-1",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:"stg:h-16 stg:animate-pulse stg:rounded-lg stg:bg-muted-faint"},e))}):n?(0,t.jsx)("p",{className:"stg:px-2 stg:py-6 stg:text-center stg:text-sm stg:text-destructive",children:(0,c.getUserMessage)(n)}):0===e.length?(0,t.jsx)(d.EmptyState,{variant:"first-use",icon:(0,t.jsx)(h.LayoutTemplate,{className:"stg:size-8"}),title:"No approved templates found",description:"Templates are authored and approved in WhatsApp Manager — Stigmer keeps no copy. Approved templates appear here automatically; the channel card's Templates dialog shows every status, including pending and rejected ones."}):(0,t.jsx)("ul",{className:(0,a.cn)(k.UNSTYLED_LIST,"stg:space-y-2"),children:e.map(e=>{let s=e.unsupportedReason?`Not sendable: ${e.unsupportedReason}`:"IMAGE"===e.headerFormat?"Not sendable from the console yet: this template's image header needs a hosted image at send time.":null;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",onClick:()=>r(e),disabled:null!==s,className:(0,a.cn)("stg:w-full stg:rounded-lg stg:border stg:border-border stg:p-3 stg:text-left","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",null===s?"stg:hover:border-ring stg:hover:bg-muted-faint":"stg:opacity-60"),children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:flex-wrap stg:items-center stg:gap-x-2 stg:gap-y-1",children:[(0,t.jsx)(H.TruncatedText,{text:e.name,className:"stg:text-sm stg:font-medium stg:text-foreground"}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-xs stg:text-muted-foreground",children:e.language}),e.headerFormat&&(0,t.jsxs)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted-subtle stg:px-1.5 stg:py-0.5 stg:text-xs stg:text-muted-foreground",children:[e.headerFormat," header"]})]}),e.bodyText&&(0,t.jsx)("p",{className:"stg:mt-1.5 stg:line-clamp-2 stg:whitespace-pre-wrap stg:text-xs stg:leading-relaxed stg:text-muted-foreground",children:e.bodyText}),null!==s&&(0,t.jsx)("p",{className:"stg:mt-1.5 stg:text-xs stg:text-warning",children:s})]})},`${e.name}\u0000${e.language}`)})})}function Z({template:e,onSend:n,isSending:r,onClose:l}){let o=(0,s.useId)(),[d,g]=(0,s.useState)({}),[m,h]=(0,s.useState)(null),x=(0,s.useMemo)(()=>(0,Y.splitTemplateBody)(e.bodyText),[e.bodyText]),v=e.parameterNames,b=v.every(e=>""!==(d[e]??"").trim());return(0,t.jsxs)("div",{className:"stg:space-y-4",children:[m&&(0,t.jsx)("p",{className:"stg:text-xs stg:text-destructive",role:"status",children:m.text}),v.length>0&&(0,t.jsx)("div",{className:"stg:space-y-3",children:v.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:`${o}-${e}`,className:"stg:mb-1 stg:block stg:text-xs stg:font-medium stg:text-foreground",children:e}),(0,t.jsx)("input",{id:`${o}-${e}`,type:"text",value:d[e]??"",onChange:t=>g(s=>({...s,[e]:t.target.value})),disabled:r,className:(0,a.cn)("stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background","stg:px-3 stg:py-2 stg:text-sm stg:text-foreground stg:placeholder:text-muted-foreground-faint","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring")})]},e))}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"stg:mb-1 stg:text-xs stg:font-medium stg:text-foreground",children:"Preview"}),(0,t.jsx)("p",{className:"stg:whitespace-pre-wrap stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:p-3 stg:text-sm stg:leading-relaxed stg:text-foreground",children:x.map((e,s)=>{if("text"===e.kind)return(0,t.jsx)("span",{children:e.value},s);let n=(d[e.value.replace(/^\{\{\s*|\s*\}\}$/g,"")]??"").trim();return""!==n?(0,t.jsx)("span",{children:n},s):(0,t.jsx)("code",{className:"stg:rounded stg:bg-muted-subtle stg:px-1 stg:font-mono stg:text-muted-foreground",children:e.value},s)})})]}),(0,t.jsx)("div",{className:"stg:flex stg:justify-end",children:(0,t.jsxs)(u.Button,{variant:"primary",size:"sm",onClick:()=>{h(null);let t=Object.fromEntries(v.map(e=>[e,(d[e]??"").trim()]));n({kind:"template",name:e.name,language:e.language,parameters:t}).then(e=>{e.outcome===i.ChannelSendOutcome.refused?h({kind:"refused",text:e.detail||"The provider refused this template."}):l()},e=>{h({kind:"error",text:(0,c.getUserMessage)(e)})})},disabled:!b||r,"aria-label":"Send template",children:[r?(0,t.jsx)(f.SpinnerIcon,{}):(0,t.jsx)(p,{"aria-hidden":"true",className:"stg:size-4"}),r?"Sending…":"Send template"]})})]})}let Q=(0,x.default)("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]);var ee=e.i(678745),ee=ee;let et=(0,x.default)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),es=(0,x.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]),en=(0,x.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var g=g,ea=e.i(901982),er=e.i(106909),ei=e.i(891287),el=e.i(255928),eo=e.i(711364),ed=e.i(933221),eg=e.i(326283),ec=e.i(586108),eu=e.i(583093);let em={url:null};function eh({media:e,address:s,className:n}){return e.contentType.startsWith("image/")?(0,t.jsx)(ep,{media:e,address:s,className:n}):(0,t.jsx)(ef,{media:e,address:s,className:n})}function ex(e){return e.filename||"attachment"}function ep({media:e,address:n,className:i}){let{url:l,error:o}=function(e,t,n){let a=(0,ec.useStigmer)(),i=((void 0)??!0)&&""!==e&&""!==t&&""!==n,{data:l,isLoading:o,isRefetching:d,error:g,refetch:c}=(0,eu.useFetch)(i?()=>a.agentChannel.getMediaDownloadUrl((0,ei.create)(r.GetConversationMediaDownloadUrlInputSchema,{agentChannelId:e,conversationKey:t,itemId:n})).then(e=>({url:e.url||null})):null,[e,t,n,i,a],em,{cacheKey:i?`conversation-media-url:${e}:${t}:${n}`:void 0});return(0,s.useMemo)(()=>({url:l.url,isLoading:o,isRefetching:d,error:g,refetch:c}),[l.url,o,d,g,c])}(n.agentChannelId,n.conversationKey,n.itemId),[d,g]=(0,s.useState)(!1),c=ex(e);return o?(0,t.jsx)(ef,{media:e,address:n,className:i}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>g(!0),"aria-label":`Preview ${c}`,className:(0,a.cn)(ed.UNSTYLED_BUTTON,"stg:block stg:rounded-md stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",i),children:(0,t.jsx)("span",{className:"stg:relative stg:block stg:h-40 stg:w-56 stg:max-w-full stg:overflow-hidden stg:rounded-md",children:l?(0,t.jsx)("img",{src:l,alt:"","aria-hidden":"true",loading:"lazy",className:"stg:h-full stg:w-full stg:object-cover"}):(0,t.jsx)("span",{className:"stg:block stg:h-full stg:w-full stg:animate-pulse stg:bg-muted","aria-hidden":"true"})})}),d&&(0,t.jsx)(el.AttachmentImageLightbox,{src:l,filename:c,open:!0,onClose:()=>g(!1)})]})}function ef({media:e,address:n,className:i}){let{open:l,isOpening:o,error:d}=function(e){let t=(0,ec.useStigmer)(),[n,a]=(0,s.useState)(!1),[i,l]=(0,s.useState)(null),o=(0,s.useCallback)(async()=>{if(!n){a(!0),l(null);try{let s=await t.agentChannel.getMediaDownloadUrl((0,ei.create)(r.GetConversationMediaDownloadUrlInputSchema,{agentChannelId:e.agentChannelId,conversationKey:e.conversationKey,itemId:e.itemId}));s.url&&function(e){if("u"<typeof document)return window.open(e,"_blank","noopener,noreferrer");let t=document.createElement("a");t.href=e,t.rel="noopener noreferrer",t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)}(s.url)}catch(e){l((0,eg.toError)(e))}finally{a(!1)}}},[t,e.agentChannelId,e.conversationKey,e.itemId,n]);return(0,s.useMemo)(()=>({open:o,isOpening:n,error:i}),[o,n,i])}(n),g=ex(e),u=e.sizeBytes>BigInt(0)?(0,eo.formatFileSize)(Number(e.sizeBytes)):null;return(0,t.jsxs)("div",{className:i,children:[(0,t.jsx)("span",{className:"stg:inline-flex stg:max-w-[240px] stg:items-center stg:rounded-md stg:bg-muted-subtle stg:px-2 stg:py-1 stg:text-xs stg:text-foreground",children:(0,t.jsxs)("button",{type:"button",onClick:()=>void l(),disabled:o,"aria-label":`Open ${g}`,className:(0,a.cn)(ed.UNSTYLED_BUTTON,"stg:flex stg:min-w-0 stg:items-center stg:gap-1.5 stg:rounded-sm stg:hover:text-accent-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",o&&"stg:opacity-70"),children:[(0,t.jsx)(ev,{}),(0,t.jsx)(H.TruncatedText,{text:g,className:"stg:min-w-0"}),null!==u&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground",children:u})]})}),null!==d&&(0,t.jsx)("p",{className:"stg:mt-1 stg:break-words stg:text-xs stg:text-destructive",children:(0,c.getUserMessage)(d)})]})}function ev(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1H4C3.45 1 3 1.45 3 2V12C3 12.55 3.45 13 4 13H10C10.55 13 11 12.55 11 12V4L8 1Z"}),(0,t.jsx)("path",{d:"M8 1V4H11"})]})}function eb({items:e,agentChannelId:n,conversationKey:r,isLoading:i,error:o,hasOlder:g,loadOlder:m,isLoadingOlder:h,provider:x,now:p,pinToLatestSignal:f,className:v}){let{scrollRef:b,sentinelRef:j,contentRef:y,isFollowing:C,jumpToLatest:S}=(0,er.useAutoScroll)();(0,er.usePinToLatestOnSignal)(f,S);let T=(0,s.useMemo)(()=>(function(e,t){let s=t??new Date,n=[],a="";for(let t of e){let e=t.at?(0,N.timestampDate)(t.at):null,r=e?e.toDateString():"undated";r!==a&&(a=r,n.push({label:e?function(e,t){if(e.toDateString()===t.toDateString())return"Today";let s=new Date(t);return(s.setDate(t.getDate()-1),e.toDateString()===s.toDateString())?"Yesterday":e.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric",...e.getFullYear()===t.getFullYear()?{}:{year:"numeric"}})}(e,s):"Earlier",items:[]})),n[n.length-1].items.push(t)}return n})(e,p),[e,p]),M=(0,l.channelProviderOf)(x??void 0),L=M?.timelineIncludesCustomerMessages??!0;return(0,t.jsx)(I.TooltipProvider,{children:(0,t.jsxs)("div",{"aria-label":"Conversation timeline",className:(0,a.cn)("stg:relative stg:flex stg:min-h-0 stg:flex-1 stg:flex-col",v),children:[(0,t.jsxs)("div",{ref:b,className:"stg:min-h-0 stg:flex-1 stg:overflow-y-auto stg:[overflow-anchor:none] stg:px-4 stg:py-3",children:[!L&&M&&(0,t.jsxs)("div",{className:"stg:mb-3 stg:flex stg:items-start stg:gap-2 stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:px-3 stg:py-2 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsx)(en,{"aria-hidden":"true",className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0"}),(0,t.jsxs)("p",{children:["Customer messages on ",M.label,"channels aren't shown here yet — this thread has replies, sends, and internal events only."]})]}),i?(0,t.jsx)(eS,{}):o?(0,t.jsx)("p",{className:"stg:px-2 stg:py-6 stg:text-center stg:text-sm stg:text-destructive",children:(0,c.getUserMessage)(o)}):0===e.length?(0,t.jsx)(d.EmptyState,{variant:"first-use",icon:(0,t.jsx)(w.MessageSquare,{className:"stg:size-8"}),title:"No messages yet",description:"The conversation's messages appear here as they happen."}):(0,t.jsxs)("div",{ref:y,children:[g&&(0,t.jsx)("div",{className:"stg:flex stg:justify-center stg:pb-2",children:(0,t.jsx)(u.Button,{variant:"ghost",size:"xs",onClick:m,disabled:h,children:h?"Loading…":"Load earlier messages"})}),T.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"stg:my-2 stg:text-center stg:text-xs stg:text-muted-foreground-faint",role:"separator",children:e.label}),(0,t.jsx)("ul",{className:(0,a.cn)(k.UNSTYLED_LIST,"stg:space-y-1.5"),children:e.items.map(e=>(0,t.jsx)(ey,{item:e,agentChannelId:n,conversationKey:r},e.itemId))})]},e.label))]}),(0,t.jsx)("div",{ref:j,"aria-hidden":"true"})]}),(0,t.jsx)(ea.JumpToLatestButton,{visible:!C,onClick:S})]})})}let ej={agent:"Agent",teammate:"Teammate",platform:"Automated",unknown:"Unknown sender"},ey=(0,s.memo)(function({item:e,agentChannelId:s,conversationKey:n}){if(e.lane===r.ConversationLane.lane_internal)return(0,t.jsx)(ek,{item:e});let i=L(e),l="customer"===i,o=void 0!==e.media&&s&&n?{agentChannelId:s,conversationKey:n,itemId:e.itemId}:null,d=e.text||(null!==o?"":function(e){if(""!==e.text||""===e.providerMessageType)return null;switch(e.providerMessageType){case"text":return null;case"image":return"Photo";case"video":return"Video";case"audio":return"Voice message";case"document":return"Document";case"sticker":return"Sticker";case"location":return"Location";case"contacts":return"Contact card";default:return`Unsupported message (${e.providerMessageType})`}}(e)),g="delivered"===_(e)&&"failed"===A(e)&&""!==e.receiptDetail?e.receiptDetail:null,c="failed"!==_(e)?null:""!==e.attemptDetail?e.attemptDetail:"errored"===function(e){switch(e.attemptFailureKind){case T.ChannelAttemptFailureKind.attempt_refused:return"refused";case T.ChannelAttemptFailureKind.attempt_errored:return"errored";case T.ChannelAttemptFailureKind.attempt_withdrawn:return"withdrawn";default:return null}}(e)?"Delivery failed due to a technical problem on the platform's side.":null;return(0,t.jsx)("li",{className:(0,a.cn)("stg:flex",l?"stg:justify-start":"stg:justify-end"),children:(0,t.jsxs)("div",{className:(0,a.cn)("stg:max-w-[80%] stg:rounded-lg stg:px-3 stg:py-2",l?"stg:bg-muted-subtle":"stg:bg-primary-subtle"),children:[!l&&(0,t.jsx)("p",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:ej[i]}),null!==o&&void 0!==e.media&&(0,t.jsx)(eh,{media:e.media,address:o,className:e.text?"stg:mb-1.5":void 0}),(d||null===o)&&(0,t.jsx)("p",{className:(0,a.cn)("stg:whitespace-pre-wrap stg:break-words stg:text-sm stg:text-foreground",!e.text&&"stg:italic stg:text-muted-foreground"),children:d||"Message content unavailable"}),null!==g&&(0,t.jsx)("p",{className:"stg:mt-1 stg:break-words stg:text-xs stg:text-destructive",children:g}),null!==c&&(0,t.jsx)("p",{className:"stg:mt-1 stg:break-words stg:text-xs stg:text-destructive",children:c}),(0,t.jsx)(eN,{item:e})]})})});function eC({hint:e,className:s,children:n}){return(0,t.jsxs)(I.Tooltip,{children:[(0,t.jsx)(I.TooltipTrigger,{render:(0,t.jsx)("span",{className:s}),children:n}),(0,t.jsx)(I.TooltipContent,{side:"top",children:e})]})}function eN({item:e}){let s=_(e),n=e.at?(0,N.timestampDate)(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):"";return(0,t.jsxs)("p",{className:"stg:mt-1 stg:flex stg:items-center stg:justify-end stg:gap-1 stg:text-xs stg:text-muted-foreground-faint",children:[(0,t.jsx)("span",{children:n}),"failed"===s&&(0,t.jsxs)(eC,{hint:"The platform could not deliver this message",className:"stg:flex stg:items-center stg:gap-0.5 stg:text-destructive",children:[(0,t.jsx)(g.default,{"aria-hidden":"true",className:"stg:size-3"}),"Not delivered"]}),"suppressed"===s&&(0,t.jsxs)(eC,{hint:"Withheld because a human had the conversation when it came due",className:"stg:flex stg:items-center stg:gap-0.5",children:[(0,t.jsx)(Q,{"aria-hidden":"true",className:"stg:size-3"}),"Held"]}),("pending"===s||"delivering"===s)&&(0,t.jsxs)(eC,{hint:"Sending",className:"stg:flex stg:items-center stg:gap-0.5",children:[(0,t.jsx)(es,{"aria-hidden":"true",className:"stg:size-3"}),(0,t.jsx)("span",{className:"stg:sr-only",children:"Sending"})]}),"delivered"===s&&(0,t.jsx)(ew,{item:e})]})}function ew({item:e}){let s=A(e);return"failed"===s?(0,t.jsxs)(eC,{hint:"The provider accepted this message but could not deliver it",className:"stg:flex stg:items-center stg:gap-0.5 stg:text-destructive",children:[(0,t.jsx)(g.default,{"aria-hidden":"true",className:"stg:size-3"}),"Delivery failed"]}):"read"===s?(0,t.jsxs)(eC,{hint:"Read by the customer",className:"stg:text-primary",children:[(0,t.jsx)(et,{"aria-hidden":"true",className:"stg:size-3.5"}),(0,t.jsx)("span",{className:"stg:sr-only",children:"Read"})]}):"delivered"===s?(0,t.jsxs)(eC,{hint:"Delivered to the customer's device",children:[(0,t.jsx)(et,{"aria-hidden":"true",className:"stg:size-3.5"}),(0,t.jsx)("span",{className:"stg:sr-only",children:"Delivered"})]}):(0,t.jsxs)(eC,{hint:"Sent",children:[(0,t.jsx)(ee.default,{"aria-hidden":"true",className:"stg:size-3.5"}),(0,t.jsx)("span",{className:"stg:sr-only",children:"Sent"})]})}function ek({item:e}){let s="agent"===L(e)&&""!==e.text;return(0,t.jsx)("li",{className:"stg:flex stg:justify-center",children:(0,t.jsx)("div",{className:(0,a.cn)("stg:flex stg:max-w-[90%] stg:items-start stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-center stg:text-xs",s?"stg:bg-destructive-subtle stg:text-destructive":"stg:bg-muted-faint stg:text-muted-foreground"),children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.default,{"aria-hidden":"true",className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0"}),(0,t.jsxs)("span",{className:"stg:min-w-0 stg:break-words",children:["Agent escalated to a human — “",e.text,"”"]})]}):""!==e.text?(0,t.jsx)("span",{className:"stg:min-w-0 stg:break-words",children:e.text}):(0,t.jsx)("span",{children:"A teammate resolved the attention flag"})})})}function eS(){return(0,t.jsxs)("div",{className:"stg:space-y-2","aria-hidden":"true",children:[(0,t.jsx)("div",{className:"stg:h-10 stg:w-3/5 stg:animate-pulse stg:rounded-lg stg:bg-muted-faint"}),(0,t.jsx)("div",{className:"stg:ml-auto stg:h-10 stg:w-3/5 stg:animate-pulse stg:rounded-lg stg:bg-muted-faint"}),(0,t.jsx)("div",{className:"stg:h-10 stg:w-2/5 stg:animate-pulse stg:rounded-lg stg:bg-muted-faint"})]})}var eI=e.i(705450),eT=e.i(910304),eM=e.i(799190);let eL={items:[],totalCount:0,seq:0},e_={rows:new Map,seq:0};function eA(e){return`${e.agentChannelId}\u0000${e.conversationKey}`}function ez(e){let t=e.lastActivityAt;return t?1e3*Number(t.seconds)+Math.floor(t.nanos/1e6):0}var eR=e.i(945850);let eD={items:[],nextPageToken:""};function eO(e,t){let s=null;for(let n of t){let t=e.get(n.itemId);t&&(0,eI.equals)(r.ConversationTimelineItemSchema,t,n)||(s??=new Map(e)).set(n.itemId,n)}return s??e}function eE({org:e,selected:g,onSelectionChange:c,currentIdentityAccountId:u,headerAccessory:h,channelHref:x,now:p,scrollOnSend:f=!0,className:v}){let[j,y]=(0,s.useState)(""),[w,k]=(0,s.useState)(r.ChannelConversationListFilter.channel_conversation_list_filter_unspecified),{channels:S}=(0,o.useOrgAgentChannelList)(e||null),I=function(e){let{org:t,agentChannelId:n="",filter:a=r.ChannelConversationListFilter.channel_conversation_list_filter_unspecified,pageSize:i=50}=e,l=e.refetchIntervalMs??eM.CONVERSATION_LIST_POLL_INTERVAL_MS,o=(0,ec.useStigmer)(),d=(0,s.useRef)(0),g=t?async()=>{let e=d.current,s=await o.agentChannel.listConversations((0,ei.create)(r.ListChannelConversationsInputSchema,{org:t,agentChannelId:n,filter:a,pageInfo:{num:1,size:i}}));return{items:s.items,totalCount:s.totalCount,seq:e}}:null,{data:c,isLoading:u,isRefetching:m,error:h,refetch:x}=(0,eu.useFetch)(g,[t,n,a,i,o],eL,{refetchInterval:l,refetchOnWindowFocus:!0}),[p,f]=(0,s.useState)([]),[v,b]=(0,s.useState)(1),[j,y]=(0,s.useState)(!1),[C,N]=(0,s.useState)(null),[w,k]=(0,s.useState)(e_),S=(0,s.useRef)(0);(0,s.useEffect)(()=>{S.current+=1,f([]),b(1),y(!1),N(null),k(e_)},[t,n,a,i,o]);let I=(0,s.useCallback)(e=>{let t=++d.current;k(s=>{let n=new Map(s.rows);return n.set(eA(e),e),{rows:n,seq:t}}),x()},[x]);(0,s.useEffect)(()=>{0!==w.rows.size&&c.seq>=w.seq&&k(e_)},[c,w]);let T=(0,s.useCallback)(()=>{if(!t||j)return;let e=S.current,s=v+1;y(!0),N(null),o.agentChannel.listConversations((0,ei.create)(r.ListChannelConversationsInputSchema,{org:t,agentChannelId:n,filter:a,pageInfo:{num:s,size:i}})).then(t=>{S.current===e&&(f(e=>[...e,t.items]),b(s),y(!1))},t=>{S.current===e&&(N((0,eg.toError)(t)),y(!1))})},[t,n,a,i,o,j,v]),M=(0,s.useMemo)(()=>{let e=new Set,t=[];for(let s of[...c.items,...p.flat()]){let n=eA(s);e.has(n)||(e.add(n),t.push(w.rows.get(n)??s))}for(let[s,i]of w.rows){if(e.has(s)||a!==r.ChannelConversationListFilter.channel_conversation_list_filter_unspecified||""!==n&&i.agentChannelId!==n)continue;let l=ez(i),o=t.findIndex(e=>ez(e)<l);t.splice(-1===o?t.length:o,0,i),e.add(s)}return t},[c.items,p,w,n,a]),L=M.length<c.totalCount;return(0,s.useMemo)(()=>({conversations:M,totalCount:c.totalCount,hasMore:L,loadMore:T,isLoadingMore:j,loadMoreError:C,isLoading:u,isRefetching:m,error:h,refetch:x,applyServerState:I}),[M,c.totalCount,L,T,j,C,u,m,h,x,I])}({org:e||null,agentChannelId:j,filter:w}),T=function(e,t){let n=(0,ec.useStigmer)(),a=(void 0)??eM.CONVERSATION_DETAIL_POLL_INTERVAL_MS,i=""!==e&&""!==t,[l,o]=(0,s.useState)(null),[d,g]=(0,s.useState)(!1),[c,u]=(0,s.useState)(!1),[m,h]=(0,s.useState)(i),[x,p]=(0,s.useState)(null),[f,v]=(0,s.useState)(0),b=(0,s.useRef)(0),j=(0,s.useRef)(0),y=(0,s.useRef)(!1),C=(0,s.useCallback)(()=>v(e=>e+1),[]),N=(0,s.useCallback)(e=>{b.current+=1,o(e),g(!1),u(!0),p(null)},[]);(0,s.useEffect)(()=>{b.current+=1,o(null),g(!1),u(!1),p(null),i||(h(!1),y.current=!1)},[e,t,n,i]),(0,s.useEffect)(()=>{if(!i)return;let s=b.current,a=++j.current;h(!0),y.current=!0;let l=()=>{j.current===a&&(h(!1),y.current=!1)};n.agentChannel.getConversation((0,ei.create)(r.GetChannelConversationInputSchema,{agentChannelId:e,conversationKey:t})).then(e=>{b.current===s&&(o(t=>t&&(0,eI.equals)(r.ChannelConversationSchema,t,e)?t:e),g(!1),u(!0),p(null)),l()},e=>{b.current===s&&((0,eT.isNotFound)(e)?(o(null),g(!0),u(!0),p(null)):p((0,eg.toError)(e))),l()})},[i,e,t,n,f]),(0,s.useEffect)(()=>{if(!i||!a||a<=0)return;let e=setInterval(()=>{y.current||C()},a);return()=>clearInterval(e)},[i,a,C]),(0,s.useEffect)(()=>{if(!i)return;let e=()=>{y.current||C()},t=()=>{"visible"===document.visibilityState&&e()};return window.addEventListener("focus",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",t)}},[i,C]);let w=m&&!c,k=m&&c;return(0,s.useMemo)(()=>({conversation:l,awaitingCustomer:d,isLoading:w,isRefetching:k,error:x,refetch:C,applyServerState:N}),[l,d,w,k,x,C,N])}(g?.agentChannelId??"",g?.conversationKey??""),M=function(e,t){let n=(void 0)??50,a=(void 0)??eM.CONVERSATION_DETAIL_POLL_INTERVAL_MS,i=(0,ec.useStigmer)(),l=""!==e&&""!==t,o=l?async()=>{let s=await i.agentChannel.getTimeline((0,ei.create)(r.GetConversationTimelineInputSchema,{agentChannelId:e,conversationKey:t,pageSize:n}));return{items:s.items,nextPageToken:s.nextPageToken}}:null,{data:d,isLoading:g,isRefetching:c,error:u,refetch:m}=(0,eu.useFetch)(o,[e,t,n,i],eD,{refetchInterval:a,refetchOnWindowFocus:!0}),[h,x]=(0,s.useState)(new Map),[p,f]=(0,s.useState)(null),[v,b]=(0,s.useState)(!1),[j,y]=(0,s.useState)(null),C=(0,s.useRef)(0);(0,s.useEffect)(()=>{C.current+=1,x(new Map),f(null),b(!1),y(null)},[e,t,n,i]),(0,s.useEffect)(()=>{d!==eD&&(x(e=>eO(e,d.items)),f(e=>null===e?d.nextPageToken:e))},[d]);let N=(0,s.useCallback)(()=>{if(!l||v||!p)return;let s=C.current;b(!0),y(null),i.agentChannel.getTimeline((0,ei.create)(r.GetConversationTimelineInputSchema,{agentChannelId:e,conversationKey:t,pageSize:n,pageToken:p})).then(e=>{C.current===s&&(x(t=>eO(t,e.items)),f(e.nextPageToken),b(!1))},e=>{C.current===s&&(y((0,eg.toError)(e)),b(!1))})},[l,v,p,e,t,n,i]),w=(0,s.useMemo)(()=>Array.from(h.values()).sort(D).reverse(),[h]),k=null!==p&&""!==p;return(0,s.useMemo)(()=>({items:w,hasOlder:k,loadOlder:N,isLoadingOlder:v,loadOlderError:j,isLoading:g,isRefetching:c,error:u,refetch:m}),[w,k,N,v,j,g,c,u,m])}(g?.agentChannelId??"",g?.conversationKey??""),L=T.applyServerState,_=I.applyServerState,A=(0,s.useCallback)(e=>{L(e),_(e)},[L,_]),O=function(e){let{agentChannelId:t,conversationKey:n,onConversation:a}=e,i=(0,ec.useStigmer)(),l=(0,eR.useKeyedSubmission)(),{run:o}=l,d=(0,s.useCallback)(()=>(0,ei.create)(r.ConversationControlInputSchema,{agentChannelId:t,conversationKey:n}),[t,n]),g=(0,s.useCallback)(()=>o("takeOver",async()=>{let e=await i.agentChannel.takeOver(d());return a?.(e),e}),[o,i,d,a]),c=(0,s.useCallback)(()=>o("handBack",async()=>{let e=await i.agentChannel.handBack(d());return a?.(e),e}),[o,i,d,a]),u=(0,s.useCallback)(()=>o("clearAttention",async()=>{let e=await i.agentChannel.clearAttention(d());return a?.(e),e}),[o,i,d,a]),m=(0,s.useCallback)(e=>o("reply",async()=>{let s=await i.agentChannel.reply((0,ei.create)(r.ReplyToConversationInputSchema,{agentChannelId:t,conversationKey:n,payload:{kind:"text"===e.kind?{case:"text",value:{body:e.body}}:{case:"template",value:{name:e.name,language:e.language,parameters:{...e.parameters}}}}}));if(a)try{a(await i.agentChannel.getConversation((0,ei.create)(r.GetChannelConversationInputSchema,{agentChannelId:t,conversationKey:n})))}catch{}return s}),[o,i,t,n,a]);return(0,s.useMemo)(()=>({reply:m,takeOver:g,handBack:c,clearAttention:u,pendingCommands:l.submittingKeys,commandErrors:l.errorsByKey,clearErrors:l.clearErrors}),[m,g,c,u,l.submittingKeys,l.errorsByKey,l.clearErrors])}({agentChannelId:g?.agentChannelId??"",conversationKey:g?.conversationKey??"",onConversation:A}),K=(0,s.useMemo)(()=>g?S.find(e=>e.metadata?.id===g.agentChannelId)??null:null,[S,g]),F=(0,l.channelProviderOf)(K?.spec?.providerConfig?.case),B=T.conversation?.awaitingReply??!1,$=F&&!F.supportsStaffReplies?`Staff replies aren't available on ${F.label} channels yet — the agent keeps serving this conversation.`:T.awaitingCustomer?"The customer hasn't written yet — staff replies unlock with their first message.":null,U=T.conversation?function(e,t,s){if("whatsapp"!==t)return null;let n=e.lastCustomerMessageAt;return void 0===n?null:s.getTime()-(0,N.timestampDate)(n).getTime()>=864e5?"closed":"open"}(T.conversation,F?.id??null,p??new Date):null,[P,q]=(0,s.useState)(!1),V=(F?.supportsMessageTemplates??!1)&&null!==K,H="closed"===U&&F?`${F.label} closes free-form replies 24 hours after the customer's last message — a reply sent now will probably fail. The window reopens when the customer writes again.${V?" Approved templates still deliver — use the template button beside Send.":""}`:null,Y=(0,s.useCallback)(e=>c({agentChannelId:e.agentChannelId,conversationKey:e.conversationKey}),[c]),[G,J]=(0,s.useState)(null),X=g?`${g.agentChannelId}:${g.conversationKey}`:"",Z=null!==G&&G.selectionKey===X?G.itemId:null;(0,s.useEffect)(()=>{null!==Z&&M.items.some(e=>e.itemId===Z)&&J(null)},[M.items,Z]);let[Q,ee]=(0,s.useState)(0),et=(0,s.useCallback)(async e=>{let t=await O.reply(e);if(t.outcome!==i.ChannelSendOutcome.refused&&""!==t.outboundMessageId){var s;J({selectionKey:X,itemId:(s=t.outboundMessageId,`ob:${s}`)}),ee(e=>e+1)}return M.refetch(),t},[O.reply,M.refetch,X]),es=T.conversation?z(T.conversation,F?.id??null):g?.conversationKey??"",en=T.conversation?R(T.conversation,F?.id??null):null,ea=K?K.metadata?.name||K.metadata?.slug:null,er=K&&x?x(K):null,el="function"==typeof h?h({channel:K}):h;return(0,t.jsxs)("div",{"aria-label":"Conversations workbench",className:(0,a.cn)("stg:flex stg:min-h-0 stg:flex-1",v),children:[(0,t.jsx)(E,{className:"stg:w-80 stg:shrink-0 stg:border-r stg:border-border",conversations:I.conversations,isLoading:I.isLoading,error:I.error,hasMore:I.hasMore,loadMore:I.loadMore,isLoadingMore:I.isLoadingMore,channels:S,channelFilter:j,onChannelFilterChange:y,filter:w,onFilterChange:k,selected:g,onSelect:Y,now:p}),null===g?(0,t.jsx)("div",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:items-center stg:justify-center stg:p-6",children:(0,t.jsx)(d.EmptyState,{variant:"first-use",icon:(0,t.jsx)(n.MessagesSquare,{className:"stg:size-8"}),title:"Select a conversation",description:"Pick a conversation to read its thread, reply as your business, or take over from the agent."})}):(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:border-b stg:border-border stg:px-4 stg:py-2.5",children:[(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("h2",{className:"stg:truncate stg:text-sm stg:font-semibold stg:text-foreground",children:es}),(null!==en||ea)&&(0,t.jsxs)("p",{className:"stg:truncate stg:text-xs stg:text-muted-foreground",children:[en,null!==en&&ea&&" · ",ea&&(er?(0,t.jsx)("a",{href:er,className:"stg:hover:text-foreground stg:hover:underline",children:ea}):ea)]})]}),el]}),T.conversation&&(0,t.jsx)(m,{conversation:T.conversation,participation:O,supportsStaffReplies:F?.supportsStaffReplies??!0}),T.conversation&&(0,t.jsx)(C,{conversation:T.conversation,participation:O,unansweredCustomer:B,supportsStaffReplies:F?.supportsStaffReplies??!0,currentIdentityAccountId:u}),(0,t.jsx)(eb,{items:M.items,agentChannelId:g.agentChannelId,conversationKey:g.conversationKey,isLoading:M.isLoading,error:M.error,hasOlder:M.hasOlder,loadOlder:M.loadOlder,isLoadingOlder:M.isLoadingOlder,provider:F?.id??null,now:p,pinToLatestSignal:f?Q:void 0}),(0,t.jsx)(b,{onSend:et,isSending:O.pendingCommands.has("reply")||null!==Z,onOpenTemplatePicker:V&&null===$?()=>q(!0):void 0,disabledReason:$,advisory:H}),V&&(0,t.jsx)(W,{open:P,onOpenChange:q,channelSlug:K?.metadata?.slug??"",org:K?.metadata?.org??"",onSend:et,isSending:O.pendingCommands.has("reply")||null!==Z})]},`${g.agentChannelId}:${g.conversationKey}`)]})}var eK=e.i(217127),eF=e.i(297629),eB=e.i(170255),e$=e.i(312056);let eU=/^\/conversations\/([^/]+)\/([^/]+)\/?$/;e.s(["ConversationsPage",0,function(){let e=(0,eF.useActiveOrgSlug)(),{currentPath:n,navigate:a}=(0,e$.useAppNavigation)(),r=(0,s.useMemo)(()=>{let e;return(e=n.match(eU))?{agentChannelId:decodeURIComponent(e[1]),conversationKey:decodeURIComponent(e[2])}:null},[n]),i=(0,s.useCallback)(e=>{a(e?`/conversations/${encodeURIComponent(e.agentChannelId)}/${encodeURIComponent(e.conversationKey)}`:"/conversations")},[a]);return(0,t.jsx)("div",{className:"flex h-full min-h-0 flex-col",children:(0,t.jsx)(eE,{org:e,selected:r,onSelectionChange:i,headerAccessory:r?({channel:s})=>(0,t.jsx)(eK.ManageAccessButton,{resource:{kind:eB.ApiResourceKind.agent_channel,kindString:"agent_channel",id:r.agentChannelId,org:e,name:s?.metadata?.name||s?.metadata?.slug},label:"Channel access"}):void 0,channelHref:t=>t.spec?.agentRef?`/library/agents/${t.spec.agentRef.org||e}/${t.spec.agentRef.slug}?tab=channels`:null})})}],10284)}]);
|