@everfur/sdk 0.5.7 → 0.5.9
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.
- package/CHANGELOG.md +37 -0
- package/dist/{Chat-C8OR_AI2.d.ts → Chat-C9dVhnyt.d.ts} +3 -3
- package/dist/{Chat-GrVxqwYw.d.cts → Chat-WmdRwC3b.d.cts} +3 -3
- package/dist/{DepthViews-CUjaiKlo.d.ts → DepthViews-CBoI9EYy.d.ts} +1 -1
- package/dist/{DepthViews-CKO66Myd.d.ts → DepthViews-CmxhM8iP.d.ts} +1 -1
- package/dist/{DepthViews-DGH2wGj_.d.cts → DepthViews-DoODlUnQ.d.cts} +1 -1
- package/dist/{DepthViews-D37_RviC.d.cts → DepthViews-NPFtO5Kz.d.cts} +1 -1
- package/dist/animations/index.cjs +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/animations/index.js +1 -1
- package/dist/{attachments-BB1UJWnE.d.ts → attachments-CuFT1o5q.d.ts} +5 -5
- package/dist/{attachments-whGKD6W3.d.cts → attachments-OaW36D0H.d.cts} +2 -2
- package/dist/{attachments-CGwqUqKv.d.ts → attachments-R2oajKPT.d.ts} +2 -2
- package/dist/{attachments-BoAvTNhc.d.cts → attachments-c4mJcIWU.d.cts} +5 -5
- package/dist/{bookingCopy-CR1OG51t.d.cts → bookingCopy-DGQPrisa.d.cts} +2 -2
- package/dist/{bookingCopy-fV30DkIz.d.ts → bookingCopy-EtPJ4nME.d.ts} +2 -2
- package/dist/{branding-xpQ056sM.d.ts → branding-DiaCIJZL.d.cts} +2 -2
- package/dist/{branding-Xb_wL8N1.d.cts → branding-Ry0em51L.d.ts} +2 -2
- package/dist/{casesRepository-C8Lbu2hu.d.ts → casesRepository-Cu8h8gQK.d.ts} +1 -1
- package/dist/{casesRepository-DQd1BzeU.d.cts → casesRepository-DB5c8AAo.d.cts} +1 -1
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.d.cts +9 -9
- package/dist/chat/index.d.ts +9 -9
- package/dist/chat/index.js +1 -1
- package/dist/client/index.cjs +4 -4
- package/dist/client/index.d.cts +10 -10
- package/dist/client/index.d.ts +10 -10
- package/dist/client/index.js +4 -4
- package/dist/{config-1sjsfSqw.d.cts → config-DQFMkaTU.d.cts} +1 -1
- package/dist/{config-CRqlaRdm.d.ts → config-DlR_I-0S.d.ts} +1 -1
- package/dist/consent/index.cjs +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +1 -1
- package/dist/{context-CptFbEl3.d.ts → context-CLuquPRB.d.ts} +7 -7
- package/dist/{context-6TkTwYWz.d.cts → context-DZEieVJ5.d.cts} +7 -7
- package/dist/{copy-Cbh62Ahp.d.cts → copy-B2DOzSSy.d.cts} +2 -2
- package/dist/{copy-fyJWwXLB.d.ts → copy-ptTCT5-J.d.ts} +2 -2
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.d.cts +15 -15
- package/dist/core/index.d.ts +15 -15
- package/dist/core/index.js +7 -7
- package/dist/{depth-CFvkrm5i.d.ts → depth-CtyC7HOF.d.ts} +2 -2
- package/dist/{depth-A0lzfsHw.d.cts → depth-DuOyvthD.d.cts} +2 -2
- package/dist/{entitlementRepository-B9Nrivmd.d.ts → entitlementRepository-CAtyh8Xt.d.ts} +3 -3
- package/dist/{entitlementRepository-CCY6wtld.d.cts → entitlementRepository-DlGwxZ1k.d.cts} +3 -3
- package/dist/{identity-CQ_S12DE.d.cts → identity-BC9AF3y4.d.cts} +1 -1
- package/dist/{identity-sKp5WoCR.d.ts → identity-D_NR9ucT.d.ts} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +6 -6
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/{pets-CO8D9-_Q.d.cts → pets-D7UjvR1A.d.cts} +1 -1
- package/dist/{pets-u62Gt8RO.d.ts → pets-DuuNvKTK.d.ts} +1 -1
- package/dist/{petsRepository-3anNlfb7.d.ts → petsRepository-C28NKFwy.d.ts} +1 -1
- package/dist/{petsRepository-BXOEFjRd.d.cts → petsRepository-llMvpMkp.d.cts} +1 -1
- package/dist/photo/index.cjs +1 -1
- package/dist/photo/index.js +1 -1
- package/dist/{ports-DoJgREyr.d.cts → ports-Dbw2h_M1.d.cts} +25 -6
- package/dist/{ports-BlKQDOwZ.d.ts → ports-s45HNNyc.d.ts} +25 -6
- package/dist/records/depth/index.cjs +1 -1
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +1 -1
- package/dist/records/index.cjs +3 -3
- package/dist/records/index.d.cts +9 -9
- package/dist/records/index.d.ts +9 -9
- package/dist/records/index.js +3 -3
- package/dist/{requestFunnel-Cz3zOMJo.d.ts → requestFunnel-CqwOiZNJ.d.ts} +2 -2
- package/dist/{requestFunnel-iJJcNuWp.d.cts → requestFunnel-D_o7se38.d.cts} +2 -2
- package/dist/{runtimeTypes-CrAbk27V.d.cts → runtimeTypes-BNBENMkz.d.cts} +5 -5
- package/dist/{runtimeTypes-L-KYBPq-.d.ts → runtimeTypes-DS0RLoKN.d.ts} +5 -5
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +1 -1
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/call/index.cjs +1 -1
- package/dist/televet/call/index.js +1 -1
- package/dist/televet/index.cjs +1 -1
- package/dist/televet/index.js +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.cjs +1 -1
- package/dist/testing/rn/index.d.cts +9 -9
- package/dist/testing/rn/index.d.ts +9 -9
- package/dist/testing/rn/index.js +1 -1
- package/dist/testing/web/index.d.cts +9 -9
- package/dist/testing/web/index.d.ts +9 -9
- package/dist/{timelineRows-CtCZFBTj.d.cts → timelineRows-B6nCq30k.d.cts} +1 -1
- package/dist/{timelineRows-BORU0Ybg.d.ts → timelineRows-DacfDpDU.d.ts} +1 -1
- package/dist/{tokens-CIngRkvt.d.cts → tokens-DOTIxrws.d.cts} +8 -1
- package/dist/{tokens-CIngRkvt.d.ts → tokens-DOTIxrws.d.ts} +8 -1
- package/dist/{typeStyle-YPS_MXeI.d.ts → typeStyle-DROhJNkh.d.ts} +2 -2
- package/dist/{typeStyle-DHJzDaUo.d.cts → typeStyle-achxqQ-h.d.cts} +2 -2
- package/dist/{useRecordsDepth-C9jITKwj.d.cts → useRecordsDepth-BLK8W646.d.cts} +1 -1
- package/dist/{useRecordsDepth-CLtpeQHl.d.ts → useRecordsDepth-C7guUoLc.d.ts} +1 -1
- package/dist/video/index.cjs +1 -1
- package/dist/video/index.js +1 -1
- package/dist/{view-BDSk7WW0.d.ts → view-B6JsD22K.d.ts} +2 -2
- package/dist/{view-B7Mz1TyH.d.cts → view-BF9oW2GJ.d.cts} +2 -2
- package/dist/web/consent/index.cjs +1 -1
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +1 -1
- package/dist/web/index.cjs +7 -7
- package/dist/web/index.d.cts +19 -19
- package/dist/web/index.d.ts +19 -19
- package/dist/web/index.js +7 -7
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.cjs +1 -1
- package/dist/web/records/depth/index.d.cts +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/depth/index.js +1 -1
- package/dist/web/records/index.cjs +1 -1
- package/dist/web/records/index.d.cts +9 -9
- package/dist/web/records/index.d.ts +9 -9
- package/dist/web/records/index.js +1 -1
- package/dist/web/televet/booking/index.cjs +1 -1
- package/dist/web/televet/booking/index.d.cts +7 -7
- package/dist/web/televet/booking/index.d.ts +7 -7
- package/dist/web/televet/booking/index.js +1 -1
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.cjs +1 -1
- package/dist/web/televet/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +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 Yt=Object.defineProperty;var n=(e,t)=>Yt(e,"name",{value:t,configurable:true});var qt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function b(e,t){let r=e.type,a=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:a}:{fontFamily:a,fontWeight:r.weight[qt[t]]}}n(b,"face");var Xe=Object.freeze({track(){},trackExpectedFailure(){}});function Qe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Qe,"isSafeRoomUrl");function ge(e,t){return Qe(e)&&t.trim().length>0}n(ge,"isUsableRoomCredential");function et(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(et,"reportHostFailure");function Kt(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(Kt,"isThenable");function be(e,...t){if(typeof e=="function")try{let r=e(...t);return Kt(r)&&Promise.resolve(r).then(void 0,et),r}catch(r){et(r);return}}n(be,"callHost");var tt=new WeakMap;function Jt(e){if(typeof e!="function")return;let t=tt.get(e);if(t!==void 0)return t;let r=n((...a)=>{be(e,...a);},"guarded");return tt.set(e,r),r}n(Jt,"guardHost");function rt(e,t){let r=null;for(let a of t){let o=e[a];typeof o=="function"&&(r??={...e},r[a]=Jt(o));}return r??e}n(rt,"guardHostProps");var he=10,i=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",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 t=e?.trim()??"";return t.length>0?`${t} is joining`:i.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let t=e?.trim()??"";return t.length>0?`Have ${t} nearby and somewhere well lit.`:i.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} MINUTE VISIT`,"lobbyDuration"),joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function nt(e){let t=Math.max(0,Math.floor(e/1e3)),r=String(t%60).padStart(2,"0"),a=Math.floor(t%3600/60),o=Math.floor(t/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}n(nt,"formatElapsed");var ve=Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function xe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))xe(e[t]);}return e}n(xe,"deepFreeze");var Zt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),at={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},lt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ot={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},Xt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Qt={regular:"400",medium:"500",bold:"700"},er={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tr=0,X="System",Q="monospace",rr=["content","heading","control","compact","badge"];function nr(e){let t={};for(let r of rr)t[r]=e;return t}n(nr,"authoredTierSizes");function it(){return {family:X,mono:Q,fontUrl:null,families:{regular:X,medium:X,bold:X,mono:Q,monoMedium:Q,monoBold:Q},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ot,tierSizes:nr(ot),lineHeight:Xt,weight:Qt,letterSpacing:er,scale:1,maxScale:tr,scaleCaps:Zt}}n(it,"baseType");var st={},Ce=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function Te(e){return `cubic-bezier(${e.join(", ")})`}n(Te,"cssCubicBezier");var ct={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:Te(Ce.standard),emphasized:Te(Ce.emphasized),exit:Te(Ce.exit)},reducedMotion:false},or={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)"},dt=xe({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:or,space:at,radius:lt,type:it(),motion:ct,slots:st}),ar={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)"};xe({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ar,space:at,radius:lt,type:it(),motion:ct,slots:st});var ut=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ft=globalThis,Ee=ft[ut]??(ft[ut]=react.createContext(dt));Ee.displayName??="EverfurThemeContext";function P(){return react.useContext(Ee)}n(P,"useEverfurTheme");function ur(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n(ur,"tierMultiplier");function h({tier:e="content",...t}){let{type:r}=P(),a=ur(r,e);return react.createElement(reactNative.Text,a===void 0?t:{maxFontSizeMultiplier:a,...t})}n(h,"Text");react.forwardRef(n(function(t,r){return react.createElement(reactNative.TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function yt(e,t,r){let a;try{a=t();}catch(d){return ke(`optional peer '${e}' is not installed: ${pr(d)}`)}let o=fr(a);return o==null?ke(`optional peer '${e}' resolved to no module`):r&&!r(o)?ke(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(yt,"optionalModule");function fr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(fr,"unwrapDefault");function ke(e){return Object.freeze({available:false,module:null,reason:e})}n(ke,"frozenUnavailable");function pr(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(pr,"describe");var mt=Symbol.for("@everfur/sdk/televet");function yr(){let e=globalThis,t=e[mt];if(t!==void 0)return t;let r={presenter:null,snapshot:Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:new Set,dailyRegistered:false};return e[mt]=r,r}n(yr,"televetGlobal");function gt(e){yr().dailyRegistered=e;}n(gt,"markEverfurDailyRegistered");var we=`[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 the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,Re="@daily-co/react-native-daily-js",mr=`optional peer '${Re}' has no registered loader`,bt=`optional peer '${Re}' is present but failed its shape check`;function te(e){return typeof e=="object"&&e!==null}n(te,"isRecordLike");function gr(e){return te(e)&&"box"in e}n(gr,"isDailyBox");function br(e){let t=e.default,r=te(t)||typeof t=="function"?t:{},a=typeof e.createCallObject=="function"?e:r,o=a.createCallObject,d={createCallObject:typeof o=="function"?o.bind(a):o,DailyMediaView:e.DailyMediaView??r.DailyMediaView};return ht(d)?d:null}n(br,"normalizeDailyModule");function ht(e){if(!te(e)||typeof e.createCallObject!="function")return false;let t=e.DailyMediaView;return typeof t=="function"||typeof t=="object"&&t!==null}n(ht,"isEverfurDailyModule");var vt=null,x=null;function ee(e){return Object.freeze({available:false,module:null,reason:e})}n(ee,"unavailable");function hr(e){vt=e,x=null,gt(e!==null);}n(hr,"registerEverfurDaily");function Se(){if(x!==null)return x;let e=vt;if(e===null)return x=ee(mr),x;let t=yt(Re,()=>({box:e()}),gr);if(!t.available)return x=ee(t.reason),x;let r=t.module.box;if(!te(r))return x=ee(bt),x;let a=br(r);return x=a===null?ee(bt):Object.freeze({available:true,module:a}),x}n(Se,"loadEverfurDaily");function j({label:e,glyph:t,onPress:r,testID:a,muted:o=false,style:d}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:r,testID:a,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:o},style:d,children:t})}n(j,"CallControl");function G({children:e,testID:t}){return jsxRuntime.jsx(reactNative.View,{style:y.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:t,children:e})}n(G,"GlyphBox");function Le({color:e}){return jsxRuntime.jsx(reactNative.View,{style:[y.slash,{backgroundColor:e}]})}n(Le,"Slash");function re({color:e,off:t=false}){return jsxRuntime.jsxs(G,{testID:t?"glyph-mic-off":"glyph-mic",children:[jsxRuntime.jsxs(reactNative.View,{style:y.column,children:[jsxRuntime.jsx(reactNative.View,{style:[y.micCapsule,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.micCradle,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.micStem,{backgroundColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(re,"MicGlyph");function ne({color:e,off:t=false}){return jsxRuntime.jsxs(G,{testID:t?"glyph-camera-off":"glyph-camera",children:[jsxRuntime.jsxs(reactNative.View,{style:y.row,children:[jsxRuntime.jsx(reactNative.View,{style:[y.cameraBody,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.cameraLens,{borderRightColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(ne,"CameraGlyph");function Ct({color:e,off:t=false}){return jsxRuntime.jsxs(G,{testID:t?"glyph-speaker-off":"glyph-speaker",children:[jsxRuntime.jsxs(reactNative.View,{style:y.row,children:[jsxRuntime.jsx(reactNative.View,{style:[y.speakerBox,{backgroundColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.speakerCone,{borderRightColor:e}]}),t?null:jsxRuntime.jsx(reactNative.View,{style:[y.speakerWave,{borderColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(Ct,"SpeakerGlyph");function oe({color:e}){return jsxRuntime.jsx(G,{testID:"glyph-switch-camera",children:jsxRuntime.jsxs(reactNative.View,{style:[y.switchBody,{borderColor:e}],children:[jsxRuntime.jsx(reactNative.View,{style:[y.switchTurn,{borderColor:e,borderTopColor:"transparent"}]}),jsxRuntime.jsx(reactNative.View,{style:[y.switchHead,{borderBottomColor:e}]})]})})}n(oe,"SwitchCameraGlyph");function Tt({color:e}){return jsxRuntime.jsx(G,{testID:"glyph-leave",children:jsxRuntime.jsxs(reactNative.View,{style:y.column,children:[jsxRuntime.jsx(reactNative.View,{style:[y.receiver,{borderColor:e}]}),jsxRuntime.jsxs(reactNative.View,{style:y.receiverPads,children:[jsxRuntime.jsx(reactNative.View,{style:[y.receiverPad,{backgroundColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.receiverPad,{backgroundColor:e}]})]})]})})}n(Tt,"LeaveGlyph");var y=reactNative.StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var S=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)"}),xt=3,Et=180,kt=420,wt=.35,Sr=.6,Lr=360,Dr=132,Vr=184,Fr=44;function Ve(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:10}n(Ve,"soldMinutes");function Or({reducedMotion:e,styles:t}){let r=react.useRef(Array.from({length:xt},()=>new reactNative.Animated.Value(wt))).current;return react.useEffect(()=>{if(e)return;let a=r.map((o,d)=>reactNative.Animated.loop(reactNative.Animated.sequence([reactNative.Animated.delay(d*Et),reactNative.Animated.timing(o,{toValue:1,duration:kt,useNativeDriver:true}),reactNative.Animated.timing(o,{toValue:wt,duration:kt,useNativeDriver:true}),reactNative.Animated.delay((xt-d-1)*Et)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,r]),jsxRuntime.jsx(reactNative.View,{style:t.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.map((a,o)=>jsxRuntime.jsx(reactNative.Animated.View,{style:[t.dot,{opacity:e?Sr:a}]},o))})}n(Or,"WaitingDots");function De({label:e,glyph:t,active:r,onPress:a,testID:o,styles:d}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:a,testID:o,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[d.control,r?null:d.controlOff],children:t})}n(De,"LobbyControl");function Fe(e){let{clinicianName:t,petName:r,consultMinutes:a,micOn:o,cameraOn:d,onToggleMic:C,onToggleCamera:F,onSwitchCamera:$,onLeave:Y,style:q}=e,v=P(),s=react.useMemo(()=>Ir(v),[v]),l=reactNativeSafeAreaContext.useSafeAreaInsets(),{width:O}=reactNative.useWindowDimensions(),A=O<Lr?Dr:Vr;return jsxRuntime.jsxs(reactNative.View,{style:[s.root,{paddingTop:l.top+v.space.sm,paddingBottom:l.bottom+v.space.lg},q],testID:"everfur-vet-lobby",children:[jsxRuntime.jsx(reactNative.View,{style:s.topRow,children:jsxRuntime.jsx(reactNative.Pressable,{onPress:Y,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:s.leaveHit,children:jsxRuntime.jsx(h,{tier:"control",style:s.leaveLabel,children:i.leaveCta})})}),jsxRuntime.jsxs(reactNative.View,{style:s.center,children:[jsxRuntime.jsxs(reactNative.View,{style:[s.avatar,{width:A,height:A,borderRadius:A/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:s.avatarGlyphHead}),jsxRuntime.jsx(reactNative.View,{style:s.avatarGlyphBody})]}),jsxRuntime.jsxs(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsxRuntime.jsx(h,{tier:"heading",style:s.title,testID:"everfur-vet-lobby-title",children:i.lobbyTitle(t)}),jsxRuntime.jsx(h,{style:s.subtitle,testID:"everfur-vet-lobby-subtitle",children:i.lobbySubtitle})]}),jsxRuntime.jsx(Or,{reducedMotion:v.motion.reducedMotion,styles:s})]}),jsxRuntime.jsxs(reactNative.View,{style:s.prepCard,testID:"everfur-vet-lobby-prep",children:[jsxRuntime.jsx(h,{tier:"badge",style:s.prepLabel,children:i.lobbyPrepLabel}),jsxRuntime.jsx(h,{style:s.prepBody,children:i.lobbyPrep(r)})]}),jsxRuntime.jsxs(reactNative.View,{style:s.controls,children:[jsxRuntime.jsx(De,{label:o?i.muteCta:i.unmuteCta,glyph:jsxRuntime.jsx(re,{color:v.color.text.onBrand,off:!o}),active:o,onPress:C,testID:"everfur-vet-lobby-mic",styles:s}),jsxRuntime.jsx(De,{label:d?i.cameraOffCta:i.cameraOnCta,glyph:jsxRuntime.jsx(ne,{color:v.color.text.onBrand,off:!d}),active:d,onPress:F,testID:"everfur-vet-lobby-camera",styles:s}),d&&$?jsxRuntime.jsx(De,{label:i.switchCameraCta,glyph:jsxRuntime.jsx(oe,{color:v.color.text.onBrand}),active:true,onPress:$,testID:"everfur-vet-lobby-switch-camera",styles:s}):null]}),jsxRuntime.jsx(h,{tier:"badge",style:s.duration,testID:"everfur-vet-lobby-duration",children:i.lobbyDuration(Ve(a))})]})}n(Fe,"EverfurVetCallLobby");function Ir(e){let{color:t,space:r,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:t.brand,paddingHorizontal:r.lg},topRow:{flexDirection:"row",alignItems:"center"},leaveHit:{minHeight:Fr,justifyContent:"center",paddingVertical:r.xs,paddingRight:r.md},leaveLabel:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:t.success,backgroundColor:S.surface,marginBottom:r.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:S.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:S.glyph},title:{...b(e,"bold"),color:t.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:r.sm},subtitle:{...b(e,"regular"),color:S.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:r.xs},dotRow:{flexDirection:"row",gap:r.xs,marginTop:r.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:S.hairline,backgroundColor:S.surface,padding:r.lg,marginBottom:r.lg},prepLabel:{...b(e,"medium"),color:t.accent,fontSize:o.size.micro,letterSpacing:1.2,marginBottom:r.sm},prepBody:{...b(e,"regular"),color:t.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:r.lg,marginBottom:r.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:S.surfaceRaised},controlOff:{backgroundColor:S.surfaceActive},duration:{...b(e,"medium"),color:S.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Ir,"makeStyles");var Oe=5e3;function Ie(e,t){return new Promise(r=>{let a=setTimeout(r,t);e.catch(()=>{}).then(()=>{clearTimeout(a),r();});})}n(Ie,"settleWithin");function Dt(e,t){let r=react.useRef(e);react.useEffect(()=>{r.current=e;});let a=react.useRef(false);react.useEffect(()=>(a.current=true,()=>{a.current=false;}),[]);let o=react.useRef(false),d=react.useCallback(()=>{o.current||!a.current||(o.current=true,r.current());},[]),C=react.useRef(false),F=react.useCallback(()=>{C.current||(C.current=true,Ie(t(),Oe).then(d));},[t,d]);return {reportLeft:d,leave:F,leaving:C}}n(Dt,"useLeaveOnce");var Pr=Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function Ar(){let e=globalThis;return e[Pr]??=new Map}n(Ar,"receipts");function Vt(e){return (Ar().get(e)??0)>0}n(Vt,"hasRecordingNoticeAccepted");function Ft(e){let[t,r]=react.useState(true),a=react.useRef(true),o=react.useCallback(()=>{let d=e.current;if(!d?.setNativeInCallAudioMode)return;let C=!a.current;a.current=C,r(C),d.setNativeInCallAudioMode(C?"video":"voice");},[e]);return {speakerOn:t,toggleSpeaker:o}}n(Ft,"useSpeakerRoute");function Ne(e){return e??null}n(Ne,"asTrack");function Hr(e){return !!e?.videoTrack}n(Hr,"hasVideo");function zr({styles:e}){return jsxRuntime.jsxs(reactNative.View,{style:e.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:e.remoteOffHead}),jsxRuntime.jsx(reactNative.View,{style:e.remoteOffBody})]})}n(zr,"PersonMark");function Wr(e){return jsxRuntime.jsx(Ur,{...e},e.roomUrl)}n(Wr,"EverfurVetCall");function Ur(e){let{roomUrl:t,token:r,onLeave:a,clinicianName:o,petName:d,consultMinutes:C,daily:F,telemetry:$,onUnavailable:Y,renderUnavailable:q,style:v}=rt(e,["onLeave"]),s=P(),l=react.useMemo(()=>$r(s),[s]),O=reactNativeSafeAreaContext.useSafeAreaInsets(),A=$??Xe,se=react.useRef(A);react.useEffect(()=>{se.current=A;});let I=react.useRef(null),[ce,At]=react.useState(()=>Vt(t)),[Bt,K]=react.useState("joining"),[J,Nt]=react.useState(null),[je,Mt]=react.useState(null),[B,_t]=react.useState(true),[w,jt]=react.useState(true),{speakerOn:z,toggleSpeaker:Ht}=Ft(I),[zt,Wt]=react.useState(true),[de,Ut]=react.useState({flip:false,speaker:false}),[W,Gt]=react.useState(null),[He,ze]=react.useState(0),We=ge(t,r),N=react.useMemo(()=>We?F?{available:true,module:F,reason:""}:Se():null,[We,F]),U=N?.available?N.module:null,D=react.useMemo(()=>N===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:N.available?null:{reason:"dailyMissing",detail:`${we} (${N.reason})`},[N]),ue=react.useRef(false);react.useEffect(()=>{if(D===null){ue.current=false;return}if(be(Y,D.reason,D.detail),!ue.current){ue.current=true;try{globalThis.console?.warn?.(D.detail);}catch{}}},[D,Y]);let fe=react.useCallback(async()=>{let u=I.current;if(I.current=null,!!u){await Ie(new Promise(f=>f(u.leave())),Oe);try{u.setLocalAudio(!1),u.setLocalVideo(!1);}catch{}try{await u.destroy();}catch{}}},[]),{reportLeft:pe,leave:ye,leaving:Ue}=Dt(a,fe);react.useEffect(()=>{if(U===null||!ce)return;let u=false,f=U.createCallObject();I.current=f,Ut({flip:typeof f.cycleCamera=="function",speaker:typeof f.setNativeInCallAudioMode=="function"});let M=n(()=>{let _=Object.values(f.participants());Mt(_.find(me=>me.local)??null),Nt(_.find(me=>!me.local)??null);},"syncParticipants"),Ke=["participant-joined","participant-updated","participant-left"];for(let _ of Ke)f.on(_,M);let Je=n(()=>{u||Ue.current||(K("left"),pe());},"onLeftMeeting"),Ze=n(()=>{u||K("error");},"onError");return f.on("left-meeting",Je),f.on("error",Ze),f.join({url:t,token:r}).then(()=>{u||(K("joined"),Gt(Date.now()),M(),se.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{u||(K("error"),se.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{u=true;for(let _ of Ke)f.off(_,M);f.off("left-meeting",Je),f.off("error",Ze),fe();}},[U,ce,t,r,fe,pe,Ue]),react.useEffect(()=>{if(W===null)return;ze(Date.now()-W);let u=setInterval(()=>{ze(Date.now()-W);},1e3);return ()=>{clearInterval(u);}},[W]);let Ge=react.useCallback(()=>{let u=I.current;u&&_t(f=>(u.setLocalAudio(!f),!f));},[]),$e=react.useCallback(()=>{let u=I.current;u&&jt(f=>(u.setLocalVideo(!f),!f));},[]),Ye=react.useCallback(()=>{let u=I.current;u?.cycleCamera&&u.cycleCamera().then(f=>{let M=f?.device?.facingMode;M&&Wt(M==="user");},()=>{});},[]);if(D!==null)return q?jsxRuntime.jsx(jsxRuntime.Fragment,{children:q(D.reason,D.detail)}):null;if(U===null)return null;if(!ce)return jsxRuntime.jsxs(reactNative.View,{style:[l.notice,{paddingTop:O.top+s.space.xl,paddingBottom:O.bottom+s.space.xl},v],testID:"everfur-vet-call-recording-notice",children:[jsxRuntime.jsx(h,{style:l.noticeTitle,accessibilityRole:"header",children:i.recordingNoticeTitle}),jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>At(true),accessibilityRole:"button",accessibilityLabel:i.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:l.noticeContinue,children:jsxRuntime.jsx(h,{tier:"control",style:l.noticeContinueLabel,children:i.recordingNoticeCta})}),jsxRuntime.jsx(reactNative.Pressable,{onPress:pe,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-recording-leave",style:l.errorLeaveHit,children:jsxRuntime.jsx(h,{tier:"control",style:l.noticeLeave,children:i.leaveCta})})]});if(Bt==="error")return jsxRuntime.jsxs(reactNative.View,{style:[l.centered,v],testID:"everfur-vet-call-error",children:[jsxRuntime.jsx(h,{style:l.status,accessibilityLiveRegion:"polite",children:i.joinFailedReason}),jsxRuntime.jsx(reactNative.Pressable,{onPress:ye,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-error-leave",style:l.errorLeaveHit,children:jsxRuntime.jsx(h,{tier:"control",style:l.errorLeave,children:i.leaveCta})})]});if(J===null)return jsxRuntime.jsx(Fe,{clinicianName:o,petName:d,consultMinutes:C,micOn:B,cameraOn:w,onToggleMic:Ge,onToggleCamera:$e,...de.flip?{onSwitchCamera:Ye}:{},onLeave:ye,style:v});let qe=U.DailyMediaView,Z=o?.trim()??"",$t=He>=Ve(C)*6e4;return jsxRuntime.jsxs(reactNative.View,{style:[l.root,v],testID:"everfur-vet-call",children:[jsxRuntime.jsxs(reactNative.View,{style:l.fill,testID:"everfur-vet-call-remote",children:[jsxRuntime.jsx(qe,{videoTrack:Ne(J.videoTrack),audioTrack:Ne(J.audioTrack),mirror:false,objectFit:"cover",style:l.fill}),Hr(J)?null:jsxRuntime.jsxs(reactNative.View,{style:l.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[jsxRuntime.jsx(zr,{styles:l}),Z.length>0?jsxRuntime.jsx(h,{style:l.remoteOffName,numberOfLines:1,children:Z}):null]})]}),jsxRuntime.jsxs(reactNative.View,{style:[l.statusRow,{top:O.top+s.space.sm}],pointerEvents:"none",children:[Z.length>0?jsxRuntime.jsx(h,{tier:"compact",style:l.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:Z}):null,W!==null?jsxRuntime.jsx(h,{tier:"badge",style:[l.statusMeta,$t?l.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:nt(He)}):null]}),jsxRuntime.jsxs(reactNative.View,{style:[l.selfView,{top:O.top+s.space.sm}],testID:"everfur-vet-call-self",children:[jsxRuntime.jsx(qe,{videoTrack:w?Ne(je?.videoTrack):null,audioTrack:null,mirror:zt,objectFit:"cover",style:l.fill}),je?.videoTrack&&w?null:jsxRuntime.jsx(reactNative.View,{style:[l.selfViewOff,l.fill],testID:"everfur-vet-call-self-off",children:jsxRuntime.jsx(h,{tier:"badge",style:l.selfViewOffLabel,children:i.selfCameraOffLabel})})]}),jsxRuntime.jsxs(reactNative.View,{style:[l.controlBar,{bottom:O.bottom+s.space.lg}],children:[de.speaker?jsxRuntime.jsx(j,{label:z?i.speakerOffCta:i.speakerOnCta,glyph:jsxRuntime.jsx(Ct,{color:z?s.color.text.onBrand:_e,off:!z}),muted:!z,onPress:Ht,testID:"everfur-vet-call-speaker",style:[l.control,z?null:l.controlMuted]}):null,jsxRuntime.jsx(j,{label:B?i.muteCta:i.unmuteCta,glyph:jsxRuntime.jsx(re,{color:B?s.color.text.onBrand:_e,off:!B}),muted:!B,onPress:Ge,testID:"everfur-vet-call-mic",style:[l.control,B?null:l.controlMuted]}),jsxRuntime.jsx(j,{label:w?i.cameraOffCta:i.cameraOnCta,glyph:jsxRuntime.jsx(ne,{color:w?s.color.text.onBrand:_e,off:!w}),muted:!w,onPress:$e,testID:"everfur-vet-call-camera",style:[l.control,w?null:l.controlMuted]}),de.flip&&w?jsxRuntime.jsx(j,{label:i.switchCameraCta,glyph:jsxRuntime.jsx(oe,{color:s.color.text.onBrand}),onPress:Ye,testID:"everfur-vet-call-switch-camera",style:l.control}):null,jsxRuntime.jsx(j,{label:i.leaveCta,glyph:jsxRuntime.jsx(Tt,{color:s.color.text.onBrand}),onPress:ye,testID:"everfur-vet-call-leave",style:[l.control,l.controlDanger]})]})]})}n(Ur,"VetCallRoom");var Me="#141414",Ot="#1B1B1B",Gr="rgba(20,20,20,0.62)",_e="#141414",It=104,Pt={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function $r(e){let{color:t,space:r,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:Me},fill:{...ve},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:r.lg,padding:r.xl,backgroundColor:Me},statusRow:{position:"absolute",left:r.md,right:It+r.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body,...Pt},statusMeta:{...b(e,"mono"),color:t.text.onBrand,fontSize:o.size.caption,...Pt},statusMetaOver:{color:t.danger},selfView:{position:"absolute",right:r.md,width:It,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:Ot,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:r.xs,backgroundColor:Ot},remoteOff:{...ve,alignItems:"center",justifyContent:"center",gap:r.md,backgroundColor:Me},remoteOffAvatar:{width:96,height:96,borderRadius:a.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.subtitle,paddingHorizontal:r.xl},notice:{flex:1,justifyContent:"center",gap:r.lg,paddingHorizontal:r.xl,backgroundColor:t.surface},noticeTitle:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,borderRadius:a.pill,backgroundColor:t.primary},noticeContinueLabel:{...b(e,"medium"),color:t.onPrimary,fontSize:o.size.body},noticeLeave:{...b(e,"medium"),color:t.brand,fontSize:o.size.body},selfViewOffLabel:{...b(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:r.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:Gr},controlMuted:{backgroundColor:t.text.onBrand},controlDanger:{backgroundColor:t.danger},status:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.lg},errorLeave:{...b(e,"medium"),color:t.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n($r,"makeStyles");exports.EVERFUR_DAILY_SETUP=we;exports.EverfurVetCall=Wr;exports.EverfurVetCallLobby=Fe;exports.VET_CALL_CONSULT_MINUTES=he;exports.VET_CALL_COPY=i;exports.isEverfurDailyModule=ht;exports.isSafeRoomUrl=Qe;exports.isUsableRoomCredential=ge;exports.loadEverfurDaily=Se;exports.registerEverfurDaily=hr;
|
|
1
|
+
'use strict';var react=require('react'),reactNative=require('react-native'),reactNativeSafeAreaContext=require('react-native-safe-area-context'),jsxRuntime=require('react/jsx-runtime');var Yt=Object.defineProperty;var n=(e,t)=>Yt(e,"name",{value:t,configurable:true});var qt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function b(e,t){let r=e.type,a=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:a}:{fontFamily:a,fontWeight:r.weight[qt[t]]}}n(b,"face");var Xe=Object.freeze({track(){},trackExpectedFailure(){}});function Qe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Qe,"isSafeRoomUrl");function ge(e,t){return Qe(e)&&t.trim().length>0}n(ge,"isUsableRoomCredential");function et(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(et,"reportHostFailure");function Kt(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(Kt,"isThenable");function be(e,...t){if(typeof e=="function")try{let r=e(...t);return Kt(r)&&Promise.resolve(r).then(void 0,et),r}catch(r){et(r);return}}n(be,"callHost");var tt=new WeakMap;function Jt(e){if(typeof e!="function")return;let t=tt.get(e);if(t!==void 0)return t;let r=n((...a)=>{be(e,...a);},"guarded");return tt.set(e,r),r}n(Jt,"guardHost");function rt(e,t){let r=null;for(let a of t){let o=e[a];typeof o=="function"&&(r??={...e},r[a]=Jt(o));}return r??e}n(rt,"guardHostProps");var he=10,i=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",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 t=e?.trim()??"";return t.length>0?`${t} is joining`:i.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let t=e?.trim()??"";return t.length>0?`Have ${t} nearby and somewhere well lit.`:i.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} MINUTE VISIT`,"lobbyDuration"),joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function nt(e){let t=Math.max(0,Math.floor(e/1e3)),r=String(t%60).padStart(2,"0"),a=Math.floor(t%3600/60),o=Math.floor(t/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}n(nt,"formatElapsed");var ve=Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function xe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))xe(e[t]);}return e}n(xe,"deepFreeze");var Zt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),at={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},lt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ot={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},Xt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Qt={regular:"400",medium:"500",bold:"700"},er={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tr=0,X="System",Q="monospace",rr=["content","heading","control","compact","badge"];function nr(e){let t={};for(let r of rr)t[r]=e;return t}n(nr,"authoredTierSizes");function it(){return {family:X,mono:Q,fontUrl:null,families:{regular:X,medium:X,bold:X,mono:Q,monoMedium:Q,monoBold:Q},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ot,tierSizes:nr(ot),lineHeight:Xt,weight:Qt,letterSpacing:er,scale:1,maxScale:tr,scaleCaps:Zt}}n(it,"baseType");var st={},Ce=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function Te(e){return `cubic-bezier(${e.join(", ")})`}n(Te,"cssCubicBezier");var ct={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:Te(Ce.standard),emphasized:Te(Ce.emphasized),exit:Te(Ce.exit)},reducedMotion:false},or={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",bubbleVet:"#FFC3BC",onBubbleVet:"#111111",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},dt=xe({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:or,space:at,radius:lt,type:it(),motion:ct,slots:st}),ar={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",bubbleVet:"#FFC3BC",onBubbleVet:"#111111",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};xe({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ar,space:at,radius:lt,type:it(),motion:ct,slots:st});var ut=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ft=globalThis,Ee=ft[ut]??(ft[ut]=react.createContext(dt));Ee.displayName??="EverfurThemeContext";function P(){return react.useContext(Ee)}n(P,"useEverfurTheme");function ur(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n(ur,"tierMultiplier");function h({tier:e="content",...t}){let{type:r}=P(),a=ur(r,e);return react.createElement(reactNative.Text,a===void 0?t:{maxFontSizeMultiplier:a,...t})}n(h,"Text");react.forwardRef(n(function(t,r){return react.createElement(reactNative.TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function yt(e,t,r){let a;try{a=t();}catch(d){return ke(`optional peer '${e}' is not installed: ${pr(d)}`)}let o=fr(a);return o==null?ke(`optional peer '${e}' resolved to no module`):r&&!r(o)?ke(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(yt,"optionalModule");function fr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(fr,"unwrapDefault");function ke(e){return Object.freeze({available:false,module:null,reason:e})}n(ke,"frozenUnavailable");function pr(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(pr,"describe");var mt=Symbol.for("@everfur/sdk/televet");function yr(){let e=globalThis,t=e[mt];if(t!==void 0)return t;let r={presenter:null,snapshot:Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:new Set,dailyRegistered:false};return e[mt]=r,r}n(yr,"televetGlobal");function gt(e){yr().dailyRegistered=e;}n(gt,"markEverfurDailyRegistered");var we=`[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 the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,Re="@daily-co/react-native-daily-js",mr=`optional peer '${Re}' has no registered loader`,bt=`optional peer '${Re}' is present but failed its shape check`;function te(e){return typeof e=="object"&&e!==null}n(te,"isRecordLike");function gr(e){return te(e)&&"box"in e}n(gr,"isDailyBox");function br(e){let t=e.default,r=te(t)||typeof t=="function"?t:{},a=typeof e.createCallObject=="function"?e:r,o=a.createCallObject,d={createCallObject:typeof o=="function"?o.bind(a):o,DailyMediaView:e.DailyMediaView??r.DailyMediaView};return ht(d)?d:null}n(br,"normalizeDailyModule");function ht(e){if(!te(e)||typeof e.createCallObject!="function")return false;let t=e.DailyMediaView;return typeof t=="function"||typeof t=="object"&&t!==null}n(ht,"isEverfurDailyModule");var vt=null,x=null;function ee(e){return Object.freeze({available:false,module:null,reason:e})}n(ee,"unavailable");function hr(e){vt=e,x=null,gt(e!==null);}n(hr,"registerEverfurDaily");function Se(){if(x!==null)return x;let e=vt;if(e===null)return x=ee(mr),x;let t=yt(Re,()=>({box:e()}),gr);if(!t.available)return x=ee(t.reason),x;let r=t.module.box;if(!te(r))return x=ee(bt),x;let a=br(r);return x=a===null?ee(bt):Object.freeze({available:true,module:a}),x}n(Se,"loadEverfurDaily");function j({label:e,glyph:t,onPress:r,testID:a,muted:o=false,style:d}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:r,testID:a,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:o},style:d,children:t})}n(j,"CallControl");function G({children:e,testID:t}){return jsxRuntime.jsx(reactNative.View,{style:y.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:t,children:e})}n(G,"GlyphBox");function Le({color:e}){return jsxRuntime.jsx(reactNative.View,{style:[y.slash,{backgroundColor:e}]})}n(Le,"Slash");function re({color:e,off:t=false}){return jsxRuntime.jsxs(G,{testID:t?"glyph-mic-off":"glyph-mic",children:[jsxRuntime.jsxs(reactNative.View,{style:y.column,children:[jsxRuntime.jsx(reactNative.View,{style:[y.micCapsule,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.micCradle,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.micStem,{backgroundColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(re,"MicGlyph");function ne({color:e,off:t=false}){return jsxRuntime.jsxs(G,{testID:t?"glyph-camera-off":"glyph-camera",children:[jsxRuntime.jsxs(reactNative.View,{style:y.row,children:[jsxRuntime.jsx(reactNative.View,{style:[y.cameraBody,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.cameraLens,{borderRightColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(ne,"CameraGlyph");function Ct({color:e,off:t=false}){return jsxRuntime.jsxs(G,{testID:t?"glyph-speaker-off":"glyph-speaker",children:[jsxRuntime.jsxs(reactNative.View,{style:y.row,children:[jsxRuntime.jsx(reactNative.View,{style:[y.speakerBox,{backgroundColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.speakerCone,{borderRightColor:e}]}),t?null:jsxRuntime.jsx(reactNative.View,{style:[y.speakerWave,{borderColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(Ct,"SpeakerGlyph");function oe({color:e}){return jsxRuntime.jsx(G,{testID:"glyph-switch-camera",children:jsxRuntime.jsxs(reactNative.View,{style:[y.switchBody,{borderColor:e}],children:[jsxRuntime.jsx(reactNative.View,{style:[y.switchTurn,{borderColor:e,borderTopColor:"transparent"}]}),jsxRuntime.jsx(reactNative.View,{style:[y.switchHead,{borderBottomColor:e}]})]})})}n(oe,"SwitchCameraGlyph");function Tt({color:e}){return jsxRuntime.jsx(G,{testID:"glyph-leave",children:jsxRuntime.jsxs(reactNative.View,{style:y.column,children:[jsxRuntime.jsx(reactNative.View,{style:[y.receiver,{borderColor:e}]}),jsxRuntime.jsxs(reactNative.View,{style:y.receiverPads,children:[jsxRuntime.jsx(reactNative.View,{style:[y.receiverPad,{backgroundColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.receiverPad,{backgroundColor:e}]})]})]})})}n(Tt,"LeaveGlyph");var y=reactNative.StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var S=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)"}),xt=3,Et=180,kt=420,wt=.35,Sr=.6,Lr=360,Vr=132,Dr=184,Fr=44;function De(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:10}n(De,"soldMinutes");function Or({reducedMotion:e,styles:t}){let r=react.useRef(Array.from({length:xt},()=>new reactNative.Animated.Value(wt))).current;return react.useEffect(()=>{if(e)return;let a=r.map((o,d)=>reactNative.Animated.loop(reactNative.Animated.sequence([reactNative.Animated.delay(d*Et),reactNative.Animated.timing(o,{toValue:1,duration:kt,useNativeDriver:true}),reactNative.Animated.timing(o,{toValue:wt,duration:kt,useNativeDriver:true}),reactNative.Animated.delay((xt-d-1)*Et)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,r]),jsxRuntime.jsx(reactNative.View,{style:t.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.map((a,o)=>jsxRuntime.jsx(reactNative.Animated.View,{style:[t.dot,{opacity:e?Sr:a}]},o))})}n(Or,"WaitingDots");function Ve({label:e,glyph:t,active:r,onPress:a,testID:o,styles:d}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:a,testID:o,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[d.control,r?null:d.controlOff],children:t})}n(Ve,"LobbyControl");function Fe(e){let{clinicianName:t,petName:r,consultMinutes:a,micOn:o,cameraOn:d,onToggleMic:C,onToggleCamera:F,onSwitchCamera:$,onLeave:Y,style:q}=e,v=P(),s=react.useMemo(()=>Ir(v),[v]),l=reactNativeSafeAreaContext.useSafeAreaInsets(),{width:O}=reactNative.useWindowDimensions(),B=O<Lr?Vr:Dr;return jsxRuntime.jsxs(reactNative.View,{style:[s.root,{paddingTop:l.top+v.space.sm,paddingBottom:l.bottom+v.space.lg},q],testID:"everfur-vet-lobby",children:[jsxRuntime.jsx(reactNative.View,{style:s.topRow,children:jsxRuntime.jsx(reactNative.Pressable,{onPress:Y,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:s.leaveHit,children:jsxRuntime.jsx(h,{tier:"control",style:s.leaveLabel,children:i.leaveCta})})}),jsxRuntime.jsxs(reactNative.View,{style:s.center,children:[jsxRuntime.jsxs(reactNative.View,{style:[s.avatar,{width:B,height:B,borderRadius:B/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:s.avatarGlyphHead}),jsxRuntime.jsx(reactNative.View,{style:s.avatarGlyphBody})]}),jsxRuntime.jsxs(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsxRuntime.jsx(h,{tier:"heading",style:s.title,testID:"everfur-vet-lobby-title",children:i.lobbyTitle(t)}),jsxRuntime.jsx(h,{style:s.subtitle,testID:"everfur-vet-lobby-subtitle",children:i.lobbySubtitle})]}),jsxRuntime.jsx(Or,{reducedMotion:v.motion.reducedMotion,styles:s})]}),jsxRuntime.jsxs(reactNative.View,{style:s.prepCard,testID:"everfur-vet-lobby-prep",children:[jsxRuntime.jsx(h,{tier:"badge",style:s.prepLabel,children:i.lobbyPrepLabel}),jsxRuntime.jsx(h,{style:s.prepBody,children:i.lobbyPrep(r)})]}),jsxRuntime.jsxs(reactNative.View,{style:s.controls,children:[jsxRuntime.jsx(Ve,{label:o?i.muteCta:i.unmuteCta,glyph:jsxRuntime.jsx(re,{color:v.color.text.onBrand,off:!o}),active:o,onPress:C,testID:"everfur-vet-lobby-mic",styles:s}),jsxRuntime.jsx(Ve,{label:d?i.cameraOffCta:i.cameraOnCta,glyph:jsxRuntime.jsx(ne,{color:v.color.text.onBrand,off:!d}),active:d,onPress:F,testID:"everfur-vet-lobby-camera",styles:s}),d&&$?jsxRuntime.jsx(Ve,{label:i.switchCameraCta,glyph:jsxRuntime.jsx(oe,{color:v.color.text.onBrand}),active:true,onPress:$,testID:"everfur-vet-lobby-switch-camera",styles:s}):null]}),jsxRuntime.jsx(h,{tier:"badge",style:s.duration,testID:"everfur-vet-lobby-duration",children:i.lobbyDuration(De(a))})]})}n(Fe,"EverfurVetCallLobby");function Ir(e){let{color:t,space:r,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:t.brand,paddingHorizontal:r.lg},topRow:{flexDirection:"row",alignItems:"center"},leaveHit:{minHeight:Fr,justifyContent:"center",paddingVertical:r.xs,paddingRight:r.md},leaveLabel:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:t.success,backgroundColor:S.surface,marginBottom:r.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:S.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:S.glyph},title:{...b(e,"bold"),color:t.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:r.sm},subtitle:{...b(e,"regular"),color:S.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:r.xs},dotRow:{flexDirection:"row",gap:r.xs,marginTop:r.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:S.hairline,backgroundColor:S.surface,padding:r.lg,marginBottom:r.lg},prepLabel:{...b(e,"medium"),color:t.accent,fontSize:o.size.micro,letterSpacing:1.2,marginBottom:r.sm},prepBody:{...b(e,"regular"),color:t.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:r.lg,marginBottom:r.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:S.surfaceRaised},controlOff:{backgroundColor:S.surfaceActive},duration:{...b(e,"medium"),color:S.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Ir,"makeStyles");var Oe=5e3;function Ie(e,t){return new Promise(r=>{let a=setTimeout(r,t);e.catch(()=>{}).then(()=>{clearTimeout(a),r();});})}n(Ie,"settleWithin");function Vt(e,t){let r=react.useRef(e);react.useEffect(()=>{r.current=e;});let a=react.useRef(false);react.useEffect(()=>(a.current=true,()=>{a.current=false;}),[]);let o=react.useRef(false),d=react.useCallback(()=>{o.current||!a.current||(o.current=true,r.current());},[]),C=react.useRef(false),F=react.useCallback(()=>{C.current||(C.current=true,Ie(t(),Oe).then(d));},[t,d]);return {reportLeft:d,leave:F,leaving:C}}n(Vt,"useLeaveOnce");var Pr=Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function Br(){let e=globalThis;return e[Pr]??=new Map}n(Br,"receipts");function Dt(e){return (Br().get(e)??0)>0}n(Dt,"hasRecordingNoticeAccepted");function Ft(e){let[t,r]=react.useState(true),a=react.useRef(true),o=react.useCallback(()=>{let d=e.current;if(!d?.setNativeInCallAudioMode)return;let C=!a.current;a.current=C,r(C),d.setNativeInCallAudioMode(C?"video":"voice");},[e]);return {speakerOn:t,toggleSpeaker:o}}n(Ft,"useSpeakerRoute");function Ne(e){return e??null}n(Ne,"asTrack");function Hr(e){return !!e?.videoTrack}n(Hr,"hasVideo");function zr({styles:e}){return jsxRuntime.jsxs(reactNative.View,{style:e.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:e.remoteOffHead}),jsxRuntime.jsx(reactNative.View,{style:e.remoteOffBody})]})}n(zr,"PersonMark");function Wr(e){return jsxRuntime.jsx(Ur,{...e},e.roomUrl)}n(Wr,"EverfurVetCall");function Ur(e){let{roomUrl:t,token:r,onLeave:a,clinicianName:o,petName:d,consultMinutes:C,daily:F,telemetry:$,onUnavailable:Y,renderUnavailable:q,style:v}=rt(e,["onLeave"]),s=P(),l=react.useMemo(()=>$r(s),[s]),O=reactNativeSafeAreaContext.useSafeAreaInsets(),B=$??Xe,se=react.useRef(B);react.useEffect(()=>{se.current=B;});let I=react.useRef(null),[ce,Bt]=react.useState(()=>Dt(t)),[At,K]=react.useState("joining"),[J,Nt]=react.useState(null),[je,Mt]=react.useState(null),[A,_t]=react.useState(true),[w,jt]=react.useState(true),{speakerOn:z,toggleSpeaker:Ht}=Ft(I),[zt,Wt]=react.useState(true),[de,Ut]=react.useState({flip:false,speaker:false}),[W,Gt]=react.useState(null),[He,ze]=react.useState(0),We=ge(t,r),N=react.useMemo(()=>We?F?{available:true,module:F,reason:""}:Se():null,[We,F]),U=N?.available?N.module:null,V=react.useMemo(()=>N===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:N.available?null:{reason:"dailyMissing",detail:`${we} (${N.reason})`},[N]),ue=react.useRef(false);react.useEffect(()=>{if(V===null){ue.current=false;return}if(be(Y,V.reason,V.detail),!ue.current){ue.current=true;try{globalThis.console?.warn?.(V.detail);}catch{}}},[V,Y]);let fe=react.useCallback(async()=>{let u=I.current;if(I.current=null,!!u){await Ie(new Promise(f=>f(u.leave())),Oe);try{u.setLocalAudio(!1),u.setLocalVideo(!1);}catch{}try{await u.destroy();}catch{}}},[]),{reportLeft:pe,leave:ye,leaving:Ue}=Vt(a,fe);react.useEffect(()=>{if(U===null||!ce)return;let u=false,f=U.createCallObject();I.current=f,Ut({flip:typeof f.cycleCamera=="function",speaker:typeof f.setNativeInCallAudioMode=="function"});let M=n(()=>{let _=Object.values(f.participants());Mt(_.find(me=>me.local)??null),Nt(_.find(me=>!me.local)??null);},"syncParticipants"),Ke=["participant-joined","participant-updated","participant-left"];for(let _ of Ke)f.on(_,M);let Je=n(()=>{u||Ue.current||(K("left"),pe());},"onLeftMeeting"),Ze=n(()=>{u||K("error");},"onError");return f.on("left-meeting",Je),f.on("error",Ze),f.join({url:t,token:r}).then(()=>{u||(K("joined"),Gt(Date.now()),M(),se.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{u||(K("error"),se.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{u=true;for(let _ of Ke)f.off(_,M);f.off("left-meeting",Je),f.off("error",Ze),fe();}},[U,ce,t,r,fe,pe,Ue]),react.useEffect(()=>{if(W===null)return;ze(Date.now()-W);let u=setInterval(()=>{ze(Date.now()-W);},1e3);return ()=>{clearInterval(u);}},[W]);let Ge=react.useCallback(()=>{let u=I.current;u&&_t(f=>(u.setLocalAudio(!f),!f));},[]),$e=react.useCallback(()=>{let u=I.current;u&&jt(f=>(u.setLocalVideo(!f),!f));},[]),Ye=react.useCallback(()=>{let u=I.current;u?.cycleCamera&&u.cycleCamera().then(f=>{let M=f?.device?.facingMode;M&&Wt(M==="user");},()=>{});},[]);if(V!==null)return q?jsxRuntime.jsx(jsxRuntime.Fragment,{children:q(V.reason,V.detail)}):null;if(U===null)return null;if(!ce)return jsxRuntime.jsxs(reactNative.View,{style:[l.notice,{paddingTop:O.top+s.space.xl,paddingBottom:O.bottom+s.space.xl},v],testID:"everfur-vet-call-recording-notice",children:[jsxRuntime.jsx(h,{style:l.noticeTitle,accessibilityRole:"header",children:i.recordingNoticeTitle}),jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>Bt(true),accessibilityRole:"button",accessibilityLabel:i.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:l.noticeContinue,children:jsxRuntime.jsx(h,{tier:"control",style:l.noticeContinueLabel,children:i.recordingNoticeCta})}),jsxRuntime.jsx(reactNative.Pressable,{onPress:pe,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-recording-leave",style:l.errorLeaveHit,children:jsxRuntime.jsx(h,{tier:"control",style:l.noticeLeave,children:i.leaveCta})})]});if(At==="error")return jsxRuntime.jsxs(reactNative.View,{style:[l.centered,v],testID:"everfur-vet-call-error",children:[jsxRuntime.jsx(h,{style:l.status,accessibilityLiveRegion:"polite",children:i.joinFailedReason}),jsxRuntime.jsx(reactNative.Pressable,{onPress:ye,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-error-leave",style:l.errorLeaveHit,children:jsxRuntime.jsx(h,{tier:"control",style:l.errorLeave,children:i.leaveCta})})]});if(J===null)return jsxRuntime.jsx(Fe,{clinicianName:o,petName:d,consultMinutes:C,micOn:A,cameraOn:w,onToggleMic:Ge,onToggleCamera:$e,...de.flip?{onSwitchCamera:Ye}:{},onLeave:ye,style:v});let qe=U.DailyMediaView,Z=o?.trim()??"",$t=He>=De(C)*6e4;return jsxRuntime.jsxs(reactNative.View,{style:[l.root,v],testID:"everfur-vet-call",children:[jsxRuntime.jsxs(reactNative.View,{style:l.fill,testID:"everfur-vet-call-remote",children:[jsxRuntime.jsx(qe,{videoTrack:Ne(J.videoTrack),audioTrack:Ne(J.audioTrack),mirror:false,objectFit:"cover",style:l.fill}),Hr(J)?null:jsxRuntime.jsxs(reactNative.View,{style:l.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[jsxRuntime.jsx(zr,{styles:l}),Z.length>0?jsxRuntime.jsx(h,{style:l.remoteOffName,numberOfLines:1,children:Z}):null]})]}),jsxRuntime.jsxs(reactNative.View,{style:[l.statusRow,{top:O.top+s.space.sm}],pointerEvents:"none",children:[Z.length>0?jsxRuntime.jsx(h,{tier:"compact",style:l.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:Z}):null,W!==null?jsxRuntime.jsx(h,{tier:"badge",style:[l.statusMeta,$t?l.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:nt(He)}):null]}),jsxRuntime.jsxs(reactNative.View,{style:[l.selfView,{top:O.top+s.space.sm}],testID:"everfur-vet-call-self",children:[jsxRuntime.jsx(qe,{videoTrack:w?Ne(je?.videoTrack):null,audioTrack:null,mirror:zt,objectFit:"cover",style:l.fill}),je?.videoTrack&&w?null:jsxRuntime.jsx(reactNative.View,{style:[l.selfViewOff,l.fill],testID:"everfur-vet-call-self-off",children:jsxRuntime.jsx(h,{tier:"badge",style:l.selfViewOffLabel,children:i.selfCameraOffLabel})})]}),jsxRuntime.jsxs(reactNative.View,{style:[l.controlBar,{bottom:O.bottom+s.space.lg}],children:[de.speaker?jsxRuntime.jsx(j,{label:z?i.speakerOffCta:i.speakerOnCta,glyph:jsxRuntime.jsx(Ct,{color:z?s.color.text.onBrand:_e,off:!z}),muted:!z,onPress:Ht,testID:"everfur-vet-call-speaker",style:[l.control,z?null:l.controlMuted]}):null,jsxRuntime.jsx(j,{label:A?i.muteCta:i.unmuteCta,glyph:jsxRuntime.jsx(re,{color:A?s.color.text.onBrand:_e,off:!A}),muted:!A,onPress:Ge,testID:"everfur-vet-call-mic",style:[l.control,A?null:l.controlMuted]}),jsxRuntime.jsx(j,{label:w?i.cameraOffCta:i.cameraOnCta,glyph:jsxRuntime.jsx(ne,{color:w?s.color.text.onBrand:_e,off:!w}),muted:!w,onPress:$e,testID:"everfur-vet-call-camera",style:[l.control,w?null:l.controlMuted]}),de.flip&&w?jsxRuntime.jsx(j,{label:i.switchCameraCta,glyph:jsxRuntime.jsx(oe,{color:s.color.text.onBrand}),onPress:Ye,testID:"everfur-vet-call-switch-camera",style:l.control}):null,jsxRuntime.jsx(j,{label:i.leaveCta,glyph:jsxRuntime.jsx(Tt,{color:s.color.text.onBrand}),onPress:ye,testID:"everfur-vet-call-leave",style:[l.control,l.controlDanger]})]})]})}n(Ur,"VetCallRoom");var Me="#141414",Ot="#1B1B1B",Gr="rgba(20,20,20,0.62)",_e="#141414",It=104,Pt={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function $r(e){let{color:t,space:r,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:Me},fill:{...ve},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:r.lg,padding:r.xl,backgroundColor:Me},statusRow:{position:"absolute",left:r.md,right:It+r.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body,...Pt},statusMeta:{...b(e,"mono"),color:t.text.onBrand,fontSize:o.size.caption,...Pt},statusMetaOver:{color:t.danger},selfView:{position:"absolute",right:r.md,width:It,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:Ot,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:r.xs,backgroundColor:Ot},remoteOff:{...ve,alignItems:"center",justifyContent:"center",gap:r.md,backgroundColor:Me},remoteOffAvatar:{width:96,height:96,borderRadius:a.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.subtitle,paddingHorizontal:r.xl},notice:{flex:1,justifyContent:"center",gap:r.lg,paddingHorizontal:r.xl,backgroundColor:t.surface},noticeTitle:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,borderRadius:a.pill,backgroundColor:t.primary},noticeContinueLabel:{...b(e,"medium"),color:t.onPrimary,fontSize:o.size.body},noticeLeave:{...b(e,"medium"),color:t.brand,fontSize:o.size.body},selfViewOffLabel:{...b(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:r.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:Gr},controlMuted:{backgroundColor:t.text.onBrand},controlDanger:{backgroundColor:t.danger},status:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.lg},errorLeave:{...b(e,"medium"),color:t.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n($r,"makeStyles");exports.EVERFUR_DAILY_SETUP=we;exports.EverfurVetCall=Wr;exports.EverfurVetCallLobby=Fe;exports.VET_CALL_CONSULT_MINUTES=he;exports.VET_CALL_COPY=i;exports.isEverfurDailyModule=ht;exports.isSafeRoomUrl=Qe;exports.isUsableRoomCredential=ge;exports.loadEverfurDaily=Se;exports.registerEverfurDaily=hr;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createContext,forwardRef,createElement,useMemo,useRef,useEffect,useState,useCallback,useContext}from'react';import {StyleSheet,TextInput,useWindowDimensions,View,Pressable,Text,Animated}from'react-native';import {useSafeAreaInsets}from'react-native-safe-area-context';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Yt=Object.defineProperty;var n=(e,t)=>Yt(e,"name",{value:t,configurable:true});var qt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function b(e,t){let r=e.type,a=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:a}:{fontFamily:a,fontWeight:r.weight[qt[t]]}}n(b,"face");var Xe=Object.freeze({track(){},trackExpectedFailure(){}});function Qe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Qe,"isSafeRoomUrl");function ge(e,t){return Qe(e)&&t.trim().length>0}n(ge,"isUsableRoomCredential");function et(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(et,"reportHostFailure");function Kt(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(Kt,"isThenable");function be(e,...t){if(typeof e=="function")try{let r=e(...t);return Kt(r)&&Promise.resolve(r).then(void 0,et),r}catch(r){et(r);return}}n(be,"callHost");var tt=new WeakMap;function Jt(e){if(typeof e!="function")return;let t=tt.get(e);if(t!==void 0)return t;let r=n((...a)=>{be(e,...a);},"guarded");return tt.set(e,r),r}n(Jt,"guardHost");function rt(e,t){let r=null;for(let a of t){let o=e[a];typeof o=="function"&&(r??={...e},r[a]=Jt(o));}return r??e}n(rt,"guardHostProps");var he=10,i=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",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 t=e?.trim()??"";return t.length>0?`${t} is joining`:i.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let t=e?.trim()??"";return t.length>0?`Have ${t} nearby and somewhere well lit.`:i.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} MINUTE VISIT`,"lobbyDuration"),joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function nt(e){let t=Math.max(0,Math.floor(e/1e3)),r=String(t%60).padStart(2,"0"),a=Math.floor(t%3600/60),o=Math.floor(t/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}n(nt,"formatElapsed");var ve=Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function xe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))xe(e[t]);}return e}n(xe,"deepFreeze");var Zt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),at={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},lt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ot={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},Xt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Qt={regular:"400",medium:"500",bold:"700"},er={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tr=0,X="System",Q="monospace",rr=["content","heading","control","compact","badge"];function nr(e){let t={};for(let r of rr)t[r]=e;return t}n(nr,"authoredTierSizes");function it(){return {family:X,mono:Q,fontUrl:null,families:{regular:X,medium:X,bold:X,mono:Q,monoMedium:Q,monoBold:Q},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ot,tierSizes:nr(ot),lineHeight:Xt,weight:Qt,letterSpacing:er,scale:1,maxScale:tr,scaleCaps:Zt}}n(it,"baseType");var st={},Ce=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function Te(e){return `cubic-bezier(${e.join(", ")})`}n(Te,"cssCubicBezier");var ct={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:Te(Ce.standard),emphasized:Te(Ce.emphasized),exit:Te(Ce.exit)},reducedMotion:false},or={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)"},dt=xe({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:or,space:at,radius:lt,type:it(),motion:ct,slots:st}),ar={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)"};xe({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ar,space:at,radius:lt,type:it(),motion:ct,slots:st});var ut=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ft=globalThis,Ee=ft[ut]??(ft[ut]=createContext(dt));Ee.displayName??="EverfurThemeContext";function P(){return useContext(Ee)}n(P,"useEverfurTheme");function ur(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n(ur,"tierMultiplier");function h({tier:e="content",...t}){let{type:r}=P(),a=ur(r,e);return createElement(Text,a===void 0?t:{maxFontSizeMultiplier:a,...t})}n(h,"Text");forwardRef(n(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function yt(e,t,r){let a;try{a=t();}catch(d){return ke(`optional peer '${e}' is not installed: ${pr(d)}`)}let o=fr(a);return o==null?ke(`optional peer '${e}' resolved to no module`):r&&!r(o)?ke(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(yt,"optionalModule");function fr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(fr,"unwrapDefault");function ke(e){return Object.freeze({available:false,module:null,reason:e})}n(ke,"frozenUnavailable");function pr(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(pr,"describe");var mt=Symbol.for("@everfur/sdk/televet");function yr(){let e=globalThis,t=e[mt];if(t!==void 0)return t;let r={presenter:null,snapshot:Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:new Set,dailyRegistered:false};return e[mt]=r,r}n(yr,"televetGlobal");function gt(e){yr().dailyRegistered=e;}n(gt,"markEverfurDailyRegistered");var we=`[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 the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,Re="@daily-co/react-native-daily-js",mr=`optional peer '${Re}' has no registered loader`,bt=`optional peer '${Re}' is present but failed its shape check`;function te(e){return typeof e=="object"&&e!==null}n(te,"isRecordLike");function gr(e){return te(e)&&"box"in e}n(gr,"isDailyBox");function br(e){let t=e.default,r=te(t)||typeof t=="function"?t:{},a=typeof e.createCallObject=="function"?e:r,o=a.createCallObject,d={createCallObject:typeof o=="function"?o.bind(a):o,DailyMediaView:e.DailyMediaView??r.DailyMediaView};return ht(d)?d:null}n(br,"normalizeDailyModule");function ht(e){if(!te(e)||typeof e.createCallObject!="function")return false;let t=e.DailyMediaView;return typeof t=="function"||typeof t=="object"&&t!==null}n(ht,"isEverfurDailyModule");var vt=null,x=null;function ee(e){return Object.freeze({available:false,module:null,reason:e})}n(ee,"unavailable");function hr(e){vt=e,x=null,gt(e!==null);}n(hr,"registerEverfurDaily");function Se(){if(x!==null)return x;let e=vt;if(e===null)return x=ee(mr),x;let t=yt(Re,()=>({box:e()}),gr);if(!t.available)return x=ee(t.reason),x;let r=t.module.box;if(!te(r))return x=ee(bt),x;let a=br(r);return x=a===null?ee(bt):Object.freeze({available:true,module:a}),x}n(Se,"loadEverfurDaily");function j({label:e,glyph:t,onPress:r,testID:a,muted:o=false,style:d}){return jsx(Pressable,{onPress:r,testID:a,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:o},style:d,children:t})}n(j,"CallControl");function G({children:e,testID:t}){return jsx(View,{style:y.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:t,children:e})}n(G,"GlyphBox");function Le({color:e}){return jsx(View,{style:[y.slash,{backgroundColor:e}]})}n(Le,"Slash");function re({color:e,off:t=false}){return jsxs(G,{testID:t?"glyph-mic-off":"glyph-mic",children:[jsxs(View,{style:y.column,children:[jsx(View,{style:[y.micCapsule,{borderColor:e}]}),jsx(View,{style:[y.micCradle,{borderColor:e}]}),jsx(View,{style:[y.micStem,{backgroundColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(re,"MicGlyph");function ne({color:e,off:t=false}){return jsxs(G,{testID:t?"glyph-camera-off":"glyph-camera",children:[jsxs(View,{style:y.row,children:[jsx(View,{style:[y.cameraBody,{borderColor:e}]}),jsx(View,{style:[y.cameraLens,{borderRightColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(ne,"CameraGlyph");function Ct({color:e,off:t=false}){return jsxs(G,{testID:t?"glyph-speaker-off":"glyph-speaker",children:[jsxs(View,{style:y.row,children:[jsx(View,{style:[y.speakerBox,{backgroundColor:e}]}),jsx(View,{style:[y.speakerCone,{borderRightColor:e}]}),t?null:jsx(View,{style:[y.speakerWave,{borderColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(Ct,"SpeakerGlyph");function oe({color:e}){return jsx(G,{testID:"glyph-switch-camera",children:jsxs(View,{style:[y.switchBody,{borderColor:e}],children:[jsx(View,{style:[y.switchTurn,{borderColor:e,borderTopColor:"transparent"}]}),jsx(View,{style:[y.switchHead,{borderBottomColor:e}]})]})})}n(oe,"SwitchCameraGlyph");function Tt({color:e}){return jsx(G,{testID:"glyph-leave",children:jsxs(View,{style:y.column,children:[jsx(View,{style:[y.receiver,{borderColor:e}]}),jsxs(View,{style:y.receiverPads,children:[jsx(View,{style:[y.receiverPad,{backgroundColor:e}]}),jsx(View,{style:[y.receiverPad,{backgroundColor:e}]})]})]})})}n(Tt,"LeaveGlyph");var y=StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var S=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)"}),xt=3,Et=180,kt=420,wt=.35,Sr=.6,Lr=360,Dr=132,Vr=184,Fr=44;function Ve(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:10}n(Ve,"soldMinutes");function Or({reducedMotion:e,styles:t}){let r=useRef(Array.from({length:xt},()=>new Animated.Value(wt))).current;return useEffect(()=>{if(e)return;let a=r.map((o,d)=>Animated.loop(Animated.sequence([Animated.delay(d*Et),Animated.timing(o,{toValue:1,duration:kt,useNativeDriver:true}),Animated.timing(o,{toValue:wt,duration:kt,useNativeDriver:true}),Animated.delay((xt-d-1)*Et)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,r]),jsx(View,{style:t.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.map((a,o)=>jsx(Animated.View,{style:[t.dot,{opacity:e?Sr:a}]},o))})}n(Or,"WaitingDots");function De({label:e,glyph:t,active:r,onPress:a,testID:o,styles:d}){return jsx(Pressable,{onPress:a,testID:o,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[d.control,r?null:d.controlOff],children:t})}n(De,"LobbyControl");function Fe(e){let{clinicianName:t,petName:r,consultMinutes:a,micOn:o,cameraOn:d,onToggleMic:C,onToggleCamera:F,onSwitchCamera:$,onLeave:Y,style:q}=e,v=P(),s=useMemo(()=>Ir(v),[v]),l=useSafeAreaInsets(),{width:O}=useWindowDimensions(),A=O<Lr?Dr:Vr;return jsxs(View,{style:[s.root,{paddingTop:l.top+v.space.sm,paddingBottom:l.bottom+v.space.lg},q],testID:"everfur-vet-lobby",children:[jsx(View,{style:s.topRow,children:jsx(Pressable,{onPress:Y,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:s.leaveHit,children:jsx(h,{tier:"control",style:s.leaveLabel,children:i.leaveCta})})}),jsxs(View,{style:s.center,children:[jsxs(View,{style:[s.avatar,{width:A,height:A,borderRadius:A/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsx(View,{style:s.avatarGlyphHead}),jsx(View,{style:s.avatarGlyphBody})]}),jsxs(View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsx(h,{tier:"heading",style:s.title,testID:"everfur-vet-lobby-title",children:i.lobbyTitle(t)}),jsx(h,{style:s.subtitle,testID:"everfur-vet-lobby-subtitle",children:i.lobbySubtitle})]}),jsx(Or,{reducedMotion:v.motion.reducedMotion,styles:s})]}),jsxs(View,{style:s.prepCard,testID:"everfur-vet-lobby-prep",children:[jsx(h,{tier:"badge",style:s.prepLabel,children:i.lobbyPrepLabel}),jsx(h,{style:s.prepBody,children:i.lobbyPrep(r)})]}),jsxs(View,{style:s.controls,children:[jsx(De,{label:o?i.muteCta:i.unmuteCta,glyph:jsx(re,{color:v.color.text.onBrand,off:!o}),active:o,onPress:C,testID:"everfur-vet-lobby-mic",styles:s}),jsx(De,{label:d?i.cameraOffCta:i.cameraOnCta,glyph:jsx(ne,{color:v.color.text.onBrand,off:!d}),active:d,onPress:F,testID:"everfur-vet-lobby-camera",styles:s}),d&&$?jsx(De,{label:i.switchCameraCta,glyph:jsx(oe,{color:v.color.text.onBrand}),active:true,onPress:$,testID:"everfur-vet-lobby-switch-camera",styles:s}):null]}),jsx(h,{tier:"badge",style:s.duration,testID:"everfur-vet-lobby-duration",children:i.lobbyDuration(Ve(a))})]})}n(Fe,"EverfurVetCallLobby");function Ir(e){let{color:t,space:r,radius:a,type:o}=e;return StyleSheet.create({root:{flex:1,backgroundColor:t.brand,paddingHorizontal:r.lg},topRow:{flexDirection:"row",alignItems:"center"},leaveHit:{minHeight:Fr,justifyContent:"center",paddingVertical:r.xs,paddingRight:r.md},leaveLabel:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:t.success,backgroundColor:S.surface,marginBottom:r.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:S.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:S.glyph},title:{...b(e,"bold"),color:t.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:r.sm},subtitle:{...b(e,"regular"),color:S.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:r.xs},dotRow:{flexDirection:"row",gap:r.xs,marginTop:r.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:S.hairline,backgroundColor:S.surface,padding:r.lg,marginBottom:r.lg},prepLabel:{...b(e,"medium"),color:t.accent,fontSize:o.size.micro,letterSpacing:1.2,marginBottom:r.sm},prepBody:{...b(e,"regular"),color:t.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:r.lg,marginBottom:r.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:S.surfaceRaised},controlOff:{backgroundColor:S.surfaceActive},duration:{...b(e,"medium"),color:S.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Ir,"makeStyles");var Oe=5e3;function Ie(e,t){return new Promise(r=>{let a=setTimeout(r,t);e.catch(()=>{}).then(()=>{clearTimeout(a),r();});})}n(Ie,"settleWithin");function Dt(e,t){let r=useRef(e);useEffect(()=>{r.current=e;});let a=useRef(false);useEffect(()=>(a.current=true,()=>{a.current=false;}),[]);let o=useRef(false),d=useCallback(()=>{o.current||!a.current||(o.current=true,r.current());},[]),C=useRef(false),F=useCallback(()=>{C.current||(C.current=true,Ie(t(),Oe).then(d));},[t,d]);return {reportLeft:d,leave:F,leaving:C}}n(Dt,"useLeaveOnce");var Pr=Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function Ar(){let e=globalThis;return e[Pr]??=new Map}n(Ar,"receipts");function Vt(e){return (Ar().get(e)??0)>0}n(Vt,"hasRecordingNoticeAccepted");function Ft(e){let[t,r]=useState(true),a=useRef(true),o=useCallback(()=>{let d=e.current;if(!d?.setNativeInCallAudioMode)return;let C=!a.current;a.current=C,r(C),d.setNativeInCallAudioMode(C?"video":"voice");},[e]);return {speakerOn:t,toggleSpeaker:o}}n(Ft,"useSpeakerRoute");function Ne(e){return e??null}n(Ne,"asTrack");function Hr(e){return !!e?.videoTrack}n(Hr,"hasVideo");function zr({styles:e}){return jsxs(View,{style:e.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsx(View,{style:e.remoteOffHead}),jsx(View,{style:e.remoteOffBody})]})}n(zr,"PersonMark");function Wr(e){return jsx(Ur,{...e},e.roomUrl)}n(Wr,"EverfurVetCall");function Ur(e){let{roomUrl:t,token:r,onLeave:a,clinicianName:o,petName:d,consultMinutes:C,daily:F,telemetry:$,onUnavailable:Y,renderUnavailable:q,style:v}=rt(e,["onLeave"]),s=P(),l=useMemo(()=>$r(s),[s]),O=useSafeAreaInsets(),A=$??Xe,se=useRef(A);useEffect(()=>{se.current=A;});let I=useRef(null),[ce,At]=useState(()=>Vt(t)),[Bt,K]=useState("joining"),[J,Nt]=useState(null),[je,Mt]=useState(null),[B,_t]=useState(true),[w,jt]=useState(true),{speakerOn:z,toggleSpeaker:Ht}=Ft(I),[zt,Wt]=useState(true),[de,Ut]=useState({flip:false,speaker:false}),[W,Gt]=useState(null),[He,ze]=useState(0),We=ge(t,r),N=useMemo(()=>We?F?{available:true,module:F,reason:""}:Se():null,[We,F]),U=N?.available?N.module:null,D=useMemo(()=>N===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:N.available?null:{reason:"dailyMissing",detail:`${we} (${N.reason})`},[N]),ue=useRef(false);useEffect(()=>{if(D===null){ue.current=false;return}if(be(Y,D.reason,D.detail),!ue.current){ue.current=true;try{globalThis.console?.warn?.(D.detail);}catch{}}},[D,Y]);let fe=useCallback(async()=>{let u=I.current;if(I.current=null,!!u){await Ie(new Promise(f=>f(u.leave())),Oe);try{u.setLocalAudio(!1),u.setLocalVideo(!1);}catch{}try{await u.destroy();}catch{}}},[]),{reportLeft:pe,leave:ye,leaving:Ue}=Dt(a,fe);useEffect(()=>{if(U===null||!ce)return;let u=false,f=U.createCallObject();I.current=f,Ut({flip:typeof f.cycleCamera=="function",speaker:typeof f.setNativeInCallAudioMode=="function"});let M=n(()=>{let _=Object.values(f.participants());Mt(_.find(me=>me.local)??null),Nt(_.find(me=>!me.local)??null);},"syncParticipants"),Ke=["participant-joined","participant-updated","participant-left"];for(let _ of Ke)f.on(_,M);let Je=n(()=>{u||Ue.current||(K("left"),pe());},"onLeftMeeting"),Ze=n(()=>{u||K("error");},"onError");return f.on("left-meeting",Je),f.on("error",Ze),f.join({url:t,token:r}).then(()=>{u||(K("joined"),Gt(Date.now()),M(),se.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{u||(K("error"),se.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{u=true;for(let _ of Ke)f.off(_,M);f.off("left-meeting",Je),f.off("error",Ze),fe();}},[U,ce,t,r,fe,pe,Ue]),useEffect(()=>{if(W===null)return;ze(Date.now()-W);let u=setInterval(()=>{ze(Date.now()-W);},1e3);return ()=>{clearInterval(u);}},[W]);let Ge=useCallback(()=>{let u=I.current;u&&_t(f=>(u.setLocalAudio(!f),!f));},[]),$e=useCallback(()=>{let u=I.current;u&&jt(f=>(u.setLocalVideo(!f),!f));},[]),Ye=useCallback(()=>{let u=I.current;u?.cycleCamera&&u.cycleCamera().then(f=>{let M=f?.device?.facingMode;M&&Wt(M==="user");},()=>{});},[]);if(D!==null)return q?jsx(Fragment,{children:q(D.reason,D.detail)}):null;if(U===null)return null;if(!ce)return jsxs(View,{style:[l.notice,{paddingTop:O.top+s.space.xl,paddingBottom:O.bottom+s.space.xl},v],testID:"everfur-vet-call-recording-notice",children:[jsx(h,{style:l.noticeTitle,accessibilityRole:"header",children:i.recordingNoticeTitle}),jsx(Pressable,{onPress:()=>At(true),accessibilityRole:"button",accessibilityLabel:i.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:l.noticeContinue,children:jsx(h,{tier:"control",style:l.noticeContinueLabel,children:i.recordingNoticeCta})}),jsx(Pressable,{onPress:pe,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-recording-leave",style:l.errorLeaveHit,children:jsx(h,{tier:"control",style:l.noticeLeave,children:i.leaveCta})})]});if(Bt==="error")return jsxs(View,{style:[l.centered,v],testID:"everfur-vet-call-error",children:[jsx(h,{style:l.status,accessibilityLiveRegion:"polite",children:i.joinFailedReason}),jsx(Pressable,{onPress:ye,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-error-leave",style:l.errorLeaveHit,children:jsx(h,{tier:"control",style:l.errorLeave,children:i.leaveCta})})]});if(J===null)return jsx(Fe,{clinicianName:o,petName:d,consultMinutes:C,micOn:B,cameraOn:w,onToggleMic:Ge,onToggleCamera:$e,...de.flip?{onSwitchCamera:Ye}:{},onLeave:ye,style:v});let qe=U.DailyMediaView,Z=o?.trim()??"",$t=He>=Ve(C)*6e4;return jsxs(View,{style:[l.root,v],testID:"everfur-vet-call",children:[jsxs(View,{style:l.fill,testID:"everfur-vet-call-remote",children:[jsx(qe,{videoTrack:Ne(J.videoTrack),audioTrack:Ne(J.audioTrack),mirror:false,objectFit:"cover",style:l.fill}),Hr(J)?null:jsxs(View,{style:l.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[jsx(zr,{styles:l}),Z.length>0?jsx(h,{style:l.remoteOffName,numberOfLines:1,children:Z}):null]})]}),jsxs(View,{style:[l.statusRow,{top:O.top+s.space.sm}],pointerEvents:"none",children:[Z.length>0?jsx(h,{tier:"compact",style:l.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:Z}):null,W!==null?jsx(h,{tier:"badge",style:[l.statusMeta,$t?l.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:nt(He)}):null]}),jsxs(View,{style:[l.selfView,{top:O.top+s.space.sm}],testID:"everfur-vet-call-self",children:[jsx(qe,{videoTrack:w?Ne(je?.videoTrack):null,audioTrack:null,mirror:zt,objectFit:"cover",style:l.fill}),je?.videoTrack&&w?null:jsx(View,{style:[l.selfViewOff,l.fill],testID:"everfur-vet-call-self-off",children:jsx(h,{tier:"badge",style:l.selfViewOffLabel,children:i.selfCameraOffLabel})})]}),jsxs(View,{style:[l.controlBar,{bottom:O.bottom+s.space.lg}],children:[de.speaker?jsx(j,{label:z?i.speakerOffCta:i.speakerOnCta,glyph:jsx(Ct,{color:z?s.color.text.onBrand:_e,off:!z}),muted:!z,onPress:Ht,testID:"everfur-vet-call-speaker",style:[l.control,z?null:l.controlMuted]}):null,jsx(j,{label:B?i.muteCta:i.unmuteCta,glyph:jsx(re,{color:B?s.color.text.onBrand:_e,off:!B}),muted:!B,onPress:Ge,testID:"everfur-vet-call-mic",style:[l.control,B?null:l.controlMuted]}),jsx(j,{label:w?i.cameraOffCta:i.cameraOnCta,glyph:jsx(ne,{color:w?s.color.text.onBrand:_e,off:!w}),muted:!w,onPress:$e,testID:"everfur-vet-call-camera",style:[l.control,w?null:l.controlMuted]}),de.flip&&w?jsx(j,{label:i.switchCameraCta,glyph:jsx(oe,{color:s.color.text.onBrand}),onPress:Ye,testID:"everfur-vet-call-switch-camera",style:l.control}):null,jsx(j,{label:i.leaveCta,glyph:jsx(Tt,{color:s.color.text.onBrand}),onPress:ye,testID:"everfur-vet-call-leave",style:[l.control,l.controlDanger]})]})]})}n(Ur,"VetCallRoom");var Me="#141414",Ot="#1B1B1B",Gr="rgba(20,20,20,0.62)",_e="#141414",It=104,Pt={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function $r(e){let{color:t,space:r,radius:a,type:o}=e;return StyleSheet.create({root:{flex:1,backgroundColor:Me},fill:{...ve},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:r.lg,padding:r.xl,backgroundColor:Me},statusRow:{position:"absolute",left:r.md,right:It+r.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body,...Pt},statusMeta:{...b(e,"mono"),color:t.text.onBrand,fontSize:o.size.caption,...Pt},statusMetaOver:{color:t.danger},selfView:{position:"absolute",right:r.md,width:It,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:Ot,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:r.xs,backgroundColor:Ot},remoteOff:{...ve,alignItems:"center",justifyContent:"center",gap:r.md,backgroundColor:Me},remoteOffAvatar:{width:96,height:96,borderRadius:a.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.subtitle,paddingHorizontal:r.xl},notice:{flex:1,justifyContent:"center",gap:r.lg,paddingHorizontal:r.xl,backgroundColor:t.surface},noticeTitle:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,borderRadius:a.pill,backgroundColor:t.primary},noticeContinueLabel:{...b(e,"medium"),color:t.onPrimary,fontSize:o.size.body},noticeLeave:{...b(e,"medium"),color:t.brand,fontSize:o.size.body},selfViewOffLabel:{...b(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:r.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:Gr},controlMuted:{backgroundColor:t.text.onBrand},controlDanger:{backgroundColor:t.danger},status:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.lg},errorLeave:{...b(e,"medium"),color:t.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n($r,"makeStyles");export{we as EVERFUR_DAILY_SETUP,Wr as EverfurVetCall,Fe as EverfurVetCallLobby,he as VET_CALL_CONSULT_MINUTES,i as VET_CALL_COPY,ht as isEverfurDailyModule,Qe as isSafeRoomUrl,ge as isUsableRoomCredential,Se as loadEverfurDaily,hr as registerEverfurDaily};
|
|
1
|
+
import {createContext,forwardRef,createElement,useMemo,useRef,useEffect,useState,useCallback,useContext}from'react';import {StyleSheet,TextInput,useWindowDimensions,View,Pressable,Text,Animated}from'react-native';import {useSafeAreaInsets}from'react-native-safe-area-context';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Yt=Object.defineProperty;var n=(e,t)=>Yt(e,"name",{value:t,configurable:true});var qt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function b(e,t){let r=e.type,a=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:a}:{fontFamily:a,fontWeight:r.weight[qt[t]]}}n(b,"face");var Xe=Object.freeze({track(){},trackExpectedFailure(){}});function Qe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Qe,"isSafeRoomUrl");function ge(e,t){return Qe(e)&&t.trim().length>0}n(ge,"isUsableRoomCredential");function et(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(et,"reportHostFailure");function Kt(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(Kt,"isThenable");function be(e,...t){if(typeof e=="function")try{let r=e(...t);return Kt(r)&&Promise.resolve(r).then(void 0,et),r}catch(r){et(r);return}}n(be,"callHost");var tt=new WeakMap;function Jt(e){if(typeof e!="function")return;let t=tt.get(e);if(t!==void 0)return t;let r=n((...a)=>{be(e,...a);},"guarded");return tt.set(e,r),r}n(Jt,"guardHost");function rt(e,t){let r=null;for(let a of t){let o=e[a];typeof o=="function"&&(r??={...e},r[a]=Jt(o));}return r??e}n(rt,"guardHostProps");var he=10,i=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",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 t=e?.trim()??"";return t.length>0?`${t} is joining`:i.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let t=e?.trim()??"";return t.length>0?`Have ${t} nearby and somewhere well lit.`:i.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} MINUTE VISIT`,"lobbyDuration"),joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function nt(e){let t=Math.max(0,Math.floor(e/1e3)),r=String(t%60).padStart(2,"0"),a=Math.floor(t%3600/60),o=Math.floor(t/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}n(nt,"formatElapsed");var ve=Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function xe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))xe(e[t]);}return e}n(xe,"deepFreeze");var Zt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),at={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},lt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ot={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},Xt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Qt={regular:"400",medium:"500",bold:"700"},er={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tr=0,X="System",Q="monospace",rr=["content","heading","control","compact","badge"];function nr(e){let t={};for(let r of rr)t[r]=e;return t}n(nr,"authoredTierSizes");function it(){return {family:X,mono:Q,fontUrl:null,families:{regular:X,medium:X,bold:X,mono:Q,monoMedium:Q,monoBold:Q},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ot,tierSizes:nr(ot),lineHeight:Xt,weight:Qt,letterSpacing:er,scale:1,maxScale:tr,scaleCaps:Zt}}n(it,"baseType");var st={},Ce=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function Te(e){return `cubic-bezier(${e.join(", ")})`}n(Te,"cssCubicBezier");var ct={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:Te(Ce.standard),emphasized:Te(Ce.emphasized),exit:Te(Ce.exit)},reducedMotion:false},or={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",bubbleVet:"#FFC3BC",onBubbleVet:"#111111",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},dt=xe({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:or,space:at,radius:lt,type:it(),motion:ct,slots:st}),ar={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",bubbleVet:"#FFC3BC",onBubbleVet:"#111111",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};xe({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ar,space:at,radius:lt,type:it(),motion:ct,slots:st});var ut=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ft=globalThis,Ee=ft[ut]??(ft[ut]=createContext(dt));Ee.displayName??="EverfurThemeContext";function P(){return useContext(Ee)}n(P,"useEverfurTheme");function ur(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n(ur,"tierMultiplier");function h({tier:e="content",...t}){let{type:r}=P(),a=ur(r,e);return createElement(Text,a===void 0?t:{maxFontSizeMultiplier:a,...t})}n(h,"Text");forwardRef(n(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function yt(e,t,r){let a;try{a=t();}catch(d){return ke(`optional peer '${e}' is not installed: ${pr(d)}`)}let o=fr(a);return o==null?ke(`optional peer '${e}' resolved to no module`):r&&!r(o)?ke(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(yt,"optionalModule");function fr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(fr,"unwrapDefault");function ke(e){return Object.freeze({available:false,module:null,reason:e})}n(ke,"frozenUnavailable");function pr(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(pr,"describe");var mt=Symbol.for("@everfur/sdk/televet");function yr(){let e=globalThis,t=e[mt];if(t!==void 0)return t;let r={presenter:null,snapshot:Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:new Set,dailyRegistered:false};return e[mt]=r,r}n(yr,"televetGlobal");function gt(e){yr().dailyRegistered=e;}n(gt,"markEverfurDailyRegistered");var we=`[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 the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,Re="@daily-co/react-native-daily-js",mr=`optional peer '${Re}' has no registered loader`,bt=`optional peer '${Re}' is present but failed its shape check`;function te(e){return typeof e=="object"&&e!==null}n(te,"isRecordLike");function gr(e){return te(e)&&"box"in e}n(gr,"isDailyBox");function br(e){let t=e.default,r=te(t)||typeof t=="function"?t:{},a=typeof e.createCallObject=="function"?e:r,o=a.createCallObject,d={createCallObject:typeof o=="function"?o.bind(a):o,DailyMediaView:e.DailyMediaView??r.DailyMediaView};return ht(d)?d:null}n(br,"normalizeDailyModule");function ht(e){if(!te(e)||typeof e.createCallObject!="function")return false;let t=e.DailyMediaView;return typeof t=="function"||typeof t=="object"&&t!==null}n(ht,"isEverfurDailyModule");var vt=null,x=null;function ee(e){return Object.freeze({available:false,module:null,reason:e})}n(ee,"unavailable");function hr(e){vt=e,x=null,gt(e!==null);}n(hr,"registerEverfurDaily");function Se(){if(x!==null)return x;let e=vt;if(e===null)return x=ee(mr),x;let t=yt(Re,()=>({box:e()}),gr);if(!t.available)return x=ee(t.reason),x;let r=t.module.box;if(!te(r))return x=ee(bt),x;let a=br(r);return x=a===null?ee(bt):Object.freeze({available:true,module:a}),x}n(Se,"loadEverfurDaily");function j({label:e,glyph:t,onPress:r,testID:a,muted:o=false,style:d}){return jsx(Pressable,{onPress:r,testID:a,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:o},style:d,children:t})}n(j,"CallControl");function G({children:e,testID:t}){return jsx(View,{style:y.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:t,children:e})}n(G,"GlyphBox");function Le({color:e}){return jsx(View,{style:[y.slash,{backgroundColor:e}]})}n(Le,"Slash");function re({color:e,off:t=false}){return jsxs(G,{testID:t?"glyph-mic-off":"glyph-mic",children:[jsxs(View,{style:y.column,children:[jsx(View,{style:[y.micCapsule,{borderColor:e}]}),jsx(View,{style:[y.micCradle,{borderColor:e}]}),jsx(View,{style:[y.micStem,{backgroundColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(re,"MicGlyph");function ne({color:e,off:t=false}){return jsxs(G,{testID:t?"glyph-camera-off":"glyph-camera",children:[jsxs(View,{style:y.row,children:[jsx(View,{style:[y.cameraBody,{borderColor:e}]}),jsx(View,{style:[y.cameraLens,{borderRightColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(ne,"CameraGlyph");function Ct({color:e,off:t=false}){return jsxs(G,{testID:t?"glyph-speaker-off":"glyph-speaker",children:[jsxs(View,{style:y.row,children:[jsx(View,{style:[y.speakerBox,{backgroundColor:e}]}),jsx(View,{style:[y.speakerCone,{borderRightColor:e}]}),t?null:jsx(View,{style:[y.speakerWave,{borderColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(Ct,"SpeakerGlyph");function oe({color:e}){return jsx(G,{testID:"glyph-switch-camera",children:jsxs(View,{style:[y.switchBody,{borderColor:e}],children:[jsx(View,{style:[y.switchTurn,{borderColor:e,borderTopColor:"transparent"}]}),jsx(View,{style:[y.switchHead,{borderBottomColor:e}]})]})})}n(oe,"SwitchCameraGlyph");function Tt({color:e}){return jsx(G,{testID:"glyph-leave",children:jsxs(View,{style:y.column,children:[jsx(View,{style:[y.receiver,{borderColor:e}]}),jsxs(View,{style:y.receiverPads,children:[jsx(View,{style:[y.receiverPad,{backgroundColor:e}]}),jsx(View,{style:[y.receiverPad,{backgroundColor:e}]})]})]})})}n(Tt,"LeaveGlyph");var y=StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var S=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)"}),xt=3,Et=180,kt=420,wt=.35,Sr=.6,Lr=360,Vr=132,Dr=184,Fr=44;function De(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:10}n(De,"soldMinutes");function Or({reducedMotion:e,styles:t}){let r=useRef(Array.from({length:xt},()=>new Animated.Value(wt))).current;return useEffect(()=>{if(e)return;let a=r.map((o,d)=>Animated.loop(Animated.sequence([Animated.delay(d*Et),Animated.timing(o,{toValue:1,duration:kt,useNativeDriver:true}),Animated.timing(o,{toValue:wt,duration:kt,useNativeDriver:true}),Animated.delay((xt-d-1)*Et)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,r]),jsx(View,{style:t.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.map((a,o)=>jsx(Animated.View,{style:[t.dot,{opacity:e?Sr:a}]},o))})}n(Or,"WaitingDots");function Ve({label:e,glyph:t,active:r,onPress:a,testID:o,styles:d}){return jsx(Pressable,{onPress:a,testID:o,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[d.control,r?null:d.controlOff],children:t})}n(Ve,"LobbyControl");function Fe(e){let{clinicianName:t,petName:r,consultMinutes:a,micOn:o,cameraOn:d,onToggleMic:C,onToggleCamera:F,onSwitchCamera:$,onLeave:Y,style:q}=e,v=P(),s=useMemo(()=>Ir(v),[v]),l=useSafeAreaInsets(),{width:O}=useWindowDimensions(),B=O<Lr?Vr:Dr;return jsxs(View,{style:[s.root,{paddingTop:l.top+v.space.sm,paddingBottom:l.bottom+v.space.lg},q],testID:"everfur-vet-lobby",children:[jsx(View,{style:s.topRow,children:jsx(Pressable,{onPress:Y,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:s.leaveHit,children:jsx(h,{tier:"control",style:s.leaveLabel,children:i.leaveCta})})}),jsxs(View,{style:s.center,children:[jsxs(View,{style:[s.avatar,{width:B,height:B,borderRadius:B/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsx(View,{style:s.avatarGlyphHead}),jsx(View,{style:s.avatarGlyphBody})]}),jsxs(View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsx(h,{tier:"heading",style:s.title,testID:"everfur-vet-lobby-title",children:i.lobbyTitle(t)}),jsx(h,{style:s.subtitle,testID:"everfur-vet-lobby-subtitle",children:i.lobbySubtitle})]}),jsx(Or,{reducedMotion:v.motion.reducedMotion,styles:s})]}),jsxs(View,{style:s.prepCard,testID:"everfur-vet-lobby-prep",children:[jsx(h,{tier:"badge",style:s.prepLabel,children:i.lobbyPrepLabel}),jsx(h,{style:s.prepBody,children:i.lobbyPrep(r)})]}),jsxs(View,{style:s.controls,children:[jsx(Ve,{label:o?i.muteCta:i.unmuteCta,glyph:jsx(re,{color:v.color.text.onBrand,off:!o}),active:o,onPress:C,testID:"everfur-vet-lobby-mic",styles:s}),jsx(Ve,{label:d?i.cameraOffCta:i.cameraOnCta,glyph:jsx(ne,{color:v.color.text.onBrand,off:!d}),active:d,onPress:F,testID:"everfur-vet-lobby-camera",styles:s}),d&&$?jsx(Ve,{label:i.switchCameraCta,glyph:jsx(oe,{color:v.color.text.onBrand}),active:true,onPress:$,testID:"everfur-vet-lobby-switch-camera",styles:s}):null]}),jsx(h,{tier:"badge",style:s.duration,testID:"everfur-vet-lobby-duration",children:i.lobbyDuration(De(a))})]})}n(Fe,"EverfurVetCallLobby");function Ir(e){let{color:t,space:r,radius:a,type:o}=e;return StyleSheet.create({root:{flex:1,backgroundColor:t.brand,paddingHorizontal:r.lg},topRow:{flexDirection:"row",alignItems:"center"},leaveHit:{minHeight:Fr,justifyContent:"center",paddingVertical:r.xs,paddingRight:r.md},leaveLabel:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:t.success,backgroundColor:S.surface,marginBottom:r.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:S.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:S.glyph},title:{...b(e,"bold"),color:t.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:r.sm},subtitle:{...b(e,"regular"),color:S.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:r.xs},dotRow:{flexDirection:"row",gap:r.xs,marginTop:r.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:S.hairline,backgroundColor:S.surface,padding:r.lg,marginBottom:r.lg},prepLabel:{...b(e,"medium"),color:t.accent,fontSize:o.size.micro,letterSpacing:1.2,marginBottom:r.sm},prepBody:{...b(e,"regular"),color:t.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:r.lg,marginBottom:r.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:S.surfaceRaised},controlOff:{backgroundColor:S.surfaceActive},duration:{...b(e,"medium"),color:S.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Ir,"makeStyles");var Oe=5e3;function Ie(e,t){return new Promise(r=>{let a=setTimeout(r,t);e.catch(()=>{}).then(()=>{clearTimeout(a),r();});})}n(Ie,"settleWithin");function Vt(e,t){let r=useRef(e);useEffect(()=>{r.current=e;});let a=useRef(false);useEffect(()=>(a.current=true,()=>{a.current=false;}),[]);let o=useRef(false),d=useCallback(()=>{o.current||!a.current||(o.current=true,r.current());},[]),C=useRef(false),F=useCallback(()=>{C.current||(C.current=true,Ie(t(),Oe).then(d));},[t,d]);return {reportLeft:d,leave:F,leaving:C}}n(Vt,"useLeaveOnce");var Pr=Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function Br(){let e=globalThis;return e[Pr]??=new Map}n(Br,"receipts");function Dt(e){return (Br().get(e)??0)>0}n(Dt,"hasRecordingNoticeAccepted");function Ft(e){let[t,r]=useState(true),a=useRef(true),o=useCallback(()=>{let d=e.current;if(!d?.setNativeInCallAudioMode)return;let C=!a.current;a.current=C,r(C),d.setNativeInCallAudioMode(C?"video":"voice");},[e]);return {speakerOn:t,toggleSpeaker:o}}n(Ft,"useSpeakerRoute");function Ne(e){return e??null}n(Ne,"asTrack");function Hr(e){return !!e?.videoTrack}n(Hr,"hasVideo");function zr({styles:e}){return jsxs(View,{style:e.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsx(View,{style:e.remoteOffHead}),jsx(View,{style:e.remoteOffBody})]})}n(zr,"PersonMark");function Wr(e){return jsx(Ur,{...e},e.roomUrl)}n(Wr,"EverfurVetCall");function Ur(e){let{roomUrl:t,token:r,onLeave:a,clinicianName:o,petName:d,consultMinutes:C,daily:F,telemetry:$,onUnavailable:Y,renderUnavailable:q,style:v}=rt(e,["onLeave"]),s=P(),l=useMemo(()=>$r(s),[s]),O=useSafeAreaInsets(),B=$??Xe,se=useRef(B);useEffect(()=>{se.current=B;});let I=useRef(null),[ce,Bt]=useState(()=>Dt(t)),[At,K]=useState("joining"),[J,Nt]=useState(null),[je,Mt]=useState(null),[A,_t]=useState(true),[w,jt]=useState(true),{speakerOn:z,toggleSpeaker:Ht}=Ft(I),[zt,Wt]=useState(true),[de,Ut]=useState({flip:false,speaker:false}),[W,Gt]=useState(null),[He,ze]=useState(0),We=ge(t,r),N=useMemo(()=>We?F?{available:true,module:F,reason:""}:Se():null,[We,F]),U=N?.available?N.module:null,V=useMemo(()=>N===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:N.available?null:{reason:"dailyMissing",detail:`${we} (${N.reason})`},[N]),ue=useRef(false);useEffect(()=>{if(V===null){ue.current=false;return}if(be(Y,V.reason,V.detail),!ue.current){ue.current=true;try{globalThis.console?.warn?.(V.detail);}catch{}}},[V,Y]);let fe=useCallback(async()=>{let u=I.current;if(I.current=null,!!u){await Ie(new Promise(f=>f(u.leave())),Oe);try{u.setLocalAudio(!1),u.setLocalVideo(!1);}catch{}try{await u.destroy();}catch{}}},[]),{reportLeft:pe,leave:ye,leaving:Ue}=Vt(a,fe);useEffect(()=>{if(U===null||!ce)return;let u=false,f=U.createCallObject();I.current=f,Ut({flip:typeof f.cycleCamera=="function",speaker:typeof f.setNativeInCallAudioMode=="function"});let M=n(()=>{let _=Object.values(f.participants());Mt(_.find(me=>me.local)??null),Nt(_.find(me=>!me.local)??null);},"syncParticipants"),Ke=["participant-joined","participant-updated","participant-left"];for(let _ of Ke)f.on(_,M);let Je=n(()=>{u||Ue.current||(K("left"),pe());},"onLeftMeeting"),Ze=n(()=>{u||K("error");},"onError");return f.on("left-meeting",Je),f.on("error",Ze),f.join({url:t,token:r}).then(()=>{u||(K("joined"),Gt(Date.now()),M(),se.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{u||(K("error"),se.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{u=true;for(let _ of Ke)f.off(_,M);f.off("left-meeting",Je),f.off("error",Ze),fe();}},[U,ce,t,r,fe,pe,Ue]),useEffect(()=>{if(W===null)return;ze(Date.now()-W);let u=setInterval(()=>{ze(Date.now()-W);},1e3);return ()=>{clearInterval(u);}},[W]);let Ge=useCallback(()=>{let u=I.current;u&&_t(f=>(u.setLocalAudio(!f),!f));},[]),$e=useCallback(()=>{let u=I.current;u&&jt(f=>(u.setLocalVideo(!f),!f));},[]),Ye=useCallback(()=>{let u=I.current;u?.cycleCamera&&u.cycleCamera().then(f=>{let M=f?.device?.facingMode;M&&Wt(M==="user");},()=>{});},[]);if(V!==null)return q?jsx(Fragment,{children:q(V.reason,V.detail)}):null;if(U===null)return null;if(!ce)return jsxs(View,{style:[l.notice,{paddingTop:O.top+s.space.xl,paddingBottom:O.bottom+s.space.xl},v],testID:"everfur-vet-call-recording-notice",children:[jsx(h,{style:l.noticeTitle,accessibilityRole:"header",children:i.recordingNoticeTitle}),jsx(Pressable,{onPress:()=>Bt(true),accessibilityRole:"button",accessibilityLabel:i.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:l.noticeContinue,children:jsx(h,{tier:"control",style:l.noticeContinueLabel,children:i.recordingNoticeCta})}),jsx(Pressable,{onPress:pe,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-recording-leave",style:l.errorLeaveHit,children:jsx(h,{tier:"control",style:l.noticeLeave,children:i.leaveCta})})]});if(At==="error")return jsxs(View,{style:[l.centered,v],testID:"everfur-vet-call-error",children:[jsx(h,{style:l.status,accessibilityLiveRegion:"polite",children:i.joinFailedReason}),jsx(Pressable,{onPress:ye,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-error-leave",style:l.errorLeaveHit,children:jsx(h,{tier:"control",style:l.errorLeave,children:i.leaveCta})})]});if(J===null)return jsx(Fe,{clinicianName:o,petName:d,consultMinutes:C,micOn:A,cameraOn:w,onToggleMic:Ge,onToggleCamera:$e,...de.flip?{onSwitchCamera:Ye}:{},onLeave:ye,style:v});let qe=U.DailyMediaView,Z=o?.trim()??"",$t=He>=De(C)*6e4;return jsxs(View,{style:[l.root,v],testID:"everfur-vet-call",children:[jsxs(View,{style:l.fill,testID:"everfur-vet-call-remote",children:[jsx(qe,{videoTrack:Ne(J.videoTrack),audioTrack:Ne(J.audioTrack),mirror:false,objectFit:"cover",style:l.fill}),Hr(J)?null:jsxs(View,{style:l.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[jsx(zr,{styles:l}),Z.length>0?jsx(h,{style:l.remoteOffName,numberOfLines:1,children:Z}):null]})]}),jsxs(View,{style:[l.statusRow,{top:O.top+s.space.sm}],pointerEvents:"none",children:[Z.length>0?jsx(h,{tier:"compact",style:l.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:Z}):null,W!==null?jsx(h,{tier:"badge",style:[l.statusMeta,$t?l.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:nt(He)}):null]}),jsxs(View,{style:[l.selfView,{top:O.top+s.space.sm}],testID:"everfur-vet-call-self",children:[jsx(qe,{videoTrack:w?Ne(je?.videoTrack):null,audioTrack:null,mirror:zt,objectFit:"cover",style:l.fill}),je?.videoTrack&&w?null:jsx(View,{style:[l.selfViewOff,l.fill],testID:"everfur-vet-call-self-off",children:jsx(h,{tier:"badge",style:l.selfViewOffLabel,children:i.selfCameraOffLabel})})]}),jsxs(View,{style:[l.controlBar,{bottom:O.bottom+s.space.lg}],children:[de.speaker?jsx(j,{label:z?i.speakerOffCta:i.speakerOnCta,glyph:jsx(Ct,{color:z?s.color.text.onBrand:_e,off:!z}),muted:!z,onPress:Ht,testID:"everfur-vet-call-speaker",style:[l.control,z?null:l.controlMuted]}):null,jsx(j,{label:A?i.muteCta:i.unmuteCta,glyph:jsx(re,{color:A?s.color.text.onBrand:_e,off:!A}),muted:!A,onPress:Ge,testID:"everfur-vet-call-mic",style:[l.control,A?null:l.controlMuted]}),jsx(j,{label:w?i.cameraOffCta:i.cameraOnCta,glyph:jsx(ne,{color:w?s.color.text.onBrand:_e,off:!w}),muted:!w,onPress:$e,testID:"everfur-vet-call-camera",style:[l.control,w?null:l.controlMuted]}),de.flip&&w?jsx(j,{label:i.switchCameraCta,glyph:jsx(oe,{color:s.color.text.onBrand}),onPress:Ye,testID:"everfur-vet-call-switch-camera",style:l.control}):null,jsx(j,{label:i.leaveCta,glyph:jsx(Tt,{color:s.color.text.onBrand}),onPress:ye,testID:"everfur-vet-call-leave",style:[l.control,l.controlDanger]})]})]})}n(Ur,"VetCallRoom");var Me="#141414",Ot="#1B1B1B",Gr="rgba(20,20,20,0.62)",_e="#141414",It=104,Pt={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function $r(e){let{color:t,space:r,radius:a,type:o}=e;return StyleSheet.create({root:{flex:1,backgroundColor:Me},fill:{...ve},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:r.lg,padding:r.xl,backgroundColor:Me},statusRow:{position:"absolute",left:r.md,right:It+r.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.body,...Pt},statusMeta:{...b(e,"mono"),color:t.text.onBrand,fontSize:o.size.caption,...Pt},statusMetaOver:{color:t.danger},selfView:{position:"absolute",right:r.md,width:It,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:Ot,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:r.xs,backgroundColor:Ot},remoteOff:{...ve,alignItems:"center",justifyContent:"center",gap:r.md,backgroundColor:Me},remoteOffAvatar:{width:96,height:96,borderRadius:a.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...b(e,"medium"),color:t.text.onBrand,fontSize:o.size.subtitle,paddingHorizontal:r.xl},notice:{flex:1,justifyContent:"center",gap:r.lg,paddingHorizontal:r.xl,backgroundColor:t.surface},noticeTitle:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,borderRadius:a.pill,backgroundColor:t.primary},noticeContinueLabel:{...b(e,"medium"),color:t.onPrimary,fontSize:o.size.body},noticeLeave:{...b(e,"medium"),color:t.brand,fontSize:o.size.body},selfViewOffLabel:{...b(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:r.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:Gr},controlMuted:{backgroundColor:t.text.onBrand},controlDanger:{backgroundColor:t.danger},status:{...b(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.lg},errorLeave:{...b(e,"medium"),color:t.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n($r,"makeStyles");export{we as EVERFUR_DAILY_SETUP,Wr as EverfurVetCall,Fe as EverfurVetCallLobby,he as VET_CALL_CONSULT_MINUTES,i as VET_CALL_COPY,ht as isEverfurDailyModule,Qe as isSafeRoomUrl,ge as isUsableRoomCredential,Se as loadEverfurDaily,hr as registerEverfurDaily};
|