@alfadocs/ui-kit 1.133.0 → 1.135.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 (285) hide show
  1. package/dist/_chunks/{agenda-card-B8hV3dZV.js → agenda-card-B9wgX_Ed.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-Bu46s3dI.js → agenda-tray-CGcS_qoM.js} +2 -2
  3. package/dist/_chunks/ai-summary-panel-B70S2lgC.js +455 -0
  4. package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
  5. package/dist/_chunks/appointment-card-BT1cMZIX.js +504 -0
  6. package/dist/_chunks/{appointment-peek-DZa6xyUb.js → appointment-peek-BP_ACFz5.js} +3 -3
  7. package/dist/_chunks/{appointment-timeline-DQePqpyH.js → appointment-timeline-Dy4YQJ17.js} +2 -2
  8. package/dist/_chunks/appointment-tray-B3gSHL1j.js +200 -0
  9. package/dist/_chunks/{appointment-workflow-status-DMjuIK90.js → appointment-workflow-status-S-lx81Yz.js} +2 -2
  10. package/dist/_chunks/ban-CiSCCcOE.js +15 -0
  11. package/dist/_chunks/{calendar-BIoOeBTT.js → calendar-CyLtLBNP.js} +2 -2
  12. package/dist/_chunks/{calendar-appointment-editor-dialog-BHx6kUhX.js → calendar-appointment-editor-dialog-I5PfWudy.js} +15 -15
  13. package/dist/_chunks/{calendar-event-card-BNEzkjm-.js → calendar-event-card-BJifpYZQ.js} +7 -6
  14. package/dist/_chunks/{care-plan-card-DKScH9Ss.js → care-plan-card-CjHq6PLo.js} +6 -6
  15. package/dist/_chunks/{care-plan-entry-card-AG1y3nyW.js → care-plan-entry-card-DY1toF6E.js} +2 -2
  16. package/dist/_chunks/{care-plan-header-Dx5OMkc9.js → care-plan-header-CeFXUDnL.js} +6 -6
  17. package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
  18. package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
  19. package/dist/_chunks/check-in-documents-CEVcgcYZ.js +136 -0
  20. package/dist/_chunks/{clinical-note-card-pPaeWWnu.js → clinical-note-card-D--IwbZa.js} +2 -2
  21. package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
  22. package/dist/_chunks/document-preview-DLVIrOYV.js +385 -0
  23. package/dist/_chunks/{entity-card-fpm-KUKc.js → entity-card-p-LANpYt.js} +18 -17
  24. package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
  25. package/dist/_chunks/{error-page-B0fGNTRB.js → error-page-WLhmWUTq.js} +100 -115
  26. package/dist/_chunks/finished-terminal-unDnXT4j.js +191 -0
  27. package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
  28. package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
  29. package/dist/_chunks/house-DGCypGTo.js +21 -0
  30. package/dist/_chunks/is-safe-url-CEy9CEml.js +8 -0
  31. package/dist/_chunks/keypad-DBH_keVs.js +152 -0
  32. package/dist/_chunks/keypad-button-mOaPQRrH.js +114 -0
  33. package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
  34. package/dist/_chunks/{message-card-BG3_3nN1.js → message-card-Bw_q1qKx.js} +2 -2
  35. package/dist/_chunks/{message-tray-BjZv0Fsk.js → message-tray-pLGgLmoG.js} +2 -2
  36. package/dist/_chunks/{note-attachment-MNTIqdSz.js → note-attachment-JTIy9iXN.js} +2 -2
  37. package/dist/_chunks/{note-timeline-BQeW0VZY.js → note-timeline-BbjHMhkL.js} +2 -2
  38. package/dist/_chunks/{notes-panel-Cm-_pCRJ.js → notes-panel-BvjAo4RQ.js} +6 -5
  39. package/dist/_chunks/{operator-hero-CnfWckNQ.js → operator-hero-D4wfVu2l.js} +2 -2
  40. package/dist/_chunks/otp-input-BNOTlxq3.js +342 -0
  41. package/dist/_chunks/patient-account-settings-B2XbN_Fe.js +546 -0
  42. package/dist/_chunks/patient-card-DTh3QTyS.js +125 -0
  43. package/dist/_chunks/patient-check-in-resume-B7NY-6KI.js +742 -0
  44. package/dist/_chunks/patient-sign-in-pin-CDBqV254.js +432 -0
  45. package/dist/_chunks/patient-sign-in-steps-C2JSqlok.js +199 -0
  46. package/dist/_chunks/{patient-summary-card-BUcZ-gaL.js → patient-summary-card-Bl2NknPe.js} +2 -2
  47. package/dist/_chunks/{payment-request-card-Dv4WbRBe.js → payment-request-card-CNW00DCx.js} +6 -6
  48. package/dist/_chunks/{pdf-viewer-BnBKdx0y.js → pdf-viewer-TRC5jEm5.js} +472 -425
  49. package/dist/_chunks/pin-entry-BugWQMOS.js +219 -0
  50. package/dist/_chunks/pin-indicator-Cb-n40UI.js +124 -0
  51. package/dist/_chunks/portal-details-DCIiGkHA.js +478 -0
  52. package/dist/_chunks/portal-documents-DJOH8pZx.js +902 -0
  53. package/dist/_chunks/portal-parts-Br8wuala.js +285 -0
  54. package/dist/_chunks/{privacy-mask-DJ1gee4c.js → privacy-mask-C19dJFMk.js} +5 -5
  55. package/dist/_chunks/{product-hub-panel-a8wdVOUt.js → product-hub-panel-K4QbULG7.js} +2 -2
  56. package/dist/_chunks/{registration-form-CwbhtKcy.js → registration-form-DS3RuKHu.js} +2 -2
  57. package/dist/_chunks/{reserved.agent-W8mR179D.js → reserved.agent-DOzOBUW7.js} +2 -2
  58. package/dist/_chunks/session-countdown-DOx1IBUB.js +232 -0
  59. package/dist/_chunks/{sign-document-CQZVzfpk.js → sign-document-DDZbmYHu.js} +2 -2
  60. package/dist/_chunks/{signature-field-DjabvRZm.js → signature-field-BjlY_yXH.js} +39 -34
  61. package/dist/_chunks/{signature-request-4pGq3YBe.js → signature-request-CHsM_iWi.js} +2 -2
  62. package/dist/_chunks/{signature-status-chip-pIoQjvH8.js → signature-status-chip-DS9hHwIt.js} +66 -69
  63. package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
  64. package/dist/_chunks/sms-code-entry-Dgp4GwlM.js +316 -0
  65. package/dist/_chunks/step-up-dialog-C2JqJmCA.js +132 -0
  66. package/dist/_chunks/{task-editor-BL2hHxNz.js → task-editor-DvwqPfFR.js} +40 -39
  67. package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
  68. package/dist/_chunks/{use-appointment-details-read-_b7FRB1x.js → use-appointment-details-read-6_OmOwUs.js} +115 -114
  69. package/dist/_chunks/use-zoom-drilldown-Cr1baU5X.js +221 -0
  70. package/dist/_chunks/{user-x-DYszNtIg.js → user-x-BJZg4kaP.js} +8 -19
  71. package/dist/_chunks/{verify-identity-types-CxtrBXsZ.js → verify-identity-types-C6Bam8v6.js} +2 -2
  72. package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
  73. package/dist/agent-catalog.json +933 -324
  74. package/dist/agent-i18n/en.json +103 -18
  75. package/dist/browser-support.js +1 -1
  76. package/dist/components/_shared/is-safe-url.d.ts +3 -1
  77. package/dist/components/_shared/sms-segments.d.ts +43 -0
  78. package/dist/components/agenda-card/index.js +2 -2
  79. package/dist/components/agenda-tray/index.js +1 -1
  80. package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
  81. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
  82. package/dist/components/ai-summary-panel/index.d.ts +4 -0
  83. package/dist/components/ai-summary-panel/index.js +6 -0
  84. package/dist/components/appointment-card/appointment-card.d.ts +45 -0
  85. package/dist/components/appointment-card/appointment-tray.d.ts +11 -0
  86. package/dist/components/appointment-card/index.js +3 -3
  87. package/dist/components/appointment-details-panel/index.js +1 -1
  88. package/dist/components/appointment-peek/index.js +1 -1
  89. package/dist/components/appointment-timeline/index.js +1 -1
  90. package/dist/components/booking/index.js +1 -1
  91. package/dist/components/calendar/index.js +1 -1
  92. package/dist/components/calendar-event-card/index.js +1 -1
  93. package/dist/components/care-plan-card/index.js +1 -1
  94. package/dist/components/care-plan-entry-card/index.js +1 -1
  95. package/dist/components/care-plan-header/index.js +1 -1
  96. package/dist/components/chat-container/chat-container.d.ts +7 -0
  97. package/dist/components/chat-container/index.js +1 -1
  98. package/dist/components/chat-input/chat-input.d.ts +3 -0
  99. package/dist/components/chat-input/index.js +1 -1
  100. package/dist/components/clinical-note-card/index.js +1 -1
  101. package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
  102. package/dist/components/communications-panel/communications-panel.d.ts +136 -0
  103. package/dist/components/communications-panel/index.d.ts +6 -0
  104. package/dist/components/communications-panel/index.js +7 -0
  105. package/dist/components/document-preview/document-preview.d.ts +61 -7
  106. package/dist/components/document-preview/index.js +1 -1
  107. package/dist/components/entity-summary/entity-summary.d.ts +8 -0
  108. package/dist/components/entity-summary/index.js +1 -1
  109. package/dist/components/finished-terminal/finished-terminal.d.ts +63 -6
  110. package/dist/components/finished-terminal/index.d.ts +1 -1
  111. package/dist/components/finished-terminal/index.js +1 -1
  112. package/dist/components/index.d.ts +14 -0
  113. package/dist/components/keypad/index.d.ts +3 -0
  114. package/dist/components/keypad/index.js +6 -0
  115. package/dist/components/keypad/keypad.d.ts +54 -0
  116. package/dist/components/keypad-button/index.d.ts +3 -0
  117. package/dist/components/keypad-button/index.js +6 -0
  118. package/dist/components/keypad-button/keypad-button.d.ts +33 -0
  119. package/dist/components/message-card/index.js +2 -2
  120. package/dist/components/message-tray/index.js +1 -1
  121. package/dist/components/note-timeline/index.js +1 -1
  122. package/dist/components/notes-panel/index.js +1 -1
  123. package/dist/components/operator-hero/index.js +1 -1
  124. package/dist/components/otp-input/index.js +1 -1
  125. package/dist/components/otp-input/otp-input.d.ts +11 -0
  126. package/dist/components/patient-summary-card/index.js +1 -1
  127. package/dist/components/payment-card/index.js +1 -1
  128. package/dist/components/pdf-viewer/index.js +1 -1
  129. package/dist/components/pdf-viewer/pdf-viewer.d.ts +7 -0
  130. package/dist/components/pin-entry/index.d.ts +3 -0
  131. package/dist/components/pin-entry/index.js +5 -0
  132. package/dist/components/pin-entry/pin-entry.agent.d.ts +4 -0
  133. package/dist/components/pin-entry/pin-entry.d.ts +64 -0
  134. package/dist/components/pin-indicator/index.d.ts +3 -0
  135. package/dist/components/pin-indicator/index.js +9 -0
  136. package/dist/components/pin-indicator/pin-indicator.d.ts +34 -0
  137. package/dist/components/product-hub-tray/index.js +2 -2
  138. package/dist/components/session-countdown/index.js +1 -1
  139. package/dist/components/session-countdown/session-countdown.d.ts +19 -0
  140. package/dist/components/sign-document/index.js +1 -1
  141. package/dist/components/signature-field/index.js +1 -1
  142. package/dist/components/signature-field/signature-field.d.ts +17 -6
  143. package/dist/components/signature-status-chip/index.js +1 -1
  144. package/dist/components/signature-status-chip/signature-status-chip.d.ts +3 -2
  145. package/dist/components/sms-code-entry/index.d.ts +3 -0
  146. package/dist/components/sms-code-entry/index.js +5 -0
  147. package/dist/components/sms-code-entry/sms-code-entry.agent.d.ts +4 -0
  148. package/dist/components/sms-code-entry/sms-code-entry.d.ts +156 -0
  149. package/dist/components/step-up-dialog/index.d.ts +3 -0
  150. package/dist/components/step-up-dialog/index.js +5 -0
  151. package/dist/components/step-up-dialog/step-up-dialog.d.ts +108 -0
  152. package/dist/components/task-editor/index.js +1 -1
  153. package/dist/components/tasks-panel/index.js +1 -1
  154. package/dist/components/workflow-status/index.js +2 -2
  155. package/dist/core.css +1 -1
  156. package/dist/hooks/index.js +1 -1
  157. package/dist/hooks/use-signing-session.d.ts +7 -2
  158. package/dist/host-compat.css +18 -3
  159. package/dist/i18n/locales/ar.d.ts +605 -1
  160. package/dist/i18n/locales/ar.js +603 -3
  161. package/dist/i18n/locales/de.d.ts +605 -1
  162. package/dist/i18n/locales/de.js +611 -4
  163. package/dist/i18n/locales/el.d.ts +605 -1
  164. package/dist/i18n/locales/el.js +606 -4
  165. package/dist/i18n/locales/en.d.ts +607 -1
  166. package/dist/i18n/locales/en.js +614 -4
  167. package/dist/i18n/locales/es.d.ts +605 -1
  168. package/dist/i18n/locales/es.js +604 -4
  169. package/dist/i18n/locales/fr.d.ts +605 -1
  170. package/dist/i18n/locales/fr.js +604 -4
  171. package/dist/i18n/locales/hi.d.ts +605 -1
  172. package/dist/i18n/locales/hi.js +604 -4
  173. package/dist/i18n/locales/it.d.ts +605 -1
  174. package/dist/i18n/locales/it.js +611 -4
  175. package/dist/i18n/locales/ja.d.ts +605 -1
  176. package/dist/i18n/locales/ja.js +604 -4
  177. package/dist/i18n/locales/nl.d.ts +605 -1
  178. package/dist/i18n/locales/nl.js +611 -4
  179. package/dist/i18n/locales/pl.d.ts +605 -1
  180. package/dist/i18n/locales/pl.js +611 -4
  181. package/dist/i18n/locales/pt.d.ts +605 -1
  182. package/dist/i18n/locales/pt.js +611 -4
  183. package/dist/i18n/locales/ro.d.ts +605 -1
  184. package/dist/i18n/locales/ro.js +611 -4
  185. package/dist/i18n/locales/ru.d.ts +605 -1
  186. package/dist/i18n/locales/ru.js +603 -3
  187. package/dist/i18n/locales/sq.d.ts +605 -1
  188. package/dist/i18n/locales/sq.js +604 -4
  189. package/dist/i18n/locales/sv.d.ts +605 -1
  190. package/dist/i18n/locales/sv.js +604 -4
  191. package/dist/i18n/locales/tr.d.ts +605 -1
  192. package/dist/i18n/locales/tr.js +606 -4
  193. package/dist/i18n/locales/zh.d.ts +605 -1
  194. package/dist/i18n/locales/zh.js +604 -4
  195. package/dist/index.js +1305 -1231
  196. package/dist/locales/ar.json +606 -2
  197. package/dist/locales/de.json +607 -3
  198. package/dist/locales/el.json +607 -3
  199. package/dist/locales/en.json +607 -3
  200. package/dist/locales/es.json +607 -3
  201. package/dist/locales/fr.json +607 -3
  202. package/dist/locales/hi.json +607 -3
  203. package/dist/locales/it.json +607 -3
  204. package/dist/locales/ja.json +607 -3
  205. package/dist/locales/nl.json +607 -3
  206. package/dist/locales/pl.json +607 -3
  207. package/dist/locales/pt.json +607 -3
  208. package/dist/locales/ro.json +607 -3
  209. package/dist/locales/ru.json +606 -2
  210. package/dist/locales/sq.json +607 -3
  211. package/dist/locales/sv.json +607 -3
  212. package/dist/locales/tr.json +607 -3
  213. package/dist/locales/zh.json +607 -3
  214. package/dist/patterns/alia-assistant/index.js +1 -1
  215. package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
  216. package/dist/patterns/calendar/index.js +1 -1
  217. package/dist/patterns/check-in-documents/check-in-documents.d.ts +61 -0
  218. package/dist/patterns/check-in-documents/check-in-signable-document.d.ts +32 -0
  219. package/dist/patterns/check-in-documents/index.d.ts +4 -0
  220. package/dist/patterns/check-in-documents/index.js +5 -0
  221. package/dist/patterns/error-page/index.js +1 -1
  222. package/dist/patterns/patient-account-settings/index.d.ts +4 -0
  223. package/dist/patterns/patient-account-settings/index.js +5 -0
  224. package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts +36 -0
  225. package/dist/patterns/patient-account-settings/patient-account-settings.d.ts +94 -0
  226. package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts +91 -0
  227. package/dist/patterns/patient-check-in/index.d.ts +20 -0
  228. package/dist/patterns/patient-check-in/index.js +13 -0
  229. package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts +33 -0
  230. package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts +29 -0
  231. package/dist/patterns/patient-check-in/patient-check-in-done.d.ts +25 -0
  232. package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts +29 -0
  233. package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts +23 -0
  234. package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts +61 -0
  235. package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts +73 -0
  236. package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts +9 -0
  237. package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts +29 -0
  238. package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts +60 -0
  239. package/dist/patterns/patient-check-in/patient-check-in-types.d.ts +92 -0
  240. package/dist/patterns/patient-portal/index.d.ts +12 -0
  241. package/dist/patterns/patient-portal/index.js +13 -0
  242. package/dist/patterns/patient-portal/portal-appointments.d.ts +70 -0
  243. package/dist/patterns/patient-portal/portal-details.d.ts +148 -0
  244. package/dist/patterns/patient-portal/portal-documents.d.ts +74 -0
  245. package/dist/patterns/patient-portal/portal-format.d.ts +14 -0
  246. package/dist/patterns/patient-portal/portal-home.d.ts +71 -0
  247. package/dist/patterns/patient-portal/portal-parts.d.ts +107 -0
  248. package/dist/patterns/patient-portal/portal-shell.d.ts +84 -0
  249. package/dist/patterns/patient-portal/portal-types.d.ts +157 -0
  250. package/dist/patterns/patient-sign-in/index.d.ts +7 -0
  251. package/dist/patterns/patient-sign-in/index.js +15 -0
  252. package/dist/patterns/patient-sign-in/patient-card.d.ts +74 -0
  253. package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts +109 -0
  254. package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts +157 -0
  255. package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts +143 -0
  256. package/dist/patterns/registration-form/index.js +1 -1
  257. package/dist/patterns/signature-request/index.js +1 -1
  258. package/dist/patterns/signing/index.d.ts +26 -0
  259. package/dist/patterns/signing/index.js +16 -0
  260. package/dist/patterns/signing/multi-field-signer.d.ts +138 -0
  261. package/dist/patterns/signing/signing-awaiting-screen.d.ts +25 -0
  262. package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
  263. package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
  264. package/dist/patterns/signing/signing-chrome.d.ts +30 -0
  265. package/dist/patterns/signing/signing-document-screen.d.ts +104 -0
  266. package/dist/patterns/signing/signing-end-screen.d.ts +27 -0
  267. package/dist/patterns/signing/signing-finished-screen.d.ts +34 -0
  268. package/dist/patterns/signing/signing-footer.d.ts +56 -0
  269. package/dist/patterns/signing/signing-handoff-screen.d.ts +37 -0
  270. package/dist/patterns/signing/signing-message-dialog.d.ts +29 -0
  271. package/dist/patterns/signing/signing-progress-chip.d.ts +27 -0
  272. package/dist/patterns/signing/signing-roster.d.ts +44 -0
  273. package/dist/patterns/signing/signing-staff-id-confirmation.d.ts +49 -0
  274. package/dist/patterns/verify-identity/index.js +1 -1
  275. package/dist/tokens.css +1 -1
  276. package/package.json +57 -1
  277. package/dist/_chunks/appointment-card-OAOur8lH.js +0 -434
  278. package/dist/_chunks/appointment-tray-DSFqO5Rm.js +0 -193
  279. package/dist/_chunks/document-preview-_kQ9QvZV.js +0 -291
  280. package/dist/_chunks/finished-terminal-FR8uc_Ws.js +0 -122
  281. package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
  282. package/dist/_chunks/is-safe-url-DkETxeHz.js +0 -7
  283. package/dist/_chunks/otp-input-gV1446Dw.js +0 -301
  284. package/dist/_chunks/session-countdown-C4tzbJVc.js +0 -223
  285. package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +0 -210
@@ -1,210 +0,0 @@
1
- import { useRef as I, useEffect as M, useState as F, useMemo as E, useCallback as s } from "react";
2
- import { flushSync as R } from "react-dom";
3
- function x(e) {
4
- return e != null && e.current ? e.current : typeof document > "u" ? null : document;
5
- }
6
- function O(e, l) {
7
- const c = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : (
8
- // SSR / jsdom fallback — drop every character that's
9
- // significant in a CSS attribute selector. Conservative but
10
- // robust enough for the test environment.
11
- e.replace(/["'\\[\]]/g, "")
12
- ), d = `[data-error-anchor="${c}"], [name="${c}"], [name$="[${c}]"]`, u = Array.from(l.querySelectorAll(d));
13
- return u.length === 0 ? null : u.find((p) => p.offsetParent !== null) ?? u[0];
14
- }
15
- function $(e, l, c = {}) {
16
- const {
17
- scope: d,
18
- scrollOptions: u = { behavior: "smooth", block: "center" },
19
- focus: a = !0,
20
- skipInitialMount: p = !0
21
- } = c, o = I(!1), f = I(null), i = l.find((h) => !!e[h]) ?? null;
22
- M(() => {
23
- if (p && !o.current) {
24
- o.current = !0, f.current = i;
25
- return;
26
- }
27
- if (!i) {
28
- f.current = null;
29
- return;
30
- }
31
- if (i === f.current || typeof window > "u") return;
32
- const h = window.requestAnimationFrame(() => {
33
- const g = x(d);
34
- if (!g) return;
35
- const t = O(i, g);
36
- t && (t.scrollIntoView(u), a && t.focus({ preventScroll: !0 }), f.current = i);
37
- });
38
- return () => window.cancelAnimationFrame(h);
39
- }, [i]);
40
- }
41
- function k(e, l = !1) {
42
- const c = {};
43
- for (const d of e)
44
- c[d.id] = { signed: l ? !1 : !!d.signed };
45
- return c;
46
- }
47
- function D(e) {
48
- const [l, c] = F(
49
- () => k(e)
50
- ), [d, u] = F(null), [a, p] = F(
51
- () => {
52
- var n;
53
- return ((n = e[0]) == null ? void 0 : n.id) ?? null;
54
- }
55
- ), o = E(
56
- () => e.map((n) => {
57
- const r = l[n.id];
58
- return {
59
- ...n,
60
- signed: r ? r.signed : !!n.signed,
61
- payload: r == null ? void 0 : r.payload
62
- };
63
- }),
64
- [e, l]
65
- ), f = E(
66
- () => o.reduce((n, r) => r.signed ? n + 1 : n, 0),
67
- [o]
68
- ), i = o.length, h = i > 0 && f === i, g = s((n) => {
69
- u(n);
70
- }, []), t = s(() => {
71
- u(null);
72
- }, []), w = s((n, r) => {
73
- c((m) => ({ ...m, [n]: { signed: !0, payload: r } })), u((m) => m === n ? null : m);
74
- }, []), T = s(
75
- (n) => {
76
- var r;
77
- return !!((r = l[n]) != null && r.signed);
78
- },
79
- [l]
80
- ), S = s(() => {
81
- var n;
82
- c(k(e, !0)), u(null), p(((n = e[0]) == null ? void 0 : n.id) ?? null);
83
- }, [e]), C = s(() => {
84
- p((n) => {
85
- const r = o.length;
86
- if (r === 0) return null;
87
- const m = n ? o.findIndex((y) => y.id === n) : -1;
88
- return o[(m + 1 + r) % r].id;
89
- });
90
- }, [o]), v = s(() => {
91
- p((n) => {
92
- const r = o.length;
93
- if (r === 0) return null;
94
- const m = n ? o.findIndex((y) => y.id === n) : 0;
95
- return o[(m - 1 + r) % r].id;
96
- });
97
- }, [o]), A = s(() => {
98
- p((n) => {
99
- const r = o.length;
100
- if (r === 0) return n;
101
- const m = n ? o.findIndex((y) => y.id === n) : -1;
102
- for (let y = 1; y <= r; y += 1) {
103
- const b = o[(m + y) % r];
104
- if (!b.signed) return b.id;
105
- }
106
- return n;
107
- });
108
- }, [o]);
109
- return E(
110
- () => ({
111
- fields: o,
112
- signedCount: f,
113
- total: i,
114
- isComplete: h,
115
- activeFieldId: d,
116
- openField: g,
117
- closeField: t,
118
- markSigned: w,
119
- isFieldSigned: T,
120
- reset: S,
121
- cursorFieldId: a,
122
- goToNextField: C,
123
- goToPreviousField: v,
124
- goToNextUnsigned: A
125
- }),
126
- [
127
- o,
128
- f,
129
- i,
130
- h,
131
- d,
132
- g,
133
- t,
134
- w,
135
- T,
136
- S,
137
- a,
138
- C,
139
- v,
140
- A
141
- ]
142
- );
143
- }
144
- const q = "ds-zoom-drilldown", L = () => {
145
- if (typeof document > "u") return null;
146
- const e = document.querySelector("main");
147
- return e ? e.querySelector("[data-radix-scroll-area-viewport]") ?? e.closest("[data-radix-scroll-area-viewport]") ?? e : null;
148
- }, N = (e) => typeof e.startViewTransition == "function" && typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("view-transition-class", q);
149
- function P(e = {}) {
150
- const [l, c] = F(null), d = I(
151
- null
152
- ), u = I(e.getScrollContainer);
153
- u.current = e.getScrollContainer;
154
- const a = s(
155
- () => (u.current ?? L)(),
156
- []
157
- ), p = s(() => {
158
- const t = a();
159
- return {
160
- window: typeof window < "u" ? window.scrollY : 0,
161
- container: t ? t.scrollTop : 0
162
- };
163
- }, [a]), o = s(() => {
164
- const t = d.current;
165
- if (!t) return;
166
- d.current = null;
167
- let w = 0;
168
- const T = () => {
169
- const S = a();
170
- typeof window < "u" && window.scrollTo({ top: t.window }), S && (S.scrollTop = t.container), !((typeof window > "u" || Math.abs(window.scrollY - t.window) < 2) && (!S || Math.abs(S.scrollTop - t.container) < 2)) && w < 20 && (w += 1, requestAnimationFrame(T));
171
- };
172
- T();
173
- }, [a]), f = s(() => {
174
- const t = a();
175
- typeof window < "u" && window.scrollTo({ top: 0 }), t && (t.scrollTop = 0);
176
- }, [a]), i = s(
177
- (t) => {
178
- var v;
179
- const w = document, T = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, S = t === null;
180
- if (T || !N(w) || !w.startViewTransition) {
181
- R(() => c(t)), S ? o() : f();
182
- return;
183
- }
184
- const C = w.startViewTransition(() => {
185
- R(() => c(t)), S || f();
186
- });
187
- S && ((v = C == null ? void 0 : C.finished) == null || v.then(o, o));
188
- },
189
- [o, f]
190
- ), h = s(
191
- (t) => {
192
- d.current = p(), i(t);
193
- },
194
- [p, i]
195
- ), g = s(() => i(null), [i]);
196
- return M(() => {
197
- if (l === null) return;
198
- const t = (w) => {
199
- w.key === "Escape" && !w.defaultPrevented && g();
200
- };
201
- return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
202
- }, [l, g]), { selected: l, open: h, close: g };
203
- }
204
- export {
205
- q as Z,
206
- D as a,
207
- P as b,
208
- $ as u
209
- };
210
- //# sourceMappingURL=use-zoom-drilldown-qCX34w9I.js.map