@ixo/editor 7.5.0 → 7.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,8 +107,8 @@ import "./chunk-NCSGIRRQ.js";
107
107
 
108
108
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
109
109
  import { SurveyModel } from "@ixo/surveys";
110
- import { ActionIcon as ActionIcon5, Box as Box5, Button as Button5, Checkbox, Divider as Divider2, Group as Group13, Loader as Loader3, ScrollArea as ScrollArea2, Stack as Stack13, Text as Text13, UnstyledButton as UnstyledButton5 } from "@mantine/core";
111
- import { IconArrowLeft, IconCheck as IconCheck9, IconRefresh as IconRefresh2 } from "@tabler/icons-react";
110
+ import { ActionIcon as ActionIcon6, Box as Box5, Button as Button5, Checkbox, Divider as Divider2, Group as Group13, Loader as Loader3, ScrollArea as ScrollArea2, Stack as Stack13, Text as Text13, UnstyledButton as UnstyledButton5 } from "@mantine/core";
111
+ import { IconArrowLeft, IconCheck as IconCheck10, IconRefresh as IconRefresh2 } from "@tabler/icons-react";
112
112
  import { default as React13, useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo3, useRef as useRef5, useState as useState10 } from "react";
113
113
 
114
114
  // src/mantine/blocks/action/actionTypes/evaluateClaim/AiChecksSection.tsx
@@ -480,32 +480,35 @@ var EngineBadge = ({ view, timeAgo }) => {
480
480
 
481
481
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EnginePromo.tsx
482
482
  import React4, { useState as useState2 } from "react";
483
- import { Button, Group as Group4, List, Modal, Paper, Stack as Stack4, Text as Text4, ThemeIcon } from "@mantine/core";
484
- import { IconChecklist, IconClipboardCheck, IconInnerShadowBottomRight, IconWand } from "@tabler/icons-react";
485
- var STEPS = [
486
- {
487
- icon: /* @__PURE__ */ React4.createElement(IconWand, { size: 16 }),
488
- title: "Create a flow",
489
- body: "In your entity, create a new flow \u2014 the same place you build your collection flows."
490
- },
491
- {
492
- icon: /* @__PURE__ */ React4.createElement(IconChecklist, { size: 16 }),
493
- title: 'Add "Claim Approval Rules"',
494
- body: "Write your approval rules in plain sentences \u2014 what gets a claim approved, rejected, or checked by a person. No code."
495
- },
496
- {
497
- icon: /* @__PURE__ */ React4.createElement(IconClipboardCheck, { size: 16 }),
498
- title: 'Add "Enable Evaluation Engine"',
499
- body: "Pick this claim collection (or wire it to your Claim Collection block, like the Collection Users and Collection Lifecycle flows do)."
500
- },
501
- {
502
- icon: /* @__PURE__ */ React4.createElement(IconInnerShadowBottomRight, { size: 16 }),
503
- title: "Slide to sign \u2014 done",
504
- body: "From then on the engine checks every new claim against your rules automatically. AI checks and fake-photo detection are optional extras you can switch on."
505
- }
506
- ];
507
- var EnginePromo = () => {
483
+ import { ActionIcon, Button, Code, CopyButton, Group as Group4, List, Modal, Paper, Stack as Stack4, Text as Text4, ThemeIcon, Tooltip as Tooltip3 } from "@mantine/core";
484
+ import { IconCheck as IconCheck3, IconCopy, IconFilePlus, IconInnerShadowBottomRight, IconPlayerPlay, IconPlugConnected, IconSignature } from "@tabler/icons-react";
485
+ var CopyValue = ({ value, label }) => /* @__PURE__ */ React4.createElement(Group4, { gap: 4, wrap: "nowrap", mt: 4 }, /* @__PURE__ */ React4.createElement(Code, { style: { overflowWrap: "anywhere" } }, value), /* @__PURE__ */ React4.createElement(CopyButton, { value, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React4.createElement(Tooltip3, { label: copied ? "Copied" : label }, /* @__PURE__ */ React4.createElement(ActionIcon, { size: "xs", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy, "aria-label": label }, copied ? /* @__PURE__ */ React4.createElement(IconCheck3, { size: 12 }) : /* @__PURE__ */ React4.createElement(IconCopy, { size: 12 })))));
486
+ var EnginePromo = ({ entityDid, collectionId }) => {
508
487
  const [open, setOpen] = useState2(false);
488
+ const collectionName = collectionId ? `#${collectionId}` : "this collection";
489
+ const collectionPhrase = collectionId ? `collection #${collectionId}` : "this collection";
490
+ const steps = [
491
+ {
492
+ icon: /* @__PURE__ */ React4.createElement(IconFilePlus, { size: 16 }),
493
+ title: "Create a template",
494
+ body: /* @__PURE__ */ React4.createElement(React4.Fragment, null, "Open your space's ", /* @__PURE__ */ React4.createElement("b", null, "Library"), " and click ", /* @__PURE__ */ React4.createElement("b", null, "New template"), ". Give it a name, for example \u201CConnect evaluation service\u201D.")
495
+ },
496
+ {
497
+ icon: /* @__PURE__ */ React4.createElement(IconPlugConnected, { size: 16 }),
498
+ title: 'Add the step "Connect evaluation service"',
499
+ body: /* @__PURE__ */ React4.createElement(React4.Fragment, null, "In the template, open the ", /* @__PURE__ */ React4.createElement("b", null, "Actions"), " tab, click ", /* @__PURE__ */ React4.createElement("b", null, "Add step"), " and search for ", /* @__PURE__ */ React4.createElement("b", null, "Connect evaluation service"), ". Choose ", /* @__PURE__ */ React4.createElement("b", null, "Enter manually"), " and paste", " ", entityDid ? "this entity DID:" : "the DID of the entity that owns this collection.", entityDid ? /* @__PURE__ */ React4.createElement(CopyValue, { value: entityDid, label: "Copy entity DID" }) : null, /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed", mt: 4, component: "div" }, "Click ", /* @__PURE__ */ React4.createElement("b", null, "Get Collections"), ", then pick the one ending in ", /* @__PURE__ */ React4.createElement("b", null, collectionName), "."))
500
+ },
501
+ {
502
+ icon: /* @__PURE__ */ React4.createElement(IconPlayerPlay, { size: 16 }),
503
+ title: 'Click "Go Flow" and open the flow',
504
+ body: /* @__PURE__ */ React4.createElement(React4.Fragment, null, "In the template's right panel, click ", /* @__PURE__ */ React4.createElement("b", null, "Go Flow"), ", keep or change the flow name, then click ", /* @__PURE__ */ React4.createElement("b", null, "Go Flow"), " again. Open the new flow.")
505
+ },
506
+ {
507
+ icon: /* @__PURE__ */ React4.createElement(IconSignature, { size: 16 }),
508
+ title: "Open the step, pick a service, slide to sign",
509
+ body: /* @__PURE__ */ React4.createElement(React4.Fragment, null, "Open the ", /* @__PURE__ */ React4.createElement("b", null, "Connect evaluation service"), " step and pick a service from the list. You'll see what it checks and what it costs before you sign. Then slide to sign.")
510
+ }
511
+ ];
509
512
  return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
510
513
  Paper,
511
514
  {
@@ -517,22 +520,22 @@ var EnginePromo = () => {
517
520
  background: "color-mix(in srgb, var(--mantine-color-accent-5) 6%, transparent)"
518
521
  }
519
522
  },
520
- /* @__PURE__ */ React4.createElement(Group4, { wrap: "nowrap", align: "flex-start", gap: "md" }, /* @__PURE__ */ React4.createElement(ThemeIcon, { variant: "light", size: 40, radius: "md" }, /* @__PURE__ */ React4.createElement(IconInnerShadowBottomRight, { size: 24 })), /* @__PURE__ */ React4.createElement(Stack4, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React4.createElement(Text4, { size: "sm", fw: 600 }, "Let the Evaluation Engine check these claims for you"), /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed" }, "The engine checks every new claim against your approval rules \u2014 automatically, the moment it arrives \u2014 and tells you exactly why it approved, rejected, or held each one. You only step in when a claim really needs a person."), /* @__PURE__ */ React4.createElement(Group4, { mt: 4 }, /* @__PURE__ */ React4.createElement(Button, { size: "xs", variant: "light", onClick: () => setOpen(true) }, "How to set it up"))))
521
- ), /* @__PURE__ */ React4.createElement(Modal, { opened: open, onClose: () => setOpen(false), title: "Set up the Evaluation Engine", size: "lg", centered: true, transitionProps: { duration: 0 } }, /* @__PURE__ */ React4.createElement(Stack4, { gap: "md" }, /* @__PURE__ */ React4.createElement(Text4, { size: "sm" }, "Four steps, once per collection \u2014 after that the engine works alone:"), /* @__PURE__ */ React4.createElement(List, { spacing: "md", size: "sm", center: false }, STEPS.map((step) => /* @__PURE__ */ React4.createElement(
523
+ /* @__PURE__ */ React4.createElement(Group4, { wrap: "nowrap", align: "flex-start", gap: "md" }, /* @__PURE__ */ React4.createElement(ThemeIcon, { variant: "light", size: 40, radius: "md" }, /* @__PURE__ */ React4.createElement(IconInnerShadowBottomRight, { size: 24 })), /* @__PURE__ */ React4.createElement(Stack4, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React4.createElement(Text4, { size: "sm", fw: 600 }, "Let an evaluation service check these claims"), /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed" }, "Hire an evaluation service. It checks every new claim as soon as it arrives, approves or rejects it, and tells you why. You only look at the claims it sends back to you."), /* @__PURE__ */ React4.createElement(Group4, { mt: 4 }, /* @__PURE__ */ React4.createElement(Button, { size: "xs", variant: "light", onClick: () => setOpen(true) }, "How to set it up"))))
524
+ ), /* @__PURE__ */ React4.createElement(Modal, { opened: open, onClose: () => setOpen(false), title: "Hire an evaluation service", size: "lg", centered: true, transitionProps: { duration: 0 } }, /* @__PURE__ */ React4.createElement(Stack4, { gap: "md" }, /* @__PURE__ */ React4.createElement(Text4, { size: "sm" }, "Four steps, once for ", collectionPhrase, ":"), /* @__PURE__ */ React4.createElement(List, { spacing: "md", size: "sm", center: false }, steps.map((step, index) => /* @__PURE__ */ React4.createElement(
522
525
  List.Item,
523
526
  {
524
527
  key: step.title,
525
528
  icon: /* @__PURE__ */ React4.createElement(ThemeIcon, { variant: "light", size: 28, radius: "xl" }, step.icon)
526
529
  },
527
- /* @__PURE__ */ React4.createElement(Text4, { size: "sm", fw: 600 }, step.title),
528
- /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed" }, step.body)
529
- ))), /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed" }, "Checking a claim costs $0.30, paid from your subscription credits. AI checks ($0.01 per AI rule) and fake-photo detection ($0.15 per photo) are optional."), /* @__PURE__ */ React4.createElement(Group4, { justify: "flex-end" }, /* @__PURE__ */ React4.createElement(Button, { variant: "default", size: "xs", onClick: () => setOpen(false) }, "Got it")))));
530
+ /* @__PURE__ */ React4.createElement(Text4, { size: "sm", fw: 600 }, index + 1, ". ", step.title),
531
+ /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed", component: "div" }, step.body)
532
+ ))), /* @__PURE__ */ React4.createElement(Text4, { size: "sm" }, /* @__PURE__ */ React4.createElement("b", null, "That's it."), " New claims are checked automatically. Claims the service can't decide alone come back here for you to review."), /* @__PURE__ */ React4.createElement(Text4, { size: "xs", c: "dimmed" }, "Want workers paid automatically? In the same step, choose how workers are paid."), /* @__PURE__ */ React4.createElement(Group4, { justify: "flex-end" }, /* @__PURE__ */ React4.createElement(Button, { variant: "default", size: "xs", onClick: () => setOpen(false) }, "Got it")))));
530
533
  };
531
534
 
532
535
  // src/mantine/blocks/action/actionTypes/evaluateClaim/FlowManagerAdvisorySections.tsx
533
536
  import React5, { useState as useState3 } from "react";
534
- import { ActionIcon, Badge, Group as Group5, Stack as Stack5, Text as Text5, Tooltip as Tooltip3 } from "@mantine/core";
535
- import { IconCheck as IconCheck3, IconLink as IconLink2, IconPencil, IconSparkles, IconUser, IconX as IconX3 } from "@tabler/icons-react";
537
+ import { ActionIcon as ActionIcon2, Badge, Group as Group5, Stack as Stack5, Text as Text5, Tooltip as Tooltip4 } from "@mantine/core";
538
+ import { IconCheck as IconCheck4, IconLink as IconLink2, IconPencil, IconSparkles, IconUser, IconX as IconX3 } from "@tabler/icons-react";
536
539
 
537
540
  // src/mantine/blocks/action/actionTypes/evaluateClaim/evaluationReportModel.ts
538
541
  var EVALUATION_REPORT_SERVICE_ROLE = "evaluation-report";
@@ -626,7 +629,7 @@ function ProvenanceHint({ provenance }) {
626
629
  const t = useTranslate();
627
630
  if (provenance !== "derived" && provenance !== "inferred" && provenance !== "human") return null;
628
631
  const hint = provenance === "human" ? { Icon: IconUser, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.human", { defaultValue: "Set by human" }) } : provenance === "derived" ? { Icon: IconLink2, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.derived", { defaultValue: "Derived from inputs" }) } : { Icon: IconSparkles, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.inferred", { defaultValue: "Inferred by LLM" }) };
629
- return /* @__PURE__ */ React5.createElement(Tooltip3, { label: hint.label, withArrow: true }, /* @__PURE__ */ React5.createElement("span", { style: { display: "inline-flex", alignItems: "center" }, "aria-label": hint.label }, icon(hint.Icon, 12, "var(--mantine-color-dimmed)")));
632
+ return /* @__PURE__ */ React5.createElement(Tooltip4, { label: hint.label, withArrow: true }, /* @__PURE__ */ React5.createElement("span", { style: { display: "inline-flex", alignItems: "center" }, "aria-label": hint.label }, icon(hint.Icon, 12, "var(--mantine-color-dimmed)")));
630
633
  }
631
634
  var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
632
635
  const t = useTranslate();
@@ -667,7 +670,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
667
670
  "aria-label": t("actionTypes.evaluateClaim.flow.flowManager.themeEditLabel", { defaultValue: "Edit theme" })
668
671
  }
669
672
  )), /* @__PURE__ */ React5.createElement(
670
- ActionIcon,
673
+ ActionIcon2,
671
674
  {
672
675
  variant: "subtle",
673
676
  color: "gray",
@@ -675,9 +678,9 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
675
678
  onClick: commitThemeEdit,
676
679
  "aria-label": t("actionTypes.evaluateClaim.flow.flowManager.saveTheme", { defaultValue: "Save theme" })
677
680
  },
678
- icon(IconCheck3, 14)
681
+ icon(IconCheck4, 14)
679
682
  ), /* @__PURE__ */ React5.createElement(
680
- ActionIcon,
683
+ ActionIcon2,
681
684
  {
682
685
  variant: "subtle",
683
686
  color: "gray",
@@ -687,7 +690,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
687
690
  },
688
691
  icon(IconX3, 14)
689
692
  )) : /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Text5, { size: "sm", style: { flex: 1, minWidth: 0 }, truncate: true }, theme), /* @__PURE__ */ React5.createElement(ProvenanceHint, { provenance: provenance.theme }), !disabled && /* @__PURE__ */ React5.createElement(
690
- ActionIcon,
693
+ ActionIcon2,
691
694
  {
692
695
  variant: "subtle",
693
696
  color: "gray",
@@ -727,8 +730,8 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
727
730
 
728
731
  // src/mantine/blocks/action/actionTypes/evaluateClaim/OracleDecisionOverlay.tsx
729
732
  import { default as React8, useEffect as useEffect2, useRef as useRef2, useState as useState6 } from "react";
730
- import { ActionIcon as ActionIcon2, Anchor, Button as Button4, CopyButton, Divider, Group as Group8, Stack as Stack8, Text as Text8, Tooltip as Tooltip4 } from "@mantine/core";
731
- import { IconCheck as IconCheck4, IconCopy, IconMinus as IconMinus2, IconShieldCheck, IconX as IconX4 } from "@tabler/icons-react";
733
+ import { ActionIcon as ActionIcon3, Anchor, Button as Button4, CopyButton as CopyButton2, Divider, Group as Group8, Stack as Stack8, Text as Text8, Tooltip as Tooltip5 } from "@mantine/core";
734
+ import { IconCheck as IconCheck5, IconCopy as IconCopy2, IconMinus as IconMinus2, IconShieldCheck, IconX as IconX4 } from "@tabler/icons-react";
732
735
 
733
736
  // src/mantine/blocks/action/actionTypes/evaluateClaim/OracleReviewAnswerForm.tsx
734
737
  import React7, { useState as useState5 } from "react";
@@ -898,7 +901,7 @@ function truncateCid(cid) {
898
901
  if (cid.length <= 20) return cid;
899
902
  return `${cid.slice(0, 10)}\u2026${cid.slice(-6)}`;
900
903
  }
901
- var CopyCid = ({ value }) => /* @__PURE__ */ React8.createElement(CopyButton, { value, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React8.createElement(Tooltip4, { label: copied ? "Copied" : "Copy receipt CID" }, /* @__PURE__ */ React8.createElement(ActionIcon2, { size: "xs", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy }, copied ? /* @__PURE__ */ React8.createElement(IconCheck4, { size: 12 }) : /* @__PURE__ */ React8.createElement(IconCopy, { size: 12 }))));
904
+ var CopyCid = ({ value }) => /* @__PURE__ */ React8.createElement(CopyButton2, { value, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React8.createElement(Tooltip5, { label: copied ? "Copied" : "Copy receipt CID" }, /* @__PURE__ */ React8.createElement(ActionIcon3, { size: "xs", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy }, copied ? /* @__PURE__ */ React8.createElement(IconCheck5, { size: 12 }) : /* @__PURE__ */ React8.createElement(IconCopy2, { size: 12 }))));
902
905
  var RECEIPT_FAILURE_COPY = {
903
906
  missing_input: "the receipt or the claim is missing.",
904
907
  not_found: "the engine has no receipt with this CID.",
@@ -919,7 +922,7 @@ var ReceiptCheckResult = ({ result }) => {
919
922
  result.oracleDid && t("actionTypes.evaluateClaim.receipt.oracle", { defaultValue: "Oracle: {{oracle}}", oracle: result.oracleDid }),
920
923
  result.issuedAt && t("actionTypes.evaluateClaim.receipt.issuedAt", { defaultValue: "Issued {{when}}", when: new Date(result.issuedAt).toLocaleString() })
921
924
  ].filter(Boolean);
922
- return /* @__PURE__ */ React8.createElement(Stack8, { gap: 2 }, /* @__PURE__ */ React8.createElement(Group8, { gap: 4, wrap: "nowrap", role: "status" }, icon(IconCheck4, 14, "var(--mantine-color-green-6)"), /* @__PURE__ */ React8.createElement(Text8, { size: "xs", fw: 600, c: "green" }, t("actionTypes.evaluateClaim.receipt.verified", { defaultValue: "Verified by IXO" }))), details.length > 0 && /* @__PURE__ */ React8.createElement(Text8, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, details.join(" \xB7 ")));
925
+ return /* @__PURE__ */ React8.createElement(Stack8, { gap: 2 }, /* @__PURE__ */ React8.createElement(Group8, { gap: 4, wrap: "nowrap", role: "status" }, icon(IconCheck5, 14, "var(--mantine-color-green-6)"), /* @__PURE__ */ React8.createElement(Text8, { size: "xs", fw: 600, c: "green" }, t("actionTypes.evaluateClaim.receipt.verified", { defaultValue: "Verified by IXO" }))), details.length > 0 && /* @__PURE__ */ React8.createElement(Text8, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, details.join(" \xB7 ")));
923
926
  }
924
927
  if (result.status === "failed") {
925
928
  return /* @__PURE__ */ React8.createElement(Group8, { gap: 4, wrap: "nowrap", role: "status" }, icon(IconX4, 14, "var(--mantine-color-red-6)"), /* @__PURE__ */ React8.createElement(Text8, { size: "xs", c: "red" }, t("actionTypes.evaluateClaim.receipt.failed", {
@@ -1142,7 +1145,7 @@ async function verifiedOracleReceiptProof(cid, claimId, verify) {
1142
1145
  // src/mantine/blocks/action/actionTypes/evaluateClaim/OutsideServicesSection.tsx
1143
1146
  import React9 from "react";
1144
1147
  import { Accordion as Accordion2, Badge as Badge2, Group as Group9, Stack as Stack9, Text as Text9 } from "@mantine/core";
1145
- import { IconAlertTriangle as IconAlertTriangle3, IconCheck as IconCheck5 } from "@tabler/icons-react";
1148
+ import { IconAlertTriangle as IconAlertTriangle3, IconCheck as IconCheck6 } from "@tabler/icons-react";
1146
1149
  function originOf(url) {
1147
1150
  try {
1148
1151
  return new URL(url).origin;
@@ -1150,13 +1153,13 @@ function originOf(url) {
1150
1153
  return url;
1151
1154
  }
1152
1155
  }
1153
- var OutsideServicesSection = ({ ext }) => /* @__PURE__ */ React9.createElement(Accordion2, { variant: "separated", radius: "md" }, Object.entries(ext).map(([name, fact]) => /* @__PURE__ */ React9.createElement(Accordion2.Item, { key: name, value: name }, /* @__PURE__ */ React9.createElement(Accordion2.Control, null, /* @__PURE__ */ React9.createElement(Group9, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React9.createElement(Text9, { size: "sm", fw: 500, style: { flex: 1, minWidth: 0 }, truncate: true }, name), fact.status === "ok" ? /* @__PURE__ */ React9.createElement(Badge2, { size: "sm", variant: "light", color: "green", leftSection: /* @__PURE__ */ React9.createElement(IconCheck5, { size: 10 }) }, "answered") : /* @__PURE__ */ React9.createElement(Badge2, { size: "sm", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React9.createElement(IconAlertTriangle3, { size: 10 }) }, "couldn't answer"))), /* @__PURE__ */ React9.createElement(Accordion2.Panel, null, /* @__PURE__ */ React9.createElement(Stack9, { gap: 4 }, /* @__PURE__ */ React9.createElement(Text9, { size: "xs", c: "dimmed" }, "We asked ", originOf(fact.transcript.request.url)), fact.status === "ok" ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Text9, { size: "sm" }, "Their answer: ", /* @__PURE__ */ React9.createElement("b", null, typeof fact.value === "boolean" ? fact.value ? "Yes" : "No" : `${Math.round(fact.value / 100)}/100`)), fact.reason && /* @__PURE__ */ React9.createElement(Text9, { size: "xs" }, fact.reason)) : /* @__PURE__ */ React9.createElement(Text9, { size: "sm", c: "dimmed" }, fact.onError === "reject" ? "They never answered, so the claim was rejected to stay safe." : "They never answered, so the claim is held for a person to look at."), /* @__PURE__ */ React9.createElement(Text9, { size: "xs", c: "dimmed" }, fact.transcript.attempts, " ", fact.transcript.attempts === 1 ? "try" : "tries", " \xB7 ", fact.transcript.elapsedMs, " ms"))))));
1156
+ var OutsideServicesSection = ({ ext }) => /* @__PURE__ */ React9.createElement(Accordion2, { variant: "separated", radius: "md" }, Object.entries(ext).map(([name, fact]) => /* @__PURE__ */ React9.createElement(Accordion2.Item, { key: name, value: name }, /* @__PURE__ */ React9.createElement(Accordion2.Control, null, /* @__PURE__ */ React9.createElement(Group9, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React9.createElement(Text9, { size: "sm", fw: 500, style: { flex: 1, minWidth: 0 }, truncate: true }, name), fact.status === "ok" ? /* @__PURE__ */ React9.createElement(Badge2, { size: "sm", variant: "light", color: "green", leftSection: /* @__PURE__ */ React9.createElement(IconCheck6, { size: 10 }) }, "answered") : /* @__PURE__ */ React9.createElement(Badge2, { size: "sm", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React9.createElement(IconAlertTriangle3, { size: 10 }) }, "couldn't answer"))), /* @__PURE__ */ React9.createElement(Accordion2.Panel, null, /* @__PURE__ */ React9.createElement(Stack9, { gap: 4 }, /* @__PURE__ */ React9.createElement(Text9, { size: "xs", c: "dimmed" }, "We asked ", originOf(fact.transcript.request.url)), fact.status === "ok" ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Text9, { size: "sm" }, "Their answer: ", /* @__PURE__ */ React9.createElement("b", null, typeof fact.value === "boolean" ? fact.value ? "Yes" : "No" : `${Math.round(fact.value / 100)}/100`)), fact.reason && /* @__PURE__ */ React9.createElement(Text9, { size: "xs" }, fact.reason)) : /* @__PURE__ */ React9.createElement(Text9, { size: "sm", c: "dimmed" }, fact.onError === "reject" ? "They never answered, so the claim was rejected to stay safe." : "They never answered, so the claim is held for a person to look at."), /* @__PURE__ */ React9.createElement(Text9, { size: "xs", c: "dimmed" }, fact.transcript.attempts, " ", fact.transcript.attempts === 1 ? "try" : "tries", " \xB7 ", fact.transcript.elapsedMs, " ms"))))));
1154
1157
 
1155
1158
  // src/mantine/blocks/action/actionTypes/evaluateClaim/TechnicalDetails.tsx
1156
1159
  import React10 from "react";
1157
- import { ActionIcon as ActionIcon3, Badge as Badge3, CopyButton as CopyButton2, Group as Group10, Paper as Paper2, ScrollArea, Stack as Stack10, Table, Text as Text10, Timeline, Tooltip as Tooltip5 } from "@mantine/core";
1158
- import { IconCheck as IconCheck6, IconCopy as IconCopy2 } from "@tabler/icons-react";
1159
- var CopyIcon = ({ value }) => /* @__PURE__ */ React10.createElement(CopyButton2, { value, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React10.createElement(Tooltip5, { label: copied ? "Copied" : "Copy" }, /* @__PURE__ */ React10.createElement(ActionIcon3, { size: "xs", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy }, copied ? /* @__PURE__ */ React10.createElement(IconCheck6, { size: 12 }) : /* @__PURE__ */ React10.createElement(IconCopy2, { size: 12 }))));
1160
+ import { ActionIcon as ActionIcon4, Badge as Badge3, CopyButton as CopyButton3, Group as Group10, Paper as Paper2, ScrollArea, Stack as Stack10, Table, Text as Text10, Timeline, Tooltip as Tooltip6 } from "@mantine/core";
1161
+ import { IconCheck as IconCheck7, IconCopy as IconCopy3 } from "@tabler/icons-react";
1162
+ var CopyIcon = ({ value }) => /* @__PURE__ */ React10.createElement(CopyButton3, { value, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React10.createElement(Tooltip6, { label: copied ? "Copied" : "Copy" }, /* @__PURE__ */ React10.createElement(ActionIcon4, { size: "xs", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy }, copied ? /* @__PURE__ */ React10.createElement(IconCheck7, { size: 12 }) : /* @__PURE__ */ React10.createElement(IconCopy3, { size: 12 }))));
1160
1163
  var IdRow = ({ label, value }) => value ? /* @__PURE__ */ React10.createElement(Group10, { gap: 6, wrap: "nowrap" }, /* @__PURE__ */ React10.createElement(Text10, { size: "xs", c: "dimmed", style: { width: 110, flexShrink: 0 } }, label), /* @__PURE__ */ React10.createElement(Text10, { size: "xs", style: { fontFamily: "monospace", wordBreak: "break-all", flex: 1 } }, value), /* @__PURE__ */ React10.createElement(CopyIcon, { value })) : null;
1161
1164
  var SubHead = ({ children }) => /* @__PURE__ */ React10.createElement(Text10, { size: "xs", fw: 600, c: "dimmed", tt: "uppercase" }, children);
1162
1165
  var JsonViewer = ({ label, value }) => {
@@ -1384,10 +1387,10 @@ function useOracleResolution(protocolDid, options) {
1384
1387
 
1385
1388
  // src/mantine/blocks/action/actionTypes/evaluateClaim/VerdictBlock.tsx
1386
1389
  import React11, { useState as useState9 } from "react";
1387
- import { ActionIcon as ActionIcon4, Badge as Badge4, Box as Box3, Group as Group11, Loader as Loader2, Stack as Stack11, Text as Text11, Tooltip as Tooltip6, UnstyledButton as UnstyledButton3 } from "@mantine/core";
1388
- import { IconAlertTriangle as IconAlertTriangle4, IconArrowRight, IconCheck as IconCheck7, IconMinus as IconMinus3, IconRefresh, IconX as IconX5 } from "@tabler/icons-react";
1390
+ import { ActionIcon as ActionIcon5, Badge as Badge4, Box as Box3, Group as Group11, Loader as Loader2, Stack as Stack11, Text as Text11, Tooltip as Tooltip7, UnstyledButton as UnstyledButton3 } from "@mantine/core";
1391
+ import { IconAlertTriangle as IconAlertTriangle4, IconArrowRight, IconCheck as IconCheck8, IconMinus as IconMinus3, IconRefresh, IconX as IconX5 } from "@tabler/icons-react";
1389
1392
  var TONE_COLOR3 = { positive: "green", attention: "yellow", negative: "red", neutral: "gray" };
1390
- var TONE_ICON2 = { positive: IconCheck7, attention: IconAlertTriangle4, negative: IconX5, neutral: IconMinus3 };
1393
+ var TONE_ICON2 = { positive: IconCheck8, attention: IconAlertTriangle4, negative: IconX5, neutral: IconMinus3 };
1391
1394
  function formatDate(value) {
1392
1395
  if (!value) return null;
1393
1396
  const date = new Date(value);
@@ -1499,14 +1502,14 @@ var VerdictBlock = ({
1499
1502
  disabled,
1500
1503
  onSubmit
1501
1504
  }
1502
- ), /* @__PURE__ */ React11.createElement(Group11, { justify: "space-between", align: "center", wrap: "nowrap", gap: "xs" }, /* @__PURE__ */ React11.createElement(Text11, { size: "xs", c: "dimmed", style: { flex: 1, minWidth: 0 } }, metaLine), /* @__PURE__ */ React11.createElement(Tooltip6, { label: updatedAt ? `Updated ${new Date(updatedAt).toLocaleTimeString()}` : "Loading\u2026" }, /* @__PURE__ */ React11.createElement(ActionIcon4, { size: "xs", variant: "subtle", color: "gray", onClick: onRefresh, "aria-label": "Refresh" }, /* @__PURE__ */ React11.createElement(IconRefresh, { size: 12 })))))
1505
+ ), /* @__PURE__ */ React11.createElement(Group11, { justify: "space-between", align: "center", wrap: "nowrap", gap: "xs" }, /* @__PURE__ */ React11.createElement(Text11, { size: "xs", c: "dimmed", style: { flex: 1, minWidth: 0 } }, metaLine), /* @__PURE__ */ React11.createElement(Tooltip7, { label: updatedAt ? `Updated ${new Date(updatedAt).toLocaleTimeString()}` : "Loading\u2026" }, /* @__PURE__ */ React11.createElement(ActionIcon5, { size: "xs", variant: "subtle", color: "gray", onClick: onRefresh, "aria-label": "Refresh" }, /* @__PURE__ */ React11.createElement(IconRefresh, { size: 12 })))))
1503
1506
  );
1504
1507
  };
1505
1508
 
1506
1509
  // src/mantine/blocks/action/actionTypes/evaluateClaim/WhyThisResult.tsx
1507
1510
  import React12 from "react";
1508
1511
  import { Badge as Badge5, Box as Box4, Group as Group12, Progress, Stack as Stack12, Text as Text12, UnstyledButton as UnstyledButton4 } from "@mantine/core";
1509
- import { IconAlertTriangle as IconAlertTriangle5, IconBan, IconChartBar, IconCheck as IconCheck8, IconClock, IconMinus as IconMinus4, IconUser as IconUser2, IconX as IconX6 } from "@tabler/icons-react";
1512
+ import { IconAlertTriangle as IconAlertTriangle5, IconBan, IconChartBar, IconCheck as IconCheck9, IconClock, IconMinus as IconMinus4, IconUser as IconUser2, IconX as IconX6 } from "@tabler/icons-react";
1510
1513
  var TONE_COLOR4 = { positive: "green", attention: "yellow", negative: "red", neutral: "gray" };
1511
1514
  var GATE_TONE = {
1512
1515
  passed: "positive",
@@ -1516,7 +1519,7 @@ var GATE_TONE = {
1516
1519
  unevaluated: "attention"
1517
1520
  };
1518
1521
  var GATE_ICON = {
1519
- passed: IconCheck8,
1522
+ passed: IconCheck9,
1520
1523
  failed: IconX6,
1521
1524
  skipped: IconMinus4,
1522
1525
  not_reached: IconClock,
@@ -2449,7 +2452,7 @@ var EvaluateClaimFlowDetail = ({
2449
2452
  const selectedClaimProfile = profilesByDid[selectedClaim.agentDid];
2450
2453
  const selectedDisplayName = selectedClaimProfile?.displayname || selectedClaim.agentDid || selectedClaim.agentAddress;
2451
2454
  const selectedAvatarLabel = (selectedClaimProfile?.displayname || selectedClaim.agentDid || selectedClaim.agentAddress || "?")[0]?.toUpperCase();
2452
- return /* @__PURE__ */ React13.createElement(Stack13, { gap: "md" }, /* @__PURE__ */ React13.createElement(Group13, { gap: "xs", align: "center" }, /* @__PURE__ */ React13.createElement(ActionIcon5, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React13.createElement(IconArrowLeft, { size: 16 })), /* @__PURE__ */ React13.createElement(Text13, { fw: 500, size: "sm", title: selectedClaim.claimId, truncate: true, style: { flex: 1, minWidth: 0 } }, t("actionTypes.claim.flow.claimNumber", { id: truncateId(selectedClaim.claimId), defaultValue: `Claim #${truncateId(selectedClaim.claimId)}` })), /* @__PURE__ */ React13.createElement(
2455
+ return /* @__PURE__ */ React13.createElement(Stack13, { gap: "md" }, /* @__PURE__ */ React13.createElement(Group13, { gap: "xs", align: "center" }, /* @__PURE__ */ React13.createElement(ActionIcon6, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React13.createElement(IconArrowLeft, { size: 16 })), /* @__PURE__ */ React13.createElement(Text13, { fw: 500, size: "sm", title: selectedClaim.claimId, truncate: true, style: { flex: 1, minWidth: 0 } }, t("actionTypes.claim.flow.claimNumber", { id: truncateId(selectedClaim.claimId), defaultValue: `Claim #${truncateId(selectedClaim.claimId)}` })), /* @__PURE__ */ React13.createElement(
2453
2456
  DownloadCsvButton,
2454
2457
  {
2455
2458
  onDownload: () => downloadClaimsCsv([selectedClaim], exportFileNames.claim(selectedClaim.claimId).csv),
@@ -2554,7 +2557,7 @@ var EvaluateClaimFlowDetail = ({
2554
2557
  {
2555
2558
  title: t("actionTypes.evaluateClaim.flow.section.outcome", { defaultValue: "Outcome" }),
2556
2559
  defaultOpen: true,
2557
- badge: /* @__PURE__ */ React13.createElement(React13.Fragment, null, outcomeTemplateJson && !outcomeComplete && !isClaimAlreadyEvaluated && /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "yellow" }, t("actionTypes.evaluateClaim.flow.outcome.requiredBadge", { defaultValue: "(required)" })), (outcomeComplete || isClaimAlreadyEvaluated) && /* @__PURE__ */ React13.createElement(IconCheck9, { size: 14, color: "var(--mantine-color-green-6)" }))
2560
+ badge: /* @__PURE__ */ React13.createElement(React13.Fragment, null, outcomeTemplateJson && !outcomeComplete && !isClaimAlreadyEvaluated && /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "yellow" }, t("actionTypes.evaluateClaim.flow.outcome.requiredBadge", { defaultValue: "(required)" })), (outcomeComplete || isClaimAlreadyEvaluated) && /* @__PURE__ */ React13.createElement(IconCheck10, { size: 14, color: "var(--mantine-color-green-6)" }))
2558
2561
  },
2559
2562
  outcomeTemplateLoading ? /* @__PURE__ */ React13.createElement(Group13, { gap: "xs" }, /* @__PURE__ */ React13.createElement(Loader3, { size: "xs" }), /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.loading", { defaultValue: "Loading evaluation template..." }))) : outcomeSurveyModel ? /* @__PURE__ */ React13.createElement(ScrollArea2, { h: 320 }, /* @__PURE__ */ React13.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.noTemplate", { defaultValue: "No evaluation template available." }))
2560
2563
  ), !isClaimAlreadyEvaluated && /* @__PURE__ */ React13.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.evaluation", { defaultValue: "Evaluation" }), defaultOpen: true }, /* @__PURE__ */ React13.createElement(Stack13, { gap: "md" }, /* @__PURE__ */ React13.createElement(Divider2, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), decision === "dispute" ? /* @__PURE__ */ React13.createElement(Stack13, { gap: "md" }, /* @__PURE__ */ React13.createElement(
@@ -2660,7 +2663,7 @@ var EvaluateClaimFlowDetail = ({
2660
2663
  },
2661
2664
  /* @__PURE__ */ React13.createElement(Text13, { size: "sm", fw: 500, c: activeFilter === tab.value ? "var(--mantine-color-text)" : "dimmed" }, tab.label)
2662
2665
  ))), /* @__PURE__ */ React13.createElement(Group13, { gap: 4, align: "center" }, /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "dimmed" }, claims.length, " claim", claims.length === 1 ? "" : "s", " \xB7 ", owedCount, " ", engineHasData ? "owed by you" : "pending"), engineSummaries.updatedAt && /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "dimmed" }, "Updated ", new Date(engineSummaries.updatedAt).toLocaleTimeString()), /* @__PURE__ */ React13.createElement(
2663
- ActionIcon5,
2666
+ ActionIcon6,
2664
2667
  {
2665
2668
  variant: "subtle",
2666
2669
  color: "gray",
@@ -2673,7 +2676,7 @@ var EvaluateClaimFlowDetail = ({
2673
2676
  }
2674
2677
  },
2675
2678
  /* @__PURE__ */ React13.createElement(IconRefresh2, { size: 16 })
2676
- ), /* @__PURE__ */ React13.createElement(DownloadCsvButton, { onDownload: handleDownloadClaimsCsv, disabled: loadingClaims || claims.length === 0, label: "Download claims CSV", onError: setError }), /* @__PURE__ */ React13.createElement(DownloadZipButton, { onDownload: handleDownloadClaimsZip, disabled: loadingClaims || claims.length === 0, label: "Download claims + media (ZIP)", onError: setError }))), engineSummaries.supported && engineSummaries.notEnrolled && !engineSummaries.engineUnavailable && /* @__PURE__ */ React13.createElement(EnginePromo, null), loadingClaims && /* @__PURE__ */ React13.createElement(Group13, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React13.createElement(Loader3, { size: "xs" }), /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.loadingClaims", { defaultValue: "Loading claims..." }))), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React13.createElement(Text13, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? t("actionTypes.evaluateClaim.flow.empty.allCollections", { defaultValue: "No claims available for this collection." }) : activeFilter === "owed" ? "No claims are waiting on you right now." : t("actionTypes.evaluateClaim.flow.empty.filtered", { filter: activeFilter, defaultValue: `No ${activeFilter} claims found.` })), filteredClaims.length > 0 && /* @__PURE__ */ React13.createElement(Stack13, { gap: 12 }, filteredClaims.map((claim) => {
2679
+ ), /* @__PURE__ */ React13.createElement(DownloadCsvButton, { onDownload: handleDownloadClaimsCsv, disabled: loadingClaims || claims.length === 0, label: "Download claims CSV", onError: setError }), /* @__PURE__ */ React13.createElement(DownloadZipButton, { onDownload: handleDownloadClaimsZip, disabled: loadingClaims || claims.length === 0, label: "Download claims + media (ZIP)", onError: setError }))), engineSummaries.supported && engineSummaries.notEnrolled && !engineSummaries.engineUnavailable && /* @__PURE__ */ React13.createElement(EnginePromo, { entityDid: deedDid, collectionId }), loadingClaims && /* @__PURE__ */ React13.createElement(Group13, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React13.createElement(Loader3, { size: "xs" }), /* @__PURE__ */ React13.createElement(Text13, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.loadingClaims", { defaultValue: "Loading claims..." }))), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React13.createElement(Text13, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? t("actionTypes.evaluateClaim.flow.empty.allCollections", { defaultValue: "No claims available for this collection." }) : activeFilter === "owed" ? "No claims are waiting on you right now." : t("actionTypes.evaluateClaim.flow.empty.filtered", { filter: activeFilter, defaultValue: `No ${activeFilter} claims found.` })), filteredClaims.length > 0 && /* @__PURE__ */ React13.createElement(Stack13, { gap: 12 }, filteredClaims.map((claim) => {
2677
2680
  const row = engineSummaries.byClaimId[claim.claimId];
2678
2681
  const view = rowViewByClaimId.get(claim.claimId) ?? { tone: "neutral", headline: "", owed: false, action: null, chain: null };
2679
2682
  const profile = profilesByDid[claim.agentDid];
@@ -2718,4 +2721,4 @@ var EvaluateClaimFlowDetail = ({
2718
2721
  export {
2719
2722
  EvaluateClaimFlowDetail
2720
2723
  };
2721
- //# sourceMappingURL=EvaluateClaimFlowDetail-AL6AL5FV.js.map
2724
+ //# sourceMappingURL=EvaluateClaimFlowDetail-EP6P4A3E.js.map