@everfur/sdk 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chat.d-D9n8tSDD.d.cts → Chat.d-Bl-_TsvQ.d.cts} +1 -1
- package/dist/{Chat.d-BXuEjJsg.d.ts → Chat.d-qQVN6VLp.d.ts} +1 -1
- package/dist/animations/index.cjs +1 -1
- package/dist/animations/index.js +1 -1
- package/dist/{attachments.d-Bsg6duaq.d.cts → attachments.d-DBlHzWYy.d.cts} +1 -1
- package/dist/{attachments.d-DjWUR-h9.d.ts → attachments.d-DOmkQ_8O.d.ts} +1 -1
- package/dist/{branding.d-Bzs4HJoN.d.cts → branding.d-CqDLKj1U.d.cts} +1 -1
- package/dist/{branding.d-CiC6xfGT.d.ts → branding.d-XrZYClN4.d.ts} +1 -1
- package/dist/chat/index.cjs +194 -194
- package/dist/chat/index.d.cts +7 -7
- package/dist/chat/index.d.ts +7 -7
- package/dist/chat/index.js +202 -202
- package/dist/chat/lite/index.cjs +205 -205
- package/dist/chat/lite/index.d.cts +7 -7
- package/dist/chat/lite/index.d.ts +7 -7
- package/dist/chat/lite/index.js +205 -205
- package/dist/{chatHandoffToken.d-sbumx0He.d.cts → chatHandoffToken.d-B4-iQ35P.d.cts} +3 -3
- package/dist/{chatHandoffToken.d-YJY6TZbj.d.ts → chatHandoffToken.d-Br3Gw3w-.d.ts} +3 -3
- package/dist/{checkin.d-DxpoRutq.d.cts → checkin.d-CAKQydg8.d.cts} +14 -2
- package/dist/{checkin.d-C6vh9KVr.d.ts → checkin.d-qvYXugN3.d.ts} +14 -2
- package/dist/{chunk-AJEELSFO.js → chunk-5OK2AF63.js} +14 -14
- package/dist/{chunk-II4QDD6F.js → chunk-6I4REU4U.js} +1 -1
- package/dist/{chunk-ZPIOCHKW.js → chunk-7MMJ7CYN.js} +1 -1
- package/dist/{chunk-FZ6DAQFH.js → chunk-PJHMKQ5C.js} +19 -19
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +7 -7
- package/dist/client/index.d.ts +7 -7
- package/dist/client/index.js +2 -2
- package/dist/consent/index.cjs +1 -1
- package/dist/consent/index.js +2 -2
- package/dist/{context.d-Cq2C4vdh.d.cts → context.d-DZfxKxNi.d.cts} +3 -3
- package/dist/{context.d-D1l56nFr.d.ts → context.d-FjU7dQP7.d.ts} +3 -3
- package/dist/core/index.cjs +21 -21
- package/dist/core/index.d.cts +10 -10
- package/dist/core/index.d.ts +10 -10
- package/dist/core/index.js +21 -21
- package/dist/{entitlementRepository.d-x2YFdgYD.d.ts → entitlementRepository.d-BltqS1W8.d.ts} +1 -1
- package/dist/{entitlementRepository.d-CEDU1gZE.d.cts → entitlementRepository.d-wfqpUIKN.d.cts} +1 -1
- package/dist/health-plan/index.cjs +1 -1
- package/dist/health-plan/index.d.cts +4 -4
- package/dist/health-plan/index.d.ts +4 -4
- package/dist/health-plan/index.js +1 -1
- package/dist/index.cjs +221 -221
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +221 -221
- package/dist/notifications/inbox/index.cjs +9 -9
- package/dist/notifications/inbox/index.js +9 -9
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +3 -3
- package/dist/notifications/index.d.ts +3 -3
- package/dist/notifications/index.js +6 -6
- package/dist/photo/index.cjs +1 -1
- package/dist/photo/index.js +23 -23
- package/dist/{presentation.d-CWGjwq8Z.d.cts → presentation.d-BkIvMtIl.d.cts} +3 -3
- package/dist/{presentation.d-CWGjwq8Z.d.ts → presentation.d-BkIvMtIl.d.ts} +3 -3
- package/dist/records/depth/index.cjs +1 -1
- package/dist/records/depth/index.js +1 -1
- package/dist/records/index.cjs +2 -2
- package/dist/records/index.d.cts +2 -2
- package/dist/records/index.d.ts +2 -2
- package/dist/records/index.js +71 -71
- package/dist/{route.d-IP_gkOWL.d.ts → route.d-B395-hNX.d.ts} +1 -1
- package/dist/{route.d-9wclfD-y.d.cts → route.d-DSSSpSB-.d.cts} +1 -1
- package/dist/{runtimeTypes.d-BdUe3tYs.d.ts → runtimeTypes.d-DAz0Tgw5.d.ts} +5 -5
- package/dist/{runtimeTypes.d-_UZ6rMUY.d.cts → runtimeTypes.d-DPh1Wh15.d.cts} +5 -5
- package/dist/server/events/index.cjs +3 -3
- package/dist/server/events/index.js +3 -3
- package/dist/server/index.cjs +8 -8
- package/dist/server/index.d.cts +15 -1
- package/dist/server/index.d.ts +15 -1
- package/dist/server/index.js +8 -8
- package/dist/slots/index.cjs +1 -1
- package/dist/slots/index.js +1 -1
- package/dist/tabs/index.cjs +2 -2
- package/dist/tabs/index.js +24 -24
- package/dist/televet/booking/index.cjs +51 -51
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/index.cjs +1 -1
- package/dist/televet/index.js +1 -1
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/rn/index.cjs +8 -8
- package/dist/testing/rn/index.d.cts +5 -5
- package/dist/testing/rn/index.d.ts +5 -5
- package/dist/testing/rn/index.js +9 -9
- package/dist/testing/web/index.cjs +3 -3
- package/dist/testing/web/index.d.cts +5 -5
- package/dist/testing/web/index.d.ts +5 -5
- package/dist/testing/web/index.js +1 -1
- package/dist/texting/index.cjs +1 -1
- package/dist/texting/index.js +26 -26
- package/dist/{threadOptions.d-BW0rePcs.d.cts → threadOptions.d-DUQxxHyM.d.cts} +3 -3
- package/dist/{threadOptions.d-CrAb71J2.d.ts → threadOptions.d-DnM9UcMx.d.ts} +3 -3
- package/dist/{typeStyle.d-rzVzCfLz.d.ts → typeStyle.d-8mcLhtbH.d.ts} +1 -1
- package/dist/{typeStyle.d-B-YgiWcS.d.cts → typeStyle.d-CLrQZW-r.d.cts} +1 -1
- package/dist/{unreadStore.d-gCsleb6l.d.ts → unreadStore.d-CLnChKca.d.ts} +17 -9
- package/dist/{unreadStore.d-w5x6lEpR.d.cts → unreadStore.d-Donv4bcF.d.cts} +17 -9
- package/dist/{usePresentation.d-w5_oWKmh.d.ts → usePresentation.d-Buxz2Jkt.d.ts} +1 -1
- package/dist/{usePresentation.d-DefUwatV.d.cts → usePresentation.d-DUYzYXgA.d.cts} +1 -1
- package/dist/{useUnread.d-DeRDFtTb.d.cts → useUnread.d-7-cuCooM.d.cts} +3 -3
- package/dist/{useUnread.d-xDOpYyqx.d.ts → useUnread.d-B6Ehu0ao.d.ts} +3 -3
- package/dist/video/index.cjs +1 -1
- package/dist/video/index.js +1 -1
- package/dist/web/consent/index.cjs +3 -3
- package/dist/web/consent/index.js +5 -5
- package/dist/web/health-plan/index.cjs +2 -2
- package/dist/web/health-plan/index.d.cts +5 -5
- package/dist/web/health-plan/index.d.ts +5 -5
- package/dist/web/health-plan/index.js +1 -1
- package/dist/web/inbox/index.cjs +5 -5
- package/dist/web/inbox/index.js +5 -5
- package/dist/web/index.cjs +176 -176
- package/dist/web/index.d.cts +18 -18
- package/dist/web/index.d.ts +18 -18
- package/dist/web/index.js +181 -181
- package/dist/web/intro/index.cjs +10 -10
- package/dist/web/intro/index.js +6 -6
- package/dist/web/notifications/index.cjs +5 -5
- 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/depth/index.cjs +1 -1
- package/dist/web/records/depth/index.js +1 -1
- package/dist/web/records/index.cjs +1 -1
- package/dist/web/records/index.js +1 -1
- package/dist/web/records-sheet/index.cjs +2 -2
- package/dist/web/records-sheet/index.js +2 -2
- package/dist/web/shop/index.cjs +1 -1
- package/dist/web/shop/index.js +15 -15
- package/dist/web/televet/booking/index.cjs +2 -2
- package/dist/web/televet/booking/index.js +64 -64
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.cjs +6 -6
- package/dist/web/televet/index.js +1 -1
- package/dist/web/texting/index.cjs +1 -1
- package/dist/web/texting/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
|
@@ -1,14 +1,14 @@
|
|
|
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
|
-
"use strict";var e=require("react"),t=require("react-native"),r=require("react/jsx-runtime"),n=require("zod");var a="Go to the nearest emergency vet now.";var i=/* @__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",footnoteNative:"Educational, not a diagnosis. Emergency? Call a vet.",footnoteWeb:"Everfur’s assistant isn’t a vet and doesn’t diagnose. Your vet makes the calls. Not for emergencies: if {petName} is in distress, go to the nearest emergency animal hospital now.",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:a,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."});function o(e,t){return e.replace(/\{(\w+)\}/g,(e,r)=>{let n=t[r];return n===void 0?e:String(n)})}function l(e){return e?.trim()||i.emptyTitlePetFallback}function s(e,t){return o(e,{petName:l(t)})}function d(e,t){if(e===void 0)return{};let r={};return e.backgroundColor!==void 0&&(r.backgroundColor=e.backgroundColor),e.borderColor!==void 0&&(r.borderColor=e.borderColor,r.borderWidth=t??1),e.borderRadius!==void 0&&(r.borderRadius=e.borderRadius),r}function u(e){return e?.textColor===void 0?{}:{color:e.textColor}}var c=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let r=e.type,n=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:n}:{fontFamily:n,fontWeight:r.weight[c[t]]}}function headingFace(e,t="bold"){let{headingFamily:r,headingWeight:n}=e.type;if(r===null&&n===null)return face(e,t);if(r!==null)return{fontFamily:r,fontWeight:n??e.type.weight[c[t]]};let a=face(e,t);return a.fontWeight===void 0||n===null?a:{fontFamily:a.fontFamily,fontWeight:n}}function p(e){return e<=450?"regular":e<=650?"medium":"bold"}var h={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let r=f.get(e);r===void 0&&(r=/* @__PURE__ */new Map,f.set(e,r));let n=r.get(t);if(n!==void 0)return n;let a=g(e,t);return r.set(t,a),a}var f=/* @__PURE__ */new WeakMap;function g(e,t){let r=e.type.roles[t],n=r.weight==="400"&&r.face!=="mono"?e.type.weight.regular:r.weight,a=p(Number(n)),i=r.face==="mono"?face(e,h[a]):r.face==="heading"?headingFace(e,a):face(e,a),o=r.face==="heading"?e.type.headingWeight??n:n,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:o},s=r.size,d={...l,fontSize:s,lineHeight:Math.round(s*r.lineHeight*100)/100};return r.letterSpacing!==0&&(d.letterSpacing=Math.round(s*r.letterSpacing*100)/100),r.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var m=/* @__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 b=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){b(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var v=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var _={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},y={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},w={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},C={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},S={regular:"400",medium:"500",bold:"700"},E={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},F=0,x="System",z="monospace",k=["content","heading","control","compact","badge"];function T(e){let t={};for(let r of k)t[r]=e;return t}var R=[];function I(){return{family:x,mono:z,fontUrl:null,families:{regular:x,medium:x,bold:x,mono:z,monoMedium:z,monoBold:z},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:w,tierSizes:T(w),lineHeight:C,weight:S,letterSpacing:E,scale:1,maxScale:F,scaleCaps:v,headingFamily:null,headingWeight:null,fontSources:R,roles:m,typeScale:1}}var A={},N=/* @__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 D={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(N.standard),emphasized:cssCubicBezier(N.emphasized),exit:cssCubicBezier(N.exit)},reducedMotion:false},j={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)"},O=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:j,space:_,radius:y,type:I(),motion:D,slots:A}),B={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:B,space:_,radius:y,type:I(),motion:D,slots:A});var P=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),U=globalThis,q=U[P]??(U[P]=e.createContext(O));q.displayName??="EverfurThemeContext";function useEverfurTheme(){return e.useContext(q)}var M=120,H=44,L=120,V="88%",W=520,Y=2,G=.5,$=1.5,K=1.6,Q=.6,X=56,Z=1.5,J=5,ee=5,te=36,re=20,ne=14,ae=H;var ie=.4,oe=H;var le=.4,se=480,de=12,ue=.72,ce=48,pe=1.5,he=1.3,fe=1,ge=1,me=12,be=18,ve=1.5,_e="12%",ye=14,we=16,Ce=28,Se=18,Ee="84%",Fe=10,xe=15,ze=1.42,ke=4,Te=3,Re=14,Ie=20;function Ae(){let t=useEverfurTheme(),r=e.useMemo(()=>Ne(t),[t]);return{theme:t,styles:r}}function Ne(e){let r=e.color,n=e.space,a=e.radius,i=e.type,o=Math.round(i.size.body*$),l=Math.round(i.size.body*K),s=Math.round(re*i.size.body/ne),c=r.borderRingCream,p=e.slots;return t.StyleSheet.create({container:{flex:1,minHeight:M,backgroundColor:r.chatGround},body:{flex:1},centered:{minHeight:M,flexGrow:1,alignItems:"center",justifyContent:"center",padding:n.xl},homeEmpty:{flexGrow:1},emptyContent:{flexGrow:1,alignItems:"stretch",justifyContent:"flex-start",paddingTop:_e,paddingHorizontal:n.lg,paddingBottom:n.lg,minHeight:se,gap:n.lg},errorText:{...face(e,"regular"),fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.snug,color:r.danger,textAlign:"center",marginBottom:n.md},retryButton:{minHeight:H,minWidth:H,alignItems:"center",justifyContent:"center",paddingHorizontal:n.xl,paddingVertical:n.sm,borderRadius:a.pill,backgroundColor:r.brand,...d(p.primaryButton)},retryLabel:{...face(e,"medium"),color:r.onPrimary,fontSize:i.size.body,...u(p.primaryButton)},setupNotice:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:n.sm,paddingHorizontal:n.lg,paddingVertical:n.sm,backgroundColor:r.surfaceCream},setupNoticeText:{...face(e,"regular"),color:r.danger,fontSize:i.size.caption,flexShrink:1},turnNotice:{gap:n.xs,padding:n.md,borderRadius:a.md,backgroundColor:r.surfaceCream,borderWidth:ge,borderColor:r.borderRingCream,alignItems:"flex-start"},turnNoticeError:{borderColor:r.danger},turnNoticeTitle:{...face(e,"bold"),color:r.text.primary,fontSize:i.size.bodyTight},turnNoticeTitleError:{color:r.danger},turnNoticeBody:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.normal},turnNoticeAction:{minHeight:H,justifyContent:"center"},turnNoticeActionLabel:{...face(e,"bold"),color:r.brandInk,fontSize:i.size.bodyTight},setupNoticeAction:{...face(e,"medium"),color:r.brandInk,fontSize:i.size.caption},reconnectingCaption:{...face(e,"medium"),color:r.text.secondary,fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.normal,textTransform:"uppercase",letterSpacing:.5},readingBox:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:n.xs,paddingVertical:n.md,paddingHorizontal:n.md+n.xs/2,backgroundColor:r.surfaceSubtle,borderRadius:a.md},readingDot:{width:6,height:6,borderRadius:a.pill,backgroundColor:r.brandInk},readingInline:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:Te,minHeight:Re},readingDotInline:{width:ke,height:ke,borderRadius:a.pill,backgroundColor:r.text.muted},list:{flex:1},earlierButton:{alignSelf:"center",minHeight:H,justifyContent:"center",paddingHorizontal:n.md+n.xs/2},earlierLabel:{...face(e,"monoBold"),color:r.linkInk,fontSize:i.size.caption},listContent:{padding:n.lg,gap:n.xl},listContentCards:{paddingTop:ye,paddingHorizontal:we,paddingBottom:Ce,gap:Se},rowBlock:{gap:n.sm},rowBlockUser:{},rowBlockAssistant:{paddingRight:n.xl},row:{flexDirection:"row"},rowUser:{justifyContent:"flex-end"},rowAssistant:{justifyContent:"flex-start"},bubble:{maxWidth:V,alignItems:"flex-start"},bubbleSideUser:{alignItems:"flex-end"},bubbleUser:{maxWidth:W,paddingVertical:n.md,paddingHorizontal:n.lg+Y,backgroundColor:r.bubbleUser,...r.primaryEdge!==r.primary&&r.bubbleUser===r.primary?{borderWidth:G,borderColor:r.primaryEdge}:{},borderRadius:a.lg,borderBottomRightRadius:a.xs,...d(p.userBubble,G)},bubbleAssistant:p.assistantBubble?.backgroundColor===void 0?{...d(p.assistantBubble,G)}:{paddingVertical:n.md,paddingHorizontal:n.lg+Y,borderRadius:a.lg,...d(p.assistantBubble,G)},bubbleVet:{maxWidth:W,paddingVertical:n.md,paddingHorizontal:n.lg+Y,backgroundColor:r.bubbleVet,borderRadius:a.lg,borderTopLeftRadius:a.xs,...d(p.vetBubble,G)},bubbleCards:{maxWidth:Ee},bubbleUserCards:{paddingVertical:Fe,paddingHorizontal:xe},bubbleTextUserCards:{fontSize:textRole(e,"message").fontSize,lineHeight:Math.round(textRole(e,"message").fontSize*ze)},bubblePending:{opacity:Q},bubbleTextUser:{...face(e,"regular"),color:r.onPrimary,fontSize:i.size.body,lineHeight:o,...u(p.userBubble)},bubbleTextAssistant:{...face(e,"regular"),color:r.text.primary,fontSize:i.size.body,lineHeight:l,...u(p.assistantBubble)},bubbleTextVet:{...face(e,"regular"),color:r.onBubbleVet,fontSize:i.size.body,lineHeight:o,...u(p.vetBubble)},assistantName:{...face(e,"bold"),color:r.brandInk,fontSize:i.size.bodyTight,marginBottom:n.xs},assistantSender:{flexDirection:"row",alignItems:"center",gap:n.sm,marginBottom:n.xs},assistantAvatar:{width:Ie,height:Ie,borderRadius:Ie/2},assistantNameInRow:{marginBottom:0},vetHeader:{flexDirection:"row",alignItems:"baseline",gap:n.sm,marginBottom:n.xs},vetSender:{...face(e,"bold"),color:r.text.primary,fontSize:i.size.bodyTight},vetTime:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.caption},bubbleBold:face(e,"bold"),bubbleItalic:{fontStyle:"italic"},bubbleCode:face(e,"mono"),followUps:{alignSelf:"stretch",marginTop:n.md},followUpsHeading:{...face(e,"monoBold"),color:r.text.muted,fontSize:de,textTransform:"uppercase",letterSpacing:ue,paddingBottom:n.sm,borderBottomWidth:fe,borderBottomColor:c},followUpSlot:{alignSelf:"stretch"},followUpSlotRuled:{borderTopWidth:fe,borderTopColor:c},followUpRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:n.md,minHeight:ce,paddingVertical:n.sm+Y,...p.chip?.backgroundColor!==void 0||p.chip?.borderColor!==void 0?{paddingHorizontal:n.md}:{},...d(p.chip)},followUpText:{...face(e,"bold"),flex:1,color:r.brandInk,fontSize:i.size.bodyTight,...u(p.chip)},askChips:{flexDirection:"row",flexWrap:"wrap",gap:n.sm,marginTop:n.md},askChip:{minHeight:H,maxWidth:"100%",justifyContent:"center",paddingVertical:n.sm,paddingHorizontal:n.lg,borderRadius:a.pill,borderWidth:pe,borderColor:r.brandInk,backgroundColor:r.chatGround,...d(p.chip,pe)},askChipText:{...face(e,"bold"),color:r.brandInk,fontSize:i.size.bodyTight,lineHeight:Math.round(i.size.bodyTight*he),...u(p.chip)},composerOuter:{position:"relative"},askEntry:{marginHorizontal:n.md,marginTop:n.xs},composer:{marginHorizontal:n.md,marginTop:n.xs,minHeight:X,justifyContent:"center",paddingLeft:n.sm,paddingRight:J,paddingVertical:ee,backgroundColor:r.composerFill,borderWidth:Z,borderColor:r.composerBorder,borderRadius:a.pill,...d(p.composerInput,Z)},composerRow:{flexDirection:"row",alignItems:"center",gap:n.xs,minHeight:te},dictationError:{...face(e,"regular"),fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.normal,color:r.danger,paddingHorizontal:n.xs},attachControl:{width:oe,height:oe,alignItems:"center",justifyContent:"center"},attachControlDisabled:{opacity:le},input:{flex:1,minHeight:te,maxHeight:L,paddingHorizontal:0,paddingVertical:0,...face(e,"regular"),fontSize:i.size.body,lineHeight:s,color:r.text.primary,...u(p.composerInput)},sendControl:{minHeight:ae,minWidth:ae,alignItems:"center",justifyContent:"center"},sendDisc:{width:ae,height:ae,borderRadius:ae/2,alignItems:"center",justifyContent:"center",...d(p.sendButton)},sendControlDisabled:{opacity:ie},footnote:{...face(e,"regular"),color:r.text.muted,fontSize:me,lineHeight:be,textAlign:"center",marginTop:n.sm,marginBottom:n.xs,paddingHorizontal:n.lg},footnoteInThread:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.caption,lineHeight:Math.round(i.size.caption*ve),textAlign:"left",marginTop:n.md,marginBottom:n.sm,paddingHorizontal:n.xs},poweredBy:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.micro,textAlign:"center",paddingBottom:n.xs}})}var De=1e3,je=150,Oe=.25,Be=.5,Pe=3;function TypingIndicator({petName:n=null,inline:a=false}){let{theme:o,styles:l}=Ae(),d=o.motion.reducedMotion,u=s(i.reading,n),c=e.useRef(Array.from({length:Pe},()=>new t.Animated.Value(0))).current;return e.useEffect(()=>{if(d)return;let e=c.map((e,r)=>t.Animated.loop(t.Animated.sequence([t.Animated.delay(r*je),t.Animated.timing(e,{toValue:1,duration:De*.4,useNativeDriver:true}),t.Animated.timing(e,{toValue:0,duration:De*.6,useNativeDriver:true}),t.Animated.delay((Pe-r-1)*je)])));for(let t of e)t.start();return()=>{for(let t of e)t.stop()}},[d,c]),/* @__PURE__ */r.jsx(t.View,{style:a?l.readingInline:l.readingBox,accessible:true,accessibilityRole:"text",accessibilityLabel:u,accessibilityLiveRegion:"polite",accessibilityState:{busy:true},children:c.map((e,n)=>/* @__PURE__ */r.jsx(t.Animated.View,{accessibilityElementsHidden:true,importantForAccessibility:"no",style:[a?l.readingDotInline:l.readingDot,d?{opacity:Be}:{opacity:e.interpolate({inputRange:[0,1],outputRange:[Oe,1]}),transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:[0,-3]})}]}]},n))})}function Ue(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}function Text({tier:r,variant:n,...a}){let i=useEverfurTheme(),o=n===void 0?void 0:i.type.roles[n],l=Ue(i.type,r??o?.tier??"content"),s=n===void 0?a:{...a,style:[{...textRole(i,n),color:i.color.text.primary,flexShrink:1},a.style]};return e.createElement(t.Text,l===void 0?s:{maxFontSizeMultiplier:l,...s})}e.forwardRef(function(r,n){return e.createElement(t.TextInput,{...r,...n===null?{}:{ref:n}})});var qe=1400,Me=300;function AnalyzingIndicator(){let n=useEverfurTheme(),a=e.useMemo(()=>He(n),[n]),i=n.motion.reducedMotion,[o,l]=e.useState(false);e.useEffect(()=>{let e=setTimeout(()=>l(true),Me);return()=>clearTimeout(e)},[]);let s=e.useRef(new t.Animated.Value(0)).current;e.useEffect(()=>{if(i||!o)return;let e=t.Animated.loop(t.Animated.timing(s,{toValue:1,duration:qe,easing:t.Easing.linear,useNativeDriver:true}));return e.start(),()=>e.stop()},[i,o,s]);let d=i?null:{transform:[{rotate:s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]};/* @__PURE__ */
|
|
2
|
+
"use strict";var e=require("react"),t=require("react-native"),r=require("react/jsx-runtime"),n=require("zod");var a="Go to the nearest emergency vet now.";var i=/* @__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:a,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."});function o(e,t){return e.replace(/\{(\w+)\}/g,(e,r)=>{let n=t[r];return n===void 0?e:String(n)})}function l(e){return e?.trim()||i.emptyTitlePetFallback}function s(e,t){return o(e,{petName:l(t)})}function d(e,t){if(e===void 0)return{};let r={};return e.backgroundColor!==void 0&&(r.backgroundColor=e.backgroundColor),e.borderColor!==void 0&&(r.borderColor=e.borderColor,r.borderWidth=t??1),e.borderRadius!==void 0&&(r.borderRadius=e.borderRadius),r}function u(e){return e?.textColor===void 0?{}:{color:e.textColor}}var c=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let r=e.type,n=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:n}:{fontFamily:n,fontWeight:r.weight[c[t]]}}function headingFace(e,t="bold"){let{headingFamily:r,headingWeight:n}=e.type;if(r===null&&n===null)return face(e,t);if(r!==null)return{fontFamily:r,fontWeight:n??e.type.weight[c[t]]};let a=face(e,t);return a.fontWeight===void 0||n===null?a:{fontFamily:a.fontFamily,fontWeight:n}}function p(e){return e<=450?"regular":e<=650?"medium":"bold"}var h={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let r=f.get(e);r===void 0&&(r=/* @__PURE__ */new Map,f.set(e,r));let n=r.get(t);if(n!==void 0)return n;let a=g(e,t);return r.set(t,a),a}var f=/* @__PURE__ */new WeakMap;function g(e,t){let r=e.type.roles[t],n=r.weight==="400"&&r.face!=="mono"?e.type.weight.regular:r.weight,a=p(Number(n)),i=r.face==="mono"?face(e,h[a]):r.face==="heading"?headingFace(e,a):face(e,a),o=r.face==="heading"?e.type.headingWeight??n:n,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:o},s=r.size,d={...l,fontSize:s,lineHeight:Math.round(s*r.lineHeight*100)/100};return r.letterSpacing!==0&&(d.letterSpacing=Math.round(s*r.letterSpacing*100)/100),r.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var m=/* @__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 b=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){b(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var v=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var _={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},y={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},w={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},C={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},S={regular:"400",medium:"500",bold:"700"},E={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},F=0,x="System",z="monospace",k=["content","heading","control","compact","badge"];function R(e){let t={};for(let r of k)t[r]=e;return t}var T=[];function I(){return{family:x,mono:z,fontUrl:null,families:{regular:x,medium:x,bold:x,mono:z,monoMedium:z,monoBold:z},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:w,tierSizes:R(w),lineHeight:C,weight:S,letterSpacing:E,scale:1,maxScale:F,scaleCaps:v,headingFamily:null,headingWeight:null,fontSources:T,roles:m,typeScale:1}}var A={},N=/* @__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 D={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(N.standard),emphasized:cssCubicBezier(N.emphasized),exit:cssCubicBezier(N.exit)},reducedMotion:false},j={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)"},O=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:j,space:_,radius:y,type:I(),motion:D,slots:A}),B={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:B,space:_,radius:y,type:I(),motion:D,slots:A});var P=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),U=globalThis,q=U[P]??(U[P]=e.createContext(O));q.displayName??="EverfurThemeContext";function useEverfurTheme(){return e.useContext(q)}var M=120,H=44,L=120,V="88%",W=520,Y=2,G=.5,$=1.5,K=1.6,Q=.6,X=56,Z=1.5,J=5,ee=5,te=36,re=20,ne=14,ae=H;var ie=.4,oe=H;var le=.4,se=480,de=12,ue=.72,ce=48,pe=1.5,he=1.3,fe=1,ge=1,me="12%",be=14,ve=16,_e=28,ye=18,we="84%",Ce=10,Se=15,Ee=1.42,Fe=4,xe=3,ze=14,ke=20;function Re(){let t=useEverfurTheme(),r=e.useMemo(()=>Te(t),[t]);return{theme:t,styles:r}}function Te(e){let r=e.color,n=e.space,a=e.radius,i=e.type,o=Math.round(i.size.body*$),l=Math.round(i.size.body*K),s=Math.round(re*i.size.body/ne),c=r.borderRingCream,p=e.slots;return t.StyleSheet.create({container:{flex:1,minHeight:M,backgroundColor:r.chatGround},body:{flex:1},centered:{minHeight:M,flexGrow:1,alignItems:"center",justifyContent:"center",padding:n.xl},homeEmpty:{flexGrow:1},emptyContent:{flexGrow:1,alignItems:"stretch",justifyContent:"flex-start",paddingTop:me,paddingHorizontal:n.lg,paddingBottom:n.lg,minHeight:se,gap:n.lg},errorText:{...face(e,"regular"),fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.snug,color:r.danger,textAlign:"center",marginBottom:n.md},retryButton:{minHeight:H,minWidth:H,alignItems:"center",justifyContent:"center",paddingHorizontal:n.xl,paddingVertical:n.sm,borderRadius:a.pill,backgroundColor:r.brand,...d(p.primaryButton)},retryLabel:{...face(e,"medium"),color:r.onPrimary,fontSize:i.size.body,...u(p.primaryButton)},setupNotice:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:n.sm,paddingHorizontal:n.lg,paddingVertical:n.sm,backgroundColor:r.surfaceCream},setupNoticeText:{...face(e,"regular"),color:r.danger,fontSize:i.size.caption,flexShrink:1},turnNotice:{gap:n.xs,padding:n.md,borderRadius:a.md,backgroundColor:r.surfaceCream,borderWidth:ge,borderColor:r.borderRingCream,alignItems:"flex-start"},turnNoticeError:{borderColor:r.danger},turnNoticeTitle:{...face(e,"bold"),color:r.text.primary,fontSize:i.size.bodyTight},turnNoticeTitleError:{color:r.danger},turnNoticeBody:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.normal},turnNoticeAction:{minHeight:H,justifyContent:"center"},turnNoticeActionLabel:{...face(e,"bold"),color:r.brandInk,fontSize:i.size.bodyTight},setupNoticeAction:{...face(e,"medium"),color:r.brandInk,fontSize:i.size.caption},reconnectingCaption:{...face(e,"medium"),color:r.text.secondary,fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.normal,textTransform:"uppercase",letterSpacing:.5},readingBox:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:n.xs,paddingVertical:n.md,paddingHorizontal:n.md+n.xs/2,backgroundColor:r.surfaceSubtle,borderRadius:a.md},readingDot:{width:6,height:6,borderRadius:a.pill,backgroundColor:r.brandInk},readingInline:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:xe,minHeight:ze},readingDotInline:{width:Fe,height:Fe,borderRadius:a.pill,backgroundColor:r.text.muted},list:{flex:1},earlierButton:{alignSelf:"center",minHeight:H,justifyContent:"center",paddingHorizontal:n.md+n.xs/2},earlierLabel:{...face(e,"monoBold"),color:r.linkInk,fontSize:i.size.caption},listContent:{padding:n.lg,gap:n.xl},listContentCards:{paddingTop:be,paddingHorizontal:ve,paddingBottom:_e,gap:ye},rowBlock:{gap:n.sm},rowBlockUser:{},rowBlockAssistant:{paddingRight:n.xl},row:{flexDirection:"row"},rowUser:{justifyContent:"flex-end"},rowAssistant:{justifyContent:"flex-start"},bubble:{maxWidth:V,alignItems:"flex-start"},bubbleSideUser:{alignItems:"flex-end"},bubbleUser:{maxWidth:W,paddingVertical:n.md,paddingHorizontal:n.lg+Y,backgroundColor:r.bubbleUser,...r.primaryEdge!==r.primary&&r.bubbleUser===r.primary?{borderWidth:G,borderColor:r.primaryEdge}:{},borderRadius:a.lg,borderBottomRightRadius:a.xs,...d(p.userBubble,G)},bubbleAssistant:p.assistantBubble?.backgroundColor===void 0?{...d(p.assistantBubble,G)}:{paddingVertical:n.md,paddingHorizontal:n.lg+Y,borderRadius:a.lg,...d(p.assistantBubble,G)},bubbleVet:{maxWidth:W,paddingVertical:n.md,paddingHorizontal:n.lg+Y,backgroundColor:r.bubbleVet,borderRadius:a.lg,borderTopLeftRadius:a.xs,...d(p.vetBubble,G)},bubbleCards:{maxWidth:we},bubbleUserCards:{paddingVertical:Ce,paddingHorizontal:Se},bubbleTextUserCards:{fontSize:textRole(e,"message").fontSize,lineHeight:Math.round(textRole(e,"message").fontSize*Ee)},bubblePending:{opacity:Q},bubbleTextUser:{...face(e,"regular"),color:r.onPrimary,fontSize:i.size.body,lineHeight:o,...u(p.userBubble)},bubbleTextAssistant:{...face(e,"regular"),color:r.text.primary,fontSize:i.size.body,lineHeight:l,...u(p.assistantBubble)},bubbleTextVet:{...face(e,"regular"),color:r.onBubbleVet,fontSize:i.size.body,lineHeight:o,...u(p.vetBubble)},assistantName:{...face(e,"bold"),color:r.brandInk,fontSize:i.size.bodyTight,marginBottom:n.xs},assistantSender:{flexDirection:"row",alignItems:"center",gap:n.sm,marginBottom:n.xs},assistantAvatar:{width:ke,height:ke,borderRadius:ke/2},assistantNameInRow:{marginBottom:0},vetHeader:{flexDirection:"row",alignItems:"baseline",gap:n.sm,marginBottom:n.xs},vetSender:{...face(e,"bold"),color:r.text.primary,fontSize:i.size.bodyTight},vetTime:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.caption},bubbleBold:face(e,"bold"),bubbleItalic:{fontStyle:"italic"},bubbleCode:face(e,"mono"),followUps:{alignSelf:"stretch",marginTop:n.md},followUpsHeading:{...face(e,"monoBold"),color:r.text.muted,fontSize:de,textTransform:"uppercase",letterSpacing:ue,paddingBottom:n.sm,borderBottomWidth:fe,borderBottomColor:c},followUpSlot:{alignSelf:"stretch"},followUpSlotRuled:{borderTopWidth:fe,borderTopColor:c},followUpRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:n.md,minHeight:ce,paddingVertical:n.sm+Y,...p.chip?.backgroundColor!==void 0||p.chip?.borderColor!==void 0?{paddingHorizontal:n.md}:{},...d(p.chip)},followUpText:{...face(e,"bold"),flex:1,color:r.brandInk,fontSize:i.size.bodyTight,...u(p.chip)},askChips:{flexDirection:"row",flexWrap:"wrap",gap:n.sm,marginTop:n.md},askChip:{minHeight:H,maxWidth:"100%",justifyContent:"center",paddingVertical:n.sm,paddingHorizontal:n.lg,borderRadius:a.pill,borderWidth:pe,borderColor:r.brandInk,backgroundColor:r.chatGround,...d(p.chip,pe)},askChipText:{...face(e,"bold"),color:r.brandInk,fontSize:i.size.bodyTight,lineHeight:Math.round(i.size.bodyTight*he),...u(p.chip)},composerOuter:{position:"relative"},askEntry:{marginHorizontal:n.md,marginTop:n.xs},composer:{marginHorizontal:n.md,marginTop:n.xs,minHeight:X,justifyContent:"center",paddingLeft:n.sm,paddingRight:J,paddingVertical:ee,backgroundColor:r.composerFill,borderWidth:Z,borderColor:r.composerBorder,borderRadius:a.pill,...d(p.composerInput,Z)},composerRow:{flexDirection:"row",alignItems:"center",gap:n.xs,minHeight:te},dictationError:{...face(e,"regular"),fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.normal,color:r.danger,paddingHorizontal:n.xs},attachControl:{width:oe,height:oe,alignItems:"center",justifyContent:"center"},attachControlDisabled:{opacity:le},input:{flex:1,minHeight:te,maxHeight:L,paddingHorizontal:0,paddingVertical:0,...face(e,"regular"),fontSize:i.size.body,lineHeight:s,color:r.text.primary,...u(p.composerInput)},sendControl:{minHeight:ae,minWidth:ae,alignItems:"center",justifyContent:"center"},sendDisc:{width:ae,height:ae,borderRadius:ae/2,alignItems:"center",justifyContent:"center",...d(p.sendButton)},sendControlDisabled:{opacity:ie},poweredBy:{...face(e,"regular"),color:r.text.muted,fontSize:i.size.micro,textAlign:"center",paddingBottom:n.xs}})}var Ie=1e3,Ae=150,Ne=.25,De=.5,je=3;function TypingIndicator({petName:n=null,inline:a=false}){let{theme:o,styles:l}=Re(),d=o.motion.reducedMotion,u=s(i.reading,n),c=e.useRef(Array.from({length:je},()=>new t.Animated.Value(0))).current;return e.useEffect(()=>{if(d)return;let e=c.map((e,r)=>t.Animated.loop(t.Animated.sequence([t.Animated.delay(r*Ae),t.Animated.timing(e,{toValue:1,duration:Ie*.4,useNativeDriver:true}),t.Animated.timing(e,{toValue:0,duration:Ie*.6,useNativeDriver:true}),t.Animated.delay((je-r-1)*Ae)])));for(let t of e)t.start();return()=>{for(let t of e)t.stop()}},[d,c]),/* @__PURE__ */r.jsx(t.View,{style:a?l.readingInline:l.readingBox,accessible:true,accessibilityRole:"text",accessibilityLabel:u,accessibilityLiveRegion:"polite",accessibilityState:{busy:true},children:c.map((e,n)=>/* @__PURE__ */r.jsx(t.Animated.View,{accessibilityElementsHidden:true,importantForAccessibility:"no",style:[a?l.readingDotInline:l.readingDot,d?{opacity:De}:{opacity:e.interpolate({inputRange:[0,1],outputRange:[Ne,1]}),transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:[0,-3]})}]}]},n))})}function Oe(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}function Text({tier:r,variant:n,...a}){let i=useEverfurTheme(),o=n===void 0?void 0:i.type.roles[n],l=Oe(i.type,r??o?.tier??"content"),s=n===void 0?a:{...a,style:[{...textRole(i,n),color:i.color.text.primary,flexShrink:1},a.style]};return e.createElement(t.Text,l===void 0?s:{maxFontSizeMultiplier:l,...s})}e.forwardRef(function(r,n){return e.createElement(t.TextInput,{...r,...n===null?{}:{ref:n}})});var Be=1400,Pe=300;function AnalyzingIndicator(){let n=useEverfurTheme(),a=e.useMemo(()=>Ue(n),[n]),i=n.motion.reducedMotion,[o,l]=e.useState(false);e.useEffect(()=>{let e=setTimeout(()=>l(true),Pe);return()=>clearTimeout(e)},[]);let s=e.useRef(new t.Animated.Value(0)).current;e.useEffect(()=>{if(i||!o)return;let e=t.Animated.loop(t.Animated.timing(s,{toValue:1,duration:Be,easing:t.Easing.linear,useNativeDriver:true}));return e.start(),()=>e.stop()},[i,o,s]);let d=i?null:{transform:[{rotate:s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]};/* @__PURE__ */
|
|
3
3
|
return r.jsx(t.View,{style:a.wrap,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing photo",children:o?/* @__PURE__ */r.jsxs(r.Fragment,{children:[
|
|
4
4
|
/* @__PURE__ */r.jsx(t.Animated.View,{style:[a.ring,d]}),
|
|
5
|
-
/* @__PURE__ */r.jsx(Text,{style:a.statusLine,children:"Analyzing"})]}):null})}function
|
|
6
|
-
/* @__PURE__ */r.jsxs(t.View,{style:i.dotWrap,children:[s?/* @__PURE__ */r.jsx(t.Animated.View,{pointerEvents:"none",style:[i.dotRing,{backgroundColor:l.accent,opacity:o.interpolate({inputRange:[0,1],outputRange:[
|
|
5
|
+
/* @__PURE__ */r.jsx(Text,{style:a.statusLine,children:"Analyzing"})]}):null})}function Ue(e){let{color:r,space:n,radius:a,type:i}=e,o=i.weight.medium,l=n.xxl*2,s=n.xs;return t.StyleSheet.create({wrap:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:n.xl,gap:n.md},ring:{width:l,height:l,borderRadius:a.pill,borderWidth:s,borderTopColor:r.success,borderRightColor:r.success,borderBottomColor:r.borderRingCream,borderLeftColor:r.borderRingCream},statusLine:{color:r.text.secondary,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.snug,fontWeight:o,letterSpacing:i.letterSpacing.tight,textAlign:"center"}})}var qe=1100,Me=1.6,He=.35;function Le(e,t){let{color:r}=e;switch(t){case"low_risk":return{accent:r.success,wash:r.badgeBgPositive,label:"Low risk",pulse:false};case"concern":return{accent:r.cautionAccent,wash:r.badgeBgCaution,label:"Concern",pulse:true};case"uncertain":return{accent:r.text.muted,wash:r.badgeBgNeutral,label:"Uncertain",pulse:false}}}function SeverityBadge({riskTier:n}){let a=useEverfurTheme(),i=e.useMemo(()=>Ve(a),[a]),o=e.useRef(new t.Animated.Value(0)).current,l=n===null?null:Le(a,n),s=l!==null&&l.pulse&&!a.motion.reducedMotion;return e.useEffect(()=>{if(!s)return;let e=t.Animated.loop(t.Animated.timing(o,{toValue:1,duration:qe,easing:t.Easing.out(t.Easing.quad),useNativeDriver:true}));return e.start(),()=>e.stop()},[s,o]),l===null?null:/* @__PURE__ */r.jsxs(t.View,{style:[i.pill,{backgroundColor:l.wash}],accessible:true,accessibilityRole:"text",accessibilityLabel:l.label,children:[
|
|
6
|
+
/* @__PURE__ */r.jsxs(t.View,{style:i.dotWrap,children:[s?/* @__PURE__ */r.jsx(t.Animated.View,{pointerEvents:"none",style:[i.dotRing,{backgroundColor:l.accent,opacity:o.interpolate({inputRange:[0,1],outputRange:[He,0]}),transform:[{scale:o.interpolate({inputRange:[0,1],outputRange:[1,Me]})}]}]}):null,
|
|
7
7
|
/* @__PURE__ */r.jsx(t.View,{style:[i.dot,{backgroundColor:l.accent}]})]}),
|
|
8
|
-
/* @__PURE__ */r.jsx(Text,{style:[i.label,{color:l.accent}],children:l.label})]})}function
|
|
8
|
+
/* @__PURE__ */r.jsx(Text,{style:[i.label,{color:l.accent}],children:l.label})]})}function Ve(e){let{space:r,radius:n,type:a}=e,i=a.weight.bold,o=r.sm;return t.StyleSheet.create({pill:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:r.sm,paddingHorizontal:r.md,paddingVertical:r.xs,borderRadius:n.pill},dotWrap:{width:o,height:o,alignItems:"center",justifyContent:"center"},dot:{width:o,height:o,borderRadius:n.pill},dotRing:{position:"absolute",width:o,height:o,borderRadius:n.pill},label:{fontFamily:a.family,fontSize:a.size.caption,lineHeight:a.size.caption*a.lineHeight.snug,fontWeight:i,letterSpacing:a.letterSpacing.eyebrow}})}function ok(e,t){/* @__PURE__ */
|
|
9
9
|
return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
|
|
10
|
-
return Object.freeze({ok:false,error:e})}var $e=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var Ke=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),Qe=globalThis,Xe=Qe[Ke]??(Qe[Ke]=e.createContext(null));Xe.displayName??="EverfurContext";function Ze(){let t=e.useContext(Xe);if(t===null)throw new $e("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return t}function useEverfurTestEntitlements(){let{runtime:t}=Ze();return e.useMemo(()=>({apply:e=>t.updateEntitlements(e)}),[t])}var Je=[{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:"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}],et=/* @__PURE__ */Object.freeze(Je.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(et.map(e=>e.wireCode));var tt=/* @__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"}),rt=/* @__PURE__ */Object.freeze(et.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:tt[e.wireCode]}))),nt=new Map(rt.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),at=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(rt.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let e of[t??"http_envelope",...at]){let t=nt.get(e+r);if(t)return t}}var it=/* @__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 it[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return"authRejected";if(r.startsWith("AUTH"))return"authExpired";switch(n){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":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 ot=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return ot.has(e)}var lt=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||lt.has(e)}var st=500,dt=8e3,ut=4;function backoffDelayMs(e,t=Math.random){let r=Math.max(0,e),n=Math.min(st*2**r,dt);return Math.floor(t()*n)}var ct="This feature isn't available on your account right now.",pt="Something in that request was not right. Check the details and try again.",ht=/* @__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:ct,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:pt,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:ct,runtimeDisposed:pt,unknown:"Something went wrong. Please try again."}),ft="This session has ended. Please sign in again.",gt="linked_account_read_only";function mt(e,t,r){return e==="conflict"&&r===gt?ct:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?ft:userFacingError(e)}function userFacingError(e){return ht[e]}function bt(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false})}var vt=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let r=contractErrorFor(t?.wireCode,t?.wireEnvelope),n=e==="conflict"&&t?.reasonCode===gt,a={code:e,category:categoryFor(e),retryable:t?.retryable??(n?false:isRetryableCode(e)),displayMessage:mt(e,t?.wireCode,n?gt:null)};t?.httpStatus!==void 0&&(a.httpStatus=t.httpStatus),t?.requestId&&(a.requestId=t.requestId),typeof t?.reasonCode=="string"&&vt.test(t.reasonCode)&&(a.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(a.retryAfterSeconds=Math.round(i)),r);return t?.wireMessage&&bt(a,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&bt(a,"raw",t.raw),/* @__PURE__ */Object.freeze(a)}function errorFrame(e){/* @__PURE__ */
|
|
11
|
-
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
|
|
10
|
+
return Object.freeze({ok:false,error:e})}var We=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var Ye=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),Ge=globalThis,$e=Ge[Ye]??(Ge[Ye]=e.createContext(null));$e.displayName??="EverfurContext";function Ke(){let t=e.useContext($e);if(t===null)throw new We("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return t}function useEverfurTestEntitlements(){let{runtime:t}=Ke();return e.useMemo(()=>({apply:e=>t.updateEntitlements(e)}),[t])}var Qe=[{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}],Xe=/* @__PURE__ */Object.freeze(Qe.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(Xe.map(e=>e.wireCode));var Ze=/* @__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"}),Je=/* @__PURE__ */Object.freeze(Xe.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Ze[e.wireCode]}))),et=new Map(Je.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),tt=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(Je.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let e of[t??"http_envelope",...tt]){let t=et.get(e+r);if(t)return t}}var rt=/* @__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 rt[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return"authRejected";if(r.startsWith("AUTH"))return"authExpired";switch(n){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":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 nt=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return nt.has(e)}var at=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||at.has(e)}var it=500,ot=8e3,lt=4;function backoffDelayMs(e,t=Math.random){let r=Math.max(0,e),n=Math.min(it*2**r,ot);return Math.floor(t()*n)}var st="This feature isn't available on your account right now.",dt="Something in that request was not right. Check the details and try again.",ut=/* @__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:st,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:dt,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:st,runtimeDisposed:dt,unknown:"Something went wrong. Please try again."}),ct="This session has ended. Please sign in again.",pt="linked_account_read_only";function ht(e,t,r){return e==="conflict"&&r===pt?st:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?ct:userFacingError(e)}function userFacingError(e){return ut[e]}function ft(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false})}var gt=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let r=contractErrorFor(t?.wireCode,t?.wireEnvelope),n=e==="conflict"&&t?.reasonCode===pt,a={code:e,category:categoryFor(e),retryable:t?.retryable??(n?false:isRetryableCode(e)),displayMessage:ht(e,t?.wireCode,n?pt:null)};t?.httpStatus!==void 0&&(a.httpStatus=t.httpStatus),t?.requestId&&(a.requestId=t.requestId),typeof t?.reasonCode=="string"&>.test(t.reasonCode)&&(a.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(a.retryAfterSeconds=Math.round(i)),r);return t?.wireMessage&&ft(a,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ft(a,"raw",t.raw),/* @__PURE__ */Object.freeze(a)}function errorFrame(e){/* @__PURE__ */
|
|
11
|
+
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 mt="x-everfur-anon-token",bt="anonTokenInvalid";async function vt(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function _t(e,t){let r=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}:{},...r?{wireMessage:r}:{},...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[mt]=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:{...yt(e.headers),...authHeaders(t)}}}function yt(e){if(!e)return{};let t={};for(let[r,n]of Object.entries(e)){let e=r.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===mt||(t[r]=n)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let r=await vt(t),n=await t.transport.request(withAuthHeaders(e,wt(t,r)));if(n.ok||St(n.error.raw)!==bt||t.anonIdentity===void 0||t.userRef!==null)return n;let a=await t.anonIdentity.token({forceRefresh:true});return a===null||a===r?n:t.transport.request(withAuthHeaders(e,wt(t,a)))}let r;try{r=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(_t(e))}let n=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let a;try{a=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(_t(e,{wireCode:St(n.error.raw),requestId:n.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:a,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(Ct(i.error))):i}function wt(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function Ct(e){let t=e.raw,r=St(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...r?{wireCode:r}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function St(e){if(typeof e!="object"||e===null)return null;let t=e,r=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof r=="string"&&r.length>0?r:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Et(e)})}function Et(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var Ft=3e4,xt=ot*2,zt="idempotency-key",kt=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Rt=/* @__PURE__ */Object.freeze({onEvent(){}}),Tt=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function It(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??Rt,r=e.timers??Tt,n=e.rng??Math.random,a=e.sleep??((e,t)=>Gt(e,r,t)),i=e.maxAttempts??lt,o=e.unaryTimeoutMs??Ft,l=e.newIdempotencyKey??Nt(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,u){let c=u?.maxAttempts,p=Math.max(1,c??i),h=u?.idempotent??kt.has(d.method),f=u?.idempotencyKey===void 0?null:It(u.idempotencyKey),g=h?f??l():null,m=At(d,g),b=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:b,...g?{idempotencyKey:g}:{},...e});s(i({phase:"attempt"}));let l=Wt(o,r),u=Yt(l.signal,d.signal),h;try{h=await authedSend({...m,signal:u.signal},e.auth)}catch(e){h=err(networkError(e))}finally{u.dispose(),l.cancel()}if(h.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),h;let f=h.error,v=jt(f,b,{maxAttempts:p,rng:n,now:r.now(),aborted:d.signal?.aborted===true,...c!==void 0?{perCallMaxAttempts:c}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),_={ok:false,code:f.code,reason:v.reason,...f.httpStatus!==void 0?{httpStatus:f.httpStatus}:{},...f.requestId!==void 0?{requestId:f.requestId}:{}};if(!v.retry)return s(i({phase:"settled",..._})),err(f);if(s(i({phase:"retry",..._,delayMs:v.delayMs})),await a(v.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",..._,reason:"aborted"})),err(f);b+=1}}async function u(t){return withAuthHeaders(t,await Vt(e.auth))}async function*c(t,r,n){s(
|
|
12
12
|
/* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:r.method,path:r.path,attempt:0}));try{yield*e.auth.transport.stream(r,n)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
|
|
13
|
-
return Object.freeze({send:d,authorize:u,stream:c})}function
|
|
14
|
-
return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:a,simpleStatus:n,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:
|
|
13
|
+
return Object.freeze({send:d,authorize:u,stream:c})}function At(e,t){let r={};for(let[t,n]of Object.entries(e.headers??{}))t.toLowerCase()!==zt&&(r[t]=n);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}function Nt(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var Dt=10;function jt(e,t,r){if(r.aborted)return{retry:false,reason:"aborted"};let n=Ot(e);if(n==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let a=n==="burst"?"burst-throttle":"retryable-code";if((()=>{if(r.policy===void 0)return false;try{return!r.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(r.policy===void 0)return null;let t;try{t=r.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(Dt,Math.floor(t)))},o=r.perCallMaxAttempts??i()??r.maxAttempts;if(t+1>=o)return{retry:false,reason:"attempts-exhausted"};let l=Bt(e,r.now);return l!==null?l>xt?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:a,delayMs:l}:{retry:true,reason:a,delayMs:backoffDelayMs(t,r.rng)}}function Ot(e){let t=e.code==="unknown"?fromWire(Ht(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function Bt(e,t){let r=Ut(e.raw);if(r!==null){let e=r-t;return e>0?e:0}let n=Pt(e.raw);return n===null?null:Math.round(n*1e3)}function Pt(e){for(let t of qt(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function Ut(e){for(let t of qt(e)){let e=t.resets_at,r=Mt(e);if(r!==null)return r}return null}function qt(e){if(!Lt(e))return[];let t=[e];for(let r of["error","detail"]){let n=e[r];Lt(n)&&t.push(n)}return t}function Mt(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 Ht(e){for(let t of qt(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Lt(e){return typeof e=="object"&&e!==null}async function Vt(e){if(e.mode==="anonymous"){let t=await vt(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 Wt(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return{signal:r.signal,cancel:()=>t.clearTimeout(n)}}function Yt(e,t){let r=()=>{};if(!t)return{signal:e,dispose:r};let n=new AbortController;if(e.aborted||t.aborted)return n.abort(),{signal:n.signal,dispose:r};let a=()=>n.abort();return e.addEventListener("abort",a,{once:true}),t.addEventListener("abort",a,{once:true}),{signal:n.signal,dispose:()=>{e.removeEventListener("abort",a),t.removeEventListener("abort",a)}}}function Gt(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let a=t.setTimeout(()=>{r?.removeEventListener("abort",i),n()},e),i=()=>{t.clearTimeout(a),n()};r?.addEventListener("abort",i,{once:true})})}function $t(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let r=e.charCodeAt(t+1);if(!(r>=56320&&r<=57343))return true;t+=1}else if(r>=56320&&r<=57343)return true}return false}function Kt(e){return[...e].length}var Qt=/* @__PURE__ */new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review","published","failed","revoked"]),Xt=/* @__PURE__ */Object.freeze({submitted:"requested",sent:"requested",dispatching:"requested",awaiting_response:"awaiting_clinic",clinic_responded_no_records:"awaiting_clinic",records_received:"received",parsing_failed:"in_review",review_email_failed:"in_review",clinic_declined:"failed"});function Zt(e){let t=Object.prototype.hasOwnProperty.call(Xt,e)?Xt[e]:void 0;if(t!==void 0)return t;let r=e;return Qt.has(r)?r:"parsing"}var Jt=/* @__PURE__ */n.z.object({request_id:/* @__PURE__ */n.z.string().min(1),pet_ref:/* @__PURE__ */n.z.string().min(1),status:/* @__PURE__ */n.z.string(),simple_status:/* @__PURE__ */n.z.string().nullish(),simple_status_detail:/* @__PURE__ */n.z.string().nullish(),status_label:/* @__PURE__ */n.z.string().optional(),dispatch_status:/* @__PURE__ */n.z.string().nullish(),can_retry_send:/* @__PURE__ */n.z.boolean().optional(),can_revoke:/* @__PURE__ */n.z.boolean().optional(),can_convert_to_upload:/* @__PURE__ */n.z.boolean().optional(),can_update_clinic_email:/* @__PURE__ */n.z.boolean().optional(),reminder_count:/* @__PURE__ */n.z.number().int().nonnegative().optional(),last_reminder_at:/* @__PURE__ */n.z.string().nullish(),waiting_expectation:/* @__PURE__ */n.z.string().nullish(),document_count:/* @__PURE__ */n.z.number().optional(),held_item_count:/* @__PURE__ */n.z.number().optional(),received_at:/* @__PURE__ */n.z.string().nullish(),parsing_started_at:/* @__PURE__ */n.z.string().nullish(),review_started_at:/* @__PURE__ */n.z.string().nullish(),created_at:/* @__PURE__ */n.z.string().optional(),updated_at:/* @__PURE__ */n.z.string().optional(),source:/* @__PURE__ */n.z.string().nullish().catch(null),action_needed_label:/* @__PURE__ */n.z.string().nullish().catch(null),failure_reason:/* @__PURE__ */n.z.string().nullish().catch(null),failure_code:/* @__PURE__ */n.z.string().nullish().catch(null),recovery_stage:/* @__PURE__ */n.z.string().nullish().catch(null),show_clinic_phone:/* @__PURE__ */n.z.boolean().optional().catch(void 0),clinic_name:/* @__PURE__ */n.z.string().nullish().catch(null),clinic_email:/* @__PURE__ */n.z.string().nullish().catch(null),clinic_phone:/* @__PURE__ */n.z.string().nullish().catch(null),converted_to_upload_at:/* @__PURE__ */n.z.string().nullish().catch(null),request_group_id:/* @__PURE__ */n.z.string().nullish().catch(null)}).passthrough();function er(e){let t=Jt.safeParse(e);if(!t.success)return null;let r=t.data,n=tr(r.simple_status),a=n==="requested"&&(r.status==="awaiting_upload"||r.simple_status_detail==="awaiting_owner_upload")?"awaiting_upload":n==="parsing"&&(r.simple_status_detail==="in_review"||r.simple_status_detail==="review_email_failed")?"in_review":n??Zt(r.status);/* @__PURE__ */
|
|
14
|
+
return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:a,simpleStatus:n,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:rr(r.document_count,0),heldItemCount:rr(r.held_item_count,0),receivedAt:r.received_at??null,parsingStartedAt:r.parsing_started_at??null,reviewStartedAt:r.review_started_at??null,createdAt:r.created_at??"",updatedAt:r.updated_at??"",wireStatus:r.status,source:r.source??null,actionNeededLabel:r.action_needed_label??null,failureReason:r.failure_reason??null,failureCode:r.failure_code??null,recoveryStage:r.recovery_stage??null,showClinicPhone:r.show_clinic_phone===true,clinicName:r.clinic_name??null,clinicEmail:r.clinic_email??null,clinicPhone:r.clinic_phone??null,convertedToUploadAt:r.converted_to_upload_at??null,requestGroupId:r.request_group_id??null})}function tr(e){return!e||e==="awaiting_upload"||e==="in_review"?null:Qt.has(e)?e:null}function rr(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}var nr="/widget/v1/records/sandbox/requests",ar=64,ir=/* @__PURE__ */new Set(["records","no_records","declined"]),or=/* @__PURE__ */new Set(["applied","already_applied","not_applicable"]);function lr(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function sr(e){return typeof e!="string"||e.length===0?lr("request_id is required and must be a non-empty string"):$t(e)?lr("request_id contains an unpaired surrogate and cannot be encoded"):[...e].length>ar?lr(`request_id is longer than ${ar} characters`):null}function dr(e){if(typeof e!="object"||e===null)return null;let{result:t,request:r}=e;if(typeof t!="string"||!or.has(t))return null;let n=er(r);return n===null?null:/* @__PURE__ */Object.freeze({result:t,request:n})}function ur(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=async(e,r,n,a)=>{let i=sr(r);if(i!==null)return err(i);let o=`${nr}/${encodeURIComponent(r)}/${n}`,l=await t.send(e,a===void 0?{method:"POST",path:o}:{method:"POST",path:o,body:a});if(!l.ok)return err(l.error);let s=dr(l.value);return s===null?err(makeEverfurError("internalError",{retryable:false})):ok(s)};return{simulateClinicReply(e,t){return typeof t!="string"||!ir.has(t)?Promise.resolve(err(lr("outcome must be records, no_records or declined"))):r("records.sandbox.clinicReply",e,"clinic-reply",{outcome:t})},publishSampleRecord(e){return r("records.sandbox.publishSample",e,"publish-sample")}}}function useEverfurRecordsSandbox(){let{runtime:t,userRef:userRef,scopeEpoch:r}=Ke();return e.useMemo(()=>{let{services:e}=t.registry;return ur({auth:e.authFor(userRef),...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}})},[t,userRef,r])}var cr="/widget/v1/televet/sandbox/visits",pr=128,hr=64,fr=/* @__PURE__ */new Set(["booked","cancelled","completed","no_show"]),gr=/* @__PURE__ */new Set(["applied","already_applied","not_applicable"]),mr=/* @__PURE__ */new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),br=/* @__PURE__ */new Set(["24h","30m"]);function vr(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function _r(e,t,r){return typeof t!="string"||t.length===0?vr(`${e} is required and must be a non-empty string`):$t(t)?vr(`${e} contains an unpaired surrogate and cannot be encoded`):Kt(t)>r?vr(`${e} is longer than ${r} characters`):null}function yr(e){if(typeof e!="object"||e===null)return null;let{result:t,visit:r}=e;if(typeof t!="string"||!gr.has(t)||typeof r!="object"||r===null)return null;let{visit_ref:n,pet_ref:a,status:i,scheduled_at:o}=r;return typeof n!="string"||n.length===0||typeof a!="string"||a.length===0||typeof i!="string"||!fr.has(i)||typeof o!="string"||o.length===0?null:/* @__PURE__ */Object.freeze({result:t,visit:/* @__PURE__ */Object.freeze({visitRef:n,petRef:a,status:i,scheduledAt:o})})}function wr(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=async(e,r,n)=>{let a=await t.send(e,{method:"POST",path:r,body:n},{idempotent:false,maxAttempts:1});if(!a.ok)return err(a.error);let i=yr(a.value);return i===null?err(makeEverfurError("internalError",{retryable:false})):ok(i)};return{createVisit(petRef){let e=_r("pet_ref",petRef,pr);return e!==null?Promise.resolve(err(e)):r("televet.sandbox.createVisit",cr,{pet_ref:petRef})},advanceVisit(e,t){let n=_r("visit_ref",e,hr);if(n!==null)return Promise.resolve(err(n));if(typeof t!="string"||!fr.has(t))return Promise.resolve(err(vr("to must be booked, cancelled, completed or no_show")));let a=`${cr}/${encodeURIComponent(e)}/advance`;return r("televet.sandbox.advanceVisit",a,{to:t})},simulateVisitEvent(e,t,n){let a=_r("visit_ref",e,hr);if(a!==null)return Promise.resolve(err(a));if(typeof t!="string"||!mr.has(t))return Promise.resolve(err(vr(`event must be one of ${[...mr].join(", ")}`)));if(t==="reminder"){if(typeof n!="string"||!br.has(n))return Promise.resolve(err(vr(`stage must be one of ${[...br].join(", ")} for a reminder`)))}else if(n!==void 0)return Promise.resolve(err(vr("stage is only for a reminder")));let i=`${cr}/${encodeURIComponent(e)}/simulate`;return r("televet.sandbox.simulateVisitEvent",i,n===void 0?{event:t}:{event:t,stage:n})}}}function useEverfurVetVisitSandbox(){let{runtime:t,userRef:userRef,scopeEpoch:r}=Ke();return e.useMemo(()=>{let{services:e}=t.registry;return wr({auth:e.authFor(userRef),...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}})},[t,userRef,r])}exports.AnalyzingIndicator=AnalyzingIndicator;exports.SeverityBadge=SeverityBadge;exports.TypingIndicator=TypingIndicator;exports.useEverfurRecordsSandbox=useEverfurRecordsSandbox;exports.useEverfurTestEntitlements=useEverfurTestEntitlements;exports.useEverfurVetVisitSandbox=useEverfurVetVisitSandbox;
|
|
@@ -3,25 +3,25 @@ export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } f
|
|
|
3
3
|
export { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
|
|
4
4
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
|
|
5
5
|
export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens.d-DDiPRgye.cjs';
|
|
6
|
-
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-
|
|
6
|
+
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-CqDLKj1U.cjs';
|
|
7
7
|
export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve.d-BTC3b6FW.cjs';
|
|
8
|
-
export { f as EntitlementSnapshot } from '../../runtimeTypes.d-
|
|
8
|
+
export { f as EntitlementSnapshot } from '../../runtimeTypes.d-DPh1Wh15.cjs';
|
|
9
9
|
export { l as RecordsRequestStatus, e as RecordsRequestView, m as RecordsSimpleStatus } from '../../models.d-D75NFs32.cjs';
|
|
10
10
|
import { ReactNode } from 'react';
|
|
11
11
|
import { R as RiskTier } from '../../PhotoController.d-Cb8Juile.cjs';
|
|
12
12
|
export { EverfurTestEntitlements, RecordsSandboxActionResult, RecordsSandboxClinicReply, RecordsSandboxController, RecordsSandboxResult, VetVisitSandboxActionResult, VetVisitSandboxController, VetVisitSandboxEvent, VetVisitSandboxReminderStage, VetVisitSandboxResult, VetVisitSandboxStatus, VetVisitSandboxVisit, useEverfurRecordsSandbox, useEverfurTestEntitlements, useEverfurVetVisitSandbox } from '../web/index.cjs';
|
|
13
|
-
import '../../presentation.d-
|
|
13
|
+
import '../../presentation.d-BkIvMtIl.cjs';
|
|
14
14
|
import '../../petsRepository.d-DB5CNKsK.cjs';
|
|
15
15
|
import '../../identity.d-DIH9h3Le.cjs';
|
|
16
16
|
import '../../config.d-BiVy0fLx.cjs';
|
|
17
17
|
import '../../profile.d-CSs1wlXT.cjs';
|
|
18
18
|
import '../../cacheEpoch.d-DknKn3S0.cjs';
|
|
19
19
|
import '../../ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
20
|
-
import '../../checkin.d-
|
|
20
|
+
import '../../checkin.d-CAKQydg8.cjs';
|
|
21
21
|
import '../../casesRepository.d-De4ZtgJ_.cjs';
|
|
22
22
|
import '../../requestFunnel.d-SySe6xHp.cjs';
|
|
23
23
|
import '../../TelemetryPort.d-BDNr00hu.cjs';
|
|
24
|
-
import '../../unreadStore.d-
|
|
24
|
+
import '../../unreadStore.d-Donv4bcF.cjs';
|
|
25
25
|
import '../../ports.d-BX4f4UsB.cjs';
|
|
26
26
|
import '../../CameraPort.d-Cv31Pz7g.cjs';
|
|
27
27
|
import '../../sdkConfigStore.d-BHrzkVpP.cjs';
|
|
@@ -3,25 +3,25 @@ export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } f
|
|
|
3
3
|
export { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
|
|
4
4
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids.d-B2GAAifq.js';
|
|
5
5
|
export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens.d-DDiPRgye.js';
|
|
6
|
-
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-
|
|
6
|
+
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-XrZYClN4.js';
|
|
7
7
|
export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve.d-BTC3b6FW.js';
|
|
8
|
-
export { f as EntitlementSnapshot } from '../../runtimeTypes.d-
|
|
8
|
+
export { f as EntitlementSnapshot } from '../../runtimeTypes.d-DAz0Tgw5.js';
|
|
9
9
|
export { l as RecordsRequestStatus, e as RecordsRequestView, m as RecordsSimpleStatus } from '../../models.d-C7d9Li6n.js';
|
|
10
10
|
import { ReactNode } from 'react';
|
|
11
11
|
import { R as RiskTier } from '../../PhotoController.d-BrFJ2lAc.js';
|
|
12
12
|
export { EverfurTestEntitlements, RecordsSandboxActionResult, RecordsSandboxClinicReply, RecordsSandboxController, RecordsSandboxResult, VetVisitSandboxActionResult, VetVisitSandboxController, VetVisitSandboxEvent, VetVisitSandboxReminderStage, VetVisitSandboxResult, VetVisitSandboxStatus, VetVisitSandboxVisit, useEverfurRecordsSandbox, useEverfurTestEntitlements, useEverfurVetVisitSandbox } from '../web/index.js';
|
|
13
|
-
import '../../presentation.d-
|
|
13
|
+
import '../../presentation.d-BkIvMtIl.js';
|
|
14
14
|
import '../../petsRepository.d-iHrHkXM2.js';
|
|
15
15
|
import '../../identity.d-DOKJFaiz.js';
|
|
16
16
|
import '../../config.d-DRoQ2lAx.js';
|
|
17
17
|
import '../../profile.d-CSs1wlXT.js';
|
|
18
18
|
import '../../cacheEpoch.d-DknKn3S0.js';
|
|
19
19
|
import '../../ErrorPolicyPort.d-68yrE3BE.js';
|
|
20
|
-
import '../../checkin.d-
|
|
20
|
+
import '../../checkin.d-qvYXugN3.js';
|
|
21
21
|
import '../../casesRepository.d-DsEeFd0F.js';
|
|
22
22
|
import '../../requestFunnel.d-CehftayS.js';
|
|
23
23
|
import '../../TelemetryPort.d-BDNr00hu.js';
|
|
24
|
-
import '../../unreadStore.d-
|
|
24
|
+
import '../../unreadStore.d-CLnChKca.js';
|
|
25
25
|
import '../../ports.d-BX4f4UsB.js';
|
|
26
26
|
import '../../CameraPort.d-Cv31Pz7g.js';
|
|
27
27
|
import '../../sdkConfigStore.d-VPvsIL8E.js';
|