@blackbelt-technology/pi-dashboard-team-plugin 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/app/assets/{InlineTerminalCard-BRjmM13k.js → InlineTerminalCard-DW7qFTuI.js} +1 -1
- package/dist/app/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/app/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/app/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/app/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/app/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/app/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/app/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/app/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/app/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/app/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/app/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/app/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/app/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/app/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/app/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/app/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/app/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/app/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/app/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/app/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/app/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/app/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/app/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/app/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/app/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/app/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/app/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/app/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/app/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/app/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/app/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/app/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/app/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/app/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/app/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/app/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/app/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/app/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/app/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/app/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/app/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/app/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/app/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/app/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/app/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/app/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/app/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/app/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/app/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/app/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/app/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/app/assets/{PdfPreview-CCfKQhLL.js → PdfPreview-DQKr3Ptp.js} +1 -1
- package/dist/app/assets/{RichDiff-zrt7rxm3.js → RichDiff-FlSFtgaa.js} +7 -7
- package/dist/app/assets/abnfDiagram-VCTEODGH-DzBPGdfj.js +1 -0
- package/dist/app/assets/arc-Db5WL6r9.js +1 -0
- package/dist/app/assets/architectureDiagram-5GKGNRK7-BQpe2TNK.js +36 -0
- package/dist/app/assets/{blockDiagram-I7D4REHJ-M5oRqDla.js → blockDiagram-I7D4REHJ-BgCmLaKA.js} +2 -2
- package/dist/app/assets/{c4Diagram-7LVT6UL2-C6v6KvuZ.js → c4Diagram-7LVT6UL2-_PhalThw.js} +2 -2
- package/dist/app/assets/channel-B49F0XQ7.js +1 -0
- package/dist/app/assets/{chunk-2Q5K7J3B-BrSnR-LD.js → chunk-2Q5K7J3B-BTPmsvl_.js} +1 -1
- package/dist/app/assets/{chunk-5VM5RSS4-BAqdD3be.js → chunk-5VM5RSS4-CVAIVX2p.js} +1 -1
- package/dist/app/assets/{chunk-F27PBJKO-DNLocP_Z.js → chunk-F27PBJKO-D3CtqJt1.js} +1 -1
- package/dist/app/assets/{chunk-IMKFNOWR-DwFLWoAj.js → chunk-IMKFNOWR-BqUz3ypv.js} +4 -4
- package/dist/app/assets/{chunk-JWPE2WC7-DwOQUkPK.js → chunk-JWPE2WC7-DUZ7N-GF.js} +1 -1
- package/dist/app/assets/{chunk-POPQ4Y6H-CN6vxbUi.js → chunk-POPQ4Y6H-07WqhpWx.js} +1 -1
- package/dist/app/assets/{chunk-SVP7TREG-mfOuPsxp.js → chunk-SVP7TREG-Cm2L9T4G.js} +1 -1
- package/dist/app/assets/{chunk-TICWLB2K-R4JNWs6J.js → chunk-TICWLB2K-eq77BKkc.js} +3 -3
- package/dist/app/assets/{chunk-XXDRQBXY-Bwj8o9dr.js → chunk-XXDRQBXY-C7MtNMWW.js} +1 -1
- package/dist/app/assets/classDiagram-ZZMXUADV-BRJiKHXN.js +1 -0
- package/dist/app/assets/classDiagram-v2-VYDZK3BY-BRJiKHXN.js +1 -0
- package/dist/app/assets/cose-bilkent-JH36ORCC-DzKOasFS.js +1 -0
- package/dist/app/assets/{cynefin-OW5HDTMX-CNttFTW2.js → cynefin-OW5HDTMX-CfwDMx4l.js} +1 -1
- package/dist/app/assets/cynefinDiagram-5FMLGOSQ-B49YEFaN.js +62 -0
- package/dist/app/assets/{dagre-GXQ25YYZ-D-VD0Tcu.js → dagre-GXQ25YYZ-DUM8H3yt.js} +2 -2
- package/dist/app/assets/{diagram-S7CK7UJ4-CQReIUYr.js → diagram-S7CK7UJ4-BikoIImA.js} +4 -4
- package/dist/app/assets/diagram-UQ7AKVKN-C9xJpyKN.js +41 -0
- package/dist/app/assets/diagram-VSXAHHWV-DMZrJWN1.js +3 -0
- package/dist/app/assets/diagram-VX7I27RA-BgpgslRO.js +24 -0
- package/dist/app/assets/diagram-Z3DM3KII-jn5qnmcy.js +24 -0
- package/dist/app/assets/ebnfDiagram-PWID7BFC-CH3Fj_if.js +1 -0
- package/dist/app/assets/{erDiagram-RLTQ6QDP-DKoQjGux.js → erDiagram-RLTQ6QDP-DMjJBUCG.js} +2 -2
- package/dist/app/assets/{flowDiagram-HODETNUW-gq74Q1SF.js → flowDiagram-HODETNUW-oNU24Ye_.js} +4 -4
- package/dist/app/assets/ganttDiagram-EL5Y4UJY-C2zwi0FT.js +292 -0
- package/dist/app/assets/gitGraphDiagram-WWUBYQGX-BYCKF4kO.js +106 -0
- package/dist/app/assets/index-9KN5q5uZ.js +287 -0
- package/dist/app/assets/index-B2G_sUzr.js +3 -0
- package/dist/app/assets/index-B_GqR51t.css +1 -0
- package/dist/app/assets/infoDiagram-27XIBGKW-CrCN2toE.js +2 -0
- package/dist/app/assets/{ishikawaDiagram-5VMMS53U-DArpl74K.js → ishikawaDiagram-5VMMS53U-0iJj74kM.js} +2 -2
- package/dist/app/assets/{journeyDiagram-3NMN7TZE-B2sUGe5l.js → journeyDiagram-3NMN7TZE-DgMxPj39.js} +2 -2
- package/dist/app/assets/{kanban-definition-UXKFOSKX-Cx6oCBKM.js → kanban-definition-UXKFOSKX-DZIb7tVw.js} +7 -7
- package/dist/app/assets/katex-C5jXJg4s.js +257 -0
- package/dist/app/assets/katex-Ce-tjK1g.css +1 -0
- package/dist/app/assets/{layout-BjHuHx4m.js → layout-DQIvBakv.js} +1 -1
- package/dist/app/assets/{linear-CgCYMSPy.js → linear-sjXL1SLi.js} +1 -1
- package/dist/app/assets/{mdi-DoP81khn.js → mdi-BExM2XdQ.js} +1 -1
- package/dist/app/assets/mermaid-block-locator-CurhUNEi.js +5 -0
- package/dist/app/assets/mermaid-repair-C9fy3MS0.js +10 -0
- package/dist/app/assets/mermaid-repair-api-CO6VbH78.js +1 -0
- package/dist/app/assets/mermaid.core-C1pLMwEV.js +310 -0
- package/dist/app/assets/{mindmap-definition-YA3MSWOX-DP2Penfk.js → mindmap-definition-YA3MSWOX-Ccil60ZG.js} +3 -3
- package/dist/app/assets/pegDiagram-XKGWAZYB-BrI6zt95.js +1 -0
- package/dist/app/assets/{pieDiagram-E7YTZNPT-BHJIw8Ie.js → pieDiagram-E7YTZNPT-Cjxxn_Dn.js} +3 -3
- package/dist/app/assets/purify.es-CYR4BTuT.js +3 -0
- package/dist/app/assets/{quadrantDiagram-AXDQQJYC-CKJDe9v8.js → quadrantDiagram-AXDQQJYC-DZIHLR6S.js} +4 -4
- package/dist/app/assets/railroadDiagram-O6MQD6OU-BCBEYQn3.js +1 -0
- package/dist/app/assets/{requirementDiagram-BXWQKSXE-CbgXwlu-.js → requirementDiagram-BXWQKSXE-wpVC9c8i.js} +2 -2
- package/dist/app/assets/{sankeyDiagram-P5KCCOFB-xTHr7bNV.js → sankeyDiagram-P5KCCOFB-C2BXPZ46.js} +3 -3
- package/dist/app/assets/{sequenceDiagram-WJ2MYXX4-BJO_VejT.js → sequenceDiagram-WJ2MYXX4-aXfCHnZ_.js} +2 -2
- package/dist/app/assets/sizeCapture-INFHLROL-CkTnQSJD.js +1 -0
- package/dist/app/assets/stateDiagram-D77RDMKH-B2MyGf8l.js +1 -0
- package/dist/app/assets/stateDiagram-v2-MP3YSRHH-Co0nC0rh.js +1 -0
- package/dist/app/assets/swimlanes-42K2YHIH-sOcGW-Ud.js +1 -0
- package/dist/app/assets/swimlanesDiagram-VR7AAH4N-xtUfpzrL.js +8 -0
- package/dist/app/assets/{timeline-definition-24CTP7MA-BaspCbTG.js → timeline-definition-24CTP7MA-C_9MbuiH.js} +4 -4
- package/dist/app/assets/vennDiagram-4TSXK5OY-BWHdyrio.js +34 -0
- package/dist/app/assets/{wardleyDiagram-VM6X3IG4-7u6IS5Iz.js → wardleyDiagram-VM6X3IG4-B22lSp2F.js} +2 -2
- package/dist/app/assets/{xychartDiagram-S5SC5T6Z-D-TnlcEC.js → xychartDiagram-S5SC5T6Z-CznBdNTF.js} +2 -2
- package/dist/app/index.html +2 -2
- package/package.json +8 -8
- package/src/client/FolderTeamSection.tsx +2 -2
- package/src/configSchema.json +63 -2
- package/src/extension/guard.ts +86 -5
- package/src/extension/index.ts +28 -2
- package/src/server/conversations.ts +257 -16
- package/src/server/index.ts +9 -2
- package/src/server/paths.ts +8 -2
- package/src/server/persona.ts +23 -4
- package/src/server/personas-service.ts +15 -3
- package/src/server/projects.ts +7 -3
- package/src/server/records.ts +23 -3
- package/src/server/routes.ts +42 -3
- package/src/server/skills-service.ts +681 -0
- package/src/server/store.ts +28 -4
- package/src/server/team.ts +39 -3
- package/src/server/types.ts +26 -4
- package/src/server/users.ts +9 -3
- package/dist/app/assets/abnfDiagram-VCTEODGH-BNRJZIa7.js +0 -1
- package/dist/app/assets/arc-Ccw1WVCw.js +0 -1
- package/dist/app/assets/architectureDiagram-5GKGNRK7-CmpCS5s2.js +0 -36
- package/dist/app/assets/channel-1wFLoesq.js +0 -1
- package/dist/app/assets/classDiagram-ZZMXUADV-DeqkIaZ-.js +0 -1
- package/dist/app/assets/classDiagram-v2-VYDZK3BY-DeqkIaZ-.js +0 -1
- package/dist/app/assets/cose-bilkent-JH36ORCC-qCY2WMN8.js +0 -1
- package/dist/app/assets/cynefinDiagram-5FMLGOSQ-CBX-RJXy.js +0 -62
- package/dist/app/assets/diagram-UQ7AKVKN-DyEU0WYX.js +0 -41
- package/dist/app/assets/diagram-VSXAHHWV-NLLDj0k8.js +0 -3
- package/dist/app/assets/diagram-VX7I27RA-Daf-u6xI.js +0 -24
- package/dist/app/assets/diagram-Z3DM3KII-B0O71sZp.js +0 -24
- package/dist/app/assets/ebnfDiagram-PWID7BFC-BSRAXWwk.js +0 -1
- package/dist/app/assets/ganttDiagram-EL5Y4UJY-BIAOolFj.js +0 -292
- package/dist/app/assets/gitGraphDiagram-WWUBYQGX-BvZquV67.js +0 -106
- package/dist/app/assets/index-BTj-g2DX.js +0 -559
- package/dist/app/assets/index-owClP-R3.css +0 -1
- package/dist/app/assets/infoDiagram-27XIBGKW-dMwJRmit.js +0 -2
- package/dist/app/assets/mermaid.core-DiBBwf02.js +0 -312
- package/dist/app/assets/pegDiagram-XKGWAZYB-DuPy_Jk1.js +0 -1
- package/dist/app/assets/railroadDiagram-O6MQD6OU-CPmw2XqA.js +0 -1
- package/dist/app/assets/sizeCapture-INFHLROL-BOIqspBs.js +0 -1
- package/dist/app/assets/stateDiagram-D77RDMKH-B1M9C9C6.js +0 -1
- package/dist/app/assets/stateDiagram-v2-MP3YSRHH-BWPtAAkO.js +0 -1
- package/dist/app/assets/swimlanes-42K2YHIH-BtpfWryU.js +0 -1
- package/dist/app/assets/swimlanesDiagram-VR7AAH4N-CRZvPlTl.js +0 -8
- package/dist/app/assets/vennDiagram-4TSXK5OY-Rzs4n1uC.js +0 -34
package/README.md
CHANGED
|
@@ -28,7 +28,10 @@ extra server and no extra Keycloak client are needed for the default same-origin
|
|
|
28
28
|
"idleMinutes": 30,
|
|
29
29
|
"maxConversations": 50,
|
|
30
30
|
"maxLiveSessions": 10,
|
|
31
|
-
"skillCatalog": {
|
|
31
|
+
"skillCatalog": {
|
|
32
|
+
"review": "/abs/path/to/skill-dir", // directory containing SKILL.md (shorthand)
|
|
33
|
+
"triage": { "path": "/abs/triage", "users": "*", "targets": ["billing"] }
|
|
34
|
+
},
|
|
32
35
|
"projects": {
|
|
33
36
|
"billing": {
|
|
34
37
|
"name": "billing-api",
|
|
@@ -40,6 +43,20 @@ extra server and no extra Keycloak client are needed for the default same-origin
|
|
|
40
43
|
}
|
|
41
44
|
```
|
|
42
45
|
|
|
46
|
+
## Skills
|
|
47
|
+
|
|
48
|
+
A persona can use only skills from the catalog. Entries come from `skillCatalog` (config,
|
|
49
|
+
read-only in the app) or are added by an admin in the app (managed, stored in
|
|
50
|
+
`<team home>/skills.json`; config wins on a name clash). An entry is `{ path, users, targets }`:
|
|
51
|
+
`path` is an absolute directory with a `SKILL.md` whose `name` matches the catalog name;
|
|
52
|
+
`users` and `targets` default to `"*"`.
|
|
53
|
+
|
|
54
|
+
- Team sessions start with `--no-skills` plus the persona's skills; global, package and
|
|
55
|
+
extension skills are not available. `/skill:<name>` works for granted skills only.
|
|
56
|
+
- Revoking or narrowing a **managed** entry ends affected live sessions within 5 s.
|
|
57
|
+
A **config** edit has no change notification: it applies at the next open of the conversation.
|
|
58
|
+
- Switching to single-user mode widens user-scoped entries to the operator.
|
|
59
|
+
|
|
43
60
|
## Modes
|
|
44
61
|
|
|
45
62
|
| Mode | When | Who is admin | `bash` personas |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as tn,b as ve,j as ee,I as or,m as sn,t as fi,k as rn}from"./index-9KN5q5uZ.js";/**
|
|
2
2
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
3
3
|
* @license MIT
|
|
4
4
|
*
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pdf_viewer-I4ZZuHqo.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as m,t as D,D as A,
|
|
2
|
+
import{j as m,t as D,D as A,b as f,p as v,e as P,f as y,d as g,G as O,_}from"./index-9KN5q5uZ.js";function j({media:e,url:r,path:o}){const{phase:a}=e;return a.kind!=="failed"?m.jsx("div",{className:"flex h-full w-full items-center justify-center p-4 text-sm text-[var(--text-tertiary)]",children:D("common.loading2",void 0,"Loading…")}):m.jsx(A,{result:a.failure,url:r,path:o,onAsk:e.ask,asked:a.asked,multiRequest:!0,admittedCheckOnly:a.admittedCheckOnly})}const w={kind:"media"},E=e=>({url:e,probed:!1,retriedAfterAsk:!1,lastFailure:{kind:"unknown"},op:0});function R(e){const[r,o]=f.useState(0),[a,i]=f.useState({url:e,phase:w}),k=a.url===e?a.phase:w,n=f.useRef(E(e));n.current.url!==e&&(n.current=E(e));const c=f.useCallback(t=>{const s=n.current;if(s.retriedAfterAsk){i({url:e,phase:{kind:"failed",failure:s.lastFailure,asked:!0,admittedCheckOnly:!0}});return}if(s.probed)return;s.probed=!0;const l=++s.op;i({url:e,phase:{kind:"diagnosing"}}),v(y,e,!0).then(u=>{if(n.current!==s||s.op!==l)return;const h=u.kind==="ok"?{kind:"error",message:t??"media error"}:u;s.lastFailure=h,i({url:e,phase:{kind:"failed",failure:h,asked:!1,admittedCheckOnly:!1}})})},[e]),d=f.useCallback(()=>{const t=n.current,s=++t.op;i({url:e,phase:{kind:"diagnosing"}}),v(P,e,!1).then(l=>{if(!(n.current!==t||t.op!==s)){if(l.kind==="ok"){t.retriedAfterAsk=!0,o(u=>u+1),i({url:e,phase:w});return}t.lastFailure=l,i({url:e,phase:{kind:"failed",failure:l,asked:!0,admittedCheckOnly:!1}})}})},[e]);return{phase:k,attempt:r,onLoadError:c,ask:d}}async function V(){const e=await _(()=>import("./pdf-CcZYcL52.js"),[]),r=(await _(async()=>{const{default:o}=await import("./pdf.worker.min-CNKzwYUy.js");return{default:o}},[])).default;return e.GlobalWorkerOptions.workerSrc=r,e}async function b(){const[e]=await Promise.all([_(()=>import("./pdf_viewer-BXbC1ghE.js"),[]),_(()=>Promise.resolve({}),__vite__mapDeps([0]))]);return e}function x(e){e.viewer.setDocument(null),e.doc.destroy()}async function F(e,r){const o=await V(),{EventBus:a,PDFLinkService:i,PDFViewer:k}=await b(),n=await o.getDocument({url:r,httpHeaders:{...O}}).promise,c=new a,d=new i({eventBus:c}),t=new k({container:e,eventBus:c,linkService:d,textLayerMode:2});return d.setViewer(t),t.setDocument(n),d.setDocument(n,null),{doc:n,viewer:t}}function C({target:e,srcUrl:r}){const o=f.useRef(null),[a,i]=f.useState(null),{cwd:k,path:n}=e,c=g({cwd:k,path:n}),d=R(c),t=d.onLoadError,s=d.attempt;return f.useEffect(()=>{let l=!1,u=null;i(null);const h=o.current;if(h)return F(h,r??c).then(p=>{l?x(p):u=p}).catch(p=>{l||(r===void 0?t(p instanceof Error?p.message:"failed to load PDF"):i(p instanceof Error?p.message:"failed to load PDF"))}),()=>{l=!0,u&&x(u)}},[c,r,s,t]),a?m.jsx("div",{className:"text-red-400 text-sm p-2",children:a}):r===void 0&&d.phase.kind!=="media"?m.jsx(j,{media:d,url:c,path:n}):m.jsx("div",{className:"relative h-full",children:m.jsx("div",{ref:o,className:"pdfViewerContainer absolute inset-0 overflow-auto",children:m.jsx("div",{className:"pdfViewer"})})})}export{C as default};
|