@everfur/sdk 1.4.1 → 1.5.1

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 (200) hide show
  1. package/README.md +2 -2
  2. package/dist/{Chat.d-qQVN6VLp.d.ts → Chat.d-BCfyvzX8.d.ts} +1 -1
  3. package/dist/{Chat.d-Bl-_TsvQ.d.cts → Chat.d-Od44h51D.d.cts} +1 -1
  4. package/dist/{DepthViews.d-PmjccZLr.d.cts → DepthViews.d-BGspxovy.d.cts} +1 -1
  5. package/dist/{DepthViews.d-aOChkwU2.d.ts → DepthViews.d-BIHVrf9r.d.ts} +1 -1
  6. package/dist/{DepthViews.d-ktxIIsnb.d.cts → DepthViews.d-BaLh7Lsi.d.cts} +1 -1
  7. package/dist/{DepthViews.d-CpF_Y_z9.d.ts → DepthViews.d-CEVk9poG.d.ts} +1 -1
  8. package/dist/ErrorPolicyPort.d-BIdmYQnk.d.cts +43 -0
  9. package/dist/ErrorPolicyPort.d-BnI5qWg4.d.ts +43 -0
  10. package/dist/{RecordsPage.d-BfMSOsg_.d.ts → RecordsPage.d-D10RIgdc.d.ts} +1 -1
  11. package/dist/{RecordsPage.d-DWjFpZs1.d.cts → RecordsPage.d-DbhYNSbq.d.cts} +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-DOmkQ_8O.d.ts → attachments.d-BlukNfIf.d.ts} +1 -1
  15. package/dist/{attachments.d-DBlHzWYy.d.cts → attachments.d-CF4lLuGK.d.cts} +1 -1
  16. package/dist/{bookingCopy.d-ITpabqPr.d.ts → bookingCopy.d-BL2-URcv.d.ts} +15 -14
  17. package/dist/{bookingCopy.d-B39JAmIZ.d.cts → bookingCopy.d-Dfew1pjY.d.cts} +15 -14
  18. package/dist/{callCopy.d-Bw6oZT54.d.cts → callCopy.d-BQxpwXqT.d.cts} +3 -3
  19. package/dist/{callCopy.d-Bw6oZT54.d.ts → callCopy.d-BQxpwXqT.d.ts} +3 -3
  20. package/dist/{callRoom.d-B1DoYdJe.d.cts → callRoom.d-9Dm7XnUr.d.cts} +1 -1
  21. package/dist/{callRoom.d-Dqm1rUqT.d.ts → callRoom.d-t-khijDv.d.ts} +1 -1
  22. package/dist/{casesRepository.d-De4ZtgJ_.d.cts → casesRepository.d-CVuKTkJo.d.cts} +1 -1
  23. package/dist/{casesRepository.d-DsEeFd0F.d.ts → casesRepository.d-Dn1fK1b2.d.ts} +1 -1
  24. package/dist/chat/index.cjs +21 -21
  25. package/dist/chat/index.d.cts +12 -12
  26. package/dist/chat/index.d.ts +12 -12
  27. package/dist/chat/index.js +21 -21
  28. package/dist/chat/lite/index.cjs +21 -21
  29. package/dist/chat/lite/index.d.cts +12 -12
  30. package/dist/chat/lite/index.d.ts +12 -12
  31. package/dist/chat/lite/index.js +21 -21
  32. package/dist/{chatHandoffToken.d-B4-iQ35P.d.cts → chatHandoffToken.d-BjfmIxXk.d.cts} +6 -6
  33. package/dist/{chatHandoffToken.d-Br3Gw3w-.d.ts → chatHandoffToken.d-CFiI6IMc.d.ts} +6 -6
  34. package/dist/{checkin.d-CAKQydg8.d.cts → checkin.d-BP3ZWBfX.d.cts} +5 -5
  35. package/dist/{checkin.d-qvYXugN3.d.ts → checkin.d-CokpahFL.d.ts} +5 -5
  36. package/dist/{chunk-7MMJ7CYN.js → chunk-IO4CGYHT.js} +1 -1
  37. package/dist/{chunk-PJHMKQ5C.js → chunk-NBAOR5TJ.js} +23 -23
  38. package/dist/{chunk-5OK2AF63.js → chunk-RD6ZGYEJ.js} +17 -17
  39. package/dist/{chunk-6I4REU4U.js → chunk-ZYHPCQVM.js} +1 -1
  40. package/dist/client/index.cjs +31 -31
  41. package/dist/client/index.d.cts +19 -16
  42. package/dist/client/index.d.ts +19 -16
  43. package/dist/client/index.js +30 -30
  44. package/dist/{clinicBatch.d-B3YJc8IO.d.cts → clinicBatch.d-C0xx5L4j.d.cts} +3 -3
  45. package/dist/{clinicBatch.d-DhvQuPHV.d.ts → clinicBatch.d-DNi4UURs.d.ts} +3 -3
  46. package/dist/{config.d-DRoQ2lAx.d.ts → config.d-B7Z-KTGq.d.ts} +10 -2
  47. package/dist/{config.d-BiVy0fLx.d.cts → config.d-ClAI2RZ6.d.cts} +10 -2
  48. package/dist/consent/index.d.cts +6 -6
  49. package/dist/consent/index.d.ts +6 -6
  50. package/dist/{context.d-DZfxKxNi.d.cts → context.d-Bj6-xYPA.d.cts} +11 -5
  51. package/dist/{context.d-FjU7dQP7.d.ts → context.d-DS1GXUEY.d.ts} +11 -5
  52. package/dist/{copy.d-Ce_8KuZg.d.cts → copy.d--F5A9cXK.d.cts} +3 -3
  53. package/dist/{copy.d-BP36f_63.d.ts → copy.d-DmxuFJFe.d.ts} +3 -3
  54. package/dist/core/index.cjs +41 -40
  55. package/dist/core/index.d.cts +16 -16
  56. package/dist/core/index.d.ts +16 -16
  57. package/dist/core/index.js +41 -40
  58. package/dist/{depth.d-DzMMmRN4.d.ts → depth.d-CgzYE6_n.d.ts} +3 -3
  59. package/dist/{depth.d-BtlcIqPJ.d.cts → depth.d-DLaP0o8Y.d.cts} +3 -3
  60. package/dist/{entitlementRepository.d-BltqS1W8.d.ts → entitlementRepository.d-CkUTlVAb.d.ts} +2 -2
  61. package/dist/{entitlementRepository.d-wfqpUIKN.d.cts → entitlementRepository.d-DVTp-BB9.d.cts} +2 -2
  62. package/dist/{focus.d-BX7oahFk.d.cts → focus.d-CLTjm6In.d.cts} +1 -1
  63. package/dist/{focus.d-armXecf0.d.ts → focus.d-u-HYvim0.d.ts} +1 -1
  64. package/dist/health-plan/index.d.cts +15 -15
  65. package/dist/health-plan/index.d.ts +15 -15
  66. package/dist/{healthPlanRepository.d-DBx7-NLE.d.cts → healthPlanRepository.d-B22kjrYa.d.cts} +3 -3
  67. package/dist/{healthPlanRepository.d-C7K9dJK5.d.ts → healthPlanRepository.d-CwRXeoM7.d.ts} +3 -3
  68. package/dist/{idempotency.d-Dak2-pON.d.cts → idempotency.d-CFVMhWcv.d.cts} +1 -1
  69. package/dist/{idempotency.d-symqJ8Tt.d.ts → idempotency.d-dOFfV91-.d.ts} +1 -1
  70. package/dist/{identity.d-DOKJFaiz.d.ts → identity.d-D4VtpqRr.d.ts} +1 -1
  71. package/dist/{identity.d-DIH9h3Le.d.cts → identity.d-DDpXOtas.d.cts} +1 -1
  72. package/dist/{inbox.d-AuGKeaZv.d.cts → inbox.d-CPcMMz-Y.d.cts} +2 -2
  73. package/dist/{inbox.d-B5b57OXc.d.ts → inbox.d-DJ9xgU1Z.d.ts} +2 -2
  74. package/dist/index.cjs +246 -245
  75. package/dist/index.d.cts +17 -17
  76. package/dist/index.d.ts +17 -17
  77. package/dist/index.js +244 -243
  78. package/dist/{introEvents.d-ehik7PEn.d.cts → introEvents.d-B7acmGwf.d.cts} +1 -1
  79. package/dist/{introEvents.d-S4Q4BOSt.d.ts → introEvents.d-DW3gLljE.d.ts} +1 -1
  80. package/dist/{layout.d-Bm2_1wa4.d.ts → layout.d-C8y_ki1V.d.ts} +1 -1
  81. package/dist/{layout.d-CFF-nBXf.d.cts → layout.d-DfaFM_lp.d.cts} +1 -1
  82. package/dist/{models.d-DOwpK1ZF.d.ts → models.d-NAWqF1wC.d.ts} +6 -3
  83. package/dist/{models.d-Su_BBBTW.d.cts → models.d-wJ_Ze4p5.d.cts} +6 -3
  84. package/dist/notifications/inbox/index.d.cts +7 -7
  85. package/dist/notifications/inbox/index.d.ts +7 -7
  86. package/dist/notifications/index.d.cts +8 -8
  87. package/dist/notifications/index.d.ts +8 -8
  88. package/dist/{optInView.d-DbGx1A9R.d.cts → optInView.d-ByDJMrMv.d.cts} +13 -13
  89. package/dist/{optInView.d-xnIxCLlH.d.ts → optInView.d-DVshLxbD.d.ts} +13 -13
  90. package/dist/{parse.d-DtHmpAMT.d.cts → parse.d-BDZ7ffgj.d.cts} +4 -1
  91. package/dist/{parse.d-DtHmpAMT.d.ts → parse.d-BDZ7ffgj.d.ts} +4 -1
  92. package/dist/{pets.d-BEqKykpu.d.ts → pets.d-BpLObpfM.d.ts} +1 -1
  93. package/dist/{pets.d-BS6sLxY-.d.cts → pets.d-DXhzTNuI.d.cts} +1 -1
  94. package/dist/{petsRepository.d-iHrHkXM2.d.ts → petsRepository.d-_QfM7F6T.d.ts} +1 -1
  95. package/dist/{petsRepository.d-DB5CNKsK.d.cts → petsRepository.d-ai_tZ3lu.d.cts} +1 -1
  96. package/dist/records/depth/index.d.cts +10 -10
  97. package/dist/records/depth/index.d.ts +10 -10
  98. package/dist/records/index.cjs +1 -1
  99. package/dist/records/index.d.cts +11 -11
  100. package/dist/records/index.d.ts +11 -11
  101. package/dist/records/index.js +1 -1
  102. package/dist/{requestFunnel.d-SySe6xHp.d.cts → requestFunnel.d-BwZDfWVD.d.cts} +3 -3
  103. package/dist/{requestFunnel.d-CehftayS.d.ts → requestFunnel.d-DKBPTpsy.d.ts} +3 -3
  104. package/dist/{route.d-DSSSpSB-.d.cts → route.d-DCzQh4ix.d.cts} +3 -3
  105. package/dist/{route.d-B395-hNX.d.ts → route.d-DSYEd2MR.d.ts} +3 -3
  106. package/dist/{runtimeTypes.d-DAz0Tgw5.d.ts → runtimeTypes.d-BzUig75K.d.ts} +11 -7
  107. package/dist/{runtimeTypes.d-DPh1Wh15.d.cts → runtimeTypes.d-CL4l7ta4.d.cts} +11 -7
  108. package/dist/{screenProps.d-Bd2yphad.d.cts → screenProps.d-6xmE1C-V.d.cts} +2 -2
  109. package/dist/{screenProps.d-D9Vi-Afl.d.ts → screenProps.d-fHBKArt_.d.ts} +2 -2
  110. package/dist/{sdkConfigStore.d-VPvsIL8E.d.ts → sdkConfigStore.d-BNCVVEWC.d.ts} +1 -1
  111. package/dist/{sdkConfigStore.d-BHrzkVpP.d.cts → sdkConfigStore.d-C2BAr9kI.d.cts} +1 -1
  112. package/dist/server/events/index.cjs +4 -4
  113. package/dist/server/events/index.d.cts +2 -2
  114. package/dist/server/events/index.d.ts +2 -2
  115. package/dist/server/events/index.js +4 -4
  116. package/dist/server/index.cjs +9 -9
  117. package/dist/server/index.d.cts +3 -3
  118. package/dist/server/index.d.ts +3 -3
  119. package/dist/server/index.js +9 -9
  120. package/dist/shop/index.d.cts +3 -3
  121. package/dist/shop/index.d.ts +3 -3
  122. package/dist/slots/index.d.cts +6 -6
  123. package/dist/slots/index.d.ts +6 -6
  124. package/dist/tabs/index.cjs +87 -84
  125. package/dist/tabs/index.d.cts +15 -15
  126. package/dist/tabs/index.d.ts +15 -15
  127. package/dist/tabs/index.js +95 -92
  128. package/dist/televet/booking/index.cjs +74 -75
  129. package/dist/televet/booking/index.d.cts +8 -8
  130. package/dist/televet/booking/index.d.ts +8 -8
  131. package/dist/televet/booking/index.js +4 -5
  132. package/dist/televet/call/index.d.cts +2 -2
  133. package/dist/televet/call/index.d.ts +2 -2
  134. package/dist/testing/index.d.cts +1 -1
  135. package/dist/testing/index.d.ts +1 -1
  136. package/dist/testing/rn/index.d.cts +10 -10
  137. package/dist/testing/rn/index.d.ts +10 -10
  138. package/dist/testing/web/index.d.cts +10 -10
  139. package/dist/testing/web/index.d.ts +10 -10
  140. package/dist/texting/index.d.cts +6 -6
  141. package/dist/texting/index.d.ts +6 -6
  142. package/dist/{threadOptions.d-bEAFkIsC.d.cts → threadOptions.d-Bqy5d5Fx.d.cts} +1 -1
  143. package/dist/{threadOptions.d-U5YBUKM-.d.ts → threadOptions.d-DOEIpk1t.d.ts} +1 -1
  144. package/dist/{threadOptions.d-DUQxxHyM.d.cts → threadOptions.d-Dc57dm7h.d.cts} +5 -5
  145. package/dist/{threadOptions.d-DnM9UcMx.d.ts → threadOptions.d-NSlFx-Lp.d.ts} +5 -5
  146. package/dist/{timelineRows.d-DXppCSCg.d.cts → timelineRows.d-7w8NsNi4.d.cts} +1 -1
  147. package/dist/{timelineRows.d-9Uhf4q5d.d.ts → timelineRows.d-CthNM5hV.d.ts} +1 -1
  148. package/dist/{useHealthPlanSubscription.d-CRBPMlsc.d.ts → useHealthPlanSubscription.d-CV7M21HS.d.ts} +3 -3
  149. package/dist/{useHealthPlanSubscription.d-DfjTYv1u.d.cts → useHealthPlanSubscription.d-SA9-SuKe.d.cts} +3 -3
  150. package/dist/{useInboxUnread.d-CP3KwSkn.d.ts → useInboxUnread.d-CXiaR3BZ.d.ts} +1 -1
  151. package/dist/{useInboxUnread.d-DiE_NbtS.d.cts → useInboxUnread.d-DERpMelw.d.cts} +1 -1
  152. package/dist/{usePresentation.d-DUYzYXgA.d.cts → usePresentation.d-BJzFicRQ.d.cts} +2 -2
  153. package/dist/{usePresentation.d-Buxz2Jkt.d.ts → usePresentation.d-DgSGIWS-.d.ts} +2 -2
  154. package/dist/{useRecordsDepth.d-l6D0ZS4l.d.cts → useRecordsDepth.d-C9W45gwS.d.cts} +1 -1
  155. package/dist/{useRecordsDepth.d-DG2GiAyt.d.ts → useRecordsDepth.d-ZX2rhcUx.d.ts} +1 -1
  156. package/dist/{useUnread.d-B6Ehu0ao.d.ts → useUnread.d-CedFK4k6.d.ts} +4 -4
  157. package/dist/{useUnread.d-7-cuCooM.d.cts → useUnread.d-DST1GMmL.d.cts} +4 -4
  158. package/dist/{view.d-ufGX_MKK.d.cts → view.d-3lxzyJlL.d.cts} +6 -6
  159. package/dist/{view.d-iTInze7B.d.ts → view.d-DRiYNQJ8.d.ts} +6 -6
  160. package/dist/web/consent/index.d.cts +6 -6
  161. package/dist/web/consent/index.d.ts +6 -6
  162. package/dist/web/health-plan/index.cjs +1 -1
  163. package/dist/web/health-plan/index.d.cts +16 -16
  164. package/dist/web/health-plan/index.d.ts +16 -16
  165. package/dist/web/health-plan/index.js +1 -1
  166. package/dist/web/inbox/index.d.cts +9 -8
  167. package/dist/web/inbox/index.d.ts +9 -8
  168. package/dist/web/index.cjs +191 -190
  169. package/dist/web/index.d.cts +28 -28
  170. package/dist/web/index.d.ts +28 -28
  171. package/dist/web/index.js +191 -190
  172. package/dist/web/intro/index.d.cts +8 -8
  173. package/dist/web/intro/index.d.ts +8 -8
  174. package/dist/web/notifications/index.d.cts +7 -7
  175. package/dist/web/notifications/index.d.ts +7 -7
  176. package/dist/web/records/depth/index.d.cts +10 -10
  177. package/dist/web/records/depth/index.d.ts +10 -10
  178. package/dist/web/records/index.d.cts +13 -13
  179. package/dist/web/records/index.d.ts +13 -13
  180. package/dist/web/records-sheet/index.cjs +1 -1
  181. package/dist/web/records-sheet/index.js +1 -1
  182. package/dist/web/shop/index.cjs +1 -1
  183. package/dist/web/shop/index.d.cts +3 -3
  184. package/dist/web/shop/index.d.ts +3 -3
  185. package/dist/web/shop/index.js +1 -1
  186. package/dist/web/televet/booking/index.cjs +12 -13
  187. package/dist/web/televet/booking/index.d.cts +9 -9
  188. package/dist/web/televet/booking/index.d.ts +9 -9
  189. package/dist/web/televet/booking/index.js +12 -13
  190. package/dist/web/televet/call/index.cjs +1 -1
  191. package/dist/web/televet/call/index.d.cts +2 -2
  192. package/dist/web/televet/call/index.d.ts +2 -2
  193. package/dist/web/televet/call/index.js +1 -1
  194. package/dist/web/texting/index.d.cts +6 -6
  195. package/dist/web/texting/index.d.ts +6 -6
  196. package/dist/web/ui/index.cjs +1 -1
  197. package/dist/web/ui/index.js +13 -13
  198. package/package.json +1 -32
  199. package/dist/ErrorPolicyPort.d-68yrE3BE.d.ts +0 -23
  200. package/dist/ErrorPolicyPort.d-DirW9hgO.d.cts +0 -23
@@ -1,52 +1,52 @@
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
- import{EverfurChat as e,useEverfurUnread,EverfurPoweredBy as t}from"@everfur/sdk/chat";import{useHealthPlanPage,HealthPlanScrollScope as n,EverfurHealthPlan as r,useEverfurHealthPlan}from"@everfur/sdk/health-plan";import{useEverfurRecordsClinic,EverfurRecords as o,EverfurRecordsConsent as i,useEverfurRecords}from"@everfur/sdk/records";import{createContext,forwardRef as a,createElement as l,useRef as s,useState as d,useMemo as c,useEffect as u,useCallback as p,useContext as f,useLayoutEffect as h,useSyncExternalStore as g}from"react";import{TextInput as b,StyleSheet as m,View as y,Pressable as v,Easing as k,Platform as w,Text as _,Image as S,Animated as x,PanResponder as C,Modal as F,KeyboardAvoidingView as R,ScrollView as A,Dimensions as I,AccessibilityInfo as T,AppState as E,useWindowDimensions as D,ActivityIndicator as O}from"react-native";import{jsx as z,jsxs as P,Fragment as B}from"react/jsx-runtime";import{EverfurInboxBell as N,EverfurInboxSheet as $}from"@everfur/sdk/notifications/inbox";import{useVetVisit}from"@everfur/sdk/televet";var L=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),j=globalThis;function W(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var U=j[L],V=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),M=W(U)?U:j[L]=V(),q=M.landed,H=M.noVet,K=M.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...q])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return q.add(e),()=>{q.delete(e)}}function setHealthPlanNoVet(petRef,e){if((K.get(petRef)??false)!==e){e?K.set(petRef,true):K.delete(petRef);for(let t of[...H])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return K.get(petRef)??false}function onHealthPlanNoVet(e){return H.add(e),()=>{H.delete(e)}}var Y=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],G=/* @__PURE__ */Object.freeze(Y.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(G.map(e=>e.wireCode));var J=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),Q=/* @__PURE__ */Object.freeze(G.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:J[e.wireCode]}))),Z=new Map(Q.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),X=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(Q.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...X]){let t=Z.get(e+n);if(t)return t}}var ee=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return ee[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var te=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return te.has(e)}var ne=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||ne.has(e)}var re=500,oe=8e3,ie=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(re*2**n,oe);return Math.floor(t()*r)}var ae="This feature isn't available on your account right now.",le="Something in that request was not right. Check the details and try again.",se=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ae,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:le,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ae,runtimeDisposed:le,unknown:"Something went wrong. Please try again."}),de="This session has ended. Please sign in again.",ce="linked_account_read_only";function ue(e,t,n){return e==="conflict"&&n===ce?ae:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?de:userFacingError(e)}function userFacingError(e){return se[e]}function pe(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var fe=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ce,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:ue(e,t?.wireCode,r?ce:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&fe.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&pe(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&pe(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
2
+ import{EverfurChat as e,useEverfurUnread,EverfurPoweredBy as t}from"@everfur/sdk/chat";import{useHealthPlanPage,HealthPlanScrollScope as n,EverfurHealthPlan as r,useEverfurHealthPlan}from"@everfur/sdk/health-plan";import{useEverfurRecordsClinic,EverfurRecords as o,EverfurRecordsConsent as i,useEverfurRecords}from"@everfur/sdk/records";import{createContext,forwardRef as a,createElement as l,useRef as s,useState as d,useMemo as c,useEffect as u,useCallback as p,useContext as f,useLayoutEffect as h,useSyncExternalStore as g}from"react";import{TextInput as b,StyleSheet as m,View as y,Pressable as v,Easing as k,Platform as w,Text as _,Image as S,Animated as x,PanResponder as C,Modal as R,KeyboardAvoidingView as F,ScrollView as A,Dimensions as I,AccessibilityInfo as T,AppState as E,useWindowDimensions as D,ActivityIndicator as O}from"react-native";import{jsx as z,jsxs as P,Fragment as B}from"react/jsx-runtime";import{EverfurInboxBell as N,EverfurInboxSheet as $}from"@everfur/sdk/notifications/inbox";import{useVetVisit}from"@everfur/sdk/televet";var L=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),j=globalThis;function W(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var U=j[L],V=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),M=W(U)?U:j[L]=V(),q=M.landed,H=M.noVet,K=M.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...q])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return q.add(e),()=>{q.delete(e)}}function setHealthPlanNoVet(petRef,e){if((K.get(petRef)??false)!==e){e?K.set(petRef,true):K.delete(petRef);for(let t of[...H])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return K.get(petRef)??false}function onHealthPlanNoVet(e){return H.add(e),()=>{H.delete(e)}}var Y=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],G=/* @__PURE__ */Object.freeze(Y.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(G.map(e=>e.wireCode));var J=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),Q=/* @__PURE__ */Object.freeze(G.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:J[e.wireCode]}))),Z=new Map(Q.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),X=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(Q.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...X]){let t=Z.get(e+n);if(t)return t}}var ee=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return ee[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var te=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return te.has(e)}var ne=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||ne.has(e)}var re=500,oe=8e3,ie=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(re*2**n,oe);return Math.floor(t()*r)}var ae="This feature isn't available on your account right now.",le="Something in that request was not right. Check the details and try again.",se=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ae,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:le,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ae,runtimeDisposed:le,unknown:"Something went wrong. Please try again."}),de="This session has ended. Please sign in again.",ce="linked_account_read_only";function ue(e,t,n){return e==="conflict"&&n===ce?ae:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?de:userFacingError(e)}function userFacingError(e){return se[e]}function pe(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var fe=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ce,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:ue(e,t?.wireCode,r?ce:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&fe.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&pe(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&pe(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
3
3
  return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,error:e})}var he=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function errorFrame(e){/* @__PURE__ */
5
- return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var ge="x-everfur-anon-token",be="anonTokenInvalid";async function me(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function ye(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[ge]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...ve(e.headers),...authHeaders(t)}}}function ve(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===ge||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await me(t),r=await t.transport.request(withAuthHeaders(e,ke(t,n)));if(r.ok||_e(r.error.raw)!==be||t.anonIdentity===void 0||t.userRef!==null)return r;let o=await t.anonIdentity.token({forceRefresh:true});return o===null||o===n?r:t.transport.request(withAuthHeaders(e,ke(t,o)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(ye(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let o;try{o=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(ye(e,{wireCode:_e(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:o,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(we(i.error))):i}function ke(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function we(e){let t=e.raw,n=_e(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function _e(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Se(e)})}function Se(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var xe=3e4,Ce=oe*2,Fe="idempotency-key",Re=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Ae=/* @__PURE__ */Object.freeze({onEvent(){}}),Ie=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function Te(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??Ae,n=e.timers??Ie,r=e.rng??Math.random,o=e.sleep??((e,t)=>He(e,n,t)),i=e.maxAttempts??ie,a=e.unaryTimeoutMs??xe,l=e.newIdempotencyKey??De(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,c){let u=c?.maxAttempts,p=Math.max(1,u??i),f=c?.idempotent??Re.has(d.method),h=c?.idempotencyKey===void 0?null:Te(c.idempotencyKey),g=f?h??l():null,b=Ee(d,g),m=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:m,...g?{idempotencyKey:g}:{},...e});s(i({phase:"attempt"}));let l=Me(a,n),c=qe(l.signal,d.signal),f;try{f=await authedSend({...b,signal:c.signal},e.auth)}catch(e){f=err(networkError(e))}finally{c.dispose(),l.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=ze(h,m,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await o(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);m+=1}}async function c(t){return withAuthHeaders(t,await Ve(e.auth))}async function*u(t,n,r){s(
5
+ return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var ge="x-everfur-anon-token",be="anonTokenInvalid";async function me(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function ye(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[ge]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...ve(e.headers),...authHeaders(t)}}}function ve(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===ge||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await me(t),r=await t.transport.request(withAuthHeaders(e,ke(t,n)));if(r.ok||_e(r.error.raw)!==be||t.anonIdentity===void 0||t.userRef!==null)return r;let o=await t.anonIdentity.token({forceRefresh:true});return o===null||o===n?r:t.transport.request(withAuthHeaders(e,ke(t,o)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(ye(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let o;try{o=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(ye(e,{wireCode:_e(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:o,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(we(i.error))):i}function ke(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function we(e){let t=e.raw,n=_e(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function _e(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Se(e)})}function Se(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var xe=3e4,Ce=oe*2,Re="idempotency-key",Fe=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Ae=/* @__PURE__ */Object.freeze({onEvent(){}}),Ie=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function Te(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??Ae,n=e.timers??Ie,r=e.rng??Math.random,o=e.sleep??((e,t)=>He(e,n,t)),i=e.maxAttempts??ie,a=e.unaryTimeoutMs??xe,l=e.newIdempotencyKey??De(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,c){let u=c?.maxAttempts,p=Math.max(1,u??i),f=c?.idempotent??Fe.has(d.method),h=c?.idempotencyKey===void 0?null:Te(c.idempotencyKey),g=f?h??l():null,b=Ee(d,g),m=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:m,...g?{idempotencyKey:g}:{},...e});s(i({phase:"attempt"}));let l=Me(a,n),c=qe(l.signal,d.signal),f;try{f=await authedSend({...b,signal:c.signal},e.auth)}catch(e){f=err(networkError(e))}finally{c.dispose(),l.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=ze(h,m,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await o(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);m+=1}}async function c(t){return withAuthHeaders(t,await Ve(e.auth))}async function*u(t,n,r){s(
6
6
  /* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:n.method,path:n.path,attempt:0}));try{yield*e.auth.transport.stream(n,r)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
7
- return Object.freeze({send:d,authorize:c,stream:u})}function Ee(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Fe&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function De(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var Oe=10;function ze(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=Pe(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(Oe,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=Be(e,n.now);return l!==null?l>Ce?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function Pe(e){let t=e.code==="unknown"?fromWire(We(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function Be(e,t){let n=$e(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=Ne(e.raw);return r===null?null:Math.round(r*1e3)}function Ne(e){for(let t of Le(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function $e(e){for(let t of Le(e)){let e=t.resets_at,n=je(e);if(n!==null)return n}return null}function Le(e){if(!Ue(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Ue(r)&&t.push(r)}return t}function je(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function We(e){for(let t of Le(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Ue(e){return typeof e=="object"&&e!==null}async function Ve(e){if(e.mode==="anonymous"){let t=await me(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Me(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function qe(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function He(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var Ke="/widget/v1/me/intro";function Ye(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function Ge(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function Je(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function Qe(e){let t=()=>{let{services:t}=e.registry;return Ze({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(Ye(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function Ze(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=Je(o.value);return i===null?err(Ge(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:Ke,signal:e.signal}:{method:"GET",path:Ke};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:Ke,body:{seen:true}})}}}var Xe="everfur.intro.seen.v1:",et=userRef=>`${Xe}${userRef}`;async function tt(e,userRef){try{return await e.getItem(et(userRef))!==null}catch{return false}}async function nt(e,userRef,t){try{await e.setItem(et(userRef),t)}catch{}}async function rt(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await tt(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await nt(n,userRef,o.value.seenAt),false):true}async function ot(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await nt(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var it=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),at=globalThis,lt=at[it]??(at[it]=createContext(null));lt.displayName??="EverfurContext";function st(){let e=f(lt);if(e===null)throw new he("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var dt=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${dt(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var ct=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var ut=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?ut[e]??null:null}var pt=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${pt(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var ft=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),ht=globalThis;function gt(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var bt=ht[ft],mt=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),yt=gt(bt)?bt:ht[ft]=mt();function vt(){for(let e of[...yt.listeners])try{e()}catch{}}function kt(){let e={};return yt.holds.add(e),yt.holds.size===1&&vt(),()=>{yt.holds.delete(e)&&yt.holds.size===0&&vt()}}function wt(e){u(()=>e?kt():void 0,[e])}function _t(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var St=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var xt=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
7
+ return Object.freeze({send:d,authorize:c,stream:u})}function Ee(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Re&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function De(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var Oe=10;function ze(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=Pe(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(Oe,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=Be(e,n.now);return l!==null?l>Ce?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function Pe(e){let t=e.code==="unknown"?fromWire(We(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function Be(e,t){let n=$e(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=Ne(e.raw);return r===null?null:Math.round(r*1e3)}function Ne(e){for(let t of Le(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function $e(e){for(let t of Le(e)){let e=t.resets_at,n=je(e);if(n!==null)return n}return null}function Le(e){if(!Ue(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Ue(r)&&t.push(r)}return t}function je(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function We(e){for(let t of Le(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Ue(e){return typeof e=="object"&&e!==null}async function Ve(e){if(e.mode==="anonymous"){let t=await me(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Me(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function qe(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function He(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var Ke="/widget/v1/me/intro";function Ye(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function Ge(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function Je(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function Qe(e){let t=()=>{let{services:t}=e.registry;return Ze({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(Ye(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function Ze(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=Je(o.value);return i===null?err(Ge(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:Ke,signal:e.signal}:{method:"GET",path:Ke};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:Ke,body:{seen:true}})}}}var Xe="everfur.intro.seen.v1:",et=userRef=>`${Xe}${userRef}`;async function tt(e,userRef){try{return await e.getItem(et(userRef))!==null}catch{return false}}async function nt(e,userRef,t){try{await e.setItem(et(userRef),t)}catch{}}async function rt(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await tt(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await nt(n,userRef,o.value.seenAt),false):true}async function ot(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await nt(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var it=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),at=globalThis,lt=at[it]??(at[it]=createContext(null));lt.displayName??="EverfurContext";function st(){let e=f(lt);if(e===null)throw new he("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var dt=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${dt(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var ct=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var ut=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?ut[e]??null:null}var pt=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${pt(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var ft=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),ht=globalThis;function gt(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var bt=ht[ft],mt=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),yt=gt(bt)?bt:ht[ft]=mt();function vt(){for(let e of[...yt.listeners])try{e()}catch{}}function kt(){let e={};return yt.holds.add(e),yt.holds.size===1&&vt(),()=>{yt.holds.delete(e)&&yt.holds.size===0&&vt()}}function wt(e){u(()=>e?kt():void 0,[e])}function _t(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var St=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var xt=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
8
8
  return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:t});case"pet":return e.eventType==="chat.reminder_due"?/* @__PURE__ */Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:/* @__PURE__ */Object.freeze({kind:"chat",petRef:t.petRef,conversationId:null})}):e.eventType.startsWith("care.")?null:/* @__PURE__ */Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"tip":/* @__PURE__ */
9
9
  return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:null});case"record_request":/* @__PURE__ */
10
10
  return Object.freeze({surface:"records",petRef:t.petRef,requestId:t.requestId});case"records":case"vaccine":case"labs":/* @__PURE__ */
11
11
  return Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"visit":/* @__PURE__ */
12
12
  return Object.freeze({surface:"visit",visitRef:t.visitRef,intent:t.intent,petRef:t.petRef});case"health_plan":/* @__PURE__ */
13
- return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Ct(e,t,n){let r=new Date(e),o=r.getTime();if(Number.isNaN(o))return null;let i=t-o;if(i<6e4)return n;if(i<36e5)return`${Math.floor(i/6e4)}m`;if(i<864e5)return`${Math.floor(i/36e5)}h`;if(i<6048e5)return`${Math.floor(i/864e5)}d`;if(i<5*6048e5)return`${Math.floor(i/6048e5)}w`;let a=r.getFullYear()===new Date(t).getFullYear();try{return r.toLocaleDateString("en-US",{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}catch{return r.toISOString().slice(0,10)}}function Ft(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Rt(e,t,n){let r=e.notification===null?null:surfaceForNotification(e.notification);if(r?.surface==="health_plan")return{tab:"plan"};if(r?.surface==="records")return{tab:"records"};if(r?.surface==="visit")return null;let{item:o}=e;if(o.title.trim()==="")return null;let i=Ct(o.createdAt,n,t.now),a=i!==null&&Ft(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}/,"").replace("{time}",""):t.kicker.replace("{time}",a);return{tab:"ask",prompt:o.title,card:{kicker:l,title:o.title,...o.body.trim()===""?{}:{body:o.body}}}}var At=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function It(){let e=globalThis,t=e[At];if(t!==void 0)return t;let n={factory:createContext(null),home:createContext(null)};return e[At]=n,n}var Tt=It().factory;It().home;var Et=()=>{};function Dt(){try{return E.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let t;try{let n=E.currentState==="background";t=E.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return Et}return()=>t.remove()},isVisible:Dt}}var Ot=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatPaneShown");function zt(){let e=globalThis,t=e[Ot];if(t!==void 0)return t;let n=createContext(true);return e[Ot]=n,n}var Pt=zt();function Bt(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}var Nt=/* @__PURE__ */Object.freeze({ask:"Ask",plan:"Health Plan",records:"Records",listAll:"Ask, Health Plan and Records",listNoPlan:"Ask and Records"}),$t=/* @__PURE__ */Object.freeze(["ask","plan","records"]),Lt=/* @__PURE__ */Object.freeze(["ask","records"]);function jt(e){return e?Lt:$t}function Wt(e,t){return e==="plan"&&t?"ask":e}function Ut(e,t){return e.via==="link"?Wt(e.ask!==void 0?"ask":e.tab,t):Wt("plan",t)}function Vt(e){let t=e.key===void 0?"":String(e.key);return e.via==="link"?`link:${e.tab}:${e.ask?.prompt??""}:${t}`:`plain:${t}`}var Mt=6e4;function qt(e,t,n=Mt){return e!==null&&t-e>=n}function Ht(e){return e.pageVisible&&e.watching&&qt(e.lastReadAt,e.now)}function Kt(e){return JSON.stringify(e,(e,t)=>{if(t===null||typeof t!="object"||Array.isArray(t))return t;let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n})}function Yt(e){if(e===null)return"";let t=e.items.map(e=>[e.productId,e.partnerSku,e.title,e.description,e.category,e.price,e.currency,e.imageUrl,e.url,e.sample]).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);return JSON.stringify([e.headline,t])}function Gt(e){return e===null?"":Kt([e.checkout,e.page])}function Jt(e,t){return JSON.stringify([Yt(e),Gt(t)])}function Qt(e,t){return e!=="empty"&&e!=="ready"?false:t==="ready"||t==="failed"||t==="idle"}function Zt(e,t){return e==="empty"&&!Bt(t?.page)}function Xt(e,t){return e===void 0?{empty:t.empty,signature:t.signature,epoch:0}:e.empty===t.empty&&e.signature===t.signature?e:{empty:t.empty,signature:t.signature,epoch:e.signature===t.signature?e.epoch:e.epoch+1}}var en=5e3;function tn(e){return e.sameOpen?e.plan===void 0?e.planFailed?"drop":"wait":e.plan.empty?"drop":e.recordsPending?"wait":"play":"drop"}function nn(){let e=/* @__PURE__ */new Set;return{listen(t){let n=()=>t();return e.add(n),()=>{e.delete(n)}},fire(){for(let t of[...e])try{t()}catch{}}}}function rn(e,t){return{...{onForeground(n){let r=e.onForeground(n),o=t.listen(n);return()=>{o(),r()}}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function on(e,t){return{...{onForeground(n){return e.onForeground(()=>{t()&&n()})}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function an(e,t){return!e&&t}var ln=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return ln[e]}function decideCapability(e,t,n){let r=requires(e),o=/* @__PURE__ */new Map;for(let e of t)o.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!o.has(e)))return cn({name:e,enabled:false,isPending:true,limits:{}});let i=sn(r,o);return r.filter(e=>o.get(e)?.granted!==true).length===0?cn({name:e,enabled:true,isPending:false,limits:i}):cn({name:e,enabled:false,isPending:false,limits:i,disabled:dn(r,o)})}function sn(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function dn(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
13
+ return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Ct(e,t,n){let r=new Date(e),o=r.getTime();if(Number.isNaN(o))return null;let i=t-o;if(i<6e4)return n;if(i<36e5)return`${Math.floor(i/6e4)}m`;if(i<864e5)return`${Math.floor(i/36e5)}h`;if(i<6048e5)return`${Math.floor(i/864e5)}d`;if(i<5*6048e5)return`${Math.floor(i/6048e5)}w`;let a=r.getFullYear()===new Date(t).getFullYear();try{return r.toLocaleDateString("en-US",{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}catch{return r.toISOString().slice(0,10)}}function Rt(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Ft(e,t,n){let r=e.notification===null?null:surfaceForNotification(e.notification);if(r?.surface==="health_plan")return{tab:"plan"};if(r?.surface==="records")return{tab:"records"};if(r?.surface==="visit")return null;let{item:o}=e;if(o.title.trim()==="")return null;let i=Ct(o.createdAt,n,t.now),a=i!==null&&Rt(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}/g,"").replace(/\{time\}/g,""):t.kicker.replace(/\{time\}/g,a);return{tab:"ask",prompt:o.title,card:{kicker:l,title:o.title,...o.body.trim()===""?{}:{body:o.body}}}}var At="your pet";var It=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function Tt(){let e=globalThis,t=e[It];if(t!==void 0)return t;let n={factory:createContext(null),home:createContext(null)};return e[It]=n,n}var Et=Tt().factory;Tt().home;var Dt=()=>{};function Ot(){try{return E.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let t;try{let n=E.currentState==="background";t=E.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return Dt}return()=>t.remove()},isVisible:Ot}}var zt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatPaneShown");function Pt(){let e=globalThis,t=e[zt];if(t!==void 0)return t;let n=createContext(true);return e[zt]=n,n}var Bt=Pt();function Nt(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}var $t=/* @__PURE__ */Object.freeze({ask:"Ask",plan:"Health Plan",records:"Records",listAll:"Ask, Health Plan and Records",listNoPlan:"Ask and Records"}),Lt=/* @__PURE__ */Object.freeze(["ask","plan","records"]),jt=/* @__PURE__ */Object.freeze(["ask","records"]);function Wt(e){return e?jt:Lt}function Ut(e,t){return e==="plan"&&t?"ask":e}function Vt(e,t){return e.via==="link"?Ut(e.ask!==void 0?"ask":e.tab,t):Ut("plan",t)}function Mt(e){let t=e.key===void 0?"":String(e.key);return e.via==="link"?`link:${e.tab}:${e.ask?.prompt??""}:${t}`:`plain:${t}`}var qt=6e4;function Ht(e,t,n=qt){return e!==null&&t-e>=n}function Kt(e){return e.pageVisible&&e.watching&&Ht(e.lastReadAt,e.now)}function Yt(e){return JSON.stringify(e,(e,t)=>{if(t===null||typeof t!="object"||Array.isArray(t))return t;let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n})}function Gt(e){if(e===null)return"";let t=e.items.map(e=>[e.productId,e.partnerSku,e.title,e.description,e.category,e.price,e.currency,e.imageUrl,e.url,e.sample]).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);return JSON.stringify([e.headline,t])}function Jt(e){return e===null?"":Yt([e.checkout,e.page])}function Qt(e,t){return JSON.stringify([Gt(e),Jt(t)])}function Zt(e,t){return e!=="empty"&&e!=="ready"?false:t==="ready"||t==="failed"||t==="idle"}function Xt(e,t){return e==="empty"&&!Nt(t?.page)}function en(e,t){return e===void 0?{empty:t.empty,signature:t.signature,epoch:0}:e.empty===t.empty&&e.signature===t.signature?e:{empty:t.empty,signature:t.signature,epoch:e.signature===t.signature?e.epoch:e.epoch+1}}var tn=5e3;function nn(e){return e.sameOpen?e.plan===void 0?e.planFailed?"drop":"wait":e.plan.empty?"drop":e.recordsPending?"wait":"play":"drop"}function rn(){let e=/* @__PURE__ */new Set;return{listen(t){let n=()=>t();return e.add(n),()=>{e.delete(n)}},fire(){for(let t of[...e])try{t()}catch{}}}}function on(e,t){return{...{onForeground(n){let r=e.onForeground(n),o=t.listen(n);return()=>{o(),r()}}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function an(e,t){return{...{onForeground(n){return e.onForeground(()=>{t()&&n()})}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function ln(e,t){return!e&&t}var sn=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return sn[e]}function decideCapability(e,t,n){let r=requires(e),o=/* @__PURE__ */new Map;for(let e of t)o.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!o.has(e)))return un({name:e,enabled:false,isPending:true,limits:{}});let i=dn(r,o);return r.filter(e=>o.get(e)?.granted!==true).length===0?un({name:e,enabled:true,isPending:false,limits:i}):un({name:e,enabled:false,isPending:false,limits:i,disabled:cn(r,o)})}function dn(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function cn(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
14
14
  return Object.freeze({reason:e.reason,level:e.level,recoverable:e.recoverable})}/* @__PURE__ */
15
- return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function cn(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function un(e){let{runtime:t}=st(),n=t.entitlements,r=p(e=>n===void 0?()=>{}:n.subscribe(e),[n]),o=p(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return g(r,o,o)}var pn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[pn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[pn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function fn(e){return e<=450?"regular":e<=650?"medium":"bold"}var hn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=gn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,gn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=bn(e,t);return n.set(t,o),o}var gn=/* @__PURE__ */new WeakMap;function bn(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=fn(Number(r)),i=n.face==="mono"?face(e,hn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var mn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var yn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){yn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var vn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var kn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},wn={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},_n={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Sn={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},xn={regular:"400",medium:"500",bold:"700"},Cn={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Fn=0,Rn="System",An="monospace",In=["content","heading","control","compact","badge"];function Tn(e){let t={};for(let n of In)t[n]=e;return t}var En=[];function Dn(){return{family:Rn,mono:An,fontUrl:null,families:{regular:Rn,medium:Rn,bold:Rn,mono:An,monoMedium:An,monoBold:An},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:_n,tierSizes:Tn(_n),lineHeight:Sn,weight:xn,letterSpacing:Cn,scale:1,maxScale:Fn,scaleCaps:vn,headingFamily:null,headingWeight:null,fontSources:En,roles:mn,typeScale:1}}var On={},zn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var Pn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(zn.standard),emphasized:cssCubicBezier(zn.emphasized),exit:cssCubicBezier(zn.exit)},reducedMotion:false},Bn={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},Nn=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Bn,space:kn,radius:wn,type:Dn(),motion:Pn,slots:On}),$n={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:$n,space:kn,radius:wn,type:Dn(),motion:Pn,slots:On});var Ln=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),jn=globalThis,Wn=jn[Ln]??(jn[Ln]=createContext(Nn));Wn.displayName??="EverfurThemeContext";function useEverfurTheme(){return f(Wn)}function Un(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),o=t===void 0?void 0:r.type.roles[t],i=Un(r.type,e??o?.tier??"content"),a=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return l(_,i===void 0?a:{maxFontSizeMultiplier:i,...a})}var Vn=a(function(e,t){return l(b,{...e,...t===null?{}:{ref:t}})});function parseColor(e){let t=Mn(e);return t===null?null:Qn(t)}function Mn(e){if(typeof e=="number")return Kn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return qn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return qn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return Hn(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=qn(t);if(e!==null)return e}return/^\d+$/.test(t)?Kn(Number.parseInt(t,10)):null}function qn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:Gn(t[0]),g:Gn(t[1]),b:Gn(t[2]),a:1};if(t.length===6)return{r:Yn(t,0),g:Yn(t,2),b:Yn(t,4),a:1};if(t.length===8){let e=Yn(t,0);return{r:Yn(t,2),g:Yn(t,4),b:Yn(t,6),a:e/255}}return null}function Hn(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=Jn(Number(r[0])),i=Jn(Number(r[1])),a=Jn(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function Kn(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function Yn(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Gn(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Jn(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Qn(e){if(e.a>=1)return Zn(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function Zn(e,t,n){return`#${Xn(e)}${Xn(t)}${Xn(n)}`.toUpperCase()}function Xn(e){return e.toString(16).padStart(2,"0")}var er="#111111",tr="#FFFFFF",nr="#000000";function readableOn(e){let t=Mn(e);if(t===null)return tr;let n=ir(t),r=ir({r:17,g:17,b:17}),o=ir({r:255,g:255,b:255});return lr(n,o)>=lr(n,r)?tr:er}function rr(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(tr,e)>=contrastRatio(nr,e)?tr:nr}function or(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(tr)>=t(nr)?tr:nr}function ir(e){let t=ar(e.r/255),n=ar(e.g/255),r=ar(e.b/255);return.2126*t+.7152*n+.0722*r}function ar(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lr(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=Mn(e),r=Mn(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:sr(n,o);return lr(ir(i),ir(o))}function sr(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function dr(e,t){let n=Mn(e),r=Mn(t);if(n===null||r===null)return null;let o=n.a>=1?n:sr(n,{...r});return Zn(o.r,o.g,o.b)}function cr(e,t){let n=Mn(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var ur=.05;function pr(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(Mn(e)===null)return n;if(i(e))return e;let a=dr(e,o),l=a===null?null:Mn(a),s=Mn(n);if(l===null||s===null)return n;for(let e=1;e<1/ur;e+=1){let t=e*ur,n=(e,n)=>Math.round(e+(n-e)*t),r=Zn(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var fr=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),hr=/* @__PURE__ */new WeakMap;function gr(e){let t=hr.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...fr},i=(e,t)=>pr(e,t,or(t),br),a=(e,t)=>contrastRatio(e,t)>=br?e:rr(t,br),l=[o.card,o.paper].map(e=>dr(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return hr.set(e,d),d}var br=4.5;function mr(e,t){for(let n of t)if(contrastRatio(n,e)>=br)return n;return rr(e,br)}function yr(e,t,n){let r=cr(e,t);return(r===null?null:dr(r,n))??n}function vr(e){let t=gr(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:mr(t.accent,[t.ink,t.onAccent]),accent2:yr(t.accent,.75,r),accent4:yr(t.accent,.17,r),accentChip:yr(t.accent,.47,r),link:t.link,linkChip:yr(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var kr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),wr=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),_r=["paddingTop","paddingRight","paddingBottom","paddingLeft"],Sr=17,xr=1.5,Cr=400,Fr=700;function Rr(e){return e<=450?"regular":e<=650?"medium":"bold"}function Ar(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Ir(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Ar(n)}}let r=t==="$serif"?headingFace(e,Rr(n)):face(e,Rr(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Ar(n)}}function Tr(e,t,n={}){let r=vr(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))kr.has(e)||wr.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of _r){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:Sr,d=typeof a.lh=="number"?a.lh:xr,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Ir(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(Cr,e),strong:(...e)=>p(Fr,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var Er={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Dr=16;var Or=4e3,zr=.5;function Pr(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function Br(e,t,n){if(e.length===0)return n;let r=Pr(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=zr*e.length+1;for(let a of o)if(Pr(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=c(()=>e.split(/\s+/).filter(e=>e!==""),[e]),o=m.flatten(t),i=[e,o.fontFamily,o.fontSize,o.fontWeight,o.letterSpacing].join("|"),a=s({key:"",ch:null,line:null,words:[]});a.current.key!==i&&(a.current={key:i,ch:null,line:null,words:r.map(()=>null)});let[l,u]=d(null),p=l!==null&&l.key===i?l.value:null,f=()=>{let e=a.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=Br(t,o,(e.ch+zr)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{a.current.key===i&&(e(a.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
16
- return P(y,{style:Nr.wrap,children:[
15
+ return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function un(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function pn(e){let{runtime:t}=st(),n=t.entitlements,r=p(e=>n===void 0?()=>{}:n.subscribe(e),[n]),o=p(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return g(r,o,o)}var fn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[fn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[fn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function hn(e){return e<=450?"regular":e<=650?"medium":"bold"}var gn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=bn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,bn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=mn(e,t);return n.set(t,o),o}var bn=/* @__PURE__ */new WeakMap;function mn(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=hn(Number(r)),i=n.face==="mono"?face(e,gn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var yn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var vn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){vn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var kn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var wn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},_n={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Sn={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},xn={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Cn={regular:"400",medium:"500",bold:"700"},Rn={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Fn=0,An="System",In="monospace",Tn=["content","heading","control","compact","badge"];function En(e){let t={};for(let n of Tn)t[n]=e;return t}var Dn=[];function On(){return{family:An,mono:In,fontUrl:null,families:{regular:An,medium:An,bold:An,mono:In,monoMedium:In,monoBold:In},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Sn,tierSizes:En(Sn),lineHeight:xn,weight:Cn,letterSpacing:Rn,scale:1,maxScale:Fn,scaleCaps:kn,headingFamily:null,headingWeight:null,fontSources:Dn,roles:yn,typeScale:1}}var zn={},Pn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var Bn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(Pn.standard),emphasized:cssCubicBezier(Pn.emphasized),exit:cssCubicBezier(Pn.exit)},reducedMotion:false},Nn={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},$n=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Nn,space:wn,radius:_n,type:On(),motion:Bn,slots:zn}),Ln={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Ln,space:wn,radius:_n,type:On(),motion:Bn,slots:zn});var jn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Wn=globalThis,Un=Wn[jn]??(Wn[jn]=createContext($n));Un.displayName??="EverfurThemeContext";function useEverfurTheme(){return f(Un)}function Vn(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),o=t===void 0?void 0:r.type.roles[t],i=Vn(r.type,e??o?.tier??"content"),a=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return l(_,i===void 0?a:{maxFontSizeMultiplier:i,...a})}var Mn=a(function(e,t){return l(b,{...e,...t===null?{}:{ref:t}})});function parseColor(e){let t=qn(e);return t===null?null:Zn(t)}function qn(e){if(typeof e=="number")return Yn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return Hn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return Hn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return Kn(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=Hn(t);if(e!==null)return e}return/^\d+$/.test(t)?Yn(Number.parseInt(t,10)):null}function Hn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:Jn(t[0]),g:Jn(t[1]),b:Jn(t[2]),a:1};if(t.length===6)return{r:Gn(t,0),g:Gn(t,2),b:Gn(t,4),a:1};if(t.length===8){let e=Gn(t,0);return{r:Gn(t,2),g:Gn(t,4),b:Gn(t,6),a:e/255}}return null}function Kn(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=Qn(Number(r[0])),i=Qn(Number(r[1])),a=Qn(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function Yn(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function Gn(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Jn(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Qn(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Zn(e){if(e.a>=1)return Xn(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function Xn(e,t,n){return`#${er(e)}${er(t)}${er(n)}`.toUpperCase()}function er(e){return e.toString(16).padStart(2,"0")}var tr="#111111",nr="#FFFFFF",rr="#000000";function readableOn(e){let t=qn(e);if(t===null)return nr;let n=ar(t),r=ar({r:17,g:17,b:17}),o=ar({r:255,g:255,b:255});return sr(n,o)>=sr(n,r)?nr:tr}function or(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(nr,e)>=contrastRatio(rr,e)?nr:rr}function ir(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(nr)>=t(rr)?nr:rr}function ar(e){let t=lr(e.r/255),n=lr(e.g/255),r=lr(e.b/255);return.2126*t+.7152*n+.0722*r}function lr(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function sr(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=qn(e),r=qn(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:dr(n,o);return sr(ar(i),ar(o))}function dr(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function cr(e,t){let n=qn(e),r=qn(t);if(n===null||r===null)return null;let o=n.a>=1?n:dr(n,{...r});return Xn(o.r,o.g,o.b)}function ur(e,t){let n=qn(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var pr=.05;function fr(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(qn(e)===null)return n;if(i(e))return e;let a=cr(e,o),l=a===null?null:qn(a),s=qn(n);if(l===null||s===null)return n;for(let e=1;e<1/pr;e+=1){let t=e*pr,n=(e,n)=>Math.round(e+(n-e)*t),r=Xn(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var hr=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),gr=/* @__PURE__ */new WeakMap;function br(e){let t=gr.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...hr},i=(e,t)=>fr(e,t,ir(t),mr),a=(e,t)=>contrastRatio(e,t)>=mr?e:or(t,mr),l=[o.card,o.paper].map(e=>cr(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return gr.set(e,d),d}var mr=4.5;function yr(e,t){for(let n of t)if(contrastRatio(n,e)>=mr)return n;return or(e,mr)}function vr(e,t,n){let r=ur(e,t);return(r===null?null:cr(r,n))??n}function kr(e){let t=br(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:yr(t.accent,[t.ink,t.onAccent]),accent2:vr(t.accent,.75,r),accent4:vr(t.accent,.17,r),accentChip:vr(t.accent,.47,r),link:t.link,linkChip:vr(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var wr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),_r=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),Sr=["paddingTop","paddingRight","paddingBottom","paddingLeft"],xr=17,Cr=1.5,Rr=400,Fr=700;function Ar(e){return e<=450?"regular":e<=650?"medium":"bold"}function Ir(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Tr(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Ir(n)}}let r=t==="$serif"?headingFace(e,Ar(n)):face(e,Ar(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Ir(n)}}function Er(e,t,n={}){let r=kr(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))wr.has(e)||_r.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of Sr){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:xr,d=typeof a.lh=="number"?a.lh:Cr,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Tr(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(Rr,e),strong:(...e)=>p(Fr,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var Dr={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Or=16;var zr=4e3,Pr=.5;function Br(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function Nr(e,t,n){if(e.length===0)return n;let r=Br(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=Pr*e.length+1;for(let a of o)if(Br(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=c(()=>e.split(/\s+/).filter(e=>e!==""),[e]),o=m.flatten(t),i=[e,o.fontFamily,o.fontSize,o.fontWeight,o.letterSpacing].join("|"),a=s({key:"",ch:null,line:null,words:[]});a.current.key!==i&&(a.current={key:i,ch:null,line:null,words:r.map(()=>null)});let[l,u]=d(null),p=l!==null&&l.key===i?l.value:null,f=()=>{let e=a.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=Nr(t,o,(e.ch+Pr)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{a.current.key===i&&(e(a.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
16
+ return P(y,{style:$r.wrap,children:[
17
17
  /* @__PURE__ */z(Text,{tier:"heading",style:p===null?t:[t,{maxWidth:p}],accessibilityRole:"header",children:e}),
18
- /* @__PURE__ */z(y,{style:Nr.probeClip,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */P(y,{style:Nr.probeRow,children:[
18
+ /* @__PURE__ */z(y,{style:$r.probeClip,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */P(y,{style:$r.probeRow,children:[
19
19
  /* @__PURE__ */z(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.ch=t}),children:"0"}),
20
- /* @__PURE__ */z(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:r.join(" ")}),r.map((e,n)=>/* @__PURE__ */z(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var Nr=m.create({wrap:{alignSelf:"stretch",alignItems:"center"},probeClip:{position:"absolute",left:0,top:0,width:0,height:0,overflow:"hidden",opacity:0},probeRow:{width:Or,flexDirection:"row",alignItems:"flex-start"}});function $r(e){return{kit:Tr(e,Er),Title:BalancedTitle,titleCh:Dr}}function Lr(e){let t=e.raw;if(typeof t!="object"||t===null)return null;let n=t.code;return typeof n=="string"&&n.length>0?n:null}function jr(e,t){let n=Lr(e);if(n===null)return e;let r=t[n];return r===void 0?e:makeEverfurError(r.code,{retryable:r.retryable,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId!==void 0?{requestId:e.requestId}:{},wireCode:n,reasonCode:n,...e.wireMessage!==void 0?{wireMessage:e.wireMessage}:{},raw:e.raw})}var Wr=/* @__PURE__ */new Set(["expo","fcm","apns"]),Ur=/* @__PURE__ */new Set(["ios","android"]),Vr=4096,Mr=128,qr=64,Hr=/[\0- ]/;function Kr(e,t){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e,...t?{reasonCode:t}:{}})}function Yr(e){if(typeof e!="object"||e===null)return Kr("registerDevice needs an input object");let{token:t,provider:n,platform:r,installationId:o}=e;return typeof n!="string"||!Wr.has(n)?Kr("provider must be expo, fcm or apns"):typeof r!="string"||!Ur.has(r)?Kr("platform must be ios or android"):typeof t!="string"||t.trim().length===0||t.length>Vr||Hr.test(t)?Kr(`token must be a push token of 1..${Vr} characters with no whitespace`,"token_invalid"):o!==void 0&&(typeof o!="string"||o.length===0||o.length>Mr)?Kr(`installationId must be 1..${Mr} characters`):null}var Gr=/^[A-Za-z][A-Za-z0-9_+-]*(\/[A-Za-z0-9_+-]+){0,2}$/,Jr=64,Qr=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/,Zr=35;function Xr(e){return e.httpStatus===400&&e.code==="validationFailed"}function eo(e){let t={...e};return delete t.timezone,delete t.locale,t}function to(e,t,n){return typeof e=="string"&&e.length<=n&&t.test(e)?e:null}function no(e){return typeof e!="string"||e.length===0||e.length>qr?Kr(`deviceId must be 1..${qr} characters`):Hr.test(e)||e.includes("/")||e==="."||e===".."?Kr("deviceId is not a device id"):null}function ro(e){if(typeof e!="object"||e===null)return Kr("setPreferences needs an input object");let{pushEnabled:t,emailEnabled:n}=e;return typeof t!="boolean"||typeof n!="boolean"?Kr("pushEnabled and emailEnabled must both be booleans: the route replaces both switches"):null}function oo(e){return typeof e=="string"&&e.length>0?e:null}function io(e){if(typeof e!="object"||e===null)return null;let t=e,n=oo(t.device_id),r=oo(t.provider),o=oo(t.platform),i=oo(t.registered_at),a=oo(t.last_seen_at);if(n===null||r===null||o===null||i===null||a===null||!Wr.has(r)||!Ur.has(o))return null;let l=t.installation_id;/* @__PURE__ */
21
- return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function ao(e){if(typeof e!="object"||e===null)return null;let t=e,n=oo(t.updated_at);return typeof t.push_enabled!="boolean"||typeof t.email_enabled!="boolean"||n===null?null:/* @__PURE__ */Object.freeze({pushEnabled:t.push_enabled,emailEnabled:t.email_enabled,updatedAt:n})}function lo(e){return makeEverfurError("internalError",{retryable:false,wireMessage:`${e}: the response was not the documented shape`})}var so=/* @__PURE__ */Object.freeze({provider_unsupported:{code:"validationFailed",retryable:false},token_invalid:{code:"validationFailed",retryable:false},device_cipher_unavailable:{code:"serviceUnavailable",retryable:true}});function co(e){return jr(e,so)}function uo(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function createNotificationsClient(e){let t=()=>{let{services:t}=e.registry;return po({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{registerDevice:(n,r)=>e.isDisposed?Promise.resolve(err(uo("registerDevice"))):t().registerDevice(n,r),unregisterDevice:(n,r)=>e.isDisposed?Promise.resolve(err(uo("unregisterDevice"))):t().unregisterDevice(n,r),setPreferences:(n,r)=>e.isDisposed?Promise.resolve(err(uo("setPreferences"))):t().setPreferences(n,r)}}function po(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=(e,t)=>t?{...e,signal:t}:e;return{async registerDevice(e,r){let o=Yr(e);if(o!==null)return err(o);let i={token:e.token,provider:e.provider,platform:e.platform};e.installationId!==void 0&&(i.installation_id=e.installationId);let a=to(e.timezone,Gr,Jr);a!==null&&(i.timezone=a);let l=to(e.locale,Qr,Zr);l!==null&&(i.locale=l);let s=e=>t.send("notifications.registerDevice",n({method:"POST",path:"/widget/v1/me/devices",body:e},r?.signal)),d=await s(i);if(!d.ok&&Xr(d.error)&&(a!==null||l!==null)&&(d=await s(eo(i))),!d.ok)return err(co(d.error));let c=io(d.value);return c===null?err(lo("registerDevice")):ok(c)},async unregisterDevice(e,r){let o=no(e);if(o!==null)return err(o);let i=await t.send("notifications.unregisterDevice",n({method:"DELETE",path:`/widget/v1/me/devices/${encodeURIComponent(e)}`},r?.signal));return i.ok?ok(void 0):err(co(i.error))},async setPreferences(e,r){let o=ro(e);if(o!==null)return err(o);let i=await t.send("notifications.setPreferences",n({method:"PUT",path:"/widget/v1/me/notification-preferences",body:{push_enabled:e.pushEnabled,email_enabled:e.emailEnabled}},r?.signal));if(!i.ok)return err(co(i.error));let a=ao(i.value);return a===null?err(lo("setPreferences")):ok(a)}}}function fo(e,t){let n=`${t.key}\n${t.email}`,r=e.get(n);return r===void 0?(e.set(n,t.idempotencyKey),t):r===t.idempotencyKey?t:/* @__PURE__ */Object.freeze({...t,idempotencyKey:r})}function isIntroSwipeOut(e,t){let n=t>0?Math.abs(e)/t:0;return e>90||e>12&&n>.11}var ho=/* @__PURE__ */Object.freeze({title:"Request records",clinic:"Clinic",search:"Search clinics by name or location",placeholder:"Clinic name, city, or ZIP",email:"Clinic email",emailPlaceholder:"records@clinic.com",ownerName:"Your full name",scopeHeading:"What you’re authorizing",send:"Send request",sending:"Sending…",cancel:"Cancel",sign:"Signature",draw:"Draw your signature",type:"Type your name to sign",toType:"Can’t draw? Type your name instead",toDraw:"Draw your signature instead",clear:"Clear",drawHint:"Draw your signature in the box above.",clearA11y:"Clear signature",typedSignatureA11y:e=>`Typed signature: ${e}`,missingSignature:"Please add your signature before submitting.",recentlyUsed:"Recently used",moreClinics:"Load more"});var go=/* @__PURE__ */Object.freeze({title:ho.title,titleFor:e=>{let t=e?.trim()??"";return t.length>0?`Request ${t}’s records`:ho.title},leadWeb:"Find the clinic that has them. We send a secure request and read every page they send back.",leadNative:"Find the clinic that has them.",searchLabelWeb:"Find the clinic",howItWorks:"How it works",howSteps:e=>[{title:"We send a secure request",body:"With your permission, straight to the clinic’s records team."},{title:"The clinic sends the file",body:"Most clinics respond within 3 to 5 business days. We follow up for you."},{title:"Everfur reads every page",body:`Visits, vaccines, labs and prescriptions land in ${e}’s records.`}],placeholder:ho.placeholder,searchA11y:ho.search,clearSearch:"Clear search",loading:"Loading clinics",uploadOwn:"I already have the records",uploadOwnStarting:"Setting up your upload…",noPet:"Add a pet first, then come back to request their records.",recentlyUsed:ho.recentlyUsed,noMatch:e=>`No clinics match “${e}”. You can still request records using the option above.`,loadingMore:"Loading more…",loadMoreFailed:"Couldn’t load more. Tap to retry.",selectA11y:e=>`Request records from ${e}`,resultsCount:e=>e===1?"Showing 1 clinic":`Showing ${String(e)} clinics`,fallback:/* @__PURE__ */Object.freeze({title:"Can’t find your clinic?",subtitle:"Add it by email and we’ll request your records.",nameLabel:"Clinic name",namePlaceholder:"Your clinic’s name",emailLabel:"Clinic email",emailPlaceholder:"records@clinic.com",reviewNote:"We review every request by hand before reaching out to the clinic.",submit:"Continue"})});var bo=1.609344;function mo(e){return e===null||!Number.isFinite(e)?null:(e/bo).toFixed(1)}function yo(e){let t=mo(e);return t===null?"":`${t} mi`}var vo=300,ko=2;var wo=/* @__PURE__ */Object.freeze({loading:"Loading",empty:"No records yet",upload:"Upload records",consentRequired:"Consent required",allow:"Allow",allPetsConsent:"This covers all your pets. You can withdraw it at any time.",sessionRequired:"Sign in required",recordUnavailable:"Record unavailable",retry:"Try again",records:"Records",beingReviewed:"being reviewed"});function _o(e,t){let[n,r]=d(""),[o,i]=d(""),[a,l]=d([]),[f,h]=d(null),[g,b]=d([]),[m,y]=d(true),[v,k]=d(false),[w,_]=d(false),[S,x]=d(null),[C,F]=d(null),[R,A]=d(0),I=s(0),T=s(true),E=t?.latitude,D=t?.longitude,O=c(()=>void 0,[E,D]);u(()=>(T.current=true,()=>{T.current=false,I.current+=1}),[e]),u(()=>{let t=true;return y(true),e.recentClinics({limit:5}).then(e=>{t&&(e.ok&&b(e.value.clinics),y(false))}).catch(()=>{t&&y(false)}),()=>{t=false}},[e]),u(()=>{let e=n.trim();if(e.length<ko){i("");return}let t=setTimeout(()=>i(e),vo);return()=>clearTimeout(t)},[n]);let z=o.length>=ko;u(()=>{let t=I.current+=1;if(l([]),h(null),x(null),F(null),!z){k(false);return}k(true),e.searchClinics({query:o,limit:25,...O?{location:O}:{}}).then(e=>{!T.current||t!==I.current||(e.ok?(l(e.value.clinics),h(e.value.nextCursor)):x(e.error),k(false))}).catch(()=>{T.current&&t===I.current&&k(false)})},[e,o,z,O,R]);let P=p(()=>{if(!z||f===null||w)return;let t=I.current;_(true),F(null),e.searchClinics({query:o,limit:25,cursor:f,...O?{location:O}:{}}).then(e=>{!T.current||t!==I.current||(e.ok?(l(t=>[...t,...e.value.clinics]),h(e.value.nextCursor)):F(e.error),_(false))}).catch(()=>{T.current&&t===I.current&&_(false)})},[e,f,o,z,w,O]),B=p(e=>r(e),[]),N=p(()=>A(e=>e+1),[]);return c(()=>({query:n,debouncedQuery:o,isSearchActive:z,clinics:a,recent:g,recentLoading:m,initialLoading:v,loadingMore:w,hasNextPage:f!==null,error:S,pageError:C,setQuery:B,loadMore:P,retry:N}),[n,o,z,a,g,m,v,w,f,S,C,B,P,N])}function So(e,t,n,r){/* @__PURE__ */
22
- return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var xo={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},Co={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},Fo=[.23,1,.32,1],Ro=[.32,.72,0,1],Ao={opacity:0,translateY:8},Io={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},To={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Eo={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=Eo[e];/* @__PURE__ */
23
- return z(S,{source:{uri:r.uri,width:r.width*3,height:r.height*3},style:[{width:r.width,height:r.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",...n===void 0?{}:{testID:n}})}var Do={transform:[{scale:To.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:o=false,busy:i=false,icon:a,style:l,testID:s}){let d=[".emb-btn",".in-body .emb-btn",...r,o&&".emb-btn[disabled]"];/* @__PURE__ */
24
- return P(v,{accessibilityRole:"button",accessibilityState:{disabled:o,busy:i},disabled:o||i,onPress:n,style:({pressed:t})=>[e.view(...d),l,t&&!e.reduced?Do:null],...s===void 0?{}:{testID:s},children:[a===void 0?null:/* @__PURE__ */z(IntroIcon,{name:a,style:e.icon(...d,".emb-btn svg",".in-stack .emb-btn svg")}),
20
+ /* @__PURE__ */z(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:r.join(" ")}),r.map((e,n)=>/* @__PURE__ */z(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var $r=m.create({wrap:{alignSelf:"stretch",alignItems:"center"},probeClip:{position:"absolute",left:0,top:0,width:0,height:0,overflow:"hidden",opacity:0},probeRow:{width:zr,flexDirection:"row",alignItems:"flex-start"}});function Lr(e){return{kit:Er(e,Dr),Title:BalancedTitle,titleCh:Or}}function jr(e){let t=e.raw;if(typeof t!="object"||t===null)return null;let n=t.code;return typeof n=="string"&&n.length>0?n:null}function Wr(e,t){let n=jr(e);if(n===null)return e;let r=t[n];return r===void 0?e:makeEverfurError(r.code,{retryable:r.retryable,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId!==void 0?{requestId:e.requestId}:{},wireCode:n,reasonCode:n,...e.wireMessage!==void 0?{wireMessage:e.wireMessage}:{},raw:e.raw})}var Ur=/* @__PURE__ */new Set(["expo","fcm","apns"]),Vr=/* @__PURE__ */new Set(["ios","android"]),Mr=4096,qr=128,Hr=64,Kr=/[\0- ]/;function Yr(e,t){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e,...t?{reasonCode:t}:{}})}function Gr(e){if(typeof e!="object"||e===null)return Yr("registerDevice needs an input object");let{token:t,provider:n,platform:r,installationId:o}=e;return typeof n!="string"||!Ur.has(n)?Yr("provider must be expo, fcm or apns"):typeof r!="string"||!Vr.has(r)?Yr("platform must be ios or android"):typeof t!="string"||t.trim().length===0||t.length>Mr||Kr.test(t)?Yr(`token must be a push token of 1..${Mr} characters with no whitespace`,"token_invalid"):o!==void 0&&(typeof o!="string"||o.length===0||o.length>qr)?Yr(`installationId must be 1..${qr} characters`):null}var Jr=/^[A-Za-z][A-Za-z0-9_+-]*(\/[A-Za-z0-9_+-]+){0,2}$/,Qr=64,Zr=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/,Xr=35;function eo(e){return e.httpStatus===400&&e.code==="validationFailed"}function to(e){let t={...e};return delete t.timezone,delete t.locale,t}function no(e,t,n){return typeof e=="string"&&e.length<=n&&t.test(e)?e:null}function ro(e){return typeof e!="string"||e.length===0||e.length>Hr?Yr(`deviceId must be 1..${Hr} characters`):Kr.test(e)||e.includes("/")||e==="."||e===".."?Yr("deviceId is not a device id"):null}function oo(e){if(typeof e!="object"||e===null)return Yr("setPreferences needs an input object");let{pushEnabled:t,emailEnabled:n}=e;return typeof t!="boolean"||typeof n!="boolean"?Yr("pushEnabled and emailEnabled must both be booleans: the route replaces both switches"):null}function io(e){return typeof e=="string"&&e.length>0?e:null}function ao(e){if(typeof e!="object"||e===null)return null;let t=e,n=io(t.device_id),r=io(t.provider),o=io(t.platform),i=io(t.registered_at),a=io(t.last_seen_at);if(n===null||r===null||o===null||i===null||a===null||!Ur.has(r)||!Vr.has(o))return null;let l=t.installation_id;/* @__PURE__ */
21
+ return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function lo(e){if(typeof e!="object"||e===null)return null;let t=e,n=io(t.updated_at);return typeof t.push_enabled!="boolean"||typeof t.email_enabled!="boolean"||n===null?null:/* @__PURE__ */Object.freeze({pushEnabled:t.push_enabled,emailEnabled:t.email_enabled,updatedAt:n})}function so(e){return makeEverfurError("internalError",{retryable:false,wireMessage:`${e}: the response was not the documented shape`})}var co=/* @__PURE__ */Object.freeze({provider_unsupported:{code:"validationFailed",retryable:false},token_invalid:{code:"validationFailed",retryable:false},device_cipher_unavailable:{code:"serviceUnavailable",retryable:true}});function uo(e){return Wr(e,co)}function po(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function createNotificationsClient(e){let t=()=>{let{services:t}=e.registry;return fo({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{registerDevice:(n,r)=>e.isDisposed?Promise.resolve(err(po("registerDevice"))):t().registerDevice(n,r),unregisterDevice:(n,r)=>e.isDisposed?Promise.resolve(err(po("unregisterDevice"))):t().unregisterDevice(n,r),setPreferences:(n,r)=>e.isDisposed?Promise.resolve(err(po("setPreferences"))):t().setPreferences(n,r)}}function fo(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=(e,t)=>t?{...e,signal:t}:e;return{async registerDevice(e,r){let o=Gr(e);if(o!==null)return err(o);let i={token:e.token,provider:e.provider,platform:e.platform};e.installationId!==void 0&&(i.installation_id=e.installationId);let a=no(e.timezone,Jr,Qr);a!==null&&(i.timezone=a);let l=no(e.locale,Zr,Xr);l!==null&&(i.locale=l);let s=e=>t.send("notifications.registerDevice",n({method:"POST",path:"/widget/v1/me/devices",body:e},r?.signal)),d=await s(i);if(!d.ok&&eo(d.error)&&(a!==null||l!==null)&&(d=await s(to(i))),!d.ok)return err(uo(d.error));let c=ao(d.value);return c===null?err(so("registerDevice")):ok(c)},async unregisterDevice(e,r){let o=ro(e);if(o!==null)return err(o);let i=await t.send("notifications.unregisterDevice",n({method:"DELETE",path:`/widget/v1/me/devices/${encodeURIComponent(e)}`},r?.signal));return i.ok?ok(void 0):err(uo(i.error))},async setPreferences(e,r){let o=oo(e);if(o!==null)return err(o);let i=await t.send("notifications.setPreferences",n({method:"PUT",path:"/widget/v1/me/notification-preferences",body:{push_enabled:e.pushEnabled,email_enabled:e.emailEnabled}},r?.signal));if(!i.ok)return err(uo(i.error));let a=lo(i.value);return a===null?err(so("setPreferences")):ok(a)}}}function ho(e,t){let n=`${t.key}\n${t.email}`,r=e.get(n);return r===void 0?(e.set(n,t.idempotencyKey),t):r===t.idempotencyKey?t:/* @__PURE__ */Object.freeze({...t,idempotencyKey:r})}function isIntroSwipeOut(e,t){let n=t>0?Math.abs(e)/t:0;return e>90||e>12&&n>.11}var go=/* @__PURE__ */Object.freeze({title:"Request records",clinic:"Clinic",search:"Search clinics by name or location",placeholder:"Clinic name, city, or ZIP",email:"Clinic email",emailPlaceholder:"records@clinic.com",ownerName:"Your full name",scopeHeading:"What you’re authorizing",send:"Send request",sending:"Sending…",cancel:"Cancel",sign:"Signature",draw:"Draw your signature",type:"Type your name to sign",toType:"Can’t draw? Type your name instead",toDraw:"Draw your signature instead",clear:"Clear",drawHint:"Draw your signature in the box above.",clearA11y:"Clear signature",typedSignatureA11y:e=>`Typed signature: ${e}`,missingSignature:"Please add your signature before submitting.",recentlyUsed:"Recently used",moreClinics:"Load more"});var bo=/* @__PURE__ */Object.freeze({title:go.title,titleFor:e=>{let t=e?.trim()??"";return t.length>0?`Request ${t}’s records`:go.title},leadWeb:"Find the clinic that has them. We send a secure request and read every page they send back.",leadNative:"Find the clinic that has them.",searchLabelWeb:"Find the clinic",howItWorks:"How it works",howSteps:e=>[{title:"We send a secure request",body:"With your permission, straight to the clinic’s records team."},{title:"The clinic sends the file",body:"Most clinics respond within 3 to 5 business days. We follow up for you."},{title:"Everfur reads every page",body:`Visits, vaccines, labs and prescriptions land in ${e}’s records.`}],placeholder:go.placeholder,searchA11y:go.search,clearSearch:"Clear search",loading:"Loading clinics",uploadOwn:"I already have the records",uploadOwnStarting:"Setting up your upload…",noPet:"Add a pet first, then come back to request their records.",recentlyUsed:go.recentlyUsed,noMatch:e=>`No clinics match “${e}”. You can still request records using the option above.`,loadingMore:"Loading more…",loadMoreFailed:"Couldn’t load more. Tap to retry.",selectA11y:e=>`Request records from ${e}`,resultsCount:e=>e===1?"Showing 1 clinic":`Showing ${String(e)} clinics`,fallback:/* @__PURE__ */Object.freeze({title:"Can’t find your clinic?",subtitle:"Add it by email and we’ll request your records.",nameLabel:"Clinic name",namePlaceholder:"Your clinic’s name",emailLabel:"Clinic email",emailPlaceholder:"records@clinic.com",reviewNote:"We review every request by hand before reaching out to the clinic.",submit:"Continue"})});var mo=1.609344;function yo(e){return e===null||!Number.isFinite(e)?null:(e/mo).toFixed(1)}function vo(e){let t=yo(e);return t===null?"":`${t} mi`}var ko=300,wo=2;var _o=/* @__PURE__ */Object.freeze({loading:"Loading",empty:"No records yet",upload:"Upload records",consentRequired:"Consent required",allow:"Allow",allPetsConsent:"This covers all your pets. You can withdraw it at any time.",sessionRequired:"Sign in required",recordUnavailable:"Record unavailable",retry:"Try again",records:"Records",beingReviewed:"being reviewed"});function So(e,t){let[n,r]=d(""),[o,i]=d(""),[a,l]=d([]),[f,h]=d(null),[g,b]=d([]),[m,y]=d(true),[v,k]=d(false),[w,_]=d(false),[S,x]=d(null),[C,R]=d(null),[F,A]=d(0),I=s(0),T=s(true),E=t?.latitude,D=t?.longitude,O=c(()=>void 0,[E,D]);u(()=>(T.current=true,()=>{T.current=false,I.current+=1}),[e]),u(()=>{let t=true;return y(true),e.recentClinics({limit:5}).then(e=>{t&&(e.ok&&b(e.value.clinics),y(false))}).catch(()=>{t&&y(false)}),()=>{t=false}},[e]),u(()=>{let e=n.trim();if(e.length<wo){i("");return}let t=setTimeout(()=>i(e),ko);return()=>clearTimeout(t)},[n]);let z=o.length>=wo;u(()=>{let t=I.current+=1;if(l([]),h(null),x(null),R(null),!z){k(false);return}k(true),e.searchClinics({query:o,limit:25,...O?{location:O}:{}}).then(e=>{!T.current||t!==I.current||(e.ok?(l(e.value.clinics),h(e.value.nextCursor)):x(e.error),k(false))}).catch(()=>{T.current&&t===I.current&&k(false)})},[e,o,z,O,F]);let P=p(()=>{if(!z||f===null||w)return;let t=I.current;_(true),R(null),e.searchClinics({query:o,limit:25,cursor:f,...O?{location:O}:{}}).then(e=>{!T.current||t!==I.current||(e.ok?(l(t=>[...t,...e.value.clinics]),h(e.value.nextCursor)):R(e.error),_(false))}).catch(()=>{T.current&&t===I.current&&_(false)})},[e,f,o,z,w,O]),B=p(e=>r(e),[]),N=p(()=>A(e=>e+1),[]);return c(()=>({query:n,debouncedQuery:o,isSearchActive:z,clinics:a,recent:g,recentLoading:m,initialLoading:v,loadingMore:w,hasNextPage:f!==null,error:S,pageError:C,setQuery:B,loadMore:P,retry:N}),[n,o,z,a,g,m,v,w,f,S,C,B,P,N])}function xo(e,t,n,r){/* @__PURE__ */
22
+ return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Co={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},Ro={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},Fo=[.23,1,.32,1],Ao=[.32,.72,0,1],Io={opacity:0,translateY:8},To={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Eo={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Do={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=Do[e];/* @__PURE__ */
23
+ return z(S,{source:{uri:r.uri,width:r.width*3,height:r.height*3},style:[{width:r.width,height:r.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",...n===void 0?{}:{testID:n}})}var Oo={transform:[{scale:Eo.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:o=false,busy:i=false,icon:a,style:l,testID:s}){let d=[".emb-btn",".in-body .emb-btn",...r,o&&".emb-btn[disabled]"];/* @__PURE__ */
24
+ return P(v,{accessibilityRole:"button",accessibilityState:{disabled:o,busy:i},disabled:o||i,onPress:n,style:({pressed:t})=>[e.view(...d),l,t&&!e.reduced?Oo:null],...s===void 0?{}:{testID:s},children:[a===void 0?null:/* @__PURE__ */z(IntroIcon,{name:a,style:e.icon(...d,".emb-btn svg",".in-stack .emb-btn svg")}),
25
25
  /* @__PURE__ */z(Text,{tier:"control",style:e.text(...d),children:t})]})}function IntroLink({kit:e,label:t,onPress:n,rules:r=[],testID:o}){/* @__PURE__ */
26
- return z(v,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?Do:null],...o===void 0?{}:{testID:o},children:/* @__PURE__ */z(Text,{tier:"control",style:e.text(".in-link",...r),children:t})})}var Oo=a(function({kit:e,words:t,testID:n},r){/* @__PURE__ */
27
- return z(y,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */z(Text,{tier:"heading",style:e.text(".serif",".in-h"),children:t})})});function IntroLine({kit:e,words:t,rules:n,testID:r}){return t===""?null:/* @__PURE__ */z(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var zo=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Po={transform:[{scale:To.pressScale}]};function Bo(e){return[e.address?.trim()??"",yo(e.distanceKm)].filter(e=>e!=="").join(" · ")}function Field({kit:e,icon:t,value:n,placeholder:r,label:o,onChange:i,onSubmit:a,kind:l,maxLength:s,testID:d}){/* @__PURE__ */
26
+ return z(v,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?Oo:null],...o===void 0?{}:{testID:o},children:/* @__PURE__ */z(Text,{tier:"control",style:e.text(".in-link",...r),children:t})})}var zo=a(function({kit:e,words:t,testID:n},r){/* @__PURE__ */
27
+ return z(y,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */z(Text,{tier:"heading",style:e.text(".serif",".in-h"),children:t})})});function IntroLine({kit:e,words:t,rules:n,testID:r}){return t===""?null:/* @__PURE__ */z(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var Po=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Bo={transform:[{scale:Eo.pressScale}]};function No(e){return[e.address?.trim()??"",vo(e.distanceKm)].filter(e=>e!=="").join(" · ")}function Field({kit:e,icon:t,value:n,placeholder:r,label:o,onChange:i,onSubmit:a,kind:l,maxLength:s,testID:d}){/* @__PURE__ */
28
28
  return P(y,{style:e.view(".in-search"),children:[t?/* @__PURE__ */z(IntroIcon,{name:"search",style:e.icon(".in-search svg")}):null,
29
- /* @__PURE__ */z(Vn,{value:n,placeholder:r,placeholderTextColor:e.colors.ink3,accessibilityLabel:o,autoComplete:"off",autoCorrect:false,autoCapitalize:l==="email"?"none":"words",inputMode:l==="email"?"email":l==="search"?"search":"text",returnKeyType:l==="search"?"search":"next",...s===void 0?{}:{maxLength:s},style:[e.view(".in-search input"),e.text(".in-search input"),{paddingVertical:0}],onChangeText:i,...a===void 0?{}:{onSubmitEditing:a},testID:d})]})}var No=a(function({kit:e,text:t,onPick:n,onUpload:r},o){let i=useEverfurRecordsClinic(),a=_o(i),l=s(De()),[c,u]=d(null),[p,f]=d(false),[h,g]=d(""),[b,m]=d(""),k=a.isSearchActive?a.clinics:a.recent,w=k.find(e=>e.id===c)??k[0]??null,_=a.isSearchActive&&!a.initialLoading&&a.error===null&&k.length===0,S=h.trim()===""?a.query.trim():h.trim(),x=S!==""&&zo.test(b.trim()),C=()=>{if(p){x&&n(So(null,S,b.trim().toLowerCase(),l.current()));return}w!==null&&n(So(w,null,"",l.current()))},F=p?x:w!==null,R=a.initialLoading||!a.isSearchActive&&a.recentLoading;/* @__PURE__ */
29
+ /* @__PURE__ */z(Mn,{value:n,placeholder:r,placeholderTextColor:e.colors.ink3,accessibilityLabel:o,autoComplete:"off",autoCorrect:false,autoCapitalize:l==="email"?"none":"words",inputMode:l==="email"?"email":l==="search"?"search":"text",returnKeyType:l==="search"?"search":"next",...s===void 0?{}:{maxLength:s},style:[e.view(".in-search input"),e.text(".in-search input"),{paddingVertical:0}],onChangeText:i,...a===void 0?{}:{onSubmitEditing:a},testID:d})]})}var $o=a(function({kit:e,text:t,onPick:n,onUpload:r},o){let i=useEverfurRecordsClinic(),a=So(i),l=s(De()),[c,u]=d(null),[p,f]=d(false),[h,g]=d(""),[b,m]=d(""),k=a.isSearchActive?a.clinics:a.recent,w=k.find(e=>e.id===c)??k[0]??null,_=a.isSearchActive&&!a.initialLoading&&a.error===null&&k.length===0,S=h.trim()===""?a.query.trim():h.trim(),x=S!==""&&Po.test(b.trim()),C=()=>{if(p){x&&n(xo(null,S,b.trim().toLowerCase(),l.current()));return}w!==null&&n(xo(w,null,"",l.current()))},R=p?x:w!==null,F=a.initialLoading||!a.isSearchActive&&a.recentLoading;/* @__PURE__ */
30
30
  return P(B,{children:[
31
- /* @__PURE__ */z(Oo,{ref:o,kit:e,words:t.title,testID:"everfur-intro-title"}),
31
+ /* @__PURE__ */z(zo,{ref:o,kit:e,words:t.title,testID:"everfur-intro-title"}),
32
32
  /* @__PURE__ */z(Field,{kit:e,icon:true,kind:"search",value:a.query,placeholder:t.search,label:t.searchLabel,onChange:e=>{a.setQuery(e),f(false)},onSubmit:C,testID:"everfur-intro-clinic-search"}),p?/* @__PURE__ */P(y,{style:e.view(".in-clinics"),children:[
33
- /* @__PURE__ */z(Field,{kit:e,icon:false,kind:"text",value:h===""?a.query:h,placeholder:go.fallback.namePlaceholder,label:go.fallback.nameLabel,maxLength:200,onChange:g,testID:"everfur-intro-clinic-name"}),
34
- /* @__PURE__ */z(Field,{kit:e,icon:false,kind:"email",value:b,placeholder:go.fallback.emailPlaceholder,label:go.fallback.emailLabel,maxLength:320,onChange:m,onSubmit:C,testID:"everfur-intro-clinic-email"}),
35
- /* @__PURE__ */z(IntroLine,{kit:e,words:go.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */P(y,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:R},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[k.map(t=>{let n=w?.id===t.id,r=Bo(t),o=n&&'.in-clinic[aria-checked="true"]';/* @__PURE__ */
36
- return P(v,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>u(t.id),style:({pressed:t})=>[e.view(".in-clinic",o),t&&!e.reduced?Po:null],testID:`everfur-intro-clinic-${t.id}`,children:[
33
+ /* @__PURE__ */z(Field,{kit:e,icon:false,kind:"text",value:h===""?a.query:h,placeholder:bo.fallback.namePlaceholder,label:bo.fallback.nameLabel,maxLength:200,onChange:g,testID:"everfur-intro-clinic-name"}),
34
+ /* @__PURE__ */z(Field,{kit:e,icon:false,kind:"email",value:b,placeholder:bo.fallback.emailPlaceholder,label:bo.fallback.emailLabel,maxLength:320,onChange:m,onSubmit:C,testID:"everfur-intro-clinic-email"}),
35
+ /* @__PURE__ */z(IntroLine,{kit:e,words:bo.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */P(y,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:F},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[k.map(t=>{let n=w?.id===t.id,r=No(t),o=n&&'.in-clinic[aria-checked="true"]';/* @__PURE__ */
36
+ return P(v,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>u(t.id),style:({pressed:t})=>[e.view(".in-clinic",o),t&&!e.reduced?Bo:null],testID:`everfur-intro-clinic-${t.id}`,children:[
37
37
  /* @__PURE__ */P(y,{style:e.col(".in-clinic",0),children:[
38
38
  /* @__PURE__ */z(Text,{style:e.strong(".in-clinic",".in-clinic b"),children:t.name}),r===""?null:/* @__PURE__ */z(Text,{style:[e.view(".in-clinic small"),e.text(".in-clinic",".in-clinic small")],children:r})]}),
39
39
  /* @__PURE__ */z(y,{style:[e.view(".in-tick",n&&'.in-clinic[aria-checked="true"] .in-tick'),e.col(".in-clinic",1)],children:/* @__PURE__ */z(IntroIcon,{name:"check",style:e.icon(".in-tick svg",n&&'.in-clinic[aria-checked="true"] .in-tick svg')})})]},t.id)}),a.error!==null&&a.isSearchActive?/* @__PURE__ */P(y,{accessibilityRole:"alert",style:e.view(".in-none"),testID:"everfur-intro-clinic-error",children:[
40
- /* @__PURE__ */z(Text,{style:e.text(".in-none"),children:a.error.displayMessage}),a.error.retryable?/* @__PURE__ */z(IntroLink,{kit:e,label:wo.retry,onPress:a.retry,rules:[".in-none .in-link"],testID:"everfur-intro-clinic-retry"}):null]}):null,_?/* @__PURE__ */P(y,{style:e.view(".in-none"),testID:"everfur-intro-clinic-none",children:[
41
- /* @__PURE__ */z(Text,{style:e.text(".in-none"),children:`${go.fallback.title} ${go.fallback.subtitle}`}),
40
+ /* @__PURE__ */z(Text,{style:e.text(".in-none"),children:a.error.displayMessage}),a.error.retryable?/* @__PURE__ */z(IntroLink,{kit:e,label:_o.retry,onPress:a.retry,rules:[".in-none .in-link"],testID:"everfur-intro-clinic-retry"}):null]}):null,_?/* @__PURE__ */P(y,{style:e.view(".in-none"),testID:"everfur-intro-clinic-none",children:[
41
+ /* @__PURE__ */z(Text,{style:e.text(".in-none"),children:`${bo.fallback.title} ${bo.fallback.subtitle}`}),
42
42
  /* @__PURE__ */z(IntroLink,{kit:e,label:t.add,onPress:()=>f(true),rules:[".in-none .in-link"],testID:"everfur-intro-clinic-add"})]}):null]}),
43
43
  /* @__PURE__ */z(IntroLine,{kit:e,words:t.more,rules:[".in-p",".in-p--s"]}),
44
- /* @__PURE__ */z(IntroButton,{kit:e,label:t.request,onPress:C,rules:[".emb-btn--block"],disabled:!F,testID:"everfur-intro-clinic-request"}),r===void 0?null:/* @__PURE__ */z(IntroLink,{kit:e,label:t.upload,onPress:r,testID:"everfur-intro-clinic-upload"})]})});function IntroConsentFrame({petRef:petRef,petName:e,draft:t,ownerName:n,onCaptureSignature:r,onCreated:o}){/* @__PURE__ */
45
- return z(i,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...n===void 0?{}:{ownerName:n},...r===void 0?{}:{onCaptureSignature:r},onCreated:o,style:{flex:1}})}function $o(e){return Tr(e,xo,Co)}var Lo=60,jo=24,Wo=240,Uo=k.bezier(.25,.1,.25,1),Vo=k.bezier(.42,0,.58,1),Mo=k.bezier(...Fo),qo=k.bezier(...Ro),Ho=8,Ko=w.OS==="ios",Yo=w.OS!=="web";function Go(e){return e===null?Uo:k.bezier(...e)}function Jo(e){if(e===null)return;let t=T.sendAccessibilityEvent;typeof t=="function"&&t.call(T,e,"focus")}function EverfurIntro(e){let{petRef:petRef,onClose:t,onClosed:n,onFrame:r}=e,o=e.mode??"intro",i=useEverfurTheme(),a=c(()=>$o(i),[i]),l=a.reduced,{runtime:f}=st(),h=c(()=>({...ct,...e.copy}),[e.copy]),g=c(()=>introFacts(e.page??null,e.petName),[e.page,e.petName]),b=c(()=>e.blanks??defaultIntroBlanks(g.pet),[e.blanks,g.pet]),m=c(()=>introText({facts:g,copy:h,blanks:b.length,resultsPending:e.resultsPending===true}),[g,h,b.length,e.resultsPending]),[k,w]=d(o==="records"?"clinic":"tabs"),[_,S]=d(false),[I,T]=d(false),[E,D]=d(null),O=s(/* @__PURE__ */new Map),[N,$]=d(""),[L,j]=d(false),[W,U]=d(0),[V,M]=d(0),q=s(false),H=s(0),K=s(0),Y=s(null),G=s(null),J=s([]),Q=p((e,t)=>{J.current.push(setTimeout(e,t))},[]);u(()=>()=>J.current.forEach(clearTimeout),[]);let Z=s(new x.Value(0)).current,X=s(new x.Value(0)).current,ee=s(new x.Value(0)).current,te=s(new x.Value(0)).current,ne=s(new x.Value(1)).current,re=s([0,1,2].map(()=>new x.Value(l?1:0))).current,oe=k!=="tabs",ie=s(new x.Value(oe?1:0)).current,ae=s(false);u(()=>{r?.(I?null:k)},[k,I,r]),u(()=>()=>r?.(null),[r]);let le=s(k);le.current=k;let se=p(()=>{Q(()=>Jo(le.current==="consent"?G.current:Y.current),Lo)},[Q]),de=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==V&&M(t),ae.current||q.current)return;ae.current=true;let n=a.motion(".in-sheet",".ph-intro.is-on .in-sheet"),r=a.motion(".in-dim",".ph-intro.is-on .in-dim--top"),o=[x.timing(Z,{toValue:1,duration:n.dur,easing:l?Uo:qo,useNativeDriver:Yo}),x.timing(X,{toValue:1,duration:r.dur,easing:Go(r.ease),useNativeDriver:Yo})];if(!l&&k==="tabs"){let e=To.rows;re.forEach((t,n)=>o.push(x.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:Mo,useNativeDriver:Yo})))}x.parallel(o).start(),se()};u(()=>{if(q.current)return;let e=oe?a.motion(".in-dim",".ph-intro.is-on.is-all .in-dim--mid"):a.motion(".in-dim");x.timing(ee,{toValue:oe?1:0,duration:e.dur,easing:Go(e.ease),useNativeDriver:Yo}).start();let t=a.motion(".in-bars b::after");x.timing(ie,{toValue:oe?1:0,duration:t.dur,easing:Go(t.ease),useNativeDriver:false}).start()},[oe,a,ee,ie]);let ce=c(()=>b.map(()=>new x.Value(0)),[b]);u(()=>{if(k!=="ask"||l)return;let e=To.blanks;ce.forEach(e=>e.setValue(0));let t=x.parallel(ce.map((t,n)=>x.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:Vo,useNativeDriver:false})));return t.start(),()=>t.stop()},[k,l,ce]);let ue=p((e,t=false)=>{S(t),w(e),H.current=0,ne.setValue(0),x.timing(ne,{toValue:1,duration:l?150:Wo,easing:l?Uo:Mo,useNativeDriver:Yo}).start(),se()},[ne,l,se]),pe=p((e,r=null,o=null)=>{if(q.current)return;q.current=true,T(true),t({exit:e,toast:r,notifications:o});let i=a.motion(".in-sheet"),s=a.motion(".in-dim");x.parallel([x.timing(Z,{toValue:0,duration:i.dur,easing:l?Uo:Mo,useNativeDriver:Yo}),x.timing(X,{toValue:0,duration:s.dur,easing:Go(s.ease),useNativeDriver:Yo}),x.timing(ee,{toValue:0,duration:s.dur,easing:Go(s.ease),useNativeDriver:Yo})]).start(),Q(()=>n?.(),l?160:260)},[t,n,Q,l,a,Z,X,ee]),fe=p(()=>pe(o==="records"?"stay":"ask"),[pe,o]),he=p(e=>pe("plan",e?m.toast.on:m.toast.off,e),[pe,m]),ge=e.onUpload,be=c(()=>ge===void 0?void 0:()=>{pe("stay"),ge()},[ge,pe]),me=s(false),ye=p(async()=>{if(me.current)return;me.current=true,j(true);let t=false;try{e.onEnableNotifications!==void 0?t=await e.onEnableNotifications()===!0:t=(await createNotificationsClient(f).setPreferences({pushEnabled:!0,emailEnabled:!0})).ok}catch{t=false}me.current=false,j(false),he(t)},[e,f,he]),ve=()=>{q.current||(k==="sent"?he(false):fe())},ke=s(fe);ke.current=fe;let we=s(true);we.current=k!=="sent"&&k!=="consent"&&!I;let _e=c(()=>C.create({onMoveShouldSetPanResponderCapture:(e,t)=>we.current&&H.current<=0&&t.dy>Ho&&Math.abs(t.dy)>Math.abs(t.dx),onPanResponderGrant:()=>{K.current===0&&(K.current=Date.now())},onPanResponderMove:(e,t)=>te.setValue(t.dy>0?t.dy:t.dy/4),onPanResponderRelease:(e,t)=>{let n=Date.now()-(K.current||Date.now());K.current=0,isIntroSwipeOut(t.dy,n)?ke.current():x.timing(te,{toValue:0,duration:a.motion(".in-sheet",".ph-intro.is-on .in-sheet").dur,easing:qo,useNativeDriver:Yo}).start()},onPanResponderTerminate:()=>{K.current=0,x.timing(te,{toValue:0,duration:Wo,easing:Mo,useNativeDriver:Yo}).start()}}),[te,a]),Se=p(t=>{let n=E===null?"":E.clinic?.name??E.freeText??"",r={petRef:petRef,clinicName:n,requestId:t.id,at:/* @__PURE__ */(new Date).toISOString()};$(n),e.onRequested?.(r),ue("sent")},[E,petRef,e,ue]),xe=e.tabBar?.top??Io.tabTop,Ce=e.tabBar?.height??Io.tabHeight,Fe=W===0?void 0:oe?W-Io.sheetTopAll:W-xe-Ce-Io.sheetGap,Re=k==="clinic"&&o!=="records"||k==="novet"||k==="consent",Ae=k!=="sent",Ie=V>0?V:W>0?W:1e3,Te=l?{opacity:Z,transform:[{translateY:te}]}:{transform:[{translateY:x.add(Z.interpolate({inputRange:[0,1],outputRange:[Ie,0]}),te)}]},Ee=l?{opacity:ne}:{opacity:ne,transform:[{translateX:ne.interpolate({inputRange:[0,1],outputRange:[_?-jo:jo,0]})}]},De=e=>{let t=i.meta.hidePoweredBy?null:/* @__PURE__ */P(y,{style:a.view(".in-by"),children:[
44
+ /* @__PURE__ */z(IntroButton,{kit:e,label:t.request,onPress:C,rules:[".emb-btn--block"],disabled:!R,testID:"everfur-intro-clinic-request"}),r===void 0?null:/* @__PURE__ */z(IntroLink,{kit:e,label:t.upload,onPress:r,testID:"everfur-intro-clinic-upload"})]})});function IntroConsentFrame({petRef:petRef,petName:e,draft:t,ownerName:n,onCaptureSignature:r,onCreated:o}){/* @__PURE__ */
45
+ return z(i,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...n===void 0?{}:{ownerName:n},...r===void 0?{}:{onCaptureSignature:r},onCreated:o,style:{flex:1}})}function Lo(e){return Er(e,Co,Ro)}var jo=60,Wo=24,Uo=240,Vo=k.bezier(.25,.1,.25,1),Mo=k.bezier(.42,0,.58,1),qo=k.bezier(...Fo),Ho=k.bezier(...Ao),Ko=8,Yo=w.OS==="ios",Go=w.OS!=="web";function Jo(e){return e===null?Vo:k.bezier(...e)}function Qo(e){if(e===null)return;let t=T.sendAccessibilityEvent;typeof t=="function"&&t.call(T,e,"focus")}function EverfurIntro(e){let{petRef:petRef,onClose:t,onClosed:n,onFrame:r}=e,o=e.mode??"intro",i=useEverfurTheme(),a=c(()=>Lo(i),[i]),l=a.reduced,{runtime:f}=st(),h=c(()=>({...ct,...e.copy}),[e.copy]),g=c(()=>introFacts(e.page??null,e.petName),[e.page,e.petName]),b=c(()=>e.blanks??defaultIntroBlanks(g.pet),[e.blanks,g.pet]),m=c(()=>introText({facts:g,copy:h,blanks:b.length,resultsPending:e.resultsPending===true}),[g,h,b.length,e.resultsPending]),[k,w]=d(o==="records"?"clinic":"tabs"),[_,S]=d(false),[I,T]=d(false),[E,D]=d(null),O=s(/* @__PURE__ */new Map),[N,$]=d(""),[L,j]=d(false),[W,U]=d(0),[V,M]=d(0),q=s(false),H=s(0),K=s(0),Y=s(null),G=s(null),J=s([]),Q=p((e,t)=>{J.current.push(setTimeout(e,t))},[]);u(()=>()=>J.current.forEach(clearTimeout),[]);let Z=s(new x.Value(0)).current,X=s(new x.Value(0)).current,ee=s(new x.Value(0)).current,te=s(new x.Value(0)).current,ne=s(new x.Value(1)).current,re=s([0,1,2].map(()=>new x.Value(l?1:0))).current,oe=k!=="tabs",ie=s(new x.Value(oe?1:0)).current,ae=s(false);u(()=>{r?.(I?null:k)},[k,I,r]),u(()=>()=>r?.(null),[r]);let le=s(k);le.current=k;let se=p(()=>{Q(()=>Qo(le.current==="consent"?G.current:Y.current),jo)},[Q]),de=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==V&&M(t),ae.current||q.current)return;ae.current=true;let n=a.motion(".in-sheet",".ph-intro.is-on .in-sheet"),r=a.motion(".in-dim",".ph-intro.is-on .in-dim--top"),o=[x.timing(Z,{toValue:1,duration:n.dur,easing:l?Vo:Ho,useNativeDriver:Go}),x.timing(X,{toValue:1,duration:r.dur,easing:Jo(r.ease),useNativeDriver:Go})];if(!l&&k==="tabs"){let e=Eo.rows;re.forEach((t,n)=>o.push(x.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:qo,useNativeDriver:Go})))}x.parallel(o).start(),se()};u(()=>{if(q.current)return;let e=oe?a.motion(".in-dim",".ph-intro.is-on.is-all .in-dim--mid"):a.motion(".in-dim");x.timing(ee,{toValue:oe?1:0,duration:e.dur,easing:Jo(e.ease),useNativeDriver:Go}).start();let t=a.motion(".in-bars b::after");x.timing(ie,{toValue:oe?1:0,duration:t.dur,easing:Jo(t.ease),useNativeDriver:false}).start()},[oe,a,ee,ie]);let ce=c(()=>b.map(()=>new x.Value(0)),[b]);u(()=>{if(k!=="ask"||l)return;let e=Eo.blanks;ce.forEach(e=>e.setValue(0));let t=x.parallel(ce.map((t,n)=>x.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:Mo,useNativeDriver:false})));return t.start(),()=>t.stop()},[k,l,ce]);let ue=p((e,t=false)=>{S(t),w(e),H.current=0,ne.setValue(0),x.timing(ne,{toValue:1,duration:l?150:Uo,easing:l?Vo:qo,useNativeDriver:Go}).start(),se()},[ne,l,se]),pe=p((e,r=null,o=null)=>{if(q.current)return;q.current=true,T(true),t({exit:e,toast:r,notifications:o});let i=a.motion(".in-sheet"),s=a.motion(".in-dim");x.parallel([x.timing(Z,{toValue:0,duration:i.dur,easing:l?Vo:qo,useNativeDriver:Go}),x.timing(X,{toValue:0,duration:s.dur,easing:Jo(s.ease),useNativeDriver:Go}),x.timing(ee,{toValue:0,duration:s.dur,easing:Jo(s.ease),useNativeDriver:Go})]).start(),Q(()=>n?.(),l?160:260)},[t,n,Q,l,a,Z,X,ee]),fe=p(()=>pe(o==="records"?"stay":"ask"),[pe,o]),he=p(e=>pe("plan",e?m.toast.on:m.toast.off,e),[pe,m]),ge=e.onUpload,be=c(()=>ge===void 0?void 0:()=>{pe("stay"),ge()},[ge,pe]),me=s(false),ye=p(async()=>{if(me.current)return;me.current=true,j(true);let t=false;try{e.onEnableNotifications!==void 0?t=await e.onEnableNotifications()===!0:t=(await createNotificationsClient(f).setPreferences({pushEnabled:!0,emailEnabled:!0})).ok}catch{t=false}me.current=false,j(false),he(t)},[e,f,he]),ve=()=>{q.current||(k==="sent"?he(false):fe())},ke=s(fe);ke.current=fe;let we=s(true);we.current=k!=="sent"&&k!=="consent"&&!I;let _e=c(()=>C.create({onMoveShouldSetPanResponderCapture:(e,t)=>we.current&&H.current<=0&&t.dy>Ko&&Math.abs(t.dy)>Math.abs(t.dx),onPanResponderGrant:()=>{K.current===0&&(K.current=Date.now())},onPanResponderMove:(e,t)=>te.setValue(t.dy>0?t.dy:t.dy/4),onPanResponderRelease:(e,t)=>{let n=Date.now()-(K.current||Date.now());K.current=0,isIntroSwipeOut(t.dy,n)?ke.current():x.timing(te,{toValue:0,duration:a.motion(".in-sheet",".ph-intro.is-on .in-sheet").dur,easing:Ho,useNativeDriver:Go}).start()},onPanResponderTerminate:()=>{K.current=0,x.timing(te,{toValue:0,duration:Uo,easing:qo,useNativeDriver:Go}).start()}}),[te,a]),Se=p(t=>{let n=E===null?"":E.clinic?.name??E.freeText??"",r={petRef:petRef,clinicName:n,requestId:t.id,at:/* @__PURE__ */(new Date).toISOString()};$(n),e.onRequested?.(r),ue("sent")},[E,petRef,e,ue]),xe=e.tabBar?.top??To.tabTop,Ce=e.tabBar?.height??To.tabHeight,Re=W===0?void 0:oe?W-To.sheetTopAll:W-xe-Ce-To.sheetGap,Fe=k==="clinic"&&o!=="records"||k==="novet"||k==="consent",Ae=k!=="sent",Ie=V>0?V:W>0?W:1e3,Te=l?{opacity:Z,transform:[{translateY:te}]}:{transform:[{translateY:x.add(Z.interpolate({inputRange:[0,1],outputRange:[Ie,0]}),te)}]},Ee=l?{opacity:ne}:{opacity:ne,transform:[{translateX:ne.interpolate({inputRange:[0,1],outputRange:[_?-Wo:Wo,0]})}]},De=e=>{let t=i.meta.hidePoweredBy?null:/* @__PURE__ */P(y,{style:a.view(".in-by"),children:[
46
46
  /* @__PURE__ */z(Text,{tier:"compact",style:a.text(".in-eyebrow",".in-by"),children:m.poweredBy}),
47
- /* @__PURE__ */z(IntroIcon,{name:"wordmark",style:a.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */P(y,{style:a.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */z(Text,{tier:"compact",style:a.text(".in-eyebrow"),children:e}),t]})},Oe=e=>e===""?null:/* @__PURE__ */z(Oo,{ref:Y,kit:a,words:e,testID:"everfur-intro-title"}),ze=(e,t)=>e===""?null:t?/* @__PURE__ */z(y,{ref:Y,accessible:true,accessibilityLabel:e,children:/* @__PURE__ */z(IntroLine,{kit:a,words:e,rules:[".in-p"]})}):/* @__PURE__ */z(IntroLine,{kit:a,words:e,rules:[".in-p"]}),Pe=null;if(k==="tabs"){let t=[["ask","chat",".in-ic--y",e.tabLabels?.ask??"Ask",m.tabs.ask],["plan","heartcheck",".in-ic--c",e.tabLabels?.plan??"Health Plan",m.tabs.plan],["records","file",".in-ic--g",e.tabLabels?.records??"Records",m.tabs.records]];Pe=/* @__PURE__ */P(B,{children:[De(m.tabs.eyebrow),Oe(m.tabs.title),
47
+ /* @__PURE__ */z(IntroIcon,{name:"wordmark",style:a.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */P(y,{style:a.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */z(Text,{tier:"compact",style:a.text(".in-eyebrow"),children:e}),t]})},Oe=e=>e===""?null:/* @__PURE__ */z(zo,{ref:Y,kit:a,words:e,testID:"everfur-intro-title"}),ze=(e,t)=>e===""?null:t?/* @__PURE__ */z(y,{ref:Y,accessible:true,accessibilityLabel:e,children:/* @__PURE__ */z(IntroLine,{kit:a,words:e,rules:[".in-p"]})}):/* @__PURE__ */z(IntroLine,{kit:a,words:e,rules:[".in-p"]}),Pe=null;if(k==="tabs"){let t=[["ask","chat",".in-ic--y",e.tabLabels?.ask??"Ask",m.tabs.ask],["plan","heartcheck",".in-ic--c",e.tabLabels?.plan??"Health Plan",m.tabs.plan],["records","file",".in-ic--g",e.tabLabels?.records??"Records",m.tabs.records]];Pe=/* @__PURE__ */P(B,{children:[De(m.tabs.eyebrow),Oe(m.tabs.title),
48
48
  /* @__PURE__ */z(IntroLine,{kit:a,words:m.tabs.lede,rules:[".in-p"]}),
49
- /* @__PURE__ */z(y,{accessibilityRole:"list",style:a.view(".in-rows"),children:t.map(([e,t,n,r,o],i)=>{let s=re[i],d=l?null:{opacity:s.interpolate({inputRange:[0,1],outputRange:[Ao.opacity,1]}),transform:[{translateY:s.interpolate({inputRange:[0,1],outputRange:[Ao.translateY,0]})}]};/* @__PURE__ */
49
+ /* @__PURE__ */z(y,{accessibilityRole:"list",style:a.view(".in-rows"),children:t.map(([e,t,n,r,o],i)=>{let s=re[i],d=l?null:{opacity:s.interpolate({inputRange:[0,1],outputRange:[Io.opacity,1]}),transform:[{translateY:s.interpolate({inputRange:[0,1],outputRange:[Io.translateY,0]})}]};/* @__PURE__ */
50
50
  return P(x.View,{style:[a.view(".in-rows li"),d],testID:`everfur-intro-row-${e}`,children:[
51
51
  /* @__PURE__ */z(y,{style:[a.view(".in-ic",n),a.col(".in-rows li",0)],children:/* @__PURE__ */z(IntroIcon,{name:t,style:a.icon(".in-ic svg")})}),
52
52
  /* @__PURE__ */P(y,{style:a.col(".in-rows li",1),children:[
@@ -56,21 +56,21 @@ return P(x.View,{style:[a.view(".in-rows li"),d],testID:`everfur-intro-row-${e}`
56
56
  /* @__PURE__ */z(IntroButton,{kit:a,label:m.ask.later,onPress:fe,rules:[".emb-btn--ghost"],style:a.col(".in-pair",0),testID:"everfur-intro-later"}),
57
57
  /* @__PURE__ */z(IntroButton,{kit:a,label:m.ask.connect,onPress:()=>ue("clinic"),style:a.col(".in-pair",1),testID:"everfur-intro-connect"})]}),
58
58
  /* @__PURE__ */z(IntroLine,{kit:a,words:m.ask.fine,rules:[".in-fine"]}),
59
- /* @__PURE__ */z(IntroLink,{kit:a,label:m.ask.noVet,onPress:()=>ue("novet"),testID:"everfur-intro-novet"})]});else if(k==="clinic")Pe=/* @__PURE__ */z(No,{ref:Y,kit:a,text:m.clinic,onPick:e=>{D(fo(O.current,e)),ue("consent")},...be===void 0?{}:{onUpload:be}});else if(k==="consent")Pe=E===null?null:/* @__PURE__ */z(IntroConsentFrame,{petRef:petRef,...g.pet.name==="your pet"?{}:{petName:g.pet.name},draft:E,...e.ownerName===void 0?{}:{ownerName:e.ownerName},...e.onCaptureSignature===void 0?{}:{onCaptureSignature:e.onCaptureSignature},onCreated:Se});else if(k==="sent"){let e=[[m.sent.sentStep,N===""?"":m.sent.sentTo(N),"done"],[m.sent.clinicStep,m.sent.clinicEta,"now"],[m.sent.blanksStep,m.sent.blanksDetail,""]];Pe=/* @__PURE__ */P(B,{children:[De(m.sent.eyebrow),Oe(m.sent.title),
59
+ /* @__PURE__ */z(IntroLink,{kit:a,label:m.ask.noVet,onPress:()=>ue("novet"),testID:"everfur-intro-novet"})]});else if(k==="clinic")Pe=/* @__PURE__ */z($o,{ref:Y,kit:a,text:m.clinic,onPick:e=>{D(ho(O.current,e)),ue("consent")},...be===void 0?{}:{onUpload:be}});else if(k==="consent")Pe=E===null?null:/* @__PURE__ */z(IntroConsentFrame,{petRef:petRef,...g.pet.name==="your pet"?{}:{petName:g.pet.name},draft:E,...e.ownerName===void 0?{}:{ownerName:e.ownerName},...e.onCaptureSignature===void 0?{}:{onCaptureSignature:e.onCaptureSignature},onCreated:Se});else if(k==="sent"){let e=[[m.sent.sentStep,N===""?"":m.sent.sentTo(N),"done"],[m.sent.clinicStep,m.sent.clinicEta,"now"],[m.sent.blanksStep,m.sent.blanksDetail,""]];Pe=/* @__PURE__ */P(B,{children:[De(m.sent.eyebrow),Oe(m.sent.title),
60
60
  /* @__PURE__ */z(y,{style:a.view(".in-sent"),children:/* @__PURE__ */z(Track,{kit:a,label:m.sent.track,steps:e.filter(([e])=>e!=="")})}),
61
61
  /* @__PURE__ */z(IntroLine,{kit:a,words:m.sent.lede,rules:[".in-p"]}),
62
62
  /* @__PURE__ */P(y,{style:a.view(".in-stack"),children:[
63
63
  /* @__PURE__ */z(IntroButton,{kit:a,label:m.sent.notify,icon:"bell",busy:L,onPress:()=>{ye()},rules:[".emb-btn--block"],testID:"everfur-intro-notify"}),
64
64
  /* @__PURE__ */z(IntroButton,{kit:a,label:m.sent.notNow,onPress:()=>he(false),rules:[".emb-btn--block",".emb-btn--ghost"],testID:"everfur-intro-not-now"})]}),
65
65
  /* @__PURE__ */z(IntroLine,{kit:a,words:m.sent.fine,rules:[".in-fine"]})]})}else Pe=/* @__PURE__ */P(B,{children:[De(m.tabs.eyebrow),Oe(m.noVet.title),ze(m.noVet.lede,m.noVet.title===""),
66
- /* @__PURE__ */z(IntroButton,{kit:a,label:m.noVet.seePlan,onPress:()=>pe("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-novet-plan"})]});let Be=k==="consent",Ne=[a.view(".in-sheet",".ph-intro.is-on .in-sheet"),Fe===void 0?null:Be?{height:Fe}:{maxHeight:Fe},Te],$e={accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};/* @__PURE__ */
67
- return z(F,{transparent:true,visible:true,animationType:"none",statusBarTranslucent:true,onRequestClose:ve,children:/* @__PURE__ */P(y,{style:{flex:1},onLayout:e=>U(Math.round(e.nativeEvent.layout.height)),testID:e.testID??"everfur-intro",children:[
66
+ /* @__PURE__ */z(IntroButton,{kit:a,label:m.noVet.seePlan,onPress:()=>pe("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-novet-plan"})]});let Be=k==="consent",Ne=[a.view(".in-sheet",".ph-intro.is-on .in-sheet"),Re===void 0?null:Be?{height:Re}:{maxHeight:Re},Te],$e={accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};/* @__PURE__ */
67
+ return z(R,{transparent:true,visible:true,animationType:"none",statusBarTranslucent:true,onRequestClose:ve,children:/* @__PURE__ */P(y,{style:{flex:1},onLayout:e=>U(Math.round(e.nativeEvent.layout.height)),testID:e.testID??"everfur-intro",children:[
68
68
  /* @__PURE__ */z(x.View,{...$e,pointerEvents:"none",style:[a.view(".in-dim",".in-dim--top"),{height:xe,opacity:X}]}),
69
69
  /* @__PURE__ */z(x.View,{...$e,pointerEvents:"none",style:[a.view(".in-dim"),{top:xe,height:Ce,opacity:ee}]}),
70
70
  /* @__PURE__ */z(x.View,{...$e,pointerEvents:"none",style:[a.view(".in-dim",".in-dim--bot"),{top:xe+Ce,opacity:X}]}),
71
- /* @__PURE__ */z(R,{behavior:Ko?"padding":void 0,enabled:!Be,pointerEvents:"box-none",style:{position:"absolute",top:0,right:0,bottom:0,left:0},children:/* @__PURE__ */P(x.View,{accessibilityViewIsModal:true,accessibilityLabel:o==="intro"?m.sheetLabel.intro:m.sheetLabel.records,style:Ne,onLayout:de,onTouchStart:()=>{K.current=Date.now()},..._e.panHandlers,testID:"everfur-intro-sheet",children:[
71
+ /* @__PURE__ */z(F,{behavior:Yo?"padding":void 0,enabled:!Be,pointerEvents:"box-none",style:{position:"absolute",top:0,right:0,bottom:0,left:0},children:/* @__PURE__ */P(x.View,{accessibilityViewIsModal:true,accessibilityLabel:o==="intro"?m.sheetLabel.intro:m.sheetLabel.records,style:Ne,onLayout:de,onTouchStart:()=>{K.current=Date.now()},..._e.panHandlers,testID:"everfur-intro-sheet",children:[
72
72
  /* @__PURE__ */z(y,{...$e,style:a.view(".in-grab")}),
73
- /* @__PURE__ */P(y,{style:a.view(".in-top",o==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[Re?/* @__PURE__ */z(v,{ref:G,accessibilityRole:"button",accessibilityLabel:m.back,style:a.view(".in-back"),onPress:()=>ue(k==="consent"?"clinic":"ask",true),testID:"everfur-intro-back",children:/* @__PURE__ */z(IntroIcon,{name:"back",style:a.icon(".in-back svg")})}):null,o==="intro"?/* @__PURE__ */z(Bars,{kit:a,fill:ie}):null,Ae&&o==="intro"?/* @__PURE__ */z(v,{accessibilityRole:"button",style:[a.view(".in-skip"),{justifyContent:"center"}],onPress:fe,testID:"everfur-intro-skip",children:/* @__PURE__ */z(Text,{tier:"control",style:a.text(".in-skip"),children:m.skip})}):null,Ae&&o==="records"?/* @__PURE__ */z(v,{accessibilityRole:"button",accessibilityLabel:m.close,style:a.view(".in-x"),onPress:fe,testID:"everfur-intro-close",children:/* @__PURE__ */z(IntroIcon,{name:"x",style:a.icon(".in-x svg")})}):null]}),Be?/* @__PURE__ */z(y,{style:{flex:1},children:Pe}):/* @__PURE__ */z(A,{style:{flexGrow:0,flexShrink:1},bounces:false,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEventThrottle:16,onScroll:e=>{H.current=e.nativeEvent.contentOffset.y},children:/* @__PURE__ */z(x.View,{style:[a.view(".in-body"),Ee],testID:`everfur-intro-frame-${k}`,children:Pe})},k)]})})]})})}function Bars({kit:e,fill:t}){let n=t.interpolate({inputRange:[0,1],outputRange:["0%","100%"]}),r=[e.view(".in-bars b::after"),{right:void 0}];/* @__PURE__ */
73
+ /* @__PURE__ */P(y,{style:a.view(".in-top",o==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[Fe?/* @__PURE__ */z(v,{ref:G,accessibilityRole:"button",accessibilityLabel:m.back,style:a.view(".in-back"),onPress:()=>ue(k==="consent"?"clinic":"ask",true),testID:"everfur-intro-back",children:/* @__PURE__ */z(IntroIcon,{name:"back",style:a.icon(".in-back svg")})}):null,o==="intro"?/* @__PURE__ */z(Bars,{kit:a,fill:ie}):null,Ae&&o==="intro"?/* @__PURE__ */z(v,{accessibilityRole:"button",style:[a.view(".in-skip"),{justifyContent:"center"}],onPress:fe,testID:"everfur-intro-skip",children:/* @__PURE__ */z(Text,{tier:"control",style:a.text(".in-skip"),children:m.skip})}):null,Ae&&o==="records"?/* @__PURE__ */z(v,{accessibilityRole:"button",accessibilityLabel:m.close,style:a.view(".in-x"),onPress:fe,testID:"everfur-intro-close",children:/* @__PURE__ */z(IntroIcon,{name:"x",style:a.icon(".in-x svg")})}):null]}),Be?/* @__PURE__ */z(y,{style:{flex:1},children:Pe}):/* @__PURE__ */z(A,{style:{flexGrow:0,flexShrink:1},bounces:false,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEventThrottle:16,onScroll:e=>{H.current=e.nativeEvent.contentOffset.y},children:/* @__PURE__ */z(x.View,{style:[a.view(".in-body"),Ee],testID:`everfur-intro-frame-${k}`,children:Pe})},k)]})})]})})}function Bars({kit:e,fill:t}){let n=t.interpolate({inputRange:[0,1],outputRange:["0%","100%"]}),r=[e.view(".in-bars b::after"),{right:void 0}];/* @__PURE__ */
74
74
  return P(y,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view(".in-bars"),children:[
75
75
  /* @__PURE__ */z(y,{style:e.view(".in-bars b"),children:/* @__PURE__ */z(y,{style:[...r,{width:"100%"}]})}),
76
76
  /* @__PURE__ */z(y,{style:e.view(".in-bars b"),children:/* @__PURE__ */z(x.View,{style:[...r,{width:n}],testID:"everfur-intro-bar-2"})})]})}function Blanks({kit:e,title:t,pill:n,label:r,blanks:o,pulses:i}){let a=e.colors.accent4??"",l=e.colors.accent2??a;/* @__PURE__ */
@@ -82,35 +82,35 @@ return P(y,{style:e.view(".blanks li"),testID:`everfur-intro-blank-${n}`,childre
82
82
  /* @__PURE__ */z(y,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[e.view(".blanks li > b"),e.col(".blanks li",0)],children:/* @__PURE__ */z(Text,{style:e.text(".blanks li > b"),children:n+1})}),
83
83
  /* @__PURE__ */P(y,{style:e.col(".blanks li",1),children:[
84
84
  /* @__PURE__ */P(Text,{accessibilityLabel:`${t.before}${r}${t.after}`,style:e.text(".blanks li > span"),children:[t.before,
85
- /* @__PURE__ */z(x.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:To.blankDrop,marginTop:-3},s]}),t.after]}),t.source===""?null:/* @__PURE__ */z(Text,{style:e.text(".blanks li > small"),children:t.source})]})]},n)})})]})}function Track({kit:e,label:t,steps:n}){/* @__PURE__ */
85
+ /* @__PURE__ */z(x.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:Eo.blankDrop,marginTop:-3},s]}),t.after]}),t.source===""?null:/* @__PURE__ */z(Text,{style:e.text(".blanks li > small"),children:t.source})]})]},n)})})]})}function Track({kit:e,label:t,steps:n}){/* @__PURE__ */
86
86
  return z(y,{accessibilityRole:"list",accessibilityLabel:t,style:e.view(".sh-track"),children:n.map(([t,r,o],i)=>{let a=i===n.length-1,l=n[i+1]?.[2]==="done";/* @__PURE__ */
87
87
  return P(y,{style:e.view(".sh-track li",".in-sent .sh-track li",a&&".sh-track li:last-child",a&&".in-sent .sh-track li:last-child"),children:[a?null:/* @__PURE__ */z(y,{style:e.view(".sh-track li::before",o==="done"&&l&&".sh-track li.is-done:has(+ li.is-done)::before")}),
88
88
  /* @__PURE__ */z(y,{style:[e.view(".sh-track__dot",o==="done"&&".sh-track .is-done .sh-track__dot",o==="now"&&".sh-track .is-now .sh-track__dot"),e.col(".sh-track li",0)],children:o==="done"?/* @__PURE__ */z(IntroIcon,{name:"check",style:e.icon(".sh-track__dot svg")}):null}),
89
89
  /* @__PURE__ */P(y,{style:e.col(".sh-track li",1),children:[
90
- /* @__PURE__ */z(Text,{style:e.text(".sh-track strong",o===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */z(Text,{style:[e.view(".sh-track small"),e.text(".sh-track small")],children:r})]})]},t)})})}function PlanProbe({petRef:petRef,pagePhase:e,page:t,refreshPage:n,watching:r,onPlan:o,onPlanFailed:i}){let{status:a,plan:l,refresh:d}=useEverfurHealthPlan({petRef:petRef}),c=s(null),p=s({plan:d,page:n,watching:r});p.current={plan:d,page:n,watching:r},u(()=>{let n=Qt(a,e);(a==="failed"||n)&&(c.current=Date.now()),n?o(petRef,{empty:Zt(a,t),signature:Jt(l,t)}):a==="failed"&&i(petRef)},[a,l,e,t,petRef,o,i]);let f=s(()=>{});return f.current=e=>{let t=p.current;Ht({pageVisible:e,watching:t.watching,lastReadAt:c.current,now:Date.now()})&&(c.current=null,t.plan(),t.page())},u(()=>{let e=E.addEventListener("change",e=>{e==="active"&&f.current(true)});return()=>e.remove()},[]),u(()=>{r&&f.current(E.currentState!=="background")},[r]),null}function RecordsProbe({petRef:petRef,onRecords:e}){let{status:t}=useEverfurRecords({petRef:petRef});return u(()=>{e(petRef,t==="empty"?"none":t==="populated"?"some":null)},[t,petRef,e]),null}var Qo=6e3,Zo=50,Xo=w.OS!=="web";function EverfurRecordsLandedBanner({text:e,icon:t,onLand:n,testID:r}){let o=useEverfurTheme(),i=c(()=>$o(o),[o]),[a,l]=d(0),p=s(new x.Value(0)).current,f=s(false),h=s(false),g=s(n);g.current=n,u(()=>{let e=setTimeout(()=>{h.current||(h.current=true,g.current())},Qo);return()=>clearTimeout(e)},[]);let b=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==a&&l(t),f.current)return;f.current=true;let n=i.motion(".ph-banner",".ph-banner.is-on");x.timing(p,{toValue:1,duration:n.dur,easing:i.reduced?k.bezier(.25,.1,.25,1):k.bezier(...Ro),useNativeDriver:Xo}).start()},m=-((a>0?a:200)-To.bannerY),w=i.reduced?{opacity:p}:{transform:[{translateY:p.interpolate({inputRange:[0,1],outputRange:[m,0]})}]},{position:_,left:S,right:C,zIndex:F,top:R,...A}=i.view(".ph-banner",".ph-banner.is-on"),I=typeof R=="number"?Math.max(0,R-Zo):0;/* @__PURE__ */
91
- return z(x.View,{pointerEvents:"box-none",style:[{position:_,left:S,right:C,zIndex:F,top:I},w],onLayout:b,children:/* @__PURE__ */P(v,{accessibilityRole:"button",accessibilityLiveRegion:"polite",onPress:()=>{h.current||(h.current=true,n())},style:A,testID:r??"everfur-records-banner",children:[
90
+ /* @__PURE__ */z(Text,{style:e.text(".sh-track strong",o===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */z(Text,{style:[e.view(".sh-track small"),e.text(".sh-track small")],children:r})]})]},t)})})}function PlanProbe({petRef:petRef,pagePhase:e,page:t,refreshPage:n,watching:r,onPlan:o,onPlanFailed:i}){let{status:a,plan:l,refresh:d}=useEverfurHealthPlan({petRef:petRef}),c=s(null),p=s({plan:d,page:n,watching:r});p.current={plan:d,page:n,watching:r},u(()=>{let n=Zt(a,e);(a==="failed"||n)&&(c.current=Date.now()),n?o(petRef,{empty:Xt(a,t),signature:Qt(l,t)}):a==="failed"&&i(petRef)},[a,l,e,t,petRef,o,i]);let f=s(()=>{});return f.current=e=>{let t=p.current;Kt({pageVisible:e,watching:t.watching,lastReadAt:c.current,now:Date.now()})&&(c.current=null,t.plan(),t.page())},u(()=>{let e=E.addEventListener("change",e=>{e==="active"&&f.current(true)});return()=>e.remove()},[]),u(()=>{r&&f.current(E.currentState!=="background")},[r]),null}function RecordsProbe({petRef:petRef,onRecords:e}){let{status:t}=useEverfurRecords({petRef:petRef});return u(()=>{e(petRef,t==="empty"?"none":t==="populated"?"some":null)},[t,petRef,e]),null}var Zo=6e3,Xo=50,ei=w.OS!=="web";function EverfurRecordsLandedBanner({text:e,icon:t,onLand:n,testID:r}){let o=useEverfurTheme(),i=c(()=>Lo(o),[o]),[a,l]=d(0),p=s(new x.Value(0)).current,f=s(false),h=s(false),g=s(n);g.current=n,u(()=>{let e=setTimeout(()=>{h.current||(h.current=true,g.current())},Zo);return()=>clearTimeout(e)},[]);let b=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==a&&l(t),f.current)return;f.current=true;let n=i.motion(".ph-banner",".ph-banner.is-on");x.timing(p,{toValue:1,duration:n.dur,easing:i.reduced?k.bezier(.25,.1,.25,1):k.bezier(...Ao),useNativeDriver:ei}).start()},m=-((a>0?a:200)-Eo.bannerY),w=i.reduced?{opacity:p}:{transform:[{translateY:p.interpolate({inputRange:[0,1],outputRange:[m,0]})}]},{position:_,left:S,right:C,zIndex:R,top:F,...A}=i.view(".ph-banner",".ph-banner.is-on"),I=typeof F=="number"?Math.max(0,F-Xo):0;/* @__PURE__ */
91
+ return z(x.View,{pointerEvents:"box-none",style:[{position:_,left:S,right:C,zIndex:R,top:I},w],onLayout:b,children:/* @__PURE__ */P(v,{accessibilityRole:"button",accessibilityLiveRegion:"polite",onPress:()=>{h.current||(h.current=true,n())},style:A,testID:r??"everfur-records-banner",children:[
92
92
  /* @__PURE__ */z(y,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[i.view(".ph-banner__app"),i.col(".ph-banner",0)],children:t}),
93
93
  /* @__PURE__ */P(y,{style:i.col(".ph-banner",1),children:[
94
94
  /* @__PURE__ */P(y,{style:i.view(".ph-banner__meta"),children:[e.app===""?/* @__PURE__ */z(y,{}):/* @__PURE__ */z(Text,{tier:"compact",style:i.text(".ph-banner__meta",".ph-banner__meta strong"),children:e.app}),
95
95
  /* @__PURE__ */z(Text,{tier:"compact",style:i.text(".ph-banner__meta"),children:e.now})]}),
96
- /* @__PURE__ */z(Text,{style:[i.view(".ph-banner__txt > strong"),i.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */z(Text,{style:i.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var ei={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function ti(e){return{width:e,height:e,alignItems:"center",justifyContent:"center"}}function ni(e,t){return t??Math.max(1.5,Math.round(e/11*10)/10)}function Ring({size:e,strokeWidth:t,color:n,children:r}){/* @__PURE__ */
97
- return z(y,{style:[ti(e),{borderRadius:e/2,borderWidth:t??m.hairlineWidth,borderColor:n}],children:r})}function ArrowUpGlyph({size:e,color:t,strokeWidth:n,testID:r}){let o=ni(e,n),i=e*.46;/* @__PURE__ */
98
- return P(y,{style:ti(e),testID:r,...ei,children:[
96
+ /* @__PURE__ */z(Text,{style:[i.view(".ph-banner__txt > strong"),i.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */z(Text,{style:i.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var ti={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function ni(e){return{width:e,height:e,alignItems:"center",justifyContent:"center"}}function ri(e,t){return t??Math.max(1.5,Math.round(e/11*10)/10)}function Ring({size:e,strokeWidth:t,color:n,children:r}){/* @__PURE__ */
97
+ return z(y,{style:[ni(e),{borderRadius:e/2,borderWidth:t??m.hairlineWidth,borderColor:n}],children:r})}function ArrowUpGlyph({size:e,color:t,strokeWidth:n,testID:r}){let o=ri(e,n),i=e*.46;/* @__PURE__ */
98
+ return P(y,{style:ni(e),testID:r,...ti,children:[
99
99
  /* @__PURE__ */z(y,{style:{position:"absolute",top:e*.16,bottom:e*.12,width:o,borderRadius:o,backgroundColor:t}}),
100
- /* @__PURE__ */z(y,{style:{position:"absolute",top:e*.16+o/2,width:i,height:i,borderLeftWidth:o,borderTopWidth:o,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var ri={".ph-head":{flexGrow:0,flexShrink:0,height:58,alignItems:"center",paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,position:"relative",zIndex:6,backgroundColor:"$paper"},".ph-head__start":{flexDirection:"row",alignItems:"center",minWidth:0},".ph-head__end":{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginRight:-6,gap:10},".ph-pet":{flexDirection:"row",alignItems:"center",minHeight:44,fontSize:17,color:"$ink2",gap:9},".ph-pet img":{width:36,height:36,round:1},".ph-back":{display:"none",width:44,height:44,marginLeft:-6,alignItems:"center",justifyContent:"center"},".ph-back svg":{width:26,height:26},".ph-mark":{width:31,height:29,color:"$accent"},".ph-lockup":{display:"none",alignItems:"center",gap:9},".ph-lockup .ph-mark":{width:26,height:25},".ph-lockup__rule":{width:1,height:24,backgroundColor:"$n_D9D6D0"},".ph-lockup__by":{family:"$mono",fontSize:9,lh:1,color:"$ink3",gap:0},".ph-lockup__by svg":{width:62,height:22,marginTop:-1,marginRight:0,marginBottom:-6,marginLeft:0,color:"$byInk"},".ph-title":{display:"none",fontSize:17,fontWeight:"800",nowrap:1},'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup':{flexDirection:"row"},".askbar":{flexDirection:"row",alignItems:"center",height:52,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:8,borderRadius:999,backgroundColor:"$card",ring:[1.5,"$ink"],gap:6},".askbar input":{flex:1,minWidth:0,height:"100%",borderWidth:0,backgroundColor:"transparent",fontSize:16},".askbar__send":{width:40,height:40,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$primary",color:"$onPrimary",flexGrow:0,flexShrink:0,dur:160,ease:[.23,1,.32,1]},".askbar__send svg":{width:20,height:20},".askbar__send[disabled]":{opacity:.3},".ph-askbar":{flexGrow:0,flexShrink:0,paddingTop:10,paddingRight:14,paddingBottom:10,paddingLeft:14,backgroundColor:"$paper"}};var oi=/* @__PURE__ */new WeakMap;function ii(e){let t=oi.get(e);if(t!==void 0)return t;let n=Tr(e,ri);return oi.set(e,n),n}function ShellIcon({name:e,style:t}){let n=Eo[e];/* @__PURE__ */
101
- return z(S,{source:{uri:n.uri,width:n.width*3,height:n.height*3},style:[{width:n.width,height:n.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}var ai=1.35;function ShellAskBar({placeholder:e,field:t,send:n,onAsk:r,testID:o}){let i=useEverfurTheme(),a=ii(i),[l,s]=d(""),c=i.slots.composerInput,u=i.slots.sendButton,p=l.trim()==="",f=()=>{let e=l.trim();e!==""&&(s(""),r(e))},h=a.view(".askbar__send");/* @__PURE__ */
100
+ /* @__PURE__ */z(y,{style:{position:"absolute",top:e*.16+o/2,width:i,height:i,borderLeftWidth:o,borderTopWidth:o,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var oi={".ph-head":{flexGrow:0,flexShrink:0,height:58,alignItems:"center",paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,position:"relative",zIndex:6,backgroundColor:"$paper"},".ph-head__start":{flexDirection:"row",alignItems:"center",minWidth:0},".ph-head__end":{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginRight:-6,gap:10},".ph-pet":{flexDirection:"row",alignItems:"center",minHeight:44,fontSize:17,color:"$ink2",gap:9},".ph-pet img":{width:36,height:36,round:1},".ph-back":{display:"none",width:44,height:44,marginLeft:-6,alignItems:"center",justifyContent:"center"},".ph-back svg":{width:26,height:26},".ph-mark":{width:31,height:29,color:"$accent"},".ph-lockup":{display:"none",alignItems:"center",gap:9},".ph-lockup .ph-mark":{width:26,height:25},".ph-lockup__rule":{width:1,height:24,backgroundColor:"$n_D9D6D0"},".ph-lockup__by":{family:"$mono",fontSize:9,lh:1,color:"$ink3",gap:0},".ph-lockup__by svg":{width:62,height:22,marginTop:-1,marginRight:0,marginBottom:-6,marginLeft:0,color:"$byInk"},".ph-title":{display:"none",fontSize:17,fontWeight:"800",nowrap:1},'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup':{flexDirection:"row"},".askbar":{flexDirection:"row",alignItems:"center",height:52,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:8,borderRadius:999,backgroundColor:"$card",ring:[1.5,"$ink"],gap:6},".askbar input":{flex:1,minWidth:0,height:"100%",borderWidth:0,backgroundColor:"transparent",fontSize:16},".askbar__send":{width:40,height:40,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$primary",color:"$onPrimary",flexGrow:0,flexShrink:0,dur:160,ease:[.23,1,.32,1]},".askbar__send svg":{width:20,height:20},".askbar__send[disabled]":{opacity:.3},".ph-askbar":{flexGrow:0,flexShrink:0,paddingTop:10,paddingRight:14,paddingBottom:10,paddingLeft:14,backgroundColor:"$paper"}};var ii=/* @__PURE__ */new WeakMap;function ai(e){let t=ii.get(e);if(t!==void 0)return t;let n=Er(e,oi);return ii.set(e,n),n}function ShellIcon({name:e,style:t}){let n=Do[e];/* @__PURE__ */
101
+ return z(S,{source:{uri:n.uri,width:n.width*3,height:n.height*3},style:[{width:n.width,height:n.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}var li=1.35;function ShellAskBar({placeholder:e,field:t,send:n,onAsk:r,testID:o}){let i=useEverfurTheme(),a=ai(i),[l,s]=d(""),c=i.slots.composerInput,u=i.slots.sendButton,p=l.trim()==="",f=()=>{let e=l.trim();e!==""&&(s(""),r(e))},h=a.view(".askbar__send");/* @__PURE__ */
102
102
  return z(y,{style:a.view(".ph-askbar"),testID:o,children:/* @__PURE__ */P(y,{style:[a.view(".askbar"),{height:void 0,minHeight:52},c?.backgroundColor===void 0?null:{backgroundColor:c.backgroundColor},c?.borderColor===void 0?null:{borderColor:c.borderColor}],children:[
103
- /* @__PURE__ */z(Vn,{value:l,onChangeText:s,placeholder:e,placeholderTextColor:c?.textColor??i.color.text.placeholder,accessibilityLabel:t,onSubmitEditing:f,returnKeyType:"send",maxFontSizeMultiplier:ai,style:[a.text(".askbar input"),{flex:1,minWidth:0,paddingVertical:12,color:c?.textColor??a.colors.ink}],testID:`${o}-input`}),
104
- /* @__PURE__ */z(v,{onPress:f,disabled:p,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:p},style:[h,u?.backgroundColor===void 0?null:{backgroundColor:u.backgroundColor}],testID:`${o}-send`,children:/* @__PURE__ */z(ArrowUpGlyph,{size:20,color:u?.textColor??a.colors.onPrimary??i.color.surface})})]})})}function li(e){let[t,n]=d(null);return{shown:e!==null&&t!==e,onError:()=>n(e)}}function BrandImage({uri:e,label:t,decorative:n=false,style:r,resizeMode:o="contain",fallback:i=null,onError:a,testID:l}){let s=li(e);if(e===null||!s.shown)return i;let d=n?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...t===void 0?{}:{accessibilityLabel:t}};/* @__PURE__ */
105
- return z(S,{source:{uri:e},style:r,resizeMode:o,...d,onError:()=>{s.onError(),a?.()},...l===void 0?{}:{testID:l}})}function si(e){return[e.surface,e.surfaceCream,e.surfaceSubtle,e.background,e.chatGround,e.composerFill]}function di(e){if(e.brightness!=="light")return false;let t=Nn.color,n=e.color,r=(e,t)=>parseColor(e)===parseColor(t),o=new Set(si(t));return r(n.brand,t.brand)&&r(n.accent,t.accent)&&si(n).every(e=>o.has(e))}var ci=/* @__PURE__ */Object.freeze([
103
+ /* @__PURE__ */z(Mn,{value:l,onChangeText:s,placeholder:e,placeholderTextColor:c?.textColor??i.color.text.placeholder,accessibilityLabel:t,onSubmitEditing:f,returnKeyType:"send",maxFontSizeMultiplier:li,style:[a.text(".askbar input"),{flex:1,minWidth:0,paddingVertical:12,color:c?.textColor??a.colors.ink}],testID:`${o}-input`}),
104
+ /* @__PURE__ */z(v,{onPress:f,disabled:p,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:p},style:[h,u?.backgroundColor===void 0?null:{backgroundColor:u.backgroundColor}],testID:`${o}-send`,children:/* @__PURE__ */z(ArrowUpGlyph,{size:20,color:u?.textColor??a.colors.onPrimary??i.color.surface})})]})})}function si(e){let[t,n]=d(null);return{shown:e!==null&&t!==e,onError:()=>n(e)}}function BrandImage({uri:e,label:t,decorative:n=false,style:r,resizeMode:o="contain",fallback:i=null,onError:a,testID:l}){let s=si(e);if(e===null||!s.shown)return i;let d=n?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...t===void 0?{}:{accessibilityLabel:t}};/* @__PURE__ */
105
+ return z(S,{source:{uri:e},style:r,resizeMode:o,...d,onError:()=>{s.onError(),a?.()},...l===void 0?{}:{testID:l}})}function di(e){return[e.surface,e.surfaceCream,e.surfaceSubtle,e.background,e.chatGround,e.composerFill]}function ci(e){if(e.brightness!=="light")return false;let t=$n.color,n=e.color,r=(e,t)=>parseColor(e)===parseColor(t),o=new Set(di(t));return r(n.brand,t.brand)&&r(n.accent,t.accent)&&di(n).every(e=>o.has(e))}var ui=/* @__PURE__ */Object.freeze([
106
106
  /* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
107
107
  /* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
108
108
  /* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
109
109
  /* @__PURE__ */Object.freeze({background:"#bde7c5",foreground:"#0e3b22"}),
110
110
  /* @__PURE__ */Object.freeze({background:"#dcc7f4",foreground:"#3a1d6a"}),
111
- /* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function ui(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return ci[t%ci.length]}function pi(e){let t=(e??"").trim();return(Array.from(t)[0]??"?").toUpperCase()}function fi(e){return{...ui(e.petRef),initial:pi(e.name)}}function hi(e,t,n){let r=fi(e);return t?r:{background:n.fill,foreground:n.ink,initial:r.initial}}function gi(e){return Math.max(12,Math.round(e*.42))}function PetDisc({pet:e,size:t,ringStroke:n}){let r=useEverfurTheme(),o=c(()=>bi(r),[r]),i=t-n*2,a=e===null?null:hi(e,di(r),{fill:r.color.highlight,ink:r.color.onHighlight}),l=gi(i);/* @__PURE__ */
112
- return z(Ring,{size:t,strokeWidth:n,color:r.color.mark,children:/* @__PURE__ */z(y,{style:[o.disc,{width:i,height:i,borderRadius:i/2},a===null?o.discEmpty:{backgroundColor:a.background}],children:/* @__PURE__ */z(Text,{tier:"badge",style:[o.letter,{fontSize:l,lineHeight:Math.round(l*1.2),color:a===null?r.color.text.muted:a.foreground}],children:a===null?pi(null):a.initial})})})}function bi(e){return m.create({disc:{alignItems:"center",justifyContent:"center",overflow:"hidden"},discEmpty:{backgroundColor:e.color.brandSoft},letter:{...face(e,"bold"),textAlign:"center",includeFontPadding:false}})}var mi=/* @__PURE__ */Object.freeze({planPlaceholder:"Ask what’s right for {petName}…",recordsPlaceholder:"Ask about {petName}’s records…",field:"Message",send:"Send",back:"Back",poweredBy:"powered by",poweredByLabel:"powered by Everfur",notificationKicker:"Notification · {time}"});function yi(e){if(e===void 0)return mi;let t={...mi};for(let n of Object.keys(mi)){let r=e[n];typeof r=="string"&&r.trim().length>0&&(t[n]=r)}/* @__PURE__ */
113
- return Object.freeze(t)}function vi(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,n)=>t[n]??"")}var ki=360;function ShellHeader({options:e,tab:n,pushed:r,petRef:petRef,petName:o,copy:i,onInboxOpen:a}){let l=useEverfurTheme(),s=ii(l),{width:c}=D(),[u,p]=d(false),f=l.slots.header,h=f?.backgroundColor??s.colors.paper??l.color.surface,g=f?.textColor??s.colors.ink??l.color.text.primary,b=n==="ask"&&r===null,m=b?".ph-lockup .ph-mark":".ph-mark",k=e.mark??(l.meta.logoUrl===null?null:/* @__PURE__ */z(BrandImage,{uri:l.meta.logoUrl,label:l.meta.displayName,decorative:b,style:s.icon(m)})),w=r!==null?/* @__PURE__ */z(v,{onPress:r.onBack,accessibilityRole:"button",accessibilityLabel:i.back,hitSlop:4,style:[s.view(".ph-back"),{display:"flex"}],testID:"everfur-shell-back",children:/* @__PURE__ */z(ShellIcon,{name:"back",style:[s.icon(".ph-back svg"),{tintColor:g}]})}):/* @__PURE__ */z(Pet,{options:e,kit:s,petRef:petRef,petName:o,ink:g}),_=r!==null?/* @__PURE__ */z(Text,{tier:"heading",numberOfLines:1,accessibilityRole:"header",style:[s.text(".ph-title"),{display:"flex",color:g,textAlign:"center"}],testID:"everfur-shell-title",children:r.title}):b?/* @__PURE__ */z(t,{children:/* @__PURE__ */P(y,{accessible:true,accessibilityLabel:vi("{name}, {by}",{name:l.meta.displayName,by:i.poweredByLabel}),style:[s.view(".ph-lockup",'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup'),{display:"flex"}],testID:"everfur-shell-lockup",children:[k,c>=ki?/* @__PURE__ */P(B,{children:[
111
+ /* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function pi(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return ui[t%ui.length]}function fi(e){let t=(e??"").trim();return(Array.from(t)[0]??"?").toUpperCase()}function hi(e){return{...pi(e.petRef),initial:fi(e.name)}}function gi(e,t,n){let r=hi(e);return t?r:{background:n.fill,foreground:n.ink,initial:r.initial}}function bi(e){return Math.max(12,Math.round(e*.42))}function PetDisc({pet:e,size:t,ringStroke:n}){let r=useEverfurTheme(),o=c(()=>mi(r),[r]),i=t-n*2,a=e===null?null:gi(e,ci(r),{fill:r.color.highlight,ink:r.color.onHighlight}),l=bi(i);/* @__PURE__ */
112
+ return z(Ring,{size:t,strokeWidth:n,color:r.color.mark,children:/* @__PURE__ */z(y,{style:[o.disc,{width:i,height:i,borderRadius:i/2},a===null?o.discEmpty:{backgroundColor:a.background}],children:/* @__PURE__ */z(Text,{tier:"badge",style:[o.letter,{fontSize:l,lineHeight:Math.round(l*1.2),color:a===null?r.color.text.muted:a.foreground}],children:a===null?fi(null):a.initial})})})}function mi(e){return m.create({disc:{alignItems:"center",justifyContent:"center",overflow:"hidden"},discEmpty:{backgroundColor:e.color.brandSoft},letter:{...face(e,"bold"),textAlign:"center",includeFontPadding:false}})}var yi=/* @__PURE__ */Object.freeze({planPlaceholder:"Ask what’s right for {petName}…",recordsPlaceholder:"Ask about {petName}’s records…",field:"Message",send:"Send",back:"Back",poweredBy:"powered by",poweredByLabel:"powered by Everfur",notificationKicker:"Notification · {time}"});function vi(e){if(e===void 0)return yi;let t={...yi};for(let n of Object.keys(yi)){let r=e[n];typeof r=="string"&&r.trim().length>0&&(t[n]=r)}/* @__PURE__ */
113
+ return Object.freeze(t)}function ki(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,n)=>t[n]??(n==="pet"?t.petName:void 0)??"")}var wi=360;function ShellHeader({options:e,tab:n,pushed:r,petRef:petRef,petName:o,copy:i,onInboxOpen:a}){let l=useEverfurTheme(),s=ai(l),{width:c}=D(),[u,p]=d(false),f=l.slots.header,h=f?.backgroundColor??s.colors.paper??l.color.surface,g=f?.textColor??s.colors.ink??l.color.text.primary,b=n==="ask"&&r===null,m=b?".ph-lockup .ph-mark":".ph-mark",k=e.mark??(l.meta.logoUrl===null?null:/* @__PURE__ */z(BrandImage,{uri:l.meta.logoUrl,label:l.meta.displayName,decorative:b,style:s.icon(m)})),w=r!==null?/* @__PURE__ */z(v,{onPress:r.onBack,accessibilityRole:"button",accessibilityLabel:i.back,hitSlop:4,style:[s.view(".ph-back"),{display:"flex"}],testID:"everfur-shell-back",children:/* @__PURE__ */z(ShellIcon,{name:"back",style:[s.icon(".ph-back svg"),{tintColor:g}]})}):/* @__PURE__ */z(Pet,{options:e,kit:s,petRef:petRef,petName:o,ink:g}),_=r!==null?/* @__PURE__ */z(Text,{tier:"heading",numberOfLines:1,accessibilityRole:"header",style:[s.text(".ph-title"),{display:"flex",color:g,textAlign:"center"}],testID:"everfur-shell-title",children:r.title}):b?/* @__PURE__ */z(t,{children:/* @__PURE__ */P(y,{accessible:true,accessibilityLabel:ki("{name}, {by}",{name:l.meta.displayName,by:i.poweredByLabel}),style:[s.view(".ph-lockup",'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup'),{display:"flex"}],testID:"everfur-shell-lockup",children:[k,c>=wi?/* @__PURE__ */P(B,{children:[
114
114
  /* @__PURE__ */z(y,{style:s.view(".ph-lockup__rule")}),
115
115
  /* @__PURE__ */P(y,{style:s.view(".ph-lockup__by"),children:[
116
116
  /* @__PURE__ */z(Text,{tier:"badge",style:s.text(".ph-lockup__by"),children:i.poweredBy}),
@@ -118,83 +118,86 @@ return Object.freeze(t)}function vi(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,
118
118
  return P(y,{style:[s.view(".ph-head"),{flexDirection:"row",backgroundColor:h}],testID:"everfur-shell-header",children:[
119
119
  /* @__PURE__ */z(y,{style:[s.view(".ph-head__start"),{flex:1,flexBasis:0}],children:w}),
120
120
  /* @__PURE__ */z(y,{style:{flexShrink:1,alignItems:"center",justifyContent:"center"},children:_}),
121
- /* @__PURE__ */z(y,{style:[s.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&r===null?/* @__PURE__ */z(N,{onPress:e.onBell??(()=>p(true)),color:g,ground:h}):null}),S&&e.onBell===void 0?/* @__PURE__ */z($,{...e.inbox,visible:u,onClose:()=>p(false),onOpen:x??a}):null]})}function Pet({options:e,kit:t,petRef:petRef,petName:n,ink:r}){let o=t.view(".ph-pet img"),i=typeof o.width=="number"?o.width:36,a=e.petPhotoUrl!==void 0&&e.petPhotoUrl!==null&&e.petPhotoUrl!==""?/* @__PURE__ */z(BrandImage,{uri:e.petPhotoUrl,label:n,decorative:true,style:[t.icon(".ph-pet img"),{borderRadius:i/2}],resizeMode:"cover",fallback:/* @__PURE__ */z(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0})}):/* @__PURE__ */z(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0}),l=/* @__PURE__ */P(B,{children:[a,n===""?null:/* @__PURE__ */z(Text,{tier:"heading",numberOfLines:1,style:[t.text(".ph-pet"),{color:r===t.colors.ink?t.colors.ink2:r,flexShrink:1}],children:n})]}),s=[t.view(".ph-pet"),{minWidth:0,flexShrink:1}];return e.onPet===void 0?/* @__PURE__ */z(y,{style:s,testID:"everfur-shell-pet",children:l}):/* @__PURE__ */z(v,{onPress:e.onPet,accessibilityRole:"button",accessibilityLabel:n===""?void 0:n,style:s,testID:"everfur-shell-pet",children:l})}var wi=/* @__PURE__ */createContext(null);function useEverfurTabs(){return f(wi)}var _i=200,Si=4,xi=2600,Ci=600,Fi=k.bezier(.25,.1,.25,1),Ri=w.OS!=="web",Ai=/* @__PURE__ */Object.freeze({chats:St.heading,newChat:St.newChat}),Ii={position:"relative",top:0,alignSelf:"flex-start"};function EverfurTabs(t){let{petRef:petRef,opened:i,onTabChange:a,onRecordsRequested:l,onRecordsLanded:f,onToast:g}=t,b=t.visible??true,m=useEverfurTheme(),v=c(()=>$o(m),[m]),k=c(()=>({...Nt,...t.copy}),[t.copy]),{runtime:w,userRef:userRef}=st(),_=un("healthPlan"),S=un("records"),x=un("recordsClinic"),[C,F]=d(()=>/* @__PURE__ */new Map),[R,T]=d(()=>/* @__PURE__ */new Set),E=p((e,t)=>{F(n=>{let r=n.get(e),o=Xt(r,t);return o===r?n:new Map(n).set(e,o)}),T(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),D=p(e=>{T(t=>t.has(e)?t:new Set(t).add(e))},[]),O=petRef===null?void 0:C.get(petRef),B=!_||O?.empty===true,N=`${petRef??"none"}:${O?.epoch??0}`,$=jt(B),L=s(B);L.current=B;let j=useHealthPlanPage({petRef:petRef,enabled:_&&petRef!==null}),[W,U]=d(()=>Ut(i,false)),[V,M]=d(()=>/* @__PURE__ */new Set(["ask",Ut(i,false)])),q=p(e=>{let t=Wt(e,L.current);U(t),M(e=>e.has(t)?e:new Set(e).add(t))},[]);u(()=>{B&&W==="plan"&&U("ask")},[B,W]);let H=s(null);u(()=>{B||H.current!=="plan"||(H.current=null,q("plan"))},[B,q]);let K=p(e=>{H.current=null,q(e)},[q]),Y=s(a);Y.current=a,u(()=>{Y.current?.(W)},[W]);let[G,J]=d(null),Q=p((e,t)=>{e!==""&&J(n=>({id:(n?.id??0)+1,prompt:e,petRef:petRef,...t===void 0?{}:{card:t}})),H.current=null,q("ask")},[petRef,q]),Z=G===null||G.petRef!==petRef?null:G,X=Vt(i),ee=s(null),[te,ne]=d(null);u(()=>{if(ee.current===X)return;ee.current=X;let e=i.via==="link"?i.ask!==void 0?"ask":i.tab:"plan";H.current=i.via==="link"&&e==="plan"&&L.current?"plan":null,i.via==="link"&&i.ask!==void 0?Q(i.ask.prompt,i.ask.card):q(Ut(i,L.current)),ne(i.via==="plain"?X:null)},[X,i,Q,q]);let re=c(()=>nn(),[]),oe=b&&W==="ask",ie=s(oe);ie.current=oe;let ae=t.chat?.lifecycle,le=c(()=>ae===null?null:rn(on(ae??createAppStateLifecycle(),()=>ie.current),re),[ae,re]),se=s(oe);u(()=>{let e=an(se.current,oe);se.current=oe,e&&re.fire()},[oe,re]);let[de,ce]=d(null),ue=p(e=>{e!==""&&(g!==void 0?g(e):ce(t=>({id:(t?.id??0)+1,text:e})))},[g]),pe=t.intro===false?null:t.intro??{},[fe,he]=d(null),[ge,be]=d(null),[me,ye]=d(null),[ve,ke]=d(null),[we,_e]=d(()=>/* @__PURE__ */new Map),[Se,xe]=d(false),[Ce,Fe]=d(false),Re=s(null),[Ae,Ie]=d(null),Te=s(null),Ee=s(null),De=c(()=>Qe(w),[w]),Oe=w.registry.services.kv,ze=pe?.maxWidth??Ci,Pe=pe!==null&&_,Be=Pe&&te!==null&&b&&userRef!==null&&petRef!==null,[Ne,$e]=d(null);u(()=>{if(!Be)return;let e=te;if(I.get("window").width>=ze){$e(e);return}let t=new AbortController,n=petRef;return rt({repo:De,kv:Oe,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||($e(e),r&&ye({key:e,petRef:n}))},()=>{t.signal.aborted||$e(e)}),()=>t.abort()},[Be,te,userRef,petRef,De,Oe,ze]);let Le=Pe&&te!==null&&b&&(userRef===null||petRef===null)&&I.get("window").width<ze,[je,We]=d(null);u(()=>{if(!Le)return;let e=te,t=setTimeout(()=>We(e),en);return()=>clearTimeout(t)},[Le,te]),wt(Le&&je!==te||Be&&Ne!==te||me!==null||fe!==null);let Ue=p((e,t)=>{_e(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),Ve=petRef===null?void 0:we.get(petRef),Me=Ve==="some";u(()=>{petRef!==null&&Me&&setHealthPlanNoVet(petRef,false)},[petRef,Me]);let qe=p(()=>{let e=Te.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&Ie({top:Math.round(t),height:Math.round(r)})})},[]);u(()=>{if(me===null||fe!==null)return;let e=tn({sameOpen:me.key===te&&me.petRef===petRef,plan:O,planFailed:R.has(me.petRef),recordsPending:S&&Ve===void 0});if(e==="drop"&&ye(null),e!=="play")return;q("ask"),qe();let t=setTimeout(()=>{ye(null),he(e=>({mode:"intro",id:(e?.id??0)+1}))},_i);return()=>clearTimeout(t)},[me,fe,te,petRef,O,R,S,Ve,q,qe]),u(()=>{if(me===null)return;let e=setTimeout(()=>ye(e=>e===me?null:e),en);return()=>clearTimeout(e)},[me]);let He=p(()=>{petRef!==null&&(qe(),he(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,qe]),Ke=p(e=>{(fe?.mode??"intro")==="intro"&&ot({repo:De,kv:Oe,userRef:userRef}),Re.current==="novet"&&petRef!==null&&setHealthPlanNoVet(petRef,true),e.exit==="plan"?q("plan"):e.exit==="ask"&&q("ask"),e.notifications!==null&&ke(t=>t===null?t:{...t,notified:e.notifications}),e.toast!==null&&ue(e.toast)},[fe,De,Oe,userRef,petRef,q,ue]),Ye=p(()=>he(null),[]),Ge=p(e=>{ke({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),l?.(e)},[l]),Je=p(e=>{e!==null&&(Re.current=e),be(e)},[]);u(()=>{if(petRef===null){Fe(false);return}return Fe(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&Fe(t)})},[petRef]),u(()=>onHealthPlanRecordsLanded(e=>setHealthPlanNoVet(e,false)),[]);let Ze=pe?.copy,Xe=p(()=>introText({facts:introFacts(j.page,t.petName),copy:{...ct,...Ze},blanks:0,resultsPending:false}),[j.page,t.petName,Ze]),et=s(void 0),tt=p(()=>{xe(false),q("plan"),petRef!==null&&ue(Xe().toast.landed)},[q,petRef,ue,Xe]);u(()=>{let e=et.current;if(et.current=Ve,ve===null||petRef===null||ve.petRef!==petRef||e!=="none"||Ve!=="some")return;let t={petRef:petRef,at:/* @__PURE__ */(new Date).toISOString()};f?.(t),notifyHealthPlanRecordsLanded(petRef),ke(null),ve.notified===true?xe(true):tt()},[Ve,ve,petRef,f,tt]);let nt=t.chat,it=t.resultsPending??j.page?.page?.wait!==void 0,at=c(()=>it?{...nt?.presentation,chatTopCard:"none"}:nt?.presentation,[it,nt?.presentation]),lt=p(()=>q("plan"),[q]),dt=p(()=>q("records"),[q]),ut=p(()=>q("ask"),[q]),pt=t.plan,ft=c(()=>pt?.focus===void 0?void 0:{...pt.focus,onConnectRecords:pt.focus.onConnectRecords??dt,onWaitAction:pt.focus.onWaitAction??ut},[pt?.focus,dt,ut]),ht=t.petName??j.page?.pet.name??"",gt=t.records,bt=gt?.sheet,mt=p(()=>{He()},[He]),yt={active:b&&W==="records",askBar:false},vt={onRequestFromClinic:mt,noVet:Ce,onOpenPlan:lt},kt=_t(gt),St=bt===false?false:{...yt,...typeof bt=="object"?_t(bt):{}},Ct=petRef===null?null:/* @__PURE__ */z(o,{...vt,...kt,sheet:St,petRef:petRef,...ht===""?{}:{petName:ht},onAsk:gt?.onAsk??(e=>Q(e)),style:[{flex:1},gt?.style]},petRef),[Ft,At]=d([]),It=Ft.length===0?null:Ft[Ft.length-1]??null,Et=p(e=>{let t={title:e.title,onBack:e.onBack};return At(e=>[...e,t]),()=>At(e=>e.filter(e=>e!==t))},[]),Dt=c(()=>yi(t.shellCopy),[t.shellCopy]),Ot=p(e=>{let t=Rt(e,{kicker:Dt.notificationKicker,now:xt.now,ago:xt.timeAgoSuffix},Date.now());return t===null?false:(t.tab==="ask"?Q(t.prompt,t.card):K(t.tab),true)},[Dt,Q,K]),zt=c(()=>({tab:W,open:K,ask:Q,requestRecords:He,push:Et,openInboxItem:Ot}),[W,K,Q,He,Et,Ot]),Bt=t.tabsRef;h(()=>{if(Bt!==void 0)return Bt.current=zt,()=>{Bt.current===zt&&(Bt.current=null)}},[Bt,zt]);let $t=ge==="tabs",Lt=t.header===void 0||t.header===false?null:t.header===true?{}:t.header,Mt=p(e=>Q(e),[Q]),qt=e=>t.composer===false?null:/* @__PURE__ */z(ShellAskBar,{placeholder:vi(e==="plan"?Dt.planPlaceholder:Dt.recordsPlaceholder,{petName:ht}),field:Dt.field,send:Dt.send,onAsk:Mt,testID:`everfur-askbar-${e}`}),Ht=e=>W===e?{flex:1,minHeight:0}:{display:"none"};/* @__PURE__ */
122
- return z(wi.Provider,{value:zt,children:/* @__PURE__ */P(y,{style:[{flex:1,minHeight:0,position:"relative"},t.style],testID:t.testID??"everfur-tabs",children:[Lt===null?null:/* @__PURE__ */z(ShellHeader,{options:Lt,tab:W,pushed:It,petRef:petRef,petName:ht,copy:Dt,onInboxOpen:Ot}),It!==null?null:/* @__PURE__ */z(TabBar,{kit:v,barRef:Te,tabs:$,sub:W,lit:$t,copy:k,planHidden:B,badges:t.badges,onOpen:K}),petRef===null||!_?null:/* @__PURE__ */z(PlanProbe,{petRef:petRef,pagePhase:j.phase,page:j.page,refreshPage:j.refresh,watching:b&&(W==="plan"||B),onPlan:E,onPlanFailed:D}),petRef!==null&&S&&(me!==null||fe!==null||ve!==null)?/* @__PURE__ */z(RecordsProbe,{petRef:petRef,onRecords:Ue}):null,
121
+ /* @__PURE__ */z(y,{style:[s.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&r===null?/* @__PURE__ */z(N,{onPress:e.onBell??(()=>p(true)),color:g,ground:h}):null}),S&&e.onBell===void 0?/* @__PURE__ */z($,{...e.inbox,visible:u,onClose:()=>p(false),onOpen:x??a}):null]})}function Pet({options:e,kit:t,petRef:petRef,petName:n,ink:r}){let o=t.view(".ph-pet img"),i=typeof o.width=="number"?o.width:36,a=e.petPhotoUrl!==void 0&&e.petPhotoUrl!==null&&e.petPhotoUrl!==""?/* @__PURE__ */z(BrandImage,{uri:e.petPhotoUrl,label:n,decorative:true,style:[t.icon(".ph-pet img"),{borderRadius:i/2}],resizeMode:"cover",fallback:/* @__PURE__ */z(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0})}):/* @__PURE__ */z(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0}),l=/* @__PURE__ */P(B,{children:[a,n===""?null:/* @__PURE__ */z(Text,{tier:"heading",numberOfLines:1,style:[t.text(".ph-pet"),{color:r===t.colors.ink?t.colors.ink2:r,flexShrink:1}],children:n})]}),s=[t.view(".ph-pet"),{minWidth:0,flexShrink:1}];return e.onPet===void 0?/* @__PURE__ */z(y,{style:s,testID:"everfur-shell-pet",children:l}):/* @__PURE__ */z(v,{onPress:e.onPet,accessibilityRole:"button",accessibilityLabel:n===""?void 0:n,style:s,testID:"everfur-shell-pet",children:l})}var _i=/* @__PURE__ */createContext(null);function useEverfurTabs(){return f(_i)}var Si=200,xi=4,Ci=2600,Ri=600,Fi=k.bezier(.25,.1,.25,1),Ai=w.OS!=="web",Ii=/* @__PURE__ */Object.freeze({chats:St.heading,newChat:St.newChat}),Ti={position:"relative",top:0,alignSelf:"flex-start"};function EverfurTabs(t){let{petRef:petRef,opened:i,onTabChange:a,onRecordsRequested:l,onRecordsLanded:f,onToast:g}=t,b=t.visible??true,m=useEverfurTheme(),v=c(()=>Lo(m),[m]),k=c(()=>({...$t,...t.copy}),[t.copy]),{runtime:w,userRef:userRef}=st(),_=pn("healthPlan"),S=pn("records"),x=pn("recordsClinic"),[C,R]=d(()=>/* @__PURE__ */new Map),[F,T]=d(()=>/* @__PURE__ */new Set),E=p((e,t)=>{R(n=>{let r=n.get(e),o=en(r,t);return o===r?n:new Map(n).set(e,o)}),T(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),D=p(e=>{T(t=>t.has(e)?t:new Set(t).add(e))},[]),O=petRef===null?void 0:C.get(petRef),B=!_||O?.empty===true,N=`${petRef??"none"}:${O?.epoch??0}`,$=Wt(B),L=s(B);L.current=B;let j=useHealthPlanPage({petRef:petRef,enabled:_&&petRef!==null}),[W,U]=d(()=>Vt(i,false)),[V,M]=d(()=>/* @__PURE__ */new Set(["ask",Vt(i,false)])),q=p(e=>{let t=Ut(e,L.current);U(t),M(e=>e.has(t)?e:new Set(e).add(t))},[]);u(()=>{B&&W==="plan"&&U("ask")},[B,W]);let H=s(null);u(()=>{B||H.current!=="plan"||(H.current=null,q("plan"))},[B,q]);let K=p(e=>{H.current=null,q(e)},[q]),Y=s(a);Y.current=a,u(()=>{Y.current?.(W)},[W]);let[G,J]=d(null),Q=p((e,t)=>{e!==""&&J(n=>({id:(n?.id??0)+1,prompt:e,petRef:petRef,...t===void 0?{}:{card:t}})),H.current=null,q("ask")},[petRef,q]),Z=G===null||G.petRef!==petRef?null:G,X=Mt(i),ee=s(null),[te,ne]=d(null);u(()=>{if(ee.current===X)return;ee.current=X;let e=i.via==="link"?i.ask!==void 0?"ask":i.tab:"plan";H.current=i.via==="link"&&e==="plan"&&L.current?"plan":null,i.via==="link"&&i.ask!==void 0?Q(i.ask.prompt,i.ask.card):q(Vt(i,L.current)),ne(i.via==="plain"?X:null)},[X,i,Q,q]);let re=c(()=>rn(),[]),oe=b&&W==="ask",ie=s(oe);ie.current=oe;let ae=t.chat?.lifecycle,le=c(()=>ae===null?null:on(an(ae??createAppStateLifecycle(),()=>ie.current),re),[ae,re]),se=s(oe);u(()=>{let e=ln(se.current,oe);se.current=oe,e&&re.fire()},[oe,re]);let[de,ce]=d(null),ue=p(e=>{e!==""&&(g!==void 0?g(e):ce(t=>({id:(t?.id??0)+1,text:e})))},[g]),pe=t.intro===false?null:t.intro??{},[fe,he]=d(null),[ge,be]=d(null),[me,ye]=d(null),[ve,ke]=d(null),[we,_e]=d(()=>/* @__PURE__ */new Map),[Se,xe]=d(false),[Ce,Re]=d(false),Fe=s(null),[Ae,Ie]=d(null),Te=s(null),Ee=s(null),De=c(()=>Qe(w),[w]),Oe=w.registry.services.kv,ze=pe?.maxWidth??Ri,Pe=pe!==null&&_,Be=Pe&&te!==null&&b&&userRef!==null&&petRef!==null,[Ne,$e]=d(null);u(()=>{if(!Be)return;let e=te;if(I.get("window").width>=ze){$e(e);return}let t=new AbortController,n=petRef;return rt({repo:De,kv:Oe,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||($e(e),r&&ye({key:e,petRef:n}))},()=>{t.signal.aborted||$e(e)}),()=>t.abort()},[Be,te,userRef,petRef,De,Oe,ze]);let Le=Pe&&te!==null&&b&&(userRef===null||petRef===null)&&I.get("window").width<ze,[je,We]=d(null);u(()=>{if(!Le)return;let e=te,t=setTimeout(()=>We(e),tn);return()=>clearTimeout(t)},[Le,te]),wt(Le&&je!==te||Be&&Ne!==te||me!==null||fe!==null);let Ue=p((e,t)=>{_e(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),Ve=petRef===null?void 0:we.get(petRef),Me=Ve==="some";u(()=>{petRef!==null&&Me&&setHealthPlanNoVet(petRef,false)},[petRef,Me]);let qe=p(()=>{let e=Te.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&Ie({top:Math.round(t),height:Math.round(r)})})},[]);u(()=>{if(me===null||fe!==null)return;let e=nn({sameOpen:me.key===te&&me.petRef===petRef,plan:O,planFailed:F.has(me.petRef),recordsPending:S&&Ve===void 0});if(e==="drop"&&ye(null),e!=="play")return;q("ask"),qe();let t=setTimeout(()=>{ye(null),he(e=>({mode:"intro",id:(e?.id??0)+1}))},Si);return()=>clearTimeout(t)},[me,fe,te,petRef,O,F,S,Ve,q,qe]),u(()=>{if(me===null)return;let e=setTimeout(()=>ye(e=>e===me?null:e),tn);return()=>clearTimeout(e)},[me]);let He=p(()=>{petRef!==null&&(qe(),he(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,qe]),Ke=p(e=>{(fe?.mode??"intro")==="intro"&&ot({repo:De,kv:Oe,userRef:userRef}),Fe.current==="novet"&&petRef!==null&&setHealthPlanNoVet(petRef,true),e.exit==="plan"?q("plan"):e.exit==="ask"&&q("ask"),e.notifications!==null&&ke(t=>t===null?t:{...t,notified:e.notifications}),e.toast!==null&&ue(e.toast)},[fe,De,Oe,userRef,petRef,q,ue]),Ye=p(()=>he(null),[]),Ge=p(e=>{ke({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),l?.(e)},[l]),Je=p(e=>{e!==null&&(Fe.current=e),be(e)},[]);u(()=>{if(petRef===null){Re(false);return}return Re(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&Re(t)})},[petRef]),u(()=>onHealthPlanRecordsLanded(e=>setHealthPlanNoVet(e,false)),[]);let Ze=pe?.copy,Xe=p(()=>introText({facts:introFacts(j.page,t.petName),copy:{...ct,...Ze},blanks:0,resultsPending:false}),[j.page,t.petName,Ze]),et=s(void 0),tt=p(()=>{xe(false),q("plan"),petRef!==null&&ue(Xe().toast.landed)},[q,petRef,ue,Xe]);u(()=>{let e=et.current;if(et.current=Ve,ve===null||petRef===null||ve.petRef!==petRef||e!=="none"||Ve!=="some")return;let t={petRef:petRef,at:/* @__PURE__ */(new Date).toISOString()};f?.(t),notifyHealthPlanRecordsLanded(petRef),ke(null),ve.notified===true?xe(true):tt()},[Ve,ve,petRef,f,tt]);let nt=t.chat,it=t.resultsPending??j.page?.page?.wait!==void 0,at=c(()=>it?{...nt?.presentation,chatTopCard:"none"}:nt?.presentation,[it,nt?.presentation]),lt=p(()=>q("plan"),[q]),dt=p(()=>q("records"),[q]),ut=p(()=>q("ask"),[q]),pt=t.plan,ft=c(()=>pt?.focus===void 0?void 0:{...pt.focus,onConnectRecords:pt.focus.onConnectRecords??dt,onWaitAction:pt.focus.onWaitAction??ut},[pt?.focus,dt,ut]),ht=t.petName??j.page?.pet.name??"",gt=ht.trim()||At,bt=t.records,mt=bt?.sheet,yt=p(()=>{He()},[He]),vt={active:b&&W==="records",askBar:false},kt={onRequestFromClinic:yt,noVet:Ce,onOpenPlan:lt},St=_t(bt),Ct=mt===false?false:{...vt,...typeof mt=="object"?_t(mt):{}},Rt=petRef===null?null:/* @__PURE__ */z(o,{...kt,...St,sheet:Ct,petRef:petRef,...ht===""?{}:{petName:ht},onAsk:bt?.onAsk??(e=>Q(e)),style:[{flex:1},bt?.style]},petRef),[It,Tt]=d([]),Dt=It.length===0?null:It[It.length-1]??null,Ot=p(e=>{let t={title:e.title,onBack:e.onBack};return Tt(e=>[...e,t]),()=>Tt(e=>e.filter(e=>e!==t))},[]),zt=c(()=>vi(t.shellCopy),[t.shellCopy]),Pt=p(e=>{let t=ki(zt.notificationKicker,{petName:gt,time:"{time}"}),n=Ft(e,{kicker:t,now:xt.now,ago:xt.timeAgoSuffix},Date.now());return n===null?false:(n.tab==="ask"?Q(n.prompt,n.card):K(n.tab),true)},[zt,gt,Q,K]),Nt=c(()=>({tab:W,open:K,ask:Q,requestRecords:He,push:Ot,openInboxItem:Pt}),[W,K,Q,He,Ot,Pt]),Lt=t.tabsRef;h(()=>{if(Lt!==void 0)return Lt.current=Nt,()=>{Lt.current===Nt&&(Lt.current=null)}},[Lt,Nt]);let jt=ge==="tabs",qt=t.header===void 0||t.header===false?null:t.header===true?{}:t.header,Ht=p(e=>Q(e),[Q]),Kt=e=>t.composer===false?null:/* @__PURE__ */z(ShellAskBar,{placeholder:ki(e==="plan"?zt.planPlaceholder:zt.recordsPlaceholder,{petName:gt}),field:zt.field,send:zt.send,onAsk:Ht,testID:`everfur-askbar-${e}`}),Yt=e=>W===e?{flex:1,minHeight:0}:{display:"none"};/* @__PURE__ */
122
+ return z(_i.Provider,{value:Nt,children:/* @__PURE__ */P(y,{style:[{flex:1,minHeight:0,position:"relative"},t.style],testID:t.testID??"everfur-tabs",children:[qt===null?null:/* @__PURE__ */z(ShellHeader,{options:qt,tab:W,pushed:Dt,petRef:petRef,petName:ht,copy:zt,onInboxOpen:Pt}),Dt!==null?null:/* @__PURE__ */z(TabBar,{kit:v,barRef:Te,tabs:$,sub:W,lit:jt,copy:k,planHidden:B,badges:t.badges,onOpen:K}),petRef===null||!_?null:/* @__PURE__ */z(PlanProbe,{petRef:petRef,pagePhase:j.phase,page:j.page,refreshPage:j.refresh,watching:b&&(W==="plan"||B),onPlan:E,onPlanFailed:D}),petRef!==null&&S&&(me!==null||fe!==null||ve!==null)?/* @__PURE__ */z(RecordsProbe,{petRef:petRef,onRecords:Ue}):null,
123
123
  /* @__PURE__ */P(y,{style:{flex:1,minHeight:0},children:[
124
- /* @__PURE__ */P(y,{style:Ht("ask"),testID:"everfur-pane-ask",children:[
125
- /* @__PURE__ */z(y,{style:{flex:1,minHeight:0},children:/* @__PURE__ */z(Pt.Provider,{value:oe,children:/* @__PURE__ */z(Tt.Provider,{value:$r,children:/* @__PURE__ */z(e,{header:false,historyBar:Ai,...nt,style:[{flex:1,paddingTop:0},nt?.style],...at===void 0?{}:{presentation:at},...it&&t.pendingStarterPrompts!==void 0?{starterPrompts:t.pendingStarterPrompts}:{},...petRef===null?{}:{petRef:petRef},lifecycle:le,onOpenHealthPlan:lt,...Z===null?{}:{initialAsk:Z.prompt,initialAskKey:Z.id,...Z.card===void 0?{}:{initialAskCard:Z.card}}})})})},petRef??"none"),t.paneFooter?.ask]}),V.has("plan")&&!B?/* @__PURE__ */P(y,{style:Ht("plan"),testID:"everfur-pane-plan",children:[
126
- /* @__PURE__ */z(A,{ref:Ee,style:{flex:1},children:/* @__PURE__ */z(n,{scrollRef:Ee,children:/* @__PURE__ */z(r,{...pt,...ft===void 0?{}:{focus:ft},petRef:petRef},N)})},petRef??"none"),t.paneFooter?.plan??qt("plan")]}):null,V.has("records")?/* @__PURE__ */P(y,{style:Ht("records"),testID:"everfur-pane-records",children:[
127
- /* @__PURE__ */z(y,{style:{flex:1,minHeight:0},children:t.renderRecords===void 0?Ct:t.renderRecords(Ct)},petRef??"none"),t.paneFooter?.records??qt("records")]}):null]}),de===null||g!==void 0?null:/* @__PURE__ */z(Toast,{kit:v,text:de.text},`toast-${de.id}`),Se?/* @__PURE__ */z(EverfurRecordsLandedBanner,{text:Xe().banner,...pe?.bannerIcon===void 0?{}:{icon:pe.bannerIcon},onLand:tt}):null,fe===null||petRef===null?null:/* @__PURE__ */z(EverfurIntro,{petRef:petRef,mode:fe.mode,page:j.page,petName:t.petName??null,recordsConnected:fe.mode==="intro"&&(Me||!x),resultsPending:it,...pe?.copy===void 0?{}:{copy:pe.copy},...pe?.blanks===void 0?{}:{blanks:pe.blanks},tabBar:Ae,tabLabels:{ask:k.ask,plan:k.plan,records:k.records},onFrame:Je,onClose:Ke,onClosed:Ye,onRequested:Ge,...pe?.onEnableNotifications===void 0?{}:{onEnableNotifications:pe.onEnableNotifications},onUpload:pe?.onUpload??dt,...pe?.ownerName===void 0?{}:{ownerName:pe.ownerName},...pe?.onCaptureSignature===void 0?{}:{onCaptureSignature:pe.onCaptureSignature}},`intro-${fe.id}`)]})})}function TabBar({kit:e,barRef:t,tabs:n,sub:r,lit:o,copy:i,planHidden:a,badges:l,onOpen:s}){let{borderBottomWidth:d=0,borderBottomColor:c,...u}=e.view(".ph-sub");/* @__PURE__ */
124
+ /* @__PURE__ */P(y,{style:Yt("ask"),testID:"everfur-pane-ask",children:[
125
+ /* @__PURE__ */z(y,{style:{flex:1,minHeight:0},children:/* @__PURE__ */z(Bt.Provider,{value:oe,children:/* @__PURE__ */z(Et.Provider,{value:Lr,children:/* @__PURE__ */z(e,{header:false,historyBar:Ii,...nt,style:[{flex:1,paddingTop:0},nt?.style],...at===void 0?{}:{presentation:at},...it&&t.pendingStarterPrompts!==void 0?{starterPrompts:t.pendingStarterPrompts}:{},...petRef===null?{}:{petRef:petRef},lifecycle:le,onOpenHealthPlan:lt,...Z===null?{}:{initialAsk:Z.prompt,initialAskKey:Z.id,...Z.card===void 0?{}:{initialAskCard:Z.card}}})})})},petRef??"none"),t.paneFooter?.ask]}),V.has("plan")&&!B?/* @__PURE__ */P(y,{style:Yt("plan"),testID:"everfur-pane-plan",children:[
126
+ /* @__PURE__ */z(A,{ref:Ee,style:{flex:1},children:/* @__PURE__ */z(n,{scrollRef:Ee,children:/* @__PURE__ */z(r,{...pt,...ft===void 0?{}:{focus:ft},petRef:petRef},N)})},petRef??"none"),t.paneFooter?.plan??Kt("plan")]}):null,V.has("records")?/* @__PURE__ */P(y,{style:Yt("records"),testID:"everfur-pane-records",children:[
127
+ /* @__PURE__ */z(y,{style:{flex:1,minHeight:0},children:t.renderRecords===void 0?Rt:t.renderRecords(Rt)},petRef??"none"),t.paneFooter?.records??Kt("records")]}):null]}),de===null||g!==void 0?null:/* @__PURE__ */z(Toast,{kit:v,text:de.text},`toast-${de.id}`),Se?/* @__PURE__ */z(EverfurRecordsLandedBanner,{text:Xe().banner,...pe?.bannerIcon===void 0?{}:{icon:pe.bannerIcon},onLand:tt}):null,fe===null||petRef===null?null:/* @__PURE__ */z(EverfurIntro,{petRef:petRef,mode:fe.mode,page:j.page,petName:t.petName??null,recordsConnected:fe.mode==="intro"&&(Me||!x),resultsPending:it,...pe?.copy===void 0?{}:{copy:pe.copy},...pe?.blanks===void 0?{}:{blanks:pe.blanks},tabBar:Ae,tabLabels:{ask:k.ask,plan:k.plan,records:k.records},onFrame:Je,onClose:Ke,onClosed:Ye,onRequested:Ge,...pe?.onEnableNotifications===void 0?{}:{onEnableNotifications:pe.onEnableNotifications},onUpload:pe?.onUpload??dt,...pe?.ownerName===void 0?{}:{ownerName:pe.ownerName},...pe?.onCaptureSignature===void 0?{}:{onCaptureSignature:pe.onCaptureSignature}},`intro-${fe.id}`)]})})}function TabBar({kit:e,barRef:t,tabs:n,sub:r,lit:o,copy:i,planHidden:a,badges:l,onOpen:s}){let{borderBottomWidth:d=0,borderBottomColor:c,...u}=e.view(".ph-sub");/* @__PURE__ */
128
128
  return P(y,{ref:t,accessibilityRole:"tablist",accessibilityLabel:a?i.listNoPlan:i.listAll,style:u,testID:"everfur-tabs-bar",children:[d>0?/* @__PURE__ */z(y,{pointerEvents:"none",style:{position:"absolute",left:0,right:0,bottom:0,height:d,backgroundColor:c},testID:"everfur-tabs-edge"}):null,n.map((t,n)=>{let a=r===t,d=[".ph-sub button",`.ph-sub [data-sub="${t}"]`,a&&'.ph-sub button[aria-selected="true"]',o&&'#ph[data-in-frame="tabs"] .ph-sub button'];/* @__PURE__ */
129
129
  return P(v,{accessibilityRole:"tab",accessibilityState:{selected:a},onPress:()=>s(t),style:[e.view(...d),e.col(".ph-sub",n),{alignItems:"center",justifyContent:"center"}],testID:`everfur-tab-${t}`,children:[
130
130
  /* @__PURE__ */z(TabPill,{kit:e,id:t,lit:o}),
131
131
  /* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",maxWidth:"100%"},children:[
132
- /* @__PURE__ */z(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...d),{flexShrink:1}],children:i[t]}),l?.[t]===true?/* @__PURE__ */z(y,{style:[e.view(".ph-sub button .ph-new"),Ii],testID:`everfur-tab-${t}-new`}):null]}),a?/* @__PURE__ */z(y,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view('.ph-sub button[aria-selected="true"]::after',o&&'#ph[data-in-frame="tabs"] .ph-sub button::after')}):null]},t)})]})}function TabPill({kit:e,id:t,lit:n}){let r=s(new x.Value(n?1:0)).current,o=`.ph-sub [data-sub="${t}"]`,i=e.raw("k",o),a=e.raw("tint",o);u(()=>{let t=n?e.motion(".ph-sub button::before",'#ph[data-in-frame="tabs"] .ph-sub button::before'):e.motion(".ph-sub button::before"),o=typeof i=="number"?i:0;x.timing(r,{toValue:n?1:0,duration:t.dur,delay:n?t.delay+o*t.stagger:0,easing:e.reduced?Fi:k.bezier(...Fo),useNativeDriver:Ri}).start()},[n,e,i,r]);let l=e.reduced?{opacity:r}:{opacity:r,transform:[{scale:r.interpolate({inputRange:[0,1],outputRange:[To.pillScale,1]})}]};/* @__PURE__ */
133
- return z(x.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof a=="string"?{backgroundColor:a}:null,l],testID:`everfur-tab-pill-${t}`})}function Toast({kit:e,text:t}){let n=s(new x.Value(0)).current;u(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");x.timing(n,{toValue:1,duration:r.dur,easing:k.bezier(...Fo),useNativeDriver:Ri}).start();let o=T.announceForAccessibility;w.OS==="ios"&&typeof o=="function"&&o.call(T,t);let i=setTimeout(()=>{let t=e.motion(".ph-toast");x.timing(n,{toValue:0,duration:t.dur,easing:k.bezier(...Fo),useNativeDriver:Ri}).start()},xi);return()=>clearTimeout(i)},[e,n,t]);let r=e.reduced?{opacity:n}:{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[To.toastY,0]})}]};/* @__PURE__ */
134
- return z(x.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:Si},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */z(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=st();return c(()=>{let t=Qe(e),n=e.registry.services.kv;return{shouldPlay:e=>rt({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>ot({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Ti=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Ei={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Di={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},Oi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=Oi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!Oi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
135
- return Object.freeze({nav:r,sections:/* @__PURE__ */Object.freeze(s),vetOnAsk:i,vetBadge:c,presentation:d,launcher:e["layout.launcher"]==="floating_button",closeControl:u,adjusted:/* @__PURE__ */Object.freeze([...new Set(n)])})}function fillSdkText(e,t,n={}){let r={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:n.pet,cap:n.cap===void 0?void 0:String(n.cap),left:n.left===void 0?void 0:String(n.left),visits:n.visits===void 0?void 0:String(n.visits),price:n.price,state:n.state,them:n.them,when:n.when};return e.replace(/\{([a-z]+)\}/g,(e,t)=>r[t]??e)}function sdkText(e,t,n){return fillSdkText(e.settings[t],e.settings,n)}function sdkFixed(e,t,n){return fillSdkText(e.fixedStrings[t],e.settings,n)}function isInsidePartner(e){return e["text.partner_name"]!=="Everfur"}function objectPronoun(e){let t=(e??"").toLowerCase();return t==="female"||t==="f"?"her":t==="male"||t==="m"?"him":"them"}function askAccess(e,t,n){let r=e.settings;if(t==="member")return{kind:"open"};if(r["access.mode"]==="members_only")return{kind:"members_only"};if(r["access.mode"]==="free_cap"){let t=r["access.free_messages"];if(t<1)return{kind:"open"};let o=Math.max(0,t-Math.max(0,Math.floor(n)));return o===0?{kind:"cap_reached",cap:t}:{kind:"counter",left:o,cap:t,line:sdkText(e,"text.cap.counter",{cap:t,left:o})}}return{kind:"open"}}function isLocked(e,t,n){return t==="member"||e.settings["access.mode"]==="open"&&t==="unknown"?false:e.settings["access.locked"].includes(n)}function capMonth(e){let t=e.getUTCMonth()+1;return`${e.getUTCFullYear()}-${t<10?"0":""}${t}`}var zi={video_visits:"locked.video_visits",texting:"locked.texting",link_records:"locked.link_records",previous_results:"locked.previous_results",dashboard:"locked.dashboard",goals:"locked.goals"};function formatPrice(e,t){let n=t.replace(/^(US)?\$/,"");return`${e["units.currency"]}${n}`}function priceLines(e){let t=e.settings;switch(t["plan.price_display"]){case"full":return[`${formatPrice(t,t["plan.price_year"])} ${sdkFixed(e,"plan.price.year")}`];case"monthly_equivalent":return[`${formatPrice(t,t["plan.price_month"])}${sdkFixed(e,"plan.price.month")}`,sdkFixed(e,"plan.price.billed")];default:return[]}}function planSheet(e,t){let n=e.settings,r=t===void 0?{}:{pet:t};/* @__PURE__ */
136
- return Object.freeze({kind:"plan",title:n["access.mode"]==="free_cap"?sdkText(e,"text.cap.reached",{cap:n["access.free_messages"]}):null,badge:null,price:priceLines(e),locked:n["access.locked"].map(t=>sdkFixed(e,zi[t],r)),button:sdkText(e,"text.cap.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:n["plan.sold_by"]})}function membersSheet(e){let t=e.settings;/* @__PURE__ */
137
- return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var Pi="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==Pi,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c={...a,...t.stateName===void 0?{}:{state:t.stateName},them:objectPronoun(t.petSex)},u=t.level==="visits"?sdkFixed(e,"vet.gate.visits",c):t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",c):null,p=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&p.push(sdkFixed(e,"vet.legal.rx")),p.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:u,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(p),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function askFootLines(e){let t=[sdkFixed(e,"ask.emergency")];return isInsidePartner(e.settings)&&t.push(sdkFixed(e,"ask.privacy")),/* @__PURE__ */Object.freeze(t)}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
138
- return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var Bi="https:\\/\\/sdk(?:-[a-z]+)?\\.everfur\\.com";function Ni(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}var $i=typeof __EVERFUR_BRAND_CDN_ORIGIN__=="string"&&__EVERFUR_BRAND_CDN_ORIGIN__.length>0?Ni(__EVERFUR_BRAND_CDN_ORIGIN__):Bi;var Li=/^#[0-9A-Fa-f]{6}$/,ji=/^(US)?\$\d{1,3}(,\d{3})*(\.\d{2})?$/;function Wi(e){return typeof e=="string"&&Li.test(e)}function Ui(e){return typeof e=="number"&&Number.isFinite(e)}function Vi(e,t){return!(e.range!==void 0&&(t<e.range[0]||t>e.range[1])||e.oneOf!==void 0&&!e.oneOf.includes(t))}var Mi=/* @__PURE__ */new RegExp(`^${$i}\\/brand\\/[0-9a-f]{16}\\.woff2$`);function qi(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let{family:e,weight:r,url:o}=n;if(typeof e!="string"||e.trim()===""||typeof o!="string"||!Mi.test(o))continue;let i=typeof r=="number"?String(r):typeof r=="string"?r:"400";t.push(/* @__PURE__ */Object.freeze({family:e,weight:i,url:o}))}/* @__PURE__ */
139
- return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return Wi(t)?t.toUpperCase():void 0;case"colorOrNone":return t==="none"?"none":Wi(t)?t.toUpperCase():void 0;case"hexList":{if(!Array.isArray(t))return;let n=t.filter(Wi).map(e=>e.toUpperCase());return n.length!==t.length||n.length>4||e.key==="look.color.chips"&&n.length<1||e.key==="look.chat_wash"&&n.length===1?void 0:/* @__PURE__ */Object.freeze(n)}case"fontFiles":return qi(t);case"boolean":return typeof t=="boolean"?t:void 0;case"number":return Ui(t)&&Vi(e,t)?t:void 0;case"numberOrNull":return t===null?null:Ui(t)&&Vi(e,t)?t:void 0;case"money":return typeof t=="string"&&ji.test(t)?t:void 0;case"moneyOrNull":return t===null?null:typeof t=="string"&&ji.test(t)?t:void 0;case"choice":return e.oneOf!==void 0&&e.oneOf.includes(t)?t:void 0;case"itemList":{if(!Array.isArray(t))return;let n=e.items??[],r=t.filter(e=>typeof e=="string"&&n.includes(e));return r.length!==t.length?void 0:/* @__PURE__ */Object.freeze([...r])}case"string":return typeof t!="string"||t.trim()===""&&e.emptyOk!==true?void 0:t;case"text":return typeof t=="string"?t:void 0;default:return}}function resolveSettings(e){let t=e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},n={...Ei},r=[];for(let e of Ti){if(!Object.prototype.hasOwnProperty.call(t,e.key))continue;let o=parseSettingValue(e,t[e.key]);o===void 0?r.push(e.key):n[e.key]=o}return{settings:/* @__PURE__ */Object.freeze(n),rejected:/* @__PURE__ */Object.freeze(r)}}function resolveFixedStrings(e){let t={...Di};if(e!==null&&typeof e=="object"&&!Array.isArray(e))for(let[n,r]of Object.entries(e))Object.prototype.hasOwnProperty.call(Di,n)&&typeof r=="string"&&r!==""&&(t[n]=r);/* @__PURE__ */
140
- return Object.freeze(t)}function Hi(e){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.filter(e=>typeof e=="string").map(e=>e.toUpperCase())):/* @__PURE__ */Object.freeze([])}function parseStateGate(e){let t=e!==null&&typeof e=="object"?e:{};/* @__PURE__ */
141
- return Object.freeze({videoAndRx:Hi(t.video_and_rx),adviceOnly:Hi(t.advice_only)})}function parseSdkConfig(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n=t.revision,r=t.settings;if(!Ui(n)||r===null||typeof r!="object"||Array.isArray(r))return null;let o=Ui(t.schema_version)?t.schema_version:3;/* @__PURE__ */
142
- return Object.freeze({schemaVersion:o,partner:typeof t.partner=="string"?t.partner:"",revision:n,settings:resolveSettings(r).settings,fixedStrings:resolveFixedStrings(t.fixed_strings),stateGate:parseStateGate(t.state_gate)})}function serializeSdkConfig(e){return JSON.stringify({schema_version:e.schemaVersion,partner:e.partner,revision:e.revision,settings:e.settings,fixed_strings:e.fixedStrings,state_gate:{video_and_rx:e.stateGate.videoAndRx,advice_only:e.stateGate.adviceOnly}})}var Ki=/* @__PURE__ */Object.freeze(["composerInput","sendButton","userBubble","assistantBubble","vetBubble","recordCard","vetVisitButton","primaryButton","link","header","banner","chip","card","input","tab","bookingStep","dialog","cartBar","planCard","planReasonLabel","planWash","planChip"]);var Yi="presentation";var Gi=/* @__PURE__ */Object.freeze(["display_name","logo_url","logo_url_dark","primary_color","accent_color","primary_color_dark","accent_color_dark","brightness","color_scheme","font_family","font_url","fonts","font_urls","chat_placeholder","surface_style","radius_scale","accessibility_max_font_scale","slots","background_color","background_color_dark","text_color","text_color_dark","danger_color","danger_color_dark","font_size_base","border_radius","spacing_unit","success_color","success_color_dark","warning_color","warning_color_dark","info_color","info_color_dark","heading_font_family","font_weight_body","font_weight_heading","line_height","assistant_avatar_url","font_sources"]);function hardenHttpsUrl(e){if(e===null)return null;let t=e.trim();return t.length===0?null:/^https:\/\/\S+$/i.test(t)?t:null}var Ji=/* @__PURE__ */new RegExp(`^${$i}\\/brand\\/[0-9a-f]{16}\\.(png|jpg|webp)$`);function hardenBrandAssetUrl(e){let t=hardenHttpsUrl(e);return t!==null&&Ji.test(t)?t:null}var Qi="everfur-ask";function Zi(e){let t=e.weight.trim().split(/\s+/).map(Number).filter(e=>Number.isFinite(e)),n=t[0]??400,r=t[1]??n,o=[];for(let e=Math.ceil(n/100)*100;e<=r;e+=100)e>=100&&e<=900&&o.push(String(e));return o.length===0?["400"]:o}function fontSourcesOf(e){let t=[];for(let n of e["look.font.files"])for(let e of Zi(n))t.push(/* @__PURE__ */Object.freeze({family:n.family,src:n.url,weight:e}));/* @__PURE__ */
132
+ /* @__PURE__ */z(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...d),{flexShrink:1}],children:i[t]}),l?.[t]===true?/* @__PURE__ */z(y,{style:[e.view(".ph-sub button .ph-new"),Ti],testID:`everfur-tab-${t}-new`}):null]}),a?/* @__PURE__ */z(y,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view('.ph-sub button[aria-selected="true"]::after',o&&'#ph[data-in-frame="tabs"] .ph-sub button::after')}):null]},t)})]})}function TabPill({kit:e,id:t,lit:n}){let r=s(new x.Value(n?1:0)).current,o=`.ph-sub [data-sub="${t}"]`,i=e.raw("k",o),a=e.raw("tint",o);u(()=>{let t=n?e.motion(".ph-sub button::before",'#ph[data-in-frame="tabs"] .ph-sub button::before'):e.motion(".ph-sub button::before"),o=typeof i=="number"?i:0;x.timing(r,{toValue:n?1:0,duration:t.dur,delay:n?t.delay+o*t.stagger:0,easing:e.reduced?Fi:k.bezier(...Fo),useNativeDriver:Ai}).start()},[n,e,i,r]);let l=e.reduced?{opacity:r}:{opacity:r,transform:[{scale:r.interpolate({inputRange:[0,1],outputRange:[Eo.pillScale,1]})}]};/* @__PURE__ */
133
+ return z(x.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof a=="string"?{backgroundColor:a}:null,l],testID:`everfur-tab-pill-${t}`})}function Toast({kit:e,text:t}){let n=s(new x.Value(0)).current;u(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");x.timing(n,{toValue:1,duration:r.dur,easing:k.bezier(...Fo),useNativeDriver:Ai}).start();let o=T.announceForAccessibility;w.OS==="ios"&&typeof o=="function"&&o.call(T,t);let i=setTimeout(()=>{let t=e.motion(".ph-toast");x.timing(n,{toValue:0,duration:t.dur,easing:k.bezier(...Fo),useNativeDriver:Ai}).start()},Ci);return()=>clearTimeout(i)},[e,n,t]);let r=e.reduced?{opacity:n}:{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[Eo.toastY,0]})}]};/* @__PURE__ */
134
+ return z(x.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:xi},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */z(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=st();return c(()=>{let t=Qe(e),n=e.registry.services.kv;return{shouldPlay:e=>rt({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>ot({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Ei=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Di={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Oi={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},zi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=zi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!zi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
135
+ return Object.freeze({nav:r,sections:/* @__PURE__ */Object.freeze(s),vetOnAsk:i,vetBadge:c,presentation:d,launcher:e["layout.launcher"]==="floating_button",closeControl:u,adjusted:/* @__PURE__ */Object.freeze([...new Set(n)])})}var Pi="your pet",Bi=/\{([a-z]+)\}/g;function Ni(e,t){return/(^|[.!?]\s+)$/.test(e.slice(0,t))}function fillSdkText(e,t,n={}){let r=typeof n.pet=="string"?n.pet.trim():"",o={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:r===""?void 0:r,cap:String(n.cap??t["access.free_messages"]),left:n.left===void 0?void 0:String(n.left),visits:n.visits===void 0?void 0:String(n.visits),price:n.price,state:n.state,them:n.them??"them",when:n.when};return e.replace(Bi,(t,n,r)=>{let i=o[n];return i!==void 0?i:n==="pet"?Ni(e,r)?Pi.charAt(0).toUpperCase()+Pi.slice(1):Pi:t})}function sdkText(e,t,n){return fillSdkText(e.settings[t],e.settings,n)}function sdkFixed(e,t,n){return fillSdkText(e.fixedStrings[t],e.settings,n)}function isInsidePartner(e){return e["text.partner_name"]!=="Everfur"}function objectPronoun(e){let t=(e??"").toLowerCase();return t==="female"||t==="f"?"her":t==="male"||t==="m"?"him":"them"}function askAccess(e,t,n){let r=e.settings;if(t==="member")return{kind:"open"};if(r["access.mode"]==="members_only")return{kind:"members_only"};if(r["access.mode"]==="free_cap"){let t=r["access.free_messages"];if(t<1)return{kind:"open"};let o=Math.max(0,t-Math.max(0,Math.floor(n)));return o===0?{kind:"cap_reached",cap:t}:{kind:"counter",left:o,cap:t,line:sdkText(e,"text.cap.counter",{cap:t,left:o})}}return{kind:"open"}}function isLocked(e,t,n){return t==="member"||e.settings["access.mode"]==="open"&&t==="unknown"?false:e.settings["access.locked"].includes(n)}function capMonth(e){let t=e.getUTCMonth()+1;return`${e.getUTCFullYear()}-${t<10?"0":""}${t}`}var $i={video_visits:"locked.video_visits",texting:"locked.texting",link_records:"locked.link_records",previous_results:"locked.previous_results",dashboard:"locked.dashboard",goals:"locked.goals"};function formatPrice(e,t){let n=t.replace(/^(US)?\$/,"");return`${e["units.currency"]}${n}`}function priceLines(e){let t=e.settings;switch(t["plan.price_display"]){case"full":return[`${formatPrice(t,t["plan.price_year"])} ${sdkFixed(e,"plan.price.year")}`];case"monthly_equivalent":return[`${formatPrice(t,t["plan.price_month"])}${sdkFixed(e,"plan.price.month")}`,sdkFixed(e,"plan.price.billed")];default:return[]}}function planSheet(e,t){let n=e.settings,r=t===void 0?{}:{pet:t};/* @__PURE__ */
136
+ return Object.freeze({kind:"plan",title:n["access.mode"]==="free_cap"?sdkText(e,"text.cap.reached",{cap:n["access.free_messages"]}):null,badge:null,price:priceLines(e),locked:n["access.locked"].map(t=>sdkFixed(e,$i[t],r)),button:sdkText(e,"text.cap.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:n["plan.sold_by"]})}function membersSheet(e){let t=e.settings;/* @__PURE__ */
137
+ return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var Li="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==Li,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c=t.stateName?.trim()??"",u={...a,state:c,them:objectPronoun(t.petSex)},p=c!==""&&t.level==="visits"?sdkFixed(e,"vet.gate.visits",u):c!==""&&t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",u):null,f=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&f.push(sdkFixed(e,"vet.legal.rx")),f.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:p,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(f),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
138
+ return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var ji="https:\\/\\/sdk(?:-[a-z]+)?\\.everfur\\.com";function Wi(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}var Ui=typeof __EVERFUR_BRAND_CDN_ORIGIN__=="string"&&__EVERFUR_BRAND_CDN_ORIGIN__.length>0?Wi(__EVERFUR_BRAND_CDN_ORIGIN__):ji;var Vi=/^#[0-9A-Fa-f]{6}$/,Mi=/\{([a-z]+)\}/g;function qi(e){return[...e.matchAll(Mi)].map(e=>e[1])}var Hi=/* @__PURE__ */new Set(["pet","partner","plan","assistant","cap"]),Ki=/* @__PURE__ */new Set(["text.partner_name","text.ask.name","plan.name"]);function Yi(e,t){return Ki.has(e)?!/[{}]/.test(t):qi(t).every(t=>Hi.has(t)||t==="left"&&e==="text.cap.counter")}function Gi(e,t){let n=new Set(qi(e));return qi(t).every(e=>n.has(e)||Hi.has(e))}var Ji=/^(US)?\$\d{1,3}(,\d{3})*(\.\d{2})?$/;function Qi(e){return typeof e=="string"&&Vi.test(e)}function Zi(e){return typeof e=="number"&&Number.isFinite(e)}function Xi(e,t){return!(e.range!==void 0&&(t<e.range[0]||t>e.range[1])||e.oneOf!==void 0&&!e.oneOf.includes(t))}var ea=/* @__PURE__ */new RegExp(`^${Ui}\\/brand\\/[0-9a-f]{16}\\.woff2$`);function ta(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let{family:e,weight:r,url:o}=n;if(typeof e!="string"||e.trim()===""||typeof o!="string"||!ea.test(o))continue;let i=typeof r=="number"?String(r):typeof r=="string"?r:"400";t.push(/* @__PURE__ */Object.freeze({family:e,weight:i,url:o}))}/* @__PURE__ */
139
+ return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return Qi(t)?t.toUpperCase():void 0;case"colorOrNone":return t==="none"?"none":Qi(t)?t.toUpperCase():void 0;case"hexList":{if(!Array.isArray(t))return;let n=t.filter(Qi).map(e=>e.toUpperCase());return n.length!==t.length||n.length>4||e.key==="look.color.chips"&&n.length<1||e.key==="look.chat_wash"&&n.length===1?void 0:/* @__PURE__ */Object.freeze(n)}case"fontFiles":return ta(t);case"boolean":return typeof t=="boolean"?t:void 0;case"number":return Zi(t)&&Xi(e,t)?t:void 0;case"numberOrNull":return t===null?null:Zi(t)&&Xi(e,t)?t:void 0;case"money":return typeof t=="string"&&Ji.test(t)?t:void 0;case"moneyOrNull":return t===null?null:typeof t=="string"&&Ji.test(t)?t:void 0;case"choice":return e.oneOf!==void 0&&e.oneOf.includes(t)?t:void 0;case"itemList":{if(!Array.isArray(t))return;let n=e.items??[],r=t.filter(e=>typeof e=="string"&&n.includes(e));return r.length!==t.length||new Set(r).size!==r.length&&e.key!=="layout.sections"?void 0:/* @__PURE__ */Object.freeze([...r])}case"string":return typeof t!="string"||t.trim()===""&&e.emptyOk!==true?void 0:Yi(e.key,t)?t:void 0;case"text":return typeof t=="string"?t:void 0;default:return}}function resolveSettings(e){let t=e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},n={...Di},r=[];for(let e of Ei){if(!Object.prototype.hasOwnProperty.call(t,e.key))continue;let o=parseSettingValue(e,t[e.key]);o===void 0?r.push(e.key):n[e.key]=o}return{settings:/* @__PURE__ */Object.freeze(n),rejected:/* @__PURE__ */Object.freeze(r)}}function resolveFixedStrings(e){let t={...Oi};if(e!==null&&typeof e=="object"&&!Array.isArray(e))for(let[n,r]of Object.entries(e))!Object.prototype.hasOwnProperty.call(Oi,n)||typeof r!="string"||r===""||Gi(Oi[n],r)&&(t[n]=r);/* @__PURE__ */
140
+ return Object.freeze(t)}function na(e){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.filter(e=>typeof e=="string").map(e=>e.toUpperCase())):/* @__PURE__ */Object.freeze([])}function parseStateGate(e){let t=e!==null&&typeof e=="object"?e:{};/* @__PURE__ */
141
+ return Object.freeze({videoAndRx:na(t.video_and_rx),adviceOnly:na(t.advice_only)})}function parseSdkConfig(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n=t.revision,r=t.settings;if(!Zi(n)||r===null||typeof r!="object"||Array.isArray(r))return null;let o=Zi(t.schema_version)?t.schema_version:3;/* @__PURE__ */
142
+ return Object.freeze({schemaVersion:o,partner:typeof t.partner=="string"?t.partner:"",revision:n,settings:resolveSettings(r).settings,fixedStrings:resolveFixedStrings(t.fixed_strings),stateGate:parseStateGate(t.state_gate)})}function serializeSdkConfig(e){return JSON.stringify({schema_version:e.schemaVersion,partner:e.partner,revision:e.revision,settings:e.settings,fixed_strings:e.fixedStrings,state_gate:{video_and_rx:e.stateGate.videoAndRx,advice_only:e.stateGate.adviceOnly}})}var ra=/* @__PURE__ */Object.freeze(["composerInput","sendButton","userBubble","assistantBubble","vetBubble","recordCard","vetVisitButton","primaryButton","link","header","banner","chip","card","input","tab","bookingStep","dialog","cartBar","planCard","planReasonLabel","planWash","planChip"]);var oa="presentation";var ia=/* @__PURE__ */Object.freeze(["display_name","logo_url","logo_url_dark","primary_color","accent_color","primary_color_dark","accent_color_dark","brightness","color_scheme","font_family","font_url","fonts","font_urls","chat_placeholder","surface_style","radius_scale","accessibility_max_font_scale","slots","background_color","background_color_dark","text_color","text_color_dark","danger_color","danger_color_dark","font_size_base","border_radius","spacing_unit","success_color","success_color_dark","warning_color","warning_color_dark","info_color","info_color_dark","heading_font_family","font_weight_body","font_weight_heading","line_height","assistant_avatar_url","font_sources"]);function hardenHttpsUrl(e){if(e===null)return null;let t=e.trim();return t.length===0?null:/^https:\/\/\S+$/i.test(t)?t:null}var aa=/* @__PURE__ */new RegExp(`^${Ui}\\/brand\\/[0-9a-f]{16}\\.(png|jpg|webp)$`);function hardenBrandAssetUrl(e){let t=hardenHttpsUrl(e);return t!==null&&aa.test(t)?t:null}var la="everfur-ask";function sa(e){let t=e.weight.trim().split(/\s+/).map(Number).filter(e=>Number.isFinite(e)),n=t[0]??400,r=t[1]??n,o=[];for(let e=Math.ceil(n/100)*100;e<=r;e+=100)e>=100&&e<=900&&o.push(String(e));return o.length===0?["400"]:o}function fontSourcesOf(e){let t=[];for(let n of e["look.font.files"])for(let e of sa(n))t.push(/* @__PURE__ */Object.freeze({family:n.family,src:n.url,weight:e}));/* @__PURE__ */
143
143
  return Object.freeze(t)}function slotsOf(e){let t=buttonFill(e),n=e["look.color.heading"],r=e["look.color.bubble"],o=e["look.color.chips"][0]??e["look.color.tint"],i=e["look.radius.card"];/* @__PURE__ */
144
- return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var Xi=/* @__PURE__ */Object.freeze([...Gi,...Ki.map(e=>`slots.${e}`),"hide_powered_by",Yi]);function sdkConfigBranding(e){let t=e.settings,n=t["look.ask_icon"],r=t["look.font.heading_weight"];/* @__PURE__ */
145
- return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:t["text.ask.placeholder"],placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===Qi?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:Xi})}var ea="/widget/v1/sdk-config",ta="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[ta]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:ea,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function na(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function ra(e){let t=3421674724,n=2216829733;for(let r of na(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var oa="everfur.sdkconfig.v3.";function ia(e){return`${oa}${ra(e)}`}function aa(e,t,n){return`everfur.sdkconfig.freecap.v1.${ra(`${e}|${t}|${n}`)}`}var la=300*1e3,sa=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function da(e,t){try{let n=await e.getItem(ia(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function ca(e,t,n){try{n===null?await e.removeItem(ia(t)):await e.setItem(ia(t),serializeSdkConfig(n))}catch{}}function ua(e){let t=sa,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{ca(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(ca(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await da(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=la;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=aa(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(aa(e.scope,t,n))??null},addFreeUsed(t,n){let r=aa(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=aa(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function pa(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function fa(e){return e==null||e.disposed?null:e.store!==null?e.store:pa(e,ua({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var ha=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),ga=()=>()=>{},ba=()=>ha;function ma(){return fa(f(lt)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return ya(ma())}function ya(e){return g(e?.subscribe??ga,e?.getSnapshot??ba,e?.getSnapshot??ba)}function useLoadEverfurSdkConfig(){let e=ma();return u(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function va(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=createContext(null))}var ka=/* @__PURE__ */va();var wa="Go to the nearest emergency vet now.";var _a=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:wa,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Sa=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function xa(){let e=globalThis,t=e[Sa];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Sa]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return u(()=>{if(n)return;let e=xa();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */z(Text,{tier:"compact",style:t,accessibilityRole:"text",children:_a.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return Fa(`optional peer '${e}' is not installed: ${Ra(t)}`)}let o=Ca(r);return o==null?Fa(`optional peer '${e}' resolved to no module`):n&&!n(o)?Fa(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function Ca(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function Fa(e){/* @__PURE__ */
146
- return Object.freeze({available:false,module:null,reason:e})}function Ra(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}var Aa=/* @__PURE__ */new RegExp(`^${$i}\\/brand\\/[0-9a-f]{16}\\.svg$`);function Ia(e){if(typeof e!="object"||e===null)return false;let t=e.SvgUri;return typeof t=="function"||typeof t=="object"&&t!==null}var Ta=null;function registerEverfurSvg(e){if(e===null)return Ta=null,false;let t=optionalModule("react-native-svg",e,Ia);return Ta=t.available?t.module:null,t.available}function Ea(e){let t=hardenHttpsUrl(e);return t!==null&&Aa.test(t)?t:null}function Da(e){let t=m.flatten(e),n=t?.width,r=t?.height;return typeof n=="number"&&typeof r=="number"?{width:n,height:r}:null}function SdkBrandArt({url:e,style:t,fallback:n=null,testID:r}){let[o,i]=d(false),a=Ea(e);if(a!==null){let e=Da(t),l=Ta?.SvgUri;return l===void 0||e===null||o?n:/* @__PURE__ */z(y,{style:t,accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:r??"everfur-sdk-svg",children:/* @__PURE__ */z(l,{uri:a,width:e.width,height:e.height,onError:()=>i(true)})})}let l=e.trim()===""?null:hardenBrandAssetUrl(e);/* @__PURE__ */
147
- return z(BrandImage,{uri:l,decorative:true,style:t,fallback:n,...r===void 0?{}:{testID:r}})}var Oa="#10462E",za=640,Pa=600,Ba="#FFFFFF",Na="#8A8A8A";function $a(){let{width:e}=D(),t=e>=Pa;return{tablet:t,column:t?{width:"100%",maxWidth:za,alignSelf:"center",flex:1}:{flex:1}}}function SdkNeutralScreen({failed:e,onRetry:t}){/* @__PURE__ */
148
- return z(y,{style:{flex:1,backgroundColor:Ba,alignItems:"center",justifyContent:"center",padding:24},testID:e?"everfur-sdk-error":"everfur-sdk-loading",children:e?/* @__PURE__ */P(B,{children:[
149
- /* @__PURE__ */z(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:Di["load.error"]}),
150
- /* @__PURE__ */z(v,{accessibilityRole:"button",onPress:t,style:{marginTop:14,minHeight:44,paddingHorizontal:20,borderRadius:22,borderWidth:1,borderColor:"#D9D9D9",alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-retry",children:/* @__PURE__ */z(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:Di["load.retry"]})})]}):/* @__PURE__ */z(O,{color:Na})})}function La(e){return e.trim()===""?null:hardenBrandAssetUrl(e)}function SdkLockup({settings:e}){let t=e["look.lockup"]==="stacked",n=t?e["look.logo.wordmark"]:e["look.logo.mark"],r=e["text.partner_name"],o=/* @__PURE__ */P(y,{style:t?{flexDirection:"row",alignItems:"center",gap:5}:{gap:1,alignItems:"flex-start"},children:[
151
- /* @__PURE__ */z(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children:mi.poweredBy}),
152
- /* @__PURE__ */z(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:Oa}})]});/* @__PURE__ */
153
- return z(EverfurPoweredBy2,{children:/* @__PURE__ */P(y,{accessible:true,accessibilityLabel:`${r}, ${mi.poweredByLabel}`,style:t?{flexDirection:"column",alignItems:"center",gap:3}:{flexDirection:"row",alignItems:"center",gap:8,flexShrink:1},testID:t?"everfur-sdk-lockup-stacked":"everfur-sdk-lockup-side",children:[
154
- /* @__PURE__ */z(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */z(y,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),o]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:o=null}){let{tablet:i}=$a(),a=t["look.color.heading"],l=t["look.font.body"];/* @__PURE__ */
155
- return z(y,{style:{position:"absolute",left:0,right:0,top:0,bottom:0,justifyContent:"flex-end",backgroundColor:"rgba(0,0,0,0.32)"},testID:`everfur-sdk-sheet-${e.kind}`,children:/* @__PURE__ */P(y,{accessibilityViewIsModal:true,style:[{backgroundColor:Ba,borderTopLeftRadius:t["look.radius.sheet"],borderTopRightRadius:t["look.radius.sheet"],paddingTop:10,paddingHorizontal:18,paddingBottom:i?40:30,gap:12},i?{width:za,alignSelf:"center"}:null],children:[e.badge!==null?/* @__PURE__ */z(Text,{tier:"badge",style:{alignSelf:"flex-start",fontFamily:l,fontSize:12,color:a,backgroundColor:t["look.color.tint"],paddingHorizontal:10,paddingVertical:4,borderRadius:12,overflow:"hidden"},children:e.badge}):null,e.title!==null?/* @__PURE__ */z(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:t["look.font.heading"],fontWeight:String(t["look.font.heading_weight"]),fontSize:20,color:a},children:e.title}):null,e.locked.map(e=>/* @__PURE__ */z(Text,{style:{fontFamily:l,fontSize:15,color:t["look.color.ink"]},children:e},e)),e.price.map(e=>/* @__PURE__ */z(Text,{style:{fontFamily:l,fontSize:15,color:t["look.color.muted"]},testID:"everfur-sdk-price",children:e},e)),o!==null?/* @__PURE__ */z(Text,{style:{fontFamily:l,fontSize:15,color:t["look.color.ink"]},testID:"everfur-sdk-sheet-notice",children:o}):null,
144
+ return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var da=/* @__PURE__ */Object.freeze([...ia,...ra.map(e=>`slots.${e}`),"hide_powered_by",oa]);function sdkConfigBranding(e){let t=e.settings,n=t["look.ask_icon"],r=t["look.font.heading_weight"];/* @__PURE__ */
145
+ return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===la?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:da})}var ca="/widget/v1/sdk-config",ua="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[ua]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:ca,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function pa(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function fa(e){let t=3421674724,n=2216829733;for(let r of pa(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var ha="everfur.sdkconfig.v3.";function ga(e){return`${ha}${fa(e)}`}function ba(e,t,n){return`everfur.sdkconfig.freecap.v1.${fa(`${e}|${t}|${n}`)}`}var ma=300*1e3,ya=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function va(e,t){try{let n=await e.getItem(ga(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function ka(e,t,n){try{n===null?await e.removeItem(ga(t)):await e.setItem(ga(t),serializeSdkConfig(n))}catch{}}function wa(e){let t=ya,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{ka(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(ka(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await va(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=ma;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=ba(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(ba(e.scope,t,n))??null},addFreeUsed(t,n){let r=ba(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=ba(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function _a(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function Sa(e){return e==null||e.disposed?null:e.store!==null?e.store:_a(e,wa({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var xa=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),Ca=()=>()=>{},Ra=()=>xa;function Fa(){return Sa(f(lt)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Aa(Fa())}function Aa(e){return g(e?.subscribe??Ca,e?.getSnapshot??Ra,e?.getSnapshot??Ra)}function useLoadEverfurSdkConfig(){let e=Fa();return u(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Ia(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=createContext(null))}var Ta=/* @__PURE__ */Ia();var Ea="Go to the nearest emergency vet now.";var Da=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:Ea,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Oa=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function za(){let e=globalThis,t=e[Oa];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Oa]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return u(()=>{if(n)return;let e=za();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */z(Text,{tier:"compact",style:t,accessibilityRole:"text",children:Da.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return Ba(`optional peer '${e}' is not installed: ${Na(t)}`)}let o=Pa(r);return o==null?Ba(`optional peer '${e}' resolved to no module`):n&&!n(o)?Ba(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function Pa(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function Ba(e){/* @__PURE__ */
146
+ return Object.freeze({available:false,module:null,reason:e})}function Na(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}var $a=/* @__PURE__ */new RegExp(`^${Ui}\\/brand\\/[0-9a-f]{16}\\.svg$`);function La(e){if(typeof e!="object"||e===null)return false;let t=e.SvgUri;return typeof t=="function"||typeof t=="object"&&t!==null}var ja=null;function registerEverfurSvg(e){if(e===null)return ja=null,false;let t=optionalModule("react-native-svg",e,La);return ja=t.available?t.module:null,t.available}function Wa(e){let t=hardenHttpsUrl(e);return t!==null&&$a.test(t)?t:null}function Ua(e){let t=m.flatten(e),n=t?.width,r=t?.height;return typeof n=="number"&&typeof r=="number"?{width:n,height:r}:null}function SdkBrandArt({url:e,style:t,fallback:n=null,testID:r}){let[o,i]=d(false),a=Wa(e);if(a!==null){let e=Ua(t),l=ja?.SvgUri;return l===void 0||e===null||o?n:/* @__PURE__ */z(y,{style:t,accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:r??"everfur-sdk-svg",children:/* @__PURE__ */z(l,{uri:a,width:e.width,height:e.height,onError:()=>i(true)})})}let l=e.trim()===""?null:hardenBrandAssetUrl(e);/* @__PURE__ */
147
+ return z(BrandImage,{uri:l,decorative:true,style:t,fallback:n,...r===void 0?{}:{testID:r}})}var Va="#10462E",Ma=640,qa=600,Ha="#FFFFFF",Ka="#8A8A8A";function Ya(){let{width:e}=D(),t=e>=qa;return{tablet:t,column:t?{width:"100%",maxWidth:Ma,alignSelf:"center",flex:1}:{flex:1}}}function SdkNeutralScreen({failed:e,onRetry:t}){/* @__PURE__ */
148
+ return z(y,{style:{flex:1,backgroundColor:Ha,alignItems:"center",justifyContent:"center",padding:24},testID:e?"everfur-sdk-error":"everfur-sdk-loading",children:e?/* @__PURE__ */P(B,{children:[
149
+ /* @__PURE__ */z(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:Oi["load.error"]}),
150
+ /* @__PURE__ */z(v,{accessibilityRole:"button",onPress:t,style:{marginTop:14,minHeight:44,paddingHorizontal:20,borderRadius:22,borderWidth:1,borderColor:"#D9D9D9",alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-retry",children:/* @__PURE__ */z(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:Oi["load.retry"]})})]}):/* @__PURE__ */z(O,{color:Ka})})}function Ga(e){return e.trim()===""?null:hardenBrandAssetUrl(e)}function SdkLockup({settings:e}){let t=e["look.lockup"]==="stacked",n=t?e["look.logo.wordmark"]:e["look.logo.mark"],r=e["text.partner_name"],o=/* @__PURE__ */P(y,{style:t?{flexDirection:"row",alignItems:"center",gap:5}:{gap:1,alignItems:"flex-start"},children:[
151
+ /* @__PURE__ */z(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children:yi.poweredBy}),
152
+ /* @__PURE__ */z(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:Va}})]});/* @__PURE__ */
153
+ return z(EverfurPoweredBy2,{children:/* @__PURE__ */P(y,{accessible:true,accessibilityLabel:`${r}, ${yi.poweredByLabel}`,style:t?{flexDirection:"column",alignItems:"center",gap:3}:{flexDirection:"row",alignItems:"center",gap:8,flexShrink:1},testID:t?"everfur-sdk-lockup-stacked":"everfur-sdk-lockup-side",children:[
154
+ /* @__PURE__ */z(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */z(y,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),o]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:o=null}){let{tablet:i}=Ya(),a=t["look.color.heading"],l=t["look.font.body"];/* @__PURE__ */
155
+ return z(y,{style:{position:"absolute",left:0,right:0,top:0,bottom:0,justifyContent:"flex-end",backgroundColor:"rgba(0,0,0,0.32)"},testID:`everfur-sdk-sheet-${e.kind}`,children:/* @__PURE__ */P(y,{accessibilityViewIsModal:true,style:[{backgroundColor:Ha,borderTopLeftRadius:t["look.radius.sheet"],borderTopRightRadius:t["look.radius.sheet"],paddingTop:10,paddingHorizontal:18,paddingBottom:i?40:30,gap:12},i?{width:Ma,alignSelf:"center"}:null],children:[e.badge!==null?/* @__PURE__ */z(Text,{tier:"badge",style:{alignSelf:"flex-start",fontFamily:l,fontSize:12,color:a,backgroundColor:t["look.color.tint"],paddingHorizontal:10,paddingVertical:4,borderRadius:12,overflow:"hidden"},children:e.badge}):null,e.title!==null?/* @__PURE__ */z(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:t["look.font.heading"],fontWeight:String(t["look.font.heading_weight"]),fontSize:20,color:a},children:e.title}):null,e.locked.map(e=>/* @__PURE__ */z(Text,{style:{fontFamily:l,fontSize:15,color:t["look.color.ink"]},children:e},e)),e.price.map(e=>/* @__PURE__ */z(Text,{style:{fontFamily:l,fontSize:15,color:t["look.color.muted"]},testID:"everfur-sdk-price",children:e},e)),o!==null?/* @__PURE__ */z(Text,{style:{fontFamily:l,fontSize:15,color:t["look.color.ink"]},testID:"everfur-sdk-sheet-notice",children:o}):null,
156
156
  /* @__PURE__ */z(SdkButton,{settings:t,label:e.button,onPress:n,testID:"everfur-sdk-sheet-primary"}),
157
157
  /* @__PURE__ */z(v,{accessibilityRole:"button",onPress:r,style:{minHeight:44,alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-sheet-dismiss",children:/* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:l,fontSize:15,color:t["look.color.muted"]},children:e.dismiss})})]})})}function SdkButton({settings:e,label:t,onPress:n,testID:r}){let{fill:o,ink:i}=buttonFill(e);/* @__PURE__ */
158
158
  return z(v,{accessibilityRole:"button",onPress:n,style:{minHeight:48,borderRadius:24,backgroundColor:o,alignItems:"center",justifyContent:"center",paddingHorizontal:20},...r===void 0?{}:{testID:r},children:/* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:e["look.font.body"],fontSize:16,fontWeight:"600",color:i},children:t})})}function SdkMemoryChip({settings:e,label:t}){/* @__PURE__ */
159
- return z(y,{style:{alignSelf:"flex-start",minHeight:30,paddingHorizontal:12,borderRadius:15,borderWidth:1,borderColor:e["look.color.line"],backgroundColor:"rgba(255,255,255,0.75)",justifyContent:"center"},testID:"everfur-sdk-memory-chip",children:/* @__PURE__ */z(Text,{tier:"compact",style:{fontFamily:e["look.font.body"],fontSize:12.5,color:e["look.color.ink"]},children:t})})}function SdkDockBar({config:e,onPress:t}){let n=e.settings;/* @__PURE__ */
160
- return z(v,{accessibilityRole:"button",onPress:t,style:{margin:12,minHeight:50,borderRadius:25,borderWidth:1.5,borderColor:n["look.color.heading"],backgroundColor:Ba,justifyContent:"center",paddingHorizontal:18},testID:"everfur-sdk-dock",children:/* @__PURE__ */z(Text,{numberOfLines:1,ellipsizeMode:"tail",style:{fontFamily:n["look.font.body"],fontSize:15,color:n["look.color.muted"]},children:sdkText(e,"text.ask.dock_placeholder")})})}function SdkVetHomeView({config:e,home:t,onBook:n,style:r}){let o=e.settings,i=o["look.font.body"],a=o["look.color.ink"],l=o["look.color.muted"],s=t.photo===null?null:La(t.photo);/* @__PURE__ */
159
+ return z(y,{style:{alignSelf:"flex-start",minHeight:30,paddingHorizontal:12,borderRadius:15,borderWidth:1,borderColor:e["look.color.line"],backgroundColor:"rgba(255,255,255,0.75)",justifyContent:"center"},testID:"everfur-sdk-memory-chip",children:/* @__PURE__ */z(Text,{tier:"compact",style:{fontFamily:e["look.font.body"],fontSize:12.5,color:e["look.color.ink"]},children:t})})}function SdkDockBar({config:e,pet:t,onPress:n}){let r=e.settings;/* @__PURE__ */
160
+ return z(v,{accessibilityRole:"button",onPress:n,style:{margin:12,minHeight:50,borderRadius:25,borderWidth:1.5,borderColor:r["look.color.heading"],backgroundColor:Ha,justifyContent:"center",paddingHorizontal:18},testID:"everfur-sdk-dock",children:/* @__PURE__ */z(Text,{numberOfLines:1,ellipsizeMode:"tail",style:{fontFamily:r["look.font.body"],fontSize:15,color:r["look.color.muted"]},children:sdkText(e,"text.ask.dock_placeholder",{pet:t??null})})})}function VetPersonMark({tint:e,ink:t}){/* @__PURE__ */
161
+ return P(y,{style:{width:52,height:52,borderRadius:26,overflow:"hidden",backgroundColor:e,alignItems:"center",justifyContent:"flex-end"},accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"everfur-sdk-vet-person",children:[
162
+ /* @__PURE__ */z(y,{style:{width:20,height:20,borderRadius:10,marginBottom:3,backgroundColor:t,opacity:.55}}),
163
+ /* @__PURE__ */z(y,{style:{width:34,height:15,borderTopLeftRadius:17,borderTopRightRadius:17,backgroundColor:t,opacity:.55}})]})}function SdkVetHomeView({config:e,home:t,onBook:n,style:r}){let o=e.settings,i=o["look.font.body"],a=o["look.color.ink"],l=o["look.color.muted"],s=t.photo===null?null:Ga(t.photo);/* @__PURE__ */
161
164
  return P(A,{style:r,contentContainerStyle:{gap:14,paddingHorizontal:16,paddingTop:16,paddingBottom:22},testID:`everfur-sdk-vet-${t.level}`,children:[
162
- /* @__PURE__ */P(y,{style:{backgroundColor:Ba,borderWidth:1,borderColor:o["look.color.line"],borderRadius:o["look.radius.card"],padding:16,gap:12},children:[
165
+ /* @__PURE__ */P(y,{style:{backgroundColor:Ha,borderWidth:1,borderColor:o["look.color.line"],borderRadius:o["look.radius.card"],padding:16,gap:12},children:[
163
166
  /* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",gap:12},children:[
164
- /* @__PURE__ */z(BrandImage,{uri:s,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback:/* @__PURE__ */z(y,{style:{width:52,height:52,borderRadius:26,backgroundColor:o["look.color.tint"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-vet-initial",children:/* @__PURE__ */z(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontSize:20,color:o["look.color.heading"]},children:t.initial??""})})}),
167
+ /* @__PURE__ */z(BrandImage,{uri:s,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback:t.initial!==null?/* @__PURE__ */z(y,{style:{width:52,height:52,borderRadius:26,backgroundColor:o["look.color.tint"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-vet-initial",children:/* @__PURE__ */z(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontSize:20,color:o["look.color.heading"]},children:t.initial})}):/* @__PURE__ */z(VetPersonMark,{tint:o["look.color.tint"],ink:o["look.color.heading"]})}),
165
168
  /* @__PURE__ */P(y,{style:{flex:1,gap:2},children:[
166
169
  /* @__PURE__ */z(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontWeight:String(o["look.font.heading_weight"]),fontSize:17,color:o["look.color.heading"]},children:t.name}),t.title!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:13,color:l},children:t.title}):null]})]}),t.allowance!==null||t.extra!==null?/* @__PURE__ */P(y,{style:{backgroundColor:o["look.color.tint"],borderRadius:Math.max(8,o["look.radius.card"]-4),padding:12,gap:2},testID:"everfur-sdk-vet-allowance",children:[t.allowance!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:14,fontWeight:"600",color:a},children:t.allowance}):null,t.extra!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:13,color:l},children:t.extra}):null]}):null,
167
170
  /* @__PURE__ */z(SdkButton,{settings:o,label:t.seeTimes,onPress:n,testID:"everfur-sdk-vet-book"})]}),t.gate!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:14,color:a},testID:"everfur-sdk-vet-gate",children:t.gate}):null,t.rx!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:14,color:a},testID:"everfur-sdk-vet-rx",children:t.rx}):null,
168
- /* @__PURE__ */z(y,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:12,color:l},children:e},e))}),t.privacy!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:12,color:l},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function ja(e){return sdkText(e,"text.tabs.ask")}function SdkLauncherView({config:e,onPress:t,replyWaiting:n,tipSeen:r,onTipSeen:o,style:i}){let a=e.settings,l=a["layout.presentation"]==="full_screen",s=a["look.ask_icon"]===Qi?"":a["look.ask_icon"],[c,p]=d(l&&!r);u(()=>{(!l||r)&&p(false)},[l,r]);let f=()=>{p(false),o()};/* @__PURE__ */
169
- return P(y,{style:[{alignItems:"flex-end",gap:8},i],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[c?/* @__PURE__ */z(v,{accessibilityRole:"button",onPress:f,style:{maxWidth:240,backgroundColor:Ba,borderRadius:14,borderWidth:1,borderColor:a["look.color.line"],paddingHorizontal:14,paddingVertical:10},testID:"everfur-sdk-launcher-tip",children:/* @__PURE__ */z(Text,{style:{fontFamily:a["look.font.body"],fontSize:14,color:a["look.color.ink"]},children:sdkText(e,"text.launcher.tip")})}):null,
170
- /* @__PURE__ */P(v,{accessibilityRole:"button",accessibilityLabel:ja(e),onPress:()=>{c&&f(),t()},style:{width:60,height:60,borderRadius:30,backgroundColor:a["look.color.launcher"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-launcher-button",children:[
171
- /* @__PURE__ */z(SdkBrandArt,{url:s,style:{width:l?24:30,height:l?24:30},fallback:/* @__PURE__ */z(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:a["look.color.on_launcher"]}})}),l?/* @__PURE__ */z(Text,{tier:"badge",style:{fontFamily:a["look.font.body"],fontSize:10,color:a["look.color.on_launcher"]},children:ja(e)}):null,l&&n?/* @__PURE__ */z(y,{style:{position:"absolute",top:2,right:2,width:12,height:12,borderRadius:6,backgroundColor:"#C03410",borderWidth:2,borderColor:Ba},testID:"everfur-sdk-launcher-dot"}):null]})]})}function Wa(e){let t=e.activePetRef;return e.pets.find(e=>e.petRef===t)??e.pets[0]??null}function EverfurSdkApp(e){let t=ma(),n=useEverfurSdkConfig();u(()=>{if(t===null)return;t.adoptLatest(),t.load();let e=E.addEventListener("change",e=>{e==="active"&&t.retry()});return()=>e.remove()},[t]);let r=p(()=>{t?.retry()},[t]);return n.active!==null?/* @__PURE__ */z(SdkShell,{...e,config:n.active}):n.status==="legacy"?/* @__PURE__ */z(LegacyPath,{...e}):/* @__PURE__ */z(SdkNeutralScreen,{failed:n.status==="failed",onRetry:r})}function LegacyPath({host:e,renderLegacy:t}){if(t!==void 0)return t();let n=Wa(e);/* @__PURE__ */
172
- return z(EverfurTabs,{petRef:n?.petRef??null,petName:n?.name??null,opened:{via:"plain"}})}function Ua(e,t,n){let r=ma(),o=e.settings["access.mode"]==="free_cap",i=capMonth(/* @__PURE__ */new Date),[a,l]=d(()=>r?.peekFreeUsed(t,i)??0),p=s(true),f=s(n);f.current=n,u(()=>{if(p.current=true,!(r===null||!o))return r.readFreeUsed(t,i).then(e=>{p.current&&l(e)}),()=>{p.current=false}},[r,o,t,i]);let h=c(()=>!o||r===null?null:{onMessageSent:()=>{r.addFreeUsed(t,i).then(e=>{p.current&&l(e)})},onFreeCapReached:e=>{r.setFreeUsed(t,i,e.used).then(e=>{p.current&&l(e)}),f.current(e)}},[o,r,t,i]);return{used:a,hooks:h}}var Va=St.heading;function SdkShell({host:e,section:t,onSectionChange:n,chat:r,records:o,style:i,config:a}){let l=a.settings,h=f(lt),g=Wa(e),b=vetLevelFor(a.stateGate,g?.location??null),m=c(()=>resolveLayout(l,b),[l,b]),v=e.membership??"unknown",k=e.userId??h?.userRef??"anonymous",w=s(()=>{}),{used:_,hooks:S}=Ua(a,k,e=>w.current(e)),x=askAccess(a,v,_),{tablet:C,column:F}=$a(),[R,A]=d(t??m.sections[0]??"ask");u(()=>{t!==void 0&&A(t)},[t]);let I=p(e=>{A(e),n?.(e)},[n]),T=m.vetOnAsk!=="none",E=R==="vet"&&!T?"ask":R,[D,O]=d(null),B=p((e,t=null)=>{let n={sheet:e.kind==="members"?membersSheet(a):planSheet(a,g?.name),reason:e,notice:t};O(r=>t===null&&e.kind==="cap"&&r?.reason.kind==="cap"?{...n,notice:r.notice}:n)},[a,g?.name]);w.current=e=>B({kind:"cap"},e.emergencyGuidance??null);let N=()=>{D!==null&&(e.onOpenPlan?.(D.reason,D.sheet.soldBy),O(null))};u(()=>{x.kind==="members_only"?B({kind:"members"}):x.kind==="cap_reached"&&B({kind:"cap"})},[x.kind,B]);let $=e=>isLocked(a,v,e),L={flex:1,backgroundColor:l["look.color.surface"]},j=E==="vet"?/* @__PURE__ */z(VetPane,{config:a,pet:g,level:b,locked:$("video_visits"),onLocked:()=>B({kind:"locked",part:"video_visits"}),onAsk:()=>I("ask")}):E==="records"?/* @__PURE__ */z(RecordsPane,{config:a,host:e,pet:g,vetShown:T,records:o,onPlan:e=>B({kind:"locked",part:e}),onVet:()=>T?I("vet"):void 0,locked:$,onAsk:()=>I("ask")}):/* @__PURE__ */z(AskPane,{config:a,layout:m,pet:g,level:b,access:x,hooks:S,chat:r,locked:$,onVet:()=>I("vet"),onPlan:()=>B({kind:x.kind==="members_only"?"members":"cap"})});/* @__PURE__ */
171
+ /* @__PURE__ */z(y,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:12,color:l},children:e},e))}),t.privacy!==null?/* @__PURE__ */z(Text,{style:{fontFamily:i,fontSize:12,color:l},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function Ja(e){return sdkText(e,"text.tabs.ask")}function SdkLauncherView({config:e,onPress:t,replyWaiting:n,tipSeen:r,onTipSeen:o,style:i}){let a=e.settings,l=a["layout.presentation"]==="full_screen",s=a["look.ask_icon"]===la?"":a["look.ask_icon"],[c,p]=d(l&&!r);u(()=>{(!l||r)&&p(false)},[l,r]);let f=()=>{p(false),o()};/* @__PURE__ */
172
+ return P(y,{style:[{alignItems:"flex-end",gap:8},i],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[c?/* @__PURE__ */z(v,{accessibilityRole:"button",onPress:f,style:{maxWidth:240,backgroundColor:Ha,borderRadius:14,borderWidth:1,borderColor:a["look.color.line"],paddingHorizontal:14,paddingVertical:10},testID:"everfur-sdk-launcher-tip",children:/* @__PURE__ */z(Text,{style:{fontFamily:a["look.font.body"],fontSize:14,color:a["look.color.ink"]},children:sdkText(e,"text.launcher.tip")})}):null,
173
+ /* @__PURE__ */P(v,{accessibilityRole:"button",accessibilityLabel:Ja(e),onPress:()=>{c&&f(),t()},style:{width:60,height:60,borderRadius:30,backgroundColor:a["look.color.launcher"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-launcher-button",children:[
174
+ /* @__PURE__ */z(SdkBrandArt,{url:s,style:{width:l?24:30,height:l?24:30},fallback:/* @__PURE__ */z(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:a["look.color.on_launcher"]}})}),l?/* @__PURE__ */z(Text,{tier:"badge",style:{fontFamily:a["look.font.body"],fontSize:10,color:a["look.color.on_launcher"]},children:Ja(e)}):null,l&&n?/* @__PURE__ */z(y,{style:{position:"absolute",top:2,right:2,width:12,height:12,borderRadius:6,backgroundColor:"#C03410",borderWidth:2,borderColor:Ha},testID:"everfur-sdk-launcher-dot"}):null]})]})}function Qa(e){let t=e.activePetRef;return e.pets.find(e=>e.petRef===t)??e.pets[0]??null}function EverfurSdkApp(e){let t=Fa(),n=useEverfurSdkConfig();u(()=>{if(t===null)return;t.adoptLatest(),t.load();let e=E.addEventListener("change",e=>{e==="active"&&t.retry()});return()=>e.remove()},[t]);let r=p(()=>{t?.retry()},[t]);return n.active!==null?/* @__PURE__ */z(SdkShell,{...e,config:n.active}):n.status==="legacy"?/* @__PURE__ */z(LegacyPath,{...e}):/* @__PURE__ */z(SdkNeutralScreen,{failed:n.status==="failed",onRetry:r})}function LegacyPath({host:e,renderLegacy:t}){if(t!==void 0)return t();let n=Qa(e);/* @__PURE__ */
175
+ return z(EverfurTabs,{petRef:n?.petRef??null,petName:n?.name??null,opened:{via:"plain"}})}function Za(e,t,n){let r=Fa(),o=e.settings["access.mode"]==="free_cap",i=capMonth(/* @__PURE__ */new Date),[a,l]=d(()=>r?.peekFreeUsed(t,i)??0),p=s(true),f=s(n);f.current=n,u(()=>{if(p.current=true,!(r===null||!o))return r.readFreeUsed(t,i).then(e=>{p.current&&l(e)}),()=>{p.current=false}},[r,o,t,i]);let h=c(()=>!o||r===null?null:{onMessageSent:()=>{r.addFreeUsed(t,i).then(e=>{p.current&&l(e)})},onFreeCapReached:e=>{r.setFreeUsed(t,i,e.used).then(e=>{p.current&&l(e)}),f.current(e)}},[o,r,t,i]);return{used:a,hooks:h}}var Xa=St.heading;function SdkShell({host:e,section:t,onSectionChange:n,chat:r,records:o,style:i,config:a}){let l=a.settings,h=f(lt),g=Qa(e),b=vetLevelFor(a.stateGate,g?.location??null),m=c(()=>resolveLayout(l,b),[l,b]),v=e.membership??"unknown",k=e.userId??h?.userRef??"anonymous",w=s(()=>{}),{used:_,hooks:S}=Za(a,k,e=>w.current(e)),x=askAccess(a,v,_),{tablet:C,column:R}=Ya(),[F,A]=d(t??m.sections[0]??"ask");u(()=>{t!==void 0&&A(t)},[t]);let I=p(e=>{A(e),n?.(e)},[n]),T=m.vetOnAsk!=="none",E=F==="vet"&&!T?"ask":F,[D,O]=d(null),B=p((e,t=null)=>{let n={sheet:e.kind==="members"?membersSheet(a):planSheet(a,g?.name),reason:e,notice:t};O(r=>t===null&&e.kind==="cap"&&r?.reason.kind==="cap"?{...n,notice:r.notice}:n)},[a,g?.name]);w.current=e=>B({kind:"cap"},e.emergencyGuidance??null);let N=()=>{D!==null&&(e.onOpenPlan?.(D.reason,D.sheet.soldBy),O(null))};u(()=>{x.kind==="members_only"?B({kind:"members"}):x.kind==="cap_reached"&&B({kind:"cap"})},[x.kind,B]);let $=e=>isLocked(a,v,e),L={flex:1,backgroundColor:l["look.color.surface"]},j=E==="vet"?/* @__PURE__ */z(VetPane,{config:a,pet:g,level:b,locked:$("video_visits"),onLocked:()=>B({kind:"locked",part:"video_visits"}),onAsk:()=>I("ask")}):E==="records"?/* @__PURE__ */z(RecordsPane,{config:a,host:e,pet:g,vetShown:T,records:o,onPlan:e=>B({kind:"locked",part:e}),onVet:()=>T?I("vet"):void 0,locked:$,onAsk:()=>I("ask")}):/* @__PURE__ */z(AskPane,{config:a,layout:m,pet:g,level:b,access:x,hooks:S,chat:r,locked:$,onVet:()=>I("vet"),onPlan:()=>B({kind:x.kind==="members_only"?"members":"cap"})});/* @__PURE__ */
173
176
  return P(y,{style:[L,i],testID:`everfur-sdk-app-${m.nav}`,children:[
174
- /* @__PURE__ */P(y,{style:F,testID:C?"everfur-sdk-column-tablet":"everfur-sdk-column-phone",children:[
177
+ /* @__PURE__ */P(y,{style:R,testID:C?"everfur-sdk-column-tablet":"everfur-sdk-column-phone",children:[
175
178
  /* @__PURE__ */z(Header,{config:a,layout:m,host:e,pet:g,section:E,level:b,onSection:I}),m.nav==="bottom_tabs"||m.nav==="chat_first"?null:/* @__PURE__ */z(SectionNav,{config:a,layout:m,level:b,section:E,onSection:I,vetDot:e.vetMessageWaiting===true}),
176
- /* @__PURE__ */z(y,{style:{flex:1},children:j}),m.nav==="bottom_tabs"?/* @__PURE__ */z(SectionNav,{config:a,layout:m,level:b,section:E,onSection:I,vetDot:e.vetMessageWaiting===true,bottom:true}):null]}),D!==null?/* @__PURE__ */z(SdkSheet,{sheet:D.sheet,settings:l,onPrimary:N,onDismiss:()=>O(null),notice:D.notice}):null]})}function Ma(e,t,n){return t==="vet"?vetTabLabel(e,n):sdkText(e,t==="ask"?"text.tabs.ask":"text.tabs.records")}function SectionNav({config:e,layout:t,level:n,section:r,onSection:o,vetDot:i,bottom:a=false}){let l=e.settings;return t.sections.length<2?null:/* @__PURE__ */z(y,{accessibilityRole:"tablist",style:[{flexDirection:"row",borderColor:l["look.color.line"],backgroundColor:l["look.color.surface"]},a?{borderTopWidth:1,paddingBottom:6}:{borderBottomWidth:1,paddingHorizontal:8}],testID:a?"everfur-sdk-tabs-bottom":"everfur-sdk-tabs-top",children:t.sections.map(s=>{let d=s===r;/* @__PURE__ */
179
+ /* @__PURE__ */z(y,{style:{flex:1},children:j}),m.nav==="bottom_tabs"?/* @__PURE__ */z(SectionNav,{config:a,layout:m,level:b,section:E,onSection:I,vetDot:e.vetMessageWaiting===true,bottom:true}):null]}),D!==null?/* @__PURE__ */z(SdkSheet,{sheet:D.sheet,settings:l,onPrimary:N,onDismiss:()=>O(null),notice:D.notice}):null]})}function el(e,t,n){return t==="vet"?vetTabLabel(e,n):sdkText(e,t==="ask"?"text.tabs.ask":"text.tabs.records")}function SectionNav({config:e,layout:t,level:n,section:r,onSection:o,vetDot:i,bottom:a=false}){let l=e.settings;return t.sections.length<2?null:/* @__PURE__ */z(y,{accessibilityRole:"tablist",style:[{flexDirection:"row",borderColor:l["look.color.line"],backgroundColor:l["look.color.surface"]},a?{borderTopWidth:1,paddingBottom:6}:{borderBottomWidth:1,paddingHorizontal:8}],testID:a?"everfur-sdk-tabs-bottom":"everfur-sdk-tabs-top",children:t.sections.map(s=>{let d=s===r;/* @__PURE__ */
177
180
  return P(v,{accessibilityRole:"tab",accessibilityState:{selected:d},onPress:()=>o(s),style:{flex:a?1:0,minHeight:44,paddingHorizontal:12,alignItems:"center",justifyContent:"center",flexDirection:"row",gap:6,borderBottomWidth:a?0:2,borderBottomColor:d?l["look.color.primary"]:"transparent"},testID:`everfur-sdk-tab-${s}`,children:[
178
- /* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:l["look.font.body"],fontSize:15,fontWeight:d?"600":"400",color:d?l["look.color.heading"]:l["look.color.muted"]},children:Ma(e,s,n)}),s==="vet"&&i&&t.vetBadge==="tab_dot"?/* @__PURE__ */z(y,{style:{width:7,height:7,borderRadius:4,backgroundColor:l["look.color.dot"]},testID:"everfur-sdk-vet-dot"}):null]},s)})})}function Header({config:e,layout:t,host:n,pet:r,section:o,level:i,onSection:a}){let l=e.settings,s=l["look.color.heading"],d=(e,t,n)=>/* @__PURE__ */z(v,{accessibilityRole:"button",onPress:t,style:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},testID:n,children:/* @__PURE__ */z(Text,{tier:"control",style:{fontSize:20,color:s},children:e})});if(t.nav==="sections_page"){let t=sdkText(e,"text.nav.page_title"),n=/* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingTop:12,paddingBottom:8},testID:"everfur-sdk-header-sections",children:[t!==""?/* @__PURE__ */z(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:24,color:s},children:t}):null,
181
+ /* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:l["look.font.body"],fontSize:15,fontWeight:d?"600":"400",color:d?l["look.color.heading"]:l["look.color.muted"]},children:el(e,s,n)}),s==="vet"&&i&&t.vetBadge==="tab_dot"?/* @__PURE__ */z(y,{style:{width:7,height:7,borderRadius:4,backgroundColor:l["look.color.dot"]},testID:"everfur-sdk-vet-dot"}):null]},s)})})}function Header({config:e,layout:t,host:n,pet:r,section:o,level:i,onSection:a}){let l=e.settings,s=l["look.color.heading"],d=(e,t,n)=>/* @__PURE__ */z(v,{accessibilityRole:"button",onPress:t,style:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},testID:n,children:/* @__PURE__ */z(Text,{tier:"control",style:{fontSize:20,color:s},children:e})});if(t.nav==="sections_page"){let t=sdkText(e,"text.nav.page_title"),n=/* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingTop:12,paddingBottom:8},testID:"everfur-sdk-header-sections",children:[t!==""?/* @__PURE__ */z(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:24,color:s},children:t}):null,
179
182
  /* @__PURE__ */z(SdkLockup,{settings:l})]});return o==="ask"?/* @__PURE__ */P(y,{children:[n,
180
183
  /* @__PURE__ */z(MemoryRow,{config:e,pet:r})]}):n}if(t.nav==="chat_first"){let c=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
181
184
  return P(y,{testID:"everfur-sdk-header-chat-first",children:[
182
185
  /* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52},children:[d("↓",n.onClose,"everfur-sdk-down"),
183
- /* @__PURE__ */z(Text,{tier:"heading",numberOfLines:1,style:{flex:1,textAlign:"center",fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:17,color:s},children:o==="ask"?sdkText(e,"text.ask.name"):Ma(e,o,i)}),c?/* @__PURE__ */z(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):o!=="ask"?d("×",()=>a("ask"),"everfur-sdk-back-to-ask"):/* @__PURE__ */z(y,{style:{minWidth:44}})]}),o==="ask"?/* @__PURE__ */z(MemoryRow,{config:e,pet:r,withLockup:true}):null]})}let c=t.presentation==="full_screen",u=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
186
+ /* @__PURE__ */z(Text,{tier:"heading",numberOfLines:1,style:{flex:1,textAlign:"center",fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:17,color:s},children:o==="ask"?sdkText(e,"text.ask.name"):el(e,o,i)}),c?/* @__PURE__ */z(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):o!=="ask"?d("×",()=>a("ask"),"everfur-sdk-back-to-ask"):/* @__PURE__ */z(y,{style:{minWidth:44}})]}),o==="ask"?/* @__PURE__ */z(MemoryRow,{config:e,pet:r,withLockup:true}):null]})}let c=t.presentation==="full_screen",u=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
184
187
  return P(y,{testID:`everfur-sdk-header-${t.nav}`,children:[
185
188
  /* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52,gap:8},children:[
186
189
  /* @__PURE__ */z(y,{style:{flex:1,alignItems:"flex-start"},children:c?/* @__PURE__ */z(PetSwitcher,{config:e,host:n,pet:r}):null}),
187
190
  /* @__PURE__ */z(SdkLockup,{settings:l}),
188
191
  /* @__PURE__ */P(y,{style:{flex:1,alignItems:"flex-end"},children:[u?/* @__PURE__ */z(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):null,c?d("×",n.onClose,"everfur-sdk-close"):null]})]}),t.nav==="bottom_tabs"&&t.vetOnAsk==="top"&&(o==="ask"||o==="vet")?/* @__PURE__ */z(AskVetSwitch,{config:e,level:i,section:o,onSection:a}):null,o==="ask"?/* @__PURE__ */z(MemoryRow,{config:e,pet:r}):null]})}function AskVetSwitch({config:e,level:t,section:n,onSection:r}){let o=e.settings;/* @__PURE__ */
189
- return z(y,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:o["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(i=>/* @__PURE__ */z(v,{accessibilityRole:"tab",accessibilityState:{selected:n===i},onPress:()=>r(i),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===i?o["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${i}`,children:/* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:o["look.font.body"],fontSize:15,color:n===i?o["look.color.heading"]:o["look.color.muted"]},children:Ma(e,i,t)})},i))})}function VetPill({config:e,layout:t,level:n,waiting:r,onPress:o}){let i=e.settings,a=t.vetBadge==="header_pill"&&r;/* @__PURE__ */
192
+ return z(y,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:o["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(i=>/* @__PURE__ */z(v,{accessibilityRole:"tab",accessibilityState:{selected:n===i},onPress:()=>r(i),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===i?o["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${i}`,children:/* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:o["look.font.body"],fontSize:15,color:n===i?o["look.color.heading"]:o["look.color.muted"]},children:el(e,i,t)})},i))})}function VetPill({config:e,layout:t,level:n,waiting:r,onPress:o}){let i=e.settings,a=t.vetBadge==="header_pill"&&r;/* @__PURE__ */
190
193
  return P(v,{accessibilityRole:"button",onPress:o,style:{flexDirection:"row",alignItems:"center",gap:6,height:32,paddingLeft:10,paddingRight:12,borderRadius:16,backgroundColor:"#FFFFFF",borderWidth:1,borderColor:i["look.color.line"]},testID:"everfur-sdk-vet-pill",children:[a?/* @__PURE__ */z(y,{style:{width:8,height:8,borderRadius:4,backgroundColor:i["look.color.dot"]},testID:"everfur-sdk-vet-pill-dot"}):null,
191
194
  /* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:i["look.font.body"],fontSize:14,color:i["look.color.heading"]},children:vetTabLabel(e,n)})]})}function PetSwitcher({config:e,host:t,pet:n}){let r=e.settings;return n===null?null:/* @__PURE__ */P(v,{accessibilityRole:"button",onPress:()=>{if(t.pets.length<2)return;let e=t.pets.findIndex(e=>e.petRef===n.petRef),r=t.pets[(e+1)%t.pets.length];r!==void 0&&t.onPetChange?.(r.petRef)},style:{minHeight:44,flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8},testID:"everfur-sdk-pet-switcher",children:[
192
- /* @__PURE__ */z(Text,{tier:"control",numberOfLines:1,style:{fontFamily:r["look.font.body"],fontSize:15,fontWeight:"600",color:r["look.color.heading"]},children:n.name}),t.pets.length>1?/* @__PURE__ */z(Text,{tier:"control",style:{fontSize:12,color:r["look.color.heading"]},children:"▾"}):null]})}function MemoryRow({config:e,pet:t,withLockup:n=false}){let r=memoryChip(e,t?.name);return r===null&&!n?null:/* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */z(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */z(y,{}),n?/* @__PURE__ */z(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:r,level:o,access:i,hooks:a,chat:l,locked:s,onVet:d,onPlan:u}){let p=t.settings,f=p["look.color.heading"],h=c(()=>({title:sdkText(t,"text.ask.greeting",r===null?{}:{pet:r.name}),chipTints:p["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,f)}))}),[t,p,f,r]),g=c(()=>({chats:Va,newChat:sdkText(t,"text.ask.new_chat")}),[t]),b=i.kind==="members_only"||i.kind==="cap_reached",m=askFootLines(t).filter(e=>e!==sdkFixed(t,"ask.emergency")),k=n.vetOnAsk!=="none"&&o!=="none"?r?.location?.state:void 0;/* @__PURE__ */
193
- return P(y,{style:{flex:1},testID:"everfur-sdk-ask",children:[b?/* @__PURE__ */z(y,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */z(v,{accessibilityRole:"button",onPress:u,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:p["look.font.body"],fontSize:15,color:p["look.color.accent"]},children:i.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */z(ka.Provider,{value:a,children:/* @__PURE__ */z(e,{...l,...r===null?{}:{petRef:r.petRef},...k===void 0?{}:{vetUsState:k},...s("texting")||!p["features.texting"]?{textingEntry:false}:{},...n.vetOnAsk==="none"?{}:{onFindVet:d},emptyState:h,historyBar:g,style:{flex:1}})}),i.kind==="counter"?/* @__PURE__ */z(Text,{style:{textAlign:"center",fontFamily:p["look.font.label"]==="body"?p["look.font.body"]:p["look.font.label"],fontSize:12,color:p["look.color.muted"],paddingVertical:4},testID:"everfur-sdk-counter",children:i.line}):null,m.map(e=>/* @__PURE__ */z(Text,{style:{textAlign:"center",fontFamily:p["look.font.body"],fontSize:12,color:p["look.color.muted"],paddingBottom:6,paddingHorizontal:16},testID:"everfur-sdk-ask-privacy",children:e},e))]})}function VetPane({config:e,pet:t,level:n,locked:r,onLocked:o,onAsk:i}){let a=useVetVisit({petRef:t?.petRef??null,usState:t?.location?.state??null}),l=vetHome(e,{level:n,...t===null?{}:{pet:t.name,petSex:t.sex??null,visitsUsed:t.visitsUsed??null},...t?.stateName!==void 0?{stateName:t.stateName}:t?.location?.state!==void 0?{stateName:t.location.state}:{}});/* @__PURE__ */
195
+ /* @__PURE__ */z(Text,{tier:"control",numberOfLines:1,style:{fontFamily:r["look.font.body"],fontSize:15,fontWeight:"600",color:r["look.color.heading"]},children:n.name}),t.pets.length>1?/* @__PURE__ */z(Text,{tier:"control",style:{fontSize:12,color:r["look.color.heading"]},children:"▾"}):null]})}function MemoryRow({config:e,pet:t,withLockup:n=false}){let r=memoryChip(e,t?.name);return r===null&&!n?null:/* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */z(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */z(y,{}),n?/* @__PURE__ */z(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:r,level:o,access:i,hooks:a,chat:l,locked:s,onVet:d,onPlan:u}){let p=t.settings,f=p["look.color.heading"],h=c(()=>({title:sdkText(t,"text.ask.greeting",r===null?{}:{pet:r.name}),chipTints:p["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,f)}))}),[t,p,f,r]),g=c(()=>({chats:Xa,newChat:sdkText(t,"text.ask.new_chat")}),[t]),b=i.kind==="members_only"||i.kind==="cap_reached",m=n.vetOnAsk!=="none"&&o!=="none"?r?.location?.state:void 0;/* @__PURE__ */
196
+ return P(y,{style:{flex:1},testID:"everfur-sdk-ask",children:[b?/* @__PURE__ */z(y,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */z(v,{accessibilityRole:"button",onPress:u,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */z(Text,{tier:"control",style:{fontFamily:p["look.font.body"],fontSize:15,color:p["look.color.accent"]},children:i.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */z(Ta.Provider,{value:a,children:/* @__PURE__ */z(e,{...l,...r===null?{}:{petRef:r.petRef},...m===void 0?{}:{vetUsState:m},...s("texting")||!p["features.texting"]?{textingEntry:false}:{},...n.vetOnAsk==="none"?{}:{onFindVet:d},emptyState:h,historyBar:g,style:{flex:1}})}),i.kind==="counter"?/* @__PURE__ */z(Text,{style:{textAlign:"center",fontFamily:p["look.font.label"]==="body"?p["look.font.body"]:p["look.font.label"],fontSize:12,color:p["look.color.muted"],paddingVertical:4},testID:"everfur-sdk-counter",children:i.line}):null]})}function VetPane({config:e,pet:t,level:n,locked:r,onLocked:o,onAsk:i}){let a=useVetVisit({petRef:t?.petRef??null,usState:t?.location?.state??null}),l=vetHome(e,{level:n,...t===null?{}:{pet:t.name,petSex:t.sex??null,visitsUsed:t.visitsUsed??null},...t?.stateName!==void 0?{stateName:t.stateName}:t?.location?.state!==void 0?{stateName:t.location.state}:{}});/* @__PURE__ */
194
197
  return P(y,{style:{flex:1},children:[
195
198
  /* @__PURE__ */z(SdkVetHomeView,{config:e,home:l,onBook:()=>{r?o():a.open(t?.petRef??null)},style:{flex:1}}),
196
- /* @__PURE__ */z(SdkDockBar,{config:e,onPress:i})]})}function RecordsPane({config:e,host:t,pet:n,vetShown:r,records:i,onPlan:a,onVet:l,locked:s,onAsk:d}){let c=e.settings,u=new Set(c["features.partner_data"]),p=(t.partnerData??[]).filter(e=>u.has(e.source)),f=partnerDataSources(e),h=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results");/* @__PURE__ */
199
+ /* @__PURE__ */z(SdkDockBar,{config:e,pet:t?.name,onPress:i})]})}function RecordsPane({config:e,host:t,pet:n,vetShown:r,records:i,onPlan:a,onVet:l,locked:s,onAsk:d}){let c=e.settings,u=new Set(c["features.partner_data"]),p=(t.partnerData??[]).filter(e=>u.has(e.source)),f=partnerDataSources(e),h=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results");/* @__PURE__ */
197
200
  return P(y,{style:{flex:1},testID:"everfur-sdk-records",children:[n===null?null:/* @__PURE__ */z(o,{...i,petRef:n.petRef,petName:n.name,weightUnit:c["units.weight"],noVet:!r,onOpenPlan:()=>a("previous_results"),...r?{onSpeakToVet:l}:{},...s("link_records")?{onRequestFromClinic:()=>a("link_records")}:{},style:{flex:1}}),p.length>0?/* @__PURE__ */z(y,{style:{paddingHorizontal:16,paddingVertical:8,gap:6},testID:"everfur-sdk-partner-data",accessibilityLabel:f.join(", "),children:p.map((e,t)=>/* @__PURE__ */P(y,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[
198
201
  /* @__PURE__ */z(Text,{tier:"badge",style:{fontFamily:c["look.font.body"],fontSize:11,color:c["look.color.heading"],backgroundColor:c["look.color.tint"],paddingHorizontal:8,paddingVertical:2,borderRadius:10,overflow:"hidden"},children:h(e.source)}),
199
202
  /* @__PURE__ */z(Text,{style:{flex:1,fontFamily:c["look.font.body"],fontSize:14,color:c["look.color.ink"]},children:e.title}),e.date!==void 0?/* @__PURE__ */z(Text,{style:{fontFamily:c["look.font.body"],fontSize:12,color:c["look.color.muted"]},children:e.date}):null]},`${e.source}-${t}`))}):null,
200
- /* @__PURE__ */z(SdkDockBar,{config:e,onPress:d})]})}function EverfurSdkLauncher({onPress:e,tipSeen:t=false,onTipSeen:n,replyWaiting:r,onReplyWaitingChange:o,style:i}){let a=ma(),{active:l}=useEverfurSdkConfig();u(()=>{a?.load()},[a]);let s=useEverfurUnread({petRef:null}),d=r??s.hasUnread===true;return u(()=>{o?.(d)},[d,o]),l===null||l.settings["layout.launcher"]!=="floating_button"?null:/* @__PURE__ */z(SdkLauncherView,{config:l,onPress:e,replyWaiting:d,tipSeen:t,onTipSeen:()=>n?.(),...i===void 0?{}:{style:i}})}export{ct as EVERFUR_INTRO_COPY,Nt as EVERFUR_TABS_COPY,mi as EVERFUR_TABS_SHELL_COPY,EverfurIntro,EverfurRecordsLandedBanner,EverfurSdkApp,EverfurSdkLauncher,EverfurTabs,Qo as RECORDS_BANNER_MS,defaultIntroBlanks,introFacts,introPetWords,introText,isIntroSwipeOut,numberWord,registerEverfurSvg,useEverfurIntroSeen,useEverfurSdkConfig,useEverfurTabs,useLoadEverfurSdkConfig};
203
+ /* @__PURE__ */z(SdkDockBar,{config:e,pet:n?.name,onPress:d})]})}function EverfurSdkLauncher({onPress:e,tipSeen:t=false,onTipSeen:n,replyWaiting:r,onReplyWaitingChange:o,style:i}){let a=Fa(),{active:l}=useEverfurSdkConfig();u(()=>{a?.load()},[a]);let s=useEverfurUnread({petRef:null}),d=r??s.hasUnread===true;return u(()=>{o?.(d)},[d,o]),l===null||l.settings["layout.launcher"]!=="floating_button"?null:/* @__PURE__ */z(SdkLauncherView,{config:l,onPress:e,replyWaiting:d,tipSeen:t,onTipSeen:()=>n?.(),...i===void 0?{}:{style:i}})}export{ct as EVERFUR_INTRO_COPY,$t as EVERFUR_TABS_COPY,yi as EVERFUR_TABS_SHELL_COPY,EverfurIntro,EverfurRecordsLandedBanner,EverfurSdkApp,EverfurSdkLauncher,EverfurTabs,Zo as RECORDS_BANNER_MS,defaultIntroBlanks,introFacts,introPetWords,introText,isIntroSwipeOut,numberWord,registerEverfurSvg,useEverfurIntroSeen,useEverfurSdkConfig,useEverfurTabs,useLoadEverfurSdkConfig};