@arbidocs/blocks 0.4.70 → 0.4.72

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.
Files changed (179) hide show
  1. package/README.md +90 -14
  2. package/bin/arbidocs-copy-pdf-assets.mjs +112 -0
  3. package/dist/{StreamedArtifactEditor-OPL4KXOT.js → StreamedArtifactEditor-HTNPG4NB.js} +3 -2
  4. package/dist/StreamedArtifactEditor-HTNPG4NB.js.map +1 -0
  5. package/dist/{StreamedArtifactEditor-RIKG6CJQ.cjs → StreamedArtifactEditor-IZWYNFMM.cjs} +3 -2
  6. package/dist/StreamedArtifactEditor-IZWYNFMM.cjs.map +1 -0
  7. package/dist/agents/index.cjs +224 -224
  8. package/dist/agents/index.js +8 -8
  9. package/dist/artifacts/editor/index.cjs +1 -0
  10. package/dist/artifacts/editor/index.js +1 -0
  11. package/dist/artifacts/index.cjs +1 -0
  12. package/dist/artifacts/index.js +1 -0
  13. package/dist/auth/index.cjs +1 -0
  14. package/dist/auth/index.js +1 -0
  15. package/dist/calendar/CalendarGrid.d.ts +2 -0
  16. package/dist/calendar/CalendarList.d.ts +2 -0
  17. package/dist/calendar/CalendarSettingsForm.d.ts +2 -0
  18. package/dist/calendar/EventDetails.d.ts +2 -0
  19. package/dist/calendar/EventEditor.d.ts +2 -0
  20. package/dist/calendar/MiniMonth.d.ts +2 -0
  21. package/dist/calendar/RecurrenceEditor.d.ts +13 -0
  22. package/dist/calendar/RoomFinder.d.ts +2 -0
  23. package/dist/calendar/SchedulingAssistant.d.ts +2 -0
  24. package/dist/calendar/ScopeDialog.d.ts +2 -0
  25. package/dist/calendar/TimeZonePicker.d.ts +2 -0
  26. package/dist/calendar/colors.d.ts +4 -0
  27. package/dist/calendar/draft.d.ts +43 -0
  28. package/dist/calendar/format.d.ts +14 -0
  29. package/dist/calendar/grid-model.d.ts +24 -0
  30. package/dist/calendar/index.cjs +4122 -0
  31. package/dist/calendar/index.cjs.map +1 -0
  32. package/dist/calendar/index.d.ts +30 -0
  33. package/dist/calendar/index.js +4043 -0
  34. package/dist/calendar/index.js.map +1 -0
  35. package/dist/calendar/labels.d.ts +4 -0
  36. package/dist/calendar/recurrence-labels.d.ts +22 -0
  37. package/dist/calendar/recurrence.d.ts +66 -0
  38. package/dist/calendar/reminders.d.ts +26 -0
  39. package/dist/calendar/scheduling.d.ts +27 -0
  40. package/dist/calendar/types.d.ts +605 -0
  41. package/dist/calendar/ui.d.ts +16 -0
  42. package/dist/calendar/zone.d.ts +56 -0
  43. package/dist/chat/index.cjs +124 -123
  44. package/dist/chat/index.js +4 -3
  45. package/dist/{chunk-XNRGCQPZ.cjs → chunk-3SFFTSOI.cjs} +5 -5
  46. package/dist/{chunk-XNRGCQPZ.cjs.map → chunk-3SFFTSOI.cjs.map} +1 -1
  47. package/dist/{chunk-EHXSBH6U.js → chunk-5HOAOKZL.js} +4 -2
  48. package/dist/chunk-5HOAOKZL.js.map +1 -0
  49. package/dist/{chunk-7WM62NMM.cjs → chunk-6OL5S7MJ.cjs} +5 -2
  50. package/dist/chunk-6OL5S7MJ.cjs.map +1 -0
  51. package/dist/{chunk-VUEZARW5.cjs → chunk-B3WCKBJ7.cjs} +278 -5
  52. package/dist/chunk-B3WCKBJ7.cjs.map +1 -0
  53. package/dist/{chunk-L5UPP2HC.js → chunk-D46ZAPEE.js} +5 -2
  54. package/dist/chunk-D46ZAPEE.js.map +1 -0
  55. package/dist/chunk-DES3K4SD.cjs +18 -0
  56. package/dist/chunk-DES3K4SD.cjs.map +1 -0
  57. package/dist/{chunk-7M22KND4.cjs → chunk-DH7C2UJO.cjs} +10 -10
  58. package/dist/{chunk-7M22KND4.cjs.map → chunk-DH7C2UJO.cjs.map} +1 -1
  59. package/dist/{chunk-CXWESDIZ.cjs → chunk-F4RUCUXF.cjs} +6 -6
  60. package/dist/{chunk-CXWESDIZ.cjs.map → chunk-F4RUCUXF.cjs.map} +1 -1
  61. package/dist/{chunk-DABEWNL2.js → chunk-G5DP27DU.js} +3 -3
  62. package/dist/{chunk-DABEWNL2.js.map → chunk-G5DP27DU.js.map} +1 -1
  63. package/dist/{chunk-BR2CPKFU.cjs → chunk-G5QTGKDJ.cjs} +8 -8
  64. package/dist/{chunk-BR2CPKFU.cjs.map → chunk-G5QTGKDJ.cjs.map} +1 -1
  65. package/dist/{chunk-VZGBCBYB.js → chunk-GJV2G4FC.js} +276 -7
  66. package/dist/chunk-GJV2G4FC.js.map +1 -0
  67. package/dist/{chunk-HLMFU7L2.js → chunk-IMC2Z32C.js} +8 -8
  68. package/dist/{chunk-HLMFU7L2.js.map → chunk-IMC2Z32C.js.map} +1 -1
  69. package/dist/{chunk-5DM6VU4L.cjs → chunk-KJ3QEKOJ.cjs} +3 -3
  70. package/dist/{chunk-5DM6VU4L.cjs.map → chunk-KJ3QEKOJ.cjs.map} +1 -1
  71. package/dist/{chunk-CW4WXGEN.js → chunk-KOXUBCLL.js} +4 -4
  72. package/dist/{chunk-CW4WXGEN.js.map → chunk-KOXUBCLL.js.map} +1 -1
  73. package/dist/{chunk-ILGHS6ZV.js → chunk-SB5ZKOYN.js} +3 -3
  74. package/dist/{chunk-ILGHS6ZV.js.map → chunk-SB5ZKOYN.js.map} +1 -1
  75. package/dist/{chunk-TLQQV7WW.cjs → chunk-THO7DZNN.cjs} +4 -2
  76. package/dist/chunk-THO7DZNN.cjs.map +1 -0
  77. package/dist/{chunk-CPMNAJLF.js → chunk-TX2ZICS7.js} +24 -4
  78. package/dist/chunk-TX2ZICS7.js.map +1 -0
  79. package/dist/{chunk-2ZTONLT5.cjs → chunk-ULWRNGGE.cjs} +25 -4
  80. package/dist/chunk-ULWRNGGE.cjs.map +1 -0
  81. package/dist/{chunk-BMWZTNZB.js → chunk-VRPRAU3J.js} +3 -3
  82. package/dist/{chunk-BMWZTNZB.js.map → chunk-VRPRAU3J.js.map} +1 -1
  83. package/dist/chunk-VUNV25KB.js +15 -0
  84. package/dist/chunk-VUNV25KB.js.map +1 -0
  85. package/dist/citations/index.cjs +1 -0
  86. package/dist/citations/index.js +1 -0
  87. package/dist/collaboration/index.cjs +45 -45
  88. package/dist/collaboration/index.js +3 -3
  89. package/dist/connect/docx.cjs +3 -2
  90. package/dist/connect/docx.cjs.map +1 -1
  91. package/dist/connect/docx.js +2 -1
  92. package/dist/connect/docx.js.map +1 -1
  93. package/dist/connect/index.cjs +79 -49
  94. package/dist/connect/index.cjs.map +1 -1
  95. package/dist/connect/index.d.ts +1 -1
  96. package/dist/connect/index.js +39 -11
  97. package/dist/connect/index.js.map +1 -1
  98. package/dist/connection/ConnectedSettings.d.ts +13 -0
  99. package/dist/connection/ConnectionProvider.d.ts +5 -0
  100. package/dist/connection/types.d.ts +6 -0
  101. package/dist/document-tools/SignatureStatus.d.ts +4 -2
  102. package/dist/document-tools/index.cjs +14 -11
  103. package/dist/document-tools/index.cjs.map +1 -1
  104. package/dist/document-tools/index.js +12 -9
  105. package/dist/document-tools/index.js.map +1 -1
  106. package/dist/document-tools/production/ProductionSetDialog.d.ts +23 -0
  107. package/dist/document-tools/production/index.cjs +102 -0
  108. package/dist/document-tools/production/index.cjs.map +1 -0
  109. package/dist/document-tools/production/index.d.ts +1 -0
  110. package/dist/document-tools/production/index.js +100 -0
  111. package/dist/document-tools/production/index.js.map +1 -0
  112. package/dist/document-tools/viewer/index.cjs +1 -1
  113. package/dist/document-tools/viewer/index.js +1 -1
  114. package/dist/docx/index.cjs +1 -0
  115. package/dist/docx/index.cjs.map +1 -1
  116. package/dist/docx/index.js +1 -0
  117. package/dist/docx/index.js.map +1 -1
  118. package/dist/facts/index.cjs +3 -2
  119. package/dist/facts/index.cjs.map +1 -1
  120. package/dist/facts/index.js +3 -2
  121. package/dist/facts/index.js.map +1 -1
  122. package/dist/files/import/index.d.ts +0 -1
  123. package/dist/files/index.cjs +25 -88
  124. package/dist/files/index.cjs.map +1 -1
  125. package/dist/files/index.js +7 -68
  126. package/dist/files/index.js.map +1 -1
  127. package/dist/home/index.cjs +2 -1
  128. package/dist/home/index.cjs.map +1 -1
  129. package/dist/home/index.js +2 -1
  130. package/dist/home/index.js.map +1 -1
  131. package/dist/index.cjs +537 -537
  132. package/dist/index.js +14 -14
  133. package/dist/lib-6QPUXAQS.cjs +9674 -0
  134. package/dist/lib-6QPUXAQS.cjs.map +1 -0
  135. package/dist/lib-NRGL2JGF.js +9672 -0
  136. package/dist/lib-NRGL2JGF.js.map +1 -0
  137. package/dist/retrieval/index.cjs +1 -0
  138. package/dist/retrieval/index.js +1 -0
  139. package/dist/settings/Billing.d.ts +4 -0
  140. package/dist/settings/IdentityVerification.d.ts +83 -0
  141. package/dist/settings/PlanBadge.d.ts +2 -2
  142. package/dist/settings/PlanCard.d.ts +6 -1
  143. package/dist/settings/ProfileCard.d.ts +5 -1
  144. package/dist/settings/SubscriptionParts.d.ts +6 -2
  145. package/dist/settings/index.cjs +129 -95
  146. package/dist/settings/index.cjs.map +1 -1
  147. package/dist/settings/index.d.ts +1 -0
  148. package/dist/settings/index.js +65 -47
  149. package/dist/settings/index.js.map +1 -1
  150. package/dist/shell/ActionCluster.d.ts +3 -1
  151. package/dist/shell/index.cjs +56 -55
  152. package/dist/shell/index.js +4 -3
  153. package/dist/site/index.cjs +1 -0
  154. package/dist/site/index.js +1 -0
  155. package/dist/studio/index.cjs +8 -7
  156. package/dist/studio/index.cjs.map +1 -1
  157. package/dist/studio/index.js +6 -5
  158. package/dist/studio/index.js.map +1 -1
  159. package/dist/timeline/index.cjs +1 -0
  160. package/dist/timeline/index.js +1 -0
  161. package/dist/workspaces/index.cjs +3 -3
  162. package/dist/workspaces/index.js +2 -2
  163. package/package.json +35 -5
  164. package/src/calendar/calendar.css +316 -0
  165. package/dist/StreamedArtifactEditor-OPL4KXOT.js.map +0 -1
  166. package/dist/StreamedArtifactEditor-RIKG6CJQ.cjs.map +0 -1
  167. package/dist/chunk-2ZTONLT5.cjs.map +0 -1
  168. package/dist/chunk-7WM62NMM.cjs.map +0 -1
  169. package/dist/chunk-CPMNAJLF.js.map +0 -1
  170. package/dist/chunk-DCDVWPMB.cjs +0 -29
  171. package/dist/chunk-DCDVWPMB.cjs.map +0 -1
  172. package/dist/chunk-EHXSBH6U.js.map +0 -1
  173. package/dist/chunk-L5UPP2HC.js.map +0 -1
  174. package/dist/chunk-TJMKFY5P.js +0 -27
  175. package/dist/chunk-TJMKFY5P.js.map +0 -1
  176. package/dist/chunk-TLQQV7WW.cjs.map +0 -1
  177. package/dist/chunk-VUEZARW5.cjs.map +0 -1
  178. package/dist/chunk-VZGBCBYB.js.map +0 -1
  179. package/dist/files/import/CalendarImportRow.d.ts +0 -26
@@ -3,7 +3,7 @@
3
3
 
4
4
  var chunkADOKTJHV_cjs = require('./chunk-ADOKTJHV.cjs');
5
5
  var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
6
- var chunkDCDVWPMB_cjs = require('./chunk-DCDVWPMB.cjs');
6
+ var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
7
7
  var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
8
8
  var react = require('react');
9
9
  var lucideReact = require('lucide-react');
@@ -244,13 +244,15 @@ var DEFAULT_PROFILE_CARD_LABELS = {
244
244
  enterCodeHint: "Enter the 3-word code from the email we just sent.",
245
245
  confirm: "Confirm",
246
246
  resendIn: (seconds) => `Resend in ${seconds}s`,
247
- resendCode: "Resend code"
247
+ resendCode: "Resend code",
248
+ verifiedNameLocked: "Verified name. Remove your identity verification to change it."
248
249
  };
249
250
  function ProfileCard({
250
251
  avatar,
251
252
  name,
252
253
  email,
253
254
  isSso,
255
+ isVerified = false,
254
256
  onStartEmailChange,
255
257
  emailChange,
256
258
  ssoTooltip,
@@ -298,6 +300,12 @@ function ProfileCard({
298
300
  ),
299
301
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: name.onCancel, size: "sm", variant: "ghost", disabled: name.isSaving, children: l.cancel })
300
302
  ] })
303
+ ] }) : isVerified ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "-mx-2 w-full px-2 py-1", "data-testid": "verified-name", children: [
304
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
305
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate font-heading text-xl font-semibold text-foreground", children: name.display }),
306
+ /* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, { className: "h-4 w-4" })
307
+ ] }),
308
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: l.verifiedNameLocked })
301
309
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(
302
310
  "button",
303
311
  {
@@ -431,6 +439,267 @@ function ProfileCard({
431
439
  ] }) }) })
432
440
  ] });
433
441
  }
442
+ var DEFAULT_IDENTITY_VERIFICATION_LABELS = {
443
+ title: "Identity verification",
444
+ intro: "Check your ID once to get a verified tick next to your name.",
445
+ priceLine: (price, attempts) => `${price} \xB7 ${attempts} attempts`,
446
+ proOnly: "Available on Pro plans.",
447
+ seePlans: "See plans",
448
+ manageBilling: "Manage billing",
449
+ verify: "Verify identity",
450
+ continue: "Continue",
451
+ attemptsLeft: (n) => `${n} attempt${n === 1 ? "" : "s"} left`,
452
+ verified: "Verified",
453
+ verifiedDetail: (country) => `ID issued in ${country}`,
454
+ inReview: "Your check is being reviewed. We\u2019ll update this when it\u2019s done.",
455
+ finishName: "Your ID was verified. Confirm your name to get the tick.",
456
+ finish: "Finish",
457
+ remove: "Remove",
458
+ payTitle: "Verify your identity",
459
+ payBody: (price, attempts) => `A one-time fee of ${price} is charged to the card on your Pro plan. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,
460
+ pay: "Pay and continue",
461
+ confirmPayment: "Confirm payment with your bank",
462
+ paymentConfirmed: "I\u2019ve confirmed it",
463
+ verifyTitle: "Scan your ID",
464
+ embedFailed: "Your camera isn\u2019t available here. Continue in a new tab, then come back.",
465
+ openInNewTab: "Open in a new tab",
466
+ checkResult: "I\u2019ve finished",
467
+ resultVerified: "You\u2019re verified. The tick now shows next to your name.",
468
+ resultDeclined: (n) => n > 0 ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? "" : "s"} left.` : "We couldn\u2019t verify your ID and no attempts are left.",
469
+ tryAgain: "Try again",
470
+ resultInReview: "Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.",
471
+ nameMismatchTitle: "Your ID was verified",
472
+ nameMismatchBody: "The name on your ID differs from your account name. The tick shows only with the name on your ID.",
473
+ documentName: "Name on your ID",
474
+ accountName: "Account name",
475
+ useDocumentName: (name) => `Change my name to ${name}`,
476
+ keepName: "Keep my name",
477
+ close: "Close",
478
+ requiredTitle: "Identity verification required",
479
+ requiredBody: "This workspace requires a verified identity before you continue.",
480
+ requiredProOnly: "Identity verification is available on Pro plans. Ask your administrator."
481
+ };
482
+ function useLabels(labels) {
483
+ return react.useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels]);
484
+ }
485
+ var BILLING_CODES = [
486
+ "PRO_REQUIRED",
487
+ "PAYMENT_METHOD_REQUIRED",
488
+ "BILLING_ADDRESS_REQUIRED",
489
+ "PAYMENT_DECLINED"
490
+ ];
491
+ function Problem({
492
+ flow,
493
+ onManageBilling,
494
+ label
495
+ }) {
496
+ if (!flow.problem) return null;
497
+ const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? "");
498
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-testid": "identity-problem", children: [
499
+ /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: flow.problem.message }),
500
+ billing && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: label })
501
+ ] });
502
+ }
503
+ function IdentityVerificationCard({
504
+ flow,
505
+ onManageBilling,
506
+ labels
507
+ }) {
508
+ const l = useLabels(labels);
509
+ const { status } = flow;
510
+ if (!status?.enabled) return null;
511
+ const busy = flow.busy !== null;
512
+ let description;
513
+ let action = null;
514
+ if (status.verified) {
515
+ description = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
516
+ /* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, {}),
517
+ l.verified,
518
+ status.document_country && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
519
+ " \xB7 ",
520
+ l.verifiedDetail(status.document_country)
521
+ ] })
522
+ ] });
523
+ action = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "ghost", onClick: flow.remove, disabled: busy, children: l.remove });
524
+ } else if (!status.eligible) {
525
+ description = `${l.intro} ${l.proOnly}`;
526
+ action = onManageBilling ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: l.seePlans }) : null;
527
+ } else if (status.state === "in_review") {
528
+ description = l.inReview;
529
+ } else if (status.state === "name_mismatch") {
530
+ description = l.finishName;
531
+ action = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", onClick: flow.open, children: l.finish });
532
+ } else {
533
+ const resuming = status.attempts_left > 0 || status.state === "in_progress";
534
+ description = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
535
+ l.intro,
536
+ " ",
537
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: resuming ? l.attemptsLeft(status.attempts_left) : l.priceLine(flow.price ?? "", status.attempts_per_fee) })
538
+ ] });
539
+ action = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { size: "sm", onClick: flow.open, disabled: busy, children: [
540
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "mr-1 h-4 w-4" }),
541
+ resuming ? l.continue : l.verify
542
+ ] });
543
+ }
544
+ return /* @__PURE__ */ jsxRuntime.jsxs(SettingsCard, { padding: "sm", "data-testid": "identity-verification-card", children: [
545
+ /* @__PURE__ */ jsxRuntime.jsx(SettingsRow, { label: l.title, description, children: action }),
546
+ !flow.isOpen && /* @__PURE__ */ jsxRuntime.jsx(Problem, { flow, onManageBilling, label: l.manageBilling })
547
+ ] });
548
+ }
549
+ function IdentityVerificationDialog({
550
+ flow,
551
+ accountName,
552
+ dismissible = true,
553
+ onManageBilling,
554
+ labels
555
+ }) {
556
+ const l = useLabels(labels);
557
+ const { status } = flow;
558
+ const attempts = status?.attempts_per_fee ?? 0;
559
+ const docName = [status?.document_given_name, status?.document_family_name].filter(Boolean).join(" ");
560
+ const spinner = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1 h-4 w-4 animate-spin" });
561
+ let body;
562
+ let footer = null;
563
+ if (flow.step === "pay") {
564
+ body = flow.paymentUrl ? /* @__PURE__ */ jsxRuntime.jsxs(
565
+ "a",
566
+ {
567
+ href: flow.paymentUrl,
568
+ target: "_blank",
569
+ rel: "noopener noreferrer",
570
+ className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
571
+ children: [
572
+ l.confirmPayment,
573
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-3.5 w-3.5" })
574
+ ]
575
+ }
576
+ ) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.payBody(flow.price ?? "", attempts) });
577
+ footer = flow.paymentUrl ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.recheckPayment, disabled: flow.busy !== null, children: [
578
+ flow.busy === "start" && spinner,
579
+ l.paymentConfirmed
580
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.pay, disabled: flow.busy !== null, "data-testid": "identity-pay", children: [
581
+ flow.busy === "pay" && spinner,
582
+ l.pay
583
+ ] });
584
+ } else if (flow.step === "verify") {
585
+ body = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: flow.embedFailed ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.embedFailed }) : /* @__PURE__ */ jsxRuntime.jsx(
586
+ "div",
587
+ {
588
+ id: flow.verifyContainerId,
589
+ ref: flow.verifyContainerRef,
590
+ className: "h-[560px] w-full overflow-hidden rounded-md bg-muted",
591
+ "data-testid": "identity-didit-frame",
592
+ children: flow.busy === "start" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })
593
+ }
594
+ ) });
595
+ footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
596
+ flow.embedFailed && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "outline", onClick: flow.openInNewTab, children: [
597
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "mr-1 h-4 w-4" }),
598
+ l.openInNewTab
599
+ ] }),
600
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "ghost", onClick: flow.checkResult, disabled: flow.busy !== null, children: [
601
+ flow.busy === "refresh" && spinner,
602
+ l.checkResult
603
+ ] })
604
+ ] });
605
+ } else if (status?.state === "name_mismatch") {
606
+ body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", "data-testid": "identity-name-mismatch", children: [
607
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.nameMismatchBody }),
608
+ /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm", children: [
609
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: l.documentName }),
610
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium", children: docName }),
611
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: l.accountName }),
612
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: accountName })
613
+ ] })
614
+ ] });
615
+ footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
616
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", onClick: flow.keepName, disabled: flow.busy !== null, children: l.keepName }),
617
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.acceptName, disabled: flow.busy !== null || !docName, children: [
618
+ flow.busy === "accept" && spinner,
619
+ l.useDocumentName(docName)
620
+ ] })
621
+ ] });
622
+ } else if (status?.verified) {
623
+ body = /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm", children: [
624
+ /* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, { className: "h-4 w-4" }),
625
+ l.resultVerified
626
+ ] });
627
+ footer = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
628
+ } else if (status?.state === "in_review") {
629
+ body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.resultInReview });
630
+ footer = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
631
+ } else {
632
+ const left = status?.attempts_left ?? 0;
633
+ body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.resultDeclined(left) });
634
+ footer = left > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.retry, disabled: flow.busy !== null, children: l.tryAgain }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
635
+ }
636
+ const title = status?.state === "name_mismatch" && flow.step === "result" ? l.nameMismatchTitle : flow.step === "verify" ? l.verifyTitle : l.payTitle;
637
+ return /* @__PURE__ */ jsxRuntime.jsxs(
638
+ chunkULWRNGGE_cjs.ModalScaffold,
639
+ {
640
+ open: flow.isOpen,
641
+ onOpenChange: (open) => open ? flow.open() : flow.close(),
642
+ title,
643
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "h-5 w-5" }),
644
+ size: flow.step === "verify" ? "lg" : "md",
645
+ dismissible,
646
+ testId: "identity-verification-dialog",
647
+ children: [
648
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalScaffold.Body, { children: [
649
+ body,
650
+ /* @__PURE__ */ jsxRuntime.jsx(Problem, { flow, onManageBilling, label: l.manageBilling })
651
+ ] }),
652
+ /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Footer, { children: footer })
653
+ ]
654
+ }
655
+ );
656
+ }
657
+ function RequireVerified({
658
+ flow,
659
+ accountName,
660
+ onManageBilling,
661
+ children,
662
+ labels
663
+ }) {
664
+ const l = useLabels(labels);
665
+ const { status } = flow;
666
+ const blocked = Boolean(status?.enabled && status.required && !status.verified);
667
+ if (!blocked || !status) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
668
+ if (flow.isOpen) {
669
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
670
+ children,
671
+ /* @__PURE__ */ jsxRuntime.jsx(
672
+ IdentityVerificationDialog,
673
+ {
674
+ flow,
675
+ accountName,
676
+ dismissible: false,
677
+ onManageBilling,
678
+ labels
679
+ }
680
+ )
681
+ ] });
682
+ }
683
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
684
+ children,
685
+ /* @__PURE__ */ jsxRuntime.jsxs(
686
+ chunkULWRNGGE_cjs.ModalScaffold,
687
+ {
688
+ open: true,
689
+ onOpenChange: () => {
690
+ },
691
+ title: l.requiredTitle,
692
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "h-5 w-5" }),
693
+ dismissible: false,
694
+ testId: "identity-required-gate",
695
+ children: [
696
+ /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: status.eligible ? l.requiredBody : l.requiredProOnly }) }),
697
+ status.eligible && /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.open, children: l.verify }) })
698
+ ]
699
+ }
700
+ )
701
+ ] });
702
+ }
434
703
  var DEFAULT_PASSWORD_CHANGE_DIALOG_LABELS = {
435
704
  setNewPasswordTitle: "Set New Password",
436
705
  changeMasterPasswordTitle: "Change Master Password",
@@ -895,7 +1164,7 @@ function LogoutDialog({
895
1164
  }) {
896
1165
  const l = react.useMemo(() => ({ ...DEFAULT_LOGOUT_DIALOG_LABELS, ...labels }), [labels]);
897
1166
  const [sessionsOpen, setSessionsOpen] = react.useState(false);
898
- const restoreFocus = chunkDCDVWPMB_cjs.useRestoreFocus();
1167
+ const restoreFocus = chunkULWRNGGE_cjs.useRestoreFocus();
899
1168
  return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange: (next) => !next && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(
900
1169
  ui.DialogContent,
901
1170
  {
@@ -1158,6 +1427,7 @@ exports.AvatarPicker = AvatarPicker;
1158
1427
  exports.DEFAULT_ACTIVE_SESSIONS_DIALOG_LABELS = DEFAULT_ACTIVE_SESSIONS_DIALOG_LABELS;
1159
1428
  exports.DEFAULT_AVATAR_PICKER_LABELS = DEFAULT_AVATAR_PICKER_LABELS;
1160
1429
  exports.DEFAULT_DELETE_ACCOUNT_DIALOG_LABELS = DEFAULT_DELETE_ACCOUNT_DIALOG_LABELS;
1430
+ exports.DEFAULT_IDENTITY_VERIFICATION_LABELS = DEFAULT_IDENTITY_VERIFICATION_LABELS;
1161
1431
  exports.DEFAULT_LOGOUT_DIALOG_LABELS = DEFAULT_LOGOUT_DIALOG_LABELS;
1162
1432
  exports.DEFAULT_PASSWORD_CHANGE_DIALOG_LABELS = DEFAULT_PASSWORD_CHANGE_DIALOG_LABELS;
1163
1433
  exports.DEFAULT_PROFILE_CARD_LABELS = DEFAULT_PROFILE_CARD_LABELS;
@@ -1165,10 +1435,13 @@ exports.DEFAULT_SETTINGS_DANGER_ZONE_LABELS = DEFAULT_SETTINGS_DANGER_ZONE_LABEL
1165
1435
  exports.DeleteAccountDialog = DeleteAccountDialog;
1166
1436
  exports.EMAIL_NOTIFICATION_CATEGORIES = EMAIL_NOTIFICATION_CATEGORIES;
1167
1437
  exports.EMAIL_NOTIFICATION_KEYS = EMAIL_NOTIFICATION_KEYS;
1438
+ exports.IdentityVerificationCard = IdentityVerificationCard;
1439
+ exports.IdentityVerificationDialog = IdentityVerificationDialog;
1168
1440
  exports.LogoutDialog = LogoutDialog;
1169
1441
  exports.NotificationCategoryList = NotificationCategoryList;
1170
1442
  exports.PasswordChangeDialog = PasswordChangeDialog;
1171
1443
  exports.ProfileCard = ProfileCard;
1444
+ exports.RequireVerified = RequireVerified;
1172
1445
  exports.SettingsActionRow = SettingsActionRow;
1173
1446
  exports.SettingsCard = SettingsCard;
1174
1447
  exports.SettingsDangerZone = SettingsDangerZone;
@@ -1182,5 +1455,5 @@ exports.toActiveSessionViews = toActiveSessionViews;
1182
1455
  exports.toDeleteBlockerViews = toDeleteBlockerViews;
1183
1456
  exports.toLogoutSessionViews = toLogoutSessionViews;
1184
1457
  exports.toNotificationCategories = toNotificationCategories;
1185
- //# sourceMappingURL=chunk-VUEZARW5.cjs.map
1186
- //# sourceMappingURL=chunk-VUEZARW5.cjs.map
1458
+ //# sourceMappingURL=chunk-B3WCKBJ7.cjs.map
1459
+ //# sourceMappingURL=chunk-B3WCKBJ7.cjs.map