@peasant-labs/fairtrade 0.0.18 → 0.0.20

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,5 +1,5 @@
1
- import { At as e, Bn as t, In as n, Mt as r, Nn as i, Nt as a, Ot as o, Pt as s, Rn as c, at as l, bn as u, gn as d, it as f, kt as p, rt as m, st as h, tt as g, zn as _ } from "./ui-BtpmsgDx.js";
2
- import { dt as v, lt as y, xt as b } from "./GraphLegend-D9bZVLfT.js";
1
+ import { An as e, At as t, En as n, Ft as r, Jn as i, Kn as a, Nt as o, Pt as s, Un as c, Xn as l, Yn as u, at as d, it as f, jt as p, kt as m, rt as h, st as g, tt as _ } from "./ui-C9GNLshA.js";
2
+ import { dt as v, lt as y, xt as b } from "./GraphLegend-BB0V2w59.js";
3
3
  import { useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
4
4
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
5
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";
@@ -222,7 +222,7 @@ function be({ transcript: e, href: t, onOpen: n }) {
222
222
  className: "mono",
223
223
  children: e.modelName || e.modelProvider
224
224
  })]
225
- }), /* @__PURE__ */ D(g, { visibility: e.visibility })]
225
+ }), /* @__PURE__ */ D(_, { visibility: e.visibility })]
226
226
  }),
227
227
  /* @__PURE__ */ D("h3", {
228
228
  className: "cex-title",
@@ -288,7 +288,7 @@ function xe({ transcript: e, href: t, onOpen: n }) {
288
288
  className: "cex-trow-date mono tnum",
289
289
  children: fe(e.sessionStart || e.sessionEnd || "")
290
290
  }),
291
- /* @__PURE__ */ D(g, { visibility: e.visibility })
291
+ /* @__PURE__ */ D(_, { visibility: e.visibility })
292
292
  ] });
293
293
  return t ? /* @__PURE__ */ D("a", {
294
294
  href: t,
@@ -338,8 +338,8 @@ function Se({ collective: e, href: t, onOpen: n }) {
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 d = ve(e), f = d.transcripts.transcripts, [p, m] = T(""), [_, y] = T(""), [b, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(() => ye(d.transcripts.page)), [L, R] = T(null), [z, V] = T("browse"), H = w(!0), U = w(null);
341
+ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript: i, onOpenProfile: a, onOpenCollective: o, transcriptHref: s, profileHref: c, collectiveHref: l }) {
342
+ let u = ve(t), 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
343
  x(() => {
344
344
  if (H.current) {
345
345
  H.current = !1, y(p);
@@ -349,7 +349,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
349
349
  return () => clearTimeout(e);
350
350
  }, [H, p]), x(() => {
351
351
  let e = JSON.stringify([
352
- _,
352
+ h,
353
353
  b,
354
354
  E,
355
355
  [...A].sort()
@@ -360,13 +360,13 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
360
360
  }
361
361
  U.current = e, I(1);
362
362
  }, [
363
- _,
363
+ h,
364
364
  b,
365
365
  E,
366
366
  A
367
367
  ]), x(() => {
368
- n?.({
369
- query: _,
368
+ r?.({
369
+ query: h,
370
370
  provider: E,
371
371
  topics: [...A],
372
372
  order: b,
@@ -374,10 +374,10 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
374
374
  });
375
375
  }, [
376
376
  b,
377
- n,
377
+ r,
378
378
  P,
379
379
  E,
380
- _,
380
+ h,
381
381
  A
382
382
  ]);
383
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(() => {
@@ -395,21 +395,21 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
395
395
  L && !f.some((e) => e.id === L) && (R(null), V("browse"));
396
396
  }, [L, f]);
397
397
  let q = C(() => {
398
- let e = me(_);
399
- return e ? d.collectives.filter((t) => [
398
+ let e = me(h);
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
- }, [d.collectives, _]), J = f, ie = A.size, Y = d.transcripts.total ?? f.length, X = P, Z = d.transcripts.limit || f.length || 1, oe = (e) => {
405
- if (r) {
406
- r(e);
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) => {
405
+ if (i) {
406
+ i(e);
407
407
  return;
408
408
  }
409
409
  R(e.id), V("detail");
410
410
  }, se = () => {
411
- if (i && G) {
412
- i(G);
411
+ if (a && G) {
412
+ a(G);
413
413
  return;
414
414
  }
415
415
  W ? (R(W.id), V("profile")) : f[0] && (R(f[0].id), V("profile"));
@@ -427,7 +427,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
427
427
  };
428
428
  }, [K, Q.length]);
429
429
  return z === "detail" && W ? /* @__PURE__ */ O("div", {
430
- className: `cex-root cex-detail ${t}`.trim(),
430
+ className: `cex-root cex-detail ${n}`.trim(),
431
431
  children: [/* @__PURE__ */ O("div", {
432
432
  className: "cex-detail-back",
433
433
  children: [/* @__PURE__ */ O("button", {
@@ -480,7 +480,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
480
480
  children: [/* @__PURE__ */ D("h2", {
481
481
  className: "win-title cex-vtitle",
482
482
  children: he(W.title || "untitled transcript")
483
- }), /* @__PURE__ */ D(g, { visibility: W.visibility })]
483
+ }), /* @__PURE__ */ D(_, { visibility: W.visibility })]
484
484
  }),
485
485
  /* @__PURE__ */ O("p", {
486
486
  className: "cex-vdesc",
@@ -590,7 +590,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
590
590
  })]
591
591
  })]
592
592
  }),
593
- /* @__PURE__ */ D(l, { tiles: [
593
+ /* @__PURE__ */ D(d, { tiles: [
594
594
  {
595
595
  key: "transcripts",
596
596
  label: "transcripts",
@@ -612,7 +612,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
612
612
  })]
613
613
  })]
614
614
  }) : z === "profile" && G ? /* @__PURE__ */ O("div", {
615
- className: `cex-root cex-profile ${t}`.trim(),
615
+ className: `cex-root cex-profile ${n}`.trim(),
616
616
  children: [
617
617
  /* @__PURE__ */ O("div", {
618
618
  className: "cex-detail-back",
@@ -666,7 +666,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
666
666
  })]
667
667
  })]
668
668
  }),
669
- /* @__PURE__ */ D(l, { tiles: [
669
+ /* @__PURE__ */ D(d, { tiles: [
670
670
  {
671
671
  key: "transcripts",
672
672
  label: "transcripts",
@@ -726,7 +726,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
726
726
  className: "cex-lib-rows",
727
727
  children: t.map((e) => /* @__PURE__ */ D(xe, {
728
728
  transcript: e,
729
- href: o?.(e),
729
+ href: s?.(e),
730
730
  onOpen: oe
731
731
  }, e.id))
732
732
  })]
@@ -735,7 +735,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
735
735
  })
736
736
  ]
737
737
  }) : /* @__PURE__ */ O("div", {
738
- className: `cex-root ${t}`.trim(),
738
+ className: `cex-root ${n}`.trim(),
739
739
  children: [/* @__PURE__ */ O("header", {
740
740
  className: "cex-explore-head",
741
741
  children: [
@@ -770,13 +770,13 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
770
770
  ]
771
771
  }), /* @__PURE__ */ O("div", {
772
772
  className: "cex-explore-body",
773
- children: [/* @__PURE__ */ D(h, {
773
+ children: [/* @__PURE__ */ D(g, {
774
774
  order: b,
775
775
  onOrder: (e) => S(e),
776
776
  providers: re,
777
777
  activeProviders: E === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([E]),
778
778
  onProvider: (e) => k((t) => t === e ? "all" : e),
779
- topics: d.popularTags.map((e) => ({
779
+ topics: u.popularTags.map((e) => ({
780
780
  tag: e.name,
781
781
  count: e.usageCount
782
782
  })),
@@ -811,8 +811,8 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
811
811
  className: "cex-coll-grid",
812
812
  children: q.map((e) => /* @__PURE__ */ D(Se, {
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
  }),
@@ -859,7 +859,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
859
859
  ]
860
860
  })]
861
861
  }),
862
- J.length === 0 ? _.trim() || E !== "all" || ie ? /* @__PURE__ */ O("div", {
862
+ J.length === 0 ? h.trim() || E !== "all" || ie ? /* @__PURE__ */ O("div", {
863
863
  className: "empty cex-empty",
864
864
  children: [
865
865
  /* @__PURE__ */ D("div", {
@@ -895,18 +895,18 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
895
895
  className: "cex-grid",
896
896
  children: J.map((e) => /* @__PURE__ */ D(be, {
897
897
  transcript: e,
898
- href: o?.(e),
898
+ href: s?.(e),
899
899
  onOpen: oe
900
900
  }, e.id))
901
901
  }) : /* @__PURE__ */ D("div", {
902
902
  className: "cex-list",
903
903
  children: J.map((e) => /* @__PURE__ */ D(xe, {
904
904
  transcript: e,
905
- href: o?.(e),
905
+ href: s?.(e),
906
906
  onOpen: oe
907
907
  }, e.id))
908
908
  }),
909
- Y > Z && /* @__PURE__ */ D(u, {
909
+ Y > Z && /* @__PURE__ */ D(e, {
910
910
  page: X,
911
911
  totalItems: Y,
912
912
  pageSize: Z,
@@ -1370,7 +1370,7 @@ function Fe({ mode: e }) {
1370
1370
  });
1371
1371
  }
1372
1372
  function Ie({ data: e = {}, actions: t = {} } = {}) {
1373
- let { collectives: n = Pe, linkedOrgs: r = Ne, title: i = "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();
1373
+ let { collectives: n = Pe, linkedOrgs: r = Ne, title: i = "collectives", deck: a = "groups that govern shared data together.", crumb: o = "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
1374
  return /* @__PURE__ */ D("div", {
1375
1375
  className: "cmg-root",
1376
1376
  children: /* @__PURE__ */ O("div", {
@@ -1387,7 +1387,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1387
1387
  " ",
1388
1388
  /* @__PURE__ */ D("span", {
1389
1389
  className: "cur",
1390
- children: s
1390
+ children: o
1391
1391
  })
1392
1392
  ]
1393
1393
  }),
@@ -1398,7 +1398,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1398
1398
  children: i
1399
1399
  }), /* @__PURE__ */ D("p", {
1400
1400
  className: "cmg-deck",
1401
- children: o
1401
+ children: a
1402
1402
  })] }), /* @__PURE__ */ O("button", {
1403
1403
  type: "button",
1404
1404
  className: "btn btn-sm " + (f ? "btn-secondary" : "btn-primary"),
@@ -1450,7 +1450,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1450
1450
  }),
1451
1451
  /* @__PURE__ */ D("div", {
1452
1452
  className: "cmg-field",
1453
- children: /* @__PURE__ */ D(a, {
1453
+ children: /* @__PURE__ */ D(s, {
1454
1454
  variant: "select",
1455
1455
  label: "acceptance mode",
1456
1456
  name: "acceptance-mode",
@@ -1461,7 +1461,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1461
1461
  }),
1462
1462
  /* @__PURE__ */ D("div", {
1463
1463
  className: "cmg-field",
1464
- children: /* @__PURE__ */ D(a, {
1464
+ children: /* @__PURE__ */ D(s, {
1465
1465
  variant: "select",
1466
1466
  label: "data access policy",
1467
1467
  name: "data-access",
@@ -1845,12 +1845,12 @@ function He({ item: e }) {
1845
1845
  ]
1846
1846
  });
1847
1847
  }
1848
- function Ue({ data: t = {}, actions: n = {} } = {}) {
1849
- let { collective: i = {
1848
+ function Ue({ data: e = {}, actions: t = {} } = {}) {
1849
+ let { collective: n = {
1850
1850
  name: "AI Research Team",
1851
1851
  description: "Sharing transcripts related to AI research",
1852
1852
  linkedGithubOrg: "@anthropic-labs"
1853
- }, providerShare: a = Re, pendingReview: o = ze, members: s = Be, redactions: c = Ve, browseRows: u = [
1853
+ }, providerShare: r = Re, pendingReview: i = ze, members: a = Be, redactions: s = Ve, browseRows: c = [
1854
1854
  {
1855
1855
  title: "Building a REST API from scratch",
1856
1856
  contributor: "@alice-dev",
@@ -1878,14 +1878,14 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1878
1878
  tokens: "121K",
1879
1879
  date: "Jun 12"
1880
1880
  }
1881
- ], roleOptions: d = Le, initialRole: p = "owner", initialShowRedaction: h = !0, initialBrowseGated: g = !1, targetCollective: _ = Ke, stats: v = {
1881
+ ], roleOptions: l = Le, initialRole: u = "owner", initialShowRedaction: m = !0, initialBrowseGated: g = !1, targetCollective: _ = Ke, stats: v = {
1882
1882
  transcripts: "248",
1883
1883
  projects: "31 projects",
1884
1884
  tokens: "4.2M",
1885
1885
  turns: "18.4K turns",
1886
1886
  contributors: "12",
1887
1887
  hours: "63h total"
1888
- } } = t, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = n, [A, j] = T(p), [F, I] = T(h), [L, z] = T(g), B = A === "owner", H = A === "guest", U = (e) => {
1888
+ } } = e, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = t, [A, j] = T(u), [F, I] = T(m), [L, z] = T(g), B = A === "owner", H = A === "guest", U = (e) => {
1889
1889
  j(e), b?.(e);
1890
1890
  };
1891
1891
  return /* @__PURE__ */ D("div", {
@@ -1911,7 +1911,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1911
1911
  " ",
1912
1912
  /* @__PURE__ */ D("span", {
1913
1913
  className: "cur",
1914
- children: i.name
1914
+ children: n.name
1915
1915
  })
1916
1916
  ]
1917
1917
  }), /* @__PURE__ */ O("div", {
@@ -1919,11 +1919,11 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1919
1919
  children: [/* @__PURE__ */ O("div", { children: [
1920
1920
  /* @__PURE__ */ D("h2", {
1921
1921
  className: "cmg-title",
1922
- children: i.name
1922
+ children: n.name
1923
1923
  }),
1924
1924
  /* @__PURE__ */ D("p", {
1925
1925
  className: "cmg-deck",
1926
- children: i.description
1926
+ children: n.description
1927
1927
  }),
1928
1928
  /* @__PURE__ */ O("span", {
1929
1929
  className: "cmg-orgpill mono",
@@ -1933,7 +1933,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1933
1933
  "aria-hidden": "true"
1934
1934
  }),
1935
1935
  " ",
1936
- i.linkedGithubOrg || "not linked"
1936
+ n.linkedGithubOrg || "not linked"
1937
1937
  ]
1938
1938
  })
1939
1939
  ] }), /* @__PURE__ */ O("div", {
@@ -1943,7 +1943,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1943
1943
  className: "cmg-roleswitch",
1944
1944
  role: "group",
1945
1945
  "aria-label": "view as role",
1946
- children: d.map((e) => /* @__PURE__ */ D("button", {
1946
+ children: l.map((e) => /* @__PURE__ */ D("button", {
1947
1947
  type: "button",
1948
1948
  className: "cmg-roleseg",
1949
1949
  "aria-pressed": A === e,
@@ -1994,23 +1994,23 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1994
1994
  /* @__PURE__ */ O("div", {
1995
1995
  className: "cmg-tiles",
1996
1996
  children: [
1997
- /* @__PURE__ */ D(m, {
1997
+ /* @__PURE__ */ D(h, {
1998
1998
  label: "contributions",
1999
- value: i.acceptanceMode || "open",
1999
+ value: n.acceptanceMode || "open",
2000
2000
  tone: "teal"
2001
2001
  }),
2002
- /* @__PURE__ */ D(m, {
2002
+ /* @__PURE__ */ D(h, {
2003
2003
  label: "access",
2004
- value: i.dataAccess || "members only",
2004
+ value: n.dataAccess || "members only",
2005
2005
  tone: "amber"
2006
2006
  }),
2007
- /* @__PURE__ */ D(m, {
2007
+ /* @__PURE__ */ D(h, {
2008
2008
  label: "your role",
2009
2009
  value: A
2010
2010
  })
2011
2011
  ]
2012
2012
  }),
2013
- /* @__PURE__ */ D(l, { tiles: [
2013
+ /* @__PURE__ */ D(d, { tiles: [
2014
2014
  {
2015
2015
  key: "transcripts",
2016
2016
  label: "transcripts",
@@ -2045,7 +2045,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2045
2045
  }), /* @__PURE__ */ D(f, {
2046
2046
  label: "provider share",
2047
2047
  total: 100,
2048
- data: a.map((e) => ({
2048
+ data: r.map((e) => ({
2049
2049
  label: Te(e.id),
2050
2050
  value: e.pct
2051
2051
  }))
@@ -2056,10 +2056,10 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2056
2056
  overflow: "auto",
2057
2057
  maxWidth: "100%"
2058
2058
  },
2059
- children: /* @__PURE__ */ D(r, {
2059
+ children: /* @__PURE__ */ D(o, {
2060
2060
  title: "pending review",
2061
2061
  emptyLabel: "no shares awaiting review.",
2062
- items: o.map((e) => ({
2062
+ items: i.map((e) => ({
2063
2063
  id: e.id,
2064
2064
  kind: "share",
2065
2065
  who: e.title,
@@ -2097,7 +2097,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2097
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
2098
  }), /* @__PURE__ */ D("div", {
2099
2099
  className: "cmg-redact-list",
2100
- children: c.map((e) => /* @__PURE__ */ D(He, { item: e }, e.id))
2100
+ children: s.map((e) => /* @__PURE__ */ D(He, { item: e }, e.id))
2101
2101
  })] })]
2102
2102
  }),
2103
2103
  /* @__PURE__ */ O("section", {
@@ -2174,7 +2174,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2174
2174
  scope: "col",
2175
2175
  children: "date"
2176
2176
  })
2177
- ] }) }), /* @__PURE__ */ D("tbody", { children: u.map((e) => /* @__PURE__ */ O("tr", { children: [
2177
+ ] }) }), /* @__PURE__ */ D("tbody", { children: c.map((e) => /* @__PURE__ */ O("tr", { children: [
2178
2178
  /* @__PURE__ */ D("td", { children: e.title }),
2179
2179
  /* @__PURE__ */ D("td", {
2180
2180
  className: "mono",
@@ -2210,7 +2210,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2210
2210
  overflow: "auto",
2211
2211
  maxWidth: "100%"
2212
2212
  },
2213
- children: /* @__PURE__ */ D(r, {
2213
+ children: /* @__PURE__ */ D(o, {
2214
2214
  title: "pending requests",
2215
2215
  emptyLabel: "no pending requests.",
2216
2216
  items: [{
@@ -2225,10 +2225,10 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2225
2225
  overflow: "auto",
2226
2226
  maxWidth: "100%"
2227
2227
  },
2228
- children: /* @__PURE__ */ D(e, {
2228
+ children: /* @__PURE__ */ D(p, {
2229
2229
  title: "members",
2230
2230
  roles: ["member", "contributor"],
2231
- members: s.map((e) => ({
2231
+ members: a.map((e) => ({
2232
2232
  handle: e.handle,
2233
2233
  name: e.name,
2234
2234
  role: e.role,
@@ -2253,7 +2253,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2253
2253
  children: [/* @__PURE__ */ D(P, {
2254
2254
  size: 16,
2255
2255
  "aria-hidden": "true"
2256
- }), /* @__PURE__ */ D("div", { children: i.linkedGithubOrg ? `linked to ${i.linkedGithubOrg}.` : "the github connection isn't set up. an admin must register the github app to overlay commit timelines." })]
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
2257
  })]
2258
2258
  })
2259
2259
  ]
@@ -2264,7 +2264,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2264
2264
  });
2265
2265
  }
2266
2266
  function We() {
2267
- let [r, a] = T("AI Research Team"), [s, l] = T("Sharing transcripts related to AI research"), [u, f] = T("curated"), [m, h] = T("members_only"), [g, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
2267
+ let [e, r] = T("AI Research Team"), [o, s] = T("Sharing transcripts related to AI research"), [d, f] = T("curated"), [h, g] = T("members_only"), [_, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
2268
2268
  return /* @__PURE__ */ D("div", {
2269
2269
  className: "cmg-root cmg-settings",
2270
2270
  children: /* @__PURE__ */ O("div", {
@@ -2299,7 +2299,7 @@ function We() {
2299
2299
  }), /* @__PURE__ */ D("p", {
2300
2300
  className: "cmg-deck",
2301
2301
  children: "edit how this collective accepts contributions and shares data."
2302
- })] }), /* @__PURE__ */ D(d, { children: "settings" })]
2302
+ })] }), /* @__PURE__ */ D(n, { children: "settings" })]
2303
2303
  })
2304
2304
  }),
2305
2305
  /* @__PURE__ */ O("div", {
@@ -2323,24 +2323,24 @@ function We() {
2323
2323
  }), /* @__PURE__ */ O("div", {
2324
2324
  className: "cmg-settings-stack",
2325
2325
  children: [
2326
- /* @__PURE__ */ D(c, {
2326
+ /* @__PURE__ */ D(i, {
2327
2327
  label: "Name",
2328
2328
  id: "cmg-name",
2329
- value: r,
2330
- onChange: (e) => a(e.target.value),
2329
+ value: e,
2330
+ onChange: (e) => r(e.target.value),
2331
2331
  required: !0
2332
2332
  }),
2333
- /* @__PURE__ */ D(t, {
2333
+ /* @__PURE__ */ D(l, {
2334
2334
  label: "Description",
2335
2335
  id: "cmg-description",
2336
- value: s,
2337
- onChange: (e) => l(e.target.value),
2336
+ value: o,
2337
+ onChange: (e) => s(e.target.value),
2338
2338
  rows: 2
2339
2339
  }),
2340
- /* @__PURE__ */ D(_, {
2340
+ /* @__PURE__ */ D(u, {
2341
2341
  label: "Acceptance mode",
2342
2342
  id: "cmg-acceptance",
2343
- value: u,
2343
+ value: d,
2344
2344
  onChange: (e) => f(e.target.value),
2345
2345
  options: [
2346
2346
  {
@@ -2357,11 +2357,11 @@ function We() {
2357
2357
  }
2358
2358
  ]
2359
2359
  }),
2360
- /* @__PURE__ */ D(_, {
2360
+ /* @__PURE__ */ D(u, {
2361
2361
  label: "Data access",
2362
2362
  id: "cmg-access",
2363
- value: m,
2364
- onChange: (e) => h(e.target.value),
2363
+ value: h,
2364
+ onChange: (e) => g(e.target.value),
2365
2365
  options: [
2366
2366
  {
2367
2367
  value: "members_only",
@@ -2391,15 +2391,15 @@ function We() {
2391
2391
  }),
2392
2392
  /* @__PURE__ */ D("div", {
2393
2393
  className: "sw-toggle-row",
2394
- children: /* @__PURE__ */ D(i, {
2394
+ children: /* @__PURE__ */ D(c, {
2395
2395
  id: "cmg-display-members",
2396
- checked: g,
2396
+ checked: _,
2397
2397
  onChange: (e) => v(e)
2398
2398
  })
2399
2399
  })
2400
2400
  ]
2401
2401
  }),
2402
- /* @__PURE__ */ D(n, {
2402
+ /* @__PURE__ */ D(a, {
2403
2403
  name: "cmg-deletion-policy",
2404
2404
  ariaLabel: "Transcript retention on leave",
2405
2405
  value: y,
@@ -2436,19 +2436,19 @@ function We() {
2436
2436
  type: "submit",
2437
2437
  className: "btn btn-sm btn-primary",
2438
2438
  children: "save changes"
2439
- }), /* @__PURE__ */ D(o, {
2439
+ }), /* @__PURE__ */ D(m, {
2440
2440
  label: "reset form",
2441
2441
  onConfirm: () => S(!1)
2442
2442
  })]
2443
2443
  })
2444
2444
  ]
2445
2445
  })]
2446
- }), /* @__PURE__ */ O(p, {
2446
+ }), /* @__PURE__ */ O(t, {
2447
2447
  title: "danger zone",
2448
2448
  children: [/* @__PURE__ */ D("p", {
2449
2449
  className: "mono",
2450
2450
  children: "deleting this collective removes the governance settings and member roster."
2451
- }), /* @__PURE__ */ D(o, {
2451
+ }), /* @__PURE__ */ D(m, {
2452
2452
  label: "delete collective",
2453
2453
  confirmLabel: "delete",
2454
2454
  onConfirm: () => S(!1)
@@ -2462,7 +2462,7 @@ function We() {
2462
2462
  overflow: "auto",
2463
2463
  maxWidth: "100%"
2464
2464
  },
2465
- children: /* @__PURE__ */ D(e, {
2465
+ children: /* @__PURE__ */ D(p, {
2466
2466
  title: "members",
2467
2467
  roles: ["member", "contributor"],
2468
2468
  members: [
@@ -2550,7 +2550,7 @@ var Ge = [
2550
2550
  members: 12
2551
2551
  };
2552
2552
  function qe() {
2553
- let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [n, r] = T(() => new Set(Ge.map((e) => e.id))), [i, a] = T(!1), o = C(() => {
2553
+ let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [n, i] = T(() => new Set(Ge.map((e) => e.id))), [a, o] = T(!1), s = C(() => {
2554
2554
  let e = {};
2555
2555
  return Ge.forEach((t) => t.transcripts.forEach((n) => e[n.id] = {
2556
2556
  ...n,
@@ -2575,12 +2575,12 @@ function qe() {
2575
2575
  });
2576
2576
  }
2577
2577
  function d(e) {
2578
- r((t) => {
2578
+ i((t) => {
2579
2579
  let n = new Set(t);
2580
2580
  return n.has(e) ? n.delete(e) : n.add(e), n;
2581
2581
  });
2582
2582
  }
2583
- let f = [...e].map((e) => o[e]).filter(Boolean), p = f.filter((e) => e.visibility === "private").length;
2583
+ let f = [...e].map((e) => s[e]).filter(Boolean), p = f.filter((e) => e.visibility === "private").length;
2584
2584
  return /* @__PURE__ */ O("div", {
2585
2585
  className: "cmg-root",
2586
2586
  children: [/* @__PURE__ */ O("div", {
@@ -2735,7 +2735,7 @@ function qe() {
2735
2735
  type: "button",
2736
2736
  className: "btn btn-sm btn-primary",
2737
2737
  disabled: e.size === 0,
2738
- onClick: () => a(!0),
2738
+ onClick: () => o(!0),
2739
2739
  children: [
2740
2740
  /* @__PURE__ */ D(ie, {
2741
2741
  size: 14,
@@ -2749,8 +2749,8 @@ function qe() {
2749
2749
  })]
2750
2750
  })
2751
2751
  ]
2752
- }), /* @__PURE__ */ D(s, {
2753
- open: i,
2752
+ }), /* @__PURE__ */ D(r, {
2753
+ open: a,
2754
2754
  title: /* @__PURE__ */ O(E, { children: [
2755
2755
  "make ",
2756
2756
  p > 1 ? "these" : "this",
@@ -2789,8 +2789,8 @@ function qe() {
2789
2789
  requireConsent: p > 0,
2790
2790
  confirmLabel: p > 0 ? "contribute & make visible" : "contribute",
2791
2791
  confirmIcon: A,
2792
- onCancel: () => a(!1),
2793
- onConfirm: () => a(!1),
2792
+ onCancel: () => o(!1),
2793
+ onConfirm: () => o(!1),
2794
2794
  children: /* @__PURE__ */ O("ul", {
2795
2795
  className: "cmg-confirm-list",
2796
2796
  children: [f.slice(0, 5).map((e) => /* @__PURE__ */ O("li", {
@@ -2858,8 +2858,8 @@ function Qe(e) {
2858
2858
  day: "numeric"
2859
2859
  }).format(t);
2860
2860
  }
2861
- function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2862
- let { collective: a = Je, providerShare: o = [], pendingReview: s = [], members: c = [], redactions: u = [], browseRows: p = [], roleOptions: h = [], initialRole: g = "", initialShowRedaction: _ = !1, initialBrowseGated: v = !1, stats: y = Ye } = t || 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 && h.length > 0, ee = C(() => U ? h : [], [U, h]), te = (e) => {
2861
+ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
2862
+ let { collective: i = Je, providerShare: a = [], pendingReview: s = [], members: c = [], redactions: l = [], browseRows: u = [], 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 } = t || {}, [A, j] = T(g || i.role || ""), [M, P] = T(!!_), [F, I] = T(!!v), L = A || i.role || "guest", B = L === "owner", H = L === "guest", U = r && m.length > 0, ee = C(() => U ? m : [], [U, m]), te = (e) => {
2863
2863
  j(e), b?.(e);
2864
2864
  };
2865
2865
  return /* @__PURE__ */ D("div", {
@@ -2885,7 +2885,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2885
2885
  }),
2886
2886
  /* @__PURE__ */ D("span", {
2887
2887
  className: "cur",
2888
- children: a.name || "collective"
2888
+ children: i.name || "collective"
2889
2889
  })
2890
2890
  ]
2891
2891
  }), /* @__PURE__ */ O("div", {
@@ -2893,11 +2893,11 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2893
2893
  children: [/* @__PURE__ */ O("div", { children: [
2894
2894
  /* @__PURE__ */ D("h2", {
2895
2895
  className: "cmg-title",
2896
- children: a.name || "collective"
2896
+ children: i.name || "collective"
2897
2897
  }),
2898
2898
  /* @__PURE__ */ D("p", {
2899
2899
  className: "cmg-deck",
2900
- children: a.description || "shared collective governance"
2900
+ children: i.description || "shared collective governance"
2901
2901
  }),
2902
2902
  /* @__PURE__ */ O("span", {
2903
2903
  className: "cmg-orgpill mono",
@@ -2907,7 +2907,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2907
2907
  "aria-hidden": "true"
2908
2908
  }),
2909
2909
  " ",
2910
- a.linkedGithubOrg || "not linked"
2910
+ i.linkedGithubOrg || "not linked"
2911
2911
  ]
2912
2912
  })
2913
2913
  ] }), /* @__PURE__ */ O("div", {
@@ -2979,23 +2979,23 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2979
2979
  /* @__PURE__ */ O("div", {
2980
2980
  className: "cmg-tiles",
2981
2981
  children: [
2982
- /* @__PURE__ */ D(m, {
2982
+ /* @__PURE__ */ D(h, {
2983
2983
  label: "contributions",
2984
- value: a.acceptanceMode || "open",
2984
+ value: i.acceptanceMode || "open",
2985
2985
  tone: "teal"
2986
2986
  }),
2987
- /* @__PURE__ */ D(m, {
2987
+ /* @__PURE__ */ D(h, {
2988
2988
  label: "access",
2989
- value: a.dataAccess || "members only",
2989
+ value: i.dataAccess || "members only",
2990
2990
  tone: "amber"
2991
2991
  }),
2992
- /* @__PURE__ */ D(m, {
2992
+ /* @__PURE__ */ D(h, {
2993
2993
  label: "your role",
2994
2994
  value: L
2995
2995
  })
2996
2996
  ]
2997
2997
  }),
2998
- /* @__PURE__ */ D(l, { tiles: [
2998
+ /* @__PURE__ */ D(d, { tiles: [
2999
2999
  {
3000
3000
  key: "transcripts",
3001
3001
  label: "transcripts",
@@ -3020,7 +3020,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3020
3020
  children: [/* @__PURE__ */ O("main", {
3021
3021
  className: "cmg-d-main",
3022
3022
  children: [
3023
- o.length > 0 ? /* @__PURE__ */ O("section", {
3023
+ a.length > 0 ? /* @__PURE__ */ O("section", {
3024
3024
  className: "card cmg-share",
3025
3025
  "aria-labelledby": "cmg-share-h",
3026
3026
  children: [/* @__PURE__ */ D("h3", {
@@ -3030,7 +3030,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3030
3030
  }), /* @__PURE__ */ D(f, {
3031
3031
  label: "provider share",
3032
3032
  total: 100,
3033
- data: o.map((e) => ({
3033
+ data: a.map((e) => ({
3034
3034
  label: Te(e.id),
3035
3035
  value: e.pct
3036
3036
  }))
@@ -3041,7 +3041,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3041
3041
  overflow: "auto",
3042
3042
  maxWidth: "100%"
3043
3043
  },
3044
- children: /* @__PURE__ */ D(r, {
3044
+ children: /* @__PURE__ */ D(o, {
3045
3045
  title: "pending review",
3046
3046
  emptyLabel: "no shares awaiting review.",
3047
3047
  items: s.map((e) => ({
@@ -3052,7 +3052,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3052
3052
  }))
3053
3053
  })
3054
3054
  }) : null,
3055
- u.length > 0 ? /* @__PURE__ */ O("section", {
3055
+ l.length > 0 ? /* @__PURE__ */ O("section", {
3056
3056
  className: "card cmg-redact-sec",
3057
3057
  "aria-labelledby": "cmg-redact-h",
3058
3058
  children: [/* @__PURE__ */ O("div", {
@@ -3076,14 +3076,14 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3076
3076
  })]
3077
3077
  }), M ? /* @__PURE__ */ D("div", {
3078
3078
  className: "cmg-redact-list",
3079
- children: u.map((e) => /* @__PURE__ */ O("article", {
3079
+ children: l.map((e) => /* @__PURE__ */ O("article", {
3080
3080
  className: "cmg-redact",
3081
3081
  children: [
3082
3082
  /* @__PURE__ */ O("div", {
3083
3083
  className: "cmg-redact-head",
3084
3084
  children: [/* @__PURE__ */ D("span", {
3085
3085
  className: "cmg-redact-badges",
3086
- children: /* @__PURE__ */ D(d, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
3086
+ children: /* @__PURE__ */ D(n, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
3087
3087
  }), /* @__PURE__ */ D("span", {
3088
3088
  className: "cmg-redact-file mono",
3089
3089
  children: e.file || "unknown"
@@ -3150,7 +3150,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3150
3150
  }), " join as contributor"]
3151
3151
  }) : null
3152
3152
  ]
3153
- }) : p.length > 0 ? /* @__PURE__ */ O("table", {
3153
+ }) : u.length > 0 ? /* @__PURE__ */ O("table", {
3154
3154
  className: "dtable cmg-dtable",
3155
3155
  children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", { children: [
3156
3156
  /* @__PURE__ */ D("th", {
@@ -3179,7 +3179,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3179
3179
  scope: "col",
3180
3180
  children: "date"
3181
3181
  })
3182
- ] }) }), /* @__PURE__ */ D("tbody", { children: p.map((e) => /* @__PURE__ */ O("tr", { children: [
3182
+ ] }) }), /* @__PURE__ */ D("tbody", { children: u.map((e) => /* @__PURE__ */ O("tr", { children: [
3183
3183
  /* @__PURE__ */ D("td", { children: e.title || "untitled transcript" }),
3184
3184
  /* @__PURE__ */ D("td", {
3185
3185
  className: "mono",
@@ -3230,7 +3230,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3230
3230
  overflow: "auto",
3231
3231
  maxWidth: "100%"
3232
3232
  },
3233
- children: /* @__PURE__ */ D(e, {
3233
+ children: /* @__PURE__ */ D(p, {
3234
3234
  title: "members",
3235
3235
  roles: ["member", "contributor"],
3236
3236
  members: c.map((e) => ({