pi-roundtable-web 0.30.1 → 0.30.4
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 +16 -0
- package/dist/chunk-account-xz99gxg8.js +1 -0
- package/dist/{chunk-action-menu-a1vy1se2.js → chunk-action-menu-fsxjfeaq.js} +1 -1
- package/dist/{chunk-agent-adfz539q.js → chunk-agent-bq536p6g.js} +1 -1
- package/dist/chunk-arranged-rooms-y2q330yg.js +1 -0
- package/dist/{chunk-attachments-hbnh1rvq.js → chunk-attachments-s1z9jggf.js} +2 -2
- package/dist/chunk-bulk-actions-je4qp745.js +1 -0
- package/dist/{chunk-character-creator-26fptwb3.js → chunk-character-creator-x8grfnwr.js} +2 -2
- package/dist/{chunk-codeeditor-429q64dw.js → chunk-codeeditor-3vh4q5af.js} +2 -2
- package/dist/{chunk-command-menu-qfpnv4xs.js → chunk-command-menu-2etjx0c7.js} +2 -2
- package/dist/chunk-confirm-wn14ffh3.js +1 -0
- package/dist/{chunk-connectors-04zaaz71.js → chunk-connectors-zxn3tbnv.js} +2 -2
- package/dist/{chunk-conversations-q87kx9w8.js → chunk-conversations-2w67mmvv.js} +1 -1
- package/dist/{chunk-council-sheet-zt24kn9f.js → chunk-council-sheet-b4b04w9y.js} +2 -2
- package/dist/chunk-council-view-wem4vdqc.js +1 -0
- package/dist/{chunk-drag-2vacsw42.js → chunk-drag-r9x782vs.js} +1 -1
- package/dist/{chunk-entry-71pd652j.js → chunk-entry-bq3j0xby.js} +1 -1
- package/dist/chunk-folder-list-bbn6ctsf.js +1 -0
- package/dist/chunk-folds-55w643e1.js +1 -0
- package/dist/{chunk-gate-2gpw5rte.js → chunk-gate-d8deb600.js} +1 -1
- package/dist/chunk-host-icons-knmx5qa0.js +1 -0
- package/dist/chunk-host-picture-42n2n9gp.js +1 -0
- package/dist/chunk-host-state-az2ka7rs.js +1 -0
- package/dist/chunk-host-ui-1s0xyghd.js +1 -0
- package/dist/chunk-index-0xq8m6nw.js +2 -0
- package/dist/chunk-index-1k6n0hh9.js +2 -0
- package/dist/{chunk-index-04ndj4hg.js → chunk-index-1kvnezap.js} +1 -1
- package/dist/{chunk-index-fq7hgc2n.js → chunk-index-25ewnkkb.js} +1 -1
- package/dist/chunk-index-3c4wvjkj.js +2 -0
- package/dist/chunk-index-4fyrpzwf.js +2 -0
- package/dist/{chunk-index-8d5r201w.js → chunk-index-50r5h98m.js} +1 -1
- package/dist/{chunk-index-0cnvzj8b.js → chunk-index-5j6m33d2.js} +1 -1
- package/dist/chunk-index-5x86qy8d.js +2 -0
- package/dist/{chunk-index-r1g24er0.js → chunk-index-63qqjbs8.js} +2 -2
- package/dist/{chunk-index-g086dss5.js → chunk-index-6btfp80d.js} +3 -3
- package/dist/{chunk-index-dqt0s3cq.js → chunk-index-6r61x1d2.js} +2 -2
- package/dist/{chunk-index-5rv9r0m6.js → chunk-index-711j3dpr.js} +2 -2
- package/dist/{chunk-index-s2ksy9pa.js → chunk-index-7379m5yw.js} +2 -2
- package/dist/{chunk-index-xzey5tdw.js → chunk-index-7wksnc48.js} +2 -2
- package/dist/{chunk-index-t7csmbpy.css → chunk-index-96bv2xfw.css} +1 -1
- package/dist/{chunk-index-ndhwytvz.js → chunk-index-9hb4042t.js} +1 -1
- package/dist/{chunk-index-bz4y6vne.js → chunk-index-9smnxvd0.js} +2 -2
- package/dist/{chunk-index-mec7bz30.js → chunk-index-ab60h2c5.js} +1 -1
- package/dist/{chunk-index-pz6926p5.js → chunk-index-apbknsyg.js} +2 -2
- package/dist/{chunk-index-ne8v2rxx.js → chunk-index-b093s676.js} +12 -12
- package/dist/chunk-index-b5924bb7.js +2 -0
- package/dist/chunk-index-bdf7gs56.js +2 -0
- package/dist/chunk-index-d0vznz2x.js +2 -0
- package/dist/{chunk-index-6e9nmad3.js → chunk-index-de5x85yn.js} +2 -2
- package/dist/chunk-index-e6z5kyz8.js +2 -0
- package/dist/chunk-index-evmzrr8e.js +2 -0
- package/dist/chunk-index-fdv6mepk.js +2 -0
- package/dist/chunk-index-ff8vzfgq.js +2 -0
- package/dist/chunk-index-hd7k712z.js +2 -0
- package/dist/{chunk-index-1pgm1gy4.js → chunk-index-hrpmm09c.js} +2 -2
- package/dist/{chunk-index-st18ee4w.js → chunk-index-htdkpbrd.js} +17 -17
- package/dist/{chunk-index-vxn4zws9.js → chunk-index-jsgs2gmq.js} +3 -3
- package/dist/{chunk-index-1ysj78e4.js → chunk-index-kjxva289.js} +1 -1
- package/dist/{chunk-index-g7w60s9y.js → chunk-index-kkcx4bns.js} +2 -2
- package/dist/{chunk-index-pp00qvdb.js → chunk-index-kvvmxbyh.js} +1 -1
- package/dist/{chunk-index-c035z7b4.js → chunk-index-mcb21c5a.js} +2 -2
- package/dist/chunk-index-n1w5rpxz.js +2 -0
- package/dist/{chunk-index-m7er2xt6.js → chunk-index-n7187vns.js} +2 -2
- package/dist/{chunk-index-435pq3gd.js → chunk-index-nk38jsgf.js} +1 -1
- package/dist/chunk-index-q6txr5q7.js +2 -0
- package/dist/{chunk-index-g1t5rfbe.js → chunk-index-r868k92r.js} +3 -3
- package/dist/{chunk-index-ry2p6s1f.js → chunk-index-rj8cvc66.js} +1 -1
- package/dist/{chunk-index-tn797j5g.js → chunk-index-rny986v2.js} +1 -1
- package/dist/{chunk-index-awc03q99.js → chunk-index-s6a9rvgd.js} +2 -2
- package/dist/{chunk-index-jzkr4hc2.js → chunk-index-sjt00y5k.js} +2 -2
- package/dist/{chunk-index-qzss6deb.js → chunk-index-sp35q2ay.js} +1 -1
- package/dist/{chunk-index-pcb3mskd.js → chunk-index-t9an6yb2.js} +2 -2
- package/dist/{chunk-index-0kwxrths.js → chunk-index-tc8s2rz3.js} +1 -1
- package/dist/chunk-index-tn9qzrj2.js +2 -0
- package/dist/{chunk-index-6y114be2.js → chunk-index-vgn794d7.js} +2 -2
- package/dist/{chunk-index-6gj4xkf7.js → chunk-index-vvxr0vz8.js} +1 -1
- package/dist/{chunk-index-9q2psqsq.js → chunk-index-w0vfwqck.js} +2 -2
- package/dist/{chunk-index-6j75embz.js → chunk-index-w1rarv3r.js} +2 -2
- package/dist/chunk-index-xfr1byr9.js +1 -0
- package/dist/{chunk-index-smvd91qx.js → chunk-index-xj1960qj.js} +2 -2
- package/dist/chunk-index-xwnkf825.js +2 -0
- package/dist/{chunk-index-cx9f5fae.js → chunk-index-y37ffyvy.js} +3 -3
- package/dist/{chunk-index-tqrjr37v.js → chunk-index-yrr5wvja.js} +2 -2
- package/dist/{chunk-index-2k2jvegd.js → chunk-index-z1fvb2kq.js} +3 -3
- package/dist/chunk-index-zwfdwgnb.js +138 -0
- package/dist/chunk-lang-css-nt7ezre4.js +1 -0
- package/dist/{chunk-lang-dockerfile-9rc0adjw.js → chunk-lang-dockerfile-4422dqj4.js} +1 -1
- package/dist/{chunk-lang-go-t47kg9n0.js → chunk-lang-go-1n73q49t.js} +1 -1
- package/dist/chunk-lang-html-p4yg906g.js +1 -0
- package/dist/chunk-lang-javascript-yqkd14sv.js +1 -0
- package/dist/{chunk-lang-json-y33kawwg.js → chunk-lang-json-zm1ts7s7.js} +1 -1
- package/dist/{chunk-lang-markdown-2c2sqc4z.js → chunk-lang-markdown-3cv6a1mc.js} +2 -2
- package/dist/{chunk-lang-python-ymasvj52.js → chunk-lang-python-ba7s8q8w.js} +1 -1
- package/dist/{chunk-lang-rust-qcg53mkn.js → chunk-lang-rust-gx2hj5cw.js} +1 -1
- package/dist/{chunk-lang-shell-996wb0dk.js → chunk-lang-shell-ec7k63jq.js} +1 -1
- package/dist/{chunk-lang-sql-60rh2y3y.js → chunk-lang-sql-svdp20tw.js} +1 -1
- package/dist/{chunk-lang-toml-q1yzt70y.js → chunk-lang-toml-nj3sefw0.js} +1 -1
- package/dist/chunk-lang-typescript-84y9c0f8.js +1 -0
- package/dist/{chunk-lang-xml-k2a92cm3.js → chunk-lang-xml-jzdsx03j.js} +1 -1
- package/dist/{chunk-lang-yaml-qp3asq06.js → chunk-lang-yaml-deh87m32.js} +1 -1
- package/dist/chunk-layout-actions-x0xxb5da.js +1 -0
- package/dist/{chunk-mention-menu-ag4gpcrb.js → chunk-mention-menu-b1k1tm6b.js} +1 -1
- package/dist/chunk-menu-items-2meta18j.js +1 -0
- package/dist/chunk-mode-toggle-7a44994f.js +1 -0
- package/dist/{chunk-note-row-wt0e0xgx.js → chunk-note-row-pab6wtf0.js} +3 -3
- package/dist/{chunk-notes-jd0ftn0y.js → chunk-notes-m0sjp2ct.js} +1 -1
- package/dist/{chunk-notice-bell-b71028rq.js → chunk-notice-bell-s15pgaw3.js} +1 -1
- package/dist/chunk-notices-zs8xg8v8.js +1 -0
- package/dist/{chunk-onboarding-fzz1x8vk.js → chunk-onboarding-sddzxrw5.js} +1 -1
- package/dist/{chunk-overview-whbzyq7x.js → chunk-overview-gkf6vfks.js} +1 -1
- package/dist/chunk-palette-m6bkdz1w.js +1 -0
- package/dist/chunk-placement-items-cb66mx65.js +1 -0
- package/dist/{chunk-profile-t5kyp6dt.js → chunk-profile-mvj96kv6.js} +1 -1
- package/dist/{chunk-prompt-history-cpejc2ce.js → chunk-prompt-history-mffm0c56.js} +1 -1
- package/dist/{chunk-prompts-am1gv3rx.js → chunk-prompts-26ey03ak.js} +1 -1
- package/dist/chunk-room-confirms-1j8qfyj9.js +1 -0
- package/dist/{chunk-room-menu-6swnygxx.js → chunk-room-menu-6myvrac1.js} +1 -1
- package/dist/chunk-rooms-menu-button-3cnm8wdd.js +1 -0
- package/dist/{chunk-schedules-y982gtmy.js → chunk-schedules-gjfm0x30.js} +1 -1
- package/dist/{chunk-seat-menu-2zhkhhav.js → chunk-seat-menu-neps7phz.js} +1 -1
- package/dist/chunk-section-fold-pgrjf74t.js +1 -0
- package/dist/{chunk-settings-p7rnj58y.js → chunk-settings-aa212bna.js} +1 -1
- package/dist/{chunk-sheet-hosts-n4y4b923.js → chunk-sheet-hosts-xwtaf228.js} +2 -2
- package/dist/{chunk-shortcut-help-nsspdnr8.js → chunk-shortcut-help-aaat3wrh.js} +2 -2
- package/dist/{chunk-shortcuts-2jsfcp8d.js → chunk-shortcuts-wt9x6qd6.js} +1 -1
- package/dist/{chunk-skill-editor-641sd772.js → chunk-skill-editor-4jkr948n.js} +2 -2
- package/dist/{chunk-skills-4h0sg7n3.js → chunk-skills-87rvtwt1.js} +1 -1
- package/dist/{chunk-start-over-line-en9pph7r.js → chunk-start-over-line-59zn5ekf.js} +2 -2
- package/dist/chunk-switcher-list-43n1vf29.js +1 -0
- package/dist/{chunk-tab-dot-jrv4g9we.js → chunk-tab-dot-773bfgn1.js} +1 -1
- package/dist/chunk-table-1ghv10s7.js +1 -0
- package/dist/{chunk-table2d-k4z439nt.js → chunk-table2d-4k5n9dxy.js} +1 -1
- package/dist/{chunk-table3d-9d3rwkwv.js → chunk-table3d-cwmxe12d.js} +21 -21
- package/dist/chunk-thread-actions-dd9ah02w.js +1 -0
- package/dist/{chunk-thread-cards-6tftqnrw.js → chunk-thread-cards-qs242xk1.js} +1 -1
- package/dist/{chunk-thread-list-wzwzbxx5.js → chunk-thread-list-qxymkzs9.js} +2 -2
- package/dist/{chunk-transcript-d9sfpsde.js → chunk-transcript-sjra3d3m.js} +1 -1
- package/dist/{chunk-waiting-chip-pq7cgh62.js → chunk-waiting-chip-yq3485cq.js} +2 -2
- package/dist/chunk-waiting-xmy1cyk1.js +1 -0
- package/dist/chunk-where-m6ss9smq.js +1 -0
- package/dist/{chunk-workspace-tb29dr0g.js → chunk-workspace-jt68gwza.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-account-95rkb2fp.js +0 -1
- package/dist/chunk-arranged-rooms-xjpg0rtg.js +0 -1
- package/dist/chunk-bulk-actions-m38vtkan.js +0 -1
- package/dist/chunk-confirm-t08tacqd.js +0 -1
- package/dist/chunk-council-view-m3660jv4.js +0 -1
- package/dist/chunk-folder-list-rpccjz2c.js +0 -1
- package/dist/chunk-folds-qb9a87bf.js +0 -1
- package/dist/chunk-host-icons-vhhks1vc.js +0 -1
- package/dist/chunk-host-picture-b8wne78x.js +0 -1
- package/dist/chunk-host-state-j9d5bfng.js +0 -1
- package/dist/chunk-host-ui-zy96k6pv.js +0 -1
- package/dist/chunk-index-0pghg70x.js +0 -2
- package/dist/chunk-index-20h87yfa.js +0 -2
- package/dist/chunk-index-2srjhjvg.js +0 -2
- package/dist/chunk-index-2ywap2mg.js +0 -2
- package/dist/chunk-index-4e5nhm4v.js +0 -2
- package/dist/chunk-index-4ehy2d04.js +0 -2
- package/dist/chunk-index-5n8npdch.js +0 -2
- package/dist/chunk-index-8k1ccvmx.js +0 -1
- package/dist/chunk-index-90f1mkn7.js +0 -138
- package/dist/chunk-index-90tq8g68.js +0 -2
- package/dist/chunk-index-92p9wmrg.js +0 -2
- package/dist/chunk-index-a36h36x0.js +0 -2
- package/dist/chunk-index-dafr7y87.js +0 -2
- package/dist/chunk-index-fnmtztjx.js +0 -2
- package/dist/chunk-index-pmtgrd3x.js +0 -2
- package/dist/chunk-index-qjqxs7c3.js +0 -2
- package/dist/chunk-index-r9yg1hpr.js +0 -2
- package/dist/chunk-index-w51vgeed.js +0 -2
- package/dist/chunk-index-wk3w90nq.js +0 -2
- package/dist/chunk-lang-css-6t2q4xw4.js +0 -1
- package/dist/chunk-lang-html-c6p22v5m.js +0 -1
- package/dist/chunk-lang-javascript-m57t19pw.js +0 -1
- package/dist/chunk-lang-typescript-7gcbrhbd.js +0 -1
- package/dist/chunk-layout-actions-6vm38ver.js +0 -1
- package/dist/chunk-menu-items-fk3m74y3.js +0 -1
- package/dist/chunk-mode-toggle-zy1wgyc7.js +0 -1
- package/dist/chunk-notices-qhghsyh5.js +0 -1
- package/dist/chunk-palette-dgf96b8y.js +0 -1
- package/dist/chunk-placement-items-e0bfeqj4.js +0 -1
- package/dist/chunk-room-confirms-a3m74jfg.js +0 -1
- package/dist/chunk-rooms-menu-button-ret11jfe.js +0 -1
- package/dist/chunk-section-fold-h1fpkayc.js +0 -1
- package/dist/chunk-switcher-list-pr884et3.js +0 -1
- package/dist/chunk-table-g56wwdmh.js +0 -1
- package/dist/chunk-thread-actions-y30fzpje.js +0 -1
- package/dist/chunk-waiting-emww5evj.js +0 -1
- package/dist/chunk-where-e7we9q52.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o,R,C,r,t,g,e,n,X,
|
|
2
|
-
`);o(()=>{if(!a.open)return;if(G(void 0),j(i===void 0),z(""),k(!1),O(void 0),S(""),M(i?[...i.members??[]]:
|
|
1
|
+
import{o,R,C,r,t,g,e,n,X,c,f,m,Ne}from"./chunk-index-htdkpbrd.js";import"./chunk-index-63qqjbs8.js";import"./chunk-index-t9an6yb2.js";import"./chunk-index-hrpmm09c.js";import{xi}from"./chunk-index-zwfdwgnb.js";import{Zt}from"./chunk-index-rj8cvc66.js";import{A}from"./chunk-index-1kvnezap.js";import{Yt,Wn,Jr,Ri,_s,Ts,Ps,Qs,Ms}from"./chunk-index-3c4wvjkj.js";import{re,Ie}from"./chunk-index-kvvmxbyh.js";var Q=(a)=>X("table",a.name,{replace:!0});function W(a){let{view:i}=a;return e("li",{children:n("button",{type:"button",className:"menu-item council-row","aria-current":a.current||void 0,onClick:a.onPick,children:[e(Ne,{view:i,size:40}),n("span",{className:"menu-text",children:[e("strong",{children:i.displayName}),e("span",{className:"meta",children:t("{count} knights",{count:i.members?.length??0})})]})]})})}function Y(a){let{council:i}=a,w=Ri(),d=xi(),[v,M]=r([]),[y,O]=r(),[D,S]=r(""),[I,j]=r(!1),[P,z]=r(""),[b,k]=r(!1),[E,G]=r(),F=R(),x=i?.name,H=i?.members?.join(`
|
|
2
|
+
`);o(()=>{if(!a.open)return;if(G(void 0),j(i===void 0),z(""),k(!1),O(void 0),S(""),M(i?[...i.members??[]]:_s(d)),!x)return;let s=!0;return re.group(x).then((l)=>{if(!s)return;O(l),S(l.host)},()=>{return}),()=>{s=!1}},[a.open,x,H]);let L=C(()=>new Set(d.map((s)=>s.name)),[d]),U=d.find((s)=>s.home)?.name,u=Ps(v,(s)=>L.has(s)),h=Qs(u,D||void 0,U),_=(s)=>d.find((l)=>l.name===s)?.displayName??s,T=u.length>=Yt,N=u.length>=Wn,q=i===void 0||u.join(",")!==(i.members??[]).join(",")||y!==void 0&&h!==y.host,B=async(s)=>{k(!0),G(void 0);try{await s(),await Ie()}catch(l){return G(c(l)),k(!1),!1}return k(!1),!0},J=async()=>{if(!i)return;if(!await B(async()=>{await re.updateGroup(i.name,{...u.join(",")!==(i.members??[]).join(",")?{members:u}:{},...y&&h!==y.host?{host:h}:{}})}))return;f(t("Saved.")),a.onClose()},K=async()=>{let s=P.trim();if(s==="")return;let l=new Set([...d.map((V)=>V.name),...w.map((V)=>V.name)]),p;if(!await B(async()=>{p=await re.createGroup({name:Ms(s,l),displayName:s,members:u,host:h})})||!p)return;Jr(p.room),a.go({key:p.room,name:p.name}),f(t("Made {name}.",{name:p.displayName})),a.onClose()};return n("div",{className:"stack council-sheet",children:[w.length>0?n("section",{className:"stack","aria-label":t("Councils"),children:[e("h3",{children:t("Councils")}),e("ul",{className:"menu",children:w.map((s)=>e(W,{view:s,current:s.key===i?.key,onPick:()=>{Jr(s.key),a.go(s),a.onClose()}},s.key))})]}):null,n("fieldset",{className:"field council-pick",children:[e("legend",{children:i?t("Edit this council"):t("Pick who sits")}),n("span",{className:"meta council-count","aria-live":"polite",children:[t("{count} of {max} picked",{count:u.length,max:Yt}),T?` · ${t("At most {max} knights",{max:Yt})}`:""]}),e("ul",{className:"menu",children:d.map((s)=>{let l=v.includes(s.name);return e("li",{children:n("label",{className:"menu-item menu-toggle seat-row",children:[e("input",{type:"checkbox",checked:l,disabled:!l&&T,onChange:()=>M(Ts(v,s.name,Yt))}),e(Ne,{view:s,size:32}),e("span",{className:"menu-text",children:e("strong",{children:s.displayName})})]})},s.key)})})]}),N?e(Zt,{label:t("Host"),value:h,onChange:S,options:u.map((s)=>({value:s,label:_(s)}))}):e("span",{className:"meta",children:t("A council needs at least {min} knights.",{min:Wn})}),I?n("label",{htmlFor:F,children:[t("Council name"),e("input",{id:F,value:P,autoComplete:"off",onChange:(s)=>z(s.target.value)})]}):null,E?e(m,{message:E}):null,e("div",{className:"actions",children:i&&!I?n(g,{children:[e("button",{type:"button",className:"secondary",disabled:!N||b,onClick:()=>j(!0),children:t("Save as a new council")}),e("button",{type:"button",disabled:!N||!q||b,onClick:J,children:b?t("Saving…"):t("Done")})]}):e("button",{type:"button",disabled:!N||P.trim()===""||b,onClick:K,children:b?t("Saving…"):i?t("Save as a new council"):t("Make council")})})]})}function fe(a){return e(A,{open:a.open,title:t("Council"),onClose:a.onClose,size:"default",children:e(Y,{open:a.open,council:a.council,onClose:a.onClose,go:a.go??Q})})}export{fe as CouncilSheet};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tr,Vr}from"./chunk-index-zwfdwgnb.js";import"./chunk-index-bdf7gs56.js";import"./chunk-index-t9an6yb2.js";import"./chunk-index-1kvnezap.js";import"./chunk-index-fdv6mepk.js";import"./chunk-index-63qqjbs8.js";import"./chunk-index-hrpmm09c.js";export{Vr as CouncilView,tr as useCouncilSheet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ho}from"./chunk-index-htdkpbrd.js";import{so}from"./chunk-index-q6txr5q7.js";import{fa,pa,Uo,Vo,ma,ga}from"./chunk-index-mcb21c5a.js";var re=ho,ie=(s)=>{for(let n=s;n;n=n.parentElement){let{overflowY:a}=getComputedStyle(n);if((a==="auto"||a==="scroll")&&n.scrollHeight>n.clientHeight)return n}return document.scrollingElement??document.documentElement};function de(s){let{item:n,root:a,key:f,mode:C}=s,m=ie(a),O=m===document.scrollingElement||m===document.documentElement,A=()=>O?0:m.getBoundingClientRect().top,j=()=>O?window.innerHeight:m.clientHeight,x=(e)=>e-A()+m.scrollTop,c=(e)=>{let t=e.getBoundingClientRect();return{top:x(t.top),height:t.height}},u=document.createElement("div");u.className="drop-line",u.setAttribute("aria-hidden","true");let z=[],P=[],v=[],g=[],R=[],B={top:0,bottom:0},D=()=>{let e=[...a.querySelectorAll("[data-drop-item], [data-folder-block]")].map((t)=>[t,t.style.transform]);for(let[t]of e)t.style.removeProperty("transform");try{G()}finally{for(let[t,r]of e)if(r)t.style.transform=r}},G=()=>{if(C==="room"){P=[...a.querySelectorAll("[data-drop-zone]")],z=P.map((t)=>{let{top:r,height:T}=c(t);return{id:t.dataset.zoneId??"",kind:t.dataset.dropZone,...t.dataset.folder?{folder:t.dataset.folder}:{},top:r,bottom:r+T,items:t.dataset.collapsed===void 0?[...t.querySelectorAll("[data-drop-item]")].map((o)=>({key:o.dataset.key??"",...c(o)})):[]}});return}v=[...a.querySelectorAll(":scope > [data-folder-block]")],g=v.map((t)=>({key:t.dataset.key??"",...c(t)})),R=v.map((t)=>({key:t.dataset.key??"",...c(t.querySelector("[data-folder-head]")??t)}));let e=c(a);B={top:e.top,bottom:e.top+e.height}};so(!0);let J=n.getBoundingClientRect().top;n.setAttribute("data-lifted",""),a.setAttribute("data-reordering","");let F=n.getBoundingClientRect().top-J;if(F)m.scrollTop+=F;D();let Q=x(s.y),I={x:0,y:s.y},Z=!1,p=0,h,d,q={type:"cancel"};try{n.setPointerCapture(s.pointerId)}catch{}let _=()=>{p=0;let e=x(I.y),t=e-Q;if(Math.abs(t)>re)Z=!0;n.style.transform=`translate3d(0, ${t}px, 0)`;let r;if(C==="room"){let o=fa(z,f,e);q=o?{type:"room",drop:o}:{type:"cancel"};let H=o?z.indexOf(o.zone):-1;r=P[H];let y=r?.contains(n)??!1,E=o?.zone.kind!=="rest";if(!E&&y)r=void 0;let i=o&&E?o.zone.items:[],M=y?[...r.querySelectorAll("[data-drop-item]")]:[],U=i.findIndex((l)=>l.key===f),ee=o?Vo(i.map((l)=>l.key),f,o.before):0,te=i.length>1?Math.max(0,(i[1]?.top??0)-(i[0]?.top??0)-(i[0]?.height??0)):0,X=y&&U>=0?Uo(i,U,ee,te):[];for(let l of document.querySelectorAll("[data-drop-item]:not([data-lifted])"))l.style.removeProperty("transform");if(M.forEach((l,k)=>{if(X[k])l.style.transform=`translate3d(0, ${X[k]}px, 0)`}),r&&o&&!y&&E){let l=o.before===null?void 0:o.zone.items.find((ne)=>ne.key===o.before),k=c(r).top,oe=l?l.top-k:o.zone.items.length?c(r).height:0;u.style.top=`${oe}px`,r.append(u)}else u.remove();if(o?.zone.kind==="folder"&&o.zone.items.length===0&&r?.dataset.collapsed!==void 0){if(d?.zone!==o.zone.id){if(d)clearTimeout(d.timer);let l=o.zone.folder??"";d={zone:o.zone.id,timer:setTimeout(()=>{s.open(l),requestAnimationFrame(()=>requestAnimationFrame(()=>{D(),w()}))},ga)}}}else if(d)clearTimeout(d.timer),d=void 0}else{let o=pa(R,B,f,e);q=o?{type:"folder",before:o.before}:{type:"cancel"};let H=g.findIndex((i)=>i.key===f),y=o?Vo(g.map((i)=>i.key),f,o.before):H,E=Uo(g,H,y,12);v.forEach((i,M)=>{if(i!==n)i.style.transform=E[M]?`translate3d(0, ${E[M]}px, 0)`:""})}if(r!==h)h?.removeAttribute("data-drop-target"),r?.setAttribute("data-drop-target",""),h=r;let T=ma(I.y,A(),A()+j());if(T)m.scrollTop+=T,w()},w=()=>{if(!p)p=requestAnimationFrame(_)},L=(e)=>{W(),s.done(e)},S=(e)=>e.pointerId===s.pointerId,K=(e)=>{if(!S(e))return;e.stopPropagation(),e.preventDefault(),I={x:e.clientX,y:e.clientY},w()},N=(e)=>{if(!S(e))return;if(e.stopPropagation(),p)cancelAnimationFrame(p),_();L(Z?q:{type:"tap"})},V=(e)=>{if(S(e))L({type:"cancel"})},Y=(e)=>{if(e.key!=="Escape")return;e.preventDefault(),e.stopPropagation(),L({type:"cancel"})},b=(e)=>e.preventDefault();function W(){if(so(!1),window.removeEventListener("pointermove",K,!0),window.removeEventListener("pointerup",N,!0),window.removeEventListener("pointercancel",V,!0),window.removeEventListener("keydown",Y,!0),window.removeEventListener("touchmove",b,!0),window.removeEventListener("contextmenu",b,!0),p)cancelAnimationFrame(p);if(d)clearTimeout(d.timer);h?.removeAttribute("data-drop-target"),u.remove(),n.removeAttribute("data-lifted"),n.style.removeProperty("transform"),a.removeAttribute("data-reordering");for(let e of a.querySelectorAll("[data-drop-item], [data-folder-block]"))e.style.removeProperty("transform");try{n.releasePointerCapture(s.pointerId)}catch{}}return window.addEventListener("pointermove",K,!0),window.addEventListener("pointerup",N,!0),window.addEventListener("pointercancel",V,!0),window.addEventListener("keydown",Y,!0),window.addEventListener("touchmove",b,{capture:!0,passive:!1}),window.addEventListener("contextmenu",b,!0),w(),()=>L({type:"cancel"})}export{de as lift};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et,Wt}from"./chunk-index-0xdptr30.js";import{p}from"./chunk-index-
|
|
1
|
+
import{Et,Wt}from"./chunk-index-0xdptr30.js";import{p}from"./chunk-index-htdkpbrd.js";function H(){try{let c=document.createElement("canvas");return!!(c.getContext("webgl2")||c.getContext("webgl"))}catch{return!1}}function x(c,n){return[c,n.includes("?")?n.slice(n.indexOf("?")):""].some((m)=>{let d=new URLSearchParams(m).get("nogl");return d!==null&&d!=="0"&&d!=="false"})}async function I(c,n,T){let m=n.variant==="compact",d=n.labels??Wt,l=new Map,E=(e)=>{l.clear();for(let t of e)l.set(t.id,{...t})};E(n.seats);let f={t:n.theme,s:n.scheme},a=null,o=document.createElement("div");o.className="rt-table",o.dataset.variant=m?"compact":"full";let g=document.createElement("div");g.className="rt-table-stage",o.appendChild(g);let r=null,y=!1,A=()=>!m&&(Boolean(n.listBelow)||y);c.appendChild(o);let u=new Map,S=()=>{if(!A()){r?.remove(),r=null,u.clear(),delete o.dataset.list;return}if(!r)r=document.createElement("ul"),r.className="rt-table-list",r.setAttribute("aria-label",d.table),o.appendChild(r),o.dataset.list="";for(let e of[...u.keys()])if(!l.has(e))u.delete(e);for(let e of l.values()){let t=u.get(e.id);if(!t){t=document.createElement("button"),t.type="button",t.dataset.seat=e.id;let s=e.id;t.addEventListener("click",(i)=>{let b=l.get(s);if(b)n.onSeatClick({id:b.id,name:b.name,at:Et(i,i.currentTarget)})}),u.set(e.id,t)}t.textContent=d.seat(e.name,e.state??"idle"),t.style.setProperty("--seat",e.color)}r.replaceChildren(...[...l.values()].map((e)=>{let t=document.createElement("li"),s=u.get(e.id);if(s)t.appendChild(s);return t}))};S();let w=(e)=>{y=!e,S(),n.onNames?.(e)},v=async()=>{let{createTable2D:e}=await (p("4k5n9dxy"),import("./chunk-table2d-4k5n9dxy.js"));a=e(g,{...n,theme:f.t,scheme:f.s,seats:[...l.values()]}),w(!0)},C=async()=>{let{createTable3D:e}=await (p("cwmxe12d"),import("./chunk-table3d-cwmxe12d.js"));a=e(g,{...n,theme:f.t,scheme:f.s,seats:[...l.values()],onNames:w},()=>{a?.dispose(),v()})};if(m||T==="svg"||T!=="webgl"&&(x(location.search,location.hash)||!H()))await v();else try{await C()}catch{await v()}let M,L=n.onSeatMenu;if(L){let{attachSeatMenu:e}=await (p("neps7phz"),import("./chunk-seat-menu-neps7phz.js"));M=e(o,(t,s,i)=>{let b=t instanceof Element?t.closest("[data-seat]")?.dataset.seat:void 0,h=l.get(b??a?.seatAt?.(s,i)??"");return h?{id:h.id,name:h.name}:void 0},L)}return{get kind(){return a.kind},setTheme(e,t){f={t:e,s:t},a.setTheme(e,t)},setSeats(e){E(e),S(),a.setSeats(e)},setState(e,t){let s=l.get(e);if(s)s.state=t;S(),a.setState(e,t)},setMark:(e,t)=>a.setMark(e,t),setAvatar(e,t,s){let i=l.get(e);if(i)if(i.avatarSvg=t,s===void 0)delete i.talkSvg;else i.talkSvg=s;return a.setAvatar(e,t,s)},setReducedMotion:(e)=>a.setReducedMotion(e),resetCamera:()=>a.resetCamera(),focus:(e,t)=>a.focus(e,t),focused:()=>a.focused(),seatAt:(e,t)=>a.seatAt?.(e,t)??null,getStats:()=>a.getStats(),dispose(){M?.(),a?.dispose(),o.remove()}}}export{I as mountRoundTable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p,o,R,t,F,g,e,n,s,Me,l,Oe,It,oi,Oo,yo,Ne,li,$n}from"./chunk-index-htdkpbrd.js";import"./chunk-index-hrpmm09c.js";import"./chunk-index-50r5h98m.js";import{dr}from"./chunk-index-y37ffyvy.js";import{Jt}from"./chunk-index-n7187vns.js";import{Yi}from"./chunk-index-w0vfwqck.js";var N=()=>(p("x0xxb5da"),import("./chunk-layout-actions-x0xxb5da.js")),b=(a)=>(p("cb66mx65"),import("./chunk-placement-items-cb66mx65.js")).then((r)=>r.folderMenu(a)),w=(a)=>({mode:"folder",key:a,item:(r)=>r.closest("[data-folder-block]"),root:(r)=>r.closest("[data-folder-block]")?.parentElement??null,onDrop:(r)=>{if(r.type==="folder")N().then((i)=>i.placeFolderBefore(a,r.before))},open:Oo});function k(a){let{id:r,name:i}=a,d=!a.folded,m=R(),c=Jt(()=>b(r),w(r)),u=(f)=>{b(r).then((y)=>{if(!y)return;let h=f.getBoundingClientRect();Oe({...y,at:{x:h.left,y:h.bottom},via:"key",source:f})},()=>{return})};return n("section",{className:"folder","aria-label":i,"data-folder-block":"","data-key":r,"data-drop-zone":"folder","data-zone-id":r,"data-folder":r,"data-collapsed":d?void 0:"",children:[n("header",{className:"folder-head","data-folder-head":"",...c,children:[n("button",{type:"button",className:"folder-toggle","aria-expanded":d,"aria-controls":m,"aria-label":d?t("Collapse {name}",{name:i}):t("Expand {name}",{name:i}),onClick:()=>oi(r),children:[e(s,{name:"chevron",size:16,className:"folder-chevron","data-open":d||void 0}),e("strong",{children:i}),e("span",{className:"meta",children:F(a.count,"{count} room","{count} rooms")}),d?null:a.stack]}),a.muted==="none"?null:e(s,{name:"bell-off",size:14,className:"muted-mark","data-partial":a.muted==="some"||void 0,role:"img","aria-hidden":!1,"aria-label":a.muted==="all"?t("Notifications are off"):t("Some notifications are off")}),d?null:a.summary,e("button",{type:"button",className:"icon-button folder-more","aria-haspopup":"menu","aria-label":t("Folder menu"),onClick:(f)=>u(f.currentTarget),children:e(s,{name:"more",size:18})})]}),e("div",{id:m,className:"folder-body",hidden:!d&&a.shown===0,children:d&&a.count===0?e("p",{className:"meta folder-empty",children:t("No rooms in this folder yet.")}):a.shown>0?a.children:null})]})}var S=4;function v(a){let r=a.rooms.slice(0,S),i=l((m)=>r.map((c)=>m.rooms[c]?.view),r.join(",")),d=a.rooms.length-r.length;return n("span",{className:"folder-stack","aria-hidden":"true",children:[i.map((m)=>m?e("span",{className:"folder-stack-item",children:e(Ne,{view:m,size:28})},m.key):null),d>0?n("span",{className:"folder-stack-more",children:["+",d]}):null]})}function M(a){let r=l((i)=>({waiting:a.rooms.reduce((d,m)=>d+Me(i,m),0),typing:a.rooms.some((d)=>i.rooms[d]?.typing)}),a.rooms.join(","));return n(g,{children:[r.typing?e(li,{}):null,r.waiting?e($n,{count:r.waiting}):null]})}function C(a){return l((r)=>Yi(a,(i)=>r.rooms[i]?.view?.muted===!0),a.join(","))}function U(a){let r=a.folders.map((i)=>i.id).join(",");return o(()=>{if(a.listed)yo(r?r.split(","):[])},[a.listed,r]),e(g,{children:a.folders.map((i)=>e(B,{folder:i,...a},i.id))})}function B(a){let{folder:r}=a,i=C(r.rooms),d=It().has(r.id),m=dr(r.rooms,a.active),c=d?m:r.rooms,u=d?r.rooms.filter((f)=>!m.includes(f)):[];return e(k,{id:r.id,name:r.name,count:r.rooms.length,folded:d,shown:c.length,muted:i,summary:e(M,{rooms:u}),stack:u.length>0?e(v,{rooms:u}):null,children:a.rooms(c)})}export{U as FolderList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$e,It,go,oi,Oo,yo}from"./chunk-index-htdkpbrd.js";export{go as collapsedNow,Oo as expandFolder,yo as pruneCollapsed,$e as sectionFold,oi as toggleCollapsed,It as useCollapsed};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,e,n,s,x}from"./chunk-index-
|
|
1
|
+
import{t,e,n,s,x}from"./chunk-index-htdkpbrd.js";import{Bn,fn}from"./chunk-index-vvxr0vz8.js";function l({steps:p}){return n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Finish setting up")})}),e("p",{className:"meta",children:t("These steps come first. The rest of the app opens when they are done.")}),e("ul",{className:"menu",children:p.map((a)=>e("li",{children:n("a",{className:"menu-item menu-link",href:x(a.open.page),children:[n("span",{className:"menu-text",children:[e("strong",{children:Bn(a)}),fn(a)?e("span",{className:"meta",children:fn(a)}):null]}),e(s,{name:"chevron",size:16})]})},a.id))})]})}export{l as GatePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-index-ab60h2c5.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{st}from"./chunk-index-sp35q2ay.js";export{st as HostPicture};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Co,me,Ar,Eo,Ao,$o,No,an,$r,Lo,Ua}from"./chunk-index-hrpmm09c.js";export{Lo as keepCards,$r as keepReads,No as noCards,$o as noReads,Ua as onFrame,an as seedUnread,Co as subscribeHost,Eo as totalUnread,Ao as unreadCounts,Ar as unreadOf,me as useHost};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ee,E,o,R,Se,C,a,r,t,F,g,e,n,s,x,xn,O,l,fe,c,f,S,m,k,Q,tn,ei,$t,_,uo,Te,nn,kn,Nt,_n,Re,Tn,zt,mo,te,En,_r,Tr,Pr,Ce}from"./chunk-index-htdkpbrd.js";import{qn}from"./chunk-index-t9an6yb2.js";import{nr,ls,He,ir,Si}from"./chunk-index-bdf7gs56.js";import{D}from"./chunk-index-kjxva289.js";import{me,$o,No,an,$r,Lo}from"./chunk-index-hrpmm09c.js";import{ot,st}from"./chunk-index-sp35q2ay.js";import{qr}from"./chunk-index-z1fvb2kq.js";import"./chunk-index-ab60h2c5.js";import{Ae}from"./chunk-index-6btfp80d.js";import{H}from"./chunk-index-evmzrr8e.js";import"./chunk-index-1kvnezap.js";function Ke(d){let i={};for(let u of d)if(u.type==="multiselect")i[u.name]=[..._e(u.initial)];else i[u.name]=_e(u.initial)[0]??"";return i}var _e=(d)=>d===void 0?[]:typeof d==="string"?[d]:[...d];function et(d,i){let u={};for(let p of d){let w=i[p.name];if(w===void 0||w===""||w.length===0)continue;u[p.name]=w}return u}function tt(d){let{field:i,value:u}=d,[p,w]=r(""),y=i.search?i.options.filter((h)=>h.label.toLowerCase().includes(p.trim().toLowerCase())):i.options,v=i.search?e("input",{type:"search",value:p,placeholder:t("Search…"),"aria-label":t("Search {name}",{name:i.label}),onChange:(h)=>w(h.target.value)}):null;if(i.type==="select")return n(g,{children:[v,n(Ae,{id:d.id,value:String(u),required:i.required===!0,"aria-describedby":d.described,...i.search?{size:6}:{},onChange:(h)=>d.onChange(h.target.value),children:[i.required?null:e("option",{value:"",children:t("None")}),y.map((h)=>e("option",{value:h.value,children:h.label},h.value))]})]});let b=new Set(Array.isArray(u)?u:[]);return n(g,{children:[v,e("fieldset",{"aria-describedby":d.described,children:y.map((h)=>n("label",{children:[e("input",{type:"checkbox",checked:b.has(h.value),onChange:(M)=>{let A=new Set(b);if(M.target.checked)A.add(h.value);else A.delete(h.value);d.onChange(i.options.filter((P)=>A.has(P.value)).map((P)=>P.value))}}),h.label]},h.value))})]})}function nt(d){let{field:i,value:u}=d,p=R(),w="hint"in i?i.hint:void 0,y=d.error||w?`${p}-note`:void 0,v;if("options"in i)v=e(tt,{field:i,id:p,value:u,described:y,onChange:d.onChange});else if(i.type==="textarea")v=e("textarea",{id:p,rows:5,value:String(u),maxLength:i.max??8000,required:i.required===!0,"aria-describedby":y,onChange:(b)=>d.onChange(b.target.value)});else v=e("input",{id:p,type:i.type==="url"?"url":"text",value:String(u),maxLength:i.max??500,required:i.required===!0,"aria-describedby":y,onChange:(b)=>d.onChange(b.target.value)});return n("div",{className:"host-field",children:[i.type==="multiselect"?e("span",{className:"field-label",children:i.label}):e("label",{htmlFor:p,children:i.label}),v,d.error||w?e("span",{id:`${p}-note`,className:d.error?"field-error":"hint",role:d.error?"alert":void 0,children:d.error??w}):null]})}function pe(d){let{spec:i}=d,[u,p]=r(()=>Ke(i.fields)),[w,y]=r(!1),[v,b]=r();return n("form",{className:"host-form",onSubmit:async(M)=>{if(M.preventDefault(),w)return;y(!0),b(void 0);try{b(await d.onSubmit(et(i.fields,u)))}catch(A){b({error:c(A)})}finally{y(!1)}},children:[i.fields.map((M)=>e(nt,{field:M,value:u[M.name]??"",error:v?.field===M.name?v.error:void 0,onChange:(A)=>p((P)=>({...P,[M.name]:A}))},M.name)),v&&!i.fields.some((M)=>M.name===v.field)?e(m,{message:v.error}):null,n("div",{className:"actions",children:[d.onCancel?e("button",{type:"button",className:"secondary",disabled:w,onClick:d.onCancel,children:t("Cancel")}):null,e("button",{type:"submit",disabled:w,children:i.submit})]})]})}function rt(d){if(!d.ok)return{error:nr(d.error),...d.field?{field:d.field}:{}};if(d.notice)f(d.notice);if(d.open)ir(d.open);return}function oe(d){let[i,u]=r(),[p,w]=r(!1),y=async(b,h)=>rt(await d.run(b,h)),v=async(b)=>{if(b.form||b.confirm){u(b);return}w(!0);try{let h=await y(b,{});if(h)f(h.error,"danger")}catch(h){f(c(h),"danger")}finally{w(!1)}};if(d.actions.length===0)return null;return n("div",{className:d.className??"host-actions",children:[d.actions.map((b)=>e("button",{type:"button",className:b.style==="danger"?"danger":b.style==="secondary"?"secondary":"",disabled:p,onClick:()=>v(b),children:b.label},b.id)),i?.form?e(H,{open:!0,title:i.form.title,onClose:()=>u(void 0),children:e(pe,{spec:i.form,onCancel:()=>u(void 0),onSubmit:async(b)=>{let h=await y(i,b);if(!h)u(void 0);return h}})}):i?e(D,{open:!0,title:i.label,confirmLabel:i.label,tone:i.style==="danger"?"danger":"primary",onConfirm:async()=>{let b=await y(i,{});if(b)throw Error(b.error)},onClose:()=>u(void 0),children:e("p",{children:i.confirm})}):null]})}var qe=/^file:([A-Za-z0-9_-]{1,64})$/;function ze(d){let i=URL.parse(d,document.baseURI);return i!==null&&i.origin===window.location.origin}function it({id:d,alt:i}){return e("img",{className:"file-image",src:`api/files/${encodeURIComponent(d)}`,alt:i,loading:"lazy",decoding:"async",onError:(u)=>{let p=document.createElement("span");p.textContent=i||t("Image"),u.currentTarget.replaceWith(p)}})}var re=ee(function({source:i}){return e("div",{className:"prose",children:e(tn,{remarkPlugins:[$t],urlTransform:(u)=>qe.test(u)?u:ei(u),components:{a:({href:u,children:p})=>u&&/^https?:\/\//.test(u)&&!ze(u)?e("a",{href:u,target:"_blank",rel:"noreferrer noopener",children:p}):u&&ze(u)?e("a",{href:u,children:p}):e("span",{children:p}),img:({src:u,alt:p})=>{let w=typeof u==="string"?qe.exec(u):null;return w?.[1]?e(it,{id:w[1],alt:p??""}):e("span",{children:p})},pre:uo,table:({children:u})=>e("div",{className:"table-wrap",children:e("table",{children:u})})},children:i})})});function at(d){switch(d??"open"){case"working":return t("Working…");case"done":return t("Done");case"superseded":return t("Replaced");case"expired":return t("Expired");default:return""}}var Ne=(d)=>(d.state??"open")==="open";function ae(d){let{card:i}=d,u=at(i.state);return n("article",{className:"host-card","data-tone":i.tone??"note","data-state":i.state??"open",children:[n("header",{children:[e("h3",{children:i.title}),u?e(Q,{tone:i.state==="working"?"busy":"plain",children:u}):null]}),i.body?e(re,{source:i.body}):null,i.links?.length?e("div",{className:"host-card-links",children:i.links.map((p)=>e("a",{href:p.url,...p.url.startsWith("/")?{}:{target:"_blank",rel:"noreferrer noopener"},children:p.label},`${p.url}`))}):null,Ne(i)&&i.buttons?.length?e(oe,{actions:i.buttons,run:d.run}):null]})}ot();function lt(){let[d,i]=r(()=>qn().toString());return o(()=>{let u=()=>i(qn().toString());return window.addEventListener("popstate",u),window.addEventListener("hashchange",u),()=>{window.removeEventListener("popstate",u),window.removeEventListener("hashchange",u)}},[]),d}function ct(d){if(!d.ok)return{error:nr(d.error),...d.field?{field:d.field}:{}};if(d.notice)f(d.notice);if(d.open)ir(d.open);return}function dt(d){let{section:i}=d;switch(i.kind){case"markdown":return e(re,{source:i.text});case"card":return e(ae,{card:i.card,run:d.run});case"form":return n("section",{className:"stack",children:[e("h2",{className:"section-title",children:i.form.title}),e(pe,{spec:i.form,onSubmit:(u)=>d.submit(i.action,u)})]});case"list":return n("section",{className:"stack",children:[i.title?e("h2",{className:"section-title",children:i.title}):null,i.rows.length===0?e(k,{children:t("Nothing here.")}):null,e("ul",{className:"host-list",children:mt(i.rows).map(([u,p])=>n("li",{children:[p.attention?e("span",{className:"attention-dot",role:"img","aria-label":t("Needs attention")}):null,n("div",{className:"host-list-main",children:[p.open?e("a",{href:p.open,...p.open.startsWith("/")?{}:{target:"_blank",rel:"noreferrer noopener"},children:p.title}):e("strong",{children:p.title}),p.subtitle?e("span",{children:p.subtitle}):null]}),p.actions?.length?e(oe,{actions:p.actions,run:d.run}):null]},u))})]})}}function ut({routeKey:d}){let i=d??"",u=lt(),p=me((A)=>A.pages[i]??0),[w,y]=r(0),[v,b]=r({});o(()=>{let A=!0;return He.page(i,Object.fromEntries(new URLSearchParams(u))).then((P)=>A&&b({page:P}),(P)=>{if(!A)return;let z=P instanceof fe&&P.status===404;b((U)=>({...z||!U.page?{}:{page:U.page},error:c(P),gone:z}))}),()=>{A=!1}},[i,u,p,w]);let h=async(A,P)=>{let z=await He.pageAct(i,{action:A,input:P}),U=ct(z);if(!U)y((V)=>V+1);return U},M=async(A,P)=>{let z=await He.pageAct(i,{action:A.id,input:P});if(z.ok)y((U)=>U+1);return z};if(v.gone)return e("div",{className:"page",children:e(k,{children:t("This page is not available.")})});if(!v.page)return e("div",{className:"page",children:v.error?e(m,{message:v.error}):e(S,{})});return n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:v.page.title})}),v.error?e(m,{message:v.error}):null,v.page.sections.map((A,P)=>e(dt,{section:A,run:M,submit:h},P))]})}function mt(d){let i=new Map;return d.map((u)=>{let p=i.get(u.title)??0;return i.set(u.title,p+1),[`${u.title}:${p}`,u]})}function Ue(d){let i=me((M)=>M.cards[d.room]??No),u=Re("(min-width: 720px) and (min-height: 760px)"),[p,w]=r();if(i.length===0)return null;let y=i.filter((M)=>Ne(M)||M.state==="working"),v=i.filter((M)=>!y.includes(M)),b=p??(u&&y.length>0),h=y[0];return n("div",{className:"host-cards","data-open":b||void 0,children:[n("button",{type:"button",className:"host-cards-toggle","aria-expanded":b,onClick:()=>w(!b),children:[e(s,{name:"chevron",size:14}),h?n("span",{children:[e("strong",{children:F(y.length,"{count} card waiting","{count} cards waiting")}),`: ${h.title}`]}):e("span",{children:t("Earlier cards ({count})",{count:v.length})})]}),b?n("div",{className:"host-cards-body",children:[y.map((M)=>e(ae,{card:M,run:d.run(M.id)},M.id)),v.length?n("details",{className:"host-cards-older",children:[e("summary",{children:t("Earlier cards ({count})",{count:v.length})}),v.map((M)=>e(ae,{card:M,run:d.run(M.id)},M.id))]}):null]}):null]})}var ft=/https?:\/\/[^\s<>"']+/g,pt=/[.,;:!?)\]}\u3001\u3002\uff0c\uff1b\uff1a\uff01\uff1f\uff09\u300d\u300f]+$/;function gt(d){let i=d.replace(pt,""),u=URL.parse(i);return u&&(u.protocol==="https:"||u.protocol==="http:")?i:""}function De({text:d}){let i=[],u=0;for(let p of d.matchAll(ft)){let w=gt(p[0]);if(w==="")continue;let y=p.index;if(y>u)i.push(d.slice(u,y));i.push(e("a",{href:w,target:"_blank",rel:"noreferrer noopener",children:w},`${y}`)),u=y+w.length}if(u<d.length)i.push(d.slice(u));return e("span",{className:"plain",children:i})}var $e=ee(function(i){let{message:u}=i,p=u.authorKind??"external";if(p==="notice")return n("li",{className:"host-notice","data-mid":u.id,"data-highlight":i.highlighted||void 0,"data-enter":i.enter||void 0,children:[e(s,{name:"bell",size:14}),e(re,{source:u.text}),e("time",{dateTime:u.at,children:nn(u.at,i.timeZone)})]});let w=p==="member"&&u.principalId!==void 0&&u.principalId===i.me;return n("li",{className:"message","data-mid":u.id,"data-author":p,"data-mine":w||void 0,"data-header":i.header||void 0,"data-enter":i.enter||void 0,"data-unread":i.unread||void 0,"data-highlight":i.highlighted||void 0,children:[w?null:e("span",{className:"message-avatar",children:i.header?e(st,{picture:u.picture,name:u.author}):null}),n("div",{className:"message-main",children:[i.header?n("div",{className:"message-meta",children:[e("strong",{children:u.author}),u.authorLabel?e("span",{className:"label-chip",children:u.authorLabel}):null,e("time",{dateTime:u.at,children:nn(u.at,i.timeZone)})]}):null,n("div",{className:"bubble",children:[e(mo,{files:u.files}),u.text?p==="assistant"?e(re,{source:u.text}):e(De,{text:u.text}):null,e(zt,{files:u.files,message:u}),u.expiredFiles?e("p",{className:"message-expired",children:F(u.expiredFiles,"{count} file was removed","{count} files were removed")}):null]}),u.edited?e("span",{className:"message-edited",children:t("edited")}):null]})]})});var ht=1500,bt=96,ge=new Set,Ee=new Map;function yt(d){if(document.visibilityState!=="visible")return!1;return!d||d.scrollHeight-d.scrollTop-d.clientHeight<bt}function Ge(d){if(!(d instanceof Element))return;let i=d.closest("[data-unread][data-mid]");return i?Number(i.dataset.mid):void 0}function Be(d){let{room:i,scroller:u,messages:p,began:w,enterAfter:y,me:v,shared:b}=d,h=a({seen:void 0,watched:new Set}),[,M]=r(0),A=Ee.get(i)??ge;if(y!==void 0&&p){let T=h.current;T.seen??=y;let I=yt(u.current),W=T.seen;for(let L of p){if(L.id<=T.seen)continue;if(I)T.watched.add(L.id);W=Math.max(W,L.id)}T.seen=W}let P=C(()=>{if(w===void 0||y===void 0||!p)return ge;let T=new Set;for(let I of p){if(I.id===0||I.id<=w)continue;if(I.kind==="system"||I.note)continue;if(I.authorKind==="notice")continue;if(I.principalId===void 0?I.kind==="owner"&&!b:I.principalId===v)continue;if(h.current.watched.has(I.id)||A.has(I.id))continue;T.add(I.id)}return T.size===0?ge:T},[p,w,y,v,b,A]),z=E((T)=>{let I=Ee.get(i)??ge;if(I.has(T))return;Ee.set(i,new Set(I).add(T)),M((W)=>W+1)},[i]),U=P.size>0;o(()=>{let T=u.current;if(!T||!U)return;let I=(L)=>{if(L.pointerType==="touch")return;let G=Ge(L.target);if(G!==void 0)z(G)},W=(L)=>{let G=Ge(L.target);if(G!==void 0)z(G)};return T.addEventListener("pointerover",I,{passive:!0}),T.addEventListener("focusin",W,{passive:!0}),T.addEventListener("click",W,{passive:!0}),()=>{T.removeEventListener("pointerover",I),T.removeEventListener("focusin",W),T.removeEventListener("click",W)}},[u,z,U]);let V=a(new Map),B=[...P].join(",");return o(()=>{let T=u.current,I=V.current;for(let[Z,Y]of I)if(!P.has(Z))clearTimeout(Y),I.delete(Z);if(!T||!U||typeof IntersectionObserver!=="function"||!matchMedia("(pointer: coarse)").matches)return;let W=(Z)=>{let Y=I.get(Z);if(Y===void 0)return;clearTimeout(Y),I.delete(Z)},L=new IntersectionObserver((Z)=>{for(let Y of Z){let ne=Number(Y.target.dataset.mid),le=Y.rootBounds;if(!(Y.isIntersecting&&(Y.intersectionRatio>=0.5||le!==null&&Y.intersectionRect.height>=le.height*0.5))){W(ne);continue}if(I.has(ne))continue;I.set(ne,setTimeout(()=>{if(I.delete(ne),document.visibilityState==="visible")z(ne)},ht))}},{root:T,threshold:[0,0.25,0.5,0.75,1]}),G=[...T.querySelectorAll("[data-unread][data-mid]")];for(let Z of G)L.observe(Z);let j=()=>{if(document.visibilityState!=="visible")return;for(let Z of G)L.unobserve(Z),L.observe(Z)};return document.addEventListener("visibilitychange",j),()=>{document.removeEventListener("visibilitychange",j),L.disconnect()}},[u,z,U,B]),o(()=>{let T=V.current;return()=>{for(let I of T.values())clearTimeout(I);T.clear()}},[]),P}ot();var vt=3;function wt({marks:d}){let[i,u]=r(!1);return n("li",{className:"seen",children:[n("button",{type:"button",className:"seen-toggle","aria-expanded":i,onClick:()=>u((p)=>!p),children:[d.slice(0,vt).map((p)=>e(st,{picture:{principal:p.principal},name:p.name,size:16},p.principal)),e("span",{children:t("Seen by {count}",{count:d.length})})]}),i?e("span",{className:"seen-names",children:d.map((p)=>p.name).join(t(", "))}):null]})}function he(d){let{roomKey:i}=d;Si(i,d.scroller);let u=l((A)=>A.principal?.id),p=l((A)=>A.rooms[i]?.messages),w=me((A)=>A.reads[i]??$o),y=me((A)=>A.cursor[i]),v=a(void 0);if(v.current===void 0&&y!==void 0)v.current=y;let b=l((A)=>A.rooms[i]?.view?.notes===!0),h=Be({room:i,scroller:d.scroller,messages:p,began:v.current,enterAfter:d.enterAfter,me:u,shared:d.host===!0||b}),M=C(()=>{let P=(p??[]).filter((V)=>V.kind!=="system"),z=v.current===void 0?void 0:P.find((V)=>V.id>(v.current??0)&&(V.principalId===void 0||V.principalId!==u))?.id,U=new Map;for(let V of w){if(V.principal===u)continue;let B=P.findLast((T)=>T.id<=V.upTo);if(B)U.set(B.id,[...U.get(B.id)??[],V])}return{before:(V)=>V.id===z?e("li",{className:"new-divider",children:e("span",{children:t("New messages")})}):null,after:(V)=>{let B=U.get(V.id);return B?e(wt,{marks:B}):null},unread:(V)=>h.has(V.id),...d.host?{message:(V,B)=>V.kind==="system"&&V.authorKind===void 0?void 0:e($e,{message:V,header:B.header,enter:B.enter,unread:B.unread,timeZone:B.timeZone,me:u,highlighted:d.highlight===V.id})}:{}}},[p,w,u,d.host,d.highlight,h]);return e(En,{roomKey:i,enterAfter:d.enterAfter,quotable:d.quotable,decor:M})}ot();var kt=20,Ht=2600,We;function Rt(d,i,u){let p=l((b)=>b.connects),w=me((b)=>b.rooms[d]??0),[y,v]=r({view:void 0,error:void 0,gone:!1});return o(()=>{let b=!0;return He.open(i,u).then((h)=>{if(!b)return;O.dispatch({type:"history_loaded",room:d,messages:h.messages,more:h.more,older:!1}),$r(d,h.reads,h.cursor),Lo(d,h.cards),v({view:h,error:void 0,gone:!1})},(h)=>{if(!b)return;let M=h instanceof fe&&h.status===404;v((A)=>({view:M?void 0:A.view,error:c(h),gone:M}))}),()=>{b=!1}},[d,i,u,p,w]),y}function St(d){let{header:i}=d;return n(g,{children:[i.banner?e("p",{className:"host-banner","data-tone":i.banner.tone,role:"status",children:i.banner.text}):null,i.fields.length?e("dl",{className:"host-head-fields",children:i.fields.map((u)=>n("div",{children:[e("dt",{children:u.label}),e("dd",{children:u.link?e("a",{href:u.link,...u.link.startsWith("/")?{}:{target:"_blank",rel:"noreferrer noopener"},children:u.value}):u.value})]},`${u.label}:${u.value}`))}):null,e(oe,{className:"host-actions bar",actions:i.actions,run:d.run})]})}function At({roomKey:d}){let i=Ce(),u=ls(d),p=u?.kind??"",w=u?.id??"",{view:y,error:v,gone:b}=Rt(d,p,w),h=l((N)=>N.rooms[d]),M=l((N)=>N.limits),A=l((N)=>N.connects),P=l((N)=>N.connection==="open"),z=a(null),U=a(null),{away:V,onScroll:B,onGrow:T,toEnd:I}=Pr(z),[W,L]=r(!1),[G,j]=r(),[Z,Y]=r(We),[ne,le]=r(!1),[Me,Fe]=r(),ye=a(void 0),se=a(void 0),J=y!==void 0,ce=_r(!Re("(min-width: 1024px)"));if(o(()=>{if(!u||b||!J)return;return i.send({type:"subscribe",room:d}),i.focus(d),()=>{i.focus(void 0),i.send({type:"unsubscribe",room:d})}},[i,d,A,b,J]),J&&ye.current===void 0)ye.current=h?.messages.at(-1)?.id??0;Se(()=>{if(J)I(!1)},[J]),Se(()=>{let N=z.current;if(N&&se.current!==void 0)N.scrollTop+=N.scrollHeight-se.current,se.current=void 0},[h?.messages[0]?.id]),o(()=>{let N=U.current;if(!N||typeof ResizeObserver>"u")return;let q=new ResizeObserver(T);return q.observe(N),()=>q.disconnect()},[T]);let ve=E(async()=>{let N=O.getState().rooms[d]?.messages[0];if(!N)return!1;let q=await He.older(p,w,N.id,xn);return O.dispatch({type:"history_loaded",room:d,messages:q.messages,more:q.more,older:!0}),$r(d,q.reads,void 0),q.more},[d,p,w]),de=a(void 0);o(()=>{let N=()=>{let q=Number(qn().get("message"));de.current=Number.isSafeInteger(q)&&q>0?q:void 0};return N(),window.addEventListener("popstate",N),()=>window.removeEventListener("popstate",N)},[]);let we=h?.messages[0]?.id,xe=h?.more===!0;o(()=>{let N=de.current,q=z.current;if(!J||N===void 0||!q)return;let X=q.querySelector(`[data-mid="${N}"]`);if(X){de.current=void 0,X.scrollIntoView({block:"center"}),Fe(N),requestAnimationFrame(()=>q.dispatchEvent(new Event("scroll"))),setTimeout(()=>Fe(void 0),Ht);return}if(we!==void 0&&N<we&&xe){let ie=0;(async()=>{if(ie+=1,!await ve().catch(()=>!1)||ie>=kt)de.current=void 0})()}},[J,we,xe,h?.messages.length,ve]);let Ie=(N,q={},X)=>He.act(p,w,{action:N.id,...X===void 0?{}:{card:X},input:q}),Ye=(N,q)=>Ie(N,q),Je=(N)=>(q,X)=>Ie(q,X,N);if(b||!J&&!v&&!u)return e("section",{className:"room",children:n("div",{className:"page",children:[e(k,{children:t("This room is not available.")}),e("a",{className:"back",href:x("rooms"),children:t("Back to rooms")})]})});let K=y?.access.send??[],ke=K.length>1,Ve=ke&&ne,Pe=Z&&K.includes(Z)?Z:K.includes("turn")?"turn":K[0],Oe=Ve||Pe==="turn",Xe=Oe?y?.wording?.turn?.placeholder??t("Ask AI…"):y?.wording?.note?.placeholder??t("Write an internal note…"),ue=y?.header.title??d,je=h?.messages??[];return n("section",{className:"room",...ce.surface,onDragOver:(N)=>{if(K.length&&N.dataTransfer.types.includes("Files"))N.preventDefault()},onDrop:(N)=>{if(!K.length||!N.dataTransfer.files.length)return;N.preventDefault(),j([...N.dataTransfer.files])},children:[n("header",{className:"room-head",children:[e("a",{className:"icon-button room-back",href:x("rooms"),"aria-label":t("Back to rooms"),children:e(s,{name:"back"})}),e(_n,{open:ce.enabled?ce.show:void 0,children:e(st,{name:ue,size:40})}),n("div",{className:"room-title",children:[e("h1",{children:ue}),e("span",{className:"room-status","data-working":h?.typing||void 0,children:h?.typing?t("Working…"):t("Host room")})]})]}),!P?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,y?e(St,{header:y.header,run:Ye}):null,e("div",{className:"room-scroll",ref:z,onScroll:B,children:n("div",{className:"room-content",ref:U,children:[v?e(m,{message:v}):null,!J&&!v?e(S,{}):null,h?.more?e("button",{type:"button",className:"secondary older",disabled:W,onClick:async()=>{L(!0),se.current=z.current?.scrollHeight;try{await ve()}catch(N){se.current=void 0,f(c(N),"danger")}finally{L(!1)}},children:W?t("Loading…"):t("Load earlier messages")}):null,J&&je.length===0?e(k,{children:t("No messages yet.")}):null,e(he,{roomKey:d,enterAfter:ye.current,quotable:!1,scroller:z,host:!0,highlight:Me}),h?.typing?e(Tn,{name:ue,progress:h.progress}):null]})}),V?n("button",{type:"button",className:"to-end",onClick:()=>I(!0),children:[e(s,{name:"send",size:16,style:{transform:"rotate(180deg)"}}),t("Latest")]}):null,y?e(Ue,{room:d,run:Je}):null,y&&K.length===0?e("p",{className:"room-note",children:t("You can read this room but not write in it.")}):null,y&&K.length>0?e(Nt,{draftKey:d,name:ue,placeholder:Xe,onAddressed:le,...ke?{above:e(qr,{on:Oe,label:y?.wording?.turn?.label??t("@AI"),...Ve?{locked:t("The message starts with @AI, so the knight answers.")}:{},onChange:(N)=>{let q=N?"turn":"note";We=q,Y(q)}})}:{},limits:M,stoppable:Boolean(h?.stoppable),onSend:(N,q,X)=>{if(ke&&X){let ie=kn(N);i.say(d,ie===""&&q.length===0?N:ie,q,"turn")}else i.say(d,N,q,Pe);I(!0)},onStop:()=>i.send({type:"stop",room:d}),...G?{incoming:G,onIncomingTaken:()=>j(void 0)}:{}},d):null,e(Tr,{...ce.drawer,current:d})]})}ot();function be({room:d}){let i=me((u)=>u.unread[d]??0);if(i<=0)return null;return e("span",{className:"unread-mark",role:"img","aria-label":F(i,"{count} unread message","{count} unread messages"),children:i>99?"99+":i})}ot();var Et=6,Ct=250;function Le(d){let{kind:i}=d,{timeZone:u}=_(),{now:p}=te(),w=l((L)=>L.connects),y=me((L)=>L.lists[i]??0),[v,b]=r(""),[h,M]=r(""),[A,P]=r(),[z,U]=r(),[V,B]=r(),[T,I]=r(!1);o(()=>{let L=setTimeout(()=>M(v.trim()),Ct);return()=>clearTimeout(L)},[v]),o(()=>{let L=!0;return He.list(i,h||void 0).then((G)=>{if(!L)return;an(Object.fromEntries(G.rooms.map((j)=>[j.key,j.unread??0]))),P(G.rooms),U(G.cursor),B(void 0)},(G)=>L&&B(c(G))),()=>{L=!1}},[i,h,w,y]);let W=async()=>{if(!z||T)return;I(!0);try{let L=await He.list(i,h||void 0,z);an(Object.fromEntries(L.rooms.map((G)=>[G.key,G.unread??0]))),P((G)=>[...G??[],...L.rooms]),U(L.cursor)}catch(L){B(c(L))}finally{I(!1)}};return n("section",{className:"stack",children:[n("h2",{className:"section-title",children:[d.icon?e(s,{name:d.icon,size:14,className:"section-icon"}):null,d.label]}),A&&(A.length>=Et||h||v)?e("input",{type:"search",className:"kind-filter",value:v,placeholder:t("Search {name}",{name:d.label}),"aria-label":t("Search {name}",{name:d.label}),onChange:(L)=>b(L.target.value)}):null,V?e(m,{message:V}):null,!A&&!V?n("div",{className:"stack","aria-busy":"true",children:[e("div",{className:"skeleton"}),e("div",{className:"skeleton"})]}):null,A&&A.length===0?e(k,{children:h?t("Nothing matches."):t("No rooms yet.")}):null,A&&A.length>0?e("ul",{className:"room-list",children:A.map((L)=>e("li",{children:n("a",{className:"room-row",href:x("room",L.key),"aria-current":L.key===d.active?"page":void 0,children:[n("span",{className:"kind-row-picture",children:[e(st,{picture:L.picture,name:L.title,size:44}),L.attention?e("span",{className:"attention-dot",role:"img","aria-label":t("Needs attention")}):null]}),n("span",{className:"room-row-main",children:[n("span",{className:"room-row-top",children:[e("strong",{children:L.title}),e(be,{room:L.key}),e("span",{className:"room-row-time",children:L.lastAt?Te(L.lastAt,p,u):""})]}),e("span",{className:"room-row-preview",children:e("span",{children:L.subtitle??""})})]}),e(s,{name:"chevron",size:16,className:"room-row-chevron"})]})},L.key))}):null,z?e("button",{type:"button",className:"secondary",disabled:T,onClick:W,children:T?t("Loading…"):t("Show more")}):null]})}function Ze(d){return d.kinds.map((i)=>e(Le,{kind:i.kind,label:i.label,...i.icon?{icon:i.icon}:{},active:d.active},i.kind))}function Qe(){let d=(_().pages??[]).filter((i)=>i.place==="settings");if(d.length===0)return null;return n("section",{className:"card stack",children:[e("h2",{children:t("More settings")}),d.map((i)=>n("a",{className:"menu-item menu-link",href:x("p",i.id),children:[e("span",{className:"menu-text",children:e("strong",{children:i.label})}),e(s,{name:"chevron",size:16})]},i.id))]})}export{Ze as HostKinds,ut as HostPage,At as HostRoomPage,Qe as HostSettingsPages,he as ReadLog,be as UnreadMark};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{E,o,r,c,te}from"./chunk-index-htdkpbrd.js";function cn(s){let{version:i}=te(),[a,u]=r(0),[f,d]=r(),[l,n]=r();o(()=>{let e=!0;return s().then((t)=>{if(!e)return;d(t),n(void 0)},(t)=>{if(e)n(c(t))}),()=>{e=!1}},[a,i]);let m=E(()=>u((e)=>e+1),[]);return{data:f,error:l,reload:m}}
|
|
2
|
+
export{cn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_e,X,O,P}from"./chunk-index-htdkpbrd.js";var{emit:i,use:s}=P(),o=!1,n;function pn(t){return t.cardOrder.flatMap((e)=>{let r=t.cards[e];return r&&!r.outcome?[{id:e,card:r}]:[]})}function Ea(){let t=pn(O.getState()),[e]=t;if(t.length===1&&e)sr(e.id);else if(t.length>1)o=!0,i()}function or(){if(!o)return;o=!1,i()}var Fr=()=>s(()=>o);function sr(t){let e=O.getState().cards[t];if(!e)return;o=!1,n=t,i(),X("room",e.room)}var Gr=()=>s(()=>n);function Zr(t){if(n!==t)return;n=void 0,i()}var Ti=(t,e)=>[...t?.querySelectorAll("[data-card]")??[]].find((r)=>r.dataset.card===e),c=1600;function ar(t,e){let r=Ti(t,e);if(!r)return!1;r.scrollIntoView?.({block:"center",behavior:_e()?"auto":"smooth"});let a=r.querySelector(".prompt")??r;return a.tabIndex=-1,a.focus({preventScroll:!0}),r.dataset.lit="",setTimeout(()=>delete r.dataset.lit,c),!0}
|
|
2
|
+
export{pn,Ea,or,Fr,sr,Gr,Zr,Ti,ar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E,o,a,t,e,n,s,_e}from"./chunk-index-
|
|
1
|
+
import{E,o,a,t,e,n,s,_e}from"./chunk-index-htdkpbrd.js";var S=96,T=0.6,N=220,w=()=>typeof matchMedia==="function"&&matchMedia("(max-width: 719px)").matches;function A(i){let u=a(null),g=a(void 0),{open:h,onClose:P}=i,b=a(i.restoreFocus);b.current=i.restoreFocus;let m=a(!1),p=a(!1),M=E(()=>{let r=u.current;if(r?.open)r.close();if(b.current?.()?.focus(),m.current=!1,p.current)p.current=!1;else P()},[P]),d=E(()=>{let r=u.current;if(!r||m.current)return;if(m.current=!0,_e()){M();return}r.dataset.state="closing",r.style.removeProperty("transform"),setTimeout(M,N)},[M]);o(()=>{let r=u.current;if(!r)return;if(h&&!r.open)r.dataset.state="opening",r.showModal(),requestAnimationFrame(()=>requestAnimationFrame(()=>{r.dataset.state="open"}));if(!h&&r.open&&!m.current)p.current=!0,d()},[h,d]);let v=(r)=>{if(!w())return;if(r.target instanceof Element&&r.target.closest("button, a"))return;g.current={y:r.clientY,at:r.timeStamp,dy:0},r.currentTarget.setPointerCapture(r.pointerId);let c=u.current;if(c)c.dataset.dragging="true"},C=(r)=>{let c=g.current,l=u.current;if(!c||!l)return;let f=Math.max(0,r.clientY-c.y);c.dy=f,l.style.transform=`translate3d(0, ${f}px, 0)`,l.style.setProperty("--sheet-progress",String(1-Math.min(1,f/400)))},y=(r)=>{let c=g.current,l=u.current;if(g.current=void 0,!c||!l)return;delete l.dataset.dragging;let f=c.dy/Math.max(1,r.timeStamp-c.at);if(c.dy>S||f>T){d();return}l.style.removeProperty("transform"),l.style.removeProperty("--sheet-progress")};return n("dialog",{ref:u,className:i.variant==="palette"?"sheet palette":i.size==="wide"?"sheet wide":i.size==="full"?"sheet full":"sheet","aria-label":i.title,onCancel:(r)=>{if(r.target!==r.currentTarget)return;r.preventDefault(),d()},onClick:(r)=>{if(r.target===r.currentTarget)d()},onClose:(r)=>{if(r.target!==r.currentTarget)return;if(!m.current)P()},children:[e("div",{className:"sheet-grab",onPointerDown:v,onPointerMove:C,onPointerUp:y,onPointerCancel:y,children:e("span",{className:"sheet-handle"})}),i.variant==="palette"?null:n("div",{className:"sheet-head",onPointerDown:v,onPointerMove:C,onPointerUp:y,onPointerCancel:y,children:[e("h2",{title:i.title,children:i.title}),e("button",{type:"button",className:"icon-button","aria-label":t("Close"),onClick:d,children:e(s,{name:"close"})})]}),e("div",{className:"sheet-body",children:h?i.children:null})]})}
|
|
2
2
|
export{A};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-index-
|
|
1
|
+
import{e}from"./chunk-index-htdkpbrd.js";function Mt(a){return e("button",{type:"button",id:a.id,role:"switch","aria-checked":a.checked,"aria-label":a.label,"aria-busy":a.busy||void 0,disabled:a.disabled||a.busy,className:"switch",onClick:()=>a.onChange(!a.checked),children:e("span",{className:"switch-thumb"})})}
|
|
2
2
|
export{Mt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{at,l}from"./chunk-index-htdkpbrd.js";import{On}from"./chunk-index-63qqjbs8.js";var Yt=On,Wn=2,d="rt-table-council",i,s=!1,u=new Set;function c(){try{return globalThis.localStorage?.getItem(d)??void 0}catch{return}}function g(){if(!s)i=c(),s=!0;return i}function Jr(n){i=n,s=!0;try{globalThis.localStorage?.setItem(d,n)}catch{}for(let e of u)e()}var a=(n)=>(u.add(n),()=>u.delete(n)),ws=()=>at(a,g,()=>{return});function Ri(){return l((n)=>n.order.map((e)=>n.rooms[e]?.view).filter((e)=>e!==void 0&&e.kind==="group"),"councils")}function ks(n,e,r){let t=(o)=>o===void 0?void 0:n.find((f)=>f.key===o||f.name===o);return t(r)??t(e)??n[0]}function _s(n){return[...n].filter((e)=>e.muted!==!0&&!e.helper).sort((e,r)=>Number(r.home)-Number(e.home)).slice(0,Yt).map((e)=>e.name)}function Ts(n,e,r=Yt){if(n.includes(e))return n.filter((t)=>t!==e);return n.length>=r?[...n]:[...n,e]}function Ps(n,e){return n.filter(e).slice(0,Yt)}function Qs(n,e,r){if(e!==void 0&&n.includes(e))return e;if(r!==void 0&&n.includes(r))return r;return n[0]??""}function Ms(n,e){let r=n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,28)||"council";if(!e.has(r))return r;for(let t=2;;t+=1){let o=`${r}-${t}`;if(!e.has(o))return o}}
|
|
2
|
+
export{Yt,Wn,Jr,ws,Ri,ks,_s,Ts,Ps,Qs,Ms};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Xi}from"./chunk-index-htdkpbrd.js";var o={pin:"M9 4h6l-1 6 3 3H7l3-3-1-6ZM12 13v7",folder:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z",up:"M6 15l6-6 6 6",down:"M6 9l6 6 6-6",edit:"M4 20h4L19 9l-4-4L4 16v4ZM13.5 6.5l4 4"};Xi(o);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o,r,
|
|
1
|
+
import{o,r,c,te}from"./chunk-index-htdkpbrd.js";function ke(f,e){let{version:u}=te(),[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:c(d),subject:e}))}),()=>{n=!1}},[e,u]),t.subject===e?{data:t.data,error:t.error}:{data:void 0,error:void 0}}
|
|
2
2
|
export{ke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var jt=Math.PI*2,On=8;function yn(n){let t=((n+Math.PI)%jt+jt)%jt-Math.PI;return t===-Math.PI?Math.PI:t}var Yn=(n,t)=>yn(t-n);function
|
|
2
|
-
export{jt,On,yn,Yn,
|
|
1
|
+
var jt=Math.PI*2,On=8;function yn(n){let t=((n+Math.PI)%jt+jt)%jt-Math.PI;return t===-Math.PI?Math.PI:t}var Yn=(n,t)=>yn(t-n);function ur(n){let t=Math.min(Math.max(n,0),8);return{count:1+t,seated:t}}var y=0.62,E=(n)=>Math.min(jt/Math.max(n,1),y),Kt=(n,t)=>n===0?0:yn(Math.PI+(n-t/2)*E(t)),At=(n)=>Math.max(4.2,2.6/(2*Math.sin(E(n)/2)));function z(n,t){let o=0,e=Number.POSITIVE_INFINITY;for(let r=0;r<t;r+=1){let u=Math.abs(Yn(n,Kt(r,t)));if(u<e-0.000000001)e=u,o=r}return o}var eo=(n,t)=>Kt(z(n,t),t);function Es(n,t){if(t.seated===0)return;let o=yn(n+Math.PI),e,r=Number.POSITIVE_INFINITY;for(let u=1;u<=t.seated;u+=1){let s=Math.abs(Yn(o,Kt(u,t.count)));if(s<r-0.000000001)r=s,e=u}return e}var x=1.65,R=1.06,T=44,N=390,v=4.8,p=0.07,d=3;function H(n,t,o){let{position:e,target:r}=to(n),u=S([r[0]-e[0],r[1]-e[1],r[2]-e[2]]),s=S(P(u,[0,1,0])),i=P(s,u),m=[o[0]-e[0],o[1]-e[1],o[2]-e[2]],a=h(m,u),c=Math.tan(no(n.fov,t)*Math.PI/360),l=a>0.000001?a:Number.NaN;return{x:h(m,s)/(l*c*t),y:h(m,i)/(l*c),depth:a}}var h=(n,t)=>n[0]*t[0]+n[1]*t[1]+n[2]*t[2],P=(n,t)=>[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]],S=(n)=>{let t=Math.hypot(n[0],n[1],n[2])||1;return[n[0]/t,n[1]/t,n[2]/t]};function Y(n){let t=At(n),o=[];for(let e=1;e<n;e+=1){let r=Kt(e,n),u=Math.cos(r),s=-Math.sin(r);for(let i of[-1,1])for(let m of[0,v])o.push([Math.sin(r)*t+u*i*x,m,Math.cos(r)*t+s*i*x])}return o}function A(n,t,o,e=p,r=e){let u=1-r,s=1-e;return o.every((i)=>{let m=H(n,t,i);return Math.abs(m.x)<=u&&Math.abs(m.y)<=s})}var vt=2.9,D=0.7,X=0.2,w=0.8;function As(n,t,o){let e=o[0]-n[0],r=o[2]-n[2],u=Math.hypot(e,r)||1,s=r/u,i=-e/u,m=vt*D/2,a=vt*t,c=n[1]+a/2-a*X,l=n[1]+a/2-a*w,M=[];for(let f of[-1,1])for(let k of[c,l])M.push([n[0]+s*f*m,k,n[2]+i*f*m]);return M}function O(n){let t=At(n),o=[];for(let e=1;e<n;e+=1){let r=Kt(e,n);o.push([Math.sin(r)*t,R,Math.cos(r)*t])}return o}function g(n,t){return{...n,r:n.lookR+(n.r-n.lookR)*t,y:n.lookY+(n.y-n.lookY)*t}}function Hn(n,t,o=1.6,e=N){let r=At(t),u={az:n,r:r+4.4,y:4.4+r*0.1,aim:0,lookR:-1.6,lookY:2.5,roll:0,fov:46};if(!(o>0))return u;let s=Y(t),i=O(t),m=p+T/(Math.max(e,1)/2);for(let a=1;a<=d;a+=0.02){let c=g(u,a);if(A(c,o,s)&&A(c,o,i,p,m))return c}return g(u,d)}function $s(n,t){let o=At(t),e=0.18;return{az:yn(n+0.18),r:Math.max(o-3.9,0.5),y:1.8,aim:-0.18,lookR:o+0.1,lookY:1.7,roll:-0.16,fov:58}}var b=(n,t,o)=>n+(t-n)*o;function Ns(n,t,o){return{az:yn(n.az+Yn(n.az,t.az)*o),r:b(n.r,t.r,o),y:b(n.y,t.y,o),aim:b(n.aim,t.aim,o),lookR:b(n.lookR,t.lookR,o),lookY:b(n.lookY,t.lookY,o),roll:b(n.roll,t.roll,o),fov:b(n.fov,t.fov,o)}}var Ai=(n)=>{let t=Math.min(1,Math.max(0,n));return t<0.5?4*t*t*t:1-(-2*t+2)**3/2},Ls=(n)=>{let t=Math.min(1,Math.max(0,n)),o=(u,s,i)=>3*(1-u)*(1-u)*u*s+3*(1-u)*u*u*i+u*u*u,e=0,r=1;for(let u=0;u<24;u++){let s=(e+r)/2;if(o(s,0.7,0.84)<t)e=s;else r=s}return o((e+r)/2,0,0)},F=420,I=450,V=650;function Xs(n,t,o,e=!1){if(o)return{ms:0,cut:!0};if(e)return{ms:F,cut:!1,dive:!0};let r=Math.abs(Yn(n.az,t.az))/Math.PI;return{ms:Math.round(I+(V-I)*r),cut:!1}}function to(n){let t=n.az+n.aim;return{position:[Math.sin(n.az)*n.r,n.y,Math.cos(n.az)*n.r],target:[Math.sin(t)*n.lookR,n.lookY,Math.cos(t)*n.lookR]}}function zs(n,t){let o=Kt(n,t),e=At(t);return{x:Math.sin(o)*e,z:Math.cos(o)*e,yaw:o+Math.PI}}var Is=(n,t)=>-n/Math.max(t,1)*(Math.PI/2),Ds=(n)=>n<0?-1:1,_=32;function Us(n,t,o,e){let r=(u,s,i)=>u-s<_||i-u<_;return r(n,0,e.width)||r(t,0,e.height)||r(n,o.left,o.left+o.width)||r(t,o.top,o.top+o.height)}function Vs(n,t){if(Math.abs(n)<0.000001)return"none";if(n<0)return t?"none":"in";return t?"out":"none"}function no(n,t){if(!(t>0)||t>=1.2)return n;return Math.min(n*(1+(1.2-t)*0.55),95)}
|
|
2
|
+
export{jt,On,yn,Yn,ur,Kt,At,eo,Es,vt,As,Hn,$s,Ns,Ai,Ls,Xs,to,zs,Is,Ds,Us,Vs,no};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,n,s}from"./chunk-index-
|
|
1
|
+
import{e,n,s}from"./chunk-index-htdkpbrd.js";import{B}from"./chunk-index-fw6kawhw.js";var r=`
|
|
2
2
|
/* A drop-down: the inputs' box with the one chevron of the icon set, turned to point down. */
|
|
3
3
|
.select {
|
|
4
4
|
position: relative;
|
|
@@ -38,5 +38,5 @@ import{e,n,s}from"./chunk-index-st18ee4w.js";import{B}from"./chunk-index-fw6kawh
|
|
|
38
38
|
font-size: 1rem;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
`;function
|
|
42
|
-
export{
|
|
41
|
+
`;function Ae({chip:i,className:o,...t}){if((t.size??1)>1||t.multiple===!0)return e("select",{className:o,...t});return B("select",r),n("span",{className:o?`select ${o}`:"select","data-chip":i||void 0,children:[e("select",{...t}),e(s,{name:"chevron",size:16})]})}
|
|
42
|
+
export{Ae};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p,t,O}from"./chunk-index-
|
|
2
|
-
export{
|
|
1
|
+
import{p,t,O}from"./chunk-index-htdkpbrd.js";import{Ue}from"./chunk-index-5x86qy8d.js";import{Zi}from"./chunk-index-b5924bb7.js";import{Xn}from"./chunk-index-n1w5rpxz.js";import{nt}from"./chunk-index-7wksnc48.js";import{Ut,Yi}from"./chunk-index-w0vfwqck.js";var s=(e)=>e(),m=()=>(p("x0xxb5da"),import("./chunk-layout-actions-x0xxb5da.js"));function Kr(e,l=s){let o=Ut(Xn(),e),d=o.kind==="pinned",i=[{id:"pin",label:d?t("Unpin"):t("Pin"),icon:"pin",run:()=>{m().then((r)=>r.pinRoom(e,!d))}},{id:"move",label:t("Move to folder…"),icon:"folder",run:()=>l(()=>Ue({kind:"move",room:e}))}];if(o.kind==="rest")return i;if(nt(o.siblings,e,"up"))i.push({id:"up",label:t("Move up"),icon:"up",run:()=>{m().then((r)=>r.nudgeRoom(e,"up"))}});if(nt(o.siblings,e,"down"))i.push({id:"down",label:t("Move down"),icon:"down",run:()=>{m().then((r)=>r.nudgeRoom(e,"down"))}});return i}function Da(e){let l=O.getState(),o=l.folders.find((n)=>n.id===e);if(!o)return;let d=Xn().folders.find((n)=>n.id===e)?.rooms??[],i=Yi(d,(n)=>l.rooms[n]?.view?.muted===!0)==="all",r=l.folders.map((n)=>n.id),u=[{id:"rename",label:t("Rename"),icon:"edit",run:()=>Ue({kind:"rename",id:e,name:o.name})}];if(d.length>0)u.push({id:"mute",label:i?t("Unmute the whole folder"):t("Mute the whole folder"),icon:i?"bell":"bell-off",run:()=>{m().then((n)=>n.muteFolder(e,!i))}});if(u.push(...Zi(d)),nt(r,e,"up"))u.push({id:"up",label:t("Move up"),icon:"up",run:()=>{m().then((n)=>n.nudgeFolder(e,"up"))}});if(nt(r,e,"down"))u.push({id:"down",label:t("Move down"),icon:"down",run:()=>{m().then((n)=>n.nudgeFolder(e,"down"))}});return u.push({id:"delete",label:t("Delete folder"),icon:"trash",tone:"danger",run:()=>Ue({kind:"delete",id:e,name:o.name})}),{title:o.name,items:u}}
|
|
2
|
+
export{Kr,Da};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O}from"./chunk-index-
|
|
2
|
-
export{
|
|
1
|
+
import{O}from"./chunk-index-htdkpbrd.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 Wi=(n)=>a(n&&new Set(n),(o)=>o),ca=(n)=>[...a(new Set(n),()=>!0).values()].flat();function ua(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{Wi,ca,ua};
|