@peasant-labs/fairtrade 0.0.21 → 0.0.23

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.
@@ -1,27 +1,27 @@
1
- import { At as e, Dn as t, Ft as n, Nt as r, Pt as i, Wn as a, Xn as o, Yn as s, Zn as c, at as l, it as u, jn as d, jt as f, kt as p, qn as m, rt as h, st as g, tt as _ } from "./ui-w7Ju5ccI.js";
2
- import { dt as v, lt as y, xt as b } from "./GraphLegend-BB0V2w59.js";
3
- import { useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
4
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
5
- import { AlertTriangle as k, ArrowRight as A, Check as j, ChevronDown as M, ChevronRight as N, CircleDot as P, Compass as F, Copy as I, ExternalLink as L, Eye as R, EyeOff as z, FileText as B, FolderGit2 as V, GitBranch as H, Hash as U, LayoutGrid as ee, List as te, Lock as W, LogOut as G, Plus as K, SearchX as ne, Settings as re, ShieldAlert as q, ShieldCheck as J, Upload as ie, User as ae, UserPlus as Y, Users as X, X as Z } from "lucide-react";
1
+ import { Gn as e, Hn as t, Jn as n, Jt as r, Kn as i, Kt as a, Rn as o, Xt as s, Yt as c, _t as l, at as u, gt as d, jn as f, mt as p, ot as m, rt as h, tt as g, ur as _, vt as v, xt as y, yt as b } from "./ui-Bku81oD-.js";
2
+ import { St as x, ft as S, ut as C } from "./GraphLegend-sgixmPER.js";
3
+ import { useEffect as w, useId as T, useMemo as E, useRef as D, useState as O } from "react";
4
+ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
5
+ import { ArrowRight as M, Check as N, ChevronDown as P, ChevronRight as F, ClipboardCheck as I, Compass as L, Copy as R, ExternalLink as z, Eye as B, EyeOff as V, FileText as H, FolderGit2 as U, GitBranch as W, Hash as G, LayoutGrid as ee, List as te, Lock as K, LogOut as ne, MoreHorizontal as q, Plus as J, Search as re, SearchX as ie, Settings as Y, ShieldAlert as ae, Upload as X, User as oe, UserPlus as Z, Users as Q, X as se } from "lucide-react";
6
6
  //#region src/ui/commons/types.js
7
- var oe = Object.freeze([
7
+ var ce = Object.freeze([
8
8
  "public",
9
9
  "private",
10
10
  "shared"
11
- ]), se = Object.freeze([
11
+ ]), $ = Object.freeze([
12
12
  "open",
13
13
  "verified_only",
14
14
  "curated"
15
- ]), ce = Object.freeze([
15
+ ]), le = Object.freeze([
16
16
  "members_only",
17
17
  "contributors",
18
18
  "public"
19
- ]), Q = Object.freeze(["user_choice", "mandatory"]), $ = Object.freeze([
19
+ ]), ue = Object.freeze(["user_choice", "mandatory"]), de = Object.freeze([
20
20
  "owner",
21
21
  "member",
22
22
  "contributor",
23
23
  "pending"
24
- ]), le = Object.freeze({
24
+ ]), fe = Object.freeze({
25
25
  transcripts: {
26
26
  transcripts: [
27
27
  {
@@ -178,21 +178,21 @@ var oe = Object.freeze([
178
178
  usageCount: 24
179
179
  }
180
180
  ]
181
- }), ue = (e) => e.toLocaleString("en-US"), de = (e) => {
181
+ }), pe = (e) => e.toLocaleString("en-US"), me = (e) => {
182
182
  let t = Math.max(0, Math.round(e / 6e4));
183
183
  return t >= 60 ? `${Math.floor(t / 60)}h ${String(t % 60).padStart(2, "0")}m` : `${t}min`;
184
- }, fe = (e) => {
184
+ }, he = (e) => {
185
185
  let t = new Date(e);
186
186
  return Number.isNaN(t.getTime()) ? "" : t.toLocaleDateString("en-US", {
187
187
  month: "short",
188
188
  day: "numeric",
189
189
  year: "numeric"
190
190
  });
191
- }, pe = (e = "") => e.split(/[\s-]+/).filter(Boolean).slice(0, 2).map((e) => e[0]).join("").toUpperCase() || "?", me = (e) => e.trim().toLowerCase();
192
- function he(e) {
191
+ }, ge = (e = "") => e.split(/[\s-]+/).filter(Boolean).slice(0, 2).map((e) => e[0]).join("").toUpperCase() || "?", _e = (e) => e.trim().toLowerCase();
192
+ function ve(e) {
193
193
  return e ? e.length ? e[0].toUpperCase() + e.slice(1) : e : "";
194
194
  }
195
- function ge(e, t) {
195
+ function ye(e, t) {
196
196
  let n = /* @__PURE__ */ new Map();
197
197
  for (let r of e) {
198
198
  let e = t(r);
@@ -200,123 +200,123 @@ function ge(e, t) {
200
200
  }
201
201
  return n;
202
202
  }
203
- function _e(e, t, n) {
203
+ function be(e, t, n) {
204
204
  t && (e.preventDefault(), t(n));
205
205
  }
206
- function ve(e) {
207
- return e ?? le;
206
+ function xe(e) {
207
+ return e ?? fe;
208
208
  }
209
- function ye(e) {
209
+ function Se(e) {
210
210
  return Number.isInteger(e) && e >= 1 ? e : 1;
211
211
  }
212
- function be({ transcript: e, href: t, onOpen: n }) {
213
- let r = /* @__PURE__ */ O(E, { children: [
214
- /* @__PURE__ */ O("div", {
212
+ function Ce({ transcript: e, href: t, onOpen: n }) {
213
+ let r = /* @__PURE__ */ j(k, { children: [
214
+ /* @__PURE__ */ j("div", {
215
215
  className: "card-head",
216
- children: [/* @__PURE__ */ O("span", {
216
+ children: [/* @__PURE__ */ j("span", {
217
217
  className: "metaitem cex-model",
218
- children: [/* @__PURE__ */ D(v, {
218
+ children: [/* @__PURE__ */ A(S, {
219
219
  harness: e.modelProvider,
220
220
  accent: !0
221
- }), /* @__PURE__ */ D("span", {
221
+ }), /* @__PURE__ */ A("span", {
222
222
  className: "mono",
223
223
  children: e.modelName || e.modelProvider
224
224
  })]
225
- }), /* @__PURE__ */ D(_, { visibility: e.visibility })]
225
+ }), /* @__PURE__ */ A(g, { visibility: e.visibility })]
226
226
  }),
227
- /* @__PURE__ */ D("h3", {
227
+ /* @__PURE__ */ A("h3", {
228
228
  className: "cex-title",
229
- children: he(e.title || "untitled transcript")
229
+ children: ve(e.title || "untitled transcript")
230
230
  }),
231
- e.projectName && /* @__PURE__ */ D("p", {
231
+ e.projectName && /* @__PURE__ */ A("p", {
232
232
  className: "cex-proj",
233
233
  children: e.projectName
234
234
  }),
235
- /* @__PURE__ */ D("p", {
235
+ /* @__PURE__ */ A("p", {
236
236
  className: "cex-desc",
237
237
  children: e.tags.map((e) => `#${e.name}`).join(" ")
238
238
  }),
239
- /* @__PURE__ */ O("div", {
239
+ /* @__PURE__ */ j("div", {
240
240
  className: "cex-foot row",
241
- children: [/* @__PURE__ */ O("span", {
241
+ children: [/* @__PURE__ */ j("span", {
242
242
  className: "cex-author",
243
- children: [/* @__PURE__ */ D("span", {
243
+ children: [/* @__PURE__ */ A("span", {
244
244
  className: "avatar",
245
245
  "aria-hidden": "true",
246
- children: pe(e.owner.displayName || e.owner.githubUsername)
247
- }), /* @__PURE__ */ O("span", {
246
+ children: ge(e.owner.displayName || e.owner.githubUsername)
247
+ }), /* @__PURE__ */ j("span", {
248
248
  className: "cex-handle mono",
249
249
  children: ["@", e.owner.githubUsername]
250
250
  })]
251
- }), /* @__PURE__ */ D("span", {
251
+ }), /* @__PURE__ */ A("span", {
252
252
  className: "cex-date tnum",
253
- children: fe(e.sessionStart || e.sessionEnd || "")
253
+ children: he(e.sessionStart || e.sessionEnd || "")
254
254
  })]
255
255
  })
256
256
  ] });
257
- return t ? /* @__PURE__ */ D("a", {
257
+ return t ? /* @__PURE__ */ A("a", {
258
258
  href: t,
259
259
  className: "card cex-tcard",
260
- onClick: (t) => _e(t, n, e),
260
+ onClick: (t) => be(t, n, e),
261
261
  children: r
262
- }) : /* @__PURE__ */ D("button", {
262
+ }) : /* @__PURE__ */ A("button", {
263
263
  type: "button",
264
264
  className: "card cex-tcard",
265
265
  onClick: () => n?.(e),
266
266
  children: r
267
267
  });
268
268
  }
269
- function xe({ transcript: e, href: t, onOpen: n }) {
270
- let r = /* @__PURE__ */ O(E, { children: [
271
- /* @__PURE__ */ O("span", {
269
+ function we({ transcript: e, href: t, onOpen: n }) {
270
+ let r = /* @__PURE__ */ j(k, { children: [
271
+ /* @__PURE__ */ j("span", {
272
272
  className: "cex-trow-model",
273
- children: [/* @__PURE__ */ D(v, { harness: e.modelProvider }), /* @__PURE__ */ D("b", { children: e.modelName || e.modelProvider })]
273
+ children: [/* @__PURE__ */ A(S, { harness: e.modelProvider }), /* @__PURE__ */ A("b", { children: e.modelName || e.modelProvider })]
274
274
  }),
275
- /* @__PURE__ */ D("span", {
275
+ /* @__PURE__ */ A("span", {
276
276
  className: "cex-trow-title",
277
- children: he(e.title || "untitled transcript")
277
+ children: ve(e.title || "untitled transcript")
278
278
  }),
279
- /* @__PURE__ */ O("span", {
279
+ /* @__PURE__ */ j("span", {
280
280
  className: "cex-trow-stats mono tnum",
281
281
  children: [
282
- e.durationMs != null && /* @__PURE__ */ D("span", { children: de(e.durationMs) }),
283
- e.turnCount != null && /* @__PURE__ */ O("span", { children: [e.turnCount, " turns"] }),
284
- e.toolCallCount != null && /* @__PURE__ */ O("span", { children: [e.toolCallCount, " tools"] })
282
+ e.durationMs != null && /* @__PURE__ */ A("span", { children: me(e.durationMs) }),
283
+ e.turnCount != null && /* @__PURE__ */ j("span", { children: [e.turnCount, " turns"] }),
284
+ e.toolCallCount != null && /* @__PURE__ */ j("span", { children: [e.toolCallCount, " tools"] })
285
285
  ]
286
286
  }),
287
- /* @__PURE__ */ D("span", {
287
+ /* @__PURE__ */ A("span", {
288
288
  className: "cex-trow-date mono tnum",
289
- children: fe(e.sessionStart || e.sessionEnd || "")
289
+ children: he(e.sessionStart || e.sessionEnd || "")
290
290
  }),
291
- /* @__PURE__ */ D(_, { visibility: e.visibility })
291
+ /* @__PURE__ */ A(g, { visibility: e.visibility })
292
292
  ] });
293
- return t ? /* @__PURE__ */ D("a", {
293
+ return t ? /* @__PURE__ */ A("a", {
294
294
  href: t,
295
295
  className: "row cex-trow",
296
- onClick: (t) => _e(t, n, e),
296
+ onClick: (t) => be(t, n, e),
297
297
  children: r
298
- }) : /* @__PURE__ */ D("button", {
298
+ }) : /* @__PURE__ */ A("button", {
299
299
  type: "button",
300
300
  className: "row cex-trow",
301
301
  onClick: () => n?.(e),
302
302
  children: r
303
303
  });
304
304
  }
305
- function Se({ collective: e, href: t, onOpen: n }) {
306
- let r = /* @__PURE__ */ O(E, { children: [
307
- /* @__PURE__ */ O("div", {
305
+ function Te({ collective: e, href: t, onOpen: n }) {
306
+ let r = /* @__PURE__ */ j(k, { children: [
307
+ /* @__PURE__ */ j("div", {
308
308
  className: "cex-cname",
309
- children: [/* @__PURE__ */ D("span", {
309
+ children: [/* @__PURE__ */ A("span", {
310
310
  className: "avatar",
311
311
  "aria-hidden": "true",
312
312
  children: "C"
313
- }), /* @__PURE__ */ D("b", { children: e.name })]
313
+ }), /* @__PURE__ */ A("b", { children: e.name })]
314
314
  }),
315
- e.description && /* @__PURE__ */ D("p", {
315
+ e.description && /* @__PURE__ */ A("p", {
316
316
  className: "cex-desc",
317
317
  children: e.description
318
318
  }),
319
- /* @__PURE__ */ O("div", {
319
+ /* @__PURE__ */ j("div", {
320
320
  className: "cex-cfoot mono tnum",
321
321
  children: [
322
322
  e.memberCount,
@@ -326,163 +326,163 @@ function Se({ collective: e, href: t, onOpen: n }) {
326
326
  ]
327
327
  })
328
328
  ] });
329
- return t ? /* @__PURE__ */ D("a", {
329
+ return t ? /* @__PURE__ */ A("a", {
330
330
  href: t,
331
331
  className: "card cex-ccard",
332
- onClick: (t) => _e(t, n, e),
332
+ onClick: (t) => be(t, n, e),
333
333
  children: r
334
- }) : /* @__PURE__ */ D("button", {
334
+ }) : /* @__PURE__ */ A("button", {
335
335
  type: "button",
336
336
  className: "card cex-ccard",
337
337
  onClick: () => n?.(e),
338
338
  children: r
339
339
  });
340
340
  }
341
- function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript: r, onOpenProfile: i, onOpenCollective: a, transcriptHref: o, profileHref: s, collectiveHref: c }) {
342
- let u = ve(e), f = u.transcripts.transcripts, [p, m] = T(""), [h, y] = T(""), [b, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(() => ye(u.transcripts.page)), [L, R] = T(null), [z, V] = T("browse"), H = w(!0), U = w(null);
343
- x(() => {
344
- if (H.current) {
345
- H.current = !1, y(p);
341
+ function Ee({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript: r, onOpenProfile: a, onOpenCollective: o, transcriptHref: s, profileHref: c, collectiveHref: l }) {
342
+ let u = xe(e), d = u.transcripts.transcripts, [f, p] = O(""), [m, h] = O(""), [_, v] = O("recent"), [x, C] = O("all"), [T, k] = O(() => /* @__PURE__ */ new Set()), [M, N] = O("grid"), [P, F] = O(() => Se(u.transcripts.page)), [I, R] = O(null), [z, B] = O("browse"), V = D(!0), U = D(null);
343
+ w(() => {
344
+ if (V.current) {
345
+ V.current = !1, h(f);
346
346
  return;
347
347
  }
348
- let e = setTimeout(() => y(p), 250);
348
+ let e = setTimeout(() => h(f), 250);
349
349
  return () => clearTimeout(e);
350
- }, [H, p]), x(() => {
350
+ }, [V, f]), w(() => {
351
351
  let e = JSON.stringify([
352
- h,
353
- b,
354
- E,
355
- [...A].sort()
352
+ m,
353
+ _,
354
+ x,
355
+ [...T].sort()
356
356
  ]);
357
357
  if (U.current === null || U.current === e) {
358
358
  U.current = e;
359
359
  return;
360
360
  }
361
- U.current = e, I(1);
361
+ U.current = e, F(1);
362
362
  }, [
363
- h,
364
- b,
365
- E,
366
- A
367
- ]), x(() => {
363
+ m,
364
+ _,
365
+ x,
366
+ T
367
+ ]), w(() => {
368
368
  n?.({
369
- query: h,
370
- provider: E,
371
- topics: [...A],
372
- order: b,
369
+ query: m,
370
+ provider: x,
371
+ topics: [...T],
372
+ order: _,
373
373
  page: P
374
374
  });
375
375
  }, [
376
- b,
376
+ _,
377
377
  n,
378
378
  P,
379
- E,
380
- h,
381
- A
379
+ x,
380
+ m,
381
+ T
382
382
  ]);
383
- let W = f.find((e) => e.id === L) ?? f[0] ?? null, G = W?.owner ?? null, K = G ? f.filter((e) => e.owner.githubUsername === G.githubUsername) : [], re = C(() => {
383
+ let W = d.find((e) => e.id === I) ?? d[0] ?? null, G = W?.owner ?? null, K = G ? d.filter((e) => e.owner.githubUsername === G.githubUsername) : [], ne = E(() => {
384
384
  let e = /* @__PURE__ */ new Map();
385
- for (let t of f) e.set(t.modelProvider, (e.get(t.modelProvider) || 0) + 1);
385
+ for (let t of d) e.set(t.modelProvider, (e.get(t.modelProvider) || 0) + 1);
386
386
  return [{
387
387
  slug: "all",
388
- count: f.length
388
+ count: d.length
389
389
  }, ...[...e.entries()].map(([e, t]) => ({
390
390
  slug: e,
391
391
  count: t
392
392
  }))];
393
- }, [f]);
394
- x(() => {
395
- L && !f.some((e) => e.id === L) && (R(null), V("browse"));
396
- }, [L, f]);
397
- let q = C(() => {
398
- let e = me(h);
393
+ }, [d]);
394
+ w(() => {
395
+ I && !d.some((e) => e.id === I) && (R(null), B("browse"));
396
+ }, [I, d]);
397
+ let q = E(() => {
398
+ let e = _e(m);
399
399
  return e ? u.collectives.filter((t) => [
400
400
  t.name,
401
401
  t.description,
402
402
  t.linkedGithubOrg
403
403
  ].filter(Boolean).join(" ").toLowerCase().includes(e)) : null;
404
- }, [u.collectives, h]), J = f, ie = A.size, Y = u.transcripts.total ?? f.length, X = P, Z = u.transcripts.limit || f.length || 1, oe = (e) => {
404
+ }, [u.collectives, m]), J = d, re = T.size, Y = u.transcripts.total ?? d.length, ae = P, X = u.transcripts.limit || d.length || 1, Z = (e) => {
405
405
  if (r) {
406
406
  r(e);
407
407
  return;
408
408
  }
409
- R(e.id), V("detail");
410
- }, se = () => {
411
- if (i && G) {
412
- i(G);
409
+ R(e.id), B("detail");
410
+ }, Q = () => {
411
+ if (a && G) {
412
+ a(G);
413
413
  return;
414
414
  }
415
- W ? (R(W.id), V("profile")) : f[0] && (R(f[0].id), V("profile"));
416
- }, ce = () => {
417
- m(""), y(""), S("recent"), k("all"), j(/* @__PURE__ */ new Set()), I(1);
418
- }, Q = C(() => G ? [...ge(K, (e) => e.projectName || "untitled project").entries()].map(([e, t]) => ({
415
+ W ? (R(W.id), B("profile")) : d[0] && (R(d[0].id), B("profile"));
416
+ }, se = () => {
417
+ p(""), h(""), v("recent"), C("all"), k(/* @__PURE__ */ new Set()), F(1);
418
+ }, ce = E(() => G ? [...ye(K, (e) => e.projectName || "untitled project").entries()].map(([e, t]) => ({
419
419
  project: e,
420
420
  items: t
421
- })) : [], [K, G]), $ = C(() => {
421
+ })) : [], [K, G]), $ = E(() => {
422
422
  let e = K.reduce((e, t) => e + (t.tokenCount || 0), 0);
423
423
  return {
424
424
  transcripts: K.length,
425
- projects: Q.length,
425
+ projects: ce.length,
426
426
  tokens: e
427
427
  };
428
- }, [K, Q.length]);
429
- return z === "detail" && W ? /* @__PURE__ */ O("div", {
428
+ }, [K, ce.length]);
429
+ return z === "detail" && W ? /* @__PURE__ */ j("div", {
430
430
  className: `cex-root cex-detail ${t}`.trim(),
431
- children: [/* @__PURE__ */ O("div", {
431
+ children: [/* @__PURE__ */ j("div", {
432
432
  className: "cex-detail-back",
433
- children: [/* @__PURE__ */ O("button", {
433
+ children: [/* @__PURE__ */ j("button", {
434
434
  type: "button",
435
435
  className: "btn btn-secondary btn-sm",
436
- onClick: () => V("browse"),
437
- children: [/* @__PURE__ */ D(B, {
436
+ onClick: () => B("browse"),
437
+ children: [/* @__PURE__ */ A(H, {
438
438
  size: 14,
439
439
  "aria-hidden": "true"
440
440
  }), " back to explore"]
441
- }), /* @__PURE__ */ O("button", {
441
+ }), /* @__PURE__ */ j("button", {
442
442
  type: "button",
443
443
  className: "btn btn-secondary btn-sm",
444
- onClick: se,
445
- children: [/* @__PURE__ */ D(ae, {
444
+ onClick: Q,
445
+ children: [/* @__PURE__ */ A(oe, {
446
446
  size: 14,
447
447
  "aria-hidden": "true"
448
448
  }), " profile"]
449
449
  })]
450
- }), /* @__PURE__ */ O("div", {
450
+ }), /* @__PURE__ */ j("div", {
451
451
  className: "window cex-viewer",
452
- children: [/* @__PURE__ */ O("div", {
452
+ children: [/* @__PURE__ */ j("div", {
453
453
  className: "win-head cex-viewer-head",
454
454
  children: [
455
- /* @__PURE__ */ D("div", {
455
+ /* @__PURE__ */ A("div", {
456
456
  className: "cex-head-top",
457
- children: /* @__PURE__ */ O("div", {
457
+ children: /* @__PURE__ */ j("div", {
458
458
  className: "crumb",
459
459
  children: [
460
460
  "commons ",
461
- /* @__PURE__ */ D("span", {
461
+ /* @__PURE__ */ A("span", {
462
462
  "aria-hidden": "true",
463
463
  children: "›"
464
464
  }),
465
465
  " explore ",
466
- /* @__PURE__ */ D("span", {
466
+ /* @__PURE__ */ A("span", {
467
467
  "aria-hidden": "true",
468
468
  children: "›"
469
469
  }),
470
470
  " ",
471
- /* @__PURE__ */ D("span", {
471
+ /* @__PURE__ */ A("span", {
472
472
  className: "cur mono",
473
473
  children: W.id
474
474
  })
475
475
  ]
476
476
  })
477
477
  }),
478
- /* @__PURE__ */ O("div", {
478
+ /* @__PURE__ */ j("div", {
479
479
  className: "cex-hero-title",
480
- children: [/* @__PURE__ */ D("h2", {
480
+ children: [/* @__PURE__ */ A("h2", {
481
481
  className: "win-title cex-vtitle",
482
- children: he(W.title || "untitled transcript")
483
- }), /* @__PURE__ */ D(_, { visibility: W.visibility })]
482
+ children: ve(W.title || "untitled transcript")
483
+ }), /* @__PURE__ */ A(g, { visibility: W.visibility })]
484
484
  }),
485
- /* @__PURE__ */ O("p", {
485
+ /* @__PURE__ */ j("p", {
486
486
  className: "cex-vdesc",
487
487
  children: [
488
488
  W.projectName || "shared transcript",
@@ -490,20 +490,20 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
490
490
  W.owner.displayName || W.owner.githubUsername
491
491
  ]
492
492
  }),
493
- /* @__PURE__ */ O("div", {
493
+ /* @__PURE__ */ j("div", {
494
494
  className: "cex-vmeta win-meta",
495
495
  children: [
496
- /* @__PURE__ */ O("span", {
496
+ /* @__PURE__ */ j("span", {
497
497
  className: "metaitem",
498
- children: [/* @__PURE__ */ D(v, {
498
+ children: [/* @__PURE__ */ A(S, {
499
499
  harness: W.modelProvider,
500
500
  accent: !0
501
- }), /* @__PURE__ */ D("span", { children: W.modelName || W.modelProvider })]
501
+ }), /* @__PURE__ */ A("span", { children: W.modelName || W.modelProvider })]
502
502
  }),
503
- /* @__PURE__ */ O("span", {
503
+ /* @__PURE__ */ j("span", {
504
504
  className: "metaitem mono tnum",
505
505
  children: [
506
- /* @__PURE__ */ D(B, {
506
+ /* @__PURE__ */ A(H, {
507
507
  size: 14,
508
508
  "aria-hidden": "true"
509
509
  }),
@@ -512,85 +512,85 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
512
512
  " turns"
513
513
  ]
514
514
  }),
515
- /* @__PURE__ */ O("span", {
515
+ /* @__PURE__ */ j("span", {
516
516
  className: "metaitem mono tnum",
517
517
  children: [
518
- /* @__PURE__ */ D("span", {
518
+ /* @__PURE__ */ A("span", {
519
519
  "aria-hidden": "true",
520
520
  children: "#"
521
521
  }),
522
522
  " ",
523
- ue(W.tokenCount || 0),
523
+ pe(W.tokenCount || 0),
524
524
  " tokens"
525
525
  ]
526
526
  }),
527
- /* @__PURE__ */ O("span", {
527
+ /* @__PURE__ */ j("span", {
528
528
  className: "metaitem mono tnum",
529
529
  children: [W.toolCallCount ?? 0, " tools"]
530
530
  })
531
531
  ]
532
532
  })
533
533
  ]
534
- }), /* @__PURE__ */ O("div", {
534
+ }), /* @__PURE__ */ j("div", {
535
535
  className: "cex-viewer-body",
536
- children: [/* @__PURE__ */ O("div", {
536
+ children: [/* @__PURE__ */ j("div", {
537
537
  className: "cex-stream",
538
538
  role: "tabpanel",
539
539
  tabIndex: -1,
540
- children: [/* @__PURE__ */ O("div", {
540
+ children: [/* @__PURE__ */ j("div", {
541
541
  className: "phase",
542
- children: [/* @__PURE__ */ D("span", {
542
+ children: [/* @__PURE__ */ A("span", {
543
543
  className: "lbl",
544
544
  children: "about"
545
- }), /* @__PURE__ */ D("span", {
545
+ }), /* @__PURE__ */ A("span", {
546
546
  className: "meta mono tnum",
547
- children: fe(W.sessionStart || W.sessionEnd || "")
547
+ children: he(W.sessionStart || W.sessionEnd || "")
548
548
  })]
549
- }), /* @__PURE__ */ O("div", {
549
+ }), /* @__PURE__ */ j("div", {
550
550
  className: "turn",
551
- children: [/* @__PURE__ */ D("div", {
551
+ children: [/* @__PURE__ */ A("div", {
552
552
  className: "head",
553
- children: /* @__PURE__ */ D("span", {
553
+ children: /* @__PURE__ */ A("span", {
554
554
  className: "name",
555
555
  children: "session summary"
556
556
  })
557
- }), /* @__PURE__ */ O("div", {
557
+ }), /* @__PURE__ */ j("div", {
558
558
  className: "body",
559
- children: [/* @__PURE__ */ D("p", { children: "This view surfaces the loaded transcript metadata, then lets the user move to the owner profile without leaving the shared surface." }), W.tags.length > 0 && /* @__PURE__ */ D("div", {
559
+ children: [/* @__PURE__ */ A("p", { children: "This view surfaces the loaded transcript metadata, then lets the user move to the owner profile without leaving the shared surface." }), W.tags.length > 0 && /* @__PURE__ */ A("div", {
560
560
  className: "cex-tags",
561
- children: W.tags.map((e) => /* @__PURE__ */ O("span", {
561
+ children: W.tags.map((e) => /* @__PURE__ */ j("span", {
562
562
  className: "chip",
563
563
  children: ["#", e.name]
564
564
  }, e.id))
565
565
  })]
566
566
  })]
567
567
  })]
568
- }), /* @__PURE__ */ O("aside", {
568
+ }), /* @__PURE__ */ j("aside", {
569
569
  className: "cex-psec",
570
570
  "aria-label": "owner snapshot",
571
571
  children: [
572
- /* @__PURE__ */ D("h3", {
572
+ /* @__PURE__ */ A("h3", {
573
573
  className: "cex-psec-title",
574
574
  children: "owner snapshot"
575
575
  }),
576
- /* @__PURE__ */ O("div", {
576
+ /* @__PURE__ */ j("div", {
577
577
  className: "cex-phero",
578
- children: [/* @__PURE__ */ D("div", {
578
+ children: [/* @__PURE__ */ A("div", {
579
579
  className: "cex-phero-av",
580
580
  "aria-hidden": "true",
581
- children: pe(W.owner.displayName || W.owner.githubUsername)
582
- }), /* @__PURE__ */ O("div", {
581
+ children: ge(W.owner.displayName || W.owner.githubUsername)
582
+ }), /* @__PURE__ */ j("div", {
583
583
  className: "cex-phero-id",
584
- children: [/* @__PURE__ */ D("h2", {
584
+ children: [/* @__PURE__ */ A("h2", {
585
585
  className: "cex-h2 cex-pname",
586
586
  children: W.owner.displayName || W.owner.githubUsername
587
- }), /* @__PURE__ */ O("span", {
587
+ }), /* @__PURE__ */ j("span", {
588
588
  className: "cex-phandle mono",
589
589
  children: ["@", W.owner.githubUsername]
590
590
  })]
591
591
  })]
592
592
  }),
593
- /* @__PURE__ */ D(l, { tiles: [
593
+ /* @__PURE__ */ A(b, { tiles: [
594
594
  {
595
595
  key: "transcripts",
596
596
  label: "transcripts",
@@ -604,69 +604,69 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
604
604
  {
605
605
  key: "tokens",
606
606
  label: "tokens",
607
- value: ue($.tokens)
607
+ value: pe($.tokens)
608
608
  }
609
609
  ] })
610
610
  ]
611
611
  })]
612
612
  })]
613
613
  })]
614
- }) : z === "profile" && G ? /* @__PURE__ */ O("div", {
614
+ }) : z === "profile" && G ? /* @__PURE__ */ j("div", {
615
615
  className: `cex-root cex-profile ${t}`.trim(),
616
616
  children: [
617
- /* @__PURE__ */ O("div", {
617
+ /* @__PURE__ */ j("div", {
618
618
  className: "cex-detail-back",
619
- children: [/* @__PURE__ */ O("button", {
619
+ children: [/* @__PURE__ */ j("button", {
620
620
  type: "button",
621
621
  className: "btn btn-secondary btn-sm",
622
- onClick: () => V("detail"),
623
- children: [/* @__PURE__ */ D(B, {
622
+ onClick: () => B("detail"),
623
+ children: [/* @__PURE__ */ A(H, {
624
624
  size: 14,
625
625
  "aria-hidden": "true"
626
626
  }), " back to transcript"]
627
- }), /* @__PURE__ */ O("button", {
627
+ }), /* @__PURE__ */ j("button", {
628
628
  type: "button",
629
629
  className: "btn btn-secondary btn-sm",
630
- onClick: () => V("browse"),
631
- children: [/* @__PURE__ */ D(F, {
630
+ onClick: () => B("browse"),
631
+ children: [/* @__PURE__ */ A(L, {
632
632
  size: 14,
633
633
  "aria-hidden": "true"
634
634
  }), " back to explore"]
635
635
  })]
636
636
  }),
637
- /* @__PURE__ */ O("div", {
637
+ /* @__PURE__ */ j("div", {
638
638
  className: "crumb cex-profile-crumb",
639
639
  children: [
640
640
  "commons ",
641
- /* @__PURE__ */ D("span", {
641
+ /* @__PURE__ */ A("span", {
642
642
  "aria-hidden": "true",
643
643
  children: "›"
644
644
  }),
645
645
  " ",
646
- /* @__PURE__ */ O("span", {
646
+ /* @__PURE__ */ j("span", {
647
647
  className: "cur mono",
648
648
  children: ["@", G.githubUsername]
649
649
  })
650
650
  ]
651
651
  }),
652
- /* @__PURE__ */ O("header", {
652
+ /* @__PURE__ */ j("header", {
653
653
  className: "cex-phero",
654
- children: [/* @__PURE__ */ D("div", {
654
+ children: [/* @__PURE__ */ A("div", {
655
655
  className: "cex-phero-av",
656
656
  "aria-hidden": "true",
657
- children: pe(G.displayName || G.githubUsername)
658
- }), /* @__PURE__ */ O("div", {
657
+ children: ge(G.displayName || G.githubUsername)
658
+ }), /* @__PURE__ */ j("div", {
659
659
  className: "cex-phero-id",
660
- children: [/* @__PURE__ */ D("h2", {
660
+ children: [/* @__PURE__ */ A("h2", {
661
661
  className: "cex-h2 cex-pname",
662
662
  children: G.displayName || G.githubUsername
663
- }), /* @__PURE__ */ O("span", {
663
+ }), /* @__PURE__ */ j("span", {
664
664
  className: "cex-phandle mono",
665
665
  children: ["@", G.githubUsername]
666
666
  })]
667
667
  })]
668
668
  }),
669
- /* @__PURE__ */ D(l, { tiles: [
669
+ /* @__PURE__ */ A(b, { tiles: [
670
670
  {
671
671
  key: "transcripts",
672
672
  label: "transcripts",
@@ -680,41 +680,41 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
680
680
  {
681
681
  key: "tokens",
682
682
  label: "tokens",
683
- value: ue($.tokens)
683
+ value: pe($.tokens)
684
684
  }
685
685
  ] }),
686
- /* @__PURE__ */ O("section", {
686
+ /* @__PURE__ */ j("section", {
687
687
  className: "cex-psec",
688
688
  "aria-label": "published library",
689
- children: [/* @__PURE__ */ D("h3", {
689
+ children: [/* @__PURE__ */ A("h3", {
690
690
  className: "cex-psec-title",
691
691
  children: "published library"
692
- }), Q.length === 0 ? /* @__PURE__ */ O("div", {
692
+ }), ce.length === 0 ? /* @__PURE__ */ j("div", {
693
693
  className: "empty cex-empty",
694
694
  children: [
695
- /* @__PURE__ */ D("div", {
695
+ /* @__PURE__ */ A("div", {
696
696
  className: "ring",
697
- children: /* @__PURE__ */ D(F, {
697
+ children: /* @__PURE__ */ A(L, {
698
698
  size: 20,
699
699
  "aria-hidden": "true"
700
700
  })
701
701
  }),
702
- /* @__PURE__ */ D("h3", { children: "no transcripts yet" }),
703
- /* @__PURE__ */ D("p", { children: "this profile has not shared any transcripts in the commons." })
702
+ /* @__PURE__ */ A("h3", { children: "no transcripts yet" }),
703
+ /* @__PURE__ */ A("p", { children: "this profile has not shared any transcripts in the commons." })
704
704
  ]
705
- }) : /* @__PURE__ */ D("div", {
705
+ }) : /* @__PURE__ */ A("div", {
706
706
  className: "cex-projects",
707
- children: Q.map(({ project: e, items: t }) => /* @__PURE__ */ O("div", {
707
+ children: ce.map(({ project: e, items: t }) => /* @__PURE__ */ j("div", {
708
708
  className: "cex-project",
709
- children: [/* @__PURE__ */ O("div", {
709
+ children: [/* @__PURE__ */ j("div", {
710
710
  className: "cex-project-head",
711
- children: [/* @__PURE__ */ O("span", {
711
+ children: [/* @__PURE__ */ j("span", {
712
712
  className: "cex-project-name",
713
- children: [/* @__PURE__ */ D("span", {
713
+ children: [/* @__PURE__ */ A("span", {
714
714
  "aria-hidden": "true",
715
715
  children: "▣"
716
- }), /* @__PURE__ */ D("b", { children: e })]
717
- }), /* @__PURE__ */ O("span", {
716
+ }), /* @__PURE__ */ A("b", { children: e })]
717
+ }), /* @__PURE__ */ j("span", {
718
718
  className: "cex-project-cnt mono tnum",
719
719
  children: [
720
720
  t.length,
@@ -722,195 +722,195 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
722
722
  t.length === 1 ? "" : "s"
723
723
  ]
724
724
  })]
725
- }), /* @__PURE__ */ D("div", {
725
+ }), /* @__PURE__ */ A("div", {
726
726
  className: "cex-lib-rows",
727
- children: t.map((e) => /* @__PURE__ */ D(xe, {
727
+ children: t.map((e) => /* @__PURE__ */ A(we, {
728
728
  transcript: e,
729
- href: o?.(e),
730
- onOpen: oe
729
+ href: s?.(e),
730
+ onOpen: Z
731
731
  }, e.id))
732
732
  })]
733
733
  }, e))
734
734
  })]
735
735
  })
736
736
  ]
737
- }) : /* @__PURE__ */ O("div", {
737
+ }) : /* @__PURE__ */ j("div", {
738
738
  className: `cex-root ${t}`.trim(),
739
- children: [/* @__PURE__ */ O("header", {
739
+ children: [/* @__PURE__ */ j("header", {
740
740
  className: "cex-explore-head",
741
741
  children: [
742
- /* @__PURE__ */ D("h2", {
742
+ /* @__PURE__ */ A("h2", {
743
743
  className: "cex-h2",
744
744
  children: "explore transcripts"
745
745
  }),
746
- /* @__PURE__ */ D("p", {
746
+ /* @__PURE__ */ A("p", {
747
747
  className: "cex-deck",
748
748
  children: "search redacted ai agent transcripts shared by the community."
749
749
  }),
750
- /* @__PURE__ */ O("div", {
750
+ /* @__PURE__ */ j("div", {
751
751
  className: "input-ico cex-searchbar",
752
- children: [/* @__PURE__ */ D("input", {
752
+ children: [/* @__PURE__ */ A("input", {
753
753
  className: "input",
754
754
  type: "text",
755
- value: p,
756
- onChange: (e) => m(e.target.value),
755
+ value: f,
756
+ onChange: (e) => p(e.target.value),
757
757
  placeholder: "search transcripts, collectives, projects, models...",
758
758
  "aria-label": "search transcripts, collectives, projects, models"
759
- }), p && /* @__PURE__ */ D("button", {
759
+ }), f && /* @__PURE__ */ A("button", {
760
760
  type: "button",
761
761
  className: "cex-clear",
762
762
  "aria-label": "clear search",
763
- onClick: () => m(""),
764
- children: /* @__PURE__ */ D(ne, {
763
+ onClick: () => p(""),
764
+ children: /* @__PURE__ */ A(ie, {
765
765
  size: 14,
766
766
  "aria-hidden": "true"
767
767
  })
768
768
  })]
769
769
  })
770
770
  ]
771
- }), /* @__PURE__ */ O("div", {
771
+ }), /* @__PURE__ */ j("div", {
772
772
  className: "cex-explore-body",
773
- children: [/* @__PURE__ */ D(g, {
774
- order: b,
775
- onOrder: (e) => S(e),
776
- providers: re,
777
- activeProviders: E === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([E]),
778
- onProvider: (e) => k((t) => t === e ? "all" : e),
773
+ children: [/* @__PURE__ */ A(y, {
774
+ order: _,
775
+ onOrder: (e) => v(e),
776
+ providers: ne,
777
+ activeProviders: x === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([x]),
778
+ onProvider: (e) => C((t) => t === e ? "all" : e),
779
779
  topics: u.popularTags.map((e) => ({
780
780
  tag: e.name,
781
781
  count: e.usageCount
782
782
  })),
783
- activeTopics: A,
783
+ activeTopics: T,
784
784
  onTopic: (e) => {
785
- j((t) => {
785
+ k((t) => {
786
786
  let n = new Set(t);
787
787
  return n.has(e) ? n.delete(e) : n.add(e), n;
788
788
  });
789
789
  },
790
- onClear: ce,
790
+ onClear: se,
791
791
  className: "cex-rail"
792
- }), /* @__PURE__ */ O("div", {
792
+ }), /* @__PURE__ */ j("div", {
793
793
  className: "cex-results",
794
794
  children: [
795
- q && /* @__PURE__ */ O("section", {
795
+ q && /* @__PURE__ */ j("section", {
796
796
  className: "cex-coll-results",
797
797
  "aria-label": "matching collectives",
798
- children: [/* @__PURE__ */ D("div", {
798
+ children: [/* @__PURE__ */ A("div", {
799
799
  className: "cex-results-head",
800
- children: /* @__PURE__ */ O("span", {
800
+ children: /* @__PURE__ */ j("span", {
801
801
  className: "cex-eyebrow",
802
- children: ["collectives ", /* @__PURE__ */ D("span", {
802
+ children: ["collectives ", /* @__PURE__ */ A("span", {
803
803
  className: "cex-count tnum",
804
804
  children: q.length
805
805
  })]
806
806
  })
807
- }), q.length === 0 ? /* @__PURE__ */ D("p", {
807
+ }), q.length === 0 ? /* @__PURE__ */ A("p", {
808
808
  className: "cex-nomatch-inline mono",
809
809
  children: "no matching collectives."
810
- }) : /* @__PURE__ */ D("div", {
810
+ }) : /* @__PURE__ */ A("div", {
811
811
  className: "cex-coll-grid",
812
- children: q.map((e) => /* @__PURE__ */ D(Se, {
812
+ children: q.map((e) => /* @__PURE__ */ A(Te, {
813
813
  collective: e,
814
- href: c?.(e),
815
- onOpen: a
814
+ href: l?.(e),
815
+ onOpen: o
816
816
  }, e.id))
817
817
  })]
818
818
  }),
819
- /* @__PURE__ */ O("div", {
819
+ /* @__PURE__ */ j("div", {
820
820
  className: "cex-results-head",
821
- children: [/* @__PURE__ */ O("span", {
821
+ children: [/* @__PURE__ */ j("span", {
822
822
  className: "cex-eyebrow",
823
- children: ["transcripts ", /* @__PURE__ */ D("span", {
823
+ children: ["transcripts ", /* @__PURE__ */ A("span", {
824
824
  className: "cex-count tnum",
825
825
  role: "status",
826
826
  "aria-live": "polite",
827
827
  children: Y
828
828
  })]
829
- }), /* @__PURE__ */ O("div", {
829
+ }), /* @__PURE__ */ j("div", {
830
830
  className: "bs-seg cex-viewseg",
831
831
  role: "group",
832
832
  "aria-label": "view mode",
833
833
  children: [
834
- /* @__PURE__ */ O("button", {
834
+ /* @__PURE__ */ j("button", {
835
835
  type: "button",
836
836
  className: "bs-seg-opt",
837
837
  "aria-pressed": M === "grid",
838
838
  "aria-label": "grid view",
839
839
  onClick: () => N("grid"),
840
- children: [/* @__PURE__ */ D(ee, { size: 14 }), " grid"]
840
+ children: [/* @__PURE__ */ A(ee, { size: 14 }), " grid"]
841
841
  }),
842
- /* @__PURE__ */ O("button", {
842
+ /* @__PURE__ */ j("button", {
843
843
  type: "button",
844
844
  className: "bs-seg-opt",
845
845
  "aria-pressed": M === "list",
846
846
  "aria-label": "list view",
847
847
  onClick: () => N("list"),
848
- children: [/* @__PURE__ */ D(te, { size: 14 }), " list"]
848
+ children: [/* @__PURE__ */ A(te, { size: 14 }), " list"]
849
849
  }),
850
- /* @__PURE__ */ O("button", {
850
+ /* @__PURE__ */ j("button", {
851
851
  type: "button",
852
852
  className: "bs-seg-opt",
853
853
  "aria-pressed": z === "profile",
854
854
  "aria-label": "profile view",
855
- onClick: se,
855
+ onClick: Q,
856
856
  disabled: !J.length,
857
- children: [/* @__PURE__ */ D(ae, { size: 14 }), " profile"]
857
+ children: [/* @__PURE__ */ A(oe, { size: 14 }), " profile"]
858
858
  })
859
859
  ]
860
860
  })]
861
861
  }),
862
- J.length === 0 ? h.trim() || E !== "all" || ie ? /* @__PURE__ */ O("div", {
862
+ J.length === 0 ? m.trim() || x !== "all" || re ? /* @__PURE__ */ j("div", {
863
863
  className: "empty cex-empty",
864
864
  children: [
865
- /* @__PURE__ */ D("div", {
865
+ /* @__PURE__ */ A("div", {
866
866
  className: "ring",
867
- children: /* @__PURE__ */ D(ne, {
867
+ children: /* @__PURE__ */ A(ie, {
868
868
  size: 20,
869
869
  "aria-hidden": "true"
870
870
  })
871
871
  }),
872
- /* @__PURE__ */ D("h3", { children: "no matches" }),
873
- /* @__PURE__ */ D("p", { children: "no transcripts match your search and filters. broaden the query or clear the filters." }),
874
- /* @__PURE__ */ D("button", {
872
+ /* @__PURE__ */ A("h3", { children: "no matches" }),
873
+ /* @__PURE__ */ A("p", { children: "no transcripts match your search and filters. broaden the query or clear the filters." }),
874
+ /* @__PURE__ */ A("button", {
875
875
  type: "button",
876
876
  className: "btn btn-secondary btn-sm",
877
- onClick: ce,
877
+ onClick: se,
878
878
  children: "clear filters"
879
879
  })
880
880
  ]
881
- }) : /* @__PURE__ */ O("div", {
881
+ }) : /* @__PURE__ */ j("div", {
882
882
  className: "empty cex-empty",
883
883
  children: [
884
- /* @__PURE__ */ D("div", {
884
+ /* @__PURE__ */ A("div", {
885
885
  className: "ring",
886
- children: /* @__PURE__ */ D(F, {
886
+ children: /* @__PURE__ */ A(L, {
887
887
  size: 20,
888
888
  "aria-hidden": "true"
889
889
  })
890
890
  }),
891
- /* @__PURE__ */ D("h3", { children: "the commons is empty" }),
892
- /* @__PURE__ */ D("p", { children: "no transcripts have been shared yet. once contributors publish, they show up here." })
891
+ /* @__PURE__ */ A("h3", { children: "the commons is empty" }),
892
+ /* @__PURE__ */ A("p", { children: "no transcripts have been shared yet. once contributors publish, they show up here." })
893
893
  ]
894
- }) : M === "grid" ? /* @__PURE__ */ D("div", {
894
+ }) : M === "grid" ? /* @__PURE__ */ A("div", {
895
895
  className: "cex-grid",
896
- children: J.map((e) => /* @__PURE__ */ D(be, {
896
+ children: J.map((e) => /* @__PURE__ */ A(Ce, {
897
897
  transcript: e,
898
- href: o?.(e),
899
- onOpen: oe
898
+ href: s?.(e),
899
+ onOpen: Z
900
900
  }, e.id))
901
- }) : /* @__PURE__ */ D("div", {
901
+ }) : /* @__PURE__ */ A("div", {
902
902
  className: "cex-list",
903
- children: J.map((e) => /* @__PURE__ */ D(xe, {
903
+ children: J.map((e) => /* @__PURE__ */ A(we, {
904
904
  transcript: e,
905
- href: o?.(e),
906
- onOpen: oe
905
+ href: s?.(e),
906
+ onOpen: Z
907
907
  }, e.id))
908
908
  }),
909
- Y > Z && /* @__PURE__ */ D(d, {
910
- page: X,
909
+ Y > X && /* @__PURE__ */ A(i, {
910
+ page: ae,
911
911
  totalItems: Y,
912
- pageSize: Z,
913
- onChange: I,
912
+ pageSize: X,
913
+ onChange: F,
914
914
  className: "cex-pgn"
915
915
  })
916
916
  ]
@@ -920,51 +920,51 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
920
920
  }
921
921
  //#endregion
922
922
  //#region src/ui/commons/providers.js
923
- function we(e) {
923
+ function De(e) {
924
924
  return String(e || "unknown").replace(/[-_]+/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
925
925
  }
926
- function Te(e) {
927
- return b(e);
926
+ function Oe(e) {
927
+ return x(e);
928
928
  }
929
929
  //#endregion
930
930
  //#region src/mockups/inuse/CommonsManage.jsx
931
- function Ee({ cmd: e, note: t }) {
932
- let [n, r] = T(!1);
931
+ function ke({ cmd: e, note: t }) {
932
+ let [n, r] = O(!1);
933
933
  function i() {
934
934
  try {
935
935
  navigator.clipboard?.writeText(e);
936
936
  } catch {}
937
937
  r(!0), window.setTimeout(() => r(!1), 2e3);
938
938
  }
939
- return /* @__PURE__ */ O("div", {
939
+ return /* @__PURE__ */ j("div", {
940
940
  className: "cmg-cmd",
941
941
  children: [
942
- /* @__PURE__ */ O("code", {
942
+ /* @__PURE__ */ j("code", {
943
943
  className: "cmg-cmd-text mono",
944
- children: [/* @__PURE__ */ D("span", {
944
+ children: [/* @__PURE__ */ A("span", {
945
945
  className: "cmg-cmd-prompt",
946
946
  "aria-hidden": "true",
947
947
  children: "$ "
948
948
  }), e]
949
949
  }),
950
- /* @__PURE__ */ O("button", {
950
+ /* @__PURE__ */ j("button", {
951
951
  type: "button",
952
952
  className: "btn btn-sm btn-secondary cmg-cmd-copy",
953
953
  onClick: i,
954
954
  "aria-label": n ? "copied" : "copy command",
955
- children: [D(n ? j : I, {
955
+ children: [A(n ? N : R, {
956
956
  size: 14,
957
957
  "aria-hidden": "true"
958
958
  }), n ? "copied" : "copy"]
959
959
  }),
960
- t ? /* @__PURE__ */ D("span", {
960
+ t ? /* @__PURE__ */ A("span", {
961
961
  className: "cmg-cmd-note mono",
962
962
  children: t
963
963
  }) : null
964
964
  ]
965
965
  });
966
966
  }
967
- var De = [
967
+ var Ae = [
968
968
  {
969
969
  id: "a1",
970
970
  provider: "claude-code",
@@ -1001,7 +1001,7 @@ var De = [
1001
1001
  turns: 128,
1002
1002
  project: "platform"
1003
1003
  }
1004
- ], Oe = [
1004
+ ], je = [
1005
1005
  {
1006
1006
  n: 1,
1007
1007
  title: "install the cli",
@@ -1024,134 +1024,134 @@ var De = [
1024
1024
  cmd: "peasant village push --dry-run --visibility public"
1025
1025
  }
1026
1026
  ];
1027
- function ke({ v: e, names: t }) {
1027
+ function Me({ v: e, names: t }) {
1028
1028
  let n = {
1029
1029
  public: {
1030
- Icon: R,
1030
+ Icon: B,
1031
1031
  label: "visible to everyone",
1032
1032
  cls: ""
1033
1033
  },
1034
1034
  shared: {
1035
- Icon: X,
1035
+ Icon: Q,
1036
1036
  label: t ? `shared with: ${t}` : "shared with collectives",
1037
1037
  cls: "cmg-eye-shared"
1038
1038
  },
1039
1039
  private: {
1040
- Icon: z,
1040
+ Icon: V,
1041
1041
  label: "only visible to you",
1042
1042
  cls: "cmg-eye-private"
1043
1043
  }
1044
1044
  }, { Icon: r, label: i, cls: a } = n[e] || n.private;
1045
- return /* @__PURE__ */ O("span", {
1045
+ return /* @__PURE__ */ j("span", {
1046
1046
  className: "cmg-eye " + a,
1047
1047
  title: i,
1048
- children: [/* @__PURE__ */ D(r, {
1048
+ children: [/* @__PURE__ */ A(r, {
1049
1049
  size: 14,
1050
1050
  "aria-hidden": "true"
1051
- }), /* @__PURE__ */ D("span", {
1051
+ }), /* @__PURE__ */ A("span", {
1052
1052
  className: "cmg-sr",
1053
1053
  children: i
1054
1054
  })]
1055
1055
  });
1056
1056
  }
1057
- function Ae() {
1058
- let [e, t] = T(!0), [n, r] = T(!1);
1059
- return /* @__PURE__ */ O("div", {
1057
+ function Ne() {
1058
+ let [e, t] = O(!0), [n, r] = O(!1);
1059
+ return /* @__PURE__ */ j("div", {
1060
1060
  className: "cmg-root",
1061
- children: [/* @__PURE__ */ O("div", {
1061
+ children: [/* @__PURE__ */ j("div", {
1062
1062
  className: "cmg-page",
1063
1063
  children: [
1064
- /* @__PURE__ */ O("div", {
1064
+ /* @__PURE__ */ j("div", {
1065
1065
  className: "crumb cmg-crumb",
1066
1066
  children: [
1067
1067
  "village ",
1068
- /* @__PURE__ */ D(N, {
1068
+ /* @__PURE__ */ A(F, {
1069
1069
  size: 13,
1070
1070
  "aria-hidden": "true"
1071
1071
  }),
1072
1072
  " ",
1073
- /* @__PURE__ */ D("span", {
1073
+ /* @__PURE__ */ A("span", {
1074
1074
  className: "cur",
1075
1075
  children: "publish"
1076
1076
  })
1077
1077
  ]
1078
1078
  }),
1079
- /* @__PURE__ */ D("header", {
1079
+ /* @__PURE__ */ A("header", {
1080
1080
  className: "cmg-head",
1081
- children: /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
1081
+ children: /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h2", {
1082
1082
  className: "cmg-title",
1083
1083
  children: "publishing dashboard"
1084
- }), /* @__PURE__ */ D("p", {
1084
+ }), /* @__PURE__ */ A("p", {
1085
1085
  className: "cmg-deck",
1086
1086
  children: "push transcripts from the peasant cli to the village."
1087
1087
  })] })
1088
1088
  }),
1089
- e && /* @__PURE__ */ O("section", {
1089
+ e && /* @__PURE__ */ j("section", {
1090
1090
  className: "cmg-gs card",
1091
1091
  "aria-labelledby": "cmg-gs-h",
1092
- children: [/* @__PURE__ */ O("div", {
1092
+ children: [/* @__PURE__ */ j("div", {
1093
1093
  className: "cmg-gs-head",
1094
- children: [/* @__PURE__ */ O("span", {
1094
+ children: [/* @__PURE__ */ j("span", {
1095
1095
  className: "cmg-gs-h-l",
1096
- children: [/* @__PURE__ */ D(Terminal, {
1096
+ children: [/* @__PURE__ */ A(Terminal, {
1097
1097
  size: 16,
1098
1098
  "aria-hidden": "true",
1099
1099
  className: "cmg-gs-ico"
1100
- }), /* @__PURE__ */ D("h3", {
1100
+ }), /* @__PURE__ */ A("h3", {
1101
1101
  id: "cmg-gs-h",
1102
1102
  className: "cmg-sub",
1103
1103
  children: "getting started"
1104
1104
  })]
1105
- }), /* @__PURE__ */ D("button", {
1105
+ }), /* @__PURE__ */ A("button", {
1106
1106
  type: "button",
1107
1107
  className: "btn btn-sm btn-icon btn-ghost",
1108
1108
  onClick: () => t(!1),
1109
1109
  "aria-label": "dismiss getting started",
1110
- children: /* @__PURE__ */ D(Z, {
1110
+ children: /* @__PURE__ */ A(se, {
1111
1111
  size: 14,
1112
1112
  "aria-hidden": "true"
1113
1113
  })
1114
1114
  })]
1115
- }), /* @__PURE__ */ O("div", {
1115
+ }), /* @__PURE__ */ j("div", {
1116
1116
  className: "cmg-gs-body",
1117
- children: [/* @__PURE__ */ O("div", {
1117
+ children: [/* @__PURE__ */ j("div", {
1118
1118
  className: "cmg-step",
1119
- children: [/* @__PURE__ */ D("span", {
1119
+ children: [/* @__PURE__ */ A("span", {
1120
1120
  className: "cmg-step-n tnum",
1121
1121
  "aria-hidden": "true",
1122
1122
  children: "1"
1123
- }), /* @__PURE__ */ O("div", {
1123
+ }), /* @__PURE__ */ j("div", {
1124
1124
  className: "cmg-step-main",
1125
1125
  children: [
1126
- /* @__PURE__ */ D("div", {
1126
+ /* @__PURE__ */ A("div", {
1127
1127
  className: "cmg-step-title",
1128
1128
  children: "run the setup wizard"
1129
1129
  }),
1130
- /* @__PURE__ */ D("p", {
1130
+ /* @__PURE__ */ A("p", {
1131
1131
  className: "cmg-step-desc",
1132
1132
  children: "connects github, discovers agent transcripts, configures providers (Claude Code / OpenCode), sets your redaction level."
1133
1133
  }),
1134
- /* @__PURE__ */ D(Ee, { cmd: "peasant kickstart" })
1134
+ /* @__PURE__ */ A(ke, { cmd: "peasant kickstart" })
1135
1135
  ]
1136
1136
  })]
1137
- }), /* @__PURE__ */ O("div", {
1137
+ }), /* @__PURE__ */ j("div", {
1138
1138
  className: "cmg-step",
1139
- children: [/* @__PURE__ */ D("span", {
1139
+ children: [/* @__PURE__ */ A("span", {
1140
1140
  className: "cmg-step-n tnum",
1141
1141
  "aria-hidden": "true",
1142
1142
  children: "2"
1143
- }), /* @__PURE__ */ O("div", {
1143
+ }), /* @__PURE__ */ j("div", {
1144
1144
  className: "cmg-step-main",
1145
1145
  children: [
1146
- /* @__PURE__ */ D("div", {
1146
+ /* @__PURE__ */ A("div", {
1147
1147
  className: "cmg-step-title",
1148
1148
  children: "push transcripts"
1149
1149
  }),
1150
- /* @__PURE__ */ D("p", {
1150
+ /* @__PURE__ */ A("p", {
1151
1151
  className: "cmg-step-desc",
1152
1152
  children: "auto-redaction runs before upload. add --dry-run to preview, or --visibility public to override."
1153
1153
  }),
1154
- /* @__PURE__ */ D(Ee, {
1154
+ /* @__PURE__ */ A(ke, {
1155
1155
  cmd: "peasant village push",
1156
1156
  note: "--dry-run preview · --visibility public override"
1157
1157
  })
@@ -1160,48 +1160,48 @@ function Ae() {
1160
1160
  })]
1161
1161
  })]
1162
1162
  }),
1163
- /* @__PURE__ */ O("section", {
1163
+ /* @__PURE__ */ j("section", {
1164
1164
  className: "cmg-recent card",
1165
1165
  "aria-labelledby": "cmg-recent-h",
1166
- children: [/* @__PURE__ */ O("div", {
1166
+ children: [/* @__PURE__ */ j("div", {
1167
1167
  className: "cmg-recent-head",
1168
- children: [/* @__PURE__ */ D("h3", {
1168
+ children: [/* @__PURE__ */ A("h3", {
1169
1169
  id: "cmg-recent-h",
1170
1170
  className: "cmg-sub",
1171
1171
  children: "recent publishes"
1172
- }), /* @__PURE__ */ O("button", {
1172
+ }), /* @__PURE__ */ j("button", {
1173
1173
  type: "button",
1174
1174
  className: "btn btn-sm btn-secondary",
1175
1175
  onClick: () => r(!0),
1176
- children: [/* @__PURE__ */ D(ie, {
1176
+ children: [/* @__PURE__ */ A(X, {
1177
1177
  size: 14,
1178
1178
  "aria-hidden": "true"
1179
1179
  }), " import"]
1180
1180
  })]
1181
- }), De.length === 0 ? /* @__PURE__ */ D("div", {
1181
+ }), Ae.length === 0 ? /* @__PURE__ */ A("div", {
1182
1182
  className: "cmg-recent-empty mono",
1183
1183
  children: "no transcripts published yet."
1184
- }) : /* @__PURE__ */ D("ul", {
1184
+ }) : /* @__PURE__ */ A("ul", {
1185
1185
  className: "cmg-pub-list",
1186
- children: De.map((e) => /* @__PURE__ */ O("li", {
1186
+ children: Ae.map((e) => /* @__PURE__ */ j("li", {
1187
1187
  className: "cmg-pub-row",
1188
1188
  children: [
1189
- /* @__PURE__ */ D("span", {
1189
+ /* @__PURE__ */ A("span", {
1190
1190
  className: "cmg-pub-prov",
1191
- children: /* @__PURE__ */ D(ProviderMark, { id: e.provider })
1191
+ children: /* @__PURE__ */ A(ProviderMark, { id: e.provider })
1192
1192
  }),
1193
- /* @__PURE__ */ D("span", {
1193
+ /* @__PURE__ */ A("span", {
1194
1194
  className: "cmg-pub-title",
1195
1195
  children: e.title
1196
1196
  }),
1197
- /* @__PURE__ */ D("span", {
1197
+ /* @__PURE__ */ A("span", {
1198
1198
  className: "cmg-pub-meta mono",
1199
1199
  children: e.project
1200
1200
  }),
1201
- /* @__PURE__ */ O("span", {
1201
+ /* @__PURE__ */ j("span", {
1202
1202
  className: "cmg-pub-meta mono tnum",
1203
1203
  children: [
1204
- /* @__PURE__ */ D(U, {
1204
+ /* @__PURE__ */ A(G, {
1205
1205
  size: 13,
1206
1206
  "aria-hidden": "true"
1207
1207
  }),
@@ -1209,8 +1209,8 @@ function Ae() {
1209
1209
  e.turns
1210
1210
  ]
1211
1211
  }),
1212
- /* @__PURE__ */ D(ke, { v: e.visibility }),
1213
- /* @__PURE__ */ D("span", {
1212
+ /* @__PURE__ */ A(Me, { v: e.visibility }),
1213
+ /* @__PURE__ */ A("span", {
1214
1214
  className: "cmg-pub-date mono tnum",
1215
1215
  children: e.date
1216
1216
  })
@@ -1219,11 +1219,11 @@ function Ae() {
1219
1219
  })]
1220
1220
  })
1221
1221
  ]
1222
- }), n && /* @__PURE__ */ D("div", {
1222
+ }), n && /* @__PURE__ */ A("div", {
1223
1223
  className: "cmg-scrim",
1224
1224
  role: "presentation",
1225
1225
  onClick: () => r(!1),
1226
- children: /* @__PURE__ */ O("div", {
1226
+ children: /* @__PURE__ */ j("div", {
1227
1227
  className: "cmg-dialog",
1228
1228
  role: "dialog",
1229
1229
  "aria-modal": "true",
@@ -1231,42 +1231,42 @@ function Ae() {
1231
1231
  onClick: (e) => e.stopPropagation(),
1232
1232
  onKeyDown: (e) => e.key === "Escape" && r(!1),
1233
1233
  children: [
1234
- /* @__PURE__ */ O("div", {
1234
+ /* @__PURE__ */ j("div", {
1235
1235
  className: "cmg-dlg-head",
1236
- children: [/* @__PURE__ */ D("h3", {
1236
+ children: [/* @__PURE__ */ A("h3", {
1237
1237
  id: "cmg-import-h",
1238
1238
  className: "cmg-sub",
1239
1239
  children: "how to import transcripts"
1240
- }), /* @__PURE__ */ D("button", {
1240
+ }), /* @__PURE__ */ A("button", {
1241
1241
  type: "button",
1242
1242
  className: "btn btn-sm btn-icon btn-ghost",
1243
1243
  onClick: () => r(!1),
1244
1244
  "aria-label": "close dialog",
1245
- children: /* @__PURE__ */ D(Z, {
1245
+ children: /* @__PURE__ */ A(se, {
1246
1246
  size: 14,
1247
1247
  "aria-hidden": "true"
1248
1248
  })
1249
1249
  })]
1250
1250
  }),
1251
- /* @__PURE__ */ O("div", {
1251
+ /* @__PURE__ */ j("div", {
1252
1252
  className: "cmg-dlg-body",
1253
- children: [/* @__PURE__ */ D("p", {
1253
+ children: [/* @__PURE__ */ A("p", {
1254
1254
  className: "cmg-dlg-intro mono",
1255
1255
  children: "transcripts are imported through the peasant cli, not the web ui. follow these steps from a terminal:"
1256
- }), /* @__PURE__ */ D("ol", {
1256
+ }), /* @__PURE__ */ A("ol", {
1257
1257
  className: "cmg-import-steps",
1258
- children: Oe.map((e) => /* @__PURE__ */ O("li", {
1258
+ children: je.map((e) => /* @__PURE__ */ j("li", {
1259
1259
  className: "cmg-step",
1260
- children: [/* @__PURE__ */ D("span", {
1260
+ children: [/* @__PURE__ */ A("span", {
1261
1261
  className: "cmg-step-n tnum",
1262
1262
  "aria-hidden": "true",
1263
1263
  children: e.n
1264
- }), /* @__PURE__ */ O("div", {
1264
+ }), /* @__PURE__ */ j("div", {
1265
1265
  className: "cmg-step-main",
1266
- children: [/* @__PURE__ */ D("div", {
1266
+ children: [/* @__PURE__ */ A("div", {
1267
1267
  className: "cmg-step-title",
1268
1268
  children: e.title
1269
- }), /* @__PURE__ */ D(Ee, {
1269
+ }), /* @__PURE__ */ A(ke, {
1270
1270
  cmd: e.cmd,
1271
1271
  note: e.note
1272
1272
  })]
@@ -1274,9 +1274,9 @@ function Ae() {
1274
1274
  }, e.n))
1275
1275
  })]
1276
1276
  }),
1277
- /* @__PURE__ */ D("div", {
1277
+ /* @__PURE__ */ A("div", {
1278
1278
  className: "cmg-dlg-foot",
1279
- children: /* @__PURE__ */ D("button", {
1279
+ children: /* @__PURE__ */ A("button", {
1280
1280
  type: "button",
1281
1281
  className: "btn btn-sm btn-secondary",
1282
1282
  onClick: () => r(!1),
@@ -1288,1485 +1288,277 @@ function Ae() {
1288
1288
  })]
1289
1289
  });
1290
1290
  }
1291
- var je = [
1291
+ var Pe = [
1292
1292
  {
1293
- value: "open",
1294
- short: "Open",
1295
- label: "open",
1296
- rationale: "anyone can share. contributions are auto-approved."
1293
+ id: "village",
1294
+ name: "village",
1295
+ branch: "fix/auth-middleware",
1296
+ transcripts: [{
1297
+ id: "v1",
1298
+ provider: "claude-code",
1299
+ title: "Debugging auth middleware with Claude Code",
1300
+ date: "Jun 15",
1301
+ visibility: "public"
1302
+ }, {
1303
+ id: "v2",
1304
+ provider: "claude-code",
1305
+ title: "Add OAuth provider split-button",
1306
+ date: "Jun 11",
1307
+ visibility: "private"
1308
+ }]
1297
1309
  },
1298
1310
  {
1299
- value: "verified_only",
1300
- short: "Verified only",
1301
- label: "verified only",
1302
- rationale: "sharing requires an org affiliation."
1311
+ id: "api-server",
1312
+ name: "api-server",
1313
+ branch: "perf/query-optimization",
1314
+ transcripts: [{
1315
+ id: "a1",
1316
+ provider: "gemini-cli",
1317
+ title: "Optimizing N+1 query issues using Gemini CLI",
1318
+ date: "Jun 14",
1319
+ visibility: "private"
1320
+ }, {
1321
+ id: "a2",
1322
+ provider: "gemini-cli",
1323
+ title: "Index audit on the events table",
1324
+ date: "Jun 09",
1325
+ visibility: "public"
1326
+ }]
1303
1327
  },
1304
1328
  {
1305
- value: "curated",
1306
- short: "Curated",
1307
- label: "curated",
1308
- rationale: "the owner must approve each share before it appears."
1329
+ id: "frontend-app",
1330
+ name: "frontend-app",
1331
+ branch: "main",
1332
+ transcripts: [{
1333
+ id: "f1",
1334
+ provider: "opencode",
1335
+ title: "Greenfield React app setup",
1336
+ date: "Jun 12",
1337
+ visibility: "private"
1338
+ }]
1309
1339
  }
1310
- ], Me = [
1311
- {
1312
- value: "members_only",
1313
- short: "Members only",
1314
- label: "members only",
1315
- rationale: "full members can browse the collected data."
1316
- },
1317
- {
1318
- value: "contributors",
1319
- short: "Contributors",
1320
- label: "contributors",
1321
- rationale: "anyone who contributes can browse the data."
1322
- },
1323
- {
1324
- value: "public",
1325
- short: "Public",
1326
- label: "public",
1327
- rationale: "anyone at all can browse the dataset."
1340
+ ], Fe = {
1341
+ name: "AI Research Team",
1342
+ members: 12
1343
+ };
1344
+ function Ie() {
1345
+ let [e, t] = O(() => /* @__PURE__ */ new Set(["v1"])), [n, r] = O(() => new Set(Pe.map((e) => e.id))), [i, a] = O(!1), o = E(() => {
1346
+ let e = {};
1347
+ return Pe.forEach((t) => t.transcripts.forEach((n) => e[n.id] = {
1348
+ ...n,
1349
+ project: t.name
1350
+ })), e;
1351
+ }, []);
1352
+ function c(e) {
1353
+ t((t) => {
1354
+ let n = new Set(t);
1355
+ return n.has(e) ? n.delete(e) : n.add(e), n;
1356
+ });
1328
1357
  }
1329
- ], Ne = [
1330
- "@anthropic-labs",
1331
- "@data-collective",
1332
- "@openai-research"
1333
- ], Pe = [
1334
- {
1335
- id: "c1",
1336
- name: "AI Research Team",
1337
- desc: "Sharing transcripts related to AI research",
1338
- members: 12,
1339
- transcripts: 248,
1340
- mode: "open",
1341
- role: "owner",
1342
- since: "Member for 5mo"
1343
- },
1344
- {
1345
- id: "c2",
1346
- name: "Verified Contributors",
1347
- desc: "Only verified org members can share here",
1348
- members: 7,
1349
- transcripts: 96,
1350
- mode: "verified_only",
1351
- role: "member",
1352
- since: "Member for 2mo"
1353
- },
1354
- {
1355
- id: "c3",
1356
- name: "Curated Showcase",
1357
- desc: "Owner-approved transcripts only",
1358
- members: 21,
1359
- transcripts: 54,
1360
- mode: "curated",
1361
- role: "contributor",
1362
- since: "Joined today"
1358
+ function l(t) {
1359
+ let n = t.transcripts.map((e) => e.id), r = n.filter((t) => e.has(t)).length;
1360
+ return r === 0 ? "none" : r === n.length ? "all" : "some";
1363
1361
  }
1364
- ];
1365
- function Fe({ mode: e }) {
1366
- let t = je.find((t) => t.value === e);
1367
- return /* @__PURE__ */ D("span", {
1368
- className: "chip " + (e === "open" ? "chip-ok" : e === "curated" ? "chip-warn" : ""),
1369
- children: t ? t.short.toLowerCase() : e
1370
- });
1371
- }
1372
- function Ie({ data: e = {}, actions: t = {} } = {}) {
1373
- let { collectives: n = Pe, linkedOrgs: r = Ne, title: a = "collectives", deck: o = "groups that govern shared data together.", crumb: s = "collectives", createLabel: c = "new collective", createBusy: l = !1 } = e, { onCreateCollective: u, onOpenCollective: d } = t, [f, p] = T(!1), [m, h] = T(""), [g, _] = T(""), [v, y] = T("open"), [b, x] = T("members_only"), [C, w] = T(""), k = S();
1374
- return /* @__PURE__ */ D("div", {
1362
+ function u(e) {
1363
+ let n = l(e);
1364
+ t((t) => {
1365
+ let r = new Set(t);
1366
+ return e.transcripts.forEach((e) => n === "all" ? r.delete(e.id) : r.add(e.id)), r;
1367
+ });
1368
+ }
1369
+ function d(e) {
1370
+ r((t) => {
1371
+ let n = new Set(t);
1372
+ return n.has(e) ? n.delete(e) : n.add(e), n;
1373
+ });
1374
+ }
1375
+ let f = [...e].map((e) => o[e]).filter(Boolean), p = f.filter((e) => e.visibility === "private").length;
1376
+ return /* @__PURE__ */ j("div", {
1375
1377
  className: "cmg-root",
1376
- children: /* @__PURE__ */ O("div", {
1378
+ children: [/* @__PURE__ */ j("div", {
1377
1379
  className: "cmg-page",
1378
1380
  children: [
1379
- /* @__PURE__ */ O("div", {
1381
+ /* @__PURE__ */ j("div", {
1380
1382
  className: "crumb cmg-crumb",
1381
1383
  children: [
1382
1384
  "village ",
1383
- /* @__PURE__ */ D(N, {
1385
+ /* @__PURE__ */ A(F, {
1386
+ size: 13,
1387
+ "aria-hidden": "true"
1388
+ }),
1389
+ " AI Research Team ",
1390
+ /* @__PURE__ */ A(F, {
1384
1391
  size: 13,
1385
1392
  "aria-hidden": "true"
1386
1393
  }),
1387
1394
  " ",
1388
- /* @__PURE__ */ D("span", {
1395
+ /* @__PURE__ */ A("span", {
1389
1396
  className: "cur",
1390
- children: s
1397
+ children: "contribute"
1391
1398
  })
1392
1399
  ]
1393
1400
  }),
1394
- /* @__PURE__ */ O("header", {
1401
+ /* @__PURE__ */ A("header", {
1395
1402
  className: "cmg-head",
1396
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
1403
+ children: /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h2", {
1397
1404
  className: "cmg-title",
1398
- children: a
1399
- }), /* @__PURE__ */ D("p", {
1405
+ children: "contribute to AI Research Team"
1406
+ }), /* @__PURE__ */ A("p", {
1400
1407
  className: "cmg-deck",
1401
- children: o
1402
- })] }), /* @__PURE__ */ O("button", {
1403
- type: "button",
1404
- className: "btn btn-sm " + (f ? "btn-secondary" : "btn-primary"),
1405
- "aria-expanded": f,
1406
- onClick: () => p((e) => !e),
1407
- children: [D(f ? Z : K, {
1408
- size: 14,
1409
- "aria-hidden": "true"
1410
- }), f ? "cancel" : c]
1411
- })]
1408
+ children: "select your own transcripts to share with this collective."
1409
+ })] })
1412
1410
  }),
1413
- f && /* @__PURE__ */ O("section", {
1414
- className: "cmg-form card",
1415
- "aria-labelledby": "cmg-form-h",
1416
- children: [
1417
- /* @__PURE__ */ D("h3", {
1418
- id: "cmg-form-h",
1419
- className: "cmg-sub",
1420
- children: "create a collective"
1421
- }),
1422
- /* @__PURE__ */ O("div", {
1423
- className: "cmg-form-grid",
1424
- children: [
1425
- /* @__PURE__ */ O("label", {
1426
- className: "cmg-field",
1427
- children: [/* @__PURE__ */ D("span", {
1428
- className: "label",
1429
- children: "name"
1430
- }), /* @__PURE__ */ D("input", {
1431
- className: "input",
1432
- type: "text",
1433
- placeholder: "AI Research Collective",
1434
- value: m,
1435
- onChange: (e) => h(e.target.value)
1436
- })]
1437
- }),
1438
- /* @__PURE__ */ O("label", {
1439
- className: "cmg-field cmg-field-wide",
1440
- children: [/* @__PURE__ */ D("span", {
1441
- className: "label",
1442
- children: "purpose"
1443
- }), /* @__PURE__ */ D("textarea", {
1444
- className: "input",
1445
- rows: 2,
1446
- placeholder: "What does this collective do?",
1447
- value: g,
1448
- onChange: (e) => _(e.target.value)
1449
- })]
1450
- }),
1451
- /* @__PURE__ */ D("div", {
1452
- className: "cmg-field",
1453
- children: /* @__PURE__ */ D(i, {
1454
- variant: "select",
1455
- label: "acceptance mode",
1456
- name: "acceptance-mode",
1457
- value: v,
1458
- onChange: y,
1459
- options: je
1460
- })
1461
- }),
1462
- /* @__PURE__ */ D("div", {
1463
- className: "cmg-field",
1464
- children: /* @__PURE__ */ D(i, {
1465
- variant: "select",
1466
- label: "data access policy",
1467
- name: "data-access",
1468
- value: b,
1469
- onChange: x,
1470
- options: Me
1411
+ /* @__PURE__ */ A("section", {
1412
+ className: "card cmg-contribute",
1413
+ "aria-label": "your transcripts by project",
1414
+ children: Pe.map((t) => {
1415
+ let r = l(t), i = n.has(t.id);
1416
+ return /* @__PURE__ */ j("div", {
1417
+ className: "cmg-proj",
1418
+ children: [/* @__PURE__ */ j("div", {
1419
+ className: "cmg-proj-head",
1420
+ children: [/* @__PURE__ */ A("label", {
1421
+ className: "check cmg-proj-check",
1422
+ children: /* @__PURE__ */ A("input", {
1423
+ type: "checkbox",
1424
+ className: "check-box",
1425
+ checked: r === "all",
1426
+ ref: (e) => e && (e.indeterminate = r === "some"),
1427
+ onChange: () => u(t),
1428
+ "aria-label": `select all in ${t.name}`
1471
1429
  })
1472
- }),
1473
- /* @__PURE__ */ O("label", {
1474
- className: "cmg-field",
1475
- children: [/* @__PURE__ */ D("span", {
1476
- className: "label",
1477
- children: "link to github org (optional)"
1478
- }), /* @__PURE__ */ O("div", {
1479
- className: "select-wrap",
1480
- children: [/* @__PURE__ */ O("select", {
1481
- className: "select",
1482
- value: C,
1483
- onChange: (e) => w(e.target.value),
1484
- children: [/* @__PURE__ */ D("option", {
1485
- value: "",
1486
- children: "Not linked"
1487
- }), r.map((e) => /* @__PURE__ */ D("option", {
1488
- value: e,
1489
- children: e
1490
- }, e))]
1491
- }), /* @__PURE__ */ D(M, {
1492
- className: "lucide",
1430
+ }), /* @__PURE__ */ j("button", {
1431
+ type: "button",
1432
+ className: "cmg-proj-toggle",
1433
+ "aria-expanded": i,
1434
+ onClick: () => d(t.id),
1435
+ children: [
1436
+ A(i ? P : F, {
1437
+ size: 15,
1493
1438
  "aria-hidden": "true"
1494
- })]
1495
- })]
1496
- })
1497
- ]
1498
- }),
1499
- /* @__PURE__ */ O("div", {
1500
- className: "cmg-form-foot",
1501
- children: [/* @__PURE__ */ D("button", {
1502
- type: "button",
1503
- className: "btn btn-sm btn-primary",
1504
- disabled: !m.trim() || l,
1505
- "aria-describedby": k,
1506
- onClick: () => u?.({
1507
- name: m,
1508
- purpose: g,
1509
- mode: v,
1510
- access: b,
1511
- org: C
1512
- }),
1513
- children: l ? "creating…" : "create collective"
1514
- }), /* @__PURE__ */ D("span", {
1515
- id: k,
1516
- className: "cmg-form-hint mono",
1517
- children: je.find((e) => e.value === v)?.rationale
1439
+ }),
1440
+ /* @__PURE__ */ A("span", {
1441
+ className: "cmg-proj-name mono",
1442
+ children: t.name
1443
+ }),
1444
+ /* @__PURE__ */ j("span", {
1445
+ className: "cmg-proj-branch mono",
1446
+ children: [
1447
+ /* @__PURE__ */ A(W, {
1448
+ size: 12,
1449
+ "aria-hidden": "true"
1450
+ }),
1451
+ " ",
1452
+ t.branch
1453
+ ]
1454
+ }),
1455
+ /* @__PURE__ */ A("span", {
1456
+ className: "cmg-proj-cnt mono tnum",
1457
+ children: t.transcripts.length
1458
+ })
1459
+ ]
1460
+ })]
1461
+ }), i && /* @__PURE__ */ A("ul", {
1462
+ className: "cmg-tx-list",
1463
+ children: t.transcripts.map((t) => /* @__PURE__ */ j("li", {
1464
+ className: "cmg-tx-row",
1465
+ children: [
1466
+ /* @__PURE__ */ A("label", {
1467
+ className: "check cmg-tx-check",
1468
+ children: /* @__PURE__ */ A("input", {
1469
+ type: "checkbox",
1470
+ className: "check-box",
1471
+ checked: e.has(t.id),
1472
+ onChange: () => c(t.id),
1473
+ "aria-label": `select ${t.title}`
1474
+ })
1475
+ }),
1476
+ /* @__PURE__ */ A("span", {
1477
+ className: "cmg-pub-prov",
1478
+ children: /* @__PURE__ */ A(ProviderMark, { id: t.provider })
1479
+ }),
1480
+ /* @__PURE__ */ A("span", {
1481
+ className: "cmg-tx-title",
1482
+ children: t.title
1483
+ }),
1484
+ /* @__PURE__ */ A(Me, { v: t.visibility }),
1485
+ /* @__PURE__ */ A("span", {
1486
+ className: "cmg-tx-date mono tnum",
1487
+ children: t.date
1488
+ }),
1489
+ /* @__PURE__ */ A("button", {
1490
+ type: "button",
1491
+ className: "btn btn-sm btn-icon btn-ghost",
1492
+ "aria-label": `preview ${t.title}`,
1493
+ children: /* @__PURE__ */ A(z, {
1494
+ size: 14,
1495
+ "aria-hidden": "true"
1496
+ })
1497
+ })
1498
+ ]
1499
+ }, t.id))
1518
1500
  })]
1519
- })
1520
- ]
1501
+ }, t.id);
1502
+ })
1521
1503
  }),
1522
- /* @__PURE__ */ D("ul", {
1523
- className: "cmg-grid",
1524
- children: n.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ O("button", {
1525
- type: "button",
1526
- className: "card cmg-col-card",
1527
- onClick: () => d?.(e.id),
1504
+ /* @__PURE__ */ j("div", {
1505
+ className: "cmg-contribute-foot",
1506
+ children: [/* @__PURE__ */ j("span", {
1507
+ className: "cmg-sel-count mono",
1528
1508
  children: [
1529
- /* @__PURE__ */ D("span", {
1530
- className: "cmg-col-ico",
1531
- "aria-hidden": "true",
1532
- children: /* @__PURE__ */ D(X, { size: 18 })
1509
+ /* @__PURE__ */ A("span", {
1510
+ className: "tnum",
1511
+ children: e.size
1533
1512
  }),
1534
- /* @__PURE__ */ O("span", {
1535
- className: "cmg-col-main",
1513
+ " selected",
1514
+ p > 0 ? /* @__PURE__ */ j("span", {
1515
+ className: "cmg-sel-warn",
1536
1516
  children: [
1537
- /* @__PURE__ */ O("span", {
1538
- className: "cmg-col-head",
1539
- children: [/* @__PURE__ */ D("span", {
1540
- className: "cmg-col-name",
1541
- children: e.name
1542
- }), /* @__PURE__ */ D(Fe, { mode: e.mode })]
1543
- }),
1544
- /* @__PURE__ */ D("span", {
1545
- className: "cmg-col-desc",
1546
- children: e.desc
1517
+ " · ",
1518
+ /* @__PURE__ */ A("span", {
1519
+ className: "tnum",
1520
+ children: p
1547
1521
  }),
1548
- /* @__PURE__ */ O("span", {
1549
- className: "cmg-col-foot mono",
1550
- children: [
1551
- /* @__PURE__ */ D("span", {
1552
- className: "cmg-col-role",
1553
- children: e.role
1554
- }),
1555
- e.since ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
1556
- className: "cmg-dot",
1557
- "aria-hidden": "true",
1558
- children: "·"
1559
- }), /* @__PURE__ */ D("span", { children: e.since })] }) : null,
1560
- e.members == null ? null : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
1561
- className: "cmg-dot",
1562
- "aria-hidden": "true",
1563
- children: "·"
1564
- }), /* @__PURE__ */ O("span", {
1565
- className: "tnum",
1566
- children: [e.members, " members"]
1567
- })] }),
1568
- e.transcripts == null ? null : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
1569
- className: "cmg-dot",
1570
- "aria-hidden": "true",
1571
- children: "·"
1572
- }), /* @__PURE__ */ O("span", {
1573
- className: "tnum",
1574
- children: [e.transcripts, " transcripts"]
1575
- })] })
1576
- ]
1577
- })
1522
+ " private"
1578
1523
  ]
1524
+ }) : null
1525
+ ]
1526
+ }), /* @__PURE__ */ j("button", {
1527
+ type: "button",
1528
+ className: "btn btn-sm btn-primary",
1529
+ disabled: e.size === 0,
1530
+ onClick: () => a(!0),
1531
+ children: [
1532
+ /* @__PURE__ */ A(X, {
1533
+ size: 14,
1534
+ "aria-hidden": "true"
1579
1535
  }),
1580
- /* @__PURE__ */ D(N, {
1581
- size: 16,
1582
- "aria-hidden": "true",
1583
- className: "cmg-col-chev"
1584
- })
1536
+ " contribute ",
1537
+ e.size,
1538
+ " transcript",
1539
+ e.size === 1 ? "" : "s"
1585
1540
  ]
1586
- }) }, e.id))
1541
+ })]
1587
1542
  })
1588
1543
  ]
1589
- })
1590
- });
1591
- }
1592
- var Le = [
1593
- "owner",
1594
- "member",
1595
- "contributor",
1596
- "guest"
1597
- ], Re = [
1598
- {
1599
- id: "claude-code",
1600
- pct: 58
1601
- },
1602
- {
1603
- id: "gemini-cli",
1604
- pct: 24
1605
- },
1606
- {
1607
- id: "opencode",
1608
- pct: 12
1609
- },
1610
- {
1611
- id: "codex",
1612
- pct: 6
1613
- }
1614
- ], ze = [
1615
- {
1616
- id: "p1",
1617
- provider: "claude-code",
1618
- title: "Building a REST API from scratch",
1619
- by: "@alice-dev"
1620
- },
1621
- {
1622
- id: "p2",
1623
- provider: "gemini-cli",
1624
- title: "Refactoring database queries with Gemini",
1625
- by: "anon"
1626
- },
1627
- {
1628
- id: "p3",
1629
- provider: "opencode",
1630
- title: "Multi-agent debugging session",
1631
- by: "@bob-ai"
1632
- }
1633
- ], Be = [
1634
- {
1635
- handle: "@alice-dev",
1636
- name: "Alice Developer",
1637
- role: "owner",
1638
- n: 84
1639
- },
1640
- {
1641
- handle: "@bob-ai",
1642
- name: "Bob AI",
1643
- role: "member",
1644
- n: 37
1645
- },
1646
- {
1647
- handle: "@charlie-ml",
1648
- name: "Charlie ML",
1649
- role: "member",
1650
- n: 22
1651
- },
1652
- {
1653
- handle: "anon",
1654
- name: "anonymous",
1655
- role: "contributor",
1656
- n: 9
1657
- }
1658
- ], Ve = [
1659
- {
1660
- id: "r1",
1661
- cat: "CREDENTIAL",
1662
- catLabel: "Credential",
1663
- catTone: "chip-err",
1664
- tip: "A secret, token, key, or password.",
1665
- confidence: 96,
1666
- line: 142,
1667
- file: "internal/aws/client.go",
1668
- original: "AWS_SECRET = \"AKIA4F8X2Q9ZJ7K1MN3P\"",
1669
- replacement: "AWS_SECRET = \"[REDACTED:credential]\"",
1670
- summary: "AWS access key detected"
1671
- },
1672
- {
1673
- id: "r2",
1674
- cat: "PII",
1675
- catLabel: "PII",
1676
- catTone: "chip-warn",
1677
- tip: "Personally identifiable information (name, email, phone).",
1678
- confidence: 62,
1679
- line: 318,
1680
- file: "cmd/notify/main.go",
1681
- original: "to := \"alice.developer@example.com\"",
1682
- replacement: "to := \"[REDACTED:pii]\"",
1683
- summary: "email address detected"
1684
- },
1685
- {
1686
- id: "r3",
1687
- cat: "PATH",
1688
- catLabel: "Path",
1689
- catTone: "",
1690
- tip: "A local filesystem path.",
1691
- confidence: 88,
1692
- line: 12,
1693
- file: "config/dev.yaml",
1694
- original: "home: /Users/pigeonzow/Documents/GitHub/Neurondle",
1695
- replacement: "home: [REDACTED:path]",
1696
- summary: "local path detected"
1697
- }
1698
- ];
1699
- function He({ item: e }) {
1700
- let [t, n] = T(!1), r = e.confidence < 70;
1701
- return /* @__PURE__ */ O("div", {
1702
- className: "cmg-redact" + (t ? " cmg-redact-exposed" : "") + (r && !t ? " cmg-redact-low" : ""),
1703
- children: [
1704
- /* @__PURE__ */ O("div", {
1705
- className: "cmg-redact-head",
1706
- children: [/* @__PURE__ */ O("span", {
1707
- className: "cmg-redact-badges",
1708
- children: [
1709
- /* @__PURE__ */ D("span", {
1710
- className: "chip " + e.catTone,
1711
- title: e.tip,
1712
- children: e.catLabel.toLowerCase()
1713
- }),
1714
- /* @__PURE__ */ O("span", {
1715
- className: "chip " + (r ? "chip-warn" : ""),
1716
- children: [
1717
- r ? /* @__PURE__ */ D(k, {
1718
- size: 13,
1719
- "aria-hidden": "true"
1720
- }) : null,
1721
- /* @__PURE__ */ O("span", {
1722
- className: "tnum",
1723
- children: [e.confidence, "%"]
1724
- }),
1725
- " confidence"
1726
- ]
1727
- }),
1728
- t ? /* @__PURE__ */ D("span", {
1729
- className: "chip chip-err",
1730
- children: "un-redacted"
1731
- }) : null
1732
- ]
1733
- }), /* @__PURE__ */ D("span", {
1734
- className: "cmg-redact-file mono",
1735
- children: e.file
1736
- })]
1737
- }),
1738
- /* @__PURE__ */ D("p", {
1739
- className: "cmg-redact-summary mono",
1740
- children: e.summary
1741
- }),
1742
- /* @__PURE__ */ O("div", {
1743
- className: "diff cmg-redact-diff",
1744
- children: [
1745
- /* @__PURE__ */ O("div", {
1746
- className: "dl ctx",
1747
- children: [
1748
- /* @__PURE__ */ D("span", { className: "rail" }),
1749
- /* @__PURE__ */ D("span", {
1750
- className: "gut tnum",
1751
- children: e.line - 1
1752
- }),
1753
- /* @__PURE__ */ D("span", { className: "sign" }),
1754
- /* @__PURE__ */ D("span", {
1755
- className: "t",
1756
- children: "func configure() {"
1757
- })
1758
- ]
1759
- }),
1760
- /* @__PURE__ */ O("div", {
1761
- className: "dl del",
1762
- children: [
1763
- /* @__PURE__ */ D("span", { className: "rail" }),
1764
- /* @__PURE__ */ D("span", {
1765
- className: "gut tnum",
1766
- children: e.line
1767
- }),
1768
- /* @__PURE__ */ D("span", {
1769
- className: "sign",
1770
- children: "−"
1771
- }),
1772
- /* @__PURE__ */ D("span", {
1773
- className: "t cmg-strike",
1774
- children: e.original
1775
- })
1776
- ]
1777
- }),
1778
- /* @__PURE__ */ O("div", {
1779
- className: "dl add",
1780
- children: [
1781
- /* @__PURE__ */ D("span", { className: "rail" }),
1782
- /* @__PURE__ */ D("span", {
1783
- className: "gut tnum",
1784
- children: e.line
1785
- }),
1786
- /* @__PURE__ */ D("span", {
1787
- className: "sign",
1788
- children: "+"
1789
- }),
1790
- /* @__PURE__ */ D("span", {
1791
- className: "t",
1792
- children: e.replacement
1793
- })
1794
- ]
1795
- }),
1796
- /* @__PURE__ */ O("div", {
1797
- className: "dl ctx",
1798
- children: [
1799
- /* @__PURE__ */ D("span", { className: "rail" }),
1800
- /* @__PURE__ */ D("span", {
1801
- className: "gut tnum",
1802
- children: e.line + 1
1803
- }),
1804
- /* @__PURE__ */ D("span", { className: "sign" }),
1805
- /* @__PURE__ */ D("span", {
1806
- className: "t",
1807
- children: "}"
1808
- })
1809
- ]
1810
- })
1811
- ]
1812
- }),
1813
- /* @__PURE__ */ O("div", {
1814
- className: "cmg-redact-foot",
1815
- children: [t ? /* @__PURE__ */ O("span", {
1816
- className: "cmg-redact-warn mono",
1817
- children: [/* @__PURE__ */ D(k, {
1818
- size: 13,
1819
- "aria-hidden": "true"
1820
- }), " this content will be exposed"]
1821
- }) : /* @__PURE__ */ O("span", {
1822
- className: "cmg-redact-safe mono",
1823
- children: [/* @__PURE__ */ D(J, {
1824
- size: 13,
1825
- "aria-hidden": "true"
1826
- }), " redacted (safe default)"]
1827
- }), t ? /* @__PURE__ */ O("button", {
1828
- type: "button",
1829
- className: "btn btn-sm btn-secondary",
1830
- onClick: () => n(!1),
1831
- children: [/* @__PURE__ */ D(z, {
1832
- size: 14,
1833
- "aria-hidden": "true"
1834
- }), " redact"]
1835
- }) : /* @__PURE__ */ O("button", {
1836
- type: "button",
1837
- className: "btn btn-sm btn-danger",
1838
- onClick: () => n(!0),
1839
- children: [/* @__PURE__ */ D(R, {
1840
- size: 14,
1841
- "aria-hidden": "true"
1842
- }), " opt out"]
1843
- })]
1844
- })
1845
- ]
1846
- });
1847
- }
1848
- function Ue({ data: e = {}, actions: t = {} } = {}) {
1849
- let { collective: n = {
1850
- name: "AI Research Team",
1851
- description: "Sharing transcripts related to AI research",
1852
- linkedGithubOrg: "@anthropic-labs"
1853
- }, providerShare: i = Re, pendingReview: a = ze, members: o = Be, redactions: s = Ve, browseRows: c = [
1854
- {
1855
- title: "Building a REST API from scratch",
1856
- contributor: "@alice-dev",
1857
- providerId: "claude-code",
1858
- provider: "Claude Code",
1859
- turns: "64",
1860
- tokens: "182K",
1861
- date: "Jun 15"
1862
- },
1863
- {
1864
- title: "Debugging auth middleware",
1865
- contributor: "anon",
1866
- providerId: "gemini-cli",
1867
- provider: "Gemini",
1868
- turns: "31",
1869
- tokens: "94K",
1870
- date: "Jun 14"
1871
- },
1872
- {
1873
- title: "Greenfield React app setup",
1874
- contributor: "@bob-ai",
1875
- providerId: "opencode",
1876
- provider: "OpenCode",
1877
- turns: "47",
1878
- tokens: "121K",
1879
- date: "Jun 12"
1880
- }
1881
- ], roleOptions: d = Le, initialRole: p = "owner", initialShowRedaction: m = !0, initialBrowseGated: g = !1, targetCollective: _ = Ke, stats: v = {
1882
- transcripts: "248",
1883
- projects: "31 projects",
1884
- tokens: "4.2M",
1885
- turns: "18.4K turns",
1886
- contributors: "12",
1887
- hours: "63h total"
1888
- } } = e, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = t, [A, j] = T(p), [F, I] = T(m), [L, z] = T(g), B = A === "owner", H = A === "guest", U = (e) => {
1889
- j(e), b?.(e);
1890
- };
1891
- return /* @__PURE__ */ D("div", {
1892
- className: "cmg-root",
1893
- children: /* @__PURE__ */ O("div", {
1894
- className: "cmg-detail",
1895
- children: [
1896
- /* @__PURE__ */ O("header", {
1897
- className: "cmg-d-hero",
1898
- children: [/* @__PURE__ */ O("div", {
1899
- className: "crumb cmg-crumb",
1900
- children: [
1901
- "village ",
1902
- /* @__PURE__ */ D(N, {
1903
- size: 13,
1904
- "aria-hidden": "true"
1905
- }),
1906
- " collectives ",
1907
- /* @__PURE__ */ D(N, {
1908
- size: 13,
1909
- "aria-hidden": "true"
1910
- }),
1911
- " ",
1912
- /* @__PURE__ */ D("span", {
1913
- className: "cur",
1914
- children: n.name
1915
- })
1916
- ]
1917
- }), /* @__PURE__ */ O("div", {
1918
- className: "cmg-d-hero-row",
1919
- children: [/* @__PURE__ */ O("div", { children: [
1920
- /* @__PURE__ */ D("h2", {
1921
- className: "cmg-title",
1922
- children: n.name
1923
- }),
1924
- /* @__PURE__ */ D("p", {
1925
- className: "cmg-deck",
1926
- children: n.description
1927
- }),
1928
- /* @__PURE__ */ O("span", {
1929
- className: "cmg-orgpill mono",
1930
- children: [
1931
- /* @__PURE__ */ D(V, {
1932
- size: 13,
1933
- "aria-hidden": "true"
1934
- }),
1935
- " ",
1936
- n.linkedGithubOrg || "not linked"
1937
- ]
1938
- })
1939
- ] }), /* @__PURE__ */ O("div", {
1940
- className: "cmg-d-actions btn-row",
1941
- children: [
1942
- /* @__PURE__ */ D("div", {
1943
- className: "cmg-roleswitch",
1944
- role: "group",
1945
- "aria-label": "view as role",
1946
- children: d.map((e) => /* @__PURE__ */ D("button", {
1947
- type: "button",
1948
- className: "cmg-roleseg",
1949
- "aria-pressed": A === e,
1950
- onClick: () => U(e),
1951
- children: e
1952
- }, e))
1953
- }),
1954
- H && /* @__PURE__ */ O("button", {
1955
- type: "button",
1956
- className: "btn btn-sm btn-primary",
1957
- onClick: () => x?.(),
1958
- children: [/* @__PURE__ */ D(Y, {
1959
- size: 14,
1960
- "aria-hidden": "true"
1961
- }), " join as contributor"]
1962
- }),
1963
- (A === "member" || A === "contributor") && /* @__PURE__ */ O("button", {
1964
- type: "button",
1965
- className: "btn btn-sm btn-primary",
1966
- onClick: () => k?.(),
1967
- children: [/* @__PURE__ */ D(ie, {
1968
- size: 14,
1969
- "aria-hidden": "true"
1970
- }), " contribute"]
1971
- }),
1972
- (A === "member" || A === "contributor") && /* @__PURE__ */ O("button", {
1973
- type: "button",
1974
- className: "btn btn-sm btn-danger",
1975
- onClick: () => S?.(),
1976
- children: [/* @__PURE__ */ D(G, {
1977
- size: 14,
1978
- "aria-hidden": "true"
1979
- }), " leave"]
1980
- }),
1981
- B && /* @__PURE__ */ O("button", {
1982
- type: "button",
1983
- className: "btn btn-sm btn-secondary",
1984
- onClick: () => C?.(),
1985
- children: [/* @__PURE__ */ D(re, {
1986
- size: 14,
1987
- "aria-hidden": "true"
1988
- }), " settings"]
1989
- })
1990
- ]
1991
- })]
1992
- })]
1993
- }),
1994
- /* @__PURE__ */ O("div", {
1995
- className: "cmg-tiles",
1996
- children: [
1997
- /* @__PURE__ */ D(h, {
1998
- label: "contributions",
1999
- value: n.acceptanceMode || "open",
2000
- tone: "teal"
2001
- }),
2002
- /* @__PURE__ */ D(h, {
2003
- label: "access",
2004
- value: n.dataAccess || "members only",
2005
- tone: "amber"
2006
- }),
2007
- /* @__PURE__ */ D(h, {
2008
- label: "your role",
2009
- value: A
2010
- })
2011
- ]
2012
- }),
2013
- /* @__PURE__ */ D(l, { tiles: [
2014
- {
2015
- key: "transcripts",
2016
- label: "transcripts",
2017
- value: v.transcripts,
2018
- sub: `across ${v.projects}`
2019
- },
2020
- {
2021
- key: "tokens",
2022
- label: "tokens",
2023
- value: v.tokens,
2024
- sub: v.turns
2025
- },
2026
- {
2027
- key: "contributors",
2028
- label: "contributors",
2029
- value: v.contributors,
2030
- sub: v.hours
2031
- }
2032
- ] }),
2033
- /* @__PURE__ */ O("div", {
2034
- className: "cmg-d-grid",
2035
- children: [/* @__PURE__ */ O("main", {
2036
- className: "cmg-d-main",
2037
- children: [
2038
- /* @__PURE__ */ O("section", {
2039
- className: "card cmg-share",
2040
- "aria-labelledby": "cmg-share-h",
2041
- children: [/* @__PURE__ */ D("h3", {
2042
- id: "cmg-share-h",
2043
- className: "cmg-sub",
2044
- children: "provider share"
2045
- }), /* @__PURE__ */ D(u, {
2046
- label: "provider share",
2047
- total: 100,
2048
- data: i.map((e) => ({
2049
- label: Te(e.id),
2050
- value: e.pct
2051
- }))
2052
- })]
2053
- }),
2054
- B && /* @__PURE__ */ D("div", {
2055
- style: {
2056
- overflow: "auto",
2057
- maxWidth: "100%"
2058
- },
2059
- children: /* @__PURE__ */ D(r, {
2060
- title: "pending review",
2061
- emptyLabel: "no shares awaiting review.",
2062
- items: a.map((e) => ({
2063
- id: e.id,
2064
- kind: "share",
2065
- who: e.title,
2066
- detail: `by ${e.by}`
2067
- }))
2068
- })
2069
- }),
2070
- /* @__PURE__ */ O("section", {
2071
- className: "card cmg-redact-sec",
2072
- "aria-labelledby": "cmg-redact-h",
2073
- children: [/* @__PURE__ */ O("div", {
2074
- className: "cmg-queue-head",
2075
- children: [/* @__PURE__ */ O("h3", {
2076
- id: "cmg-redact-h",
2077
- className: "cmg-sub",
2078
- children: [/* @__PURE__ */ D(q, {
2079
- size: 15,
2080
- "aria-hidden": "true"
2081
- }), " redaction review"]
2082
- }), /* @__PURE__ */ O("button", {
2083
- type: "button",
2084
- className: "btn btn-sm btn-ghost",
2085
- "aria-expanded": F,
2086
- onClick: () => I((e) => !e),
2087
- children: [D(F ? M : N, {
2088
- size: 14,
2089
- "aria-hidden": "true"
2090
- }), F ? "hide" : "show"]
2091
- })]
2092
- }), F && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("div", {
2093
- className: "callout cmg-redact-note",
2094
- children: [/* @__PURE__ */ D(q, {
2095
- size: 16,
2096
- "aria-hidden": "true"
2097
- }), /* @__PURE__ */ D("div", { children: "safe by default: every detected item stays redacted unless you opt out per item. there is no bulk accept." })]
2098
- }), /* @__PURE__ */ D("div", {
2099
- className: "cmg-redact-list",
2100
- children: s.map((e) => /* @__PURE__ */ D(He, { item: e }, e.id))
2101
- })] })]
2102
- }),
2103
- /* @__PURE__ */ O("section", {
2104
- className: "card cmg-browser",
2105
- "aria-labelledby": "cmg-browser-h",
2106
- children: [/* @__PURE__ */ O("div", {
2107
- className: "cmg-queue-head",
2108
- children: [/* @__PURE__ */ D("h3", {
2109
- id: "cmg-browser-h",
2110
- className: "cmg-sub",
2111
- children: "data"
2112
- }), /* @__PURE__ */ O("button", {
2113
- type: "button",
2114
- className: "btn btn-sm btn-ghost",
2115
- "aria-pressed": L,
2116
- onClick: () => {
2117
- z((e) => {
2118
- let t = !e;
2119
- return w?.(t), t;
2120
- });
2121
- },
2122
- children: [D(L ? W : R, {
2123
- size: 14,
2124
- "aria-hidden": "true"
2125
- }), L ? "gated view" : "open view"]
2126
- })]
2127
- }), L ? /* @__PURE__ */ O("div", {
2128
- className: "empty cmg-locked",
2129
- children: [
2130
- /* @__PURE__ */ D("span", {
2131
- className: "ring",
2132
- children: /* @__PURE__ */ D(W, {
2133
- size: 20,
2134
- "aria-hidden": "true"
2135
- })
2136
- }),
2137
- /* @__PURE__ */ D("h3", { children: "data access restricted" }),
2138
- /* @__PURE__ */ D("p", { children: "this collective is members-only. join as a full member to browse the dataset." }),
2139
- H && /* @__PURE__ */ O("button", {
2140
- type: "button",
2141
- className: "btn btn-sm btn-primary",
2142
- children: [/* @__PURE__ */ D(Y, {
2143
- size: 14,
2144
- "aria-hidden": "true"
2145
- }), " join as contributor"]
2146
- })
2147
- ]
2148
- }) : /* @__PURE__ */ O("table", {
2149
- className: "dtable cmg-dtable",
2150
- children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", { children: [
2151
- /* @__PURE__ */ D("th", {
2152
- scope: "col",
2153
- children: "title"
2154
- }),
2155
- /* @__PURE__ */ D("th", {
2156
- scope: "col",
2157
- children: "contributor"
2158
- }),
2159
- /* @__PURE__ */ D("th", {
2160
- scope: "col",
2161
- children: "provider"
2162
- }),
2163
- /* @__PURE__ */ D("th", {
2164
- scope: "col",
2165
- className: "cmg-num",
2166
- children: "turns"
2167
- }),
2168
- /* @__PURE__ */ D("th", {
2169
- scope: "col",
2170
- className: "cmg-num",
2171
- children: "tokens"
2172
- }),
2173
- /* @__PURE__ */ D("th", {
2174
- scope: "col",
2175
- children: "date"
2176
- })
2177
- ] }) }), /* @__PURE__ */ D("tbody", { children: c.map((e) => /* @__PURE__ */ O("tr", { children: [
2178
- /* @__PURE__ */ D("td", { children: e.title }),
2179
- /* @__PURE__ */ D("td", {
2180
- className: "mono",
2181
- children: e.contributor
2182
- }),
2183
- /* @__PURE__ */ O("td", { children: [
2184
- /* @__PURE__ */ D(y, { harness: e.providerId }),
2185
- " ",
2186
- Te(e.providerId)
2187
- ] }),
2188
- /* @__PURE__ */ D("td", {
2189
- className: "cmg-num tnum",
2190
- children: e.turns
2191
- }),
2192
- /* @__PURE__ */ D("td", {
2193
- className: "cmg-num tnum",
2194
- children: e.tokens
2195
- }),
2196
- /* @__PURE__ */ D("td", {
2197
- className: "mono tnum",
2198
- children: e.date
2199
- })
2200
- ] }, e.title)) })]
2201
- })]
2202
- })
2203
- ]
2204
- }), /* @__PURE__ */ O("aside", {
2205
- className: "sidebar cmg-d-rail",
2206
- "aria-label": "collective sidebar",
2207
- children: [
2208
- B && /* @__PURE__ */ D("div", {
2209
- style: {
2210
- overflow: "auto",
2211
- maxWidth: "100%"
2212
- },
2213
- children: /* @__PURE__ */ D(r, {
2214
- title: "pending requests",
2215
- emptyLabel: "no pending requests.",
2216
- items: [{
2217
- id: "dana-codes",
2218
- kind: "member",
2219
- who: "@dana-codes"
2220
- }]
2221
- })
2222
- }),
2223
- /* @__PURE__ */ D("div", {
2224
- style: {
2225
- overflow: "auto",
2226
- maxWidth: "100%"
2227
- },
2228
- children: /* @__PURE__ */ D(f, {
2229
- title: "members",
2230
- roles: ["member", "contributor"],
2231
- members: o.map((e) => ({
2232
- handle: e.handle,
2233
- name: e.name,
2234
- role: e.role,
2235
- owner: e.role === "owner"
2236
- }))
2237
- })
2238
- }),
2239
- /* @__PURE__ */ O("div", {
2240
- className: "sb-sec",
2241
- children: [/* @__PURE__ */ O("div", {
2242
- className: "sb-head",
2243
- children: [/* @__PURE__ */ D(V, {
2244
- size: 14,
2245
- "aria-hidden": "true",
2246
- style: {
2247
- verticalAlign: "-0.16em",
2248
- marginRight: 6
2249
- }
2250
- }), " linked repositories"]
2251
- }), /* @__PURE__ */ O("div", {
2252
- className: "cmg-repo-note callout",
2253
- children: [/* @__PURE__ */ D(P, {
2254
- size: 16,
2255
- "aria-hidden": "true"
2256
- }), /* @__PURE__ */ D("div", { children: n.linkedGithubOrg ? `linked to ${n.linkedGithubOrg}.` : "the github connection isn't set up. an admin must register the github app to overlay commit timelines." })]
2257
- })]
2258
- })
2259
- ]
2260
- })]
2261
- })
2262
- ]
2263
- })
2264
- });
2265
- }
2266
- function We() {
2267
- let [n, r] = T("AI Research Team"), [i, l] = T("Sharing transcripts related to AI research"), [u, d] = T("curated"), [h, g] = T("members_only"), [_, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
2268
- return /* @__PURE__ */ D("div", {
2269
- className: "cmg-root cmg-settings",
2270
- children: /* @__PURE__ */ O("div", {
2271
- className: "cmg-detail",
2272
- children: [
2273
- /* @__PURE__ */ O("div", {
2274
- className: "crumb cmg-crumb",
2275
- children: [
2276
- "village ",
2277
- /* @__PURE__ */ D(N, {
2278
- size: 13,
2279
- "aria-hidden": "true"
2280
- }),
2281
- " collectives ",
2282
- /* @__PURE__ */ D(N, {
2283
- size: 13,
2284
- "aria-hidden": "true"
2285
- }),
2286
- /* @__PURE__ */ D("span", {
2287
- className: "cur",
2288
- children: "settings"
2289
- })
2290
- ]
2291
- }),
2292
- /* @__PURE__ */ D("header", {
2293
- className: "cmg-d-hero",
2294
- children: /* @__PURE__ */ O("div", {
2295
- className: "cmg-d-hero-row",
2296
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
2297
- className: "cmg-title",
2298
- children: "collective settings"
2299
- }), /* @__PURE__ */ D("p", {
2300
- className: "cmg-deck",
2301
- children: "edit how this collective accepts contributions and shares data."
2302
- })] }), /* @__PURE__ */ D(t, { children: "settings" })]
2303
- })
2304
- }),
2305
- /* @__PURE__ */ O("div", {
2306
- className: "cmg-d-grid",
2307
- children: [/* @__PURE__ */ O("main", {
2308
- className: "cmg-d-main",
2309
- children: [/* @__PURE__ */ O("form", {
2310
- className: "card cmg-settings-form",
2311
- onSubmit: (e) => {
2312
- e.preventDefault(), S(!0), window.setTimeout(() => S(!1), 1800);
2313
- },
2314
- children: [/* @__PURE__ */ O("div", {
2315
- className: "cmg-queue-head",
2316
- children: [/* @__PURE__ */ D("h3", {
2317
- className: "cmg-sub",
2318
- children: "general"
2319
- }), x ? /* @__PURE__ */ D("span", {
2320
- className: "chip chip-ok",
2321
- children: "saved"
2322
- }) : null]
2323
- }), /* @__PURE__ */ O("div", {
2324
- className: "cmg-settings-stack",
2325
- children: [
2326
- /* @__PURE__ */ D(s, {
2327
- label: "Name",
2328
- id: "cmg-name",
2329
- value: n,
2330
- onChange: (e) => r(e.target.value),
2331
- required: !0
2332
- }),
2333
- /* @__PURE__ */ D(c, {
2334
- label: "Description",
2335
- id: "cmg-description",
2336
- value: i,
2337
- onChange: (e) => l(e.target.value),
2338
- rows: 2
2339
- }),
2340
- /* @__PURE__ */ D(o, {
2341
- label: "Acceptance mode",
2342
- id: "cmg-acceptance",
2343
- value: u,
2344
- onChange: (e) => d(e.target.value),
2345
- options: [
2346
- {
2347
- value: "open",
2348
- label: "open - anyone can share, auto-approved"
2349
- },
2350
- {
2351
- value: "verified_only",
2352
- label: "verified only - requires org affiliation"
2353
- },
2354
- {
2355
- value: "curated",
2356
- label: "curated - owner must approve each share"
2357
- }
2358
- ]
2359
- }),
2360
- /* @__PURE__ */ D(o, {
2361
- label: "Data access",
2362
- id: "cmg-access",
2363
- value: h,
2364
- onChange: (e) => g(e.target.value),
2365
- options: [
2366
- {
2367
- value: "members_only",
2368
- label: "members only - full members can browse data"
2369
- },
2370
- {
2371
- value: "contributors",
2372
- label: "contributors - anyone who contributes can browse"
2373
- },
2374
- {
2375
- value: "public",
2376
- label: "public - anyone can browse the dataset"
2377
- }
2378
- ]
2379
- }),
2380
- /* @__PURE__ */ O("div", {
2381
- className: "sw-stack",
2382
- children: [
2383
- /* @__PURE__ */ D("label", {
2384
- htmlFor: "cmg-display-members",
2385
- className: "sw-label",
2386
- children: "Show the members card on the collective page"
2387
- }),
2388
- /* @__PURE__ */ D("span", {
2389
- className: "sw-hint",
2390
- children: "When off, only owners can see the member list."
2391
- }),
2392
- /* @__PURE__ */ D("div", {
2393
- className: "sw-toggle-row",
2394
- children: /* @__PURE__ */ D(a, {
2395
- id: "cmg-display-members",
2396
- checked: _,
2397
- onChange: (e) => v(e)
2398
- })
2399
- })
2400
- ]
2401
- }),
2402
- /* @__PURE__ */ D(m, {
2403
- name: "cmg-deletion-policy",
2404
- ariaLabel: "Transcript retention on leave",
2405
- value: y,
2406
- onChange: b,
2407
- options: [{
2408
- value: "user_choice",
2409
- label: /* @__PURE__ */ O("span", {
2410
- className: "flex flex-col gap-0.5",
2411
- children: [/* @__PURE__ */ D("span", {
2412
- className: "font-mono text-[14px] text-ink-2 lowercase",
2413
- children: "User's choice"
2414
- }), /* @__PURE__ */ D("span", {
2415
- className: "muted lowercase",
2416
- children: "Each leaving member decides whether to retract their contributions."
2417
- })]
2418
- })
2419
- }, {
2420
- value: "mandatory",
2421
- label: /* @__PURE__ */ O("span", {
2422
- className: "flex flex-col gap-0.5",
2423
- children: [/* @__PURE__ */ D("span", {
2424
- className: "font-mono text-[14px] text-ink-2 lowercase",
2425
- children: "Mandatory"
2426
- }), /* @__PURE__ */ D("span", {
2427
- className: "muted lowercase",
2428
- children: "All of a leaving member's contributions are auto-retracted."
2429
- })]
2430
- })
2431
- }]
2432
- }),
2433
- /* @__PURE__ */ O("div", {
2434
- className: "flex items-center gap-3",
2435
- children: [/* @__PURE__ */ D("button", {
2436
- type: "submit",
2437
- className: "btn btn-sm btn-primary",
2438
- children: "save changes"
2439
- }), /* @__PURE__ */ D(p, {
2440
- label: "reset form",
2441
- onConfirm: () => S(!1)
2442
- })]
2443
- })
2444
- ]
2445
- })]
2446
- }), /* @__PURE__ */ O(e, {
2447
- title: "danger zone",
2448
- children: [/* @__PURE__ */ D("p", {
2449
- className: "mono",
2450
- children: "deleting this collective removes the governance settings and member roster."
2451
- }), /* @__PURE__ */ D(p, {
2452
- label: "delete collective",
2453
- confirmLabel: "delete",
2454
- onConfirm: () => S(!1)
2455
- })]
2456
- })]
2457
- }), /* @__PURE__ */ D("aside", {
2458
- className: "sidebar cmg-d-rail",
2459
- "aria-label": "settings sidebar",
2460
- children: /* @__PURE__ */ D("div", {
2461
- style: {
2462
- overflow: "auto",
2463
- maxWidth: "100%"
2464
- },
2465
- children: /* @__PURE__ */ D(f, {
2466
- title: "members",
2467
- roles: ["member", "contributor"],
2468
- members: [
2469
- {
2470
- id: "alice-dev",
2471
- handle: "@alice-dev",
2472
- name: "Alice Developer",
2473
- role: "owner",
2474
- owner: !0
2475
- },
2476
- {
2477
- id: "bob-ai",
2478
- handle: "@bob-ai",
2479
- name: "Bob AI",
2480
- role: "member",
2481
- owner: !1
2482
- },
2483
- {
2484
- id: "charlie-ml",
2485
- handle: "@charlie-ml",
2486
- name: "Charlie ML",
2487
- role: "contributor",
2488
- owner: !1
2489
- }
2490
- ]
2491
- })
2492
- })
2493
- })]
2494
- })
2495
- ]
2496
- })
2497
- });
2498
- }
2499
- var Ge = [
2500
- {
2501
- id: "village",
2502
- name: "village",
2503
- branch: "fix/auth-middleware",
2504
- transcripts: [{
2505
- id: "v1",
2506
- provider: "claude-code",
2507
- title: "Debugging auth middleware with Claude Code",
2508
- date: "Jun 15",
2509
- visibility: "public"
2510
- }, {
2511
- id: "v2",
2512
- provider: "claude-code",
2513
- title: "Add OAuth provider split-button",
2514
- date: "Jun 11",
2515
- visibility: "private"
2516
- }]
2517
- },
2518
- {
2519
- id: "api-server",
2520
- name: "api-server",
2521
- branch: "perf/query-optimization",
2522
- transcripts: [{
2523
- id: "a1",
2524
- provider: "gemini-cli",
2525
- title: "Optimizing N+1 query issues using Gemini CLI",
2526
- date: "Jun 14",
2527
- visibility: "private"
2528
- }, {
2529
- id: "a2",
2530
- provider: "gemini-cli",
2531
- title: "Index audit on the events table",
2532
- date: "Jun 09",
2533
- visibility: "public"
2534
- }]
2535
- },
2536
- {
2537
- id: "frontend-app",
2538
- name: "frontend-app",
2539
- branch: "main",
2540
- transcripts: [{
2541
- id: "f1",
2542
- provider: "opencode",
2543
- title: "Greenfield React app setup",
2544
- date: "Jun 12",
2545
- visibility: "private"
2546
- }]
2547
- }
2548
- ], Ke = {
2549
- name: "AI Research Team",
2550
- members: 12
2551
- };
2552
- function qe() {
2553
- let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [r, i] = T(() => new Set(Ge.map((e) => e.id))), [a, o] = T(!1), s = C(() => {
2554
- let e = {};
2555
- return Ge.forEach((t) => t.transcripts.forEach((n) => e[n.id] = {
2556
- ...n,
2557
- project: t.name
2558
- })), e;
2559
- }, []);
2560
- function c(e) {
2561
- t((t) => {
2562
- let n = new Set(t);
2563
- return n.has(e) ? n.delete(e) : n.add(e), n;
2564
- });
2565
- }
2566
- function l(t) {
2567
- let n = t.transcripts.map((e) => e.id), r = n.filter((t) => e.has(t)).length;
2568
- return r === 0 ? "none" : r === n.length ? "all" : "some";
2569
- }
2570
- function u(e) {
2571
- let n = l(e);
2572
- t((t) => {
2573
- let r = new Set(t);
2574
- return e.transcripts.forEach((e) => n === "all" ? r.delete(e.id) : r.add(e.id)), r;
2575
- });
2576
- }
2577
- function d(e) {
2578
- i((t) => {
2579
- let n = new Set(t);
2580
- return n.has(e) ? n.delete(e) : n.add(e), n;
2581
- });
2582
- }
2583
- let f = [...e].map((e) => s[e]).filter(Boolean), p = f.filter((e) => e.visibility === "private").length;
2584
- return /* @__PURE__ */ O("div", {
2585
- className: "cmg-root",
2586
- children: [/* @__PURE__ */ O("div", {
2587
- className: "cmg-page",
2588
- children: [
2589
- /* @__PURE__ */ O("div", {
2590
- className: "crumb cmg-crumb",
2591
- children: [
2592
- "village ",
2593
- /* @__PURE__ */ D(N, {
2594
- size: 13,
2595
- "aria-hidden": "true"
2596
- }),
2597
- " AI Research Team ",
2598
- /* @__PURE__ */ D(N, {
2599
- size: 13,
2600
- "aria-hidden": "true"
2601
- }),
2602
- " ",
2603
- /* @__PURE__ */ D("span", {
2604
- className: "cur",
2605
- children: "contribute"
2606
- })
2607
- ]
2608
- }),
2609
- /* @__PURE__ */ D("header", {
2610
- className: "cmg-head",
2611
- children: /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
2612
- className: "cmg-title",
2613
- children: "contribute to AI Research Team"
2614
- }), /* @__PURE__ */ D("p", {
2615
- className: "cmg-deck",
2616
- children: "select your own transcripts to share with this collective."
2617
- })] })
2618
- }),
2619
- /* @__PURE__ */ D("section", {
2620
- className: "card cmg-contribute",
2621
- "aria-label": "your transcripts by project",
2622
- children: Ge.map((t) => {
2623
- let n = l(t), i = r.has(t.id);
2624
- return /* @__PURE__ */ O("div", {
2625
- className: "cmg-proj",
2626
- children: [/* @__PURE__ */ O("div", {
2627
- className: "cmg-proj-head",
2628
- children: [/* @__PURE__ */ D("label", {
2629
- className: "check cmg-proj-check",
2630
- children: /* @__PURE__ */ D("input", {
2631
- type: "checkbox",
2632
- className: "check-box",
2633
- checked: n === "all",
2634
- ref: (e) => e && (e.indeterminate = n === "some"),
2635
- onChange: () => u(t),
2636
- "aria-label": `select all in ${t.name}`
2637
- })
2638
- }), /* @__PURE__ */ O("button", {
2639
- type: "button",
2640
- className: "cmg-proj-toggle",
2641
- "aria-expanded": i,
2642
- onClick: () => d(t.id),
2643
- children: [
2644
- D(i ? M : N, {
2645
- size: 15,
2646
- "aria-hidden": "true"
2647
- }),
2648
- /* @__PURE__ */ D("span", {
2649
- className: "cmg-proj-name mono",
2650
- children: t.name
2651
- }),
2652
- /* @__PURE__ */ O("span", {
2653
- className: "cmg-proj-branch mono",
2654
- children: [
2655
- /* @__PURE__ */ D(H, {
2656
- size: 12,
2657
- "aria-hidden": "true"
2658
- }),
2659
- " ",
2660
- t.branch
2661
- ]
2662
- }),
2663
- /* @__PURE__ */ D("span", {
2664
- className: "cmg-proj-cnt mono tnum",
2665
- children: t.transcripts.length
2666
- })
2667
- ]
2668
- })]
2669
- }), i && /* @__PURE__ */ D("ul", {
2670
- className: "cmg-tx-list",
2671
- children: t.transcripts.map((t) => /* @__PURE__ */ O("li", {
2672
- className: "cmg-tx-row",
2673
- children: [
2674
- /* @__PURE__ */ D("label", {
2675
- className: "check cmg-tx-check",
2676
- children: /* @__PURE__ */ D("input", {
2677
- type: "checkbox",
2678
- className: "check-box",
2679
- checked: e.has(t.id),
2680
- onChange: () => c(t.id),
2681
- "aria-label": `select ${t.title}`
2682
- })
2683
- }),
2684
- /* @__PURE__ */ D("span", {
2685
- className: "cmg-pub-prov",
2686
- children: /* @__PURE__ */ D(ProviderMark, { id: t.provider })
2687
- }),
2688
- /* @__PURE__ */ D("span", {
2689
- className: "cmg-tx-title",
2690
- children: t.title
2691
- }),
2692
- /* @__PURE__ */ D(ke, { v: t.visibility }),
2693
- /* @__PURE__ */ D("span", {
2694
- className: "cmg-tx-date mono tnum",
2695
- children: t.date
2696
- }),
2697
- /* @__PURE__ */ D("button", {
2698
- type: "button",
2699
- className: "btn btn-sm btn-icon btn-ghost",
2700
- "aria-label": `preview ${t.title}`,
2701
- children: /* @__PURE__ */ D(L, {
2702
- size: 14,
2703
- "aria-hidden": "true"
2704
- })
2705
- })
2706
- ]
2707
- }, t.id))
2708
- })]
2709
- }, t.id);
2710
- })
2711
- }),
2712
- /* @__PURE__ */ O("div", {
2713
- className: "cmg-contribute-foot",
2714
- children: [/* @__PURE__ */ O("span", {
2715
- className: "cmg-sel-count mono",
2716
- children: [
2717
- /* @__PURE__ */ D("span", {
2718
- className: "tnum",
2719
- children: e.size
2720
- }),
2721
- " selected",
2722
- p > 0 ? /* @__PURE__ */ O("span", {
2723
- className: "cmg-sel-warn",
2724
- children: [
2725
- " · ",
2726
- /* @__PURE__ */ D("span", {
2727
- className: "tnum",
2728
- children: p
2729
- }),
2730
- " private"
2731
- ]
2732
- }) : null
2733
- ]
2734
- }), /* @__PURE__ */ O("button", {
2735
- type: "button",
2736
- className: "btn btn-sm btn-primary",
2737
- disabled: e.size === 0,
2738
- onClick: () => o(!0),
2739
- children: [
2740
- /* @__PURE__ */ D(ie, {
2741
- size: 14,
2742
- "aria-hidden": "true"
2743
- }),
2744
- " contribute ",
2745
- e.size,
2746
- " transcript",
2747
- e.size === 1 ? "" : "s"
2748
- ]
2749
- })]
2750
- })
2751
- ]
2752
- }), /* @__PURE__ */ D(n, {
2753
- open: a,
2754
- title: /* @__PURE__ */ O(E, { children: [
1544
+ }), /* @__PURE__ */ A(s, {
1545
+ open: i,
1546
+ title: /* @__PURE__ */ j(k, { children: [
2755
1547
  "make ",
2756
1548
  p > 1 ? "these" : "this",
2757
1549
  " visible?"
2758
1550
  ] }),
2759
- intro: p > 0 ? /* @__PURE__ */ O("p", { children: [
2760
- /* @__PURE__ */ D("span", {
1551
+ intro: p > 0 ? /* @__PURE__ */ j("p", { children: [
1552
+ /* @__PURE__ */ A("span", {
2761
1553
  className: "tnum",
2762
1554
  children: p
2763
1555
  }),
2764
1556
  " private transcript",
2765
1557
  p === 1 ? "" : "s",
2766
1558
  " will become visible to members of ",
2767
- /* @__PURE__ */ D("b", { children: Ke.name }),
1559
+ /* @__PURE__ */ A("b", { children: Fe.name }),
2768
1560
  ". visibility will change from private to shared."
2769
- ] }) : /* @__PURE__ */ O("p", { children: [
1561
+ ] }) : /* @__PURE__ */ j("p", { children: [
2770
1562
  "contributing ",
2771
1563
  e.size,
2772
1564
  " already-visible transcript",
@@ -2774,36 +1566,36 @@ function qe() {
2774
1566
  ". no visibility change."
2775
1567
  ] }),
2776
1568
  axes: [{
2777
- icon: R,
1569
+ icon: B,
2778
1570
  key: "visibility",
2779
1571
  value: p > 0 ? "private → shared" : "unchanged",
2780
1572
  scope: p > 0 ? `${p} transcript${p === 1 ? "" : "s"} newly exposed` : "no visibility change",
2781
1573
  tone: p > 0 ? "reveal" : "open"
2782
1574
  }, {
2783
- icon: X,
1575
+ icon: Q,
2784
1576
  key: "shared with",
2785
- value: Ke.name,
2786
- scope: `${Ke.members} members can see it`,
1577
+ value: Fe.name,
1578
+ scope: `${Fe.members} members can see it`,
2787
1579
  tone: "open"
2788
1580
  }],
2789
1581
  requireConsent: p > 0,
2790
1582
  confirmLabel: p > 0 ? "contribute & make visible" : "contribute",
2791
- confirmIcon: A,
2792
- onCancel: () => o(!1),
2793
- onConfirm: () => o(!1),
2794
- children: /* @__PURE__ */ O("ul", {
1583
+ confirmIcon: M,
1584
+ onCancel: () => a(!1),
1585
+ onConfirm: () => a(!1),
1586
+ children: /* @__PURE__ */ j("ul", {
2795
1587
  className: "cmg-confirm-list",
2796
- children: [f.slice(0, 5).map((e) => /* @__PURE__ */ O("li", {
1588
+ children: [f.slice(0, 5).map((e) => /* @__PURE__ */ j("li", {
2797
1589
  className: "cmg-confirm-tx",
2798
1590
  children: [
2799
- /* @__PURE__ */ D(ProviderMark, { id: e.provider }),
2800
- /* @__PURE__ */ D("span", {
1591
+ /* @__PURE__ */ A(ProviderMark, { id: e.provider }),
1592
+ /* @__PURE__ */ A("span", {
2801
1593
  className: "cmg-confirm-title",
2802
1594
  children: e.title
2803
1595
  }),
2804
- /* @__PURE__ */ D(ke, { v: e.visibility })
1596
+ /* @__PURE__ */ A(Me, { v: e.visibility })
2805
1597
  ]
2806
- }, e.id)), f.length > 5 ? /* @__PURE__ */ O("li", {
1598
+ }, e.id)), f.length > 5 ? /* @__PURE__ */ j("li", {
2807
1599
  className: "cmg-confirm-more mono",
2808
1600
  children: [
2809
1601
  "…and ",
@@ -2816,8 +1608,888 @@ function qe() {
2816
1608
  });
2817
1609
  }
2818
1610
  //#endregion
1611
+ //#region src/ui/commons/Collectives.jsx
1612
+ var Le = Object.freeze([
1613
+ {
1614
+ value: "open",
1615
+ label: "open",
1616
+ help: "anyone can join and publish. transcripts are approved automatically."
1617
+ },
1618
+ {
1619
+ value: "verified_only",
1620
+ label: "verified only",
1621
+ help: "only members of the linked github org can join and publish."
1622
+ },
1623
+ {
1624
+ value: "curated",
1625
+ label: "curated",
1626
+ help: "the owner approves each transcript before it appears."
1627
+ }
1628
+ ]), Re = Object.freeze([{
1629
+ value: "members_only",
1630
+ label: "members only"
1631
+ }, {
1632
+ value: "contributors",
1633
+ label: "members and contributors"
1634
+ }]), ze = {
1635
+ open: "open",
1636
+ verified_only: "verified only",
1637
+ curated: "curated"
1638
+ }, Be = (e) => String(e).replace(/-/g, " ");
1639
+ function Ve({ href: e, onOpen: t, className: n, children: r }) {
1640
+ return e ? /* @__PURE__ */ A("a", {
1641
+ className: n,
1642
+ href: e,
1643
+ onClick: (e) => {
1644
+ !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), t());
1645
+ },
1646
+ children: r
1647
+ }) : t ? /* @__PURE__ */ A("button", {
1648
+ type: "button",
1649
+ className: `${n} cmg-link-button`,
1650
+ onClick: t,
1651
+ children: r
1652
+ }) : /* @__PURE__ */ A("span", {
1653
+ className: n,
1654
+ children: r
1655
+ });
1656
+ }
1657
+ function He(e, t, n) {
1658
+ return e.map((e) => /* @__PURE__ */ A(Ve, {
1659
+ className: "cmg-pr-link tnum",
1660
+ href: n?.("pull-request", e),
1661
+ onOpen: t ? () => t(e) : void 0,
1662
+ children: e
1663
+ }, e));
1664
+ }
1665
+ function Ue({ data: e = {}, actions: t = {} } = {}) {
1666
+ let { collectives: r = [], linkedOrgs: i = [], title: a = "collectives", deck: o = "a collective is a group that can read the transcripts its members publish to it. link your repositories so pull requests find them.", crumb: s, caption: l = "collectives", createLabel: u = "new collective", createBusy: d = !1, whoCanPublish: p = Le, whoCanRead: m = Re } = e, { onCreateCollective: h, onOpenCollective: g, onSearchCollectives: v } = t, [y, b] = O(!1), [x, S] = O(""), [C, w] = O(""), [E, D] = O(p[0]?.value ?? ""), [k, M] = O(m[0]?.value ?? ""), [N, P] = O(""), [F, I] = O(""), L = T(), R = [
1667
+ {
1668
+ key: "name",
1669
+ label: "name",
1670
+ render: (e, t) => /* @__PURE__ */ j("span", {
1671
+ className: "cmg-cell-stack",
1672
+ children: [/* @__PURE__ */ A("button", {
1673
+ type: "button",
1674
+ className: "cmg-table-link",
1675
+ onClick: () => g?.(t.id),
1676
+ children: t.name
1677
+ }), t.desc ? /* @__PURE__ */ A("span", {
1678
+ className: "cmg-cell-desc",
1679
+ children: t.desc
1680
+ }) : null]
1681
+ })
1682
+ },
1683
+ {
1684
+ key: "role",
1685
+ label: "your role",
1686
+ render: (e, t) => /* @__PURE__ */ j("span", {
1687
+ className: "cmg-cell-stack",
1688
+ children: [/* @__PURE__ */ A("span", { children: e }), t.since ? /* @__PURE__ */ A("span", {
1689
+ className: "cmg-cell-sub",
1690
+ children: t.since
1691
+ }) : null]
1692
+ })
1693
+ },
1694
+ {
1695
+ key: "members",
1696
+ label: "members",
1697
+ align: "right"
1698
+ },
1699
+ {
1700
+ key: "transcripts",
1701
+ label: "transcripts",
1702
+ align: "right",
1703
+ render: (e) => typeof e == "number" ? e.toLocaleString("en-US") : e
1704
+ },
1705
+ ...r.some((e) => e.org !== void 0) ? [{
1706
+ key: "org",
1707
+ label: "github org",
1708
+ render: (e, t) => t.org ? /* @__PURE__ */ j("span", {
1709
+ className: "mono",
1710
+ children: [t.org, t.repos ? ` · ${t.repos} open` : ""]
1711
+ }) : /* @__PURE__ */ A("span", {
1712
+ className: "cmg-none",
1713
+ children: "nothing linked"
1714
+ })
1715
+ }] : [],
1716
+ {
1717
+ key: "mode",
1718
+ label: "joining",
1719
+ render: (e) => ze[e] ?? e
1720
+ }
1721
+ ];
1722
+ return /* @__PURE__ */ j("div", {
1723
+ className: "iu-page",
1724
+ children: [
1725
+ s ? /* @__PURE__ */ A("div", {
1726
+ className: "cmg-crumb",
1727
+ children: /* @__PURE__ */ A(n, { items: [{ label: s }] })
1728
+ }) : null,
1729
+ /* @__PURE__ */ j("header", {
1730
+ className: "iu-page-head",
1731
+ children: [/* @__PURE__ */ j("div", {
1732
+ className: "iu-page-titlerow",
1733
+ children: [/* @__PURE__ */ A("h2", {
1734
+ className: "iu-page-title",
1735
+ children: a
1736
+ }), /* @__PURE__ */ j("button", {
1737
+ type: "button",
1738
+ className: "btn btn-sm " + (y ? "btn-secondary" : "btn-primary"),
1739
+ "aria-expanded": y,
1740
+ onClick: () => b((e) => !e),
1741
+ children: [
1742
+ /* @__PURE__ */ A(J, {
1743
+ size: 14,
1744
+ "aria-hidden": "true"
1745
+ }),
1746
+ " ",
1747
+ y ? "close" : u
1748
+ ]
1749
+ })]
1750
+ }), o ? /* @__PURE__ */ A("p", {
1751
+ className: "iu-page-sub",
1752
+ children: o
1753
+ }) : null]
1754
+ }),
1755
+ y && /* @__PURE__ */ j("section", {
1756
+ className: "cmg-form card",
1757
+ "aria-labelledby": `${L}-form`,
1758
+ children: [
1759
+ /* @__PURE__ */ A("h3", {
1760
+ id: `${L}-form`,
1761
+ className: "cmg-sub",
1762
+ children: "create a collective"
1763
+ }),
1764
+ /* @__PURE__ */ j("div", {
1765
+ className: "cmg-form-grid",
1766
+ children: [
1767
+ /* @__PURE__ */ j("label", {
1768
+ className: "cmg-field",
1769
+ children: [/* @__PURE__ */ A("span", {
1770
+ className: "label",
1771
+ children: "name"
1772
+ }), /* @__PURE__ */ A("input", {
1773
+ className: "input",
1774
+ type: "text",
1775
+ value: x,
1776
+ onChange: (e) => S(e.target.value)
1777
+ })]
1778
+ }),
1779
+ /* @__PURE__ */ j("label", {
1780
+ className: "cmg-field cmg-field-wide",
1781
+ children: [/* @__PURE__ */ A("span", {
1782
+ className: "label",
1783
+ children: "purpose"
1784
+ }), /* @__PURE__ */ A("textarea", {
1785
+ className: "input",
1786
+ rows: 2,
1787
+ value: C,
1788
+ onChange: (e) => w(e.target.value)
1789
+ })]
1790
+ }),
1791
+ /* @__PURE__ */ A("div", {
1792
+ className: "cmg-field",
1793
+ children: /* @__PURE__ */ A(c, {
1794
+ variant: "select",
1795
+ label: "who can publish",
1796
+ name: "who-can-publish",
1797
+ value: E,
1798
+ onChange: D,
1799
+ options: p.map((e) => ({
1800
+ ...e,
1801
+ rationale: e.help
1802
+ }))
1803
+ })
1804
+ }),
1805
+ /* @__PURE__ */ A("div", {
1806
+ className: "cmg-field",
1807
+ children: /* @__PURE__ */ A(c, {
1808
+ variant: "select",
1809
+ label: "who can read",
1810
+ name: "who-can-read",
1811
+ value: k,
1812
+ onChange: M,
1813
+ options: m
1814
+ })
1815
+ }),
1816
+ /* @__PURE__ */ j("label", {
1817
+ className: "cmg-field",
1818
+ children: [/* @__PURE__ */ A("span", {
1819
+ className: "label",
1820
+ children: "github org (optional)"
1821
+ }), /* @__PURE__ */ A("span", {
1822
+ className: "select-wrap",
1823
+ children: /* @__PURE__ */ j("select", {
1824
+ className: "select",
1825
+ value: N,
1826
+ onChange: (e) => P(e.target.value),
1827
+ children: [/* @__PURE__ */ A("option", {
1828
+ value: "",
1829
+ children: "not linked"
1830
+ }), i.map((e) => /* @__PURE__ */ A("option", {
1831
+ value: e,
1832
+ children: e
1833
+ }, e))]
1834
+ })
1835
+ })]
1836
+ })
1837
+ ]
1838
+ }),
1839
+ /* @__PURE__ */ j("div", {
1840
+ className: "cmg-form-foot",
1841
+ children: [/* @__PURE__ */ A("button", {
1842
+ type: "button",
1843
+ className: "btn btn-sm btn-primary",
1844
+ disabled: !x.trim() || d,
1845
+ "aria-describedby": L,
1846
+ onClick: () => h?.({
1847
+ name: x,
1848
+ purpose: C,
1849
+ mode: E,
1850
+ access: k,
1851
+ org: N
1852
+ }),
1853
+ children: d ? "creating" : "create collective"
1854
+ }), /* @__PURE__ */ A("span", {
1855
+ id: L,
1856
+ className: "cmg-form-hint mono",
1857
+ children: p.find((e) => e.value === E)?.help
1858
+ })]
1859
+ })
1860
+ ]
1861
+ }),
1862
+ /* @__PURE__ */ j("div", {
1863
+ className: "cmg-section",
1864
+ children: [/* @__PURE__ */ A(f, {
1865
+ caption: `${l} ${r.length}`,
1866
+ columns: R,
1867
+ rows: r,
1868
+ rowKey: (e) => e.id
1869
+ }), r.some((e) => e.mode === "curated") ? /* @__PURE__ */ A("p", {
1870
+ className: "cmg-note",
1871
+ children: "in a curated collective, each transcript you publish waits for the owner to approve it."
1872
+ }) : null]
1873
+ }),
1874
+ v && /* @__PURE__ */ j("section", {
1875
+ className: "cmg-section",
1876
+ "aria-labelledby": `${L}-find`,
1877
+ children: [
1878
+ /* @__PURE__ */ A("h3", {
1879
+ className: "cmg-section-title",
1880
+ id: `${L}-find`,
1881
+ children: "find a collective"
1882
+ }),
1883
+ /* @__PURE__ */ A("p", {
1884
+ className: "cmg-note",
1885
+ children: "search by collective name or github org."
1886
+ }),
1887
+ /* @__PURE__ */ j("form", {
1888
+ className: "cmg-find",
1889
+ role: "search",
1890
+ onSubmit: (e) => {
1891
+ e.preventDefault(), v(F);
1892
+ },
1893
+ children: [/* @__PURE__ */ A(_, {
1894
+ label: "collective or github org",
1895
+ type: "search",
1896
+ iconLeft: re,
1897
+ placeholder: "collective name or github org",
1898
+ value: F,
1899
+ onChange: (e) => I(e.target.value)
1900
+ }), /* @__PURE__ */ A("button", {
1901
+ type: "submit",
1902
+ className: "btn btn-secondary",
1903
+ children: "search"
1904
+ })]
1905
+ })
1906
+ ]
1907
+ })
1908
+ ]
1909
+ });
1910
+ }
1911
+ function We({ members: e, count: t }) {
1912
+ let n = e.slice(0, 2).map((e) => e.handle), r = t - n.length;
1913
+ return n.length === 0 ? null : /* @__PURE__ */ j("span", {
1914
+ className: "cmg-members-text",
1915
+ children: [n.join(", "), r > 0 ? ` and ${r} others` : ""]
1916
+ });
1917
+ }
1918
+ function Ge(e = {}) {
1919
+ let t = typeof e.linkedGithubOrg == "string" && e.linkedGithubOrg ? { login: e.linkedGithubOrg.replace(/^@/, "") } : void 0;
1920
+ return {
1921
+ ...e,
1922
+ name: e.name ?? "",
1923
+ purpose: e.purpose ?? e.description ?? void 0,
1924
+ stats: e.stats ?? [],
1925
+ transcripts: e.transcripts ?? [],
1926
+ members: e.members ?? [],
1927
+ memberCount: e.memberCount ?? e.members?.length,
1928
+ org: e.org === void 0 ? t : e.org
1929
+ };
1930
+ }
1931
+ function Ke({ data: t = {}, actions: r = {} } = {}) {
1932
+ let { owners: i = [], linkedRepos: a = [], hrefFor: o } = t, s = Ge(t.collective), { onSettings: c, onContribute: l, onReview: u, onOpenTranscript: m, onOpenPullRequest: g, onLinkRepos: _, onShowMore: v } = r, [y, b] = O(!1), x = T(), S = s.transcriptCount ?? s.transcripts.length, w = [
1933
+ {
1934
+ key: "title",
1935
+ label: "title",
1936
+ width: "18rem",
1937
+ render: (e, t) => /* @__PURE__ */ j("span", {
1938
+ className: "iu-session",
1939
+ children: [/* @__PURE__ */ A(C, {
1940
+ harness: t.harness,
1941
+ accent: !0
1942
+ }), /* @__PURE__ */ j("span", {
1943
+ className: "iu-session-text",
1944
+ children: [/* @__PURE__ */ A(Ve, {
1945
+ className: "iu-session-title",
1946
+ href: o?.("transcript", t.id),
1947
+ onOpen: m ? () => m(t.id) : void 0,
1948
+ children: t.title
1949
+ }), /* @__PURE__ */ j("span", {
1950
+ className: "iu-session-sub",
1951
+ children: [Be(t.harness), typeof t.turns == "number" ? /* @__PURE__ */ j(k, { children: [
1952
+ " · ",
1953
+ /* @__PURE__ */ A("span", {
1954
+ className: "tnum",
1955
+ children: t.turns
1956
+ }),
1957
+ " turns"
1958
+ ] }) : null]
1959
+ })]
1960
+ })]
1961
+ })
1962
+ },
1963
+ {
1964
+ key: "author",
1965
+ label: "author",
1966
+ render: (e) => /* @__PURE__ */ A("span", {
1967
+ className: "mono",
1968
+ children: e
1969
+ })
1970
+ },
1971
+ {
1972
+ key: "pullRequests",
1973
+ label: "pull requests",
1974
+ render: (e, t) => t.pullRequests?.length ? /* @__PURE__ */ j("span", {
1975
+ className: "cmg-prs",
1976
+ children: [/* @__PURE__ */ A(p, {
1977
+ items: He(t.pullRequests, g, o),
1978
+ label: "pull requests",
1979
+ noun: ["pull request", "pull requests"]
1980
+ }), t.repo && /* @__PURE__ */ A("span", {
1981
+ className: "cmg-none mono",
1982
+ children: t.repo
1983
+ })]
1984
+ }) : /* @__PURE__ */ A("span", {
1985
+ className: "cmg-none",
1986
+ children: "not linked"
1987
+ })
1988
+ },
1989
+ {
1990
+ key: "when",
1991
+ label: "when"
1992
+ }
1993
+ ], E = [
1994
+ {
1995
+ key: "read",
1996
+ title: "who can read",
1997
+ text: s.whoCanRead
1998
+ },
1999
+ {
2000
+ key: "publish",
2001
+ title: "who can publish",
2002
+ text: s.whoCanPublish
2003
+ },
2004
+ {
2005
+ key: "role",
2006
+ title: "your role",
2007
+ text: s.yourRole
2008
+ }
2009
+ ].filter((e) => e.text);
2010
+ return /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("div", {
2011
+ className: "iu-page",
2012
+ children: [
2013
+ /* @__PURE__ */ A("div", {
2014
+ className: "cmg-crumb-content",
2015
+ children: /* @__PURE__ */ A(n, { items: [{
2016
+ label: "collectives",
2017
+ href: o?.("collectives")
2018
+ }, { label: s.name }] })
2019
+ }),
2020
+ /* @__PURE__ */ j("header", {
2021
+ className: "iu-page-head",
2022
+ children: [/* @__PURE__ */ j("div", {
2023
+ className: "iu-page-titlerow",
2024
+ children: [/* @__PURE__ */ A("h2", {
2025
+ className: "iu-page-title iu-page-title-content",
2026
+ id: x,
2027
+ children: s.name
2028
+ }), /* @__PURE__ */ j("span", {
2029
+ className: "cmg-actions",
2030
+ children: [s.role === "owner" && c && /* @__PURE__ */ j("button", {
2031
+ type: "button",
2032
+ className: "btn btn-secondary btn-sm",
2033
+ onClick: () => c(),
2034
+ children: [/* @__PURE__ */ A(Y, {
2035
+ size: 14,
2036
+ "aria-hidden": "true"
2037
+ }), " settings"]
2038
+ }), (l || u) && /* @__PURE__ */ A(e, {
2039
+ icon: q,
2040
+ ariaLabel: "more",
2041
+ size: "sm",
2042
+ align: "end",
2043
+ items: [...l ? [{
2044
+ label: "publish several transcripts",
2045
+ icon: X,
2046
+ onSelect: () => l()
2047
+ }] : [], ...u ? [{
2048
+ label: "review transcripts",
2049
+ icon: I,
2050
+ onSelect: () => u()
2051
+ }] : []]
2052
+ })]
2053
+ })]
2054
+ }), s.purpose ? /* @__PURE__ */ A("p", {
2055
+ className: "iu-page-sub",
2056
+ children: s.purpose
2057
+ }) : null]
2058
+ }),
2059
+ E.length > 0 && /* @__PURE__ */ A("ul", {
2060
+ className: "cmg-policies",
2061
+ "aria-label": "how this collective works",
2062
+ children: E.map((e) => /* @__PURE__ */ j("li", {
2063
+ className: "cmg-policy",
2064
+ children: [/* @__PURE__ */ A("h3", {
2065
+ className: "cmg-policy-title",
2066
+ children: e.title
2067
+ }), /* @__PURE__ */ A("p", {
2068
+ className: "cmg-policy-text",
2069
+ children: e.text
2070
+ })]
2071
+ }, e.key))
2072
+ }),
2073
+ /* @__PURE__ */ A(d, {
2074
+ items: s.stats,
2075
+ label: `${s.name} in numbers`
2076
+ }),
2077
+ /* @__PURE__ */ j("div", {
2078
+ className: "cmg-home",
2079
+ children: [/* @__PURE__ */ j("div", {
2080
+ className: "cmg-home-main",
2081
+ children: [/* @__PURE__ */ A(f, {
2082
+ caption: `transcripts ${S}`,
2083
+ columns: w,
2084
+ rows: s.transcripts,
2085
+ rowKey: (e) => e.id
2086
+ }), S > s.transcripts.length && /* @__PURE__ */ j("div", {
2087
+ className: "iu-page-foot",
2088
+ children: [/* @__PURE__ */ j("span", {
2089
+ className: "iu-page-count",
2090
+ children: [
2091
+ "showing ",
2092
+ /* @__PURE__ */ A("span", {
2093
+ className: "tnum",
2094
+ children: s.transcripts.length
2095
+ }),
2096
+ " of ",
2097
+ /* @__PURE__ */ A("span", {
2098
+ className: "tnum",
2099
+ children: S
2100
+ })
2101
+ ]
2102
+ }), v && /* @__PURE__ */ A("button", {
2103
+ type: "button",
2104
+ className: "btn btn-secondary btn-sm",
2105
+ onClick: () => v(),
2106
+ children: "show more"
2107
+ })]
2108
+ })]
2109
+ }), /* @__PURE__ */ j("aside", {
2110
+ className: "cmg-rail",
2111
+ "aria-label": "github orgs and members",
2112
+ children: [/* @__PURE__ */ j("section", {
2113
+ className: "cmg-rail-box",
2114
+ children: [
2115
+ /* @__PURE__ */ A("h3", {
2116
+ className: "cmg-rail-title",
2117
+ children: "github orgs"
2118
+ }),
2119
+ s.org ? /* @__PURE__ */ j("p", {
2120
+ className: "cmg-rail-line",
2121
+ children: [
2122
+ /* @__PURE__ */ A(U, { "aria-hidden": "true" }),
2123
+ " ",
2124
+ /* @__PURE__ */ A("span", {
2125
+ className: "mono",
2126
+ children: s.org.login
2127
+ }),
2128
+ typeof s.org.total == "number" ? /* @__PURE__ */ j(k, { children: [
2129
+ " · ",
2130
+ /* @__PURE__ */ A("span", {
2131
+ className: "tnum",
2132
+ children: s.org.linked ?? 0
2133
+ }),
2134
+ " of ",
2135
+ /* @__PURE__ */ A("span", {
2136
+ className: "tnum",
2137
+ children: s.org.total
2138
+ }),
2139
+ " repos linked"
2140
+ ] }) : null,
2141
+ s.role === "owner" && _ && /* @__PURE__ */ A("button", {
2142
+ type: "button",
2143
+ className: "btn btn-ghost btn-sm",
2144
+ onClick: () => b(!0),
2145
+ children: "manage"
2146
+ })
2147
+ ]
2148
+ }) : s.org === null ? /* @__PURE__ */ A("p", {
2149
+ className: "cmg-rail-line cmg-none",
2150
+ children: "nothing linked"
2151
+ }) : null,
2152
+ /* @__PURE__ */ A("p", {
2153
+ className: "cmg-note",
2154
+ children: "a collective links one github org today."
2155
+ })
2156
+ ]
2157
+ }), /* @__PURE__ */ j("section", {
2158
+ className: "cmg-rail-box",
2159
+ children: [
2160
+ /* @__PURE__ */ j("h3", {
2161
+ className: "cmg-rail-title",
2162
+ children: ["members", typeof s.memberCount == "number" ? /* @__PURE__ */ j(k, { children: [" ", /* @__PURE__ */ A("span", {
2163
+ className: "tnum cmg-count",
2164
+ children: s.memberCount
2165
+ })] }) : null]
2166
+ }),
2167
+ s.memberBreakdown ? /* @__PURE__ */ A("p", {
2168
+ className: "cmg-note",
2169
+ children: s.memberBreakdown
2170
+ }) : null,
2171
+ /* @__PURE__ */ A(We, {
2172
+ members: s.members,
2173
+ count: s.memberCount ?? s.members.length
2174
+ })
2175
+ ]
2176
+ })]
2177
+ })]
2178
+ })
2179
+ ]
2180
+ }), _ && /* @__PURE__ */ A(h, {
2181
+ open: y,
2182
+ onClose: () => b(!1),
2183
+ owners: i,
2184
+ initialSelected: a,
2185
+ title: `link repositories from ${s.org?.login ?? "github"}`,
2186
+ description: `pull requests in linked repos show the transcripts published to ${s.name}.`,
2187
+ onSave: (e) => {
2188
+ _(e), b(!1);
2189
+ }
2190
+ })] });
2191
+ }
2192
+ var qe = Object.freeze([{
2193
+ value: "user_choice",
2194
+ label: "they choose"
2195
+ }, {
2196
+ value: "mandatory",
2197
+ label: "take them out"
2198
+ }]);
2199
+ function Je(e, t) {
2200
+ return t.some((t) => t.value === e) ? t : [{
2201
+ value: "",
2202
+ label: "not set",
2203
+ disabled: !0
2204
+ }, ...t];
2205
+ }
2206
+ var Ye = (e, t) => t.some((t) => t.value === e) ? e : "";
2207
+ function Xe({ data: e = {}, actions: t = {} } = {}) {
2208
+ let { owners: r = [], linkedRepos: i = [], showOnPullRequests: a = !1, whoCanPublish: s = Le, whoCanRead: c = Re, memberLeavesChoices: l = qe, hrefFor: d } = e, f = Ge(e.collective), p = (e) => (n) => t.onCommit ? t.onCommit(e, n) : Promise.resolve(), [g, v] = O(!1), [y, b] = O(""), x = !!(t.onTransferOwnership || t.onDelete), S = [
2209
+ "general",
2210
+ "access",
2211
+ "members",
2212
+ "github orgs",
2213
+ "pull requests",
2214
+ ...x ? ["danger zone"] : []
2215
+ ], C = (e) => `cmg-settings-${e.replace(/ /g, "-")}`, w = (e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "), T = d?.("account");
2216
+ return /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("div", {
2217
+ className: "iu-page cmg-settings",
2218
+ children: [
2219
+ /* @__PURE__ */ A("div", {
2220
+ className: "cmg-crumb-content",
2221
+ children: /* @__PURE__ */ A(n, { items: [
2222
+ {
2223
+ label: "collectives",
2224
+ href: d?.("collectives")
2225
+ },
2226
+ {
2227
+ label: f.name,
2228
+ href: d?.("collective", f.id)
2229
+ },
2230
+ { label: "settings" }
2231
+ ] })
2232
+ }),
2233
+ /* @__PURE__ */ j("header", {
2234
+ className: "iu-page-head",
2235
+ children: [/* @__PURE__ */ j("h2", {
2236
+ className: "iu-page-title",
2237
+ children: [/* @__PURE__ */ A("span", {
2238
+ className: "iu-page-title-content",
2239
+ children: f.name
2240
+ }), " · settings"]
2241
+ }), /* @__PURE__ */ A("p", {
2242
+ className: "iu-page-sub",
2243
+ children: "changes save right away."
2244
+ })]
2245
+ }),
2246
+ /* @__PURE__ */ A("nav", {
2247
+ className: "cmg-settings-nav",
2248
+ "aria-label": "settings sections",
2249
+ children: S.map((e) => /* @__PURE__ */ A("a", {
2250
+ href: `#${C(e)}`,
2251
+ children: e
2252
+ }, e))
2253
+ }),
2254
+ /* @__PURE__ */ j(u, {
2255
+ label: "general",
2256
+ defaultOpen: !0,
2257
+ id: C("general"),
2258
+ children: [/* @__PURE__ */ A(m, {
2259
+ label: "name",
2260
+ control: "text",
2261
+ value: f.name,
2262
+ onCommit: p("name")
2263
+ }), /* @__PURE__ */ A(m, {
2264
+ label: "purpose",
2265
+ control: "text",
2266
+ value: f.purpose ?? "",
2267
+ onCommit: p("purpose")
2268
+ })]
2269
+ }),
2270
+ /* @__PURE__ */ j(u, {
2271
+ label: "access",
2272
+ defaultOpen: !0,
2273
+ id: C("access"),
2274
+ children: [/* @__PURE__ */ A(m, {
2275
+ label: "who can publish",
2276
+ help: w(s),
2277
+ control: "select",
2278
+ value: Ye(f.mode, s),
2279
+ options: Je(f.mode, s),
2280
+ onCommit: p("mode")
2281
+ }), /* @__PURE__ */ A(m, {
2282
+ label: "who can read",
2283
+ help: "members read and publish. contributors publish, and read only if who can read allows it.",
2284
+ control: "select",
2285
+ value: Ye(f.access, c),
2286
+ options: Je(f.access, c),
2287
+ onCommit: p("access")
2288
+ })]
2289
+ }),
2290
+ /* @__PURE__ */ j(u, {
2291
+ label: "members",
2292
+ defaultOpen: !0,
2293
+ count: f.memberCount ?? null,
2294
+ noun: ["member", "members"],
2295
+ id: C("members"),
2296
+ children: [
2297
+ t.onInvite && /* @__PURE__ */ j("form", {
2298
+ className: "srow cmg-invite",
2299
+ onSubmit: (e) => {
2300
+ e.preventDefault(), t.onInvite(y), b("");
2301
+ },
2302
+ children: [/* @__PURE__ */ A(_, {
2303
+ label: "invite by github username",
2304
+ value: y,
2305
+ onChange: (e) => b(e.target.value),
2306
+ placeholder: "github username"
2307
+ }), /* @__PURE__ */ A("button", {
2308
+ type: "submit",
2309
+ className: "btn btn-secondary btn-sm",
2310
+ disabled: !y.trim(),
2311
+ children: "invite"
2312
+ })]
2313
+ }),
2314
+ /* @__PURE__ */ A("ul", {
2315
+ className: "cmg-member-list",
2316
+ "aria-label": "members",
2317
+ children: f.members.map((e) => /* @__PURE__ */ j("li", {
2318
+ className: "cmg-member",
2319
+ children: [
2320
+ /* @__PURE__ */ A(o, {
2321
+ name: e.name ?? e.handle,
2322
+ size: "sm"
2323
+ }),
2324
+ /* @__PURE__ */ j("span", {
2325
+ className: "cmg-member-id",
2326
+ children: [
2327
+ /* @__PURE__ */ A("span", {
2328
+ className: "mono",
2329
+ children: e.handle
2330
+ }),
2331
+ " ",
2332
+ e.name ? /* @__PURE__ */ A("span", {
2333
+ className: "cmg-member-name",
2334
+ children: e.name
2335
+ }) : null
2336
+ ]
2337
+ }),
2338
+ e.role === "owner" ? /* @__PURE__ */ A("span", {
2339
+ className: "cmg-none mono",
2340
+ children: "owner"
2341
+ }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
2342
+ className: "select-wrap cmg-member-role",
2343
+ children: /* @__PURE__ */ j("select", {
2344
+ className: "select",
2345
+ "aria-label": `role for ${e.handle}`,
2346
+ defaultValue: e.role,
2347
+ onChange: (n) => t.onRoleChange?.(e.handle, n.target.value),
2348
+ children: [/* @__PURE__ */ A("option", {
2349
+ value: "member",
2350
+ children: "member"
2351
+ }), /* @__PURE__ */ A("option", {
2352
+ value: "contributor",
2353
+ children: "contributor"
2354
+ })]
2355
+ })
2356
+ }), t.onRemoveMember && /* @__PURE__ */ A("button", {
2357
+ type: "button",
2358
+ className: "btn btn-ghost btn-sm",
2359
+ "aria-label": `remove ${e.handle}`,
2360
+ onClick: () => t.onRemoveMember(e.handle),
2361
+ children: "remove"
2362
+ })] })
2363
+ ]
2364
+ }, e.handle))
2365
+ }),
2366
+ /* @__PURE__ */ A(m, {
2367
+ label: "when a member leaves",
2368
+ help: "what happens to the transcripts they published here.",
2369
+ control: "select",
2370
+ value: Ye(f.memberLeaves, l),
2371
+ options: Je(f.memberLeaves, l),
2372
+ onCommit: p("memberLeaves")
2373
+ })
2374
+ ]
2375
+ }),
2376
+ /* @__PURE__ */ A(u, {
2377
+ label: "github orgs",
2378
+ defaultOpen: !0,
2379
+ count: f.org === void 0 ? null : +!!f.org,
2380
+ noun: ["org", "orgs"],
2381
+ id: C("github orgs"),
2382
+ children: /* @__PURE__ */ j("div", {
2383
+ className: "srow",
2384
+ children: [/* @__PURE__ */ j("span", {
2385
+ className: "srow-text-col",
2386
+ children: [/* @__PURE__ */ A("span", {
2387
+ className: "srow-label",
2388
+ children: f.org ? f.org.login : f.org === null ? "no org linked" : "github org"
2389
+ }), /* @__PURE__ */ j("span", {
2390
+ className: "srow-help",
2391
+ children: [typeof f.org?.total == "number" ? /* @__PURE__ */ j(k, { children: [
2392
+ /* @__PURE__ */ A("span", {
2393
+ className: "tnum",
2394
+ children: f.org.linked ?? 0
2395
+ }),
2396
+ " of ",
2397
+ /* @__PURE__ */ A("span", {
2398
+ className: "tnum",
2399
+ children: f.org.total
2400
+ }),
2401
+ " repos linked. "
2402
+ ] }) : null, "a collective links one github org today."]
2403
+ })]
2404
+ }), t.onLinkRepos && /* @__PURE__ */ A("button", {
2405
+ type: "button",
2406
+ className: "btn btn-secondary btn-sm",
2407
+ onClick: () => v(!0),
2408
+ children: "manage"
2409
+ })]
2410
+ })
2411
+ }),
2412
+ /* @__PURE__ */ j(u, {
2413
+ label: "pull requests",
2414
+ defaultOpen: !0,
2415
+ count: 1,
2416
+ id: C("pull requests"),
2417
+ children: [/* @__PURE__ */ A(m, {
2418
+ label: "show transcripts on pull requests",
2419
+ help: "adds a peasant / prompts comment and check on pull requests in this collective's repos, listing which commits have transcripts. it never blocks merging.",
2420
+ control: "switch",
2421
+ value: a,
2422
+ onCommit: p("showOnPullRequests")
2423
+ }), /* @__PURE__ */ j("p", {
2424
+ className: "srow-note",
2425
+ children: [
2426
+ "automatic linking is now a personal setting, in ",
2427
+ T ? /* @__PURE__ */ A("a", {
2428
+ className: "link",
2429
+ href: T,
2430
+ children: "your settings"
2431
+ }) : "your settings",
2432
+ "."
2433
+ ]
2434
+ })]
2435
+ }),
2436
+ x && /* @__PURE__ */ j(u, {
2437
+ label: "danger zone",
2438
+ defaultOpen: !0,
2439
+ count: null,
2440
+ id: C("danger zone"),
2441
+ children: [t.onTransferOwnership && /* @__PURE__ */ j("div", {
2442
+ className: "srow",
2443
+ children: [/* @__PURE__ */ A("span", {
2444
+ className: "srow-help",
2445
+ children: "give the owner role to another member. you stay on as a member."
2446
+ }), /* @__PURE__ */ A("button", {
2447
+ type: "button",
2448
+ className: "btn btn-secondary btn-sm",
2449
+ onClick: () => t.onTransferOwnership(),
2450
+ children: "transfer ownership"
2451
+ })]
2452
+ }), t.onDelete && /* @__PURE__ */ j("div", {
2453
+ className: "srow",
2454
+ children: [/* @__PURE__ */ j("span", {
2455
+ className: "srow-help",
2456
+ children: [
2457
+ "delete ",
2458
+ f.name,
2459
+ " for ",
2460
+ typeof f.memberCount == "number" ? /* @__PURE__ */ j(k, { children: [
2461
+ "all ",
2462
+ /* @__PURE__ */ A("span", {
2463
+ className: "tnum",
2464
+ children: f.memberCount
2465
+ }),
2466
+ " members"
2467
+ ] }) : "all its members",
2468
+ ". this cannot be undone."
2469
+ ]
2470
+ }), /* @__PURE__ */ A("button", {
2471
+ type: "button",
2472
+ className: "btn btn-danger btn-sm",
2473
+ onClick: () => t.onDelete(),
2474
+ children: "delete collective"
2475
+ })]
2476
+ })]
2477
+ })
2478
+ ]
2479
+ }), t.onLinkRepos && /* @__PURE__ */ A(h, {
2480
+ open: g,
2481
+ onClose: () => v(!1),
2482
+ owners: r,
2483
+ initialSelected: i,
2484
+ title: `link repositories from ${f.org?.login ?? "github"}`,
2485
+ onSave: (e) => {
2486
+ t.onLinkRepos(e), v(!1);
2487
+ }
2488
+ })] });
2489
+ }
2490
+ //#endregion
2819
2491
  //#region src/ui/commons/Manage.jsx
2820
- var Je = {
2492
+ var Ze = {
2821
2493
  name: "",
2822
2494
  description: null,
2823
2495
  linkedGithubOrg: null,
@@ -2825,15 +2497,15 @@ var Je = {
2825
2497
  dataAccess: "",
2826
2498
  role: "",
2827
2499
  memberSince: null
2828
- }, Ye = {
2500
+ }, Qe = {
2829
2501
  transcripts: "0",
2830
2502
  projects: "0 providers",
2831
2503
  tokens: "0",
2832
2504
  turns: "0 turns",
2833
2505
  contributors: "0 members",
2834
2506
  hours: "0 total"
2835
- }, Xe = {
2836
- collective: Je,
2507
+ }, $e = {
2508
+ collective: Ze,
2837
2509
  providerShare: [],
2838
2510
  pendingReview: [],
2839
2511
  members: [],
@@ -2843,14 +2515,14 @@ var Je = {
2843
2515
  initialRole: "",
2844
2516
  initialShowRedaction: !1,
2845
2517
  initialBrowseGated: !1,
2846
- stats: Ye
2847
- }, Ze = [
2518
+ stats: Qe
2519
+ }, et = [
2848
2520
  "owner",
2849
2521
  "member",
2850
2522
  "contributor",
2851
2523
  "guest"
2852
2524
  ];
2853
- function Qe(e) {
2525
+ function tt(e) {
2854
2526
  if (!e) return "unknown";
2855
2527
  let t = new Date(e);
2856
2528
  return Number.isNaN(t.getTime()) ? "unknown" : new Intl.DateTimeFormat("en-US", {
@@ -2858,77 +2530,77 @@ function Qe(e) {
2858
2530
  day: "numeric"
2859
2531
  }).format(t);
2860
2532
  }
2861
- function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2862
- let { collective: a = Je, providerShare: o = [], pendingReview: s = [], members: c = [], redactions: d = [], browseRows: p = [], roleOptions: m = [], initialRole: g = "", initialShowRedaction: _ = !1, initialBrowseGated: v = !1, stats: y = Ye } = e || Xe, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: w, onContribute: E, onToggleBrowse: k } = n || {}, [A, j] = T(g || a.role || ""), [M, P] = T(!!_), [F, I] = T(!!v), L = A || a.role || "guest", B = L === "owner", H = L === "guest", U = i && m.length > 0, ee = C(() => U ? m : [], [U, m]), te = (e) => {
2863
- j(e), b?.(e);
2533
+ function nt({ data: e = $e, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2534
+ let { collective: o = Ze, providerShare: s = [], pendingReview: c = [], members: u = [], redactions: d = [], browseRows: f = [], roleOptions: p = [], initialRole: m = "", initialShowRedaction: h = !1, initialBrowseGated: g = !1, stats: _ = Qe } = e || $e, { onRoleChange: y, onJoin: x, onLeave: S, onSettings: C, onContribute: w, onToggleBrowse: T } = n || {}, [D, k] = O(m || o.role || ""), [M, N] = O(!!h), [P, I] = O(!!g), L = D || o.role || "guest", R = L === "owner", z = L === "guest", H = i && p.length > 0, W = E(() => H ? p : [], [H, p]), G = (e) => {
2535
+ k(e), y?.(e);
2864
2536
  };
2865
- return /* @__PURE__ */ D("div", {
2537
+ return /* @__PURE__ */ A("div", {
2866
2538
  className: "cmg-root",
2867
- children: /* @__PURE__ */ O("div", {
2539
+ children: /* @__PURE__ */ j("div", {
2868
2540
  className: "cmg-detail",
2869
2541
  children: [
2870
- /* @__PURE__ */ O("header", {
2542
+ /* @__PURE__ */ j("header", {
2871
2543
  className: "cmg-d-hero",
2872
- children: [/* @__PURE__ */ O("div", {
2544
+ children: [/* @__PURE__ */ j("div", {
2873
2545
  className: "crumb cmg-crumb",
2874
2546
  children: [
2875
2547
  "village ",
2876
- /* @__PURE__ */ D(N, {
2548
+ /* @__PURE__ */ A(F, {
2877
2549
  size: 13,
2878
2550
  "aria-hidden": "true"
2879
2551
  }),
2880
2552
  " collectives",
2881
2553
  " ",
2882
- /* @__PURE__ */ D(N, {
2554
+ /* @__PURE__ */ A(F, {
2883
2555
  size: 13,
2884
2556
  "aria-hidden": "true"
2885
2557
  }),
2886
- /* @__PURE__ */ D("span", {
2558
+ /* @__PURE__ */ A("span", {
2887
2559
  className: "cur",
2888
- children: a.name || "collective"
2560
+ children: o.name || "collective"
2889
2561
  })
2890
2562
  ]
2891
- }), /* @__PURE__ */ O("div", {
2563
+ }), /* @__PURE__ */ j("div", {
2892
2564
  className: "cmg-d-hero-row",
2893
- children: [/* @__PURE__ */ O("div", { children: [
2894
- /* @__PURE__ */ D("h2", {
2565
+ children: [/* @__PURE__ */ j("div", { children: [
2566
+ /* @__PURE__ */ A("h2", {
2895
2567
  className: "cmg-title",
2896
- children: a.name || "collective"
2568
+ children: o.name || "collective"
2897
2569
  }),
2898
- /* @__PURE__ */ D("p", {
2570
+ /* @__PURE__ */ A("p", {
2899
2571
  className: "cmg-deck",
2900
- children: a.description || "shared collective governance"
2572
+ children: o.description || "shared collective governance"
2901
2573
  }),
2902
- /* @__PURE__ */ O("span", {
2574
+ /* @__PURE__ */ j("span", {
2903
2575
  className: "cmg-orgpill mono",
2904
2576
  children: [
2905
- /* @__PURE__ */ D(V, {
2577
+ /* @__PURE__ */ A(U, {
2906
2578
  size: 13,
2907
2579
  "aria-hidden": "true"
2908
2580
  }),
2909
2581
  " ",
2910
- a.linkedGithubOrg || "not linked"
2582
+ o.linkedGithubOrg || "not linked"
2911
2583
  ]
2912
2584
  })
2913
- ] }), /* @__PURE__ */ O("div", {
2585
+ ] }), /* @__PURE__ */ j("div", {
2914
2586
  className: "cmg-d-actions btn-row",
2915
2587
  children: [
2916
- U ? /* @__PURE__ */ D("div", {
2588
+ H ? /* @__PURE__ */ A("div", {
2917
2589
  className: "cmg-roleswitch",
2918
2590
  role: "group",
2919
2591
  "aria-label": "view as role",
2920
- children: ee.map((e) => /* @__PURE__ */ D("button", {
2592
+ children: W.map((e) => /* @__PURE__ */ A("button", {
2921
2593
  type: "button",
2922
2594
  className: "cmg-roleseg",
2923
- "aria-pressed": A === e,
2924
- onClick: () => te(e),
2595
+ "aria-pressed": D === e,
2596
+ onClick: () => G(e),
2925
2597
  children: e
2926
2598
  }, e))
2927
- }) : /* @__PURE__ */ D("div", {
2599
+ }) : /* @__PURE__ */ A("div", {
2928
2600
  className: "cmg-roleswitch",
2929
2601
  role: "group",
2930
2602
  "aria-label": "your role",
2931
- children: Ze.map((e) => /* @__PURE__ */ D("span", {
2603
+ children: et.map((e) => /* @__PURE__ */ A("span", {
2932
2604
  className: "cmg-roleseg",
2933
2605
  "aria-current": L === e ? "true" : void 0,
2934
2606
  "data-active": L === e || void 0,
@@ -2936,38 +2608,38 @@ function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2936
2608
  children: e
2937
2609
  }, e))
2938
2610
  }),
2939
- H ? /* @__PURE__ */ O("button", {
2611
+ z ? /* @__PURE__ */ j("button", {
2940
2612
  type: "button",
2941
2613
  className: "btn btn-sm btn-primary",
2942
2614
  onClick: () => x?.(),
2943
- children: [/* @__PURE__ */ D(Y, {
2615
+ children: [/* @__PURE__ */ A(Z, {
2944
2616
  size: 14,
2945
2617
  "aria-hidden": "true"
2946
2618
  }), " join as contributor"]
2947
2619
  }) : null,
2948
- (L === "member" || L === "contributor") && E ? /* @__PURE__ */ O("button", {
2620
+ (L === "member" || L === "contributor") && w ? /* @__PURE__ */ j("button", {
2949
2621
  type: "button",
2950
2622
  className: "btn btn-sm btn-primary",
2951
- onClick: () => E?.(),
2952
- children: [/* @__PURE__ */ D(q, {
2623
+ onClick: () => w?.(),
2624
+ children: [/* @__PURE__ */ A(ae, {
2953
2625
  size: 14,
2954
2626
  "aria-hidden": "true"
2955
2627
  }), " contribute"]
2956
2628
  }) : null,
2957
- (L === "member" || L === "contributor") && S ? /* @__PURE__ */ O("button", {
2629
+ (L === "member" || L === "contributor") && S ? /* @__PURE__ */ j("button", {
2958
2630
  type: "button",
2959
2631
  className: "btn btn-sm btn-danger",
2960
2632
  onClick: () => S?.(),
2961
- children: [/* @__PURE__ */ D(G, {
2633
+ children: [/* @__PURE__ */ A(ne, {
2962
2634
  size: 14,
2963
2635
  "aria-hidden": "true"
2964
2636
  }), " leave"]
2965
2637
  }) : null,
2966
- B && w ? /* @__PURE__ */ O("button", {
2638
+ R && C ? /* @__PURE__ */ j("button", {
2967
2639
  type: "button",
2968
2640
  className: "btn btn-sm btn-secondary",
2969
- onClick: () => w?.(),
2970
- children: [/* @__PURE__ */ D(re, {
2641
+ onClick: () => C?.(),
2642
+ children: [/* @__PURE__ */ A(Y, {
2971
2643
  size: 14,
2972
2644
  "aria-hidden": "true"
2973
2645
  }), " settings"]
@@ -2976,75 +2648,75 @@ function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2976
2648
  })]
2977
2649
  })]
2978
2650
  }),
2979
- /* @__PURE__ */ O("div", {
2651
+ /* @__PURE__ */ j("div", {
2980
2652
  className: "cmg-tiles",
2981
2653
  children: [
2982
- /* @__PURE__ */ D(h, {
2654
+ /* @__PURE__ */ A(l, {
2983
2655
  label: "contributions",
2984
- value: a.acceptanceMode || "open",
2656
+ value: o.acceptanceMode || "open",
2985
2657
  tone: "teal"
2986
2658
  }),
2987
- /* @__PURE__ */ D(h, {
2659
+ /* @__PURE__ */ A(l, {
2988
2660
  label: "access",
2989
- value: a.dataAccess || "members only",
2661
+ value: o.dataAccess || "members only",
2990
2662
  tone: "amber"
2991
2663
  }),
2992
- /* @__PURE__ */ D(h, {
2664
+ /* @__PURE__ */ A(l, {
2993
2665
  label: "your role",
2994
2666
  value: L
2995
2667
  })
2996
2668
  ]
2997
2669
  }),
2998
- /* @__PURE__ */ D(l, { tiles: [
2670
+ /* @__PURE__ */ A(b, { tiles: [
2999
2671
  {
3000
2672
  key: "transcripts",
3001
2673
  label: "transcripts",
3002
- value: y.transcripts,
3003
- sub: `across ${y.projects}`
2674
+ value: _.transcripts,
2675
+ sub: `across ${_.projects}`
3004
2676
  },
3005
2677
  {
3006
2678
  key: "tokens",
3007
2679
  label: "tokens",
3008
- value: y.tokens,
3009
- sub: y.turns
2680
+ value: _.tokens,
2681
+ sub: _.turns
3010
2682
  },
3011
2683
  {
3012
2684
  key: "contributors",
3013
2685
  label: "contributors",
3014
- value: y.contributors,
3015
- sub: y.hours
2686
+ value: _.contributors,
2687
+ sub: _.hours
3016
2688
  }
3017
2689
  ] }),
3018
- /* @__PURE__ */ O("div", {
2690
+ /* @__PURE__ */ j("div", {
3019
2691
  className: "cmg-d-grid",
3020
- children: [/* @__PURE__ */ O("main", {
2692
+ children: [/* @__PURE__ */ j("main", {
3021
2693
  className: "cmg-d-main",
3022
2694
  children: [
3023
- o.length > 0 ? /* @__PURE__ */ O("section", {
2695
+ s.length > 0 ? /* @__PURE__ */ j("section", {
3024
2696
  className: "card cmg-share",
3025
2697
  "aria-labelledby": "cmg-share-h",
3026
- children: [/* @__PURE__ */ D("h3", {
2698
+ children: [/* @__PURE__ */ A("h3", {
3027
2699
  id: "cmg-share-h",
3028
2700
  className: "cmg-sub",
3029
2701
  children: "provider share"
3030
- }), /* @__PURE__ */ D(u, {
2702
+ }), /* @__PURE__ */ A(v, {
3031
2703
  label: "provider share",
3032
2704
  total: 100,
3033
- data: o.map((e) => ({
3034
- label: Te(e.id),
2705
+ data: s.map((e) => ({
2706
+ label: Oe(e.id),
3035
2707
  value: e.pct
3036
2708
  }))
3037
2709
  })]
3038
2710
  }) : null,
3039
- s.length > 0 ? /* @__PURE__ */ D("div", {
2711
+ c.length > 0 ? /* @__PURE__ */ A("div", {
3040
2712
  style: {
3041
2713
  overflow: "auto",
3042
2714
  maxWidth: "100%"
3043
2715
  },
3044
- children: /* @__PURE__ */ D(r, {
2716
+ children: /* @__PURE__ */ A(r, {
3045
2717
  title: "pending review",
3046
2718
  emptyLabel: "no shares awaiting review.",
3047
- items: s.map((e) => ({
2719
+ items: c.map((e) => ({
3048
2720
  id: e.id,
3049
2721
  kind: "share",
3050
2722
  who: e.title || "untitled transcript",
@@ -3052,188 +2724,188 @@ function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3052
2724
  }))
3053
2725
  })
3054
2726
  }) : null,
3055
- d.length > 0 ? /* @__PURE__ */ O("section", {
2727
+ d.length > 0 ? /* @__PURE__ */ j("section", {
3056
2728
  className: "card cmg-redact-sec",
3057
2729
  "aria-labelledby": "cmg-redact-h",
3058
- children: [/* @__PURE__ */ O("div", {
2730
+ children: [/* @__PURE__ */ j("div", {
3059
2731
  className: "cmg-queue-head",
3060
- children: [/* @__PURE__ */ O("h3", {
2732
+ children: [/* @__PURE__ */ j("h3", {
3061
2733
  id: "cmg-redact-h",
3062
2734
  className: "cmg-sub",
3063
- children: [/* @__PURE__ */ D(q, {
2735
+ children: [/* @__PURE__ */ A(ae, {
3064
2736
  size: 15,
3065
2737
  "aria-hidden": "true"
3066
2738
  }), " redaction review"]
3067
- }), /* @__PURE__ */ O("button", {
2739
+ }), /* @__PURE__ */ j("button", {
3068
2740
  type: "button",
3069
2741
  className: "btn btn-sm btn-ghost",
3070
2742
  "aria-expanded": M,
3071
- onClick: () => P((e) => !e),
3072
- children: [D(M ? z : R, {
2743
+ onClick: () => N((e) => !e),
2744
+ children: [A(M ? V : B, {
3073
2745
  size: 14,
3074
2746
  "aria-hidden": "true"
3075
2747
  }), M ? "hide" : "show"]
3076
2748
  })]
3077
- }), M ? /* @__PURE__ */ D("div", {
2749
+ }), M ? /* @__PURE__ */ A("div", {
3078
2750
  className: "cmg-redact-list",
3079
- children: d.map((e) => /* @__PURE__ */ O("article", {
2751
+ children: d.map((e) => /* @__PURE__ */ j("article", {
3080
2752
  className: "cmg-redact",
3081
2753
  children: [
3082
- /* @__PURE__ */ O("div", {
2754
+ /* @__PURE__ */ j("div", {
3083
2755
  className: "cmg-redact-head",
3084
- children: [/* @__PURE__ */ D("span", {
2756
+ children: [/* @__PURE__ */ A("span", {
3085
2757
  className: "cmg-redact-badges",
3086
- children: /* @__PURE__ */ D(t, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
3087
- }), /* @__PURE__ */ D("span", {
2758
+ children: /* @__PURE__ */ A(t, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
2759
+ }), /* @__PURE__ */ A("span", {
3088
2760
  className: "cmg-redact-file mono",
3089
2761
  children: e.file || "unknown"
3090
2762
  })]
3091
2763
  }),
3092
- /* @__PURE__ */ D("p", {
2764
+ /* @__PURE__ */ A("p", {
3093
2765
  className: "cmg-redact-summary mono",
3094
2766
  children: e.summary || "redaction review item"
3095
2767
  }),
3096
- /* @__PURE__ */ O("div", {
2768
+ /* @__PURE__ */ j("div", {
3097
2769
  className: "callout cmg-redact-note",
3098
- children: [/* @__PURE__ */ D(q, {
2770
+ children: [/* @__PURE__ */ A(ae, {
3099
2771
  size: 16,
3100
2772
  "aria-hidden": "true"
3101
- }), /* @__PURE__ */ D("div", { children: e.tip || "review this redaction item before exposing it." })]
2773
+ }), /* @__PURE__ */ A("div", { children: e.tip || "review this redaction item before exposing it." })]
3102
2774
  })
3103
2775
  ]
3104
2776
  }, e.id))
3105
2777
  }) : null]
3106
2778
  }) : null,
3107
- /* @__PURE__ */ O("section", {
2779
+ /* @__PURE__ */ j("section", {
3108
2780
  className: "card cmg-browser",
3109
2781
  "aria-labelledby": "cmg-browser-h",
3110
- children: [/* @__PURE__ */ O("div", {
2782
+ children: [/* @__PURE__ */ j("div", {
3111
2783
  className: "cmg-queue-head",
3112
- children: [/* @__PURE__ */ D("h3", {
2784
+ children: [/* @__PURE__ */ A("h3", {
3113
2785
  id: "cmg-browser-h",
3114
2786
  className: "cmg-sub",
3115
2787
  children: "data"
3116
- }), /* @__PURE__ */ O("button", {
2788
+ }), /* @__PURE__ */ j("button", {
3117
2789
  type: "button",
3118
2790
  className: "btn btn-sm btn-ghost",
3119
- "aria-pressed": F,
2791
+ "aria-pressed": P,
3120
2792
  onClick: () => {
3121
2793
  I((e) => {
3122
2794
  let t = !e;
3123
- return k?.(t), t;
2795
+ return T?.(t), t;
3124
2796
  });
3125
2797
  },
3126
- children: [D(F ? W : R, {
2798
+ children: [A(P ? K : B, {
3127
2799
  size: 14,
3128
2800
  "aria-hidden": "true"
3129
- }), F ? "gated view" : "open view"]
2801
+ }), P ? "gated view" : "open view"]
3130
2802
  })]
3131
- }), F ? /* @__PURE__ */ O("div", {
2803
+ }), P ? /* @__PURE__ */ j("div", {
3132
2804
  className: "empty cmg-locked",
3133
2805
  children: [
3134
- /* @__PURE__ */ D("span", {
2806
+ /* @__PURE__ */ A("span", {
3135
2807
  className: "ring",
3136
- children: /* @__PURE__ */ D(W, {
2808
+ children: /* @__PURE__ */ A(K, {
3137
2809
  size: 20,
3138
2810
  "aria-hidden": "true"
3139
2811
  })
3140
2812
  }),
3141
- /* @__PURE__ */ D("h3", { children: "data access restricted" }),
3142
- /* @__PURE__ */ D("p", { children: "this collective is members-only. join as a full member to browse the dataset." }),
3143
- H ? /* @__PURE__ */ O("button", {
2813
+ /* @__PURE__ */ A("h3", { children: "data access restricted" }),
2814
+ /* @__PURE__ */ A("p", { children: "this collective is members-only. join as a full member to browse the dataset." }),
2815
+ z ? /* @__PURE__ */ j("button", {
3144
2816
  type: "button",
3145
2817
  className: "btn btn-sm btn-primary",
3146
2818
  onClick: () => x?.(),
3147
- children: [/* @__PURE__ */ D(Y, {
2819
+ children: [/* @__PURE__ */ A(Z, {
3148
2820
  size: 14,
3149
2821
  "aria-hidden": "true"
3150
2822
  }), " join as contributor"]
3151
2823
  }) : null
3152
2824
  ]
3153
- }) : p.length > 0 ? /* @__PURE__ */ O("table", {
2825
+ }) : f.length > 0 ? /* @__PURE__ */ j("table", {
3154
2826
  className: "dtable cmg-dtable",
3155
- children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", { children: [
3156
- /* @__PURE__ */ D("th", {
2827
+ children: [/* @__PURE__ */ A("thead", { children: /* @__PURE__ */ j("tr", { children: [
2828
+ /* @__PURE__ */ A("th", {
3157
2829
  scope: "col",
3158
2830
  children: "title"
3159
2831
  }),
3160
- /* @__PURE__ */ D("th", {
2832
+ /* @__PURE__ */ A("th", {
3161
2833
  scope: "col",
3162
2834
  children: "contributor"
3163
2835
  }),
3164
- /* @__PURE__ */ D("th", {
2836
+ /* @__PURE__ */ A("th", {
3165
2837
  scope: "col",
3166
2838
  children: "provider"
3167
2839
  }),
3168
- /* @__PURE__ */ D("th", {
2840
+ /* @__PURE__ */ A("th", {
3169
2841
  scope: "col",
3170
2842
  className: "cmg-num",
3171
2843
  children: "turns"
3172
2844
  }),
3173
- /* @__PURE__ */ D("th", {
2845
+ /* @__PURE__ */ A("th", {
3174
2846
  scope: "col",
3175
2847
  className: "cmg-num",
3176
2848
  children: "tokens"
3177
2849
  }),
3178
- /* @__PURE__ */ D("th", {
2850
+ /* @__PURE__ */ A("th", {
3179
2851
  scope: "col",
3180
2852
  children: "date"
3181
2853
  })
3182
- ] }) }), /* @__PURE__ */ D("tbody", { children: p.map((e) => /* @__PURE__ */ O("tr", { children: [
3183
- /* @__PURE__ */ D("td", { children: e.title || "untitled transcript" }),
3184
- /* @__PURE__ */ D("td", {
2854
+ ] }) }), /* @__PURE__ */ A("tbody", { children: f.map((e) => /* @__PURE__ */ j("tr", { children: [
2855
+ /* @__PURE__ */ A("td", { children: e.title || "untitled transcript" }),
2856
+ /* @__PURE__ */ A("td", {
3185
2857
  className: "mono",
3186
2858
  children: e.contributor || "anon"
3187
2859
  }),
3188
- /* @__PURE__ */ O("td", { children: [
3189
- /* @__PURE__ */ D(V, {
2860
+ /* @__PURE__ */ j("td", { children: [
2861
+ /* @__PURE__ */ A(U, {
3190
2862
  size: 12,
3191
2863
  "aria-hidden": "true"
3192
2864
  }),
3193
2865
  " ",
3194
- e.providerId ? Te(e.providerId) : we(e.provider)
2866
+ e.providerId ? Oe(e.providerId) : De(e.provider)
3195
2867
  ] }),
3196
- /* @__PURE__ */ D("td", {
2868
+ /* @__PURE__ */ A("td", {
3197
2869
  className: "cmg-num tnum",
3198
2870
  children: e.turns || "0"
3199
2871
  }),
3200
- /* @__PURE__ */ D("td", {
2872
+ /* @__PURE__ */ A("td", {
3201
2873
  className: "cmg-num tnum",
3202
2874
  children: e.tokens || "0"
3203
2875
  }),
3204
- /* @__PURE__ */ D("td", {
2876
+ /* @__PURE__ */ A("td", {
3205
2877
  className: "mono tnum",
3206
- children: e.date || Qe(null)
2878
+ children: e.date || tt(null)
3207
2879
  })
3208
2880
  ] }, `${e.title}-${e.contributor}`)) })]
3209
- }) : /* @__PURE__ */ O("div", {
2881
+ }) : /* @__PURE__ */ j("div", {
3210
2882
  className: "empty cmg-locked",
3211
2883
  children: [
3212
- /* @__PURE__ */ D("span", {
2884
+ /* @__PURE__ */ A("span", {
3213
2885
  className: "ring",
3214
- children: /* @__PURE__ */ D(X, {
2886
+ children: /* @__PURE__ */ A(Q, {
3215
2887
  size: 20,
3216
2888
  "aria-hidden": "true"
3217
2889
  })
3218
2890
  }),
3219
- /* @__PURE__ */ D("h3", { children: "no data yet" }),
3220
- /* @__PURE__ */ D("p", { children: "this collective has no visible transcripts to browse." })
2891
+ /* @__PURE__ */ A("h3", { children: "no data yet" }),
2892
+ /* @__PURE__ */ A("p", { children: "this collective has no visible transcripts to browse." })
3221
2893
  ]
3222
2894
  })]
3223
2895
  })
3224
2896
  ]
3225
- }), c.length > 0 ? /* @__PURE__ */ D("aside", {
2897
+ }), u.length > 0 ? /* @__PURE__ */ A("aside", {
3226
2898
  className: "sidebar cmg-d-rail",
3227
2899
  "aria-label": "collective sidebar",
3228
- children: /* @__PURE__ */ D("div", {
2900
+ children: /* @__PURE__ */ A("div", {
3229
2901
  style: {
3230
2902
  overflow: "auto",
3231
2903
  maxWidth: "100%"
3232
2904
  },
3233
- children: /* @__PURE__ */ D(f, {
2905
+ children: /* @__PURE__ */ A(a, {
3234
2906
  title: "members",
3235
2907
  roles: ["member", "contributor"],
3236
- members: c.map((e) => ({
2908
+ members: u.map((e) => ({
3237
2909
  handle: e.handle || e.githubUsername || "@unknown",
3238
2910
  name: e.name || e.displayName || e.githubUsername || "unknown",
3239
2911
  role: e.role || "member",
@@ -3248,4 +2920,4 @@ function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3248
2920
  });
3249
2921
  }
3250
2922
  //#endregion
3251
- export { se as ACCEPTANCE_MODES, $ as COLLECTIVE_ROLES, Ue as CollectiveDetailView, We as CollectiveSettingsView, Ie as CollectivesView, qe as ContributeView, ce as DATA_ACCESS_POLICIES, Ce as Explore, $e as Manage, Ae as PublishView, Q as TRANSCRIPT_DELETION_POLICIES, oe as TRANSCRIPT_VISIBILITIES };
2923
+ export { $ as ACCEPTANCE_MODES, de as COLLECTIVE_ROLES, Ke as CollectiveDetailView, Xe as CollectiveSettingsView, Ue as CollectivesView, Ie as ContributeView, le as DATA_ACCESS_POLICIES, Ee as Explore, nt as Manage, Ne as PublishView, ue as TRANSCRIPT_DELETION_POLICIES, ce as TRANSCRIPT_VISIBILITIES };