@everfur/sdk 1.1.0 → 1.2.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 (208) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/{Chat.d-CTVJ_qWQ.d.cts → Chat.d-C76mPD5M.d.cts} +1 -1
  3. package/dist/{Chat.d-Bt0fKiOQ.d.ts → Chat.d-Dn_DEpGG.d.ts} +1 -1
  4. package/dist/{DepthViews.d-Dq8eWBvw.d.cts → DepthViews.d-4teBIBu-.d.cts} +1 -1
  5. package/dist/{DepthViews.d-BIfqdrvX.d.ts → DepthViews.d-B5RHCzGS.d.ts} +1 -1
  6. package/dist/{DepthViews.d-BW3HrhnC.d.ts → DepthViews.d-DXGAGojW.d.ts} +1 -1
  7. package/dist/{DepthViews.d-BHb0Xb-C.d.cts → DepthViews.d-v6sBxjrf.d.cts} +1 -1
  8. package/dist/{LifecyclePort.d-Cr1p33a7.d.cts → LifecyclePort.d-Cb9NtmP-.d.cts} +5 -0
  9. package/dist/{LifecyclePort.d-Cr1p33a7.d.ts → LifecyclePort.d-Cb9NtmP-.d.ts} +5 -0
  10. package/dist/{RecordsPage.d-CLrw-AvZ.d.cts → RecordsPage.d-BF4EIVKg.d.cts} +1 -1
  11. package/dist/{RecordsPage.d-Bs-dghTH.d.ts → RecordsPage.d-D2J5rMWk.d.ts} +1 -1
  12. package/dist/animations/index.d.cts +3 -3
  13. package/dist/animations/index.d.ts +3 -3
  14. package/dist/{attachments.d-DjxmIsNp.d.ts → attachments.d-CedhQFlI.d.ts} +1 -1
  15. package/dist/{attachments.d-DTGYmW8Y.d.cts → attachments.d-DMZ8xCT9.d.cts} +1 -1
  16. package/dist/{bookingCopy.d-CX-DMiwi.d.ts → bookingCopy.d-CnKq4gvc.d.ts} +2 -2
  17. package/dist/{bookingCopy.d-D952V8Tq.d.cts → bookingCopy.d-DJmo8fzQ.d.cts} +2 -2
  18. package/dist/{branding.d-SCzhpyTt.d.ts → branding.d-CNeG_CY3.d.ts} +7 -2
  19. package/dist/{branding.d-eGlNC86j.d.cts → branding.d-KOXyiUqX.d.cts} +7 -2
  20. package/dist/{casesRepository.d-bWJHZD-_.d.cts → casesRepository.d-BcmH2Du1.d.cts} +1 -1
  21. package/dist/{casesRepository.d-CnJZlUZ4.d.ts → casesRepository.d-CG3psWUQ.d.ts} +1 -1
  22. package/dist/chat/index.cjs +19 -20
  23. package/dist/chat/index.d.cts +11 -11
  24. package/dist/chat/index.d.ts +11 -11
  25. package/dist/chat/index.js +20 -21
  26. package/dist/chat/lite/index.cjs +19 -20
  27. package/dist/chat/lite/index.d.cts +11 -11
  28. package/dist/chat/lite/index.d.ts +11 -11
  29. package/dist/chat/lite/index.js +20 -21
  30. package/dist/{chatHandoffToken.d-uKnSnIzN.d.cts → chatHandoffToken.d-BRODOPfQ.d.cts} +11 -6
  31. package/dist/{chatHandoffToken.d-BCEdhZpd.d.ts → chatHandoffToken.d-DETK_czu.d.ts} +11 -6
  32. package/dist/{chatTypes.d-DbdF3ij5.d.ts → checkin.d-CJoVeku7.d.ts} +69 -37
  33. package/dist/{chatTypes.d-CFyYBzps.d.cts → checkin.d-CQaV4WL2.d.cts} +69 -37
  34. package/dist/{chunk-5TWMQIT4.js → chunk-HGQOS366.js} +1 -1
  35. package/dist/{chunk-ZZTNGAS7.js → chunk-PSBCFPJG.js} +1 -1
  36. package/dist/{chunk-LWPM4GD3.js → chunk-PTO64HJN.js} +1 -1
  37. package/dist/{chunk-PDZTFXOO.js → chunk-QMYYV67E.js} +1 -1
  38. package/dist/client/index.cjs +15 -3
  39. package/dist/client/index.d.cts +82 -14
  40. package/dist/client/index.d.ts +82 -14
  41. package/dist/client/index.js +15 -3
  42. package/dist/{clinicBatch.d-C_kZtYt-.d.ts → clinicBatch.d-CSr_YFGU.d.ts} +2 -2
  43. package/dist/{clinicBatch.d-e3Cn5HhA.d.cts → clinicBatch.d-CyXyJab_.d.cts} +2 -2
  44. package/dist/{config.d--6siaeNg.d.ts → config.d-Bf15Q27G.d.ts} +1 -1
  45. package/dist/{config.d-Ba21AaZg.d.cts → config.d-D-7_tLb8.d.cts} +1 -1
  46. package/dist/consent/index.d.cts +5 -5
  47. package/dist/consent/index.d.ts +5 -5
  48. package/dist/{context.d-CzMV_7jD.d.cts → context.d-CCsGIBuw.d.cts} +6 -6
  49. package/dist/{context.d-Bl07_JGt.d.ts → context.d-CFFj57ZA.d.ts} +6 -6
  50. package/dist/{copy.d-GokMma80.d.ts → copy.d-Dan0WfJS.d.ts} +2 -2
  51. package/dist/{copy.d-zWWCn3wB.d.cts → copy.d-uQ8jl0d3.d.cts} +2 -2
  52. package/dist/core/index.cjs +7 -6
  53. package/dist/core/index.d.cts +18 -16
  54. package/dist/core/index.d.ts +18 -16
  55. package/dist/core/index.js +7 -6
  56. package/dist/{depth.d-De5pT7vA.d.cts → depth.d-DFPfFTPF.d.cts} +2 -2
  57. package/dist/{depth.d-C_HL8yAz.d.ts → depth.d-DFsi6qtf.d.ts} +2 -2
  58. package/dist/{entitlementRepository.d-DLMRDNUe.d.ts → entitlementRepository.d-BnvMk7Tc.d.ts} +4 -4
  59. package/dist/{entitlementRepository.d-B4ffomns.d.cts → entitlementRepository.d-t6g97KZm.d.cts} +4 -4
  60. package/dist/{focus.d-B0qweva0.d.cts → focus.d-BkPLN-2r.d.cts} +1 -1
  61. package/dist/{focus.d-7G0BBmA9.d.ts → focus.d-_6rD03Ap.d.ts} +1 -1
  62. package/dist/health-plan/index.cjs +3 -3
  63. package/dist/health-plan/index.d.cts +14 -14
  64. package/dist/health-plan/index.d.ts +14 -14
  65. package/dist/health-plan/index.js +3 -3
  66. package/dist/{healthPlanRepository.d-CdCyUWph.d.ts → healthPlanRepository.d-CuumbPDh.d.ts} +2 -2
  67. package/dist/{healthPlanRepository.d-fPbLceBr.d.cts → healthPlanRepository.d-D6qYjNMQ.d.cts} +2 -2
  68. package/dist/{idempotency.d-IDta7Jjj.d.cts → idempotency.d-BGhv20mx.d.cts} +1 -1
  69. package/dist/{idempotency.d-CoUlC-Yd.d.ts → idempotency.d-RxPkjLqJ.d.ts} +1 -1
  70. package/dist/{identity.d-B7dPRGqm.d.ts → identity.d--2ec4agf.d.ts} +1 -1
  71. package/dist/{identity.d-_MK9Y7a4.d.cts → identity.d-CFc4KrK0.d.cts} +1 -1
  72. package/dist/{inbox.d-CuuPTWyW.d.ts → inbox.d-B6kD0a9r.d.ts} +1 -1
  73. package/dist/{inbox.d-ChNXTovj.d.cts → inbox.d-CzIVX_ji.d.cts} +1 -1
  74. package/dist/index.cjs +28 -28
  75. package/dist/index.d.cts +20 -18
  76. package/dist/index.d.ts +20 -18
  77. package/dist/index.js +29 -29
  78. package/dist/{introEvents.d-JvAWRKYu.d.cts → introEvents.d-BUCbS8oX.d.cts} +1 -1
  79. package/dist/{introEvents.d-D6Ay0ORN.d.ts → introEvents.d-wshlRCrU.d.ts} +1 -1
  80. package/dist/{layout.d-D3d4QMeO.d.ts → layout.d-C8UKQW3I.d.ts} +2 -2
  81. package/dist/{layout.d-ByfOEhpG.d.cts → layout.d-ChcRUbC4.d.cts} +2 -2
  82. package/dist/models.d-DHAQqrQr.d.ts +182 -0
  83. package/dist/models.d-Dml2f9-U.d.cts +182 -0
  84. package/dist/notifications/inbox/index.cjs +1 -1
  85. package/dist/notifications/inbox/index.d.cts +7 -7
  86. package/dist/notifications/inbox/index.d.ts +7 -7
  87. package/dist/notifications/inbox/index.js +1 -1
  88. package/dist/notifications/index.d.cts +7 -7
  89. package/dist/notifications/index.d.ts +7 -7
  90. package/dist/{optInView.d-Bxvg0WLJ.d.cts → optInView.d-Cu3J440l.d.cts} +2 -2
  91. package/dist/{optInView.d-BpFTJaaX.d.ts → optInView.d-DbSRM8qR.d.ts} +2 -2
  92. package/dist/parse.d-DtHmpAMT.d.cts +282 -0
  93. package/dist/parse.d-DtHmpAMT.d.ts +282 -0
  94. package/dist/{pets.d-BtbJcf8T.d.cts → pets.d-BRNg79qq.d.cts} +1 -1
  95. package/dist/{pets.d-Br960ekh.d.ts → pets.d-CS21gvuN.d.ts} +1 -1
  96. package/dist/{petsRepository.d-CSOth5XE.d.ts → petsRepository.d-BRL_wPcE.d.ts} +1 -1
  97. package/dist/{petsRepository.d-Bj9rPnCr.d.cts → petsRepository.d-uMbhgEsh.d.cts} +1 -1
  98. package/dist/records/depth/index.d.cts +9 -9
  99. package/dist/records/depth/index.d.ts +9 -9
  100. package/dist/records/index.cjs +3 -3
  101. package/dist/records/index.d.cts +11 -11
  102. package/dist/records/index.d.ts +11 -11
  103. package/dist/records/index.js +3 -3
  104. package/dist/{requestFunnel.d-LSnmCusf.d.ts → requestFunnel.d-BDuYHZMa.d.ts} +2 -2
  105. package/dist/{requestFunnel.d-BwO-jFLX.d.cts → requestFunnel.d-BdTkSu0W.d.cts} +2 -2
  106. package/dist/{route.d-D70-OHBc.d.cts → route.d-BhfmB7Pl.d.cts} +2 -2
  107. package/dist/{route.d-Bzyamuxa.d.ts → route.d-HALH1t37.d.ts} +2 -2
  108. package/dist/{runtimeTypes.d-6nkdToBS.d.cts → runtimeTypes.d-BrEWaDPX.d.cts} +34 -6
  109. package/dist/{runtimeTypes.d-Byb55WsJ.d.ts → runtimeTypes.d-C7HFG1ev.d.ts} +34 -6
  110. package/dist/{screenProps.d-DB5IMaGZ.d.cts → screenProps.d-BjIsq_NY.d.cts} +1 -1
  111. package/dist/{screenProps.d-HGSPNGHt.d.ts → screenProps.d-C_q_3Lj7.d.ts} +1 -1
  112. package/dist/sdkConfigStore.d-BKqjpahR.d.ts +40 -0
  113. package/dist/sdkConfigStore.d-Cxj2n79d.d.cts +40 -0
  114. package/dist/server/events/index.cjs +1 -1
  115. package/dist/server/events/index.d.cts +2 -2
  116. package/dist/server/events/index.d.ts +2 -2
  117. package/dist/server/events/index.js +1 -1
  118. package/dist/server/index.cjs +1 -1
  119. package/dist/server/index.d.cts +3 -3
  120. package/dist/server/index.d.ts +3 -3
  121. package/dist/server/index.js +1 -1
  122. package/dist/shop/index.d.cts +3 -3
  123. package/dist/shop/index.d.ts +3 -3
  124. package/dist/slots/index.cjs +2 -2
  125. package/dist/slots/index.d.cts +6 -6
  126. package/dist/slots/index.d.ts +6 -6
  127. package/dist/slots/index.js +2 -2
  128. package/dist/tabs/index.cjs +78 -12
  129. package/dist/tabs/index.d.cts +129 -10
  130. package/dist/tabs/index.d.ts +129 -10
  131. package/dist/tabs/index.js +78 -12
  132. package/dist/televet/booking/index.d.cts +6 -6
  133. package/dist/televet/booking/index.d.ts +6 -6
  134. package/dist/testing/index.cjs +1 -1
  135. package/dist/testing/index.d.cts +1 -1
  136. package/dist/testing/index.d.ts +1 -1
  137. package/dist/testing/index.js +1 -1
  138. package/dist/testing/rn/index.d.cts +11 -9
  139. package/dist/testing/rn/index.d.ts +11 -9
  140. package/dist/testing/web/index.d.cts +11 -9
  141. package/dist/testing/web/index.d.ts +11 -9
  142. package/dist/texting/index.cjs +2 -2
  143. package/dist/texting/index.d.cts +22 -8
  144. package/dist/texting/index.d.ts +22 -8
  145. package/dist/texting/index.js +2 -2
  146. package/dist/{threadOptions.d-E-ZxhUSg.d.cts → threadOptions.d-RBSqklk5.d.cts} +5 -5
  147. package/dist/{threadOptions.d-Cjps2yaN.d.ts → threadOptions.d-Suof8GCE.d.ts} +5 -5
  148. package/dist/{timelineRows.d-CPS4admm.d.ts → timelineRows.d-CDA00bav.d.ts} +1 -1
  149. package/dist/{timelineRows.d-BJRCgmdv.d.cts → timelineRows.d-CXIvLZW0.d.cts} +1 -1
  150. package/dist/{tokens.d-DH1mYjZl.d.cts → tokens.d-DxM-tKjz.d.cts} +2 -0
  151. package/dist/{tokens.d-DH1mYjZl.d.ts → tokens.d-DxM-tKjz.d.ts} +2 -0
  152. package/dist/{typeStyle.d-CuKAr0Ly.d.cts → typeStyle.d-DmdB2TfH.d.cts} +2 -2
  153. package/dist/{typeStyle.d-ZszGrWPf.d.ts → typeStyle.d-Ma1uBgn-.d.ts} +2 -2
  154. package/dist/{useHealthPlanSubscription.d-zjsvvlhz.d.cts → useHealthPlanSubscription.d-BJyHm00W.d.cts} +4 -4
  155. package/dist/{useHealthPlanSubscription.d-SQfx-45x.d.ts → useHealthPlanSubscription.d-mOHP3D8V.d.ts} +4 -4
  156. package/dist/{useInboxUnread.d-BxFKFU4o.d.ts → useInboxUnread.d-B6WPb-Qs.d.ts} +2 -2
  157. package/dist/{useInboxUnread.d-7p3IWs_A.d.cts → useInboxUnread.d-BZC4Td0f.d.cts} +2 -2
  158. package/dist/{usePresentation.d-DUHlQyV5.d.cts → usePresentation.d-BP8u0FS2.d.cts} +2 -2
  159. package/dist/{usePresentation.d-CoyGEJOl.d.ts → usePresentation.d-j0xDpOoe.d.ts} +2 -2
  160. package/dist/{useRecordsDepth.d-BinUa8W9.d.ts → useRecordsDepth.d-Cu7-cKAn.d.ts} +1 -1
  161. package/dist/{useRecordsDepth.d-Bk8BSerZ.d.cts → useRecordsDepth.d-CvxrlzGi.d.cts} +1 -1
  162. package/dist/{useUnread.d-D-p7oEW_.d.cts → useUnread.d-C4wKv3th.d.cts} +31 -17
  163. package/dist/{useUnread.d-CFzIPmZt.d.ts → useUnread.d-DMicYM85.d.ts} +31 -17
  164. package/dist/{view.d-CaH6dZPJ.d.ts → view.d-Bq7d05Pv.d.ts} +3 -3
  165. package/dist/{view.d-DV4b1cov.d.cts → view.d-odmWgaGw.d.cts} +3 -3
  166. package/dist/web/consent/index.d.cts +5 -5
  167. package/dist/web/consent/index.d.ts +5 -5
  168. package/dist/web/health-plan/index.cjs +5 -5
  169. package/dist/web/health-plan/index.d.cts +16 -16
  170. package/dist/web/health-plan/index.d.ts +16 -16
  171. package/dist/web/health-plan/index.js +5 -5
  172. package/dist/web/inbox/index.cjs +1 -1
  173. package/dist/web/inbox/index.d.cts +8 -8
  174. package/dist/web/inbox/index.d.ts +8 -8
  175. package/dist/web/inbox/index.js +1 -1
  176. package/dist/web/index.cjs +40 -40
  177. package/dist/web/index.d.cts +59 -44
  178. package/dist/web/index.d.ts +59 -44
  179. package/dist/web/index.js +40 -40
  180. package/dist/web/intro/index.d.cts +7 -7
  181. package/dist/web/intro/index.d.ts +7 -7
  182. package/dist/web/notifications/index.d.cts +6 -6
  183. package/dist/web/notifications/index.d.ts +6 -6
  184. package/dist/web/records/depth/index.d.cts +9 -9
  185. package/dist/web/records/depth/index.d.ts +9 -9
  186. package/dist/web/records/index.cjs +2 -2
  187. package/dist/web/records/index.d.cts +11 -11
  188. package/dist/web/records/index.d.ts +11 -11
  189. package/dist/web/records/index.js +2 -2
  190. package/dist/web/records-sheet/index.cjs +3 -3
  191. package/dist/web/records-sheet/index.js +3 -3
  192. package/dist/web/shop/index.cjs +1 -1
  193. package/dist/web/shop/index.d.cts +3 -3
  194. package/dist/web/shop/index.d.ts +3 -3
  195. package/dist/web/shop/index.js +1 -1
  196. package/dist/web/televet/booking/index.cjs +1 -1
  197. package/dist/web/televet/booking/index.d.cts +7 -7
  198. package/dist/web/televet/booking/index.d.ts +7 -7
  199. package/dist/web/televet/booking/index.js +1 -1
  200. package/dist/web/televet/call/index.cjs +1 -1
  201. package/dist/web/televet/call/index.js +1 -1
  202. package/dist/web/texting/index.cjs +2 -2
  203. package/dist/web/texting/index.d.cts +22 -8
  204. package/dist/web/texting/index.d.ts +22 -8
  205. package/dist/web/texting/index.js +2 -2
  206. package/dist/web/ui/index.cjs +1 -1
  207. package/dist/web/ui/index.js +1 -1
  208. package/package.json +6 -2
@@ -1,20 +1,20 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { ReactNode } from 'react';
3
- import { H as HealthPlanPage } from '../../focus.d-B0qweva0.cjs';
3
+ import { H as HealthPlanPage } from '../../focus.d-BkPLN-2r.cjs';
4
4
  import { P as PetRef } from '../../ids.d-B2GAAifq.cjs';
5
5
  import { C as CaptureRecordsSignature } from '../../clinicRequestProps.d-DjzUdDFx.cjs';
6
- import { E as EverfurIntroCopy, a as EverfurIntroBlank, b as EverfurRecordsRequested, I as IntroText } from '../../introEvents.d-JvAWRKYu.cjs';
7
- export { c as EVERFUR_INTRO_COPY, d as EverfurRecordsLanded, e as IntroFacts, f as IntroPetWords, g as IntroTextInput, h as defaultIntroBlanks, i as introFacts, j as introPetWords, k as introText, n as numberWord } from '../../introEvents.d-JvAWRKYu.cjs';
6
+ import { E as EverfurIntroCopy, a as EverfurIntroBlank, b as EverfurRecordsRequested, I as IntroText } from '../../introEvents.d-BUCbS8oX.cjs';
7
+ export { c as EVERFUR_INTRO_COPY, d as EverfurRecordsLanded, e as IntroFacts, f as IntroPetWords, g as IntroTextInput, h as defaultIntroBlanks, i as introFacts, j as introPetWords, k as introText, n as numberWord } from '../../introEvents.d-BUCbS8oX.cjs';
8
8
  import { E as EverfurIntroMode, a as EverfurIntroFrame, b as EverfurIntroClose, c as EverfurIntroTabLabels } from '../../useIntroSeen.d-CTWFUthO.cjs';
9
9
  export { d as EverfurIntroExit, e as EverfurIntroSeen, i as isIntroSwipeOut, u as useEverfurIntroSeen } from '../../useIntroSeen.d-CTWFUthO.cjs';
10
10
  export { E as EVERFUR_RECORDS_LANDED_EVENT, a as EVERFUR_RECORDS_REQUESTED_EVENT } from '../../introEvents.d-dS3fJCH1.cjs';
11
11
  import '../../EverfurError.d-8NHtlgzA.cjs';
12
12
  import '../../EverfurResult.d-BFH-3s6E.cjs';
13
- import '../../healthPlanRepository.d-fPbLceBr.cjs';
14
- import '../../requestFunnel.d-BwO-jFLX.cjs';
13
+ import '../../healthPlanRepository.d-D6qYjNMQ.cjs';
14
+ import '../../requestFunnel.d-BdTkSu0W.cjs';
15
15
  import '../../ErrorPolicyPort.d-DirW9hgO.cjs';
16
- import '../../config.d-Ba21AaZg.cjs';
17
- import '../../identity.d-_MK9Y7a4.cjs';
16
+ import '../../config.d-D-7_tLb8.cjs';
17
+ import '../../identity.d-CFc4KrK0.cjs';
18
18
  import '../../clinicModels.d-BXgKZqDb.cjs';
19
19
  import '../../models.d-BN53M9sU.cjs';
20
20
 
@@ -1,20 +1,20 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { ReactNode } from 'react';
3
- import { H as HealthPlanPage } from '../../focus.d-7G0BBmA9.js';
3
+ import { H as HealthPlanPage } from '../../focus.d-_6rD03Ap.js';
4
4
  import { P as PetRef } from '../../ids.d-B2GAAifq.js';
5
5
  import { C as CaptureRecordsSignature } from '../../clinicRequestProps.d-BuMuGoVZ.js';
6
- import { E as EverfurIntroCopy, a as EverfurIntroBlank, b as EverfurRecordsRequested, I as IntroText } from '../../introEvents.d-D6Ay0ORN.js';
7
- export { c as EVERFUR_INTRO_COPY, d as EverfurRecordsLanded, e as IntroFacts, f as IntroPetWords, g as IntroTextInput, h as defaultIntroBlanks, i as introFacts, j as introPetWords, k as introText, n as numberWord } from '../../introEvents.d-D6Ay0ORN.js';
6
+ import { E as EverfurIntroCopy, a as EverfurIntroBlank, b as EverfurRecordsRequested, I as IntroText } from '../../introEvents.d-wshlRCrU.js';
7
+ export { c as EVERFUR_INTRO_COPY, d as EverfurRecordsLanded, e as IntroFacts, f as IntroPetWords, g as IntroTextInput, h as defaultIntroBlanks, i as introFacts, j as introPetWords, k as introText, n as numberWord } from '../../introEvents.d-wshlRCrU.js';
8
8
  import { E as EverfurIntroMode, a as EverfurIntroFrame, b as EverfurIntroClose, c as EverfurIntroTabLabels } from '../../useIntroSeen.d-CTWFUthO.js';
9
9
  export { d as EverfurIntroExit, e as EverfurIntroSeen, i as isIntroSwipeOut, u as useEverfurIntroSeen } from '../../useIntroSeen.d-CTWFUthO.js';
10
10
  export { E as EVERFUR_RECORDS_LANDED_EVENT, a as EVERFUR_RECORDS_REQUESTED_EVENT } from '../../introEvents.d-dS3fJCH1.js';
11
11
  import '../../EverfurError.d-8NHtlgzA.js';
12
12
  import '../../EverfurResult.d-D_-254ZY.js';
13
- import '../../healthPlanRepository.d-CdCyUWph.js';
14
- import '../../requestFunnel.d-LSnmCusf.js';
13
+ import '../../healthPlanRepository.d-CuumbPDh.js';
14
+ import '../../requestFunnel.d-BDuYHZMa.js';
15
15
  import '../../ErrorPolicyPort.d-68yrE3BE.js';
16
- import '../../config.d--6siaeNg.js';
17
- import '../../identity.d-B7dPRGqm.js';
16
+ import '../../config.d-Bf15Q27G.js';
17
+ import '../../identity.d--2ec4agf.js';
18
18
  import '../../clinicModels.d-CaS64-P-.js';
19
19
  import '../../models.d-Bhq9p6Wa.js';
20
20
 
@@ -1,17 +1,17 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { ReactNode, CSSProperties } from 'react';
3
- export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, E as EverfurNotificationsOptions, a as EverfurNotificationsState, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, w as useEverfurNotifications, v as useEverfurNotificationsClient } from '../../route.d-D70-OHBc.cjs';
3
+ export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, E as EverfurNotificationsOptions, a as EverfurNotificationsState, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, w as useEverfurNotifications, v as useEverfurNotificationsClient } from '../../route.d-BhfmB7Pl.cjs';
4
4
  export { E as EVERFUR_NOTIFICATION_EVENT_TYPES, a as EVERFUR_NOTIFICATION_TARGET_KINDS, b as EVERFUR_NOTIFICATION_VERSION, c as EverfurMedicationIntent, d as EverfurNotification, e as EverfurNotificationEventName, f as EverfurNotificationEventType, g as EverfurNotificationTarget, h as EverfurNotificationTargetKind, i as EverfurOrderIntent, j as EverfurVisitPushIntent, p as parseEverfurNotification } from '../../parse.d-DYsx1Q2V.cjs';
5
- export { a as ChatCheckinTarget } from '../../chatTypes.d-CFyYBzps.cjs';
5
+ export { a as ChatCheckinTarget } from '../../checkin.d-CQaV4WL2.cjs';
6
6
  export { V as VetVisitIntent } from '../../visitIntent.d-D7_yVp1I.cjs';
7
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-_MK9Y7a4.cjs';
8
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-Ba21AaZg.cjs';
7
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-CFc4KrK0.cjs';
8
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-D-7_tLb8.cjs';
9
9
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
10
10
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.cjs';
11
11
  export { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
12
12
  export { E as ErrorPolicyPort } from '../../ErrorPolicyPort.d-DirW9hgO.cjs';
13
- import '../../casesRepository.d-bWJHZD-_.cjs';
14
- import '../../requestFunnel.d-BwO-jFLX.cjs';
13
+ import '../../casesRepository.d-BcmH2Du1.cjs';
14
+ import '../../requestFunnel.d-BdTkSu0W.cjs';
15
15
  import '../../TelemetryPort.d-BDNr00hu.cjs';
16
16
 
17
17
  interface EverfurNotificationCard {
@@ -1,17 +1,17 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { ReactNode, CSSProperties } from 'react';
3
- export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, E as EverfurNotificationsOptions, a as EverfurNotificationsState, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, w as useEverfurNotifications, v as useEverfurNotificationsClient } from '../../route.d-Bzyamuxa.js';
3
+ export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, E as EverfurNotificationsOptions, a as EverfurNotificationsState, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, w as useEverfurNotifications, v as useEverfurNotificationsClient } from '../../route.d-HALH1t37.js';
4
4
  export { E as EVERFUR_NOTIFICATION_EVENT_TYPES, a as EVERFUR_NOTIFICATION_TARGET_KINDS, b as EVERFUR_NOTIFICATION_VERSION, c as EverfurMedicationIntent, d as EverfurNotification, e as EverfurNotificationEventName, f as EverfurNotificationEventType, g as EverfurNotificationTarget, h as EverfurNotificationTargetKind, i as EverfurOrderIntent, j as EverfurVisitPushIntent, p as parseEverfurNotification } from '../../parse.d-Do0sdAgm.js';
5
- export { a as ChatCheckinTarget } from '../../chatTypes.d-DbdF3ij5.js';
5
+ export { a as ChatCheckinTarget } from '../../checkin.d-CJoVeku7.js';
6
6
  export { V as VetVisitIntent } from '../../visitIntent.d-D7_yVp1I.js';
7
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-B7dPRGqm.js';
8
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d--6siaeNg.js';
7
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d--2ec4agf.js';
8
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-Bf15Q27G.js';
9
9
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../../ids.d-B2GAAifq.js';
10
10
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.js';
11
11
  export { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
12
12
  export { E as ErrorPolicyPort } from '../../ErrorPolicyPort.d-68yrE3BE.js';
13
- import '../../casesRepository.d-CnJZlUZ4.js';
14
- import '../../requestFunnel.d-LSnmCusf.js';
13
+ import '../../casesRepository.d-CG3psWUQ.js';
14
+ import '../../requestFunnel.d-BDuYHZMa.js';
15
15
  import '../../TelemetryPort.d-BDNr00hu.js';
16
16
 
17
17
  interface EverfurNotificationCard {
@@ -1,9 +1,9 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
- export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews.d-Dq8eWBvw.cjs';
3
- export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../../useRecordsDepth.d-Bk8BSerZ.cjs';
4
- export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows.d-BJRCgmdv.cjs';
5
- export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../../depth.d-De5pT7vA.cjs';
6
- export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../../screenProps.d-DB5IMaGZ.cjs';
2
+ export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews.d-4teBIBu-.cjs';
3
+ export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../../useRecordsDepth.d-CvxrlzGi.cjs';
4
+ export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows.d-CXIvLZW0.cjs';
5
+ export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../../depth.d-DFPfFTPF.cjs';
6
+ export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../../screenProps.d-BjIsq_NY.cjs';
7
7
  export { R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../../recordsAsk.d-C5CGSi3j.cjs';
8
8
  export { R as RecordsClinic } from '../../../clinicModels.d-BXgKZqDb.cjs';
9
9
  export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../../ids.d-B2GAAifq.cjs';
@@ -13,8 +13,8 @@ export { E as EverfurResult } from '../../../EverfurResult.d-BFH-3s6E.cjs';
13
13
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../../models.d-BN53M9sU.cjs';
14
14
  import 'react';
15
15
  import '../../../ErrorPolicyPort.d-DirW9hgO.cjs';
16
- import '../../../requestFunnel.d-BwO-jFLX.cjs';
17
- import '../../../config.d-Ba21AaZg.cjs';
18
- import '../../../identity.d-_MK9Y7a4.cjs';
19
- import '../../../clinicBatch.d-e3Cn5HhA.cjs';
16
+ import '../../../requestFunnel.d-BdTkSu0W.cjs';
17
+ import '../../../config.d-D-7_tLb8.cjs';
18
+ import '../../../identity.d-CFc4KrK0.cjs';
19
+ import '../../../clinicBatch.d-CyXyJab_.cjs';
20
20
  import '../../../clinicRequestProps.d-DjzUdDFx.cjs';
@@ -1,9 +1,9 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
- export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews.d-BIfqdrvX.js';
3
- export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../../useRecordsDepth.d-BinUa8W9.js';
4
- export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows.d-CPS4admm.js';
5
- export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../../depth.d-C_HL8yAz.js';
6
- export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../../screenProps.d-HGSPNGHt.js';
2
+ export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../../DepthViews.d-B5RHCzGS.js';
3
+ export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../../useRecordsDepth.d-Cu7-cKAn.js';
4
+ export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../../timelineRows.d-CDA00bav.js';
5
+ export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../../depth.d-DFsi6qtf.js';
6
+ export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../../screenProps.d-C_q_3Lj7.js';
7
7
  export { R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../../recordsAsk.d-C5CGSi3j.js';
8
8
  export { R as RecordsClinic } from '../../../clinicModels.d-CaS64-P-.js';
9
9
  export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../../ids.d-B2GAAifq.js';
@@ -13,8 +13,8 @@ export { E as EverfurResult } from '../../../EverfurResult.d-D_-254ZY.js';
13
13
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../../models.d-Bhq9p6Wa.js';
14
14
  import 'react';
15
15
  import '../../../ErrorPolicyPort.d-68yrE3BE.js';
16
- import '../../../requestFunnel.d-LSnmCusf.js';
17
- import '../../../config.d--6siaeNg.js';
18
- import '../../../identity.d-B7dPRGqm.js';
19
- import '../../../clinicBatch.d-C_kZtYt-.js';
16
+ import '../../../requestFunnel.d-BDuYHZMa.js';
17
+ import '../../../config.d-Bf15Q27G.js';
18
+ import '../../../identity.d--2ec4agf.js';
19
+ import '../../../clinicBatch.d-CSr_YFGU.js';
20
20
  import '../../../clinicRequestProps.d-BuMuGoVZ.js';
@@ -171,7 +171,7 @@ return Object.freeze({petRef:pet,available:true,withheld:false,labResults:/* @__
171
171
  return Object.freeze({petRef:pet,withheld:true,isEmpty:false,visits:/* @__PURE__ */Object.freeze([]),vaccines:/* @__PURE__ */Object.freeze([]),weights:/* @__PURE__ */Object.freeze([]),medications:/* @__PURE__ */Object.freeze([]),disclaimer:""})}function mapRecordsTimeline(petRef,wire){let w=isRecord(wire)?wire:{},pet=petOf(w,petRef);if(w.withheld===true)return withheldTimeline(pet);let parsed=timelineSchema.safeParse(w);if(!parsed.success)return withheldTimeline(pet);let t=parsed.data,visits=t.visits.map(v=>/* @__PURE__ */Object.freeze({visitId:v.visit_id,visitDate:v.visit_date??null,veterinarian:v.veterinarian??null,summary:v.summary??null,docId:v.doc_id??null})),vaccines=t.vaccines.map(v=>/* @__PURE__ */Object.freeze({vaccineId:v.vaccine_id,product:v.product??null,lot:v.lot??null,administeredOn:v.administered_on??null,expiresOn:v.expires_on??null,docId:v.doc_id??null})),weights=t.weights.map(v=>/* @__PURE__ */Object.freeze({weightId:v.weight_id,observedOn:v.observed_on??null,weightKg:v.weight_kg??null,docId:v.doc_id??null})),medications=t.medications.map(m=>/* @__PURE__ */Object.freeze({medicationId:m.medication_id,drugName:m.drug_name??null,dose:m.dose??null,route:m.route??null,frequency:m.frequency??null,sig:m.sig??null,rxNumber:m.rx_number??null,startedOn:m.started_on??null,stoppedOn:m.stopped_on??null,docId:m.doc_id??null}));/* @__PURE__ */
172
172
  return Object.freeze({petRef:pet,withheld:false,isEmpty:visits.length===0&&vaccines.length===0&&weights.length===0&&medications.length===0,visits:/* @__PURE__ */Object.freeze(visits),vaccines:/* @__PURE__ */Object.freeze(vaccines),weights:/* @__PURE__ */Object.freeze(weights),medications:/* @__PURE__ */Object.freeze(medications),disclaimer:t.disclaimer??""})}function mapDocumentContributions(petRef,wire){let w=isRecord(wire)?wire:{},pet=petOf(w,petRef),withheld=()=>/* @__PURE__ */Object.freeze({petRef:pet,withheld:true,document:null,contributions:/* @__PURE__ */Object.freeze([]),contributionCount:0});if(w.withheld===true)return withheld();let parsed=contributionsSchema.safeParse(w);if(!parsed.success)return withheld();let contributions=/* @__PURE__ */Object.freeze(parsed.data.contributions.map(mapEntityRow));/* @__PURE__ */
173
173
  return Object.freeze({petRef:pet,withheld:false,document:mapDocumentRow(parsed.data.document),contributions:contributions,contributionCount:parsed.data.contribution_count??contributions.length})}var BASE3="/widget/v1/records/pets";function createRecordsDepthClient(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}})),segment=(value,max)=>typeof value=="string"&&value.length>0&&!hasLoneSurrogate(value)&&[...value].length<=max,read=async(call,petRef,path,map)=>{if(!segment(petRef,PET_REF_MAX))return invalid2();let result=await funnel.send(call,{method:"GET",path:path});if(!result.ok)return result;let view=map(result.value);return view.petRef===petRef?ok(view):err(makeEverfurError("internalError",{retryable:false}))},pet=petRef=>`${BASE3}/${encodeURIComponent(petRef)}`,record=petRef=>`${pet(petRef)}/everfur_record`,parsed=async(call,req,map)=>{let result=await funnel.send(call,req,req.method==="POST"?{idempotent:false,maxAttempts:1}:void 0);if(!result.ok)return result;let value=map(result.value);return value===null?err(makeEverfurError("internalError",{retryable:false})):ok(value)},factBody=(input,corrected)=>!segment(input.entityType,FACT_ENTITY_TYPE_MAX)||!segment(input.canonicalKey,FACT_CANONICAL_KEY_MAX)||input.idempotencyKey!==void 0&&!segment(input.idempotencyKey,IDEMPOTENCY_KEY_MAX)||corrected!==void 0&&Object.keys(corrected).length===0?null:{entity_type:input.entityType,canonical_key:input.canonicalKey,...corrected!==void 0?{corrected_fields:corrected}:{},...input.idempotencyKey!==void 0?{idempotency_key:input.idempotencyKey}:{}};return{getRecordDepth:petRef=>read("records.depth.record",petRef,`${pet(petRef)}/record`,wire=>mapRecordDepth(petRef,wire)),getTimeline:petRef=>read("records.depth.timeline",petRef,`${pet(petRef)}/timeline`,wire=>mapRecordsTimeline(petRef,wire)),getDocumentContributions(petRef,docId){return segment(docId,64)?read("records.depth.contributions",petRef,`${pet(petRef)}/documents/${encodeURIComponent(docId)}/contributions`,wire=>mapDocumentContributions(petRef,wire)):invalid2()},getMarkers:petRef=>read("records.depth.markers",petRef,`${pet(petRef)}/markers`,wire=>mapRecordMarkers(petRef,wire)),createShare(petRef,opts){if(!segment(petRef,PET_REF_MAX))return invalid2();let audience=opts?.audience;return audience!==void 0&&!RECORD_SHARE_AUDIENCES.includes(audience)?invalid2():parsed("records.share.create",{method:"POST",path:`${record(petRef)}/share`,...audience!==void 0?{body:{audience:audience}}:{}},wire=>mapRecordShareLink(wire,deps.apiBaseUrl))},emailShare(petRef,input){let kind=input.recipientKind,email2=typeof input.recipientEmail=="string"?input.recipientEmail.trim():"",kindOk=kind==="other"||RECORD_SHARE_AUDIENCES.includes(kind);return!segment(petRef,PET_REF_MAX)||!kindOk||!isShareRecipientEmail(email2)||hasLoneSurrogate(email2)?invalid2():parsed("records.share.email",{method:"POST",path:`${record(petRef)}/share/email`,body:{recipient_email:email2,recipient_kind:kind}},mapRecordShareEmailReceipt)},async readFeatures(){try{let result=await funnel.send("records.getFeatures",{method:"GET",path:"/widget/v1/records/features"});return result.ok?mapRecordsFeatures(result.value):RECORDS_FEATURES_PDF_ONLY}catch{return RECORDS_FEATURES_PDF_ONLY}},listShares(petRef){return segment(petRef,PET_REF_MAX)?parsed("records.share.list",{method:"GET",path:`${record(petRef)}/shares`},mapRecordShareList):invalid2()},async revokeShare(petRef,shareId){if(!segment(petRef,PET_REF_MAX)||!segment(shareId,64))return invalid2();let result=await funnel.send("records.share.revoke",{method:"DELETE",path:`${record(petRef)}/shares/${encodeURIComponent(shareId)}`},{idempotent:false,maxAttempts:1});return result.ok?ok(void 0):result},getPdfLink(petRef){return segment(petRef,PET_REF_MAX)?parsed("records.pdf.link",{method:"GET",path:`${record(petRef)}/pdf-link`},mapRecordPdfLink):invalid2()},async editFact(petRef,input){let body=segment(petRef,PET_REF_MAX)?factBody(input,input.correctedFields):null;if(body===null)return invalid2();let result=await funnel.send("records.fact.edit",{method:"POST",path:`${record(petRef)}/facts/edit`,body:body},{idempotent:false,maxAttempts:1});return result.ok?ok(void 0):result},async removeFact(petRef,input){let body=segment(petRef,PET_REF_MAX)?factBody(input):null;if(body===null)return invalid2();let result=await funnel.send("records.fact.remove",{method:"POST",path:`${record(petRef)}/facts/remove`,body:body},{idempotent:false,maxAttempts:1});return result.ok?ok(void 0):result},listRequestDocuments(requestId2){return segment(requestId2,64)?parsed("records.request.documents",{method:"GET",path:`/widget/v1/records/requests/${encodeURIComponent(requestId2)}/documents`},mapRequestDocuments):invalid2()},listAuthorizationSignatures:()=>parsed("records.signatures.list",{method:"GET",path:"/widget/v1/records/authorization-signatures"},mapSignatureSuggestions)}}function invalid2(){return Promise.resolve(err(makeEverfurError("validationFailed",{retryable:false})))}function useEverfurRecordsDepthClient(){let{runtime:runtime,userRef:userRef,scopeEpoch:scopeEpoch}=useEverfurContext();return react.useMemo(()=>{let{services:services}=runtime.registry;return createRecordsDepthClient({auth:services.authFor(userRef),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{},...typeof services.apiBaseUrl=="string"?{apiBaseUrl:services.apiBaseUrl}:{}})},[runtime,userRef,scopeEpoch])}function useRecordsDepthRead(petRef,read,isEmpty,extraKey=""){let client=useEverfurRecordsDepthClient(),{userRef:userRef}=useEverfurContext(),consentEpoch=useRecordsConsentEpoch(petRef),scope=react.useMemo(()=>({}),[client,petRef,extraKey,consentEpoch]),[state,setState]=react.useState({scope:scope,value:null,error:null,loading:true}),generation=react.useRef(0),load=react.useCallback(async()=>{let gen=generation.current+=1;if(setState({scope:scope,value:null,error:null,loading:true}),userRef===null){setState({scope:scope,value:null,error:null,loading:false});return}let result=await read(client,petRef);gen===generation.current&&(result.ok?setState({scope:scope,value:result.value,error:null,loading:false}):setState({scope:scope,value:null,error:result.error,loading:false}))},[client,petRef,read,scope,userRef]);react.useEffect(()=>(load(),()=>{generation.current+=1}),[load]);let current=state.scope===scope?state:{value:null,error:null,loading:true},refresh=react.useCallback(()=>{load()},[load]),available=current.error===null||current.error.httpStatus!==404,error=available?current.error:null,status=current.loading?"loading":error!==null?"error":current.value===null?"empty":current.value.withheld?"populated":isEmpty(current.value)?"empty":"populated";return react.useMemo(()=>({status:status,value:current.value,error:error,available:available,refresh:refresh}),[status,current.value,error,available,refresh])}function isDarkRouteError(error){return error!==null&&error.httpStatus===404}var readMarkers=(client,petRef)=>client.getMarkers(petRef),markersEmpty=value=>value.markers.length===0;function useRecordsMarkers(petRef){let state=useRecordsDepthRead(petRef,readMarkers,markersEmpty);return react.useMemo(()=>{let markers=state.available&&state.value!==null&&!state.value.withheld?state.value:null;return{status:state.status,markers:markers,available:state.available,error:state.error,refresh:state.refresh}},[state])}var EMAIL3=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function useRecordsConsentForm(input){let{clinic:clinic,controller:controller,depthClient:depthClient,capture:capture,onCreated:onCreated}=input,clinicName=clinic.clinic?.name??clinic.freeText??"",isFreeText=clinic.clinic===null,[authorized,setAuthorized]=react.useState(false),[ownerName,setOwnerName]=react.useState(input.ownerName),[email2,setEmail]=react.useState(clinic.email),[emailTouched,setEmailTouched]=react.useState(false),[copy,setCopy]=react.useState(null),[copyError,setCopyError]=react.useState(null),[copyAttempt,setCopyAttempt]=react.useState(0),[error,setError]=react.useState(null),[busy,setBusy]=react.useState(false),[created,setCreated]=react.useState(null),[signatures,setSignatures]=react.useState([]),[reuseSignatureId,setReuseSignatureId]=react.useState(null),[signed,setSigned]=react.useState(false),locked=react.useRef(false),live=react.useRef(true),keyFactory=react.useRef(defaultIdempotencyKeyFactory()),attempt=react.useRef(null);react.useEffect(()=>(live.current=true,()=>{live.current=false,attempt.current=null}),[controller]),react.useEffect(()=>{let alive=true;return setCopy(null),attempt.current=null,controller.getAuthorizationCopy().then(result=>{alive&&(result.ok?(setCopy(result.value),setCopyError(null)):setCopyError(result.error))}).catch(()=>{alive&&setCopyError(makeEverfurError("internalError"))}),()=>{alive=false}},[controller,copyAttempt]),react.useEffect(()=>{if(depthClient===void 0)return;let alive=true;return depthClient.listAuthorizationSignatures().then(result=>{alive&&(result.ok?setSignatures(result.value):isDarkRouteError(result.error)||setSignatures([]))}).catch(()=>{}),()=>{alive=false}},[depthClient]);let needsEmail=clinicNeedsEmail(clinic.clinic),normalizedEmail=email2.trim().toLowerCase(),validEmail=EMAIL3.test(normalizedEmail),emailError=needsEmail&&(emailTouched||normalizedEmail.length>0)&&!validEmail?normalizedEmail.length>0?RECORDS_CONSENT_COPY.emailInvalid:RECORDS_CONSENT_COPY.emailRequired:null,named=ownerName.trim().length>0,scope=copy&&named?renderClinicScope(copy,ownerName.trim(),petNameOr(input.petName),clinicName):null,hasSignature=input.hostCapture===true||signed||reuseSignatureId!==null,readyButSigned=!!(authorized&&copy&&scope&&named&&clinicName&&(!needsEmail||validEmail)),ready=readyButSigned&&hasSignature,submit=react.useCallback(async()=>{if(!(locked.current||created!==null||!copy||!scope)){if(!clinicName){setError(RECORDS_CONSENT_COPY.missingDraftError);return}if(needsEmail&&!validEmail){setEmailTouched(true),setError(normalizedEmail.length>0?RECORDS_CONSENT_COPY.emailInvalid:RECORDS_CONSENT_COPY.emailRequired);return}if(!(!authorized||!ownerName.trim())){locked.current=true,setBusy(true),setError(null);try{if(attempt.current===null){let signature=reuseSignatureId!==null?{signatureId:reuseSignatureId}:await capture();if(!live.current)return;if(signature===null){setError(RECORDS_CONSENT_COPY.missingSignatureError);return}let target=clinic.clinic&&(!needsEmail||clinic.clinic.emailStatus==="none")?{clinicId:clinic.clinic.id}:{clinicFreeText:clinicName};attempt.current={petRef:input.petRef,ownerName:ownerName.trim(),authorizationVersion:copy.authorizationVersion,...target,...needsEmail?{clinicEmail:normalizedEmail}:{},...signature.signatureId!==void 0?{signatureId:signature.signatureId}:{signaturePngBase64:signature.signaturePngBase64},idempotencyKey:keyFactory.current()}}let result=await controller.createClinicRequest(attempt.current);if(!live.current)return;if(!result.ok){setError(result.error.displayMessage);return}if(result.value.petRef!==input.petRef){setError(makeEverfurError("internalError").displayMessage);return}setCreated(result.value),attempt.current=null,onCreated?.(result.value)}catch{live.current&&setError(makeEverfurError("internalError").displayMessage)}finally{locked.current=false,live.current&&setBusy(false)}}}},[authorized,capture,clinic.clinic,clinicName,controller,copy,created,input.petRef,needsEmail,normalizedEmail,onCreated,ownerName,reuseSignatureId,scope,validEmail]),invalidate=react.useCallback(()=>{attempt.current=null,setError(null)},[]);return{title:isFreeText?RECORDS_CONSENT_COPY.titleFreeText:RECORDS_CONSENT_COPY.titleDirectory,clinicName:clinicName,isFreeText:isFreeText,authorized:authorized,ownerName:ownerName,email:email2,emailError:emailError,needsEmail:needsEmail,directoryClinicNoEmail:needsEmail&&clinic.clinic!==null,copy:copy,copyError:copyError,scope:scope,error:error,busy:busy,created:created,ready:ready,signatures:signatures,reuseSignatureId:reuseSignatureId,hasSignature:hasSignature,scopeAwaitingName:copy!==null&&!named,signatureLastMissing:readyButSigned&&!hasSignature,setAuthorized(value){locked.current||(invalidate(),setAuthorized(value))},setOwnerName(value){locked.current||(invalidate(),setOwnerName(value))},setEmail(value){locked.current||(invalidate(),setEmailTouched(false),setEmail(value))},setSigned(value){locked.current||(invalidate(),setSigned(value),value&&setReuseSignatureId(null))},pickReuseSignature(signatureId){locked.current||(invalidate(),setReuseSignatureId(signatureId))},retryCopy(){setCopyError(null),setCopyAttempt(n=>n+1)},submit:submit}}function EverfurRecordsConsent(props){let{userRef:userRef,scopeEpoch:scopeEpoch}=useEverfurContext();/* @__PURE__ */
174
- return jsxRuntime.jsx(CapabilityGate,{capability:"recordsClinic",style:props.style,className:props.className,...recordsGateExit(props.onBack,BACK_LABEL),children:userRef===null?/* @__PURE__ */jsxRuntime.jsx("p",{role:"alert",children:RECORDS_COPY.sessionRequired}):/* @__PURE__ */jsxRuntime.jsx(ConsentBody,{...guardHostProps(props,["onCreated","onNavigate","onBack"])},JSON.stringify([userRef,scopeEpoch,props.petRef,props.clinic.key]))})}function ConsentBody({petRef:petRef,petName:petName,clinic:clinic,ownerName:ownerName,onCaptureSignature:onCaptureSignature,onCreated:onCreated,controller:controller,onNavigate:onNavigate,onBack:onBack,style:style,className:className}){let directSendNote=useRecordsSandboxTenant()?RECORDS_SANDBOX_COPY.newClinicDirectSendNote:RECORDS_CONSENT_COPY.newClinicDirectSendNote,{theme:theme,styles:styles}=useScreenStyles(),runtimeController=useEverfurRecordsClinic(),resolved=controller??runtimeController,depthClient=useEverfurRecordsDepthClient(),pad=useSignatureCanvas(),rise=useSectionRise(),form=useRecordsConsentForm({petRef:petRef,petName:petName,ownerName:ownerName??"",clinic:clinic,controller:resolved,depthClient:depthClient,capture:onCaptureSignature?()=>onCaptureSignature({petRef:petRef,petName:petNameOr(petName),ownerName:form.ownerName,clinicName:form.clinicName,authorizationVersion:form.copy?.authorizationVersion??"",scopeText:form.scope??"",signal:(new AbortController).signal}):async()=>pad.signed?pad.capture(resolved,(new AbortController).signal):null,hostCapture:onCaptureSignature!==void 0,onCreated:request=>{onCreated?.(request),onNavigate?.({name:"dashboard"})}}),padSigned=pad.signed,formRef=react.useRef(form);formRef.current=form,react.useEffect(()=>{formRef.current.setSigned(padSigned)},[padSigned]);let busy=form.busy,block={display:"flex",flexDirection:"column",gap:theme.space.sm},ownerId="records-consent-owner-name",emailId="records-consent-clinic-email";/* @__PURE__ */
174
+ return jsxRuntime.jsx(CapabilityGate,{capability:"recordsClinic",style:props.style,className:props.className,...recordsGateExit(props.onBack,BACK_LABEL),children:userRef===null?/* @__PURE__ */jsxRuntime.jsx("p",{role:"alert",children:RECORDS_COPY.sessionRequired}):/* @__PURE__ */jsxRuntime.jsx(ConsentBody,{...guardHostProps(props,["onCreated","onNavigate","onBack"])},JSON.stringify([userRef,scopeEpoch,props.petRef,props.clinic.key]))})}function ConsentBody({petRef:petRef,petName:petName,clinic:clinic,ownerName:ownerName,onCaptureSignature:onCaptureSignature,onCreated:onCreated,controller:controller,onNavigate:onNavigate,onBack:onBack,style:style,className:className}){let directSendNote=useRecordsSandboxTenant()?RECORDS_SANDBOX_COPY.newClinicDirectSendNote:RECORDS_CONSENT_COPY.newClinicDirectSendNote,{theme:theme,styles:styles}=useScreenStyles(),runtimeController=useEverfurRecordsClinic(),resolved=controller??runtimeController,depthClient=useEverfurRecordsDepthClient(),formRef=react.useRef(null),dropReusePick=react.useCallback(()=>{formRef.current?.pickReuseSignature(null)},[]),pad=useSignatureCanvas(dropReusePick),rise=useSectionRise(),form=useRecordsConsentForm({petRef:petRef,petName:petName,ownerName:ownerName??"",clinic:clinic,controller:resolved,depthClient:depthClient,capture:onCaptureSignature?()=>onCaptureSignature({petRef:petRef,petName:petNameOr(petName),ownerName:form.ownerName,clinicName:form.clinicName,authorizationVersion:form.copy?.authorizationVersion??"",scopeText:form.scope??"",signal:(new AbortController).signal}):async()=>pad.signed?pad.capture(resolved,(new AbortController).signal):null,hostCapture:onCaptureSignature!==void 0,onCreated:request=>{onCreated?.(request),onNavigate?.({name:"dashboard"})}}),padSigned=pad.signed;formRef.current=form,react.useEffect(()=>{formRef.current?.setSigned(padSigned)},[padSigned]);let busy=form.busy,block={display:"flex",flexDirection:"column",gap:theme.space.sm},ownerId="records-consent-owner-name",emailId="records-consent-clinic-email";/* @__PURE__ */
175
175
  return jsxRuntime.jsxs("div",{className:className,style:{...styles.root,...style},"data-testid":"records-consent-screen",children:[
176
176
  /* @__PURE__ */jsxRuntime.jsx(ScreenHeader,{title:form.title,onBack:onBack,testID:"records-consent-header"}),
177
177
  /* @__PURE__ */jsxRuntime.jsx("p",{style:styles.subLead,"data-testid":"records-consent-lead",children:RECORDS_CONSENT_COPY.leadWeb(petName)}),
@@ -196,7 +196,7 @@ return jsxRuntime.jsxs("div",{className:className,style:{...styles.root,...style
196
196
  /* @__PURE__ */jsxRuntime.jsx("p",{style:styles.muted,"data-testid":"records-consent-review-note",children:directSendNote})]}):null,onCaptureSignature?null:/* @__PURE__ */jsxRuntime.jsxs("div",{style:block,children:[form.signatures.length>0?/* @__PURE__ */jsxRuntime.jsxs("div",{style:block,children:[
197
197
  /* @__PURE__ */jsxRuntime.jsx("span",{style:styles.fieldLabel,children:RECORDS_CONSENT_COPY.reuseSignature}),
198
198
  /* @__PURE__ */jsxRuntime.jsx("div",{style:{display:"flex",gap:theme.space.sm,overflowX:"auto",padding:`${theme.space.xs}px 0`},children:form.signatures.map(sig=>{let selected=form.reuseSignatureId===sig.signatureId;/* @__PURE__ */
199
- return jsxRuntime.jsx("button",{type:"button",onClick:()=>form.pickReuseSignature(selected?null:sig.signatureId),"aria-label":selected?RECORDS_CONSENT_COPY.reuseTileSelectedA11y:RECORDS_CONSENT_COPY.reuseTileA11y,"aria-pressed":selected,style:{flexShrink:0,width:112,height:56,borderRadius:theme.radius.sm,border:selected?`2px solid ${theme.color.brandInk}`:`1px solid ${theme.color.brandBorder}`,backgroundColor:theme.color.surface,padding:0,overflow:"hidden",cursor:"pointer"},"data-testid":`records-consent-reuse-${sig.signatureId}`,children:/* @__PURE__ */jsxRuntime.jsx("img",{src:sig.previewUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}})},sig.signatureId)})}),
199
+ return jsxRuntime.jsx("button",{type:"button",onClick:()=>{selected||pad.clear(),form.pickReuseSignature(selected?null:sig.signatureId)},"aria-label":selected?RECORDS_CONSENT_COPY.reuseTileSelectedA11y:RECORDS_CONSENT_COPY.reuseTileA11y,"aria-pressed":selected,style:{flexShrink:0,width:112,height:56,borderRadius:theme.radius.sm,border:selected?`2px solid ${theme.color.brandInk}`:`1px solid ${theme.color.brandBorder}`,backgroundColor:theme.color.surface,padding:0,overflow:"hidden",cursor:"pointer"},"data-testid":`records-consent-reuse-${sig.signatureId}`,children:/* @__PURE__ */jsxRuntime.jsx("img",{src:sig.previewUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}})},sig.signatureId)})}),
200
200
  /* @__PURE__ */jsxRuntime.jsx("p",{style:styles.muted,children:RECORDS_CONSENT_COPY.reuseHint})]}):null,
201
201
  /* @__PURE__ */jsxRuntime.jsx(SignatureCanvas,{pad:pad,disabled:busy}),
202
202
  /* @__PURE__ */jsxRuntime.jsx("p",{style:styles.muted,children:RECORDS_CONSENT_COPY.signatureHint(form.clinicName)}),form.signatureLastMissing?/* @__PURE__ */jsxRuntime.jsx("p",{style:styles.muted,"data-testid":"records-consent-signature-required",children:RECORDS_CONSENT_COPY.missingSignatureError}):null]}),
@@ -1,7 +1,7 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { R as RecordsController } from '../../useRecords.d-BMSW4aRD.cjs';
3
3
  export { a as RecordsStatus, b as UploadDocumentInput, c as UploadQueueItem, d as UploadSkipReason, U as UseEverfurRecordsState, u as useEverfurRecords } from '../../useRecords.d-BMSW4aRD.cjs';
4
- export { a as EverfurRecordsPage, E as EverfurRecordsPageProps } from '../../RecordsPage.d-CLrw-AvZ.cjs';
4
+ export { a as EverfurRecordsPage, E as EverfurRecordsPageProps } from '../../RecordsPage.d-BF4EIVKg.cjs';
5
5
  export { E as EverfurRecordsSheet, a as EverfurRecordsSheetLabRenderArgs, b as EverfurRecordsSheetRenderArgs } from '../../sheetSeam.d-B9iQqG_I.cjs';
6
6
  import { c as RecordsConsentScope, e as RecordsRequestView } from '../../models.d-BN53M9sU.cjs';
7
7
  export { h as ConsentState, C as CreateUploadRequestInput, i as GrantConsentAllPetsInput, G as GrantConsentInput, M as MemberConsentState, n as RECORDS_TERMINAL, R as RecordDocumentMeta, a as RecordEntity, d as RecordForwardItem, o as RecordIdentityField, b as RecordOrigin, p as RecordSeries, q as RecordSeriesPoint, r as RecordsConsentPetFailure, k as RecordsDenialReason, f as RecordsRequestGroupView, l as RecordsRequestStatus, m as RecordsSimpleStatus, g as RecordsView, j as RevokeConsentAllPetsInput, U as UploadedDocument, s as isTerminalStatus, t as recordsDenialReasonOf } from '../../models.d-BN53M9sU.cjs';
@@ -10,26 +10,26 @@ import { P as PetRef, R as RecordsRequestId } from '../../ids.d-B2GAAifq.cjs';
10
10
  export { B as Brand, D as DocumentId, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
11
11
  import { R as RecordsClinicController, C as CaptureRecordsSignature, a as ClinicRequestBaseProps, b as CapturedRecordsSignature } from '../../clinicRequestProps.d-DjzUdDFx.cjs';
12
12
  export { c as RecordsSignatureContext } from '../../clinicRequestProps.d-DjzUdDFx.cjs';
13
- import { R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, C as ClinicDraft, e as ClinicBatchBaseProps } from '../../screenProps.d-DB5IMaGZ.cjs';
14
- export { a as ClinicLocation, f as RecordsNavAction, g as RecordsNavState, d as RecordsUrlKind, h as RegisterSignaturePng, i as currentRecordsScreen, j as initialRecordsNav, p as popRecordsNav, k as pushRecordsNav, r as recordsNavReducer, l as replaceRecordsNav, m as resetRecordsNav, t as transitionRecordsNav } from '../../screenProps.d-DB5IMaGZ.cjs';
13
+ import { R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, C as ClinicDraft, e as ClinicBatchBaseProps } from '../../screenProps.d-BjIsq_NY.cjs';
14
+ export { a as ClinicLocation, f as RecordsNavAction, g as RecordsNavState, d as RecordsUrlKind, h as RegisterSignaturePng, i as currentRecordsScreen, j as initialRecordsNav, p as popRecordsNav, k as pushRecordsNav, r as recordsNavReducer, l as replaceRecordsNav, m as resetRecordsNav, t as transitionRecordsNav } from '../../screenProps.d-BjIsq_NY.cjs';
15
15
  import { E as EverfurError } from '../../EverfurError.d-8NHtlgzA.cjs';
16
16
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.cjs';
17
- export { w as FactFieldValue, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, y as RecordFactEditInput, z as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, A as RecordMarker, B as RecordMarkerLatest, C as RecordMarkerPoint, D as RecordMarkerSummary, E as RecordMarkersView, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, G as RecordsSignatureSuggestion, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight } from '../../depth.d-De5pT7vA.cjs';
17
+ export { w as FactFieldValue, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, y as RecordFactEditInput, z as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, A as RecordMarker, B as RecordMarkerLatest, C as RecordMarkerPoint, D as RecordMarkerSummary, E as RecordMarkersView, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, G as RecordsSignatureSuggestion, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight } from '../../depth.d-DFPfFTPF.cjs';
18
18
  export { b as RecordsAsk, R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../recordsAsk.d-C5CGSi3j.cjs';
19
- export { C as ClinicCall, F as FactOverlay, R as REQUEST_TIMELINE_TITLES, a as RecordSharesStatus, b as RecordsDashboardState, c as RecordsDashboardView, d as RecordsEmptyVariant, e as RequestTimelineEvent, f as RequestTimelineEventKey, g as RequestTimelineEventState, S as ShareRowView, U as UseRecordFactEditState, h as UseRecordPdfLinkState, i as UseRecordSharesState, j as UseRecordsMarkersState, k as applyFactOverlay, l as buildRequestTimeline, m as deriveRecordsDashboardState, n as isFactEditable, p as pickPetRecordsRequest, s as selectClinicCall, o as selectDashboardView, q as selectPrimaryLabel, r as selectRequestList, t as selectRequestTitle, u as useEverfurRecordsClinic, v as useEverfurRecordsClinicBatch, w as useRecordFactEdit, x as useRecordPdfLink, y as useRecordShares, z as useRecordsMarkers } from '../../view.d-DV4b1cov.cjs';
20
- export { R as RecordsDepthStatus } from '../../useRecordsDepth.d-Bk8BSerZ.cjs';
19
+ export { C as ClinicCall, F as FactOverlay, R as REQUEST_TIMELINE_TITLES, a as RecordSharesStatus, b as RecordsDashboardState, c as RecordsDashboardView, d as RecordsEmptyVariant, e as RequestTimelineEvent, f as RequestTimelineEventKey, g as RequestTimelineEventState, S as ShareRowView, U as UseRecordFactEditState, h as UseRecordPdfLinkState, i as UseRecordSharesState, j as UseRecordsMarkersState, k as applyFactOverlay, l as buildRequestTimeline, m as deriveRecordsDashboardState, n as isFactEditable, p as pickPetRecordsRequest, s as selectClinicCall, o as selectDashboardView, q as selectPrimaryLabel, r as selectRequestList, t as selectRequestTitle, u as useEverfurRecordsClinic, v as useEverfurRecordsClinicBatch, w as useRecordFactEdit, x as useRecordPdfLink, y as useRecordShares, z as useRecordsMarkers } from '../../view.d-odmWgaGw.cjs';
20
+ export { R as RecordsDepthStatus } from '../../useRecordsDepth.d-CvxrlzGi.cjs';
21
21
  export { g as RecordPdfLink, f as RecordShare, R as RecordShareAudience, i as RecordShareAudienceScope, d as RecordShareEmailInput, e as RecordShareEmailReceipt, c as RecordShareLink, j as RecordShareRecipientKind, a as RecordsFeatures, q as RecordsPhotoContentType, b as RecordsUploadContentType, s as acceptsPhotos } from '../../features.d-DrQxTw3-.cjs';
22
- export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../../DepthViews.d-Dq8eWBvw.cjs';
23
- export { C as CreateClinicRequestBatchInput, b as RECORDS_CLINIC_BATCH_MAX, R as RecordsClinicBatch, a as RecordsClinicBatchClient, c as RecordsClinicBatchItem, d as RecordsClinicBatchResult } from '../../clinicBatch.d-e3Cn5HhA.cjs';
22
+ export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../../DepthViews.d-4teBIBu-.cjs';
23
+ export { C as CreateClinicRequestBatchInput, b as RECORDS_CLINIC_BATCH_MAX, R as RecordsClinicBatch, a as RecordsClinicBatchClient, c as RecordsClinicBatchItem, d as RecordsClinicBatchResult } from '../../clinicBatch.d-CyXyJab_.cjs';
24
24
  export { C as CreateClinicRequestInput, f as RecordsAuthorizationCopy, b as RecordsAuthorizationSignature, R as RecordsClinic, c as RecordsClinicSearchInput, d as RecordsClinicSearchPage, a as RecordsClinicTarget, e as RecordsRecentClinicsInput, g as RecordsSignatureUploadPolicy } from '../../clinicModels.d-BXgKZqDb.cjs';
25
25
  export { WebRecordsUploadTransportOptions, createWebRecordsUploadTransport } from './upload/index.cjs';
26
26
  import { F as FileHandle } from '../../ports.d-BX4f4UsB.cjs';
27
27
  export { a as UploadPolicyWire, U as UploadTransport } from '../../ports.d-BX4f4UsB.cjs';
28
28
  export { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
29
29
  import '../../ErrorPolicyPort.d-DirW9hgO.cjs';
30
- import '../../requestFunnel.d-BwO-jFLX.cjs';
31
- import '../../config.d-Ba21AaZg.cjs';
32
- import '../../identity.d-_MK9Y7a4.cjs';
30
+ import '../../requestFunnel.d-BdTkSu0W.cjs';
31
+ import '../../config.d-D-7_tLb8.cjs';
32
+ import '../../identity.d-CFc4KrK0.cjs';
33
33
 
34
34
  type RecordsHistoryMode = 'memory' | 'browser';
35
35
  interface EverfurRecordsProps extends RecordsHostSeams {
@@ -1,7 +1,7 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { R as RecordsController } from '../../useRecords.d-Cv1nhZrv.js';
3
3
  export { a as RecordsStatus, b as UploadDocumentInput, c as UploadQueueItem, d as UploadSkipReason, U as UseEverfurRecordsState, u as useEverfurRecords } from '../../useRecords.d-Cv1nhZrv.js';
4
- export { a as EverfurRecordsPage, E as EverfurRecordsPageProps } from '../../RecordsPage.d-Bs-dghTH.js';
4
+ export { a as EverfurRecordsPage, E as EverfurRecordsPageProps } from '../../RecordsPage.d-D2J5rMWk.js';
5
5
  export { E as EverfurRecordsSheet, a as EverfurRecordsSheetLabRenderArgs, b as EverfurRecordsSheetRenderArgs } from '../../sheetSeam.d-CtuKILqp.js';
6
6
  import { c as RecordsConsentScope, e as RecordsRequestView } from '../../models.d-Bhq9p6Wa.js';
7
7
  export { h as ConsentState, C as CreateUploadRequestInput, i as GrantConsentAllPetsInput, G as GrantConsentInput, M as MemberConsentState, n as RECORDS_TERMINAL, R as RecordDocumentMeta, a as RecordEntity, d as RecordForwardItem, o as RecordIdentityField, b as RecordOrigin, p as RecordSeries, q as RecordSeriesPoint, r as RecordsConsentPetFailure, k as RecordsDenialReason, f as RecordsRequestGroupView, l as RecordsRequestStatus, m as RecordsSimpleStatus, g as RecordsView, j as RevokeConsentAllPetsInput, U as UploadedDocument, s as isTerminalStatus, t as recordsDenialReasonOf } from '../../models.d-Bhq9p6Wa.js';
@@ -10,26 +10,26 @@ import { P as PetRef, R as RecordsRequestId } from '../../ids.d-B2GAAifq.js';
10
10
  export { B as Brand, D as DocumentId, _ as __brand } from '../../ids.d-B2GAAifq.js';
11
11
  import { R as RecordsClinicController, C as CaptureRecordsSignature, a as ClinicRequestBaseProps, b as CapturedRecordsSignature } from '../../clinicRequestProps.d-BuMuGoVZ.js';
12
12
  export { c as RecordsSignatureContext } from '../../clinicRequestProps.d-BuMuGoVZ.js';
13
- import { R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, C as ClinicDraft, e as ClinicBatchBaseProps } from '../../screenProps.d-HGSPNGHt.js';
14
- export { a as ClinicLocation, f as RecordsNavAction, g as RecordsNavState, d as RecordsUrlKind, h as RegisterSignaturePng, i as currentRecordsScreen, j as initialRecordsNav, p as popRecordsNav, k as pushRecordsNav, r as recordsNavReducer, l as replaceRecordsNav, m as resetRecordsNav, t as transitionRecordsNav } from '../../screenProps.d-HGSPNGHt.js';
13
+ import { R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, C as ClinicDraft, e as ClinicBatchBaseProps } from '../../screenProps.d-C_q_3Lj7.js';
14
+ export { a as ClinicLocation, f as RecordsNavAction, g as RecordsNavState, d as RecordsUrlKind, h as RegisterSignaturePng, i as currentRecordsScreen, j as initialRecordsNav, p as popRecordsNav, k as pushRecordsNav, r as recordsNavReducer, l as replaceRecordsNav, m as resetRecordsNav, t as transitionRecordsNav } from '../../screenProps.d-C_q_3Lj7.js';
15
15
  import { E as EverfurError } from '../../EverfurError.d-8NHtlgzA.js';
16
16
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.js';
17
- export { w as FactFieldValue, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, y as RecordFactEditInput, z as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, A as RecordMarker, B as RecordMarkerLatest, C as RecordMarkerPoint, D as RecordMarkerSummary, E as RecordMarkersView, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, G as RecordsSignatureSuggestion, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight } from '../../depth.d-C_HL8yAz.js';
17
+ export { w as FactFieldValue, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, y as RecordFactEditInput, z as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, A as RecordMarker, B as RecordMarkerLatest, C as RecordMarkerPoint, D as RecordMarkerSummary, E as RecordMarkersView, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, G as RecordsSignatureSuggestion, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight } from '../../depth.d-DFsi6qtf.js';
18
18
  export { b as RecordsAsk, R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../recordsAsk.d-C5CGSi3j.js';
19
- export { C as ClinicCall, F as FactOverlay, R as REQUEST_TIMELINE_TITLES, a as RecordSharesStatus, b as RecordsDashboardState, c as RecordsDashboardView, d as RecordsEmptyVariant, e as RequestTimelineEvent, f as RequestTimelineEventKey, g as RequestTimelineEventState, S as ShareRowView, U as UseRecordFactEditState, h as UseRecordPdfLinkState, i as UseRecordSharesState, j as UseRecordsMarkersState, k as applyFactOverlay, l as buildRequestTimeline, m as deriveRecordsDashboardState, n as isFactEditable, p as pickPetRecordsRequest, s as selectClinicCall, o as selectDashboardView, q as selectPrimaryLabel, r as selectRequestList, t as selectRequestTitle, u as useEverfurRecordsClinic, v as useEverfurRecordsClinicBatch, w as useRecordFactEdit, x as useRecordPdfLink, y as useRecordShares, z as useRecordsMarkers } from '../../view.d-CaH6dZPJ.js';
20
- export { R as RecordsDepthStatus } from '../../useRecordsDepth.d-BinUa8W9.js';
19
+ export { C as ClinicCall, F as FactOverlay, R as REQUEST_TIMELINE_TITLES, a as RecordSharesStatus, b as RecordsDashboardState, c as RecordsDashboardView, d as RecordsEmptyVariant, e as RequestTimelineEvent, f as RequestTimelineEventKey, g as RequestTimelineEventState, S as ShareRowView, U as UseRecordFactEditState, h as UseRecordPdfLinkState, i as UseRecordSharesState, j as UseRecordsMarkersState, k as applyFactOverlay, l as buildRequestTimeline, m as deriveRecordsDashboardState, n as isFactEditable, p as pickPetRecordsRequest, s as selectClinicCall, o as selectDashboardView, q as selectPrimaryLabel, r as selectRequestList, t as selectRequestTitle, u as useEverfurRecordsClinic, v as useEverfurRecordsClinicBatch, w as useRecordFactEdit, x as useRecordPdfLink, y as useRecordShares, z as useRecordsMarkers } from '../../view.d-Bq7d05Pv.js';
20
+ export { R as RecordsDepthStatus } from '../../useRecordsDepth.d-Cu7-cKAn.js';
21
21
  export { g as RecordPdfLink, f as RecordShare, R as RecordShareAudience, i as RecordShareAudienceScope, d as RecordShareEmailInput, e as RecordShareEmailReceipt, c as RecordShareLink, j as RecordShareRecipientKind, a as RecordsFeatures, q as RecordsPhotoContentType, b as RecordsUploadContentType, s as acceptsPhotos } from '../../features.d-DrQxTw3-.js';
22
- export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../../DepthViews.d-BIfqdrvX.js';
23
- export { C as CreateClinicRequestBatchInput, b as RECORDS_CLINIC_BATCH_MAX, R as RecordsClinicBatch, a as RecordsClinicBatchClient, c as RecordsClinicBatchItem, d as RecordsClinicBatchResult } from '../../clinicBatch.d-C_kZtYt-.js';
22
+ export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../../DepthViews.d-B5RHCzGS.js';
23
+ export { C as CreateClinicRequestBatchInput, b as RECORDS_CLINIC_BATCH_MAX, R as RecordsClinicBatch, a as RecordsClinicBatchClient, c as RecordsClinicBatchItem, d as RecordsClinicBatchResult } from '../../clinicBatch.d-CSr_YFGU.js';
24
24
  export { C as CreateClinicRequestInput, f as RecordsAuthorizationCopy, b as RecordsAuthorizationSignature, R as RecordsClinic, c as RecordsClinicSearchInput, d as RecordsClinicSearchPage, a as RecordsClinicTarget, e as RecordsRecentClinicsInput, g as RecordsSignatureUploadPolicy } from '../../clinicModels.d-CaS64-P-.js';
25
25
  export { WebRecordsUploadTransportOptions, createWebRecordsUploadTransport } from './upload/index.js';
26
26
  import { F as FileHandle } from '../../ports.d-BX4f4UsB.js';
27
27
  export { a as UploadPolicyWire, U as UploadTransport } from '../../ports.d-BX4f4UsB.js';
28
28
  export { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
29
29
  import '../../ErrorPolicyPort.d-68yrE3BE.js';
30
- import '../../requestFunnel.d-LSnmCusf.js';
31
- import '../../config.d--6siaeNg.js';
32
- import '../../identity.d-B7dPRGqm.js';
30
+ import '../../requestFunnel.d-BDuYHZMa.js';
31
+ import '../../config.d-Bf15Q27G.js';
32
+ import '../../identity.d--2ec4agf.js';
33
33
 
34
34
  type RecordsHistoryMode = 'memory' | 'browser';
35
35
  interface EverfurRecordsProps extends RecordsHostSeams {
@@ -171,7 +171,7 @@ return Object.freeze({petRef:pet,available:true,withheld:false,labResults:/* @__
171
171
  return Object.freeze({petRef:pet,withheld:true,isEmpty:false,visits:/* @__PURE__ */Object.freeze([]),vaccines:/* @__PURE__ */Object.freeze([]),weights:/* @__PURE__ */Object.freeze([]),medications:/* @__PURE__ */Object.freeze([]),disclaimer:""})}function mapRecordsTimeline(petRef,wire){let w=isRecord(wire)?wire:{},pet=petOf(w,petRef);if(w.withheld===true)return withheldTimeline(pet);let parsed=timelineSchema.safeParse(w);if(!parsed.success)return withheldTimeline(pet);let t=parsed.data,visits=t.visits.map(v=>/* @__PURE__ */Object.freeze({visitId:v.visit_id,visitDate:v.visit_date??null,veterinarian:v.veterinarian??null,summary:v.summary??null,docId:v.doc_id??null})),vaccines=t.vaccines.map(v=>/* @__PURE__ */Object.freeze({vaccineId:v.vaccine_id,product:v.product??null,lot:v.lot??null,administeredOn:v.administered_on??null,expiresOn:v.expires_on??null,docId:v.doc_id??null})),weights=t.weights.map(v=>/* @__PURE__ */Object.freeze({weightId:v.weight_id,observedOn:v.observed_on??null,weightKg:v.weight_kg??null,docId:v.doc_id??null})),medications=t.medications.map(m=>/* @__PURE__ */Object.freeze({medicationId:m.medication_id,drugName:m.drug_name??null,dose:m.dose??null,route:m.route??null,frequency:m.frequency??null,sig:m.sig??null,rxNumber:m.rx_number??null,startedOn:m.started_on??null,stoppedOn:m.stopped_on??null,docId:m.doc_id??null}));/* @__PURE__ */
172
172
  return Object.freeze({petRef:pet,withheld:false,isEmpty:visits.length===0&&vaccines.length===0&&weights.length===0&&medications.length===0,visits:/* @__PURE__ */Object.freeze(visits),vaccines:/* @__PURE__ */Object.freeze(vaccines),weights:/* @__PURE__ */Object.freeze(weights),medications:/* @__PURE__ */Object.freeze(medications),disclaimer:t.disclaimer??""})}function mapDocumentContributions(petRef,wire){let w=isRecord(wire)?wire:{},pet=petOf(w,petRef),withheld=()=>/* @__PURE__ */Object.freeze({petRef:pet,withheld:true,document:null,contributions:/* @__PURE__ */Object.freeze([]),contributionCount:0});if(w.withheld===true)return withheld();let parsed=contributionsSchema.safeParse(w);if(!parsed.success)return withheld();let contributions=/* @__PURE__ */Object.freeze(parsed.data.contributions.map(mapEntityRow));/* @__PURE__ */
173
173
  return Object.freeze({petRef:pet,withheld:false,document:mapDocumentRow(parsed.data.document),contributions:contributions,contributionCount:parsed.data.contribution_count??contributions.length})}var BASE3="/widget/v1/records/pets";function createRecordsDepthClient(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}})),segment=(value,max)=>typeof value=="string"&&value.length>0&&!hasLoneSurrogate(value)&&[...value].length<=max,read=async(call,petRef,path,map)=>{if(!segment(petRef,PET_REF_MAX))return invalid2();let result=await funnel.send(call,{method:"GET",path:path});if(!result.ok)return result;let view=map(result.value);return view.petRef===petRef?ok(view):err(makeEverfurError("internalError",{retryable:false}))},pet=petRef=>`${BASE3}/${encodeURIComponent(petRef)}`,record=petRef=>`${pet(petRef)}/everfur_record`,parsed=async(call,req,map)=>{let result=await funnel.send(call,req,req.method==="POST"?{idempotent:false,maxAttempts:1}:void 0);if(!result.ok)return result;let value=map(result.value);return value===null?err(makeEverfurError("internalError",{retryable:false})):ok(value)},factBody=(input,corrected)=>!segment(input.entityType,FACT_ENTITY_TYPE_MAX)||!segment(input.canonicalKey,FACT_CANONICAL_KEY_MAX)||input.idempotencyKey!==void 0&&!segment(input.idempotencyKey,IDEMPOTENCY_KEY_MAX)||corrected!==void 0&&Object.keys(corrected).length===0?null:{entity_type:input.entityType,canonical_key:input.canonicalKey,...corrected!==void 0?{corrected_fields:corrected}:{},...input.idempotencyKey!==void 0?{idempotency_key:input.idempotencyKey}:{}};return{getRecordDepth:petRef=>read("records.depth.record",petRef,`${pet(petRef)}/record`,wire=>mapRecordDepth(petRef,wire)),getTimeline:petRef=>read("records.depth.timeline",petRef,`${pet(petRef)}/timeline`,wire=>mapRecordsTimeline(petRef,wire)),getDocumentContributions(petRef,docId){return segment(docId,64)?read("records.depth.contributions",petRef,`${pet(petRef)}/documents/${encodeURIComponent(docId)}/contributions`,wire=>mapDocumentContributions(petRef,wire)):invalid2()},getMarkers:petRef=>read("records.depth.markers",petRef,`${pet(petRef)}/markers`,wire=>mapRecordMarkers(petRef,wire)),createShare(petRef,opts){if(!segment(petRef,PET_REF_MAX))return invalid2();let audience=opts?.audience;return audience!==void 0&&!RECORD_SHARE_AUDIENCES.includes(audience)?invalid2():parsed("records.share.create",{method:"POST",path:`${record(petRef)}/share`,...audience!==void 0?{body:{audience:audience}}:{}},wire=>mapRecordShareLink(wire,deps.apiBaseUrl))},emailShare(petRef,input){let kind=input.recipientKind,email2=typeof input.recipientEmail=="string"?input.recipientEmail.trim():"",kindOk=kind==="other"||RECORD_SHARE_AUDIENCES.includes(kind);return!segment(petRef,PET_REF_MAX)||!kindOk||!isShareRecipientEmail(email2)||hasLoneSurrogate(email2)?invalid2():parsed("records.share.email",{method:"POST",path:`${record(petRef)}/share/email`,body:{recipient_email:email2,recipient_kind:kind}},mapRecordShareEmailReceipt)},async readFeatures(){try{let result=await funnel.send("records.getFeatures",{method:"GET",path:"/widget/v1/records/features"});return result.ok?mapRecordsFeatures(result.value):RECORDS_FEATURES_PDF_ONLY}catch{return RECORDS_FEATURES_PDF_ONLY}},listShares(petRef){return segment(petRef,PET_REF_MAX)?parsed("records.share.list",{method:"GET",path:`${record(petRef)}/shares`},mapRecordShareList):invalid2()},async revokeShare(petRef,shareId){if(!segment(petRef,PET_REF_MAX)||!segment(shareId,64))return invalid2();let result=await funnel.send("records.share.revoke",{method:"DELETE",path:`${record(petRef)}/shares/${encodeURIComponent(shareId)}`},{idempotent:false,maxAttempts:1});return result.ok?ok(void 0):result},getPdfLink(petRef){return segment(petRef,PET_REF_MAX)?parsed("records.pdf.link",{method:"GET",path:`${record(petRef)}/pdf-link`},mapRecordPdfLink):invalid2()},async editFact(petRef,input){let body=segment(petRef,PET_REF_MAX)?factBody(input,input.correctedFields):null;if(body===null)return invalid2();let result=await funnel.send("records.fact.edit",{method:"POST",path:`${record(petRef)}/facts/edit`,body:body},{idempotent:false,maxAttempts:1});return result.ok?ok(void 0):result},async removeFact(petRef,input){let body=segment(petRef,PET_REF_MAX)?factBody(input):null;if(body===null)return invalid2();let result=await funnel.send("records.fact.remove",{method:"POST",path:`${record(petRef)}/facts/remove`,body:body},{idempotent:false,maxAttempts:1});return result.ok?ok(void 0):result},listRequestDocuments(requestId2){return segment(requestId2,64)?parsed("records.request.documents",{method:"GET",path:`/widget/v1/records/requests/${encodeURIComponent(requestId2)}/documents`},mapRequestDocuments):invalid2()},listAuthorizationSignatures:()=>parsed("records.signatures.list",{method:"GET",path:"/widget/v1/records/authorization-signatures"},mapSignatureSuggestions)}}function invalid2(){return Promise.resolve(err(makeEverfurError("validationFailed",{retryable:false})))}function useEverfurRecordsDepthClient(){let{runtime:runtime,userRef:userRef,scopeEpoch:scopeEpoch}=useEverfurContext();return useMemo(()=>{let{services:services}=runtime.registry;return createRecordsDepthClient({auth:services.authFor(userRef),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{},...typeof services.apiBaseUrl=="string"?{apiBaseUrl:services.apiBaseUrl}:{}})},[runtime,userRef,scopeEpoch])}function useRecordsDepthRead(petRef,read,isEmpty,extraKey=""){let client=useEverfurRecordsDepthClient(),{userRef:userRef}=useEverfurContext(),consentEpoch=useRecordsConsentEpoch(petRef),scope=useMemo(()=>({}),[client,petRef,extraKey,consentEpoch]),[state,setState]=useState({scope:scope,value:null,error:null,loading:true}),generation=useRef(0),load=useCallback(async()=>{let gen=generation.current+=1;if(setState({scope:scope,value:null,error:null,loading:true}),userRef===null){setState({scope:scope,value:null,error:null,loading:false});return}let result=await read(client,petRef);gen===generation.current&&(result.ok?setState({scope:scope,value:result.value,error:null,loading:false}):setState({scope:scope,value:null,error:result.error,loading:false}))},[client,petRef,read,scope,userRef]);useEffect(()=>(load(),()=>{generation.current+=1}),[load]);let current=state.scope===scope?state:{value:null,error:null,loading:true},refresh=useCallback(()=>{load()},[load]),available=current.error===null||current.error.httpStatus!==404,error=available?current.error:null,status=current.loading?"loading":error!==null?"error":current.value===null?"empty":current.value.withheld?"populated":isEmpty(current.value)?"empty":"populated";return useMemo(()=>({status:status,value:current.value,error:error,available:available,refresh:refresh}),[status,current.value,error,available,refresh])}function isDarkRouteError(error){return error!==null&&error.httpStatus===404}var readMarkers=(client,petRef)=>client.getMarkers(petRef),markersEmpty=value=>value.markers.length===0;function useRecordsMarkers(petRef){let state=useRecordsDepthRead(petRef,readMarkers,markersEmpty);return useMemo(()=>{let markers=state.available&&state.value!==null&&!state.value.withheld?state.value:null;return{status:state.status,markers:markers,available:state.available,error:state.error,refresh:state.refresh}},[state])}var EMAIL3=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function useRecordsConsentForm(input){let{clinic:clinic,controller:controller,depthClient:depthClient,capture:capture,onCreated:onCreated}=input,clinicName=clinic.clinic?.name??clinic.freeText??"",isFreeText=clinic.clinic===null,[authorized,setAuthorized]=useState(false),[ownerName,setOwnerName]=useState(input.ownerName),[email2,setEmail]=useState(clinic.email),[emailTouched,setEmailTouched]=useState(false),[copy,setCopy]=useState(null),[copyError,setCopyError]=useState(null),[copyAttempt,setCopyAttempt]=useState(0),[error,setError]=useState(null),[busy,setBusy]=useState(false),[created,setCreated]=useState(null),[signatures,setSignatures]=useState([]),[reuseSignatureId,setReuseSignatureId]=useState(null),[signed,setSigned]=useState(false),locked=useRef(false),live=useRef(true),keyFactory=useRef(defaultIdempotencyKeyFactory()),attempt=useRef(null);useEffect(()=>(live.current=true,()=>{live.current=false,attempt.current=null}),[controller]),useEffect(()=>{let alive=true;return setCopy(null),attempt.current=null,controller.getAuthorizationCopy().then(result=>{alive&&(result.ok?(setCopy(result.value),setCopyError(null)):setCopyError(result.error))}).catch(()=>{alive&&setCopyError(makeEverfurError("internalError"))}),()=>{alive=false}},[controller,copyAttempt]),useEffect(()=>{if(depthClient===void 0)return;let alive=true;return depthClient.listAuthorizationSignatures().then(result=>{alive&&(result.ok?setSignatures(result.value):isDarkRouteError(result.error)||setSignatures([]))}).catch(()=>{}),()=>{alive=false}},[depthClient]);let needsEmail=clinicNeedsEmail(clinic.clinic),normalizedEmail=email2.trim().toLowerCase(),validEmail=EMAIL3.test(normalizedEmail),emailError=needsEmail&&(emailTouched||normalizedEmail.length>0)&&!validEmail?normalizedEmail.length>0?RECORDS_CONSENT_COPY.emailInvalid:RECORDS_CONSENT_COPY.emailRequired:null,named=ownerName.trim().length>0,scope=copy&&named?renderClinicScope(copy,ownerName.trim(),petNameOr(input.petName),clinicName):null,hasSignature=input.hostCapture===true||signed||reuseSignatureId!==null,readyButSigned=!!(authorized&&copy&&scope&&named&&clinicName&&(!needsEmail||validEmail)),ready=readyButSigned&&hasSignature,submit=useCallback(async()=>{if(!(locked.current||created!==null||!copy||!scope)){if(!clinicName){setError(RECORDS_CONSENT_COPY.missingDraftError);return}if(needsEmail&&!validEmail){setEmailTouched(true),setError(normalizedEmail.length>0?RECORDS_CONSENT_COPY.emailInvalid:RECORDS_CONSENT_COPY.emailRequired);return}if(!(!authorized||!ownerName.trim())){locked.current=true,setBusy(true),setError(null);try{if(attempt.current===null){let signature=reuseSignatureId!==null?{signatureId:reuseSignatureId}:await capture();if(!live.current)return;if(signature===null){setError(RECORDS_CONSENT_COPY.missingSignatureError);return}let target=clinic.clinic&&(!needsEmail||clinic.clinic.emailStatus==="none")?{clinicId:clinic.clinic.id}:{clinicFreeText:clinicName};attempt.current={petRef:input.petRef,ownerName:ownerName.trim(),authorizationVersion:copy.authorizationVersion,...target,...needsEmail?{clinicEmail:normalizedEmail}:{},...signature.signatureId!==void 0?{signatureId:signature.signatureId}:{signaturePngBase64:signature.signaturePngBase64},idempotencyKey:keyFactory.current()}}let result=await controller.createClinicRequest(attempt.current);if(!live.current)return;if(!result.ok){setError(result.error.displayMessage);return}if(result.value.petRef!==input.petRef){setError(makeEverfurError("internalError").displayMessage);return}setCreated(result.value),attempt.current=null,onCreated?.(result.value)}catch{live.current&&setError(makeEverfurError("internalError").displayMessage)}finally{locked.current=false,live.current&&setBusy(false)}}}},[authorized,capture,clinic.clinic,clinicName,controller,copy,created,input.petRef,needsEmail,normalizedEmail,onCreated,ownerName,reuseSignatureId,scope,validEmail]),invalidate=useCallback(()=>{attempt.current=null,setError(null)},[]);return{title:isFreeText?RECORDS_CONSENT_COPY.titleFreeText:RECORDS_CONSENT_COPY.titleDirectory,clinicName:clinicName,isFreeText:isFreeText,authorized:authorized,ownerName:ownerName,email:email2,emailError:emailError,needsEmail:needsEmail,directoryClinicNoEmail:needsEmail&&clinic.clinic!==null,copy:copy,copyError:copyError,scope:scope,error:error,busy:busy,created:created,ready:ready,signatures:signatures,reuseSignatureId:reuseSignatureId,hasSignature:hasSignature,scopeAwaitingName:copy!==null&&!named,signatureLastMissing:readyButSigned&&!hasSignature,setAuthorized(value){locked.current||(invalidate(),setAuthorized(value))},setOwnerName(value){locked.current||(invalidate(),setOwnerName(value))},setEmail(value){locked.current||(invalidate(),setEmailTouched(false),setEmail(value))},setSigned(value){locked.current||(invalidate(),setSigned(value),value&&setReuseSignatureId(null))},pickReuseSignature(signatureId){locked.current||(invalidate(),setReuseSignatureId(signatureId))},retryCopy(){setCopyError(null),setCopyAttempt(n=>n+1)},submit:submit}}function EverfurRecordsConsent(props){let{userRef:userRef,scopeEpoch:scopeEpoch}=useEverfurContext();/* @__PURE__ */
174
- return jsx(CapabilityGate,{capability:"recordsClinic",style:props.style,className:props.className,...recordsGateExit(props.onBack,BACK_LABEL),children:userRef===null?/* @__PURE__ */jsx("p",{role:"alert",children:RECORDS_COPY.sessionRequired}):/* @__PURE__ */jsx(ConsentBody,{...guardHostProps(props,["onCreated","onNavigate","onBack"])},JSON.stringify([userRef,scopeEpoch,props.petRef,props.clinic.key]))})}function ConsentBody({petRef:petRef,petName:petName,clinic:clinic,ownerName:ownerName,onCaptureSignature:onCaptureSignature,onCreated:onCreated,controller:controller,onNavigate:onNavigate,onBack:onBack,style:style,className:className}){let directSendNote=useRecordsSandboxTenant()?RECORDS_SANDBOX_COPY.newClinicDirectSendNote:RECORDS_CONSENT_COPY.newClinicDirectSendNote,{theme:theme,styles:styles}=useScreenStyles(),runtimeController=useEverfurRecordsClinic(),resolved=controller??runtimeController,depthClient=useEverfurRecordsDepthClient(),pad=useSignatureCanvas(),rise=useSectionRise(),form=useRecordsConsentForm({petRef:petRef,petName:petName,ownerName:ownerName??"",clinic:clinic,controller:resolved,depthClient:depthClient,capture:onCaptureSignature?()=>onCaptureSignature({petRef:petRef,petName:petNameOr(petName),ownerName:form.ownerName,clinicName:form.clinicName,authorizationVersion:form.copy?.authorizationVersion??"",scopeText:form.scope??"",signal:(new AbortController).signal}):async()=>pad.signed?pad.capture(resolved,(new AbortController).signal):null,hostCapture:onCaptureSignature!==void 0,onCreated:request=>{onCreated?.(request),onNavigate?.({name:"dashboard"})}}),padSigned=pad.signed,formRef=useRef(form);formRef.current=form,useEffect(()=>{formRef.current.setSigned(padSigned)},[padSigned]);let busy=form.busy,block={display:"flex",flexDirection:"column",gap:theme.space.sm},ownerId="records-consent-owner-name",emailId="records-consent-clinic-email";/* @__PURE__ */
174
+ return jsx(CapabilityGate,{capability:"recordsClinic",style:props.style,className:props.className,...recordsGateExit(props.onBack,BACK_LABEL),children:userRef===null?/* @__PURE__ */jsx("p",{role:"alert",children:RECORDS_COPY.sessionRequired}):/* @__PURE__ */jsx(ConsentBody,{...guardHostProps(props,["onCreated","onNavigate","onBack"])},JSON.stringify([userRef,scopeEpoch,props.petRef,props.clinic.key]))})}function ConsentBody({petRef:petRef,petName:petName,clinic:clinic,ownerName:ownerName,onCaptureSignature:onCaptureSignature,onCreated:onCreated,controller:controller,onNavigate:onNavigate,onBack:onBack,style:style,className:className}){let directSendNote=useRecordsSandboxTenant()?RECORDS_SANDBOX_COPY.newClinicDirectSendNote:RECORDS_CONSENT_COPY.newClinicDirectSendNote,{theme:theme,styles:styles}=useScreenStyles(),runtimeController=useEverfurRecordsClinic(),resolved=controller??runtimeController,depthClient=useEverfurRecordsDepthClient(),formRef=useRef(null),dropReusePick=useCallback(()=>{formRef.current?.pickReuseSignature(null)},[]),pad=useSignatureCanvas(dropReusePick),rise=useSectionRise(),form=useRecordsConsentForm({petRef:petRef,petName:petName,ownerName:ownerName??"",clinic:clinic,controller:resolved,depthClient:depthClient,capture:onCaptureSignature?()=>onCaptureSignature({petRef:petRef,petName:petNameOr(petName),ownerName:form.ownerName,clinicName:form.clinicName,authorizationVersion:form.copy?.authorizationVersion??"",scopeText:form.scope??"",signal:(new AbortController).signal}):async()=>pad.signed?pad.capture(resolved,(new AbortController).signal):null,hostCapture:onCaptureSignature!==void 0,onCreated:request=>{onCreated?.(request),onNavigate?.({name:"dashboard"})}}),padSigned=pad.signed;formRef.current=form,useEffect(()=>{formRef.current?.setSigned(padSigned)},[padSigned]);let busy=form.busy,block={display:"flex",flexDirection:"column",gap:theme.space.sm},ownerId="records-consent-owner-name",emailId="records-consent-clinic-email";/* @__PURE__ */
175
175
  return jsxs("div",{className:className,style:{...styles.root,...style},"data-testid":"records-consent-screen",children:[
176
176
  /* @__PURE__ */jsx(ScreenHeader,{title:form.title,onBack:onBack,testID:"records-consent-header"}),
177
177
  /* @__PURE__ */jsx("p",{style:styles.subLead,"data-testid":"records-consent-lead",children:RECORDS_CONSENT_COPY.leadWeb(petName)}),
@@ -196,7 +196,7 @@ return jsxs("div",{className:className,style:{...styles.root,...style},"data-tes
196
196
  /* @__PURE__ */jsx("p",{style:styles.muted,"data-testid":"records-consent-review-note",children:directSendNote})]}):null,onCaptureSignature?null:/* @__PURE__ */jsxs("div",{style:block,children:[form.signatures.length>0?/* @__PURE__ */jsxs("div",{style:block,children:[
197
197
  /* @__PURE__ */jsx("span",{style:styles.fieldLabel,children:RECORDS_CONSENT_COPY.reuseSignature}),
198
198
  /* @__PURE__ */jsx("div",{style:{display:"flex",gap:theme.space.sm,overflowX:"auto",padding:`${theme.space.xs}px 0`},children:form.signatures.map(sig=>{let selected=form.reuseSignatureId===sig.signatureId;/* @__PURE__ */
199
- return jsx("button",{type:"button",onClick:()=>form.pickReuseSignature(selected?null:sig.signatureId),"aria-label":selected?RECORDS_CONSENT_COPY.reuseTileSelectedA11y:RECORDS_CONSENT_COPY.reuseTileA11y,"aria-pressed":selected,style:{flexShrink:0,width:112,height:56,borderRadius:theme.radius.sm,border:selected?`2px solid ${theme.color.brandInk}`:`1px solid ${theme.color.brandBorder}`,backgroundColor:theme.color.surface,padding:0,overflow:"hidden",cursor:"pointer"},"data-testid":`records-consent-reuse-${sig.signatureId}`,children:/* @__PURE__ */jsx("img",{src:sig.previewUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}})},sig.signatureId)})}),
199
+ return jsx("button",{type:"button",onClick:()=>{selected||pad.clear(),form.pickReuseSignature(selected?null:sig.signatureId)},"aria-label":selected?RECORDS_CONSENT_COPY.reuseTileSelectedA11y:RECORDS_CONSENT_COPY.reuseTileA11y,"aria-pressed":selected,style:{flexShrink:0,width:112,height:56,borderRadius:theme.radius.sm,border:selected?`2px solid ${theme.color.brandInk}`:`1px solid ${theme.color.brandBorder}`,backgroundColor:theme.color.surface,padding:0,overflow:"hidden",cursor:"pointer"},"data-testid":`records-consent-reuse-${sig.signatureId}`,children:/* @__PURE__ */jsx("img",{src:sig.previewUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}})},sig.signatureId)})}),
200
200
  /* @__PURE__ */jsx("p",{style:styles.muted,children:RECORDS_CONSENT_COPY.reuseHint})]}):null,
201
201
  /* @__PURE__ */jsx(SignatureCanvas,{pad:pad,disabled:busy}),
202
202
  /* @__PURE__ */jsx("p",{style:styles.muted,children:RECORDS_CONSENT_COPY.signatureHint(form.clinicName)}),form.signatureLastMissing?/* @__PURE__ */jsx("p",{style:styles.muted,"data-testid":"records-consent-signature-required",children:RECORDS_CONSENT_COPY.missingSignatureError}):null]}),