pi-roundtable-web 0.27.1 → 0.29.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/CHANGELOG.md +53 -0
- package/README.md +25 -9
- package/dist/chunk-account-9616x405.js +1 -0
- package/dist/chunk-action-menu-q5y7xpry.js +1 -0
- package/dist/chunk-agent-x74xezyt.js +1 -0
- package/dist/chunk-arranged-rooms-9prq46vh.js +1 -0
- package/dist/chunk-bulk-actions-5dc4m9ad.js +1 -0
- package/dist/chunk-character-creator-wf02eg0h.js +1 -0
- package/dist/chunk-codeeditor-239ss6a2.js +2 -0
- package/dist/chunk-confirm-bhrx9195.js +1 -0
- package/dist/chunk-connectors-k77pd9by.js +37 -0
- package/dist/chunk-conversations-ftcpaqw1.js +1 -0
- package/dist/chunk-council-sheet-a5e6tspr.js +2 -0
- package/dist/chunk-council-view-6593rqbr.js +1 -0
- package/dist/chunk-drag-7873fvzw.js +1 -0
- package/dist/chunk-entry-5zmjxadx.js +1 -0
- package/dist/chunk-folder-list-h9hmbm8e.js +1 -0
- package/dist/chunk-folds-vxq86t1s.js +1 -0
- package/dist/chunk-gate-fa6za28z.js +1 -0
- package/dist/chunk-host-icons-y6frbzqt.js +1 -0
- package/dist/chunk-host-picture-fqg55rbr.js +1 -0
- package/dist/chunk-host-state-65tdhkyq.js +1 -0
- package/dist/chunk-host-ui-233kz7qp.js +1 -0
- package/dist/{chunk-index-j4x9dq30.css → chunk-index-1652v386.css} +1 -1
- package/dist/chunk-index-2c00zf3z.js +2 -0
- package/dist/chunk-index-2dhrqvba.js +2 -0
- package/dist/chunk-index-2s4bkrz3.js +2 -0
- package/dist/chunk-index-2ypaqwjy.js +2 -0
- package/dist/{chunk-index-k0z507h3.js → chunk-index-35zqk1zr.js} +2 -2
- package/dist/chunk-index-39qq37j5.js +2 -0
- package/dist/{chunk-index-j7pgphx3.js → chunk-index-3tjmyd1h.js} +2 -2
- package/dist/chunk-index-4eag6s50.js +2 -0
- package/dist/chunk-index-4jnn2g09.js +2 -0
- package/dist/{chunk-index-y60x5jbh.js → chunk-index-4krm48hm.js} +1 -1
- package/dist/{chunk-index-w42rcbx1.js → chunk-index-4re5prfp.js} +2 -2
- package/dist/chunk-index-57teqgct.js +2 -0
- package/dist/{chunk-index-3d8s3565.js → chunk-index-5ssncptg.js} +2 -2
- package/dist/{chunk-index-yrmqcay4.js → chunk-index-7c9fn21n.js} +2 -2
- package/dist/chunk-index-7k5895sn.js +14 -0
- package/dist/chunk-index-93f3e06v.js +2 -0
- package/dist/chunk-index-9m9v1p7s.js +2 -0
- package/dist/chunk-index-a8c0ap8g.js +2 -0
- package/dist/chunk-index-a8nqn3y0.js +3 -0
- package/dist/chunk-index-am7ghh75.js +120 -0
- package/dist/chunk-index-amspdq2j.js +4 -0
- package/dist/chunk-index-amxa2bn3.js +2 -0
- package/dist/{chunk-index-nsvwbjfe.js → chunk-index-aycxt14t.js} +2 -2
- package/dist/{chunk-index-n05yw5wd.js → chunk-index-bjeg3e2j.js} +2 -2
- package/dist/chunk-index-cttrqfm8.js +2 -0
- package/dist/chunk-index-dajanzxc.js +1 -0
- package/dist/chunk-index-e2eeckhh.js +2 -0
- package/dist/chunk-index-e46652wf.js +2 -0
- package/dist/chunk-index-ek98d2rn.js +2 -0
- package/dist/{chunk-index-f500nw4w.js → chunk-index-en5dm1zv.js} +2 -2
- package/dist/chunk-index-evhaaqzk.js +13 -0
- package/dist/chunk-index-f4gqzfkv.js +2 -0
- package/dist/{chunk-index-ak6ecqy3.js → chunk-index-gj3n4dh5.js} +2 -2
- package/dist/chunk-index-gp4chnp3.js +2 -0
- package/dist/{chunk-index-af4ebmkr.js → chunk-index-h2a42p6s.js} +3 -3
- package/dist/{chunk-index-4z4chg7v.js → chunk-index-haac6nbt.js} +2 -2
- package/dist/{chunk-index-3pnvpppa.js → chunk-index-hef4gwtb.js} +2 -2
- package/dist/chunk-index-mg96sqpk.js +2 -0
- package/dist/chunk-index-nsya88fn.js +1 -0
- package/dist/{chunk-index-ben4gv45.js → chunk-index-ntt3em2k.js} +1 -1
- package/dist/chunk-index-pcbkp62w.js +2 -0
- package/dist/chunk-index-pfs6rm6w.js +2 -0
- package/dist/chunk-index-pgxgq61x.js +2 -0
- package/dist/{chunk-index-9z13jw6q.js → chunk-index-q33ppq0j.js} +3 -3
- package/dist/chunk-index-r0hk9kyd.js +47 -0
- package/dist/{chunk-index-0ye10vk3.js → chunk-index-rr73h4kc.js} +3 -3
- package/dist/{chunk-index-983dmeaa.js → chunk-index-rtz4936v.js} +3 -3
- package/dist/chunk-index-smz90j6p.js +2 -0
- package/dist/chunk-index-teyx2hz7.js +2 -0
- package/dist/{chunk-index-sm7m4fej.js → chunk-index-v6h43553.js} +2 -2
- package/dist/chunk-index-vzqwn3wp.js +2 -0
- package/dist/chunk-index-wt2asefx.js +50 -0
- package/dist/chunk-index-x4tq9btg.js +2 -0
- package/dist/chunk-index-y6p8j3zv.js +2 -0
- package/dist/chunk-index-yvcdg5hh.js +2 -0
- package/dist/{chunk-index-afrhnrxj.js → chunk-index-zdzzf3fp.js} +2 -2
- package/dist/chunk-index-zeqfnkty.js +2 -0
- package/dist/chunk-index-zpwb8mkk.js +2 -0
- package/dist/chunk-lang-css-avzhvm72.js +1 -0
- package/dist/{chunk-lang-dockerfile-cnwqn660.js → chunk-lang-dockerfile-2p7e3ssz.js} +1 -1
- package/dist/{chunk-lang-go-yy6kgsxv.js → chunk-lang-go-zxp9k517.js} +3 -3
- package/dist/chunk-lang-html-red02gep.js +1 -0
- package/dist/chunk-lang-javascript-n33kmjcx.js +1 -0
- package/dist/chunk-lang-json-zmym50rg.js +1 -0
- package/dist/chunk-lang-markdown-ww2kcs85.js +6 -0
- package/dist/chunk-lang-python-ng1zdtd4.js +3 -0
- package/dist/chunk-lang-rust-6ynhxjdd.js +1 -0
- package/dist/{chunk-lang-shell-1rpgtepw.js → chunk-lang-shell-39t9bz2s.js} +1 -1
- package/dist/chunk-lang-sql-w875ejpg.js +2 -0
- package/dist/{chunk-lang-toml-tbj7467c.js → chunk-lang-toml-b8ckgkg5.js} +1 -1
- package/dist/chunk-lang-typescript-qf8acbb2.js +1 -0
- package/dist/chunk-lang-xml-bz91cjp1.js +1 -0
- package/dist/chunk-lang-yaml-g9zy0tdv.js +1 -0
- package/dist/chunk-layout-actions-fyzzzeyp.js +1 -0
- package/dist/chunk-menu-items-yvnk3vds.js +1 -0
- package/dist/chunk-mode-toggle-ccv271hm.js +1 -0
- package/dist/chunk-note-row-314py1pp.js +204 -0
- package/dist/chunk-notes-4rnrddzw.js +1 -0
- package/dist/chunk-notice-bell-z9wgamnz.js +1 -0
- package/dist/chunk-notices-mtn7pg1z.js +1 -0
- package/dist/chunk-onboarding-f3hhxgg4.js +1 -0
- package/dist/chunk-overview-qmepntrr.js +1 -0
- package/dist/chunk-palette-edkn1ypq.js +1 -0
- package/dist/chunk-placement-items-trsa5t23.js +1 -0
- package/dist/chunk-profile-pwfq0wns.js +1 -0
- package/dist/chunk-prompt-history-xp9hmeqt.js +1 -0
- package/dist/chunk-prompts-a56qvytg.js +1 -0
- package/dist/chunk-room-confirms-gqpkz4h0.js +1 -0
- package/dist/chunk-room-menu-1m2c2ekt.js +1 -0
- package/dist/chunk-rooms-menu-button-tcvda1gq.js +1 -0
- package/dist/chunk-schedules-kwnw7p8v.js +1 -0
- package/dist/{chunk-seat-menu-kwtjnpjj.js → chunk-seat-menu-m2n9nvv0.js} +1 -1
- package/dist/chunk-sheet-hosts-pr8xktyq.js +29 -0
- package/dist/{chunk-shortcut-help-g5cpqjjj.js → chunk-shortcut-help-sbvrds1m.js} +2 -2
- package/dist/chunk-shortcuts-8705p7q3.js +1 -0
- package/dist/chunk-skill-editor-7xy09sq1.js +8 -0
- package/dist/chunk-skills-cnc25x7q.js +1 -0
- package/dist/chunk-start-over-line-97zdd9pb.js +16 -0
- package/dist/chunk-switcher-list-ehsn2wsk.js +1 -0
- package/dist/{chunk-tab-dot-yse6wcfp.js → chunk-tab-dot-gkpe06q8.js} +1 -1
- package/dist/chunk-table-av3kh3tt.js +1 -0
- package/dist/chunk-table2d-5x3jptp9.js +1 -0
- package/dist/chunk-table3d-rsvajx7r.js +4220 -0
- package/dist/chunk-thread-actions-7xtkegwm.js +1 -0
- package/dist/{chunk-thread-cards-36rckyg7.js → chunk-thread-cards-grzszfha.js} +1 -1
- package/dist/chunk-thread-list-9bjjac3j.js +217 -0
- package/dist/chunk-transcript-t5szb8r0.js +1 -0
- package/dist/chunk-waiting-chip-d8b6a0p8.js +28 -0
- package/dist/chunk-waiting-ts3kxjvv.js +1 -0
- package/dist/chunk-where-3d3ncsa5.js +1 -0
- package/dist/chunk-workspace-ct6hvn0z.js +578 -0
- package/dist/chunk-zh-tw-v9v1eerm.js +1 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +3 -3
- package/src/api-types.ts +137 -1
- package/src/app/app.ts +4 -7
- package/src/app/desk.ts +19 -4
- package/src/app/room-log.ts +66 -18
- package/src/app/rooms.ts +45 -7
- package/src/app/routes.ts +86 -11
- package/src/app/skill-doc-routes.ts +12 -2
- package/src/app/skill-group-routes.ts +126 -0
- package/src/app/surface.ts +26 -2
- package/src/app/team-routes.ts +3 -7
- package/src/authz.ts +2 -0
- package/src/cleanup-api.ts +9 -2
- package/src/connector-manage-api.ts +257 -0
- package/src/console-api.ts +60 -2
- package/src/features.ts +91 -0
- package/src/host/reads.ts +10 -1
- package/src/i18n/zh-tw.ts +137 -5
- package/src/push/channel.ts +1 -0
- package/src/web-plugin.ts +8 -1
- package/dist/chunk-account-83crfbn4.js +0 -1
- package/dist/chunk-action-menu-qw7h03x0.js +0 -1
- package/dist/chunk-agent-t1632ktv.js +0 -1
- package/dist/chunk-arranged-rooms-sb6tbsxw.js +0 -1
- package/dist/chunk-bulk-actions-v1g2bzk7.js +0 -1
- package/dist/chunk-character-creator-ye69w0kx.js +0 -1
- package/dist/chunk-codeeditor-5j6abj8k.js +0 -2
- package/dist/chunk-confirm-x8w877bz.js +0 -1
- package/dist/chunk-connectors-t7qbc6nk.js +0 -1
- package/dist/chunk-conversations-kmt6qzym.js +0 -1
- package/dist/chunk-council-sheet-bxvn7vza.js +0 -2
- package/dist/chunk-drag-03zgvd66.js +0 -1
- package/dist/chunk-entry-y5vwp5e5.js +0 -1
- package/dist/chunk-folder-list-h3vnjzpb.js +0 -1
- package/dist/chunk-folds-a3e22m7x.js +0 -1
- package/dist/chunk-gate-qzephvdv.js +0 -1
- package/dist/chunk-group-scene-w1ycabrm.js +0 -1
- package/dist/chunk-group-table-9nvmja8w.js +0 -1
- package/dist/chunk-host-icons-fccg3b2d.js +0 -1
- package/dist/chunk-host-picture-jaqz127q.js +0 -1
- package/dist/chunk-host-state-r01v1ywg.js +0 -1
- package/dist/chunk-host-ui-n54mh5af.js +0 -1
- package/dist/chunk-index-0a81da8z.js +0 -2
- package/dist/chunk-index-1kwp3spy.js +0 -2
- package/dist/chunk-index-47vq85ye.js +0 -2
- package/dist/chunk-index-5zmswz4s.js +0 -2
- package/dist/chunk-index-64rsz6pf.js +0 -2
- package/dist/chunk-index-6vcs0h0m.js +0 -2
- package/dist/chunk-index-6xqz6mg2.js +0 -2
- package/dist/chunk-index-83v0c9x6.js +0 -2
- package/dist/chunk-index-8xd6anam.js +0 -2
- package/dist/chunk-index-b73y2gc0.js +0 -47
- package/dist/chunk-index-bhqczxr3.js +0 -2
- package/dist/chunk-index-c44p8q87.js +0 -2
- package/dist/chunk-index-cbqhzf40.js +0 -13
- package/dist/chunk-index-db8zh8e6.js +0 -2
- package/dist/chunk-index-dvfkb699.js +0 -2
- package/dist/chunk-index-e02ddp46.js +0 -1
- package/dist/chunk-index-ebg48jgy.js +0 -2
- package/dist/chunk-index-ek5mek4j.js +0 -14
- package/dist/chunk-index-em7vndrb.js +0 -2
- package/dist/chunk-index-eq161yvp.js +0 -4
- package/dist/chunk-index-f5x2srr0.js +0 -2
- package/dist/chunk-index-fg42egv9.js +0 -50
- package/dist/chunk-index-h3v1d3nt.js +0 -2
- package/dist/chunk-index-kbgykazq.js +0 -2
- package/dist/chunk-index-n8ghdvxb.js +0 -2
- package/dist/chunk-index-p5jcwjx8.js +0 -2
- package/dist/chunk-index-qfgkfq86.js +0 -2
- package/dist/chunk-index-rcwdqn50.js +0 -7
- package/dist/chunk-index-s72hmse6.js +0 -2
- package/dist/chunk-index-sv9qpmhv.js +0 -1
- package/dist/chunk-index-x4enmj72.js +0 -2
- package/dist/chunk-index-xevnf9ew.js +0 -2
- package/dist/chunk-index-xx8jq73q.js +0 -2
- package/dist/chunk-index-ypkgw7gq.js +0 -2
- package/dist/chunk-lang-css-y9133ktr.js +0 -1
- package/dist/chunk-lang-html-r2xmryek.js +0 -1
- package/dist/chunk-lang-javascript-1r6wd177.js +0 -1
- package/dist/chunk-lang-json-dx56g11y.js +0 -1
- package/dist/chunk-lang-markdown-fpcf2dfq.js +0 -6
- package/dist/chunk-lang-python-zzp95955.js +0 -3
- package/dist/chunk-lang-rust-214fh7sp.js +0 -1
- package/dist/chunk-lang-sql-vvp46hpj.js +0 -2
- package/dist/chunk-lang-typescript-y5w4tt4g.js +0 -1
- package/dist/chunk-lang-xml-tbcqmedk.js +0 -1
- package/dist/chunk-lang-yaml-jh56t3sv.js +0 -1
- package/dist/chunk-layout-actions-8dzvysym.js +0 -1
- package/dist/chunk-menu-items-3jhya205.js +0 -2
- package/dist/chunk-mode-toggle-js49gvpd.js +0 -1
- package/dist/chunk-note-row-kv061030.js +0 -75
- package/dist/chunk-notes-sdkqz5hr.js +0 -1
- package/dist/chunk-notice-bell-r012f2zy.js +0 -1
- package/dist/chunk-notices-h4rk1zxc.js +0 -1
- package/dist/chunk-onboarding-a18cvkph.js +0 -1
- package/dist/chunk-overview-ynaqn4fp.js +0 -1
- package/dist/chunk-palette-jm79gb5q.js +0 -1
- package/dist/chunk-placement-items-mwm9q1zn.js +0 -1
- package/dist/chunk-profile-ajw6pp4r.js +0 -1
- package/dist/chunk-prompt-history-zcfvr3r8.js +0 -1
- package/dist/chunk-prompts-m5rzdk24.js +0 -1
- package/dist/chunk-room-confirms-ftsj15ja.js +0 -1
- package/dist/chunk-room-menu-b9ktw9pw.js +0 -1
- package/dist/chunk-rooms-menu-button-qe62t6nx.js +0 -1
- package/dist/chunk-schedules-t8yxnf8q.js +0 -1
- package/dist/chunk-sheet-hosts-yj5wszgj.js +0 -1
- package/dist/chunk-shortcuts-9ft5sqdw.js +0 -1
- package/dist/chunk-skill-editor-xdfq2708.js +0 -8
- package/dist/chunk-skills-9wa4mwdc.js +0 -1
- package/dist/chunk-switcher-list-vpg6wvtw.js +0 -1
- package/dist/chunk-table-1y76m54h.js +0 -1
- package/dist/chunk-table2d-g57vr6h0.js +0 -1
- package/dist/chunk-table3d-cv6069hy.js +0 -4220
- package/dist/chunk-thread-actions-xjhpdjk7.js +0 -1
- package/dist/chunk-thread-list-fd6agz77.js +0 -217
- package/dist/chunk-transcript-5nfn3r35.js +0 -1
- package/dist/chunk-where-ha8pc3cg.js +0 -1
- package/dist/chunk-workspace-e85twv32.js +0 -578
- package/dist/chunk-zh-tw-z5p5mpph.js +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import{p,Q,S,ke,o,Ne,C,zn,a,r,t,u,g,e,n,s,Me,X,d,M,pn,In,rt,_,We,gn,At,Ot,Un,On,ge,we,os,xn,he,Nt,Je,De,ss,tr,nr,ir,Sn,Ce,He,Ee,wn,lr,cr}from"./chunk-index-wt2asefx.js";import{Ze}from"./chunk-index-4jnn2g09.js";import{ze}from"./chunk-index-hef4gwtb.js";import{Pn}from"./chunk-index-zeqfnkty.js";import{se}from"./chunk-index-amxa2bn3.js";import{R}from"./chunk-index-zdzzf3fp.js";var Ae=(i)=>`roundtable-console:council-mode:${i}`,Ge=(i)=>`rt-table-mode:${i}`,qe="roundtable-console:table-mode",Re=new Map,{emit:Ln,use:Nn}=M(),Te=(i)=>i==="scene"||i==="chat"?i:void 0;function ye(i){try{return globalThis.localStorage?.getItem(i)??void 0}catch{return}}function Le(i,c){try{if(c===void 0)globalThis.localStorage?.removeItem(i);else globalThis.localStorage?.setItem(i,c)}catch{}}function Hn(i){let c=ye(Ge(i)),m=c==="1"?"scene":c==="0"?"chat":void 0,f=m??Te(ye(qe))??"scene";if(m!==void 0||Te(ye(qe)))Le(Ae(i),f),Le(Ge(i),void 0);return f}function Dn(i){let c=Re.get(i);if(c!==void 0)return c;let m=Te(ye(Ae(i)))??Hn(i);return Re.set(i,m),m}function Vn(i,c){Re.set(i,c),Le(Ae(i),c),Ln()}function je(i){return[Nn(()=>Dn(i)),(c)=>Vn(i,c)]}var Fn=`
|
|
2
|
+
/* The box's fold button says what it does, in words beside its chevron. */
|
|
3
|
+
.scene-collapse {
|
|
4
|
+
width: auto;
|
|
5
|
+
flex: none;
|
|
6
|
+
gap: var(--space-1);
|
|
7
|
+
padding-inline: var(--space-2);
|
|
8
|
+
font-size: var(--text-xs);
|
|
9
|
+
}
|
|
10
|
+
.scene-collapse span {
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
}
|
|
13
|
+
/* Folded, the box is one bar: who speaks, the start of their newest line, and the button that opens it. */
|
|
14
|
+
.scene-bar {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--space-2);
|
|
18
|
+
min-height: var(--touch);
|
|
19
|
+
padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
.scene-bar .scene-chip {
|
|
23
|
+
width: 2rem;
|
|
24
|
+
height: 2rem;
|
|
25
|
+
margin: 0;
|
|
26
|
+
border-width: 2px;
|
|
27
|
+
flex: none;
|
|
28
|
+
}
|
|
29
|
+
.scene-bar-name {
|
|
30
|
+
flex: 0 1 auto;
|
|
31
|
+
min-width: 3ch;
|
|
32
|
+
max-width: 35%;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
}
|
|
37
|
+
.scene-bar-preview {
|
|
38
|
+
flex: 1 1 0;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
color: var(--muted);
|
|
44
|
+
font-size: var(--text-sm);
|
|
45
|
+
}
|
|
46
|
+
.scene-bar-asking {
|
|
47
|
+
flex: none;
|
|
48
|
+
padding: 0 var(--space-2);
|
|
49
|
+
border-radius: var(--radius-full);
|
|
50
|
+
background: color-mix(in srgb, var(--accent) 16%, transparent);
|
|
51
|
+
font-size: var(--text-xs);
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
}
|
|
54
|
+
.scene-composer[hidden] {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* On a phone the tab's tools are narrow, but the fold button keeps its words. */
|
|
59
|
+
@media (max-width: 719px) {
|
|
60
|
+
.scene-tools .scene-collapse,
|
|
61
|
+
.scene-bar .scene-collapse {
|
|
62
|
+
width: auto;
|
|
63
|
+
min-width: 0;
|
|
64
|
+
padding-inline: var(--space-1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/* Phones held upright: folded, the box is only its bar and the scene takes the rest. */
|
|
68
|
+
@media (max-width: 719px) and (orientation: portrait) {
|
|
69
|
+
.table-frame[data-focused][data-folded] {
|
|
70
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`,Kn=`
|
|
74
|
+
/* The header's tools wrap under the title on a narrow screen rather than overflow it. */
|
|
75
|
+
.table-tools {
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
justify-content: flex-end;
|
|
78
|
+
}
|
|
79
|
+
/* The switch between the scene and the chat: two short choices that sit beside the council chip. */
|
|
80
|
+
.table-mode {
|
|
81
|
+
flex: none;
|
|
82
|
+
margin: 0;
|
|
83
|
+
}
|
|
84
|
+
.table-mode label {
|
|
85
|
+
min-height: 2rem;
|
|
86
|
+
padding: 0 var(--space-2);
|
|
87
|
+
font-size: var(--text-sm);
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
/* A council's header: on a phone its tools take a row of their own under the title. */
|
|
91
|
+
@media (max-width: 719px) {
|
|
92
|
+
.council-head {
|
|
93
|
+
flex-wrap: wrap;
|
|
94
|
+
}
|
|
95
|
+
.council-head .table-tools {
|
|
96
|
+
order: 3;
|
|
97
|
+
flex-basis: 100%;
|
|
98
|
+
min-width: 0;
|
|
99
|
+
}
|
|
100
|
+
.council-head .council-chip {
|
|
101
|
+
flex: 1 1 0;
|
|
102
|
+
min-width: 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/* The council's messages as a chat fill the view under its header, like a room's own list. */
|
|
106
|
+
.table-chat {
|
|
107
|
+
position: relative;
|
|
108
|
+
flex: 1;
|
|
109
|
+
min-height: 0;
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
}
|
|
113
|
+
`,Ye=()=>se("dialogue-fold",Fn),Ii=()=>se("table-page",Kn);function Ue(i,c,m,f){if(!i)return;let l=i.pending.at(-1);if(l&&!l.failed)return{id:`p${l.id}`,who:"owner",author:c,text:l.text,files:[],live:!1,pending:!0};if(i.typing&&i.progress.text!==""){let h=i.agent??f;return{id:`s${i.messages.at(-1)?.id??0}`,who:"agent",agent:h,author:m(h),text:i.progress.text,files:[],live:!0,pending:!1}}let b=i.live.at(-1);if(b)return{id:`l${b.live??b.id}`,who:"agent",agent:b.agent,author:b.author,text:b.text,files:b.files,live:!0,pending:!1};for(let h=i.messages.length-1;h>=0;h-=1){let y=i.messages[h];if(!y||y.kind==="system")continue;return Xe(y)}return}function Xe(i){return{id:`m${i.id}`,who:i.kind==="owner"?"owner":"agent",agent:i.agent,author:i.author,text:i.text,files:i.files,live:!1,pending:!1}}var _n=(i,c)=>i.id===c.id||i.who===c.who&&i.agent===c.agent&&i.text!==""&&c.text!==""&&(c.text.startsWith(i.text)||i.text.startsWith(c.text));function Qe(){let i=[],c,m=(f)=>{let l=i.length-1,b=i[l];if(b&&_n(b,f))i[l]=f;else i.push(f)};return{get line(){return i[0]},get waiting(){return Math.max(0,i.length-1)},feed(f,l){let b=f.at(-1)?.id??0;if(!c){c=b,i=l?[l]:[];return}if(!l){c=Math.max(c,b),i=[];return}for(let h of f)if(h.id>c&&h.kind!=="system")m(Xe(h));if(c=Math.max(c,b),l&&!l.id.startsWith("m"))m(l)},advance(){if(i.length<2)return!1;return i=i.slice(1),!0}}}function en(i,c,m,f){if(i!==void 0&&f.includes(i))return i;if(c!==void 0&&f.includes(c))return c;return qn(m,f)}function nn(i,c,m){return i.cardOrder.map((l)=>({id:l,card:i.cards[l]})).filter((l)=>l.card?.room===c).filter((l)=>l.card.outcome===void 0||m===void 0||l.card.after>=m)}var Bn=90;function Gn(i,c,m,f={}){if(f.instant)return c;let l=i+m/1000*(f.cps??Bn);return Math.min(c,Math.max(i,l))}function tn(){let i,c="",m=0,f=0;return{get shown(){return Math.floor(f)},get done(){return Math.floor(f)>=m},feed(l,b){if(l!==i){let h=c!==""&&(b.startsWith(c)||c.startsWith(b));if(i=l,!h)f=0}if(c=b,m=Array.from(b).length,f>m)f=m},step(l,b){f=Gn(f,m,l,{instant:b})},finish(){f=m}}}function on(i,c,m){if(i?.who!=="agent")return;if(i.live&&m!==void 0)return m;return c?i.agent:void 0}function rn(i,c=80){let m=i.split(`
|
|
114
|
+
`).map((l)=>l.replace(/^\s*(?:#{1,6}\s|>\s?|[-*+]\s|\d+\.\s)+/,"").replace(/[*_`~]/g,"").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\s+/g," ").trim()).find((l)=>l!=="")??"",f=Array.from(m);return f.length>c?`${f.slice(0,c-1).join("")}…`:m}var sn=(i,c)=>Array.from(i).slice(0,c).join("");function qn(i,c){if(!i||i.who!=="agent"||i.agent===void 0)return null;return c.includes(i.agent)?i.agent:null}function an(i,c,m){return m&&m.lineId===c?m.member:i}var Wn=["①","②","③","④","⑤","⑥","⑦","⑧"];function cn(i){if(!i)return[];return[...i.spoken.map((c)=>({name:c,place:"spoken"})),...i.current===void 0?[]:[{name:i.current,place:"current"}],...i.next.map((c,m)=>({name:c,place:"next",order:m+1}))]}function dn(i){let c={};if(i?.state!=="running")return c;for(let f of i.spoken)c[f]="✓";let m=new Set;if(i.next.forEach((f,l)=>{let b=Wn[l];if(b===void 0||m.has(f))return;m.add(f),c[f]=b}),i.current!==void 0)delete c[i.current];return c}var le=(i)=>i?.state==="running"?i.current:void 0;function ln(i){let c=i.current===void 0?i.replies:i.replies+1;return Math.min(Math.max(c,0),i.limit)}var un="roundtable-console:dialogue-folded",Oe=new Map,{emit:jn,use:Yn}=M();function Xn(i){let c=Oe.get(i);if(c!==void 0)return c;try{let m=globalThis.localStorage?.getItem(i)??void 0;if(m!==void 0)Oe.set(i,m);return m}catch{return}}function Zn(i,c){Oe.set(i,c);try{globalThis.localStorage?.setItem(i,c)}catch{}jn()}var Jn=()=>Xn(un)==="1";function Qn(i){Zn(un,i?"1":"0")}function ve(){return[Yn(Jn),Qn]}var Se={},{emit:et,use:nt}=M();function Ve(i,c){if(Se[i]===c)return;let m={...Se};if(c===void 0)delete m[i];else m[i]=c;Se=m,et()}var tt=()=>Se;function xe(){return nt(tt)}var ot=24;function mn(i,c,m){let f=a(!0);o(()=>{let l=i.current;if(!l)return;let b=()=>{f.current=l.scrollHeight-l.scrollTop-l.clientHeight<=ot};return l.addEventListener("scroll",b,{passive:!0}),()=>l.removeEventListener("scroll",b)},[i]),Ne(()=>{let l=i.current;if(!c){f.current=!0;return}if(l&&f.current)l.scrollTop=l.scrollHeight},[i,c,m])}function st(i){if(i.ended==="limit")return t("Limit reached");if(i.ended==="stopped")return t("Round stopped");if(i.ended==="done")return t("{count} of {limit} replies",{count:i.replies,limit:i.limit});return t("Reply {n} of {limit}",{n:i.n,limit:i.limit})}var Pe=(i)=>st({...i,n:ln(i)});function fn(i){let c=d((h)=>h.rooms[i.roomKey]?.round),m=d((h)=>{let y={};for(let v of Object.values(h.rooms))if(v.view?.kind==="agent")y[v.view.name]=v.view.displayName;return y}),f=De();if(!c)return null;let l=cn(c),b=(h)=>m[h]??h;return n("div",{className:"order-strip","data-state":c.state,children:[e("ol",{className:"order-faces","aria-label":t("Speaking order"),children:l.map((h,y)=>n("li",{className:"order-face","data-place":h.place,title:b(h.name),children:[e(he,{spec:f[h.name],name:h.name,size:h.place==="current"?36:26,live:!1}),e("span",{className:"order-badge","aria-hidden":"true",children:h.place==="spoken"?"✓":h.place==="next"?h.order:null}),e("span",{className:"visually-hidden",children:`${b(h.name)}, ${h.place==="spoken"?t("has spoken"):h.place==="current"?t("speaking"):t("next")}`})]},`${h.name}:${y}`))}),e("span",{className:"order-chip","aria-live":"polite",children:Pe(c)}),c.state==="running"&&(c.queued??0)>0?e("span",{className:"order-queued",children:t("Your message waits for the next round")}):null]})}Ye();function it(i){let c=a(tn()),[,m]=zn((h)=>h+1,0),f=Me();c.current.feed(i?.id??"",i?.text??"");let l=i?.text??"",b=i?.id;return o(()=>{let h=c.current;if(f||l===""||b===void 0){h.finish(),m();return}let y=performance.now(),v=0,x=()=>{let T=performance.now();if(h.step(T-y,!1),y=T,m(),!h.done)v=requestAnimationFrame(x)};if(!h.done)v=requestAnimationFrame(x);return()=>cancelAnimationFrame(v)},[f,b,l]),{shown:c.current.shown,done:c.current.done,finish(){c.current.finish(),m()}}}function Fe(i){let c=d((y)=>y.rooms[i]),m=d((y)=>y.principal?.name)??t("You"),f=d((y)=>{let v={};for(let x of Object.values(y.rooms))if(x.view?.kind==="agent")v[x.view.name]=x.view.displayName;return v}),l=c?.view,b=(y)=>(y===void 0?void 0:f[y])??y??l?.displayName??i,h=Ue(c,m,b,l?.kind==="agent"?l.name:void 0);return{room:c,view:l,line:h,displayOf:b}}function at(i){let{loaded:c,error:m}=i,f=d((y)=>y.rooms[i.roomKey]),[l,b]=r(!1),h=a(null);return o(()=>{if(i.open&&c)h.current?.scrollTo({top:h.current.scrollHeight})},[i.open,c]),e(R,{open:i.open,title:`${i.name} · ${t("Log")}`,onClose:i.onClose,children:n("div",{className:"scene-log",ref:h,children:[m?e("p",{className:"failure-text",children:m}):null,f?.more?e("button",{type:"button",className:"secondary older",disabled:l,onClick:async()=>{b(!0),await ir(i.roomKey),b(!1)},children:l?t("Loading…"):t("Load earlier messages")}):null,e(Sn,{roomKey:i.roomKey,enterAfter:void 0,quotable:!0})]})})}function hn(i){let{roomKey:c}=i,m=Ee(),f=_(),l=nr(c),b=i.streams!==!1;o(()=>{if(!b)return;return m.focus(c),()=>m.focus(void 0)},[m,c,b]);let h=d((L)=>L.limits),y=d((L)=>nn(L,c,L.rooms[c]?.messages.at(-1)?.id)),v=De(),{room:x,view:T,line:O,displayOf:Z}=Fe(c),q=a(void 0);if(q.current?.room!==c)q.current={room:c,stage:Qe()};let{stage:H}=q.current;H.feed(x?.messages??[],O);let{line:k,waiting:V}=H,P=T?.kind==="agent"?T:void 0,F=P?P.name:k?.who==="agent"?k.agent:void 0,ne=Je(F?v[F]:void 0),B=P?P.displayName:k?k.author:T?.displayName??c,{shown:te,done:G,finish:K}=it(k),[,J]=zn((L)=>L+1,0);o(()=>{if(G&&V>0&&H.advance())J()},[G,V,H]);let oe=le(x?.round),re=Boolean(x?.typing&&x.progress.text!==""&&V===0),ae=on(k,!G,re?oe??k?.agent:void 0);o(()=>{Ve(c,ae)},[c,ae]),o(()=>()=>Ve(c,void 0),[c]);let z=a(null);mn(z,!G,te);let[j,Y]=r(!1),[D,I]=ve(),ce=k?.who==="owner"&&!P?{["--agent-accent"]:"var(--accent)"}:ne,ee=Boolean(x?.typing),w=G&&V===0&&k?.who==="agent"&&oe!==void 0&&oe!==k.agent,E=ee&&(!k||k.who==="owner"||w),N=k?sn(k.text,te):"",ie=P||k?.who==="agent"?e("span",{className:"scene-chip",children:e(he,{spec:F?v[F]:void 0,name:F??B,size:34,live:!1})}):null,W=y.some(({card:L})=>L.outcome===void 0),de=n("button",{type:"button",className:"icon-button scene-collapse","aria-expanded":!D,onClick:(L)=>{L.stopPropagation(),I(!D)},children:[e(s,{name:"chevron",style:{rotate:D?"-90deg":"90deg"}}),e("span",{children:D?t("Expand dialogue"):t("Collapse dialogue")})]});return n("section",{className:"scene-box","data-open":i.open||void 0,"data-collapsed":D||void 0,"data-who":k?.who,style:ce,"aria-label":t("Log"),children:[D?n("div",{className:"scene-bar",onClick:()=>I(!1),children:[ie,e("strong",{className:"scene-bar-name",children:B}),e("span",{className:"scene-bar-preview",children:k?rn(k.text):x?.round?Pe(x.round):""}),W?e("span",{className:"scene-bar-asking",children:t("Waiting for your answer")}):null,de]}):n("header",{className:"scene-tab",children:[ie,e("strong",{className:"scene-name",children:B}),n("span",{className:"scene-tools",children:[i.onBack?e("button",{type:"button",className:"icon-button","aria-label":t("Back to the whole table"),onClick:i.onBack,children:e(s,{name:"back"})}):null,i.onMenu?e("button",{type:"button",className:"icon-button scene-more","aria-label":t("More"),"aria-haspopup":"menu",onClick:(L)=>i.onMenu?.(L.currentTarget),children:e(s,{name:"more"})}):null,n("button",{type:"button",className:"icon-button scene-log-button","aria-label":t("Log"),"aria-haspopup":"dialog",onClick:()=>Y(!0),children:[e(s,{name:"conversations"}),e("span",{children:t("Log")})]}),de]})]}),D?null:i.strip,D?null:n("div",{className:"scene-body",ref:z,children:[e("div",{className:"scene-line","data-live":k?.live||void 0,"aria-live":"polite",...G?{}:{role:"button",tabIndex:0,title:t("Tap to show the whole message"),onClick:K,onKeyDown:(L)=>{if(L.key==="Enter"||L.key===" ")L.preventDefault(),K()}},children:k?n(g,{children:[P&&k.who==="owner"?e("span",{className:"scene-from",children:k.author}):null,e(We,{source:N}),G?e(Nt,{files:k.files}):null]}):null}),E&&x?e(On,{name:w?Z(oe):B,progress:x.progress}):null,y.map(({id:L,card:A})=>e("div",{className:"scene-card",children:e(tr,{card:A,timeZone:f.timeZone})},L))]}),T?.readOnly?null:e("div",{className:"scene-composer",hidden:D,children:e(At,{draftKey:c,name:T?.displayName??c,limits:h,stoppable:Boolean(x?.stoppable),blurAfterSend:i.blurAfterSend===!0,...T?.kind==="group"?{stopLabel:t("Stop the round")}:{},onSend:(L,A)=>m.say(c,L,A),onStop:()=>m.send({type:"stop",room:c})},c)}),e(at,{roomKey:c,open:j,loaded:l.loaded,error:l.error,name:T?.displayName??c,onClose:()=>Y(!1)})]})}var ct=8,dt={views:[],attention:{},loaded:!1},bn=dt,{emit:lt,use:ut}=M(),An=()=>ut(()=>bn);function ai(){let i=ke(rt)?.tier;return i!==void 0&&i!=="owner"}function mt(i,c){return{key:i.key,kind:"agent",name:`${c}.${i.id}`,displayName:i.title,home:!1,readOnly:!1,mode:{yolo:!1,longRunning:!1},typing:!1,stoppable:!1}}var ft=(i)=>i.attention===!0,pt=(i,c)=>(c.lastAt??"").localeCompare(i.lastAt??"");async function gt(i){let c=await Promise.allSettled(i.map((l)=>Ze.list(l))),m=[];c.forEach((l,b)=>{let h=i[b];if(l.status!=="fulfilled"||h===void 0)return;for(let y of l.value.rooms)m.push({room:y,kind:h})}),m.sort((l,b)=>pt(l.room,b.room));let f={};for(let{room:l}of m)if(ft(l))f[l.key]=!0;return{views:m.map(({room:l,kind:b})=>mt(l,b)),attention:f,loaded:!0}}function Uo(i){let c=Ee(),m=d((x)=>x.connects),f=ze((x)=>x.lists),l=a(0),b=a(0),h=i.join(`
|
|
115
|
+
`),{views:y}=An();o(()=>{l.current+=1;let x=l.current,T=!0;return gt(h===""?[]:h.split(`
|
|
116
|
+
`)).then((O)=>{if(!T||x<b.current)return;b.current=x,bn=O,lt()}),()=>{T=!1}},[h,m,f]);let v=y.slice(0,ct).map((x)=>x.key).join(`
|
|
117
|
+
`);o(()=>{let x=v===""?[]:v.split(`
|
|
118
|
+
`);for(let T of x)c.send({type:"subscribe",room:T});return()=>{for(let T of x)c.send({type:"unsubscribe",room:T})}},[c,v,m])}var ht=380,bt="cubic-bezier(0.7, 0, 0.84, 0)",yt=2.4,yn=0.35,vt=260,wt="cubic-bezier(0.2, 0.8, 0.2, 1)",St=1.06,xt=700,U;function vn(i){if(U?.host===i&&U.phase==="diving")U.abort()}var kt=(i)=>{if(!i||typeof i.animate!=="function")return;i.animate([{transform:`scale(${St})`,opacity:yn},{transform:"scale(1)",opacity:1}],{duration:vt,easing:wt})};function kn(i,c,m,f){if(U)return;let l=i.closest("main.route")??i;if(Me()||typeof l.animate!=="function"){m();return}f?.();let b=l.getBoundingClientRect(),h=`${c.x-b.left}px ${c.y-b.top}px`,y={overflow:l.style.overflow,events:l.style.pointerEvents};l.style.overflow="hidden",l.style.pointerEvents="none";let v=l.animate([{transformOrigin:h,transform:"scale(1)",opacity:1},{transformOrigin:h,transform:`scale(${yt})`,opacity:yn}],{duration:ht,easing:bt,fill:"forwards"}),x=document.documentElement,T,O,Z=()=>{l.style.overflow=y.overflow,l.style.pointerEvents=y.events,v.cancel()},q=()=>{window.removeEventListener("popstate",k),window.removeEventListener("hashchange",k)},H={host:i,phase:"diving",abort:k};function k(){if(U!==H||H.phase!=="diving")return;q(),Z(),U=void 0}let V=(P)=>{if(U!==H)return;if(O?.disconnect(),clearTimeout(T),x.removeAttribute("data-dive"),Z(),U=void 0,P)kt(document.querySelector("main.route"))};U=H,window.addEventListener("popstate",k),window.addEventListener("hashchange",k),v.finished.then(()=>{if(U!==H||H.phase!=="diving")return;if(H.phase="committing",q(),x.setAttribute("data-dive",""),m(),!i.isConnected){V(!0);return}O=new MutationObserver(()=>{if(!i.isConnected)V(!0)}),O.observe(l.parentElement??document.body,{childList:!0,subtree:!0}),T=setTimeout(()=>V(!i.isConnected),xt)},()=>{return})}var Rt=(i)=>i==="sleepy"?"idle":i;function Rn(i,c){let m={};for(let[l,b]of Object.entries(i))m[l]=Rt(b);let f=(l)=>l!==void 0&&(l in m)&&m[l]!=="waiting"&&m[l]!=="error";for(let l of c){let b=l.agent;if(l.typing&&f(b)){let h=m[b];if(h!=="thinking"&&h!=="working")m[b]="thinking"}}for(let l of c)if(f(l.voice))m[l.voice]="speaking";return m}function Ke(i,c){if(i==="speaking")return"happy";return(c?.STATE_EXPRESSION??Ct)[i]}var Ct={idle:"neutral",thinking:"thinking",working:"determined",waiting:"curious",done:"proud",error:"apologetic",sleepy:"sleepy"};function _e(i,c){return`s${i}${c.toLowerCase().replace(/[^a-z0-9]/g,"")}`.slice(0,16)}var Et={x:-7,y:-3,w:114,h:100},me=256;function Ie(i,c,m,f,l,b,h){let y=i.composeSvg(c,{bare:!0,look:m,expr:Ke(f,i),...h?{mouth:h}:{},state:"idle",still:!0,size:me,uid:l,skins:b}),{x:v,y:x,w:T,h:O}=Et;return y.replace('viewBox="0 0 100 100"',`viewBox="${v} ${x} ${T} ${O}"`).replace(`width="${me}" height="${me}"`,`width="${me}" height="${Math.round(me*O/T)}"`)}function $e(i,c,m,f,l,b){if(f!=="speaking")return{avatarSvg:Ie(i,c,m,f,l,b)};return{avatarSvg:Ie(i,c,m,f,l,b,"closed"),talkSvg:Ie(i,c,m,f,l,b,"open")}}function Cn(i){let c=i.delayMs??300,m=i.timers??{set:(h,y)=>setTimeout(h,y),clear:(h)=>clearTimeout(h)},f=new Map,l=new Map,b=(h)=>{let y=l.get(h);if(y===void 0)return;m.clear(y),l.delete(h)};return{seed(h,y){b(h),f.set(h,Ke(y))},update(h,y){let v=Ke(y);if(!f.has(h)){f.set(h,v);return}if(b(h),f.get(h)===v)return;l.set(h,m.set(()=>{l.delete(h),f.set(h,v),i.setAvatar(h,y)},c))},forget(h){b(h),f.delete(h)},dispose(){for(let h of[...l.keys()])b(h);f.clear()}}}var Mt={idle:u("idle"),thinking:u("thinking"),working:u("working"),waiting:u("waiting"),speaking:u("speaking"),done:u("done"),error:u("error")},Tt=()=>({table:t("Round table"),seat:(i,c)=>t("{name} ({state})",{name:i,state:t(Mt[c])})}),Lt=()=>{He().catch(()=>{return})};function li(i){let c=ai(),{views:m}=An(),f=d((l)=>{let b=l.order.map((y)=>l.rooms[y]?.view).filter((y)=>y!==void 0&&y.kind==="agent"&&!y.helper);return[...i?i.slice(0,Pn).map((y)=>b.find((v)=>v.name===y)).filter((y)=>y!==void 0):b].sort((y,v)=>Number(v.home)-Number(y.home)).slice(0,Pn)},i?.join(`
|
|
119
|
+
`)??"");return c?m.slice(0,Pn):f}function ci(){return d((i)=>i.order.map((c)=>i.rooms[c]?.view).filter((c)=>c!==void 0&&c.kind==="agent"&&!c.helper),"agents")}function Ht(i){let c=xe(),m=d((f)=>Object.values(f.rooms).filter((l)=>i?l.key===i:l.view?.kind==="group").map((l)=>{let b=le(l.round),h=b??l.agent,y=l.typing&&l.progress.text!=="";return{key:l.key,typing:l.typing||b!==void 0,...h===void 0?{}:{agent:h},...y&&h!==void 0?{streamer:h}:{}}}),i??"");return C(()=>m.map(({key:f,streamer:l,...b})=>{let h=c[f]??l;return h===void 0?b:{...b,voice:h}}),[m,c])}function Dt(i){return d((c)=>dn(i?c.rooms[i]?.round:void 0),i??"")}function $n(i){let{variant:c="full",onHandle:m}=i,f=In(),l=Ot(),b=Un(),h=xn(),y=De(),v=li(i.members),x=ss(v.map((w)=>w.key)),T=Ht(i.groupRoom),O=Dt(i.groupRoom),Z=An().attention,q=ai(),H=a(q);H.current=q;let k=c==="full"&&i.list===!0,V=C(()=>Rn(Object.fromEntries(v.map((w)=>{let E=x[w.key]??"idle";return[w.name,Z[w.key]&&(E==="idle"||E==="sleepy")?"waiting":E]})),T),[v,x,T,Z]),P=a(V);P.current=V;let F=C(()=>{if(!f)return[];return v.map((w,E)=>{let N=y[w.name]??w.character??pn(f,w);return{id:w.name,name:w.displayName,color:f.accentOf(N,b.look),...$e(f,N,b.look,P.current[w.name]??"idle",_e(E,w.name),h)}})},[f,v,y,b.look,h]),ne=a(F);ne.current=F;let B=a(v);B.current=v;let te=a({look:l,scheme:b.scheme});te.current={look:l,scheme:b.scheme};let G=a(null),K=a(void 0),[J,oe]=r(0),re=a(void 0),ae=a(()=>{return});ae.current=(w)=>{let E=v.find((N)=>N.name===w);if(!f||!E)return;return y[w]??E.character??pn(f,E)};let z=a(b);z.current=b;let j=a(h);j.current=h;let Y=a(f);Y.current=f;let D=a(m);D.current=m;let I=a(i);I.current=i;let ce=f!==void 0&&F.length>0;o(()=>{let w=G.current;if(!ce||!w)return;let E=!0,N,ie=Cn({setAvatar:(W,de)=>{let L=ae.current(W),A=Y.current,ue=B.current.findIndex((be)=>be.name===W);if(!L||!A||ue<0)return;let{avatarSvg:fe,talkSvg:pe}=$e(A,L,z.current.look,de,_e(ue,W),j.current);N?.setAvatar(W,fe,pe)}});return re.current=ie,(async()=>{let{mountRoundTable:W}=await (p("5zmjxadx"),import("./chunk-entry-5zmjxadx.js")),de=ne.current.map((A)=>({...A,state:P.current[A.id]??"idle"})),L=await W(w,{theme:te.current.look,scheme:te.current.scheme,seats:de,onSeatClick:({id:A,at:ue})=>{let fe=I.current.onSeat;if(fe){fe(A);return}let pe=B.current.find((Tn)=>Tn.name===A);if(!pe)return;let be=()=>X("room",pe.key),Be=G.current;if(ue&&Be)kn(Be,ue,be,H.current?Lt:void 0);else be()},...I.current.onSeatMenu?{onSeatMenu:(A)=>I.current.onSeatMenu?.(A)}:{},ownerName:I.current.ownerName??t("You"),focus:I.current.focus??null,onFocus:(A)=>I.current.onFocus?.(A),reducedMotion:"auto",lowPower:"auto",variant:c,listBelow:k,labels:Tt()});if(!E){L.dispose();return}N=L,K.current=L;for(let A of de)ie.seed(A.id,A.state??"idle");D.current?.(L),oe((A)=>A+1)})(),()=>{E=!1,vn(w),ie.dispose(),re.current=void 0,K.current=void 0,D.current?.(void 0),N?.dispose()}},[ce,c,k]);let ee=i.focus??null;if(o(()=>{let w=K.current;if(w&&w.focused()!==ee)w.focus(ee)},[ee,J]),o(()=>{let w=K.current;if(!w||F.length===0)return;let E=P.current;w.setSeats(F.map((N)=>({...N,state:E[N.id]??"idle"})));for(let N of F)re.current?.seed(N.id,E[N.id]??"idle")},[F,J]),o(()=>{let w=K.current;if(!w)return;for(let E of ne.current)w.setMark(E.id,O[E.id]??null)},[O,F,J]),o(()=>{let w=K.current;if(w)w.setTheme(l,b.scheme)},[l,b.scheme,J]),o(()=>{let w=K.current;if(!w)return;for(let E of ne.current){let N=V[E.id]??"idle";w.setState(E.id,N),re.current?.update(E.id,N)}},[V,J]),v.length===0)return e("p",{className:"table-empty",children:t("No knights are seated yet.")});return e("section",{className:"table-host",ref:G,"aria-label":t("Round table")})}function En(i,c){let{line:m}=Fe(i),f=d((O)=>le(O.rooms[i]?.round)),l=xe()[i],[b,h]=r(),y=en(l,f,m,c),v=`${m?.id??""}|${y??""}`;return{focus:an(y,v,b),look:(O)=>h({lineId:v,member:O})}}function Mn(i){let{roomKey:c,members:m}=i,[f]=ve();return n("div",{className:"table-frame room-scene","data-focused":"","data-folded":f||void 0,children:[e($n,{members:m,groupRoom:c,variant:"full",focus:i.focus,onFocus:i.onLook,onSeat:i.onLook,...i.onHandle?{onHandle:i.onHandle}:{},...i.onSeatMenu?{onSeatMenu:i.onSeatMenu}:{}}),e(hn,{roomKey:c,open:!0,streams:i.streams??!1,blurAfterSend:i.blurAfterSend===!0,strip:e(fn,{roomKey:c})})]})}Ii();var Vt=S(()=>(p("a5e6tspr"),import("./chunk-council-sheet-a5e6tspr.js")).then((i)=>({default:i.CouncilSheet}))),Pt=S(()=>(p("ccv271hm"),import("./chunk-mode-toggle-ccv271hm.js")).then((i)=>({default:i.ModeToggle}))),Ft=S(()=>(p("1m2c2ekt"),import("./chunk-room-menu-1m2c2ekt.js")).then((i)=>({default:i.RoomMenu})));function It(i,c,m,f,l){os(i,c).then((b)=>{if(b)ge({...b,at:m,via:f,source:l})},()=>{return})}function Kt(){let i=Ce("(max-width: 719px)"),c=Ce("(pointer: coarse)");return i||c}function Di(i){return e("button",{type:"button",className:"secondary council-chip","aria-haspopup":"dialog",onClick:i.onOpen,children:i.council?t("Council: {name} ▾",{name:i.council.displayName}):t("Pick who sits")})}function Ui(i,c){let[m,f]=r(!1),[l,b]=r(!1),h=()=>{f(!0),b(!0)},y=m?e(Q,{fallback:null,children:e(Vt,{open:l,onClose:()=>b(!1),council:i,...c?{go:c}:{}})}):null;return{ask:h,sheet:y}}function _t(i){let c=(m,f)=>n("label",{"data-checked":i.mode===m,children:[e("input",{type:"radio",name:"table-mode",value:m,checked:i.mode===m,onChange:()=>i.onMode(m)}),f]});return n("fieldset",{className:"segmented table-mode",children:[e("legend",{className:"visually-hidden",children:t("Show the council as")}),c("scene",t("Animation mode")),c("chat",t("Chat mode"))]})}function xr(i){let{roomKey:c}=i,m=Ee(),f=d((w)=>w.rooms[c]),l=d((w)=>w.connection==="open"),b=d((w)=>w.limits),h=Ot(),y=Kt(),v=f?.view,x=v?.members??[],T=li(x),[O,Z]=je(c),[q,H]=r(),{focus:k,look:V}=En(c,x),{ask:P,sheet:F}=Ui(v,i.go),[ne,B]=r(!1),[te,G]=r(!1),K=a(null),[J,oe]=r(),[re,ae]=r(!1);o(()=>(m.focus(c),()=>m.focus(void 0)),[m,c]);let z=v?.displayName??c,j=f?.mode,Y=T.length>0||i.empty===void 0,D=Y&&O==="scene",I=v?.notes===!0,ce=I&&re,ee=I&&J===c&&!ce;return n(g,{children:[n("header",{className:"room-head council-head",children:[i.lead,n("div",{className:"table-tools",children:[D&&q?.kind==="webgl"?e("button",{type:"button",className:"icon-button","aria-label":t("Reset view"),title:t("Reset view"),onClick:()=>V(null),children:e(s,{name:"reset"})}):null,Y?e(_t,{mode:O,onMode:Z}):null,e(Di,{council:v,onOpen:P})]}),e(wn,{}),e("button",{ref:K,type:"button",className:"icon-button","aria-label":t("Room menu"),"aria-haspopup":"dialog",onClick:()=>{G(!0),B(!0)},children:e(s,{name:"menu"})})]}),h==="camelot"&&Y&&!D?e("div",{className:"group-strip",children:e($n,{members:x,groupRoom:c,variant:"compact"})}):null,!l?n("div",{className:"offline-banner",role:"status",children:[e("span",{className:"spinner","aria-hidden":"true"}),t("Reconnecting… messages wait here until it is back.")]}):null,e(lr,{room:c,mode:j&&(j.yolo||j.longRunning)?j:void 0,approved:f?.autoApproved??0}),!Y?e("div",{className:"table-frame",children:i.empty}):D?e(Mn,{roomKey:c,members:x,focus:k,onLook:V,blurAfterSend:y,onHandle:H,onSeatMenu:(w)=>{let E=T.find((N)=>N.name===w.id);if(E)It(E.key,c,w.at,w.via,w.source)}}):e("div",{className:"table-chat",children:e(cr,{roomKey:c,name:z,...i.surface?{surface:i.surface}:{},composer:(w)=>v?.readOnly?null:e(At,{draftKey:c,name:z,onAddressed:ae,...I?{placeholder:ee?t("Write an internal note…"):t("Ask AI…"),above:e(Q,{fallback:null,children:e(Pt,{on:!ee,label:t("@AI"),...ce?{locked:t("The message starts with @AI, so the knight answers.")}:{},onChange:(E)=>oe(E?void 0:c)})})}:{},limits:b,stoppable:Boolean(f?.stoppable),stopLabel:t("Stop the round"),blurAfterSend:y,onSend:(E,N,ie)=>{if(I&&ie){let W=gn(E);m.say(c,W===""&&N.length===0?E:W,N,"turn")}else m.say(c,E,N,ee?"note":void 0);w(!0)},onStop:()=>m.send({type:"stop",room:c}),...i.incoming&&i.onIncomingTaken?{incoming:i.incoming,onIncomingTaken:i.onIncomingTaken}:{}},c)})}),F,te?e(Q,{fallback:null,children:e(Ft,{open:ne,room:c,mode:j,muted:v?.muted===!0,agent:void 0,group:v?.name,coordinator:v?.coordinator===!0,displayName:z,readOnly:v?.readOnly??!1,parent:void 0,onClose:()=>B(!1),onAskYolo:()=>{B(!1),we({kind:"yolo",room:c,name:z,restoreFocus:()=>K.current})},onAskStartOver:()=>{B(!1),we({kind:"start-over",room:c,name:z,restoreFocus:()=>K.current})}})}):null]})}
|
|
120
|
+
export{Ii,An,ai,Uo,li,ci,$n,Di,Ui,xr};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{C,t,e,n}from"./chunk-index-wt2asefx.js";function h(d,i){let s=d.split(`
|
|
2
|
+
`),o=i.split(`
|
|
3
|
+
`),a=0;while(a<s.length&&a<o.length&&s[a]===o[a])a++;let l=0;while(l<s.length-a&&l<o.length-a&&s[s.length-1-l]===o[o.length-1-l])l++;let u=s.slice(a,s.length-l),m=o.slice(a,o.length-l),r=s.slice(0,a).map((f)=>({kind:"same",text:f}));return r.push(...p(u,m)),r.push(...s.slice(s.length-l).map((f)=>({kind:"same",text:f}))),r}function p(d,i){let s=(f)=>f.map((c)=>({kind:"del",text:c})),o=(f)=>f.map((c)=>({kind:"add",text:c}));if(d.length===0)return o(i);if(i.length===0)return s(d);if(d.length*i.length>4000000)return[...s(d),...o(i)];let a=i.length+1,l=new Uint32Array((d.length+1)*a);for(let f=d.length-1;f>=0;f--)for(let c=i.length-1;c>=0;c--)l[f*a+c]=d[f]===i[c]?(l[(f+1)*a+c+1]??0)+1:Math.max(l[(f+1)*a+c]??0,l[f*a+c+1]??0);let u=[],m=0,r=0;while(m<d.length&&r<i.length)if(d[m]===i[r])u.push({kind:"same",text:d[m]}),m++,r++;else if((l[(m+1)*a+r]??0)>=(l[m*a+r+1]??0))u.push({kind:"del",text:d[m]}),m++;else u.push({kind:"add",text:i[r]}),r++;return u.push(...s(d.slice(m)),...o(i.slice(r))),u}function g(d){return{added:d.filter((i)=>i.kind==="add").length,removed:d.filter((i)=>i.kind==="del").length}}var k={same:" ",add:"+",del:"−"};function L({lines:d}){return e("pre",{className:"diff",children:d.map((i,s)=>n("span",{className:"diff-line","data-kind":i.kind,children:[e("span",{className:"diff-mark","aria-hidden":"true",children:k[i.kind]}),i.kind==="add"||i.kind==="del"?n("span",{className:"visually-hidden",children:[i.kind==="add"?t("Added"):t("Removed"),":"," "]}):null,i.text||" "]},s))})}function gt(d){let i=C(()=>h(d.before,d.after),[d.before,d.after]),s=g(i);return n("div",{className:"field",children:[n("span",{className:"field-label",children:[d.label," ·"," ",t("Lines: {added} added, {removed} removed",{added:s.added,removed:s.removed})]}),e(L,{lines:i})]})}
|
|
4
|
+
export{gt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var c=new WeakMap;function se(e,t){if(typeof document>"u")return;let n=c.get(document)??new Set;if(n.has(e))return;if(c.set(document,n.add(e)),typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype)try{let d=new CSSStyleSheet;d.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,d];return}catch{}let o=document.createElement("style");o.textContent=t,document.head.append(o)}
|
|
2
|
+
export{se};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{O}from"./chunk-index-wt2asefx.js";function a(n,o){let i=O.getState(),r=new Map;for(let s of i.order){let e=i.rooms[s]?.view;if(e?.kind!=="thread"||!e.parent)continue;if(n&&!n.has(e.parent))continue;let t=i.rooms[e.parent]?.view;if(!t||t.kind==="thread")continue;if(!o(e.closed===!0))continue;r.set(e.parent,[...r.get(e.parent)??[],s])}return r}var Ai=(n)=>a(n&&new Set(n),(o)=>o),Ds=(n)=>[...a(new Set(n),()=>!0).values()].flat();function Us(n){let o=O.getState(),i=n&&new Set(n),r=new Map;for(let s of o.order){let e=o.rooms[s]?.view,t=e?.helper?.parent;if(!e||!t||e.helper?.finished!==!0)continue;if(i&&!i.has(t))continue;if(!o.rooms[t]?.view)continue;r.set(t,[...r.get(t)??[],e.name])}return r}
|
|
2
|
+
export{Ai,Ds,Us};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-index-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-index-wt2asefx.js";function Xn(e){if(e.builtin==="link")return t("Link your {name} account",{name:e.label});if(e.builtin==="push")return t("Turn on notifications");return e.label}function un(e){if(e.help)return e.help;if(e.builtin==="link")return t("Prove which account is yours, so the app knows who you are there.");if(e.builtin==="push")return t("So that you hear when something needs you, even when the app is closed.");return""}
|
|
2
|
+
export{Xn,un};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h}from"./chunk-index-wt2asefx.js";var t=(i,l,o)=>h(i,{method:l,...o===void 0?{}:{body:JSON.stringify(o)}}),r=(i)=>encodeURIComponent(i),de={agentPromptHistory:(i)=>h(`agents/${r(i)}/prompt-history`),prompts:()=>h("prompts"),prompt:(i)=>h(`prompts/${r(i)}`),savePrompt:(i,l)=>t(`prompts/${r(i)}`,"PUT",l),revertPrompt:(i,l)=>t(`prompts/${r(i)}/revert`,"POST",l),promptHistory:(i)=>h(`prompts/${r(i)}/history`),skillDocument:(i)=>h(`skill-docs/${r(i)}`),saveSkillDocument:(i,l)=>t(`skill-docs/${r(i)}`,"PUT",l),createSkillDocument:(i)=>t("skill-docs","POST",i),deleteSkillDocument:(i)=>t(`skill-docs/${r(i)}`,"DELETE"),skillHistory:(i)=>h(`skill-docs/${r(i)}/history`),skillGroups:()=>h("skill-groups"),saveSkillGroup:(i,l)=>t(`skill-groups/${r(i)}`,"PUT",l),deleteSkillGroup:(i)=>t(`skill-groups/${r(i)}`,"DELETE"),applySkillGroup:(i,l,o=!0)=>t(`skill-groups/${r(i)}/apply`,"POST",{agent:l,on:o})};
|
|
2
|
+
export{de};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{je,Zr,jt,Wr,Z,ae,Qi,Yr,Ys,Hs,Hr,js,Ks,Js,_n}from"./chunk-index-r0hk9kyd.js";export{jt as AVATAR_STATES,Z as CATALOG,je as CLASS_IDS,ae as CharacterError,Hs as EAST_ASIAN_SKINS,Zr as EXPRESSIONS,Wr as STATE_EXPRESSION,Ks as accentOf,Js as characterCss,Hr as checkSkins,js as composeSvg,Yr as parseCharacter,Ys as readCharacter,Qi as resolveCharacter,_n as suggestCharacter};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{M,h}from"./chunk-index-wt2asefx.js";var uo={page:(e,t,o,c=50)=>h(`rooms/${encodeURIComponent(e)}/messages?archive=${t}&limit=${c}${o===void 0?"":`&before=${o}`}`)},n,{emit:r,use:s}=M();function Ns(e,t){n={room:e,until:t},r()}function Ls(){if(!n)return;n=void 0,r()}var Xs=()=>s(()=>n),i;function zs(e,t){i={author:e,text:t},r()}function fo(){if(!i)return;i=void 0,r()}var Is=()=>s(()=>i);
|
|
2
|
+
export{uo,Ns,Ls,Xs,zs,fo,Is};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h}from"./chunk-index-wt2asefx.js";var pe={pushTest:()=>h("push/test",{method:"POST"}),pushPrefs:()=>h("push/prefs"),setPushPrefs:(e)=>h("push/prefs",{method:"PUT",body:JSON.stringify({quiet:e})}),notices:()=>h("notices"),ackNotice:(e)=>h(`notices/${encodeURIComponent(e)}/ack`,{method:"POST"}),onboarding:()=>h("onboarding"),waive:(e)=>h(`onboarding/${encodeURIComponent(e)}/waive`,{method:"POST"}),profile:()=>h("profile"),chooseSource:(e)=>h("profile/source",{method:"PUT",body:JSON.stringify({provider:e})}),links:()=>h("links"),issueLink:(e)=>h(`links/${encodeURIComponent(e)}/issue`,{method:"POST"}),confirmLink:(e,i)=>h(`links/${encodeURIComponent(e)}/confirm`,{method:"POST",body:JSON.stringify({request:i})}),cancelLink:(e)=>h(`links/${encodeURIComponent(e)}/cancel`,{method:"POST"}),unlink:(e)=>h(`links/${encodeURIComponent(e)}`,{method:"DELETE"})};
|
|
2
|
+
export{pe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o,r,l,J}from"./chunk-index-wt2asefx.js";function xe(f,e){let{version:u}=J(),[t,a]=r({data:void 0,error:void 0,subject:e});return o(()=>{let n=!0;return f().then((d)=>{if(n)a({data:d,error:void 0,subject:e})},(d)=>{if(n)a((i)=>({data:i.subject===e?i.data:void 0,error:l(d),subject:e}))}),()=>{n=!1}},[e,u]),t.subject===e?{data:t.data,error:t.error}:{data:void 0,error:void 0}}
|
|
2
|
+
export{xe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e,n}from"./chunk-index-
|
|
2
|
-
export{
|
|
1
|
+
import{e,n}from"./chunk-index-wt2asefx.js";function Bt(l){return n("fieldset",{className:"field",children:[e("legend",{children:l.label}),e("div",{className:"option-chips",children:l.options.map((a)=>e("button",{type:"button","aria-pressed":a.value===l.value,className:"option-chip",onClick:()=>l.onChange(a.value),children:a.label},a.value))})]})}
|
|
2
|
+
export{Bt};
|