pi-roundtable-web 0.25.0 → 0.26.1
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 +54 -0
- package/README.md +165 -12
- package/dist/account-zk4efb87.css +102 -0
- package/dist/chunk-account-ghq105t4.js +1 -0
- package/dist/chunk-action-menu-me0g9qsc.js +1 -0
- package/dist/{chunk-agent-0pm9p3nn.js → chunk-agent-rdv7ekrt.js} +1 -1
- package/dist/chunk-arranged-rooms-81rqhx9x.js +1 -0
- package/dist/chunk-character-creator-bd426yjw.js +1 -0
- package/dist/chunk-codeeditor-ajhgd33t.js +2 -0
- package/dist/chunk-confirm-p3mts8mx.js +1 -0
- package/dist/{chunk-connectors-anhghy3k.js → chunk-connectors-bkv3xn83.js} +1 -1
- package/dist/chunk-conversations-0e0vbxwr.js +1 -0
- package/dist/{chunk-drag-q4fx9b22.js → chunk-drag-peyb8t0k.js} +1 -1
- package/dist/{chunk-entry-he1embgp.js → chunk-entry-mv7q8br0.js} +1 -1
- package/dist/chunk-folder-list-era3tksh.js +1 -0
- package/dist/chunk-folds-hvws0bd5.js +1 -0
- package/dist/chunk-gate-hc7dd0fx.js +1 -0
- package/dist/chunk-group-scene-dkbpmbh5.js +1 -0
- package/dist/chunk-group-table-fqmxgdfw.js +1 -0
- package/dist/chunk-host-icons-4xde9ntk.js +1 -0
- package/dist/chunk-host-picture-014yzk20.js +1 -0
- package/dist/chunk-host-state-t56e5sdy.js +1 -0
- package/dist/chunk-host-ui-p1zy9nmp.js +1 -0
- package/dist/chunk-index-0fmmvgee.js +2 -0
- package/dist/chunk-index-0q15ysrb.js +1 -0
- package/dist/chunk-index-0xh24y25.js +2 -0
- package/dist/chunk-index-2yebd9tb.js +426 -0
- package/dist/chunk-index-4t0r3t3b.js +2 -0
- package/dist/chunk-index-5yzfrf7b.js +138 -0
- package/dist/{chunk-index-d5abvq7v.js → chunk-index-6twb7ccd.js} +2 -2
- package/dist/chunk-index-73gh7kgr.js +920 -0
- package/dist/chunk-index-7xffskfa.js +8 -0
- package/dist/chunk-index-aqw7cy5j.js +1 -0
- package/dist/chunk-index-b6ca02e8.js +2 -0
- package/dist/chunk-index-b8nvhcx5.js +2 -0
- package/dist/{chunk-index-bvfqjh77.js → chunk-index-cvbdf2ca.js} +2 -2
- package/dist/chunk-index-czdketze.js +2 -0
- package/dist/{chunk-index-9jqcskb4.js → chunk-index-dt9775ka.js} +5 -5
- package/dist/chunk-index-eg55mqqe.js +1 -0
- package/dist/chunk-index-gr6e0hse.js +2 -0
- package/dist/chunk-index-gyary7np.js +13 -0
- package/dist/chunk-index-j214tczc.js +1 -0
- package/dist/chunk-index-jd6632ef.js +2 -0
- package/dist/chunk-index-jw7dtshr.js +2 -0
- package/dist/{chunk-index-krtk6nn2.js → chunk-index-k7t14rwa.js} +2 -2
- package/dist/chunk-index-kwcx62wb.js +4 -0
- package/dist/chunk-index-m7fvw92f.js +2 -0
- package/dist/chunk-index-mmg788a1.js +2 -0
- package/dist/chunk-index-mq0dacwr.js +2 -0
- package/dist/chunk-index-p53ak25v.js +2 -0
- package/dist/{chunk-index-27qca4mr.js → chunk-index-pk1yxkv4.js} +2 -2
- package/dist/{chunk-index-9b1kt7qw.css → chunk-index-rbcz9jd4.css} +1 -1
- package/dist/{chunk-index-s681nny9.js → chunk-index-rmxbdmn2.js} +2 -2
- package/dist/chunk-index-rnxj3z8k.js +2 -0
- package/dist/chunk-index-snzzfhk3.js +2 -0
- package/dist/chunk-index-v3bmr0nw.js +2 -0
- package/dist/chunk-index-vcyzwtk2.js +2 -0
- package/dist/{chunk-index-zfd00hwb.js → chunk-index-w2j3njb6.js} +2 -2
- package/dist/chunk-index-w31c4yjv.js +2 -0
- package/dist/chunk-index-wrm8w165.js +2 -0
- package/dist/chunk-index-xh0mg9cw.js +2 -0
- package/dist/chunk-index-ybtvvx85.js +2 -0
- package/dist/chunk-index-yzsgsvnp.js +2 -0
- package/dist/{chunk-index-18gxy79n.js → chunk-index-z9x4cnzf.js} +2 -2
- package/dist/chunk-index-zrvg23jd.js +2 -0
- package/dist/chunk-index-zynq0b0w.js +50 -0
- package/dist/chunk-lang-css-88v3hp3d.js +1 -0
- package/dist/{chunk-lang-dockerfile-d5mzxs60.js → chunk-lang-dockerfile-k728ewsf.js} +1 -1
- package/dist/{chunk-lang-go-830fmhba.js → chunk-lang-go-wjwgay4v.js} +3 -3
- package/dist/chunk-lang-html-07d47es4.js +1 -0
- package/dist/chunk-lang-javascript-fmhhgzwd.js +1 -0
- package/dist/{chunk-lang-json-5eaarz7j.js → chunk-lang-json-7gd89mvs.js} +1 -1
- package/dist/chunk-lang-markdown-b6qbe8bt.js +6 -0
- package/dist/{chunk-lang-python-fjw84w10.js → chunk-lang-python-3v56y31b.js} +2 -2
- package/dist/{chunk-lang-rust-5rbp2zdk.js → chunk-lang-rust-kh0z74d1.js} +1 -1
- package/dist/{chunk-lang-shell-vzagpym3.js → chunk-lang-shell-9zv0zvbx.js} +1 -1
- package/dist/{chunk-lang-sql-0c2w9c2y.js → chunk-lang-sql-yw6bf3t7.js} +2 -2
- package/dist/{chunk-lang-toml-yr9fv6eb.js → chunk-lang-toml-tg1r96nq.js} +1 -1
- package/dist/chunk-lang-typescript-etjjvr2g.js +1 -0
- package/dist/{chunk-lang-xml-eze08p42.js → chunk-lang-xml-ev1mndd4.js} +1 -1
- package/dist/{chunk-lang-yaml-c4b6ft3y.js → chunk-lang-yaml-fz5qpb3r.js} +1 -1
- package/dist/chunk-layout-actions-48ecgtkg.js +1 -0
- package/dist/{chunk-menu-items-jrwxycr1.js → chunk-menu-items-1epy3h0t.js} +2 -2
- package/dist/chunk-mode-toggle-fxmfxsa4.js +1 -0
- package/dist/chunk-note-row-kd0fy7ee.js +75 -0
- package/dist/chunk-notes-yb8f057c.js +1 -0
- package/dist/chunk-notice-bell-wr4f1rph.js +1 -0
- package/dist/chunk-notices-x07da5bb.js +1 -0
- package/dist/chunk-onboarding-csrkbh9z.js +1 -0
- package/dist/chunk-overview-avc2d30t.js +1 -0
- package/dist/chunk-palette-9nhp95bz.js +1 -0
- package/dist/chunk-placement-items-q694dpgk.js +1 -0
- package/dist/chunk-profile-6qemf3m7.js +1 -0
- package/dist/chunk-prompt-history-7enzp2p3.js +1 -0
- package/dist/chunk-prompts-nv6mrn0q.js +1 -0
- package/dist/chunk-room-confirms-zz7n61y7.js +1 -0
- package/dist/chunk-room-menu-rr6nzap1.js +1 -0
- package/dist/chunk-rooms-menu-button-zbtwj47d.js +1 -0
- package/dist/chunk-schedules-rw57nr0m.js +1 -0
- package/dist/{chunk-seat-menu-jv4s7hmj.js → chunk-seat-menu-ys5v9abz.js} +1 -1
- package/dist/chunk-sheet-hosts-jhvaacst.js +1 -0
- package/dist/chunk-skill-editor-sz8an8qr.js +8 -0
- package/dist/chunk-skills-tnr1h16h.js +1 -0
- package/dist/chunk-switcher-list-17enhrse.js +1 -0
- package/dist/chunk-tab-dot-r6brdbmw.js +1 -0
- package/dist/chunk-table-r12cja6p.js +1 -0
- package/dist/chunk-table-seats-g3t392zz.js +1 -0
- package/dist/{chunk-table2d-4sje1fr0.js → chunk-table2d-p3ezsdcj.js} +1 -1
- package/dist/{chunk-table3d-h64skazp.js → chunk-table3d-4x2n2b00.js} +23 -23
- package/dist/chunk-thread-actions-qc6ezkha.js +1 -0
- package/dist/chunk-transcript-n2s6dher.js +1 -0
- package/dist/chunk-where-f3scdydc.js +1 -0
- package/dist/chunk-workspace-xs023bxm.js +1 -0
- package/dist/chunk-zh-tw-efvmk3fd.js +1 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +5 -4
- package/src/api-types.ts +356 -4
- package/src/app/app.ts +201 -32
- package/src/app/desk.ts +47 -22
- package/src/app/files.ts +73 -7
- package/src/app/presence.ts +2 -2
- package/src/app/protocol.ts +63 -1
- package/src/app/room-log.ts +153 -14
- package/src/app/rooms.ts +39 -0
- package/src/app/routes.ts +168 -28
- package/src/app/socket.ts +349 -81
- package/src/app/sockets.ts +108 -20
- package/src/app/surface.ts +72 -36
- package/src/app/threads.ts +31 -2
- package/src/app/uploads.ts +33 -7
- package/src/auth/authenticator.ts +77 -8
- package/src/auth/login-page.ts +4 -2
- package/src/auth/next.ts +52 -0
- package/src/auth/oidc-pages.ts +62 -0
- package/src/auth/oidc.ts +649 -0
- package/src/auth/sessions.ts +193 -0
- package/src/authz.ts +173 -0
- package/src/console-api.ts +122 -25
- package/src/console-server.ts +102 -12
- package/src/gate.ts +90 -0
- package/src/host/access.ts +161 -0
- package/src/host/cards.ts +112 -0
- package/src/host/context.ts +188 -0
- package/src/host/forms.ts +240 -0
- package/src/host/frames.ts +349 -0
- package/src/host/host-app.ts +178 -0
- package/src/host/host-context.ts +49 -0
- package/src/host/host-routes.ts +396 -0
- package/src/host/pages.ts +266 -0
- package/src/host/reads.ts +155 -0
- package/src/host/retention.ts +41 -0
- package/src/host/room-views.ts +137 -0
- package/src/host/rooms-service.ts +429 -0
- package/src/host/stored-json.ts +13 -0
- package/src/host/views.ts +106 -0
- package/src/i18n/zh-tw.ts +139 -0
- package/src/index.ts +15 -1
- package/src/notices/api.ts +43 -0
- package/src/notices/mount.ts +292 -0
- package/src/notices/service.ts +294 -0
- package/src/notices/store.ts +298 -0
- package/src/notices/urls.ts +38 -0
- package/src/onboarding/api.ts +32 -0
- package/src/onboarding/service.ts +149 -0
- package/src/onboarding/steps.ts +75 -0
- package/src/onboarding/waivers.ts +40 -0
- package/src/options.ts +534 -34
- package/src/page-presentation.ts +47 -2
- package/src/profile/api.ts +175 -0
- package/src/profile/links.ts +162 -0
- package/src/push/api.ts +189 -52
- package/src/push/dispatch.ts +156 -0
- package/src/push/drain.ts +139 -0
- package/src/push/outbox.ts +218 -0
- package/src/push/prefs.ts +118 -0
- package/src/push/sender.ts +7 -2
- package/src/push/triggers.ts +56 -5
- package/src/push/vapid.ts +19 -0
- package/src/push/web-push-transport.ts +106 -0
- package/src/push-sender/index.ts +14 -0
- package/src/push-sender/run.ts +118 -0
- package/src/push-sender/session.ts +54 -0
- package/src/pwa.ts +32 -4
- package/src/visitors.ts +94 -6
- package/src/web-app.ts +718 -0
- package/src/web-plugin.ts +279 -26
- package/dist/chunk-action-menu-qe839g4b.js +0 -1
- package/dist/chunk-arranged-rooms-enpfswmg.js +0 -1
- package/dist/chunk-character-creator-6yf29xwx.js +0 -1
- package/dist/chunk-codeeditor-gdbdg7rp.js +0 -2
- package/dist/chunk-confirm-xrw7d732.js +0 -1
- package/dist/chunk-conversations-ry228aes.js +0 -1
- package/dist/chunk-folder-list-5cp8stna.js +0 -1
- package/dist/chunk-folds-hff104tk.js +0 -1
- package/dist/chunk-group-scene-h228jdat.js +0 -1
- package/dist/chunk-index-0p5h2kdz.js +0 -2
- package/dist/chunk-index-0pt08yd9.js +0 -1
- package/dist/chunk-index-12bw9yj8.js +0 -2
- package/dist/chunk-index-2ad17eh4.js +0 -2
- package/dist/chunk-index-31wh5twj.js +0 -52
- package/dist/chunk-index-4dy94pbz.js +0 -2
- package/dist/chunk-index-4ecjtdy8.js +0 -13
- package/dist/chunk-index-4v1b7ks9.js +0 -2
- package/dist/chunk-index-5d8yjj4m.js +0 -2
- package/dist/chunk-index-89ajmxh7.js +0 -2
- package/dist/chunk-index-b9ny4623.js +0 -2
- package/dist/chunk-index-e1dr6g10.js +0 -2
- package/dist/chunk-index-gpkzhq1g.js +0 -2
- package/dist/chunk-index-hk3xyy20.js +0 -2
- package/dist/chunk-index-jm23vn03.js +0 -4
- package/dist/chunk-index-k7gh0jvz.js +0 -2
- package/dist/chunk-index-ky42ev0b.js +0 -2
- package/dist/chunk-index-pa2yyqh0.js +0 -2
- package/dist/chunk-index-pcvt668q.js +0 -2
- package/dist/chunk-index-pqw27eye.js +0 -1
- package/dist/chunk-index-wmbmmrd4.js +0 -302
- package/dist/chunk-index-ymbjrsp6.js +0 -2
- package/dist/chunk-lang-css-t85r8rz0.js +0 -1
- package/dist/chunk-lang-html-n6jparge.js +0 -1
- package/dist/chunk-lang-javascript-xj00cp97.js +0 -1
- package/dist/chunk-lang-markdown-zxx8eke8.js +0 -6
- package/dist/chunk-lang-typescript-8f6yywt3.js +0 -1
- package/dist/chunk-layout-actions-bv0chj41.js +0 -1
- package/dist/chunk-notes-9b7pgqfe.js +0 -1
- package/dist/chunk-overview-8yw71esz.js +0 -1
- package/dist/chunk-palette-frms7axe.js +0 -1
- package/dist/chunk-placement-items-fvfy9m0y.js +0 -1
- package/dist/chunk-prompt-history-yrqehads.js +0 -1
- package/dist/chunk-prompts-g6609tqx.js +0 -1
- package/dist/chunk-room-confirms-0a2y0925.js +0 -1
- package/dist/chunk-room-menu-g11q97br.js +0 -1
- package/dist/chunk-rooms-menu-button-h9qge48n.js +0 -1
- package/dist/chunk-schedules-ezmacrbj.js +0 -1
- package/dist/chunk-sheet-hosts-b0azyfhb.js +0 -1
- package/dist/chunk-skill-editor-h6k6whwg.js +0 -8
- package/dist/chunk-skills-gqcfhq56.js +0 -1
- package/dist/chunk-switcher-list-mcpamqnj.js +0 -1
- package/dist/chunk-table-s8cde1xz.js +0 -1
- package/dist/chunk-table-seats-wqkjn8bc.js +0 -1
- package/dist/chunk-transcript-c59c6mpm.js +0 -1
- package/dist/chunk-workspace-0cyspkk4.js +0 -1
- package/dist/chunk-zh-tw-nc93jm10.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,l,r,t,p,e,n,a,nr,H,M,d,h,b,m,It,lr,cr}from"./chunk-index-31wh5twj.js";import{re}from"./chunk-index-ky42ev0b.js";import{Se,bn,er}from"./chunk-index-12bw9yj8.js";import{Rt,ti,Ei,Ci,Ai}from"./chunk-index-ymbjrsp6.js";import{pe}from"./chunk-index-b9ny4623.js";import{Ar,Ne,Li}from"./chunk-index-0p5h2kdz.js";import{Et,Ot,gt}from"./chunk-index-gpkzhq1g.js";var f=(o,i,u)=>b(o,{method:i,...u===void 0?{}:{body:JSON.stringify(u)}}),g=(o)=>encodeURIComponent(o),ye={createAgent:(o)=>f("agents","POST",o),archiveAgent:(o)=>f(`agents/${g(o)}/archive`,"POST"),restoreAgent:(o)=>f(`agents/${g(o)}/restore`,"POST"),deleteAgent:(o)=>f(`agents/${g(o)}`,"DELETE"),skills:(o)=>b(`agents/${g(o)}/skills`),setSkills:(o,i)=>f(`agents/${g(o)}/skills`,"PUT",i),archive:()=>b("archive"),createGroup:(o)=>f("groups","POST",o),group:(o)=>b(`groups/${g(o)}`),updateGroup:(o,i)=>f(`groups/${g(o)}`,"PATCH",i),archiveGroup:(o)=>f(`groups/${g(o)}/archive`,"POST"),restoreGroup:(o)=>f(`groups/${g(o)}/restore`,"POST"),deleteGroup:(o)=>f(`groups/${g(o)}`,"DELETE")};async function rt(){let o=await m.rooms();M.dispatch({type:"rooms_loaded",rooms:o.rooms})}function T(o){let{room:i}=o,u=d((c)=>{let N=Et(c,(y)=>gt(c,y)),k=Ot(N,i),A=k.kind==="rest"?[]:k.siblings;return{name:c.rooms[i]?.view?.displayName??i,folder:k.kind==="folder"?k.folder:"",pinned:k.kind==="pinned",canUp:Ne(A,i,"up")!==void 0,canDown:Ne(A,i,"down")!==void 0}},i),v=d((c)=>c.folders),C=(c)=>{o.onClose(),Rt(i,c)},w=u.folder===""&&!u.pinned;return n("div",{className:"stack",children:[e("p",{className:"meta",children:u.name}),n("fieldset",{children:[e("legend",{className:"visually-hidden",children:t("Move to folder…")}),n("ul",{className:"menu",children:[e("li",{children:n("label",{className:"menu-item menu-link",children:[e("input",{type:"radio",name:"move-folder",checked:w,onChange:()=>C(null)}),e("span",{className:"menu-icon",children:e(a,{name:"rooms",size:18})}),e("span",{className:"menu-text",children:e("strong",{children:t("Ungrouped")})})]})}),v.map((c)=>e("li",{children:n("label",{className:"menu-item menu-link",children:[e("input",{type:"radio",name:"move-folder",checked:u.folder===c.id,onChange:()=>C(c.id)}),e("span",{className:"menu-icon",children:e(a,{name:"folder",size:18})}),e("span",{className:"menu-text",children:e("strong",{children:c.name})})]})},c.id)),e("li",{children:n("button",{type:"button",className:"menu-item menu-link",onClick:()=>Se({kind:"new",room:i}),children:[e("span",{className:"menu-icon",children:e(a,{name:"plus",size:18})}),e("span",{className:"menu-text",children:e("strong",{children:t("New folder…")})})]})})]})]}),u.canUp||u.canDown?n("ul",{className:"menu",children:[u.canUp?e("li",{children:n("button",{type:"button",className:"menu-item menu-link",onClick:()=>{o.onClose(),ti(i,"up")},children:[e("span",{className:"menu-icon",children:e(a,{name:"up",size:18})}),e("span",{className:"menu-text",children:e("strong",{children:t("Move up")})})]})}):null,u.canDown?e("li",{children:n("button",{type:"button",className:"menu-item menu-link",onClick:()=>{o.onClose(),ti(i,"down")},children:[e("span",{className:"menu-icon",children:e(a,{name:"down",size:18})}),e("span",{className:"menu-text",children:e("strong",{children:t("Move down")})})]})}):null]}):null]})}function D(o){return e(pe,{open:o.open,title:t("Move to folder…"),onClose:o.onClose,children:e(T,{room:o.room,onClose:o.onClose})})}function E(o){let{ask:i}=o,[u,v]=r(i.kind==="rename"?i.name:""),[C,w]=r(),[c,N]=r(!1),k=l(null);return s(()=>k.current?.focus(),[]),n("form",{className:"stack",onSubmit:async(y)=>{y.preventDefault();let F;try{F=Li(u)}catch{w(t("Give the folder a name of 1 to 40 characters."));return}N(!0),w(void 0);let S;if(i.kind==="rename")S=await Ci(i.id,F,w)!==void 0;else{let P=await Ei(F,w);if(S=P!==void 0,P&&i.room)await Rt(i.room,P)}if(N(!1),S)o.onClose()},children:[n("div",{className:"field",children:[e("label",{className:"field-label",htmlFor:"folder-name",children:t("Folder name")}),e("input",{id:"folder-name",type:"text",ref:k,value:u,autoComplete:"off",enterKeyHint:"done",maxLength:Ar*2,"aria-invalid":C?!0:void 0,onChange:(y)=>v(y.target.value)}),C?e("p",{className:"field-error",role:"alert",children:C}):null]}),n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:c,onClick:o.onClose,children:t("Cancel")}),e("button",{type:"submit",disabled:c,children:i.kind==="rename"?t("Rename"):t("Create")})]})]})}function R(){let o=er(),i=l(void 0);if(o)i.current=o;let u=i.current;if(!u)return null;let v=u.kind==="new"||u.kind==="rename";return n(p,{children:[v?e(pe,{open:o?.kind==="new"||o?.kind==="rename",title:u.kind==="rename"?t("Rename folder"):t("Add a folder"),onClose:bn,children:e(E,{ask:u,onClose:bn})}):null,u.kind==="delete"?e(re,{open:o?.kind==="delete",title:t("Delete folder"),confirmLabel:t("Delete folder"),tone:"danger",onClose:bn,onConfirm:async()=>{let C="";if(!await Ai(u.id,(c)=>{C=c}))throw Error(C)},children:e("p",{children:t("Delete the folder {name}? Its rooms move to Ungrouped; no room is deleted.",{name:u.name})})}):null,u.kind==="move"?e(D,{open:o?.kind==="move",room:u.room,onClose:bn}):null]})}function G(o){return n(re,{open:o.open,title:t("Turn on yolo mode?"),confirmLabel:t("Turn on yolo mode"),tone:"yolo",...o.restoreFocus?{restoreFocus:o.restoreFocus}:{},onClose:o.onClose,onConfirm:async()=>{await m.setMode(o.room,{yolo:!0})},children:[e("p",{children:t("In this room, the agent's held actions are approved for you, without a card, as soon as they come up.")}),e("p",{children:t("Risky classes still ask: running as another user, deleting files, force pushes, disk, service and firewall changes, and anything that names its own approvers. The host can add more.")}),e("p",{children:t("Every approval it makes is written into the conversation, and a banner stays up while yolo mode is on.")})]})}function x(o){return e(re,{open:o.open,title:t("Start over {name}?",{name:o.name}),confirmLabel:t("Start over"),tone:"danger",...o.restoreFocus?{restoreFocus:o.restoreFocus}:{},onClose:o.onClose,onConfirm:async()=>{await m.startRoomOver(o.room)},children:e("p",{children:t("The current conversation is archived and the next message begins a new one. Long-term memory is kept. A turn that is running finishes first.")})})}function O(o){return e(re,{open:o.open,title:t("Archive {name}?",{name:o.name}),confirmLabel:t("Archive"),tone:"danger",...o.restoreFocus?{restoreFocus:o.restoreFocus}:{},onClose:o.onClose,onConfirm:async()=>{let i=o.room.indexOf("."),u=o.room.slice(i+1);if(o.room.slice(0,i).endsWith(":group"))await ye.archiveGroup(u);else await ye.archiveAgent(u);if(It(),await rt(),h(t("Archived {name}.",{name:o.name})),nr().key===o.room)H("rooms")},children:e("p",{children:t("{name} stops answering and its schedules are cancelled. A group loses it as a member. The history is kept, and Archived in the room list restores it.",{name:o.name})})})}function oi(){return n(p,{children:[e(V,{}),e(R,{})]})}function V(){let o=cr(),i=l(void 0);if(o)i.current=o;let u=i.current;if(!u)return null;let v={room:u.room,name:u.name,restoreFocus:u.restoreFocus,onClose:lr};return n(p,{children:[e(G,{open:o?.kind==="yolo",...v}),e(x,{open:o?.kind==="start-over",...v}),e(O,{open:o?.kind==="archive",...v})]})}
|
|
2
|
-
export{ye,rt,oi};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Y,s,l,t,e,n,a,He}from"./chunk-index-31wh5twj.js";var C=96,S=0.6,T=220,w=()=>typeof matchMedia==="function"&&matchMedia("(max-width: 719px)").matches;function N(o){let u=l(null),g=l(void 0),{open:h,onClose:P}=o,E=l(o.restoreFocus);E.current=o.restoreFocus;let m=l(!1),p=l(!1),M=Y(()=>{let r=u.current;if(r?.open)r.close();if(E.current?.()?.focus(),m.current=!1,p.current)p.current=!1;else P()},[P]),d=Y(()=>{let r=u.current;if(!r||m.current)return;if(m.current=!0,He()){M();return}r.dataset.state="closing",r.style.removeProperty("transform"),setTimeout(M,T)},[M]);s(()=>{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 b=(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 i=u.current;if(i)i.dataset.dragging="true"},v=(r)=>{let i=g.current,c=u.current;if(!i||!c)return;let f=Math.max(0,r.clientY-i.y);i.dy=f,c.style.transform=`translate3d(0, ${f}px, 0)`,c.style.setProperty("--sheet-progress",String(1-Math.min(1,f/400)))},y=(r)=>{let i=g.current,c=u.current;if(g.current=void 0,!i||!c)return;delete c.dataset.dragging;let f=i.dy/Math.max(1,r.timeStamp-i.at);if(i.dy>C||f>S){d();return}c.style.removeProperty("transform"),c.style.removeProperty("--sheet-progress")};return n("dialog",{ref:u,className:o.variant==="palette"?"sheet palette":o.size==="wide"?"sheet wide":o.size==="full"?"sheet full":"sheet","aria-label":o.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:b,onPointerMove:v,onPointerUp:y,onPointerCancel:y,children:e("span",{className:"sheet-handle"})}),o.variant==="palette"?null:n("div",{className:"sheet-head",onPointerDown:b,onPointerMove:v,onPointerUp:y,onPointerCancel:y,children:[e("h2",{title:o.title,children:o.title}),e("button",{type:"button",className:"icon-button","aria-label":t("Close"),onClick:d,children:e(a,{name:"close"})})]}),e("div",{className:"sheet-body",children:h?o.children:null})]})}
|
|
2
|
-
export{N};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Se}from"./chunk-index-12bw9yj8.js";import{t,Oe,hr,Pn}from"./chunk-index-31wh5twj.js";function yn(e){let n=e.getBoundingClientRect(),o=hr();Oe({title:t("Rooms"),items:[{id:"new-folder",label:t("Add a folder"),icon:"plus",run:()=>Se({kind:"new"})},{id:"arrange",label:o?t("Done"):t("Arrange"),icon:o?"check":"list",run:()=>Pn(!o)}],at:{x:n.left,y:n.bottom},via:"key",source:e})}
|
|
2
|
-
export{yn};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{rn}from"./chunk-index-0p5h2kdz.js";var f=12;function m(r,e){let t=r.find((u)=>e>=u.top&&e<=u.bottom);if(t)return t;let n,o=f+1;for(let u of r){let i=e<u.top?u.top-e:e-u.bottom;if(i<o)n=u,o=i}return n}function d(r,e,t){for(let n of r)if(n.key!==e&&n.top+n.height/2>t)return n.key;return null}function Qr(r,e,t){let n=m(r,t);return n?{zone:n,before:d(n.items,e,t)}:void 0}function Mr(r,e,t){let{zone:n,before:o}=t;if(n.kind==="rest")return r.kind==="rest"?void 0:{kind:"unplace"};if(n.kind==="pinned"&&r.kind==="pinned"||n.kind==="folder"&&r.kind==="folder"&&r.folder===n.folder){let i=r.siblings;if(rn(i,e,o).every((s,l)=>s===i[l]))return}return n.kind==="pinned"?{kind:"pin",before:o}:{kind:"folder",folder:n.folder,before:o}}function Rr(r,e,t,n){if(n<e.top-f*3||n>e.bottom+f*3)return;return{before:d(r,t,n)}}function $i(r,e,t,n=0){let o=(r[e]?.height??0)+n;return r.map((u,i)=>{if(i===e)return 0;if(e<t&&i>e&&i<=t)return-o;if(e>t&&i>=t&&i<e)return o;return 0})}function Ni(r,e,t){return rn(r,e,t).indexOf(e)}function Er(r,e,t,n=64,o=18){if(r<e+n)return-Math.min(1,(e+n-r)/n)*o;if(r>t-n)return Math.min(1,(r-(t-n))/n)*o;return 0}var Cr=600;
|
|
2
|
-
export{Qr,Mr,Rr,$i,Ni,Er,Cr};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Xn,M}from"./chunk-index-31wh5twj.js";function Et(n,o){let s=new Map;for(let e of n.order){let t=n.rooms[e]?.view;if(t)s.set(e,t)}let l=(e)=>{let t=s.get(e);return t!==void 0&&t.kind!=="thread"&&!t.home},i=new Set,g=(e)=>e.filter((t)=>{if(!l(t)||i.has(t))return!1;return i.add(t),!0}),m=g(n.pins),u=n.folders.map((e)=>({id:e.id,name:e.name,rooms:g(e.rooms)})),a=[],y={},r={open:[],closed:[]},d=new Set([...s].filter(([,e])=>e.kind!=="thread").map(([e])=>e)),p=[],f=0;for(let[e,t]of s)if(f+=1,t.kind==="thread"){let h=r;if(t.parent&&d.has(t.parent))h=y[t.parent]??{open:[],closed:[]},y[t.parent]=h;(t.closed?h.closed:h.open).push(e)}else if(t.home)a.push(e);else if(!i.has(e))p.push({key:e,index:f,at:o(e)});p.sort((e,t)=>e.at===t.at?e.index-t.index:t.at-e.at);let c=p.map((e)=>e.key),w=(e)=>s.get(e)?.kind;return{home:a,pinned:m,folders:u,rest:c,restAgents:c.filter((e)=>w(e)==="agent"),restGroups:c.filter((e)=>w(e)==="group"),threads:y,orphans:r}}function Ir(n,o,s,l=!1){let i=Et(n,o),g=new Map(n.order.map((r,d)=>[r,d])),m=(r)=>[...r].sort((d,p)=>{let f=o(d),c=o(p);return f===c?(g.get(d)??0)-(g.get(p)??0):c-f}),u=m([...i.home,...i.pinned,...i.folders.flatMap((r)=>r.rooms),...i.rest].filter(s)),a=(r)=>r.filter((d)=>!u.includes(d));return[{id:"waiting",keys:u},{id:"home",keys:a(i.home)},{id:"pinned",keys:a(i.pinned)},...i.folders.map((r)=>({id:r.id,title:r.name,keys:a(r.rooms)})),{id:"rest",keys:a(m(i.rest))}].filter((r)=>r.keys.length>0||l&&r.id!=="waiting"&&r.id!=="home")}function Ot(n,o){if(n.pinned.includes(o))return{kind:"pinned",siblings:n.pinned};let s=n.folders.find((l)=>l.rooms.includes(o));return s?{kind:"folder",folder:s.id,siblings:s.rooms}:{kind:"rest"}}function En(n,o){let s=n.filter(o).length;if(s===0)return"none";return s===n.length?"all":"some"}function gt(n,o){let s=Date.parse(Xn(n,o)?.at??"");return Number.isNaN(s)?Number.NEGATIVE_INFINITY:s}var Xi=()=>{let{pins:n,folders:o}=M.getState();return{pins:n,folders:o}};function Gt(){let n=M.getState();return Et(n,(o)=>gt(n,o))}
|
|
2
|
-
export{Et,Ir,Ot,En,gt,Xi,Gt};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,r,f,se}from"./chunk-index-31wh5twj.js";function fe(o,e){let{version:u}=se(),[t,a]=r({data:void 0,error:void 0,subject:e});return s(()=>{let n=!0;return o().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:f(d),subject:e}))}),()=>{n=!1}},[e,u]),t.subject===e?{data:t.data,error:t.error}:{data:void 0,error:void 0}}
|
|
2
|
-
export{fe};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{X,t,e,n,b}from"./chunk-index-31wh5twj.js";var k=(i,s,r)=>b(i,{method:s,...r===void 0?{}:{body:JSON.stringify(r)}}),c=(i)=>encodeURIComponent(i),ke={agentPromptHistory:(i)=>b(`agents/${c(i)}/prompt-history`),prompts:()=>b("prompts"),prompt:(i)=>b(`prompts/${c(i)}`),savePrompt:(i,s)=>k(`prompts/${c(i)}`,"PUT",s),revertPrompt:(i,s)=>k(`prompts/${c(i)}/revert`,"POST",s),promptHistory:(i)=>b(`prompts/${c(i)}/history`),skillDocument:(i)=>b(`skill-docs/${c(i)}`),saveSkillDocument:(i,s)=>k(`skill-docs/${c(i)}`,"PUT",s),createSkillDocument:(i)=>k("skill-docs","POST",i),skillHistory:(i)=>b(`skill-docs/${c(i)}/history`)};function u(i,s){let r=i.split(`
|
|
2
|
-
`),m=s.split(`
|
|
3
|
-
`),o=0;while(o<r.length&&o<m.length&&r[o]===m[o])o++;let d=0;while(d<r.length-o&&d<m.length-o&&r[r.length-1-d]===m[m.length-1-d])d++;let g=r.slice(o,r.length-d),p=m.slice(o,m.length-d),a=r.slice(0,o).map((l)=>({kind:"same",text:l}));return a.push(...D(g,p)),a.push(...r.slice(r.length-d).map((l)=>({kind:"same",text:l}))),a}function D(i,s){let r=(l)=>l.map((f)=>({kind:"del",text:f})),m=(l)=>l.map((f)=>({kind:"add",text:f}));if(i.length===0)return m(s);if(s.length===0)return r(i);if(i.length*s.length>4000000)return[...r(i),...m(s)];let o=s.length+1,d=new Uint32Array((i.length+1)*o);for(let l=i.length-1;l>=0;l--)for(let f=s.length-1;f>=0;f--)d[l*o+f]=i[l]===s[f]?(d[(l+1)*o+f+1]??0)+1:Math.max(d[(l+1)*o+f]??0,d[l*o+f+1]??0);let g=[],p=0,a=0;while(p<i.length&&a<s.length)if(i[p]===s[a])g.push({kind:"same",text:i[p]}),p++,a++;else if((d[(p+1)*o+a]??0)>=(d[p*o+a+1]??0))g.push({kind:"del",text:i[p]}),p++;else g.push({kind:"add",text:s[a]}),a++;return g.push(...r(i.slice(p)),...m(s.slice(a))),g}function h(i){return{added:i.filter((s)=>s.kind==="add").length,removed:i.filter((s)=>s.kind==="del").length}}var v={same:" ",add:"+",del:"−"};function y({lines:i}){return e("pre",{className:"diff",children:i.map((s,r)=>n("span",{className:"diff-line","data-kind":s.kind,children:[e("span",{className:"diff-mark","aria-hidden":"true",children:v[s.kind]}),s.kind==="add"||s.kind==="del"?n("span",{className:"visually-hidden",children:[s.kind==="add"?t("Added"):t("Removed"),":"," "]}):null,s.text||" "]},r))})}function We(i){let s=X(()=>u(i.before,i.after),[i.before,i.after]),r=h(s);return n("div",{className:"field",children:[n("span",{className:"field-label",children:[i.label," ·"," ",t("Lines: {added} added, {removed} removed",{added:r.added,removed:r.removed})]}),e(y,{lines:s})]})}
|
|
4
|
-
export{ke,We};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O,t,M}from"./chunk-index-31wh5twj.js";import{Se}from"./chunk-index-12bw9yj8.js";import{Ne}from"./chunk-index-0p5h2kdz.js";import{Ot,En,Gt}from"./chunk-index-gpkzhq1g.js";var s=(e)=>e(),d=()=>(O("bv0chj41"),import("./chunk-layout-actions-bv0chj41.js"));function pi(e,u=s){let o=Ot(Gt(),e),l=o.kind==="pinned",i=[{id:"pin",label:l?t("Unpin"):t("Pin"),icon:"pin",run:()=>{d().then((r)=>r.pinRoom(e,!l))}},{id:"move",label:t("Move to folder…"),icon:"folder",run:()=>u(()=>Se({kind:"move",room:e}))}];if(o.kind==="rest")return i;if(Ne(o.siblings,e,"up"))i.push({id:"up",label:t("Move up"),icon:"up",run:()=>{d().then((r)=>r.nudgeRoom(e,"up"))}});if(Ne(o.siblings,e,"down"))i.push({id:"down",label:t("Move down"),icon:"down",run:()=>{d().then((r)=>r.nudgeRoom(e,"down"))}});return i}function Gr(e){let u=M.getState(),o=u.folders.find((n)=>n.id===e);if(!o)return;let l=Gt().folders.find((n)=>n.id===e)?.rooms??[],i=En(l,(n)=>u.rooms[n]?.view?.muted===!0)==="all",r=u.folders.map((n)=>n.id),m=[{id:"rename",label:t("Rename"),icon:"edit",run:()=>Se({kind:"rename",id:e,name:o.name})}];if(l.length>0)m.push({id:"mute",label:i?t("Unmute the whole folder"):t("Mute the whole folder"),icon:i?"bell":"bell-off",run:()=>{d().then((n)=>n.muteFolder(e,!i))}});if(Ne(r,e,"up"))m.push({id:"up",label:t("Move up"),icon:"up",run:()=>{d().then((n)=>n.nudgeFolder(e,"up"))}});if(Ne(r,e,"down"))m.push({id:"down",label:t("Move down"),icon:"down",run:()=>{d().then((n)=>n.nudgeFolder(e,"down"))}});return m.push({id:"delete",label:t("Delete folder"),icon:"trash",tone:"danger",run:()=>Se({kind:"delete",id:e,name:o.name})}),{title:o.name,items:m}}
|
|
2
|
-
export{pi,Gr};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,t,e,n,y,f}from"./chunk-index-31wh5twj.js";import{N}from"./chunk-index-5d8yjj4m.js";function re(o){let[a,l]=r(!1),[s,i]=r(),c=()=>{if(a)return;i(void 0),o.onClose()};return e(N,{open:o.open,title:o.title,onClose:c,...o.restoreFocus?{restoreFocus:o.restoreFocus}:{},children:n("div",{className:"stack",children:[e("div",{className:"prose",children:o.children}),s?e(y,{message:s}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:a,onClick:c,children:o.cancelLabel??t("Cancel")}),e("button",{type:"button",className:o.tone==="danger"?"danger":o.tone==="yolo"?"yolo-action":"",disabled:a,onClick:async()=>{l(!0),i(void 0);try{await o.onConfirm(),o.onClose()}catch(d){i(f(d))}finally{l(!1)}},children:o.confirmLabel})]})]})})}
|
|
2
|
-
export{re};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{z,be,o,g,ve,Pe,Qe,U,te,Ge,vt,k,u,ot,T,Xe}from"./chunk-index-4ecjtdy8.js";class ai{constructor(t,e,i,n){this.state=t,this.pos=e,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=T(this.state).resolveInner(this.pos,-1);while(e&&t.indexOf(e.name)<0)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(D(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(t,e,i){if(t=="abort"&&this.abortListeners){if(this.abortListeners.push(e),i&&i.onDocChange)this.abortOnDocChange=!0}}}function v(t){let e=Object.keys(t).join(""),i=/\w/.test(e);if(i)e=e.replace(/\w/g,"");return`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function E(t){let e=Object.create(null),i=Object.create(null);for(let{label:s}of t){e[s[0]]=!0;for(let l=1;l<s.length;l++)i[s[l]]=!0}let n=v(e)+v(i)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function Ve(t){let e=t.map((s)=>typeof s=="string"?{label:s}:s),[i,n]=e.every((s)=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:E(e);return(s)=>{let l=s.matchBefore(n);return l||s.explicit?{from:l?l.from:s.pos,options:e,validFor:i}:null}}function Be(t,e){return(i)=>{for(let n=T(i.state).resolveInner(i.pos,-1);n;n=n.parent){if(t.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(i)}}function D(t,e){var i;let{source:n}=t,s=e&&n[0]!="^",l=n[n.length-1]!="$";if(!s&&!l)return t;return new RegExp(`${s?"^":""}(?:${n})${l?"$":""}`,(i=t.flags)!==null&&i!==void 0?i:t.ignoreCase?"i":"")}var P=Qe.define();var re=typeof navigator=="object"&&/Win/.test(navigator.platform);var L=u.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:0.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:0.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class I{constructor(t,e,i,n){this.field=t,this.line=e,this.from=i,this.to=n}}class b{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){let e=t.mapPos(this.from,-1,be.TrackDel),i=t.mapPos(this.to,1,be.TrackDel);return e==null||i==null?null:new b(this.field,e,i)}}class x{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],n=[e],s=t.doc.lineAt(e),l=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(i.length){let h=l,c=/^\t*/.exec(a)[0].length;for(let r=0;r<c;r++)h+=t.facet(Xe);n.push(e+h.length-c),a=h+a.slice(c)}i.push(a),e+=a.length+1}let f=this.fieldPositions.map((a)=>new b(a.field,n[a.line]+a.from,n[a.line]+a.to));return{text:i,ranges:f}}static parse(t){let e=[],i=[],n=[],s;for(let l of t.split(/\r\n?|\n/)){while(s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(l)){let f=s[1]?+s[1]:null,a=s[2]||s[3]||"",h=-1;if(f===0)f=1e9;let c=a.replace(/\\[{}]/g,(r)=>r[1]);for(let r=0;r<e.length;r++)if(f!=null?e[r].seq==f:c?e[r].name==c:!1)h=r;if(h<0){let r=0;while(r<e.length&&(f==null||e[r].seq!=null&&e[r].seq<f))r++;e.splice(r,0,{seq:f,name:c}),h=r;for(let p of n)if(p.field>=h)p.field++}for(let r of n)if(r.line==i.length&&r.from>s.index){let p=s[2]?3+(s[1]||"").length:2;r.from-=p,r.to-=p}n.push(new I(h,i.length,s.index,s.index+c.length)),l=l.slice(0,s.index)+a+l.slice(s.index+s[0].length)}l=l.replace(/\\([{}])/g,(f,a,h)=>{for(let c of n)if(c.line==i.length&&c.from>h)c.from--,c.to--;return a}),i.push(l)}return new x(i,n)}}var M=k.widget({widget:new class extends vt{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),A=k.mark({class:"cm-snippetField"});class d{constructor(t,e){this.ranges=t,this.active=e,this.deco=k.set(t.map((i)=>(i.from==i.to?M:A).range(i.from,i.to)),!0)}map(t){let e=[];for(let i of this.ranges){let n=i.map(t);if(!n)return null;e.push(n)}return new d(e,this.active)}selectionInsideField(t){return t.ranges.every((e)=>this.ranges.some((i)=>i.field==this.active&&i.from<=e.from&&i.to>=e.to))}}var y=U.define({map(t,e){return t&&t.map(e)}}),B=U.define(),m=ve.define({create(){return null},update(t,e){for(let i of e.effects){if(i.is(y))return i.value;if(i.is(B)&&t)return new d(t.ranges,i.value)}if(t&&e.docChanged)t=t.map(e.changes);if(t&&e.selection&&!t.selectionInsideField(e.selection))t=null;return t},provide:(t)=>u.decorations.from(t,(e)=>e?e.deco:k.none)});function w(t,e){return o.create(t.filter((i)=>i.field==e).map((i)=>o.range(i.from,i.to)))}function F(t){let e=x.parse(t);return(i,n,s,l)=>{let{text:f,ranges:a}=e.instantiate(i.state,s),{main:h}=i.state.selection,c={changes:{from:s,to:l==h.from?h.to:l,insert:z.of(f)},scrollIntoView:!0,annotations:n?[P.of(n),te.userEvent.of("input.complete")]:void 0};if(a.length)c.selection=w(a,0);if(a.some((r)=>r.field>0)){let r=new d(a,0),p=c.effects=[y.of(r)];if(i.state.field(m,!1)===void 0)p.push(U.appendConfig.of([m,H,V,L]))}i.dispatch(i.state.update(c))}}function S(t){return({state:e,dispatch:i})=>{let n=e.field(m,!1);if(!n||t<0&&n.active==0)return!1;let s=n.active+t,l=t>0&&!n.ranges.some((f)=>f.field==s+t);return i(e.update({selection:w(n.ranges,s),effects:y.of(l?null:new d(n.ranges,s)),scrollIntoView:!0})),!0}}var W=({state:t,dispatch:e})=>{if(!t.field(m,!1))return!1;return e(t.update({effects:y.of(null)})),!0},N=S(1),j=S(-1);var _=[{key:"Tab",run:N,shift:j},{key:"Escape",run:W}],C=g.define({combine(t){return t.length?t[0]:_}}),H=Pe.highest(ot.compute([C],(t)=>t.facet(C)));function R(t,e){return{...e,apply:F(t)}}var V=u.domEventHandlers({mousedown(t,e){let i=e.state.field(m,!1),n;if(!i||(n=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let s=i.ranges.find((l)=>l.from<=n&&l.to>=n);if(!s||s.field==i.active)return!1;return e.dispatch({selection:w(i.ranges,s.field),effects:y.of(i.ranges.some((l)=>l.field>s.field)?new d(i.ranges,s.field):null),scrollIntoView:!0}),!0}});var O=new class extends Ge{};O.startSide=1;O.endSide=-1;var ae=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent);
|
|
2
|
-
export{ai,Ve,Be,R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ce,Si,Tt,wi,V,ee,Mn,_i,Dr,Ur,ki,Vr,Br,qr,Vt}from"./chunk-index-18gxy79n.js";export{Tt as AVATAR_STATES,V as CATALOG,Ce as CLASS_IDS,ee as CharacterError,Ur as EAST_ASIAN_SKINS,Si as EXPRESSIONS,wi as STATE_EXPRESSION,Br as accentOf,qr as characterCss,ki as checkSkins,Vr as composeSvg,_i as parseCharacter,Dr as readCharacter,Mn as resolveCharacter,Vt as suggestCharacter};
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import{O,l,j,Un,Oe,vi}from"./chunk-index-31wh5twj.js";var v=!1;function fn(){if(v||typeof document>"u")return;if(v=!0,typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype)try{let t=new CSSStyleSheet;t.replaceSync(`
|
|
2
|
-
.folder-body[hidden] {
|
|
3
|
-
display: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* An empty place to drop (the pinned list, a folder of the drawer) shows only while a row is lifted. */
|
|
7
|
-
[data-empty] {
|
|
8
|
-
display: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
[data-reordering] [data-empty] {
|
|
12
|
-
display: block;
|
|
13
|
-
min-height: 2.75rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Folders of the room list, and the lifted row or folder while it is dragged. */
|
|
17
|
-
.folder {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: var(--space-2);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.folder-head {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: var(--space-2);
|
|
27
|
-
min-height: 2.75rem;
|
|
28
|
-
padding: 0 var(--space-1) 0 var(--space-2);
|
|
29
|
-
border: 1px solid var(--border);
|
|
30
|
-
border-radius: var(--radius-lg);
|
|
31
|
-
background: var(--surface-2);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.folder-toggle {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex: 1;
|
|
37
|
-
align-items: center;
|
|
38
|
-
gap: var(--space-2);
|
|
39
|
-
min-width: 0;
|
|
40
|
-
min-height: 2.75rem;
|
|
41
|
-
padding: 0;
|
|
42
|
-
border: 0;
|
|
43
|
-
background: transparent;
|
|
44
|
-
color: inherit;
|
|
45
|
-
text-align: left;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.folder-toggle strong {
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
text-overflow: ellipsis;
|
|
51
|
-
white-space: nowrap;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.folder-chevron {
|
|
55
|
-
flex: none;
|
|
56
|
-
transition: transform var(--dur-fast) var(--ease-out);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.folder-chevron[data-open] {
|
|
60
|
-
transform: rotate(90deg);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.folder-head .muted-mark[data-partial] {
|
|
64
|
-
opacity: 0.55;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.folder-more,
|
|
68
|
-
.row-more {
|
|
69
|
-
flex: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.folder-body {
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
gap: var(--space-2);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.folder-empty {
|
|
79
|
-
margin: 0;
|
|
80
|
-
padding: var(--space-2) var(--space-3);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.room-list > li {
|
|
84
|
-
position: relative;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* The menu button sits over the row's right edge: the row keeps that strip clear of its chevron and time. */
|
|
88
|
-
.room-list > li[data-arranging] > .room-row {
|
|
89
|
-
padding-right: 3.75rem;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.room-list .row-more {
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: var(--space-2);
|
|
95
|
-
right: var(--space-2);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.arrange-bar {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
justify-content: space-between;
|
|
102
|
-
gap: var(--space-3);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[data-drop-zone] {
|
|
106
|
-
position: relative;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
[data-lifted] {
|
|
110
|
-
position: relative;
|
|
111
|
-
z-index: 5;
|
|
112
|
-
box-shadow: var(--shadow-3);
|
|
113
|
-
transition: none;
|
|
114
|
-
touch-action: none;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
[data-reordering] {
|
|
118
|
-
-webkit-user-select: none;
|
|
119
|
-
user-select: none;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
[data-reordering] [data-drop-item]:not([data-lifted]),
|
|
123
|
-
[data-reordering] [data-folder-block]:not([data-lifted]) {
|
|
124
|
-
transition: transform var(--dur-fast) var(--ease-out);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
[data-drop-target] {
|
|
128
|
-
outline: 2px dashed var(--accent);
|
|
129
|
-
outline-offset: 4px;
|
|
130
|
-
border-radius: var(--radius-lg);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.drop-line {
|
|
134
|
-
position: absolute;
|
|
135
|
-
left: 0;
|
|
136
|
-
right: 0;
|
|
137
|
-
height: 3px;
|
|
138
|
-
margin-top: -2px;
|
|
139
|
-
border-radius: 2px;
|
|
140
|
-
background: var(--accent);
|
|
141
|
-
pointer-events: none;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
@media (prefers-reduced-motion: reduce) {
|
|
145
|
-
.folder-chevron,
|
|
146
|
-
[data-reordering] [data-drop-item]:not([data-lifted]),
|
|
147
|
-
[data-reordering] [data-folder-block]:not([data-lifted]) {
|
|
148
|
-
transition: none;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];return}catch{}let r=document.createElement("style");r.textContent=`
|
|
152
|
-
.folder-body[hidden] {
|
|
153
|
-
display: none;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/* An empty place to drop (the pinned list, a folder of the drawer) shows only while a row is lifted. */
|
|
157
|
-
[data-empty] {
|
|
158
|
-
display: none;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
[data-reordering] [data-empty] {
|
|
162
|
-
display: block;
|
|
163
|
-
min-height: 2.75rem;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/* Folders of the room list, and the lifted row or folder while it is dragged. */
|
|
167
|
-
.folder {
|
|
168
|
-
display: flex;
|
|
169
|
-
flex-direction: column;
|
|
170
|
-
gap: var(--space-2);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.folder-head {
|
|
174
|
-
display: flex;
|
|
175
|
-
align-items: center;
|
|
176
|
-
gap: var(--space-2);
|
|
177
|
-
min-height: 2.75rem;
|
|
178
|
-
padding: 0 var(--space-1) 0 var(--space-2);
|
|
179
|
-
border: 1px solid var(--border);
|
|
180
|
-
border-radius: var(--radius-lg);
|
|
181
|
-
background: var(--surface-2);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.folder-toggle {
|
|
185
|
-
display: flex;
|
|
186
|
-
flex: 1;
|
|
187
|
-
align-items: center;
|
|
188
|
-
gap: var(--space-2);
|
|
189
|
-
min-width: 0;
|
|
190
|
-
min-height: 2.75rem;
|
|
191
|
-
padding: 0;
|
|
192
|
-
border: 0;
|
|
193
|
-
background: transparent;
|
|
194
|
-
color: inherit;
|
|
195
|
-
text-align: left;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.folder-toggle strong {
|
|
199
|
-
overflow: hidden;
|
|
200
|
-
text-overflow: ellipsis;
|
|
201
|
-
white-space: nowrap;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.folder-chevron {
|
|
205
|
-
flex: none;
|
|
206
|
-
transition: transform var(--dur-fast) var(--ease-out);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.folder-chevron[data-open] {
|
|
210
|
-
transform: rotate(90deg);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.folder-head .muted-mark[data-partial] {
|
|
214
|
-
opacity: 0.55;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.folder-more,
|
|
218
|
-
.row-more {
|
|
219
|
-
flex: none;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.folder-body {
|
|
223
|
-
display: flex;
|
|
224
|
-
flex-direction: column;
|
|
225
|
-
gap: var(--space-2);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.folder-empty {
|
|
229
|
-
margin: 0;
|
|
230
|
-
padding: var(--space-2) var(--space-3);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.room-list > li {
|
|
234
|
-
position: relative;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/* The menu button sits over the row's right edge: the row keeps that strip clear of its chevron and time. */
|
|
238
|
-
.room-list > li[data-arranging] > .room-row {
|
|
239
|
-
padding-right: 3.75rem;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.room-list .row-more {
|
|
243
|
-
position: absolute;
|
|
244
|
-
top: var(--space-2);
|
|
245
|
-
right: var(--space-2);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.arrange-bar {
|
|
249
|
-
display: flex;
|
|
250
|
-
align-items: center;
|
|
251
|
-
justify-content: space-between;
|
|
252
|
-
gap: var(--space-3);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
[data-drop-zone] {
|
|
256
|
-
position: relative;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
[data-lifted] {
|
|
260
|
-
position: relative;
|
|
261
|
-
z-index: 5;
|
|
262
|
-
box-shadow: var(--shadow-3);
|
|
263
|
-
transition: none;
|
|
264
|
-
touch-action: none;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
[data-reordering] {
|
|
268
|
-
-webkit-user-select: none;
|
|
269
|
-
user-select: none;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
[data-reordering] [data-drop-item]:not([data-lifted]),
|
|
273
|
-
[data-reordering] [data-folder-block]:not([data-lifted]) {
|
|
274
|
-
transition: transform var(--dur-fast) var(--ease-out);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
[data-drop-target] {
|
|
278
|
-
outline: 2px dashed var(--accent);
|
|
279
|
-
outline-offset: 4px;
|
|
280
|
-
border-radius: var(--radius-lg);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.drop-line {
|
|
284
|
-
position: absolute;
|
|
285
|
-
left: 0;
|
|
286
|
-
right: 0;
|
|
287
|
-
height: 3px;
|
|
288
|
-
margin-top: -2px;
|
|
289
|
-
border-radius: 2px;
|
|
290
|
-
background: var(--accent);
|
|
291
|
-
pointer-events: none;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
@media (prefers-reduced-motion: reduce) {
|
|
295
|
-
.folder-chevron,
|
|
296
|
-
[data-reordering] [data-drop-item]:not([data-lifted]),
|
|
297
|
-
[data-reordering] [data-folder-block]:not([data-lifted]) {
|
|
298
|
-
transition: none;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
`,document.head.append(r)}var w=()=>(O("bv0chj41"),import("./chunk-layout-actions-bv0chj41.js")),pn=(r)=>({mode:"room",key:r,item:(t)=>t.closest("[data-drop-item]"),root:(t)=>t.closest("[data-drop-root]"),onDrop:(t)=>{if(t.type==="room")w().then((n)=>n.dropRoom(r,t.drop))},open:(t)=>void (O("hff104tk"),import("./chunk-folds-hff104tk.js")).then((n)=>n.expandFolder(t))});var m=!1,{emit:M,use:S}=j(),mn=()=>S(()=>m);function hi(r){if(m===r)return;m=r,M()}var P=6,x=()=>(O("q4fx9b22"),import("./chunk-drag-q4fx9b22.js"));function wt(r,t){let n=l(t);n.current=t;let i=l(void 0),u=l(void 0),c=l(!1),b=(e,o,d)=>r(e).then((s)=>{if(s)Oe({...s,at:o,via:d,source:e})},()=>{return}),g=(e,o,d,s)=>{let p=n.current,h=p?.item(e),y=p?.root(e);if(!p||!h||!y)return!1;return u.current??=x(),u.current.then(({lift:E})=>{if(i.current?.id!==o)return s();E({mode:p.mode,key:p.key,item:h,root:y,pointerId:o,y:d(),open:p.open,done:(f)=>{if(f.type==="tap")s();else if(f.type!=="cancel")p.onDrop(f)}})},s),!0},a=Un((e)=>{let o=()=>b(e.source,e.at,e.via),d=i.current;if(!(e.via==="hold"||e.via==="contextmenu"&&d?.touch)||!d)return void o();if(!g(e.source,d.id,()=>d.y,o))return void o();if(e.via==="contextmenu")c.current=!0});return{...a,onPointerDown(e){if(c.current=!1,i.current={id:e.pointerId,x:e.clientX,y:e.clientY,touch:e.pointerType!=="mouse"},e.pointerType!=="mouse"&&vi(e.clientX,window.innerWidth))i.current=void 0;else if(n.current)u.current??=x();a.onPointerDown(e)},onPointerMove(e){let o=i.current;if(o?.id===e.pointerId){if(e.pointerType==="mouse"&&e.buttons===1&&!c.current&&n.current&&Math.hypot(e.clientX-o.x,e.clientY-o.y)>P)c.current=g(e.currentTarget,e.pointerId,()=>e.clientY,()=>{return});o.y=e.clientY}a.onPointerMove(e)},onPointerUp(e){if(i.current?.id===e.pointerId)i.current=void 0;a.onPointerUp(e)},onPointerCancel(e){if(i.current?.id===e.pointerId)i.current=void 0;a.onPointerCancel(e)},onContextMenu:a.onContextMenu,onKeyDown:a.onKeyDown,onClickCapture(e){if(c.current){c.current=!1,e.preventDefault(),e.stopPropagation();return}a.onClickCapture(e)},onDragStart(e){e.preventDefault()}}}
|
|
302
|
-
export{fn,pn,mn,hi,wt};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{M,h,b,f}from"./chunk-index-31wh5twj.js";import{Mr}from"./chunk-index-e1dr6g10.js";import{Ne,$r,Nr,Lr,Xr,zr}from"./chunk-index-0p5h2kdz.js";import{Ot,Xi,Gt}from"./chunk-index-gpkzhq1g.js";var n={createFolder:(e)=>b("folders",{method:"POST",body:JSON.stringify({name:e})}),changeFolder:(e,t)=>b(`folders/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)}),deleteFolder:(e)=>b(`folders/${encodeURIComponent(e)}`,{method:"DELETE"}),muteFolder:(e,t)=>b(`folders/${encodeURIComponent(e)}/mute`,{method:"PUT",body:JSON.stringify({muted:t})}),placeRoom:(e,t,o)=>b(`rooms/${encodeURIComponent(e)}/folder`,{method:"PUT",body:JSON.stringify({folder:t,before:o})}),pinRoom:(e,t,o)=>b(`rooms/${encodeURIComponent(e)}/pin`,{method:"PUT",body:JSON.stringify({pinned:t,before:o})})};var l=(e)=>h(e,"danger"),d=(e)=>M.dispatch({type:"layout_loaded",pins:e.pins,folders:e.folders});async function i(e,t,o=l){let r=Xi();try{d(e(r))}catch{}try{let s=await t();return d(s),s}catch(s){d(r),M.dispatch({type:"changed"}),o(f(s));return}}var Pr=(e,t,o=null)=>i((r)=>zr(r,e,t,o),()=>n.pinRoom(e,t,o)),Rt=(e,t,o=null)=>i((r)=>Xr(r,e,t,o),()=>n.placeRoom(e,t,o));function ti(e,t){let o=Ot(Gt(),e);if(o.kind==="rest")return;let r=Ne(o.siblings,e,t);if(!r)return;return o.kind==="pinned"?Pr(e,!0,r.before):Rt(e,o.folder,r.before)}async function Ei(e,t=l){try{let o=await n.createFolder(e);return d(o),o.folders.at(-1)?.id}catch(o){t(f(o));return}}var Ci=(e,t,o)=>i((r)=>$r(r,e,t),()=>n.changeFolder(e,{name:t}),o),Fr=(e,t)=>i((o)=>Nr(o,e,t),()=>n.changeFolder(e,{before:t}));function Zr(e,t){let o=Ne(Xi().folders.map((r)=>r.id),e,t);return o?Fr(e,o.before):void 0}var Ai=(e,t)=>i((o)=>Lr(o,e),()=>n.deleteFolder(e),t);async function Wr(e,t){try{let o=await n.muteFolder(e,t);for(let r of o.rooms)M.dispatch({type:"room_muted",room:r,muted:o.muted});return!0}catch(o){return l(f(o)),!1}}function Yr(e,t){let o=Mr(Ot(Gt(),e),e,t);if(!o)return;if(o.kind==="pin")return Pr(e,!0,o.before);if(o.kind==="folder")return Rt(e,o.folder,o.before);return Rt(e,null)}
|
|
2
|
-
export{Pr,Rt,ti,Ei,Ci,Fr,Zr,Ai,Wr,Yr};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-4ecjtdy8.js";import"./chunk-index-zfd00hwb.js";import{on}from"./chunk-index-s681nny9.js";var r=()=>on();export{r as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-4ecjtdy8.js";import"./chunk-index-zfd00hwb.js";import{an}from"./chunk-index-krtk6nn2.js";import"./chunk-index-s681nny9.js";import"./chunk-index-9jqcskb4.js";import"./chunk-index-pcvt668q.js";var t=()=>an();export{t as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-4ecjtdy8.js";import"./chunk-index-zfd00hwb.js";import{yt}from"./chunk-index-9jqcskb4.js";import"./chunk-index-pcvt668q.js";var t=()=>yt({jsx:!0});export{t as language};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{o,Pe,A,Me,u,ot,v,ie,nt,S,E,lt,cn,Re,I,i,ct,Ct,_e,T,xt,q,un,Xe,F,Wi,Z}from"./chunk-index-4ecjtdy8.js";import"./chunk-index-zfd00hwb.js";import{zi,an}from"./chunk-index-krtk6nn2.js";import"./chunk-index-s681nny9.js";import"./chunk-index-9jqcskb4.js";import{ai}from"./chunk-index-pcvt668q.js";class Y{static create(e,t,r,n,s){let a=n+(n<<8)+e+(t<<4)|0;return new Y(e,t,r,a,s,[],[])}constructor(e,t,r,n,s,a,l){this.type=e,this.value=t,this.from=r,this.hash=n,this.end=s,this.children=a,this.positions=l,this.blankFirstLine=!1,this.hashProp=[[v.contextHash,n]]}addChild(e,t){if(e.prop(v.contextHash)!=this.hash)e=new E(e.type,e.children,e.positions,e.length,this.hashProp);this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;if(r>=0)t=Math.max(t,this.positions[r]+this.children[r].length+this.from);return new E(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(n,s,a)=>new E(ie.none,n,s,a,this.hashProp)})}}var c;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(c||(c={}));class ze{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class Te{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){if(this.basePos>this.pos)this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return j(this.text,e)}reset(e){this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;while(this.markers.length)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let n=t;n<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function Ce(e,t,r){if(r.pos==r.text.length||e!=t.block&&r.indent>=t.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(e.type==c.OrderedList?de:ue)(r,t,!1);return n>0&&(e.type!=c.BulletList||fe(r,t,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==e.value}var Fe={[c.Blockquote](e,t,r){if(r.next!=62)return!1;return r.markers.push(k(c.QuoteMark,t.lineStart+r.pos,t.lineStart+r.pos+1)),r.moveBase(r.pos+(M(r.text.charCodeAt(r.pos+1))?2:1)),e.end=t.lineStart+r.text.length,!0},[c.ListItem](e,t,r){if(r.next<0?e.blankFirstLine&&e.children.length==1:r.indent<r.baseIndent+e.value)return!1;return r.moveBaseColumn(r.baseIndent+e.value),!0},[c.OrderedList]:Ce,[c.BulletList]:Ce,[c.Document](){return!0}};function M(e){return e==32||e==9||e==10||e==13}function j(e,t=0){while(t<e.length&&M(e.charCodeAt(t)))t++;return t}function Ae(e,t,r){while(t>r&&M(e.charCodeAt(t-1)))t--;return t}function $e(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;while(t<e.text.length&&e.text.charCodeAt(t)==e.next)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let r=t;r<e.text.length;r++)if(e.text.charCodeAt(r)==96)return-1}return t}function De(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function fe(e,t,r){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let n=1;for(let s=e.pos+1;s<e.text.length;s++){let a=e.text.charCodeAt(s);if(a==e.next)n++;else if(!M(a))return-1}if(r&&e.next==45&&qe(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(Je.SetextHeading)>-1)return-1;return n<3?-1:1}function Ue(e,t){for(let r=e.stack.length-1;r>=0;r--)if(e.stack[r].type==t)return!0;return!1}function ue(e,t,r){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||M(e.text.charCodeAt(e.pos+1)))&&(!r||Ue(t,c.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function de(e,t,r){let{pos:n,next:s}=e;for(;;){if(s>=48&&s<=57)n++;else break;if(n==e.text.length)return-1;s=e.text.charCodeAt(n)}if(n==e.pos||n>e.pos+9||s!=46&&s!=41||n<e.text.length-1&&!M(e.text.charCodeAt(n+1))||r&&!Ue(t,c.OrderedList)&&(e.skipSpace(n+1)==e.text.length||n>e.pos+1||e.next!=49))return-1;return n+1-e.pos}function je(e){if(e.next!=35)return-1;let t=e.pos+1;while(t<e.text.length&&e.text.charCodeAt(t)==35)t++;if(t<e.text.length&&!M(e.text.charCodeAt(t)))return-1;let r=t-e.pos;return r>6?-1:r}function qe(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;while(t<e.text.length&&e.text.charCodeAt(t)==e.next)t++;let r=t;while(t<e.text.length&&M(e.text.charCodeAt(t)))t++;return t==e.text.length?r:-1}var se=/^[ \t]*$/,Qe=/-->/,Ze=/\?>/,oe=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*<!--/,Qe],[/^\s*<\?/,Ze],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,se],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,se]];function Ge(e,t,r){if(e.next!=60)return-1;let n=e.text.slice(e.pos);for(let s=0,a=oe.length-(r?1:0);s<a;s++)if(oe[s][0].test(n))return s;return-1}function xe(e,t){let r=e.countIndent(t,e.pos,e.indent),n=e.skipSpace(t),s=e.countIndent(n,t,r);return s>=r+5||n==e.text.length?r+1:s}function N(e,t,r){let n=e.length-1;if(n>=0&&e[n].to==t&&e[n].type==c.CodeText)e[n].to=r;else e.push(k(c.CodeText,t,r))}var K={LinkReference:void 0,IndentedCode(e,t){let r=t.baseIndent+4;if(t.indent<r)return!1;let n=t.findColumn(r),s=e.lineStart+n,a=e.lineStart+t.text.length,l=[],h=[];N(l,s,a);while(e.nextLine()&&t.depth>=e.stack.length)if(t.pos==t.text.length){N(h,e.lineStart-1,e.lineStart);for(let f of t.markers)h.push(f)}else if(t.indent<r)break;else{if(h.length){for(let d of h)if(d.type==c.CodeText)N(l,d.from,d.to);else l.push(d);h=[]}N(l,e.lineStart-1,e.lineStart);for(let d of t.markers)l.push(d);a=e.lineStart+t.text.length;let f=e.lineStart+t.findColumn(t.baseIndent+4);if(f<a)N(l,f,a)}if(h.length){if(h=h.filter((f)=>f.type!=c.CodeText),h.length)t.markers=h.concat(t.markers)}return e.addNode(e.buffer.writeElements(l,-s).finish(c.CodeBlock,a-s),s),!0},FencedCode(e,t){let r=$e(t);if(r<0)return!1;let n=e.lineStart+t.pos,s=t.next,a=r-t.pos,l=t.skipSpace(r),h=Ae(t.text,t.text.length,l),f=[k(c.CodeMark,n,n+a)];if(l<h)f.push(k(c.CodeInfo,e.lineStart+l,e.lineStart+h));for(let d=!0,m=!0,p=!1;e.nextLine()&&t.depth>=e.stack.length;d=!1){let g=t.pos;if(t.indent-t.baseIndent<4)while(g<t.text.length&&t.text.charCodeAt(g)==s)g++;if(g-t.pos>=a&&t.skipSpace(g)==t.text.length){for(let L of t.markers)f.push(L);if(m&&p)N(f,e.lineStart-1,e.lineStart);f.push(k(c.CodeMark,e.lineStart+t.pos,e.lineStart+g)),e.nextLine();break}else{if(p=!0,!d)N(f,e.lineStart-1,e.lineStart),m=!1;for(let H of t.markers)f.push(H);let L=e.lineStart+t.basePos,b=e.lineStart+t.text.length;if(L<b)N(f,L,b),m=!1}}return e.addNode(e.buffer.writeElements(f,-n).finish(c.FencedCode,e.prevLineEnd()-n),n),!0},Blockquote(e,t){let r=De(t);if(r<0)return!1;return e.startContext(c.Blockquote,t.pos),e.addNode(c.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+r),null},HorizontalRule(e,t){if(fe(t,e,!1)<0)return!1;let r=e.lineStart+t.pos;return e.nextLine(),e.addNode(c.HorizontalRule,r),!0},BulletList(e,t){let r=ue(t,e,!1);if(r<0)return!1;if(e.block.type!=c.BulletList)e.startContext(c.BulletList,t.basePos,t.next);let n=xe(t,t.pos+1);return e.startContext(c.ListItem,t.basePos,n-t.baseIndent),e.addNode(c.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+r),t.moveBaseColumn(n),e.block.blankFirstLine=n>=t.text.length,null},OrderedList(e,t){let r=de(t,e,!1);if(r<0)return!1;if(e.block.type!=c.OrderedList)e.startContext(c.OrderedList,t.basePos,t.text.charCodeAt(t.pos+r-1));let n=xe(t,t.pos+r);return e.startContext(c.ListItem,t.basePos,n-t.baseIndent),e.addNode(c.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+r),t.moveBaseColumn(n),e.block.blankFirstLine=n==t.text.length,null},ATXHeading(e,t){let r=je(t);if(r<0)return!1;let n=t.pos,s=e.lineStart+n,a=Ae(t.text,t.text.length,n),l=a;while(l>n&&t.text.charCodeAt(l-1)==t.next)l--;if(l==a||l==n||!M(t.text.charCodeAt(l-1)))l=t.text.length;let h=e.buffer.write(c.HeaderMark,0,r).writeElements(e.parser.parseInline(t.text.slice(n+r+1,l),s+r+1),-s);if(l<t.text.length)h.write(c.HeaderMark,l-n,a-n);let f=h.finish(c.ATXHeading1-1+r,t.text.length-n);return e.nextLine(),e.addNode(f,s),!0},HTMLBlock(e,t){let r=Ge(t,e,!1);if(r<0)return!1;let n=e.lineStart+t.pos,s=oe[r][1],a=[],l=s!=se;while(!s.test(t.text)&&e.nextLine()){if(t.depth<e.stack.length){l=!1;break}for(let d of t.markers)a.push(d)}if(l)e.nextLine();let h=s==Qe?c.CommentBlock:s==Ze?c.ProcessingInstructionBlock:c.HTMLBlock,f=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-n).finish(h,f-n),n),!0},SetextHeading:void 0};class Ve{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let n=r.content+`
|
|
2
|
-
`+t.scrub(),s=this.advance(n);if(s>-1&&s<n.length)return this.complete(e,r,s);return!1}finish(e,t){if((this.stage==2||this.stage==3)&&j(t.content,this.pos)==t.content.length)return this.complete(e,t,t.content.length);return!1}complete(e,t,r){return e.addLeafElement(t,k(c.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){if(e)return this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0;if(e===!1)this.stage=-1;return!1}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(st(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(k(c.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(tt(e,j(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=j(e,this.pos),r=0;if(t>this.pos){let n=rt(e,t,this.start);if(n){let s=re(e,n.to-this.start);if(s>0)this.nextStage(n),r=s}}if(!r)r=re(e,this.pos);return r>0&&r<e.length?r:-1}else return re(e,this.pos)}}function re(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(r==10)break;if(!M(r))return-1}return t}class Ke{nextLine(e,t,r){let n=t.depth<e.stack.length?-1:qe(t),s=t.next;if(n<0)return!1;let a=k(c.HeaderMark,e.lineStart+t.pos,e.lineStart+n);return e.nextLine(),e.addLeafElement(r,k(s==61?c.SetextHeading1:c.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),a])),!0}finish(){return!1}}var Je={LinkReference(e,t){return t.content.charCodeAt(0)==91?new Ve(t):null},SetextHeading(){return new Ke}},Pt=[(e,t)=>je(t)>=0,(e,t)=>$e(t)>=0,(e,t)=>De(t)>=0,(e,t)=>ue(t,e,!0)>=0,(e,t)=>de(t,e,!0)>=0,(e,t)=>fe(t,e,!0)>=0,(e,t)=>Ge(t,e,!0)>=0],yt={text:"",end:0};class Ye{constructor(e,t,r,n){this.parser=e,this.input=t,this.ranges=n,this.line=new Te,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=n[n.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=n[0].from,this.block=Y.create(c.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new at(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;while(r<e.markers.length&&(!n||e.markers[r].from<n.end)){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let n=r(this,e);if(n!=!1){if(n==!0)return null;e.forward();continue e}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let t=new ze(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let n=r(this,t);if(n)t.parsers.push(n)}e:while(this.nextLine()){if(e.pos==e.text.length)break;if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
|
|
3
|
-
`+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);if(!t)return!1;if(this.absoluteLineStart+=t,this.lineStart=ht(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to)this.lineStart++,this.absoluteLineStart++,this.readLine();else this.atEnd=!0,this.readLine();return!0}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){if(this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to)return this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1;else return this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){while(this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=yt;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,n=this.rangeI;while(this.ranges[n].to<t.end){n++;let s=this.ranges[n].from,a=this.lineChunkAt(s);t.end=s+a.length,t.text=t.text.slice(0,this.ranges[n-1].to-r)+a,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);this.absoluteLineEnd=r,e.reset(t);for(;e.depth<this.stack.length;e.depth++){let n=this.stack[e.depth],s=this.parser.skipContextMarkup[n.type];if(!s)throw Error("Unhandled block context "+c[n.type]);let a=this.line.markers.length;if(!s(n,this,e)){if(this.line.markers.length>a)n.end=this.line.markers[this.line.markers.length-1].to;e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(!this.input.lineChunks){let n=t.indexOf(`
|
|
4
|
-
`);r=n<0?t:t.slice(0,n)}else r=t==`
|
|
5
|
-
`?"":t;return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=Y.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){if(typeof e=="number")e=new E(this.parser.nodeSet.types[e],R,R,(r!==null&&r!==void 0?r:this.prevLineEnd())-t);this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(le(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){while(this.stack.length>1)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?We(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=le(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(c.Paragraph,e.content.length),e.start)}elt(e,t,r,n){if(typeof e=="string")return k(this.parser.getNodeType(e),t,r,n);return new ce(e,t)}get buffer(){return new pe(this.parser.nodeSet)}}function We(e,t,r,n,s){let a=e[t].to,l=[],h=[],f=r.from+n;function d(m,p){while(p?m>=a:m>a){let g=e[t+1].from-a;n+=g,m+=g,t++,a=e[t].to}}for(let m=r.firstChild;m;m=m.nextSibling){d(m.from+n,!0);let p=m.from+n,g,L=s.get(m.tree);if(L)g=L;else if(m.to+n>a)g=We(e,t,m,n,s),d(m.to+n,!1);else g=m.toTree();l.push(g),h.push(p-f)}return d(r.to+n,!1),new E(r.type,l,h,r.to+n-f,r.tree?r.tree.propValues:void 0)}class V extends lt{constructor(e,t,r,n,s,a,l,h,f){super();this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=n,this.endLeafBlock=s,this.skipContextMarkup=a,this.inlineParsers=l,this.inlineNames=h,this.wrappers=f,this.nodeTypes=Object.create(null);for(let d of e.types)this.nodeTypes[d.name]=d.id}createParse(e,t,r){let n=new Ye(this,e,t,r);for(let s of this.wrappers)n=s(n,e,t,r);return n}configure(e){let t=ae(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:n}=this,s=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),l=this.blockNames.slice(),h=this.inlineParsers.slice(),f=this.inlineNames.slice(),d=this.endLeafBlock.slice(),m=this.wrappers;if(U(t.defineNodes)){n=Object.assign({},n);let p=r.types.slice(),g;for(let L of t.defineNodes){let{name:b,block:H,composite:P,style:w}=typeof L=="string"?{name:L}:L;if(p.some((y)=>y.name==b))continue;if(P)n[p.length]=(y,D,_)=>P(D,_,y.value);let x=p.length,C=P?["Block","BlockContext"]:!H?void 0:x>=c.ATXHeading1&&x<=c.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"];if(p.push(ie.define({id:x,name:b,props:C&&[[v.group,C]]})),w){if(!g)g={};if(Array.isArray(w)||w instanceof Re)g[b]=w;else Object.assign(g,w)}}if(r=new nt(p),g)r=r.extend(I(g))}if(U(t.props))r=r.extend(...t.props);if(U(t.remove))for(let p of t.remove){let g=this.blockNames.indexOf(p),L=this.inlineNames.indexOf(p);if(g>-1)s[g]=a[g]=void 0;if(L>-1)h[L]=void 0}if(U(t.parseBlock))for(let p of t.parseBlock){let g=l.indexOf(p.name);if(g>-1)s[g]=p.parse,a[g]=p.leaf;else{let L=p.before?J(l,p.before):p.after?J(l,p.after)+1:l.length-1;s.splice(L,0,p.parse),a.splice(L,0,p.leaf),l.splice(L,0,p.name)}if(p.endLeaf)d.push(p.endLeaf)}if(U(t.parseInline))for(let p of t.parseInline){let g=f.indexOf(p.name);if(g>-1)h[g]=p.parse;else{let L=p.before?J(f,p.before):p.after?J(f,p.after)+1:f.length-1;h.splice(L,0,p.parse),f.splice(L,0,p.name)}}if(t.wrap)m=m.concat(t.wrap);return new V(r,s,a,l,d,n,h,f,m)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new X(this,e,t);e:for(let n=t;n<r.end;){let s=r.char(n);for(let a of this.inlineParsers)if(a){let l=a(r,s,n);if(l>=0){n=l;continue e}}n++}return r.resolveMarkers(0)}}function U(e){return e!=null&&e.length>0}function ae(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=ae(e[0]);if(e.length==1)return t;let r=ae(e.slice(1));if(!r||!t)return t||r;let n=(l,h)=>(l||R).concat(h||R),s=t.wrap,a=r.wrap;return{props:n(t.props,r.props),defineNodes:n(t.defineNodes,r.defineNodes),parseBlock:n(t.parseBlock,r.parseBlock),parseInline:n(t.parseInline,r.parseInline),remove:n(t.remove,r.remove),wrap:!s?a:!a?s:(l,h,f,d)=>s(a(l,h,f,d),h,f,d)}}function J(e,t){let r=e.indexOf(t);if(r<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return r}var et=[ie.none];for(let e=1,t;t=c[e];e++)et[e]=ie.define({id:e,name:t,props:e>=c.Escape?[]:[[v.group,e in Fe?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var R=[];class pe{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,n=0){return this.content.push(e,t,r,4+n*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return E.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}class z{constructor(e,t,r,n=R){this.type=e,this.from=t,this.to=r,this.children=n}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new pe(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class ce{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return R}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function k(e,t,r,n){return new z(e,t,r,n)}var me={resolve:"Emphasis",mark:"EmphasisMark"},ge={resolve:"Emphasis",mark:"EmphasisMark"},O={},W={};class B{constructor(e,t,r,n,s=r-t){this.type=e,this.from=t,this.to=r,this.side=n,this.size=s}}var Be="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",G=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{G=new RegExp("[\\p{S}|\\p{P}]","u")}catch(e){}var ne={Escape(e,t,r){if(t!=92||r==e.end-1)return-1;let n=e.char(r+1);for(let s=0;s<Be.length;s++)if(Be.charCodeAt(s)==n)return e.append(k(c.Escape,r,r+2));return-1},Entity(e,t,r){if(t!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(r+1,r+31));return n?e.append(k(c.Entity,r,r+1+n[0].length)):-1},InlineCode(e,t,r){if(t!=96||r&&e.char(r-1)==96)return-1;let n=r+1;while(n<e.end&&e.char(n)==96)n++;let s=n-r,a=0;for(;n<e.end;n++)if(e.char(n)==96){if(a++,a==s&&e.char(n+1)!=96)return e.append(k(c.InlineCode,r,n+1,[k(c.CodeMark,r,r+s),k(c.CodeMark,n+1-s,n+1)]))}else a=0;return-1},HTMLTag(e,t,r){if(t!=60||r==e.end-1)return-1;let n=e.slice(r+1,e.end),s=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(s)return e.append(k(c.Autolink,r,r+1+s[0].length,[k(c.LinkMark,r,r+1),k(c.URL,r+1,r+s[0].length),k(c.LinkMark,r+s[0].length,r+1+s[0].length)]));let a=/^!--(?:-?>|[^]*?-->)/.exec(n);if(a)return e.append(k(c.Comment,r,r+1+a[0].length));let l=/^\?[^]*?\?>/.exec(n);if(l)return e.append(k(c.ProcessingInstruction,r,r+1+l[0].length));let h=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/[a-zA-Z][\w-]*\s*>|[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>)/.exec(n);if(!h)return-1;return e.append(k(c.HTMLTag,r,r+1+h[0].length))},Emphasis(e,t,r){if(t!=95&&t!=42)return-1;let n=r+1;while(e.char(n)==t)n++;let s=e.slice(r-1,r),a=e.slice(n,n+1),l=G.test(s),h=G.test(a),f=/\s|^$/.test(s),d=/\s|^$/.test(a),m=!d&&(!h||f||l),p=!f&&(!l||d||h),g=m&&(t==42||!p||l),L=p&&(t==42||!m||h);return e.append(new B(t==95?me:ge,r,n,(g?1:0)|(L?2:0)))},HardBreak(e,t,r){if(t==92&&e.char(r+1)==10)return e.append(k(c.HardBreak,r,r+2));if(t==32){let n=r+1;while(e.char(n)==32)n++;if(e.char(n)==10&&n>=r+2)return e.append(k(c.HardBreak,r,n+1))}return-1},Link(e,t,r){return t==91?e.append(new B(O,r,r+1,1)):-1},Image(e,t,r){return t==33&&e.char(r+1)==91?e.append(new B(W,r,r+2,1)):-1},LinkEnd(e,t,r){if(t!=93)return-1;for(let n=e.parts.length-1;n>=0;n--){let s=e.parts[n];if(s instanceof B&&(s.type==O||s.type==W)){if(!s.side||e.skipSpace(s.to)==r&&!/[(\[]/.test(e.slice(r+1,r+2)))return e.parts[n]=null,-1;let a=e.takeContent(n),l=e.parts[n]=Nt(e,a,s.type==O?c.Link:c.Image,s.from,r+1);if(s.type==O)for(let h=0;h<n;h++){let f=e.parts[h];if(f instanceof B&&f.type==O)f.side=0}return l.to}}return-1}};function Nt(e,t,r,n,s){let{text:a}=e,l=e.char(s),h=s;if(t.unshift(k(c.LinkMark,n,n+(r==c.Image?2:1))),t.push(k(c.LinkMark,s-1,s)),l==40){let f=e.skipSpace(s+1),d=tt(a,f-e.offset,e.offset),m;if(d){if(f=e.skipSpace(d.to),f!=d.to){if(m=rt(a,f-e.offset,e.offset),m)f=e.skipSpace(m.to)}}if(e.char(f)==41){if(t.push(k(c.LinkMark,s,s+1)),h=f+1,d)t.push(d);if(m)t.push(m);t.push(k(c.LinkMark,f,h))}}else if(l==91){let f=st(a,s-e.offset,e.offset,!1);if(f)t.push(f),h=f.to}return k(r,n,h,t)}function tt(e,t,r){if(e.charCodeAt(t)==60){for(let s=t+1,a=!1;s<e.length;s++){let l=e.charCodeAt(s);if(l==62&&!a)return k(c.URL,t+r,s+1+r);if(l==60&&!a||l==10)return!1;a=l==92}return null}else{let s=0,a=t;for(let l=!1;a<e.length;a++){let h=e.charCodeAt(a);if(M(h))break;else if(l)l=!1;else if(h==40)s++;else if(h==41){if(!s)break;s--}else if(h==92)l=!0}return a>t?k(c.URL,t+r,a+r):a==e.length?null:!1}}function rt(e,t,r){let n=e.charCodeAt(t);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let a=t+1,l=!1;a<e.length;a++){let h=e.charCodeAt(a);if(l)l=!1;else if(h==s)return k(c.LinkTitle,t+r,a+1+r);else if(h==92)l=!0}return null}function st(e,t,r,n){for(let s=!1,a=t+1,l=Math.min(e.length,a+999);a<l;a++){let h=e.charCodeAt(a);if(s)s=!1;else if(h==93)return n?!1:k(c.LinkLabel,t+r,a+1+r);else{if(n&&!M(h))n=!1;if(h==91)return!1;else if(h==92)s=!0}}return null}class X{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,n,s){return this.append(new B(e,t,r,(n?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof B&&(t.type==O||t.type==W))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let n=this.parts[r];if(!(n instanceof B&&n.type.resolve&&n.side&2))continue;let s=n.type==me||n.type==ge,a=n.to-n.from,l,h=r-1;for(;h>=e;h--){let b=this.parts[h];if(b instanceof B&&b.side&1&&b.type==n.type&&!(s&&(n.side&1||b.side&2)&&(b.size+n.size)%3==0&&(b.size%3||n.size%3))){l=b;break}}if(!l)continue;let f=n.type.resolve,d=[],m=l.from,p=n.to;if(s){let b=Math.min(2,l.to-l.from,a);m=l.to-b,p=n.from+b,f=b==1?"Emphasis":"StrongEmphasis"}if(l.type.mark)d.push(this.elt(l.type.mark,m,l.to));for(let b=h+1;b<r;b++){if(this.parts[b]instanceof z)d.push(this.parts[b]);this.parts[b]=null}if(n.type.mark)d.push(this.elt(n.type.mark,n.from,p));let g=this.elt(f,m,p,d);if(this.parts[h]=s&&l.from!=m?new B(l.type,l.from,m,l.side,l.size):null,this.parts[r]=s&&n.to!=p?new B(n.type,p,n.to,n.side,n.size):null)this.parts.splice(r,0,g);else this.parts[r]=g}let t=[];for(let r=e;r<this.parts.length;r++){let n=this.parts[r];if(n instanceof z)t.push(n)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof B&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof B?t:null}skipSpace(e){return j(this.text,e-this.offset)+this.offset}elt(e,t,r,n){if(typeof e=="string")return k(this.parser.getNodeType(e),t,r,n);return new ce(e,t)}}X.linkStart=O;X.imageStart=W;X.emphasisAsterisk=ge;X.emphasisUnderscore=me;function le(e,t){if(!t.length)return e;if(!e.length)return t;let r=e.slice(),n=0;for(let s of t){while(n<r.length&&r[n].to<s.to)n++;if(n<r.length&&r[n].from<s.from){let a=r[n];if(a instanceof z)r[n]=new z(a.type,a.from,a.to,le(a.children,[s]))}else r.splice(n++,0,s)}return r}var it=[c.CodeBlock,c.ListItem,c.OrderedList,c.BulletList];class at{constructor(e,t){if(this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length)this.fragment=e[this.i++]}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){while(this.fragment&&this.fragment.to<=e)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;while(s>0&&this.input.read(s-1,s)!=`
|
|
6
|
-
`)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;if(!r)r=this.cursor=this.fragment.tree.cursor(S.IncludeAnonymous|S.IgnoreMounts),r.firstChild();let n=e+this.fragment.offset;while(r.to<=n)if(!r.parent())return!1;for(;;){if(r.from>=n)return this.fragment.from<=t;if(!r.childAfter(n))return!1}}matches(e){let t=this.cursor.tree;while(t&&t.type.isAnonymous&&t.children[0]instanceof E)t=t.children[0];return t&&t.prop(v.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,l=e.block.children.length,h=e.lineStart-e.block.from>>2,f=a,d=l;e:for(;;){if(t.to-r>Math.min(n,e.to)||t.type.isAnonymous&&t.tree&&(t.to-t.from>h||!Ot(t.tree))){if(t.type.isAnonymous&&t.firstChild())continue;break}let m=ht(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,m);else{let p=new E(e.parser.nodeSet.types[c.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,m)}if(t.type.isAnonymous||t.type.is("Block")){if(t.type.isAnonymous||it.indexOf(t.type.id)<0)a=t.to-r,l=e.block.children.length;else a=f,l=d;f=t.to-r,d=e.block.children.length}for(;;){if(t.nextSibling())continue e;if(!t.parent()||!t.type.isAnonymous)break e}}while(e.block.children.length>l)e.block.children.pop(),e.block.positions.pop();return a-s}}function Ot(e){while(e.type.isAnonymous){let t=e.children[e.children.length-1];if(t instanceof E)e=t;else return!1}return e.type.is("Block")&&it.indexOf(e.type.id)<0}function ht(e,t){let r=e;for(let n=1;n<t.length;n++){let s=t[n-1].to,a=t[n].from;if(s<e)r-=a-s}return r}var Rt=I({"Blockquote/...":i.quote,HorizontalRule:i.contentSeparator,"ATXHeading1/... SetextHeading1/...":i.heading1,"ATXHeading2/... SetextHeading2/...":i.heading2,"ATXHeading3/...":i.heading3,"ATXHeading4/...":i.heading4,"ATXHeading5/...":i.heading5,"ATXHeading6/...":i.heading6,"Comment CommentBlock":i.comment,Escape:i.escape,Entity:i.character,"Emphasis/...":i.emphasis,"StrongEmphasis/...":i.strong,"Link/... Image/...":i.link,"OrderedList/... BulletList/...":i.list,"BlockQuote/...":i.quote,"InlineCode CodeText":i.monospace,"URL Autolink":i.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":i.processingInstruction,"CodeInfo LinkLabel":i.labelName,LinkTitle:i.string,Paragraph:i.content}),ft=new V(new nt(et).extend(Rt),Object.keys(K).map((e)=>K[e]),Object.keys(K).map((e)=>Je[e]),Object.keys(K),Pt,Fe,Object.keys(ne).map((e)=>ne[e]),Object.keys(ne),[]);function zt(e,t,r){let n=[];for(let s=e.firstChild,a=t;;s=s.nextSibling){let l=s?s.from:r;if(l>a)n.push({from:a,to:l});if(!s)break;a=s.to}return n}function ut(e){let{codeParser:t,htmlParser:r}=e;return{wrap:cn((s,a)=>{let l=s.type.id;if(t&&(l==c.CodeBlock||l==c.FencedCode)){let h="";if(l==c.FencedCode){let d=s.node.getChild(c.CodeInfo);if(d)h=a.read(d.from,d.to)}let f=t(h);if(f)return{parser:f,overlay:(d)=>d.type.id==c.CodeText,bracketed:l==c.FencedCode}}else if(r&&(l==c.HTMLBlock||l==c.HTMLTag||l==c.CommentBlock))return{parser:r,overlay:zt(s.node,s.from,s.to)};return null})}}var Tt={resolve:"Strikethrough",mark:"StrikethroughMark"},Ft={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":i.strikethrough}},{name:"StrikethroughMark",style:i.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,r){if(t!=126||e.char(r+1)!=126||e.char(r+2)==126)return-1;let n=e.slice(r-1,r),s=e.slice(r+2,r+3),a=/\s|^$/.test(n),l=/\s|^$/.test(s),h=G.test(n),f=G.test(s);return e.addDelimiter(Tt,r,r+2,!l&&(!f||a||h),!a&&(!h||l||f))},after:"Emphasis"}]};function Q(e,t,r=0,n,s=0){let a=0,l=!0,h=-1,f=-1,d=!1,m=()=>{n.push(e.elt("TableCell",s+h,s+f,e.parser.parseInline(t.slice(h,f),s+h)))};for(let p=r;p<t.length;p++){let g=t.charCodeAt(p);if(g==124&&!d){if(!l||h>-1)a++;if(l=!1,n){if(h>-1)m();n.push(e.elt("TableDelimiter",p+s,p+s+1))}h=f=-1}else if(d||g!=32&&g!=9){if(h<0)h=p;f=p+1}d=!d&&g==92}if(h>-1){if(a++,n)m()}return a}function Ee(e,t){for(let r=t;r<e.length;r++){let n=e.charCodeAt(r);if(n==124)return!0;if(n==92)r++}return!1}var dt=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class he{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let n;if((t.next==45||t.next==58||t.next==124)&&dt.test(n=t.text.slice(t.pos))){let s=[];if(Q(e,r.content,0,s,r.start)==Q(e,n,0))this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)]}}else if(this.rows){let n=[];Q(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){if(!this.rows)return!1;return e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0}}var Xt={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":i.heading}},"TableRow",{name:"TableCell",style:i.content},{name:"TableDelimiter",style:i.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return Ee(t.content,0)?new he:null},endLeaf(e,t,r){if(r.parsers.some((s)=>s instanceof he)||!Ee(t.text,t.basePos))return!1;let n=e.peekLine();return dt.test(n)&&Q(e,t.text,t.basePos)==Q(e,n,t.basePos)},before:"SetextHeading"}]};class pt{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}var $t={defineNodes:[{name:"Task",block:!0,style:i.list},{name:"TaskMarker",style:i.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new pt:null},after:"SetextHeading"}]},Ie=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,He=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Dt=/[\w-]+\.[\w-]+($|[/:])/,ve=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,ye=/\/[a-zA-Z\d@.]+/gy;function Ne(e,t,r,n){let s=0;for(let a=t;a<r;a++)if(e[a]==n)s++;return s}function _t(e,t){He.lastIndex=t;let r=He.exec(e);if(!r||Dt.exec(r[0])[0].indexOf("_")>-1)return-1;let n=t+r[0].length;for(;;){let s=e[n-1],a;if(/[?!.,:*_~]/.test(s)||s==")"&&Ne(e,t,n,")")>Ne(e,t,n,"("))n--;else if(s==";"&&(a=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))n=t+a.index;else break}return n}function Oe(e,t){ve.lastIndex=t;let r=ve.exec(e);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:t+r[0].length-(n=="."?1:0)}var Ut={parseInline:[{name:"Autolink",parse(e,t,r){let n=r-e.offset;if(n&&/\w/.test(e.text[n-1]))return-1;Ie.lastIndex=n;let s=Ie.exec(e.text),a=-1;if(!s)return-1;if(s[1]||s[2]){if(a=_t(e.text,n+s[0].length),a>-1&&e.hasOpenLink){let l=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(n,a));a=n+l[0].length}}else if(s[3])a=Oe(e.text,n);else if(a=Oe(e.text,n+s[0].length),a>-1&&s[0]=="xmpp:"){if(ye.lastIndex=a,s=ye.exec(e.text),s)a=s.index+s[0].length}if(a<0)return-1;return e.addElement(e.elt("URL",r,a+e.offset)),a+e.offset}}]},mt=[Xt,$t,Ft,Ut];function gt(e,t,r){return(n,s,a)=>{if(s!=e||n.char(a+1)==e)return-1;let l=[n.elt(r,a,a+1)];for(let h=a+1;h<n.end;h++){let f=n.char(h);if(f==e)return n.addElement(n.elt(t,a,h+1,l.concat(n.elt(r,h,h+1))));if(f==92)l.push(n.elt("Escape",h,h+++2));if(M(f))break}return-1}}var kt={defineNodes:[{name:"Superscript",style:i.special(i.content)},{name:"SuperscriptMark",style:i.processingInstruction}],parseInline:[{name:"Superscript",parse:gt(94,"Superscript","SuperscriptMark")}]},Lt={defineNodes:[{name:"Subscript",style:i.special(i.content)},{name:"SubscriptMark",style:i.processingInstruction}],parseInline:[{name:"Subscript",parse:gt(126,"Subscript","SubscriptMark")}]},bt={defineNodes:[{name:"Emoji",style:i.character}],parseInline:[{name:"Emoji",parse(e,t,r){let n;if(t!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(e.slice(r+1,e.end))))return-1;return e.addElement(e.elt("Emoji",r,r+1+n[0].length))}}]};var At=Ct({commentTokens:{block:{open:"<!--",close:"-->"}}}),Bt=new v,Et=ft.configure({props:[Z.add((e)=>!e.is("Block")||e.is("Document")||be(e)!=null||jt(e)?void 0:(t,r)=>({from:r.doc.lineAt(t.from).to,to:t.to})),Bt.add(be),F.add({Document:()=>null}),ct.add({Document:At})]});function be(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function jt(e){return e.name=="OrderedList"||e.name=="BulletList"}function qt(e,t){let r=e;for(;;){let n=r.nextSibling,s;if(!n||(s=be(n.type))!=null&&s<=t)break;r=n}return r.to}var Qt=Wi.of((e,t,r)=>{for(let n=T(e).resolveInner(r,-1);n;n=n.parent){if(n.from<t)break;let s=n.type.prop(Bt);if(s==null)continue;let a=qt(n,s);if(a>r)return{from:r,to:a}}return null});function we(e){return new _e(At,e,[],"markdown")}var Zt=we(Et),Gt=Et.configure([mt,Lt,kt,bt,{props:[Z.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),te=we(Gt);function Vt(e,t){return(r)=>{if(r&&e){let n=null;if(r=/\S*/.exec(r)[0],typeof e=="function")n=e(r);else n=un.matchLanguageName(e,r,!0);if(n instanceof un)return n.support?n.support.language.parser:xt.getSkippingParser(n.load());else if(n)return n.parser}return t?t.parser:null}}class ee{constructor(e,t,r,n,s,a,l){this.node=e,this.from=t,this.to=r,this.spaceBefore=n,this.spaceAfter=s,this.type=a,this.item=l}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){while(r.length<e)r+=" ";return r}else{for(let n=this.to-this.from-r.length-this.spaceAfter.length;n>0;n--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+Mt(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function It(e,t){let r=[],n=[];for(let s=e;s;s=s.parent){if(s.name=="FencedCode")return n;if(s.name=="ListItem"||s.name=="Blockquote")r.push(s)}for(let s=r.length-1;s>=0;s--){let a=r[s],l,h=t.lineAt(a.from),f=a.from-h.from;if(a.name=="Blockquote"&&(l=/^ *>( ?)/.exec(h.text.slice(f))))n.push(new ee(a,f,f+l[0].length,"",l[1],">",null));else if(a.name=="ListItem"&&a.parent.name=="OrderedList"&&(l=/^( *)\d+([.)])( *)/.exec(h.text.slice(f)))){let d=l[3],m=l[0].length;if(d.length>=4)d=d.slice(0,d.length-4),m-=4;n.push(new ee(a.parent,f,f+m,l[1],d,l[2],a))}else if(a.name=="ListItem"&&a.parent.name=="BulletList"&&(l=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(h.text.slice(f)))){let d=l[4],m=l[0].length;if(d.length>4)d=d.slice(0,d.length-4),m-=4;let p=l[2];if(l[3])p+=l[3].replace(/[xX]/," ");n.push(new ee(a.parent,f,f+m,l[1],d,p,a))}}return n}function Mt(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function ke(e,t,r,n=0){for(let s=-1,a=e;;){if(a.name=="ListItem"){let h=Mt(a,t),f=+h[2];if(s>=0){if(f!=s+1)return;r.push({from:a.from+h[1].length,to:a.from+h[0].length,insert:String(s+2+n)})}s=f}let l=a.nextSibling;if(!l)break;a=l}}function Se(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||t.facet(Xe)!="\t")return e;let n=Me(e,4,r),s="";for(let a=n;a>0;)if(a>=4)s+="\t",a-=4;else s+=" ",a--;return s+e.slice(r)}var Kt=(e={})=>({state:t,dispatch:r})=>{let n=T(t),{doc:s}=t,a=null,l=t.changeByRange((h)=>{if(!h.empty||!te.isActiveAt(t,h.from,-1)&&!te.isActiveAt(t,h.from,1))return a={range:h};let f=h.from,d=s.lineAt(f),m=It(n.resolveInner(f,-1),s);while(m.length&&m[m.length-1].from>f-d.from)m.pop();if(!m.length)return a={range:h};let p=m[m.length-1];if(p.to-p.spaceAfter.length>f-d.from)return a={range:h};let g=f>=p.to-p.spaceAfter.length&&!/\S/.test(d.text.slice(p.to));if(p.item&&g){if(p.item.from<d.from&&!/^[\s>]*$/.test(d.text.slice(0,p.to)))return a={range:h};let w=p.node.firstChild,x=p.node.getChild("ListItem","ListItem");if(w.to>=f||x&&x.to<f||d.from>0&&!/[^\s>]/.test(s.lineAt(d.from-1).text)||e.nonTightLists===!1){let C=m.length>1?m[m.length-2]:null,y,D="";if(C&&C.item)y=d.from+C.from,D=C.marker(s,1);else y=d.from+(C?C.to:0);let _=[{from:y,to:f,insert:D}];if(p.node.name=="OrderedList")ke(p.item,s,_,-2);if(C&&C.node.name=="OrderedList")ke(C.item,s,_);return{range:o.cursor(y+D.length),changes:_}}else{let C=St(m,t,d);return{range:o.cursor(f+C.length+1),changes:{from:d.from,insert:C+t.lineBreak}}}}if(p.node.name=="Blockquote"&&g&&d.from){let w=s.lineAt(d.from-1),x=/>\s*$/.exec(w.text);if(x&&x.index==p.from){let C=t.changes([{from:w.from+x.index,to:w.to},{from:d.from+p.from,to:d.to}]);return{range:h.map(C),changes:C}}}let L=[];if(p.node.name=="OrderedList")ke(p.item,s,L);let b=p.item&&p.item.from<d.from,H="";if(!b||/^[\s\d.)\-+*>]*/.exec(d.text)[0].length>=p.to)for(let w=0,x=m.length-1;w<=x;w++)H+=w==x&&!b?m[w].marker(s,1):m[w].blank(w<x?Me(d.text,4,m[w+1].from)-H.length:null);let P=f;while(P>d.from&&/\s/.test(d.text.charAt(P-d.from-1)))P--;if(H=Se(H,t),Yt(p.node,t.doc))H=St(m,t,d)+t.lineBreak+H;return L.push({from:P,to:f,insert:t.lineBreak+H}),{range:o.cursor(P+H.length+1),changes:L}});if(a)return!1;return r(t.update(l,{scrollIntoView:!0,userEvent:"input"})),!0},Jt=Kt();function wt(e){return e.name=="QuoteMark"||e.name=="ListMark"}function Yt(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let r=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let s=t.lineAt(r.to),a=t.lineAt(n.from),l=/^[\s>]*$/.test(s.text);return s.number+(l?0:1)<a.number}function St(e,t,r){let n="";for(let s=0,a=e.length-2;s<=a;s++)n+=e[s].blank(s<a?Me(r.text,4,e[s+1].from)-n.length:null,s<a);return Se(n,t)}function Wt(e,t){let r=e.resolveInner(t,-1),n=t;if(wt(r))n=r.from,r=r.parent;for(let s;s=r.childBefore(n);)if(wt(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}var er=({state:e,dispatch:t})=>{let r=T(e),n=null,s=e.changeByRange((a)=>{let l=a.from,{doc:h}=e;if(a.empty&&te.isActiveAt(e,a.from)){let f=h.lineAt(l),d=It(Wt(r,l),h);if(d.length){let m=d[d.length-1],p=m.to-m.spaceAfter.length+(m.spaceAfter?1:0);if(l-f.from>p&&!/\S/.test(f.text.slice(p,l-f.from)))return{range:o.cursor(f.from+p),changes:{from:f.from+p,to:l}};if(l-f.from==p&&(m.item&&f.from<=m.item.from||/^[\s>]*$/.test(f.text.slice(0,m.to)))){let g=f.from+m.from;if(m.item&&m.node.from<m.item.from&&/\S/.test(f.text.slice(m.from,m.to))){let L=m.blank(Me(f.text,4,m.to)-Me(f.text,4,m.from));if(g==f.from)L=Se(L,e);return{range:o.cursor(g+L.length),changes:{from:g,to:f.from+m.to,insert:L}}}if(g<l)return{range:o.cursor(g),changes:{from:g,to:l}}}}}return n={range:a}});if(n)return!1;return t(e.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0},tr=[{key:"Enter",run:Jt},{key:"Backspace",run:er}],Ht=an({matchClosingTags:!1});function vt(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=Zt,completeHTMLTags:a=!0,pasteURLAsLink:l=!0,htmlTagLanguage:h=Ht}=e;if(!(s instanceof V))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let f=e.extensions?[e.extensions]:[],d=[h.support,Qt],m;if(l)d.push(ir);if(r instanceof q)d.push(r.support),m=r.language;else if(r)m=r;let p=t||m?Vt(t,m):void 0;if(f.push(ut({codeParser:p,htmlParser:h.language.parser})),n)d.push(Pe.high(ot.of(tr)));let g=we(s.configure(f));if(a)d.push(g.data.of({autocomplete:rr}));return new q(g,d)}function rr(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let s=T(t).resolveInner(r,-1);while(s&&!s.type.isTop){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:nr(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var Le=null;function nr(){if(Le)return Le;let e=zi(new ai(A.create({extensions:Ht}),0,!0));return Le=e?e.options:[]}var sr=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,ir=u.domEventHandlers({paste:(e,t)=>{var r;let{main:n}=t.state.selection;if(n.empty)return!1;let s=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!s||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s))return!1;if(/^www\./.test(s))s="https://"+s;if(!te.isActiveAt(t.state,n.from,1))return!1;let a=T(t.state),l=!1;if(a.iterate({from:n.from,to:n.to,enter:(h)=>{if(h.from>n.from||sr.test(h.name))l=!0},leave:(h)=>{if(h.to<n.to)l=!0}}),l)return!1;return t.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${s})`}],userEvent:"input.paste",scrollIntoView:!0}),!0}});var Lr=()=>vt();export{Lr as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-4ecjtdy8.js";import"./chunk-index-zfd00hwb.js";import{yt}from"./chunk-index-9jqcskb4.js";import"./chunk-index-pcvt668q.js";var r=()=>yt({typescript:!0,jsx:!0});export{r as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Pr,Rt,ti,Ei,Ci,Fr,Zr,Ai,Wr,Yr}from"./chunk-index-ymbjrsp6.js";import"./chunk-index-gpkzhq1g.js";export{Ei as createFolder,Ai as deleteFolder,Yr as dropRoom,Rt as moveRoom,Wr as muteFolder,Zr as nudgeFolder,ti as nudgeRoom,Pr as pinRoom,Fr as placeFolderBefore,Ci as renameFolderTo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Y,s,l,r,t,c,e,n,x,y,_,L,m,f,Q,se,rr}from"./chunk-index-31wh5twj.js";import{fe}from"./chunk-index-hk3xyy20.js";import{pe}from"./chunk-index-b9ny4623.js";import"./chunk-index-5d8yjj4m.js";var A=[{kind:"core",label:c("Core"),hint:c("Carried into every turn.")},{kind:"note",label:c("Note"),hint:c("Searched when the assistant needs them.")},{kind:"event",label:c("Events"),hint:c("Carried into every turn until their date.")}],q=300;function ee(){let{timeZone:u}=Q(),{version:o}=se(),[i,g]=r("core"),[v,N]=r(""),[b,w]=r(),[d,I]=r(),[h,D]=r(),[C,E]=r(),[k,T]=r(),K=fe(()=>m.principals(),"principals").data,P=l(0),S=Y(async(a)=>{let p=++P.current;try{let V=await m.notes(a.trim(),k);if(p!==P.current)return;w(V),I(void 0)}catch(V){if(p===P.current)I(f(V))}},[k]);s(()=>{let a=setTimeout(()=>void S(v),q);return()=>clearTimeout(a)},[v,S,o]);let R=(b??[]).filter((a)=>a.kind===i).sort((a,p)=>i==="event"?(a.eventDate??"").localeCompare(p.eventDate??""):a.id-p.id),W=rr(u);return n("section",{className:"stack",children:[n("div",{className:"card-head",children:[n("div",{children:[e("h2",{children:t("Notes")}),e("p",{className:"hint",children:t("What the assistant remembers. A change applies from the next turn.")})]}),e("button",{type:"button",onClick:()=>D({draft:{kind:i,fact:"",eventDate:""}}),children:t("Add")})]}),K&&K.principals.length>1?e(B,{people:K,shown:k,choose:(a)=>{w(void 0),T(a)}}):null,n("div",{className:"toolbar",children:[e("div",{className:"tabs",role:"tablist",children:A.map((a)=>n("button",{type:"button",role:"tab","aria-selected":i===a.kind,onClick:()=>g(a.kind),children:[t(a.label),b?` ${b.filter((p)=>p.kind===a.kind).length}`:""]},a.kind))}),e("input",{type:"search",placeholder:t("Search (words separated by spaces)"),"aria-label":t("Search notes"),value:v,onChange:(a)=>N(a.target.value)})]}),e("p",{className:"hint",children:t(A.find((a)=>a.kind===i)?.hint??"")}),d?e(y,{message:d}):null,!b?e(x,{}):R.length===0?e(_,{children:v?t("No matching notes."):t("Nothing of this kind yet.")}):R.map((a)=>e("article",{className:"card",children:n("div",{className:"card-head",children:[n("div",{children:[a.eventDate?n("p",{className:"meta",children:[a.eventDate," ",a.eventDate<W?e(L,{children:t("past")}):null]}):null,e("p",{className:"text",children:a.fact})]}),n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:()=>D({note:a,draft:{kind:a.kind,fact:a.fact,eventDate:a.eventDate??""}}),children:t("Edit")}),e("button",{type:"button",className:"danger",onClick:()=>E(a),children:t("Delete")})]})]})},a.id)),e(pe,{open:h!==void 0,title:h?.note?t("Edit note"):t("Add note"),onClose:()=>D(void 0),children:h?e(F,{initial:h.draft,save:async(a)=>{if(h.note)await m.updateNote(h.note.id,a,k);else await m.addNote(a,k);D((p)=>p===h?void 0:p),await S(v)},cancel:()=>D(void 0)}):null}),e(pe,{open:C!==void 0,title:t("Delete this note?"),onClose:()=>E(void 0),children:C?e(H,{text:C.fact,run:async()=>{await m.deleteNote(C.id,k),E((a)=>a===C?void 0:a),await S(v)},cancel:()=>E(void 0)}):null})]})}function B(u){let{people:o}=u;return n("label",{className:"inline",children:[t("Whose notes")," ",e("select",{value:u.shown??o.self,onChange:(i)=>u.choose(i.target.value===o.self?void 0:i.target.value),children:o.principals.map((i)=>e("option",{value:i.id,children:i.id===o.self?t("{name} (you)",{name:i.name}):i.disabled?t("{name} (disabled)",{name:i.name}):i.name},i.id))})]})}function F(u){let[o,i]=r(u.initial),[g,v]=r(!1),[N,b]=r(),w=async()=>{v(!0),b(void 0);try{await u.save({kind:o.kind,fact:o.fact,...o.kind==="event"&&o.eventDate?{eventDate:o.eventDate}:{}})}catch(d){b(f(d)),v(!1)}};return n("form",{className:"stack",onSubmit:(d)=>{d.preventDefault(),w()},children:[n("fieldset",{children:[e("legend",{children:t("Kind")}),e("div",{className:"tabs",children:A.map((d)=>e("button",{type:"button","aria-pressed":o.kind===d.kind,onClick:()=>i({...o,kind:d.kind}),children:t(d.label)},d.kind))})]}),o.kind==="event"?n("label",{children:[t("Date"),e("input",{type:"date",value:o.eventDate,onChange:(d)=>i({...o,eventDate:d.target.value})})]}):null,n("label",{children:[t("Text"),e("textarea",{rows:4,value:o.fact,onChange:(d)=>i({...o,fact:d.target.value})})]}),N?e(y,{message:N}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:u.cancel,children:t("Cancel")}),e("button",{type:"submit",disabled:g,children:g?t("Saving…"):t("Save")})]})]})}function H(u){let[o,i]=r(!1),[g,v]=r();return n("div",{className:"stack",children:[e("p",{className:"text",children:u.text}),g?e(y,{message:g}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:u.cancel,children:t("Cancel")}),e("button",{type:"button",className:"danger",disabled:o,onClick:()=>{i(!0),u.run().catch((N)=>{v(f(N)),i(!1)})},children:o?t("Deleting…"):t("Delete")})]})]})}export{ee as NotesPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,t,c,p,e,n,C,x,y,_,L,m,f,Q,se,Ke,J,we,zn,Nt,Sn}from"./chunk-index-31wh5twj.js";import{fe}from"./chunk-index-hk3xyy20.js";import{pe}from"./chunk-index-b9ny4623.js";import"./chunk-index-5d8yjj4m.js";function g(a){let{cleanup:s}=Q(),[d,h]=r(),[l,o]=r(!1),[u,i]=r();if(!s)return null;let w=()=>{if(!l)h(void 0),i(void 0)};return n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:()=>h("start-over"),children:t("Start over")}),a.deletable?e("button",{type:"button",className:"danger",onClick:()=>h("delete"),children:t("Delete")}):null,n(pe,{open:d!==void 0,title:d==="delete"?t("Permanently delete {name}?",{name:a.title}):t("Start over {name}?",{name:a.title}),onClose:w,children:[e("p",{children:d==="delete"?t("The live conversation and all archives will be permanently deleted. Memory and schedules are preserved."):t("The current conversation will be archived; the next message starts a new one. Long-term memory is preserved. Active turns finish first.")}),u?e(y,{message:u}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:l,onClick:w,children:t("Cancel")}),e("button",{type:"button",className:d==="delete"?"danger":"",disabled:l,onClick:async()=>{if(!d)return;o(!0),i(void 0);try{if(d==="delete")await m.deleteConversation(a.channel);else await m.startOver(a.channel);h(void 0),a.refresh()}catch(k){i(f(k))}finally{o(!1)}},children:l?d==="delete"?t("Deleting…"):a.busy?t("Waiting for this turn…"):t("Starting over…"):d==="delete"?t("Delete permanently"):t("Start over")})]})]})]})}function K(){let a=Q(),{now:s}=se(),[d,h]=r(0),l=()=>h((i)=>i+1),{data:o,error:u}=fe(()=>m.overview(),`overview:${d}`);if(!o)return u?e(y,{message:u}):e(x,{});return n(p,{children:[u?e(y,{message:u}):null,n("section",{className:"stack",children:[e("h2",{children:t("Agent server")}),e("p",{className:"hint",children:t("Agent and group status; starting over archives the conversation and preserves memory.")}),o.agents.length+o.groups.length===0?e(_,{children:t("No agents.")}):null,o.agents.map((i)=>e(I,{agent:i,groups:o.groups,agents:o.agents,guildId:o.guildId,now:s,refresh:l},i.name)),o.groups.map((i)=>e(N,{group:i,guildId:o.guildId,now:s,timeZone:a.timeZone,refresh:l},i.name))]}),n("section",{className:"stack",children:[e("h2",{children:t("My workspaces")}),e("p",{className:"hint",children:t("Direct messages and channels where you mention the assistant. Start over archives; delete removes every archive permanently.")}),o.workspaces?.length?o.workspaces.map((i)=>e(b,{conversation:i,schedules:i.schedules,now:s,refresh:l},i.key)):e(_,{children:t("No workspaces.")})]}),n("section",{className:"stack",children:[e("h2",{children:t("Outside-agent conversations")}),e("p",{className:"hint",children:t("Conversations opened through remote MCP; after deletion the session ID cannot be resumed.")}),o.outside?.length?o.outside.map((i)=>e(b,{conversation:i,now:s,refresh:l},i.key)):e(_,{children:t("No outside-agent conversations.")})]}),n("section",{className:"stack",children:[e("h2",{children:t("Party channels")}),e("p",{className:"hint",children:t("Starting over stops the container and archives role conversations; each speaker's memory is preserved.")}),o.party?.length?o.party.map((i)=>e(A,{party:i,now:s,refresh:l},i.key)):e(_,{children:t("No party channels.")})]})]})}function v({busy:a}){return e(L,{tone:a?"busy":"plain",children:a===0?t("idle"):a===1?t("Working"):t("Working, {count} waiting",{count:a-1})})}function N(a){let{group:s,now:d,timeZone:h}=a;return n("article",{className:"card",children:[n("div",{className:"card-head",children:[s.channelId?e("a",{href:Sn(s.channelId,a.guildId),target:"_blank",rel:"noreferrer",children:s.displayName}):e("strong",{children:s.displayName}),e(L,{children:t("Group")}),e(v,{busy:s.busy})]}),e("p",{children:t("Members: {members} | Host: {host}",{members:s.members.join(", "),host:s.host})}),n("p",{className:"hint",children:[t("Last active")," ",Ke(s.lastActive,d,h)]}),s.channelId?e(g,{channel:`discord:${s.channelId}`,title:s.displayName,busy:s.busy>0,refresh:a.refresh}):null]})}function I(a){let{agent:s}=a,{timeZone:d,panes:h}=Q(),l=a.groups.find((i)=>i.channelId===s.workingIn),o=a.agents.find((i)=>i.channelId===s.workingIn),u=!s.workingIn?void 0:s.workingIn===s.channelId?t("Working in own channel"):l?t("Working in group {name}",{name:l.displayName}):o?t("Replying in {name}'s channel",{name:o.displayName}):t("Replying in another channel");return n("article",{className:"card",children:[n("div",{className:"card-head",children:[e("strong",{children:s.channelId?e("a",{href:Sn(s.channelId,a.guildId),target:"_blank",rel:"noreferrer",children:s.displayName}):s.displayName}),e(L,{children:"agent"}),s.workingIn?e(v,{busy:1+s.waiting}):s.waiting>0?e(L,{tone:"busy",children:t("{count} waiting",{count:s.waiting})}):e(L,{children:t("idle")})]}),u?e("p",{children:u}):null,n("dl",{className:"facts",children:[n("div",{children:[e("dt",{children:t("Model")}),n("dd",{children:[s.model," · thinking ",s.thinking]})]}),n("div",{children:[e("dt",{children:t("Context")}),e("dd",{children:s.context?s.context.tokens===null?t("Just compacted (limit {limit})",{limit:zn(s.context.contextWindow)}):`${zn(s.context.tokens)} / ${zn(s.context.contextWindow)} (${Math.round(s.context.tokens/s.context.contextWindow*100)}%)`:"—"})]}),n("div",{children:[e("dt",{children:t("Schedules")}),e("dd",{children:s.schedules})]}),n("div",{children:[e("dt",{children:t("Last active")}),e("dd",{children:Ke(s.lastActive,a.now,d)})]})]}),s.channelId?n(p,{children:[e(g,{channel:`discord:${s.channelId}`,title:s.displayName,busy:!!s.workingIn||s.waiting>0,refresh:a.refresh}),h.includes("conversations")?e("a",{href:C("conversations",`discord:${s.channelId}`),children:t("transcript")}):null]}):null]})}function b({conversation:a,schedules:s,now:d,refresh:h}){let{timeZone:l,panes:o}=Q(),{title:u,detail:i}=a.kind==="outside"?{title:a.firstMessage||t("(No messages)"),detail:a.id}:Nt(a.channel,a.id);return n("article",{className:"card",children:[n("div",{className:"card-head",children:[e("strong",{children:a.channel&&a.channel.kind!=="gone"?e("a",{href:Sn(a.id,a.channel.kind==="guild"?a.channel.guildId:void 0),target:"_blank",rel:"noreferrer",children:u}):u}),e(v,{busy:a.busy})]}),i?e("p",{className:"hint",children:i}):null,e("p",{children:a.liveBytes>0?t("Conversation {size} · Archives {count}",{size:we(a.liveBytes),count:a.archives}):t("No live conversation · Archives {count}",{count:a.archives})}),a.startedAt?n("p",{children:[t("Started")," ",J(a.startedAt,l)]}):null,n("p",{className:"hint",children:[s!==void 0?`${t("Schedules")} ${s} · `:"",t("Last active")," ",Ke(a.lastActive,d,l)]}),e(g,{channel:a.key,title:u,busy:a.busy>0,deletable:!0,refresh:h}),o.includes("conversations")?e("a",{href:C("conversations",a.key),children:t("transcript")}):null]})}function A({party:a,now:s,refresh:d}){let{timeZone:h}=Q(),{title:l,detail:o}=Nt(a.channel,a.channelId),u={running:c("Container running"),stopped:c("Container stopped"),missing:c("No container yet"),unknown:c("Container status unknown")};return n("article",{className:"card",children:[n("div",{className:"card-head",children:[e("strong",{children:a.channel.kind!=="gone"?e("a",{href:Sn(a.channelId,a.channel.kind==="guild"?a.channel.guildId:void 0),target:"_blank",rel:"noreferrer",children:l}):l}),e(L,{children:a.profile}),e(L,{children:t(u[a.container])}),e(v,{busy:a.busy})]}),o?e("p",{className:"hint",children:o}):null,e("p",{children:t("Enabled by {name} at {time}",{name:a.enabledBy,time:J(a.enabledAt,h)})}),n("p",{className:"hint",children:[t("Last active")," ",Ke(a.lastActive,s,h)]}),e(g,{channel:a.key,title:l,busy:a.busy>0,refresh:d})]})}export{K as OverviewPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s,X,l,r,t,e,n,a,C,H,d,oe,Lt}from"./chunk-index-31wh5twj.js";import{On}from"./chunk-index-bvfqjh77.js";import{N}from"./chunk-index-5d8yjj4m.js";function I(m){let[f,v]=r(""),[p,h]=r(0),g=l(null),b=d((i)=>i.order.flatMap((o)=>{let c=i.rooms[o]?.view;return c?[{key:o,name:c.displayName,agent:c.name,character:c.character,kind:c.kind}]:[]})),u=X(()=>[...b.map((o)=>({id:o.key,label:o.name,hint:o.kind==="agent"?t("Agent"):o.kind==="group"?t("Group"):t("Thread"),room:!0,...o.kind==="agent"?{avatar:{name:o.agent,character:o.character}}:{icon:"conversations"},go:()=>H("room",o.key)})),...m.pages.map((o)=>({id:o.pane,label:o.label,hint:t("Page"),icon:o.icon,go:()=>H(o.pane)}))].flatMap((o)=>{let c=On(f,o.label);return c===void 0?[]:[{target:o,score:c}]}).sort((o,c)=>c.score-o.score).map((o)=>o.target).slice(0,12),[b,m.pages,f]);s(()=>h(0),[f]),s(()=>{if(m.open)v(""),requestAnimationFrame(()=>g.current?.focus())},[m.open]);let y=(i)=>{if(!i)return;m.onClose(),i.go()};return e(N,{open:m.open,title:t("Find a room"),onClose:m.onClose,variant:"palette",children:n("div",{className:"palette-box",children:[n("div",{className:"palette-input",children:[e(a,{name:"search",size:18}),e("input",{ref:g,value:f,placeholder:t("Find a room or page"),"aria-label":t("Find a room or page"),role:"combobox","aria-expanded":"true","aria-controls":"palette-list","aria-activedescendant":u[p]?`palette-${p}`:void 0,onChange:(i)=>v(i.target.value),onKeyDown:(i)=>{if(Lt(i.nativeEvent))return;if(i.key==="ArrowDown")i.preventDefault(),h((o)=>Math.min(u.length-1,o+1));else if(i.key==="ArrowUp")i.preventDefault(),h((o)=>Math.max(0,o-1));else if(i.key==="Enter")i.preventDefault(),y(u[p])}}),e("kbd",{children:"Esc"})]}),n("ul",{className:"palette-list",children:[u.length===0?e("li",{className:"palette-empty",children:t("Nothing matches.")}):null,u.map((i,o)=>e("li",{"data-active":o===p||void 0,children:n("a",{href:i.room?C("room",i.id):C(i.id),onClick:(c)=>{c.preventDefault(),y(i)},onMouseMove:()=>h(o),"aria-current":o===p?"true":void 0,children:[i.avatar?e(oe,{spec:i.avatar.character,name:i.avatar.name,size:28,live:!1}):e("span",{className:"palette-icon",children:e(a,{name:i.icon??"list",size:16})}),e("span",{className:"palette-label",children:i.label}),e("span",{className:"meta",children:i.hint})]})},i.id))]})]})})}export{I as Palette};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{pi,Gr}from"./chunk-index-k7gh0jvz.js";import"./chunk-index-12bw9yj8.js";import"./chunk-index-gpkzhq1g.js";export{Gr as folderMenu,pi as placementItems};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s,r,t,e,n,x,y,_,L,f,Q,J}from"./chunk-index-31wh5twj.js";import{We}from"./chunk-index-jm23vn03.js";import{N}from"./chunk-index-5d8yjj4m.js";function T(a){let{open:m,load:b}=a,{timeZone:v}=Q(),[i,d]=r(),[u,p]=r(),[g,h]=r();s(()=>{if(!m)return;let o=!0;return d(void 0),p(void 0),h(void 0),b().then((c)=>o&&d(c),(c)=>o&&p(f(c))),()=>{o=!1}},[m]);let l=i?.find((o)=>o.id===g);return e(N,{open:m,title:a.title,size:"wide",onClose:a.onClose,children:n("div",{className:"stack history",children:[u?e(y,{message:u}):null,!i&&!u?e(x,{}):null,i?.length===0?e(_,{children:t("No changes have been kept yet.")}):null,i&&i.length>0?e("ul",{className:"menu",children:i.map((o)=>e("li",{children:n("button",{type:"button",className:"menu-item","aria-pressed":o.id===g,onClick:()=>h(o.id),children:[n("span",{className:"menu-text",children:[e("strong",{children:o.by}),e("span",{className:"meta",children:J(o.at,v)})]}),o.revert?e(L,{children:t("Back to the file version")}):null]})},o.id))}):null,l?n("section",{className:"stack","aria-label":t("This change"),children:[e(We,{label:t("This change"),before:l.previous,after:l.text}),e("p",{className:"meta",children:t("It goes into the editor, where you read it over and save it to put it in force.")}),e("div",{className:"actions",children:e("button",{type:"button",onClick:()=>a.onUse(l.text),children:t("Use this text")})})]}):null]})})}export{T as HistorySheet};
|