@alfadocs/ui-kit 1.134.0 → 1.136.0

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 (205) hide show
  1. package/dist/_chunks/{ai-prompt-input-JIPbrTF3.js → ai-prompt-input-CVNeusoW.js} +2 -2
  2. package/dist/_chunks/ai-summary-panel-BhCo2vZF.js +1045 -0
  3. package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CVBlKur9.js} +4 -4
  4. package/dist/_chunks/{anamnesis-summary-rows-CCNmkq55.js → anamnesis-summary-rows-Dr2V1Rtf.js} +3 -3
  5. package/dist/_chunks/{appointment-card-DG3m9yN-.js → appointment-card-BT1cMZIX.js} +2 -2
  6. package/dist/_chunks/{appointment-peek-BK0tDs4C.js → appointment-peek-BP_ACFz5.js} +2 -2
  7. package/dist/_chunks/{appointment-timeline-BiI2riRZ.js → appointment-timeline-Dy4YQJ17.js} +2 -2
  8. package/dist/_chunks/{appointment-tray-ClJCtYQj.js → appointment-tray-B3gSHL1j.js} +2 -2
  9. package/dist/_chunks/{audio-recorder-CsnM_WDy.js → audio-recorder-BOF5YYoC.js} +2 -2
  10. package/dist/_chunks/{balance-badge-cell-DTiMdnCZ.js → balance-badge-cell-BSB02Bwo.js} +4 -4
  11. package/dist/_chunks/{bill-line-table-DHKb_O7c.js → bill-line-table-By-YL2ms.js} +2 -2
  12. package/dist/_chunks/{bishop-score-CKztphVz.js → bishop-score-DWGESRP9.js} +2 -2
  13. package/dist/_chunks/{calendar-appointment-editor-dialog-BSkIYGlW.js → calendar-appointment-editor-dialog-CB4cQOtc.js} +10 -10
  14. package/dist/_chunks/call-status-chip-pajxN5eZ.js +180 -0
  15. package/dist/_chunks/calls-panel-BIfatK90.js +1094 -0
  16. package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
  17. package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-BmvnuZqj.js} +112 -106
  18. package/dist/_chunks/{chat-message-CfIyXrxA.js → chat-message-B4TMeZ2m.js} +35 -30
  19. package/dist/_chunks/circle-x-W8Enq3i4.js +16 -0
  20. package/dist/_chunks/communications-panel-SQ-55e3V.js +1079 -0
  21. package/dist/_chunks/{data-grid-B2oaI7Lt.js → data-grid-CxKz8flO.js} +2 -2
  22. package/dist/_chunks/{data-table-FTV3uRjX.js → data-table-_tgj0C_T.js} +2 -2
  23. package/dist/_chunks/{default-tabs-DbebYO04.js → default-tabs-oDWQzbN7.js} +3 -3
  24. package/dist/_chunks/{document-preview-DLVIrOYV.js → document-preview-DWlejd8A.js} +2 -2
  25. package/dist/_chunks/entity-summary-CPUHzyil.js +297 -0
  26. package/dist/_chunks/{file-manager-Bzr5NK1t.js → file-manager-CEi4z2i0.js} +2 -2
  27. package/dist/_chunks/{gestational-age-calculator-mB6brTlp.js → gestational-age-calculator-CHbpC4vL.js} +2 -2
  28. package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
  29. package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
  30. package/dist/_chunks/{heatmap-C5gJin_F.js → heatmap-_546qI2V.js} +2 -2
  31. package/dist/_chunks/{invoice-upload-list-B5aMffTy.js → invoice-upload-list-CQI9MUl6.js} +3 -3
  32. package/dist/_chunks/{kit-extensions-DUaIYyMD.js → kit-extensions-BNBf4m8O.js} +3 -3
  33. package/dist/_chunks/{link-cell-renderer-D3JLPURZ.js → link-cell-renderer-Xx5T8u5Q.js} +3 -3
  34. package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
  35. package/dist/_chunks/{muscle-scheme-BGJD62op.js → muscle-scheme-D_rSyGDj.js} +2 -2
  36. package/dist/_chunks/{notes-panel-BAyPOr8N.js → notes-panel-BvjAo4RQ.js} +5 -4
  37. package/dist/_chunks/{optical-prescription-Da_r8pMr.js → optical-prescription-DaSbsh4p.js} +2 -2
  38. package/dist/_chunks/{patient-account-settings-BkAtIxJW.js → patient-account-settings-Bmfeclpd.js} +3 -3
  39. package/dist/_chunks/{patient-card-DTh3QTyS.js → patient-card-Cpr8iD19.js} +4 -4
  40. package/dist/_chunks/{patient-check-in-resume-xhqjC6gf.js → patient-check-in-resume-CYZ-SvsF.js} +41 -41
  41. package/dist/_chunks/{patient-details-DBtEITfE.js → patient-details-9eh9cNy7.js} +2 -2
  42. package/dist/_chunks/{patient-field-row-a5d4QijH.js → patient-field-row-B782eT0C.js} +2 -2
  43. package/dist/_chunks/{patient-sign-in-pin-CDBqV254.js → patient-sign-in-pin-DmMBwWet.js} +2 -2
  44. package/dist/_chunks/{patient-sign-in-steps-C2JSqlok.js → patient-sign-in-steps-BKcxNkdY.js} +37 -59
  45. package/dist/_chunks/{patient-summary-card-Bl2NknPe.js → patient-summary-card-K9zaMl1O.js} +2 -2
  46. package/dist/_chunks/phone-off-DQSTLz4l.js +28 -0
  47. package/dist/_chunks/{portal-details-CTEsm705.js → portal-details-DCIiGkHA.js} +2 -2
  48. package/dist/_chunks/{portal-documents-D8skew0h.js → portal-documents-DVKj6Sco.js} +4 -4
  49. package/dist/_chunks/{portal-parts-BdR29P7z.js → portal-parts-Br8wuala.js} +2 -2
  50. package/dist/_chunks/{pregnancy-dating-BNI32qNw.js → pregnancy-dating-lJbzai73.js} +2 -2
  51. package/dist/_chunks/{registration-form-DS3RuKHu.js → registration-form-CuLiTA52.js} +2 -2
  52. package/dist/_chunks/{reserved.agent-DOzOBUW7.js → reserved.agent-CabZHFJC.js} +2 -2
  53. package/dist/_chunks/{select-uESzXTX6.js → select-CIXKyUMw.js} +172 -149
  54. package/dist/_chunks/{session-countdown-DOx1IBUB.js → session-countdown-StcyUU5O.js} +56 -66
  55. package/dist/_chunks/{signature-request-CHsM_iWi.js → signature-request-vJDSHZld.js} +2 -2
  56. package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
  57. package/dist/_chunks/{tabs-CRIDBLP7.js → tabs-Czkmw5ou.js} +2 -2
  58. package/dist/_chunks/{task-editor-g1AGfxhr.js → task-editor-BfXSn6U1.js} +4 -3
  59. package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-DbtJS4QI.js} +156 -172
  60. package/dist/_chunks/{toolbar-CfdoJzMV.js → toolbar-DjG-cpD_.js} +2 -2
  61. package/dist/_chunks/{unit-converter-YKlHyUC2.js → unit-converter-CUAUTu2B.js} +2 -2
  62. package/dist/_chunks/{use-appointment-details-read-Dzc6fEzG.js → use-appointment-details-read-7J0j1FP7.js} +111 -110
  63. package/dist/_chunks/{voice-control-panel-Be_c0CQ0.js → voice-control-panel-Cp4vs1iy.js} +2 -2
  64. package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
  65. package/dist/agent-catalog.json +528 -2
  66. package/dist/agent-i18n/en.json +51 -1
  67. package/dist/browser-support.js +1 -1
  68. package/dist/components/_shared/sms-segments.d.ts +43 -0
  69. package/dist/components/ai-prompt-input/index.js +1 -1
  70. package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
  71. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +134 -0
  72. package/dist/components/ai-summary-panel/index.d.ts +4 -0
  73. package/dist/components/ai-summary-panel/index.js +6 -0
  74. package/dist/components/ai-summary-panel/summary-markdown.d.ts +15 -0
  75. package/dist/components/appointment-card/index.js +2 -2
  76. package/dist/components/appointment-details-panel/index.js +1 -1
  77. package/dist/components/appointment-peek/index.js +1 -1
  78. package/dist/components/appointment-timeline/index.js +1 -1
  79. package/dist/components/audio-recorder/index.js +1 -1
  80. package/dist/components/bill-line-table/index.js +1 -1
  81. package/dist/components/bill-table/index.js +1 -1
  82. package/dist/components/bishop-score/index.js +1 -1
  83. package/dist/components/booking/index.js +1 -1
  84. package/dist/components/call-status-chip/call-status-chip.d.ts +30 -0
  85. package/dist/components/call-status-chip/index.d.ts +3 -0
  86. package/dist/components/call-status-chip/index.js +5 -0
  87. package/dist/components/calls-panel/calls-panel.agent.d.ts +4 -0
  88. package/dist/components/calls-panel/calls-panel.d.ts +153 -0
  89. package/dist/components/calls-panel/index.d.ts +4 -0
  90. package/dist/components/calls-panel/index.js +6 -0
  91. package/dist/components/chat-container/chat-container.d.ts +7 -0
  92. package/dist/components/chat-container/index.js +1 -1
  93. package/dist/components/chat-input/chat-input.d.ts +20 -0
  94. package/dist/components/chat-input/index.js +1 -1
  95. package/dist/components/chat-message/index.js +1 -1
  96. package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
  97. package/dist/components/communications-panel/communications-panel.d.ts +148 -0
  98. package/dist/components/communications-panel/index.d.ts +6 -0
  99. package/dist/components/communications-panel/index.js +7 -0
  100. package/dist/components/data-grid/index.js +2 -2
  101. package/dist/components/data-table/index.js +2 -2
  102. package/dist/components/document-preview/index.js +1 -1
  103. package/dist/components/entity-summary/entity-summary.d.ts +37 -1
  104. package/dist/components/entity-summary/index.js +1 -1
  105. package/dist/components/file-manager/index.js +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/heatmap/index.js +1 -1
  108. package/dist/components/index.d.ts +4 -0
  109. package/dist/components/invoice-upload-list/index.js +1 -1
  110. package/dist/components/muscle-scheme/index.js +1 -1
  111. package/dist/components/notes-panel/index.js +1 -1
  112. package/dist/components/optical-prescription/index.js +1 -1
  113. package/dist/components/patient-details/index.js +1 -1
  114. package/dist/components/patient-summary-card/index.js +1 -1
  115. package/dist/components/patient-table/index.js +1 -1
  116. package/dist/components/pregnancy-dating/index.js +1 -1
  117. package/dist/components/rich-text-editor/index.js +1 -1
  118. package/dist/components/select/index.js +1 -1
  119. package/dist/components/select/select.d.ts +8 -0
  120. package/dist/components/session-countdown/index.js +1 -1
  121. package/dist/components/skeleton-scheme/index.js +1 -1
  122. package/dist/components/tabs/index.js +1 -1
  123. package/dist/components/task-editor/index.js +1 -1
  124. package/dist/components/tasks-panel/index.js +1 -1
  125. package/dist/components/unit-converter/index.js +1 -1
  126. package/dist/components/voice-control-panel/index.js +1 -1
  127. package/dist/components/workflow-status/index.js +1 -1
  128. package/dist/core.css +1 -1
  129. package/dist/host-compat.css +13 -4
  130. package/dist/i18n/locales/ar.d.ts +162 -0
  131. package/dist/i18n/locales/ar.js +163 -0
  132. package/dist/i18n/locales/de.d.ts +162 -0
  133. package/dist/i18n/locales/de.js +163 -0
  134. package/dist/i18n/locales/el.d.ts +162 -0
  135. package/dist/i18n/locales/el.js +163 -0
  136. package/dist/i18n/locales/en.d.ts +162 -0
  137. package/dist/i18n/locales/en.js +163 -0
  138. package/dist/i18n/locales/es.d.ts +162 -0
  139. package/dist/i18n/locales/es.js +163 -0
  140. package/dist/i18n/locales/fr.d.ts +162 -0
  141. package/dist/i18n/locales/fr.js +163 -0
  142. package/dist/i18n/locales/hi.d.ts +162 -0
  143. package/dist/i18n/locales/hi.js +163 -0
  144. package/dist/i18n/locales/it.d.ts +162 -0
  145. package/dist/i18n/locales/it.js +163 -0
  146. package/dist/i18n/locales/ja.d.ts +162 -0
  147. package/dist/i18n/locales/ja.js +163 -0
  148. package/dist/i18n/locales/nl.d.ts +162 -0
  149. package/dist/i18n/locales/nl.js +163 -0
  150. package/dist/i18n/locales/pl.d.ts +162 -0
  151. package/dist/i18n/locales/pl.js +163 -0
  152. package/dist/i18n/locales/pt.d.ts +162 -0
  153. package/dist/i18n/locales/pt.js +163 -0
  154. package/dist/i18n/locales/ro.d.ts +162 -0
  155. package/dist/i18n/locales/ro.js +163 -0
  156. package/dist/i18n/locales/ru.d.ts +162 -0
  157. package/dist/i18n/locales/ru.js +163 -0
  158. package/dist/i18n/locales/sq.d.ts +162 -0
  159. package/dist/i18n/locales/sq.js +163 -0
  160. package/dist/i18n/locales/sv.d.ts +162 -0
  161. package/dist/i18n/locales/sv.js +163 -0
  162. package/dist/i18n/locales/tr.d.ts +162 -0
  163. package/dist/i18n/locales/tr.js +163 -0
  164. package/dist/i18n/locales/zh.d.ts +162 -0
  165. package/dist/i18n/locales/zh.js +163 -0
  166. package/dist/index.js +905 -893
  167. package/dist/locales/ar.json +162 -0
  168. package/dist/locales/de.json +162 -0
  169. package/dist/locales/el.json +162 -0
  170. package/dist/locales/en.json +162 -0
  171. package/dist/locales/es.json +162 -0
  172. package/dist/locales/fr.json +162 -0
  173. package/dist/locales/hi.json +162 -0
  174. package/dist/locales/it.json +162 -0
  175. package/dist/locales/ja.json +162 -0
  176. package/dist/locales/nl.json +162 -0
  177. package/dist/locales/pl.json +162 -0
  178. package/dist/locales/pt.json +162 -0
  179. package/dist/locales/ro.json +162 -0
  180. package/dist/locales/ru.json +162 -0
  181. package/dist/locales/sq.json +162 -0
  182. package/dist/locales/sv.json +162 -0
  183. package/dist/locales/tr.json +162 -0
  184. package/dist/locales/zh.json +162 -0
  185. package/dist/patterns/alia-assistant/index.js +1 -1
  186. package/dist/patterns/anamnesis/index.js +1 -1
  187. package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
  188. package/dist/patterns/calendar/index.js +1 -1
  189. package/dist/patterns/patient-account-settings/index.js +1 -1
  190. package/dist/patterns/patient-check-in/index.js +1 -1
  191. package/dist/patterns/patient-portal/index.js +2 -2
  192. package/dist/patterns/patient-sign-in/index.js +2 -2
  193. package/dist/patterns/registration-form/index.js +1 -1
  194. package/dist/patterns/signature-request/index.js +1 -1
  195. package/dist/patterns/signing/index.d.ts +1 -0
  196. package/dist/patterns/signing/index.js +1 -1
  197. package/dist/patterns/signing/multi-field-signer.d.ts +22 -1
  198. package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
  199. package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
  200. package/dist/patterns/signing/signing-document-screen.d.ts +18 -1
  201. package/dist/tokens.css +1 -1
  202. package/package.json +17 -1
  203. package/dist/_chunks/entity-summary-KHM0PnSI.js +0 -265
  204. package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
  205. package/dist/_chunks/signing-end-screen-an9P8DOT.js +0 -1041
@@ -0,0 +1,1355 @@
1
+ import { jsxs as l, jsx as e, Fragment as U } from "react/jsx-runtime";
2
+ import { forwardRef as Fe, useRef as F, useState as ie, useCallback as Te, useLayoutEffect as Re, useEffect as K, useId as xe } from "react";
3
+ import { useTranslation as T, Trans as X } from "react-i18next";
4
+ import { A as M } from "./alert-C4WKViaS.js";
5
+ import { P as $e } from "./pdf-viewer-TRC5jEm5.js";
6
+ import { S as Pe } from "./signature-field-BjlY_yXH.js";
7
+ import { S as Be } from "./signature-capture-BJc7kfqi.js";
8
+ import { D as N } from "./dialog-CVTxyR0v.js";
9
+ import { B as D } from "./button-DohK_Ak_.js";
10
+ import { c as ke } from "./index-D2ZczOXr.js";
11
+ import { S as Se } from "./spinner-CoflYlEx.js";
12
+ import { C as Le } from "./check-DrFSN__t.js";
13
+ import { S as Ae } from "./square-DASBRZ0U.js";
14
+ import { S as Y } from "./sheet-BdhYeQQT.js";
15
+ import { C as De } from "./chevron-left-B8cOyH-V.js";
16
+ import { C as He } from "./chevron-right-I9AeSxH2.js";
17
+ import { u as je } from "./use-visual-viewport-pin-ChurOsHM.js";
18
+ import { A as Ee } from "./arrow-left-BfaGqVam.js";
19
+ import { A as Me } from "./arrow-right-KsIrLdt0.js";
20
+ import { p as Z } from "./privacy-mask-text-B8YfzB7L.js";
21
+ import { C as re } from "./card-n6W6LW-N.js";
22
+ import { A as Ne } from "./avatar-Dp5apm1d.js";
23
+ import { B as We } from "./badge-BUk4RjTS.js";
24
+ import { F as le } from "./finished-terminal-unDnXT4j.js";
25
+ import { H as Oe, g as _e, a as Ke, d as Ve } from "./header-l_B8MV0g.js";
26
+ import { L as qe } from "./logo-hIsyVE96.js";
27
+ import { C as Ge } from "./clock-Drd4Wtis.js";
28
+ import { B as Ue } from "./ban-CiSCCcOE.js";
29
+ const Xe = 10, Je = 6, Qe = 0.3, Ye = ke(
30
+ [
31
+ // The page is always left to right, so the pill is too (label, then box).
32
+ "ds:absolute ds:inline-flex ds:items-center",
33
+ // The pill reaches a little past the template's box on both inline edges,
34
+ // so no sliver of the raw placeholder shows at its edge.
35
+ "ds:[inset-inline-start:calc(var(--checkbox-inset-inline-start)-var(--spacing-2xs))]",
36
+ "ds:[inset-block-start:var(--checkbox-inset-block-start)]",
37
+ "ds:[block-size:var(--checkbox-block-size)]",
38
+ "ds:box-border ds:px-[var(--spacing-2xs)] ds:whitespace-nowrap",
39
+ 'ds:before:absolute ds:before:content-[""]',
40
+ "ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)]",
41
+ "ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)]",
42
+ "ds:bg-[var(--card)] ds:text-[var(--foreground)] ds:border",
43
+ "ds:rounded-[var(--radius-sm)]",
44
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
45
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
46
+ "ds:focus-visible:outline-solid",
47
+ "ds:focus-visible:outline-[var(--ring)]",
48
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
49
+ "ds:forced-colors:border-[CanvasText]",
50
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
51
+ "ds:aria-disabled:cursor-not-allowed"
52
+ ].join(" "),
53
+ {
54
+ variants: {
55
+ layout: {
56
+ // min-inline-size, not a fixed width: a label longer than the
57
+ // placeholder widens the pill instead of being clipped.
58
+ label: "ds:justify-start ds:[gap:calc(var(--checkbox-label-size,0.625rem)*0.3)] ds:[inline-size:auto] ds:[min-inline-size:calc(var(--checkbox-inline-size)+var(--spacing-xs))] ds:sm:before:inset-x-0",
59
+ sized: "ds:justify-center ds:[inline-size:calc(var(--checkbox-inline-size)+var(--spacing-xs))] ds:sm:before:inset-x-0",
60
+ // No measured width: fit the box, like the sign site, and keep the
61
+ // full target-size hit area at every breakpoint.
62
+ fit: "ds:justify-center ds:[inline-size:auto]"
63
+ },
64
+ state: {
65
+ unticked: "ds:cursor-pointer ds:border-dashed ds:border-[color:var(--ring)]",
66
+ ticked: "ds:cursor-pointer ds:border-solid ds:border-[color:var(--success)]",
67
+ saving: "ds:cursor-progress ds:border-solid ds:border-[color:var(--border)]"
68
+ }
69
+ },
70
+ defaultVariants: { state: "unticked", layout: "sized" }
71
+ }
72
+ ), ze = Fe(({ field: n, saving: s, inactive: i, onActivate: a }, r) => {
73
+ const { t: c } = T("ui"), d = s ? "saving" : n.value ? "ticked" : "unticked", v = i || s, t = n.label !== "" && n.inlineSize > 0, m = n.label.trim() !== "", f = t ? "label" : n.inlineSize > 0 ? "sized" : "fit", h = n.value ? c("signing.checkbox.ticked") : c("signing.checkbox.unticked"), u = F(null), y = F(null), x = F(null), [z, C] = ie(null), I = Te(
74
+ (S) => {
75
+ u.current = S, typeof r == "function" ? r(S) : r && (r.current = S);
76
+ },
77
+ [r]
78
+ ), { inlineSize: p, pageWidth: w } = n;
79
+ Re(() => {
80
+ const S = u.current, R = y.current, H = S == null ? void 0 : S.offsetParent;
81
+ if (!t || !S || !R || !(H instanceof HTMLElement))
82
+ return;
83
+ const W = () => {
84
+ if (H.clientWidth === 0 || !(w !== void 0 && w > 0))
85
+ return;
86
+ const O = H.clientWidth / w, b = Xe * O, $ = parseFloat(getComputedStyle(R).fontSize), Q = R.scrollWidth;
87
+ let V = b;
88
+ if ($ > 0 && Q > 0) {
89
+ const P = Q / $ * b, j = x.current, ee = Qe * b, q = getComputedStyle(S), _ = (parseFloat(q.borderInlineStartWidth) || 0) + (parseFloat(q.borderInlineEndWidth) || 0), G = p / 100 * H.clientWidth - _ - ((j == null ? void 0 : j.offsetWidth) ?? 0) - ee;
90
+ G > 0 && P > G && (V = Math.max(
91
+ Je * O,
92
+ b * (G / P)
93
+ ));
94
+ }
95
+ C(
96
+ (P) => P !== null && Math.abs(P - V) < 0.05 ? P : V
97
+ );
98
+ };
99
+ if (W(), typeof ResizeObserver > "u") return;
100
+ const J = new ResizeObserver(W);
101
+ return J.observe(H), () => J.disconnect();
102
+ }, [t, n.label, p, w]);
103
+ const A = {
104
+ "--checkbox-inset-inline-start": `${n.insetInlineStart}%`,
105
+ "--checkbox-inset-block-start": `${n.insetBlockStart}%`,
106
+ "--checkbox-inline-size": `${n.inlineSize}%`,
107
+ "--checkbox-block-size": `${n.blockSize}%`,
108
+ ...t && z !== null ? { "--checkbox-label-size": `${z}px` } : {}
109
+ };
110
+ function L(S) {
111
+ if (v) {
112
+ S.preventDefault();
113
+ return;
114
+ }
115
+ a();
116
+ }
117
+ return /* @__PURE__ */ l(
118
+ "button",
119
+ {
120
+ ref: I,
121
+ type: "button",
122
+ "data-component": "signing-checkbox-pill",
123
+ dir: "ltr",
124
+ "data-component-id": n.id,
125
+ "data-action": "set-document-checkbox",
126
+ "data-state": d,
127
+ "data-label": t ? "shown" : "none",
128
+ "aria-haspopup": v ? void 0 : "dialog",
129
+ "aria-label": m ? c("signing.checkbox.named", {
130
+ label: n.label,
131
+ state: h
132
+ }) : c("signing.checkbox.unnamed", { state: h }),
133
+ "aria-disabled": v || void 0,
134
+ "aria-busy": s || void 0,
135
+ onClick: L,
136
+ className: Ye({ state: d, layout: f }),
137
+ style: A,
138
+ children: [
139
+ t ? (
140
+ // Text only, never HTML. Hidden from assistive tech: the button's
141
+ // accessible name already reads the label, once.
142
+ /* @__PURE__ */ e(
143
+ "span",
144
+ {
145
+ ref: y,
146
+ "aria-hidden": "true",
147
+ className: "ds:[font-size:var(--checkbox-label-size,0.625rem)] ds:leading-none ds:text-[color:var(--foreground)] ds:[unicode-bidi:isolate]",
148
+ children: `${n.label}:`
149
+ }
150
+ )
151
+ ) : null,
152
+ s ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "ds:inline-flex ds:shrink-0", children: /* @__PURE__ */ e(
153
+ Se,
154
+ {
155
+ variant: "pulse",
156
+ size: "sm",
157
+ label: c("signing.checkbox.saving")
158
+ }
159
+ ) }) : /* @__PURE__ */ e(
160
+ "span",
161
+ {
162
+ ref: x,
163
+ "aria-hidden": "true",
164
+ className: n.value ? "ds:inline-flex ds:aspect-square ds:h-full ds:max-h-4 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--spacing-2xs)] ds:bg-[var(--success)] ds:text-[color:var(--success-solid-foreground)]" : "ds:inline-flex ds:aspect-square ds:h-full ds:max-h-4 ds:shrink-0 ds:items-center ds:justify-center",
165
+ children: n.value ? /* @__PURE__ */ e(Le, { strokeWidth: 4, className: "ds:size-full ds:p-[0.5px]" }) : /* @__PURE__ */ e(
166
+ Ae,
167
+ {
168
+ strokeWidth: 2.5,
169
+ className: "ds:size-full ds:text-[color:var(--muted-foreground)]"
170
+ }
171
+ )
172
+ }
173
+ )
174
+ ]
175
+ }
176
+ );
177
+ });
178
+ ze.displayName = "SigningCheckboxPill";
179
+ function Ze({
180
+ field: n,
181
+ open: s,
182
+ intended: i,
183
+ pending: a,
184
+ error: r,
185
+ onConfirm: c,
186
+ onClose: d,
187
+ onCloseAutoFocus: v
188
+ }) {
189
+ const { t } = T("ui"), m = n == null ? void 0 : n.value, f = ((n == null ? void 0 : n.label) ?? "").trim() !== "";
190
+ return K(() => {
191
+ s && n && m === i && d();
192
+ }, [m]), /* @__PURE__ */ e(
193
+ Y.Root,
194
+ {
195
+ id: "signing-checkbox",
196
+ open: s,
197
+ onOpenChange: (h) => {
198
+ !h && !a && d();
199
+ },
200
+ children: /* @__PURE__ */ l(
201
+ Y.Content,
202
+ {
203
+ side: "bottom",
204
+ size: "sm",
205
+ "aria-describedby": void 0,
206
+ onCloseAutoFocus: v,
207
+ onOpenAutoFocus: (h) => {
208
+ var u;
209
+ h.preventDefault(), (u = h.currentTarget.querySelector(
210
+ '[data-action="cancel-document-checkbox"]'
211
+ )) == null || u.focus();
212
+ },
213
+ children: [
214
+ /* @__PURE__ */ e(Y.Header, { children: /* @__PURE__ */ e(Y.Title, { children: t(i ? "signing.checkbox.tickTitle" : "signing.checkbox.untickTitle") }) }),
215
+ /* @__PURE__ */ l(Y.Body, { children: [
216
+ f ? /* @__PURE__ */ e(Y.Description, { asChild: !0, children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
217
+ "bdi",
218
+ {
219
+ dir: "auto",
220
+ className: "ds:whitespace-pre-line ds:break-words",
221
+ children: n == null ? void 0 : n.label
222
+ }
223
+ ) }) }) : null,
224
+ r ? /* @__PURE__ */ e(M, { variant: "error", className: "ds:mt-[var(--spacing-md)]", children: /* @__PURE__ */ e(M.Description, { dir: "auto", children: r }) }) : null,
225
+ /* @__PURE__ */ e(
226
+ "p",
227
+ {
228
+ role: "status",
229
+ "aria-live": "polite",
230
+ className: a ? "type-body-sm ds:mt-[var(--spacing-md)] ds:mb-0 ds:text-[color:var(--muted-foreground)]" : "ds:sr-only",
231
+ children: a ? t("signing.checkbox.saving") : ""
232
+ }
233
+ )
234
+ ] }),
235
+ /* @__PURE__ */ l(Y.Footer, { children: [
236
+ /* @__PURE__ */ e(
237
+ D,
238
+ {
239
+ intent: "secondary",
240
+ type: "button",
241
+ className: "ds:min-h-[var(--min-target-size)]",
242
+ "data-action": "cancel-document-checkbox",
243
+ "aria-disabled": a || void 0,
244
+ onClick: () => {
245
+ a || d();
246
+ },
247
+ children: t("common.cancel")
248
+ }
249
+ ),
250
+ /* @__PURE__ */ e(
251
+ D,
252
+ {
253
+ type: "button",
254
+ className: "ds:min-h-[var(--min-target-size)]",
255
+ "data-action": "confirm-document-checkbox",
256
+ loading: a,
257
+ "aria-disabled": a || void 0,
258
+ onClick: () => {
259
+ a || c();
260
+ },
261
+ children: t("signing.checkbox.confirm")
262
+ }
263
+ )
264
+ ] })
265
+ ]
266
+ }
267
+ )
268
+ }
269
+ );
270
+ }
271
+ function en({
272
+ labels: n,
273
+ disabled: s,
274
+ id: i,
275
+ onComplete: a
276
+ }) {
277
+ return /* @__PURE__ */ e(
278
+ Be,
279
+ {
280
+ id: i,
281
+ width: "100%",
282
+ allowTypedFallback: !0,
283
+ disabled: s,
284
+ ariaLabel: n.dialogTitle,
285
+ onConfirm: (r) => a(r)
286
+ }
287
+ );
288
+ }
289
+ function nn({
290
+ src: n,
291
+ documents: s,
292
+ session: i,
293
+ labels: a,
294
+ docIndex: r,
295
+ ariaLabel: c,
296
+ initialZoom: d = "fit-width",
297
+ hideFieldLabels: v = !1,
298
+ onFieldConfirm: t,
299
+ submittingFieldId: m = null,
300
+ captureError: f = null,
301
+ onAllSigned: h,
302
+ checkboxes: u,
303
+ onCheckboxChange: y,
304
+ pendingCheckboxId: x = null,
305
+ checkboxError: z = null,
306
+ checkboxesDisabled: C = !1,
307
+ className: I
308
+ }) {
309
+ var pe, ve, be;
310
+ const p = s ?? (n !== void 0 ? [{ docIndex: r ?? 0, src: n, title: c ?? "" }] : []), w = s !== void 0, A = w || r === void 0 ? i.fields : i.fields.filter((o) => (o.docIndex ?? 0) === r), L = F({}), S = F({}), R = F(i.fields);
311
+ R.current = i.fields;
312
+ const H = F(!0), W = F(null);
313
+ K(() => {
314
+ i.activeFieldId !== null && W.current === null && (W.current = i.activeFieldId);
315
+ }, [i.activeFieldId]);
316
+ const J = (o) => {
317
+ var E;
318
+ o.preventDefault();
319
+ const k = W.current;
320
+ W.current = null;
321
+ const B = (E = i.fields.find((ne) => !ne.signed)) == null ? void 0 : E.id, g = (k ? S.current[k] : null) ?? (B ? S.current[B] : null);
322
+ g == null || g.focus({ preventScroll: !0 });
323
+ }, O = F({}), [b, $] = ie(null), Q = C || !y, V = (u == null ? void 0 : u.find((o) => o.id === (b == null ? void 0 : b.id))) ?? null, P = V !== null && !C, j = F(null);
324
+ P && b && (j.current = {
325
+ field: V,
326
+ intended: b.intended
327
+ });
328
+ const [ee, q] = ie(
329
+ null
330
+ ), _ = () => {
331
+ $(null), q(null);
332
+ }, G = F(null);
333
+ b && (G.current = b.id);
334
+ const Ce = (o) => {
335
+ var B;
336
+ o.preventDefault();
337
+ const k = (b == null ? void 0 : b.id) ?? G.current;
338
+ k && ((B = O.current[k]) == null || B.focus({ preventScroll: !0 }));
339
+ };
340
+ K(() => {
341
+ b && !P && _();
342
+ }, [b, P]);
343
+ const oe = F(i.isComplete), se = F(h);
344
+ se.current = h, K(() => {
345
+ var o;
346
+ i.isComplete && !oe.current && ((o = se.current) == null || o.call(se)), oe.current = i.isComplete;
347
+ }, [i.isComplete]), K(() => {
348
+ var ne;
349
+ if (H.current) {
350
+ H.current = !1;
351
+ return;
352
+ }
353
+ const o = i.cursorFieldId;
354
+ if (!o) return;
355
+ const k = R.current.find((de) => de.id === o);
356
+ if (!k) return;
357
+ (ne = L.current[k.docIndex ?? 0]) == null || ne.goToPage(k.page);
358
+ let B = 0, g = 0;
359
+ const E = () => {
360
+ const de = S.current[o];
361
+ if (de) {
362
+ de.focus();
363
+ return;
364
+ }
365
+ B < 30 && (B += 1, g = requestAnimationFrame(E));
366
+ };
367
+ return g = requestAnimationFrame(E), () => cancelAnimationFrame(g);
368
+ }, [i.cursorFieldId]);
369
+ const ae = m !== null && m === i.activeFieldId, ce = i.fields.findIndex(
370
+ (o) => o.id === i.activeFieldId
371
+ ), ue = (o) => {
372
+ if (!(ce < 0)) {
373
+ for (let k = ce + o; k >= 0 && k < i.fields.length; k += o)
374
+ if (!i.fields[k].signed) return i.fields[k];
375
+ }
376
+ }, ge = ue(-1), me = ue(1), fe = (pe = i.fields.find(
377
+ (o) => o.id === i.activeFieldId
378
+ )) == null ? void 0 : pe.label, he = (o) => {
379
+ var k;
380
+ !o || ae || i.openField(o.id) && ((k = L.current[o.docIndex ?? 0]) == null || k.goToPage(o.page));
381
+ };
382
+ return /* @__PURE__ */ l("div", { "data-component": "multi-field-signer", className: I, children: [
383
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: p.map((o, k) => /* @__PURE__ */ l(
384
+ "div",
385
+ {
386
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
387
+ children: [
388
+ w && a.documentHeading ? /* @__PURE__ */ e("h2", { dir: "auto", className: "type-title-card ds:m-0", children: a.documentHeading(k + 1, p.length) }) : null,
389
+ /* @__PURE__ */ e(
390
+ $e,
391
+ {
392
+ ref: (B) => {
393
+ L.current[o.docIndex] = B;
394
+ },
395
+ id: `signing-document-${o.docIndex}`,
396
+ src: o.src,
397
+ initialZoom: d,
398
+ toolbarVariant: "minimal",
399
+ ariaLabel: o.title || c,
400
+ renderPageOverlay: ({ pageNumber: B }) => /* @__PURE__ */ l(U, { children: [
401
+ A.filter(
402
+ (g) => (g.docIndex ?? 0) === o.docIndex && g.page === B
403
+ ).map((g) => {
404
+ var E;
405
+ return /* @__PURE__ */ e(
406
+ Pe,
407
+ {
408
+ id: g.id,
409
+ ref: (ne) => {
410
+ S.current[g.id] = ne;
411
+ },
412
+ state: g.signed ? "signed" : g.id === m ? "signing" : "unsigned",
413
+ active: i.cursorFieldId === g.id,
414
+ signedImageSrc: (E = g.payload) == null ? void 0 : E.png,
415
+ label: g.label,
416
+ hideLabel: v || g.hideLabel,
417
+ insetInlineStart: g.insetInlineStart,
418
+ insetBlockStart: g.insetBlockStart,
419
+ inlineSize: g.inlineSize,
420
+ blockSize: g.blockSize,
421
+ onActivate: () => i.openField(g.id),
422
+ "data-testid": `field-${g.id}`
423
+ },
424
+ g.id
425
+ );
426
+ }),
427
+ (u ?? []).filter(
428
+ (g) => (g.docIndex ?? 0) === o.docIndex && g.page === B
429
+ ).map((g) => /* @__PURE__ */ e(
430
+ ze,
431
+ {
432
+ ref: (E) => {
433
+ O.current[g.id] = E;
434
+ },
435
+ field: g,
436
+ saving: x === g.id,
437
+ inactive: Q,
438
+ onActivate: () => {
439
+ i.activeFieldId === null && $({ id: g.id, intended: !g.value });
440
+ }
441
+ },
442
+ g.id
443
+ ))
444
+ ] })
445
+ }
446
+ )
447
+ ]
448
+ },
449
+ o.docIndex
450
+ )) }),
451
+ u && u.length > 0 ? /* @__PURE__ */ e(
452
+ Ze,
453
+ {
454
+ field: ((ve = j.current) == null ? void 0 : ve.field) ?? null,
455
+ open: P,
456
+ intended: ((be = j.current) == null ? void 0 : be.intended) ?? !1,
457
+ pending: b !== null && x === b.id,
458
+ error: b !== null && ee === b.id ? z : null,
459
+ onConfirm: () => {
460
+ b && (q(b.id), y == null || y(b.id, b.intended));
461
+ },
462
+ onClose: _,
463
+ onCloseAutoFocus: Ce
464
+ }
465
+ ) : null,
466
+ /* @__PURE__ */ e(
467
+ N.Root,
468
+ {
469
+ id: "signing-capture",
470
+ open: i.activeFieldId !== null,
471
+ onOpenChange: (o) => {
472
+ o || i.closeField();
473
+ },
474
+ children: /* @__PURE__ */ l(N.Content, { size: "lg", onCloseAutoFocus: J, children: [
475
+ /* @__PURE__ */ l(N.Header, { children: [
476
+ /* @__PURE__ */ e(N.Title, { children: a.dialogTitle }),
477
+ /* @__PURE__ */ l(N.Description, { children: [
478
+ a.dialogSubtitle,
479
+ fe ? /* @__PURE__ */ l(U, { children: [
480
+ " ",
481
+ /* @__PURE__ */ e("bdi", { children: fe })
482
+ ] }) : null
483
+ ] })
484
+ ] }),
485
+ /* @__PURE__ */ l(N.Body, { children: [
486
+ f ? /* @__PURE__ */ e(M, { variant: "error", className: "ds:mb-[var(--spacing-md)]", children: /* @__PURE__ */ e(M.Description, { children: f }) }) : null,
487
+ /* @__PURE__ */ e(
488
+ en,
489
+ {
490
+ labels: a,
491
+ id: `signing-capture-${i.activeFieldId ?? "none"}`,
492
+ disabled: ae,
493
+ onComplete: (o) => {
494
+ const k = i.activeFieldId;
495
+ k && (t ? t(k, o) : i.markSigned(k, o));
496
+ }
497
+ },
498
+ i.activeFieldId ?? "none"
499
+ )
500
+ ] }),
501
+ a.previousField && a.nextField && i.fields.length > 1 ? /* @__PURE__ */ l(N.Footer, { className: "ds:justify-between", children: [
502
+ /* @__PURE__ */ e(
503
+ D,
504
+ {
505
+ intent: "ghost",
506
+ size: "sm",
507
+ type: "button",
508
+ className: "ds:min-h-[var(--min-target-size)]",
509
+ flipIconInRtl: !0,
510
+ startIcon: /* @__PURE__ */ e(De, { "aria-hidden": "true" }),
511
+ "aria-disabled": !ge || ae,
512
+ "data-action": "previous-field",
513
+ onClick: () => he(ge),
514
+ children: a.previousField
515
+ }
516
+ ),
517
+ /* @__PURE__ */ e(
518
+ D,
519
+ {
520
+ intent: "ghost",
521
+ size: "sm",
522
+ type: "button",
523
+ className: "ds:min-h-[var(--min-target-size)]",
524
+ flipIconInRtl: !0,
525
+ endIcon: /* @__PURE__ */ e(He, { "aria-hidden": "true" }),
526
+ "aria-disabled": !me || ae,
527
+ "data-action": "next-field",
528
+ onClick: () => he(me),
529
+ children: a.nextField
530
+ }
531
+ )
532
+ ] }) : null
533
+ ] })
534
+ }
535
+ )
536
+ ] });
537
+ }
538
+ function te({
539
+ children: n,
540
+ brand: s,
541
+ headerActions: i,
542
+ brandLabel: a,
543
+ className: r
544
+ }) {
545
+ const { t: c } = T("ui"), d = a ?? c("signing.chrome.brandLabel");
546
+ return /* @__PURE__ */ l(
547
+ "div",
548
+ {
549
+ "data-component": "signing-chrome",
550
+ className: `ds:flex ds:flex-col ds:min-h-screen ds:bg-[color:var(--app-shell-background)] ds:text-[var(--foreground)]${r ? ` ${r}` : ""}`,
551
+ children: [
552
+ /* @__PURE__ */ l(Oe, { "aria-label": d, children: [
553
+ /* @__PURE__ */ e(
554
+ _e,
555
+ {
556
+ className: i ? "ds:min-w-0 ds:justify-start" : "ds:flex-1 ds:justify-center",
557
+ children: /* @__PURE__ */ e(Ke, { asChild: !0, children: s != null ? /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e("span", { role: "img", "aria-label": d, children: /* @__PURE__ */ e(
558
+ qe,
559
+ {
560
+ variant: "monochrome",
561
+ tone: "inherit",
562
+ decorative: !0,
563
+ size: "md"
564
+ }
565
+ ) }) })
566
+ }
567
+ ),
568
+ i ? /* @__PURE__ */ e(Ve, { className: "ds:min-w-0 ds:flex-1 ds:justify-end ds:text-end", children: i }) : null
569
+ ] }),
570
+ /* @__PURE__ */ e("main", { className: "ds:flex ds:flex-1 ds:flex-col", children: n })
571
+ ]
572
+ }
573
+ );
574
+ }
575
+ const tn = ke(
576
+ "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:[min-block-size:var(--min-target-size)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:font-semibold",
577
+ {
578
+ variants: {
579
+ placement: {
580
+ header: "ds:text-[color:var(--header-foreground)]",
581
+ page: "ds:text-[color:var(--foreground)]"
582
+ }
583
+ },
584
+ defaultVariants: { placement: "header" }
585
+ }
586
+ );
587
+ function sn({
588
+ signed: n,
589
+ total: s,
590
+ name: i,
591
+ privacy: a = !1,
592
+ placement: r = "header",
593
+ className: c
594
+ }) {
595
+ const { t: d } = T("ui"), v = !a && i !== void 0 && i.trim() !== "";
596
+ return /* @__PURE__ */ e(
597
+ "span",
598
+ {
599
+ role: "status",
600
+ "aria-live": "polite",
601
+ "data-component": "signing-progress-chip",
602
+ "data-complete": s > 0 && n >= s ? "true" : void 0,
603
+ className: `${tn({ placement: r })}${c ? ` ${c}` : ""}`,
604
+ children: v ? /* @__PURE__ */ e(
605
+ X,
606
+ {
607
+ t: d,
608
+ ns: "ui",
609
+ i18nKey: "signing.progressNamed",
610
+ values: { name: i, signed: n, total: s },
611
+ components: { name: /* @__PURE__ */ e("bdi", {}) }
612
+ }
613
+ ) : d("signing.progress", { signed: n, total: s })
614
+ }
615
+ );
616
+ }
617
+ const an = "ds:!bg-[var(--accent)] ds:!text-[color:var(--accent-foreground)] ds:hover:!bg-[var(--accent-hover)]";
618
+ function dn({
619
+ total: n,
620
+ onPrevious: s,
621
+ onNext: i,
622
+ previousDisabled: a = !1,
623
+ nextDisabled: r = !1,
624
+ onSign: c,
625
+ signArmed: d = !1,
626
+ signError: v = null,
627
+ completing: t = !1,
628
+ className: m
629
+ }) {
630
+ const { t: f } = T("ui"), h = je({ edge: "bottom" }), [u, y] = ie(""), x = f("signing.completing");
631
+ K(() => {
632
+ y(t ? x : "");
633
+ }, [t, x]);
634
+ const z = /* @__PURE__ */ e("span", { role: "status", "data-live": "signing-footer", className: "ds:sr-only", children: u }), C = xe(), I = xe(), p = !!v && !t, w = n >= 2;
635
+ if (!t && !w && !c) return z;
636
+ const A = p ? C : d ? void 0 : I, L = c ? /* @__PURE__ */ l(U, { children: [
637
+ A !== I ? null : /* @__PURE__ */ e("span", { id: I, className: "ds:sr-only", children: f("signing.signHint") }),
638
+ /* @__PURE__ */ e(
639
+ D,
640
+ {
641
+ intent: d ? "primary" : "outline",
642
+ size: "md",
643
+ type: "button",
644
+ className: `ds:ms-auto ds:min-h-[var(--min-target-size)]${d ? ` ${an}` : ""}`,
645
+ "aria-disabled": d ? void 0 : !0,
646
+ "aria-describedby": A,
647
+ loading: t,
648
+ "data-action": "sign",
649
+ "data-armed": d ? "true" : "false",
650
+ onClick: () => {
651
+ d && !t && c();
652
+ },
653
+ children: f("signing.sign")
654
+ }
655
+ )
656
+ ] }) : null, S = /* @__PURE__ */ l("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
657
+ c ? null : /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "ds:inline-flex", children: /* @__PURE__ */ e(Se, { size: "sm" }) }),
658
+ /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "type-body", children: x })
659
+ ] }), R = w ? /* @__PURE__ */ l(U, { children: [
660
+ s ? /* @__PURE__ */ e(
661
+ D,
662
+ {
663
+ intent: "ghost",
664
+ size: "md",
665
+ type: "button",
666
+ className: "ds:min-h-[var(--min-target-size)]",
667
+ flipIconInRtl: !0,
668
+ startIcon: /* @__PURE__ */ e(Ee, { "aria-hidden": "true" }),
669
+ "aria-label": f("signing.previousField"),
670
+ disabled: a,
671
+ "data-action": "previous-field",
672
+ onClick: s,
673
+ children: f("signing.previousShort")
674
+ }
675
+ ) : null,
676
+ i ? /* @__PURE__ */ e(
677
+ D,
678
+ {
679
+ intent: L && d ? "ghost" : "primary",
680
+ size: "md",
681
+ type: "button",
682
+ className: "ds:min-h-[var(--min-target-size)]",
683
+ flipIconInRtl: !0,
684
+ endIcon: /* @__PURE__ */ e(Me, { "aria-hidden": "true" }),
685
+ "aria-label": f("signing.nextField"),
686
+ disabled: r,
687
+ "data-action": "next-field",
688
+ onClick: i,
689
+ children: f("signing.nextShort")
690
+ }
691
+ ) : null
692
+ ] }) : null;
693
+ return /* @__PURE__ */ l(U, { children: [
694
+ z,
695
+ /* @__PURE__ */ e(
696
+ "div",
697
+ {
698
+ ref: h,
699
+ "data-component": "signing-footer",
700
+ className: `ds:sticky ds:bottom-0 ds:p-[var(--spacing-md)] ds:bg-[var(--card)] ds:text-[var(--foreground)] ds:border-t ds:border-[color:var(--border)] ds:shadow-[var(--shadow-lg)]${m ? ` ${m}` : ""}`,
701
+ children: /* @__PURE__ */ l("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[56rem] ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
702
+ p ? /* @__PURE__ */ e(M, { variant: "error", "data-error": "sign", id: C, children: /* @__PURE__ */ e(M.Description, { children: v }) }) : null,
703
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:w-full ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: L ? /* @__PURE__ */ l(U, { children: [
704
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: t ? S : R }),
705
+ L
706
+ ] }) : t ? S : R })
707
+ ] })
708
+ }
709
+ )
710
+ ] });
711
+ }
712
+ const rn = {
713
+ awaiting: "neutral",
714
+ verifying: "info",
715
+ signing: "info",
716
+ signed: "success"
717
+ };
718
+ function Ie(n, s) {
719
+ if (n.statusLabel !== void 0) return n.statusLabel;
720
+ switch (n.status) {
721
+ case "awaiting":
722
+ return s("signing.roster.status.awaiting");
723
+ case "verifying":
724
+ return s("signing.roster.status.verifying");
725
+ case "signing":
726
+ return s("signing.roster.status.signing");
727
+ default:
728
+ return s("signing.roster.status.signed");
729
+ }
730
+ }
731
+ function ye({
732
+ signer: n,
733
+ youLabel: s,
734
+ privacy: i
735
+ }) {
736
+ const { t: a } = T("ui"), r = i ? Z(n.maskedName) : n.name;
737
+ return /* @__PURE__ */ l(
738
+ "li",
739
+ {
740
+ "aria-current": n.isCurrent ? "step" : void 0,
741
+ "data-status": n.status,
742
+ className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
743
+ children: [
744
+ /* @__PURE__ */ e(Ne, { name: i ? void 0 : n.name, size: "sm" }),
745
+ /* @__PURE__ */ l("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
746
+ /* @__PURE__ */ l("span", { className: "type-label ds:break-words", children: [
747
+ /* @__PURE__ */ e("bdi", { children: r }),
748
+ n.isCurrent ? /* @__PURE__ */ e("span", { className: "ds:ms-[var(--spacing-2xs)] ds:font-normal ds:text-[var(--muted-foreground)]", children: s }) : null
749
+ ] }),
750
+ n.relationship ? /* @__PURE__ */ e(
751
+ "span",
752
+ {
753
+ dir: "auto",
754
+ className: "type-meta ds:break-words ds:text-[var(--muted-foreground)]",
755
+ children: n.relationship
756
+ }
757
+ ) : null
758
+ ] }),
759
+ /* @__PURE__ */ e(We, { variant: rn[n.status], withDot: !0, children: Ie(n, a) })
760
+ ]
761
+ }
762
+ );
763
+ }
764
+ function we({
765
+ title: n,
766
+ primary: s,
767
+ secondary: i,
768
+ youLabel: a,
769
+ secondaryPendingLabel: r,
770
+ secondaryPendingHint: c,
771
+ privacy: d = !1,
772
+ className: v
773
+ }) {
774
+ const { t } = T("ui"), m = n ?? t("signing.roster.title"), h = [s, i ?? null].filter(
775
+ (p) => p !== null
776
+ ).map((p) => ({
777
+ id: p.id,
778
+ name: d ? Z(p.maskedName) : p.name,
779
+ status: p.status,
780
+ label: Ie(p, t)
781
+ })), u = F(new Map(h.map((p) => [p.id, p.status]))), [y, x] = ie(null), z = h.find((p) => p.id === y), C = h.map((p) => `${p.id}:${p.status}`).join("|");
782
+ K(() => {
783
+ let p = null;
784
+ for (const w of h) {
785
+ const A = u.current.get(w.id);
786
+ A !== void 0 && A !== w.status && (p = w.id), u.current.set(w.id, w.status);
787
+ }
788
+ p !== null && x(p);
789
+ }, [C]);
790
+ const I = a ?? t("signing.roster.you");
791
+ return (
792
+ // A labelled section exposes the roster as a region without adding a
793
+ // heading that would skip the page's level order.
794
+ /* @__PURE__ */ l(
795
+ "section",
796
+ {
797
+ "aria-label": m,
798
+ "data-component": "signing-roster",
799
+ "data-privacy": d ? "masked" : void 0,
800
+ className: `ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]${v ? ` ${v}` : ""}`,
801
+ children: [
802
+ /* @__PURE__ */ e(
803
+ "p",
804
+ {
805
+ "aria-hidden": "true",
806
+ className: "type-eyebrow ds:m-0 ds:text-[var(--muted-foreground)]",
807
+ children: m
808
+ }
809
+ ),
810
+ /* @__PURE__ */ e("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: z ? /* @__PURE__ */ l(U, { children: [
811
+ /* @__PURE__ */ e("bdi", { children: z.name }),
812
+ ": ",
813
+ z.label
814
+ ] }) : null }),
815
+ /* @__PURE__ */ l(
816
+ "ol",
817
+ {
818
+ role: "list",
819
+ className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
820
+ children: [
821
+ /* @__PURE__ */ e(ye, { signer: s, youLabel: I, privacy: d }),
822
+ i ? /* @__PURE__ */ e(ye, { signer: i, youLabel: I, privacy: d }) : /* @__PURE__ */ l(
823
+ "li",
824
+ {
825
+ "data-status": "pending",
826
+ className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
827
+ children: [
828
+ /* @__PURE__ */ e(Ne, { size: "sm" }),
829
+ /* @__PURE__ */ l("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
830
+ /* @__PURE__ */ e("span", { className: "type-label ds:truncate ds:text-[var(--muted-foreground)]", children: r ?? t("signing.roster.pendingTitle") }),
831
+ /* @__PURE__ */ e("span", { className: "type-meta ds:truncate ds:text-[var(--muted-foreground)]", children: c ?? t("signing.roster.pendingHint") })
832
+ ] })
833
+ ]
834
+ }
835
+ )
836
+ ]
837
+ }
838
+ )
839
+ ]
840
+ }
841
+ )
842
+ );
843
+ }
844
+ function Dn({
845
+ session: n,
846
+ src: s,
847
+ documents: i,
848
+ title: a,
849
+ meta: r,
850
+ headingLevel: c = 1,
851
+ instruction: d,
852
+ roster: v,
853
+ envelopeProgress: t,
854
+ progressName: m,
855
+ completing: f = !1,
856
+ onSign: h,
857
+ signError: u = null,
858
+ onFieldConfirm: y,
859
+ submittingFieldId: x,
860
+ captureError: z,
861
+ checkboxes: C,
862
+ onCheckboxChange: I,
863
+ pendingCheckboxId: p,
864
+ checkboxError: w,
865
+ checkboxesDisabled: A = !1,
866
+ dialogs: L,
867
+ hideFieldLabels: S,
868
+ withChrome: R = !0,
869
+ brand: H,
870
+ brandLabel: W,
871
+ focusOnMount: J = !1,
872
+ privacy: O = !1,
873
+ className: b
874
+ }) {
875
+ const { t: $ } = T("ui"), Q = F(null);
876
+ K(() => {
877
+ var _;
878
+ J && ((_ = Q.current) == null || _.focus({ preventScroll: !0 }));
879
+ }, [J]);
880
+ const V = c === 2 ? "h2" : "h1", P = {
881
+ dialogTitle: $("signing.capture.title"),
882
+ dialogSubtitle: $("signing.capture.subtitle"),
883
+ apply: $("signing.complete"),
884
+ previousField: $("signing.previousField"),
885
+ nextField: $("signing.nextField"),
886
+ documentHeading: i !== void 0 ? (_, G) => $("signing.documentHeading", { current: _, total: G }) : void 0
887
+ }, j = /* @__PURE__ */ e(
888
+ sn,
889
+ {
890
+ signed: n.signedCount,
891
+ total: n.total,
892
+ name: m,
893
+ privacy: O,
894
+ placement: R ? "header" : "page"
895
+ }
896
+ ), ee = (
897
+ // The chrome owns the page's `main`; embedded, the host's shell does.
898
+ /* @__PURE__ */ e(
899
+ "div",
900
+ {
901
+ "data-component": "signing-document-screen",
902
+ "data-privacy": O ? "masked" : void 0,
903
+ className: `ds:flex ds:flex-1 ds:justify-center ds:p-[var(--spacing-lg)]${b ? ` ${b}` : ""}`,
904
+ children: /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:min-w-0 ds:[inline-size:100%] ds:max-w-[56rem]", children: [
905
+ d ? /* @__PURE__ */ e(M, { variant: "info", announce: "off", children: /* @__PURE__ */ e(M.Description, { dir: "auto", className: "ds:whitespace-pre-line", children: d }) }) : null,
906
+ a ? /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
907
+ /* @__PURE__ */ e(
908
+ V,
909
+ {
910
+ ref: Q,
911
+ tabIndex: -1,
912
+ dir: "auto",
913
+ className: "type-title-page ds:m-0 ds:outline-none",
914
+ children: a
915
+ }
916
+ ),
917
+ r ? /* @__PURE__ */ e(
918
+ "div",
919
+ {
920
+ dir: "auto",
921
+ className: "type-body-sm ds:text-[color:var(--muted-foreground)]",
922
+ children: r
923
+ }
924
+ ) : null
925
+ ] }) : null,
926
+ v ? /* @__PURE__ */ e(we, { ...v, privacy: O }) : null,
927
+ R ? null : j,
928
+ t ? /* @__PURE__ */ e(
929
+ "p",
930
+ {
931
+ role: "status",
932
+ "aria-live": "polite",
933
+ className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]",
934
+ children: $("signing.envelopeProgress", {
935
+ done: t.done,
936
+ total: t.total
937
+ })
938
+ }
939
+ ) : null,
940
+ /* @__PURE__ */ e(
941
+ nn,
942
+ {
943
+ src: s,
944
+ documents: i,
945
+ session: n,
946
+ labels: P,
947
+ ariaLabel: a,
948
+ hideFieldLabels: S,
949
+ onFieldConfirm: y,
950
+ submittingFieldId: x,
951
+ captureError: z,
952
+ checkboxes: C,
953
+ onCheckboxChange: I,
954
+ pendingCheckboxId: p,
955
+ checkboxError: w,
956
+ checkboxesDisabled: A || f
957
+ }
958
+ )
959
+ ] })
960
+ }
961
+ )
962
+ ), q = /* @__PURE__ */ e(
963
+ dn,
964
+ {
965
+ total: n.total,
966
+ completing: f,
967
+ onPrevious: n.goToPreviousField,
968
+ onNext: n.goToNextField,
969
+ onSign: h,
970
+ signArmed: n.isComplete,
971
+ signError: u
972
+ }
973
+ );
974
+ return R ? /* @__PURE__ */ l(te, { brand: H, brandLabel: W, headerActions: j, children: [
975
+ ee,
976
+ q,
977
+ L
978
+ ] }) : /* @__PURE__ */ l(U, { children: [
979
+ ee,
980
+ q,
981
+ L
982
+ ] });
983
+ }
984
+ function Hn({
985
+ open: n,
986
+ title: s,
987
+ body: i,
988
+ onDismiss: a,
989
+ dismissLabel: r,
990
+ onCloseAutoFocus: c,
991
+ id: d = "signing-message",
992
+ className: v
993
+ }) {
994
+ const { t } = T("ui");
995
+ return /* @__PURE__ */ e(
996
+ N.Root,
997
+ {
998
+ id: d,
999
+ open: n,
1000
+ onOpenChange: (m) => {
1001
+ m || a();
1002
+ },
1003
+ children: /* @__PURE__ */ l(
1004
+ N.Content,
1005
+ {
1006
+ size: "sm",
1007
+ hideCloseButton: !0,
1008
+ onCloseAutoFocus: c,
1009
+ className: v,
1010
+ "data-component": "signing-message-dialog",
1011
+ children: [
1012
+ /* @__PURE__ */ l(N.Header, { children: [
1013
+ /* @__PURE__ */ e(N.Title, { dir: "auto", children: s }),
1014
+ /* @__PURE__ */ e(
1015
+ N.Description,
1016
+ {
1017
+ dir: "auto",
1018
+ className: "ds:whitespace-pre-line ds:break-words",
1019
+ children: i
1020
+ }
1021
+ )
1022
+ ] }),
1023
+ /* @__PURE__ */ e(N.Footer, { children: /* @__PURE__ */ e(
1024
+ D,
1025
+ {
1026
+ intent: "primary",
1027
+ type: "button",
1028
+ className: "ds:min-h-[var(--min-target-size)]",
1029
+ "data-action": "dismiss-message",
1030
+ onClick: a,
1031
+ children: r ?? t("signing.message.close")
1032
+ }
1033
+ ) })
1034
+ ]
1035
+ }
1036
+ )
1037
+ }
1038
+ );
1039
+ }
1040
+ function jn({
1041
+ open: n,
1042
+ onOpenChange: s,
1043
+ staffName: i,
1044
+ patientName: a,
1045
+ documentTitle: r,
1046
+ onConfirm: c,
1047
+ onCancel: d,
1048
+ submitting: v = !1,
1049
+ error: t = null,
1050
+ errorText: m,
1051
+ privacy: f = !1,
1052
+ onCloseAutoFocus: h,
1053
+ id: u = "signing-staff-id",
1054
+ className: y
1055
+ }) {
1056
+ const { t: x } = T("ui"), z = a !== void 0 && a.trim() !== "", C = f ? Z() : a, I = t === null ? null : m ?? x("signing.staffId.errorFailed");
1057
+ return /* @__PURE__ */ e(
1058
+ N.Root,
1059
+ {
1060
+ id: u,
1061
+ open: n,
1062
+ onOpenChange: (p) => {
1063
+ s(p), p || d == null || d();
1064
+ },
1065
+ children: /* @__PURE__ */ l(
1066
+ N.Content,
1067
+ {
1068
+ size: "sm",
1069
+ hideCloseButton: !0,
1070
+ onCloseAutoFocus: h,
1071
+ className: y,
1072
+ "data-component": "signing-staff-id-confirmation",
1073
+ "data-privacy": f ? "masked" : void 0,
1074
+ children: [
1075
+ /* @__PURE__ */ l(N.Header, { children: [
1076
+ /* @__PURE__ */ e(N.Title, { children: x("signing.staffId.title") }),
1077
+ /* @__PURE__ */ e(N.Description, { className: "ds:break-words", children: /* @__PURE__ */ e(
1078
+ X,
1079
+ {
1080
+ t: x,
1081
+ ns: "ui",
1082
+ i18nKey: z ? "signing.staffId.body" : "signing.staffId.bodyNoPatient",
1083
+ values: { staff: i, patient: C },
1084
+ components: { staff: /* @__PURE__ */ e("bdi", {}), patient: /* @__PURE__ */ e("bdi", {}) }
1085
+ }
1086
+ ) })
1087
+ ] }),
1088
+ /* @__PURE__ */ e(N.Body, { children: /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1089
+ r ? /* @__PURE__ */ e(
1090
+ "p",
1091
+ {
1092
+ dir: "auto",
1093
+ className: "type-body ds:m-0 ds:font-medium ds:break-words",
1094
+ children: r
1095
+ }
1096
+ ) : null,
1097
+ /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: x("signing.staffId.record") }),
1098
+ I ? /* @__PURE__ */ e(M, { variant: "error", "data-error": t ?? void 0, children: /* @__PURE__ */ e(M.Description, { children: I }) }) : null
1099
+ ] }) }),
1100
+ /* @__PURE__ */ l(N.Footer, { children: [
1101
+ /* @__PURE__ */ e(N.Close, { asChild: !0, children: /* @__PURE__ */ e(
1102
+ D,
1103
+ {
1104
+ intent: "outline",
1105
+ type: "button",
1106
+ className: "ds:min-h-[var(--min-target-size)]",
1107
+ "data-action": "cancel",
1108
+ children: x("common.cancel")
1109
+ }
1110
+ ) }),
1111
+ /* @__PURE__ */ e(
1112
+ D,
1113
+ {
1114
+ intent: "primary",
1115
+ type: "button",
1116
+ className: "ds:min-h-[var(--min-target-size)]",
1117
+ loading: v,
1118
+ "data-action": "confirm-staff-id",
1119
+ onClick: c,
1120
+ children: x("signing.staffId.confirm")
1121
+ }
1122
+ )
1123
+ ] })
1124
+ ]
1125
+ }
1126
+ )
1127
+ }
1128
+ );
1129
+ }
1130
+ function En({
1131
+ signerName: n,
1132
+ nextName: s,
1133
+ roster: i,
1134
+ onContinue: a,
1135
+ continueLabel: r,
1136
+ submitting: c = !1,
1137
+ focusOnMount: d = !0,
1138
+ withChrome: v = !0,
1139
+ brand: t,
1140
+ brandLabel: m,
1141
+ privacy: f = !1,
1142
+ className: h
1143
+ }) {
1144
+ const { t: u } = T("ui"), y = F(null);
1145
+ K(() => {
1146
+ var I;
1147
+ d && ((I = y.current) == null || I.focus({ preventScroll: !0 }));
1148
+ }, [d]);
1149
+ const x = f ? Z() : n, z = f ? Z() : s, C = /* @__PURE__ */ e(
1150
+ "div",
1151
+ {
1152
+ "data-component": "signing-handoff-screen",
1153
+ "data-privacy": f ? "masked" : void 0,
1154
+ className: `ds:flex ds:flex-1 ds:flex-col ds:items-center ds:overflow-y-auto ds:p-[var(--spacing-lg)]${h ? ` ${h}` : ""}`,
1155
+ children: /* @__PURE__ */ l(
1156
+ re,
1157
+ {
1158
+ variant: "elevated",
1159
+ className: "ds:my-auto ds:min-w-0 ds:[inline-size:100%] ds:max-w-[28rem]",
1160
+ children: [
1161
+ /* @__PURE__ */ e(re.Header, { children: /* @__PURE__ */ e(
1162
+ "h1",
1163
+ {
1164
+ ref: y,
1165
+ tabIndex: -1,
1166
+ className: "type-title-card ds:m-0 ds:outline-none",
1167
+ children: /* @__PURE__ */ e(
1168
+ X,
1169
+ {
1170
+ t: u,
1171
+ ns: "ui",
1172
+ i18nKey: "signing.handoff.title",
1173
+ values: { name: x },
1174
+ components: { name: /* @__PURE__ */ e("bdi", {}) }
1175
+ }
1176
+ )
1177
+ }
1178
+ ) }),
1179
+ /* @__PURE__ */ e(re.Body, { children: /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1180
+ /* @__PURE__ */ e("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: /* @__PURE__ */ e(
1181
+ X,
1182
+ {
1183
+ t: u,
1184
+ ns: "ui",
1185
+ i18nKey: "signing.handoff.body",
1186
+ values: { next: z },
1187
+ components: { next: /* @__PURE__ */ e("bdi", {}) }
1188
+ }
1189
+ ) }),
1190
+ /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: c ? u("signing.roster.status.verifying") : "" }),
1191
+ i ? /* @__PURE__ */ e(we, { ...i, privacy: f }) : null,
1192
+ /* @__PURE__ */ e(
1193
+ D,
1194
+ {
1195
+ intent: "primary",
1196
+ size: "lg",
1197
+ type: "button",
1198
+ loading: c,
1199
+ "data-action": "continue",
1200
+ onClick: a,
1201
+ children: !f && r !== void 0 ? r : /* @__PURE__ */ e(
1202
+ X,
1203
+ {
1204
+ t: u,
1205
+ ns: "ui",
1206
+ i18nKey: "signing.handoff.continue",
1207
+ values: { next: z },
1208
+ components: { next: /* @__PURE__ */ e("bdi", {}) }
1209
+ }
1210
+ )
1211
+ }
1212
+ )
1213
+ ] }) })
1214
+ ]
1215
+ }
1216
+ )
1217
+ }
1218
+ );
1219
+ return v ? /* @__PURE__ */ e(te, { brand: t, brandLabel: m, children: C }) : C;
1220
+ }
1221
+ function Mn({
1222
+ signerName: n,
1223
+ nextName: s,
1224
+ secondaryPending: i = !1,
1225
+ withChrome: a = !0,
1226
+ brand: r,
1227
+ brandLabel: c,
1228
+ privacy: d = !1,
1229
+ className: v
1230
+ }) {
1231
+ const { t } = T("ui"), m = d ? Z() : n, f = i || !s || s.trim() === "", h = d ? Z() : s ?? "", u = /* @__PURE__ */ e(
1232
+ "div",
1233
+ {
1234
+ "data-component": "signing-awaiting-screen",
1235
+ "data-privacy": d ? "masked" : void 0,
1236
+ className: `ds:flex ds:flex-1 ds:flex-col${v ? ` ${v}` : ""}`,
1237
+ children: /* @__PURE__ */ e(
1238
+ le,
1239
+ {
1240
+ title: t("signing.awaiting.title"),
1241
+ body: /* @__PURE__ */ e(
1242
+ X,
1243
+ {
1244
+ t,
1245
+ ns: "ui",
1246
+ i18nKey: f ? "signing.awaiting.pendingBody" : "signing.awaiting.body",
1247
+ values: { name: m, next: h },
1248
+ components: { name: /* @__PURE__ */ e("bdi", {}), next: /* @__PURE__ */ e("bdi", {}) }
1249
+ }
1250
+ ),
1251
+ autoCloseSeconds: 0
1252
+ }
1253
+ )
1254
+ }
1255
+ );
1256
+ return a ? /* @__PURE__ */ e(te, { brand: r, brandLabel: c, children: u }) : u;
1257
+ }
1258
+ function Wn({
1259
+ reason: n = "signed",
1260
+ practiceName: s,
1261
+ title: i,
1262
+ body: a,
1263
+ action: r,
1264
+ withChrome: c = !0,
1265
+ brand: d,
1266
+ brandLabel: v,
1267
+ className: t
1268
+ }) {
1269
+ const { t: m } = T("ui"), f = s !== void 0 && s.trim() !== "", h = m(n === "all-signed" ? "signing.finished.allSigned.title" : "signing.finished.signed.title"), u = n === "all-signed" ? m("signing.finished.allSigned.body") : f ? /* @__PURE__ */ e(
1270
+ X,
1271
+ {
1272
+ t: m,
1273
+ ns: "ui",
1274
+ i18nKey: "signing.finished.signed.body",
1275
+ values: { practice: s },
1276
+ components: { practice: /* @__PURE__ */ e("bdi", {}) }
1277
+ }
1278
+ ) : m("signing.finished.signed.bodyNoPractice"), y = r.onClick !== void 0 || r.href !== void 0, x = /* @__PURE__ */ e(
1279
+ "div",
1280
+ {
1281
+ "data-component": "signing-finished-screen",
1282
+ "data-reason": n,
1283
+ className: `ds:flex ds:flex-1 ds:flex-col${t ? ` ${t}` : ""}`,
1284
+ children: /* @__PURE__ */ e(
1285
+ le,
1286
+ {
1287
+ title: i ?? h,
1288
+ body: a ?? u,
1289
+ action: y ? {
1290
+ ...r,
1291
+ label: r.label ?? m("signing.finished.action")
1292
+ } : void 0,
1293
+ autoCloseSeconds: y ? void 0 : 0
1294
+ }
1295
+ )
1296
+ }
1297
+ );
1298
+ return c ? /* @__PURE__ */ e(te, { brand: d, brandLabel: v, children: x }) : x;
1299
+ }
1300
+ function On({
1301
+ reason: n,
1302
+ practiceName: s,
1303
+ title: i,
1304
+ body: a,
1305
+ withChrome: r = !0,
1306
+ brand: c,
1307
+ brandLabel: d,
1308
+ className: v
1309
+ }) {
1310
+ const { t } = T("ui"), m = s !== void 0 && s.trim() !== "", f = (x) => /* @__PURE__ */ e(
1311
+ X,
1312
+ {
1313
+ t,
1314
+ ns: "ui",
1315
+ i18nKey: x,
1316
+ values: { practice: s },
1317
+ components: { practice: /* @__PURE__ */ e("bdi", {}) }
1318
+ }
1319
+ );
1320
+ let h, u;
1321
+ n === "expired" ? (h = t("signing.end.expired.title"), u = m ? f("signing.end.expired.body") : t("signing.end.expired.bodyNoPractice")) : n === "already-completed" ? (h = t("signing.end.alreadyCompleted.title"), u = m ? f("signing.end.alreadyCompleted.body") : t("signing.end.alreadyCompleted.bodyNoPractice")) : (h = t("signing.end.cancelled.title"), u = m ? f("signing.end.cancelled.body") : t("signing.end.cancelled.bodyNoPractice"));
1322
+ const y = /* @__PURE__ */ e(
1323
+ "div",
1324
+ {
1325
+ "data-component": "signing-end-screen",
1326
+ "data-reason": n,
1327
+ className: `ds:flex ds:flex-1 ds:flex-col${v ? ` ${v}` : ""}`,
1328
+ children: /* @__PURE__ */ e(
1329
+ le,
1330
+ {
1331
+ title: i ?? h,
1332
+ body: a ?? u,
1333
+ icon: n === "expired" ? /* @__PURE__ */ e(Ge, {}) : n === "cancelled" ? /* @__PURE__ */ e(Ue, {}) : void 0,
1334
+ autoCloseSeconds: 0
1335
+ }
1336
+ )
1337
+ }
1338
+ );
1339
+ return r ? /* @__PURE__ */ e(te, { brand: c, brandLabel: d, children: y }) : y;
1340
+ }
1341
+ export {
1342
+ nn as M,
1343
+ Mn as S,
1344
+ te as a,
1345
+ Dn as b,
1346
+ On as c,
1347
+ Wn as d,
1348
+ dn as e,
1349
+ En as f,
1350
+ Hn as g,
1351
+ sn as h,
1352
+ we as i,
1353
+ jn as j
1354
+ };
1355
+ //# sourceMappingURL=signing-end-screen-BdhbkPKO.js.map