@snagset/server 0.0.4 → 0.1.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/README.md +4 -3
- package/dist/app.js +82 -9
- package/dist/app.js.map +1 -1
- package/dist/bin.js +85 -11
- package/dist/bin.js.map +1 -1
- package/dist/boot.js +67 -51
- package/dist/boot.js.map +1 -1
- package/dist/config.generated.js +5 -2
- package/dist/config.generated.js.map +1 -1
- package/dist/db/connect.js +7 -0
- package/dist/db/connect.js.map +1 -1
- package/dist/db/migrations/0005_studio_reviewers.sql +45 -0
- package/dist/db/migrations/0006_instance_settings.sql +69 -0
- package/dist/db/migrations/0007_jira_provider.no-txn.sql +13 -0
- package/dist/domain.js +129 -0
- package/dist/domain.js.map +1 -0
- package/dist/instance/settings.js +54 -0
- package/dist/instance/settings.js.map +1 -0
- package/dist/integrations/github.js +112 -0
- package/dist/integrations/github.js.map +1 -0
- package/dist/integrations/inbound.js +88 -0
- package/dist/integrations/inbound.js.map +1 -0
- package/dist/integrations/jira.js +129 -0
- package/dist/integrations/jira.js.map +1 -0
- package/dist/integrations/linear.js +111 -0
- package/dist/integrations/linear.js.map +1 -0
- package/dist/integrations/outbox.js +305 -0
- package/dist/integrations/outbox.js.map +1 -0
- package/dist/integrations/slack.js +135 -0
- package/dist/integrations/slack.js.map +1 -0
- package/dist/integrations/store.js +101 -0
- package/dist/integrations/store.js.map +1 -0
- package/dist/listen.js +58 -0
- package/dist/listen.js.map +1 -0
- package/dist/mail/index.js +21 -11
- package/dist/mail/index.js.map +1 -1
- package/dist/mail/resolve.js +80 -0
- package/dist/mail/resolve.js.map +1 -0
- package/dist/platform.js +27 -0
- package/dist/platform.js.map +1 -0
- package/dist/projectCache.js +3 -2
- package/dist/projectCache.js.map +1 -1
- package/dist/projects.js +8 -2
- package/dist/projects.js.map +1 -1
- package/dist/routes/account.js +59 -0
- package/dist/routes/account.js.map +1 -0
- package/dist/routes/activity.js +111 -0
- package/dist/routes/activity.js.map +1 -0
- package/dist/routes/assignees.js +139 -0
- package/dist/routes/assignees.js.map +1 -0
- package/dist/routes/attachments.js +2 -2
- package/dist/routes/attachments.js.map +1 -1
- package/dist/routes/comments.js +27 -17
- package/dist/routes/comments.js.map +1 -1
- package/dist/routes/cors.js +10 -1
- package/dist/routes/cors.js.map +1 -1
- package/dist/routes/instance.js +164 -0
- package/dist/routes/instance.js.map +1 -0
- package/dist/routes/integrations.js +610 -0
- package/dist/routes/integrations.js.map +1 -0
- package/dist/routes/jobs.js +15 -3
- package/dist/routes/jobs.js.map +1 -1
- package/dist/routes/mcpTokens.js +119 -0
- package/dist/routes/mcpTokens.js.map +1 -0
- package/dist/routes/members.js +177 -0
- package/dist/routes/members.js.map +1 -0
- package/dist/routes/owner.js +64 -7
- package/dist/routes/owner.js.map +1 -1
- package/dist/routes/sites.js +181 -8
- package/dist/routes/sites.js.map +1 -1
- package/dist/routes/threads.js +276 -9
- package/dist/routes/threads.js.map +1 -1
- package/dist/serverless.js +41 -6
- package/dist/serverless.js.map +1 -1
- package/dist/studioReviewers.js +67 -0
- package/dist/studioReviewers.js.map +1 -0
- package/dist/vendor/adapters/outbound/sanitise.js +18 -3
- package/dist/vendor/types/brief.js +121 -0
- package/package.json +1 -1
- package/static/dashboard/assets/CompositeItem-DnLNS57f.js +1 -0
- package/static/dashboard/assets/ConfirmDialog-CCAJDc_P.js +1 -0
- package/static/dashboard/assets/CopyButton-exuJDdXj.js +1 -0
- package/static/dashboard/assets/FieldItemContext-jf0Is3j7.js +1 -0
- package/static/dashboard/assets/InstallTag-CkeGLk1a.js +1 -0
- package/static/dashboard/assets/SaveState-BsrfwjoH.js +6 -0
- package/static/dashboard/assets/_app-CiDKmy_a.js +1 -0
- package/static/dashboard/assets/_app-xxJ7UG34.js +56 -0
- package/static/dashboard/assets/activity-mwHb7ir7.js +1 -0
- package/static/dashboard/assets/arrow-left-D08BSlJU.js +6 -0
- package/static/dashboard/assets/avatar-BITl2vTh.js +1 -0
- package/static/dashboard/assets/badge-CGEswzew.js +1 -0
- package/static/dashboard/assets/card-8T0wnIiU.js +1 -0
- package/static/dashboard/assets/check-CiLHTeII.js +6 -0
- package/static/dashboard/assets/chevron-right-BokKbPOn.js +6 -0
- package/static/dashboard/assets/copy-CKgsZbj1.js +6 -0
- package/static/dashboard/assets/createBaseUIEventDetails-CEmaecLi.js +1 -0
- package/static/dashboard/assets/createLucideIcon-llnWWh0E.js +36 -0
- package/static/dashboard/assets/dialog-DrrnCoT5.js +6 -0
- package/static/dashboard/assets/dropdown-menu-DIE2xmL5.js +11 -0
- package/static/dashboard/assets/image-off-CgUC8krg.js +6 -0
- package/static/dashboard/assets/index-BRTBtV91.css +1 -0
- package/static/dashboard/assets/index-C87aqO18.js +129 -0
- package/static/dashboard/assets/label-BfMHjFA7.js +1 -0
- package/static/dashboard/assets/labels--UUyt9uB.js +1 -0
- package/static/dashboard/assets/layout-grid-B7mn7n3K.js +6 -0
- package/static/dashboard/assets/me-D1prnPpY.js +1 -0
- package/static/dashboard/assets/parts-B-HQayFH.js +1 -0
- package/static/dashboard/assets/plus-CuMhvZUZ.js +6 -0
- package/static/dashboard/assets/s._site-Ccc7pzT-.js +1 -0
- package/static/dashboard/assets/s._site.comments-nJZLYDQh.js +39 -0
- package/static/dashboard/assets/s._site.reviewers-BmRPiC0a.js +1 -0
- package/static/dashboard/assets/s._site.settings-DNv5ovrJ.js +1 -0
- package/static/dashboard/assets/setup-B_VsIyK2.js +1 -0
- package/static/dashboard/assets/sign-in-sWUNd3Lp.js +1 -0
- package/static/dashboard/assets/sites-CSzUAHV6.js +1 -0
- package/static/dashboard/assets/studio-DVFn025O.js +1 -0
- package/static/dashboard/assets/studio-DzBapfQK.js +1 -0
- package/static/dashboard/assets/studio.index-Cp7lBb8S.js +1 -0
- package/static/dashboard/assets/studio.integrations-DD2EWaL-.js +1 -0
- package/static/dashboard/assets/studio.members-CVu-eP6p.js +1 -0
- package/static/dashboard/assets/sun-DTI4O-GM.js +16 -0
- package/static/dashboard/assets/table-DkqScFZb.js +1 -0
- package/static/dashboard/assets/update-duXzIzFS.js +1 -0
- package/static/dashboard/assets/useBaseQuery-0OqUJMfc.js +1 -0
- package/static/dashboard/assets/useQuery-COJ09EkU.js +1 -0
- package/static/dashboard/assets/useRender-dtgBGlgC.js +1 -0
- package/static/dashboard/assets/users-O11swHBQ.js +6 -0
- package/static/dashboard/assets/welcome-CT6oH0I8.js +11 -0
- package/static/dashboard/assets/you-_yIPqa_9.js +1 -0
- package/static/dashboard/assets/zod-iC-UhR5u.js +1 -0
- package/static/dashboard/index.html +17 -2
- package/static/widget/snag.capture.js +1 -1
- package/static/widget/snag.dock.js +1 -1
- package/static/widget/snag.panels.js +1 -1
- package/static/widget/snag.runtime.js +2 -2
- package/static/widget/snag.text.js +1 -1
- package/vercel.json +4 -0
- package/static/dashboard/assets/index-CATItBzT.js +0 -1
- package/static/dashboard/assets/index-DsUJ96yc.css +0 -1
package/dist/serverless.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverless.js","sourceRoot":"","sources":["../src/serverless.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAY,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;GAOG;AACH,IAAI,MAAM,GAA+D,IAAI,CAAC;AAE9E,SAAS,IAAI;IACX,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEpC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,qFAAqF;YACnF,sFAAsF;YACtF,sFAAsF;YACtF,sFAAsF;YACtF,iCAAiC,CACpC,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC;IAEjG,MAAM,GAAG,GAAG,SAAS,CAAC;QACpB,GAAG;QACH,GAAG;QACH,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC;QAChD,yEAAyE;QACzE,uEAAuE;QACvE,2EAA2E;QAC3E,gCAAgC;QAChC,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;QAClD,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,SAAS;QACzD,SAAS,EAAE,oCAAoC;QAC/C,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"serverless.js","sourceRoot":"","sources":["../src/serverless.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,SAAS,EAAY,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;GAOG;AACH,IAAI,MAAM,GAA+D,IAAI,CAAC;AAE9E,SAAS,IAAI;IACX,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,yCAAyC;IAC7E,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEpC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,qFAAqF;YACnF,sFAAsF;YACtF,sFAAsF;YACtF,sFAAsF;YACtF,iCAAiC,CACpC,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC;IAEjG,MAAM,GAAG,GAAG,SAAS,CAAC;QACpB,GAAG;QACH,GAAG;QACH,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC;QAChD,yEAAyE;QACzE,uEAAuE;QACvE,2EAA2E;QAC3E,gCAAgC;QAChC,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;QAClD,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,SAAS;QACzD,SAAS,EAAE,oCAAoC;QAC/C,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAS,aAAa,CAAC,CAAU;IAC/B,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAI,QAAQ,CACjB,8CAA8C,OAAO,MAAM;QACzD,gEAAgE;QAChE,4DAA4D,EAC9D,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,CACvG,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAC,OAAgB;IAC7B,IAAI,GAAG,CAAC;IACR,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC;IACnB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,wEAAwE;QACxE,6DAA6D;QAC7D,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAEhC,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,GAAG,IAAI,CAAC;IACd,IAAI,IAAI;QAAE,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
/**
|
|
3
|
+
* Studio people as REVIEWERS — 05 §3.4 and §6.4b, FOLDBACK §A3.
|
|
4
|
+
*
|
|
5
|
+
* Foundations §5 types `Thread.assignee` as a `Reviewer`, and the pool a
|
|
6
|
+
* thread can be assigned to is *studio people ∪ everyone who has commented in
|
|
7
|
+
* the project*. The right half of that union always had reviewer rows; the
|
|
8
|
+
* left half is materialised here: one `kind='verified'` row per member per
|
|
9
|
+
* project, with `user_id` set, which is what 0001's CHECK accepts as the
|
|
10
|
+
* verification ("vouched for by one of our own dashboard users").
|
|
11
|
+
*
|
|
12
|
+
* WHEN. 05 §6.4b: *"materialised on two dashboard writes — project create,
|
|
13
|
+
* and membership create … the pool route is a pure read."* Materialising on
|
|
14
|
+
* READ was rejected there, and the reason holds: a GET that writes rows looks
|
|
15
|
+
* harmless until it runs inside a cached, rate-limited or replicated path.
|
|
16
|
+
* So `createProject` calls this for the new project, the members route calls
|
|
17
|
+
* it for the new person, and 0005 backfills every instance that predates it.
|
|
18
|
+
*
|
|
19
|
+
* ONE STATEMENT, IDEMPOTENT. `reviewers_user_uniq` is UNIQUE (project_id,
|
|
20
|
+
* user_id) WHERE user_id IS NOT NULL, so the INSERT … SELECT can be run twice
|
|
21
|
+
* — or raced by the reply route's found-or-create below — and lands each row
|
|
22
|
+
* once. Soft-deleted users are skipped: somebody who has left the studio is
|
|
23
|
+
* not somebody to hand work to.
|
|
24
|
+
*/
|
|
25
|
+
export async function ensureStudioReviewers(tx, scope) {
|
|
26
|
+
await tx `
|
|
27
|
+
INSERT INTO reviewers (id, org_id, project_id, kind, name, email, user_id)
|
|
28
|
+
SELECT gen_random_uuid(), p.org_id, p.id, 'verified',
|
|
29
|
+
COALESCE(NULLIF(u.name, ''), u.email), u.email, u.id
|
|
30
|
+
FROM memberships m
|
|
31
|
+
JOIN users u ON u.id = m.user_id AND u.deleted_at IS NULL
|
|
32
|
+
JOIN projects p ON p.org_id = m.org_id AND p.deleted_at IS NULL
|
|
33
|
+
WHERE m.org_id = ${scope.orgId}::uuid
|
|
34
|
+
${scope.projectId ? tx `AND p.id = ${scope.projectId}::uuid` : tx ``}
|
|
35
|
+
${scope.userId ? tx `AND u.id = ${scope.userId}::uuid` : tx ``}
|
|
36
|
+
ON CONFLICT (project_id, user_id) WHERE user_id IS NOT NULL DO NOTHING
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The studio person's reviewer row in a project — found, or created on the
|
|
41
|
+
* spot. The reply route needs it for the author of an owner's reply, and it
|
|
42
|
+
* keeps working for a row that predates the backfill or was created between
|
|
43
|
+
* a membership and a project by a path this file does not know about.
|
|
44
|
+
*/
|
|
45
|
+
export async function studioReviewerId(tx, o) {
|
|
46
|
+
const [existing] = await tx `
|
|
47
|
+
SELECT id FROM reviewers WHERE project_id = ${o.projectId}::uuid AND user_id = ${o.userId}::uuid
|
|
48
|
+
`;
|
|
49
|
+
if (existing)
|
|
50
|
+
return existing.id;
|
|
51
|
+
const id = randomUUID();
|
|
52
|
+
const [made] = await tx `
|
|
53
|
+
INSERT INTO reviewers (id, org_id, project_id, kind, name, email, user_id)
|
|
54
|
+
VALUES (${id}::uuid, ${o.orgId}::uuid, ${o.projectId}::uuid, 'verified',
|
|
55
|
+
${o.name || o.email}, ${o.email}, ${o.userId}::uuid)
|
|
56
|
+
ON CONFLICT (project_id, user_id) WHERE user_id IS NOT NULL DO NOTHING
|
|
57
|
+
RETURNING id
|
|
58
|
+
`;
|
|
59
|
+
if (made)
|
|
60
|
+
return made.id;
|
|
61
|
+
// The conflict fired: somebody else inserted it between the two statements.
|
|
62
|
+
const [again] = await tx `
|
|
63
|
+
SELECT id FROM reviewers WHERE project_id = ${o.projectId}::uuid AND user_id = ${o.userId}::uuid
|
|
64
|
+
`;
|
|
65
|
+
return again.id;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=studioReviewers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"studioReviewers.js","sourceRoot":"","sources":["../src/studioReviewers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,EAA2B,EAC3B,KAA6D;IAE7D,MAAM,EAAE,CAAA;;;;;;;uBAOa,KAAK,CAAC,KAAK;QAC1B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA,cAAc,KAAK,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA,EAAE;QAChE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA,cAAc,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA,EAAE;;GAE/D,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,EAA2B,EAC3B,CAAoF;IAEpF,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,EAAE,CAAkB;kDACG,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,MAAM;GAC1F,CAAC;IACF,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC,EAAE,CAAC;IACjC,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IACxB,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,CAAkB;;cAE7B,EAAE,WAAW,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,SAAS;cAC1C,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,MAAM;;;GAGrD,CAAC;IACF,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC,EAAE,CAAC;IACzB,4EAA4E;IAC5E,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,CAAkB;kDACM,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,MAAM;GAC1F,CAAC;IACF,OAAO,KAAM,CAAC,EAAE,CAAC;AACnB,CAAC"}
|
|
@@ -119,6 +119,14 @@ const MARKER_LITERALS = [
|
|
|
119
119
|
* One function per target syntax. Each one answers a single question: what does
|
|
120
120
|
* this provider parse, that a reviewer could type?
|
|
121
121
|
*/
|
|
122
|
+
/** Slack's three characters, then the broadcast words a reviewer could type bare. */
|
|
123
|
+
function escapeSlack(s) {
|
|
124
|
+
return s
|
|
125
|
+
.replace(/&/g, "&")
|
|
126
|
+
.replace(/</g, "<")
|
|
127
|
+
.replace(/>/g, ">")
|
|
128
|
+
.replace(/@(channel|here|everyone)\b/gi, "@\u200b$1");
|
|
129
|
+
}
|
|
122
130
|
const ESCAPE = {
|
|
123
131
|
/**
|
|
124
132
|
* GitHub and Linear both render GitHub-flavoured Markdown and both autolink
|
|
@@ -129,7 +137,10 @@ const ESCAPE = {
|
|
|
129
137
|
* GFM documents and it survives the round trip.
|
|
130
138
|
*/
|
|
131
139
|
github: (s) => escapeMarkdown(s),
|
|
132
|
-
|
|
140
|
+
// 07 §5.2: Linear resolves `ENG-123` references the way GitHub resolves
|
|
141
|
+
// `#123`, so a key-like token becomes an inert code span after the shared
|
|
142
|
+
// Markdown escape (backticks are not escaped by it, so the span survives).
|
|
143
|
+
linear: (s) => escapeMarkdown(s).replace(/(^|[^\w`])([A-Z][A-Z0-9]{1,7}-\d{1,6})\b/g, "$1`$2`"),
|
|
133
144
|
/**
|
|
134
145
|
* Slack's mrkdwn is NOT Markdown and escapes exactly three characters, which
|
|
135
146
|
* Slack's own documentation is explicit about. Escaping more breaks the
|
|
@@ -137,8 +148,12 @@ const ESCAPE = {
|
|
|
137
148
|
* everybody in the workspace — the highest-impact thing a comment body can
|
|
138
149
|
* do to a third party.
|
|
139
150
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
151
|
+
// 07 §6.1 step 2, defence in depth: the bare forms are inert under
|
|
152
|
+
// `parse=none`, which the client sets, but `chat.update` defaults to
|
|
153
|
+
// `parse=client`, which expands them the way the Slack app would. A
|
|
154
|
+
// zero-width space after the `@` keeps the word readable and unexpandable.
|
|
155
|
+
"slack-mrkdwn": (s) => escapeSlack(s),
|
|
156
|
+
"slack-plain": (s) => escapeSlack(s),
|
|
142
157
|
/** JSON is escaped by the serialiser, so the string itself needs nothing.
|
|
143
158
|
* Named rather than omitted: an absent case reads as an oversight. */
|
|
144
159
|
json: (s) => s,
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A thread as a BRIEF — the markdown an agent, a ticket or a clipboard wants:
|
|
3
|
+
* Where to look · What's wrong · Environment · Breadcrumbs · Screenshot.
|
|
4
|
+
*
|
|
5
|
+
* ONE formatter in the shared package (plan/08 §3, D93), so the dashboard's
|
|
6
|
+
* Copy button, the MCP server's `get_thread` and the server's own markdown
|
|
7
|
+
* route cannot drift from one another. Pure: a thread in, a string out, no
|
|
8
|
+
* clock, so the same thread always produces the same brief.
|
|
9
|
+
*
|
|
10
|
+
* STRUCTURAL INPUT. `BriefThread` is the intersection of what the dashboard's
|
|
11
|
+
* `Thread` and the MCP's `WireThread` both carry — nothing here imports
|
|
12
|
+
* either, which is what lets both hand their own type in unchanged.
|
|
13
|
+
*
|
|
14
|
+
* THE FENCE. Every string a reviewer could have typed — a comment body, a
|
|
15
|
+
* name, an element label, a breadcrumb message — passes through `fence`
|
|
16
|
+
* before it is written. The dashboard passes nothing (the clipboard is the
|
|
17
|
+
* studio's own), the MCP server passes `@snagset/adapters`' fence so a model
|
|
18
|
+
* reads `<untrusted-content kind="body">…</untrusted-content>` around the
|
|
19
|
+
* client's words (07 §8.6 mitigation 3). Ids, keys, timestamps and enums we
|
|
20
|
+
* minted are written bare.
|
|
21
|
+
*/
|
|
22
|
+
import { param } from "./names.js";
|
|
23
|
+
const STATUS_WORDS = { open: "Open", progress: "In progress", review: "In review", resolved: "Resolved" };
|
|
24
|
+
export function briefMarkdown(t, site, opts = {}) {
|
|
25
|
+
const f = opts.fence ?? ((_k, v) => v);
|
|
26
|
+
const word = opts.statusLabel ?? ((s) => STATUS_WORDS[s] ?? s);
|
|
27
|
+
const anchor = (t.anchor ?? {});
|
|
28
|
+
const ctx = (t.context ?? {});
|
|
29
|
+
const page = anchor["page"];
|
|
30
|
+
const route = page?.route ?? t.route ?? "/";
|
|
31
|
+
const origin = page?.origin ?? site.origin ?? "";
|
|
32
|
+
const pathname = page?.pathname ?? route;
|
|
33
|
+
const url = origin ? `${origin}${pathname}` : pathname;
|
|
34
|
+
const label = typeof anchor["label"] === "string" ? f("label", anchor["label"]) : "";
|
|
35
|
+
// The element's fields sit at the top level on the wire the widget writes,
|
|
36
|
+
// and under `element` in the MCP fixtures; both are read.
|
|
37
|
+
const el = (anchor["element"] ?? anchor);
|
|
38
|
+
const lines = [];
|
|
39
|
+
lines.push(`# ${t.key}${label ? ` — ${label}` : ""}`);
|
|
40
|
+
lines.push("");
|
|
41
|
+
lines.push(`${site.name} · ${word(t.status)} · left by ${t.createdBy?.name ? f("name", t.createdBy.name) : "someone"} on ${t.createdAt.slice(0, 10)}` +
|
|
42
|
+
(t.assignee ? ` · assigned to ${f("name", t.assignee.name)}` : ""));
|
|
43
|
+
lines.push("");
|
|
44
|
+
lines.push("## Where to look");
|
|
45
|
+
lines.push("");
|
|
46
|
+
lines.push(`- Page: ${url}`);
|
|
47
|
+
if (origin)
|
|
48
|
+
lines.push(`- Open on the page: ${origin}${pathname}?${param("t")}=${encodeURIComponent(t.key)}`);
|
|
49
|
+
if (label)
|
|
50
|
+
lines.push(`- Element: ${label}`);
|
|
51
|
+
const css = typeof anchor["css"] === "string" ? anchor["css"] : typeof el["selector"] === "string" ? el["selector"] : "";
|
|
52
|
+
if (css)
|
|
53
|
+
lines.push(`- Selector: \`${f("selector", css)}\``);
|
|
54
|
+
if (typeof anchor["domid"] === "string")
|
|
55
|
+
lines.push(`- DOM id: \`#${f("selector", anchor["domid"])}\``);
|
|
56
|
+
if (typeof el["role"] === "string") {
|
|
57
|
+
const name = typeof el["accessibleName"] === "string" ? ` “${f("label", el["accessibleName"])}”` : "";
|
|
58
|
+
lines.push(`- Role: ${f("label", el["role"])}${name}`);
|
|
59
|
+
}
|
|
60
|
+
if (typeof el["testId"] === "string")
|
|
61
|
+
lines.push(`- Test id: ${f("label", el["testId"])}`);
|
|
62
|
+
const text = anchor["text"];
|
|
63
|
+
if (text?.exact)
|
|
64
|
+
lines.push(`- Text: “${f("label", text.exact)}”`);
|
|
65
|
+
lines.push(`- Anchor: ${t.anchorState ?? "unknown"}`);
|
|
66
|
+
lines.push("");
|
|
67
|
+
lines.push("## What's wrong");
|
|
68
|
+
lines.push("");
|
|
69
|
+
const readable = (t.comments ?? []).filter((c) => c.body !== null);
|
|
70
|
+
if (readable.length === 0)
|
|
71
|
+
lines.push("> (no comment — a pin with no words)");
|
|
72
|
+
for (const c of readable) {
|
|
73
|
+
const who = c.author?.name ? f("name", c.author.name) : "Anonymous";
|
|
74
|
+
lines.push(`> **${who}${c.author?.kind === "agent" ? " (agent)" : ""}** — ${c.createdAt.slice(0, 16).replace("T", " ")}`);
|
|
75
|
+
for (const l of f("body", String(c.body)).split("\n"))
|
|
76
|
+
lines.push(`> ${l}`);
|
|
77
|
+
lines.push(">");
|
|
78
|
+
}
|
|
79
|
+
if (lines[lines.length - 1] === ">")
|
|
80
|
+
lines.pop();
|
|
81
|
+
lines.push("");
|
|
82
|
+
lines.push("## Environment");
|
|
83
|
+
lines.push("");
|
|
84
|
+
const d = ctx.derived;
|
|
85
|
+
const vp = ctx.viewport;
|
|
86
|
+
if (d?.browser || d?.os)
|
|
87
|
+
lines.push(`- Browser: ${[d.browser, d.os, d.device].filter(Boolean).join(" · ")}`);
|
|
88
|
+
if (vp?.w)
|
|
89
|
+
lines.push(`- Viewport: ${vp.w} × ${vp.h}${vp.dpr ? ` @${Math.round(vp.dpr * 10) / 10}x` : ""}`);
|
|
90
|
+
if (ctx.prefersColorScheme)
|
|
91
|
+
lines.push(`- Colour scheme: ${ctx.prefersColorScheme}`);
|
|
92
|
+
if (ctx.language)
|
|
93
|
+
lines.push(`- Language: ${ctx.language}`);
|
|
94
|
+
if (ctx.ua)
|
|
95
|
+
lines.push(`- User agent: ${f("label", String(ctx.ua))}`);
|
|
96
|
+
const build = ctx.build;
|
|
97
|
+
if (build && Object.keys(build).length) {
|
|
98
|
+
lines.push(`- Build: ${Object.entries(build).map(([k, v]) => `${k}=${f("label", String(v))}`).join(", ")}`);
|
|
99
|
+
}
|
|
100
|
+
lines.push("");
|
|
101
|
+
const crumbs = ctx.breadcrumbs;
|
|
102
|
+
if (crumbs?.length) {
|
|
103
|
+
lines.push(`## Breadcrumbs (${crumbs.length}, oldest first)`);
|
|
104
|
+
lines.push("");
|
|
105
|
+
for (const b of crumbs) {
|
|
106
|
+
lines.push(`- \`${String(b.t).slice(11, 19)}\` ${b.type}${b.level ? `/${b.level}` : ""}: ${f("breadcrumb", String(b.message))}`);
|
|
107
|
+
}
|
|
108
|
+
lines.push("");
|
|
109
|
+
}
|
|
110
|
+
const shot = t.attachments?.find((a) => a.kind === "screenshot") ?? t.attachments?.[0];
|
|
111
|
+
if (shot) {
|
|
112
|
+
lines.push("## Screenshot");
|
|
113
|
+
lines.push("");
|
|
114
|
+
lines.push("Examine this screenshot for visual context — it is the viewport at the moment of the click.");
|
|
115
|
+
lines.push("");
|
|
116
|
+
const abs = shot.url.startsWith("http") ? shot.url : `${site.dashboardOrigin ?? ""}${shot.url}`;
|
|
117
|
+
lines.push(``);
|
|
118
|
+
lines.push("");
|
|
119
|
+
}
|
|
120
|
+
return lines.join("\n").trimEnd() + "\n";
|
|
121
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,d as R,c as E,U as w,j as T,ap as k,X as _,E as j,ao as S,h as H}from"./index-C87aqO18.js";function q(n,s){const e=f.useRef(n),r=R(s);E(()=>{e.current!==n&&r(e.current),e.current=n},[n,r])}const U=f.createContext(void 0);function K(){return f.useContext(U)?.direction??"ltr"}const y=f.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Y(){return f.useContext(y)}function B(n={}){const{guess:s,label:e,metadata:r,textRef:l,index:t}=n,{register:u,unregister:i,subscribeMapChange:d,nextIndexRef:h}=Y(),c=f.useRef(-1),[g,C]=f.useState(t==null&&s?()=>{if(c.current===-1){const p=h.current;h.current+=1,c.current=p}return c.current}:-1),v=t??g,b=f.useRef(null),O=f.useCallback(p=>{const M=b.current;M&&i(M),b.current=p,p&&u(p,{metadata:r??null,index:t??null,label:e,textRef:l})},[t,u,i,r,e,l]);return E(()=>{if(t==null)return d(p=>{const M=b.current?p.get(b.current)?.index:null;M!=null&&C(M)})},[t,d]),{ref:O,index:v}}function Q(n){const{children:s,elementsRef:e,labelsRef:r,onMapChange:l}=n,t=R(l),[,u]=f.useState(!1),i=w(V).current,d=w(F).current,h=f.useRef(0),c=f.useRef(!0),g=f.useRef([]),C=f.useRef(null),v=R(()=>{c.current||(c.current=!0,u(o=>!o))}),b=R((o,x)=>{d.set(o,x),v()}),O=R(o=>{d.delete(o),v()}),p=R(o=>{const x=new Map;return e.current.length=0,r&&(r.current.length=0),o.forEach(a=>{x.set(a.element,{...a.registration.metadata??{},index:a.index}),e.current[a.index]=a.element,r&&(r.current[a.index]=a.registration.label!==void 0?a.registration.label:a.registration.textRef?.current?.textContent??a.element.textContent)}),h.current=e.current.length,x});function M(o){if(C.current?.disconnect(),C.current=null,typeof MutationObserver!="function"||o.length<2)return;const x=new MutationObserver(m=>{if(!G(m))return;let I=null;for(const L of o)if(L.isConnected){if(I&&D(I,L)>0){x.disconnect(),v();return}I=L}});C.current=x;const a=new Set;for(let m=1;m<o.length;m+=1){const I=z(o[m-1],o[m]);I&&a.add(I)}a.forEach(m=>x.observe(m,{childList:!0}))}const N=R(()=>{const[o,x]=W(d),a=p(o);M(x),g.current=o,c.current=!1,i.forEach(m=>m(a)),t(a)});E(()=>(c.current||p(g.current),()=>{e.current=[],r&&(r.current=[])}),[e,r,p]),E(()=>{c.current&&N()}),E(()=>()=>{C.current?.disconnect(),c.current=!0},[]);const P=R(o=>(i.add(o),()=>{i.delete(o)})),A=f.useMemo(()=>({register:b,unregister:O,subscribeMapChange:P,nextIndexRef:h}),[b,O,P,h]);return T.jsx(y.Provider,{value:A,children:s})}function F(){return new Map}function V(){return new Set}function W(n){const s=new Set,e=[],r=[];n.forEach((t,u)=>{if(!u.isConnected)return;const i=t.index,d={index:i??-1,element:u,registration:t};i===null?r.push(d):i>=0&&(s.add(i),e.push(d))});let l=0;return r.sort((t,u)=>D(t.element,u.element)),r.forEach(t=>{for(;s.has(l);)l+=1;t.index=l,e.push(t),l+=1}),s.size>0&&e.sort((t,u)=>t.index-u.index),[e,r.map(t=>t.element)]}function z(n,s){let e=n.parentElement;for(;e&&!e.contains(s);)e=e.parentElement;return e}function G(n){for(const s of n)for(let e=0;e<s.removedNodes.length;e+=1)if(s.removedNodes[e].isConnected)return!0;return!1}function D(n,s){return n.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function J(n={}){const{highlightItemOnHover:s,highlightedIndex:e,onHighlightedIndexChange:r}=k(),{ref:l,index:t}=B(n),u=e===t,i=f.useRef(null),d=_(l,i);return{compositeProps:{tabIndex:u?0:-1,onFocus(){r(t)},onMouseMove(){const c=i.current;if(!s||!c)return;const g=c.hasAttribute("disabled")||c.ariaDisabled==="true";!u&&!g&&c.focus()}},compositeRef:d,index:t}}function Z(n){const{render:s,className:e,style:r,state:l=j,props:t=S,refs:u=S,metadata:i,stateAttributesMapping:d,tag:h="div",...c}=n,{compositeProps:g,compositeRef:C}=J({metadata:i});return H(h,n,{state:l,ref:[C,...u],props:[g,...t,c],stateAttributesMapping:d})}export{Q as C,K as a,B as b,Z as c,q as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,j as e,B as x}from"./index-C87aqO18.js";import{E as u,G as g,I as C,H as D,J as v,K as b}from"./dialog-DrrnCoT5.js";import{L as E,I}from"./label-BfMHjFA7.js";function T({open:l,onOpenChange:o,title:m,description:r,children:h,confirmLabel:j,confirmWord:t,busy:s=!1,onConfirm:p}){const[n,c]=i.useState(""),d=i.useId();i.useEffect(()=>{l&&c("")},[l]);const f=!t||n.trim()===t;return e.jsx(u,{open:l,onOpenChange:a=>{!a&&s||o(a)},children:e.jsx(g,{showCloseButton:!1,children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:a=>{a.preventDefault(),f&&!s&&p()},children:[e.jsxs(C,{children:[e.jsx(D,{children:m}),r&&e.jsx(v,{children:r})]}),h,t&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(E,{htmlFor:d,children:["Type ",e.jsx("b",{className:"font-semibold text-foreground",children:t})," to confirm"]}),e.jsx(I,{id:d,value:n,autoComplete:"off",spellCheck:!1,disabled:s,onChange:a=>c(a.target.value)})]}),e.jsxs(b,{children:[e.jsx(x,{type:"button",variant:"outline",disabled:s,onClick:()=>o(!1),children:"Cancel"}),e.jsx(x,{type:"submit",variant:"destructive",disabled:!f||s,children:s?"Working…":j})]})]})})})}export{T as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as t,B as c}from"./index-C87aqO18.js";import{C}from"./check-CiLHTeII.js";import{C as m}from"./copy-CKgsZbj1.js";function l({text:r,label:e="Copy",withText:s=!1,size:a="icon-sm",className:p}){const[o,i]=n.useState(!1);return t.jsxs(c,{type:"button",variant:"outline",size:s?"sm":a,className:p,"aria-label":o?"Copied":e,onClick:()=>{navigator.clipboard?.writeText(r).catch(()=>{}),i(!0),setTimeout(()=>i(!1),1500)},children:[o?t.jsx(C,{}):t.jsx(m,{}),s&&(o?"Copied":e)]})}export{l as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,c}from"./index-C87aqO18.js";import{u as l}from"./createBaseUIEventDetails-CEmaecLi.js";function y(e,t,n,a=!0,i){const[s,d]=r.useState(),f=l(i?`${i}-label`:void 0),u=e??t??s;return c(()=>{const o=e||t||!a?void 0:m(n.current,f);s!==o&&d(o)}),u}function m(e,t){const n=x(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function x(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const i=e.nextElementSibling;if(i&&i.htmlFor===n)return i}const a=e.labels;return a&&a[0]}const b=r.createContext({disabled:!1});function A(){return r.useContext(b)}export{y as a,A as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,j as e,B as i,ay as n}from"./index-C87aqO18.js";import{C as c}from"./check-CiLHTeII.js";import{C as l}from"./copy-CKgsZbj1.js";function p(t){return`<script src="${location.origin}/snag.js" ${n("site")}="${t}" defer><\/script>`}function g({uid:t}){const[r,a]=o.useState(!1),s=p(t);return e.jsxs("div",{className:"relative rounded-md border border-border bg-background px-3 py-2.5 pr-11 font-mono text-[12.5px] leading-relaxed",children:[e.jsx("code",{className:"whitespace-pre-wrap break-all",children:s}),e.jsx(i,{variant:"ghost",size:"icon-sm",className:"absolute right-1.5 top-1.5","aria-label":r?"Copied":"Copy the tag",onClick:()=>{navigator.clipboard?.writeText(s),a(!0),setTimeout(()=>a(!1),1500)},children:r?e.jsx(c,{}):e.jsx(l,{})})]})}export{g as I};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{r,j as e}from"./index-C87aqO18.js";import{c as n}from"./createLucideIcon-llnWWh0E.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const c=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],l=n("loader-circle",c);function m({saving:s,savedAt:t}){const[i,a]=r.useState(!1);return r.useEffect(()=>{if(!t)return;a(!0);const o=setTimeout(()=>a(!1),1800);return()=>clearTimeout(o)},[t]),s?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12.5px] text-muted-foreground","aria-live":"polite",children:[e.jsx(l,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Saving"]}):e.jsx("span",{className:"text-[12.5px] text-muted-foreground","aria-live":"polite",children:i?"Saved":""})}export{m as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,u as n,G as a,B as r}from"./index-C87aqO18.js";function i({error:s}){const t=n(),o=s instanceof Error?s.message:"Something went wrong.";return e.jsx(a,{children:e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Could not load the dashboard"}),e.jsx("p",{className:"m-0 text-muted-foreground",children:o}),e.jsx(r,{variant:"outline",size:"sm",onClick:()=>void t.invalidate(),children:"Try again"})]})})}const m=({error:s})=>e.jsx(i,{error:s});export{m as errorComponent};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import{u as rt,a as it,b as lt,r,c as z,d as te,g as dt,j as e,B as Ee,e as w,f as Z,m as pe,E as ct,h as fe,i as re,k as ut,l as pt,n as ge,o as Oe,p as ft,L as A,M as gt,q as ht,s as xt,t as mt,v as bt,w as vt,x as jt,O as yt}from"./index-C87aqO18.js";import{u as Ie}from"./useQuery-COJ09EkU.js";import{T as St,i as De,a as wt,D as Ct,b as kt,c as Tt,X as Nt,d as Pt,e as Rt,f as Mt,g as Et,R as Ot,p as It,h as Dt,j as At,k as _t,P as Ht,l as zt,u as Lt,m as $t,n as Bt,o as Ut,q as Ft,r as qt,s as Gt,t as Vt,v as Kt,w as Yt,x as Wt,y as Xt,z as Qt,A as Jt,F as Zt,B as es,C as ts,E as ss,G as ns,H as as}from"./dialog-DrrnCoT5.js";import{c as B,n as Ae,g as os,a as ie,t as rs,d as is,i as ls,u as ds,b as se}from"./createBaseUIEventDetails-CEmaecLi.js";import{g as le,u as cs,a as us,b as ps,s as fs,c as gs,d as hs,e as xs,f as ms,h as bs,S as _e,E as X,D as he,i as xe,j as me,k as He,l as de,m as _,n as Q,o as vs,p as ne}from"./dropdown-menu-DIE2xmL5.js";import{u as ze}from"./useRender-dtgBGlgC.js";import{c as I}from"./createLucideIcon-llnWWh0E.js";import{A as js,a as ys}from"./avatar-BITl2vTh.js";import{S as Ss,i as ws,a as Cs}from"./labels--UUyt9uB.js";import{u as Le}from"./me-D1prnPpY.js";import{L as J}from"./layout-grid-B7mn7n3K.js";import{U as ce}from"./users-O11swHBQ.js";import{c as ks}from"./update-duXzIzFS.js";import{P as Ts}from"./plus-CuMhvZUZ.js";import{M as Ns,S as Ps,a as Rs}from"./sun-DTI4O-GM.js";import"./useBaseQuery-0OqUJMfc.js";import"./check-CiLHTeII.js";import"./CompositeItem-DnLNS57f.js";function Ms(t){const s=rt({warn:t?.router===void 0}),n=t?.router||s;return it(n.stores.__store,lt(t,n))}/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Es=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],$e=I("activity",Es);/**
|
|
7
|
+
* @license lucide-react v1.39.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Os=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],Be=I("blocks",Os);/**
|
|
12
|
+
* @license lucide-react v1.39.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Is=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],Ue=I("book-open",Is);/**
|
|
17
|
+
* @license lucide-react v1.39.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Ds=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Fe=I("building-2",Ds);/**
|
|
22
|
+
* @license lucide-react v1.39.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const As=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],qe=I("chevrons-up-down",As);/**
|
|
27
|
+
* @license lucide-react v1.39.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const _s=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Hs=I("circle-question-mark",_s);/**
|
|
32
|
+
* @license lucide-react v1.39.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const zs=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ls=I("log-out",zs);/**
|
|
37
|
+
* @license lucide-react v1.39.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const $s=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ue=I("message-square",$s);/**
|
|
42
|
+
* @license lucide-react v1.39.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const Bs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Us=I("panel-left",Bs);/**
|
|
47
|
+
* @license lucide-react v1.39.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const Fs=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],qs=I("sliders-horizontal",Fs);/**
|
|
52
|
+
* @license lucide-react v1.39.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const Gs=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ge=I("user",Gs),ae=768;function Vs(){const[t,s]=r.useState(void 0);return r.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ae-1}px)`),a=()=>{s(window.innerWidth<ae)};return n.addEventListener("change",a),s(window.innerWidth<ae),()=>n.removeEventListener("change",a)},[]),!!t}const Ks=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new St,currentIdRef:{current:null},currentContextRef:{current:null}});function Ys(t,s){t.current=s.current}function Ws(t,s={open:!1}){const{open:n}=s,a="rootStore"in t?t.rootStore:t,o=a.useState("floatingId"),g=r.useContext(Ks),{currentIdRef:d,delayRef:l,timeoutMs:h,initialDelayRef:c,currentContextRef:f,hasProvider:v,timeout:x}=g,[y,p]=r.useState(!1),S=r.useRef(n);return z(()=>{S.current=n},[n]),z(()=>{function u(){f.current?.setIsInstantPhase(!1),d.current=null,f.current=null,l.current=c.current,x.clear()}if(d.current&&!n&&d.current===o){if(p(!1),h){const m=o;return x.start(h,()=>{a.select("open")||d.current&&d.current!==m||u()}),()=>{(S.current||d.current!==m)&&x.clear()}}u()}},[n,o,d,l,h,c,f,x,a]),z(()=>{if(!n)return;const u=f.current,m=d.current;x.clear(),f.current={onOpenChange:a.setOpen,setIsInstantPhase:p},d.current=o,l.current={open:0,close:le(c.current,"close")},m!==null&&m!==o?(p(!0),u?.setIsInstantPhase(!0),u?.onOpenChange(!1,B(Ae))):(p(!1),u?.setIsInstantPhase(!1))},[n,o,a,d,l,c,f,x]),z(()=>()=>{if(d.current===o){if(f.current=null,!S.current)return;d.current=null,Ys(l,c),x.clear()}},[f,d,l,o,c,x]),r.useMemo(()=>({hasProvider:v,delayRef:l,isInstantPhase:y}),[v,l,y])}function Xs(t,s){let n=null,a=null,o=!1;return{contextElement:t||void 0,getBoundingClientRect(){const g=t?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=s.axis==="x"||s.axis==="both",l=s.axis==="y"||s.axis==="both",h=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&s.pointerType!=="touch";let c=g.width,f=g.height,v=g.x,x=g.y;return n==null&&s.x&&d&&(n=g.x-s.x),a==null&&s.y&&l&&(a=g.y-s.y),v-=n||0,x-=a||0,c=0,f=0,!o||h?(c=s.axis==="y"?g.width:0,f=s.axis==="x"?g.height:0,v=d&&s.x!=null?s.x:v,x=l&&s.y!=null?s.y:x):o&&!h&&(f=s.axis==="x"?g.height:f,c=s.axis==="y"?g.width:c),o=!0,{width:c,height:f,x:v,y:x,top:x,right:v+c,bottom:x+f,left:v}}}}function Te(t){return t!=null&&t.clientX!=null}function Qs(t,s={}){const{enabled:n=!0,axis:a="both"}=s,o="rootStore"in t?t.rootStore:t,g=o.useState("open"),d=o.useState("floatingElement"),l=o.useState("domReferenceElement"),h=o.context.dataRef,c=r.useRef(!1),f=r.useRef(null),[v,x]=r.useState(),[y,p]=r.useState([]),S=te(b=>{o.set("positionReference",b)}),u=te((b,j,P)=>{c.current||h.current.openEvent&&!Te(h.current.openEvent)||o.set("positionReference",Xs(P??l,{x:b,y:j,axis:a,dataRef:h,pointerType:v}))}),m=te(b=>{g?f.current||(u(b.clientX,b.clientY,b.currentTarget),p([])):u(b.clientX,b.clientY,b.currentTarget)}),k=De(v)?d:g;r.useEffect(()=>{if(!n){S(l);return}if(!k)return;function b(){f.current?.(),f.current=null}const j=dt(d);function P(i){const T=os(i);ie(d,T)?b():u(i.clientX,i.clientY)}return!h.current.openEvent||Te(h.current.openEvent)?f.current=wt(j,"mousemove",P):S(l),b},[k,n,d,h,l,o,u,S,y]),r.useEffect(()=>()=>{o.set("positionReference",null)},[o]),r.useEffect(()=>{n&&!d&&(c.current=!1)},[n,d]),r.useEffect(()=>{!n&&g&&(c.current=!0)},[n,g]);const C=r.useMemo(()=>{function b(j){x(j.pointerType)}return{onPointerDown:b,onPointerEnter:b,onMouseMove:m,onMouseEnter:m}},[m]);return r.useMemo(()=>n?{reference:C,trigger:C}:{},[n,C])}function Js({...t}){return e.jsx(Ct,{"data-slot":"sheet",...t})}function Zs({...t}){return e.jsx(Mt,{"data-slot":"sheet-portal",...t})}function en({className:t,...s}){return e.jsx(Et,{"data-slot":"sheet-overlay",className:w("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t),...s})}function tn({className:t,children:s,side:n="right",showCloseButton:a=!0,...o}){return e.jsxs(Zs,{children:[e.jsx(en,{}),e.jsxs(kt,{"data-slot":"sheet-content","data-side":n,className:w("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...o,children:[s,a&&e.jsxs(Tt,{"data-slot":"sheet-close",render:e.jsx(Ee,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[e.jsx(Nt,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function sn({className:t,...s}){return e.jsx("div",{"data-slot":"sheet-header",className:w("flex flex-col gap-0.5 p-4",t),...s})}function nn({className:t,...s}){return e.jsx(Pt,{"data-slot":"sheet-title",className:w("font-heading text-base font-medium text-foreground",t),...s})}function an({className:t,...s}){return e.jsx(Rt,{"data-slot":"sheet-description",className:w("text-sm text-muted-foreground",t),...s})}const Ve=r.createContext(void 0);function V(t){const s=r.useContext(Ve);if(s===void 0&&!t)throw new Error(Z(72));return s}const on={...It,disabled:t=>t.disabled,instantType:t=>t.instantType,isInstantPhase:t=>t.isInstantPhase,trackCursorAxis:t=>t.trackCursorAxis,disableHoverablePopup:t=>t.disableHoverablePopup,lastOpenChangeReason:t=>t.openChangeReason,closeOnClick:t=>t.closeOnClick,closeDelay:t=>t.closeDelay,adaptiveOrigin:t=>t.adaptiveOrigin};class rn extends Ot{constructor(s,n,a){const o=new Ht;super(ln(s,o,n,a),dn(o),on)}setOpen=(s,n)=>{Dt(this,s,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(s){this.state.floatingRootContext.dispatchOpenChange(!1,B(rs,s))}}function ln(t,s,n,a=!1){const o={...At(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t};return o.floatingRootContext=_t(s,n,a),o}function dn(t){return{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}const cn=zt(function(s){const{disabled:n=!1,defaultOpen:a=!1,open:o,disableHoverablePopup:g=!1,trackCursorAxis:d="none",actionsRef:l,onOpenChange:h,onOpenChangeComplete:c,handle:f,triggerId:v,defaultTriggerId:x=null,children:y}=s,p=Lt(($,U)=>new rn({open:a,openProp:o,activeTriggerId:x,triggerIdProp:v},$,U));p.useControlledProp("openProp",o),p.useControlledProp("triggerIdProp",v),p.useContextCallback("onOpenChange",h),p.useContextCallback("onOpenChangeComplete",c);const S=p.useState("open"),u=!n&&S,m=p.useState("activeTriggerId"),k=p.useState("mounted"),C=p.useState("payload");p.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:g,disabled:n}),$t(p,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:b,transitionStatus:j}=Bt(u,p),P=p.useState("isInstantPhase"),i=p.useState("instantType"),T=p.useState("lastOpenChangeReason"),R=r.useRef(null);z(()=>{S&&n&&p.setOpen(!1,B(is))},[S,n,p]),z(()=>{j==="ending"&&T===Ae||j!=="ending"&&P?(i!=="delay"&&(R.current=i),p.set("instantType","delay")):R.current!==null&&(p.set("instantType",R.current),R.current=null)},[j,P,T,i,p]),z(()=>{u&&m==null&&p.set("payload",void 0)},[p,m,u]),r.useImperativeHandle(l,()=>({unmount:b,close:()=>p.setOpen(!1,B(ls))}),[b,p]);const L=u||k||!n&&d!=="none";return e.jsxs(Ve.Provider,{value:p,children:[f&&e.jsx(Ut,{handle:f,store:p}),L&&e.jsx(un,{store:p,disabled:n,trackCursorAxis:d}),typeof y=="function"?y({payload:C}):y]})});function un({store:t,disabled:s,trackCursorAxis:n}){const a=t.useState("floatingRootContext"),o=Ft(a,{enabled:!s,referencePress:()=>t.select("closeOnClick")}),g=Qs(a,{enabled:!s&&n!=="none",axis:n==="none"?void 0:n}),d=r.useMemo(()=>pe(g.reference,o.reference),[g.reference,o.reference]);return qt(t,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:o.floating??ct}),null}const pn=r.createContext(void 0);function fn(){return r.useContext(pn)}const Ne=600,Ke="data-base-ui-tooltip-trigger";function Pe(t){if("composedPath"in t){const n=t.composedPath();for(let a=0;a<n.length;a+=1){const o=n[a];if(re(o))return o}}const s=t.target;return re(s)?s:null}function gn(t){let s=t;for(;s;){const n=s.closest(`[${Ke}]`);if(n)return n;const a=s.getRootNode();s="host"in a&&re(a.host)?a.host:null}return null}const hn=Gt(function(s,n){const{render:a,className:o,style:g,handle:d,payload:l,disabled:h,delay:c,closeOnClick:f=!0,closeDelay:v,id:x,...y}=s,p=V(!0),u=cs(d)??p;if(!u)throw new Error(Z(82));const m=ds(x),k=u.useState("isTriggerActive",m),C=u.useState("isOpenedByTrigger",m),b=u.useState("floatingRootContext"),j=r.useRef(null),P=c??Ne,i=v??0,{registerTrigger:T,isMountedByThisTrigger:R}=Vt(m,j,u,{payload:l,closeOnClick:f,closeDelay:i}),L=fn(),{delayRef:$,isInstantPhase:U,hasProvider:M}=Ws(b,{open:C}),F=us(b);u.useSyncedValue("isInstantPhase",U);const ee=u.useState("disabled"),q=h??ee,ve=Kt(q),je=u.useState("trackCursorAxis"),Ze=u.useState("disableHoverablePopup"),G=r.useRef(!1),K=Yt(),Y=r.useRef(void 0);function ye(){return M?le($.current,"open")===0?0:c??L??Ne:P}function Se(N){const D=j.current;if(!D||!N)return!1;const H=gn(N);return H!==null&&H!==D&&ie(D,H)}function et(N){const D=Se(N);return G.current=D,D&&(F.openChangeTimeout.clear(),F.restTimeout.clear(),F.restTimeoutPending=!1,K.clear()),D}const tt=ps(b,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!Ze&&je!=="both"?fs():null,restMs:ye,delay(){return v==null&&M?{close:le($.current,"close")}:{close:i}},triggerElementRef:j,isActiveTrigger:k,isClosing:()=>u.select("transitionStatus")==="ending",shouldOpen(){return!G.current}}),st=gs(b,{enabled:!q}).reference,nt=N=>{const D=G.current,H=Pe(N),we=et(H),W=j.current,ot=W&&H&&ie(W,H);if(we&&u.select("open")&&u.select("lastOpenChangeReason")===se){u.setOpen(!1,B(se,N));return}if(D&&!we&&ot&&!ve.current&&!u.select("open")&&W&&De(Y.current)){const Ce=()=>{!G.current&&!ve.current&&!u.select("open")&&u.setOpen(!0,B(se,N,W))},ke=ye();ke===0?(K.clear(),Ce()):K.start(ke,Ce)}},at=u.useState("triggerProps",R);return fe("button",s,{state:{open:C},ref:[n,T,j],props:[tt,st,R||je!=="none"?at:void 0,{onMouseOver(N){nt(N.nativeEvent)},onFocus(N){Se(Pe(N.nativeEvent))&&N.preventBaseUIHandler()},onMouseLeave(){G.current=!1,K.clear(),Y.current=void 0},onPointerEnter(N){Y.current=N.pointerType},onPointerDown(N){Y.current=N.pointerType,u.set("closeOnClick",f),f&&!u.select("open")&&u.cancelPendingOpen(N.nativeEvent)},onClick(N){f&&!u.select("open")&&u.cancelPendingOpen(N.nativeEvent)},id:m,"data-trigger-disabled":q?"":void 0,[Ke]:q?void 0:""},y],stateAttributesMapping:Wt})}),Ye=r.createContext(void 0);function xn(){const t=r.useContext(Ye);if(t===void 0)throw new Error(Z(70));return t}const mn=r.forwardRef(function(s,n){const{children:a,container:o,className:g,render:d,style:l,...h}=s,{node:c,subtree:f}=Xt({container:o,ref:n,componentProps:s,elementProps:h});return!f&&!c?null:e.jsxs(r.Fragment,{children:[f,c&&ut.createPortal(a,c)]})}),bn=r.forwardRef(function(s,n){const{keepMounted:a=!1,...o}=s;return V().useState("mounted")||a?e.jsx(Ye.Provider,{value:a,children:e.jsx(mn,{ref:n,...o})}):null}),We=r.createContext(void 0);function Xe(){const t=r.useContext(We);if(t===void 0)throw new Error(Z(71));return t}const vn=r.forwardRef(function(s,n){const{render:a,className:o,anchor:g,positionMethod:d="absolute",side:l="top",align:h="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:v="clipping-ancestors",collisionPadding:x=5,arrowPadding:y=5,sticky:p=!1,disableAnchorTracking:S=!1,collisionAvoidance:u=Qt,style:m,...k}=s,C=V(),b=xn(),j=C.useState("open"),P=C.useState("mounted"),i=C.useState("trackCursorAxis"),T=C.useState("disableHoverablePopup"),R=C.useState("floatingRootContext"),L=C.useState("instantType"),$=C.useState("transitionStatus"),U=C.useState("adaptiveOrigin"),M=hs({anchor:g,positionMethod:d,floatingRootContext:R,mounted:P,side:l,sideOffset:c,align:h,alignOffset:f,collisionBoundary:v,collisionPadding:x,sticky:p,arrowPadding:y,disableAnchorTracking:S,keepMounted:b,collisionAvoidance:u,adaptiveOrigin:U}),F=r.useMemo(()=>({open:j,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:i!=="none"?"tracking-cursor":L}),[j,M.side,M.align,M.anchorHidden,i,L]),ee=xs(s,F,{styles:M.positionerStyles,transitionStatus:$,props:k,refs:[n,C.useStateSetter("positionerElement")],hidden:!P,inert:!j||i==="both"||T});return e.jsx(We.Provider,{value:M,children:ee})}),jn=r.forwardRef(function(s,n){const{render:a,className:o,style:g,...d}=s,l=V(),{side:h,align:c}=Xe(),f=l.useState("open"),v=l.useState("instantType"),x=l.useState("transitionStatus"),y=l.useState("popupProps"),p=l.useState("floatingRootContext"),S=l.useState("disabled"),u=l.useState("closeDelay");Jt({open:f,ref:l.context.popupRef,onComplete(){f&&l.context.onOpenChangeComplete?.(!0)}}),ms(p,{enabled:!S,closeDelay:u});const m=l.useStateSetter("popupElement");return fe("div",s,{state:{open:f,side:h,align:c,instant:v,transitionStatus:x},ref:[n,l.context.popupRef,m],props:[Zt,y,bs(x),d],stateAttributesMapping:es})}),yn=r.forwardRef(function(s,n){const{render:a,className:o,style:g,...d}=s,l=V(),{arrowRef:h,side:c,align:f,arrowUncentered:v,arrowStyles:x}=Xe(),y=l.useState("open"),p=l.useState("instantType");return fe("div",s,{state:{open:y,side:c,align:f,uncentered:v,instant:p},ref:[n,h],props:[{style:x,"aria-hidden":!0},d],stateAttributesMapping:ts})});function Sn({...t}){return e.jsx(cn,{"data-slot":"tooltip",...t})}function wn({...t}){return e.jsx(hn,{"data-slot":"tooltip-trigger",...t})}function Cn({className:t,side:s="top",sideOffset:n=4,align:a="center",alignOffset:o=0,children:g,...d}){return e.jsx(bn,{children:e.jsx(vn,{align:a,alignOffset:o,side:s,sideOffset:n,className:"isolate z-50",children:e.jsxs(jn,{"data-slot":"tooltip-content",className:w("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...d,children:[g,e.jsx(yn,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const kn="sidebar_state",Tn=3600*24*7,Nn="16rem",Pn="18rem",Rn="3rem",Mn="b",Qe=r.createContext(null);function be(){const t=r.useContext(Qe);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function En({defaultOpen:t=!0,open:s,onOpenChange:n,className:a,style:o,children:g,...d}){const l=Vs(),[h,c]=r.useState(!1),[f,v]=r.useState(t),x=s??f,y=r.useCallback(m=>{const k=typeof m=="function"?m(x):m;n?n(k):v(k),document.cookie=`${kn}=${k}; path=/; max-age=${Tn}`},[n,x]),p=r.useCallback(()=>l?c(m=>!m):y(m=>!m),[l,y,c]);r.useEffect(()=>{const m=k=>{k.key===Mn&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),p())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[p]);const S=x?"expanded":"collapsed",u=r.useMemo(()=>({state:S,open:x,setOpen:y,isMobile:l,openMobile:h,setOpenMobile:c,toggleSidebar:p}),[S,x,y,l,h,c,p]);return e.jsx(Qe.Provider,{value:u,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Nn,"--sidebar-width-icon":Rn,...o},className:w("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...d,children:g})})}function On({side:t="left",variant:s="sidebar",collapsible:n="offcanvas",className:a,children:o,dir:g,...d}){const{isMobile:l,state:h,openMobile:c,setOpenMobile:f}=be();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:w("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...d,children:o}):l?e.jsx(Js,{open:c,onOpenChange:f,...d,children:e.jsxs(tn,{dir:g,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Pn},side:t,children:[e.jsxs(sn,{className:"sr-only",children:[e.jsx(nn,{children:"Sidebar"}),e.jsx(an,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":h,"data-collapsible":h==="collapsed"?n:"","data-variant":s,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:w("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",s==="floating"||s==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container","data-side":t,className:w("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",s==="floating"||s==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...d,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})})]})}function In({className:t,onClick:s,...n}){const{toggleSidebar:a}=be();return e.jsxs(Ee,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:w(t),onClick:o=>{s?.(o),a()},...n,children:[e.jsx(Us,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Dn({className:t,...s}){return e.jsx("main",{"data-slot":"sidebar-inset",className:w("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...s})}function An({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:w("flex flex-col gap-2 p-2",t),...s})}function _n({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:w("flex flex-col gap-2 p-2",t),...s})}function Hn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:w("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...s})}function Re({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:w("relative flex w-full min-w-0 flex-col p-2",t),...s})}function zn({className:t,render:s,...n}){return ze({defaultTagName:"div",props:pe({className:w("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",t)},n),render:s,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Me({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:w("w-full text-sm",t),...s})}function oe({className:t,...s}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:w("flex w-full min-w-0 flex-col gap-0",t),...s})}function E({className:t,...s}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:w("group/menu-item relative",t),...s})}const Ln=pt("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function O({render:t,isActive:s=!1,variant:n="default",size:a="default",tooltip:o,className:g,...d}){const{isMobile:l,state:h}=be(),c=ze({defaultTagName:"button",props:pe({className:w(Ln({variant:n,size:a}),g)},d),render:o?e.jsx(wn,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:s}});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(Sn,{children:[c,e.jsx(Cn,{side:"right",align:"center",hidden:h!=="collapsed"||l,...o})]})):c}function $n({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:w("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",t),...s})}function Bn({open:t,onOpenChange:s}){const n=Le(),a=ge(),[o,g]=r.useState(""),[d,l]=r.useState(0),h=r.useRef(null),c=o.trim(),[f,v]=r.useState("");r.useEffect(()=>{const i=setTimeout(()=>v(c),180);return()=>clearTimeout(i)},[c]);const x=Ie({queryKey:["activity","search",f],queryFn:()=>Oe.activity({q:f,status:"all",limit:8}),enabled:t&&f.length>=2,staleTime:3e4});r.useEffect(()=>{t||(g(""),l(0))},[t]);const y=r.useMemo(()=>[{id:"s:sites",label:"Sites",icon:e.jsx(J,{className:"size-4"}),go:()=>void a({to:"/sites"})},{id:"s:activity",label:"Activity",hint:"every site, newest first",icon:e.jsx($e,{className:"size-4"}),go:()=>void a({to:"/activity"})},{id:"s:members",label:"Members",icon:e.jsx(ce,{className:"size-4"}),go:()=>void a({to:"/studio/members"})},{id:"s:integrations",label:"Integrations",icon:e.jsx(Be,{className:"size-4"}),go:()=>void a({to:"/studio/integrations"})},{id:"s:studio",label:"Studio settings",icon:e.jsx(Fe,{className:"size-4"}),go:()=>void a({to:"/studio"})},{id:"s:you",label:"You",icon:e.jsx(Ge,{className:"size-4"}),go:()=>void a({to:"/you"})}],[a]),p=r.useMemo(()=>n.projects.map(i=>({id:`p:${i.uid}`,label:i.name,hint:i.unresolved>0?`${i.unresolved} open`:"nothing open",icon:e.jsx(ue,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:i.uid}})})),[n.projects,a]),S=i=>!c||i.toLowerCase().includes(c.toLowerCase()),u=[],m=p.filter(i=>S(i.label)),k=y.filter(i=>S(i.label));m.length&&u.push({title:"Sites",items:m}),k.length&&u.push({title:"Go to",items:k});const C=(x.data?.data??[]).map(i=>({id:`t:${i.id}`,label:i.latest?.body?.trim()||i.route,hint:`${i.site.name} · ${ws(i.status)?Ss[i.status]:i.status} · ${i.key}`,icon:e.jsx(ue,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:i.site.uid},search:{thread:i.key}})}));C.length&&u.push({title:"Comments",items:C});const b=u.flatMap(i=>i.items),j=Math.min(d,Math.max(0,b.length-1)),P=i=>{i&&(s(!1),i.go())};return r.useEffect(()=>{h.current?.querySelector(`[data-at="${j}"]`)?.scrollIntoView({block:"nearest"})},[j]),e.jsx(ss,{open:t,onOpenChange:s,children:e.jsxs(ns,{showCloseButton:!1,className:"top-[15%] max-h-[70dvh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-lg",children:[e.jsx(as,{className:"sr-only",children:"Search and go"}),e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[e.jsx(_e,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("input",{autoFocus:!0,value:o,onChange:i=>{g(i.target.value),l(0)},onKeyDown:i=>{i.key==="ArrowDown"?(i.preventDefault(),l(T=>Math.min(T+1,b.length-1))):i.key==="ArrowUp"?(i.preventDefault(),l(T=>Math.max(T-1,0))):i.key==="Enter"&&(i.preventDefault(),P(b[j]))},placeholder:"Go to a site or a screen, or search every comment…","aria-label":"Search and go",className:"h-11 w-full bg-transparent text-[14px] outline-none placeholder:text-muted-foreground"})]}),e.jsxs("div",{ref:h,className:"min-h-0 flex-1 overflow-auto py-1.5",children:[b.length===0&&e.jsx("p",{className:"m-0 px-3 py-6 text-center text-[13px] text-muted-foreground",children:x.isFetching?"Looking…":c?`Nothing matches “${c}”.`:"Nothing here."}),u.map(i=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:i.title}),i.items.map(T=>{const R=b.indexOf(T);return e.jsxs("button",{type:"button","data-at":R,onMouseMove:()=>l(R),onClick:()=>P(T),className:w("flex w-full items-center gap-2.5 border-0 bg-transparent px-3 py-2 text-left text-[13px] text-foreground",R===j&&"bg-muted"),children:[e.jsx("span",{className:"shrink-0 text-muted-foreground",children:T.icon}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:T.label}),T.hint&&e.jsx("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:T.hint})]},T.id)})]},i.title)),x.isFetching&&b.length>0&&e.jsx("p",{className:"m-0 px-3 py-1.5 text-[12px] text-muted-foreground",children:"Searching every site…"})]})]})})}function Un(){const[t,s]=r.useState(!1);return r.useEffect(()=>{const n=a=>{a.key.toLowerCase()!=="k"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),s(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),[t,s]}const Je="https://snagset.com/docs/",Fn="https://www.npmjs.com/package/@snagset/server?activeTab=versions",qn="https://snagset.com/docs/self-hosting/#upgrade";function Gn({children:t}){const s=Le(),n=ft(s),[a,o]=Un();return e.jsxs(En,{children:[e.jsx(Vn,{me:s,site:n}),e.jsxs(Dn,{className:"min-w-0",children:[e.jsx(Xn,{onSearch:()=>o(!0)}),e.jsx("div",{className:"min-h-0 flex-1",children:t})]}),e.jsx(Bn,{open:a,onOpenChange:o})]})}function Vn({me:t,site:s}){const n=Ms({select:o=>o.location.pathname}),a=o=>n===o||n.startsWith(o+"/");return e.jsxs(On,{children:[e.jsx(An,{className:"px-3 pb-1 pt-3",children:e.jsxs(A,{to:"/studio",className:"flex items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":`${t.org.name} — studio settings`,children:[e.jsx(gt,{size:20}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-[14px] font-semibold leading-tight tracking-tight",children:t.org.name}),e.jsx("span",{className:"block truncate text-[11.5px] text-muted-foreground",children:location.host})]})]})}),e.jsxs(Hn,{children:[e.jsxs(Re,{children:[e.jsx(Kn,{me:t,site:s}),s&&e.jsx(Me,{children:e.jsxs(oe,{children:[e.jsxs(E,{children:[e.jsxs(O,{isActive:a(`/s/${s.uid}/comments`),render:e.jsx(A,{to:"/s/$site/comments",params:{site:s.uid}}),children:[e.jsx(ue,{}),e.jsx("span",{children:"Comments"})]}),s.unresolved>0&&e.jsx($n,{children:s.unresolved})]}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/reviewers`),render:e.jsx(A,{to:"/s/$site/reviewers",params:{site:s.uid}}),children:[e.jsx(ce,{}),e.jsx("span",{children:"Reviewers"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/settings`),render:e.jsx(A,{to:"/s/$site/settings",params:{site:s.uid}}),children:[e.jsx(qs,{}),e.jsx("span",{children:"Settings"})]})})]})})]}),e.jsxs(Re,{children:[e.jsx(zn,{children:"Studio"}),e.jsx(Me,{children:e.jsxs(oe,{children:[e.jsx(E,{children:e.jsxs(O,{isActive:a("/sites"),render:e.jsx(A,{to:"/sites"}),children:[e.jsx(J,{}),e.jsx("span",{children:"Sites"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/activity"),render:e.jsx(A,{to:"/activity"}),children:[e.jsx($e,{}),e.jsx("span",{children:"Activity"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/members"),render:e.jsx(A,{to:"/studio/members"}),children:[e.jsx(ce,{}),e.jsx("span",{children:"Members"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/integrations"),render:e.jsx(A,{to:"/studio/integrations"}),children:[e.jsx(Be,{}),e.jsx("span",{children:"Integrations"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:n==="/studio",render:e.jsx(A,{to:"/studio"}),children:[e.jsx(Fe,{}),e.jsx("span",{children:"General"})]})})]})})]})]}),e.jsx(_n,{children:e.jsxs(oe,{children:[e.jsx(E,{children:e.jsxs(O,{render:e.jsx("a",{href:Je,target:"_blank",rel:"noreferrer"}),children:[e.jsx(Ue,{}),e.jsx("span",{children:"Docs"}),e.jsx(X,{className:"ml-auto size-3.5 text-muted-foreground"})]})}),e.jsx(E,{children:e.jsx(Yn,{})}),e.jsx(E,{children:e.jsx(Wn,{me:t})})]})})]})}function Kn({me:t,site:s}){const n=ge();return e.jsxs(he,{children:[e.jsxs(xe,{render:e.jsx("button",{type:"button",className:"mb-1 flex h-[34px] w-full items-center justify-between rounded-md border border-border bg-card px-2.5 text-[13px] font-semibold text-foreground","aria-label":"Switch site"}),children:[e.jsx("span",{className:"truncate",children:s?.name??"No sites yet"}),e.jsx(qe,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(me,{align:"start",className:"w-[240px]",children:[e.jsxs(He,{children:[e.jsx(de,{children:"Sites"}),t.projects.map(a=>e.jsxs(_,{onClick:()=>void n({to:"/s/$site/comments",params:{site:a.uid}}),children:[e.jsx(J,{}),e.jsx("span",{className:"truncate",children:a.name}),a.uid===s?.uid&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},a.uid))]}),e.jsx(Q,{}),e.jsxs(_,{onClick:()=>void n({to:"/sites",search:{add:!0}}),children:[e.jsx(Ts,{}),"Add a site"]}),e.jsxs(_,{onClick:()=>void n({to:"/sites"}),children:[e.jsx(J,{}),"All sites"]})]})]})}function Yn(){const t=Ie(jt.meta()),s=t.data?.version??"",[n,a]=r.useState({state:"idle"}),o=async()=>{a({state:"checking"});try{a({state:"done",result:await ks(s)})}catch{a({state:"failed"})}};return e.jsxs(he,{children:[e.jsxs(xe,{render:e.jsx(O,{}),children:[e.jsx(Hs,{}),e.jsx("span",{children:"Help"})]}),e.jsxs(me,{align:"start",side:"top",className:"w-[240px]",children:[e.jsxs(_,{render:e.jsx("a",{href:Je,target:"_blank",rel:"noreferrer"}),children:[e.jsx(Ue,{}),"Docs",e.jsx(X,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsxs(_,{render:e.jsx("a",{href:Fn,target:"_blank",rel:"noreferrer"}),children:["Changelog",e.jsx(X,{className:"ml-auto size-3 text-muted-foreground"})]}),t.data?.sourceUrl&&e.jsxs(_,{render:e.jsx("a",{href:t.data.sourceUrl,target:"_blank",rel:"noreferrer"}),children:["Source · AGPL",e.jsx(X,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsx(Q,{}),e.jsxs("div",{className:"px-2 py-1.5 text-[12px] text-muted-foreground",children:["Snagset ",s||"—",n.state==="idle"&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"text-brand hover:underline",onClick:()=>void o(),children:"Check for updates"})]}),n.state==="checking"&&" · checking…",n.state==="failed"&&" · could not reach npm",n.state==="done"&&n.result&&e.jsxs(e.Fragment,{children:[" · ",n.result.newer?e.jsxs("a",{href:qn,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:[n.result.latest," is out — how to upgrade"]}):"up to date"]})]})]})]})}function Wn({me:t}){const s=ge(),n=xt(),[a,o]=r.useState(mt),g=t.user.name||t.user.email,d=t.user.name?t.user.email:t.user.role,l=async()=>{await Oe.logout().catch(()=>{}),vt("out"),n.clear(),s({to:"/sign-in",replace:!0})};return e.jsxs(he,{children:[e.jsxs(xe,{render:e.jsx(O,{size:"lg"}),children:[e.jsx(js,{className:"size-8 rounded-full",children:e.jsx(ys,{className:"bg-primary text-[12px] font-semibold text-primary-foreground",children:Cs(t.user.name,t.user.email)})}),e.jsxs("div",{className:"min-w-0 flex-1 text-left leading-tight",children:[e.jsx("div",{className:"truncate text-[13px] font-semibold",children:g}),e.jsx("div",{className:"truncate text-[11.5px] text-muted-foreground",children:d})]}),e.jsx(qe,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(me,{align:"start",side:"top",className:"w-[250px]",children:[e.jsx(He,{children:e.jsxs(de,{className:"flex flex-col",children:[e.jsx("span",{className:"text-[13px] font-semibold",children:g}),e.jsx("span",{className:"text-[11.5px] font-normal text-muted-foreground",children:t.user.name?`${t.user.email} · ${t.user.role}`:t.user.role})]})}),e.jsx(Q,{}),e.jsxs(vs,{value:a,onValueChange:h=>{const c=h;bt(c),o(c)},children:[e.jsx(de,{children:"Theme"}),e.jsxs(ne,{value:"system",children:[e.jsx(Ns,{}),"System"]}),e.jsxs(ne,{value:"light",children:[e.jsx(Ps,{}),"Light"]}),e.jsxs(ne,{value:"dark",children:[e.jsx(Rs,{}),"Dark"]})]}),e.jsx(Q,{}),e.jsxs(_,{onClick:()=>void s({to:"/you"}),children:[e.jsx(Ge,{}),"You"]}),e.jsxs(_,{onClick:()=>void l(),children:[e.jsx(Ls,{}),"Sign out"]})]})]})}function Xn({onSearch:t}){const n=ht().map(a=>a.loaderData?.crumb).filter(a=>typeof a=="string"&&a.length>0);return e.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2.5 border-b border-border/60 px-4",children:[e.jsx(In,{className:"-ml-1"}),e.jsx("nav",{"aria-label":"Breadcrumb",className:"flex items-center gap-2 text-[13.5px] font-medium text-muted-foreground",children:n.map((a,o)=>e.jsxs("span",{className:"flex items-center gap-2",children:[o>0&&e.jsx("span",{className:"text-line-strong",children:"/"}),e.jsx("span",{className:o===n.length-1?"text-foreground":void 0,children:a})]},o))}),e.jsx("div",{className:"flex-1"}),e.jsxs("button",{type:"button",onClick:t,"aria-label":"Search and go",className:"flex h-7 items-center gap-2 rounded-md border border-border bg-card px-2 text-[12.5px] text-muted-foreground",children:[e.jsx(_e,{className:"size-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Search"}),e.jsx("kbd",{className:"hidden rounded border border-border px-1 font-mono text-[11px] sm:inline",children:"⌘K"})]})]})}const ba=()=>e.jsx(Gn,{children:e.jsx(yt,{})});export{ba as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as g,I as f,J as p,n as v,j as e,B as m,L as N,o as P}from"./index-C87aqO18.js";import{Q as j,u as y}from"./useBaseQuery-0OqUJMfc.js";import{P as b,S as w}from"./parts-B-HQayFH.js";import{b as S,c as R,S as E}from"./labels--UUyt9uB.js";import{u as F}from"./me-D1prnPpY.js";import"./card-8T0wnIiU.js";var k=class extends j{constructor(s,n){super(s,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(s){s._type="infinite",super.setOptions(s)}getOptimisticResult(s){return s._type="infinite",super.getOptimisticResult(s)}fetchNextPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"backward"}}})}createResult(s,n){const{state:i}=s,l=super.createResult(s,n),{isFetching:o,isRefetching:r,isError:u,isRefetchError:d}=l,t=i.fetchMeta?.fetchMore?.direction,c=u&&t==="forward",a=o&&t==="forward",x=u&&t==="backward",h=o&&t==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:f(n,i.data),hasPreviousPage:g(n,i.data),isFetchNextPageError:c,isFetchingNextPage:a,isFetchPreviousPageError:x,isFetchingPreviousPage:h,isRefetchError:d&&!c&&!x,isRefetching:r&&!a&&!h}}};function M(s,n){return y(s,k)}const A=[{value:"unresolved",label:"Needs attention"},...R.map(s=>({value:s,label:E[s]})),{value:"all",label:"Everything"}];function C(s,n=new Date){const i=new Date(s),l=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime(),o=Math.round((l(n)-l(i))/864e5);return o<=0?"Today":o===1?"Yesterday":o<7?i.toLocaleDateString(void 0,{weekday:"long"}):i.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function I(){const s=F(),{status:n="unresolved",site:i}=p.useSearch(),l=v({from:"/activity"}),o=t=>void l({search:c=>({...c,...t}),replace:!0}),r=M({queryKey:["activity",n,i??null],queryFn:({pageParam:t})=>P.activity({status:n,...i?{site:i}:{},...t?{cursor:t}:{}}),initialPageParam:"",getNextPageParam:t=>t.nextCursor??void 0,refetchOnWindowFocus:!0}),u=r.data?.pages.flatMap(t=>t.data)??[],d=[];for(const t of u){const c=C(t.updatedAt),a=d[d.length-1];a?.day===c?a.rows.push(t):d.push({day:c,rows:[t]})}return e.jsxs("div",{className:"flex flex-col gap-5 p-7",children:[e.jsx(b,{title:"Activity",sub:`Every site, newest first${i?"":" — all of them"}`}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A.map(t=>e.jsx(m,{size:"sm",variant:n===t.value?"default":"outline",onClick:()=>o({status:t.value}),children:t.label},t.value)),e.jsx("div",{className:"flex-1"}),e.jsxs("label",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:["Site",e.jsxs("select",{"aria-label":"Site",value:i??"",onChange:t=>o({site:t.target.value||void 0}),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px] text-foreground",children:[e.jsx("option",{value:"",children:"All sites"}),s.projects.map(t=>e.jsx("option",{value:t.uid,children:t.name},t.uid))]})]})]}),r.isPending&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Reading…"}),r.isError&&e.jsx("p",{className:"m-0 text-[13px] text-destructive",children:"Could not read the feed. Reload to try again."}),r.isSuccess&&u.length===0&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:n==="resolved"?"Nothing has been resolved yet — this is where finished comments go.":n==="unresolved"?"Nothing needs attention. Every comment on every site is resolved.":"No comments yet on any site."}),d.map(({day:t,rows:c})=>e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"m-0 text-[12px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),e.jsx("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(a=>e.jsx("li",{children:e.jsxs(N,{to:"/s/$site/comments",params:{site:a.site.uid},search:{thread:a.key},className:"flex flex-col gap-1 rounded-md border border-border px-3 py-2.5 no-underline transition-colors hover:bg-muted/60",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[13px]",children:[e.jsx(w,{status:a.status}),e.jsx("span",{className:"font-medium text-foreground",children:a.site.name}),e.jsx("code",{className:"font-mono text-[12px] text-muted-foreground",children:a.route}),e.jsx("span",{className:"flex-1"}),e.jsx("span",{className:"text-[12px] text-muted-foreground",children:S(a.updatedAt)})]}),a.latest?.body&&e.jsxs("span",{className:"line-clamp-2 text-[13px] text-foreground",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.latest.author??a.createdBy.name,": "]}),a.latest.body]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 text-[12px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:a.key}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[a.commentCount," ",a.commentCount===1?"comment":"comments"]}),a.assignee&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:a.assignee})]})]})]})},a.id))})]},t)),r.hasNextPage&&e.jsx("div",{children:e.jsx(m,{variant:"outline",size:"sm",disabled:r.isFetchingNextPage,onClick:()=>void r.fetchNextPage(),children:r.isFetchingNextPage?"Reading…":"Show older"})})]})}export{I as component};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./createLucideIcon-llnWWh0E.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,f as b,h as f,j as d,e as m}from"./index-C87aqO18.js";import{w as A}from"./dialog-DrrnCoT5.js";const x=a.createContext(void 0);function z(){const e=a.useContext(x);if(e===void 0)throw new Error(b(13));return e}const g={imageLoadingStatus:()=>null},R=a.forwardRef(function(t,r){const{className:v,render:p,style:s,...c}=t,[n,o]=a.useState("idle"),i={imageLoadingStatus:n},u=a.useMemo(()=>({imageLoadingStatus:n,setImageLoadingStatus:o}),[n,o]),l=f("span",t,{state:i,ref:r,props:c,stateAttributesMapping:g});return d.jsx(x.Provider,{value:u,children:l})}),k=a.forwardRef(function(t,r){const{className:v,render:p,delay:s=0,style:c,...n}=t,{imageLoadingStatus:o}=z(),[i,u]=a.useState(s===0),l=A();return a.useEffect(()=>(s>0?l.start(s,()=>u(!0)):u(!0),l.clear),[l,s]),f("span",t,{state:{imageLoadingStatus:o},ref:r,props:n,stateAttributesMapping:g,enabled:o!=="loaded"&&(s===0||i)})});function h({className:e,size:t="default",...r}){return d.jsx(R,{"data-slot":"avatar","data-size":t,className:m("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...r})}function w({className:e,...t}){return d.jsx(k,{"data-slot":"avatar-fallback",className:m("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}export{h as A,w as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as a,e as n,l as o}from"./index-C87aqO18.js";import{u as d}from"./useRender-dtgBGlgC.js";const s=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function v({className:r,variant:e="default",render:t,...i}){return d({defaultTagName:"span",props:a({className:n(s({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{v as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,e as t}from"./index-C87aqO18.js";function c({className:a,size:d="default",...r}){return s.jsx("div",{"data-slot":"card","data-size":d,className:t("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...r})}export{c as C};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-llnWWh0E.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./createLucideIcon-llnWWh0E.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],e=o("chevron-right",t);export{e as C};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-llnWWh0E.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aE as g,r as a,az as m,E as p}from"./index-C87aqO18.js";function w(e){return e?.ownerDocument||document}let i=0;function v(e,t="mui"){const[s,n]=a.useState(e),o=e||s;return a.useEffect(()=>{s==null&&(i+=1,n(`${t}-${i}`))},[s,t]),o}const l=g.useId;function E(e,t){if(l!==void 0){const s=l();return e??(t?`${t}-${s}`:s)}return v(e,t)}function I(e){return E(e,"base-ui")}function P(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function h(e,t){if(!e||!t)return!1;const s=t.getRootNode?.();if(e.contains(t))return!0;if(s&&m(s)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function R(e){return"composedPath"in e?e.composedPath()[0]:e.target}function C({controlled:e,default:t,name:s,state:n="value"}){const{current:o}=a.useRef(e!==void 0),[r,c]=a.useState(t),u=o?e:r,f=a.useCallback(d=>{o||c(d)},[]);return[u,f]}const S="none",D="trigger-press",N="trigger-hover",$="trigger-focus",k="outside-press",y="item-press",T="close-press",U="focus-out",A="escape-key",B="list-navigation",O="cancel-open",V="sibling-open",j="disabled",q="imperative-action";function z(e,t,s,n){let o=!1,r=!1;const c=n??p;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){r=!0},get isCanceled(){return o},get isPropagationAllowed(){return r},trigger:s,...c}}export{h as a,N as b,z as c,j as d,C as e,P as f,R as g,$ as h,q as i,A as j,U as k,B as l,y as m,S as n,w as o,k as p,E as q,O as r,V as s,D as t,I as u,T as v};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{r as s}from"./index-C87aqO18.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const C=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim();/**
|
|
7
|
+
* @license lucide-react v1.39.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const A=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
12
|
+
* @license lucide-react v1.39.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase());/**
|
|
17
|
+
* @license lucide-react v1.39.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const d=e=>{const t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
22
|
+
* @license lucide-react v1.39.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
27
|
+
* @license lucide-react v1.39.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const L=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},W=s.createContext({}),S=()=>s.useContext(W),v=s.forwardRef(({color:e,size:t,strokeWidth:o,absoluteStrokeWidth:r,className:n="",children:a,iconNode:h,...l},m)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:p=!1,color:x="currentColor",className:f=""}=S()??{},w=r??p?Number(o??u)*24/Number(t??c):o??u;return s.createElement("svg",{ref:m,...i,width:t??c??i.width,height:t??c??i.height,stroke:e??x,strokeWidth:w,className:C("lucide",f,n),...!a&&!L(l)&&{"aria-hidden":"true"},...l},[...h.map(([k,g])=>s.createElement(k,g)),...Array.isArray(a)?a:[a]])});/**
|
|
32
|
+
* @license lucide-react v1.39.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const E=(e,t)=>{const o=s.forwardRef(({className:r,...n},a)=>s.createElement(v,{ref:a,iconNode:t,className:C(`lucide-${A(d(e))}`,`lucide-${e}`,r),...n}));return o.displayName=d(e),o};export{E as c};
|