@everfur/sdk 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/CHANGELOG.md +69 -4
  2. package/README.md +6 -1
  3. package/dist/{Chat-DwAC2vhB.d.ts → Chat-BZZ-Py5l.d.ts} +3 -3
  4. package/dist/{Chat-DPUD6dnc.d.cts → Chat-Dq4fffIO.d.cts} +3 -3
  5. package/dist/{DepthViews-DNEM96Se.d.ts → DepthViews-BG3E25MD.d.ts} +1 -1
  6. package/dist/{DepthViews-DP0R-DhB.d.cts → DepthViews-B_hIypI6.d.cts} +1 -1
  7. package/dist/{DepthViews-DbFhR4Du.d.cts → DepthViews-CL75jyRA.d.cts} +1 -1
  8. package/dist/{DepthViews-D_3hl4xk.d.ts → DepthViews-CkYri51q.d.ts} +1 -1
  9. package/dist/animations/index.cjs +1 -1
  10. package/dist/animations/index.d.cts +3 -3
  11. package/dist/animations/index.d.ts +3 -3
  12. package/dist/animations/index.js +1 -1
  13. package/dist/{attachments-CQgFrEQ7.d.cts → attachments-BorG422I.d.cts} +2 -2
  14. package/dist/{attachments-5NeobOCd.d.ts → attachments-BrUWQYNK.d.ts} +5 -4
  15. package/dist/{attachments-D8T5re7e.d.cts → attachments-D_SECjr1.d.cts} +5 -4
  16. package/dist/{attachments-Bw3iMQgu.d.ts → attachments-DpldrvIW.d.ts} +2 -2
  17. package/dist/bookingCopy-CqtDYvCR.d.ts +732 -0
  18. package/dist/bookingCopy-SREvkG19.d.cts +732 -0
  19. package/dist/{entitlementRepository-DSbzuyAW.d.ts → branding-CsRdeNwK.d.cts} +1 -133
  20. package/dist/{entitlementRepository-DKdXFgTo.d.cts → branding-CsRdeNwK.d.ts} +1 -133
  21. package/dist/callCopy-DoQKG3-L.d.cts +40 -0
  22. package/dist/callCopy-DoQKG3-L.d.ts +40 -0
  23. package/dist/casesRepository-DwtZVsbj.d.cts +51 -0
  24. package/dist/casesRepository-v6QczS9N.d.ts +51 -0
  25. package/dist/chat/index.cjs +1 -1
  26. package/dist/chat/index.d.cts +9 -8
  27. package/dist/chat/index.d.ts +9 -8
  28. package/dist/chat/index.js +1 -1
  29. package/dist/client/index.cjs +5 -5
  30. package/dist/client/index.d.cts +10 -8
  31. package/dist/client/index.d.ts +10 -8
  32. package/dist/client/index.js +5 -5
  33. package/dist/{config-CzTZGlfF.d.cts → config--Wu1Umhd.d.cts} +2 -2
  34. package/dist/{config-DW60uRb9.d.ts → config-C7eb_IMD.d.ts} +2 -2
  35. package/dist/consent/index.cjs +1 -1
  36. package/dist/consent/index.d.cts +5 -5
  37. package/dist/consent/index.d.ts +5 -5
  38. package/dist/consent/index.js +1 -1
  39. package/dist/{context-XvTzq1tE.d.cts → context-CL3lyuy1.d.cts} +6 -6
  40. package/dist/{context-DXhqHlPU.d.ts → context-CahAEha8.d.ts} +6 -6
  41. package/dist/{copy-Mjoo91aS.d.ts → copy-DdVFDL01.d.ts} +2 -2
  42. package/dist/{copy-bKDNigLb.d.cts → copy-UeUJVk8X.d.cts} +2 -2
  43. package/dist/core/index.cjs +7 -7
  44. package/dist/core/index.d.cts +118 -29
  45. package/dist/core/index.d.ts +118 -29
  46. package/dist/core/index.js +7 -7
  47. package/dist/{depth-CErXCU8J.d.cts → depth-D5HwcvKC.d.cts} +34 -3
  48. package/dist/{depth-DjDcJ6kH.d.ts → depth-DvPwPuT_.d.ts} +34 -3
  49. package/dist/entitlementRepository-B7egEdW6.d.ts +43 -0
  50. package/dist/entitlementRepository-BpJ7tiwl.d.cts +43 -0
  51. package/dist/{identity-DI4eVx9S.d.cts → identity-C2-08BZW.d.cts} +2 -2
  52. package/dist/{identity-BMx2SUOM.d.ts → identity-CEi9GRFZ.d.ts} +2 -2
  53. package/dist/index.cjs +6 -6
  54. package/dist/index.d.cts +17 -16
  55. package/dist/index.d.ts +17 -16
  56. package/dist/index.js +6 -6
  57. package/dist/notifications/index.cjs +2 -2
  58. package/dist/notifications/index.d.cts +2 -2
  59. package/dist/notifications/index.d.ts +2 -2
  60. package/dist/notifications/index.js +2 -2
  61. package/dist/optionalModule-DbJmsq5f.d.cts +21 -0
  62. package/dist/optionalModule-DbJmsq5f.d.ts +21 -0
  63. package/dist/{pets-CtQdRpWo.d.ts → pets-DJv2sj2H.d.ts} +1 -1
  64. package/dist/{pets-aB8q0JyX.d.cts → pets-JVCXgRgR.d.cts} +1 -1
  65. package/dist/{casesRepository-DHwtGRYY.d.cts → petsRepository-B_gKbAzJ.d.cts} +2 -48
  66. package/dist/{casesRepository-ClLv6qMl.d.ts → petsRepository-Bk6GDwLs.d.ts} +2 -48
  67. package/dist/photo/index.cjs +1 -1
  68. package/dist/photo/index.js +1 -1
  69. package/dist/{ports-DEBzEhbp.d.cts → ports-BY2ph0_y.d.cts} +5 -15
  70. package/dist/{ports-DMolTRzU.d.ts → ports-D7YW8qz9.d.ts} +5 -15
  71. package/dist/records/depth/index.cjs +2 -2
  72. package/dist/records/depth/index.d.cts +7 -7
  73. package/dist/records/depth/index.d.ts +7 -7
  74. package/dist/records/depth/index.js +2 -2
  75. package/dist/records/index.cjs +3 -3
  76. package/dist/records/index.d.cts +9 -9
  77. package/dist/records/index.d.ts +9 -9
  78. package/dist/records/index.js +3 -3
  79. package/dist/{requestFunnel-L-BQfi0z.d.cts → requestFunnel-BjDpqqvm.d.cts} +25 -2
  80. package/dist/{requestFunnel-CjW7uDuA.d.ts → requestFunnel-DFMGcluw.d.ts} +25 -2
  81. package/dist/{runtime-B8s-_hv8.d.cts → runtimeTypes-gZEJu-da.d.cts} +9 -99
  82. package/dist/{runtime-BR9ysG0J.d.ts → runtimeTypes-w5KqBMcs.d.ts} +9 -99
  83. package/dist/server/events/index.cjs +1 -1
  84. package/dist/server/events/index.d.cts +2 -2
  85. package/dist/server/events/index.d.ts +2 -2
  86. package/dist/server/events/index.js +1 -1
  87. package/dist/server/index.cjs +1 -1
  88. package/dist/server/index.d.cts +3 -3
  89. package/dist/server/index.d.ts +3 -3
  90. package/dist/server/index.js +1 -1
  91. package/dist/televet/booking/index.cjs +1 -0
  92. package/dist/televet/booking/index.d.cts +294 -0
  93. package/dist/televet/booking/index.d.ts +294 -0
  94. package/dist/televet/booking/index.js +1 -0
  95. package/dist/televet/call/index.cjs +1 -0
  96. package/dist/televet/call/index.d.cts +141 -0
  97. package/dist/televet/call/index.d.ts +141 -0
  98. package/dist/televet/call/index.js +1 -0
  99. package/dist/televet/index.cjs +1 -1
  100. package/dist/televet/index.d.cts +87 -5
  101. package/dist/televet/index.d.ts +87 -5
  102. package/dist/televet/index.js +1 -1
  103. package/dist/testing/index.cjs +3 -3
  104. package/dist/testing/index.d.cts +2 -2
  105. package/dist/testing/index.d.ts +2 -2
  106. package/dist/testing/index.js +3 -3
  107. package/dist/testing/rn/index.cjs +1 -1
  108. package/dist/testing/rn/index.d.cts +9 -8
  109. package/dist/testing/rn/index.d.ts +9 -8
  110. package/dist/testing/rn/index.js +1 -1
  111. package/dist/testing/web/index.cjs +1 -1
  112. package/dist/testing/web/index.d.cts +9 -8
  113. package/dist/testing/web/index.d.ts +9 -8
  114. package/dist/testing/web/index.js +1 -1
  115. package/dist/{timelineRows-DZed6dAM.d.ts → timelineRows-C15jxFFH.d.ts} +1 -1
  116. package/dist/{timelineRows-CaohZzXS.d.cts → timelineRows-odO8g9r2.d.cts} +1 -1
  117. package/dist/typeStyle-CKqVYD6L.d.cts +111 -0
  118. package/dist/typeStyle-DmoyacDG.d.ts +111 -0
  119. package/dist/{useRecordsDepth-BHBzJ76R.d.cts → useRecordsDepth-C6rjEaLn.d.cts} +1 -1
  120. package/dist/{useRecordsDepth-BU-OhzH6.d.ts → useRecordsDepth-crhBllQK.d.ts} +1 -1
  121. package/dist/video/index.cjs +1 -1
  122. package/dist/video/index.js +1 -1
  123. package/dist/{view-DtSPYpKa.d.ts → view-Bxwxp4xD.d.ts} +2 -2
  124. package/dist/{view-C3qPIXGX.d.cts → view-DyitEO0m.d.cts} +2 -2
  125. package/dist/web/consent/index.cjs +1 -1
  126. package/dist/web/consent/index.d.cts +5 -5
  127. package/dist/web/consent/index.d.ts +5 -5
  128. package/dist/web/consent/index.js +1 -1
  129. package/dist/web/index.cjs +7 -7
  130. package/dist/web/index.d.cts +18 -17
  131. package/dist/web/index.d.ts +18 -17
  132. package/dist/web/index.js +7 -7
  133. package/dist/web/notifications/index.cjs +2 -2
  134. package/dist/web/notifications/index.d.cts +3 -3
  135. package/dist/web/notifications/index.d.ts +3 -3
  136. package/dist/web/notifications/index.js +2 -2
  137. package/dist/web/records/depth/index.cjs +2 -2
  138. package/dist/web/records/depth/index.d.cts +7 -7
  139. package/dist/web/records/depth/index.d.ts +7 -7
  140. package/dist/web/records/depth/index.js +2 -2
  141. package/dist/web/records/index.cjs +3 -3
  142. package/dist/web/records/index.d.cts +102 -11
  143. package/dist/web/records/index.d.ts +102 -11
  144. package/dist/web/records/index.js +3 -3
  145. package/dist/web/televet/booking/index.cjs +1 -0
  146. package/dist/web/televet/booking/index.d.cts +349 -0
  147. package/dist/web/televet/booking/index.d.ts +349 -0
  148. package/dist/web/televet/booking/index.js +1 -0
  149. package/dist/web/televet/call/index.cjs +1 -0
  150. package/dist/web/televet/call/index.d.cts +142 -0
  151. package/dist/web/televet/call/index.d.ts +142 -0
  152. package/dist/web/televet/call/index.js +1 -0
  153. package/dist/web/televet/index.cjs +1 -1
  154. package/dist/web/televet/index.d.cts +90 -4
  155. package/dist/web/televet/index.d.ts +90 -4
  156. package/dist/web/televet/index.js +1 -1
  157. package/package.json +72 -4
  158. package/televet/booking/package.json +8 -0
  159. package/televet/call/package.json +8 -0
  160. package/web/televet/booking/native-blocked.cjs +12 -0
  161. package/web/televet/booking/package.json +8 -0
  162. package/web/televet/call/native-blocked.cjs +12 -0
  163. package/web/televet/call/package.json +8 -0
  164. package/dist/typeStyle-0TydiZ1w.d.cts +0 -19
  165. package/dist/typeStyle-CWMsoe6b.d.ts +0 -19
@@ -0,0 +1 @@
1
+ import {createContext,forwardRef,createElement,useMemo,useState,useEffect,useReducer,useCallback,useRef,useContext,Component,useSyncExternalStore}from'react';import {TextInput,Linking,View,StyleSheet,Alert,BackHandler,Pressable,Image,ActivityIndicator,ScrollView,Text}from'react-native';import {jsxs,jsx}from'react/jsx-runtime';var Wi=Object.defineProperty;var o=(e,t)=>Wi(e,"name",{value:t,configurable:true});function mt(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}o(mt,"assertNever");function un(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}o(un,"errorFrame");function Zt(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}o(Zt,"reportHostFailure");function $i(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}o($i,"isThenable");function Qe(e,...t){if(typeof e=="function")try{let r=e(...t);return $i(r)&&Promise.resolve(r).then(void 0,Zt),r}catch(r){Zt(r);return}}o(Qe,"callHost");var cn=new WeakMap;function Yi(e){if(typeof e!="function")return;let t=cn.get(e);if(t!==void 0)return t;let r=o((...n)=>{Qe(e,...n);},"guarded");return cn.set(e,r),r}o(Yi,"guardHost");function je(e,t){let r=null;for(let n of t){let i=e[n];typeof i=="function"&&(r??={...e},r[n]=Yi(i));}return r??e}o(je,"guardHostProps");function gt(e,...t){let r;try{r=e(...t);}catch(n){return Zt(n),Promise.resolve({ok:false,error:n})}return Promise.resolve(r).then(n=>({ok:true,value:n}),n=>({ok:false,error:n}))}o(gt,"callHostAsync");var m=o(e=>e,"DRAFT"),Gi=["[PLACEHOLDER","[PLAN NAME]","[LINK]","[Last]","TODO","TBD"];function Xi(e){return Gi.some(t=>e.toUpperCase().includes(t.toUpperCase()))}o(Xi,"isPlaceholderCopy");function ue(e,t){let r=e;for(let[n,i]of Object.entries(t))r=r.split(`{${n}}`).join(i);return r}o(ue,"fill");var c=Object.freeze({stateBlockedTitle:m("Not available in this state yet"),noCliniciansTitle:m("No vets available right now"),noCliniciansBody:m("Nobody is free in your area at the moment. This changes through the day."),noCliniciansRetryCta:m("Check again"),yourVetTitle:m("Your Vet"),reviewsLabel:m("reviews"),rescheduleFromTemplate:m("Moving your visit on {when}"),rescheduleFailed:m("That did not move. Your original time is unchanged."),keepExistingCta:m("Keep my current time"),bookingPausedTitle:m("Booking is not available right now."),slotsErrorTitle:m("Could not load times"),noSlotsTitle:m("No times available"),nextOpeningTemplate:m("Next opening across our vets: {when}"),seeOtherVetsCta:m("See other vets"),retryCta:m("Try again"),holdExpired:m("That time is no longer held. Pick another."),slotTaken:m("That time was just taken. Pick another."),reasonPlaceholder:m("What is going on with your pet?"),reasonTooLong:m("That is too long. Please shorten it."),shareRecordsOff:m("Share health records with this vet"),confirmNotEntitled:m("A Pro membership is needed to book a video visit."),confirmFailed:m("That did not book. Try again."),navTitle:m("Book a visit"),rescheduleNavTitle:m("Change your visit"),close:m("Close"),continueCta:m("Continue"),petSelectTitle:m("Who is this visit for?"),addPetCta:m("Add a pet"),locationUnknownTitle:m("We need your location to find a vet"),locationUnknownBody:m("Turn on location for Everfur, then try again."),locationUnknownCta:m("Allow location"),locationBlockedTitle:m("Location is turned off"),locationBlockedBody:m("Everfur needs your location to match you with a vet in your area."),locationBlockedCta:m("Open Settings"),locationUnavailableTitle:m("We could not read your location"),locationUnavailableBody:m("Try again in a moment."),stateAttestTemplate:m("I confirm my pet and I are in {state} right now."),describeHeading:m("or Type to the vet what you're seeing"),describeHelpLong:m("A few sentences is plenty. When it started, what changed, anything you've already tried."),addPhotoCta:m("ADD PHOTO OR VIDEO"),removePhotoLabel:m("Remove photo"),summaryPet:m("Pet"),summaryVet:m("Vet"),summaryWhen:m("When"),summaryLength:m("Length"),summaryReason:m("Reason"),summaryLengthTemplate:m("{n} minutes"),confirmCta:m("Confirm visit"),bookedTitle:m("You are booked."),addToCalendarCta:m("Add to calendar"),doneCta:m("Done"),booked:Object.freeze({remindPromise:m("We will notify you 30 minutes before."),summaryPromise:m("{pet}'s summary goes to the vet ahead of the call."),joinPromise:m("Join right here in the app. No links to hunt for."),backToPet:m("Back to {pet}"),calendarAdded:m("Added to your calendar"),calendarFailedBody:m("That did not save to your calendar.")}),chrome:Object.freeze({closeHint:m("Closes without saving"),discardTitle:m("Leave without booking?"),discardBody:m("Your answers will not be saved."),discardConfirmCta:m("Leave"),discardKeepCta:m("Keep going"),noPetsTitle:m("No pets on this account"),loadFailedTitle:m("Could not load"),retryCta:m("Try again")}),emergency:Object.freeze({bannerTitle:m("This cannot wait for a scheduled call."),keepBookingCta:m("I have handled this, keep booking"),lede:m("What you are describing is the kind of thing vets want to see in person, now. Please call one of these first.")}),visit:Object.freeze({title:m("Your visit")}),loading:Object.freeze({pets:"Loading pets. Nothing to read yet.",clinicians:"Loading vets. Nothing to read yet.",slots:"Loading times. Nothing to read yet.",consult:"Loading your visit. Nothing to read yet.",progressTemplate:"Step {step} of {total}"})});function fn(e=c){return typeof e=="string"?[e]:typeof e!="object"||e===null?[]:Object.values(e).flatMap(t=>fn(t))}o(fn,"televetBookingCopyValues");function ce(){return fn().every(e=>e.trim().length>0&&!Xi(e))}o(ce,"isTelevetBookingCopyReady");function tr(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))tr(e[t]);}return e}o(tr,"deepFreeze");var Zi=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),yn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},mn={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},pn={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},Ji={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},el={regular:"400",medium:"500",bold:"700"},tl={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},rl=0,vt="System",bt="monospace",nl=["content","heading","control","compact","badge"];function ol(e){let t={};for(let r of nl)t[r]=e;return t}o(ol,"authoredTierSizes");function gn(){return {family:vt,mono:bt,fontUrl:null,families:{regular:vt,medium:vt,bold:vt,mono:bt,monoMedium:bt,monoBold:bt},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:pn,tierSizes:ol(pn),lineHeight:Ji,weight:el,letterSpacing:tl,scale:1,maxScale:rl,scaleCaps:Zi}}o(gn,"baseType");var vn={},Jt=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function er(e){return `cubic-bezier(${e.join(", ")})`}o(er,"cssCubicBezier");var bn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:er(Jt.standard),emphasized:er(Jt.emphasized),exit:er(Jt.exit)},reducedMotion:false},il={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:"#FDFBF8",surfaceSubtle:"#EFE9E3",background:"#FFFFFF",borderRingCream:"#D8D2C8",chatGround:"#FFFFFF",composerFill:"#FDFBF8",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#111111",secondary:"#0E462E",muted:"#6E6660",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:"#B91C1C",errorRed:"#FF1B00",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(185,28,28,0.12)",badgeBgNeutral:"rgba(110,102,96,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},hn=tr({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:il,space:yn,radius:mn,type:gn(),motion:bn,slots:vn}),ll={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:"#9A938C",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",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",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};tr({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ll,space:yn,radius:mn,type:gn(),motion:bn,slots:vn});var Tn=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),En=globalThis,rr=En[Tn]??(En[Tn]=createContext(hn));rr.displayName??="EverfurThemeContext";function C(){return useContext(rr)}o(C,"useEverfurTheme");function fl(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}o(fl,"tierMultiplier");function b({tier:e="content",...t}){let{type:r}=C(),n=fl(r,e);return createElement(Text,n===void 0?t:{maxFontSizeMultiplier:n,...t})}o(b,"Text");var _n=forwardRef(o(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));var pl=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function E(e,t){let r=e.type,n=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:n}:{fontFamily:n,fontWeight:r.weight[pl[t]]}}o(E,"face");var ir=class ir extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey};}static getDerivedStateFromError(){return {failed:true}}static getDerivedStateFromProps(r,n){return Object.is(r.resetKey,n.key)?null:{failed:false,key:r.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};o(ir,"HostRenderBoundary");var nr=ir;function ml({render:e}){return e()}o(ml,"RenderHost");function or({render:e,fallback:t,resetKey:r}){return createElement(nr,{fallback:t,resetKey:r,children:createElement(ml,{render:e})})}o(or,"HostRender");var lr=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(lr.map(e=>e.wireCode));var gl=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",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",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"}),Cn=Object.freeze(lr.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:gl[e.wireCode]}))),vl=new Map(Cn.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),bl=Object.freeze(["http_envelope",...[...new Set(Cn.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function ht(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let n of [t??"http_envelope",...bl]){let i=vl.get(n+r);if(i)return i}}o(ht,"contractErrorFor");function hl(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(hl,"contractDocUrl");function xn(e){return null}o(xn,"publishedDocUrl");var Tl=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"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 wn(e){return Tl[e]}o(wn,"categoryFor");function Pn(e){let t=ht(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(n){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":return "rateLimited";case "IDEMPOTENCYKEYCONFLICT":case "IDEMPOTENCYCONFLICT":return "idempotencyConflict";case "ACCESSDENIED":case "FORBIDDEN":return "accessDenied";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"}}o(Pn,"fromWire");var El=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function ar(e){return El.has(e)}o(ar,"isAutoRetryable");var kl=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function In(e){return ar(e)||kl.has(e)}o(In,"isRetryableCode");var _l=500,sr=8e3,On=4;function An(e,t=Math.random){let r=Math.max(0,e),n=Math.min(_l*2**r,sr);return Math.floor(t()*n)}o(An,"backoffDelayMs");var Sl=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:"This feature isn't available on your account right now.",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:"Something in that request was not right. Check the details and try again.",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.",unknown:"Something went wrong. Please try again."});function dr(e){return Sl[e]}o(dr,"userFacingError");function Fn(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}o(Fn,"defineHidden");var Rl=/^[a-z][a-z0-9_]{0,63}$/;function U(e,t){let r=ht(t?.wireCode,t?.wireEnvelope),n={code:e,category:wn(e),retryable:t?.retryable??In(e),displayMessage:dr(e)};if(t?.httpStatus!==void 0&&(n.httpStatus=t.httpStatus),t?.requestId&&(n.requestId=t.requestId),typeof t?.reasonCode=="string"&&Rl.test(t.reasonCode)&&(n.reasonCode=t.reasonCode),r);return t?.wireMessage&&Fn(n,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Fn(n,"raw",t.raw),Object.freeze(n)}o(U,"makeEverfurError");var Cl=Object.freeze({chat:Object.freeze(["chat.message.create"]),records:Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:Object.freeze(["records.clinic.create"]),video:Object.freeze(["video.gait.execute"]),photo:Object.freeze(["photo.checkup.execute"]),animations:Object.freeze(["animations.state.read"]),televet:Object.freeze(["televet.visit.create"])});function xl(e){return Cl[e]}o(xl,"requires");function Dn(e,t,r){let n=xl(e),i=new Map;for(let s of t)i.set(s.resource,s);if(r?.isPending===true&&n.some(s=>!i.has(s)))return ur({name:e,enabled:false,isPending:true,limits:{}});let l=wl(n,i);return n.filter(s=>i.get(s)?.granted!==true).length===0?ur({name:e,enabled:true,isPending:false,limits:l}):ur({name:e,enabled:false,isPending:false,limits:l,disabled:Pl(n,i)})}o(Dn,"decideCapability");function wl(e,t){let r={};for(let n of e){let i=t.get(n)?.limits;if(i)for(let[l,a]of Object.entries(i)){let s=r[l];r[l]=s===void 0?a:Math.min(s,a);}}return r}o(wl,"mergeLimits");function Pl(e,t){for(let r of e){let n=t.get(r)?.disabled;if(n)return Object.freeze({reason:n.reason,level:n.level,recoverable:n.recoverable})}return Object.freeze({reason:dr("accessDenied"),level:"user_entitlement",recoverable:false})}o(Pl,"disabledFor");function ur(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),Object.freeze(t)}o(ur,"freezeDecision");function F(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}o(F,"ok");function R(e){return Object.freeze({ok:false,error:e})}o(R,"err");var Tt=class Tt extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,Tt.prototype);}};o(Tt,"EverfurConfigError");var Ze=Tt;var Vn=Symbol.for("@everfur/sdk#EverfurContext@v1"),Bn=globalThis,Nn=Bn[Vn]??(Bn[Vn]=createContext(null));Nn.displayName??="EverfurContext";function fe(){let e=useContext(Nn);if(e===null)throw new Ze("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}o(fe,"useEverfurContext");function we(e){let{runtime:t}=fe(),r=t.entitlements,n=useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot);return useMemo(()=>Dn(e,n.decisions,{isPending:n.isPending}),[e,n])}o(we,"useCapability");var Dl=48;function Vl(e){return e.isPending?"pending":e.enabled?"enabled":"disabled"}o(Vl,"selectView");function Mn(e){let{capability:t,children:r,renderDisabled:n,renderPending:i,style:l}=e,a=we(t),s=useMemo(()=>Vl(a),[a]);switch(s){case "enabled":return r;case "pending":return i?jsx(or,{render:i,fallback:jsx(zn,{capability:t,style:l})}):jsx(zn,{capability:t,style:l});case "disabled":return n?jsx(or,{render:()=>n(a),fallback:jsx(jn,{decision:a,style:l}),resetKey:a}):jsx(jn,{decision:a,style:l});default:return mt(s)}}o(Mn,"CapabilityGate");function zn({capability:e,style:t}){let r=C(),n=useMemo(()=>Hn(r),[r]);return jsx(View,{style:[n.offstate,t],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${e}`,children:jsx(View,{style:n.skeletonBar})})}o(zn,"PendingSkeleton");function jn({decision:e,style:t}){let r=C(),n=useMemo(()=>Hn(r),[r]),i=e.disabled?.reason??"";return jsx(View,{style:[n.offstate,t],accessible:true,accessibilityRole:"text",accessibilityLabel:i,children:i.length>0?jsx(b,{style:n.offstateText,children:i}):null})}o(jn,"OffState");function Hn(e){let{color:t,space:r,radius:n,type:i}=e;return StyleSheet.create({offstate:{minHeight:Dl,justifyContent:"center",paddingHorizontal:r.lg,paddingVertical:r.md,backgroundColor:t.surfaceCream,borderRadius:n.md,borderWidth:StyleSheet.hairlineWidth,borderColor:t.brandBorder},offstateText:{...E(e,"regular"),fontSize:i.size.body,lineHeight:Math.round(i.size.body*i.lineHeight.normal),color:t.text.muted},skeletonBar:{height:r.md,borderRadius:n.xs,backgroundColor:t.brandSofter}})}o(Hn,"makeStyles");function Et(e){let t=e.raw;if(typeof t!="object"||t===null)return null;let r=t,n=r.detail??r.error;return typeof n=="object"&&n!==null?n:r}o(Et,"details");function Bl(e){let t=Et(e)?.categories;return Array.isArray(t)?Object.freeze(t.filter(r=>typeof r=="string")):Object.freeze([])}o(Bl,"categoriesOf");function Un(e){let t=Et(e)?.retry_after_seconds;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:null}o(Un,"retryAfterOf");function Wn(e){let t=e.wireMessage;if(typeof t=="string"&&t.trim().length>0)return t.trim();let r=Et(e)?.message;return typeof r=="string"&&r.trim().length>0?r.trim():null}o(Wn,"messageOf");function Nl(e){let t=e.reasonCode;if(typeof t=="string"&&t.length>0)return t;let r=Et(e),n=r?.code??r?.error_code;return typeof n=="string"&&n.length>0?n:null}o(Nl,"codeOf");function Pe(e){let t=e.httpStatus;if(t===402)return Object.freeze({kind:"not_entitled"});if(t===429||e.code==="rateLimited"||e.code==="quotaExceeded")return Object.freeze({kind:"rate_limited",retryAfterSeconds:Un(e),message:Wn(e)});if(t===404)return Object.freeze({kind:"unavailable"});switch(Nl(e)){case "televet_rate_limited":return Object.freeze({kind:"rate_limited",retryAfterSeconds:Un(e),message:Wn(e)});case "televet_emergency_ack_required":return Object.freeze({kind:"emergency",categories:Bl(e)});case "televet_not_entitled":return Object.freeze({kind:"not_entitled"});case "televet_slot_conflict":return Object.freeze({kind:"slot_taken"});case "televet_hold_invalid":return Object.freeze({kind:"slot_taken"});case "televet_clinician_cannot_prescribe":case "televet_clinician_unavailable":case "televet_clinician_not_bookable":return Object.freeze({kind:"clinician_unavailable"});case "televet_membership_conflict":return Object.freeze({kind:"not_entitled"});case "televet_registry_unavailable":return Object.freeze({kind:"failed"});}return Object.freeze({kind:"failed"})}o(Pe,"televetBookingRefusal");function Ll(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}o(Ll,"authHeaders");function Je(e,t){return {...e,headers:{...zl(e.headers),...Ll(t)}}}o(Je,"withAuthHeaders");function zl(e){if(!e)return {};let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(t[r]=n);}return t}o(zl,"stripAuthHeaders");async function qn(e,t){if(t.mode==="anonymous")return t.transport.request(Je(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return R(pr())}let n=await t.transport.request(Je(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await t.identity.currentToken({forceRefresh:!0});}catch{return R(pr())}let l=await t.transport.request(Je(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !l.ok&&l.error.httpStatus===401?R(pr(l.error.httpStatus)):l}o(qn,"authedSend");function pr(e){return U("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(pr,"authRejectedError");function Kn(e){return U("internalError",{retryable:true,wireMessage:jl(e)})}o(Kn,"networkError");function jl(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}o(jl,"describeCause");var Ml=3e4,Hl=sr*2,Ul="idempotency-key",Wl=new Set(["POST","PUT","PATCH","DELETE"]),ql=Object.freeze({onEvent(){}}),Kl=Object.freeze({setTimeout:o((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function $l(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}o($l,"seededIdempotencyKey");function Ie(e){let t=e.observer??ql,r=e.timers??Kl,n=e.rng??Math.random,i=e.sleep??((p,y)=>la(p,r,y)),l=e.maxAttempts??On,a=e.unaryTimeoutMs??Ml,s=e.newIdempotencyKey??Gl(),u=o(p=>{try{t.onEvent(p);}catch{}},"emit");async function d(p,y,h){let x=h?.maxAttempts,T=Math.max(1,x??l),_=h?.idempotent??Wl.has(y.method),V=h?.idempotencyKey===void 0?null:$l(h.idempotencyKey),w=_?V??s():null,O=Yl(y,w),P=0;for(;;){let I=o(ee=>Object.freeze({call:p,method:y.method,path:y.path,attempt:P,...w?{idempotencyKey:w}:{},...ee}),"stamp");u(I({phase:"attempt"}));let te=oa(a,r),Q=ia(te.signal,y.signal),B;try{B=await qn({...O,signal:Q.signal},e.auth);}catch(ee){B=R(Kn(ee));}finally{Q.dispose(),te.cancel();}if(B.ok)return u(I({phase:"settled",ok:true,reason:"ok"})),B;let k=B.error,A=Ql(k,P,{maxAttempts:T,rng:n,now:r.now(),aborted:y.signal?.aborted===true,...x!==void 0?{perCallMaxAttempts:x}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),Z={ok:false,code:k.code,reason:A.reason,...k.httpStatus!==void 0?{httpStatus:k.httpStatus}:{},...k.requestId!==void 0?{requestId:k.requestId}:{}};if(!A.retry)return u(I({phase:"settled",...Z})),R(k);if(u(I({phase:"retry",...Z,delayMs:A.delayMs})),await i(A.delayMs,y.signal),y.signal?.aborted===true)return u(I({phase:"settled",...Z,reason:"aborted"})),R(k);P+=1;}}o(d,"send");async function f(p){return Je(p,await na(e.auth))}o(f,"authorize");async function*v(p,y,h){u(Object.freeze({call:p,phase:"stream.open",method:y.method,path:y.path,attempt:0}));try{yield*e.auth.transport.stream(y,h);}catch{yield un({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return o(v,"stream"),Object.freeze({send:d,authorize:f,stream:v})}o(Ie,"createRequestFunnel");function Yl(e,t){let r={};for(let[n,i]of Object.entries(e.headers??{}))n.toLowerCase()!==Ul&&(r[n]=i);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}o(Yl,"assembleHeaders");function Gl(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}o(Gl,"defaultIdempotencyKeyFactory");var Xl=10;function Ql(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let n=Zl(e);if(n==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!ar(e.code))return {retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if(o(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let a=o(()=>{if(r.policy===void 0)return null;let d;try{d=r.policy.maxAttempts(e.code);}catch{return null}return typeof d!="number"||!Number.isFinite(d)?null:Math.max(1,Math.min(Xl,Math.floor(d)))},"policyCeiling"),s=r.perCallMaxAttempts??a()??r.maxAttempts;if(t+1>=s)return {retry:false,reason:"attempts-exhausted"};let u=Jl(e,r.now);return u!==null?u>Hl?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:u}:{retry:true,reason:i,delayMs:An(t,r.rng)}}o(Ql,"decideRetry");function Zl(e){let t=e.code==="unknown"?Pn(ra(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}o(Zl,"throttleKind");function Jl(e,t){let r=ea(e.raw);if(r===null)return null;let n=r-t;return n>0?n:0}o(Jl,"retryOverrideMs");function ea(e){for(let t of Yn(e)){let r=t.resets_at,n=ta(r);if(n!==null)return n}return null}o(ea,"findResetsAt");function Yn(e){if(!$n(e))return [];let t=[e];for(let r of ["error","detail"]){let n=e[r];$n(n)&&t.push(n);}return t}o(Yn,"candidateScopes");function ta(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}o(ta,"parseInstantMs");function ra(e){for(let t of Yn(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}o(ra,"rawWireCode");function $n(e){return typeof e=="object"&&e!==null}o($n,"isRecord");async function na(e){return e.mode==="anonymous"?{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}:{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}o(na,"resolveDeviceAuth");function oa(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:o(()=>t.clearTimeout(n),"cancel")}}o(oa,"boundedSignal");function ia(e,t){let r=o(()=>{},"noop");if(!t)return {signal:e,dispose:r};let n=new AbortController;if(e.aborted||t.aborted)return n.abort(),{signal:n.signal,dispose:r};let i=o(()=>n.abort(),"onAbort");return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:o(()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i);},"dispose")}}o(ia,"mergeSignals");function la(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let i=t.setTimeout(()=>{r?.removeEventListener("abort",l),n();},e),l=o(()=>{t.clearTimeout(i),n();},"onAbort");r?.addEventListener("abort",l,{once:true});})}o(la,"delayAbortable");function kt(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(!(n>=56320&&n<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}o(kt,"hasLoneSurrogate");function _t(e){return [...e].length}o(_t,"serverLength");var Gn=Object.freeze({dog:"dog",canine:"dog",k9:"dog",puppy:"dog",cat:"cat",feline:"cat",kitten:"cat"});function Xn(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(Gn,t)?Gn[t]:null}o(Xn,"canonicalPetSpecies");var Qn=50,aa=128,yr=120,Zn=120,sa=2e3,Jn=120,da=80,ro=new Set(["male","female","unknown"]),no=new Set(["day","month","year"]),oo=new Set(["low","medium","high","athletic"]),io=new Set(["indoor","outdoor","both"]),lo=new Set(["mild","moderate","severe"]),ua=/^(\d{4})-(\d{2})-(\d{2})$/,ao=[["sex","sex"],["spayedNeutered","spayed_neutered"],["birthDate","birth_date"],["birthDatePrecision","birth_date_precision"],["activityLevel","activity_level"],["indoorOutdoor","indoor_outdoor"],["foodBrand","food_brand"],["foodType","food_type"],["microchipId","microchip_id"]],so=[["allergies","allergies"],["medications","medications"],["supplements","supplements"],["conditions","conditions"]];Object.freeze([...ao,...so].map(([e])=>e));function ca(e){let t=ua.exec(e);if(t===null)return false;let[r,n,i]=[Number(t[1]),Number(t[2]),Number(t[3])],l=new Date(Date.UTC(r,n-1,i));return l.getUTCFullYear()===r&&l.getUTCMonth()===n-1&&l.getUTCDate()===i}o(ca,"isRealDate");var tt=o(e=>(t,r)=>typeof r=="string"&&e.has(r)?null:`${t} must be one of ${[...e].join(", ")}`,"oneOf"),fa=o((e,t)=>typeof t=="boolean"?null:`${e} must be true or false`,"boolean"),Rt=o((e,t)=>typeof t=="string"&&ca(t)?null:`${e} must be a real date written YYYY-MM-DD`,"date"),oe=o((e,t={})=>(r,n)=>{if(typeof n!="string")return `${r} must be a string`;if(kt(n))return `${r} contains an unpaired surrogate and cannot be encoded`;let i=t.trimmed?n.trim():n;if(t.required&&i.length===0)return `${r} is required and must not be blank`;let l=_t(i);return l<=e?null:`${r} is ${l} characters; the server accepts at most ${e}`},"text"),pa={sex:tt(ro),spayedNeutered:fa,birthDate:Rt,birthDatePrecision:tt(no),activityLevel:tt(oo),indoorOutdoor:tt(io),foodBrand:oe(Jn),foodType:oe(Jn),microchipId:oe(da)},mr=["ref","ref",false,oe(aa,{required:true,trimmed:true})],gr=["notes","notes",false,oe(sa,{trimmed:true})],eo=[mr,["name","name",true,oe(yr,{required:true,trimmed:true})],["dose","dose",false,oe(Zn,{trimmed:true})],["frequency","frequency",false,oe(Zn,{trimmed:true})],["startDate","start_date",false,Rt],["endDate","end_date",false,Rt],gr],ya={allergies:[mr,["allergen","allergen",true,oe(yr,{required:true,trimmed:true})],["severity","severity",false,tt(lo)],gr],medications:eo,supplements:eo,conditions:[mr,["conditionName","condition_name",true,oe(yr,{required:true,trimmed:true})],["diagnosedDate","diagnosed_date",false,Rt],gr]};function ma(e,t,r){let n=`${e}[${t}]`;if(typeof r!="object"||r===null||Array.isArray(r))return {error:`${n} must be an object`};let i=r,l={};for(let[u,d,f,v]of ya[e]){let p=i[u];if(p==null){if(f)return {error:`${n}.${u} is required`};p===null&&(l[d]=null);continue}let y=v(`${n}.${u}`,p);if(y!==null)return {error:y};l[d]=p;}let a=l.start_date,s=l.end_date;return typeof a=="string"&&typeof s=="string"&&s<a?{error:`${n}.endDate must not be before startDate`}:{item:l}}o(ma,"itemToWire");function ga(e,t){if(!Array.isArray(t))return {error:`${e} must be an array (send [] to clear it)`};if(t.length>Qn)return {error:`${e} has ${t.length} items; the server accepts at most ${Qn}`};let r=[],n=new Set;for(let i=0;i<t.length;i+=1){let l=ma(e,i,t[i]);if("error"in l)return l;let a=l.item.ref;if(typeof a=="string"){let s=a.trim();if(n.has(s))return {error:`${e}: ref ${JSON.stringify(s)} is used twice; a ref names one item`};n.add(s);}r.push(l.item);}return {items:r}}o(ga,"listToWire");function uo(e,t){let r=e,n={};for(let[a,s]of ao){let u=r[a];if(u!==void 0){if(u!==null){let d=pa[a](a,u);if(d!==null)return {error:d}}n[s]=u;}}let i=r.birthDate!==void 0,l=r.birthDatePrecision!==void 0;if(i!==l||i&&r.birthDate===null!=(r.birthDatePrecision===null))return {error:"birthDate and birthDatePrecision must be sent together, both set or both null"};for(let[a,s]of so){let u=r[a];if(u===void 0)continue;let d=ga(a,u);if("error"in d)return d;n[s]=d.items;}return Object.keys(n).length>0&&t!==void 0&&Xn(t)===null?{error:"health fields need a pet Everfur reads as a dog or a cat (dog, canine, k9, puppy, cat, feline, kitten)"}:{body:n}}o(uo,"petHealthToWire");var z=o(e=>typeof e=="string"?e:null,"str"),et=o((e,t)=>typeof t=="string"&&e.has(t)?t:null,"pick"),va=o(e=>typeof e=="boolean"?e:null,"bool");function St(e,t){return Array.isArray(e)?Object.freeze(e.flatMap(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return [];let n=t(r);return n===null?[]:[n]})):Object.freeze([])}o(St,"itemsFromWire");function to(e){let t=z(e.name);return t===null||t.length===0?null:Object.freeze({ref:z(e.ref),name:t,dose:z(e.dose),frequency:z(e.frequency),startDate:z(e.start_date),endDate:z(e.end_date),notes:z(e.notes)})}o(to,"medicationFromWire");function co(e){let t=e.profile_version;return Object.freeze({profileVersion:typeof t=="number"&&Number.isInteger(t)&&t>=0?t:0,sex:et(ro,e.sex),spayedNeutered:va(e.spayed_neutered),birthDate:z(e.birth_date),birthDatePrecision:et(no,e.birth_date_precision),activityLevel:et(oo,e.activity_level),indoorOutdoor:et(io,e.indoor_outdoor),foodBrand:z(e.food_brand),foodType:z(e.food_type),microchipId:z(e.microchip_id),allergies:St(e.allergies,r=>{let n=z(r.allergen);return n===null||n.length===0?null:Object.freeze({ref:z(r.ref),allergen:n,severity:et(lo,r.severity),notes:z(r.notes)})}),medications:St(e.medications,to),supplements:St(e.supplements,to),conditions:St(e.conditions,r=>{let n=z(r.condition_name);return n===null||n.length===0?null:Object.freeze({ref:z(r.ref),conditionName:n,diagnosedDate:z(r.diagnosed_date),notes:z(r.notes)})})})}o(co,"petHealthFromWire");var yo=100,mo=50,go=100,vo=50,bo=500,ba=128,ha=6e4;function le(e){return U("validationFailed",{retryable:false,wireMessage:e})}o(le,"invalid");function Oe(e,t,r){if(typeof t!="string")return le(`${e} must be a string`);let n=_t(t);return n<=r?null:le(`${e} is ${n} characters; the server accepts at most ${r}`)}o(Oe,"checkString");function Ct(e,t,r){return typeof t=="number"&&Number.isFinite(t)&&t>=0&&t<=r?null:le(`${e} must be a finite number between 0 and ${r}`)}o(Ct,"outOfRange");function fo(e,t){if(typeof e!="string")return le("pet_ref must be a string");if(e.trim().length===0)return le("pet_ref must not be blank");if(kt(e))return le("pet_ref contains an unpaired surrogate and cannot be encoded");if(t!=null&&typeof t!="object")return le("profile must be an object");let r=[Oe("pet_ref",e,ba)];return t?.name!==void 0&&r.push(Oe("name",t.name,yo)),t?.species!==void 0&&r.push(Oe("species",t.species,mo)),t?.breed!==void 0&&r.push(Oe("breed",t.breed,go)),t?.ageYears!==void 0&&r.push(Ct("age_years",t.ageYears,vo)),t?.weightKg!==void 0&&r.push(Ct("weight_kg",t.weightKg,bo)),r.find(n=>n!==null)??null}o(fo,"validate");function ho(e,t){let r=uo(e,t);return "error"in r?{error:le(r.error)}:r}o(ho,"healthToWire");function Ta(e){if(typeof e!="object"||e===null)return {error:le("patch must be an object")};let t=e,r=[["name","name",l=>Oe("name",l,yo)],["species","species",l=>Oe("species",l,mo)],["breed","breed",l=>Oe("breed",l,go)],["ageYears","age_years",l=>Ct("age_years",l,vo)],["weightKg","weight_kg",l=>Ct("weight_kg",l,bo)]],n={};for(let[l,a,s]of r){let u=t[l];if(u!==void 0){if(u!==null){let d=s(u);if(d!==null)return {error:d}}n[a]=u;}}let i=ho(t,t.species);return "error"in i?i:(Object.assign(n,i.body),Object.keys(n).length===0?{error:le("patch must change at least one field")}:{body:n})}o(Ta,"patchToWire");function Ea(e){if(e==null)return {body:{}};let t=ho(e,e.species);return "error"in t?t:{body:{...e.name!==void 0?{name:e.name}:{},...e.species!==void 0?{species:e.species}:{},...e.breed!==void 0?{breed:e.breed}:{},...e.ageYears!==void 0?{age_years:e.ageYears}:{},...e.weightKg!==void 0?{weight_kg:e.weightKg}:{},...t.body}}}o(Ea,"toWire");var ie=o(e=>typeof e=="string"?e:null,"str"),xt=o(e=>typeof e=="number"&&Number.isFinite(e)?e:null,"num");function po(e,t){let r=typeof e=="object"&&e!==null?e:{};return Object.freeze({petRef:ie(r.pet_ref)??t,name:ie(r.name),species:ie(r.species),breed:ie(r.breed),ageYears:xt(r.age_years),weightKg:xt(r.weight_kg)})}o(po,"fromWire");function To(e){if(typeof e!="object"||e===null)return null;let t=e,r=ie(t.pet_ref);return r===null||r.length===0?null:Object.freeze({petId:ie(t.pet_id),petRef:r,name:ie(t.name),species:ie(t.species),breed:ie(t.breed),ageYears:xt(t.age_years),weightKg:xt(t.weight_kg),updatedAt:ie(t.updated_at)})}o(To,"widgetPetFromWire");function ka(e){let t=To(e);return t===null?null:Object.freeze({...t,...co(e)})}o(ka,"widgetPetProfileFromWire");function _a(e){let t=Array.isArray(e)?e:typeof e=="object"&&e!==null&&Array.isArray(e.pets)?e.pets:[];return Object.freeze(t.flatMap(r=>{let n=To(r);return n===null?[]:[n]}))}o(_a,"petListFromWire");function Eo(e){return Sa(Ie({auth:e}),Ie({auth:e,unaryTimeoutMs:ha}))}o(Eo,"createPetsRepository");function Sa(e,t=e){let r=o((i,l)=>l?{...i,signal:l}:i,"withSignal"),n=o(i=>fo(i,void 0)??`/widget/v1/pets/${encodeURIComponent(i)}`,"petPath");return {async list(i){let l=await e.send("pets.list",r({method:"GET",path:"/widget/v1/pets"},i?.signal));return l.ok?F(_a(l.value)):R(l.error)},async registerPet(i,l,a){let s=fo(i,l);if(s!==null)return R(s);let u=Ea(l);if("error"in u)return R(u.error);let f={method:"POST",path:`/widget/v1/pets/${encodeURIComponent(i)}`,body:u.body},v=await e.send("pets.registerPet",a?.signal?{...f,signal:a.signal}:f);return v.ok?F(po(v.value,i)):R(v.error)},async updatePet(i,l,a){let s=n(i);if(typeof s!="string")return R(s);let u=Ta(l);if("error"in u)return R(u.error);let d=await e.send("pets.updatePet",r({method:"PATCH",path:s,body:u.body},a?.signal));return d.ok?F(po(d.value,i)):R(d.error)},async getPetProfile(i,l){let a=n(i);if(typeof a!="string")return R(a);let s=await e.send("pets.getPetProfile",r({method:"GET",path:`${a}/profile`},l?.signal));if(!s.ok)return R(s.error);let u=ka(s.value);return u===null?R(U("internalError",{retryable:false,httpStatus:502,wireMessage:"the pet profile response carried no pet_ref"})):F(u)},async deletePet(i,l){let a=n(i);if(typeof a!="string")return R(a);let s=await e.send("pets.deletePet",r({method:"DELETE",path:a},l?.signal));return s.ok?F(void 0):R(s.error)},async eraseUserData(i){let l=await t.send("pets.eraseUserData",r({method:"DELETE",path:"/widget/v1/me"},i?.signal),{maxAttempts:1});return l.ok?F(void 0):R(l.error)}}}o(Sa,"createPetsRepositoryOver");function ko(){let{runtime:e,userRef:t,activePet:r,scopeEpoch:n}=fe(),i=useMemo(()=>Eo(e.registry.services.authFor(t)),[e,t,n]),[l,a]=useState({repository:i,pets:[],loading:true,error:null}),s=l.repository===i?l:{pets:[],loading:true,error:null},u=useRef(0),d=useCallback(async()=>{let v=++u.current;a(y=>({...y,repository:i,loading:true,error:null,pets:y.repository===i?y.pets:[]}));let p=await i.list();v===u.current&&a(p.ok?{repository:i,pets:p.value,loading:false,error:null}:y=>({repository:i,pets:y.repository===i?y.pets:[],loading:false,error:p.error}));},[i]);useEffect(()=>(d(),()=>{u.current+=1;}),[d]);let f=useMemo(()=>r===null?null:s.pets.find(v=>v.petRef===r)??null,[r,s.pets]);return useMemo(()=>({pets:s.pets,activePet:f,loading:s.loading,error:s.error,refresh:d}),[s.pets,s.loading,s.error,f,d])}o(ko,"useEverfurPets");var Ro=["scheduled","in_progress","awaiting_summary","completed","cancelled_owner","cancelled_ops","no_show_owner","no_show_vet"],Pa=new Set(["completed","cancelled_owner","cancelled_ops","no_show_owner","no_show_vet"]),Co=["wellness","prescription"],wt=64,pe=2e3,Pt=10;function ae(e){return typeof e=="string"&&/^[A-Za-z]{2}$/.test(e.trim())}o(ae,"isWellFormedStateCode");function he(e){return typeof e=="object"&&e!==null?e:null}o(he,"row");function W(e){return typeof e=="string"&&e.length>0?e:null}o(W,"str");function Ae(e){return typeof e=="string"&&e.trim().length>0?e.trim():null}o(Ae,"trimmedOrNull");function rt(e,t){return typeof e=="boolean"?e:t}o(rt,"bool");function _o(e){return typeof e=="number"&&Number.isFinite(e)?e:null}o(_o,"num");function So(e,t){return typeof t=="string"&&e.includes(t)?t:"unknown"}o(So,"closed");function nt(e,t){if(!Array.isArray(e))return Object.freeze([]);let r=[];for(let n of e){let i=t(n);i!==null&&r.push(i);}return Object.freeze(r)}o(nt,"parseList");function xo(e,t){let r=he(e);return r===null?null:Object.freeze({state:W(r.state)??t,wellnessAvailable:rt(r.wellness_available,false),prescriptionsAvailable:rt(r.prescriptions_available,false),cancellationPolicyText:Ae(r.cancellation_policy_text)})}o(xo,"parseStatePolicy");function wo(e){let t=he(e);if(t===null)return null;let r=Ae(t.summary),n=Ae(t.version);return r===null||n===null?null:Object.freeze({summary:r,version:n})}o(wo,"parseCancellationPolicy");function Po(e){let t=he(e);if(t===null)return null;let r=W(t.clinician_id),n=W(t.display_name);return r===null||n===null?null:Object.freeze({clinicianId:r,displayName:n,credentials:Ae(t.credentials_text),rating:_o(t.rating),ratingCount:_o(t.rating_count),bio:Ae(t.bio),photoRef:W(t.photo_ref),licensedStates:nt(t.licensed_states,i=>{let l=he(i),a=l===null?null:W(l.state);return a===null?null:Object.freeze({state:a,canPrescribe:rt(l?.can_prescribe,false)})})})}o(Po,"parseClinician");function br(e){let t=he(e);if(t===null)return null;let r=W(t.slot_id),n=W(t.starts_at);return r===null||n===null?null:Object.freeze({slotId:r,startsAt:n,endsAt:W(t.ends_at)??n})}o(br,"parseSlot");function Io(e){let t=he(e);if(t===null)return null;let r=W(t.slot_id),n=W(t.hold_expires_at);return r===null||n===null?null:Object.freeze({slotId:r,expiresAt:n})}o(Io,"parseSlotHold");function hr(e){let t=he(e);if(t===null)return null;let r=W(t.consult_id),n=W(t.scheduled_at);return r===null||n===null?null:Object.freeze({consultId:r,petId:W(t.pet_id)??"",clinicianId:W(t.clinician_id)??"",clinicianName:Ae(t.display_name),reasonText:Ae(t.reason_text),mediaRefs:nt(t.media_refs,i=>W(i)),status:So(Ro,t.status),kind:So(Co,t.kind),scheduledAt:n,emergencyFlagged:rt(t.emergency_flagged,false)})}o(hr,"parseConsult");function Oo(e){let t=he(e);return Object.freeze({active:rt(t?.active,false)})}o(Oo,"parseBookingEntitlement");var Fe=Object.freeze(["pet","reason","clinician","time","review","booked"]),Ao=Object.freeze({petId:null,state:null,clinicianId:null,slot:null,holdExpiresAt:null,shareHealthRecords:false,idempotencyKey:null});function Er(e,t={}){let r=Object.freeze({...Ao,...t}),n=Tr(0,e);return Object.freeze({index:n,draft:r,furthestIndex:n})}o(Er,"initialTelevetBookingState");function It(e,t){return e==="pet"?t.ownedPetCount<=1:false}o(It,"isSkipped");function Ot(e){return Fe[e]}o(Ot,"stepAt");function Tr(e,t){for(let r=e;r<Fe.length;r+=1){let n=Ot(r);if(n&&!It(n,t))return r}return Fe.length-1}o(Tr,"nextVisible");function Fo(e,t){for(let r=e;r>=0;r-=1){let n=Ot(r);if(n&&!It(n,t))return r}return null}o(Fo,"previousVisible");function kr(e,t){return Fo(e.index-1,t)!==null}o(kr,"hasPreviousStep");function _r(e,t,r){switch(t.type){case "patch":{let n={...e.draft,...t.patch};return ("petId"in t.patch&&t.patch.petId!==e.draft.petId||"state"in t.patch&&t.patch.state!==e.draft.state||"clinicianId"in t.patch&&t.patch.clinicianId!==e.draft.clinicianId)&&e.draft.slot?Object.freeze({...e,draft:Object.freeze({...n,slot:null,holdExpiresAt:null,idempotencyKey:null})}):Object.freeze({...e,draft:Object.freeze(n)})}case "next":{let n=Tr(e.index+1,r);return Object.freeze({...e,index:n,furthestIndex:Math.max(e.furthestIndex,n)})}case "back":{if(Ot(e.index)==="booked")return e;let n=Fo(e.index-1,r);return n===null?e:Object.freeze({...e,index:n})}case "goTo":{let n=Fe.indexOf(t.step);if(n<0)return e;let i=It(t.step,r)?Tr(n,r):n;return Object.freeze({...e,index:i,furthestIndex:Math.max(e.furthestIndex,i)})}default:return e}}o(_r,"televetBookingReducer");function Sr(e){return Ot(e.index)??"pet"}o(Sr,"currentStep");function At(e,t){let r=t.trim();return !!e.petId&&!!e.clinicianId&&!!e.slot&&ae(e.state)&&r.length>0&&r.length<=pe}o(At,"canConfirm");function Rr(e,t){if(!e.holdExpiresAt)return false;let r=Date.parse(e.holdExpiresAt);return Number.isNaN(r)?false:r<=t}o(Rr,"isHoldExpired");function Cr(e){return `televet.book.${e}`}o(Cr,"televetBookingKey");function xr(e,t,r){let n=r?.version?.trim()??"";return !e||!t||n.length===0?Object.freeze({}):Object.freeze({state_attested:true,cancellation_policy_version:n})}o(xr,"attestation");function Te(e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t}o(Te,"parse");function Me(e){let t=Te(e);return t?t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}):""}o(Me,"formatClock");function Ia(e){let t=Te(e);return t?t.toLocaleDateString(void 0,{month:"long",day:"numeric"}):""}o(Ia,"formatDate");var He=10;function ot(e){let t=Te(e);return t?new Intl.DateTimeFormat(void 0,{timeZoneName:"short"}).formatToParts(t).find(n=>n.type==="timeZoneName")?.value??"":""}o(ot,"formatZone");function Oa(e){let t=Te(e);if(!t)return "";let r=new Date(t.getTime()+He*6e4).toISOString(),n=ot(e),i=`${Me(e)} - ${Me(r)}`;return n&&n!==""?`${i} ${n}`:i}o(Oa,"formatVisitRange");function Do(e){let t=Ia(e),r=[Me(e),ot(e)].filter(Boolean).join(" ");return [t,r].filter(Boolean).join(", ")}o(Do,"formatWhen");function ye(e){let t=Te(e);return t?[t.toLocaleDateString(void 0,{weekday:"short"}),Do(e)].filter(Boolean).join(", "):""}o(ye,"formatWhenWithDay");function Ft(e){let t=Te(e);return t?`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`:"unknown"}o(Ft,"localDayKey");function Vo(e){let t=Te(e);return t===null?"":t.toLocaleDateString(void 0,{month:"long"})}o(Vo,"formatMonthLabel");function Bo(e){let t=Te(e);return t===null?"":t.toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric"})}o(Bo,"formatFullDayLabel");var ke="/widget/v1/televet",Aa=`${ke}/state-policy`,Fa=`${ke}/vets`,Lo=`${ke}/slots`,Da=`${ke}/slots/next`,zo=`${ke}/consults`,Va=`${ke}/entitlement`,Ba=`${ke}/cancellation-policy`;function jo(e){return `${Lo}/${encodeURIComponent(e)}/hold`}o(jo,"televetHoldCall");function Mo(e){return `${zo}/${encodeURIComponent(e)}/reschedule`}o(Mo,"televetRescheduleCall");function Ee(e){return R(U("validationFailed",{retryable:false,wireMessage:e}))}o(Ee,"invalid");function Dt(e){return R(U("internalError",{retryable:false,httpStatus:502,wireMessage:e}))}o(Dt,"unusable");function Vt(e){return e.httpStatus===404}o(Vt,"isDark");function wr(e,t,r){try{e?.track(t,r);}catch{}}o(wr,"safeTrack");function Ho(e){if(e.pet_id.trim().length===0)return "pet_id is required";if(e.clinician_id.trim().length===0)return "clinician_id is required";if(e.slot_id.trim().length===0)return "slot_id is required";if(!ae(e.state))return "state must be a two-letter US state code";let t=e.reason_text.trim();return t.length===0?"reason_text is required":t.length>pe?`reason_text must be at most ${pe} characters`:Na(e)}o(Ho,"validateBookingBody");function Na(e){let t=e.state_attested===true,r=e.cancellation_policy_version?.trim()??"";return t!==r.length>0?"state_attested and cancellation_policy_version must be sent together or omitted together":r.length>wt?`cancellation_policy_version must be at most ${wt} characters`:null}o(Na,"attestationRefusal");function Pr(e){let t=e.funnel??Ie({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=e.telemetry;return {async statePolicy(n,i){let l=n.trim();if(!ae(l))return Ee("state must be a two-letter US state code");let a=await t.send("televet.booking.state_policy",{method:"GET",path:`${Aa}/${encodeURIComponent(l)}`,...i?{signal:i}:{}});if(!a.ok)return Vt(a.error)?F(Object.freeze({state:l,wellnessAvailable:false,prescriptionsAvailable:false,cancellationPolicyText:null})):R(a.error);let s=xo(a.value,l);return s===null?Dt("the state policy response was unreadable"):F(s)},async entitlement(n){let i=await t.send("televet.booking.entitlement",{method:"GET",path:Va,...n?{signal:n}:{}});return i.ok?F(Oo(i.value)):Vt(i.error)?F(Object.freeze({active:false})):R(i.error)},async cancellationPolicy(n){let i=await t.send("televet.booking.cancellation_policy",{method:"GET",path:Ba,...n?{signal:n}:{}});return i.ok?F(wo(i.value)):F(null)},async clinicians(n,i){let l=n.trim();if(!ae(l))return Ee("state must be a two-letter US state code");let a=await t.send("televet.booking.clinicians",{method:"GET",path:Fa,query:{state:l},...i?{signal:i}:{}});return a.ok?F(nt(No(a.value,"vets"),Po)):Vt(a.error)?F(Object.freeze([])):R(a.error)},async slots(n,i){let l=n.trim();if(l.length===0)return Ee("clinicianId is required");let a=await t.send("televet.booking.slots",{method:"GET",path:Lo,query:{clinician_id:l},...i?{signal:i}:{}});return a.ok?F(nt(No(a.value,"slots"),br)):Vt(a.error)?F(Object.freeze([])):R(a.error)},async nextSlot(n){let i=await t.send("televet.booking.next_slot",{method:"GET",path:Da,...n?{signal:n}:{}});return i.ok?F(br(za(i.value,"slot"))):F(null)},async holdSlot(n){let i=n.trim();if(i.length===0)return Ee("slotId is required");let l=await t.send("televet.booking.hold",{method:"POST",path:jo(i)},{idempotent:false,maxAttempts:1});if(!l.ok)return wr(r,"televet.booking.hold_failed",{status:l.error.httpStatus??null}),R(l.error);let a=Io(l.value);return a===null?Dt("the hold response carried no usable expiry"):F(a)},async book(n,i){let l=Ho(n);if(l!==null)return Ee(l);let a=i.trim();if(a.length===0)return Ee("idempotencyKey is required");let s=await t.send("televet.booking.book",{method:"POST",path:zo,body:La(n)},{idempotent:true,idempotencyKey:a,maxAttempts:1});if(!s.ok)return wr(r,"televet.booking.book_failed",{status:s.error.httpStatus??null}),R(s.error);let u=hr(s.value);return u===null?Dt("the booking response was unreadable"):F(u)},async reschedule(n,i){let l=n.trim(),a=i.trim();if(l.length===0)return Ee("consultId is required");if(a.length===0)return Ee("slotId is required");let s=await t.send("televet.booking.reschedule",{method:"POST",path:Mo(l),body:{new_slot_id:a}},{idempotent:false,maxAttempts:1});if(!s.ok)return wr(r,"televet.booking.reschedule_failed",{status:s.error.httpStatus??null}),R(s.error);let u=hr(s.value);return u===null?Dt("the reschedule response was unreadable"):F(u)}}}o(Pr,"createTelevetBookingController");function La(e){let t=e.cancellation_policy_version?.trim()??"",r=e.state_attested===true&&t.length>0;return {pet_id:e.pet_id,clinician_id:e.clinician_id,slot_id:e.slot_id,state:e.state,reason_text:e.reason_text.trim(),species:e.species,media_refs:[...e.media_refs],emergency_acknowledged:e.emergency_acknowledged,share_health_records:e.share_health_records,...r?{state_attested:true,cancellation_policy_version:t}:{}}}o(La,"bookingWireBody");function No(e,t){if(Array.isArray(e))return e;if(typeof e=="object"&&e!==null){let r=e,n=r[t]??r.items??r.data;if(Array.isArray(n))return n}return e}o(No,"rows");function za(e,t){if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let r=e,n=r[t]??r.data;if(typeof n=="object"&&n!==null)return n}return e}o(za,"unwrap");function it(e){let{runtime:t,userRef:r,scopeEpoch:n}=fe();return useMemo(()=>{if(e)return e;if(r===null)return null;let{services:i}=t.registry;return Pr({auth:i.authFor(r),telemetry:i.telemetry,...i.errorPolicy?{errorPolicy:i.errorPolicy}:{}})},[t,r,n,e])}o(it,"useTelevetBookingController");function ja(){let{userRef:e}=fe(),t=we("televet");return useMemo(()=>({available:t.enabled&&e!==null,isPending:t.isPending}),[t.enabled,t.isPending,e])}o(ja,"useTelevetBookingAvailable");function Ue(e,t,r){let[n,i]=useState(()=>({key:e,data:null,isPending:t&&r!==null,error:null})),[l,a]=useState(0),s=useRef(r);s.current=r,useEffect(()=>{let f=s.current;if(!t||f===null){i({key:e,data:null,isPending:false,error:null});return}let v=new AbortController,p=true;return i(y=>y.key===e?{...y,isPending:true,error:null}:{key:e,data:null,isPending:true,error:null}),(async()=>{let y;try{y=await f(v.signal);}catch{p&&i({key:e,data:null,isPending:false,error:null});return}p&&(y.ok?i({key:e,data:y.value,isPending:false,error:null}):i({key:e,data:null,isPending:false,error:y.error}));})(),()=>{p=false,v.abort();}},[e,t,l]);let u=useCallback(()=>a(f=>f+1),[]),d=n.key===e;return useMemo(()=>({enabled:t,data:d?n.data:null,isPending:t&&(!d||n.isPending),isError:d&&n.error!==null,error:d?n.error:null,refetch:u}),[t,d,n.data,n.isPending,n.error,u])}o(Ue,"useTelevetRead");function Or(e,t){let r=e?.trim()??"",n=t?.statePolicy!==void 0&&ae(r),i=t?.statePolicy;return Ue(`state-policy:${r}`,n,n&&i?l=>i.call(t,r,l):null)}o(Or,"useTelevetStatePolicy");function Ar(e){let t=e?.entitlement!==void 0,r=e?.entitlement;return Ue("entitlement",t,t&&r?n=>r.call(e,n):null)}o(Ar,"useTelevetBookingEntitlement");function Fr(e){let t=e?.cancellationPolicy!==void 0,r=e?.cancellationPolicy;return Ue("cancellation-policy",t,t&&r?n=>r.call(e,n):null)}o(Fr,"useTelevetCancellationPolicy");function Dr(e,t){let r=e?.trim()??"",n=t?.clinicians!==void 0&&ae(r),i=t?.clinicians;return Ue(`clinicians:${r}`,n,n&&i?l=>i.call(t,r,l):null)}o(Dr,"useTelevetClinicians");function lt(e,t){let r=e?.trim()??"",n=t!==null&&r.length>0;return Ue(`slots:${r}`,n,n&&t?i=>t.slots(r,i):null)}o(lt,"useTelevetSlots");function Vr(e){let t=e?.nextSlot!==void 0,r=e?.nextSlot;return Ue("next-slot",t,t&&r?n=>r.call(e,n):null)}o(Vr,"useTelevetNextSlot");function Br(e){let[t,r]=useState(null),n=useRef(true),i=useRef(false),l=useRef(e);l.current=e,useEffect(()=>(n.current=true,()=>{n.current=false;}),[]);let a=useCallback((...s)=>{let u=l.current;if(u===null||i.current)return;let d=s[s.length-1],f=typeof d=="object"&&d!==null&&("onSuccess"in d||"onError"in d),v=f?d:void 0,p=f?s.slice(0,-1):s;i.current=true,r({variables:p[0]??null}),(async()=>{let y=null;try{y=await u(...p);}catch{y=null;}i.current=false,n.current&&r(null),y!==null&&(y.ok?v?.onSuccess?.(y.value):v?.onError?.(y.error));})();},[]);return useMemo(()=>({isPending:t!==null,variables:t?.variables??null,mutate:a}),[t,a])}o(Br,"useTelevetWrite");function at(e){return Br(e?t=>e.holdSlot(t):null)}o(at,"useTelevetHoldSlot");function Nr(e){return Br(e?(t,r)=>e.book(t,r):null)}o(Nr,"useTelevetBookConsult");function Lr(e,t){return Br(t&&e?r=>t.reschedule(e,r):null)}o(Lr,"useTelevetRescheduleConsult");function qo(e,t){if(e===void 0)return {};let r={};return e.backgroundColor!==void 0&&(r.backgroundColor=e.backgroundColor),e.borderColor!==void 0&&(r.borderColor=e.borderColor,r.borderWidth=t??1),e.borderRadius!==void 0&&(r.borderRadius=e.borderRadius),r}o(qo,"slotBox");function Ko(e){return e?.textColor===void 0?{}:{color:e.textColor}}o(Ko,"slotText");var $o=Object.freeze({visitButton:"Talk to a vet"});var Yo=null;function Go(){return Yo!==null}o(Go,"hasEverfurTelevetFlow");function Xo(e){return false;}o(Xo,"presentEverfurTelevetFlow");var zr=Object.freeze(["visit","join","summary","messages"]);function jr(e){return typeof e=="string"&&zr.includes(e)}o(jr,"isVetVisitIntent");var Ma="/widget/v1/televet/handoffs",Ha="/widget/v1/televet/availability",Ua="/widget/v1/televet/chat-entry",Wa=/^[a-z0-9][a-z0-9_-]{0,39}$/,qa=/^[A-Za-z0-9_-]{22}$/;var Qo=32,Zo=128,Jo=64;function Hr(e){let t=e.httpStatus;switch(e.code){case "sessionRequired":return "sessionRequired";case "authExpired":case "authRejected":return "authRejected";case "sdkUpdateRequired":return "sdkUpdateRequired";case "validationFailed":return "invalidRequest";case "rateLimited":case "quotaExceeded":return "rateLimited";}return t===void 0?e.code==="internalError"?"network":"unknown":t===429?"rateLimited":t===404?"unavailable":t===403?"accessDenied":t===401?"authRejected":t===400||t===422?"invalidRequest":t>=500?"serverError":"unknown"}o(Hr,"vetVisitErrorReasonOf");function ei(e){return R(U("validationFailed",{retryable:false,wireMessage:e}))}o(ei,"invalid");function Mr(e){return R(U("internalError",{retryable:false,httpStatus:502,wireMessage:e}))}o(Mr,"unusable");function Ka(e,t){let r={};e!==void 0&&(r.pet_ref=e);let n=t?.returnTo;if(n!=null){if(typeof n!="string"||!Wa.test(n))return {ok:false,message:"returnTo must be a registered return destination key"};r.return_to=n;}let i=t?.entry;if(i!=null){if(i!=="chat"||e===void 0)return {ok:false,message:"entry 'chat' needs the pet the chat is about"};r.entry=i;}let l=t?.visitRef,a=t?.intent,s=l!=null;if(s){let u=typeof l=="string"?l.trim():"";if(u.length<1||[...u].length>Jo)return {ok:false,message:`visitRef must be 1..${Jo} characters`};r.visit_ref=u;}if(a!=null){if(!s)return {ok:false,message:"intent needs the visitRef it opens"};if(!jr(a))return {ok:false,message:`intent must be one of ${zr.join(", ")}`};r.intent=a;}return {ok:true,body:r}}o(Ka,"handoffBody");function $a(e){if(typeof e!="object"||e===null)return null;let{visit_ref:t,intent:r}=e;return typeof t!="string"||t.length===0||!jr(r)?null:Object.freeze({visitRef:t,intent:r})}o($a,"parseVisitEcho");function ri(e){let t=e.funnel??Ie({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=e.telemetry,n=o(i=>(ti(r,"televet.visit.handoff_failed",{reason:Hr(i)}),R(i)),"failed");return {async createHandoff(i,l){let a;if(i!=null){let T=typeof i=="string"?[...i].length:0;if(T<1||T>Zo)return n(U("validationFailed",{retryable:false,wireMessage:`pet_ref must be 1..${Zo} characters`}));a=i;}let s=Ka(a,l);if(!s.ok){let T=ei(s.message);return T.ok?T:n(T.error)}let u=s.body,d=await t.send("televet.visit.handoff",{method:"POST",path:Ma,body:u},{idempotent:false,maxAttempts:1});if(!d.ok)return n(d.error);let f=Ya(d.value),v=u.return_to!==void 0,p=v?d.value?.flow_id:void 0;if(v&&(typeof p!="string"||!qa.test(p))){let T=Mr("the handoff response carried no usable return flow id");return T.ok?T:n(T.error)}let y=u.visit_ref!==void 0,h=y?$a(d.value?.visit):null;if(y&&h===null){let T=Mr("the handoff response did not confirm the visit it opens");return T.ok?T:n(T.error)}let x=f===null?null:Object.freeze({...f,...v?{flowId:p}:{},...h!==null?{visit:h}:{}});return x===null?n(U("internalError",{retryable:false,httpStatus:502,wireMessage:"the handoff response carried no usable visit url"})):(ti(r,"televet.visit.handoff_created",{pet_scoped:u.pet_ref!==void 0}),F(x))},async checkAvailability(i){if(typeof i!="string"||i.length>Qo)return ei(`state must be at most ${Qo} characters`);let l=await t.send("televet.visit.availability",{method:"POST",path:Ha,body:{state:i}},{idempotent:false,maxAttempts:1});if(!l.ok)return R(l.error);let a=l.value?.available;return typeof a!="boolean"?Mr("the availability response carried no usable answer"):F(Object.freeze({available:a}))},async chatEntryOpen(){try{let i=await t.send("televet.visit.chat_entry",{method:"GET",path:Ua},{maxAttempts:1});return i.ok&&i.value?.open===!0}catch{return false}}}}o(ri,"createVetVisitController");function Ya(e){if(typeof e!="object"||e===null)return null;let{url:t,expires_at:r}=e;return typeof t!="string"||typeof r!="string"||r.length===0||!Za(t)?null:Object.freeze({url:t,expiresAt:r})}o(Ya,"parseHandoff");var Ga=new Set(["localhost","127.0.0.1","[::1]"]),Xa=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/,Qa=/[\s\u0000-\u001f\u007f]/;function Za(e){if(Qa.test(e))return false;let t=Xa.exec(e);if(t===null)return false;let r=(t[1]??"").toLowerCase(),n=t[2]??"";if(n.length===0||n.includes("@"))return false;let i=n.replace(/:\d+$/,"").toLowerCase(),l=r==="https",a=r==="http"&&Ga.has(i);if(!l&&!a)return false;let s=e.indexOf("#");if(s<0)return false;let u=e.slice(s);return u.startsWith("#h=")&&u.length>3}o(Za,"isOpenableVisitUrl");function ti(e,t,r){if(e)try{e.track(t,r);}catch{}}o(ti,"safeTrack");var oi=Object.freeze({status:"idle",error:null,errorReason:null});function es(e,t,r){let{usState:n,chat:i,scope:l}=r,a=t&&(n!==null||i),s=`${n??""}|${i?"chat":""}`,[u,d]=useState(null);if(useEffect(()=>{if(!a)return;let v=true,p=e.current;return d(null),o(async()=>{try{if(i&&!(p.chatEntryOpen&&await p.chatEntryOpen()))return !1;if(n===null)return !0;if(!p.checkAvailability)return !1;let h=await p.checkAvailability(n);return h.ok&&h.value.available}catch{return false}},"ask")().then(h=>{v&&d({key:s,open:h});}),()=>{v=false;}},[a,s,n,i,l,e]),!a)return null;let f=u!==null&&u.key===s;return {open:f&&u.open,pending:!f}}o(es,"usePreflight");var ts=Object.freeze({status:"opening",error:null,errorReason:null});function li(e,t={}){let{runtime:r,userRef:n,scopeEpoch:i}=fe(),l=we("televet"),a=l.enabled&&n!==null,s=t.usState??null,u=t.entry==="chat",d=t.petRef??null,f=useMemo(()=>{if(t.controller)return t.controller;let{services:B}=r.registry;return ri({auth:B.authFor(n),telemetry:B.telemetry,...B.errorPolicy?{errorPolicy:B.errorPolicy}:{}})},[r,n,i,t.controller]),v=useRef(f);v.current=f;let p=useMemo(()=>({runtime:r,userRef:n,scopeEpoch:i}),[r,n,i]),y=es(v,a,{usState:s,chat:u,scope:p}),h=a&&(y===null||y.open)&&(!u||d!==null),x=t.returnTo??null,[T,_]=useState(oi),V=useRef(null),w=useRef({runtime:r,userRef:n,scopeEpoch:i});w.current={runtime:r,userRef:n,scopeEpoch:i};let O=useRef(f);O.current=f;let P=useRef(h);P.current=h;let I=useCallback((B,k)=>{if(V.current)return V.current;let A=o((K,ve)=>(_({status:K==="cancelled"?"idle":"error",error:ve,errorReason:K==="cancelled"?null:K}),Object.freeze({opened:false,reason:K,error:ve})),"fail");if(!P.current)return Promise.resolve(A("unavailable",null));let Z=e.prepare();if(!Z.ok)return Promise.resolve(A(Z.reason,null));let ee=w.current,se=O.current;_(ts);let Ye=(async()=>{let K,ve={...x!==null?{returnTo:x}:{},...u?{entry:"chat"}:{},...k!==null?{visitRef:k.visitRef}:{},...k!==null&&k.intent!==null&&k.intent!==void 0?{intent:k.intent}:{}},Ce=Object.keys(ve).length===0?void 0:ve,Ge=B===void 0?d:B;try{K=await(Ce===void 0?se.createHandoff(Ge):se.createHandoff(Ge,Ce));}catch{return e.abandon(Z.value),A("unknown",null)}let be=w.current;if(be.runtime!==ee.runtime||be.userRef!==ee.userRef||be.scopeEpoch!==ee.scopeEpoch)return e.abandon(Z.value),A("cancelled",null);if(!K.ok)return e.abandon(Z.value),A(Hr(K.error),K.error);let Xe=await e.finish(Z.value,K.value);return Xe!==null?A(Xe,null):(_(oi),Object.freeze(K.value.flowId===void 0?{opened:true}:{opened:true,flowId:K.value.flowId}))})().finally(()=>{V.current===Ye&&(V.current=null);});return V.current=Ye,Ye},[e,d,x,u]),te=useCallback(B=>I(B,null),[I]),Q=useCallback((B,k)=>I(void 0,{visitRef:B,intent:k??null}),[I]);return {available:h,isPending:l.isPending||(y?.pending??false),status:T.status,error:T.error,errorReason:T.errorReason,open:te,openVisit:Q}}o(li,"useVetVisitWith");var os=o(e=>Linking.openURL(e),"defaultOpenUrl");function ai(e={}){let{openUrl:t,...r}=e,n=useMemo(()=>{let i=t??os;return {prepare:o(()=>({ok:true,value:null}),"prepare"),async finish(l,a){try{return await i(a.url),null}catch{return "openFailed"}},abandon:o(()=>{},"abandon")}},[t]);return li(n,r)}o(ai,"useVetVisit");var si=44,ds=.6;function Lt(e){let{petRef:t,label:r,openUrl:n,onOpened:i,onError:l,style:a,labelStyle:s,controller:u,returnTo:d,usState:f,entry:v,visitRef:p,intent:y,onStartInApp:h,prefer:x}=e,T=ai({...d!==void 0?{returnTo:d}:{},...f!==void 0?{usState:f}:{},...v!==void 0?{entry:v}:{},...t!==void 0?{petRef:t}:{},...n!==void 0?{openUrl:n}:{},...u!==void 0?{controller:u}:{}}),_=C(),V=useMemo(()=>us(_),[_]),w=useRef(false);if(!T.available)return null;let O=T.status==="opening",P=r??$o.visitButton,I=p!=null,te=x==="redirect"||I,Q=!te&&h!==void 0;return jsx(Pressable,{onPress:o(()=>{if(!(O||w.current)){if(Q){Qe(h);return}(w.current=true,(p==null?T.open():T.openVisit(p,y??null)).then(A=>{A.opened?Qe(i,A.flowId??null):A.reason!=="cancelled"&&Qe(l,A.reason,A.error);}).finally(()=>{w.current=false;}));}},"onPress"),accessibilityRole:"button",accessibilityLabel:P,accessibilityState:{busy:O,disabled:O},style:[V.button,O?V.busy:null,a],children:jsx(b,{style:[V.label,s],children:P})})}o(Lt,"VetVisitButton");function us(e){let{color:t,space:r,radius:n,type:i,slots:l}=e;return StyleSheet.create({button:{minHeight:si,minWidth:si,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,paddingVertical:r.sm,borderRadius:n.pill,backgroundColor:t.primary,...qo(l.vetVisitButton)},busy:{opacity:ds},label:{...E(e,"medium"),color:t.onPrimary,fontSize:i.size.body,lineHeight:i.size.body*i.lineHeight.snug,...Ko(l.vetVisitButton)}})}o(us,"makeStyles");var Y=44;function j(){let e=C();return useMemo(()=>ms(e),[e])}o(j,"useBookingStyles");function $({label:e,onPress:t,kind:r="primary",disabled:n=false,loading:i=false,fullWidth:l=true,accessibilityLabel:a,testID:s,style:u}){let d=j(),f=C(),v=n||i;return jsxs(Pressable,{onPress:t,disabled:v,accessibilityRole:"button",accessibilityLabel:a??e,accessibilityState:{disabled:v,busy:i},style:[d.button,r==="primary"?d.buttonPrimary:d.buttonSecondary,l?d.buttonFull:d.buttonAuto,v?d.buttonDisabled:null,u],testID:s,children:[i?jsx(ActivityIndicator,{size:"small",color:r==="primary"?f.color.onPrimary:f.color.brand}):null,jsx(b,{tier:"control",style:r==="primary"?d.buttonPrimaryLabel:d.buttonSecondaryLabel,children:e})]})}o($,"TelevetButton");function L({title:e,message:t,actionLabel:r,onAction:n,testID:i}){let l=j(),a=typeof r=="string"&&r.length>0&&typeof n=="function";return jsxs(View,{style:l.stateCard,testID:i,children:[jsx(b,{style:l.stateTitle,accessibilityRole:"header",children:e}),t?jsx(b,{style:l.stateMessage,children:t}):null,a?jsx($,{label:r,onPress:n,kind:"secondary",fullWidth:false}):null]})}o(L,"TelevetStateCard");function Ve({height:e,width:t="100%",testID:r}){let n=j();return jsx(View,{style:[n.skeleton,{height:e,width:t}],testID:r,accessibilityElementsHidden:true,importantForAccessibility:"no"})}o(Ve,"TelevetSkeletonBlock");function G({message:e,assertive:t=false,testID:r,style:n}){let i=j();return jsx(b,{style:[i.failure,n],accessibilityLiveRegion:t?"assertive":"polite",testID:r,children:e})}o(G,"TelevetFailureLine");function ms(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({screen:{flex:1,paddingHorizontal:r.xl,gap:r.md},stepFill:{flex:1,minHeight:0,gap:r.md},list:{gap:r.sm},button:{minHeight:Y,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:r.sm,paddingHorizontal:r.xl,paddingVertical:r.sm,borderRadius:n.pill},buttonFull:{alignSelf:"stretch"},buttonAuto:{alignSelf:"flex-start",minWidth:Y},buttonPrimary:{backgroundColor:t.primary},buttonSecondary:{borderWidth:1,borderColor:t.brandBorder,backgroundColor:"transparent"},buttonDisabled:{opacity:.45},buttonPrimaryLabel:{...E(e,"medium"),color:t.onPrimary,fontSize:l.body,lineHeight:l.body*a.snug},buttonSecondaryLabel:{...E(e,"medium"),color:t.brand,fontSize:l.body,lineHeight:l.body*a.snug},stateCard:{minHeight:140,justifyContent:"center",gap:r.sm,padding:r.lg,borderRadius:n.lg,borderWidth:1,borderColor:t.brandBorder},stateTitle:{...E(e,"medium"),color:t.brand,fontSize:l.subtitle,lineHeight:l.subtitle*a.snug},stateMessage:{...E(e,"regular"),color:t.text.metaCool,fontSize:l.body,lineHeight:l.body*a.normal},skeleton:{borderRadius:n.md,backgroundColor:t.skeleton},failure:{...E(e,"regular"),color:t.danger,fontSize:l.caption,lineHeight:l.caption*a.normal},stepTitle:{...E(e,"bold"),color:t.brand,fontSize:l.heading,lineHeight:l.heading*a.snug},stepHelp:{...E(e,"regular"),color:t.text.metaCool,fontSize:l.body,lineHeight:l.body*a.normal},divider:{height:1,backgroundColor:t.brandBorder},scrollRoot:{flex:1,minHeight:0},scrollBody:{flex:1},scrollFooter:{paddingTop:r.md,paddingBottom:r.lg}})}o(ms,"makeBookingStyles");function fi(e){return `televet-consult-${e}`}o(fi,"televetConsultCalendarKey");function qr({consult:e,petName:t,onDone:r,onAddToCalendar:n,canJoinInApp:i=false}){let l=C(),a=j(),s=useMemo(()=>hs(l),[l]),[u,d]=useState("idle"),f=o(async()=>{if(!n)return;d("saving");let p=new Date(e.scheduledAt);if(Number.isNaN(p.getTime())){d("failed");return}let y=await gt(n,{key:fi(e.consultId),title:c.visit.title,startDate:p,endDate:new Date(p.getTime()+He*6e4),alarmOffsetMinutes:-30});d(y.ok&&y.value===true?"saved":"failed");},"addToCalendar"),v=[c.booked.remindPromise,ue(c.booked.summaryPromise,{pet:t??""}),...i?[c.booked.joinPromise]:[]];return ce()?jsxs(View,{style:s.screen,testID:"televet-booked",children:[jsx(View,{style:s.header,children:jsx($,{label:c.doneCta,kind:"secondary",fullWidth:false,onPress:r,testID:"televet-booked-done"})}),jsx(View,{style:s.avatar,accessibilityElementsHidden:true,importantForAccessibility:"no"}),jsx(b,{tier:"heading",style:s.title,accessibilityRole:"header",children:c.bookedTitle}),jsx(b,{style:s.when,children:ye(e.scheduledAt)}),jsx(View,{style:s.steps,testID:"televet-booked-steps",children:v.map((p,y)=>jsxs(View,{style:s.step,children:[jsx(View,{style:s.stepNumber,accessibilityElementsHidden:true,importantForAccessibility:"no",children:jsx(b,{tier:"badge",style:s.stepNumberText,children:String(y+1)})}),jsx(b,{style:s.stepText,children:p.trim()})]},p))}),jsxs(View,{style:s.actions,children:[n?jsx($,{label:u==="saved"?c.booked.calendarAdded:c.addToCalendarCta,kind:"primary",loading:u==="saving",disabled:u==="saving"||u==="saved",onPress:()=>{f();},testID:"televet-booked-calendar"}):null,u==="failed"?jsx(b,{style:[a.failure,s.calendarNote],accessibilityLiveRegion:"polite",testID:"televet-booked-calendar-failed",children:c.booked.calendarFailedBody}):null,jsx($,{label:t?ue(c.booked.backToPet,{pet:t}):c.doneCta,kind:"secondary",onPress:r,testID:"televet-booked-back"})]})]}):jsx(View,{style:s.screen,testID:"televet-booked-copy-unapproved"})}o(qr,"TelevetBookedScreen");function hs(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({screen:{flex:1,paddingHorizontal:r.xl,gap:r.md},header:{alignItems:"flex-end",paddingBottom:r.lg},avatar:{alignSelf:"center",width:120,height:120,borderRadius:60,backgroundColor:t.surfaceSubtle,borderWidth:2,borderColor:t.success},title:{textAlign:"center",...E(e,"bold"),color:t.brand,fontSize:l.verdict,lineHeight:l.verdict*a.tight,letterSpacing:-0.7,paddingTop:r.lg},when:{textAlign:"center",...E(e,"regular"),color:t.text.metaCool,fontSize:l.subtitle,lineHeight:l.subtitle*a.normal},steps:{marginTop:r.xl,padding:r.lg,borderRadius:n.lg,borderWidth:1,borderColor:t.brandBorder,gap:r.lg},step:{flexDirection:"row",alignItems:"flex-start",gap:r.md},stepNumber:{width:26,height:26,borderRadius:13,backgroundColor:t.primary,alignItems:"center",justifyContent:"center"},stepNumberText:{...E(e,"medium"),color:t.onPrimary,fontSize:l.caption,lineHeight:l.caption,includeFontPadding:false},stepText:{flex:1,...E(e,"regular"),color:t.brand,fontSize:l.body,lineHeight:l.body*a.normal},actions:{marginTop:"auto",paddingBottom:r.xl,gap:r.md},calendarNote:{textAlign:"center"}})}o(hs,"makeStyles");function Kr({step:e,furthestIndex:t,title:r,canGoBack:n,isDirty:i,onBack:l,onClose:a,onConfirmDiscard:s}){let u=C(),d=useMemo(()=>Ss(u),[u]),f=useMemo(()=>()=>{if(!i){a();return}let h={title:c.chrome.discardTitle,body:c.chrome.discardBody,confirmLabel:c.chrome.discardConfirmCta,keepLabel:c.chrome.discardKeepCta};if(s){Promise.resolve(s(h)).then(x=>{x&&a();},()=>{});return}Alert.alert(h.title,h.body,[{text:h.keepLabel,style:"cancel"},{text:h.confirmLabel,style:"destructive",onPress:a}]);},[i,a,s]);useEffect(()=>{let h=o(()=>n?(l(),true):(f(),true),"onBackPress"),x=BackHandler.addEventListener("hardwareBackPress",h);return ()=>{x.remove();}},[n,l,f]);let v=Fe.length,y=e==="booked"?1:Math.min(1,(t+1)/v);return jsxs(View,{style:d.wrap,children:[jsxs(View,{style:d.bar,children:[jsx(View,{style:d.side,children:jsx(Pressable,{onPress:n?l:f,accessibilityRole:"button",accessibilityLabel:gi,testID:"televet-booking-back",style:d.tap,children:jsx(View,{style:d.chevron,accessibilityElementsHidden:true,importantForAccessibility:"no"})})}),jsx(b,{tier:"heading",style:d.title,accessibilityRole:"header",children:r??c.navTitle}),jsx(View,{style:[d.side,d.sideRight],children:jsx(Pressable,{onPress:f,accessibilityRole:"button",accessibilityLabel:c.close,accessibilityHint:c.chrome.closeHint,testID:"televet-booking-close",style:d.tap,children:jsx(b,{tier:"control",style:d.close,children:c.close})})})]}),jsx(View,{style:d.railTrack,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:jsx(View,{style:[d.railFill,{width:`${Math.round(y*100)}%`}],testID:"televet-booking-rail"})})]})}o(Kr,"TelevetBookingChrome");var gi="Back";function Ss(e){let{color:t,space:r,type:n}=e,{size:i,lineHeight:l}=n;return StyleSheet.create({wrap:{backgroundColor:t.surface},bar:{flexDirection:"row",alignItems:"center",paddingHorizontal:r.lg,minHeight:56},side:{minWidth:64,justifyContent:"center"},sideRight:{alignItems:"flex-end"},tap:{minHeight:Y,minWidth:Y,justifyContent:"center",paddingHorizontal:r.xs},chevron:{width:10,height:10,borderLeftWidth:2,borderBottomWidth:2,borderColor:t.brand,transform:[{rotate:"45deg"}]},title:{flex:1,textAlign:"center",...E(e,"medium"),color:t.brand,fontSize:i.subtitle,lineHeight:i.subtitle*l.normal},close:{...E(e,"medium"),color:t.brand,fontSize:i.subtitle,lineHeight:i.subtitle*l.normal},railTrack:{height:4,backgroundColor:t.surfaceSubtle},railFill:{height:4,backgroundColor:t.success}})}o(Ss,"makeStyles");function vi(e){let t=[],r=Rs(e.ageYears);r!==null&&t.push(`${String(r)} yr${r===1?"":"s"} old`);let n=e.weightKg;typeof n=="number"&&Number.isFinite(n)&&n>0&&t.push(`${String(Math.round(n))} kg`);let i=e.breed?.trim();return i&&t.push(i),t.join(" \xB7 ")}o(vi,"formatTelevetPetMetaLine");function Rs(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.floor(e);return t>=0?t:null}o(Rs,"wholeYears");function Yr({media:e,onChange:t,onPickMedia:r}){let n=C(),i=useMemo(()=>Fs(n),[n]),l=Pt-e.length,[a,s]=useState(false);if(!r)return null;let u=o(async()=>{if(!(a||l<=0)){s(true);try{let d=await gt(r,l);if(!d.ok||d.value===null||d.value.length===0)return;let f=new Set(e.map(p=>p.uri)),v=d.value.filter(p=>typeof p?.uri=="string"&&p.uri.length>0&&!f.has(p.uri));if(v.length===0)return;t([...e,...v].slice(0,Pt));}finally{s(false);}}},"pick");return jsxs(View,{style:i.row,children:[e.map((d,f)=>jsxs(View,{style:i.thumb,children:[jsx(Image,{source:{uri:d.uri},style:i.thumbImage,resizeMode:"cover"}),d.mimeType?.startsWith("video/")?jsx(View,{style:i.videoBadge,testID:`televet-intake-media-video-${String(f)}`,children:jsx(b,{tier:"badge",style:i.videoBadgeText,children:As})}):null,jsx(Pressable,{onPress:()=>t(e.filter((v,p)=>p!==f)),accessibilityRole:"button",accessibilityLabel:c.removePhotoLabel,testID:`televet-intake-media-remove-${String(f)}`,style:i.remove,children:jsx(b,{tier:"control",style:i.removeGlyph,children:Os})})]},`${d.uri}-${String(f)}`)),l>0?jsx(Pressable,{onPress:()=>{u();},disabled:a,accessibilityRole:"button",accessibilityLabel:c.addPhotoCta,accessibilityState:{busy:a,disabled:a},testID:"televet-intake-add-media",style:[i.dropzone,a?i.dropzoneBusy:null],children:a?jsx(ActivityIndicator,{testID:"televet-intake-media-busy"}):jsx(b,{tier:"compact",style:i.dropzoneText,children:c.addPhotoCta})}):null]})}o(Yr,"TelevetIntakeMedia");var Os="\xD7",As="\u25B6",zt=92;function Fs(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",gap:r.md,paddingTop:r.sm},thumb:{width:zt,height:zt,borderRadius:n.md,backgroundColor:t.surfaceSubtle},thumbImage:{width:"100%",height:"100%",borderRadius:n.md},videoBadge:{position:"absolute",left:6,bottom:6,paddingHorizontal:6,paddingVertical:2,borderRadius:n.sm,backgroundColor:t.shadow},videoBadgeText:{color:t.text.onBrand,fontSize:l.nano},remove:{position:"absolute",top:-8,right:-8,width:Y-16,height:Y-16,borderRadius:Y/2,backgroundColor:t.text.metaCool,alignItems:"center",justifyContent:"center"},removeGlyph:{...E(e,"medium"),color:t.surface,fontSize:l.subtitle,lineHeight:l.subtitle,includeFontPadding:false},dropzone:{width:zt,height:zt,borderRadius:n.md,borderWidth:1,borderStyle:"dashed",borderColor:t.brandBorder,alignItems:"center",justifyContent:"center",paddingHorizontal:r.sm},dropzoneBusy:{opacity:.6},dropzoneText:{...E(e,"mono"),color:t.text.metaCool,fontSize:l.nano,lineHeight:l.nano*a.normal,letterSpacing:.3,textAlign:"center"}})}o(Fs,"makeStyles");function Ne({label:e,value:t,last:r=false,testID:n}){let i=C(),l=useMemo(()=>Zr(i),[i]);return jsxs(View,{style:[l.row,r?l.rowLast:null],testID:n,children:[jsx(b,{style:l.rowLabel,children:e}),jsx(b,{style:l.rowValue,children:t})]})}o(Ne,"TelevetSummaryRow");function dt({label:e,checked:t,onToggle:r,testID:n}){let i=C(),l=useMemo(()=>Zr(i),[i]);return jsxs(Pressable,{onPress:()=>r(!t),accessibilityRole:"checkbox",accessibilityLabel:e,accessibilityState:{checked:t},testID:n,style:l.consent,children:[jsx(View,{style:[l.box,t?l.boxChecked:null],children:t?jsx(b,{tier:"badge",style:l.tick,children:Bs}):null}),jsx(b,{style:l.consentLabel,children:e})]})}o(dt,"TelevetConsentCheckbox");var Bs="\u2713";function Qr({children:e,testID:t}){let r=C(),n=useMemo(()=>Zr(r),[r]);return jsx(View,{style:n.card,testID:t,children:e})}o(Qr,"TelevetSummaryCard");function Zr(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({card:{borderRadius:n.lg,borderWidth:1,borderColor:t.brandBorder,paddingHorizontal:r.lg},row:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:r.lg,paddingVertical:r.lg,borderBottomWidth:1,borderBottomColor:t.brandBorder},rowLast:{borderBottomWidth:0},rowLabel:{...E(e,"regular"),color:t.brand,fontSize:l.subtitle,lineHeight:l.subtitle*a.snug},rowValue:{flexShrink:1,textAlign:"right",...E(e,"medium"),color:t.brand,fontSize:l.subtitle,lineHeight:l.subtitle*a.snug},consent:{flexDirection:"row",alignItems:"flex-start",gap:r.md,minHeight:Y,padding:r.lg,borderRadius:n.md,backgroundColor:t.surfaceSubtle},box:{width:22,height:22,borderRadius:n.xs,borderWidth:1.5,borderColor:t.brand,backgroundColor:t.surface,alignItems:"center",justifyContent:"center"},boxChecked:{backgroundColor:t.primary,borderColor:t.primary},tick:{...E(e,"bold"),color:t.onPrimary,fontSize:l.caption,lineHeight:l.caption,includeFontPadding:false},consentLabel:{flex:1,...E(e,"regular"),color:t.text.metaCool,fontSize:l.body,lineHeight:l.body*a.normal}})}o(Zr,"makeStyles");function Jr({slots:e,selectedDayKey:t,onSelectDay:r}){let n=C(),i=useMemo(()=>Ms(n),[n]),l=useMemo(()=>Mt(e),[e]),a=l[0];return a===void 0?null:jsxs(View,{children:[jsx(b,{tier:"compact",style:i.month,testID:"televet-day-strip-month",children:Vo(a.iso)}),jsx(ScrollView,{horizontal:true,showsHorizontalScrollIndicator:false,contentContainerStyle:i.strip,testID:"televet-day-strip",children:l.map(s=>{let u=s.key===t;return jsxs(Pressable,{onPress:()=>r(s),accessibilityRole:"button",accessibilityLabel:Bo(s.iso),accessibilityState:{selected:u},testID:`televet-day-${s.key}`,style:[i.day,u?i.daySelected:null],children:[jsx(b,{tier:"compact",style:[i.dayWeekday,u?i.dayTextSelected:null],children:s.weekday}),jsx(b,{tier:"compact",style:[i.dayNumber,u?i.dayTextSelected:null],children:s.dayNumber})]},s.key)})})]})}o(Jr,"TelevetDayStrip");function Mt(e){let t=new Map;for(let r of e){let n=Ft(r.startsAt);if(t.has(n))continue;let i=new Date(r.startsAt);Number.isNaN(i.getTime())||t.set(n,Object.freeze({key:n,iso:r.startsAt,weekday:i.toLocaleDateString(void 0,{weekday:"short"}),dayNumber:String(i.getDate())}));}return Object.freeze([...t.values()])}o(Mt,"televetDaysFromSlots");function Ms(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({month:{textAlign:"center",...E(e,"medium"),color:t.brand,fontSize:l.subtitle,lineHeight:l.subtitle*a.snug,paddingBottom:r.md},strip:{gap:r.sm,paddingHorizontal:r.xs},day:{width:52,minHeight:Y,paddingVertical:r.md,borderRadius:n.md,borderWidth:1,borderColor:t.brandBorder,alignItems:"center",justifyContent:"center",gap:2},daySelected:{backgroundColor:t.primary,borderColor:t.primary},dayWeekday:{...E(e,"mono"),color:t.text.secondary,fontSize:l.tiny,lineHeight:l.tiny*a.tight},dayNumber:{...E(e,"medium"),color:t.brand,fontSize:l.heading,lineHeight:l.heading*a.tight},dayTextSelected:{color:t.onPrimary}})}o(Ms,"makeStyles");function ct({slots:e,busySlotId:t,onPick:r,ListHeaderComponent:n,rowTestIdPrefix:i="televet-slot",testID:l="televet-slot-list"}){let a=C(),s=useMemo(()=>$s(a),[a]),u=useMemo(()=>Mt(e),[e]),[d,f]=useState(null),v=d??u[0]?.key??null,p=useMemo(()=>v?e.filter(_=>Ft(_.startsAt)===v):[],[e,v]),y=n,h=useMemo(()=>p.map(_=>ot(_.startsAt)),[p]),x=useMemo(()=>new Set(h.filter(_=>_.length>0)).size>1,[h]),T=p[0];return jsxs(View,{style:s.root,testID:l,children:[y?jsx(y,{}):null,jsx(Jr,{slots:e,selectedDayKey:v,onSelectDay:_=>f(_.key)}),T&&!x?jsx(b,{tier:"compact",style:s.zone,testID:"televet-slot-zone",children:ot(T.startsAt)}):null,jsx(ScrollView,{style:s.gridScroll,contentContainerStyle:s.grid,showsVerticalScrollIndicator:false,children:p.map((_,V)=>{let w=t===_.slotId,O=t!==null,P=x?h[V]??"":"";return jsxs(Pressable,{onPress:()=>r(_),disabled:O,accessibilityRole:"button",accessibilityLabel:[Me(_.startsAt),P].filter(I=>I.length>0).join(" "),accessibilityState:{disabled:O,busy:w},testID:`${i}-${_.slotId}`,style:[s.chip,w?s.chipBusy:null,O&&!w?s.chipDisabled:null],children:[jsx(b,{tier:"compact",style:[s.chipLabel,w?s.chipLabelBusy:null],children:Me(_.startsAt)}),P.length>0?jsx(b,{tier:"compact",style:[s.chipZone,w?s.chipLabelBusy:null],testID:`${i}-${_.slotId}-zone`,children:P}):null]},_.slotId)})})]})}o(ct,"TelevetSlotPicker");function $s(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({root:{flex:1,minHeight:0},gridScroll:{flex:1},zone:{textAlign:"center",...E(e,"mono"),color:t.text.muted,fontSize:l.tiny,lineHeight:l.tiny*a.normal,letterSpacing:.4,paddingVertical:r.md},grid:{flexDirection:"row",flexWrap:"wrap",gap:r.md,paddingBottom:r.xl},chip:{minWidth:96,flexGrow:1,flexBasis:"28%",minHeight:48,borderRadius:n.pill,borderWidth:1,borderColor:t.brandBorder,alignItems:"center",justifyContent:"center",paddingHorizontal:r.md},chipBusy:{backgroundColor:t.primary,borderColor:t.primary},chipDisabled:{opacity:.45},chipLabel:{...E(e,"regular"),color:t.brand,fontSize:l.subtitle,lineHeight:l.subtitle*a.tight},chipLabelBusy:{color:t.onPrimary},chipZone:{...E(e,"mono"),color:t.text.muted,fontSize:l.tiny,lineHeight:l.tiny*a.normal,letterSpacing:.4}})}o($s,"makeStyles");function Ht(e,t){return t?e.find(n=>n.petRef===t||n.petId===t)?.name??null:null}o(Ht,"nameOf");function Ri({pets:e,isPending:t,isError:r,onRetry:n,selectedId:i,onSelect:l,onAddPet:a}){let s=j(),u=C(),d=useMemo(()=>Le(u),[u]);return t?jsx(View,{style:s.list,testID:"televet-pets-loading",children:[0,1].map(f=>jsx(Ve,{height:64},f))}):r?jsx(View,{testID:"televet-pets-error",children:jsx(L,{title:c.chrome.loadFailedTitle,actionLabel:c.chrome.retryCta,onAction:n})}):e.length===0?jsx(View,{testID:"televet-pets-empty",children:jsx(L,{title:c.chrome.noPetsTitle,actionLabel:c.addPetCta,onAction:a})}):jsxs(View,{style:s.stepFill,children:[jsx(b,{tier:"heading",style:s.stepTitle,accessibilityRole:"header",children:c.petSelectTitle}),jsxs(ScrollView,{contentContainerStyle:s.list,testID:"televet-pets",children:[e.map(f=>{let v=i===f.petRef,p=vi(f),y=f.name??"";return jsx(Si,{name:y,meta:p,selected:v,onPress:()=>l(f.petRef),testID:`televet-pet-${f.petRef}`},f.petRef)}),a?jsx(Si,{name:c.addPetCta,meta:"",selected:false,onPress:a,testID:"televet-pet-add",glyph:Xs}):null]}),jsx(View,{style:d.spacer})]})}o(Ri,"PetStep");function Si({name:e,meta:t,selected:r,onPress:n,testID:i,glyph:l}){let a=C(),s=useMemo(()=>Le(a),[a]);return jsxs(View,{style:[s.petRow,r?s.petRowSelected:null],children:[jsx($,{label:e,onPress:n,kind:"secondary",accessibilityLabel:e,testID:i,style:s.petRowButton}),jsxs(View,{style:s.petRowText,pointerEvents:"none",children:[jsx(View,{style:s.petDisc,children:jsx(b,{tier:"compact",style:s.petDiscGlyph,children:l??Ci(e)})}),t?jsx(b,{tier:"compact",style:s.petRowMeta,children:t}):null]})]})}o(Si,"PetRow");function Ci(e){let t=e.trim();return t.length===0?Gs:t.slice(0,1).toUpperCase()}o(Ci,"initialOf");function xi({clinicians:e,isPending:t,isError:r,selectedId:n,onSelect:i,onRetry:l}){let a=j(),s=C(),u=useMemo(()=>Le(s),[s]);if(t)return jsx(View,{style:a.list,testID:"televet-clinicians-loading",children:jsx(Ve,{height:96})});if(r)return jsx(View,{testID:"televet-clinicians-error",children:jsx(L,{title:c.chrome.loadFailedTitle,actionLabel:c.chrome.retryCta,onAction:l})});if(e.length===0)return jsx(View,{testID:"televet-clinicians-empty",children:jsx(L,{title:c.noCliniciansTitle,message:c.noCliniciansBody,actionLabel:c.noCliniciansRetryCta,onAction:l})});let d=e.find(f=>f.clinicianId===n)??e[0];return d===void 0?null:jsxs(View,{style:a.list,testID:"televet-clinicians",children:[jsx(b,{tier:"heading",style:a.stepTitle,accessibilityRole:"header",children:c.yourVetTitle}),jsxs(View,{style:u.vetRow,children:[jsx(View,{style:u.vetAvatar,children:jsx(b,{tier:"heading",style:u.vetAvatarText,children:Ci(d.displayName)})}),jsxs(View,{style:u.vetIdentity,children:[jsx(b,{style:u.vetName,children:d.displayName}),d.credentials?jsx(b,{style:u.vetCredentials,children:d.credentials}):null,d.rating!==null&&d.ratingCount!==null?jsx(b,{tier:"compact",style:u.vetRating,testID:"televet-vet-rating",children:`\u2605 ${String(d.rating)} \xB7 ${String(d.ratingCount)} ${c.reviewsLabel}`}):null]})]}),d.bio?jsx(b,{style:u.vetBio,testID:"televet-vet-bio",children:d.bio}):null,jsx(View,{style:a.divider}),jsx($,{label:c.continueCta,kind:"primary",onPress:()=>i(d.clinicianId),testID:`televet-clinician-${d.clinicianId}`})]})}o(xi,"ClinicianStep");function wi({slots:e,enabled:t,isPending:r,isError:n,busySlotId:i,failure:l,nextOpening:a,onPick:s,onRetry:u,onSeeOtherVets:d}){let f=j();return t?r?jsx(View,{style:f.list,testID:"televet-slots-loading",children:[0,1,2].map(v=>jsx(Ve,{height:48},v))}):n?jsx(L,{title:c.slotsErrorTitle,actionLabel:c.retryCta,onAction:u,testID:"televet-slots-error"}):e.length===0?jsx(View,{testID:"televet-slots-empty",children:jsx(L,{title:c.noSlotsTitle,message:a?ue(c.nextOpeningTemplate,{when:ye(a.startsAt)}):void 0,actionLabel:a?c.seeOtherVetsCta:void 0,onAction:a?d:void 0})}):jsxs(View,{style:f.stepFill,testID:"televet-slots",children:[l==="expired"?jsx(G,{message:c.holdExpired}):null,l==="taken"?jsx(G,{message:c.slotTaken}):null,jsx(ct,{slots:e,busySlotId:i,onPick:s})]}):jsx(View,{testID:"televet-slots-unavailable",children:jsx(L,{title:c.bookingPausedTitle})})}o(wi,"SlotStep");function Pi({value:e,onChange:t,onNext:r,media:n,onChangeMedia:i,onPickMedia:l}){let a=j(),s=C(),u=useMemo(()=>Le(s),[s]),d=e.trim(),f=d.length>0&&d.length<=pe;return jsxs(View,{style:a.scrollRoot,testID:"televet-booking-reason",children:[jsxs(ScrollView,{style:a.scrollBody,contentContainerStyle:a.list,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive",showsVerticalScrollIndicator:false,testID:"televet-booking-reason-scroll",children:[jsx(b,{tier:"heading",style:a.stepTitle,accessibilityRole:"header",children:c.describeHeading}),jsx(b,{style:a.stepHelp,children:c.describeHelpLong}),jsx(_n,{value:e,onChangeText:t,multiline:true,placeholder:c.reasonPlaceholder,placeholderTextColor:s.color.text.placeholder,style:u.reasonInput,testID:"televet-reason-input"}),d.length>pe?jsx(G,{message:c.reasonTooLong}):null,jsx(Yr,{media:n,onChange:i,...l?{onPickMedia:l}:{}})]}),jsx(View,{style:a.scrollFooter,children:jsx($,{label:c.continueCta,kind:"primary",disabled:!f,onPress:r,testID:"televet-reason-next"})})]})}o(Pi,"ReasonStep");function Ii({when:e,clinician:t,petName:r,reason:n,shareRecords:i,onToggleShare:l,stateCode:a,stateAttested:s,onToggleStateAttest:u,cancellationTerms:d,termsAttested:f,onToggleTermsAttest:v,canConfirm:p,busy:y,failure:h,rateLimitMessage:x,onConfirm:T,emergency:_,onAcknowledgeEmergency:V,onSeeOtherVets:w}){let O=j(),P=C(),I=useMemo(()=>Le(P),[P]);return jsxs(View,{style:O.scrollRoot,testID:"televet-booking-review",children:[jsxs(ScrollView,{style:O.scrollBody,contentContainerStyle:O.list,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,testID:"televet-booking-review-scroll",children:[jsxs(Qr,{testID:"televet-review-summary",children:[r?jsx(Ne,{label:c.summaryPet,value:r,testID:"televet-review-row-pet"}):null,t?jsx(Ne,{label:c.summaryVet,value:t,testID:"televet-review-row-vet"}):null,jsx(Ne,{label:c.summaryWhen,value:e,testID:"televet-review-row-when"}),jsx(Ne,{label:c.summaryLength,value:ue(c.summaryLengthTemplate,{n:String(He)}),testID:"televet-review-row-length"}),n?jsx(Ne,{label:c.summaryReason,value:n,last:true,testID:"televet-review-row-reason"}):null]}),jsx(dt,{label:c.shareRecordsOff,checked:i,onToggle:l,testID:"televet-review-share-records"}),d?jsx(dt,{label:d,checked:f,onToggle:v,testID:"televet-review-terms-attest"}):null,a?jsx(dt,{label:ue(c.stateAttestTemplate,{state:a}),checked:s,onToggle:u,testID:"televet-review-state-attest"}):null,_?jsxs(View,{style:I.emergencyBanner,testID:"televet-review-emergency",children:[jsx(b,{tier:"heading",accessibilityRole:"header",accessibilityLiveRegion:"assertive",style:I.emergencyTitle,children:c.emergency.bannerTitle}),jsx(b,{style:I.emergencyLede,children:c.emergency.lede}),_.length>0?jsx(b,{style:I.emergencyLede,testID:"televet-review-emergency-categories",children:_.join(", ")}):null,jsx($,{label:c.emergency.keepBookingCta,kind:"secondary",loading:y,disabled:y,onPress:V,testID:"televet-review-emergency-ack"})]}):null,h==="failed"?jsx(G,{message:c.confirmFailed}):null,h==="clinician_unavailable"?jsxs(View,{style:O.list,testID:"televet-review-clinician-unavailable",children:[jsx(G,{message:c.confirmFailed}),jsx($,{label:c.seeOtherVetsCta,kind:"secondary",onPress:w,testID:"televet-review-see-other-vets"})]}):null,h==="rate_limited"&&x?jsx(G,{message:x,testID:"televet-review-rate-limited"}):null,h==="rate_limited"&&!x?jsx(G,{message:c.confirmFailed}):null,h==="not_entitled"?jsx(G,{message:c.confirmNotEntitled,testID:"televet-review-not-entitled"}):null]}),_?null:jsx(View,{style:O.scrollFooter,children:jsx($,{label:c.confirmCta,kind:"primary",loading:y,disabled:!p||y||!!a&&!s||!!d&&!f,onPress:T,testID:"televet-review-confirm"})})]})}o(Ii,"ReviewStep");var Gs="\u25CB",Xs="+";function Le(e){let{color:t,space:r,radius:n,type:i}=e,{size:l,lineHeight:a}=i;return StyleSheet.create({marker:{minHeight:1},spacer:{height:r.md},petRow:{gap:r.xs,paddingVertical:r.xs},petRowSelected:{opacity:1},petRowButton:{alignSelf:"stretch",justifyContent:"flex-start"},petRowText:{flexDirection:"row",alignItems:"center",gap:r.sm,paddingHorizontal:r.md},petDisc:{width:28,height:28,borderRadius:14,backgroundColor:t.surfaceSubtle,alignItems:"center",justifyContent:"center"},petDiscGlyph:{...E(e,"medium"),color:t.brand,fontSize:l.caption,lineHeight:l.caption},petRowMeta:{flexShrink:1,...E(e,"regular"),color:t.text.metaCool,fontSize:l.caption,lineHeight:l.caption*a.normal},vetRow:{flexDirection:"row",alignItems:"center",gap:r.md},vetAvatar:{width:64,height:64,borderRadius:32,backgroundColor:t.surfaceSubtle,alignItems:"center",justifyContent:"center"},vetAvatarText:{...E(e,"medium"),color:t.brand,fontSize:l.heading,lineHeight:l.heading},vetIdentity:{flex:1,gap:2},vetName:{...E(e,"medium"),color:t.brand,fontSize:l.subtitle,lineHeight:l.subtitle*a.snug},vetCredentials:{...E(e,"regular"),color:t.text.metaCool,fontSize:l.caption,lineHeight:l.caption*a.normal},vetRating:{...E(e,"regular"),color:t.text.secondary,fontSize:l.caption,lineHeight:l.caption*a.normal},vetBio:{...E(e,"regular"),color:t.brand,fontSize:l.body,lineHeight:l.body*a.normal},reasonInput:{minHeight:120,textAlignVertical:"top",borderWidth:1,borderColor:t.brandBorder,borderRadius:n.md,padding:r.md,...E(e,"regular"),color:t.text.primary,fontSize:l.body,lineHeight:l.body*a.normal},emergencyBanner:{gap:r.md,padding:r.lg,borderRadius:n.lg,borderWidth:1,borderColor:t.errorRed,backgroundColor:t.badgeBgCritical},emergencyTitle:{...E(e,"bold"),color:t.errorRed,fontSize:l.subtitle,lineHeight:l.subtitle*a.snug},emergencyLede:{...E(e,"regular"),color:t.text.primary,fontSize:l.body,lineHeight:l.body*a.normal}})}o(Le,"makeLocalStyles");function rn(e){let{petRef:t,usState:r,controller:n,onBooked:i,onExit:l,onAddPet:a,onPickMedia:s,onAddToCalendar:u,onConfirmDiscard:d,onRequestLocation:f,locationStatus:v="unknown",canJoinInApp:p=false,renderUnavailable:y,style:h,testID:x}=je(e,["onBooked","onExit","onAddPet","onRequestLocation"]),T=j(),_=C(),V=useMemo(()=>Le(_),[_]),w=it(n),O=ko(),P=O.pets,I=P.length,te=useMemo(()=>({ownedPetCount:I}),[I]),[Q,B]=useReducer((M,re)=>_r(M,re,te),void 0,()=>Er({ownedPetCount:0},{petId:t??null,state:r??null})),k=useCallback(M=>B(M),[]),[A,Z]=useState(""),[ee,se]=useState(null),[on,Ye]=useState(null),[K,ve]=useState(null),[Ce,Ge]=useState(false),[be,Xe]=useState(false),[Di,Vi]=useState([]),[Wt,Bi]=useState(null),{draft:S}=Q,J=Sr(Q),ln=useRef(S.state);ln.current!==S.state&&(ln.current=S.state,Ce&&Ge(false),be&&Xe(false));let qt=Or(S.state,w),Kt=Fr(w),an=Ar(w),xe=Dr(S.state,w),ze=lt(S.clinicianId,w),Ni=Vr(w).data??null,yt=at(w),$t=Nr(w),Yt=r??null;useEffect(()=>{Yt&&!S.state&&k({type:"patch",patch:{state:Yt}});},[Yt,S.state,k]),useEffect(()=>{t&&!S.petId&&k({type:"patch",patch:{petId:t}});},[t,S.petId,k]);let Gt=P.length===1?P[0]?.petRef??null:null;useEffect(()=>{Gt&&!S.petId&&k({type:"patch",patch:{petId:Gt}});},[Gt,S.petId,k]);let sn=useRef(J);sn.current=J;let dn=useRef(0);useEffect(()=>{I!==dn.current&&(dn.current=I,k({type:"goTo",step:sn.current}));},[I,k]);let Xt=xe.data?.[0]?.clinicianId??null;useEffect(()=>{Xt&&!S.clinicianId&&k({type:"patch",patch:{clinicianId:Xt}});},[Xt,S.clinicianId,k]);let Li=useCallback(M=>{se(null),yt.mutate(M.slotId,{onSuccess:o(re=>{k({type:"patch",patch:{slot:M,holdExpiresAt:re.expiresAt,idempotencyKey:Cr(M.slotId)}}),k({type:"next"});},"onSuccess"),onError:o(re=>se(Pe(re).kind==="unavailable"?"unavailable":"taken"),"onError")});},[yt,k]),Qt=useCallback(M=>{if(!(!At(S,A)||!S.idempotencyKey)){if(Rr(S,Date.now())){se("expired"),k({type:"goTo",step:"time"});return}se(null),ve(null),$t.mutate({pet_id:S.petId,clinician_id:S.clinicianId,slot_id:S.slot.slotId,state:S.state,reason_text:A.trim(),species:null,media_refs:[],emergency_acknowledged:M,share_health_records:S.shareHealthRecords,...xr(Ce,be,Kt.data)},S.idempotencyKey,{onSuccess:o(re=>{Bi(re),k({type:"goTo",step:"booked"}),i?.(re);},"onSuccess"),onError:o(re=>{let de=Pe(re);if(de.kind==="emergency"){ve(de.categories);return}if(de.kind==="rate_limited"){Ye(de.message),se("rate_limited");return}se(de.kind==="not_entitled"?"not_entitled":de.kind==="slot_taken"?"taken":de.kind==="clinician_unavailable"?"clinician_unavailable":de.kind==="unavailable"?"unavailable":"failed"),de.kind==="slot_taken"&&k({type:"goTo",step:"time"});},"onError")});}},[S,A,$t,k,i,Ce,be,Kt.data]),zi=useCallback(()=>Qt(false),[Qt]),ji=qt.enabled&&qt.data!==null&&!qt.data.wellnessAvailable,Mi=an.enabled&&an.data?.active===false,Hi=A.trim().length>0||!!S.slot||!!S.clinicianId,Ui=w===null||ee==="unavailable";return ce()?jsxs(View,{style:[T.screen,h],testID:x??"televet-booking",children:[jsx(Kr,{step:J,furthestIndex:Q.furthestIndex,canGoBack:kr(Q,te)&&J!=="booked",isDirty:Hi,onBack:()=>k({type:"back"}),onClose:()=>l?.(),...d?{onConfirmDiscard:d}:{}}),Ui?jsx(View,{style:T.stepFill,testID:"televet-booking-unavailable",children:y?y():jsx(L,{title:c.bookingPausedTitle})}):Mi?jsx(View,{testID:"televet-booking-not-entitled",children:jsx(L,{title:c.confirmNotEntitled})}):ji?jsx(View,{testID:"televet-booking-state-blocked",children:jsx(L,{title:c.stateBlockedTitle})}):J==="time"?jsx(wi,{slots:ze.data??[],enabled:ze.enabled,isPending:ze.enabled&&ze.isPending,isError:ze.isError,busySlotId:yt.isPending?yt.variables:null,failure:ee,nextOpening:Ni,onPick:Li,onRetry:()=>ze.refetch(),onSeeOtherVets:()=>k({type:"goTo",step:"clinician"})}):J==="review"?jsx(Ii,{when:S.slot?ye(S.slot.startsAt):"",petName:Ht(P,S.petId),reason:A.trim(),clinician:xe.data?.find(M=>M.clinicianId===S.clinicianId)?.displayName??null,shareRecords:S.shareHealthRecords,stateCode:S.state,stateAttested:Ce,onToggleStateAttest:Ge,cancellationTerms:Kt.data?.summary??null,termsAttested:be,onToggleTermsAttest:Xe,onToggleShare:M=>k({type:"patch",patch:{shareHealthRecords:M}}),canConfirm:At(S,A),busy:$t.isPending,failure:ee,rateLimitMessage:on,onConfirm:zi,emergency:K,onAcknowledgeEmergency:()=>Qt(true),onSeeOtherVets:()=>k({type:"goTo",step:"clinician"})}):J==="booked"?jsx(View,{style:T.stepFill,testID:"televet-booking-booked",children:Wt?jsx(qr,{consult:Wt,petName:Ht(P,Wt.petId)??Ht(P,S.petId),onDone:()=>l?.(),canJoinInApp:p,...u?{onAddToCalendar:u}:{}}):null}):J==="clinician"&&!S.state?jsx(View,{testID:"televet-booking-location-unknown",children:jsx(L,{title:v==="blocked"?c.locationBlockedTitle:v==="unavailable"?c.locationUnavailableTitle:c.locationUnknownTitle,message:v==="blocked"?c.locationBlockedBody:v==="unavailable"?c.locationUnavailableBody:c.locationUnknownBody,actionLabel:f?v==="blocked"?c.locationBlockedCta:c.locationUnknownCta:void 0,onAction:f})}):J==="clinician"?jsx(xi,{clinicians:xe.data??[],isPending:xe.enabled&&xe.isPending,isError:xe.isError,selectedId:S.clinicianId,onRetry:()=>xe.refetch(),onSelect:M=>{k({type:"patch",patch:{clinicianId:M}}),k({type:"next"});}}):J==="reason"?jsx(Pi,{value:A,onChange:Z,media:Di,onChangeMedia:Vi,...s?{onPickMedia:s}:{},onNext:()=>k({type:"next"})}):J==="pet"?jsx(Ri,{pets:P,isPending:O.loading,isError:O.error!==null,onRetry:()=>{O.refresh();},onAddPet:a,selectedId:S.petId,onSelect:M=>{k({type:"patch",patch:{petId:M}}),k({type:"next"});}}):jsx(View,{style:V.marker,testID:`televet-booking-step-${J}`})]}):jsx(View,{style:[T.screen,h],testID:x??"televet-booking",children:jsx(View,{style:T.stepFill,testID:"televet-booking-copy-unapproved",children:y?y():jsx(Lt,{...t!==void 0?{petRef:t}:{},...r!==void 0?{usState:r}:{}})})})}o(rn,"EverfurTelevetBooking");function nn(e){let{consult:t,onRescheduled:r,onCancel:n,controller:i,style:l,testID:a}=je(e,["onRescheduled","onCancel"]),s=j(),u=it(i),d=lt(t?.clinicianId??null,u),f=at(u),v=Lr(t?.consultId??null,u),[p,y]=useState(null),h=useCallback(T=>{y(null),f.mutate(T.slotId,{onSuccess:o(()=>{v.mutate(T.slotId,{onSuccess:o(_=>r?.(_),"onSuccess"),onError:o(_=>y(Pe(_).kind==="unavailable"?"unavailable":"failed"),"onError")});},"onSuccess"),onError:o(_=>y(Pe(_).kind==="unavailable"?"unavailable":"taken"),"onError")});},[f,v,r]),x=f.isPending||v.isPending;return ce()?t?jsxs(View,{style:[s.stepFill,l],testID:a??"televet-reschedule",children:[jsx(b,{tier:"compact",style:s.stepHelp,children:ue(c.rescheduleFromTemplate,{when:ye(t.scheduledAt)})}),p==="taken"?jsx(G,{message:c.slotTaken}):null,p==="failed"?jsx(G,{message:c.rescheduleFailed}):null,p==="unavailable"?jsx(G,{message:c.bookingPausedTitle,testID:"televet-reschedule-unavailable"}):null,d.enabled?d.isPending?jsx(View,{style:s.list,testID:"televet-reschedule-slots-loading",children:[0,1,2].map(T=>jsx(Ve,{height:48},T))}):d.isError?jsx(L,{title:c.slotsErrorTitle,actionLabel:c.retryCta,onAction:()=>d.refetch(),testID:"televet-reschedule-slots-error"}):(d.data??[]).length===0?jsx(View,{testID:"televet-reschedule-empty",children:jsx(L,{title:c.noSlotsTitle})}):jsx(ct,{slots:d.data??[],busySlotId:x?f.variables:null,onPick:h,rowTestIdPrefix:"televet-reschedule-slot",testID:"televet-reschedule-slots"}):jsx(View,{testID:"televet-reschedule-paused",children:jsx(L,{title:c.bookingPausedTitle})}),jsx($,{label:c.keepExistingCta,kind:"secondary",disabled:x,onPress:()=>n?.(),testID:"televet-reschedule-keep"})]}):jsx(View,{style:[s.list,l],testID:"televet-reschedule-loading",children:[0,1].map(T=>jsx(Ve,{height:48},T))}):jsx(View,{style:[s.stepFill,l],testID:"televet-reschedule-copy-unapproved"})}o(nn,"EverfurTelevetReschedule");var Ai=Object.freeze({name:"booking"});function ad(e,t){switch(t.type){case "push":return Object.freeze({stack:Object.freeze([...e.stack,t.screen])});case "pop":return e.stack.length<=1?e:Object.freeze({stack:Object.freeze(e.stack.slice(0,-1))});default:return e}}o(ad,"navReducer");function Fi(e){let{style:t,renderPending:r,...n}=je(e,["onExit","onBooked","onAddPet","onRequestLocation"]);return jsx(Mn,{capability:"televet",style:t,...r?{renderPending:r}:{},children:jsx(sd,{...n,style:t})})}o(Fi,"EverfurTelevetFlow");function sd({petRef:e,usState:t,controller:r,onBooked:n,onExit:i,onAddPet:l,onPickMedia:a,onAddToCalendar:s,onConfirmDiscard:u,onRequestLocation:d,locationStatus:f,canJoinInApp:v=false,renderUnavailable:p,initialScreen:y,style:h}){let x=j(),[T,_]=useReducer(ad,y??Ai,P=>Object.freeze({stack:Object.freeze([P])})),V=T.stack[T.stack.length-1]??Ai,w=T.stack.length;useEffect(()=>{let P=o(()=>w<=1?false:(_({type:"pop"}),true),"onBackPress"),I=BackHandler.addEventListener("hardwareBackPress",P);return ()=>{I.remove();}},[w]);let O=useCallback(()=>p?p():jsxs(View,{style:x.list,testID:"televet-hosted-fallback",children:[ce()?jsx(L,{title:c.bookingPausedTitle}):null,jsx(Lt,{...e!==void 0?{petRef:e}:{},...t!==void 0?{usState:t}:{}})]}),[p,x.list,e,t]);switch(V.name){case "booking":return jsx(rn,{...e!==void 0?{petRef:e}:{},...t!==void 0?{usState:t}:{},...r?{controller:r}:{},...n?{onBooked:n}:{},...i?{onExit:i}:{},...l?{onAddPet:l}:{},...a?{onPickMedia:a}:{},...s?{onAddToCalendar:s}:{},...u?{onConfirmDiscard:u}:{},...d?{onRequestLocation:d}:{},...f?{locationStatus:f}:{},canJoinInApp:v,renderUnavailable:O,style:h});case "reschedule":return jsx(nn,{consult:V.consult,...r?{controller:r}:{},onRescheduled:()=>_({type:"pop"}),onCancel:()=>_({type:"pop"}),style:h});default:return mt(V)}}o(sd,"TelevetFlowBody");var dd=Fi;export{gi as BACK_LABEL,wt as CANCELLATION_POLICY_VERSION_MAX,Co as CONSULT_KINDS,He as CONSULT_MINUTES,Ro as CONSULT_STATUSES,dd as EverfurTelevet,rn as EverfurTelevetBooking,Fi as EverfurTelevetFlow,nn as EverfurTelevetReschedule,Pt as MEDIA_REFS_MAX,pe as REASON_TEXT_MAX,ke as TELEVET_BOOKING_BASE,c as TELEVET_BOOKING_COPY,Fe as TELEVET_BOOKING_STEPS,Pa as TERMINAL_CONSULT_STATUSES,qr as TelevetBookedScreen,Kr as TelevetBookingChrome,dt as TelevetConsentCheckbox,Jr as TelevetDayStrip,Yr as TelevetIntakeMedia,ct as TelevetSlotPicker,Qr as TelevetSummaryCard,Ne as TelevetSummaryRow,xr as attestation,At as canConfirm,Pr as createTelevetBookingController,Sr as currentStep,Ao as emptyTelevetDraft,Oa as formatVisitRange,Do as formatWhen,ye as formatWhenWithDay,kr as hasPreviousStep,Er as initialTelevetBookingState,Rr as isHoldExpired,It as isSkipped,ce as isTelevetBookingCopyReady,ae as isWellFormedStateCode,Cr as televetBookingKey,_r as televetBookingReducer,Pe as televetBookingRefusal,fi as televetConsultCalendarKey,Mt as televetDaysFromSlots,jo as televetHoldCall,Mo as televetRescheduleCall,Nr as useTelevetBookConsult,ja as useTelevetBookingAvailable,it as useTelevetBookingController,Ar as useTelevetBookingEntitlement,Fr as useTelevetCancellationPolicy,Dr as useTelevetClinicians,at as useTelevetHoldSlot,Vr as useTelevetNextSlot,Lr as useTelevetRescheduleConsult,lt as useTelevetSlots,Or as useTelevetStatePolicy,Ho as validateBookingBody};
@@ -0,0 +1 @@
1
+ 'use strict';var react=require('react'),reactNative=require('react-native'),reactNativeSafeAreaContext=require('react-native-safe-area-context'),jsxRuntime=require('react/jsx-runtime');var fr=Object.defineProperty;var n=(e,r)=>fr(e,"name",{value:r,configurable:true});var yr=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function y(e,r){let t=e.type,a=t.families[r];return r==="mono"||t.namedFaces[r]?{fontFamily:a}:{fontFamily:a,fontWeight:t.weight[yr[r]]}}n(y,"face");var De=Object.freeze({track(){},trackExpectedFailure(){}});function Fe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Fe,"isSafeRoomUrl");function te(e,r){return Fe(e)&&r.trim().length>0}n(te,"isUsableRoomCredential");function Le(e){let r=globalThis.console;try{r?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(Le,"reportHostFailure");function mr(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(mr,"isThenable");function ne(e,...r){if(typeof e=="function")try{let t=e(...r);return mr(t)&&Promise.resolve(t).then(void 0,Le),t}catch(t){Le(t);return}}n(ne,"callHost");var Ve=new WeakMap;function pr(e){if(typeof e!="function")return;let r=Ve.get(e);if(r!==void 0)return r;let t=n((...a)=>{ne(e,...a);},"guarded");return Ve.set(e,t),t}n(pr,"guardHost");function Oe(e,r){let t=null;for(let a of r){let o=e[a];typeof o=="function"&&(t??={...e},t[a]=pr(o));}return t??e}n(Oe,"guardHostProps");var A=10,l=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",lobbyTitleNoName:"Your vet is joining",lobbySubtitle:"Usually under a minute",lobbyPrepLabel:"WHILE YOU WAIT",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:n(e=>{let r=e?.trim()??"";return r.length>0?`${r} is joining`:l.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let r=e?.trim()??"";return r.length>0?`Have ${r} nearby and somewhere well lit.`:l.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} MINUTE VISIT`,"lobbyDuration"),joinFailedReason:"That did not open. Try again."});function Ie(e){let r=Math.max(0,Math.floor(e/1e3)),t=String(r%60).padStart(2,"0"),a=Math.floor(r%3600/60),o=Math.floor(r/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${t}`:`${a}:${t}`}n(Ie,"formatElapsed");function le(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let r of Object.keys(e))le(e[r]);}return e}n(le,"deepFreeze");var gr=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),Pe={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Me={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Ae={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},br={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},vr={regular:"400",medium:"500",bold:"700"},Tr={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},hr=0,z="System",j="monospace",Er=["content","heading","control","compact","badge"];function Cr(e){let r={};for(let t of Er)r[t]=e;return r}n(Cr,"authoredTierSizes");function Be(){return {family:z,mono:j,fontUrl:null,families:{regular:z,medium:z,bold:z,mono:j,monoMedium:j,monoBold:j},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Ae,tierSizes:Cr(Ae),lineHeight:br,weight:vr,letterSpacing:Tr,scale:1,maxScale:hr,scaleCaps:gr}}n(Be,"baseType");var Ne={},oe=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function ae(e){return `cubic-bezier(${e.join(", ")})`}n(ae,"cssCubicBezier");var _e={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:ae(oe.standard),emphasized:ae(oe.emphasized),exit:ae(oe.exit)},reducedMotion:false},xr={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:"#FDFBF8",surfaceSubtle:"#EFE9E3",background:"#FFFFFF",borderRingCream:"#D8D2C8",chatGround:"#FFFFFF",composerFill:"#FDFBF8",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#111111",secondary:"#0E462E",muted:"#6E6660",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:"#B91C1C",errorRed:"#FF1B00",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(185,28,28,0.12)",badgeBgNeutral:"rgba(110,102,96,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},ze=le({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:xr,space:Pe,radius:Me,type:Be(),motion:_e,slots:Ne}),kr={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:"#9A938C",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",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",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};le({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:kr,space:Pe,radius:Me,type:Be(),motion:_e,slots:Ne});var je=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),He=globalThis,ie=He[je]??(He[je]=react.createContext(ze));ie.displayName??="EverfurThemeContext";function k(){return react.useContext(ie)}n(k,"useEverfurTheme");function Lr(e,r){let t=e.scaleCaps[r];return t>0?t:void 0}n(Lr,"tierMultiplier");function m({tier:e="content",...r}){let{type:t}=k(),a=Lr(t,e);return react.createElement(reactNative.Text,a===void 0?r:{maxFontSizeMultiplier:a,...r})}n(m,"Text");react.forwardRef(n(function(r,t){return react.createElement(reactNative.TextInput,{...r,...t===null?{}:{ref:t}})},"TextInput"));function We(e,r,t){let a;try{a=r();}catch(p){return se(`optional peer '${e}' is not installed: ${Or(p)}`)}let o=Vr(a);return o==null?se(`optional peer '${e}' resolved to no module`):t&&!t(o)?se(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(We,"optionalModule");function Vr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(Vr,"unwrapDefault");function se(e){return Object.freeze({available:false,module:null,reason:e})}n(se,"frozenUnavailable");function Or(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(Or,"describe");var de="[everfur] The in-app vet call needs the Daily native modules, which this app has not registered. Install @daily-co/react-native-daily-js, @daily-co/react-native-webrtc and (Expo) @daily-co/config-plugin-rn-daily-js, rebuild the native app (a JS-only OTA cannot add a native module), and call registerEverfurDaily(() => require('@daily-co/react-native-daily-js')) once in your app entry. ON EXPO GO THIS CANNOT BE FIXED BY INSTALLING: Expo Go runs a fixed set of native modules and cannot load Daily at any version, so you need a development build (expo prebuild, then run the native app) before the in-app call works at all. Until then, fall back to VetVisitButton, which opens the visit in the browser and needs no native module.",ue="@daily-co/react-native-daily-js",Ir=`optional peer '${ue}' has no registered loader`,Ge=`optional peer '${ue}' is present but failed its shape check`;function U(e){return typeof e=="object"&&e!==null}n(U,"isRecordLike");function Ar(e){return U(e)&&"box"in e}n(Ar,"isDailyBox");function Pr(e){let r=U(e.default)?e.default:{},t=e.createCallObject??r.createCallObject,a=e.DailyMediaView??r.DailyMediaView,o={createCallObject:t,DailyMediaView:a};return $e(o)?o:null}n(Pr,"normalizeDailyModule");function $e(e){if(!U(e)||typeof e.createCallObject!="function")return false;let r=e.DailyMediaView;return typeof r=="function"||typeof r=="object"&&r!==null}n($e,"isEverfurDailyModule");var Ye=null,g=null;function H(e){return Object.freeze({available:false,module:null,reason:e})}n(H,"unavailable");function Mr(e){Ye=e,g=null;}n(Mr,"registerEverfurDaily");function ce(){if(g!==null)return g;let e=Ye;if(e===null)return g=H(Ir),g;let r=We(ue,()=>({box:e()}),Ar);if(!r.available)return g=H(r.reason),g;let t=r.module.box;if(!U(t))return g=H(Ge),g;let a=Pr(t);return g=a===null?H(Ge):Object.freeze({available:true,module:a}),g}n(ce,"loadEverfurDaily");var v=Object.freeze({surface:"rgba(255,255,255,0.08)",surfaceRaised:"rgba(255,255,255,0.14)",surfaceActive:"rgba(255,255,255,0.24)",hairline:"rgba(255,255,255,0.18)",glyph:"rgba(255,255,255,0.72)",textSecondary:"rgba(255,255,255,0.78)",textTertiary:"rgba(255,255,255,0.56)"}),Ke=3,Xe=180,Ze=420,qe=.35,Ur=.6,Wr=360,Gr=132,$r=184,Yr=44;function Kr({reducedMotion:e,styles:r}){let t=react.useRef(Array.from({length:Ke},()=>new reactNative.Animated.Value(qe))).current;return react.useEffect(()=>{if(e)return;let a=t.map((o,p)=>reactNative.Animated.loop(reactNative.Animated.sequence([reactNative.Animated.delay(p*Xe),reactNative.Animated.timing(o,{toValue:1,duration:Ze,useNativeDriver:true}),reactNative.Animated.timing(o,{toValue:qe,duration:Ze,useNativeDriver:true}),reactNative.Animated.delay((Ke-p-1)*Xe)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,t]),jsxRuntime.jsx(reactNative.View,{style:r.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:t.map((a,o)=>jsxRuntime.jsx(reactNative.Animated.View,{style:[r.dot,{opacity:e?Ur:a}]},o))})}n(Kr,"WaitingDots");function Je({label:e,active:r,onPress:t,testID:a,styles:o}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:t,testID:a,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[o.control,r?null:o.controlOff],children:jsxRuntime.jsx(m,{tier:"control",style:o.controlLabel,children:e})})}n(Je,"LobbyControl");function fe(e){let{clinicianName:r,petName:t,micOn:a,cameraOn:o,onToggleMic:p,onToggleCamera:L,onLeave:Y,style:M}=e,T=k(),i=react.useMemo(()=>Xr(T),[T]),h=reactNativeSafeAreaContext.useSafeAreaInsets(),{width:s}=reactNative.useWindowDimensions(),x=s<Wr?Gr:$r;return jsxRuntime.jsxs(reactNative.View,{style:[i.root,{paddingTop:h.top+T.space.sm,paddingBottom:h.bottom+T.space.lg},M],testID:"everfur-vet-lobby",children:[jsxRuntime.jsx(reactNative.View,{style:i.topRow,children:jsxRuntime.jsx(reactNative.Pressable,{onPress:Y,accessibilityRole:"button",accessibilityLabel:l.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:i.leaveHit,children:jsxRuntime.jsx(m,{tier:"control",style:i.leaveLabel,children:l.leaveCta})})}),jsxRuntime.jsxs(reactNative.View,{style:i.center,children:[jsxRuntime.jsxs(reactNative.View,{style:[i.avatar,{width:x,height:x,borderRadius:x/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:i.avatarGlyphHead}),jsxRuntime.jsx(reactNative.View,{style:i.avatarGlyphBody})]}),jsxRuntime.jsxs(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsxRuntime.jsx(m,{tier:"heading",style:i.title,testID:"everfur-vet-lobby-title",children:l.lobbyTitle(r)}),jsxRuntime.jsx(m,{style:i.subtitle,testID:"everfur-vet-lobby-subtitle",children:l.lobbySubtitle})]}),jsxRuntime.jsx(Kr,{reducedMotion:T.motion.reducedMotion,styles:i})]}),jsxRuntime.jsxs(reactNative.View,{style:i.prepCard,testID:"everfur-vet-lobby-prep",children:[jsxRuntime.jsx(m,{tier:"badge",style:i.prepLabel,children:l.lobbyPrepLabel}),jsxRuntime.jsx(m,{style:i.prepBody,children:l.lobbyPrep(t)})]}),jsxRuntime.jsxs(reactNative.View,{style:i.controls,children:[jsxRuntime.jsx(Je,{label:a?l.muteCta:l.unmuteCta,active:a,onPress:p,testID:"everfur-vet-lobby-mic",styles:i}),jsxRuntime.jsx(Je,{label:o?l.cameraOffCta:l.cameraOnCta,active:o,onPress:L,testID:"everfur-vet-lobby-camera",styles:i})]}),jsxRuntime.jsx(m,{tier:"badge",style:i.duration,testID:"everfur-vet-lobby-duration",children:l.lobbyDuration(10)})]})}n(fe,"EverfurVetCallLobby");function Xr(e){let{color:r,space:t,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:r.brand,paddingHorizontal:t.lg},topRow:{flexDirection:"row",alignItems:"center"},leaveHit:{minHeight:Yr,justifyContent:"center",paddingVertical:t.xs,paddingRight:t.md},leaveLabel:{...y(e,"medium"),color:r.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:r.success,backgroundColor:v.surface,marginBottom:t.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:v.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:v.glyph},title:{...y(e,"bold"),color:r.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:t.sm},subtitle:{...y(e,"regular"),color:v.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:t.xs},dotRow:{flexDirection:"row",gap:t.xs,marginTop:t.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:r.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:v.hairline,backgroundColor:v.surface,padding:t.lg,marginBottom:t.lg},prepLabel:{...y(e,"medium"),color:r.accent,fontSize:o.size.micro,letterSpacing:1.2,marginBottom:t.sm},prepBody:{...y(e,"regular"),color:r.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:t.lg,marginBottom:t.lg},control:{minWidth:96,minHeight:48,paddingHorizontal:t.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:v.surfaceRaised},controlOff:{backgroundColor:v.surfaceActive},controlLabel:{...y(e,"medium"),color:r.text.onBrand,fontSize:o.size.caption},duration:{...y(e,"medium"),color:v.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Xr,"makeStyles");function me(e){return e??null}n(me,"asTrack");function qr(e){return !!e?.videoTrack}n(qr,"hasVideo");function pe({label:e,onPress:r,testID:t,muted:a=false,danger:o=false,styles:p}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:r,testID:t,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:a},style:[p.control,a?p.controlMuted:null,o?p.controlDanger:null],children:jsxRuntime.jsx(m,{tier:"control",style:[p.controlLabel,a?p.controlLabelMuted:null],children:e})})}n(pe,"CallControl");function Jr(e){let{roomUrl:r,token:t,onLeave:a,clinicianName:o,petName:p,daily:L,telemetry:Y,onUnavailable:M,renderUnavailable:T,style:i}=Oe(e,["onLeave"]),h=k(),s=react.useMemo(()=>tt(h),[h]),x=reactNativeSafeAreaContext.useSafeAreaInsets(),ge=Y??De,K=react.useRef(ge);react.useEffect(()=>{K.current=ge;});let X=react.useRef(a);react.useEffect(()=>{X.current=a;});let V=react.useRef(null),[ar,B]=react.useState("joining"),[Z,lr]=react.useState(null),[be,ir]=react.useState(null),[q,sr]=react.useState(true),[N,dr]=react.useState(true),[O,ur]=react.useState(null),[ve,Te]=react.useState(0),he=te(r,t),R=react.useMemo(()=>he?L?{available:true,module:L,reason:""}:ce():null,[he,L]),I=R?.available?R.module:null,E=react.useMemo(()=>R===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:R.available?null:{reason:"dailyMissing",detail:`${de} (${R.reason})`},[R]),J=react.useRef(false);react.useEffect(()=>{if(E===null){J.current=false;return}if(ne(M,E.reason,E.detail),!J.current){J.current=true;try{globalThis.console?.warn?.(E.detail);}catch{}}},[E,M]);let _=react.useCallback(async()=>{let u=V.current;if(V.current=null,!!u){try{await u.leave();}catch{}try{await u.destroy();}catch{}}},[]);react.useEffect(()=>{if(I===null)return;let u=false,f=I.createCallObject();V.current=f;let ee=n(()=>{let D=Object.values(f.participants());ir(D.find(re=>re.local)??null),lr(D.find(re=>!re.local)??null);},"syncParticipants"),we=["participant-joined","participant-updated","participant-left"];for(let D of we)f.on(D,ee);let Se=n(()=>{u||(B("left"),X.current());},"onLeftMeeting"),Re=n(()=>{u||B("error");},"onError");return f.on("left-meeting",Se),f.on("error",Re),f.join({url:r,token:t}).then(()=>{u||(B("joined"),ur(Date.now()),ee(),K.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{u||(B("error"),K.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{u=true;for(let D of we)f.off(D,ee);f.off("left-meeting",Se),f.off("error",Re),_();}},[I,r,t,_]),react.useEffect(()=>{if(O===null)return;Te(Date.now()-O);let u=setInterval(()=>{Te(Date.now()-O);},1e3);return ()=>{clearInterval(u);}},[O]);let Ee=react.useCallback(()=>{let u=V.current;u&&sr(f=>(u.setLocalAudio(!f),!f));},[]),Ce=react.useCallback(()=>{let u=V.current;u&&dr(f=>(u.setLocalVideo(!f),!f));},[]),Q=react.useCallback(()=>{_().then(()=>X.current());},[_]);if(E!==null)return T?jsxRuntime.jsx(jsxRuntime.Fragment,{children:T(E.reason,E.detail)}):null;if(I===null)return null;if(ar==="error")return jsxRuntime.jsxs(reactNative.View,{style:[s.centered,i],testID:"everfur-vet-call-error",children:[jsxRuntime.jsx(m,{style:s.status,accessibilityLiveRegion:"polite",children:l.joinFailedReason}),jsxRuntime.jsx(reactNative.Pressable,{onPress:Q,accessibilityRole:"button",accessibilityLabel:l.leaveCta,testID:"everfur-vet-call-error-leave",style:s.errorLeaveHit,children:jsxRuntime.jsx(m,{tier:"control",style:s.errorLeave,children:l.leaveCta})})]});if(!qr(Z))return jsxRuntime.jsx(fe,{clinicianName:o,petName:p,micOn:q,cameraOn:N,onToggleMic:Ee,onToggleCamera:Ce,onLeave:Q,style:i});let xe=I.DailyMediaView,ke=o?.trim()??"",cr=ve>=10*6e4;return jsxRuntime.jsxs(reactNative.View,{style:[s.root,i],testID:"everfur-vet-call",children:[jsxRuntime.jsx(reactNative.View,{style:s.fill,testID:"everfur-vet-call-remote",children:jsxRuntime.jsx(xe,{videoTrack:me(Z?.videoTrack),audioTrack:me(Z?.audioTrack),mirror:false,objectFit:"cover",style:s.fill})}),jsxRuntime.jsxs(reactNative.View,{style:[s.statusRow,{top:x.top+h.space.sm}],pointerEvents:"none",children:[ke.length>0?jsxRuntime.jsx(m,{tier:"compact",style:s.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:ke}):null,O!==null?jsxRuntime.jsx(m,{tier:"badge",style:[s.statusMeta,cr?s.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:Ie(ve)}):null]}),jsxRuntime.jsx(reactNative.View,{style:[s.selfView,{top:x.top+h.space.sm}],testID:"everfur-vet-call-self",children:be?.videoTrack&&N?jsxRuntime.jsx(xe,{videoTrack:me(be.videoTrack),audioTrack:null,mirror:true,objectFit:"cover",style:s.fill}):jsxRuntime.jsx(reactNative.View,{style:s.selfViewOff,testID:"everfur-vet-call-self-off",children:jsxRuntime.jsx(m,{tier:"badge",style:s.selfViewOffLabel,children:l.cameraOnCta})})}),jsxRuntime.jsxs(reactNative.View,{style:[s.controlBar,{bottom:x.bottom+h.space.lg}],children:[jsxRuntime.jsx(pe,{label:q?l.muteCta:l.unmuteCta,muted:!q,onPress:Ee,testID:"everfur-vet-call-mic",styles:s}),jsxRuntime.jsx(pe,{label:N?l.cameraOffCta:l.cameraOnCta,muted:!N,onPress:Ce,testID:"everfur-vet-call-camera",styles:s}),jsxRuntime.jsx(pe,{label:l.leaveCta,danger:true,onPress:Q,testID:"everfur-vet-call-leave",styles:s})]})]})}n(Jr,"EverfurVetCall");var rr="#141414",Qr="#1B1B1B",et="rgba(20,20,20,0.62)",rt="#141414",tr=104,nr={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function tt(e){let{color:r,space:t,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:rr},fill:{...reactNative.StyleSheet.absoluteFillObject},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:t.lg,padding:t.xl,backgroundColor:rr},statusRow:{position:"absolute",left:t.md,right:tr+t.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...y(e,"medium"),color:r.text.onBrand,fontSize:o.size.body,...nr},statusMeta:{...y(e,"mono"),color:r.text.onBrand,fontSize:o.size.caption,...nr},statusMetaOver:{color:r.danger},selfView:{position:"absolute",right:t.md,width:tr,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:Qr,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{flex:1,alignItems:"center",justifyContent:"center",paddingHorizontal:t.xs},selfViewOffLabel:{...y(e,"medium"),color:"rgba(255,255,255,0.78)",fontSize:o.size.micro,textAlign:"center"},controlBar:{position:"absolute",left:0,right:0,flexDirection:"row",justifyContent:"center",alignItems:"center",gap:t.md},control:{minWidth:76,minHeight:56,paddingHorizontal:t.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:et},controlMuted:{backgroundColor:r.text.onBrand},controlDanger:{backgroundColor:r.danger},controlLabel:{...y(e,"medium"),color:r.text.onBrand,fontSize:o.size.caption},controlLabelMuted:{color:rt},status:{...y(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:r.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:t.lg},errorLeave:{...y(e,"medium"),color:r.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n(tt,"makeStyles");exports.EVERFUR_DAILY_SETUP=de;exports.EverfurVetCall=Jr;exports.EverfurVetCallLobby=fe;exports.VET_CALL_CONSULT_MINUTES=A;exports.VET_CALL_COPY=l;exports.isEverfurDailyModule=$e;exports.isSafeRoomUrl=Fe;exports.isUsableRoomCredential=te;exports.loadEverfurDaily=ce;exports.registerEverfurDaily=Mr;
@@ -0,0 +1,141 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { T as TelemetryPort } from '../../TelemetryPort-BDNr00hu.cjs';
4
+ import { O as OptionalModule } from '../../optionalModule-DbJmsq5f.cjs';
5
+ export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY, b as VetCallPhase, i as isSafeRoomUrl, c as isUsableRoomCredential } from '../../callCopy-DoQKG3-L.cjs';
6
+
7
+ /**
8
+ * A participant's media track. Daily types this `MediaStreamTrack | false | null`: `false` means the track
9
+ * is off, which renders the same as absent. The SDK never reads inside it, so it stays opaque.
10
+ */
11
+ type VetCallTrack = unknown;
12
+ /** One participant in the room, narrowed to what the call surface reads. */
13
+ interface VetCallParticipant {
14
+ readonly local: boolean;
15
+ readonly videoTrack?: VetCallTrack;
16
+ readonly audioTrack?: VetCallTrack;
17
+ }
18
+ /** The Daily events the call surface subscribes to. */
19
+ type VetCallEvent = 'participant-joined' | 'participant-updated' | 'participant-left' | 'left-meeting' | 'error';
20
+ type VetCallHandler = (...args: readonly unknown[]) => void;
21
+ /**
22
+ * The Daily call object, narrowed to the eight members the call surface actually calls. Narrow on purpose:
23
+ * the SDK never asks for host powers. `is_owner` is the CLINICIAN's and the server decides it when it mints
24
+ * the token; it starts recording and grants admit/eject, and nothing here requests either.
25
+ */
26
+ interface VetCallObject {
27
+ join(options: {
28
+ readonly url: string;
29
+ readonly token: string;
30
+ }): Promise<unknown>;
31
+ leave(): Promise<unknown>;
32
+ destroy(): Promise<unknown>;
33
+ participants(): Record<string, VetCallParticipant>;
34
+ setLocalAudio(enabled: boolean): unknown;
35
+ setLocalVideo(enabled: boolean): unknown;
36
+ on(event: VetCallEvent, handler: VetCallHandler): unknown;
37
+ off(event: VetCallEvent, handler: VetCallHandler): unknown;
38
+ }
39
+ /** The props the call surface renders `DailyMediaView` with. */
40
+ interface VetCallMediaViewProps {
41
+ readonly videoTrack: VetCallTrack;
42
+ readonly audioTrack: VetCallTrack;
43
+ readonly mirror?: boolean;
44
+ readonly objectFit?: 'cover' | 'contain';
45
+ readonly style?: unknown;
46
+ }
47
+ /** The shape of `@daily-co/react-native-daily-js` this package uses, and nothing else. */
48
+ interface EverfurDailyModule {
49
+ createCallObject(): VetCallObject;
50
+ readonly DailyMediaView: ComponentType<VetCallMediaViewProps>;
51
+ }
52
+ /** The thunk a partner registers. Typically `() => require('@daily-co/react-native-daily-js')`. */
53
+ type EverfurDailyLoader = () => unknown;
54
+ /**
55
+ * DEVELOPER-FACING, never rendered to a member. It is handed to `onUnavailable` and written to
56
+ * `console.warn` once, so a partner who mounts the call surface without the native peer reads what to do
57
+ * instead of watching a blank screen. End-user copy is never authored in this repository.
58
+ */
59
+ declare const EVERFUR_DAILY_SETUP: string;
60
+ /** A present-but-wrong-shape module (a version whose surface drifted) is treated as unavailable, not trusted. */
61
+ declare function isEverfurDailyModule(candidate: unknown): candidate is EverfurDailyModule;
62
+ /**
63
+ * Register the Daily native module for the in-app vet call. Call it ONCE, in your app entry, before any
64
+ * Everfur call surface mounts:
65
+ *
66
+ * ```ts
67
+ * import { registerEverfurDaily } from '@everfur/sdk/televet';
68
+ * registerEverfurDaily(() => require('@daily-co/react-native-daily-js'));
69
+ * ```
70
+ *
71
+ * Passing `null` unregisters it, which is what a test does between cases. Registering clears the memo, so a
72
+ * later registration always wins over an earlier failed load.
73
+ */
74
+ declare function registerEverfurDaily(next: EverfurDailyLoader | null): void;
75
+ /**
76
+ * The guarded load: a missing loader, a throwing loader and a wrong-shape module all settle to
77
+ * `{ available: false }`. NEVER throws, and never returns a partially usable module.
78
+ *
79
+ * Memoized, because the call surface asks on every render and a `require` on every render of a live video
80
+ * screen is work on the path that can least afford it.
81
+ */
82
+ declare function loadEverfurDaily(): OptionalModule<EverfurDailyModule>;
83
+
84
+ /** Why the call surface refused to render. Both values are DEVELOPER-facing, never shown to a member. */
85
+ type VetCallUnavailableReason = 'dailyMissing' | 'roomUnusable';
86
+ interface EverfurVetCallProps {
87
+ /** The `room_url` the server minted for this consult. Must be https; anything else is refused. */
88
+ readonly roomUrl: string;
89
+ /** The short-lived, per-participant join token. NEVER rendered, NEVER logged, NEVER a telemetry prop. */
90
+ readonly token: string;
91
+ /** Called once the member has left, so the host can pop the screen. */
92
+ readonly onLeave: () => void;
93
+ /** Shown in the lobby while the clinician has not joined. Null in production today; never invented. */
94
+ readonly clinicianName?: string | null | undefined;
95
+ /** The pet's display name for the lobby's prep line; absent, the pet-free form is used. */
96
+ readonly petName?: string | null | undefined;
97
+ /**
98
+ * Host/test seam: the Daily module, instead of the one `registerEverfurDaily` registered. A partner with
99
+ * its own module resolution passes it here and calls no register function at all.
100
+ */
101
+ readonly daily?: EverfurDailyModule | undefined;
102
+ /** Your analytics sink for the two call events. Defaults to a no-op; never receives a credential. */
103
+ readonly telemetry?: TelemetryPort | undefined;
104
+ /**
105
+ * Called instead of rendering when the call cannot run, with a developer-facing explanation. `dailyMissing`
106
+ * means the native modules are not registered; `roomUnusable` means the credential failed its floor.
107
+ */
108
+ readonly onUnavailable?: ((reason: VetCallUnavailableReason, detail: string) => void) | undefined;
109
+ /**
110
+ * What to draw when the call cannot run. THE SDK DRAWS NOTHING BY DEFAULT, and that is deliberate: there is
111
+ * no owner-approved member-facing sentence for "this app was built without the video modules", and this
112
+ * package does not author user-facing copy. The consumer app's own answer to a missing native module is to
113
+ * fall back to the browser (`televetJoin.ts`: "an owner on an old build still gets into the consult, in a
114
+ * browser, instead of a crash"), so the intended wiring here is the same:
115
+ *
116
+ * ```tsx
117
+ * <VetCall ... renderUnavailable={() => <VetVisitButton visitRef={visitRef} intent="join" />} />
118
+ * ```
119
+ */
120
+ readonly renderUnavailable?: ((reason: VetCallUnavailableReason, detail: string) => ReactNode) | undefined;
121
+ readonly style?: StyleProp<ViewStyle>;
122
+ }
123
+ /** The in-app consult. Mount it with the credentials `POST /consults/{id}/join` returned. */
124
+ declare function EverfurVetCall(props: EverfurVetCallProps): ReactNode;
125
+
126
+ interface EverfurVetCallLobbyProps {
127
+ /** Null until the consult carries a display name. NEVER invented. */
128
+ readonly clinicianName?: string | null | undefined;
129
+ /** Null when the roster has not resolved; the prep line degrades, it does not break. */
130
+ readonly petName?: string | null | undefined;
131
+ readonly micOn: boolean;
132
+ readonly cameraOn: boolean;
133
+ readonly onToggleMic: () => void;
134
+ readonly onToggleCamera: () => void;
135
+ readonly onLeave: () => void;
136
+ readonly style?: StyleProp<ViewStyle>;
137
+ }
138
+ /** The waiting room shown until the clinician's video track arrives. Mounted by `EverfurVetCall`. */
139
+ declare function EverfurVetCallLobby(props: EverfurVetCallLobbyProps): ReactNode;
140
+
141
+ export { EVERFUR_DAILY_SETUP, type EverfurDailyLoader, type EverfurDailyModule, EverfurVetCall, EverfurVetCallLobby, type EverfurVetCallLobbyProps, type EverfurVetCallProps, OptionalModule, TelemetryPort, type VetCallEvent, type VetCallHandler, type VetCallMediaViewProps, type VetCallObject, type VetCallParticipant, type VetCallTrack, type VetCallUnavailableReason, isEverfurDailyModule, loadEverfurDaily, registerEverfurDaily };