@everfur/sdk 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bookingCopy.d-BuDv16WP.d.ts → bookingCopy.d-BL2-URcv.d.ts} +3 -2
- package/dist/{bookingCopy.d-rnBSqOSN.d.cts → bookingCopy.d-Dfew1pjY.d.cts} +3 -2
- package/dist/care/index.cjs +2 -2
- package/dist/care/index.js +2 -2
- package/dist/chat/index.cjs +235 -234
- package/dist/chat/index.js +311 -310
- package/dist/chat/lite/index.cjs +339 -338
- package/dist/chat/lite/index.js +314 -313
- package/dist/{chunk-4KFFE42Z.js → chunk-2T5CB5MW.js} +20 -20
- package/dist/{chunk-HHCGXQJR.js → chunk-ASE36WGP.js} +11 -11
- package/dist/{chunk-6IHY7HS7.js → chunk-CMDCBYUH.js} +1 -1
- package/dist/{chunk-BMYNDBUR.js → chunk-K7YHXFPQ.js} +1 -1
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +31 -31
- package/dist/core/index.js +31 -31
- package/dist/health-plan/index.cjs +266 -266
- package/dist/health-plan/index.js +443 -443
- package/dist/{inbox.d-DJ9xgU1Z.d.ts → inbox.d-B2JXK0uI.d.ts} +1 -1
- package/dist/{inbox.d-CPcMMz-Y.d.cts → inbox.d-CwA1ogzV.d.cts} +1 -1
- package/dist/index.cjs +257 -256
- package/dist/index.js +364 -363
- package/dist/{models.d-BULqCO2R.d.ts → models.d-NAWqF1wC.d.ts} +4 -1
- package/dist/{models.d-BKmOfoqV.d.cts → models.d-wJ_Ze4p5.d.cts} +4 -1
- package/dist/notifications/inbox/index.cjs +28 -28
- package/dist/notifications/inbox/index.d.cts +5 -5
- package/dist/notifications/inbox/index.d.ts +5 -5
- package/dist/notifications/inbox/index.js +53 -53
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +3 -3
- package/dist/notifications/index.d.ts +3 -3
- package/dist/notifications/index.js +1 -1
- package/dist/{parse.d-Cj3fURer.d.ts → parse.d-QjB2LJCd.d.ts} +19 -10
- package/dist/{parse.d-cH7ZmMeo.d.cts → parse.d-_Ttu2h5g.d.cts} +19 -10
- package/dist/records/depth/index.cjs +80 -80
- package/dist/records/depth/index.js +115 -115
- package/dist/records/index.cjs +653 -653
- package/dist/records/index.js +1074 -1074
- package/dist/{route.d-DSYEd2MR.d.ts → route.d-DtuKY5dM.d.ts} +1 -1
- package/dist/{route.d-DCzQh4ix.d.cts → route.d-Nt-r-7IO.d.cts} +1 -1
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shop/index.cjs +188 -188
- package/dist/shop/index.js +386 -386
- package/dist/shop/orders-v2/index.cjs +72 -72
- package/dist/shop/orders-v2/index.js +126 -126
- package/dist/tabs/index.cjs +114 -111
- package/dist/tabs/index.d.cts +19 -6
- package/dist/tabs/index.d.ts +19 -6
- package/dist/tabs/index.js +191 -188
- package/dist/televet/booking/index.cjs +214 -212
- package/dist/televet/booking/index.d.cts +2 -2
- package/dist/televet/booking/index.d.ts +2 -2
- package/dist/televet/booking/index.js +344 -342
- package/dist/televet/call/index.cjs +53 -53
- package/dist/televet/call/index.js +67 -67
- package/dist/{useInboxUnread.d-CXiaR3BZ.d.ts → useInboxUnread.d-0DrQPn7J.d.ts} +1 -1
- package/dist/{useInboxUnread.d-DERpMelw.d.cts → useInboxUnread.d-CRcOTkmu.d.cts} +1 -1
- package/dist/web/health-plan/index.cjs +1 -1
- package/dist/web/health-plan/index.js +1 -1
- package/dist/web/inbox/index.cjs +1 -1
- package/dist/web/inbox/index.d.cts +6 -6
- package/dist/web/inbox/index.d.ts +6 -6
- package/dist/web/inbox/index.js +1 -1
- package/dist/web/index.cjs +184 -184
- package/dist/web/index.js +181 -181
- package/dist/web/notifications/index.cjs +1 -1
- package/dist/web/notifications/index.d.cts +2 -2
- package/dist/web/notifications/index.d.ts +2 -2
- package/dist/web/notifications/index.js +1 -1
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.js +1 -1
- package/dist/web/shop/index.cjs +1 -1
- package/dist/web/shop/index.js +2 -2
- package/dist/web/televet/booking/index.cjs +7 -8
- package/dist/web/televet/booking/index.d.cts +2 -2
- package/dist/web/televet/booking/index.d.ts +2 -2
- package/dist/web/televet/booking/index.js +7 -8
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/ui/index.cjs +1 -1
- package/dist/web/ui/index.js +33 -33
- package/package.json +1 -1
package/dist/tabs/index.js
CHANGED
|
@@ -1,203 +1,206 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import{EverfurChat as e,useEverfurUnread,EverfurPoweredBy as t}from"@everfur/sdk/chat";import{useHealthPlanPage,HealthPlanScrollScope as n,EverfurHealthPlan as r,useEverfurHealthPlan}from"@everfur/sdk/health-plan";import{useEverfurRecordsClinic,EverfurRecords as o,EverfurRecordsConsent as i,useEverfurRecords}from"@everfur/sdk/records";import{createContext,forwardRef as a,createElement as l,useRef as s,useState as d,useMemo as c,useEffect as u,useCallback as p,useContext as f,useLayoutEffect as h,useSyncExternalStore as g}from"react";import{TextInput as b,StyleSheet as m,View as y,Pressable as v,Easing as k,Platform as w,Text as _,Image as S,Animated as x,PanResponder as C,Modal as R,KeyboardAvoidingView as F,ScrollView as A,Dimensions as I,AccessibilityInfo as T,AppState as E,useWindowDimensions as D,ActivityIndicator as O}from"react-native";import{jsx as z,jsxs as P,Fragment as B}from"react/jsx-runtime";import{EverfurInboxBell as N,EverfurInboxSheet as $}from"@everfur/sdk/notifications/inbox";import{useVetVisit}from"@everfur/sdk/televet";var L=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),j=globalThis;function W(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var U=j[L],V=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),M=W(U)?U:j[L]=V(),q=M.landed,H=M.noVet,K=M.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...q])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return q.add(e),()=>{q.delete(e)}}function setHealthPlanNoVet(petRef,e){if((K.get(petRef)??false)!==e){e?K.set(petRef,true):K.delete(petRef);for(let t of[...H])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return K.get(petRef)??false}function onHealthPlanNoVet(e){return H.add(e),()=>{H.delete(e)}}var Y=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],G=/* @__PURE__ */Object.freeze(Y.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(G.map(e=>e.wireCode));var J=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),Q=/* @__PURE__ */Object.freeze(G.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:J[e.wireCode]}))),Z=new Map(Q.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),X=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(Q.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...X]){let t=Z.get(e+n);if(t)return t}}var ee=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return ee[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var te=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return te.has(e)}var ne=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||ne.has(e)}var re=500,oe=8e3,ie=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(re*2**n,oe);return Math.floor(t()*r)}var ae="This feature isn't available on your account right now.",le="Something in that request was not right. Check the details and try again.",se=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ae,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:le,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ae,runtimeDisposed:le,unknown:"Something went wrong. Please try again."}),de="This session has ended. Please sign in again.",ce="linked_account_read_only";function ue(e,t,n){return e==="conflict"&&n===ce?ae:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?de:userFacingError(e)}function userFacingError(e){return se[e]}function pe(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var fe=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ce,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:ue(e,t?.wireCode,r?ce:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&fe.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&pe(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&pe(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
|
|
2
|
+
import{EverfurChat as e,useEverfurUnread,EverfurPoweredBy as t}from"@everfur/sdk/chat";import{useHealthPlanPage,HealthPlanScrollScope as n,EverfurHealthPlan as r,useEverfurHealthPlan}from"@everfur/sdk/health-plan";import{useEverfurRecordsClinic,EverfurRecords as o,EverfurRecordsConsent as i,useEverfurRecords}from"@everfur/sdk/records";import{createContext,forwardRef as a,createElement as l,useRef as s,useState as d,useMemo as c,useEffect as u,useCallback as p,useContext as f,useLayoutEffect as h,useSyncExternalStore as g}from"react";import*as b from"react-native";import{TextInput as m,StyleSheet as y,View as v,Pressable as k,Easing as w,Platform as _,Text as S,Image as x,Animated as C,PanResponder as R,Modal as F,KeyboardAvoidingView as A,ScrollView as I,Dimensions as T,AccessibilityInfo as E,AppState as D,useWindowDimensions as O,ActivityIndicator as z}from"react-native";import{jsx as P,jsxs as B,Fragment as N}from"react/jsx-runtime";import{EverfurInboxBell as $,EverfurInboxSheet as L}from"@everfur/sdk/notifications/inbox";import{useVetVisit}from"@everfur/sdk/televet";import{SafeAreaInsetsContext as j,SafeAreaProvider as W,initialWindowMetrics as U,useSafeAreaInsets as V}from"react-native-safe-area-context";var M=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),q=globalThis;function H(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var K=q[M],Y=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),G=H(K)?K:q[M]=Y(),J=G.landed,Q=G.noVet,Z=G.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...J])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return J.add(e),()=>{J.delete(e)}}function setHealthPlanNoVet(petRef,e){if((Z.get(petRef)??false)!==e){e?Z.set(petRef,true):Z.delete(petRef);for(let t of[...Q])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return Z.get(petRef)??false}function onHealthPlanNoVet(e){return Q.add(e),()=>{Q.delete(e)}}var X=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],ee=/* @__PURE__ */Object.freeze(X.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(ee.map(e=>e.wireCode));var te=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),ne=/* @__PURE__ */Object.freeze(ee.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:te[e.wireCode]}))),re=new Map(ne.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),oe=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(ne.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...oe]){let t=re.get(e+n);if(t)return t}}var ie=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return ie[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var ae=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return ae.has(e)}var le=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||le.has(e)}var se=500,de=8e3,ce=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(se*2**n,de);return Math.floor(t()*r)}var ue="This feature isn't available on your account right now.",pe="Something in that request was not right. Check the details and try again.",fe=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ue,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:pe,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ue,runtimeDisposed:pe,unknown:"Something went wrong. Please try again."}),he="This session has ended. Please sign in again.",ge="linked_account_read_only";function be(e,t,n){return e==="conflict"&&n===ge?ue:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?he:userFacingError(e)}function userFacingError(e){return fe[e]}function me(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var ye=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ge,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:be(e,t?.wireCode,r?ge:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&ye.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&me(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&me(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
|
|
3
3
|
return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
|
|
4
|
-
return Object.freeze({ok:false,error:e})}var
|
|
5
|
-
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var
|
|
4
|
+
return Object.freeze({ok:false,error:e})}var ve=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function errorFrame(e){/* @__PURE__ */
|
|
5
|
+
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var ke="x-everfur-anon-token",we="anonTokenInvalid";async function _e(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function Se(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[ke]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...xe(e.headers),...authHeaders(t)}}}function xe(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===ke||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await _e(t),r=await t.transport.request(withAuthHeaders(e,Ce(t,n)));if(r.ok||Fe(r.error.raw)!==we||t.anonIdentity===void 0||t.userRef!==null)return r;let o=await t.anonIdentity.token({forceRefresh:true});return o===null||o===n?r:t.transport.request(withAuthHeaders(e,Ce(t,o)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(Se(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let o;try{o=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(Se(e,{wireCode:Fe(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:o,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(Re(i.error))):i}function Ce(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function Re(e){let t=e.raw,n=Fe(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function Fe(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Ae(e)})}function Ae(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var Ie=3e4,Te=de*2,Ee="idempotency-key",De=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Oe=/* @__PURE__ */Object.freeze({onEvent(){}}),ze=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function Pe(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??Oe,n=e.timers??ze,r=e.rng??Math.random,o=e.sleep??((e,t)=>Qe(e,n,t)),i=e.maxAttempts??ce,a=e.unaryTimeoutMs??Ie,l=e.newIdempotencyKey??Ne(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,c){let u=c?.maxAttempts,p=Math.max(1,u??i),f=c?.idempotent??De.has(d.method),h=c?.idempotencyKey===void 0?null:Pe(c.idempotencyKey),g=f?h??l():null,b=Be(d,g),m=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:m,...g?{idempotencyKey:g}:{},...e});s(i({phase:"attempt"}));let l=Ge(a,n),c=Je(l.signal,d.signal),f;try{f=await authedSend({...b,signal:c.signal},e.auth)}catch(e){f=err(networkError(e))}finally{c.dispose(),l.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=Le(h,m,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await o(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);m+=1}}async function c(t){return withAuthHeaders(t,await Ye(e.auth))}async function*u(t,n,r){s(
|
|
6
6
|
/* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:n.method,path:n.path,attempt:0}));try{yield*e.auth.transport.stream(n,r)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
|
|
7
|
-
return Object.freeze({send:d,authorize:c,stream:u})}function Ee(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Re&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function De(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var Oe=10;function ze(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=Pe(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(Oe,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=Be(e,n.now);return l!==null?l>Ce?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function Pe(e){let t=e.code==="unknown"?fromWire(We(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function Be(e,t){let n=$e(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=Ne(e.raw);return r===null?null:Math.round(r*1e3)}function Ne(e){for(let t of Le(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function $e(e){for(let t of Le(e)){let e=t.resets_at,n=je(e);if(n!==null)return n}return null}function Le(e){if(!Ue(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Ue(r)&&t.push(r)}return t}function je(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function We(e){for(let t of Le(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Ue(e){return typeof e=="object"&&e!==null}async function Ve(e){if(e.mode==="anonymous"){let t=await me(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Me(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function qe(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function He(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var Ke="/widget/v1/me/intro";function Ye(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function Ge(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function Je(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function Qe(e){let t=()=>{let{services:t}=e.registry;return Ze({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(Ye(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function Ze(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=Je(o.value);return i===null?err(Ge(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:Ke,signal:e.signal}:{method:"GET",path:Ke};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:Ke,body:{seen:true}})}}}var Xe="everfur.intro.seen.v1:",et=userRef=>`${Xe}${userRef}`;async function tt(e,userRef){try{return await e.getItem(et(userRef))!==null}catch{return false}}async function nt(e,userRef,t){try{await e.setItem(et(userRef),t)}catch{}}async function rt(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await tt(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await nt(n,userRef,o.value.seenAt),false):true}async function ot(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await nt(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var it=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),at=globalThis,lt=at[it]??(at[it]=createContext(null));lt.displayName??="EverfurContext";function st(){let e=f(lt);if(e===null)throw new he("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var dt=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${dt(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var ct=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var ut=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?ut[e]??null:null}var pt=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${pt(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var ft=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),ht=globalThis;function gt(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var bt=ht[ft],mt=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),yt=gt(bt)?bt:ht[ft]=mt();function vt(){for(let e of[...yt.listeners])try{e()}catch{}}function kt(){let e={};return yt.holds.add(e),yt.holds.size===1&&vt(),()=>{yt.holds.delete(e)&&yt.holds.size===0&&vt()}}function wt(e){u(()=>e?kt():void 0,[e])}function _t(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var St=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var xt=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
|
|
7
|
+
return Object.freeze({send:d,authorize:c,stream:u})}function Be(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Ee&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function Ne(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var $e=10;function Le(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=je(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min($e,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=We(e,n.now);return l!==null?l>Te?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function je(e){let t=e.code==="unknown"?fromWire(He(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function We(e,t){let n=Ve(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=Ue(e.raw);return r===null?null:Math.round(r*1e3)}function Ue(e){for(let t of Me(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function Ve(e){for(let t of Me(e)){let e=t.resets_at,n=qe(e);if(n!==null)return n}return null}function Me(e){if(!Ke(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Ke(r)&&t.push(r)}return t}function qe(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function He(e){for(let t of Me(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Ke(e){return typeof e=="object"&&e!==null}async function Ye(e){if(e.mode==="anonymous"){let t=await _e(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Ge(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function Je(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function Qe(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var Ze="/widget/v1/me/intro";function Xe(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function et(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function tt(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function nt(e){let t=()=>{let{services:t}=e.registry;return rt({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(Xe(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function rt(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=tt(o.value);return i===null?err(et(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:Ze,signal:e.signal}:{method:"GET",path:Ze};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:Ze,body:{seen:true}})}}}var ot="everfur.intro.seen.v1:",it=userRef=>`${ot}${userRef}`;async function at(e,userRef){try{return await e.getItem(it(userRef))!==null}catch{return false}}async function lt(e,userRef,t){try{await e.setItem(it(userRef),t)}catch{}}async function st(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await at(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await lt(n,userRef,o.value.seenAt),false):true}async function dt(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await lt(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var ct=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),ut=globalThis,pt=ut[ct]??(ut[ct]=createContext(null));pt.displayName??="EverfurContext";function ft(){let e=f(pt);if(e===null)throw new ve("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var ht=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${ht(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var gt=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var bt=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?bt[e]??null:null}var mt=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${mt(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var yt=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),vt=globalThis;function kt(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var wt=vt[yt],_t=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),St=kt(wt)?wt:vt[yt]=_t();function xt(){for(let e of[...St.listeners])try{e()}catch{}}function Ct(){let e={};return St.holds.add(e),St.holds.size===1&&xt(),()=>{St.holds.delete(e)&&St.holds.size===0&&xt()}}function Rt(e){u(()=>e?Ct():void 0,[e])}function Ft(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var At=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var It=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
|
|
8
8
|
return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:t});case"pet":return e.eventType==="chat.reminder_due"?/* @__PURE__ */Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:/* @__PURE__ */Object.freeze({kind:"chat",petRef:t.petRef,conversationId:null})}):e.eventType.startsWith("care.")?null:/* @__PURE__ */Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"tip":/* @__PURE__ */
|
|
9
9
|
return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:null});case"record_request":/* @__PURE__ */
|
|
10
10
|
return Object.freeze({surface:"records",petRef:t.petRef,requestId:t.requestId});case"records":case"vaccine":case"labs":/* @__PURE__ */
|
|
11
11
|
return Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"visit":/* @__PURE__ */
|
|
12
12
|
return Object.freeze({surface:"visit",visitRef:t.visitRef,intent:t.intent,petRef:t.petRef});case"health_plan":/* @__PURE__ */
|
|
13
|
-
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function
|
|
13
|
+
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Tt(e,t,n){let r=new Date(e),o=r.getTime();if(Number.isNaN(o))return null;let i=t-o;if(i<6e4)return n;if(i<36e5)return`${Math.floor(i/6e4)}m`;if(i<864e5)return`${Math.floor(i/36e5)}h`;if(i<6048e5)return`${Math.floor(i/864e5)}d`;if(i<5*6048e5)return`${Math.floor(i/6048e5)}w`;let a=r.getFullYear()===new Date(t).getFullYear();try{return r.toLocaleDateString("en-US",{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}catch{return r.toISOString().slice(0,10)}}function Et(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Dt(e,t,n){let r=e.notification===null?null:surfaceForNotification(e.notification);if(r?.surface==="health_plan")return{tab:"plan"};if(r?.surface==="records")return{tab:"records"};if(r?.surface==="visit")return null;let{item:o}=e;if(o.title.trim()==="")return null;let i=Tt(o.createdAt,n,t.now),a=i!==null&&Et(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}/g,"").replace(/\{time\}/g,""):t.kicker.replace(/\{time\}/g,a);return{tab:"ask",prompt:o.title,card:{kicker:l,title:o.title,...o.body.trim()===""?{}:{body:o.body}}}}var Ot="your pet";var zt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function Pt(){let e=globalThis,t=e[zt];if(t!==void 0)return t;let n={factory:createContext(null),home:createContext(null)};return e[zt]=n,n}var Bt=Pt().factory;Pt().home;var Nt=()=>{};function $t(){try{return D.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let t;try{let n=D.currentState==="background";t=D.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return Nt}return()=>t.remove()},isVisible:$t}}var Lt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatPaneShown");function jt(){let e=globalThis,t=e[Lt];if(t!==void 0)return t;let n=createContext(true);return e[Lt]=n,n}var Wt=jt();function Ut(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}var Vt=/* @__PURE__ */Object.freeze({ask:"Ask",plan:"Health Plan",records:"Records",listAll:"Ask, Health Plan and Records",listNoPlan:"Ask and Records"}),Mt=/* @__PURE__ */Object.freeze(["ask","plan","records"]),qt=/* @__PURE__ */Object.freeze(["ask","records"]);function Ht(e){return e?qt:Mt}function Kt(e,t){return e==="plan"&&t?"ask":e}function Yt(e,t){return e.via==="link"?Kt(e.ask!==void 0?"ask":e.tab,t):Kt("plan",t)}function Gt(e){let t=e.key===void 0?"":String(e.key);return e.via==="link"?`link:${e.tab}:${e.ask?.prompt??""}:${t}`:`plain:${t}`}var Jt=6e4;function Qt(e,t,n=Jt){return e!==null&&t-e>=n}function Zt(e){return e.pageVisible&&e.watching&&Qt(e.lastReadAt,e.now)}function Xt(e){return JSON.stringify(e,(e,t)=>{if(t===null||typeof t!="object"||Array.isArray(t))return t;let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n})}function en(e){if(e===null)return"";let t=e.items.map(e=>[e.productId,e.partnerSku,e.title,e.description,e.category,e.price,e.currency,e.imageUrl,e.url,e.sample]).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);return JSON.stringify([e.headline,t])}function tn(e){return e===null?"":Xt([e.checkout,e.page])}function nn(e,t){return JSON.stringify([en(e),tn(t)])}function rn(e,t){return e!=="empty"&&e!=="ready"?false:t==="ready"||t==="failed"||t==="idle"}function on(e,t){return e==="empty"&&!Ut(t?.page)}function an(e,t){return e===void 0?{empty:t.empty,signature:t.signature,epoch:0}:e.empty===t.empty&&e.signature===t.signature?e:{empty:t.empty,signature:t.signature,epoch:e.signature===t.signature?e.epoch:e.epoch+1}}var ln=5e3;function sn(e){return e.sameOpen?e.plan===void 0?e.planFailed?"drop":"wait":e.plan.empty?"drop":e.recordsPending?"wait":"play":"drop"}function dn(){let e=/* @__PURE__ */new Set;return{listen(t){let n=()=>t();return e.add(n),()=>{e.delete(n)}},fire(){for(let t of[...e])try{t()}catch{}}}}function cn(e,t){return{...{onForeground(n){let r=e.onForeground(n),o=t.listen(n);return()=>{o(),r()}}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function un(e,t){return{...{onForeground(n){return e.onForeground(()=>{t()&&n()})}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function pn(e,t){return!e&&t}var fn=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return fn[e]}function decideCapability(e,t,n){let r=requires(e),o=/* @__PURE__ */new Map;for(let e of t)o.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!o.has(e)))return bn({name:e,enabled:false,isPending:true,limits:{}});let i=hn(r,o);return r.filter(e=>o.get(e)?.granted!==true).length===0?bn({name:e,enabled:true,isPending:false,limits:i}):bn({name:e,enabled:false,isPending:false,limits:i,disabled:gn(r,o)})}function hn(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function gn(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
|
|
14
14
|
return Object.freeze({reason:e.reason,level:e.level,recoverable:e.recoverable})}/* @__PURE__ */
|
|
15
|
-
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function un(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function pn(e){let{runtime:t}=st(),n=t.entitlements,r=p(e=>n===void 0?()=>{}:n.subscribe(e),[n]),o=p(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return g(r,o,o)}var fn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[fn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[fn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function hn(e){return e<=450?"regular":e<=650?"medium":"bold"}var gn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=bn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,bn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=mn(e,t);return n.set(t,o),o}var bn=/* @__PURE__ */new WeakMap;function mn(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=hn(Number(r)),i=n.face==="mono"?face(e,gn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var yn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var vn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){vn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var kn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var wn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},_n={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Sn={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},xn={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Cn={regular:"400",medium:"500",bold:"700"},Rn={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Fn=0,An="System",In="monospace",Tn=["content","heading","control","compact","badge"];function En(e){let t={};for(let n of Tn)t[n]=e;return t}var Dn=[];function On(){return{family:An,mono:In,fontUrl:null,families:{regular:An,medium:An,bold:An,mono:In,monoMedium:In,monoBold:In},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Sn,tierSizes:En(Sn),lineHeight:xn,weight:Cn,letterSpacing:Rn,scale:1,maxScale:Fn,scaleCaps:kn,headingFamily:null,headingWeight:null,fontSources:Dn,roles:yn,typeScale:1}}var zn={},Pn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var Bn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(Pn.standard),emphasized:cssCubicBezier(Pn.emphasized),exit:cssCubicBezier(Pn.exit)},reducedMotion:false},Nn={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},$n=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Nn,space:wn,radius:_n,type:On(),motion:Bn,slots:zn}),Ln={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Ln,space:wn,radius:_n,type:On(),motion:Bn,slots:zn});var jn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Wn=globalThis,Un=Wn[jn]??(Wn[jn]=createContext($n));Un.displayName??="EverfurThemeContext";function useEverfurTheme(){return f(Un)}function Vn(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),o=t===void 0?void 0:r.type.roles[t],i=Vn(r.type,e??o?.tier??"content"),a=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return l(_,i===void 0?a:{maxFontSizeMultiplier:i,...a})}var Mn=a(function(e,t){return l(b,{...e,...t===null?{}:{ref:t}})});function parseColor(e){let t=qn(e);return t===null?null:Zn(t)}function qn(e){if(typeof e=="number")return Yn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return Hn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return Hn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return Kn(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=Hn(t);if(e!==null)return e}return/^\d+$/.test(t)?Yn(Number.parseInt(t,10)):null}function Hn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:Jn(t[0]),g:Jn(t[1]),b:Jn(t[2]),a:1};if(t.length===6)return{r:Gn(t,0),g:Gn(t,2),b:Gn(t,4),a:1};if(t.length===8){let e=Gn(t,0);return{r:Gn(t,2),g:Gn(t,4),b:Gn(t,6),a:e/255}}return null}function Kn(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=Qn(Number(r[0])),i=Qn(Number(r[1])),a=Qn(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function Yn(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function Gn(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Jn(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Qn(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Zn(e){if(e.a>=1)return Xn(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function Xn(e,t,n){return`#${er(e)}${er(t)}${er(n)}`.toUpperCase()}function er(e){return e.toString(16).padStart(2,"0")}var tr="#111111",nr="#FFFFFF",rr="#000000";function readableOn(e){let t=qn(e);if(t===null)return nr;let n=ar(t),r=ar({r:17,g:17,b:17}),o=ar({r:255,g:255,b:255});return sr(n,o)>=sr(n,r)?nr:tr}function or(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(nr,e)>=contrastRatio(rr,e)?nr:rr}function ir(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(nr)>=t(rr)?nr:rr}function ar(e){let t=lr(e.r/255),n=lr(e.g/255),r=lr(e.b/255);return.2126*t+.7152*n+.0722*r}function lr(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function sr(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=qn(e),r=qn(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:dr(n,o);return sr(ar(i),ar(o))}function dr(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function cr(e,t){let n=qn(e),r=qn(t);if(n===null||r===null)return null;let o=n.a>=1?n:dr(n,{...r});return Xn(o.r,o.g,o.b)}function ur(e,t){let n=qn(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var pr=.05;function fr(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(qn(e)===null)return n;if(i(e))return e;let a=cr(e,o),l=a===null?null:qn(a),s=qn(n);if(l===null||s===null)return n;for(let e=1;e<1/pr;e+=1){let t=e*pr,n=(e,n)=>Math.round(e+(n-e)*t),r=Xn(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var hr=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),gr=/* @__PURE__ */new WeakMap;function br(e){let t=gr.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...hr},i=(e,t)=>fr(e,t,ir(t),mr),a=(e,t)=>contrastRatio(e,t)>=mr?e:or(t,mr),l=[o.card,o.paper].map(e=>cr(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return gr.set(e,d),d}var mr=4.5;function yr(e,t){for(let n of t)if(contrastRatio(n,e)>=mr)return n;return or(e,mr)}function vr(e,t,n){let r=ur(e,t);return(r===null?null:cr(r,n))??n}function kr(e){let t=br(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:yr(t.accent,[t.ink,t.onAccent]),accent2:vr(t.accent,.75,r),accent4:vr(t.accent,.17,r),accentChip:vr(t.accent,.47,r),link:t.link,linkChip:vr(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var wr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),_r=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),Sr=["paddingTop","paddingRight","paddingBottom","paddingLeft"],xr=17,Cr=1.5,Rr=400,Fr=700;function Ar(e){return e<=450?"regular":e<=650?"medium":"bold"}function Ir(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Tr(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Ir(n)}}let r=t==="$serif"?headingFace(e,Ar(n)):face(e,Ar(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Ir(n)}}function Er(e,t,n={}){let r=kr(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))wr.has(e)||_r.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of Sr){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:xr,d=typeof a.lh=="number"?a.lh:Cr,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Tr(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(Rr,e),strong:(...e)=>p(Fr,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var Dr={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Or=16;var zr=4e3,Pr=.5;function Br(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function Nr(e,t,n){if(e.length===0)return n;let r=Br(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=Pr*e.length+1;for(let a of o)if(Br(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=c(()=>e.split(/\s+/).filter(e=>e!==""),[e]),o=m.flatten(t),i=[e,o.fontFamily,o.fontSize,o.fontWeight,o.letterSpacing].join("|"),a=s({key:"",ch:null,line:null,words:[]});a.current.key!==i&&(a.current={key:i,ch:null,line:null,words:r.map(()=>null)});let[l,u]=d(null),p=l!==null&&l.key===i?l.value:null,f=()=>{let e=a.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=Nr(t,o,(e.ch+Pr)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{a.current.key===i&&(e(a.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
|
|
16
|
-
return P(y,{style:$r.wrap,children:[
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Co={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},Ro={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},Fo=[.23,1,.32,1],Ao=[.32,.72,0,1],Io={opacity:0,translateY:8},To={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Eo={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Do={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=Do[e];/* @__PURE__ */
|
|
23
|
-
return z(S,{source:{uri:r.uri,width:r.width*3,height:r.height*3},style:[{width:r.width,height:r.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",...n===void 0?{}:{testID:n}})}var Oo={transform:[{scale:Eo.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:o=false,busy:i=false,icon:a,style:l,testID:s}){let d=[".emb-btn",".in-body .emb-btn",...r,o&&".emb-btn[disabled]"];/* @__PURE__ */
|
|
24
|
-
return P(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
return P(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */P(
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */P(
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */P(
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */P(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/* @__PURE__ */P(
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
return P(
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */P(
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */P(
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
98
|
-
return P(
|
|
99
|
-
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
15
|
+
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function bn(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function mn(e){let{runtime:t}=ft(),n=t.entitlements,r=p(e=>n===void 0?()=>{}:n.subscribe(e),[n]),o=p(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return g(r,o,o)}var yn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[yn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[yn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function vn(e){return e<=450?"regular":e<=650?"medium":"bold"}var kn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=wn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,wn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=_n(e,t);return n.set(t,o),o}var wn=/* @__PURE__ */new WeakMap;function _n(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=vn(Number(r)),i=n.face==="mono"?face(e,kn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var Sn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var xn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){xn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var Cn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var Rn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Fn={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},An={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},In={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Tn={regular:"400",medium:"500",bold:"700"},En={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Dn=0,On="System",zn="monospace",Pn=["content","heading","control","compact","badge"];function Bn(e){let t={};for(let n of Pn)t[n]=e;return t}var Nn=[];function $n(){return{family:On,mono:zn,fontUrl:null,families:{regular:On,medium:On,bold:On,mono:zn,monoMedium:zn,monoBold:zn},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:An,tierSizes:Bn(An),lineHeight:In,weight:Tn,letterSpacing:En,scale:1,maxScale:Dn,scaleCaps:Cn,headingFamily:null,headingWeight:null,fontSources:Nn,roles:Sn,typeScale:1}}var Ln={},jn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var Wn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(jn.standard),emphasized:cssCubicBezier(jn.emphasized),exit:cssCubicBezier(jn.exit)},reducedMotion:false},Un={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)"},Vn=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Un,space:Rn,radius:Fn,type:$n(),motion:Wn,slots:Ln}),Mn={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:Mn,space:Rn,radius:Fn,type:$n(),motion:Wn,slots:Ln});var qn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Hn=globalThis,Kn=Hn[qn]??(Hn[qn]=createContext(Vn));Kn.displayName??="EverfurThemeContext";function useEverfurTheme(){return f(Kn)}function Yn(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),o=t===void 0?void 0:r.type.roles[t],i=Yn(r.type,e??o?.tier??"content"),a=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return l(S,i===void 0?a:{maxFontSizeMultiplier:i,...a})}var Gn=a(function(e,t){return l(m,{...e,...t===null?{}:{ref:t}})});var Jn=640,Qn=600,Zn=/* @__PURE__ */Object.freeze({width:0,height:0}),Xn="useWindowDimensions"in b&&typeof b.useWindowDimensions=="function"?b.useWindowDimensions:()=>Zn,er=/* @__PURE__ */Object.freeze({width:"100%",maxWidth:Jn,alignSelf:"center"}),tr=/* @__PURE__ */Object.freeze({...er,flex:1}),nr=/* @__PURE__ */Object.freeze({...er,flexGrow:1,flexShrink:1});function rr(){return Xn().width>=Qn}function or(){let e=rr();return{tablet:e,column:e?tr:{flex:1}}}function ir(e="flow"){let{width:t}=Xn();if(t<Qn)return null;if(e==="flow")return er;let n=Math.max(0,Math.round((t-Jn)/2));return{left:n,right:n}}function ar(e,t){return t===null?e:[e,t]}var lr=/* @__PURE__ */Symbol.for("@everfur/sdk#InSdkColumn@v1"),sr=globalThis,dr=sr[lr]??(sr[lr]=createContext(false));dr.displayName??="EverfurInSdkColumn";function SdkColumnScope({children:e}){/* @__PURE__ */
|
|
16
|
+
return P(dr.Provider,{value:true,children:e})}function SdkTabletColumn({children:e,style:t,testID:n}){let r=rr(),o=f(dr);return!r||o?e:/* @__PURE__ */P(v,{style:t===void 0?nr:[nr,t],testID:n??"everfur-tablet-column",children:/* @__PURE__ */P(dr.Provider,{value:true,children:e})})}function parseColor(e){let t=cr(e);return t===null?null:mr(t)}function cr(e){if(typeof e=="number")return fr(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return ur(t.slice(1));if(t.toLowerCase().startsWith("0x"))return ur(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return pr(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=ur(t);if(e!==null)return e}return/^\d+$/.test(t)?fr(Number.parseInt(t,10)):null}function ur(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:gr(t[0]),g:gr(t[1]),b:gr(t[2]),a:1};if(t.length===6)return{r:hr(t,0),g:hr(t,2),b:hr(t,4),a:1};if(t.length===8){let e=hr(t,0);return{r:hr(t,2),g:hr(t,4),b:hr(t,6),a:e/255}}return null}function pr(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=br(Number(r[0])),i=br(Number(r[1])),a=br(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function fr(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function hr(e,t){return Number.parseInt(e.slice(t,t+2),16)}function gr(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function br(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function mr(e){if(e.a>=1)return yr(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function yr(e,t,n){return`#${vr(e)}${vr(t)}${vr(n)}`.toUpperCase()}function vr(e){return e.toString(16).padStart(2,"0")}var kr="#111111",wr="#FFFFFF",_r="#000000";function readableOn(e){let t=cr(e);if(t===null)return wr;let n=Cr(t),r=Cr({r:17,g:17,b:17}),o=Cr({r:255,g:255,b:255});return Fr(n,o)>=Fr(n,r)?wr:kr}function Sr(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(wr,e)>=contrastRatio(_r,e)?wr:_r}function xr(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(wr)>=t(_r)?wr:_r}function Cr(e){let t=Rr(e.r/255),n=Rr(e.g/255),r=Rr(e.b/255);return.2126*t+.7152*n+.0722*r}function Rr(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fr(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=cr(e),r=cr(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:Ar(n,o);return Fr(Cr(i),Cr(o))}function Ar(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function Ir(e,t){let n=cr(e),r=cr(t);if(n===null||r===null)return null;let o=n.a>=1?n:Ar(n,{...r});return yr(o.r,o.g,o.b)}function Tr(e,t){let n=cr(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var Er=.05;function Dr(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(cr(e)===null)return n;if(i(e))return e;let a=Ir(e,o),l=a===null?null:cr(a),s=cr(n);if(l===null||s===null)return n;for(let e=1;e<1/Er;e+=1){let t=e*Er,n=(e,n)=>Math.round(e+(n-e)*t),r=yr(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var Or=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),zr=/* @__PURE__ */new WeakMap;function Pr(e){let t=zr.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...Or},i=(e,t)=>Dr(e,t,xr(t),Br),a=(e,t)=>contrastRatio(e,t)>=Br?e:Sr(t,Br),l=[o.card,o.paper].map(e=>Ir(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return zr.set(e,d),d}var Br=4.5;function Nr(e,t){for(let n of t)if(contrastRatio(n,e)>=Br)return n;return Sr(e,Br)}function $r(e,t,n){let r=Tr(e,t);return(r===null?null:Ir(r,n))??n}function Lr(e){let t=Pr(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:Nr(t.accent,[t.ink,t.onAccent]),accent2:$r(t.accent,.75,r),accent4:$r(t.accent,.17,r),accentChip:$r(t.accent,.47,r),link:t.link,linkChip:$r(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var jr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),Wr=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),Ur=["paddingTop","paddingRight","paddingBottom","paddingLeft"],Vr=17,Mr=1.5,qr=400,Hr=700;function Kr(e){return e<=450?"regular":e<=650?"medium":"bold"}function Yr(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Gr(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Yr(n)}}let r=t==="$serif"?headingFace(e,Kr(n)):face(e,Kr(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Yr(n)}}function Jr(e,t,n={}){let r=Lr(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))jr.has(e)||Wr.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of Ur){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:Vr,d=typeof a.lh=="number"?a.lh:Mr,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Gr(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(qr,e),strong:(...e)=>p(Hr,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var Qr={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Zr=16;var Xr=4e3,eo=.5;function to(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function no(e,t,n){if(e.length===0)return n;let r=to(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=eo*e.length+1;for(let a of o)if(to(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=c(()=>e.split(/\s+/).filter(e=>e!==""),[e]),o=y.flatten(t),i=[e,o.fontFamily,o.fontSize,o.fontWeight,o.letterSpacing].join("|"),a=s({key:"",ch:null,line:null,words:[]});a.current.key!==i&&(a.current={key:i,ch:null,line:null,words:r.map(()=>null)});let[l,u]=d(null),p=l!==null&&l.key===i?l.value:null,f=()=>{let e=a.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=no(t,o,(e.ch+eo)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{a.current.key===i&&(e(a.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
|
|
17
|
+
return B(v,{style:ro.wrap,children:[
|
|
18
|
+
/* @__PURE__ */P(Text,{tier:"heading",style:p===null?t:[t,{maxWidth:p}],accessibilityRole:"header",children:e}),
|
|
19
|
+
/* @__PURE__ */P(v,{style:ro.probeClip,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */B(v,{style:ro.probeRow,children:[
|
|
20
|
+
/* @__PURE__ */P(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.ch=t}),children:"0"}),
|
|
21
|
+
/* @__PURE__ */P(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:r.join(" ")}),r.map((e,n)=>/* @__PURE__ */P(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var ro=y.create({wrap:{alignSelf:"stretch",alignItems:"center"},probeClip:{position:"absolute",left:0,top:0,width:0,height:0,overflow:"hidden",opacity:0},probeRow:{width:Xr,flexDirection:"row",alignItems:"flex-start"}});function oo(e){return{kit:Jr(e,Qr),Title:BalancedTitle,titleCh:Zr}}function io(e){let t=e.raw;if(typeof t!="object"||t===null)return null;let n=t.code;return typeof n=="string"&&n.length>0?n:null}function ao(e,t){let n=io(e);if(n===null)return e;let r=t[n];return r===void 0?e:makeEverfurError(r.code,{retryable:r.retryable,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId!==void 0?{requestId:e.requestId}:{},wireCode:n,reasonCode:n,...e.wireMessage!==void 0?{wireMessage:e.wireMessage}:{},raw:e.raw})}var lo=/* @__PURE__ */new Set(["expo","fcm","apns"]),so=/* @__PURE__ */new Set(["ios","android"]),co=4096,uo=128,po=64,fo=/[\0- ]/;function ho(e,t){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e,...t?{reasonCode:t}:{}})}function go(e){if(typeof e!="object"||e===null)return ho("registerDevice needs an input object");let{token:t,provider:n,platform:r,installationId:o}=e;return typeof n!="string"||!lo.has(n)?ho("provider must be expo, fcm or apns"):typeof r!="string"||!so.has(r)?ho("platform must be ios or android"):typeof t!="string"||t.trim().length===0||t.length>co||fo.test(t)?ho(`token must be a push token of 1..${co} characters with no whitespace`,"token_invalid"):o!==void 0&&(typeof o!="string"||o.length===0||o.length>uo)?ho(`installationId must be 1..${uo} characters`):null}var bo=/^[A-Za-z][A-Za-z0-9_+-]*(\/[A-Za-z0-9_+-]+){0,2}$/,mo=64,yo=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/,vo=35;function ko(e){return e.httpStatus===400&&e.code==="validationFailed"}function wo(e){let t={...e};return delete t.timezone,delete t.locale,t}function _o(e,t,n){return typeof e=="string"&&e.length<=n&&t.test(e)?e:null}function So(e){return typeof e!="string"||e.length===0||e.length>po?ho(`deviceId must be 1..${po} characters`):fo.test(e)||e.includes("/")||e==="."||e===".."?ho("deviceId is not a device id"):null}function xo(e){if(typeof e!="object"||e===null)return ho("setPreferences needs an input object");let{pushEnabled:t,emailEnabled:n}=e;return typeof t!="boolean"||typeof n!="boolean"?ho("pushEnabled and emailEnabled must both be booleans: the route replaces both switches"):null}function Co(e){return typeof e=="string"&&e.length>0?e:null}function Ro(e){if(typeof e!="object"||e===null)return null;let t=e,n=Co(t.device_id),r=Co(t.provider),o=Co(t.platform),i=Co(t.registered_at),a=Co(t.last_seen_at);if(n===null||r===null||o===null||i===null||a===null||!lo.has(r)||!so.has(o))return null;let l=t.installation_id;/* @__PURE__ */
|
|
22
|
+
return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function Fo(e){if(typeof e!="object"||e===null)return null;let t=e,n=Co(t.updated_at);return typeof t.push_enabled!="boolean"||typeof t.email_enabled!="boolean"||n===null?null:/* @__PURE__ */Object.freeze({pushEnabled:t.push_enabled,emailEnabled:t.email_enabled,updatedAt:n})}function Ao(e){return makeEverfurError("internalError",{retryable:false,wireMessage:`${e}: the response was not the documented shape`})}var Io=/* @__PURE__ */Object.freeze({provider_unsupported:{code:"validationFailed",retryable:false},token_invalid:{code:"validationFailed",retryable:false},device_cipher_unavailable:{code:"serviceUnavailable",retryable:true}});function To(e){return ao(e,Io)}function Eo(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function createNotificationsClient(e){let t=()=>{let{services:t}=e.registry;return Do({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{registerDevice:(n,r)=>e.isDisposed?Promise.resolve(err(Eo("registerDevice"))):t().registerDevice(n,r),unregisterDevice:(n,r)=>e.isDisposed?Promise.resolve(err(Eo("unregisterDevice"))):t().unregisterDevice(n,r),setPreferences:(n,r)=>e.isDisposed?Promise.resolve(err(Eo("setPreferences"))):t().setPreferences(n,r)}}function Do(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=(e,t)=>t?{...e,signal:t}:e;return{async registerDevice(e,r){let o=go(e);if(o!==null)return err(o);let i={token:e.token,provider:e.provider,platform:e.platform};e.installationId!==void 0&&(i.installation_id=e.installationId);let a=_o(e.timezone,bo,mo);a!==null&&(i.timezone=a);let l=_o(e.locale,yo,vo);l!==null&&(i.locale=l);let s=e=>t.send("notifications.registerDevice",n({method:"POST",path:"/widget/v1/me/devices",body:e},r?.signal)),d=await s(i);if(!d.ok&&ko(d.error)&&(a!==null||l!==null)&&(d=await s(wo(i))),!d.ok)return err(To(d.error));let c=Ro(d.value);return c===null?err(Ao("registerDevice")):ok(c)},async unregisterDevice(e,r){let o=So(e);if(o!==null)return err(o);let i=await t.send("notifications.unregisterDevice",n({method:"DELETE",path:`/widget/v1/me/devices/${encodeURIComponent(e)}`},r?.signal));return i.ok?ok(void 0):err(To(i.error))},async setPreferences(e,r){let o=xo(e);if(o!==null)return err(o);let i=await t.send("notifications.setPreferences",n({method:"PUT",path:"/widget/v1/me/notification-preferences",body:{push_enabled:e.pushEnabled,email_enabled:e.emailEnabled}},r?.signal));if(!i.ok)return err(To(i.error));let a=Fo(i.value);return a===null?err(Ao("setPreferences")):ok(a)}}}function Oo(e,t){let n=`${t.key}\n${t.email}`,r=e.get(n);return r===void 0?(e.set(n,t.idempotencyKey),t):r===t.idempotencyKey?t:/* @__PURE__ */Object.freeze({...t,idempotencyKey:r})}function isIntroSwipeOut(e,t){let n=t>0?Math.abs(e)/t:0;return e>90||e>12&&n>.11}var zo=/* @__PURE__ */Object.freeze({title:"Request records",clinic:"Clinic",search:"Search clinics by name or location",placeholder:"Clinic name, city, or ZIP",email:"Clinic email",emailPlaceholder:"records@clinic.com",ownerName:"Your full name",scopeHeading:"What you’re authorizing",send:"Send request",sending:"Sending…",cancel:"Cancel",sign:"Signature",draw:"Draw your signature",type:"Type your name to sign",toType:"Can’t draw? Type your name instead",toDraw:"Draw your signature instead",clear:"Clear",drawHint:"Draw your signature in the box above.",clearA11y:"Clear signature",typedSignatureA11y:e=>`Typed signature: ${e}`,missingSignature:"Please add your signature before submitting.",recentlyUsed:"Recently used",moreClinics:"Load more"});var Po=/* @__PURE__ */Object.freeze({title:zo.title,titleFor:e=>{let t=e?.trim()??"";return t.length>0?`Request ${t}’s records`:zo.title},leadWeb:"Find the clinic that has them. We send a secure request and read every page they send back.",leadNative:"Find the clinic that has them.",searchLabelWeb:"Find the clinic",howItWorks:"How it works",howSteps:e=>[{title:"We send a secure request",body:"With your permission, straight to the clinic’s records team."},{title:"The clinic sends the file",body:"Most clinics respond within 3 to 5 business days. We follow up for you."},{title:"Everfur reads every page",body:`Visits, vaccines, labs and prescriptions land in ${e}’s records.`}],placeholder:zo.placeholder,searchA11y:zo.search,clearSearch:"Clear search",loading:"Loading clinics",uploadOwn:"I already have the records",uploadOwnStarting:"Setting up your upload…",noPet:"Add a pet first, then come back to request their records.",recentlyUsed:zo.recentlyUsed,noMatch:e=>`No clinics match “${e}”. You can still request records using the option above.`,loadingMore:"Loading more…",loadMoreFailed:"Couldn’t load more. Tap to retry.",selectA11y:e=>`Request records from ${e}`,resultsCount:e=>e===1?"Showing 1 clinic":`Showing ${String(e)} clinics`,fallback:/* @__PURE__ */Object.freeze({title:"Can’t find your clinic?",subtitle:"Add it by email and we’ll request your records.",nameLabel:"Clinic name",namePlaceholder:"Your clinic’s name",emailLabel:"Clinic email",emailPlaceholder:"records@clinic.com",reviewNote:"We review every request by hand before reaching out to the clinic.",submit:"Continue"})});var Bo=1.609344;function No(e){return e===null||!Number.isFinite(e)?null:(e/Bo).toFixed(1)}function $o(e){let t=No(e);return t===null?"":`${t} mi`}var Lo=300,jo=2;var Wo=/* @__PURE__ */Object.freeze({loading:"Loading",empty:"No records yet",upload:"Upload records",consentRequired:"Consent required",allow:"Allow",allPetsConsent:"This covers all your pets. You can withdraw it at any time.",sessionRequired:"Sign in required",recordUnavailable:"Record unavailable",retry:"Try again",records:"Records",beingReviewed:"being reviewed"});function Uo(e,t){let[n,r]=d(""),[o,i]=d(""),[a,l]=d([]),[f,h]=d(null),[g,b]=d([]),[m,y]=d(true),[v,k]=d(false),[w,_]=d(false),[S,x]=d(null),[C,R]=d(null),[F,A]=d(0),I=s(0),T=s(true),E=t?.latitude,D=t?.longitude,O=c(()=>void 0,[E,D]);u(()=>(T.current=true,()=>{T.current=false,I.current+=1}),[e]),u(()=>{let t=true;return y(true),e.recentClinics({limit:5}).then(e=>{t&&(e.ok&&b(e.value.clinics),y(false))}).catch(()=>{t&&y(false)}),()=>{t=false}},[e]),u(()=>{let e=n.trim();if(e.length<jo){i("");return}let t=setTimeout(()=>i(e),Lo);return()=>clearTimeout(t)},[n]);let z=o.length>=jo;u(()=>{let t=I.current+=1;if(l([]),h(null),x(null),R(null),!z){k(false);return}k(true),e.searchClinics({query:o,limit:25,...O?{location:O}:{}}).then(e=>{!T.current||t!==I.current||(e.ok?(l(e.value.clinics),h(e.value.nextCursor)):x(e.error),k(false))}).catch(()=>{T.current&&t===I.current&&k(false)})},[e,o,z,O,F]);let P=p(()=>{if(!z||f===null||w)return;let t=I.current;_(true),R(null),e.searchClinics({query:o,limit:25,cursor:f,...O?{location:O}:{}}).then(e=>{!T.current||t!==I.current||(e.ok?(l(t=>[...t,...e.value.clinics]),h(e.value.nextCursor)):R(e.error),_(false))}).catch(()=>{T.current&&t===I.current&&_(false)})},[e,f,o,z,w,O]),B=p(e=>r(e),[]),N=p(()=>A(e=>e+1),[]);return c(()=>({query:n,debouncedQuery:o,isSearchActive:z,clinics:a,recent:g,recentLoading:m,initialLoading:v,loadingMore:w,hasNextPage:f!==null,error:S,pageError:C,setQuery:B,loadMore:P,retry:N}),[n,o,z,a,g,m,v,w,f,S,C,B,P,N])}function Vo(e,t,n,r){/* @__PURE__ */
|
|
23
|
+
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Mo={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},qo={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},Ho=[.23,1,.32,1],Ko=[.32,.72,0,1],Yo={opacity:0,translateY:8},Go={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Jo={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Qo={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=Qo[e];/* @__PURE__ */
|
|
24
|
+
return P(x,{source:{uri:r.uri,width:r.width*3,height:r.height*3},style:[{width:r.width,height:r.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",...n===void 0?{}:{testID:n}})}var Zo={transform:[{scale:Jo.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:o=false,busy:i=false,icon:a,style:l,testID:s}){let d=[".emb-btn",".in-body .emb-btn",...r,o&&".emb-btn[disabled]"];/* @__PURE__ */
|
|
25
|
+
return B(k,{accessibilityRole:"button",accessibilityState:{disabled:o,busy:i},disabled:o||i,onPress:n,style:({pressed:t})=>[e.view(...d),l,t&&!e.reduced?Zo:null],...s===void 0?{}:{testID:s},children:[a===void 0?null:/* @__PURE__ */P(IntroIcon,{name:a,style:e.icon(...d,".emb-btn svg",".in-stack .emb-btn svg")}),
|
|
26
|
+
/* @__PURE__ */P(Text,{tier:"control",style:e.text(...d),children:t})]})}function IntroLink({kit:e,label:t,onPress:n,rules:r=[],testID:o}){/* @__PURE__ */
|
|
27
|
+
return P(k,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?Zo:null],...o===void 0?{}:{testID:o},children:/* @__PURE__ */P(Text,{tier:"control",style:e.text(".in-link",...r),children:t})})}var Xo=a(function({kit:e,words:t,testID:n},r){/* @__PURE__ */
|
|
28
|
+
return P(v,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */P(Text,{tier:"heading",style:e.text(".serif",".in-h"),children:t})})});function IntroLine({kit:e,words:t,rules:n,testID:r}){return t===""?null:/* @__PURE__ */P(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var ei=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,ti={transform:[{scale:Jo.pressScale}]};function ni(e){return[e.address?.trim()??"",$o(e.distanceKm)].filter(e=>e!=="").join(" · ")}function Field({kit:e,icon:t,value:n,placeholder:r,label:o,onChange:i,onSubmit:a,kind:l,maxLength:s,testID:d}){/* @__PURE__ */
|
|
29
|
+
return B(v,{style:e.view(".in-search"),children:[t?/* @__PURE__ */P(IntroIcon,{name:"search",style:e.icon(".in-search svg")}):null,
|
|
30
|
+
/* @__PURE__ */P(Gn,{value:n,placeholder:r,placeholderTextColor:e.colors.ink3,accessibilityLabel:o,autoComplete:"off",autoCorrect:false,autoCapitalize:l==="email"?"none":"words",inputMode:l==="email"?"email":l==="search"?"search":"text",returnKeyType:l==="search"?"search":"next",...s===void 0?{}:{maxLength:s},style:[e.view(".in-search input"),e.text(".in-search input"),{paddingVertical:0}],onChangeText:i,...a===void 0?{}:{onSubmitEditing:a},testID:d})]})}var ri=a(function({kit:e,text:t,onPick:n,onUpload:r},o){let i=useEverfurRecordsClinic(),a=Uo(i),l=s(Ne()),[c,u]=d(null),[p,f]=d(false),[h,g]=d(""),[b,m]=d(""),y=a.isSearchActive?a.clinics:a.recent,w=y.find(e=>e.id===c)??y[0]??null,_=a.isSearchActive&&!a.initialLoading&&a.error===null&&y.length===0,S=h.trim()===""?a.query.trim():h.trim(),x=S!==""&&ei.test(b.trim()),C=()=>{if(p){x&&n(Vo(null,S,b.trim().toLowerCase(),l.current()));return}w!==null&&n(Vo(w,null,"",l.current()))},R=p?x:w!==null,F=a.initialLoading||!a.isSearchActive&&a.recentLoading;/* @__PURE__ */
|
|
31
|
+
return B(N,{children:[
|
|
32
|
+
/* @__PURE__ */P(Xo,{ref:o,kit:e,words:t.title,testID:"everfur-intro-title"}),
|
|
33
|
+
/* @__PURE__ */P(Field,{kit:e,icon:true,kind:"search",value:a.query,placeholder:t.search,label:t.searchLabel,onChange:e=>{a.setQuery(e),f(false)},onSubmit:C,testID:"everfur-intro-clinic-search"}),p?/* @__PURE__ */B(v,{style:e.view(".in-clinics"),children:[
|
|
34
|
+
/* @__PURE__ */P(Field,{kit:e,icon:false,kind:"text",value:h===""?a.query:h,placeholder:Po.fallback.namePlaceholder,label:Po.fallback.nameLabel,maxLength:200,onChange:g,testID:"everfur-intro-clinic-name"}),
|
|
35
|
+
/* @__PURE__ */P(Field,{kit:e,icon:false,kind:"email",value:b,placeholder:Po.fallback.emailPlaceholder,label:Po.fallback.emailLabel,maxLength:320,onChange:m,onSubmit:C,testID:"everfur-intro-clinic-email"}),
|
|
36
|
+
/* @__PURE__ */P(IntroLine,{kit:e,words:Po.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */B(v,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:F},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[y.map(t=>{let n=w?.id===t.id,r=ni(t),o=n&&'.in-clinic[aria-checked="true"]';/* @__PURE__ */
|
|
37
|
+
return B(k,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>u(t.id),style:({pressed:t})=>[e.view(".in-clinic",o),t&&!e.reduced?ti:null],testID:`everfur-intro-clinic-${t.id}`,children:[
|
|
38
|
+
/* @__PURE__ */B(v,{style:e.col(".in-clinic",0),children:[
|
|
39
|
+
/* @__PURE__ */P(Text,{style:e.strong(".in-clinic",".in-clinic b"),children:t.name}),r===""?null:/* @__PURE__ */P(Text,{style:[e.view(".in-clinic small"),e.text(".in-clinic",".in-clinic small")],children:r})]}),
|
|
40
|
+
/* @__PURE__ */P(v,{style:[e.view(".in-tick",n&&'.in-clinic[aria-checked="true"] .in-tick'),e.col(".in-clinic",1)],children:/* @__PURE__ */P(IntroIcon,{name:"check",style:e.icon(".in-tick svg",n&&'.in-clinic[aria-checked="true"] .in-tick svg')})})]},t.id)}),a.error!==null&&a.isSearchActive?/* @__PURE__ */B(v,{accessibilityRole:"alert",style:e.view(".in-none"),testID:"everfur-intro-clinic-error",children:[
|
|
41
|
+
/* @__PURE__ */P(Text,{style:e.text(".in-none"),children:a.error.displayMessage}),a.error.retryable?/* @__PURE__ */P(IntroLink,{kit:e,label:Wo.retry,onPress:a.retry,rules:[".in-none .in-link"],testID:"everfur-intro-clinic-retry"}):null]}):null,_?/* @__PURE__ */B(v,{style:e.view(".in-none"),testID:"everfur-intro-clinic-none",children:[
|
|
42
|
+
/* @__PURE__ */P(Text,{style:e.text(".in-none"),children:`${Po.fallback.title} ${Po.fallback.subtitle}`}),
|
|
43
|
+
/* @__PURE__ */P(IntroLink,{kit:e,label:t.add,onPress:()=>f(true),rules:[".in-none .in-link"],testID:"everfur-intro-clinic-add"})]}):null]}),
|
|
44
|
+
/* @__PURE__ */P(IntroLine,{kit:e,words:t.more,rules:[".in-p",".in-p--s"]}),
|
|
45
|
+
/* @__PURE__ */P(IntroButton,{kit:e,label:t.request,onPress:C,rules:[".emb-btn--block"],disabled:!R,testID:"everfur-intro-clinic-request"}),r===void 0?null:/* @__PURE__ */P(IntroLink,{kit:e,label:t.upload,onPress:r,testID:"everfur-intro-clinic-upload"})]})});function IntroConsentFrame({petRef:petRef,petName:e,draft:t,ownerName:n,onCaptureSignature:r,onCreated:o}){/* @__PURE__ */
|
|
46
|
+
return P(i,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...n===void 0?{}:{ownerName:n},...r===void 0?{}:{onCaptureSignature:r},onCreated:o,style:{flex:1}})}function oi(e){return Jr(e,Mo,qo)}var ii=60,ai=24,li=240,si=w.bezier(.25,.1,.25,1),di=w.bezier(.42,0,.58,1),ci=w.bezier(...Ho),ui=w.bezier(...Ko),pi=8,fi=_.OS==="ios",hi=_.OS!=="web";function gi(e){return e===null?si:w.bezier(...e)}function bi(e){if(e===null)return;let t=E.sendAccessibilityEvent;typeof t=="function"&&t.call(E,e,"focus")}function EverfurIntro(e){let{petRef:petRef,onClose:t,onClosed:n,onFrame:r}=e,o=e.mode??"intro",i=useEverfurTheme(),a=c(()=>oi(i),[i]),l=ir("pinned"),f=a.reduced,{runtime:h}=ft(),g=c(()=>({...gt,...e.copy}),[e.copy]),b=c(()=>introFacts(e.page??null,e.petName),[e.page,e.petName]),m=c(()=>e.blanks??defaultIntroBlanks(b.pet),[e.blanks,b.pet]),y=c(()=>introText({facts:b,copy:g,blanks:m.length,resultsPending:e.resultsPending===true}),[b,g,m.length,e.resultsPending]),[w,_]=d(o==="records"?"clinic":"tabs"),[S,x]=d(false),[T,E]=d(false),[D,O]=d(null),z=s(/* @__PURE__ */new Map),[$,L]=d(""),[j,W]=d(false),[U,V]=d(0),[M,q]=d(0),H=s(false),K=s(0),Y=s(0),G=s(null),J=s(null),Q=s([]),Z=p((e,t)=>{Q.current.push(setTimeout(e,t))},[]);u(()=>()=>Q.current.forEach(clearTimeout),[]);let X=s(new C.Value(0)).current,ee=s(new C.Value(0)).current,te=s(new C.Value(0)).current,ne=s(new C.Value(0)).current,re=s(new C.Value(1)).current,oe=s([0,1,2].map(()=>new C.Value(f?1:0))).current,ie=w!=="tabs",ae=s(new C.Value(ie?1:0)).current,le=s(false);u(()=>{r?.(T?null:w)},[w,T,r]),u(()=>()=>r?.(null),[r]);let se=s(w);se.current=w;let de=p(()=>{Z(()=>bi(se.current==="consent"?J.current:G.current),ii)},[Z]),ce=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==M&&q(t),le.current||H.current)return;le.current=true;let n=a.motion(".in-sheet",".ph-intro.is-on .in-sheet"),r=a.motion(".in-dim",".ph-intro.is-on .in-dim--top"),o=[C.timing(X,{toValue:1,duration:n.dur,easing:f?si:ui,useNativeDriver:hi}),C.timing(ee,{toValue:1,duration:r.dur,easing:gi(r.ease),useNativeDriver:hi})];if(!f&&w==="tabs"){let e=Jo.rows;oe.forEach((t,n)=>o.push(C.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:ci,useNativeDriver:hi})))}C.parallel(o).start(),de()};u(()=>{if(H.current)return;let e=ie?a.motion(".in-dim",".ph-intro.is-on.is-all .in-dim--mid"):a.motion(".in-dim");C.timing(te,{toValue:ie?1:0,duration:e.dur,easing:gi(e.ease),useNativeDriver:hi}).start();let t=a.motion(".in-bars b::after");C.timing(ae,{toValue:ie?1:0,duration:t.dur,easing:gi(t.ease),useNativeDriver:false}).start()},[ie,a,te,ae]);let ue=c(()=>m.map(()=>new C.Value(0)),[m]);u(()=>{if(w!=="ask"||f)return;let e=Jo.blanks;ue.forEach(e=>e.setValue(0));let t=C.parallel(ue.map((t,n)=>C.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:di,useNativeDriver:false})));return t.start(),()=>t.stop()},[w,f,ue]);let pe=p((e,t=false)=>{x(t),_(e),K.current=0,re.setValue(0),C.timing(re,{toValue:1,duration:f?150:li,easing:f?si:ci,useNativeDriver:hi}).start(),de()},[re,f,de]),fe=p((e,r=null,o=null)=>{if(H.current)return;H.current=true,E(true),t({exit:e,toast:r,notifications:o});let i=a.motion(".in-sheet"),l=a.motion(".in-dim");C.parallel([C.timing(X,{toValue:0,duration:i.dur,easing:f?si:ci,useNativeDriver:hi}),C.timing(ee,{toValue:0,duration:l.dur,easing:gi(l.ease),useNativeDriver:hi}),C.timing(te,{toValue:0,duration:l.dur,easing:gi(l.ease),useNativeDriver:hi})]).start(),Z(()=>n?.(),f?160:260)},[t,n,Z,f,a,X,ee,te]),he=p(()=>fe(o==="records"?"stay":"ask"),[fe,o]),ge=p(e=>fe("plan",e?y.toast.on:y.toast.off,e),[fe,y]),be=e.onUpload,me=c(()=>be===void 0?void 0:()=>{fe("stay"),be()},[be,fe]),ye=s(false),ve=p(async()=>{if(ye.current)return;ye.current=true,W(true);let t=false;try{e.onEnableNotifications!==void 0?t=await e.onEnableNotifications()===!0:t=(await createNotificationsClient(h).setPreferences({pushEnabled:!0,emailEnabled:!0})).ok}catch{t=false}ye.current=false,W(false),ge(t)},[e,h,ge]),ke=()=>{H.current||(w==="sent"?ge(false):he())},we=s(he);we.current=he;let _e=s(true);_e.current=w!=="sent"&&w!=="consent"&&!T;let Se=c(()=>R.create({onMoveShouldSetPanResponderCapture:(e,t)=>_e.current&&K.current<=0&&t.dy>pi&&Math.abs(t.dy)>Math.abs(t.dx),onPanResponderGrant:()=>{Y.current===0&&(Y.current=Date.now())},onPanResponderMove:(e,t)=>ne.setValue(t.dy>0?t.dy:t.dy/4),onPanResponderRelease:(e,t)=>{let n=Date.now()-(Y.current||Date.now());Y.current=0,isIntroSwipeOut(t.dy,n)?we.current():C.timing(ne,{toValue:0,duration:a.motion(".in-sheet",".ph-intro.is-on .in-sheet").dur,easing:ui,useNativeDriver:hi}).start()},onPanResponderTerminate:()=>{Y.current=0,C.timing(ne,{toValue:0,duration:li,easing:ci,useNativeDriver:hi}).start()}}),[ne,a]),xe=p(t=>{let n=D===null?"":D.clinic?.name??D.freeText??"",r={petRef:petRef,clinicName:n,requestId:t.id,at:/* @__PURE__ */(new Date).toISOString()};L(n),e.onRequested?.(r),pe("sent")},[D,petRef,e,pe]),Ce=e.tabBar?.top??Go.tabTop,Re=e.tabBar?.height??Go.tabHeight,Fe=U===0?void 0:ie?U-Go.sheetTopAll:U-Ce-Re-Go.sheetGap,Ae=w==="clinic"&&o!=="records"||w==="novet"||w==="consent",Ie=w!=="sent",Te=M>0?M:U>0?U:1e3,Ee=f?{opacity:X,transform:[{translateY:ne}]}:{transform:[{translateY:C.add(X.interpolate({inputRange:[0,1],outputRange:[Te,0]}),ne)}]},De=f?{opacity:re}:{opacity:re,transform:[{translateX:re.interpolate({inputRange:[0,1],outputRange:[S?-ai:ai,0]})}]},Oe=e=>{let t=i.meta.hidePoweredBy?null:/* @__PURE__ */B(v,{style:a.view(".in-by"),children:[
|
|
47
|
+
/* @__PURE__ */P(Text,{tier:"compact",style:a.text(".in-eyebrow",".in-by"),children:y.poweredBy}),
|
|
48
|
+
/* @__PURE__ */P(IntroIcon,{name:"wordmark",style:a.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */B(v,{style:a.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */P(Text,{tier:"compact",style:a.text(".in-eyebrow"),children:e}),t]})},ze=e=>e===""?null:/* @__PURE__ */P(Xo,{ref:G,kit:a,words:e,testID:"everfur-intro-title"}),Pe=(e,t)=>e===""?null:t?/* @__PURE__ */P(v,{ref:G,accessible:true,accessibilityLabel:e,children:/* @__PURE__ */P(IntroLine,{kit:a,words:e,rules:[".in-p"]})}):/* @__PURE__ */P(IntroLine,{kit:a,words:e,rules:[".in-p"]}),Be=null;if(w==="tabs"){let t=[["ask","chat",".in-ic--y",e.tabLabels?.ask??"Ask",y.tabs.ask],["plan","heartcheck",".in-ic--c",e.tabLabels?.plan??"Health Plan",y.tabs.plan],["records","file",".in-ic--g",e.tabLabels?.records??"Records",y.tabs.records]];Be=/* @__PURE__ */B(N,{children:[Oe(y.tabs.eyebrow),ze(y.tabs.title),
|
|
49
|
+
/* @__PURE__ */P(IntroLine,{kit:a,words:y.tabs.lede,rules:[".in-p"]}),
|
|
50
|
+
/* @__PURE__ */P(v,{accessibilityRole:"list",style:a.view(".in-rows"),children:t.map(([e,t,n,r,o],i)=>{let l=oe[i],s=f?null:{opacity:l.interpolate({inputRange:[0,1],outputRange:[Yo.opacity,1]}),transform:[{translateY:l.interpolate({inputRange:[0,1],outputRange:[Yo.translateY,0]})}]};/* @__PURE__ */
|
|
51
|
+
return B(C.View,{style:[a.view(".in-rows li"),s],testID:`everfur-intro-row-${e}`,children:[
|
|
52
|
+
/* @__PURE__ */P(v,{style:[a.view(".in-ic",n),a.col(".in-rows li",0)],children:/* @__PURE__ */P(IntroIcon,{name:t,style:a.icon(".in-ic svg")})}),
|
|
53
|
+
/* @__PURE__ */B(v,{style:a.col(".in-rows li",1),children:[
|
|
54
|
+
/* @__PURE__ */P(Text,{style:a.text(".in-rows b"),children:r}),o===""?null:/* @__PURE__ */P(Text,{style:[a.view(".in-rows li > span:last-child > span"),a.text(".in-rows li > span:last-child > span")],children:o})]})]},e)})}),e.recordsConnected===true?/* @__PURE__ */P(IntroButton,{kit:a,label:y.tabs.seePlan,onPress:()=>fe("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-see-plan"}):/* @__PURE__ */P(IntroButton,{kit:a,label:y.tabs.next,onPress:()=>pe("ask"),rules:[".emb-btn--block"],testID:"everfur-intro-next"})]})}else if(w==="ask")Be=/* @__PURE__ */B(N,{children:[Oe(y.tabs.eyebrow),ze(y.ask.title),Pe(y.ask.lede,y.ask.title===""),
|
|
55
|
+
/* @__PURE__ */P(Blanks,{kit:a,title:b.planTitle,pill:y.ask.blanksPill,label:y.ask.blankLabel,blanks:m,pulses:f?null:ue}),
|
|
56
|
+
/* @__PURE__ */B(v,{style:a.view(".in-pair"),children:[
|
|
57
|
+
/* @__PURE__ */P(IntroButton,{kit:a,label:y.ask.later,onPress:he,rules:[".emb-btn--ghost"],style:a.col(".in-pair",0),testID:"everfur-intro-later"}),
|
|
58
|
+
/* @__PURE__ */P(IntroButton,{kit:a,label:y.ask.connect,onPress:()=>pe("clinic"),style:a.col(".in-pair",1),testID:"everfur-intro-connect"})]}),
|
|
59
|
+
/* @__PURE__ */P(IntroLine,{kit:a,words:y.ask.fine,rules:[".in-fine"]}),
|
|
60
|
+
/* @__PURE__ */P(IntroLink,{kit:a,label:y.ask.noVet,onPress:()=>pe("novet"),testID:"everfur-intro-novet"})]});else if(w==="clinic")Be=/* @__PURE__ */P(ri,{ref:G,kit:a,text:y.clinic,onPick:e=>{O(Oo(z.current,e)),pe("consent")},...me===void 0?{}:{onUpload:me}});else if(w==="consent")Be=D===null?null:/* @__PURE__ */P(IntroConsentFrame,{petRef:petRef,...b.pet.name==="your pet"?{}:{petName:b.pet.name},draft:D,...e.ownerName===void 0?{}:{ownerName:e.ownerName},...e.onCaptureSignature===void 0?{}:{onCaptureSignature:e.onCaptureSignature},onCreated:xe});else if(w==="sent"){let e=[[y.sent.sentStep,$===""?"":y.sent.sentTo($),"done"],[y.sent.clinicStep,y.sent.clinicEta,"now"],[y.sent.blanksStep,y.sent.blanksDetail,""]];Be=/* @__PURE__ */B(N,{children:[Oe(y.sent.eyebrow),ze(y.sent.title),
|
|
61
|
+
/* @__PURE__ */P(v,{style:a.view(".in-sent"),children:/* @__PURE__ */P(Track,{kit:a,label:y.sent.track,steps:e.filter(([e])=>e!=="")})}),
|
|
62
|
+
/* @__PURE__ */P(IntroLine,{kit:a,words:y.sent.lede,rules:[".in-p"]}),
|
|
63
|
+
/* @__PURE__ */B(v,{style:a.view(".in-stack"),children:[
|
|
64
|
+
/* @__PURE__ */P(IntroButton,{kit:a,label:y.sent.notify,icon:"bell",busy:j,onPress:()=>{ve()},rules:[".emb-btn--block"],testID:"everfur-intro-notify"}),
|
|
65
|
+
/* @__PURE__ */P(IntroButton,{kit:a,label:y.sent.notNow,onPress:()=>ge(false),rules:[".emb-btn--block",".emb-btn--ghost"],testID:"everfur-intro-not-now"})]}),
|
|
66
|
+
/* @__PURE__ */P(IntroLine,{kit:a,words:y.sent.fine,rules:[".in-fine"]})]})}else Be=/* @__PURE__ */B(N,{children:[Oe(y.tabs.eyebrow),ze(y.noVet.title),Pe(y.noVet.lede,y.noVet.title===""),
|
|
67
|
+
/* @__PURE__ */P(IntroButton,{kit:a,label:y.noVet.seePlan,onPress:()=>fe("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-novet-plan"})]});let Ne=w==="consent",$e=[ar(a.view(".in-sheet",".ph-intro.is-on .in-sheet"),l),Fe===void 0?null:Ne?{height:Fe}:{maxHeight:Fe},Ee],Le={accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};/* @__PURE__ */
|
|
68
|
+
return P(F,{transparent:true,visible:true,animationType:"none",statusBarTranslucent:true,onRequestClose:ke,children:/* @__PURE__ */B(v,{style:{flex:1},onLayout:e=>V(Math.round(e.nativeEvent.layout.height)),testID:e.testID??"everfur-intro",children:[
|
|
69
|
+
/* @__PURE__ */P(C.View,{...Le,pointerEvents:"none",style:[a.view(".in-dim",".in-dim--top"),{height:Ce,opacity:ee}]}),
|
|
70
|
+
/* @__PURE__ */P(C.View,{...Le,pointerEvents:"none",style:[a.view(".in-dim"),{top:Ce,height:Re,opacity:te}]}),
|
|
71
|
+
/* @__PURE__ */P(C.View,{...Le,pointerEvents:"none",style:[a.view(".in-dim",".in-dim--bot"),{top:Ce+Re,opacity:ee}]}),
|
|
72
|
+
/* @__PURE__ */P(A,{behavior:fi?"padding":void 0,enabled:!Ne,pointerEvents:"box-none",style:{position:"absolute",top:0,right:0,bottom:0,left:0},children:/* @__PURE__ */B(C.View,{accessibilityViewIsModal:true,accessibilityLabel:o==="intro"?y.sheetLabel.intro:y.sheetLabel.records,style:$e,onLayout:ce,onTouchStart:()=>{Y.current=Date.now()},...Se.panHandlers,testID:"everfur-intro-sheet",children:[
|
|
73
|
+
/* @__PURE__ */P(v,{...Le,style:a.view(".in-grab")}),
|
|
74
|
+
/* @__PURE__ */B(v,{style:a.view(".in-top",o==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[Ae?/* @__PURE__ */P(k,{ref:J,accessibilityRole:"button",accessibilityLabel:y.back,style:a.view(".in-back"),onPress:()=>pe(w==="consent"?"clinic":"ask",true),testID:"everfur-intro-back",children:/* @__PURE__ */P(IntroIcon,{name:"back",style:a.icon(".in-back svg")})}):null,o==="intro"?/* @__PURE__ */P(Bars,{kit:a,fill:ae}):null,Ie&&o==="intro"?/* @__PURE__ */P(k,{accessibilityRole:"button",style:[a.view(".in-skip"),{justifyContent:"center"}],onPress:he,testID:"everfur-intro-skip",children:/* @__PURE__ */P(Text,{tier:"control",style:a.text(".in-skip"),children:y.skip})}):null,Ie&&o==="records"?/* @__PURE__ */P(k,{accessibilityRole:"button",accessibilityLabel:y.close,style:a.view(".in-x"),onPress:he,testID:"everfur-intro-close",children:/* @__PURE__ */P(IntroIcon,{name:"x",style:a.icon(".in-x svg")})}):null]}),Ne?/* @__PURE__ */P(v,{style:{flex:1},children:Be}):/* @__PURE__ */P(I,{style:{flexGrow:0,flexShrink:1},bounces:false,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEventThrottle:16,onScroll:e=>{K.current=e.nativeEvent.contentOffset.y},children:/* @__PURE__ */P(C.View,{style:[a.view(".in-body"),De],testID:`everfur-intro-frame-${w}`,children:Be})},w)]})})]})})}function Bars({kit:e,fill:t}){let n=t.interpolate({inputRange:[0,1],outputRange:["0%","100%"]}),r=[e.view(".in-bars b::after"),{right:void 0}];/* @__PURE__ */
|
|
75
|
+
return B(v,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view(".in-bars"),children:[
|
|
76
|
+
/* @__PURE__ */P(v,{style:e.view(".in-bars b"),children:/* @__PURE__ */P(v,{style:[...r,{width:"100%"}]})}),
|
|
77
|
+
/* @__PURE__ */P(v,{style:e.view(".in-bars b"),children:/* @__PURE__ */P(C.View,{style:[...r,{width:n}],testID:"everfur-intro-bar-2"})})]})}function Blanks({kit:e,title:t,pill:n,label:r,blanks:o,pulses:i}){let a=e.colors.accent4??"",l=e.colors.accent2??a;/* @__PURE__ */
|
|
78
|
+
return B(v,{style:e.view(".blanks"),children:[
|
|
79
|
+
/* @__PURE__ */B(v,{style:e.view(".blanks__h"),children:[
|
|
80
|
+
/* @__PURE__ */P(Text,{tier:"compact",style:[e.text(".blanks__h"),{flexShrink:1}],children:t}),n===""?null:/* @__PURE__ */P(v,{style:e.view(".blanks__h em"),children:/* @__PURE__ */P(Text,{tier:"compact",numberOfLines:1,style:e.text(".blanks__h",".blanks__h em"),children:n})})]}),
|
|
81
|
+
/* @__PURE__ */P(v,{accessibilityRole:"list",style:e.view(".blanks ol"),children:o.map((t,n)=>{let o=i?.[n],s=o===void 0?null:{backgroundColor:o.interpolate({inputRange:[0,.5,1],outputRange:[a,l,a]})};/* @__PURE__ */
|
|
82
|
+
return B(v,{style:e.view(".blanks li"),testID:`everfur-intro-blank-${n}`,children:[
|
|
83
|
+
/* @__PURE__ */P(v,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[e.view(".blanks li > b"),e.col(".blanks li",0)],children:/* @__PURE__ */P(Text,{style:e.text(".blanks li > b"),children:n+1})}),
|
|
84
|
+
/* @__PURE__ */B(v,{style:e.col(".blanks li",1),children:[
|
|
85
|
+
/* @__PURE__ */B(Text,{accessibilityLabel:`${t.before}${r}${t.after}`,style:e.text(".blanks li > span"),children:[t.before,
|
|
86
|
+
/* @__PURE__ */P(C.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:Jo.blankDrop,marginTop:-3},s]}),t.after]}),t.source===""?null:/* @__PURE__ */P(Text,{style:e.text(".blanks li > small"),children:t.source})]})]},n)})})]})}function Track({kit:e,label:t,steps:n}){/* @__PURE__ */
|
|
87
|
+
return P(v,{accessibilityRole:"list",accessibilityLabel:t,style:e.view(".sh-track"),children:n.map(([t,r,o],i)=>{let a=i===n.length-1,l=n[i+1]?.[2]==="done";/* @__PURE__ */
|
|
88
|
+
return B(v,{style:e.view(".sh-track li",".in-sent .sh-track li",a&&".sh-track li:last-child",a&&".in-sent .sh-track li:last-child"),children:[a?null:/* @__PURE__ */P(v,{style:e.view(".sh-track li::before",o==="done"&&l&&".sh-track li.is-done:has(+ li.is-done)::before")}),
|
|
89
|
+
/* @__PURE__ */P(v,{style:[e.view(".sh-track__dot",o==="done"&&".sh-track .is-done .sh-track__dot",o==="now"&&".sh-track .is-now .sh-track__dot"),e.col(".sh-track li",0)],children:o==="done"?/* @__PURE__ */P(IntroIcon,{name:"check",style:e.icon(".sh-track__dot svg")}):null}),
|
|
90
|
+
/* @__PURE__ */B(v,{style:e.col(".sh-track li",1),children:[
|
|
91
|
+
/* @__PURE__ */P(Text,{style:e.text(".sh-track strong",o===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */P(Text,{style:[e.view(".sh-track small"),e.text(".sh-track small")],children:r})]})]},t)})})}function PlanProbe({petRef:petRef,pagePhase:e,page:t,refreshPage:n,watching:r,onPlan:o,onPlanFailed:i}){let{status:a,plan:l,refresh:d}=useEverfurHealthPlan({petRef:petRef}),c=s(null),p=s({plan:d,page:n,watching:r});p.current={plan:d,page:n,watching:r},u(()=>{let n=rn(a,e);(a==="failed"||n)&&(c.current=Date.now()),n?o(petRef,{empty:on(a,t),signature:nn(l,t)}):a==="failed"&&i(petRef)},[a,l,e,t,petRef,o,i]);let f=s(()=>{});return f.current=e=>{let t=p.current;Zt({pageVisible:e,watching:t.watching,lastReadAt:c.current,now:Date.now()})&&(c.current=null,t.plan(),t.page())},u(()=>{let e=D.addEventListener("change",e=>{e==="active"&&f.current(true)});return()=>e.remove()},[]),u(()=>{r&&f.current(D.currentState!=="background")},[r]),null}function RecordsProbe({petRef:petRef,onRecords:e}){let{status:t}=useEverfurRecords({petRef:petRef});return u(()=>{e(petRef,t==="empty"?"none":t==="populated"?"some":null)},[t,petRef,e]),null}var mi=6e3,yi=50,vi=_.OS!=="web";function EverfurRecordsLandedBanner({text:e,icon:t,onLand:n,testID:r}){let o=useEverfurTheme(),i=c(()=>oi(o),[o]),[a,l]=d(0),p=s(new C.Value(0)).current,f=s(false),h=s(false),g=s(n);g.current=n,u(()=>{let e=setTimeout(()=>{h.current||(h.current=true,g.current())},mi);return()=>clearTimeout(e)},[]);let b=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==a&&l(t),f.current)return;f.current=true;let n=i.motion(".ph-banner",".ph-banner.is-on");C.timing(p,{toValue:1,duration:n.dur,easing:i.reduced?w.bezier(.25,.1,.25,1):w.bezier(...Ko),useNativeDriver:vi}).start()},m=-((a>0?a:200)-Jo.bannerY),y=i.reduced?{opacity:p}:{transform:[{translateY:p.interpolate({inputRange:[0,1],outputRange:[m,0]})}]},{position:_,left:S,right:x,zIndex:R,top:F,...A}=i.view(".ph-banner",".ph-banner.is-on"),I=typeof F=="number"?Math.max(0,F-yi):0;/* @__PURE__ */
|
|
92
|
+
return P(C.View,{pointerEvents:"box-none",style:[{position:_,left:S,right:x,zIndex:R,top:I},y],onLayout:b,children:/* @__PURE__ */B(k,{accessibilityRole:"button",accessibilityLiveRegion:"polite",onPress:()=>{h.current||(h.current=true,n())},style:A,testID:r??"everfur-records-banner",children:[
|
|
93
|
+
/* @__PURE__ */P(v,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[i.view(".ph-banner__app"),i.col(".ph-banner",0)],children:t}),
|
|
94
|
+
/* @__PURE__ */B(v,{style:i.col(".ph-banner",1),children:[
|
|
95
|
+
/* @__PURE__ */B(v,{style:i.view(".ph-banner__meta"),children:[e.app===""?/* @__PURE__ */P(v,{}):/* @__PURE__ */P(Text,{tier:"compact",style:i.text(".ph-banner__meta",".ph-banner__meta strong"),children:e.app}),
|
|
96
|
+
/* @__PURE__ */P(Text,{tier:"compact",style:i.text(".ph-banner__meta"),children:e.now})]}),
|
|
97
|
+
/* @__PURE__ */P(Text,{style:[i.view(".ph-banner__txt > strong"),i.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */P(Text,{style:i.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var ki={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function wi(e){return{width:e,height:e,alignItems:"center",justifyContent:"center"}}function _i(e,t){return t??Math.max(1.5,Math.round(e/11*10)/10)}function Ring({size:e,strokeWidth:t,color:n,children:r}){/* @__PURE__ */
|
|
98
|
+
return P(v,{style:[wi(e),{borderRadius:e/2,borderWidth:t??y.hairlineWidth,borderColor:n}],children:r})}function ArrowUpGlyph({size:e,color:t,strokeWidth:n,testID:r}){let o=_i(e,n),i=e*.46;/* @__PURE__ */
|
|
99
|
+
return B(v,{style:wi(e),testID:r,...ki,children:[
|
|
100
|
+
/* @__PURE__ */P(v,{style:{position:"absolute",top:e*.16,bottom:e*.12,width:o,borderRadius:o,backgroundColor:t}}),
|
|
101
|
+
/* @__PURE__ */P(v,{style:{position:"absolute",top:e*.16+o/2,width:i,height:i,borderLeftWidth:o,borderTopWidth:o,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var Si={".ph-head":{flexGrow:0,flexShrink:0,height:58,alignItems:"center",paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,position:"relative",zIndex:6,backgroundColor:"$paper"},".ph-head__start":{flexDirection:"row",alignItems:"center",minWidth:0},".ph-head__end":{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginRight:-6,gap:10},".ph-pet":{flexDirection:"row",alignItems:"center",minHeight:44,fontSize:17,color:"$ink2",gap:9},".ph-pet img":{width:36,height:36,round:1},".ph-back":{display:"none",width:44,height:44,marginLeft:-6,alignItems:"center",justifyContent:"center"},".ph-back svg":{width:26,height:26},".ph-mark":{width:31,height:29,color:"$accent"},".ph-lockup":{display:"none",alignItems:"center",gap:9},".ph-lockup .ph-mark":{width:26,height:25},".ph-lockup__rule":{width:1,height:24,backgroundColor:"$n_D9D6D0"},".ph-lockup__by":{family:"$mono",fontSize:9,lh:1,color:"$ink3",gap:0},".ph-lockup__by svg":{width:62,height:22,marginTop:-1,marginRight:0,marginBottom:-6,marginLeft:0,color:"$byInk"},".ph-title":{display:"none",fontSize:17,fontWeight:"800",nowrap:1},'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup':{flexDirection:"row"},".askbar":{flexDirection:"row",alignItems:"center",height:52,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:8,borderRadius:999,backgroundColor:"$card",ring:[1.5,"$ink"],gap:6},".askbar input":{flex:1,minWidth:0,height:"100%",borderWidth:0,backgroundColor:"transparent",fontSize:16},".askbar__send":{width:40,height:40,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$primary",color:"$onPrimary",flexGrow:0,flexShrink:0,dur:160,ease:[.23,1,.32,1]},".askbar__send svg":{width:20,height:20},".askbar__send[disabled]":{opacity:.3},".ph-askbar":{flexGrow:0,flexShrink:0,paddingTop:10,paddingRight:14,paddingBottom:10,paddingLeft:14,backgroundColor:"$paper"}};var xi=/* @__PURE__ */new WeakMap;function Ci(e){let t=xi.get(e);if(t!==void 0)return t;let n=Jr(e,Si);return xi.set(e,n),n}function ShellIcon({name:e,style:t}){let n=Qo[e];/* @__PURE__ */
|
|
102
|
+
return P(x,{source:{uri:n.uri,width:n.width*3,height:n.height*3},style:[{width:n.width,height:n.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}var Ri=1.35;function ShellAskBar({placeholder:e,field:t,send:n,onAsk:r,testID:o}){let i=useEverfurTheme(),a=Ci(i),[l,s]=d(""),c=i.slots.composerInput,u=i.slots.sendButton,p=l.trim()==="",f=()=>{let e=l.trim();e!==""&&(s(""),r(e))},h=a.view(".askbar__send");/* @__PURE__ */
|
|
103
|
+
return P(v,{style:a.view(".ph-askbar"),testID:o,children:/* @__PURE__ */B(v,{style:[a.view(".askbar"),{height:void 0,minHeight:52},c?.backgroundColor===void 0?null:{backgroundColor:c.backgroundColor},c?.borderColor===void 0?null:{borderColor:c.borderColor}],children:[
|
|
104
|
+
/* @__PURE__ */P(Gn,{value:l,onChangeText:s,placeholder:e,placeholderTextColor:c?.textColor??i.color.text.placeholder,accessibilityLabel:t,onSubmitEditing:f,returnKeyType:"send",maxFontSizeMultiplier:Ri,style:[a.text(".askbar input"),{flex:1,minWidth:0,paddingVertical:12,color:c?.textColor??a.colors.ink}],testID:`${o}-input`}),
|
|
105
|
+
/* @__PURE__ */P(k,{onPress:f,disabled:p,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:p},style:[h,u?.backgroundColor===void 0?null:{backgroundColor:u.backgroundColor}],testID:`${o}-send`,children:/* @__PURE__ */P(ArrowUpGlyph,{size:20,color:u?.textColor??a.colors.onPrimary??i.color.surface})})]})})}function Fi(e){let[t,n]=d(null);return{shown:e!==null&&t!==e,onError:()=>n(e)}}function BrandImage({uri:e,label:t,decorative:n=false,style:r,resizeMode:o="contain",fallback:i=null,onError:a,testID:l}){let s=Fi(e);if(e===null||!s.shown)return i;let d=n?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...t===void 0?{}:{accessibilityLabel:t}};/* @__PURE__ */
|
|
106
|
+
return P(x,{source:{uri:e},style:r,resizeMode:o,...d,onError:()=>{s.onError(),a?.()},...l===void 0?{}:{testID:l}})}function Ai(e){return[e.surface,e.surfaceCream,e.surfaceSubtle,e.background,e.chatGround,e.composerFill]}function Ii(e){if(e.brightness!=="light")return false;let t=Vn.color,n=e.color,r=(e,t)=>parseColor(e)===parseColor(t),o=new Set(Ai(t));return r(n.brand,t.brand)&&r(n.accent,t.accent)&&Ai(n).every(e=>o.has(e))}var Ti=/* @__PURE__ */Object.freeze([
|
|
106
107
|
/* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
|
|
107
108
|
/* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
|
|
108
109
|
/* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
|
|
109
110
|
/* @__PURE__ */Object.freeze({background:"#bde7c5",foreground:"#0e3b22"}),
|
|
110
111
|
/* @__PURE__ */Object.freeze({background:"#dcc7f4",foreground:"#3a1d6a"}),
|
|
111
|
-
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function
|
|
112
|
-
return
|
|
113
|
-
return Object.freeze(t)}function
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
return
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
return
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */P(
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
|
|
134
|
-
return z(x.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:xi},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */z(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=st();return c(()=>{let t=Qe(e),n=e.registry.services.kv;return{shouldPlay:e=>rt({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>ot({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Ei=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Di={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Oi={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},zi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=zi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!zi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
|
|
135
|
-
return Object.freeze({nav:r,sections:/* @__PURE__ */Object.freeze(s),vetOnAsk:i,vetBadge:c,presentation:d,launcher:e["layout.launcher"]==="floating_button",closeControl:u,adjusted:/* @__PURE__ */Object.freeze([...new Set(n)])})}var Pi="your pet",Bi=/\{([a-z]+)\}/g;function Ni(e,t){return/(^|[.!?]\s+)$/.test(e.slice(0,t))}function fillSdkText(e,t,n={}){let r=typeof n.pet=="string"?n.pet.trim():"",o={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:r===""?void 0:r,cap:String(n.cap??t["access.free_messages"]),left:n.left===void 0?void 0:String(n.left),visits:n.visits===void 0?void 0:String(n.visits),price:n.price,state:n.state,them:n.them??"them",when:n.when};return e.replace(Bi,(t,n,r)=>{let i=o[n];return i!==void 0?i:n==="pet"?Ni(e,r)?Pi.charAt(0).toUpperCase()+Pi.slice(1):Pi:t})}function sdkText(e,t,n){return fillSdkText(e.settings[t],e.settings,n)}function sdkFixed(e,t,n){return fillSdkText(e.fixedStrings[t],e.settings,n)}function isInsidePartner(e){return e["text.partner_name"]!=="Everfur"}function objectPronoun(e){let t=(e??"").toLowerCase();return t==="female"||t==="f"?"her":t==="male"||t==="m"?"him":"them"}function askAccess(e,t,n){let r=e.settings;if(t==="member")return{kind:"open"};if(r["access.mode"]==="members_only")return{kind:"members_only"};if(r["access.mode"]==="free_cap"){let t=r["access.free_messages"];if(t<1)return{kind:"open"};let o=Math.max(0,t-Math.max(0,Math.floor(n)));return o===0?{kind:"cap_reached",cap:t}:{kind:"counter",left:o,cap:t,line:sdkText(e,"text.cap.counter",{cap:t,left:o})}}return{kind:"open"}}function isLocked(e,t,n){return t==="member"||e.settings["access.mode"]==="open"&&t==="unknown"?false:e.settings["access.locked"].includes(n)}function capMonth(e){let t=e.getUTCMonth()+1;return`${e.getUTCFullYear()}-${t<10?"0":""}${t}`}var $i={video_visits:"locked.video_visits",texting:"locked.texting",link_records:"locked.link_records",previous_results:"locked.previous_results",dashboard:"locked.dashboard",goals:"locked.goals"};function formatPrice(e,t){let n=t.replace(/^(US)?\$/,"");return`${e["units.currency"]}${n}`}function priceLines(e){let t=e.settings;switch(t["plan.price_display"]){case"full":return[`${formatPrice(t,t["plan.price_year"])} ${sdkFixed(e,"plan.price.year")}`];case"monthly_equivalent":return[`${formatPrice(t,t["plan.price_month"])}${sdkFixed(e,"plan.price.month")}`,sdkFixed(e,"plan.price.billed")];default:return[]}}function planSheet(e,t){let n=e.settings,r=t===void 0?{}:{pet:t};/* @__PURE__ */
|
|
136
|
-
return Object.freeze({
|
|
137
|
-
return Object.freeze({kind:"
|
|
138
|
-
return Object.freeze(e.
|
|
139
|
-
return Object.freeze(t)}
|
|
140
|
-
return Object.freeze(t)}function
|
|
141
|
-
return Object.freeze(
|
|
142
|
-
return Object.freeze({
|
|
112
|
+
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function Ei(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return Ti[t%Ti.length]}function Di(e){let t=(e??"").trim();return(Array.from(t)[0]??"?").toUpperCase()}function Oi(e){return{...Ei(e.petRef),initial:Di(e.name)}}function zi(e,t,n){let r=Oi(e);return t?r:{background:n.fill,foreground:n.ink,initial:r.initial}}function Pi(e){return Math.max(12,Math.round(e*.42))}function PetDisc({pet:e,size:t,ringStroke:n}){let r=useEverfurTheme(),o=c(()=>Bi(r),[r]),i=t-n*2,a=e===null?null:zi(e,Ii(r),{fill:r.color.highlight,ink:r.color.onHighlight}),l=Pi(i);/* @__PURE__ */
|
|
113
|
+
return P(Ring,{size:t,strokeWidth:n,color:r.color.mark,children:/* @__PURE__ */P(v,{style:[o.disc,{width:i,height:i,borderRadius:i/2},a===null?o.discEmpty:{backgroundColor:a.background}],children:/* @__PURE__ */P(Text,{tier:"badge",style:[o.letter,{fontSize:l,lineHeight:Math.round(l*1.2),color:a===null?r.color.text.muted:a.foreground}],children:a===null?Di(null):a.initial})})})}function Bi(e){return y.create({disc:{alignItems:"center",justifyContent:"center",overflow:"hidden"},discEmpty:{backgroundColor:e.color.brandSoft},letter:{...face(e,"bold"),textAlign:"center",includeFontPadding:false}})}var Ni=/* @__PURE__ */Object.freeze({planPlaceholder:"Ask what’s right for {petName}…",recordsPlaceholder:"Ask about {petName}’s records…",field:"Message",send:"Send",back:"Back",poweredBy:"powered by",poweredByLabel:"powered by Everfur",notificationKicker:"Notification · {time}"});function $i(e){if(e===void 0)return Ni;let t={...Ni};for(let n of Object.keys(Ni)){let r=e[n];typeof r=="string"&&r.trim().length>0&&(t[n]=r)}/* @__PURE__ */
|
|
114
|
+
return Object.freeze(t)}function Li(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,n)=>t[n]??(n==="pet"?t.petName:void 0)??"")}var ji=360;function ShellHeader({options:e,tab:n,pushed:r,petRef:petRef,petName:o,copy:i,onInboxOpen:a}){let l=useEverfurTheme(),s=Ci(l),{width:c}=O(),[u,p]=d(false),f=l.slots.header,h=f?.backgroundColor??s.colors.paper??l.color.surface,g=f?.textColor??s.colors.ink??l.color.text.primary,b=n==="ask"&&r===null,m=b?".ph-lockup .ph-mark":".ph-mark",y=e.mark??(l.meta.logoUrl===null?null:/* @__PURE__ */P(BrandImage,{uri:l.meta.logoUrl,label:l.meta.displayName,decorative:b,style:s.icon(m)})),w=r!==null?/* @__PURE__ */P(k,{onPress:r.onBack,accessibilityRole:"button",accessibilityLabel:i.back,hitSlop:4,style:[s.view(".ph-back"),{display:"flex"}],testID:"everfur-shell-back",children:/* @__PURE__ */P(ShellIcon,{name:"back",style:[s.icon(".ph-back svg"),{tintColor:g}]})}):/* @__PURE__ */P(Pet,{options:e,kit:s,petRef:petRef,petName:o,ink:g}),_=r!==null?/* @__PURE__ */P(Text,{tier:"heading",numberOfLines:1,accessibilityRole:"header",style:[s.text(".ph-title"),{display:"flex",color:g,textAlign:"center"}],testID:"everfur-shell-title",children:r.title}):b?/* @__PURE__ */P(t,{children:/* @__PURE__ */B(v,{accessible:true,accessibilityLabel:Li("{name}, {by}",{name:l.meta.displayName,by:i.poweredByLabel}),style:[s.view(".ph-lockup",'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup'),{display:"flex"}],testID:"everfur-shell-lockup",children:[y,c>=ji?/* @__PURE__ */B(N,{children:[
|
|
115
|
+
/* @__PURE__ */P(v,{style:s.view(".ph-lockup__rule")}),
|
|
116
|
+
/* @__PURE__ */B(v,{style:s.view(".ph-lockup__by"),children:[
|
|
117
|
+
/* @__PURE__ */P(Text,{tier:"badge",style:s.text(".ph-lockup__by"),children:i.poweredBy}),
|
|
118
|
+
/* @__PURE__ */P(ShellIcon,{name:"wordmark",style:[s.icon(".ph-lockup__by svg"),{tintColor:s.colors.byInk??g}]})]})]}):null]})}):/* @__PURE__ */P(v,{testID:"everfur-shell-mark",children:y}),S=e.bell!==false,x=e.inbox?.onOpen;/* @__PURE__ */
|
|
119
|
+
return B(v,{style:[s.view(".ph-head"),{flexDirection:"row",backgroundColor:h}],testID:"everfur-shell-header",children:[
|
|
120
|
+
/* @__PURE__ */P(v,{style:[s.view(".ph-head__start"),{flex:1,flexBasis:0}],children:w}),
|
|
121
|
+
/* @__PURE__ */P(v,{style:{flexShrink:1,alignItems:"center",justifyContent:"center"},children:_}),
|
|
122
|
+
/* @__PURE__ */P(v,{style:[s.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&r===null?/* @__PURE__ */P($,{onPress:e.onBell??(()=>p(true)),color:g,ground:h}):null}),S&&e.onBell===void 0?/* @__PURE__ */P(L,{...e.inbox,visible:u,onClose:()=>p(false),onOpen:x??a}):null]})}function Pet({options:e,kit:t,petRef:petRef,petName:n,ink:r}){let o=t.view(".ph-pet img"),i=typeof o.width=="number"?o.width:36,a=e.petPhotoUrl!==void 0&&e.petPhotoUrl!==null&&e.petPhotoUrl!==""?/* @__PURE__ */P(BrandImage,{uri:e.petPhotoUrl,label:n,decorative:true,style:[t.icon(".ph-pet img"),{borderRadius:i/2}],resizeMode:"cover",fallback:/* @__PURE__ */P(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0})}):/* @__PURE__ */P(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0}),l=/* @__PURE__ */B(N,{children:[a,n===""?null:/* @__PURE__ */P(Text,{tier:"heading",numberOfLines:1,style:[t.text(".ph-pet"),{color:r===t.colors.ink?t.colors.ink2:r,flexShrink:1}],children:n})]}),s=[t.view(".ph-pet"),{minWidth:0,flexShrink:1}];return e.onPet===void 0?/* @__PURE__ */P(v,{style:s,testID:"everfur-shell-pet",children:l}):/* @__PURE__ */P(k,{onPress:e.onPet,accessibilityRole:"button",accessibilityLabel:n===""?void 0:n,style:s,testID:"everfur-shell-pet",children:l})}var Wi=/* @__PURE__ */createContext(null);function useEverfurTabs(){return f(Wi)}var Ui=200,Vi=4,Mi=2600,qi=600,Hi=w.bezier(.25,.1,.25,1),Ki=_.OS!=="web",Yi=/* @__PURE__ */Object.freeze({chats:At.heading,newChat:At.newChat}),Gi={position:"relative",top:0,alignSelf:"flex-start"};function EverfurTabs(t){let{petRef:petRef,opened:i,onTabChange:a,onRecordsRequested:l,onRecordsLanded:f,onToast:g}=t,b=t.visible??true,m=useEverfurTheme(),y=c(()=>oi(m),[m]),k=c(()=>({...Vt,...t.copy}),[t.copy]),{runtime:w,userRef:userRef}=ft(),_=mn("healthPlan"),S=mn("records"),x=mn("recordsClinic"),[C,R]=d(()=>/* @__PURE__ */new Map),[F,A]=d(()=>/* @__PURE__ */new Set),E=p((e,t)=>{R(n=>{let r=n.get(e),o=an(r,t);return o===r?n:new Map(n).set(e,o)}),A(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),D=p(e=>{A(t=>t.has(e)?t:new Set(t).add(e))},[]),O=petRef===null?void 0:C.get(petRef),z=!_||O?.empty===true,N=`${petRef??"none"}:${O?.epoch??0}`,$=Ht(z),L=s(z);L.current=z;let j=useHealthPlanPage({petRef:petRef,enabled:_&&petRef!==null}),[W,U]=d(()=>Yt(i,false)),[V,M]=d(()=>/* @__PURE__ */new Set(["ask",Yt(i,false)])),q=p(e=>{let t=Kt(e,L.current);U(t),M(e=>e.has(t)?e:new Set(e).add(t))},[]);u(()=>{z&&W==="plan"&&U("ask")},[z,W]);let H=s(null);u(()=>{z||H.current!=="plan"||(H.current=null,q("plan"))},[z,q]);let K=p(e=>{H.current=null,q(e)},[q]),Y=s(a);Y.current=a,u(()=>{Y.current?.(W)},[W]);let[G,J]=d(null),Q=p((e,t)=>{e!==""&&J(n=>({id:(n?.id??0)+1,prompt:e,petRef:petRef,...t===void 0?{}:{card:t}})),H.current=null,q("ask")},[petRef,q]),Z=G===null||G.petRef!==petRef?null:G,X=Gt(i),ee=s(null),[te,ne]=d(null);u(()=>{if(ee.current===X)return;ee.current=X;let e=i.via==="link"?i.ask!==void 0?"ask":i.tab:"plan";H.current=i.via==="link"&&e==="plan"&&L.current?"plan":null,i.via==="link"&&i.ask!==void 0?Q(i.ask.prompt,i.ask.card):q(Yt(i,L.current)),ne(i.via==="plain"?X:null)},[X,i,Q,q]);let re=c(()=>dn(),[]),oe=b&&W==="ask",ie=s(oe);ie.current=oe;let ae=t.chat?.lifecycle,le=c(()=>ae===null?null:cn(un(ae??createAppStateLifecycle(),()=>ie.current),re),[ae,re]),se=s(oe);u(()=>{let e=pn(se.current,oe);se.current=oe,e&&re.fire()},[oe,re]);let[de,ce]=d(null),ue=p(e=>{e!==""&&(g!==void 0?g(e):ce(t=>({id:(t?.id??0)+1,text:e})))},[g]),pe=t.intro===false?null:t.intro??{},[fe,he]=d(null),[ge,be]=d(null),[me,ye]=d(null),[ve,ke]=d(null),[we,_e]=d(()=>/* @__PURE__ */new Map),[Se,xe]=d(false),[Ce,Re]=d(false),Fe=s(null),[Ae,Ie]=d(null),Te=s(null),Ee=s(null),De=c(()=>nt(w),[w]),Oe=w.registry.services.kv,ze=pe?.maxWidth??qi,Pe=pe!==null&&_,Be=Pe&&te!==null&&b&&userRef!==null&&petRef!==null,[Ne,$e]=d(null);u(()=>{if(!Be)return;let e=te;if(T.get("window").width>=ze){$e(e);return}let t=new AbortController,n=petRef;return st({repo:De,kv:Oe,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||($e(e),r&&ye({key:e,petRef:n}))},()=>{t.signal.aborted||$e(e)}),()=>t.abort()},[Be,te,userRef,petRef,De,Oe,ze]);let Le=Pe&&te!==null&&b&&(userRef===null||petRef===null)&&T.get("window").width<ze,[je,We]=d(null);u(()=>{if(!Le)return;let e=te,t=setTimeout(()=>We(e),ln);return()=>clearTimeout(t)},[Le,te]),Rt(Le&&je!==te||Be&&Ne!==te||me!==null||fe!==null);let Ue=p((e,t)=>{_e(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),Ve=petRef===null?void 0:we.get(petRef),Me=Ve==="some";u(()=>{petRef!==null&&Me&&setHealthPlanNoVet(petRef,false)},[petRef,Me]);let qe=p(()=>{let e=Te.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&Ie({top:Math.round(t),height:Math.round(r)})})},[]);u(()=>{if(me===null||fe!==null)return;let e=sn({sameOpen:me.key===te&&me.petRef===petRef,plan:O,planFailed:F.has(me.petRef),recordsPending:S&&Ve===void 0});if(e==="drop"&&ye(null),e!=="play")return;q("ask"),qe();let t=setTimeout(()=>{ye(null),he(e=>({mode:"intro",id:(e?.id??0)+1}))},Ui);return()=>clearTimeout(t)},[me,fe,te,petRef,O,F,S,Ve,q,qe]),u(()=>{if(me===null)return;let e=setTimeout(()=>ye(e=>e===me?null:e),ln);return()=>clearTimeout(e)},[me]);let He=p(()=>{petRef!==null&&(qe(),he(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,qe]),Ke=p(e=>{(fe?.mode??"intro")==="intro"&&dt({repo:De,kv:Oe,userRef:userRef}),Fe.current==="novet"&&petRef!==null&&setHealthPlanNoVet(petRef,true),e.exit==="plan"?q("plan"):e.exit==="ask"&&q("ask"),e.notifications!==null&&ke(t=>t===null?t:{...t,notified:e.notifications}),e.toast!==null&&ue(e.toast)},[fe,De,Oe,userRef,petRef,q,ue]),Ye=p(()=>he(null),[]),Ge=p(e=>{ke({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),l?.(e)},[l]),Je=p(e=>{e!==null&&(Fe.current=e),be(e)},[]);u(()=>{if(petRef===null){Re(false);return}return Re(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&Re(t)})},[petRef]),u(()=>onHealthPlanRecordsLanded(e=>setHealthPlanNoVet(e,false)),[]);let Qe=pe?.copy,Ze=p(()=>introText({facts:introFacts(j.page,t.petName),copy:{...gt,...Qe},blanks:0,resultsPending:false}),[j.page,t.petName,Qe]),Xe=s(void 0),et=p(()=>{xe(false),q("plan"),petRef!==null&&ue(Ze().toast.landed)},[q,petRef,ue,Ze]);u(()=>{let e=Xe.current;if(Xe.current=Ve,ve===null||petRef===null||ve.petRef!==petRef||e!=="none"||Ve!=="some")return;let t={petRef:petRef,at:/* @__PURE__ */(new Date).toISOString()};f?.(t),notifyHealthPlanRecordsLanded(petRef),ke(null),ve.notified===true?xe(true):et()},[Ve,ve,petRef,f,et]);let tt=t.chat,rt=t.resultsPending??j.page?.page?.wait!==void 0,ot=c(()=>rt?{...tt?.presentation,chatTopCard:"none"}:tt?.presentation,[rt,tt?.presentation]),it=p(()=>q("plan"),[q]),at=p(()=>q("records"),[q]),lt=p(()=>q("ask"),[q]),ct=t.plan,ut=c(()=>ct?.focus===void 0?void 0:{...ct.focus,onConnectRecords:ct.focus.onConnectRecords??at,onWaitAction:ct.focus.onWaitAction??lt},[ct?.focus,at,lt]),pt=t.petName??j.page?.pet.name??"",ht=pt.trim()||Ot,bt=t.records,mt=bt?.sheet,yt=p(()=>{He()},[He]),vt={active:b&&W==="records",askBar:false},kt={onRequestFromClinic:yt,noVet:Ce,onOpenPlan:it},wt=Ft(bt),_t=mt===false?false:{...vt,...typeof mt=="object"?Ft(mt):{}},St=petRef===null?null:/* @__PURE__ */P(o,{...kt,...wt,sheet:_t,petRef:petRef,...pt===""?{}:{petName:pt},onAsk:bt?.onAsk??(e=>Q(e)),style:[{flex:1},bt?.style]},petRef),[xt,Ct]=d([]),At=xt.length===0?null:xt[xt.length-1]??null,Tt=p(e=>{let t={title:e.title,onBack:e.onBack};return Ct(e=>[...e,t]),()=>Ct(e=>e.filter(e=>e!==t))},[]),Et=c(()=>$i(t.shellCopy),[t.shellCopy]),zt=p(e=>{let t=Li(Et.notificationKicker,{petName:ht,time:"{time}"}),n=Dt(e,{kicker:t,now:It.now,ago:It.timeAgoSuffix},Date.now());return n===null?false:(n.tab==="ask"?Q(n.prompt,n.card):K(n.tab),true)},[Et,ht,Q,K]),Pt=c(()=>({tab:W,open:K,ask:Q,requestRecords:He,push:Tt,openInboxItem:zt}),[W,K,Q,He,Tt,zt]),Nt=t.tabsRef;h(()=>{if(Nt!==void 0)return Nt.current=Pt,()=>{Nt.current===Pt&&(Nt.current=null)}},[Nt,Pt]);let $t=ge==="tabs",Lt=t.header===void 0||t.header===false?null:t.header===true?{}:t.header,jt=p(e=>Q(e),[Q]),Ut=e=>t.composer===false?null:/* @__PURE__ */P(ShellAskBar,{placeholder:Li(e==="plan"?Et.planPlaceholder:Et.recordsPlaceholder,{petName:ht}),field:Et.field,send:Et.send,onAsk:jt,testID:`everfur-askbar-${e}`}),Mt=e=>W===e?{flex:1,minHeight:0}:{display:"none"};/* @__PURE__ */
|
|
123
|
+
return P(Wi.Provider,{value:Pt,children:/* @__PURE__ */B(v,{style:[{flex:1,minHeight:0,position:"relative"},t.style],testID:t.testID??"everfur-tabs",children:[
|
|
124
|
+
/* @__PURE__ */B(SdkTabletColumn,{style:{minHeight:0},children:[Lt===null?null:/* @__PURE__ */P(ShellHeader,{options:Lt,tab:W,pushed:At,petRef:petRef,petName:pt,copy:Et,onInboxOpen:zt}),At!==null?null:/* @__PURE__ */P(TabBar,{kit:y,barRef:Te,tabs:$,sub:W,lit:$t,copy:k,planHidden:z,badges:t.badges,onOpen:K}),petRef===null||!_?null:/* @__PURE__ */P(PlanProbe,{petRef:petRef,pagePhase:j.phase,page:j.page,refreshPage:j.refresh,watching:b&&(W==="plan"||z),onPlan:E,onPlanFailed:D}),petRef!==null&&S&&(me!==null||fe!==null||ve!==null)?/* @__PURE__ */P(RecordsProbe,{petRef:petRef,onRecords:Ue}):null,
|
|
125
|
+
/* @__PURE__ */B(v,{style:{flex:1,minHeight:0},children:[
|
|
126
|
+
/* @__PURE__ */B(v,{style:Mt("ask"),testID:"everfur-pane-ask",children:[
|
|
127
|
+
/* @__PURE__ */P(v,{style:{flex:1,minHeight:0},children:/* @__PURE__ */P(Wt.Provider,{value:oe,children:/* @__PURE__ */P(Bt.Provider,{value:oo,children:/* @__PURE__ */P(e,{header:false,historyBar:Yi,...tt,style:[{flex:1,paddingTop:0},tt?.style],...ot===void 0?{}:{presentation:ot},...rt&&t.pendingStarterPrompts!==void 0?{starterPrompts:t.pendingStarterPrompts}:{},...petRef===null?{}:{petRef:petRef},lifecycle:le,onOpenHealthPlan:it,...Z===null?{}:{initialAsk:Z.prompt,initialAskKey:Z.id,...Z.card===void 0?{}:{initialAskCard:Z.card}}})})})},petRef??"none"),t.paneFooter?.ask]}),V.has("plan")&&!z?/* @__PURE__ */B(v,{style:Mt("plan"),testID:"everfur-pane-plan",children:[
|
|
128
|
+
/* @__PURE__ */P(I,{ref:Ee,style:{flex:1},children:/* @__PURE__ */P(n,{scrollRef:Ee,children:/* @__PURE__ */P(r,{...ct,...ut===void 0?{}:{focus:ut},petRef:petRef},N)})},petRef??"none"),t.paneFooter?.plan??Ut("plan")]}):null,V.has("records")?/* @__PURE__ */B(v,{style:Mt("records"),testID:"everfur-pane-records",children:[
|
|
129
|
+
/* @__PURE__ */P(v,{style:{flex:1,minHeight:0},children:t.renderRecords===void 0?St:t.renderRecords(St)},petRef??"none"),t.paneFooter?.records??Ut("records")]}):null]}),de===null||g!==void 0?null:/* @__PURE__ */P(Toast,{kit:y,text:de.text},`toast-${de.id}`),Se?/* @__PURE__ */P(EverfurRecordsLandedBanner,{text:Ze().banner,...pe?.bannerIcon===void 0?{}:{icon:pe.bannerIcon},onLand:et}):null]}),fe===null||petRef===null?null:/* @__PURE__ */P(EverfurIntro,{petRef:petRef,mode:fe.mode,page:j.page,petName:t.petName??null,recordsConnected:fe.mode==="intro"&&(Me||!x),resultsPending:rt,...pe?.copy===void 0?{}:{copy:pe.copy},...pe?.blanks===void 0?{}:{blanks:pe.blanks},tabBar:Ae,tabLabels:{ask:k.ask,plan:k.plan,records:k.records},onFrame:Je,onClose:Ke,onClosed:Ye,onRequested:Ge,...pe?.onEnableNotifications===void 0?{}:{onEnableNotifications:pe.onEnableNotifications},onUpload:pe?.onUpload??at,...pe?.ownerName===void 0?{}:{ownerName:pe.ownerName},...pe?.onCaptureSignature===void 0?{}:{onCaptureSignature:pe.onCaptureSignature}},`intro-${fe.id}`)]})})}function TabBar({kit:e,barRef:t,tabs:n,sub:r,lit:o,copy:i,planHidden:a,badges:l,onOpen:s}){let{borderBottomWidth:d=0,borderBottomColor:c,...u}=e.view(".ph-sub");/* @__PURE__ */
|
|
130
|
+
return B(v,{ref:t,accessibilityRole:"tablist",accessibilityLabel:a?i.listNoPlan:i.listAll,style:u,testID:"everfur-tabs-bar",children:[d>0?/* @__PURE__ */P(v,{pointerEvents:"none",style:{position:"absolute",left:0,right:0,bottom:0,height:d,backgroundColor:c},testID:"everfur-tabs-edge"}):null,n.map((t,n)=>{let a=r===t,d=[".ph-sub button",`.ph-sub [data-sub="${t}"]`,a&&'.ph-sub button[aria-selected="true"]',o&&'#ph[data-in-frame="tabs"] .ph-sub button'];/* @__PURE__ */
|
|
131
|
+
return B(k,{accessibilityRole:"tab",accessibilityState:{selected:a},onPress:()=>s(t),style:[e.view(...d),e.col(".ph-sub",n),{alignItems:"center",justifyContent:"center"}],testID:`everfur-tab-${t}`,children:[
|
|
132
|
+
/* @__PURE__ */P(TabPill,{kit:e,id:t,lit:o}),
|
|
133
|
+
/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",maxWidth:"100%"},children:[
|
|
134
|
+
/* @__PURE__ */P(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...d),{flexShrink:1}],children:i[t]}),l?.[t]===true?/* @__PURE__ */P(v,{style:[e.view(".ph-sub button .ph-new"),Gi],testID:`everfur-tab-${t}-new`}):null]}),a?/* @__PURE__ */P(v,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view('.ph-sub button[aria-selected="true"]::after',o&&'#ph[data-in-frame="tabs"] .ph-sub button::after')}):null]},t)})]})}function TabPill({kit:e,id:t,lit:n}){let r=s(new C.Value(n?1:0)).current,o=`.ph-sub [data-sub="${t}"]`,i=e.raw("k",o),a=e.raw("tint",o);u(()=>{let t=n?e.motion(".ph-sub button::before",'#ph[data-in-frame="tabs"] .ph-sub button::before'):e.motion(".ph-sub button::before"),o=typeof i=="number"?i:0;C.timing(r,{toValue:n?1:0,duration:t.dur,delay:n?t.delay+o*t.stagger:0,easing:e.reduced?Hi:w.bezier(...Ho),useNativeDriver:Ki}).start()},[n,e,i,r]);let l=e.reduced?{opacity:r}:{opacity:r,transform:[{scale:r.interpolate({inputRange:[0,1],outputRange:[Jo.pillScale,1]})}]};/* @__PURE__ */
|
|
135
|
+
return P(C.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof a=="string"?{backgroundColor:a}:null,l],testID:`everfur-tab-pill-${t}`})}function Toast({kit:e,text:t}){let n=s(new C.Value(0)).current;u(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");C.timing(n,{toValue:1,duration:r.dur,easing:w.bezier(...Ho),useNativeDriver:Ki}).start();let o=E.announceForAccessibility;_.OS==="ios"&&typeof o=="function"&&o.call(E,t);let i=setTimeout(()=>{let t=e.motion(".ph-toast");C.timing(n,{toValue:0,duration:t.dur,easing:w.bezier(...Ho),useNativeDriver:Ki}).start()},Mi);return()=>clearTimeout(i)},[e,n,t]);let r=e.reduced?{opacity:n}:{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[Jo.toastY,0]})}]};/* @__PURE__ */
|
|
136
|
+
return P(C.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:Vi},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */P(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=ft();return c(()=>{let t=nt(e),n=e.registry.services.kv;return{shouldPlay:e=>st({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>dt({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Ji=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Qi={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Zi={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},Xi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=Xi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!Xi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
|
|
137
|
+
return Object.freeze({nav:r,sections:/* @__PURE__ */Object.freeze(s),vetOnAsk:i,vetBadge:c,presentation:d,launcher:e["layout.launcher"]==="floating_button",closeControl:u,adjusted:/* @__PURE__ */Object.freeze([...new Set(n)])})}var ea="your pet",ta=/\{([a-z]+)\}/g;function na(e,t){return/(^|[.!?]\s+)$/.test(e.slice(0,t))}function fillSdkText(e,t,n={}){let r=typeof n.pet=="string"?n.pet.trim():"",o={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:r===""?void 0:r,cap:String(n.cap??t["access.free_messages"]),left:n.left===void 0?void 0:String(n.left),visits:n.visits===void 0?void 0:String(n.visits),price:n.price,state:n.state,them:n.them??"them",when:n.when};return e.replace(ta,(t,n,r)=>{let i=o[n];return i!==void 0?i:n==="pet"?na(e,r)?ea.charAt(0).toUpperCase()+ea.slice(1):ea:t})}function sdkText(e,t,n){return fillSdkText(e.settings[t],e.settings,n)}function sdkFixed(e,t,n){return fillSdkText(e.fixedStrings[t],e.settings,n)}function isInsidePartner(e){return e["text.partner_name"]!=="Everfur"}function objectPronoun(e){let t=(e??"").toLowerCase();return t==="female"||t==="f"?"her":t==="male"||t==="m"?"him":"them"}function askAccess(e,t,n){let r=e.settings;if(t==="member")return{kind:"open"};if(r["access.mode"]==="members_only")return{kind:"members_only"};if(r["access.mode"]==="free_cap"){let t=r["access.free_messages"];if(t<1)return{kind:"open"};let o=Math.max(0,t-Math.max(0,Math.floor(n)));return o===0?{kind:"cap_reached",cap:t}:{kind:"counter",left:o,cap:t,line:sdkText(e,"text.cap.counter",{cap:t,left:o})}}return{kind:"open"}}function isLocked(e,t,n){return t==="member"||e.settings["access.mode"]==="open"&&t==="unknown"?false:e.settings["access.locked"].includes(n)}function capMonth(e){let t=e.getUTCMonth()+1;return`${e.getUTCFullYear()}-${t<10?"0":""}${t}`}var ra={video_visits:"locked.video_visits",texting:"locked.texting",link_records:"locked.link_records",previous_results:"locked.previous_results",dashboard:"locked.dashboard",goals:"locked.goals"};function formatPrice(e,t){let n=t.replace(/^(US)?\$/,"");return`${e["units.currency"]}${n}`}function priceLines(e){let t=e.settings;switch(t["plan.price_display"]){case"full":return[`${formatPrice(t,t["plan.price_year"])} ${sdkFixed(e,"plan.price.year")}`];case"monthly_equivalent":return[`${formatPrice(t,t["plan.price_month"])}${sdkFixed(e,"plan.price.month")}`,sdkFixed(e,"plan.price.billed")];default:return[]}}function planSheet(e,t){let n=e.settings,r=t===void 0?{}:{pet:t};/* @__PURE__ */
|
|
138
|
+
return Object.freeze({kind:"plan",title:n["access.mode"]==="free_cap"?sdkText(e,"text.cap.reached",{cap:n["access.free_messages"]}):null,badge:null,price:priceLines(e),locked:n["access.locked"].map(t=>sdkFixed(e,ra[t],r)),button:sdkText(e,"text.cap.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:n["plan.sold_by"]})}function membersSheet(e){let t=e.settings;/* @__PURE__ */
|
|
139
|
+
return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var oa="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==oa,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c=t.stateName?.trim()??"",u={...a,state:c,them:objectPronoun(t.petSex)},p=c!==""&&t.level==="visits"?sdkFixed(e,"vet.gate.visits",u):c!==""&&t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",u):null,f=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&f.push(sdkFixed(e,"vet.legal.rx")),f.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:p,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(f),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
|
|
140
|
+
return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var ia="https:\\/\\/sdk(?:-[a-z]+)?\\.everfur\\.com";function aa(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}var la=typeof __EVERFUR_BRAND_CDN_ORIGIN__=="string"&&__EVERFUR_BRAND_CDN_ORIGIN__.length>0?aa(__EVERFUR_BRAND_CDN_ORIGIN__):ia;var sa=/^#[0-9A-Fa-f]{6}$/,da=/\{([a-z]+)\}/g;function ca(e){return[...e.matchAll(da)].map(e=>e[1])}var ua=/* @__PURE__ */new Set(["pet","partner","plan","assistant","cap"]),pa=/* @__PURE__ */new Set(["text.partner_name","text.ask.name","plan.name"]);function fa(e,t){return pa.has(e)?!/[{}]/.test(t):ca(t).every(t=>ua.has(t)||t==="left"&&e==="text.cap.counter")}function ha(e,t){let n=new Set(ca(e));return ca(t).every(e=>n.has(e)||ua.has(e))}var ga=/^(US)?\$\d{1,3}(,\d{3})*(\.\d{2})?$/;function ba(e){return typeof e=="string"&&sa.test(e)}function ma(e){return typeof e=="number"&&Number.isFinite(e)}function ya(e,t){return!(e.range!==void 0&&(t<e.range[0]||t>e.range[1])||e.oneOf!==void 0&&!e.oneOf.includes(t))}var va=/* @__PURE__ */new RegExp(`^${la}\\/brand\\/[0-9a-f]{16}\\.woff2$`);function ka(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let{family:e,weight:r,url:o}=n;if(typeof e!="string"||e.trim()===""||typeof o!="string"||!va.test(o))continue;let i=typeof r=="number"?String(r):typeof r=="string"?r:"400";t.push(/* @__PURE__ */Object.freeze({family:e,weight:i,url:o}))}/* @__PURE__ */
|
|
141
|
+
return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return ba(t)?t.toUpperCase():void 0;case"colorOrNone":return t==="none"?"none":ba(t)?t.toUpperCase():void 0;case"hexList":{if(!Array.isArray(t))return;let n=t.filter(ba).map(e=>e.toUpperCase());return n.length!==t.length||n.length>4||e.key==="look.color.chips"&&n.length<1||e.key==="look.chat_wash"&&n.length===1?void 0:/* @__PURE__ */Object.freeze(n)}case"fontFiles":return ka(t);case"boolean":return typeof t=="boolean"?t:void 0;case"number":return ma(t)&&ya(e,t)?t:void 0;case"numberOrNull":return t===null?null:ma(t)&&ya(e,t)?t:void 0;case"money":return typeof t=="string"&&ga.test(t)?t:void 0;case"moneyOrNull":return t===null?null:typeof t=="string"&&ga.test(t)?t:void 0;case"choice":return e.oneOf!==void 0&&e.oneOf.includes(t)?t:void 0;case"itemList":{if(!Array.isArray(t))return;let n=e.items??[],r=t.filter(e=>typeof e=="string"&&n.includes(e));return r.length!==t.length||new Set(r).size!==r.length&&e.key!=="layout.sections"?void 0:/* @__PURE__ */Object.freeze([...r])}case"string":return typeof t!="string"||t.trim()===""&&e.emptyOk!==true?void 0:fa(e.key,t)?t:void 0;case"text":return typeof t=="string"?t:void 0;default:return}}function resolveSettings(e){let t=e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},n={...Qi},r=[];for(let e of Ji){if(!Object.prototype.hasOwnProperty.call(t,e.key))continue;let o=parseSettingValue(e,t[e.key]);o===void 0?r.push(e.key):n[e.key]=o}return{settings:/* @__PURE__ */Object.freeze(n),rejected:/* @__PURE__ */Object.freeze(r)}}function resolveFixedStrings(e){let t={...Zi};if(e!==null&&typeof e=="object"&&!Array.isArray(e))for(let[n,r]of Object.entries(e))!Object.prototype.hasOwnProperty.call(Zi,n)||typeof r!="string"||r===""||ha(Zi[n],r)&&(t[n]=r);/* @__PURE__ */
|
|
142
|
+
return Object.freeze(t)}function wa(e){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.filter(e=>typeof e=="string").map(e=>e.toUpperCase())):/* @__PURE__ */Object.freeze([])}function parseStateGate(e){let t=e!==null&&typeof e=="object"?e:{};/* @__PURE__ */
|
|
143
|
+
return Object.freeze({videoAndRx:wa(t.video_and_rx),adviceOnly:wa(t.advice_only)})}function parseSdkConfig(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n=t.revision,r=t.settings;if(!ma(n)||r===null||typeof r!="object"||Array.isArray(r))return null;let o=ma(t.schema_version)?t.schema_version:3;/* @__PURE__ */
|
|
144
|
+
return Object.freeze({schemaVersion:o,partner:typeof t.partner=="string"?t.partner:"",revision:n,settings:resolveSettings(r).settings,fixedStrings:resolveFixedStrings(t.fixed_strings),stateGate:parseStateGate(t.state_gate)})}function serializeSdkConfig(e){return JSON.stringify({schema_version:e.schemaVersion,partner:e.partner,revision:e.revision,settings:e.settings,fixed_strings:e.fixedStrings,state_gate:{video_and_rx:e.stateGate.videoAndRx,advice_only:e.stateGate.adviceOnly}})}var _a=/* @__PURE__ */Object.freeze(["composerInput","sendButton","userBubble","assistantBubble","vetBubble","recordCard","vetVisitButton","primaryButton","link","header","banner","chip","card","input","tab","bookingStep","dialog","cartBar","planCard","planReasonLabel","planWash","planChip"]);var Sa="presentation";var xa=/* @__PURE__ */Object.freeze(["display_name","logo_url","logo_url_dark","primary_color","accent_color","primary_color_dark","accent_color_dark","brightness","color_scheme","font_family","font_url","fonts","font_urls","chat_placeholder","surface_style","radius_scale","accessibility_max_font_scale","slots","background_color","background_color_dark","text_color","text_color_dark","danger_color","danger_color_dark","font_size_base","border_radius","spacing_unit","success_color","success_color_dark","warning_color","warning_color_dark","info_color","info_color_dark","heading_font_family","font_weight_body","font_weight_heading","line_height","assistant_avatar_url","font_sources"]);function hardenHttpsUrl(e){if(e===null)return null;let t=e.trim();return t.length===0?null:/^https:\/\/\S+$/i.test(t)?t:null}var Ca=/* @__PURE__ */new RegExp(`^${la}\\/brand\\/[0-9a-f]{16}\\.(png|jpg|webp)$`);function hardenBrandAssetUrl(e){let t=hardenHttpsUrl(e);return t!==null&&Ca.test(t)?t:null}var Ra="everfur-ask";function Fa(e){let t=e.weight.trim().split(/\s+/).map(Number).filter(e=>Number.isFinite(e)),n=t[0]??400,r=t[1]??n,o=[];for(let e=Math.ceil(n/100)*100;e<=r;e+=100)e>=100&&e<=900&&o.push(String(e));return o.length===0?["400"]:o}function fontSourcesOf(e){let t=[];for(let n of e["look.font.files"])for(let e of Fa(n))t.push(/* @__PURE__ */Object.freeze({family:n.family,src:n.url,weight:e}));/* @__PURE__ */
|
|
143
145
|
return Object.freeze(t)}function slotsOf(e){let t=buttonFill(e),n=e["look.color.heading"],r=e["look.color.bubble"],o=e["look.color.chips"][0]??e["look.color.tint"],i=e["look.radius.card"];/* @__PURE__ */
|
|
144
|
-
return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var
|
|
145
|
-
return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===la?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:da})}var ca="/widget/v1/sdk-config",ua="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[ua]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:ca,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function pa(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function fa(e){let t=3421674724,n=2216829733;for(let r of pa(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var ha="everfur.sdkconfig.v3.";function ga(e){return`${ha}${fa(e)}`}function ba(e,t,n){return`everfur.sdkconfig.freecap.v1.${fa(`${e}|${t}|${n}`)}`}var ma=300*1e3,ya=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function va(e,t){try{let n=await e.getItem(ga(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function ka(e,t,n){try{n===null?await e.removeItem(ga(t)):await e.setItem(ga(t),serializeSdkConfig(n))}catch{}}function wa(e){let t=ya,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{ka(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(ka(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await va(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=ma;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=ba(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(ba(e.scope,t,n))??null},addFreeUsed(t,n){let r=ba(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=ba(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function _a(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function Sa(e){return e==null||e.disposed?null:e.store!==null?e.store:_a(e,wa({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var xa=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),Ca=()=>()=>{},Ra=()=>xa;function Fa(){return Sa(f(lt)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Aa(Fa())}function Aa(e){return g(e?.subscribe??Ca,e?.getSnapshot??Ra,e?.getSnapshot??Ra)}function useLoadEverfurSdkConfig(){let e=Fa();return u(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Ia(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=createContext(null))}var Ta=/* @__PURE__ */Ia();var Ea="Go to the nearest emergency vet now.";var Da=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:Ea,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Oa=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function za(){let e=globalThis,t=e[Oa];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Oa]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return u(()=>{if(n)return;let e=za();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */z(Text,{tier:"compact",style:t,accessibilityRole:"text",children:Da.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return Ba(`optional peer '${e}' is not installed: ${Na(t)}`)}let o=Pa(r);return o==null?Ba(`optional peer '${e}' resolved to no module`):n&&!n(o)?Ba(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function Pa(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function Ba(e){/* @__PURE__ */
|
|
146
|
-
return Object.freeze({available:false,module:null,reason:e})}function
|
|
147
|
-
return
|
|
148
|
-
return
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
return
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
return
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
return
|
|
159
|
-
return
|
|
160
|
-
return
|
|
161
|
-
return
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
return
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
return
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
return
|
|
176
|
-
return P(
|
|
177
|
-
/* @__PURE__ */P(
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */P(
|
|
192
|
-
|
|
193
|
-
return P(v,{accessibilityRole:"
|
|
194
|
-
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
|
|
197
|
-
return P(
|
|
198
|
-
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
146
|
+
return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var Aa=/* @__PURE__ */Object.freeze([...xa,..._a.map(e=>`slots.${e}`),"hide_powered_by",Sa]);function sdkConfigBranding(e){let t=e.settings,n=t["look.ask_icon"],r=t["look.font.heading_weight"];/* @__PURE__ */
|
|
147
|
+
return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===Ra?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:Aa})}var Ia="/widget/v1/sdk-config",Ta="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[Ta]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:Ia,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function Ea(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function Da(e){let t=3421674724,n=2216829733;for(let r of Ea(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var Oa="everfur.sdkconfig.v3.";function za(e){return`${Oa}${Da(e)}`}function Pa(e,t,n){return`everfur.sdkconfig.freecap.v1.${Da(`${e}|${t}|${n}`)}`}var Ba=300*1e3,Na=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function $a(e,t){try{let n=await e.getItem(za(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function La(e,t,n){try{n===null?await e.removeItem(za(t)):await e.setItem(za(t),serializeSdkConfig(n))}catch{}}function ja(e){let t=Na,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{La(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(La(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await $a(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=Ba;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=Pa(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(Pa(e.scope,t,n))??null},addFreeUsed(t,n){let r=Pa(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=Pa(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function Wa(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function Ua(e){return e==null||e.disposed?null:e.store!==null?e.store:Wa(e,ja({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var Va=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),Ma=()=>()=>{},qa=()=>Va;function Ha(){return Ua(f(pt)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Ka(Ha())}function Ka(e){return g(e?.subscribe??Ma,e?.getSnapshot??qa,e?.getSnapshot??qa)}function useLoadEverfurSdkConfig(){let e=Ha();return u(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Ya(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=createContext(null))}var Ga=/* @__PURE__ */Ya();var Ja="Go to the nearest emergency vet now.";var Qa=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:Ja,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Za=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function Xa(){let e=globalThis,t=e[Za];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Za]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return u(()=>{if(n)return;let e=Xa();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */P(Text,{tier:"compact",style:t,accessibilityRole:"text",children:Qa.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return tl(`optional peer '${e}' is not installed: ${nl(t)}`)}let o=el(r);return o==null?tl(`optional peer '${e}' resolved to no module`):n&&!n(o)?tl(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function el(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function tl(e){/* @__PURE__ */
|
|
148
|
+
return Object.freeze({available:false,module:null,reason:e})}function nl(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}var rl=/* @__PURE__ */new RegExp(`^${la}\\/brand\\/[0-9a-f]{16}\\.svg$`);function ol(e){if(typeof e!="object"||e===null)return false;let t=e.SvgUri;return typeof t=="function"||typeof t=="object"&&t!==null}var il=null;function registerEverfurSvg(e){if(e===null)return il=null,false;let t=optionalModule("react-native-svg",e,ol);return il=t.available?t.module:null,t.available}function al(e){let t=hardenHttpsUrl(e);return t!==null&&rl.test(t)?t:null}function ll(e){let t=y.flatten(e),n=t?.width,r=t?.height;return typeof n=="number"&&typeof r=="number"?{width:n,height:r}:null}function SdkBrandArt({url:e,style:t,fallback:n=null,testID:r}){let[o,i]=d(false),a=al(e);if(a!==null){let e=ll(t),l=il?.SvgUri;return l===void 0||e===null||o?n:/* @__PURE__ */P(v,{style:t,accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:r??"everfur-sdk-svg",children:/* @__PURE__ */P(l,{uri:a,width:e.width,height:e.height,onError:()=>i(true)})})}let l=e.trim()===""?null:hardenBrandAssetUrl(e);/* @__PURE__ */
|
|
149
|
+
return P(BrandImage,{uri:l,decorative:true,style:t,fallback:n,...r===void 0?{}:{testID:r}})}var sl="#10462E",dl="#FFFFFF",cl="#8A8A8A";function SdkNeutralScreen({failed:e,onRetry:t}){/* @__PURE__ */
|
|
150
|
+
return P(v,{style:{flex:1,backgroundColor:dl,alignItems:"center",justifyContent:"center",padding:24},testID:e?"everfur-sdk-error":"everfur-sdk-loading",children:e?/* @__PURE__ */B(N,{children:[
|
|
151
|
+
/* @__PURE__ */P(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:Zi["load.error"]}),
|
|
152
|
+
/* @__PURE__ */P(k,{accessibilityRole:"button",onPress:t,style:{marginTop:14,minHeight:44,paddingHorizontal:20,borderRadius:22,borderWidth:1,borderColor:"#D9D9D9",alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-retry",children:/* @__PURE__ */P(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:Zi["load.retry"]})})]}):/* @__PURE__ */P(z,{color:cl})})}function ul(e){return e.trim()===""?null:hardenBrandAssetUrl(e)}function SdkLockup({settings:e}){let t=e["look.lockup"]==="stacked",n=t?e["look.logo.wordmark"]:e["look.logo.mark"],r=e["text.partner_name"],o=/* @__PURE__ */B(v,{style:t?{flexDirection:"row",alignItems:"center",gap:5}:{gap:1,alignItems:"flex-start"},children:[
|
|
153
|
+
/* @__PURE__ */P(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children:Ni.poweredBy}),
|
|
154
|
+
/* @__PURE__ */P(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:sl}})]});/* @__PURE__ */
|
|
155
|
+
return P(EverfurPoweredBy2,{children:/* @__PURE__ */B(v,{accessible:true,accessibilityLabel:`${r}, ${Ni.poweredByLabel}`,style:t?{flexDirection:"column",alignItems:"center",gap:3}:{flexDirection:"row",alignItems:"center",gap:8,flexShrink:1},testID:t?"everfur-sdk-lockup-stacked":"everfur-sdk-lockup-side",children:[
|
|
156
|
+
/* @__PURE__ */P(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */P(v,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),o]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:o=null,bottomInset:i=0}){let{tablet:a}=or(),l=t["look.color.heading"],s=t["look.font.body"];/* @__PURE__ */
|
|
157
|
+
return P(v,{style:{position:"absolute",left:0,right:0,top:0,bottom:0,justifyContent:"flex-end",backgroundColor:"rgba(0,0,0,0.32)"},testID:`everfur-sdk-sheet-${e.kind}`,children:/* @__PURE__ */B(v,{accessibilityViewIsModal:true,style:[{backgroundColor:dl,borderTopLeftRadius:t["look.radius.sheet"],borderTopRightRadius:t["look.radius.sheet"],paddingTop:10,paddingHorizontal:18,paddingBottom:(a?40:30)+i,gap:12},a?{width:Jn,alignSelf:"center"}:null],children:[e.badge!==null?/* @__PURE__ */P(Text,{tier:"badge",style:{alignSelf:"flex-start",fontFamily:s,fontSize:12,color:l,backgroundColor:t["look.color.tint"],paddingHorizontal:10,paddingVertical:4,borderRadius:12,overflow:"hidden"},children:e.badge}):null,e.title!==null?/* @__PURE__ */P(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:t["look.font.heading"],fontWeight:String(t["look.font.heading_weight"]),fontSize:20,color:l},children:e.title}):null,e.locked.map(e=>/* @__PURE__ */P(Text,{style:{fontFamily:s,fontSize:15,color:t["look.color.ink"]},children:e},e)),e.price.map(e=>/* @__PURE__ */P(Text,{style:{fontFamily:s,fontSize:15,color:t["look.color.muted"]},testID:"everfur-sdk-price",children:e},e)),o!==null?/* @__PURE__ */P(Text,{style:{fontFamily:s,fontSize:15,color:t["look.color.ink"]},testID:"everfur-sdk-sheet-notice",children:o}):null,
|
|
158
|
+
/* @__PURE__ */P(SdkButton,{settings:t,label:e.button,onPress:n,testID:"everfur-sdk-sheet-primary"}),
|
|
159
|
+
/* @__PURE__ */P(k,{accessibilityRole:"button",onPress:r,style:{minHeight:44,alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-sheet-dismiss",children:/* @__PURE__ */P(Text,{tier:"control",style:{fontFamily:s,fontSize:15,color:t["look.color.muted"]},children:e.dismiss})})]})})}function SdkButton({settings:e,label:t,onPress:n,testID:r}){let{fill:o,ink:i}=buttonFill(e);/* @__PURE__ */
|
|
160
|
+
return P(k,{accessibilityRole:"button",onPress:n,style:{minHeight:48,borderRadius:24,backgroundColor:o,alignItems:"center",justifyContent:"center",paddingHorizontal:20},...r===void 0?{}:{testID:r},children:/* @__PURE__ */P(Text,{tier:"control",style:{fontFamily:e["look.font.body"],fontSize:16,fontWeight:"600",color:i},children:t})})}function SdkMemoryChip({settings:e,label:t}){/* @__PURE__ */
|
|
161
|
+
return P(v,{style:{alignSelf:"flex-start",minHeight:30,paddingHorizontal:12,borderRadius:15,borderWidth:1,borderColor:e["look.color.line"],backgroundColor:"rgba(255,255,255,0.75)",justifyContent:"center"},testID:"everfur-sdk-memory-chip",children:/* @__PURE__ */P(Text,{tier:"compact",style:{fontFamily:e["look.font.body"],fontSize:12.5,color:e["look.color.ink"]},children:t})})}function SdkDockBar({config:e,pet:t,onPress:n}){let r=e.settings;/* @__PURE__ */
|
|
162
|
+
return P(k,{accessibilityRole:"button",onPress:n,style:{margin:12,minHeight:50,borderRadius:25,borderWidth:1.5,borderColor:r["look.color.heading"],backgroundColor:dl,justifyContent:"center",paddingHorizontal:18},testID:"everfur-sdk-dock",children:/* @__PURE__ */P(Text,{numberOfLines:1,ellipsizeMode:"tail",style:{fontFamily:r["look.font.body"],fontSize:15,color:r["look.color.muted"]},children:sdkText(e,"text.ask.dock_placeholder",{pet:t??null})})})}function VetPersonMark({tint:e,ink:t}){/* @__PURE__ */
|
|
163
|
+
return B(v,{style:{width:52,height:52,borderRadius:26,overflow:"hidden",backgroundColor:e,alignItems:"center",justifyContent:"flex-end"},accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"everfur-sdk-vet-person",children:[
|
|
164
|
+
/* @__PURE__ */P(v,{style:{width:20,height:20,borderRadius:10,marginBottom:3,backgroundColor:t,opacity:.55}}),
|
|
165
|
+
/* @__PURE__ */P(v,{style:{width:34,height:15,borderTopLeftRadius:17,borderTopRightRadius:17,backgroundColor:t,opacity:.55}})]})}function SdkVetHomeView({config:e,home:t,onBook:n,style:r}){let o=e.settings,i=o["look.font.body"],a=o["look.color.ink"],l=o["look.color.muted"],s=t.photo===null?null:ul(t.photo);/* @__PURE__ */
|
|
166
|
+
return B(I,{style:r,contentContainerStyle:{gap:14,paddingHorizontal:16,paddingTop:16,paddingBottom:22},testID:`everfur-sdk-vet-${t.level}`,children:[
|
|
167
|
+
/* @__PURE__ */B(v,{style:{backgroundColor:dl,borderWidth:1,borderColor:o["look.color.line"],borderRadius:o["look.radius.card"],padding:16,gap:12},children:[
|
|
168
|
+
/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",gap:12},children:[
|
|
169
|
+
/* @__PURE__ */P(BrandImage,{uri:s,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback:t.initial!==null?/* @__PURE__ */P(v,{style:{width:52,height:52,borderRadius:26,backgroundColor:o["look.color.tint"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-vet-initial",children:/* @__PURE__ */P(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontSize:20,color:o["look.color.heading"]},children:t.initial})}):/* @__PURE__ */P(VetPersonMark,{tint:o["look.color.tint"],ink:o["look.color.heading"]})}),
|
|
170
|
+
/* @__PURE__ */B(v,{style:{flex:1,gap:2},children:[
|
|
171
|
+
/* @__PURE__ */P(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontWeight:String(o["look.font.heading_weight"]),fontSize:17,color:o["look.color.heading"]},children:t.name}),t.title!==null?/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:13,color:l},children:t.title}):null]})]}),t.allowance!==null||t.extra!==null?/* @__PURE__ */B(v,{style:{backgroundColor:o["look.color.tint"],borderRadius:Math.max(8,o["look.radius.card"]-4),padding:12,gap:2},testID:"everfur-sdk-vet-allowance",children:[t.allowance!==null?/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:14,fontWeight:"600",color:a},children:t.allowance}):null,t.extra!==null?/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:13,color:l},children:t.extra}):null]}):null,
|
|
172
|
+
/* @__PURE__ */P(SdkButton,{settings:o,label:t.seeTimes,onPress:n,testID:"everfur-sdk-vet-book"})]}),t.gate!==null?/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:14,color:a},testID:"everfur-sdk-vet-gate",children:t.gate}):null,t.rx!==null?/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:14,color:a},testID:"everfur-sdk-vet-rx",children:t.rx}):null,
|
|
173
|
+
/* @__PURE__ */P(v,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:12,color:l},children:e},e))}),t.privacy!==null?/* @__PURE__ */P(Text,{style:{fontFamily:i,fontSize:12,color:l},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function pl(e){return sdkText(e,"text.tabs.ask")}function SdkLauncherView({config:e,onPress:t,replyWaiting:n,tipSeen:r,onTipSeen:o,style:i}){let a=e.settings,l=a["layout.presentation"]==="full_screen",s=a["look.ask_icon"]===Ra?"":a["look.ask_icon"],[c,p]=d(l&&!r);u(()=>{(!l||r)&&p(false)},[l,r]);let f=()=>{p(false),o()};/* @__PURE__ */
|
|
174
|
+
return B(v,{style:[{alignItems:"flex-end",gap:8},i],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[c?/* @__PURE__ */P(k,{accessibilityRole:"button",onPress:f,style:{maxWidth:240,backgroundColor:dl,borderRadius:14,borderWidth:1,borderColor:a["look.color.line"],paddingHorizontal:14,paddingVertical:10},testID:"everfur-sdk-launcher-tip",children:/* @__PURE__ */P(Text,{style:{fontFamily:a["look.font.body"],fontSize:14,color:a["look.color.ink"]},children:sdkText(e,"text.launcher.tip")})}):null,
|
|
175
|
+
/* @__PURE__ */B(k,{accessibilityRole:"button",accessibilityLabel:pl(e),onPress:()=>{c&&f(),t()},style:{width:60,height:60,borderRadius:30,backgroundColor:a["look.color.launcher"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-launcher-button",children:[
|
|
176
|
+
/* @__PURE__ */P(SdkBrandArt,{url:s,style:{width:l?24:30,height:l?24:30},fallback:/* @__PURE__ */P(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:a["look.color.on_launcher"]}})}),l?/* @__PURE__ */P(Text,{tier:"badge",style:{fontFamily:a["look.font.body"],fontSize:10,color:a["look.color.on_launcher"]},children:pl(e)}):null,l&&n?/* @__PURE__ */P(v,{style:{position:"absolute",top:2,right:2,width:12,height:12,borderRadius:6,backgroundColor:"#C03410",borderWidth:2,borderColor:dl},testID:"everfur-sdk-launcher-dot"}):null]})]})}function fl(e){return e===void 0?{section:void 0,key:null}:typeof e=="string"?{section:e,key:null}:{section:e.section,key:e.key}}function hl(e){let t=e.activePetRef;return e.pets.find(e=>e.petRef===t)??e.pets[0]??null}function EverfurSdkApp(e){let t=Ha(),n=useEverfurSdkConfig();u(()=>{if(t===null)return;t.adoptLatest(),t.load();let e=D.addEventListener("change",e=>{e==="active"&&t.retry()});return()=>e.remove()},[t]);let r=p(()=>{t?.retry()},[t]);return n.active!==null?/* @__PURE__ */P(SdkShell,{...e,config:n.active}):n.status==="legacy"?/* @__PURE__ */P(LegacyPath,{...e}):/* @__PURE__ */P(SdkNeutralScreen,{failed:n.status==="failed",onRetry:r})}function LegacyPath({host:e,renderLegacy:t,section:n}){if(t!==void 0)return t();let r=hl(e);/* @__PURE__ */
|
|
177
|
+
return P(EverfurTabs,{petRef:r?.petRef??null,petName:r?.name??null,opened:gl(n)})}function gl(e){let{section:t,key:n}=fl(e);return t===void 0||t==="vet"?{via:"plain"}:n===null?{via:"link",tab:t}:{via:"link",tab:t,key:n}}function bl(e,t,n){let r=Ha(),o=e.settings["access.mode"]==="free_cap",i=capMonth(/* @__PURE__ */new Date),[a,l]=d(()=>r?.peekFreeUsed(t,i)??0),p=s(true),f=s(n);f.current=n,u(()=>{if(p.current=true,!(r===null||!o))return r.readFreeUsed(t,i).then(e=>{p.current&&l(e)}),()=>{p.current=false}},[r,o,t,i]);let h=c(()=>!o||r===null?null:{onMessageSent:()=>{r.addFreeUsed(t,i).then(e=>{p.current&&l(e)})},onFreeCapReached:e=>{r.setFreeUsed(t,i,e.used).then(e=>{p.current&&l(e)}),f.current(e)}},[o,r,t,i]);return{used:a,hooks:h}}var ml=At.heading;function SdkShell({host:e,section:t,onSectionChange:n,chat:r,records:o,style:i,config:a}){let l=a.settings,h=f(pt),g=hl(e),b=vetLevelFor(a.stateGate,g?.location??null),m=c(()=>resolveLayout(l,b),[l,b]),y=e.membership??"unknown",k=e.userId??h?.userRef??"anonymous",w=s(()=>{}),{used:_,hooks:S}=bl(a,k,e=>w.current(e)),x=askAccess(a,y,_),{tablet:C,column:R}=or(),F=fl(t),[A,I]=d(F.section??m.sections[0]??"ask");u(()=>{F.section!==void 0&&I(F.section)},[F.section,F.key]);let T=p(e=>{I(e),n?.(e)},[n]),E=m.vetOnAsk!=="none",D=A==="vet"&&!E?"ask":A,O=m.closeControl!=="none",[z,N]=d(null),$=p((e,t=null)=>{let n={sheet:e.kind==="members"?membersSheet(a):planSheet(a,g?.name),reason:e,notice:t};N(r=>t===null&&e.kind==="cap"&&r?.reason.kind==="cap"?{...n,notice:r.notice}:n)},[a,g?.name]);w.current=e=>$({kind:"cap"},e.emergencyGuidance??null);let L=()=>{z!==null&&(e.onOpenPlan?.(z.reason,z.sheet.soldBy),N(null))};u(()=>{x.kind==="members_only"?$({kind:"members"}):x.kind==="cap_reached"&&$({kind:"cap"})},[x.kind,$]);let j=e=>isLocked(a,y,e),W={flex:1,backgroundColor:l["look.color.surface"]},U=D==="vet"?/* @__PURE__ */P(VetPane,{config:a,pet:g,level:b,locked:j("video_visits"),onLocked:()=>$({kind:"locked",part:"video_visits"}),onAsk:()=>T("ask")}):D==="records"?/* @__PURE__ */P(RecordsPane,{config:a,host:e,pet:g,vetShown:E,records:o,onPlan:e=>$({kind:"locked",part:e}),onVet:()=>E?T("vet"):void 0,locked:j,onAsk:()=>T("ask")}):/* @__PURE__ */P(AskPane,{config:a,layout:m,pet:g,level:b,access:x,hooks:S,chat:r,locked:j,onVet:()=>T("vet"),onPlan:()=>$({kind:x.kind==="members_only"?"members":"cap"})}),V=/* @__PURE__ */P(SdkColumnScope,{children:U});/* @__PURE__ */
|
|
178
|
+
return P(ShellSafeArea,{framed:O,children:t=>/* @__PURE__ */B(v,{style:[W,i],testID:`everfur-sdk-app-${m.nav}`,children:[
|
|
179
|
+
/* @__PURE__ */P(Framed,{framed:O,insets:t,children:/* @__PURE__ */B(v,{style:R,testID:C?"everfur-sdk-column-tablet":"everfur-sdk-column-phone",children:[
|
|
180
|
+
/* @__PURE__ */P(Header,{config:a,layout:m,host:e,pet:g,section:D,level:b,onSection:T}),m.nav==="bottom_tabs"||m.nav==="chat_first"?null:/* @__PURE__ */P(SectionNav,{config:a,layout:m,level:b,section:D,onSection:T,vetDot:e.vetMessageWaiting===true}),
|
|
181
|
+
/* @__PURE__ */P(v,{style:{flex:1},children:V}),m.nav==="bottom_tabs"?/* @__PURE__ */P(SectionNav,{config:a,layout:m,level:b,section:D,onSection:T,vetDot:e.vetMessageWaiting===true,bottom:true}):null]})}),z!==null?/* @__PURE__ */P(SdkSheet,{sheet:z.sheet,settings:l,onPrimary:L,onDismiss:()=>N(null),notice:z.notice,bottomInset:t.bottom}):null]})})}var yl=/* @__PURE__ */Object.freeze({top:0,bottom:0,left:0,right:0});function ShellSafeArea({framed:e,children:t}){let n=f(j);return e?
|
|
182
|
+
/* @__PURE__ */P(W,{initialMetrics:n===null?U:null,children:/* @__PURE__ */P(MeasuredInsets,{children:t})}):t(yl)}function MeasuredInsets({children:e}){return e(V())}function Framed({framed:e,insets:t,children:n}){return e?/* @__PURE__ */P(v,{style:{flex:1,paddingTop:t.top,paddingBottom:t.bottom,paddingLeft:t.left,paddingRight:t.right},testID:"everfur-sdk-safe-area",children:n}):n}function vl(e,t,n){return t==="vet"?vetTabLabel(e,n):sdkText(e,t==="ask"?"text.tabs.ask":"text.tabs.records")}function SectionNav({config:e,layout:t,level:n,section:r,onSection:o,vetDot:i,bottom:a=false}){let l=e.settings;return t.sections.length<2?null:/* @__PURE__ */P(v,{accessibilityRole:"tablist",style:[{flexDirection:"row",borderColor:l["look.color.line"],backgroundColor:l["look.color.surface"]},a?{borderTopWidth:1,paddingBottom:6}:{borderBottomWidth:1,paddingHorizontal:8}],testID:a?"everfur-sdk-tabs-bottom":"everfur-sdk-tabs-top",children:t.sections.map(s=>{let d=s===r;/* @__PURE__ */
|
|
183
|
+
return B(k,{accessibilityRole:"tab",accessibilityState:{selected:d},onPress:()=>o(s),style:{flex:a?1:0,minHeight:44,paddingHorizontal:12,alignItems:"center",justifyContent:"center",flexDirection:"row",gap:6,borderBottomWidth:a?0:2,borderBottomColor:d?l["look.color.primary"]:"transparent"},testID:`everfur-sdk-tab-${s}`,children:[
|
|
184
|
+
/* @__PURE__ */P(Text,{tier:"control",style:{fontFamily:l["look.font.body"],fontSize:15,fontWeight:d?"600":"400",color:d?l["look.color.heading"]:l["look.color.muted"]},children:vl(e,s,n)}),s==="vet"&&i&&t.vetBadge==="tab_dot"?/* @__PURE__ */P(v,{style:{width:7,height:7,borderRadius:4,backgroundColor:l["look.color.dot"]},testID:"everfur-sdk-vet-dot"}):null]},s)})})}function Header({config:e,layout:t,host:n,pet:r,section:o,level:i,onSection:a}){let l=e.settings,s=l["look.color.heading"],d=(e,t,n)=>/* @__PURE__ */P(k,{accessibilityRole:"button",onPress:t,style:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},testID:n,children:/* @__PURE__ */P(Text,{tier:"control",style:{fontSize:20,color:s},children:e})});if(t.nav==="sections_page"){let t=sdkText(e,"text.nav.page_title"),n=/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingTop:12,paddingBottom:8},testID:"everfur-sdk-header-sections",children:[t!==""?/* @__PURE__ */P(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:24,color:s},children:t}):null,
|
|
185
|
+
/* @__PURE__ */P(SdkLockup,{settings:l})]});return o==="ask"?/* @__PURE__ */B(v,{children:[n,
|
|
186
|
+
/* @__PURE__ */P(MemoryRow,{config:e,pet:r})]}):n}if(t.nav==="chat_first"){let c=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
|
|
187
|
+
return B(v,{testID:"everfur-sdk-header-chat-first",children:[
|
|
188
|
+
/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52},children:[d("↓",n.onClose,"everfur-sdk-down"),
|
|
189
|
+
/* @__PURE__ */P(Text,{tier:"heading",numberOfLines:1,style:{flex:1,textAlign:"center",fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:17,color:s},children:o==="ask"?sdkText(e,"text.ask.name"):vl(e,o,i)}),c?/* @__PURE__ */P(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):o!=="ask"?d("×",()=>a("ask"),"everfur-sdk-back-to-ask"):/* @__PURE__ */P(v,{style:{minWidth:44}})]}),o==="ask"?/* @__PURE__ */P(MemoryRow,{config:e,pet:r,withLockup:true}):null]})}let c=t.presentation==="full_screen",u=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
|
|
190
|
+
return B(v,{testID:`everfur-sdk-header-${t.nav}`,children:[
|
|
191
|
+
/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52,gap:8},children:[
|
|
192
|
+
/* @__PURE__ */P(v,{style:{flex:1,alignItems:"flex-start"},children:c?/* @__PURE__ */P(PetSwitcher,{config:e,host:n,pet:r}):null}),
|
|
193
|
+
/* @__PURE__ */P(SdkLockup,{settings:l}),
|
|
194
|
+
/* @__PURE__ */B(v,{style:{flex:1,alignItems:"flex-end"},children:[u?/* @__PURE__ */P(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):null,c?d("×",n.onClose,"everfur-sdk-close"):null]})]}),t.nav==="bottom_tabs"&&t.vetOnAsk==="top"&&(o==="ask"||o==="vet")?/* @__PURE__ */P(AskVetSwitch,{config:e,level:i,section:o,onSection:a}):null,o==="ask"?/* @__PURE__ */P(MemoryRow,{config:e,pet:r}):null]})}function AskVetSwitch({config:e,level:t,section:n,onSection:r}){let o=e.settings;/* @__PURE__ */
|
|
195
|
+
return P(v,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:o["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(i=>/* @__PURE__ */P(k,{accessibilityRole:"tab",accessibilityState:{selected:n===i},onPress:()=>r(i),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===i?o["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${i}`,children:/* @__PURE__ */P(Text,{tier:"control",style:{fontFamily:o["look.font.body"],fontSize:15,color:n===i?o["look.color.heading"]:o["look.color.muted"]},children:vl(e,i,t)})},i))})}function VetPill({config:e,layout:t,level:n,waiting:r,onPress:o}){let i=e.settings,a=t.vetBadge==="header_pill"&&r;/* @__PURE__ */
|
|
196
|
+
return B(k,{accessibilityRole:"button",onPress:o,style:{flexDirection:"row",alignItems:"center",gap:6,height:32,paddingLeft:10,paddingRight:12,borderRadius:16,backgroundColor:"#FFFFFF",borderWidth:1,borderColor:i["look.color.line"]},testID:"everfur-sdk-vet-pill",children:[a?/* @__PURE__ */P(v,{style:{width:8,height:8,borderRadius:4,backgroundColor:i["look.color.dot"]},testID:"everfur-sdk-vet-pill-dot"}):null,
|
|
197
|
+
/* @__PURE__ */P(Text,{tier:"control",style:{fontFamily:i["look.font.body"],fontSize:14,color:i["look.color.heading"]},children:vetTabLabel(e,n)})]})}function PetSwitcher({config:e,host:t,pet:n}){let r=e.settings;return n===null?null:/* @__PURE__ */B(k,{accessibilityRole:"button",onPress:()=>{if(t.pets.length<2)return;let e=t.pets.findIndex(e=>e.petRef===n.petRef),r=t.pets[(e+1)%t.pets.length];r!==void 0&&t.onPetChange?.(r.petRef)},style:{minHeight:44,flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8},testID:"everfur-sdk-pet-switcher",children:[
|
|
198
|
+
/* @__PURE__ */P(Text,{tier:"control",numberOfLines:1,style:{fontFamily:r["look.font.body"],fontSize:15,fontWeight:"600",color:r["look.color.heading"]},children:n.name}),t.pets.length>1?/* @__PURE__ */P(Text,{tier:"control",style:{fontSize:12,color:r["look.color.heading"]},children:"▾"}):null]})}function MemoryRow({config:e,pet:t,withLockup:n=false}){let r=memoryChip(e,t?.name);return r===null&&!n?null:/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */P(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */P(v,{}),n?/* @__PURE__ */P(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:r,level:o,access:i,hooks:a,chat:l,locked:s,onVet:d,onPlan:u}){let p=t.settings,f=p["look.color.heading"],h=c(()=>({title:sdkText(t,"text.ask.greeting",r===null?{}:{pet:r.name}),chipTints:p["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,f)}))}),[t,p,f,r]),g=c(()=>({chats:ml,newChat:sdkText(t,"text.ask.new_chat")}),[t]),b=i.kind==="members_only"||i.kind==="cap_reached",m=n.vetOnAsk!=="none"&&o!=="none"?r?.location?.state:void 0;/* @__PURE__ */
|
|
199
|
+
return B(v,{style:{flex:1},testID:"everfur-sdk-ask",children:[b?/* @__PURE__ */P(v,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */P(k,{accessibilityRole:"button",onPress:u,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */P(Text,{tier:"control",style:{fontFamily:p["look.font.body"],fontSize:15,color:p["look.color.accent"]},children:i.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */P(Ga.Provider,{value:a,children:/* @__PURE__ */P(e,{header:false,...l,...r===null?{}:{petRef:r.petRef},...m===void 0?{}:{vetUsState:m},...s("texting")||!p["features.texting"]?{textingEntry:false}:{},...n.vetOnAsk==="none"?{}:{onFindVet:d},emptyState:h,historyBar:g,style:{flex:1,paddingTop:0}})}),i.kind==="counter"?/* @__PURE__ */P(Text,{style:{textAlign:"center",fontFamily:p["look.font.label"]==="body"?p["look.font.body"]:p["look.font.label"],fontSize:12,color:p["look.color.muted"],paddingVertical:4},testID:"everfur-sdk-counter",children:i.line}):null]})}function VetPane({config:e,pet:t,level:n,locked:r,onLocked:o,onAsk:i}){let a=useVetVisit({petRef:t?.petRef??null,usState:t?.location?.state??null}),l=vetHome(e,{level:n,...t===null?{}:{pet:t.name,petSex:t.sex??null,visitsUsed:t.visitsUsed??null},...t?.stateName!==void 0?{stateName:t.stateName}:t?.location?.state!==void 0?{stateName:t.location.state}:{}});/* @__PURE__ */
|
|
200
|
+
return B(v,{style:{flex:1},children:[
|
|
201
|
+
/* @__PURE__ */P(SdkVetHomeView,{config:e,home:l,onBook:()=>{r?o():a.open(t?.petRef??null)},style:{flex:1}}),
|
|
202
|
+
/* @__PURE__ */P(SdkDockBar,{config:e,pet:t?.name,onPress:i})]})}function RecordsPane({config:e,host:t,pet:n,vetShown:r,records:i,onPlan:a,onVet:l,locked:s,onAsk:d}){let c=e.settings,u=new Set(c["features.partner_data"]),p=(t.partnerData??[]).filter(e=>u.has(e.source)),f=partnerDataSources(e),h=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results");/* @__PURE__ */
|
|
203
|
+
return B(v,{style:{flex:1},testID:"everfur-sdk-records",children:[n===null?null:/* @__PURE__ */P(o,{...i,petRef:n.petRef,petName:n.name,weightUnit:c["units.weight"],noVet:!r,onOpenPlan:()=>a("previous_results"),...r?{onSpeakToVet:l}:{},...s("link_records")?{onRequestFromClinic:()=>a("link_records")}:{},style:{flex:1}}),p.length>0?/* @__PURE__ */P(v,{style:{paddingHorizontal:16,paddingVertical:8,gap:6},testID:"everfur-sdk-partner-data",accessibilityLabel:f.join(", "),children:p.map((e,t)=>/* @__PURE__ */B(v,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[
|
|
204
|
+
/* @__PURE__ */P(Text,{tier:"badge",style:{fontFamily:c["look.font.body"],fontSize:11,color:c["look.color.heading"],backgroundColor:c["look.color.tint"],paddingHorizontal:8,paddingVertical:2,borderRadius:10,overflow:"hidden"},children:h(e.source)}),
|
|
205
|
+
/* @__PURE__ */P(Text,{style:{flex:1,fontFamily:c["look.font.body"],fontSize:14,color:c["look.color.ink"]},children:e.title}),e.date!==void 0?/* @__PURE__ */P(Text,{style:{fontFamily:c["look.font.body"],fontSize:12,color:c["look.color.muted"]},children:e.date}):null]},`${e.source}-${t}`))}):null,
|
|
206
|
+
/* @__PURE__ */P(SdkDockBar,{config:e,pet:n?.name,onPress:d})]})}function EverfurSdkLauncher({onPress:e,tipSeen:t=false,onTipSeen:n,replyWaiting:r,onReplyWaitingChange:o,style:i}){let a=Ha(),{active:l}=useEverfurSdkConfig();u(()=>{a?.load()},[a]);let s=useEverfurUnread({petRef:null}),d=r??s.hasUnread===true;return u(()=>{o?.(d)},[d,o]),l===null||l.settings["layout.launcher"]!=="floating_button"?null:/* @__PURE__ */P(SdkLauncherView,{config:l,onPress:e,replyWaiting:d,tipSeen:t,onTipSeen:()=>n?.(),...i===void 0?{}:{style:i}})}export{gt as EVERFUR_INTRO_COPY,Vt as EVERFUR_TABS_COPY,Ni as EVERFUR_TABS_SHELL_COPY,EverfurIntro,EverfurRecordsLandedBanner,EverfurSdkApp,EverfurSdkLauncher,EverfurTabs,mi as RECORDS_BANNER_MS,defaultIntroBlanks,introFacts,introPetWords,introText,isIntroSwipeOut,numberWord,registerEverfurSvg,useEverfurIntroSeen,useEverfurSdkConfig,useEverfurTabs,useLoadEverfurSdkConfig};
|