@alfadocs/ui-kit-debug 1.73.2 → 1.74.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 (290) hide show
  1. package/dist/_chunks/alia-sidebar-CsTRAxC8.js +1323 -0
  2. package/dist/_chunks/alia-sidebar-CsTRAxC8.js.map +1 -0
  3. package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js → anamnesis-summary-rows-vNDyE5HW.js} +2 -2
  4. package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js.map → anamnesis-summary-rows-vNDyE5HW.js.map} +1 -1
  5. package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js → antenatal-schedule-timeline-BGewPfEX.js} +18 -18
  6. package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js.map → antenatal-schedule-timeline-BGewPfEX.js.map} +1 -1
  7. package/dist/_chunks/{appointment-timeline-CKwMXUid.js → appointment-timeline-1-Za2miy.js} +2 -2
  8. package/dist/_chunks/{appointment-timeline-CKwMXUid.js.map → appointment-timeline-1-Za2miy.js.map} +1 -1
  9. package/dist/_chunks/{ar-pLopgMbL.js → ar-C4YQVTH6.js} +2 -2
  10. package/dist/_chunks/{ar-pLopgMbL.js.map → ar-C4YQVTH6.js.map} +1 -1
  11. package/dist/_chunks/{auth-form-parts-DHv6LVV2.js → auth-form-parts-B3GWChvG.js} +2 -2
  12. package/dist/_chunks/{auth-form-parts-DHv6LVV2.js.map → auth-form-parts-B3GWChvG.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js → balance-badge-cell-B49xgL6H.js} +2 -2
  14. package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js.map → balance-badge-cell-B49xgL6H.js.map} +1 -1
  15. package/dist/_chunks/{booking-CTRoFbIS.js → booking-sq9sa29d.js} +9 -9
  16. package/dist/_chunks/booking-sq9sa29d.js.map +1 -0
  17. package/dist/_chunks/brand-mark-DLk9kD8g.js +63 -0
  18. package/dist/_chunks/brand-mark-DLk9kD8g.js.map +1 -0
  19. package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js → calendar-appointment-editor-dialog-CctI6mpd.js} +8 -8
  20. package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js.map → calendar-appointment-editor-dialog-CctI6mpd.js.map} +1 -1
  21. package/dist/_chunks/{cycle-calculator-Ycp3li61.js → cycle-calculator-HO3s5InI.js} +5 -5
  22. package/dist/_chunks/{cycle-calculator-Ycp3li61.js.map → cycle-calculator-HO3s5InI.js.map} +1 -1
  23. package/dist/_chunks/{date-picker-KcoNNsM0.js → date-picker-CdhXlgVI.js} +4 -4
  24. package/dist/_chunks/{date-picker-KcoNNsM0.js.map → date-picker-CdhXlgVI.js.map} +1 -1
  25. package/dist/_chunks/{date-picker-variants-DN37Oj5-.js → date-picker-variants-Dt6UbonG.js} +25 -25
  26. package/dist/_chunks/{date-picker-variants-DN37Oj5-.js.map → date-picker-variants-Dt6UbonG.js.map} +1 -1
  27. package/dist/_chunks/{date-range-picker-CjcjUJLW.js → date-range-picker-B_j4VQlV.js} +5 -5
  28. package/dist/_chunks/{date-range-picker-CjcjUJLW.js.map → date-range-picker-B_j4VQlV.js.map} +1 -1
  29. package/dist/_chunks/{date-time-picker-BVQNZ4yC.js → date-time-picker-n-yrlMJq.js} +3 -3
  30. package/dist/_chunks/{date-time-picker-BVQNZ4yC.js.map → date-time-picker-n-yrlMJq.js.map} +1 -1
  31. package/dist/_chunks/{de-lVkJRPnh.js → de-B1B3PIgY.js} +2 -2
  32. package/dist/_chunks/{de-lVkJRPnh.js.map → de-B1B3PIgY.js.map} +1 -1
  33. package/dist/_chunks/{due-date-calculator-B0gyOijA.js → due-date-calculator-CDWTSblh.js} +6 -6
  34. package/dist/_chunks/{due-date-calculator-B0gyOijA.js.map → due-date-calculator-CDWTSblh.js.map} +1 -1
  35. package/dist/_chunks/{el-CHzxNWPj.js → el-iLqGpapg.js} +16 -16
  36. package/dist/_chunks/{el-CHzxNWPj.js.map → el-iLqGpapg.js.map} +1 -1
  37. package/dist/_chunks/{en-GB-CwxYmmhU.js → en-GB-CxPRQbD6.js} +6 -6
  38. package/dist/_chunks/{en-GB-CwxYmmhU.js.map → en-GB-CxPRQbD6.js.map} +1 -1
  39. package/dist/_chunks/{es-Ck-oxbHW.js → es-Bg1oqwDs.js} +2 -2
  40. package/dist/_chunks/{es-Ck-oxbHW.js.map → es-Bg1oqwDs.js.map} +1 -1
  41. package/dist/_chunks/{forgot-password-form-D6kB72OD.js → forgot-password-form-BSOZVrZG.js} +3 -3
  42. package/dist/_chunks/{forgot-password-form-D6kB72OD.js.map → forgot-password-form-BSOZVrZG.js.map} +1 -1
  43. package/dist/_chunks/{format-D-1gTdHF.js → format--x5jypvH.js} +13 -13
  44. package/dist/_chunks/{format-D-1gTdHF.js.map → format--x5jypvH.js.map} +1 -1
  45. package/dist/_chunks/{fr-fWRnDcSD.js → fr-DpGxyOGI.js} +2 -2
  46. package/dist/_chunks/{fr-fWRnDcSD.js.map → fr-DpGxyOGI.js.map} +1 -1
  47. package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js → gestational-age-calculator-CTHeJJdb.js} +7 -7
  48. package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js.map → gestational-age-calculator-CTHeJJdb.js.map} +1 -1
  49. package/dist/_chunks/{hcg-doubling-BnopYgd-.js → hcg-doubling-BBk-a33g.js} +11 -11
  50. package/dist/_chunks/{hcg-doubling-BnopYgd-.js.map → hcg-doubling-BBk-a33g.js.map} +1 -1
  51. package/dist/_chunks/{hi-B5uX0h3V.js → hi-3Dtsksrw.js} +2 -2
  52. package/dist/_chunks/{hi-B5uX0h3V.js.map → hi-3Dtsksrw.js.map} +1 -1
  53. package/dist/_chunks/{isSameWeek-u81Z-J7h.js → isSameWeek-DyVftHWi.js} +2 -2
  54. package/dist/_chunks/{isSameWeek-u81Z-J7h.js.map → isSameWeek-DyVftHWi.js.map} +1 -1
  55. package/dist/_chunks/{it-DBoNIelY.js → it-Cp0CA13d.js} +3 -3
  56. package/dist/_chunks/{it-DBoNIelY.js.map → it-Cp0CA13d.js.map} +1 -1
  57. package/dist/_chunks/{ja-Du8gfg8p.js → ja-9FOyR1lb.js} +22 -22
  58. package/dist/_chunks/{ja-Du8gfg8p.js.map → ja-9FOyR1lb.js.map} +1 -1
  59. package/dist/_chunks/{kit-extensions-DgBi3tsK.js → kit-extensions-sNTZWkoo.js} +4 -4
  60. package/dist/_chunks/{kit-extensions-DgBi3tsK.js.map → kit-extensions-sNTZWkoo.js.map} +1 -1
  61. package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js → link-cell-renderer-B0riA_h_.js} +2 -2
  62. package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js.map → link-cell-renderer-B0riA_h_.js.map} +1 -1
  63. package/dist/_chunks/{login-dev-card-pnJbVaoQ.js → login-dev-card-DRxTPkE9.js} +3 -3
  64. package/dist/_chunks/{login-dev-card-pnJbVaoQ.js.map → login-dev-card-DRxTPkE9.js.map} +1 -1
  65. package/dist/_chunks/{nl-BCBwxYi8.js → nl-sfx-zJgR.js} +2 -2
  66. package/dist/_chunks/{nl-BCBwxYi8.js.map → nl-sfx-zJgR.js.map} +1 -1
  67. package/dist/_chunks/{notes-panel-C_QshXyI.js → notes-panel-CxjMovCh.js} +2 -2
  68. package/dist/_chunks/{notes-panel-C_QshXyI.js.map → notes-panel-CxjMovCh.js.map} +1 -1
  69. package/dist/_chunks/{parse-UB4FJGNA.js → parse-B0s7bY4d.js} +3 -3
  70. package/dist/_chunks/{parse-UB4FJGNA.js.map → parse-B0s7bY4d.js.map} +1 -1
  71. package/dist/_chunks/{parseISO-y3LncvfO.js → parseISO-DZZ5a-zK.js} +2 -2
  72. package/dist/_chunks/{parseISO-y3LncvfO.js.map → parseISO-DZZ5a-zK.js.map} +1 -1
  73. package/dist/_chunks/{patient-details-Cd_dCqkg.js → patient-details-Dgd_tocD.js} +2 -2
  74. package/dist/_chunks/{patient-details-Cd_dCqkg.js.map → patient-details-Dgd_tocD.js.map} +1 -1
  75. package/dist/_chunks/{patient-field-row-D6Ftm46u.js → patient-field-row-BFVlJnS9.js} +3 -3
  76. package/dist/_chunks/{patient-field-row-D6Ftm46u.js.map → patient-field-row-BFVlJnS9.js.map} +1 -1
  77. package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js → patient-summary-card-BTKvFUmh.js} +2 -2
  78. package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js.map → patient-summary-card-BTKvFUmh.js.map} +1 -1
  79. package/dist/_chunks/{phone-input-O9camxkq.js → phone-input-EwVuqFik.js} +74 -74
  80. package/dist/_chunks/phone-input-EwVuqFik.js.map +1 -0
  81. package/dist/_chunks/{pl-HwLM6gPs.js → pl-BLh7KO-s.js} +3 -3
  82. package/dist/_chunks/{pl-HwLM6gPs.js.map → pl-BLh7KO-s.js.map} +1 -1
  83. package/dist/_chunks/{pregnancy-dating-CvNFirHt.js → pregnancy-dating-JBAUbM40.js} +7 -7
  84. package/dist/_chunks/{pregnancy-dating-CvNFirHt.js.map → pregnancy-dating-JBAUbM40.js.map} +1 -1
  85. package/dist/_chunks/{pt-BxhT5ZQH.js → pt-CPKOrOLj.js} +2 -2
  86. package/dist/_chunks/{pt-BxhT5ZQH.js.map → pt-CPKOrOLj.js.map} +1 -1
  87. package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js → radiograph-panel.agent-DQh2SX8G.js} +3 -3
  88. package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js.map → radiograph-panel.agent-DQh2SX8G.js.map} +1 -1
  89. package/dist/_chunks/registration-form-B6qqeXP1.js +1310 -0
  90. package/dist/_chunks/registration-form-B6qqeXP1.js.map +1 -0
  91. package/dist/_chunks/{rich-text-editor-BXFgcvBW.js → rich-text-editor-BZTyxQBd.js} +1683 -1673
  92. package/dist/_chunks/rich-text-editor-BZTyxQBd.js.map +1 -0
  93. package/dist/_chunks/{ro-Do9W55ae.js → ro-Dc-oNqbF.js} +2 -2
  94. package/dist/_chunks/{ro-Do9W55ae.js.map → ro-Dc-oNqbF.js.map} +1 -1
  95. package/dist/_chunks/{ru-PDBX5gdf.js → ru-BtNpDZRR.js} +3 -3
  96. package/dist/_chunks/{ru-PDBX5gdf.js.map → ru-BtNpDZRR.js.map} +1 -1
  97. package/dist/_chunks/send-registration-link-form-pO2bGjGa.js +409 -0
  98. package/dist/_chunks/send-registration-link-form-pO2bGjGa.js.map +1 -0
  99. package/dist/_chunks/{slot-grid-uA9j7Nik.js → slot-grid-Bb13H9Rl.js} +3 -3
  100. package/dist/_chunks/{slot-grid-uA9j7Nik.js.map → slot-grid-Bb13H9Rl.js.map} +1 -1
  101. package/dist/_chunks/{sq-DnvsgyIh.js → sq-D4c7olaV.js} +2 -2
  102. package/dist/_chunks/{sq-DnvsgyIh.js.map → sq-D4c7olaV.js.map} +1 -1
  103. package/dist/_chunks/subDays-DKISP2nE.js +8 -0
  104. package/dist/_chunks/{subDays-xH7cpN6B.js.map → subDays-DKISP2nE.js.map} +1 -1
  105. package/dist/_chunks/{sv-CpFSK8xS.js → sv-Bf_dHPvh.js} +2 -2
  106. package/dist/_chunks/{sv-CpFSK8xS.js.map → sv-Bf_dHPvh.js.map} +1 -1
  107. package/dist/_chunks/{task-editor-BTeUFGUX.js → task-editor-CRhfwP9T.js} +2 -2
  108. package/dist/_chunks/{task-editor-BTeUFGUX.js.map → task-editor-CRhfwP9T.js.map} +1 -1
  109. package/dist/_chunks/{tr-DW4oQYHT.js → tr-xqQ6cbGY.js} +2 -2
  110. package/dist/_chunks/{tr-DW4oQYHT.js.map → tr-xqQ6cbGY.js.map} +1 -1
  111. package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js → use-appointment-details-read-BFslxbRr.js} +2 -2
  112. package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js.map → use-appointment-details-read-BFslxbRr.js.map} +1 -1
  113. package/dist/_chunks/use-field-match-C8ug3sdQ.js +30 -0
  114. package/dist/_chunks/use-field-match-C8ug3sdQ.js.map +1 -0
  115. package/dist/_chunks/use-registration-submit-CLGHxwoT.js +112 -0
  116. package/dist/_chunks/use-registration-submit-CLGHxwoT.js.map +1 -0
  117. package/dist/_chunks/{zh-CN-QGEs29fQ.js → zh-CN-C657DBCO.js} +3 -3
  118. package/dist/_chunks/{zh-CN-QGEs29fQ.js.map → zh-CN-C657DBCO.js.map} +1 -1
  119. package/dist/agent-catalog.json +87 -3
  120. package/dist/agent-i18n/en.json +9 -2
  121. package/dist/alia-asteroid-icon/index.js +52 -0
  122. package/dist/alia-asteroid-icon/index.js.map +1 -0
  123. package/dist/aws-transcribe/index.js +320 -0
  124. package/dist/aws-transcribe/index.js.map +1 -0
  125. package/dist/components/appointment-details-panel/index.js +1 -1
  126. package/dist/components/appointment-timeline/index.js +1 -1
  127. package/dist/components/booking/booking.d.ts.map +1 -1
  128. package/dist/components/booking/index.js +1 -1
  129. package/dist/components/cycle-calculator/index.js +1 -1
  130. package/dist/components/data-table/index.js +1 -1
  131. package/dist/components/date-picker/index.js +1 -1
  132. package/dist/components/date-range-picker/index.js +1 -1
  133. package/dist/components/date-time-picker/index.js +1 -1
  134. package/dist/components/due-date-calculator/index.js +2 -2
  135. package/dist/components/gestational-age-calculator/index.js +1 -1
  136. package/dist/components/hcg-doubling/index.js +1 -1
  137. package/dist/components/index.d.ts +1 -0
  138. package/dist/components/index.d.ts.map +1 -1
  139. package/dist/components/notes-panel/index.js +1 -1
  140. package/dist/components/patient-details/index.js +1 -1
  141. package/dist/components/patient-summary-card/index.js +1 -1
  142. package/dist/components/patient-table/index.js +1 -1
  143. package/dist/components/phone-input/index.js +1 -1
  144. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  145. package/dist/components/pregnancy-dating/index.js +1 -1
  146. package/dist/components/radiograph-panel/index.js +1 -1
  147. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
  148. package/dist/components/rich-text-editor/index.js +2 -2
  149. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  150. package/dist/components/slot-grid/index.js +1 -1
  151. package/dist/components/task-editor/index.js +1 -1
  152. package/dist/hooks/index.js +1 -1
  153. package/dist/hooks/use-field-match.d.ts +2 -2
  154. package/dist/hooks/use-field-match.d.ts.map +1 -1
  155. package/dist/i18n/locales/ar.d.ts +36 -0
  156. package/dist/i18n/locales/ar.d.ts.map +1 -1
  157. package/dist/i18n/locales/ar.js +38 -2
  158. package/dist/i18n/locales/ar.js.map +1 -1
  159. package/dist/i18n/locales/de.d.ts +36 -0
  160. package/dist/i18n/locales/de.d.ts.map +1 -1
  161. package/dist/i18n/locales/de.js +38 -2
  162. package/dist/i18n/locales/de.js.map +1 -1
  163. package/dist/i18n/locales/el.d.ts +36 -0
  164. package/dist/i18n/locales/el.d.ts.map +1 -1
  165. package/dist/i18n/locales/el.js +38 -2
  166. package/dist/i18n/locales/el.js.map +1 -1
  167. package/dist/i18n/locales/en.d.ts +36 -0
  168. package/dist/i18n/locales/en.d.ts.map +1 -1
  169. package/dist/i18n/locales/en.js +38 -2
  170. package/dist/i18n/locales/en.js.map +1 -1
  171. package/dist/i18n/locales/es.d.ts +36 -0
  172. package/dist/i18n/locales/es.d.ts.map +1 -1
  173. package/dist/i18n/locales/es.js +38 -2
  174. package/dist/i18n/locales/es.js.map +1 -1
  175. package/dist/i18n/locales/fr.d.ts +36 -0
  176. package/dist/i18n/locales/fr.d.ts.map +1 -1
  177. package/dist/i18n/locales/fr.js +38 -2
  178. package/dist/i18n/locales/fr.js.map +1 -1
  179. package/dist/i18n/locales/hi.d.ts +36 -0
  180. package/dist/i18n/locales/hi.d.ts.map +1 -1
  181. package/dist/i18n/locales/hi.js +38 -2
  182. package/dist/i18n/locales/hi.js.map +1 -1
  183. package/dist/i18n/locales/it.d.ts +36 -0
  184. package/dist/i18n/locales/it.d.ts.map +1 -1
  185. package/dist/i18n/locales/it.js +38 -2
  186. package/dist/i18n/locales/it.js.map +1 -1
  187. package/dist/i18n/locales/ja.d.ts +36 -0
  188. package/dist/i18n/locales/ja.d.ts.map +1 -1
  189. package/dist/i18n/locales/ja.js +38 -2
  190. package/dist/i18n/locales/ja.js.map +1 -1
  191. package/dist/i18n/locales/nl.d.ts +36 -0
  192. package/dist/i18n/locales/nl.d.ts.map +1 -1
  193. package/dist/i18n/locales/nl.js +38 -2
  194. package/dist/i18n/locales/nl.js.map +1 -1
  195. package/dist/i18n/locales/pl.d.ts +36 -0
  196. package/dist/i18n/locales/pl.d.ts.map +1 -1
  197. package/dist/i18n/locales/pl.js +38 -2
  198. package/dist/i18n/locales/pl.js.map +1 -1
  199. package/dist/i18n/locales/pt.d.ts +36 -0
  200. package/dist/i18n/locales/pt.d.ts.map +1 -1
  201. package/dist/i18n/locales/pt.js +38 -2
  202. package/dist/i18n/locales/pt.js.map +1 -1
  203. package/dist/i18n/locales/ro.d.ts +36 -0
  204. package/dist/i18n/locales/ro.d.ts.map +1 -1
  205. package/dist/i18n/locales/ro.js +38 -2
  206. package/dist/i18n/locales/ro.js.map +1 -1
  207. package/dist/i18n/locales/ru.d.ts +36 -0
  208. package/dist/i18n/locales/ru.d.ts.map +1 -1
  209. package/dist/i18n/locales/ru.js +38 -2
  210. package/dist/i18n/locales/ru.js.map +1 -1
  211. package/dist/i18n/locales/sq.d.ts +36 -0
  212. package/dist/i18n/locales/sq.d.ts.map +1 -1
  213. package/dist/i18n/locales/sq.js +38 -2
  214. package/dist/i18n/locales/sq.js.map +1 -1
  215. package/dist/i18n/locales/sv.d.ts +36 -0
  216. package/dist/i18n/locales/sv.d.ts.map +1 -1
  217. package/dist/i18n/locales/sv.js +38 -2
  218. package/dist/i18n/locales/sv.js.map +1 -1
  219. package/dist/i18n/locales/tr.d.ts +36 -0
  220. package/dist/i18n/locales/tr.d.ts.map +1 -1
  221. package/dist/i18n/locales/tr.js +38 -2
  222. package/dist/i18n/locales/tr.js.map +1 -1
  223. package/dist/i18n/locales/zh.d.ts +36 -0
  224. package/dist/i18n/locales/zh.d.ts.map +1 -1
  225. package/dist/i18n/locales/zh.js +38 -2
  226. package/dist/i18n/locales/zh.js.map +1 -1
  227. package/dist/index.js +296 -292
  228. package/dist/index.js.map +1 -1
  229. package/dist/locales/ar.json +38 -2
  230. package/dist/locales/de.json +38 -2
  231. package/dist/locales/el.json +38 -2
  232. package/dist/locales/en.json +38 -2
  233. package/dist/locales/es.json +38 -2
  234. package/dist/locales/fr.json +38 -2
  235. package/dist/locales/hi.json +38 -2
  236. package/dist/locales/it.json +38 -2
  237. package/dist/locales/ja.json +38 -2
  238. package/dist/locales/nl.json +38 -2
  239. package/dist/locales/pl.json +38 -2
  240. package/dist/locales/pt.json +38 -2
  241. package/dist/locales/ro.json +38 -2
  242. package/dist/locales/ru.json +38 -2
  243. package/dist/locales/sq.json +38 -2
  244. package/dist/locales/sv.json +38 -2
  245. package/dist/locales/tr.json +38 -2
  246. package/dist/locales/zh.json +38 -2
  247. package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
  248. package/dist/patterns/alia-assistant/alia-types.d.ts +22 -0
  249. package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
  250. package/dist/patterns/alia-assistant/index.js +7 -6
  251. package/dist/patterns/alia-assistant/index.js.map +1 -1
  252. package/dist/patterns/anamnesis/index.js +1 -1
  253. package/dist/patterns/calendar/index.js +1 -1
  254. package/dist/patterns/forgot-password-form/index.js +1 -1
  255. package/dist/patterns/login-form/index.js +1 -1
  256. package/dist/patterns/registration-form/index.d.ts +1 -0
  257. package/dist/patterns/registration-form/index.d.ts.map +1 -1
  258. package/dist/patterns/registration-form/index.js +1 -1
  259. package/dist/patterns/registration-form/registration-form.d.ts +43 -0
  260. package/dist/patterns/registration-form/registration-form.d.ts.map +1 -1
  261. package/dist/patterns/registration-form/registration-verification.d.ts +38 -0
  262. package/dist/patterns/registration-form/registration-verification.d.ts.map +1 -0
  263. package/dist/patterns/registration-form/use-contact-verification.d.ts +107 -0
  264. package/dist/patterns/registration-form/use-contact-verification.d.ts.map +1 -0
  265. package/dist/patterns/registration-form/verification-requests.d.ts +9 -0
  266. package/dist/patterns/registration-form/verification-requests.d.ts.map +1 -0
  267. package/dist/patterns/send-registration-link-form/index.d.ts +3 -0
  268. package/dist/patterns/send-registration-link-form/index.d.ts.map +1 -0
  269. package/dist/patterns/send-registration-link-form/index.js +6 -0
  270. package/dist/patterns/send-registration-link-form/index.js.map +1 -0
  271. package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts +80 -0
  272. package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts.map +1 -0
  273. package/dist/speech/aws-transcribe.d.ts +65 -0
  274. package/dist/speech/aws-transcribe.d.ts.map +1 -0
  275. package/dist/speech/event-stream.d.ts +13 -0
  276. package/dist/speech/event-stream.d.ts.map +1 -0
  277. package/dist/tokens.css +1 -1
  278. package/package.json +13 -1
  279. package/dist/_chunks/alia-sidebar-DZoyUFW8.js +0 -1290
  280. package/dist/_chunks/alia-sidebar-DZoyUFW8.js.map +0 -1
  281. package/dist/_chunks/booking-CTRoFbIS.js.map +0 -1
  282. package/dist/_chunks/phone-input-O9camxkq.js.map +0 -1
  283. package/dist/_chunks/registration-form-BGSVMAga.js +0 -819
  284. package/dist/_chunks/registration-form-BGSVMAga.js.map +0 -1
  285. package/dist/_chunks/rich-text-editor-BXFgcvBW.js.map +0 -1
  286. package/dist/_chunks/subDays-xH7cpN6B.js +0 -8
  287. package/dist/_chunks/use-field-match-pdbEnKvO.js +0 -28
  288. package/dist/_chunks/use-field-match-pdbEnKvO.js.map +0 -1
  289. package/dist/_chunks/use-registration-submit-eWAECgUC.js +0 -171
  290. package/dist/_chunks/use-registration-submit-eWAECgUC.js.map +0 -1
@@ -1,8 +0,0 @@
1
- import { a as o } from "./date-picker-variants-DN37Oj5-.js";
2
- function n(a, s, r) {
3
- return o(a, -s, r);
4
- }
5
- export {
6
- n as s
7
- };
8
- //# sourceMappingURL=subDays-xH7cpN6B.js.map
@@ -1,28 +0,0 @@
1
- import { useState as w, useCallback as E, useEffect as M } from "react";
2
- import { useTranslation as b } from "react-i18next";
3
- const L = {
4
- email: (s) => s.trim().toLowerCase(),
5
- password: (s) => s
6
- };
7
- function C({
8
- value: s,
9
- confirmValue: l,
10
- kind: o,
11
- submitted: f = !1,
12
- normalise: u
13
- }) {
14
- const { t: r } = b("ui"), [m, a] = w(!1), p = E(() => a(!0), []), c = u ?? L[o], t = c(s), e = c(l), n = t === e, d = t !== "" && e !== "" && !n, i = t === "" && e === "";
15
- M(() => {
16
- i && a(!1);
17
- }, [i]);
18
- const h = r(o === "email" ? "fieldMatch.email" : "fieldMatch.password");
19
- return {
20
- matches: n,
21
- error: d && (m || f) ? h : void 0,
22
- confirmProps: { onBlur: p }
23
- };
24
- }
25
- export {
26
- C as u
27
- };
28
- //# sourceMappingURL=use-field-match-pdbEnKvO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-field-match-pdbEnKvO.js","sources":["../../src/hooks/use-field-match.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\n/** Which pair of fields is compared: it picks the comparison and the message. */\nexport type FieldMatchKind = 'email' | 'password';\n\nexport interface UseFieldMatchOptions {\n /** The value of the first field. */\n value: string;\n /** The value of the field that repeats it. */\n confirmValue: string;\n /**\n * `'email'` compares trimmed and without regard to case. `'password'`\n * compares exactly. Each has its own translated message.\n */\n kind: FieldMatchKind;\n /**\n * True once the user has tried to submit the form. The message then\n * shows even if the confirm field was never left.\n */\n submitted?: boolean;\n /**\n * Replaces the default preparation of both values before they are\n * compared, e.g. to strip dots from an address.\n */\n normalise?: (value: string) => string;\n}\n\nexport interface UseFieldMatchReturn {\n /**\n * True when the two values are equal after normalising. Two empty\n * fields match: check that they are filled in separately.\n */\n matches: boolean;\n /**\n * The translated message, ready for `FormField`'s `error`. Set only\n * when both fields have text, they differ, and the user has left the\n * confirm field once or tried to submit. Cleared as soon as they match.\n * Emptying both fields starts again: the message waits for the confirm\n * field to be left once more.\n */\n error: string | undefined;\n /** Spread onto the confirm field's input. */\n confirmProps: { onBlur: () => void };\n}\n\nconst DEFAULT_NORMALISE: Record<FieldMatchKind, (value: string) => string> = {\n email: (value) => value.trim().toLowerCase(),\n password: (value) => value,\n};\n\n/**\n * \"These two fields must match\", for email with confirm email and\n * password with confirm password. It compares the values and says when\n * to show the message; `FormField` shows and announces it.\n *\n * It does not block paste, copy or drop itself. A host that wants the\n * confirm field typed sets `blockPaste` on that input (any field built\n * on `TextInput` takes it); password managers still fill both fields.\n *\n * @example\n * const match = useFieldMatch({\n * value: email,\n * confirmValue: emailConfirm,\n * kind: 'email',\n * submitted,\n * });\n *\n * // `disableBuiltInValidation`: the match is this field's only check.\n * // With EmailInput's own message on too, two messages share one id.\n * <FormField label=\"Confirm email\" required error={match.error}>\n * <EmailInput\n * disableBuiltInValidation\n * value={emailConfirm}\n * onChange={(event) => setEmailConfirm(event.target.value)}\n * {...match.confirmProps}\n * />\n * </FormField>\n */\nexport function useFieldMatch({\n value,\n confirmValue,\n kind,\n submitted = false,\n normalise,\n}: UseFieldMatchOptions): UseFieldMatchReturn {\n const { t } = useTranslation('ui');\n const [blurred, setBlurred] = useState(false);\n const onBlur = useCallback(() => setBlurred(true), []);\n\n const prepare = normalise ?? DEFAULT_NORMALISE[kind];\n const first = prepare(value);\n const second = prepare(confirmValue);\n const matches = first === second;\n const show = first !== '' && second !== '' && !matches;\n\n // Both emptied, as after a server refuses a password: a fresh start,\n // so the message does not jump out at the first key typed.\n const bothEmpty = first === '' && second === '';\n useEffect(() => {\n if (bothEmpty) setBlurred(false);\n }, [bothEmpty]);\n\n // Two plain calls, not a key built from `kind`: the i18n checks read\n // keys from the source.\n const message =\n kind === 'email' ? t('fieldMatch.email') : t('fieldMatch.password');\n\n return {\n matches,\n error: show && (blurred || submitted) ? message : undefined,\n confirmProps: { onBlur },\n };\n}\n"],"names":["DEFAULT_NORMALISE","value","useFieldMatch","confirmValue","kind","submitted","normalise","t","useTranslation","blurred","setBlurred","useState","onBlur","useCallback","prepare","first","second","matches","show","bothEmpty","useEffect","message"],"mappings":";;AA8CA,MAAMA,IAAuE;AAAA,EAC3E,OAAO,CAACC,MAAUA,EAAM,KAAA,EAAO,YAAA;AAAA,EAC/B,UAAU,CAACA,MAAUA;AACvB;AA8BO,SAASC,EAAc;AAAA,EAC5B,OAAAD;AAAA,EACA,cAAAE;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AACF,GAA8C;AAC5C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI,GAC3B,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK,GACtCC,IAASC,EAAY,MAAMH,EAAW,EAAI,GAAG,CAAA,CAAE,GAE/CI,IAAUR,KAAaN,EAAkBI,CAAI,GAC7CW,IAAQD,EAAQb,CAAK,GACrBe,IAASF,EAAQX,CAAY,GAC7Bc,IAAUF,MAAUC,GACpBE,IAAOH,MAAU,MAAMC,MAAW,MAAM,CAACC,GAIzCE,IAAYJ,MAAU,MAAMC,MAAW;AAC7C,EAAAI,EAAU,MAAM;AACd,IAAID,OAAsB,EAAK;AAAA,EACjC,GAAG,CAACA,CAAS,CAAC;AAId,QAAME,IACed,EAAnBH,MAAS,UAAY,qBAAwB,qBAAN;AAEzC,SAAO;AAAA,IACL,SAAAa;AAAA,IACA,OAAOC,MAAST,KAAWJ,KAAagB,IAAU;AAAA,IAClD,cAAc,EAAE,QAAAT,EAAA;AAAA,EAAO;AAE3B;"}
@@ -1,171 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useRef as c, useState as v, useEffect as w } from "react";
3
- import { c as N } from "./index-D2ZczOXr.js";
4
- import { A as R, P as B } from "./mark-pieces-m_rn1mAc.js";
5
- const F = N(
6
- "ds:w-24 ds:shrink-0 ds:select-none ds:text-[color:var(--primary)] ds:forced-colors:text-[CanvasText]"
7
- ), D = {
8
- assemble: "ds:[transform-box:view-box] ds:origin-center ds:motion-safe:animate-[brand-mark-turn_calc(var(--animation-duration)*12)_ease-in-out_1]",
9
- spin: "ds:[transform-box:view-box] ds:origin-center ds:motion-safe:animate-[brand-mark-turn_calc(var(--animation-duration)*8)_ease-in-out_1]",
10
- pulse: "ds:[transform-box:view-box] ds:origin-center ds:motion-safe:animate-[brand-mark-pulse_calc(var(--animation-duration)*6)_ease-in-out_3]",
11
- none: void 0
12
- }, H = {
13
- top: "ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-top_calc(var(--animation-duration)*12)_ease-in-out_1]",
14
- right: "ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-right_calc(var(--animation-duration)*12)_ease-in-out_1]",
15
- left: "ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-left_calc(var(--animation-duration)*12)_ease-in-out_1]",
16
- bottom: "ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-bottom_calc(var(--animation-duration)*12)_ease-in-out_1]"
17
- };
18
- function I({
19
- motion: r = "assemble",
20
- label: e,
21
- className: o
22
- }) {
23
- const t = c(null), [h, m] = v(0);
24
- return w(() => {
25
- const i = t.current;
26
- if (!i) return;
27
- const s = () => m((b) => b + 1);
28
- return i.addEventListener("click", s), () => i.removeEventListener("click", s);
29
- }, []), /* @__PURE__ */ p(
30
- "div",
31
- {
32
- ref: t,
33
- "data-brand-mark": "",
34
- "data-motion": r,
35
- role: e ? "img" : void 0,
36
- "aria-label": e,
37
- "aria-hidden": e ? void 0 : !0,
38
- className: F({ className: o }),
39
- children: /* @__PURE__ */ p(
40
- "svg",
41
- {
42
- xmlns: "http://www.w3.org/2000/svg",
43
- viewBox: "-26 -26 200 200",
44
- fill: "currentColor",
45
- "aria-hidden": "true",
46
- className: "ds:block ds:h-auto ds:w-full ds:overflow-visible",
47
- children: /* @__PURE__ */ p("g", { className: D[r], children: R.map((i) => /* @__PURE__ */ p(
48
- "g",
49
- {
50
- className: r === "assemble" ? H[i] : void 0,
51
- children: /* @__PURE__ */ p(B, { name: i })
52
- },
53
- i
54
- )) }, h)
55
- }
56
- )
57
- }
58
- );
59
- }
60
- function J(r, e, o = !1) {
61
- const [t, h] = v(
62
- () => o ? {} : null
63
- ), [m, i] = v(null), [s, b] = v([]);
64
- if (t !== m)
65
- i(t), b(r.filter((n) => !!e(n)));
66
- else {
67
- const n = s.filter((l) => !!e(l));
68
- n.length !== s.length && b(n);
69
- }
70
- const g = c(null), u = c(null);
71
- return w(() => {
72
- var n, l;
73
- !t || u.current === t || (u.current = t, s.length > 0 ? (n = g.current) == null || n.focus() : (l = t.fallback) == null || l.call(t));
74
- }, [t, s]), {
75
- listed: s,
76
- lists: (n) => s.includes(n),
77
- // A new object each time, so a second refused submit moves focus again.
78
- open: (n) => h({ fallback: n }),
79
- ref: g
80
- };
81
- }
82
- function Q(r, e) {
83
- const [o, t] = v(void 0);
84
- return r && e && o !== r && t(r), !r && o !== void 0 && t(void 0), r && (e || o === r) ? "off" : void 0;
85
- }
86
- const M = 8e3, O = (r) => JSON.stringify(
87
- Object.entries(r ?? {}).filter(([, e]) => !!e).sort(([e], [o]) => e < o ? -1 : e > o ? 1 : 0)
88
- );
89
- function z(r) {
90
- const e = c(r);
91
- e.current = r;
92
- const [o, t] = v(!1), [h, m] = v(!1), [i, s] = v(!1), b = r.submitting || o || h, g = c(null), u = c(!1), n = c(void 0), l = c(!1), x = c(!1), S = c(void 0), T = () => {
93
- u.current = !1, clearTimeout(n.current), m(!1);
94
- };
95
- w(() => () => clearTimeout(n.current), []);
96
- const y = (a) => {
97
- e.current.native ? t(!0) : (l.current = !0, x.current = !1, S.current = e.current.errors), e.current.deliver(a);
98
- }, P = (a) => {
99
- if (b) {
100
- a.preventDefault();
101
- return;
102
- }
103
- s(!1);
104
- const d = e.current.firstProblem();
105
- if (d !== void 0) {
106
- a.preventDefault(), e.current.onRefused(d);
107
- return;
108
- }
109
- if (e.current.captcha) {
110
- a.preventDefault();
111
- const f = g.current;
112
- if (!f) {
113
- s(!0);
114
- return;
115
- }
116
- u.current = !1, f.reset(), u.current = !0, m(!0), clearTimeout(n.current), n.current = setTimeout(
117
- () => m(!1),
118
- M
119
- ), f.execute();
120
- return;
121
- }
122
- if (e.current.native) {
123
- t(!0);
124
- return;
125
- }
126
- a.preventDefault(), y();
127
- }, C = (a) => {
128
- if (!u.current) return;
129
- if (T(), !a) {
130
- s(!0);
131
- return;
132
- }
133
- const d = e.current.firstProblem();
134
- if (d !== void 0) {
135
- e.current.onRefused(d);
136
- return;
137
- }
138
- y(a);
139
- }, L = () => {
140
- u.current && (T(), s(!0));
141
- }, _ = r.errors, k = O(_), E = c(null);
142
- return w(() => {
143
- var f;
144
- if (E.current === null) {
145
- E.current = k;
146
- return;
147
- }
148
- const a = k !== E.current;
149
- E.current = k, l.current && r.submitting && (x.current = !0);
150
- const d = l.current && x.current && !r.submitting && _ !== S.current;
151
- !a && !d || (l.current = !1, x.current = !1, u.current = !1, clearTimeout(n.current), m(!1), (f = g.current) == null || f.reset(), e.current.onAnswer(_ ?? {}));
152
- }, [_, k, r.submitting]), w(() => {
153
- const a = (d) => {
154
- var f, A;
155
- d.persisted && (t(!1), (A = (f = e.current).onRestore) == null || A.call(f));
156
- };
157
- return window.addEventListener("pageshow", a), () => window.removeEventListener("pageshow", a);
158
- }, []), {
159
- busy: b,
160
- captchaFailed: i,
161
- handleSubmit: P,
162
- captcha: { ref: g, onChange: C, onError: L }
163
- };
164
- }
165
- export {
166
- I as B,
167
- Q as a,
168
- z as b,
169
- J as u
170
- };
171
- //# sourceMappingURL=use-registration-submit-eWAECgUC.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-registration-submit-eWAECgUC.js","sources":["../../src/patterns/_shared/brand-mark.tsx","../../src/patterns/_shared/use-error-summary.ts","../../src/patterns/registration-form/use-registration-submit.ts"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* BrandMark — the Alfadocs mark, arriving. */\n/* */\n/* The four pieces of the mark with a short motion when the page opens: */\n/* they fly apart, turn and come back together (`assemble`), or the */\n/* whole mark turns once (`spin`) or beats (`pulse`). It plays once and */\n/* then rests, so nothing moves for more than a few seconds (WCAG */\n/* 2.2.2); a click plays it again. Every motion scales off */\n/* --animation-duration, so reduced motion and the accessible themes */\n/* hold it still. */\n/* -------------------------------------------------------------------- */\n\nimport { useEffect, useRef, useState, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { ALL, Piece, type PieceName } from './mark-pieces';\n\nexport type BrandMarkMotion = 'assemble' | 'spin' | 'pulse' | 'none';\n\nexport interface BrandMarkProps {\n /** How the mark arrives. Default `assemble`. */\n motion?: BrandMarkMotion;\n /**\n * The mark's accessible name, e.g. \"Alfadocs\", when it is the page's\n * logo. Without it the mark is decoration and hidden from screen\n * readers.\n */\n label?: string;\n className?: string;\n}\n\n// The width of the mark on the development login card. The mark draws in\n// `currentColor`, so the ink is set here: the primary colour, or under\n// forced colours (Windows high contrast) the system's text colour, as Logo\n// does. A fill written as a brand colour would not be replaced and could\n// all but vanish against the system background.\nconst brandMarkVariants = cva(\n 'ds:w-24 ds:shrink-0 ds:select-none ds:text-[color:var(--primary)] ds:forced-colors:text-[CanvasText]',\n);\n\n/* Every class is written out in full: Tailwind only generates the ones\n it can read as a whole string. The whole mark turns about the centre\n of the drawing; each piece moves about its own centre. */\nconst WHOLE: Record<BrandMarkMotion, string | undefined> = {\n assemble:\n 'ds:[transform-box:view-box] ds:origin-center ds:motion-safe:animate-[brand-mark-turn_calc(var(--animation-duration)*12)_ease-in-out_1]',\n spin: 'ds:[transform-box:view-box] ds:origin-center ds:motion-safe:animate-[brand-mark-turn_calc(var(--animation-duration)*8)_ease-in-out_1]',\n pulse:\n 'ds:[transform-box:view-box] ds:origin-center ds:motion-safe:animate-[brand-mark-pulse_calc(var(--animation-duration)*6)_ease-in-out_3]',\n none: undefined,\n};\nconst SCATTER: Record<PieceName, string> = {\n top: 'ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-top_calc(var(--animation-duration)*12)_ease-in-out_1]',\n right:\n 'ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-right_calc(var(--animation-duration)*12)_ease-in-out_1]',\n left: 'ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-left_calc(var(--animation-duration)*12)_ease-in-out_1]',\n bottom:\n 'ds:[transform-box:fill-box] ds:origin-center ds:motion-safe:animate-[brand-mark-scatter-bottom_calc(var(--animation-duration)*12)_ease-in-out_1]',\n};\n\nexport function BrandMark({\n motion = 'assemble',\n label,\n className,\n}: BrandMarkProps): ReactNode {\n const ref = useRef<HTMLDivElement | null>(null);\n const [plays, setPlays] = useState(0);\n\n // A listener rather than onClick: the replay is for the pointer only,\n // and the mark stays a plain image to assistive technology.\n useEffect(() => {\n const element = ref.current;\n if (!element) return undefined;\n const replay = () => setPlays((count) => count + 1);\n element.addEventListener('click', replay);\n return () => element.removeEventListener('click', replay);\n }, []);\n\n return (\n <div\n ref={ref}\n data-brand-mark=\"\"\n data-motion={motion}\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n className={brandMarkVariants({ className })}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"-26 -26 200 200\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className=\"ds:block ds:h-auto ds:w-full ds:overflow-visible\"\n >\n {/* A new key starts the motion again from its first frame. */}\n <g key={plays} className={WHOLE[motion]}>\n {ALL.map((name) => (\n <g\n key={name}\n className={motion === 'assemble' ? SCATTER[name] : undefined}\n >\n <Piece name={name} />\n </g>\n ))}\n </g>\n </svg>\n </div>\n );\n}\n","/* -------------------------------------------------------------------- */\n/* useErrorSummary: what the signed-out forms' ErrorSummary lists, and */\n/* when it takes focus. */\n/* */\n/* A refused submit, or a server answer with messages for fields, opens */\n/* the summary: it lists every field then in error and takes focus. A */\n/* field leaves the list once it has no message, and does not come back */\n/* until the next submit: an error made later, on leaving that field, is */\n/* the field's own to announce. A listed field stays quiet. */\n/* */\n/* Shipped with the patterns that import it; not an export of its own. */\n/* -------------------------------------------------------------------- */\n\nimport { useEffect, useRef, useState, type RefObject } from 'react';\nimport type { AlertAnnounce } from '../../components/alert';\n\ninterface OpenRequest {\n /** Called instead of focusing the summary when no field has a message. */\n fallback?: () => void;\n}\n\nexport interface UseErrorSummaryReturn<Field extends string> {\n /** The fields the summary lists now, in the form's order. */\n listed: readonly Field[];\n /** True while the summary lists the field: its own message then stays\n * quiet (FormField's `announceError`). */\n lists: (field: Field) => boolean;\n /**\n * Lists every field in error after this render and moves focus to the\n * summary. When no field has a message, calls `fallback` instead (a\n * message about the whole form, say).\n */\n open: (fallback?: () => void) => void;\n /** For the `ErrorSummary`. */\n ref: RefObject<HTMLDivElement | null>;\n}\n\n/**\n * @param order the fields the form shows, in order.\n * @param messageFor the message a field shows in this render, if any.\n * @param openAtMount open at once: the form arrived with messages from\n * the server (a page it rendered after a failed post).\n */\nexport function useErrorSummary<Field extends string>(\n order: readonly Field[],\n messageFor: (field: Field) => string | undefined,\n openAtMount = false,\n): UseErrorSummaryReturn<Field> {\n const [request, setRequest] = useState<OpenRequest | null>(() =>\n openAtMount ? {} : null,\n );\n const [handled, setHandled] = useState<OpenRequest | null>(null);\n const [listed, setListed] = useState<readonly Field[]>([]);\n\n // Worked out while rendering, not in an effect: the messages and the\n // summary must reach the page in the same commit. A message drawn one\n // commit before the summary would still be announced on its own.\n if (request !== handled) {\n setHandled(request);\n setListed(order.filter((field) => Boolean(messageFor(field))));\n } else {\n const kept = listed.filter((field) => Boolean(messageFor(field)));\n if (kept.length !== listed.length) setListed(kept);\n }\n\n const ref = useRef<HTMLDivElement | null>(null);\n const focusedFor = useRef<OpenRequest | null>(null);\n useEffect(() => {\n if (!request || focusedFor.current === request) return;\n focusedFor.current = request;\n if (listed.length > 0) ref.current?.focus();\n else request.fallback?.();\n }, [request, listed]);\n\n return {\n listed,\n lists: (field) => listed.includes(field),\n // A new object each time, so a second refused submit moves focus again.\n open: (fallback) => setRequest({ fallback }),\n ref,\n };\n}\n\n/**\n * How the message about the whole form is announced, beside the summary.\n * While the summary lists a field it takes focus and reads that message\n * too (its `aria-describedby`), so an alert as well would be read over it:\n * the message stays quiet. It stays quiet until its text changes, because\n * a role=\"alert\" added to text already on screen can be read out of turn.\n * Otherwise the Alert's own default applies.\n */\nexport function useFormMessageAnnounce(\n message: string | undefined,\n summaryOpen: boolean,\n): AlertAnnounce | undefined {\n const [quietFor, setQuietFor] = useState<string | undefined>(undefined);\n // Worked out while rendering, so the message mounts quiet in the same\n // commit as the summary.\n if (message && summaryOpen && quietFor !== message) setQuietFor(message);\n if (!message && quietFor !== undefined) setQuietFor(undefined);\n return message && (summaryOpen || quietFor === message) ? 'off' : undefined;\n}\n","/* -------------------------------------------------------------------- */\n/* useRegistrationSubmit — what happens between \"the user pressed the */\n/* button\" and \"the values left the page\". */\n/* */\n/* Three things that are easy to get wrong live here, away from the */\n/* form's markup so they can be tested on their own: */\n/* */\n/* 1. The submit itself: refuse while busy or invalid, otherwise hand */\n/* over to the host or let the browser post. */\n/* 2. The reCAPTCHA wait: the token arrives later, and the fields stay */\n/* live meanwhile, so the form is checked again when it does. */\n/* 3. The server's answer: telling a new `errors` object that carries */\n/* an answer from one the host merely rebuilt while rendering. */\n/* -------------------------------------------------------------------- */\n\nimport { useEffect, useRef, useState, type RefObject } from 'react';\nimport type { RecaptchaWidgetHandle } from '../../components/recaptcha-widget';\n\ntype Messages = Readonly<Record<string, string | undefined>>;\n\n/**\n * How long the button stays busy waiting for a reCAPTCHA token. Google\n * sends no event when the user closes a challenge, so the wait cannot be\n * open-ended: after this the button comes back and the user can try\n * again. A token that arrives later is still used.\n */\nexport const CAPTCHA_PATIENCE = 8000;\n\nexport interface UseRegistrationSubmitOptions<Field extends string> {\n /** The host's `errors` prop. */\n errors: Messages | undefined;\n /** The host's `submitting` prop. */\n submitting: boolean;\n /** True when the browser posts the form itself. */\n native: boolean;\n /** True when a reCAPTCHA check guards the submit. */\n captcha: boolean;\n /**\n * The first field that stops a submit, or `undefined` when every field\n * is valid. Called when the answer is needed, so it must read the\n * latest values.\n */\n firstProblem: () => Field | undefined;\n /** A submit was refused because of this field. */\n onRefused: (field: Field) => void;\n /**\n * Hand the values over. For a React host, call its `onSubmit`. For a\n * native post this is only called when a reCAPTCHA token arrives (put\n * the token in its field and call `form.submit()`); without reCAPTCHA\n * the browser posts on its own and this is not called.\n */\n deliver: (captchaToken?: string) => void;\n /** The server has answered with these messages. */\n onAnswer: (errors: Messages) => void;\n /** The browser restored the page from its back-forward cache. */\n onRestore?: () => void;\n}\n\nexport interface UseRegistrationSubmitReturn {\n /** True while a submit is on its way: the host is sending, the browser\n * is posting, or a reCAPTCHA token is awaited. */\n busy: boolean;\n /** True when the last reCAPTCHA check failed or expired. */\n captchaFailed: boolean;\n /** The form's `onSubmit`. */\n handleSubmit: (event: { preventDefault: () => void }) => void;\n /** Props for the `RecaptchaWidget`. */\n captcha: {\n ref: RefObject<RecaptchaWidgetHandle | null>;\n onChange: (token: string | null) => void;\n onError: () => void;\n };\n}\n\n/** The messages a host's `errors` carries, whatever order it lists them\n * in and however it spells \"no message\". */\nconst signatureOf = (errors: Messages | undefined): string =>\n JSON.stringify(\n Object.entries(errors ?? {})\n .filter(([, message]) => Boolean(message))\n .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)),\n );\n\nexport function useRegistrationSubmit<Field extends string>(\n options: UseRegistrationSubmitOptions<Field>,\n): UseRegistrationSubmitReturn {\n // The handlers below run long after the render that made them (a token\n // arrives seconds later), so they read the options of the latest render.\n const latest = useRef(options);\n latest.current = options;\n\n // A native post is on its way: the page is about to change.\n const [posting, setPosting] = useState(false);\n // Waiting for a reCAPTCHA token, within the patience above.\n const [verifying, setVerifying] = useState(false);\n const [captchaFailed, setCaptchaFailed] = useState(false);\n const busy = options.submitting || posting || verifying;\n\n const widget = useRef<RecaptchaWidgetHandle | null>(null);\n /** True between asking for a token and the widget's answer. */\n const expecting = useRef(false);\n const patience = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n /** True between handing the values to the host and its next answer. */\n const awaitingAnswer = useRef(false);\n /** The host has shown `submitting` since the values were handed over. */\n const sawSending = useRef(false);\n /** The `errors` object the form was sent with. */\n const sentWith = useRef<Messages | undefined>(undefined);\n\n const stopWaiting = () => {\n expecting.current = false;\n clearTimeout(patience.current);\n setVerifying(false);\n };\n useEffect(() => () => clearTimeout(patience.current), []);\n\n const send = (captchaToken?: string) => {\n if (latest.current.native) {\n setPosting(true);\n } else {\n awaitingAnswer.current = true;\n sawSending.current = false;\n sentWith.current = latest.current.errors;\n }\n latest.current.deliver(captchaToken);\n };\n\n const handleSubmit = (event: { preventDefault: () => void }) => {\n if (busy) {\n event.preventDefault();\n return;\n }\n setCaptchaFailed(false);\n const problem = latest.current.firstProblem();\n if (problem !== undefined) {\n event.preventDefault();\n latest.current.onRefused(problem);\n return;\n }\n if (latest.current.captcha) {\n // The token arrives later, in `onChange`.\n event.preventDefault();\n const handle = widget.current;\n if (!handle) {\n setCaptchaFailed(true);\n return;\n }\n // A token works once, so start clean. The widget reports the\n // reset as \"no token\": that is not the answer to this request.\n expecting.current = false;\n handle.reset();\n expecting.current = true;\n setVerifying(true);\n clearTimeout(patience.current);\n patience.current = setTimeout(\n () => setVerifying(false),\n CAPTCHA_PATIENCE,\n );\n // Queued by the widget if its script is still loading; loads the\n // script again if it failed to.\n handle.execute();\n return;\n }\n if (latest.current.native) {\n // Not prevented: the browser posts the form.\n setPosting(true);\n return;\n }\n event.preventDefault();\n send();\n };\n\n const onChange = (token: string | null) => {\n if (!expecting.current) return;\n stopWaiting();\n if (!token) {\n setCaptchaFailed(true);\n return;\n }\n // The fields stayed live during the wait: check them again, so an\n // edit made meanwhile cannot go out unchecked.\n const problem = latest.current.firstProblem();\n if (problem !== undefined) {\n latest.current.onRefused(problem);\n return;\n }\n send(token);\n };\n\n const onError = () => {\n // A failure nobody is waiting on (the script was blocked when the\n // page loaded) says nothing yet: the next submit tries again.\n if (!expecting.current) return;\n stopWaiting();\n setCaptchaFailed(true);\n };\n\n // The server has answered when `errors` says something new. The same\n // messages can also come back twice (another address, also taken), and\n // then the content cannot tell. A new object alone is no proof either:\n // a host that writes `errors={{ email: emailError }}` makes one on\n // every render, in flight or not. What settles it is `submitting`: a\n // host that sets it while it sends has an answer once it is false\n // again and `errors` is no longer the object the form was sent with.\n const errors = options.errors;\n const signature = signatureOf(errors);\n const lastSignature = useRef<string | null>(null);\n useEffect(() => {\n if (lastSignature.current === null) {\n // The messages the form opened with are not an answer.\n lastSignature.current = signature;\n return;\n }\n const saysSomethingNew = signature !== lastSignature.current;\n lastSignature.current = signature;\n if (awaitingAnswer.current && options.submitting) sawSending.current = true;\n const settled =\n awaitingAnswer.current &&\n sawSending.current &&\n !options.submitting &&\n errors !== sentWith.current;\n if (!saysSomethingNew && !settled) return;\n awaitingAnswer.current = false;\n sawSending.current = false;\n // The token, if any, has been used.\n expecting.current = false;\n clearTimeout(patience.current);\n setVerifying(false);\n widget.current?.reset();\n latest.current.onAnswer(errors ?? {});\n }, [errors, signature, options.submitting]);\n\n // Back from the next page, the browser may restore this one as it was\n // left: mid-post, with the button spinning.\n useEffect(() => {\n const onPageShow = (event: PageTransitionEvent) => {\n if (!event.persisted) return;\n setPosting(false);\n latest.current.onRestore?.();\n };\n window.addEventListener('pageshow', onPageShow);\n return () => window.removeEventListener('pageshow', onPageShow);\n }, []);\n\n return {\n busy,\n captchaFailed,\n handleSubmit,\n captcha: { ref: widget, onChange, onError },\n };\n}\n"],"names":["brandMarkVariants","cva","WHOLE","SCATTER","BrandMark","motion","label","className","ref","useRef","plays","setPlays","useState","useEffect","element","replay","count","jsx","ALL","name","Piece","useErrorSummary","order","messageFor","openAtMount","request","setRequest","handled","setHandled","listed","setListed","field","kept","focusedFor","_a","fallback","useFormMessageAnnounce","message","summaryOpen","quietFor","setQuietFor","CAPTCHA_PATIENCE","signatureOf","errors","a","b","useRegistrationSubmit","options","latest","posting","setPosting","verifying","setVerifying","captchaFailed","setCaptchaFailed","busy","widget","expecting","patience","awaitingAnswer","sawSending","sentWith","stopWaiting","send","captchaToken","handleSubmit","event","problem","handle","onChange","token","onError","signature","lastSignature","saysSomethingNew","settled","onPageShow","_b"],"mappings":";;;;AAmCA,MAAMA,IAAoBC;AAAA,EACxB;AACF,GAKMC,IAAqD;AAAA,EACzD,UACE;AAAA,EACF,MAAM;AAAA,EACN,OACE;AAAA,EACF,MAAM;AACR,GACMC,IAAqC;AAAA,EACzC,KAAK;AAAA,EACL,OACE;AAAA,EACF,MAAM;AAAA,EACN,QACE;AACJ;AAEO,SAASC,EAAU;AAAA,EACxB,QAAAC,IAAS;AAAA,EACT,OAAAC;AAAA,EACA,WAAAC;AACF,GAA8B;AAC5B,QAAMC,IAAMC,EAA8B,IAAI,GACxC,CAACC,GAAOC,CAAQ,IAAIC,EAAS,CAAC;AAIpC,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAUN,EAAI;AACpB,QAAI,CAACM,EAAS;AACd,UAAMC,IAAS,MAAMJ,EAAS,CAACK,MAAUA,IAAQ,CAAC;AAClD,WAAAF,EAAQ,iBAAiB,SAASC,CAAM,GACjC,MAAMD,EAAQ,oBAAoB,SAASC,CAAM;AAAA,EAC1D,GAAG,CAAA,CAAE,GAGH,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAT;AAAA,MACA,mBAAgB;AAAA,MAChB,eAAaH;AAAA,MACb,MAAMC,IAAQ,QAAQ;AAAA,MACtB,cAAYA;AAAA,MACZ,eAAaA,IAAQ,SAAY;AAAA,MACjC,WAAWN,EAAkB,EAAE,WAAAO,GAAW;AAAA,MAE1C,UAAA,gBAAAU;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,eAAY;AAAA,UACZ,WAAU;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