@everfur/sdk 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +1 -1
  3. package/dist/{Chat-DbHkTbqz.d.cts → Chat-Bkv-MLLu.d.cts} +3 -3
  4. package/dist/{Chat-BoVmqEeF.d.ts → Chat-Dy1L27a8.d.ts} +3 -3
  5. package/dist/{DepthViews-yO1H371y.d.ts → DepthViews-BwyzpEyX.d.ts} +1 -1
  6. package/dist/{DepthViews-DK7EJ6Hp.d.cts → DepthViews-CBalhef3.d.cts} +1 -1
  7. package/dist/{DepthViews-BzwflaJ3.d.ts → DepthViews-De6yb5Tq.d.ts} +1 -1
  8. package/dist/{DepthViews-Chyp69Ue.d.cts → DepthViews-eRdy2ayE.d.cts} +1 -1
  9. package/dist/animations/index.d.cts +3 -3
  10. package/dist/animations/index.d.ts +3 -3
  11. package/dist/{attachments-BmMrn9tU.d.ts → attachments-BAcQdIz7.d.ts} +5 -5
  12. package/dist/{attachments-Dcb19rMP.d.ts → attachments-Brt7ivEo.d.ts} +2 -2
  13. package/dist/{attachments-B7TrtyfH.d.cts → attachments-DhGAelCA.d.cts} +2 -2
  14. package/dist/{attachments-Dnpqk1Gl.d.cts → attachments-tPWJ0DJI.d.cts} +5 -5
  15. package/dist/{bookingCopy-DR0-SmqH.d.ts → bookingCopy-CJLAgEgK.d.ts} +2 -2
  16. package/dist/{bookingCopy-C153FHEC.d.cts → bookingCopy-Ds2JGcPE.d.cts} +2 -2
  17. package/dist/{callCopy-DHjem0R-.d.cts → callCopy-Bw6oZT54.d.cts} +7 -2
  18. package/dist/{callCopy-DHjem0R-.d.ts → callCopy-Bw6oZT54.d.ts} +7 -2
  19. package/dist/{casesRepository-DC9lEQez.d.cts → casesRepository-D0aQSXkb.d.cts} +1 -1
  20. package/dist/{casesRepository-BXdwCWQF.d.ts → casesRepository-DjhMfm_n.d.ts} +1 -1
  21. package/dist/chat/index.cjs +9 -8
  22. package/dist/chat/index.d.cts +9 -9
  23. package/dist/chat/index.d.ts +9 -9
  24. package/dist/chat/index.js +9 -8
  25. package/dist/client/index.cjs +1 -1
  26. package/dist/client/index.d.cts +6 -6
  27. package/dist/client/index.d.ts +6 -6
  28. package/dist/client/index.js +1 -1
  29. package/dist/{config-BRyNmzhx.d.cts → config-C68HTCf4.d.cts} +1 -1
  30. package/dist/{config-DdK2czhD.d.ts → config-DeUmccwl.d.ts} +1 -1
  31. package/dist/consent/index.d.cts +5 -5
  32. package/dist/consent/index.d.ts +5 -5
  33. package/dist/{context-jaONuHXM.d.cts → context-DY9pcjdK.d.cts} +5 -5
  34. package/dist/{context-_EyjBNKI.d.ts → context-D_2sCvoo.d.ts} +5 -5
  35. package/dist/{copy-D8iSBQE6.d.cts → copy-tYW0C83H.d.cts} +2 -2
  36. package/dist/{copy-BJpRsqK-.d.ts → copy-wAnv8ldC.d.ts} +2 -2
  37. package/dist/core/index.cjs +1 -1
  38. package/dist/core/index.d.cts +12 -12
  39. package/dist/core/index.d.ts +12 -12
  40. package/dist/core/index.js +1 -1
  41. package/dist/{depth-bKpg3L9r.d.ts → depth-C7RIscDR.d.ts} +2 -2
  42. package/dist/{depth-DJ1KGMww.d.cts → depth-jbSWsweM.d.cts} +2 -2
  43. package/dist/{entitlementRepository-4x_tBE73.d.cts → entitlementRepository-Ccc6K6wB.d.cts} +2 -2
  44. package/dist/{entitlementRepository-CojBLazH.d.ts → entitlementRepository-D7Fc7OdG.d.ts} +2 -2
  45. package/dist/{identity-A8fVB518.d.ts → identity-BTT6YtH5.d.ts} +1 -1
  46. package/dist/{identity-CmxZ4GR0.d.cts → identity-ScajqjK5.d.cts} +1 -1
  47. package/dist/index.cjs +10 -9
  48. package/dist/index.d.cts +12 -12
  49. package/dist/index.d.ts +12 -12
  50. package/dist/index.js +10 -9
  51. package/dist/notifications/index.d.cts +2 -2
  52. package/dist/notifications/index.d.ts +2 -2
  53. package/dist/{pets-e5RjSP6O.d.ts → pets-CqeoV1Jv.d.ts} +1 -1
  54. package/dist/{pets-DjBlY7yg.d.cts → pets-uKMldfz0.d.cts} +1 -1
  55. package/dist/{petsRepository-DkQ2fwZY.d.cts → petsRepository-BYe7_MUo.d.cts} +1 -1
  56. package/dist/{petsRepository-CQh8paML.d.ts → petsRepository-BdfbY9Oe.d.ts} +1 -1
  57. package/dist/{ports-CzVBbI_A.d.ts → ports-D4FQKTBS.d.ts} +4 -4
  58. package/dist/{ports-2voZkqty.d.cts → ports-okLpXkpu.d.cts} +4 -4
  59. package/dist/records/depth/index.cjs +6 -4
  60. package/dist/records/depth/index.d.cts +7 -7
  61. package/dist/records/depth/index.d.ts +7 -7
  62. package/dist/records/depth/index.js +6 -4
  63. package/dist/records/index.cjs +19 -17
  64. package/dist/records/index.d.cts +9 -9
  65. package/dist/records/index.d.ts +9 -9
  66. package/dist/records/index.js +19 -17
  67. package/dist/{requestFunnel-CQ42Kf9G.d.ts → requestFunnel-Dhaj0yUq.d.ts} +2 -2
  68. package/dist/{requestFunnel-CA0ANsWj.d.cts → requestFunnel-u8qnM5Ll.d.cts} +2 -2
  69. package/dist/{runtimeTypes-C0tI7s-V.d.ts → runtimeTypes-BFes64Vp.d.ts} +4 -4
  70. package/dist/{runtimeTypes-BxtQXaYi.d.cts → runtimeTypes-C67itXfp.d.cts} +4 -4
  71. package/dist/server/events/index.cjs +1 -1
  72. package/dist/server/events/index.d.cts +2 -2
  73. package/dist/server/events/index.d.ts +2 -2
  74. package/dist/server/events/index.js +1 -1
  75. package/dist/server/index.cjs +1 -1
  76. package/dist/server/index.d.cts +3 -3
  77. package/dist/server/index.d.ts +3 -3
  78. package/dist/server/index.js +1 -1
  79. package/dist/televet/booking/index.cjs +1 -1
  80. package/dist/televet/booking/index.d.cts +6 -6
  81. package/dist/televet/booking/index.d.ts +6 -6
  82. package/dist/televet/booking/index.js +1 -1
  83. package/dist/televet/call/index.cjs +3 -5
  84. package/dist/televet/call/index.d.cts +1 -1
  85. package/dist/televet/call/index.d.ts +1 -1
  86. package/dist/televet/call/index.js +3 -5
  87. package/dist/testing/index.d.cts +1 -1
  88. package/dist/testing/index.d.ts +1 -1
  89. package/dist/testing/rn/index.d.cts +7 -7
  90. package/dist/testing/rn/index.d.ts +7 -7
  91. package/dist/testing/web/index.d.cts +7 -7
  92. package/dist/testing/web/index.d.ts +7 -7
  93. package/dist/{timelineRows-WFv_3EOi.d.cts → timelineRows-CDSO3ElK.d.cts} +1 -1
  94. package/dist/{timelineRows-GSpzKLla.d.ts → timelineRows-pd4wYVbe.d.ts} +1 -1
  95. package/dist/{useRecordsDepth-BQF0Zynl.d.ts → useRecordsDepth-CqSMkcyR.d.ts} +1 -1
  96. package/dist/{useRecordsDepth-BL5Pf3oK.d.cts → useRecordsDepth-W3UAKQRN.d.cts} +1 -1
  97. package/dist/{view-rgB1iqWO.d.ts → view-CKfIaJYp.d.ts} +8 -2
  98. package/dist/{view-D3kOelPL.d.cts → view-h7RPJAEe.d.cts} +8 -2
  99. package/dist/web/consent/index.d.cts +5 -5
  100. package/dist/web/consent/index.d.ts +5 -5
  101. package/dist/web/index.cjs +7 -5
  102. package/dist/web/index.d.cts +14 -14
  103. package/dist/web/index.d.ts +14 -14
  104. package/dist/web/index.js +7 -5
  105. package/dist/web/notifications/index.d.cts +3 -3
  106. package/dist/web/notifications/index.d.ts +3 -3
  107. package/dist/web/records/depth/index.cjs +5 -4
  108. package/dist/web/records/depth/index.d.cts +7 -7
  109. package/dist/web/records/depth/index.d.ts +7 -7
  110. package/dist/web/records/depth/index.js +6 -5
  111. package/dist/web/records/index.cjs +10 -9
  112. package/dist/web/records/index.d.cts +9 -9
  113. package/dist/web/records/index.d.ts +9 -9
  114. package/dist/web/records/index.js +10 -9
  115. package/dist/web/televet/booking/index.cjs +1 -1
  116. package/dist/web/televet/booking/index.d.cts +6 -6
  117. package/dist/web/televet/booking/index.d.ts +6 -6
  118. package/dist/web/televet/booking/index.js +1 -1
  119. package/dist/web/televet/call/index.cjs +3 -5
  120. package/dist/web/televet/call/index.d.cts +1 -1
  121. package/dist/web/televet/call/index.d.ts +1 -1
  122. package/dist/web/televet/call/index.js +3 -5
  123. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { b as EverfurErrorCode } from './EverfurError-DeBqRpQV.js';
2
2
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-C3nNSS_j.js';
3
3
  import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
4
- import { d as EverfurRequest, F as Frame } from './config-DdK2czhD.js';
5
- import { A as AuthContext } from './identity-A8fVB518.js';
4
+ import { d as EverfurRequest, F as Frame } from './config-DeUmccwl.js';
5
+ import { A as AuthContext } from './identity-BTT6YtH5.js';
6
6
 
7
7
  /** Why the funnel stopped, or kept going. Every settle and every retry names one. */
8
8
  type FunnelRetryReason = 'ok' | 'aborted' | 'terminal-code' | 'attempts-exhausted' | 'daily-quota-exhausted' | 'burst-throttle' | 'retryable-code' | 'server-reset-beyond-budget';
@@ -1,8 +1,8 @@
1
1
  import { b as EverfurErrorCode } from './EverfurError-DeBqRpQV.cjs';
2
2
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-10s3HJCt.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
4
- import { d as EverfurRequest, F as Frame } from './config-BRyNmzhx.cjs';
5
- import { A as AuthContext } from './identity-CmxZ4GR0.cjs';
4
+ import { d as EverfurRequest, F as Frame } from './config-C68HTCf4.cjs';
5
+ import { A as AuthContext } from './identity-ScajqjK5.cjs';
6
6
 
7
7
  /** Why the funnel stopped, or kept going. Every settle and every retry names one. */
8
8
  type FunnelRetryReason = 'ok' | 'aborted' | 'terminal-code' | 'attempts-exhausted' | 'daily-quota-exhausted' | 'burst-throttle' | 'retryable-code' | 'server-reset-beyond-budget';
@@ -1,13 +1,13 @@
1
1
  import { E as EntitlementDecision, C as CapabilityName } from './resolve-D4Ywz5OS.js';
2
- import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository-CQh8paML.js';
2
+ import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository-BdfbY9Oe.js';
3
3
  import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
4
4
  import { E as EverfurThemeInput, C as ClientBranding } from './branding-DJf4h12Q.js';
5
- import { A as AuthContext, T as TokenProvider } from './identity-A8fVB518.js';
5
+ import { A as AuthContext, T as TokenProvider } from './identity-BTT6YtH5.js';
6
6
  import { U as UserRef, P as PetRef, C as ConversationId } from './ids-B2GAAifq.js';
7
- import { T as TransportPort } from './config-DdK2czhD.js';
7
+ import { T as TransportPort } from './config-DeUmccwl.js';
8
8
  import { I as ImageCachePort, K as KvPort } from './cacheEpoch-DknKn3S0.js';
9
9
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-C3nNSS_j.js';
10
- import { U as UploadPort, n as ChatController } from './ports-CzVBbI_A.js';
10
+ import { U as UploadPort, n as ChatController } from './ports-D4FQKTBS.js';
11
11
  import { C as CameraPort } from './CameraPort-Cv31Pz7g.js';
12
12
  import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
13
13
  import { U as UploadTransport } from './ports-BN6RHF9W.js';
@@ -1,13 +1,13 @@
1
1
  import { E as EntitlementDecision, C as CapabilityName } from './resolve-D4Ywz5OS.cjs';
2
- import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository-DkQ2fwZY.cjs';
2
+ import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository-BYe7_MUo.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
4
4
  import { E as EverfurThemeInput, C as ClientBranding } from './branding-BCfwLj0h.cjs';
5
- import { A as AuthContext, T as TokenProvider } from './identity-CmxZ4GR0.cjs';
5
+ import { A as AuthContext, T as TokenProvider } from './identity-ScajqjK5.cjs';
6
6
  import { U as UserRef, P as PetRef, C as ConversationId } from './ids-B2GAAifq.cjs';
7
- import { T as TransportPort } from './config-BRyNmzhx.cjs';
7
+ import { T as TransportPort } from './config-C68HTCf4.cjs';
8
8
  import { I as ImageCachePort, K as KvPort } from './cacheEpoch-DknKn3S0.cjs';
9
9
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-10s3HJCt.cjs';
10
- import { U as UploadPort, n as ChatController } from './ports-2voZkqty.cjs';
10
+ import { U as UploadPort, n as ChatController } from './ports-okLpXkpu.cjs';
11
11
  import { C as CameraPort } from './CameraPort-Cv31Pz7g.cjs';
12
12
  import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
13
13
  import { U as UploadTransport } from './ports-BN6RHF9W.cjs';
@@ -1,6 +1,6 @@
1
1
  "use strict";var crypto=require("crypto");function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&crypto.timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return crypto.createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.9.1",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&crypto.timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return crypto.createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,6 +1,6 @@
1
- import { b as PartnerPetProfile } from '../../pets-DjBlY7yg.cjs';
1
+ import { b as PartnerPetProfile } from '../../pets-uKMldfz0.cjs';
2
2
  import { E as EverfurResult } from '../../EverfurResult-COlXj1wq.cjs';
3
- import { j as FetchLike } from '../../config-BRyNmzhx.cjs';
3
+ import { j as FetchLike } from '../../config-C68HTCf4.cjs';
4
4
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../../profile-CSs1wlXT.cjs';
5
5
  import '../../EverfurError-DeBqRpQV.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as PartnerPetProfile } from '../../pets-e5RjSP6O.js';
1
+ import { b as PartnerPetProfile } from '../../pets-CqeoV1Jv.js';
2
2
  import { E as EverfurResult } from '../../EverfurResult-ClPTS0P2.js';
3
- import { j as FetchLike } from '../../config-DdK2czhD.js';
3
+ import { j as FetchLike } from '../../config-DeUmccwl.js';
4
4
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../../profile-CSs1wlXT.js';
5
5
  import '../../EverfurError-DeBqRpQV.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import{timingSafeEqual,createHmac,randomUUID}from"crypto";function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.9.1",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,6 +1,6 @@
1
1
  "use strict";function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.1",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurResult } from '../EverfurResult-COlXj1wq.cjs';
2
- import { j as FetchLike } from '../config-BRyNmzhx.cjs';
3
- import { P as PartnerServerClient } from '../pets-DjBlY7yg.cjs';
4
- export { a as PartnerPet, b as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets-DjBlY7yg.cjs';
2
+ import { j as FetchLike } from '../config-C68HTCf4.cjs';
3
+ import { P as PartnerServerClient } from '../pets-uKMldfz0.cjs';
4
+ export { a as PartnerPet, b as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets-uKMldfz0.cjs';
5
5
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile-CSs1wlXT.cjs';
6
6
  export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species-BXAIMh7I.cjs';
7
7
  import '../EverfurError-DeBqRpQV.cjs';
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurResult } from '../EverfurResult-ClPTS0P2.js';
2
- import { j as FetchLike } from '../config-DdK2czhD.js';
3
- import { P as PartnerServerClient } from '../pets-e5RjSP6O.js';
4
- export { a as PartnerPet, b as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets-e5RjSP6O.js';
2
+ import { j as FetchLike } from '../config-DeUmccwl.js';
3
+ import { P as PartnerServerClient } from '../pets-CqeoV1Jv.js';
4
+ export { a as PartnerPet, b as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets-CqeoV1Jv.js';
5
5
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile-CSs1wlXT.js';
6
6
  export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species-BXAIMh7I.js';
7
7
  import '../EverfurError-DeBqRpQV.js';
@@ -1,6 +1,6 @@
1
1
  function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.1",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -291,7 +291,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:[styles2.screen,style],testID:"te
291
291
  /* @__PURE__ */jsxRuntime.jsx(TelevetChoiceRow,{title:answer.label,selected:why===answer.label,onPress:()=>setWhy(why===answer.label?null:answer.label),testID:`televet-consult-cancel-why-${answer.id}`}),answer.id==="time"&&why===answer.label?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.hint,testID:"televet-consult-cancel-time-hint",children:[
292
292
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.muted,children:TELEVET_VISITS_COPY_NATIVE.cancelWhyTimeHint}),onReschedule?/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelMoveInstead,kind:"quiet",fullWidth:false,onPress:()=>onReschedule(consult),testID:"televet-consult-cancel-move"}):null]}):null]},answer.id))}),cancelFailed?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_VISITS_COPY_NATIVE.cancelFailedTitle,testID:"televet-consult-cancel-failed"}):null,
293
293
  /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelConfirmCta,kind:"danger",loading:cancel.isPending,onPress:confirmCancel,testID:"televet-consult-cancel-yes"}),
294
- /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelKeepCta,kind:"secondary",disabled:cancel.isPending,onPress:()=>{setConfirming(false),setCancelFailed(false)},testID:"televet-consult-cancel-keep"})]}):/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelCta,kind:"secondary",disabled:!terms,onPress:()=>{setCancelFailed(false),setConfirming(true)},testID:"televet-consult-cancel"})]}):null,read.isError&&!notFound?/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_VISITS_COPY_NATIVE.staleTitle,actionLabel:TELEVET_VISITS_COPY_NATIVE.staleRetry,onAction:()=>read.refetch(),testID:"televet-consult-stale"}):null]})]})}var VET_CALL_COPY=/* @__PURE__ */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:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",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 televetJoinRefusalNativeCopy(refusal){switch(refusal){case"too_early":return"You can join closer to the time.";case"too_late":return"This visit has ended.";case"room_not_ready":return"The room is still being set up. Try again in a moment.";case"not_joinable":return"This visit is no longer open.";case"unavailable":return"No way to join this visit yet.";default:return"That did not open. Try again."}}var TELEVET_JOIN_UNAVAILABLE_NATIVE="No way to join this visit yet.";function televetJoinIsRetryable(refusal){return refusal==="room_not_ready"||refusal==="unknown"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function isEverfurDailyRegistered(){return televetGlobal().dailyRegistered}function memoizeTelevetLoader(load){let pending=null;return()=>{if(pending!==null)return pending;let started=load();return pending=started,started.then(void 0,()=>{pending===started&&(pending=null)}),started}}var JOINING=/* @__PURE__ */Object.freeze({status:"joining"});function useTelevetJoin(consultId,controller){let[attempt,setAttempt]=react.useState(0),[state,setState]=react.useState(JOINING),inflight=react.useRef(null);react.useEffect(()=>{let join=controller?.joinConsult;if(controller===null||join===void 0){setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unavailable",reason:null}));return}let key=`${consultId}#${String(attempt)}`,entry=inflight.current;if(entry===null||entry.key!==key){let promise;try{promise=join.call(controller,consultId)}catch(cause){promise=Promise.reject(cause)}entry={key:key,promise:promise},inflight.current=entry}let live=true;return setState(JOINING),entry.promise.then(res=>{live&&(res.ok?setState(/* @__PURE__ */Object.freeze({status:"ready",credential:res.value})):setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:vetCallJoinRefusal(res.error),reason:vetCallJoinReason(res.error)})))},()=>{live&&setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unknown",reason:null}))}),()=>{live=false}},[consultId,controller,attempt]);let retry=react.useCallback(()=>setAttempt(n=>n+1),[]);return{state:state,retry:retry}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function markRecordingNoticeAccepted(roomUrl){let rooms=receipts();rooms.set(roomUrl,(rooms.get(roomUrl)??0)+1)}function clearRecordingNoticeAccepted(roomUrl){let rooms=receipts(),count=rooms.get(roomUrl)??0;count<=1?rooms.delete(roomUrl):rooms.set(roomUrl,count-1)}var TelevetModalLayoutContext=react.createContext(null);function useTelevetModalFullBleed(fullBleed){let layout=react.useContext(TelevetModalLayoutContext);react.useEffect(()=>{if(!(layout===null||!fullBleed))return layout.setFullBleed(true),()=>{layout.setFullBleed(false)}},[layout,fullBleed])}var loadCall=memoizeTelevetLoader(()=>Promise.resolve(callModule__namespace));function TelevetJoinScreen({consultId:consultId,...screen}){let styles2=useBookingStyles(),canHostCall=useCanHostCall();return canHostCall===null?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.screen,screen.style],testID:"televet-join-checking"}):/* @__PURE__ */jsxRuntime.jsx(TelevetJoinGate,{consultId:consultId,...screen,canHostCall:canHostCall},consultId)}function TelevetJoinGate({canHostCall:canHostCall,onLeave:onLeave,style:style,...room}){let[accepted,setAccepted]=react.useState(false);useJoinBackPress(()=>(onLeave(),true),!accepted);let leaveRoom=react.useCallback(()=>{setAccepted(false),onLeave()},[onLeave]);return canHostCall?accepted?/* @__PURE__ */jsxRuntime.jsx(TelevetJoinRoom,{...room,onLeave:leaveRoom,style:style}):/* @__PURE__ */jsxRuntime.jsx(TelevetRecordingNotice,{onContinue:()=>setAccepted(true),onLeave:onLeave,style:style}):/* @__PURE__ */jsxRuntime.jsx(TelevetJoinUnavailable,{onLeave:onLeave,style:style})}function TelevetJoinRoom({consultId:consultId,controller:injected,clinicianName:clinicianName,petName:petName,onLeave:onLeave,style:style}){let styles2=useBookingStyles(),controller=useTelevetBookingController(injected),{state:state,retry:retry}=useTelevetJoin(consultId,controller),[call,setCall]=react.useState(null),[callFailed,setCallFailed]=react.useState(false),ready=state.status==="ready";react.useEffect(()=>{if(!ready||call!==null)return;let live=true;return loadCall().then(loaded=>{live&&setCall(()=>loaded)},()=>{live&&setCallFailed(true)}),()=>{live=false}},[ready,call]);let roomUrl=state.status==="ready"?state.credential.roomUrl:null,[receiptFor,setReceiptFor]=react.useState(null);react.useEffect(()=>{if(roomUrl!==null)return markRecordingNoticeAccepted(roomUrl),setReceiptFor(roomUrl),()=>{clearRecordingNoticeAccepted(roomUrl)}},[roomUrl]);let inCall=ready&&call!==null&&!callFailed;useJoinBackPress(()=>(inCall||onLeave(),true),true);let credential=state.status==="ready"?state.credential:null;if(useTelevetModalFullBleed(inCall&&credential!==null&&call.isUsableRoomCredential(credential.roomUrl,credential.token)&&call.loadEverfurDaily().available),state.status==="refused"||callFailed){let refusal=state.status==="refused"?state.refusal:"unavailable";/* @__PURE__ */
294
+ /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelKeepCta,kind:"secondary",disabled:cancel.isPending,onPress:()=>{setConfirming(false),setCancelFailed(false)},testID:"televet-consult-cancel-keep"})]}):/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelCta,kind:"secondary",disabled:!terms,onPress:()=>{setCancelFailed(false),setConfirming(true)},testID:"televet-consult-cancel"})]}):null,read.isError&&!notFound?/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_VISITS_COPY_NATIVE.staleTitle,actionLabel:TELEVET_VISITS_COPY_NATIVE.staleRetry,onAction:()=>read.refetch(),testID:"televet-consult-stale"}):null]})]})}var VET_CALL_COPY=/* @__PURE__ */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:"",lobbyPrepLabel:"While you wait",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",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 televetJoinRefusalNativeCopy(refusal){switch(refusal){case"too_early":return"You can join closer to the time.";case"too_late":return"This visit has ended.";case"room_not_ready":return"The room is still being set up. Try again in a moment.";case"not_joinable":return"This visit is no longer open.";case"unavailable":return"No way to join this visit yet.";default:return"That did not open. Try again."}}var TELEVET_JOIN_UNAVAILABLE_NATIVE="No way to join this visit yet.";function televetJoinIsRetryable(refusal){return refusal==="room_not_ready"||refusal==="unknown"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function isEverfurDailyRegistered(){return televetGlobal().dailyRegistered}function memoizeTelevetLoader(load){let pending=null;return()=>{if(pending!==null)return pending;let started=load();return pending=started,started.then(void 0,()=>{pending===started&&(pending=null)}),started}}var JOINING=/* @__PURE__ */Object.freeze({status:"joining"});function useTelevetJoin(consultId,controller){let[attempt,setAttempt]=react.useState(0),[state,setState]=react.useState(JOINING),inflight=react.useRef(null);react.useEffect(()=>{let join=controller?.joinConsult;if(controller===null||join===void 0){setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unavailable",reason:null}));return}let key=`${consultId}#${String(attempt)}`,entry=inflight.current;if(entry===null||entry.key!==key){let promise;try{promise=join.call(controller,consultId)}catch(cause){promise=Promise.reject(cause)}entry={key:key,promise:promise},inflight.current=entry}let live=true;return setState(JOINING),entry.promise.then(res=>{live&&(res.ok?setState(/* @__PURE__ */Object.freeze({status:"ready",credential:res.value})):setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:vetCallJoinRefusal(res.error),reason:vetCallJoinReason(res.error)})))},()=>{live&&setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unknown",reason:null}))}),()=>{live=false}},[consultId,controller,attempt]);let retry=react.useCallback(()=>setAttempt(n=>n+1),[]);return{state:state,retry:retry}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function markRecordingNoticeAccepted(roomUrl){let rooms=receipts();rooms.set(roomUrl,(rooms.get(roomUrl)??0)+1)}function clearRecordingNoticeAccepted(roomUrl){let rooms=receipts(),count=rooms.get(roomUrl)??0;count<=1?rooms.delete(roomUrl):rooms.set(roomUrl,count-1)}var TelevetModalLayoutContext=react.createContext(null);function useTelevetModalFullBleed(fullBleed){let layout=react.useContext(TelevetModalLayoutContext);react.useEffect(()=>{if(!(layout===null||!fullBleed))return layout.setFullBleed(true),()=>{layout.setFullBleed(false)}},[layout,fullBleed])}var loadCall=memoizeTelevetLoader(()=>Promise.resolve(callModule__namespace));function TelevetJoinScreen({consultId:consultId,...screen}){let styles2=useBookingStyles(),canHostCall=useCanHostCall();return canHostCall===null?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.screen,screen.style],testID:"televet-join-checking"}):/* @__PURE__ */jsxRuntime.jsx(TelevetJoinGate,{consultId:consultId,...screen,canHostCall:canHostCall},consultId)}function TelevetJoinGate({canHostCall:canHostCall,onLeave:onLeave,style:style,...room}){let[accepted,setAccepted]=react.useState(false);useJoinBackPress(()=>(onLeave(),true),!accepted);let leaveRoom=react.useCallback(()=>{setAccepted(false),onLeave()},[onLeave]);return canHostCall?accepted?/* @__PURE__ */jsxRuntime.jsx(TelevetJoinRoom,{...room,onLeave:leaveRoom,style:style}):/* @__PURE__ */jsxRuntime.jsx(TelevetRecordingNotice,{onContinue:()=>setAccepted(true),onLeave:onLeave,style:style}):/* @__PURE__ */jsxRuntime.jsx(TelevetJoinUnavailable,{onLeave:onLeave,style:style})}function TelevetJoinRoom({consultId:consultId,controller:injected,clinicianName:clinicianName,petName:petName,onLeave:onLeave,style:style}){let styles2=useBookingStyles(),controller=useTelevetBookingController(injected),{state:state,retry:retry}=useTelevetJoin(consultId,controller),[call,setCall]=react.useState(null),[callFailed,setCallFailed]=react.useState(false),ready=state.status==="ready";react.useEffect(()=>{if(!ready||call!==null)return;let live=true;return loadCall().then(loaded=>{live&&setCall(()=>loaded)},()=>{live&&setCallFailed(true)}),()=>{live=false}},[ready,call]);let roomUrl=state.status==="ready"?state.credential.roomUrl:null,[receiptFor,setReceiptFor]=react.useState(null);react.useEffect(()=>{if(roomUrl!==null)return markRecordingNoticeAccepted(roomUrl),setReceiptFor(roomUrl),()=>{clearRecordingNoticeAccepted(roomUrl)}},[roomUrl]);let inCall=ready&&call!==null&&!callFailed;useJoinBackPress(()=>(inCall||onLeave(),true),true);let credential=state.status==="ready"?state.credential:null;if(useTelevetModalFullBleed(inCall&&credential!==null&&call.isUsableRoomCredential(credential.roomUrl,credential.token)&&call.loadEverfurDaily().available),state.status==="refused"||callFailed){let refusal=state.status==="refused"?state.refusal:"unavailable";/* @__PURE__ */
295
295
  return jsxRuntime.jsxs(reactNative.View,{style:[styles2.screen,styles2.stepFill,style],testID:"televet-join-refused",children:[
296
296
  /* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:televetJoinRefusalNativeCopy(refusal),testID:"televet-join-refused-message"}),televetJoinIsRetryable(refusal)&&state.status==="refused"?/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.retryCta,kind:"primary",onPress:retry,testID:"televet-join-retry"}):null,
297
297
  /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:VET_CALL_COPY.leaveCta,kind:"secondary",onPress:onLeave,testID:"televet-join-leave"})]})}if(state.status==="joining"||call===null||receiptFor!==state.credential.roomUrl)/* @__PURE__ */
@@ -2,8 +2,8 @@ import { ReactNode, ComponentType, ReactElement } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { P as PetRef } from '../../ids-B2GAAifq.cjs';
4
4
  export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.cjs';
5
- import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-C153FHEC.cjs';
6
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-C153FHEC.cjs';
5
+ import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-Ds2JGcPE.cjs';
6
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-Ds2JGcPE.cjs';
7
7
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, b as TelevetCancelReceipt, c as TelevetSlot } from '../../televetGlobal-C5dTUACe.cjs';
8
8
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../televetGlobal-C5dTUACe.cjs';
9
9
  import { V as VetVisitIntent } from '../../visitIntent-D7_yVp1I.cjs';
@@ -12,11 +12,11 @@ export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCa
12
12
  export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../callRoom-BhIdadyV.cjs';
13
13
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.cjs';
14
14
  export { E as EverfurResult } from '../../EverfurResult-COlXj1wq.cjs';
15
- export { W as WidgetPet } from '../../petsRepository-DkQ2fwZY.cjs';
16
- import '../../requestFunnel-CA0ANsWj.cjs';
15
+ export { W as WidgetPet } from '../../petsRepository-BYe7_MUo.cjs';
16
+ import '../../requestFunnel-u8qnM5Ll.cjs';
17
17
  import '../../ErrorPolicyPort-10s3HJCt.cjs';
18
- import '../../config-BRyNmzhx.cjs';
19
- import '../../identity-CmxZ4GR0.cjs';
18
+ import '../../config-C68HTCf4.cjs';
19
+ import '../../identity-ScajqjK5.cjs';
20
20
  import '../../TelemetryPort-BDNr00hu.cjs';
21
21
  import '../../profile-CSs1wlXT.cjs';
22
22
 
@@ -2,8 +2,8 @@ import { ReactNode, ComponentType, ReactElement } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { P as PetRef } from '../../ids-B2GAAifq.js';
4
4
  export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.js';
5
- import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-DR0-SmqH.js';
6
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-DR0-SmqH.js';
5
+ import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-CJLAgEgK.js';
6
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-CJLAgEgK.js';
7
7
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, b as TelevetCancelReceipt, c as TelevetSlot } from '../../televetGlobal-CnjrfhT4.js';
8
8
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../televetGlobal-CnjrfhT4.js';
9
9
  import { V as VetVisitIntent } from '../../visitIntent-D7_yVp1I.js';
@@ -12,11 +12,11 @@ export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCa
12
12
  export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../callRoom-B92eH_ij.js';
13
13
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.js';
14
14
  export { E as EverfurResult } from '../../EverfurResult-ClPTS0P2.js';
15
- export { W as WidgetPet } from '../../petsRepository-CQh8paML.js';
16
- import '../../requestFunnel-CQ42Kf9G.js';
15
+ export { W as WidgetPet } from '../../petsRepository-BdfbY9Oe.js';
16
+ import '../../requestFunnel-Dhaj0yUq.js';
17
17
  import '../../ErrorPolicyPort-C3nNSS_j.js';
18
- import '../../config-DdK2czhD.js';
19
- import '../../identity-A8fVB518.js';
18
+ import '../../config-DeUmccwl.js';
19
+ import '../../identity-BTT6YtH5.js';
20
20
  import '../../TelemetryPort-BDNr00hu.js';
21
21
  import '../../profile-CSs1wlXT.js';
22
22
 
@@ -291,7 +291,7 @@ return jsxs(View,{style:[styles2.screen,style],testID:"televet-consult",children
291
291
  /* @__PURE__ */jsx(TelevetChoiceRow,{title:answer.label,selected:why===answer.label,onPress:()=>setWhy(why===answer.label?null:answer.label),testID:`televet-consult-cancel-why-${answer.id}`}),answer.id==="time"&&why===answer.label?/* @__PURE__ */jsxs(View,{style:styles2.hint,testID:"televet-consult-cancel-time-hint",children:[
292
292
  /* @__PURE__ */jsx(Text,{style:styles2.muted,children:TELEVET_VISITS_COPY_NATIVE.cancelWhyTimeHint}),onReschedule?/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelMoveInstead,kind:"quiet",fullWidth:false,onPress:()=>onReschedule(consult),testID:"televet-consult-cancel-move"}):null]}):null]},answer.id))}),cancelFailed?/* @__PURE__ */jsx(TelevetFailureLine,{message:TELEVET_VISITS_COPY_NATIVE.cancelFailedTitle,testID:"televet-consult-cancel-failed"}):null,
293
293
  /* @__PURE__ */jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelConfirmCta,kind:"danger",loading:cancel.isPending,onPress:confirmCancel,testID:"televet-consult-cancel-yes"}),
294
- /* @__PURE__ */jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelKeepCta,kind:"secondary",disabled:cancel.isPending,onPress:()=>{setConfirming(false),setCancelFailed(false)},testID:"televet-consult-cancel-keep"})]}):/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelCta,kind:"secondary",disabled:!terms,onPress:()=>{setCancelFailed(false),setConfirming(true)},testID:"televet-consult-cancel"})]}):null,read.isError&&!notFound?/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_VISITS_COPY_NATIVE.staleTitle,actionLabel:TELEVET_VISITS_COPY_NATIVE.staleRetry,onAction:()=>read.refetch(),testID:"televet-consult-stale"}):null]})]})}var VET_CALL_COPY=/* @__PURE__ */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:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",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 televetJoinRefusalNativeCopy(refusal){switch(refusal){case"too_early":return"You can join closer to the time.";case"too_late":return"This visit has ended.";case"room_not_ready":return"The room is still being set up. Try again in a moment.";case"not_joinable":return"This visit is no longer open.";case"unavailable":return"No way to join this visit yet.";default:return"That did not open. Try again."}}var TELEVET_JOIN_UNAVAILABLE_NATIVE="No way to join this visit yet.";function televetJoinIsRetryable(refusal){return refusal==="room_not_ready"||refusal==="unknown"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function isEverfurDailyRegistered(){return televetGlobal().dailyRegistered}function memoizeTelevetLoader(load){let pending=null;return()=>{if(pending!==null)return pending;let started=load();return pending=started,started.then(void 0,()=>{pending===started&&(pending=null)}),started}}var JOINING=/* @__PURE__ */Object.freeze({status:"joining"});function useTelevetJoin(consultId,controller){let[attempt,setAttempt]=useState(0),[state,setState]=useState(JOINING),inflight=useRef(null);useEffect(()=>{let join=controller?.joinConsult;if(controller===null||join===void 0){setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unavailable",reason:null}));return}let key=`${consultId}#${String(attempt)}`,entry=inflight.current;if(entry===null||entry.key!==key){let promise;try{promise=join.call(controller,consultId)}catch(cause){promise=Promise.reject(cause)}entry={key:key,promise:promise},inflight.current=entry}let live=true;return setState(JOINING),entry.promise.then(res=>{live&&(res.ok?setState(/* @__PURE__ */Object.freeze({status:"ready",credential:res.value})):setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:vetCallJoinRefusal(res.error),reason:vetCallJoinReason(res.error)})))},()=>{live&&setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unknown",reason:null}))}),()=>{live=false}},[consultId,controller,attempt]);let retry=useCallback(()=>setAttempt(n=>n+1),[]);return{state:state,retry:retry}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function markRecordingNoticeAccepted(roomUrl){let rooms=receipts();rooms.set(roomUrl,(rooms.get(roomUrl)??0)+1)}function clearRecordingNoticeAccepted(roomUrl){let rooms=receipts(),count=rooms.get(roomUrl)??0;count<=1?rooms.delete(roomUrl):rooms.set(roomUrl,count-1)}var TelevetModalLayoutContext=createContext(null);function useTelevetModalFullBleed(fullBleed){let layout=useContext(TelevetModalLayoutContext);useEffect(()=>{if(!(layout===null||!fullBleed))return layout.setFullBleed(true),()=>{layout.setFullBleed(false)}},[layout,fullBleed])}var loadCall=memoizeTelevetLoader(()=>Promise.resolve(callModule));function TelevetJoinScreen({consultId:consultId,...screen}){let styles2=useBookingStyles(),canHostCall=useCanHostCall();return canHostCall===null?/* @__PURE__ */jsx(View,{style:[styles2.screen,screen.style],testID:"televet-join-checking"}):/* @__PURE__ */jsx(TelevetJoinGate,{consultId:consultId,...screen,canHostCall:canHostCall},consultId)}function TelevetJoinGate({canHostCall:canHostCall,onLeave:onLeave,style:style,...room}){let[accepted,setAccepted]=useState(false);useJoinBackPress(()=>(onLeave(),true),!accepted);let leaveRoom=useCallback(()=>{setAccepted(false),onLeave()},[onLeave]);return canHostCall?accepted?/* @__PURE__ */jsx(TelevetJoinRoom,{...room,onLeave:leaveRoom,style:style}):/* @__PURE__ */jsx(TelevetRecordingNotice,{onContinue:()=>setAccepted(true),onLeave:onLeave,style:style}):/* @__PURE__ */jsx(TelevetJoinUnavailable,{onLeave:onLeave,style:style})}function TelevetJoinRoom({consultId:consultId,controller:injected,clinicianName:clinicianName,petName:petName,onLeave:onLeave,style:style}){let styles2=useBookingStyles(),controller=useTelevetBookingController(injected),{state:state,retry:retry}=useTelevetJoin(consultId,controller),[call,setCall]=useState(null),[callFailed,setCallFailed]=useState(false),ready=state.status==="ready";useEffect(()=>{if(!ready||call!==null)return;let live=true;return loadCall().then(loaded=>{live&&setCall(()=>loaded)},()=>{live&&setCallFailed(true)}),()=>{live=false}},[ready,call]);let roomUrl=state.status==="ready"?state.credential.roomUrl:null,[receiptFor,setReceiptFor]=useState(null);useEffect(()=>{if(roomUrl!==null)return markRecordingNoticeAccepted(roomUrl),setReceiptFor(roomUrl),()=>{clearRecordingNoticeAccepted(roomUrl)}},[roomUrl]);let inCall=ready&&call!==null&&!callFailed;useJoinBackPress(()=>(inCall||onLeave(),true),true);let credential=state.status==="ready"?state.credential:null;if(useTelevetModalFullBleed(inCall&&credential!==null&&call.isUsableRoomCredential(credential.roomUrl,credential.token)&&call.loadEverfurDaily().available),state.status==="refused"||callFailed){let refusal=state.status==="refused"?state.refusal:"unavailable";/* @__PURE__ */
294
+ /* @__PURE__ */jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelKeepCta,kind:"secondary",disabled:cancel.isPending,onPress:()=>{setConfirming(false),setCancelFailed(false)},testID:"televet-consult-cancel-keep"})]}):/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.cancelCta,kind:"secondary",disabled:!terms,onPress:()=>{setCancelFailed(false),setConfirming(true)},testID:"televet-consult-cancel"})]}):null,read.isError&&!notFound?/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_VISITS_COPY_NATIVE.staleTitle,actionLabel:TELEVET_VISITS_COPY_NATIVE.staleRetry,onAction:()=>read.refetch(),testID:"televet-consult-stale"}):null]})]})}var VET_CALL_COPY=/* @__PURE__ */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:"",lobbyPrepLabel:"While you wait",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",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 televetJoinRefusalNativeCopy(refusal){switch(refusal){case"too_early":return"You can join closer to the time.";case"too_late":return"This visit has ended.";case"room_not_ready":return"The room is still being set up. Try again in a moment.";case"not_joinable":return"This visit is no longer open.";case"unavailable":return"No way to join this visit yet.";default:return"That did not open. Try again."}}var TELEVET_JOIN_UNAVAILABLE_NATIVE="No way to join this visit yet.";function televetJoinIsRetryable(refusal){return refusal==="room_not_ready"||refusal==="unknown"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function isEverfurDailyRegistered(){return televetGlobal().dailyRegistered}function memoizeTelevetLoader(load){let pending=null;return()=>{if(pending!==null)return pending;let started=load();return pending=started,started.then(void 0,()=>{pending===started&&(pending=null)}),started}}var JOINING=/* @__PURE__ */Object.freeze({status:"joining"});function useTelevetJoin(consultId,controller){let[attempt,setAttempt]=useState(0),[state,setState]=useState(JOINING),inflight=useRef(null);useEffect(()=>{let join=controller?.joinConsult;if(controller===null||join===void 0){setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unavailable",reason:null}));return}let key=`${consultId}#${String(attempt)}`,entry=inflight.current;if(entry===null||entry.key!==key){let promise;try{promise=join.call(controller,consultId)}catch(cause){promise=Promise.reject(cause)}entry={key:key,promise:promise},inflight.current=entry}let live=true;return setState(JOINING),entry.promise.then(res=>{live&&(res.ok?setState(/* @__PURE__ */Object.freeze({status:"ready",credential:res.value})):setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:vetCallJoinRefusal(res.error),reason:vetCallJoinReason(res.error)})))},()=>{live&&setState(/* @__PURE__ */Object.freeze({status:"refused",refusal:"unknown",reason:null}))}),()=>{live=false}},[consultId,controller,attempt]);let retry=useCallback(()=>setAttempt(n=>n+1),[]);return{state:state,retry:retry}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function markRecordingNoticeAccepted(roomUrl){let rooms=receipts();rooms.set(roomUrl,(rooms.get(roomUrl)??0)+1)}function clearRecordingNoticeAccepted(roomUrl){let rooms=receipts(),count=rooms.get(roomUrl)??0;count<=1?rooms.delete(roomUrl):rooms.set(roomUrl,count-1)}var TelevetModalLayoutContext=createContext(null);function useTelevetModalFullBleed(fullBleed){let layout=useContext(TelevetModalLayoutContext);useEffect(()=>{if(!(layout===null||!fullBleed))return layout.setFullBleed(true),()=>{layout.setFullBleed(false)}},[layout,fullBleed])}var loadCall=memoizeTelevetLoader(()=>Promise.resolve(callModule));function TelevetJoinScreen({consultId:consultId,...screen}){let styles2=useBookingStyles(),canHostCall=useCanHostCall();return canHostCall===null?/* @__PURE__ */jsx(View,{style:[styles2.screen,screen.style],testID:"televet-join-checking"}):/* @__PURE__ */jsx(TelevetJoinGate,{consultId:consultId,...screen,canHostCall:canHostCall},consultId)}function TelevetJoinGate({canHostCall:canHostCall,onLeave:onLeave,style:style,...room}){let[accepted,setAccepted]=useState(false);useJoinBackPress(()=>(onLeave(),true),!accepted);let leaveRoom=useCallback(()=>{setAccepted(false),onLeave()},[onLeave]);return canHostCall?accepted?/* @__PURE__ */jsx(TelevetJoinRoom,{...room,onLeave:leaveRoom,style:style}):/* @__PURE__ */jsx(TelevetRecordingNotice,{onContinue:()=>setAccepted(true),onLeave:onLeave,style:style}):/* @__PURE__ */jsx(TelevetJoinUnavailable,{onLeave:onLeave,style:style})}function TelevetJoinRoom({consultId:consultId,controller:injected,clinicianName:clinicianName,petName:petName,onLeave:onLeave,style:style}){let styles2=useBookingStyles(),controller=useTelevetBookingController(injected),{state:state,retry:retry}=useTelevetJoin(consultId,controller),[call,setCall]=useState(null),[callFailed,setCallFailed]=useState(false),ready=state.status==="ready";useEffect(()=>{if(!ready||call!==null)return;let live=true;return loadCall().then(loaded=>{live&&setCall(()=>loaded)},()=>{live&&setCallFailed(true)}),()=>{live=false}},[ready,call]);let roomUrl=state.status==="ready"?state.credential.roomUrl:null,[receiptFor,setReceiptFor]=useState(null);useEffect(()=>{if(roomUrl!==null)return markRecordingNoticeAccepted(roomUrl),setReceiptFor(roomUrl),()=>{clearRecordingNoticeAccepted(roomUrl)}},[roomUrl]);let inCall=ready&&call!==null&&!callFailed;useJoinBackPress(()=>(inCall||onLeave(),true),true);let credential=state.status==="ready"?state.credential:null;if(useTelevetModalFullBleed(inCall&&credential!==null&&call.isUsableRoomCredential(credential.roomUrl,credential.token)&&call.loadEverfurDaily().available),state.status==="refused"||callFailed){let refusal=state.status==="refused"?state.refusal:"unavailable";/* @__PURE__ */
295
295
  return jsxs(View,{style:[styles2.screen,styles2.stepFill,style],testID:"televet-join-refused",children:[
296
296
  /* @__PURE__ */jsx(TelevetFailureLine,{message:televetJoinRefusalNativeCopy(refusal),testID:"televet-join-refused-message"}),televetJoinIsRetryable(refusal)&&state.status==="refused"?/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.retryCta,kind:"primary",onPress:retry,testID:"televet-join-retry"}):null,
297
297
  /* @__PURE__ */jsx(TelevetButton,{label:VET_CALL_COPY.leaveCta,kind:"secondary",onPress:onLeave,testID:"televet-join-leave"})]})}if(state.status==="joining"||call===null||receiptFor!==state.credential.roomUrl)/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- "use strict";var react=require("react"),reactNative=require("react-native"),reactNativeSafeAreaContext=require("react-native-safe-area-context"),jsxRuntime=require("react/jsx-runtime");var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var noopTelemetry=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function isSafeRoomUrl(url){try{return new URL(url.trim()).protocol==="https:"}catch{return false}}function isUsableRoomCredential(roomUrl,token){return isSafeRoomUrl(roomUrl)&&token.trim().length>0}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}var VET_CALL_CONSULT_MINUTES=10,VET_CALL_COPY=/* @__PURE__ */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:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",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 formatElapsed(ms){let total=Math.max(0,Math.floor(ms/1e3)),seconds=String(total%60).padStart(2,"0"),minutes=Math.floor(total%3600/60),hours=Math.floor(total/3600);return hours>0?`${hours}:${String(minutes).padStart(2,"0")}:${seconds}`:`${minutes}:${seconds}`}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});function optionalModule(name,load,validate){let candidate;try{candidate=load()}catch(cause){return frozenUnavailable(`optional peer '${name}' is not installed: ${describe(cause)}`)}let resolved=unwrapDefault(candidate);return resolved==null?frozenUnavailable(`optional peer '${name}' resolved to no module`):validate&&!validate(resolved)?frozenUnavailable(`optional peer '${name}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:resolved})}function unwrapDefault(candidate){return typeof candidate=="object"&&candidate!==null&&"default"in candidate&&Object.keys(candidate).length<=2?candidate.default:candidate}function frozenUnavailable(reason){/* @__PURE__ */
1
+ "use strict";var react=require("react"),reactNative=require("react-native"),reactNativeSafeAreaContext=require("react-native-safe-area-context"),jsxRuntime=require("react/jsx-runtime");var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var noopTelemetry=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function isSafeRoomUrl(url){try{return new URL(url.trim()).protocol==="https:"}catch{return false}}function isUsableRoomCredential(roomUrl,token){return isSafeRoomUrl(roomUrl)&&token.trim().length>0}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}var VET_CALL_CONSULT_MINUTES=10,VET_CALL_COPY=/* @__PURE__ */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:"",lobbyPrepLabel:"While you wait",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",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 formatElapsed(ms){let total=Math.max(0,Math.floor(ms/1e3)),seconds=String(total%60).padStart(2,"0"),minutes=Math.floor(total%3600/60),hours=Math.floor(total/3600);return hours>0?`${hours}:${String(minutes).padStart(2,"0")}:${seconds}`:`${minutes}:${seconds}`}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});function optionalModule(name,load,validate){let candidate;try{candidate=load()}catch(cause){return frozenUnavailable(`optional peer '${name}' is not installed: ${describe(cause)}`)}let resolved=unwrapDefault(candidate);return resolved==null?frozenUnavailable(`optional peer '${name}' resolved to no module`):validate&&!validate(resolved)?frozenUnavailable(`optional peer '${name}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:resolved})}function unwrapDefault(candidate){return typeof candidate=="object"&&candidate!==null&&"default"in candidate&&Object.keys(candidate).length<=2?candidate.default:candidate}function frozenUnavailable(reason){/* @__PURE__ */
2
2
  return Object.freeze({available:false,module:null,reason:reason})}function describe(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"unknown load error"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function markEverfurDailyRegistered(registered){televetGlobal().dailyRegistered=registered}var EVERFUR_DAILY_SETUP=`[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.`,DAILY_PEER="@daily-co/react-native-daily-js",NOT_REGISTERED=`optional peer '${DAILY_PEER}' has no registered loader`,WRONG_SHAPE=`optional peer '${DAILY_PEER}' is present but failed its shape check`;function isRecordLike(candidate){return typeof candidate=="object"&&candidate!==null}function isDailyBox(candidate){return isRecordLike(candidate)&&"box"in candidate}function normalizeDailyModule(candidate){let inner=candidate.default,fallback=isRecordLike(inner)||typeof inner=="function"?inner:{},owner=typeof candidate.createCallObject=="function"?candidate:fallback,factory=owner.createCallObject,merged={createCallObject:typeof factory=="function"?factory.bind(owner):factory,DailyMediaView:candidate.DailyMediaView??fallback.DailyMediaView};return isEverfurDailyModule(merged)?merged:null}function isEverfurDailyModule(candidate){if(!isRecordLike(candidate)||typeof candidate.createCallObject!="function")return false;let view=candidate.DailyMediaView;return typeof view=="function"||typeof view=="object"&&view!==null}var loader=null,memo=null;function unavailable(reason){/* @__PURE__ */
3
3
  return Object.freeze({available:false,module:null,reason:reason})}function registerEverfurDaily(next){loader=next,memo=null,markEverfurDailyRegistered(next!==null)}function loadEverfurDaily(){if(memo!==null)return memo;let load=loader;if(load===null)return memo=unavailable(NOT_REGISTERED),memo;let raw=optionalModule(DAILY_PEER,()=>({box:load()}),isDailyBox);if(!raw.available)return memo=unavailable(raw.reason),memo;let inner=raw.module.box;if(!isRecordLike(inner))return memo=unavailable(WRONG_SHAPE),memo;let normalized=normalizeDailyModule(inner);return memo=normalized===null?unavailable(WRONG_SHAPE):/* @__PURE__ */Object.freeze({available:true,module:normalized}),memo}function CallControl({label:label,glyph:glyph,onPress:onPress,testID:testID,muted:muted=false,style:style}){/* @__PURE__ */
4
4
  return jsxRuntime.jsx(reactNative.Pressable,{onPress:onPress,testID:testID,accessibilityRole:"button",accessibilityLabel:label,accessibilityState:{selected:muted},style:style,children:glyph})}function GlyphBox({children:children,testID:testID}){/* @__PURE__ */
@@ -34,9 +34,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:[styles.root,{paddingTop:insets.t
34
34
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles.avatar,{width:avatarSize,height:avatarSize,borderRadius:avatarSize/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[
35
35
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.avatarGlyphHead}),
36
36
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.avatarGlyphBody})]}),
37
- /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:[
38
- /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles.title,testID:"everfur-vet-lobby-title",children:VET_CALL_COPY.lobbyTitle(clinicianName)}),
39
- /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.subtitle,testID:"everfur-vet-lobby-subtitle",children:VET_CALL_COPY.lobbySubtitle})]}),
37
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles.title,testID:"everfur-vet-lobby-title",children:VET_CALL_COPY.lobbyTitle(clinicianName)})}),
40
38
  /* @__PURE__ */jsxRuntime.jsx(WaitingDots,{reducedMotion:theme.motion.reducedMotion,styles:styles})]}),
41
39
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.prepCard,testID:"everfur-vet-lobby-prep",children:[
42
40
  /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.prepLabel,children:VET_CALL_COPY.lobbyTipsTitle(clinicianName)}),[VET_CALL_COPY.lobbyTipSpot,VET_CALL_COPY.lobbyPrep(petName)].map((tip,i)=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.tip,children:[
@@ -45,7 +43,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:[styles.root,{paddingTop:insets.t
45
43
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.controls,children:[
46
44
  /* @__PURE__ */jsxRuntime.jsx(LobbyControl,{label:micOn?VET_CALL_COPY.muteCta:VET_CALL_COPY.unmuteCta,glyph:/* @__PURE__ */jsxRuntime.jsx(MicGlyph,{color:theme.color.text.onBrand,off:!micOn}),active:micOn,onPress:onToggleMic,testID:"everfur-vet-lobby-mic",styles:styles}),
47
45
  /* @__PURE__ */jsxRuntime.jsx(LobbyControl,{label:cameraOn?VET_CALL_COPY.cameraOffCta:VET_CALL_COPY.cameraOnCta,glyph:/* @__PURE__ */jsxRuntime.jsx(CameraGlyph,{color:theme.color.text.onBrand,off:!cameraOn}),active:cameraOn,onPress:onToggleCamera,testID:"everfur-vet-lobby-camera",styles:styles}),cameraOn&&onSwitchCamera?/* @__PURE__ */jsxRuntime.jsx(LobbyControl,{label:VET_CALL_COPY.switchCameraCta,glyph:/* @__PURE__ */jsxRuntime.jsx(SwitchCameraGlyph,{color:theme.color.text.onBrand}),active:true,onPress:onSwitchCamera,testID:"everfur-vet-lobby-switch-camera",styles:styles}):null]}),
48
- /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.duration,testID:"everfur-vet-lobby-duration",children:VET_CALL_COPY.lobbyDuration(soldMinutes(consultMinutes))})]})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:color.brand,paddingHorizontal:space.lg},topRow:{flexDirection:"row",alignItems:"center",gap:space.md},tip:{flexDirection:"row",gap:space.md,alignItems:"flex-start",paddingTop:space.sm},tipNumber:{...face(theme,"monoBold"),color:ON_BRAND.textSecondary,fontSize:13,width:24,paddingTop:4},leaveHit:{minHeight:MIN_TOUCH_TARGET,justifyContent:"center",paddingVertical:space.xs,paddingRight:space.md},leaveLabel:{...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:color.success,backgroundColor:ON_BRAND.surface,marginBottom:space.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:ON_BRAND.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:ON_BRAND.glyph},title:{...face(theme,"bold"),color:color.text.onBrand,fontSize:type.size.heading,lineHeight:Math.round(type.size.heading*type.lineHeight.snug),textAlign:"center",paddingHorizontal:space.sm},subtitle:{...face(theme,"regular"),color:ON_BRAND.textSecondary,fontSize:type.size.body,textAlign:"center",marginTop:space.xs},dotRow:{flexDirection:"row",gap:space.xs,marginTop:space.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:color.success},prepCard:{borderRadius:radius.lg,borderWidth:1,borderColor:ON_BRAND.hairline,backgroundColor:ON_BRAND.surface,padding:space.lg,marginBottom:space.lg},prepLabel:{...face(theme,"monoBold"),color:color.accent,fontSize:type.size.micro,letterSpacing:1.2,textTransform:"uppercase"},prepBody:{...face(theme,"regular"),color:color.text.onBrand,fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:space.lg,marginBottom:space.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:space.md,alignItems:"center",justifyContent:"center",borderRadius:radius.pill,backgroundColor:ON_BRAND.surfaceRaised},controlOff:{backgroundColor:ON_BRAND.surfaceActive},duration:{...face(theme,"medium"),color:ON_BRAND.textTertiary,fontSize:type.size.micro,letterSpacing:1.6,textAlign:"center"}})}var LEAVE_SETTLE_MS=5e3;function settleWithin(work,ms){return new Promise(resolve=>{let timer=setTimeout(resolve,ms);work.catch(()=>{}).then(()=>{clearTimeout(timer),resolve()})})}function useLeaveOnce(onLeave,teardown){let onLeaveRef=react.useRef(onLeave);react.useEffect(()=>{onLeaveRef.current=onLeave});let liveRef=react.useRef(false);react.useEffect(()=>(liveRef.current=true,()=>{liveRef.current=false}),[]);let reportedRef=react.useRef(false),reportLeft=react.useCallback(()=>{reportedRef.current||!liveRef.current||(reportedRef.current=true,onLeaveRef.current())},[]),leavingRef=react.useRef(false),leave=react.useCallback(()=>{leavingRef.current||(leavingRef.current=true,settleWithin(teardown(),LEAVE_SETTLE_MS).then(reportLeft))},[teardown,reportLeft]);return{reportLeft:reportLeft,leave:leave,leaving:leavingRef}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function hasRecordingNoticeAccepted(roomUrl){return(receipts().get(roomUrl)??0)>0}function useSpeakerRoute(callRef){let[speakerOn,setSpeakerOn]=react.useState(true),route=react.useRef(true),toggleSpeaker=react.useCallback(()=>{let call=callRef.current;if(!call?.setNativeInCallAudioMode)return;let next=!route.current;route.current=next,setSpeakerOn(next),call.setNativeInCallAudioMode(next?"video":"voice")},[callRef]);return{speakerOn:speakerOn,toggleSpeaker:toggleSpeaker}}function asTrack(track){return track??null}function hasVideo(participant){return!!participant?.videoTrack}function PersonMark({styles:styles}){/* @__PURE__ */
46
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.duration,testID:"everfur-vet-lobby-duration",children:VET_CALL_COPY.lobbyDuration(soldMinutes(consultMinutes))})]})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:color.brand,paddingHorizontal:space.lg},topRow:{flexDirection:"row",alignItems:"center",gap:space.md},tip:{flexDirection:"row",gap:space.md,alignItems:"flex-start",paddingTop:space.sm},tipNumber:{...face(theme,"monoBold"),color:ON_BRAND.textSecondary,fontSize:13,width:24,paddingTop:4},leaveHit:{minHeight:MIN_TOUCH_TARGET,justifyContent:"center",paddingVertical:space.xs,paddingRight:space.md},leaveLabel:{...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:color.success,backgroundColor:ON_BRAND.surface,marginBottom:space.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:ON_BRAND.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:ON_BRAND.glyph},title:{...face(theme,"bold"),color:color.text.onBrand,fontSize:type.size.heading,lineHeight:Math.round(type.size.heading*type.lineHeight.snug),textAlign:"center",paddingHorizontal:space.sm},dotRow:{flexDirection:"row",gap:space.xs,marginTop:space.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:color.success},prepCard:{borderRadius:radius.lg,borderWidth:1,borderColor:ON_BRAND.hairline,backgroundColor:ON_BRAND.surface,padding:space.lg,marginBottom:space.lg},prepLabel:{...face(theme,"monoBold"),color:color.accent,fontSize:type.size.micro,letterSpacing:1.2,textTransform:"uppercase"},prepBody:{...face(theme,"regular"),color:color.text.onBrand,fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:space.lg,marginBottom:space.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:space.md,alignItems:"center",justifyContent:"center",borderRadius:radius.pill,backgroundColor:ON_BRAND.surfaceRaised},controlOff:{backgroundColor:ON_BRAND.surfaceActive},duration:{...face(theme,"medium"),color:ON_BRAND.textTertiary,fontSize:type.size.micro,letterSpacing:1.6,textAlign:"center"}})}var LEAVE_SETTLE_MS=5e3;function settleWithin(work,ms){return new Promise(resolve=>{let timer=setTimeout(resolve,ms);work.catch(()=>{}).then(()=>{clearTimeout(timer),resolve()})})}function useLeaveOnce(onLeave,teardown){let onLeaveRef=react.useRef(onLeave);react.useEffect(()=>{onLeaveRef.current=onLeave});let liveRef=react.useRef(false);react.useEffect(()=>(liveRef.current=true,()=>{liveRef.current=false}),[]);let reportedRef=react.useRef(false),reportLeft=react.useCallback(()=>{reportedRef.current||!liveRef.current||(reportedRef.current=true,onLeaveRef.current())},[]),leavingRef=react.useRef(false),leave=react.useCallback(()=>{leavingRef.current||(leavingRef.current=true,settleWithin(teardown(),LEAVE_SETTLE_MS).then(reportLeft))},[teardown,reportLeft]);return{reportLeft:reportLeft,leave:leave,leaving:leavingRef}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function hasRecordingNoticeAccepted(roomUrl){return(receipts().get(roomUrl)??0)>0}function useSpeakerRoute(callRef){let[speakerOn,setSpeakerOn]=react.useState(true),route=react.useRef(true),toggleSpeaker=react.useCallback(()=>{let call=callRef.current;if(!call?.setNativeInCallAudioMode)return;let next=!route.current;route.current=next,setSpeakerOn(next),call.setNativeInCallAudioMode(next?"video":"voice")},[callRef]);return{speakerOn:speakerOn,toggleSpeaker:toggleSpeaker}}function asTrack(track){return track??null}function hasVideo(participant){return!!participant?.videoTrack}function PersonMark({styles:styles}){/* @__PURE__ */
49
47
  return jsxRuntime.jsxs(reactNative.View,{style:styles.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[
50
48
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.remoteOffHead}),
51
49
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.remoteOffBody})]})}function EverfurVetCall(props){/* @__PURE__ */
@@ -3,7 +3,7 @@ import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { T as TelemetryPort } from '../../TelemetryPort-BDNr00hu.cjs';
4
4
  import { O as OptionalModule } from '../../optionalModule-DbJmsq5f.cjs';
5
5
  export { V as VetCallPhase, i as isSafeRoomUrl, a as isUsableRoomCredential } from '../../callRoom-BhIdadyV.cjs';
6
- export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY } from '../../callCopy-DHjem0R-.cjs';
6
+ export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY } from '../../callCopy-Bw6oZT54.cjs';
7
7
  import '../../EverfurError-DeBqRpQV.cjs';
8
8
 
9
9
  /**
@@ -3,7 +3,7 @@ import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { T as TelemetryPort } from '../../TelemetryPort-BDNr00hu.js';
4
4
  import { O as OptionalModule } from '../../optionalModule-DbJmsq5f.js';
5
5
  export { V as VetCallPhase, i as isSafeRoomUrl, a as isUsableRoomCredential } from '../../callRoom-B92eH_ij.js';
6
- export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY } from '../../callCopy-DHjem0R-.js';
6
+ export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY } from '../../callCopy-Bw6oZT54.js';
7
7
  import '../../EverfurError-DeBqRpQV.js';
8
8
 
9
9
  /**