@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
|
@@ -4,7 +4,7 @@ return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
|
|
|
4
4
|
return Object.freeze({ok:false,error:e})}var d=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var c=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),f=globalThis,p=f[c]??(f[c]=e.createContext(null));p.displayName??="EverfurContext";function h(){let t=e.useContext(p);if(t===null)throw new d("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return t}var b=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function v(e){if(e===void 0)return b;let t={...b};for(let r of Object.keys(b)){let n=e[r];typeof n=="string"&&n.trim().length>0&&(t[r]=n)}/* @__PURE__ */
|
|
5
5
|
return Object.freeze(t)}function y(e,t,r){let n=new Date(e),i=n.getTime();if(Number.isNaN(i))return null;let o=t-i;if(o<6e4)return r;if(o<36e5)return`${Math.floor(o/6e4)}m`;if(o<864e5)return`${Math.floor(o/36e5)}h`;if(o<6048e5)return`${Math.floor(o/864e5)}d`;if(o<5*6048e5)return`${Math.floor(o/6048e5)}w`;let l=n.getFullYear()===new Date(t).getFullYear();try{return n.toLocaleDateString("en-US",{month:"short",day:"numeric",...l?{}:{year:"numeric"}})}catch{return n.toISOString().slice(0,10)}}function m(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function g(e,t){let r=e.time===null?null:m(e.time)?`${e.time} ${t.timeAgoSuffix}`:e.time;return[e.unread?t.unreadPrefix:null,e.title,e.body.length>0?e.body:null,r].filter(e=>e!==null).join(" ")}function _(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e)}catch{}}function w(e){return(typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}function C(e,...t){if(typeof e=="function")try{let r=e(...t);return w(r)&&Promise.resolve(r).then(void 0,_),r}catch(e){_(e);return}}function k(e,t,r){return e.map(e=>{let n=e.title.trim().length>0?e.title:r.rowFallbackTitle,i=y(e.createdAt,t,r.now),o=e.readAt===null;return{id:e.id,title:n,body:e.body,time:i,unread:o,label:g({title:n,body:e.body,time:i,unread:o},r)}})}function x(e,t){return t.ok?{kind:"ready",item:t.value.item}:t.error.httpStatus===404?{kind:"notFound",ref:e}:{kind:"error",ref:e}}function S(e,t){return typeof e=="string"?{itemId:e}:typeof t=="string"?{eventId:t}:null}var F=e=>"itemId"in e?`i:${e.itemId}`:`e:${e.eventId}`;function E(t,r){let{open:n}=t,i=e.useRef(r.onOpen);i.current=r.onOpen;let o=S(r.initialItemId,r.initialEventId),[l,a]=e.useState(()=>o===null?null:{kind:"loading",ref:o}),s=e.useRef(0),u=e.useRef(true);e.useEffect(()=>(u.current=true,()=>{u.current=false}),[]);let d=e.useCallback(e=>{let t=++s.current;a({kind:"loading",ref:e}),n(e).then(r=>{u.current&&t===s.current&&a(x(e,r))})},[n]),c=e.useRef(d);c.current=d;let f=o===null?null:F(o),p=e.useRef(null),h=e.useRef(o);h.current=o,e.useEffect(()=>{if(f===null){p.current=null;return}p.current===f||h.current===null||(p.current=f,c.current(h.current))},[f]);let b=e.useCallback(e=>{let t=i.current;if(t===void 0){d({itemId:e});return}let r=++s.current;n({itemId:e}).then(n=>{if(!(!u.current||r!==s.current)){if(!n.ok){a(x({itemId:e},n));return}C(t,n.value)===false&&a({kind:"ready",item:n.value.item})}})},[n,d]),v=e.useCallback(()=>{s.current+=1,p.current=null,a(null)},[]),y=e.useCallback(()=>{l!==null&&l.kind!=="ready"&&d(l.ref)},[l,d]);return e.useMemo(()=>({detail:l,openRow:b,back:v,retryDetail:y}),[l,b,v,y])}var I=3600*1e3;function T(t,r=true){let[n,i]=e.useState(()=>Date.now()),o=e.useRef(true);return e.useEffect(()=>{if(o.current){o.current=false;return}r&&i(Date.now())},[t,r]),e.useEffect(()=>{if(!r)return;let e=setInterval(()=>i(Date.now()),I),t=()=>{document.visibilityState==="visible"&&i(Date.now())},n=typeof document<"u"&&typeof document.addEventListener=="function"?document:null;return n?.addEventListener("visibilitychange",t),()=>{clearInterval(e),n?.removeEventListener("visibilitychange",t)}},[t,r]),n}function R(t){let[r,n]=e.useState(null);return{shown:t!==null&&r!==t,onError:()=>n(t)}}function BrandImage({uri:e,label:n,decorative:i=false,style:o,resizeMode:l="contain",fallback:a=null,onError:s,testID:u}){let d=R(e);if(e===null||!d.shown)return a;let c=i?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...n===void 0?{}:{accessibilityLabel:n}};/* @__PURE__ */
|
|
6
6
|
return r.jsx(t.Image,{source:{uri:e},style:o,resizeMode:l,...c,onError:()=>{d.onError(),s?.()},...u===void 0?{}:{testID:u}})}var j=/* @__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 A=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){A(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var O=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var z={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},D={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},M={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},B={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},N={regular:"400",medium:"500",bold:"700"},P={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},L=0,q="System",U="monospace",V=["content","heading","control","compact","badge"];function $(e){let t={};for(let r of V)t[r]=e;return t}var W=[];function H(){return{family:q,mono:U,fontUrl:null,families:{regular:q,medium:q,bold:q,mono:U,monoMedium:U,monoBold:U},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:M,tierSizes:$(M),lineHeight:B,weight:N,letterSpacing:P,scale:1,maxScale:L,scaleCaps:O,headingFamily:null,headingWeight:null,fontSources:W,roles:j,typeScale:1}}var Y={},K=/* @__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 G={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(K.standard),emphasized:cssCubicBezier(K.emphasized),exit:cssCubicBezier(K.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)"},Q=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:J,space:z,radius:D,type:H(),motion:G,slots:Y}),Z={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:Z,space:z,radius:D,type:H(),motion:G,slots:Y});var X=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ee=globalThis,te=ee[X]??(ee[X]=e.createContext(Q));te.displayName??="EverfurThemeContext";function useEverfurTheme(){return e.useContext(te)}function re(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}function Text({tier:r,variant:n,...i}){let o=useEverfurTheme(),l=n===void 0?void 0:o.type.roles[n],a=re(o.type,r??l?.tier??"content"),s=n===void 0?i:{...i,style:[{...textRole(o,n),color:o.color.text.primary,flexShrink:1},i.style]};return e.createElement(t.Text,a===void 0?s:{maxFontSizeMultiplier:a,...s})}e.forwardRef(function(r,n){return e.createElement(t.TextInput,{...r,...n===null?{}:{ref:n}})});function ne(e){if(typeof e=="number")return le(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return ie(t.slice(1));if(t.toLowerCase().startsWith("0x"))return ie(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return oe(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=ie(t);if(e!==null)return e}return/^\d+$/.test(t)?le(Number.parseInt(t,10)):null}function ie(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:se(t[0]),g:se(t[1]),b:se(t[2]),a:1};if(t.length===6)return{r:ae(t,0),g:ae(t,2),b:ae(t,4),a:1};if(t.length===8){let e=ae(t,0);return{r:ae(t,2),g:ae(t,4),b:ae(t,6),a:e/255}}return null}function oe(e){let t=e.indexOf("("),r=e.indexOf(")");if(t<0||r<0||r<t)return null;let n=e.slice(t+1,r).split(",").map(e=>e.trim());if(n.length<3)return null;let i=ue(Number(n[0])),o=ue(Number(n[1])),l=ue(Number(n[2]));if(i===null||o===null||l===null)return null;let a=1;if(n.length>=4){let e=Number(n[3]);if(!Number.isFinite(e))return null;a=Math.min(1,Math.max(0,e))}return{r:i,g:o,b:l,a:a}}function le(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,r=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:r===0?1:r/255}}function ae(e,t){return Number.parseInt(e.slice(t,t+2),16)}function se(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function ue(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function de(e,t,r){return`#${ce(e)}${ce(t)}${ce(r)}`.toUpperCase()}function ce(e){return e.toString(16).padStart(2,"0")}var fe="#111111",pe="#FFFFFF",he="#000000";function readableOn(e){let t=ne(e);if(t===null)return pe;let r=ye(t),n=ye({r:17,g:17,b:17}),i=ye({r:255,g:255,b:255});return ge(r,i)>=ge(r,n)?pe:fe}function be(e,t){let r=readableOn(e);return contrastRatio(r,e)>=t?r:contrastRatio(pe,e)>=contrastRatio(he,e)?pe:he}function ve(e){let t=t=>e.reduce((e,r)=>Math.min(e,contrastRatio(t,r)),Number.POSITIVE_INFINITY);return t(pe)>=t(he)?pe:he}function ye(e){let t=me(e.r/255),r=me(e.g/255),n=me(e.b/255);return.2126*t+.7152*r+.0722*n}function me(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ge(e,t){let r=Math.max(e,t),n=Math.min(e,t);return(r+.05)/(n+.05)}function contrastRatio(e,t){let r=ne(e),n=ne(t);if(r===null||n===null)return 1;let i=n.a>=1?n:{...n},o=r.a>=1?r:_e(r,i);return ge(ye(o),ye(i))}function _e(e,t){let r=e.a,n=(e,t)=>Math.round(e*r+t*(1-r));return{r:n(e.r,t.r),g:n(e.g,t.g),b:n(e.b,t.b),a:1}}function we(e,t){let r=ne(e),n=ne(t);if(r===null||n===null)return null;let i=r.a>=1?r:_e(r,{...n});return de(i.r,i.g,i.b)}function Ce(e,t){let r=ne(e);if(r===null)return null;let n=Math.min(1,Math.max(0,t));return`rgba(${r.r}, ${r.g}, ${r.b}, ${n})`}var ke=.05;function xe(e,t,r,n){let i=t[0];if(i===void 0)return r;let o=e=>t.every(t=>contrastRatio(e,t)>=n);if(ne(e)===null)return r;if(o(e))return e;let l=we(e,i),a=l===null?null:ne(l),s=ne(r);if(a===null||s===null)return r;for(let e=1;e<1/ke;e+=1){let t=e*ke,r=(e,r)=>Math.round(e+(r-e)*t),n=de(r(a.r,s.r),r(a.g,s.g),r(a.b,s.b));if(o(n))return n}return r}var Se=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),Fe=/* @__PURE__ */new WeakMap;function Ee(e){let t=Fe.get(e);if(t!==void 0)return t;let r=e.color,n=e.brightness==="dark",i=n?{dark:n,ink:r.text.primary,ink2:r.text.secondary,ink3:r.text.muted,paper:r.background,card:r.surface,line:r.borderRingCream,tile:r.surfaceSubtle,shadow:r.shadow,riskBg:r.badgeBgCritical,riskInk:r.danger,riskDot:r.danger,clearBg:r.badgeBgPositive,clearInk:r.success,clearDot:r.success,watchDot:r.warningStrong}:{dark:n,...Se},o=(e,t)=>xe(e,t,ve(t),Ie),l=(e,t)=>contrastRatio(e,t)>=Ie?e:be(t,Ie),a=[i.card,i.paper].map(e=>we(r.brandSoft,e)??e),s={primary:r.primary,onPrimary:l(r.onPrimary,r.primary),accent:r.accent,onAccent:l(r.onAccent,r.accent),link:o(r.linkInk,[i.card,i.paper,i.tile]),badge:r.brandSoft,onBadge:o(r.brandInk,a)},u=/* @__PURE__ */Object.freeze({...i,...s});return Fe.set(e,u),u}var Ie=4.5;function Te(e,t){for(let r of t)if(contrastRatio(r,e)>=Ie)return r;return be(e,Ie)}function Re(e,t,r){let n=Ce(e,t);return(n===null?null:we(n,r))??r}function je(e){let t=Ee(e),r=e.color,n=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:n,onInk:t.dark?r.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:Te(t.accent,[t.ink,t.onAccent]),accent2:Re(t.accent,.75,n),accent4:Re(t.accent,.17,n),accentChip:Re(t.accent,.47,n),link:t.link,linkChip:Re(t.link,.2,n),riskDot:t.riskDot,riskChip:t.dark?r.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?r.badgeBgPositive:"#DDEFC4",byInk:r.brandInk}}var Ae=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),Oe=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),ze=["paddingTop","paddingRight","paddingBottom","paddingLeft"],De=17,Me=1.5,Be=400,Ne=700;function Pe(e){return e<=450?"regular":e<=650?"medium":"bold"}function Le(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function qe(e,t,r){if(t==="$mono"){let t=r<=450?"mono":r<=650?"monoMedium":"monoBold",n=face(e,t);return n.fontWeight===void 0?{fontFamily:n.fontFamily}:{fontFamily:n.fontFamily,fontWeight:Le(r)}}let n=t==="$serif"?headingFace(e,Pe(r)):face(e,Pe(r));return n.fontWeight===void 0?{fontFamily:n.fontFamily}:{fontFamily:n.fontFamily,fontWeight:Le(r)}}function Ue(e,t,r={}){let n=je(e),i=e.brightness==="dark",o=e.motion.reducedMotion,l=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?i?n.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:n[t]??e}return Array.isArray(e)?e.map(e=>l(e)):e},a=/* @__PURE__ */new Map,s=e=>{let n=e.filter(e=>typeof e=="string"&&e!==""),i=n.join("|"),s=a.get(i);if(s!==void 0)return s;let u={},d=e=>{if(e!==void 0)for(let[t,r]of Object.entries(e))u[t]=l(r)};for(let e of n)d(t[e]),o&&d(r[e]);let c=/* @__PURE__ */Object.freeze(u);return a.set(i,c),c},u=/* @__PURE__ */new Map,d=(...e)=>{let t=e.filter(Boolean).join("|"),r=u.get(t);if(r!==void 0)return r;let n=s(e),i={};for(let[e,t]of Object.entries(n))Ae.has(e)||Oe.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(i[e]=t);if((typeof n.fontSize=="number"||n.flexDirection==="row")&&n.position!=="absolute"&&typeof n.height=="number"&&typeof n.width!="number"){let e=i.height;delete i.height,typeof i.minHeight!="number"&&(i.minHeight=e)}let o=n.ring;if(Array.isArray(o)){let[e,t]=o;i.borderWidth=e,i.borderColor=t;for(let t of ze){let r=i[t];typeof r=="number"&&(i[t]=Math.max(0,r-e))}}let l=n.edge;if(Array.isArray(l)){let[e,t]=l;i.borderBottomWidth=e,i.borderBottomColor=t}let a=n.shadow;if(Array.isArray(a)){let[e,t,r,n]=a;i.shadowColor=n,i.shadowOffset={width:e,height:t},i.shadowOpacity=1,i.shadowRadius=r/2}if(n.round===1){let e=typeof n.width=="number"?n.width:typeof n.height=="number"?n.height:999;i.borderRadius=e/2}let d=/* @__PURE__ */Object.freeze(i);return u.set(t,d),d},c=/* @__PURE__ */new Map,f=(t,r)=>{let i=`${t}|${r.filter(Boolean).join("|")}`,o=c.get(i);if(o!==void 0)return o;let l=s(r),a=typeof l.fontSize=="number"?l.fontSize:De,u=typeof l.lh=="number"?l.lh:Me,d=typeof l.fontWeight=="string"?Number(l.fontWeight):t,f=typeof l.family=="string"?l.family:"$sans",p={...qe(e,f,d),fontSize:a,lineHeight:Math.round(a*u*100)/100,color:typeof l.color=="string"?l.color:n.ink};typeof l.ls=="number"&&(p.letterSpacing=Math.round(l.ls*a*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof l[e]=="string"&&(p[e]=l[e]);let h=/* @__PURE__ */Object.freeze(p);return c.set(i,h),h};return{reduced:o,colors:n,view:d,text:(...e)=>f(Be,e),strong:(...e)=>f(Ne,e),icon:(...e)=>{let t=s(e),r={tintColor:typeof t.color=="string"?t.color:n.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(r[e]=t[e]);return r},col:(e,t)=>{let r=s([e]).cols;if(!Array.isArray(r))return{};let n=r[Math.min(t,r.length-1)];if(typeof n=="number")return{width:n,flexShrink:0};let i=typeof n=="string"?Number.parseFloat(n):1;return{flex:Number.isFinite(i)?i:1,minWidth:0}},motion:(...e)=>{let t=s(e),r=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(r)&&r.length===4?r:null}},raw:(e,...t)=>s(t)[e]}}var Ve={".ph-icon":{position:"relative",width:40,height:44,alignItems:"center",justifyContent:"center"},".ph-icon svg":{width:27,height:27},".ph-icon i":{position:"absolute",top:9,right:7,width:9,height:9,round:1,backgroundColor:"$riskDot",ring:[2,"$paper"]},".ph-scrim":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:40,backgroundColor:"rgba(38, 37, 35, .38)",opacity:0,dur:200},".ph-scrim.is-on":{opacity:1,dur:240},".ph-sheet":{position:"absolute",left:0,right:0,bottom:0,zIndex:41,maxHeight:"80%",backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:40,paddingLeft:20,dur:220,ease:[.23,1,.32,1]},".sheet__grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:10,marginLeft:"auto"},".sheet__top":{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},".sheet__kicker":{family:"$mono",fontSize:11,ls:.08,textTransform:"uppercase",color:"$ink3"},".sheet__x":{width:40,height:40,marginRight:-8,alignItems:"center",justifyContent:"center",round:1},".sheet__x svg":{width:22,height:22},".notif":{width:"100%",paddingTop:12,paddingRight:0,paddingBottom:12,paddingLeft:0,textAlign:"left",flexDirection:"row",cols:[42,"1fr"],gap:12},".notif__i":{width:42,height:42,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:"$accent"},".notif__i svg":{width:23,height:22},".notif__i--b":{backgroundColor:"$n_99DDFF"},".notif strong":{fontSize:15.5},".notif span":{fontSize:14.5,color:"$ink2",marginTop:2,lh:1.4},".notif small":{family:"$mono",fontSize:10.5,ls:.05,textTransform:"uppercase",color:"$ink3",marginTop:6}},$e={bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="}};var We=/* @__PURE__ */new WeakMap;function He(e){let t=We.get(e);if(t!==void 0)return t;let r=Ue(e,Ve);return We.set(e,r),r}function InboxIcon({name:e,style:n}){let i=$e[e];/* @__PURE__ */
|
|
7
|
-
return r.jsx(t.Image,{source:{uri:i.uri,width:i.width*3,height:i.height*3},style:[{width:i.width,height:i.height},n],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}function Ye(e,t){let r=e.view(".ph-icon i"),n=e.raw("ring",".ph-icon i"),i=Array.isArray(n)&&typeof n[0]=="number"?n[0]:0,o=(typeof r.width=="number"?r.width:9)+i*2,l=typeof r.top=="number"?r.top-i:r.top,a=typeof r.right=="number"?r.right-i:r.right;return{...r,width:o,height:o,borderRadius:o/2,borderWidth:i,borderColor:t,top:l,right:a}}var Ke=[{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}],Ge=/* @__PURE__ */Object.freeze(Ke.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(Ge.map(e=>e.wireCode));var Je=/* @__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"}),Qe=/* @__PURE__ */Object.freeze(Ge.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Je[e.wireCode]}))),Ze=new Map(Qe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),Xe=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(Qe.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",...Xe]){let t=Ze.get(e+r);if(t)return t}}var et=/* @__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 et[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 tt=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return tt.has(e)}var rt=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||rt.has(e)}var nt=500,it=8e3,ot=4;function backoffDelayMs(e,t=Math.random){let r=Math.max(0,e),n=Math.min(nt*2**r,it);return Math.floor(t()*n)}var lt="This feature isn't available on your account right now.",at="Something in that request was not right. Check the details and try again.",st=/* @__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:lt,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:at,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:lt,runtimeDisposed:at,unknown:"Something went wrong. Please try again."}),ut="This session has ended. Please sign in again.",dt="linked_account_read_only";function ct(e,t,r){return e==="conflict"&&r===dt?lt:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?ut:userFacingError(e)}function userFacingError(e){return st[e]}function ft(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false})}var pt=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let r=contractErrorFor(t?.wireCode,t?.wireEnvelope),n=e==="conflict"&&t?.reasonCode===dt,i={code:e,category:categoryFor(e),retryable:t?.retryable??(n?false:isRetryableCode(e)),displayMessage:ct(e,t?.wireCode,n?dt:null)};t?.httpStatus!==void 0&&(i.httpStatus=t.httpStatus),t?.requestId&&(i.requestId=t.requestId),typeof t?.reasonCode=="string"&&pt.test(t.reasonCode)&&(i.reasonCode=t.reasonCode);let o=t?.retryAfterSeconds;if(typeof o=="number"&&Number.isFinite(o)&&o>=0&&(i.retryAfterSeconds=Math.round(o)),r);return t?.wireMessage&&ft(i,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ft(i,"raw",t.raw),/* @__PURE__ */Object.freeze(i)}function errorFrame(e){/* @__PURE__ */
|
|
7
|
+
return r.jsx(t.Image,{source:{uri:i.uri,width:i.width*3,height:i.height*3},style:[{width:i.width,height:i.height},n],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}function Ye(e,t){let r=e.view(".ph-icon i"),n=e.raw("ring",".ph-icon i"),i=Array.isArray(n)&&typeof n[0]=="number"?n[0]:0,o=(typeof r.width=="number"?r.width:9)+i*2,l=typeof r.top=="number"?r.top-i:r.top,a=typeof r.right=="number"?r.right-i:r.right;return{...r,width:o,height:o,borderRadius:o/2,borderWidth:i,borderColor:t,top:l,right:a}}var Ke=[{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}],Ge=/* @__PURE__ */Object.freeze(Ke.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(Ge.map(e=>e.wireCode));var Je=/* @__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"}),Qe=/* @__PURE__ */Object.freeze(Ge.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Je[e.wireCode]}))),Ze=new Map(Qe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),Xe=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(Qe.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",...Xe]){let t=Ze.get(e+r);if(t)return t}}var et=/* @__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 et[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 tt=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return tt.has(e)}var rt=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||rt.has(e)}var nt=500,it=8e3,ot=4;function backoffDelayMs(e,t=Math.random){let r=Math.max(0,e),n=Math.min(nt*2**r,it);return Math.floor(t()*n)}var lt="This feature isn't available on your account right now.",at="Something in that request was not right. Check the details and try again.",st=/* @__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:lt,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:at,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:lt,runtimeDisposed:at,unknown:"Something went wrong. Please try again."}),ut="This session has ended. Please sign in again.",dt="linked_account_read_only";function ct(e,t,r){return e==="conflict"&&r===dt?lt:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?ut:userFacingError(e)}function userFacingError(e){return st[e]}function ft(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false})}var pt=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let r=contractErrorFor(t?.wireCode,t?.wireEnvelope),n=e==="conflict"&&t?.reasonCode===dt,i={code:e,category:categoryFor(e),retryable:t?.retryable??(n?false:isRetryableCode(e)),displayMessage:ct(e,t?.wireCode,n?dt:null)};t?.httpStatus!==void 0&&(i.httpStatus=t.httpStatus),t?.requestId&&(i.requestId=t.requestId),typeof t?.reasonCode=="string"&&pt.test(t.reasonCode)&&(i.reasonCode=t.reasonCode);let o=t?.retryAfterSeconds;if(typeof o=="number"&&Number.isFinite(o)&&o>=0&&(i.retryAfterSeconds=Math.round(o)),r);return t?.wireMessage&&ft(i,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ft(i,"raw",t.raw),/* @__PURE__ */Object.freeze(i)}function errorFrame(e){/* @__PURE__ */
|
|
8
8
|
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 ht="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 yt(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[ht]=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:{...mt(e.headers),...authHeaders(t)}}}function mt(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===ht||(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,gt(t,r)));if(n.ok||wt(n.error.raw)!==bt||t.anonIdentity===void 0||t.userRef!==null)return n;let i=await t.anonIdentity.token({forceRefresh:true});return i===null||i===r?n:t.transport.request(withAuthHeaders(e,gt(t,i)))}let r;try{r=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(yt(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 i;try{i=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(yt(e,{wireCode:wt(n.error.raw),requestId:n.error.requestId}))}let o=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!o.ok&&o.error.httpStatus===401?(t.identity.reportRejected?.(),err(_t(o.error))):o}function gt(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function _t(e){let t=e.raw,r=wt(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 wt(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:Ct(e)})}function Ct(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var kt=3e4,xt=it*2,St="idempotency-key",Ft=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Et=/* @__PURE__ */Object.freeze({onEvent(){}}),It=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function Tt(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??Et,r=e.timers??It,n=e.rng??Math.random,i=e.sleep??((e,t)=>Wt(e,r,t)),o=e.maxAttempts??ot,l=e.unaryTimeoutMs??kt,a=e.newIdempotencyKey??jt(),s=e=>{try{t.onEvent(e)}catch{}};async function u(t,u,d){let c=d?.maxAttempts,f=Math.max(1,c??o),p=d?.idempotent??Ft.has(u.method),h=d?.idempotencyKey===void 0?null:Tt(d.idempotencyKey),b=p?h??a():null,v=Rt(u,b),y=0;for(;;){let o=e=>/* @__PURE__ */Object.freeze({call:t,method:u.method,path:u.path,attempt:y,...b?{idempotencyKey:b}:{},...e});s(o({phase:"attempt"}));let a=Vt(l,r),d=$t(a.signal,u.signal),p;try{p=await authedSend({...v,signal:d.signal},e.auth)}catch(e){p=err(networkError(e))}finally{d.dispose(),a.cancel()}if(p.ok)return s(o({phase:"settled",ok:true,reason:"ok"})),p;let h=p.error,m=Ot(h,y,{maxAttempts:f,rng:n,now:r.now(),aborted:u.signal?.aborted===true,...c!==void 0?{perCallMaxAttempts:c}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),g={ok:false,code:h.code,reason:m.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!m.retry)return s(o({phase:"settled",...g})),err(h);if(s(o({phase:"retry",...g,delayMs:m.delayMs})),await i(m.delayMs,u.signal),u.signal?.aborted===true)return s(o({phase:"settled",...g,reason:"aborted"})),err(h);y+=1}}async function d(t){return withAuthHeaders(t,await Ut(e.auth))}async function*c(t,r,n){s(
|
|
9
9
|
/* @__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__ */
|
|
10
10
|
return Object.freeze({send:u,authorize:d,stream:c})}function Rt(e,t){let r={};for(let[t,n]of Object.entries(e.headers??{}))t.toLowerCase()!==St&&(r[t]=n);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}function jt(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var At=10;function Ot(e,t,r){if(r.aborted)return{retry:false,reason:"aborted"};let n=zt(e);if(n==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let i=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 o=()=>{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(At,Math.floor(t)))},l=r.perCallMaxAttempts??o()??r.maxAttempts;if(t+1>=l)return{retry:false,reason:"attempts-exhausted"};let a=Dt(e,r.now);return a!==null?a>xt?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:a}:{retry:true,reason:i,delayMs:backoffDelayMs(t,r.rng)}}function zt(e){let t=e.code==="unknown"?fromWire(Lt(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function Dt(e,t){let r=Bt(e.raw);if(r!==null){let e=r-t;return e>0?e:0}let n=Mt(e.raw);return n===null?null:Math.round(n*1e3)}function Mt(e){for(let t of Nt(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function Bt(e){for(let t of Nt(e)){let e=t.resets_at,r=Pt(e);if(r!==null)return r}return null}function Nt(e){if(!qt(e))return[];let t=[e];for(let r of["error","detail"]){let n=e[r];qt(n)&&t.push(n)}return t}function Pt(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 Lt(e){for(let t of Nt(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function qt(e){return typeof e=="object"&&e!==null}async function Ut(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 Vt(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return{signal:r.signal,cancel:()=>t.clearTimeout(n)}}function $t(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 i=()=>n.abort();return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i)}}}function Wt(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let i=t.setTimeout(()=>{r?.removeEventListener("abort",o),n()},e),o=()=>{t.clearTimeout(i),n()};r?.addEventListener("abort",o,{once:true})})}var Ht=/* @__PURE__ */Object.freeze({"visit.booked":"visit","visit.reminder":"join","visit.rescheduled":"visit","visit.followup_sent":"messages","visit.message_received":"messages","visit.completed":"summary","visit.ended":"visit","visit.cancelled":null,"visit.no_show":null});function Yt(e){return Object.prototype.hasOwnProperty.call(Ht,e)?Ht[e]:"visit"}var Kt=1,Gt=/* @__PURE__ */Object.freeze(["record_request","pet","visit","case","chat","records","vaccine","medication","labs","order","health_plan","tip","walk","weather","pack","mood","card","membership","support","offer","inbox"]),Jt=["v","event_id","event_type","target"],Qt=/^[a-z][a-z0-9_]{0,39}(\.[a-z0-9_]{1,40}){1,4}$/,Zt=/^[a-z][a-z0-9_]{0,39}$/,Xt=16,er=/^inb_[A-Za-z0-9_-]{1,64}$/,tr=/* @__PURE__ */new Set(["visit","join","summary","messages","prep","waiting","notes"]),rr=/* @__PURE__ */Object.freeze({visit:"visit",join:"join",summary:"summary",messages:"messages",prep:"visit",waiting:"join",notes:"summary"}),nr=/* @__PURE__ */new Set(["check","refill","dose"]),ir=/* @__PURE__ */new Set(["status","prescription"]),or=128,lr=4096,ar=/^evt_[A-Za-z0-9]{1,64}$/,sr=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ur=/[\0-]/;function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function cr(e){return Object.keys(e)}function fr(e){if(dr(e))return e;if(typeof e!="string"||e.length===0||e.length>lr)return null;let t=JSON.parse(e);return dr(t)?t:null}function pr(e,t){let r=e;for(let e of t){if(!dr(r))return;r=r[e]}return r}var hr=[[],["data"],["request","content","data"],["notification","request","content","data"]];function br(e){if(!dr(e))return null;for(let t of hr){let r=pr(e,t);if(dr(r)&&"everfur"in r)return r.everfur}return Jt.every(t=>t in e)?e:null}function vr(e){return typeof e!="string"||e.length===0||e.length>or||ur.test(e)||e.includes("://")||e.toLowerCase().startsWith("everfur")?null:e}function yr(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function mr(e,t){let r=yr(e,t);if(r==null)return{ok:true,value:null};let n=vr(r);return n===null?{ok:false}:{ok:true,value:n}}function gr(e,t){return vr(yr(e,t))}function _r(e,t,r){let n=mr(e,t);if(n.ok)return n.value!==null&&r.has(n.value)?n.value:null}function wr(e,t){let r={},n=0;for(let t of cr(e)){let i=e[t];if(!(t==="kind"||!Zt.test(t)||typeof i!="string")){if(vr(i)===null||(n+=1,n>Xt))return null;r[t]=i}}/* @__PURE__ */
|
|
@@ -16,7 +16,7 @@ return Object.freeze(r)}function Hr(e){return typeof e=="string"&&e.length>0?e:n
|
|
|
16
16
|
return Object.freeze({id:t,typeKey:r,eventType:l,eventId:u,title:n,body:i,petRef:petRef,target:Wr(e.target),createdAt:o,readAt:a})}function Gr(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Jr(e){if(!qr(e)||!Array.isArray(e.items))return null;let t=Gr(e.unread_count),r=Yr(e.next_cursor);if(t===null||r===void 0)return null;let n=[];for(let t of e.items){let e=Kr(t);e!==null&&n.push(e)}/* @__PURE__ */
|
|
17
17
|
return Object.freeze({items:/* @__PURE__ */Object.freeze(n),nextCursor:r,unreadCount:t})}function Qr(e){return qr(e)?Gr(e.unread_count):null}function Zr(e){if(e.eventId===null||e.eventType===null||e.target===null)return null;let t={};for(let[r,n]of Object.entries(e.target))n!==null&&(t[r]=n);return parseEverfurNotification({v:1,event_id:e.eventId,event_type:e.eventType,target:t})}function Xr(e){/* @__PURE__ */
|
|
18
18
|
return Object.freeze({item:e,notification:Zr(e)})}function en(e){let t=[],{limit:r,cursor:n,petRef:petRef,eventId:i}=e??{};if(r!==void 0){if(!Number.isInteger(r)||r<1||r>jr)return Nr(`limit must be an integer from 1 to ${jr}`);t.push(`limit=${r}`)}if(n!==void 0){if(typeof n!="string"||n.length===0||n.length>Ar)return Nr("cursor must be the nextCursor of an earlier page");t.push(`cursor=${encodeURIComponent(n)}`)}if(petRef!==void 0){if(typeof petRef!="string"||petRef.length===0||petRef.length>Or)return Nr(`petRef must be 1..${Or} characters`);t.push(`pet_ref=${encodeURIComponent(petRef)}`)}if(i!==void 0){if(!Vr(i))return Nr("eventId must be an Everfur event id (evt_...)");t.push(`event_id=${i}`)}return t.length===0?"":`?${t.join("&")}`}function createInboxClient(e){let t=()=>{let{services:t}=e.registry;return tn({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},r=e=>Promise.resolve(err(Lr(e)));return{listPage:(n,i)=>e.isDisposed?r("listPage"):t().listPage(n,i),getItem:(n,i)=>e.isDisposed?r("getItem"):t().getItem(n,i),markRead:n=>e.isDisposed?r("markRead"):t().markRead(n),markAllRead:()=>e.isDisposed?r("markAllRead"):t().markAllRead(),unreadCount:n=>e.isDisposed?r("unreadCount"):t().unreadCount(n)}}function tn(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=(e,t)=>t?{...e,signal:t}:e,n=async(e,r)=>{let n=await t.send(e,{method:"POST",path:"/widget/v1/inbox/read",body:r});if(!n.ok)return n;let i=Qr(n.value);return i===null?err(Pr(e)):ok(i)};return{async listPage(e,n){let i=en(e);if(typeof i!="string")return err(i);let o=await t.send("inbox.list",r({method:"GET",path:`/widget/v1/inbox${i}`},n?.signal));if(!o.ok)return o;let l=Jr(o.value);return l===null?err(Pr("inbox.list")):ok(l)},async getItem(e,n){if(!Ur(e))return err(Nr("itemId must be an inbox item id (inb_...)"));let i=await t.send("inbox.get",r({method:"GET",path:`/widget/v1/inbox/${e}`},n?.signal));if(!i.ok)return i;let o=Kr(i.value);return o===null?err(Pr("inbox.get")):ok(o)},markRead(e){return!Array.isArray(e)||e.length===0||e.length>zr||!e.every(Ur)?Promise.resolve(err(Nr(`markRead needs 1..${zr} inbox item ids`))):n("inbox.markRead",{ids:[...new Set(e)]})},markAllRead(){return n("inbox.markAllRead",{all:true})},async unreadCount(e){let n=await t.send("inbox.unreadCount",r({method:"GET",path:"/widget/v1/inbox/unread-count"},e?.signal));if(!n.ok)return n;let i=Qr(n.value);return i===null?err(Pr("inbox.unreadCount")):ok(i)}}}var rn=20,nn=/* @__PURE__ */Object.freeze({status:"idle",items:/* @__PURE__ */Object.freeze([]),unreadCount:null,hasMore:false,refreshing:false,loadingMore:false,error:null});function on(e){return e.httpStatus===404}function ln(){return makeEverfurError("resourceNotFound",{retryable:false,httpStatus:404,wireMessage:"no inbox item matched"})}function an(e,t){let r=new Set(e.map(e=>e.id));/* @__PURE__ */
|
|
19
|
-
return Object.freeze([...e,...t.filter(e=>!r.has(e.id))])}function sn(e){let{client:t}=e,r=e.pageSize??rn,petRef=e.petRef??null,n=nn,i=null,o=0,l=false,a=null,s=null,u=null,d=0,c=/* @__PURE__ */new Set,f=e=>{if(!l){n=/* @__PURE__ */Object.freeze({...n,...e});for(let e of[...c])try{e()}catch{}}},p=t=>{f({unreadCount:t});try{e.onUnreadCount?.(t)}catch{}},h=e=>({limit:r,...e===null?{}:{cursor:e},...petRef===null?{}:{petRef:petRef}}),b=(e,t)=>{let r=t?an(e.items,n.items):e.items;(!t||o<=1)&&(d+=1,i=e.nextCursor,o=1),f({status:"ready",items:r,hasMore:i!==null,error:null}),p(e.unreadCount)},v=async e=>{let r=await t.listPage(h(null));if(!l){if(r.ok){b(r.value,e);return}if(on(r.error)){i=null,f({status:"off",items:nn.items,hasMore:false,unreadCount:null,error:null});return}n.status==="ready"?f({error:r.error}):f({status:"error",error:r.error})}},y=async e=>{let r=n.items,i=e===null?null:new Set(e),o=/* @__PURE__ */(new Date).toISOString();f({items:/* @__PURE__ */Object.freeze(r.map(e=>e.readAt===null&&(i===null||i.has(e.id))?/* @__PURE__ */Object.freeze({...e,readAt:o}):e))});let a=e===null?await t.markAllRead():await t.markRead(e);if(l)return a.ok?ok(void 0):err(a.error);if(!a.ok){let e=new Map(r.map(e=>[e.id,e]));return f({items:/* @__PURE__ */Object.freeze(n.items.map(t=>t.readAt===o?e.get(t.id)??t:t))}),err(a.error)}return p(a.value),ok(void 0)},m=()=>a!==null||l?a??Promise.resolve():(f({status:"loading",error:null}),a=v(false),a);return{subscribe(e){return c.add(e),()=>c.delete(e)},getSnapshot:()=>n,load:m,refresh(){return l?Promise.resolve():a===null?m():(s!==null||(n.status==="error"||n.status==="idle"?f({status:"loading",error:null}):f({refreshing:true}),s=v(n.status==="ready").finally(()=>{s=null,f({refreshing:false})})),s)},loadMore(){if(l||u!==null||i===null||n.status!=="ready")return u??Promise.resolve();let e=d,r=i;return f({loadingMore:true}),u=t.listPage(h(r)).then(t=>{if(l||e!==d)return;if(!t.ok){f({error:t.error});return}i=t.value.nextCursor,o+=1;let r=new Set(n.items.map(e=>e.id));f({items:/* @__PURE__ */Object.freeze([...n.items,...t.value.items.filter(e=>!r.has(e.id))]),hasMore:i!==null,error:null}),p(t.value.unreadCount)}).finally(()=>{u=null,f({loadingMore:false})}),u},markRead:e=>y([e]),markAllRead:()=>y(null),async open(e){let{itemId:r,eventId:i}=e,o=r===void 0?null:n.items.find(e=>e.id===r)??null;if(o===null&&i!==void 0&&(o=n.items.find(e=>e.eventId===i)??null),o===null&&r!==void 0){let e=await t.getItem(r);if(!e.ok&&i===void 0)return err(e.error);e.ok&&(o=e.value)}if(o===null&&i!==void 0){let e=await t.listPage({eventId:i,limit:1});if(!e.ok)return err(e.error);o=e.value.items[0]??null}return o===null?err(ln()):(o.readAt===null&&y([o.id]),ok(Xr(o)))},dispose(){l=true,c.clear()}}}var un=/* @__PURE__ */Symbol.for("@everfur/sdk#InboxUnread@v1");function dn(){let e=globalThis,t=e[un];if(t instanceof WeakMap)return t;let r=/* @__PURE__ */new WeakMap;return e[un]=r,r}function cn(e){let t=null,r=null,n=/* @__PURE__ */new Set,i=e=>{if(e!==t){t=e;for(let e of[...n])try{e()}catch{}}};return{get:()=>t,subscribe(e){return n.add(e),()=>n.delete(e)},refresh(){if(r!==null)return r;if(e.isDisposed)return Promise.resolve();let{services:t}=e.registry;return r=createRequestFunnel({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}}).send("inbox.unreadCount",{method:"GET",path:"/widget/v1/inbox/unread-count"}).then(e=>{if(e.ok){let t=e.value?.unread_count;typeof t=="number"&&Number.isInteger(t)&&t>=0&&i(t)}else e.error.httpStatus===404&&i(null)}).catch(()=>{}).finally(()=>{r=null}),r},report(e){Number.isInteger(e)&&e>=0&&i(e)}}}function fn(e,t){let r=dn(),n=r.get(e);if(n!==void 0&&n.key===t)return n.store;let i=cn(e);return r.set(e,{key:t,store:i}),i}function pn(userRef,e){return`${userRef??""}\0${e}`}function hn(e,conversationId,t){if(e==="announced")return false;let r=t.lastRefresh;return r===null||r.conversationId!==conversationId?false:t.now-r.at<15e3}function bn(e,t){let conversationId=t.activeConversationId===null||t.activeConversationId.length===0?null:t.activeConversationId;return conversationId===null&&t.refreshesBlankThread!==true?{action:"skip",reason:"no_thread"}:t.isTurnInFlight?{action:"defer",reason:"turn_in_flight"}:t.isOffline?{action:"defer",reason:"offline"}:hn(e,conversationId,t)?{action:"skip",reason:"coalesced"}:{action:"refresh",conversationId:conversationId}}var vn=3e5;function
|
|
19
|
+
return Object.freeze([...e,...t.filter(e=>!r.has(e.id))])}function sn(e){let{client:t}=e,r=e.pageSize??rn,petRef=e.petRef??null,n=nn,i=null,o=0,l=false,a=null,s=null,u=null,d=0,c=/* @__PURE__ */new Set,f=e=>{if(!l){n=/* @__PURE__ */Object.freeze({...n,...e});for(let e of[...c])try{e()}catch{}}},p=t=>{f({unreadCount:t});try{e.onUnreadCount?.(t)}catch{}},h=e=>({limit:r,...e===null?{}:{cursor:e},...petRef===null?{}:{petRef:petRef}}),b=(e,t)=>{let r=t?an(e.items,n.items):e.items;(!t||o<=1)&&(d+=1,i=e.nextCursor,o=1),f({status:"ready",items:r,hasMore:i!==null,error:null}),p(e.unreadCount)},v=async e=>{let r=await t.listPage(h(null));if(!l){if(r.ok){b(r.value,e);return}if(on(r.error)){i=null,f({status:"off",items:nn.items,hasMore:false,unreadCount:null,error:null});return}n.status==="ready"?f({error:r.error}):f({status:"error",error:r.error})}},y=async e=>{let r=n.items,i=e===null?null:new Set(e),o=/* @__PURE__ */(new Date).toISOString();f({items:/* @__PURE__ */Object.freeze(r.map(e=>e.readAt===null&&(i===null||i.has(e.id))?/* @__PURE__ */Object.freeze({...e,readAt:o}):e))});let a=e===null?await t.markAllRead():await t.markRead(e);if(l)return a.ok?ok(void 0):err(a.error);if(!a.ok){let e=new Map(r.map(e=>[e.id,e]));return f({items:/* @__PURE__ */Object.freeze(n.items.map(t=>t.readAt===o?e.get(t.id)??t:t))}),err(a.error)}return p(a.value),ok(void 0)},m=()=>a!==null||l?a??Promise.resolve():(f({status:"loading",error:null}),a=v(false),a);return{subscribe(e){return c.add(e),()=>c.delete(e)},getSnapshot:()=>n,load:m,refresh(){return l?Promise.resolve():a===null?m():(s!==null||(n.status==="error"||n.status==="idle"?f({status:"loading",error:null}):f({refreshing:true}),s=v(n.status==="ready").finally(()=>{s=null,f({refreshing:false})})),s)},loadMore(){if(l||u!==null||i===null||n.status!=="ready")return u??Promise.resolve();let e=d,r=i;return f({loadingMore:true}),u=t.listPage(h(r)).then(t=>{if(l||e!==d)return;if(!t.ok){f({error:t.error});return}i=t.value.nextCursor,o+=1;let r=new Set(n.items.map(e=>e.id));f({items:/* @__PURE__ */Object.freeze([...n.items,...t.value.items.filter(e=>!r.has(e.id))]),hasMore:i!==null,error:null}),p(t.value.unreadCount)}).finally(()=>{u=null,f({loadingMore:false})}),u},markRead:e=>y([e]),markAllRead:()=>y(null),async open(e){let{itemId:r,eventId:i}=e,o=r===void 0?null:n.items.find(e=>e.id===r)??null;if(o===null&&i!==void 0&&(o=n.items.find(e=>e.eventId===i)??null),o===null&&r!==void 0){let e=await t.getItem(r);if(!e.ok&&i===void 0)return err(e.error);e.ok&&(o=e.value)}if(o===null&&i!==void 0){let e=await t.listPage({eventId:i,limit:1});if(!e.ok)return err(e.error);o=e.value.items[0]??null}return o===null?err(ln()):(o.readAt===null&&y([o.id]),ok(Xr(o)))},dispose(){l=true,c.clear()}}}var un=/* @__PURE__ */Symbol.for("@everfur/sdk#InboxUnread@v1");function dn(){let e=globalThis,t=e[un];if(t instanceof WeakMap)return t;let r=/* @__PURE__ */new WeakMap;return e[un]=r,r}function cn(e){let t=null,r=null,n=/* @__PURE__ */new Set,i=e=>{if(e!==t){t=e;for(let e of[...n])try{e()}catch{}}};return{get:()=>t,subscribe(e){return n.add(e),()=>n.delete(e)},refresh(){if(r!==null)return r;if(e.isDisposed)return Promise.resolve();let{services:t}=e.registry;return r=createRequestFunnel({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}}).send("inbox.unreadCount",{method:"GET",path:"/widget/v1/inbox/unread-count"}).then(e=>{if(e.ok){let t=e.value?.unread_count;typeof t=="number"&&Number.isInteger(t)&&t>=0&&i(t)}else e.error.httpStatus===404&&i(null)}).catch(()=>{}).finally(()=>{r=null}),r},report(e){Number.isInteger(e)&&e>=0&&i(e)}}}function fn(e,t){let r=dn(),n=r.get(e);if(n!==void 0&&n.key===t)return n.store;let i=cn(e);return r.set(e,{key:t,store:i}),i}function pn(userRef,e){return`${userRef??""}\0${e}`}function hn(e,conversationId,t){if(e==="announced")return false;let r=t.lastRefresh;return r===null||r.conversationId!==conversationId?false:t.now-r.at<15e3}function bn(e,t){let conversationId=t.activeConversationId===null||t.activeConversationId.length===0?null:t.activeConversationId;return conversationId===null&&t.refreshesBlankThread!==true?{action:"skip",reason:"no_thread"}:t.isTurnInFlight?{action:"defer",reason:"turn_in_flight"}:t.isOffline?{action:"defer",reason:"offline"}:hn(e,conversationId,t)?{action:"skip",reason:"coalesced"}:{action:"refresh",conversationId:conversationId}}var vn=/* @__PURE__ */Object.freeze({openUnreadHead:true,reportLoadFailures:true}),yn=/* @__PURE__ */Object.freeze({reportLoadFailures:true});/* @__PURE__ */Object.freeze({...vn,markRead:true});/* @__PURE__ */Object.freeze({...yn,markRead:true});var mn=3e5;function gn(e){if(e===null||typeof e!="object"||e.ok!==false)return false;let t=e.error;if(t===null||typeof t!="object")return false;if(t.category==="rateLimit"||t.category==="server")return true;let r=t.httpStatus;return typeof r=="number"&&(r===429||r>=500)}function _n(t,r,n){let i=e.useRef(r);i.current=r;let o=e.useRef(null),l=e.useRef(null),a=e.useRef(false),s=e.useRef(0),u=e.useRef(0),d=e.useRef(3e4),c=()=>t?.isOffline===void 0?false:C(()=>t.isOffline?.()===!0)===true,f=c(),p=e.useRef(()=>{});p.current=e=>{let{conversationId:conversationId,isTurnInFlight:t,refresh:r,refreshesBlankThread:n}=i.current,f=bn(e,{activeConversationId:conversationId,isTurnInFlight:t,refreshesBlankThread:n===true,isOffline:c(),lastRefresh:o.current,now:Date.now()});if(f.action==="skip")return;if(f.action==="defer"){l.current!=="announced"&&(l.current=e);return}if(a.current){if(e==="poll")return;l.current!=="announced"&&(l.current=e);return}if(l.current=null,o.current={conversationId:f.conversationId,at:Date.now()},r===void 0)return;a.current=true;let h=e=>{a.current=false,gn(e)?(s.current=Math.min(s.current===0?d.current*2:s.current*2,mn),u.current=Date.now()+s.current):(s.current=0,u.current=0);let t=l.current;t!==null&&p.current(t)};Promise.resolve(r()).then(h,()=>h({ok:false,error:{category:"server"}}))},e.useEffect(()=>{if(r.isTurnInFlight||f)return;let e=l.current;e!==null&&p.current(e)},[r.isTurnInFlight,f]),e.useEffect(()=>{if(t===void 0)return;let e=[],r=(t,r)=>{if(t===void 0)return;let n=C(()=>t(()=>{p.current(r)}));typeof n=="function"&&e.push(n)};return r(t.onForeground?.bind(t),"foreground"),r(t.onOnline?.bind(t),"foreground"),r(t.onAnnounced?.bind(t),"announced"),()=>{for(let t of e)C(t)}},[t]);let h=null,b=n?.isVisibleFallback;e.useEffect(()=>{},[t,h,b])}function wn(t,r){let[n,i]=e.useState(t),o=e.useRef(false);return e.useEffect(()=>{let e=n;return o.current&&(e=t(),i(e)),o.current=true,()=>e.dispose()},r),n}var Cn="everfur-inbox",kn=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>xn,load:()=>Promise.resolve(),refresh:()=>Promise.resolve(),loadMore:()=>Promise.resolve(),markRead:()=>Promise.resolve(err(Sn())),markAllRead:()=>Promise.resolve(err(Sn())),open:()=>Promise.resolve(err(Sn())),dispose:()=>{}}),xn=/* @__PURE__ */Object.freeze({status:"idle",items:/* @__PURE__ */Object.freeze([]),unreadCount:null,hasMore:false,refreshing:false,loadingMore:false,error:null});function Sn(){return makeEverfurError("sessionRequired",{retryable:false,wireMessage:"the inbox needs a signed-in user on the provider"})}function useEverfurInboxClient(){let{runtime:t}=h();return e.useMemo(()=>createInboxClient(t),[t])}function Fn(t,r){let{runtime:n,userRef:userRef,scopeEpoch:i}=h(),o=useEverfurInboxClient(),petRef=t.petRef??null,{pageSize:l}=t,a=e.useMemo(()=>fn(n,pn(userRef,i)),[n,userRef,i]),s=wn(()=>userRef===null?kn:sn({client:o,petRef:petRef,...l===void 0?{}:{pageSize:l},onUnreadCount:e=>a.report(e)}),[o,userRef,i,petRef,l,a]),u=e.useSyncExternalStore(s.subscribe,s.getSnapshot,s.getSnapshot),d=e.useSyncExternalStore(a.subscribe,a.get,a.get);e.useEffect(()=>{s.load()},[s]);let c=e.useCallback(()=>s.refresh(),[s]),f=e.useCallback(e=>s.open(e),[s]);return _n(r,{conversationId:userRef===null?null:Cn,isTurnInFlight:false,refresh:c}),e.useMemo(()=>({...u,unreadCount:userRef===null?null:d??u.unreadCount,refresh:c,loadMore:()=>s.loadMore(),markRead:e=>s.markRead(e),markAllRead:()=>s.markAllRead(),open:f}),[u,d,userRef,c,f,s])}var En=()=>{};function In(){try{return t.AppState.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let r;try{let n=t.AppState.currentState==="background";r=t.AppState.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return En}return()=>r.remove()},isVisible:In}}function useEverfurInbox(t={}){let{lifecycle:r}=t,n=e.useMemo(()=>r===void 0?createAppStateLifecycle():r??void 0,[r]);return Fn(t,n)}var Tn=240;function EverfurInbox(n){let{onOpen:i,initialItemId:o,initialEventId:l,petRef:petRef,pageSize:a,lifecycle:s,copy:u,style:d,renderIcon:c,metaSource:f}=n,p=n.variant??"card",b=n.scroll??true,y=n.unreadStyle??(p==="sheet"?"none":"fill"),m=n.styles,g=useEverfurTheme(),_=He(g),w=e.useMemo(()=>An(g,_),[g,_]),C=e.useMemo(()=>v(u),[u]),{userRef:userRef}=h(),x=useEverfurInbox({...petRef===void 0?{}:{petRef:petRef},...a===void 0?{}:{pageSize:a},...s===void 0?{}:{lifecycle:s}}),S=E(x,{onOpen:i,initialItemId:o,initialEventId:l}),F=T(),I=e.useMemo(()=>k(x.items,F,C),[x.items,F,C]),R=e.useMemo(()=>new Map(x.items.map(e=>[e.id,e])),[x.items]),{hasMore:j,loadingMore:A,error:O,loadMore:z}=x,D=e.useCallback(e=>{if(!j||A||O!==null)return;let{layoutMeasurement:t,contentOffset:r,contentSize:n}=e.nativeEvent;t.height+r.y>=n.height-Tn&&z()},[j,A,O,z]),M;S.detail!==null?M=/* @__PURE__ */r.jsx(DetailView,{detail:S.detail,copy:C,styles:w,now:F,onBack:S.back,onRetry:S.retryDetail}):userRef===null||x.status==="off"||x.status==="ready"&&I.length===0?M=/* @__PURE__ */r.jsxs(t.View,{style:w.state,testID:"everfur-inbox-empty",children:[
|
|
20
20
|
/* @__PURE__ */r.jsx(Text,{style:w.stateTitle,accessibilityRole:"header",children:C.emptyTitle}),
|
|
21
21
|
/* @__PURE__ */r.jsx(Text,{style:w.stateBody,children:C.emptyBody})]}):x.status==="error"&&I.length===0?M=/* @__PURE__ */r.jsxs(t.View,{style:w.state,accessibilityRole:"alert",testID:"everfur-inbox-error",children:[
|
|
22
22
|
/* @__PURE__ */r.jsx(Text,{style:w.stateTitle,children:C.errorTitle}),
|
|
@@ -25,7 +25,7 @@ return Object.freeze([...e,...t.filter(e=>!r.has(e.id))])}function sn(e){let{cli
|
|
|
25
25
|
/* @__PURE__ */r.jsx(t.View,{style:w.skeletonTitle}),
|
|
26
26
|
/* @__PURE__ */r.jsx(t.View,{style:w.skeletonBody})]},e))}):M=/* @__PURE__ */r.jsxs(r.Fragment,{children:[
|
|
27
27
|
/* @__PURE__ */r.jsx(t.View,{style:w.list,accessibilityLabel:C.title,testID:"everfur-inbox-list",children:I.map(e=>{let t=R.get(e.id),n=t===void 0?null:typeof f=="function"?f(t):f??null;/* @__PURE__ */
|
|
28
|
-
return r.jsx(RowButton,{row:e,icon:t!==void 0&&c!==void 0?c(t):/* @__PURE__ */r.jsx(DefaultIcon,{theme:g,kit:_}),meta:[
|
|
28
|
+
return r.jsx(RowButton,{row:e,icon:t!==void 0&&c!==void 0?c(t):/* @__PURE__ */r.jsx(DefaultIcon,{theme:g,kit:_}),meta:[jn(e.time,C),n].filter(e=>typeof e=="string"&&e.trim().length>0).join(" · "),unreadStyle:y,styles:w,host:m,onPress:S.openRow},e.id)})}),x.error!==null?
|
|
29
29
|
/* @__PURE__ */r.jsxs(t.View,{style:w.state,accessibilityRole:"alert",testID:"everfur-inbox-inline-error",children:[
|
|
30
30
|
/* @__PURE__ */r.jsx(Text,{style:w.stateTitle,children:C.errorTitle}),
|
|
31
31
|
/* @__PURE__ */r.jsx(Text,{style:w.stateBody,children:C.errorBody}),
|
|
@@ -35,22 +35,22 @@ return r.jsxs(t.Pressable,{onPress:()=>u(n.id),accessibilityRole:"button",access
|
|
|
35
35
|
/* @__PURE__ */r.jsxs(t.View,{style:[a.icon,s?.icon],importantForAccessibility:"no-hide-descendants",accessibilityElementsHidden:true,children:[i,d?/* @__PURE__ */r.jsx(t.View,{style:a.dot,testID:`everfur-inbox-unread-${n.id}`}):null]}),
|
|
36
36
|
/* @__PURE__ */r.jsxs(t.View,{style:a.rowText,importantForAccessibility:"no-hide-descendants",accessibilityElementsHidden:true,children:[
|
|
37
37
|
/* @__PURE__ */r.jsx(Text,{variant:"rowTitle",numberOfLines:2,style:[a.rowTitle,s?.title],children:n.title}),n.body.length>0?/* @__PURE__ */r.jsx(Text,{variant:"bodySmall",numberOfLines:3,style:[a.rowBody,s?.body],children:n.body}):null,o.length>0?/* @__PURE__ */r.jsx(Text,{variant:"label",numberOfLines:1,style:[a.meta,s?.meta],children:o}):null]})]})}function ActionButton(e){let{label:n,onPress:i,styles:o,primary:l=false,busy:a=false}=e;/* @__PURE__ */
|
|
38
|
-
return r.jsx(t.Pressable,{onPress:a?void 0:i,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{busy:a,disabled:a},style:l?o.primary:o.secondary,children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:l?o.primaryLabel:o.secondaryLabel,children:n})})}function
|
|
38
|
+
return r.jsx(t.Pressable,{onPress:a?void 0:i,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{busy:a,disabled:a},style:l?o.primary:o.secondary,children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:l?o.primaryLabel:o.secondaryLabel,children:n})})}function Rn(e){if(e===null)return;let r=t.AccessibilityInfo.sendAccessibilityEvent;typeof r=="function"&&r.call(t.AccessibilityInfo,e,"focus")}function DetailView(n){let{detail:i,copy:o,styles:l,now:a,onBack:s,onRetry:u}=n,d=e.useRef(null);e.useEffect(()=>Rn(d.current),[]);let c=/* @__PURE__ */r.jsx(t.Pressable,{ref:d,onPress:s,accessibilityRole:"button",accessibilityLabel:o.back,style:l.back,testID:"everfur-inbox-back",children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:l.backLabel,children:o.back})}),f;return i.kind==="loading"?f=/* @__PURE__ */r.jsxs(t.View,{accessible:true,accessibilityRole:"progressbar",accessibilityLabel:o.loading,accessibilityState:{busy:true},style:l.state,testID:"everfur-inbox-detail-loading",children:[
|
|
39
39
|
/* @__PURE__ */r.jsx(t.View,{style:l.skeletonTitle}),
|
|
40
40
|
/* @__PURE__ */r.jsx(t.View,{style:l.skeletonBody})]}):i.kind==="notFound"?f=/* @__PURE__ */r.jsxs(t.View,{style:l.state,testID:"everfur-inbox-not-found",children:[
|
|
41
41
|
/* @__PURE__ */r.jsx(Text,{style:l.stateTitle,children:o.notFoundTitle}),
|
|
42
42
|
/* @__PURE__ */r.jsx(Text,{style:l.stateBody,children:o.notFoundBody})]}):i.kind==="error"?f=/* @__PURE__ */r.jsxs(t.View,{style:l.state,accessibilityRole:"alert",testID:"everfur-inbox-detail-error",children:[
|
|
43
43
|
/* @__PURE__ */r.jsx(Text,{style:l.stateTitle,children:o.detailErrorTitle}),
|
|
44
44
|
/* @__PURE__ */r.jsx(Text,{style:l.stateBody,children:o.detailErrorBody}),
|
|
45
|
-
/* @__PURE__ */r.jsx(ActionButton,{label:o.retry,onPress:u,styles:l,primary:true})]}):f=/* @__PURE__ */r.jsx(DetailItem,{item:i.item,copy:o,styles:l,now:a}),/* @__PURE__ */r.jsxs(r.Fragment,{children:[c,f]})}function
|
|
45
|
+
/* @__PURE__ */r.jsx(ActionButton,{label:o.retry,onPress:u,styles:l,primary:true})]}):f=/* @__PURE__ */r.jsx(DetailItem,{item:i.item,copy:o,styles:l,now:a}),/* @__PURE__ */r.jsxs(r.Fragment,{children:[c,f]})}function jn(e,t){return e!==null&&m(e)?`${e} ${t.timeAgoSuffix}`:e}function DetailItem({item:e,copy:n,styles:i,now:o}){let l=y(e.createdAt,o,n.now),a=l===null?null:m(l)?`${l} ${n.timeAgoSuffix}`:l;/* @__PURE__ */
|
|
46
46
|
return r.jsxs(t.View,{style:i.detail,testID:"everfur-inbox-detail",children:[
|
|
47
|
-
/* @__PURE__ */r.jsx(Text,{tier:"heading",accessibilityRole:"header",style:i.heading,children:e.title.trim().length>0?e.title:n.rowFallbackTitle}),l===null?null:/* @__PURE__ */r.jsx(Text,{style:i.time,accessibilityLabel:a??void 0,children:l}),e.body.length>0?/* @__PURE__ */r.jsx(Text,{style:i.detailBody,children:e.body}):null]})}function
|
|
47
|
+
/* @__PURE__ */r.jsx(Text,{tier:"heading",accessibilityRole:"header",style:i.heading,children:e.title.trim().length>0?e.title:n.rowFallbackTitle}),l===null?null:/* @__PURE__ */r.jsx(Text,{style:i.time,accessibilityLabel:a??void 0,children:l}),e.body.length>0?/* @__PURE__ */r.jsx(Text,{style:i.detailBody,children:e.body}):null]})}function An(e,r){let{color:o,radius:l,space:a,type:s,slots:u}=e,d=r.view(".notif"),c=r.view(".notif__i"),f=(t,r,n,i=s.lineHeight.normal)=>({...face(e,n),fontSize:t,lineHeight:Math.round(t*i),color:r}),p={minHeight:48,paddingHorizontal:a.lg,borderRadius:l.pill,alignItems:"center",justifyContent:"center"},h={height:s.size.body,borderRadius:l.xs,backgroundColor:o.skeleton};return t.StyleSheet.create({box:{width:"100%",borderRadius:l.lg,backgroundColor:o.surface,...n(u.card)},pad:{gap:a.md,padding:a.lg},boxSheet:{width:"100%"},padSheet:{gap:a.md},scroller:{flexGrow:0,flexShrink:1},heading:{...f(s.size.heading,o.text.primary,"bold",s.lineHeight.snug),...headingFace(e,"bold"),...i(u.card)},list:{},row:{...d,alignItems:"flex-start",minHeight:48},rowUnread:{backgroundColor:o.brandSofter,paddingHorizontal:a.md,borderRadius:l.md},icon:{...c,...r.col(".notif",0)},dot:{...Ye(r,o.surface),top:-4,right:-4},rowText:r.col(".notif",1),rowTitle:{color:r.colors.ink2},rowBody:{color:r.text(".notif span").color,marginTop:r.view(".notif span").marginTop},meta:{color:r.text(".notif small").color,marginTop:r.view(".notif small").marginTop},time:f(s.size.caption,o.text.timestamp,"regular"),state:{alignItems:"center",gap:a.sm,paddingVertical:a.xl,paddingHorizontal:a.lg},stateTitle:{...f(s.size.subtitle,o.text.primary,"bold",s.lineHeight.snug),textAlign:"center"},stateBody:{...f(s.size.body,o.text.secondary,"regular"),textAlign:"center"},primary:{...p,marginTop:a.xs,backgroundColor:o.brand,...n(u.primaryButton)},primaryLabel:{...f(s.size.body,o.text.onBrand,"bold"),...i(u.primaryButton)},secondary:{...p,alignSelf:"center",borderWidth:1,borderColor:o.brandBorder},secondaryLabel:f(s.size.body,o.brandInk,"bold"),back:{...p,alignSelf:"flex-start",paddingHorizontal:a.sm},backLabel:{...f(s.size.body,o.brandInk,"bold"),...i(u.link)},detail:{gap:a.sm},detailBody:f(s.size.body,o.text.primary,"regular",s.lineHeight.relaxed),skeletonRow:{gap:a.xs,paddingVertical:a.md,paddingHorizontal:a.lg},skeletonTitle:{...h,width:"60%"},skeletonBody:{...h,width:"90%",height:s.size.bodyTight}})}var On="everfur-inbox-unread";function zn(t){let{runtime:r,userRef:userRef,scopeEpoch:n}=h(),i=e.useMemo(()=>userRef===null?null:fn(r,pn(userRef,n)),[r,userRef,n]),o=e.useCallback(e=>i===null?()=>{}:i.subscribe(e),[i]),l=e.useCallback(()=>i===null?null:i.get(),[i]),a=e.useSyncExternalStore(o,l,l),s=e.useCallback(()=>i===null?Promise.resolve():i.refresh(),[i]);return e.useEffect(()=>{s()},[s]),_n(i===null?void 0:t,{conversationId:i===null?null:On,isTurnInFlight:false,refresh:s}),e.useMemo(()=>({unreadCount:a,refresh:s}),[a,s])}function useEverfurInboxUnread(t={}){let{lifecycle:r}=t,n=e.useMemo(()=>r===void 0?createAppStateLifecycle():r??void 0,[r]);return zn(n)}var Dn=/* @__PURE__ */Object.freeze({label:b.title,unreadLabel:"{label}, {count} new"});function Mn(e,t,r){return e.replace(/\{label\}/g,t).replace(/\{count\}/g,String(r))}function EverfurInboxBell(n){let{onPress:i,copy:o,style:l,iconStyle:a,dotStyle:s}=n,u=useEverfurTheme(),d=He(u),c=e.useMemo(()=>({...Dn,...Bn(o)}),[o]),f=useEverfurInboxUnread(n.lifecycle===void 0?{}:{lifecycle:n.lifecycle}),p=n.count===void 0?f.unreadCount:n.count,h=typeof p=="number"&&p>0?p:0,b=u.slots.header,v=n.color??b?.textColor??d.colors.ink??u.color.text.primary,y=n.ground??b?.backgroundColor??d.colors.paper??u.color.surface,m=h>0?Mn(c.unreadLabel,c.label,h):c.label;/* @__PURE__ */
|
|
48
48
|
return r.jsxs(t.Pressable,{onPress:i,accessibilityRole:"button",accessibilityLabel:m,hitSlop:4,style:[d.view(".ph-icon"),l],testID:n.testID??"everfur-inbox-bell",children:[
|
|
49
|
-
/* @__PURE__ */r.jsx(InboxIcon,{name:"bell",style:[d.icon(".ph-icon svg"),{tintColor:v},a]}),h>0?/* @__PURE__ */r.jsx(t.View,{style:[Ye(d,y),s],testID:"everfur-inbox-bell-dot"}):null]})}function
|
|
50
|
-
/* @__PURE__ */r.jsx(t.Pressable,{style:[
|
|
49
|
+
/* @__PURE__ */r.jsx(InboxIcon,{name:"bell",style:[d.icon(".ph-icon svg"),{tintColor:v},a]}),h>0?/* @__PURE__ */r.jsx(t.View,{style:[Ye(d,y),s],testID:"everfur-inbox-bell-dot"}):null]})}function Bn(e){if(e===void 0)return{};let t={};for(let[r,n]of Object.entries(e))typeof n=="string"&&n.trim().length>0&&(t[r]=n);return t}var Nn=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});var Pn=/* @__PURE__ */Object.freeze({close:"Close"});function EverfurInboxSheet(n){let{visible:i,onClose:o,sheetCopy:l,sheetStyle:a,onOpen:s,...u}=n,d=useEverfurTheme(),c=He(d),f=e.useMemo(()=>v(u.copy),[u.copy]),p=l?.close!==void 0&&l.close.trim().length>0?l.close:Pn.close,h=e.useCallback(e=>{if(s===void 0)return false;let t=s(e);return t!==false&&o(),t},[s,o]);return i?/* @__PURE__ */r.jsx(t.Modal,{visible:true,transparent:true,statusBarTranslucent:true,animationType:d.motion.reducedMotion?"none":"fade",onRequestClose:o,children:/* @__PURE__ */r.jsxs(t.View,{style:{flex:1},testID:"everfur-inbox-sheet",children:[
|
|
50
|
+
/* @__PURE__ */r.jsx(t.Pressable,{style:[Nn,c.view(".ph-scrim",".ph-scrim.is-on")],onPress:o,accessibilityRole:"button",accessibilityLabel:p,testID:"everfur-inbox-sheet-scrim"}),
|
|
51
51
|
/* @__PURE__ */r.jsxs(t.View,{style:[c.view(".ph-sheet"),a],accessibilityViewIsModal:true,children:[
|
|
52
52
|
/* @__PURE__ */r.jsx(t.View,{style:c.view(".sheet__grab"),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}),
|
|
53
53
|
/* @__PURE__ */r.jsxs(t.View,{style:c.view(".sheet__top"),children:[
|
|
54
54
|
/* @__PURE__ */r.jsx(Text,{variant:"label",tier:"compact",accessibilityRole:"header",numberOfLines:1,style:[c.text(".sheet__kicker"),{flexShrink:1}],children:f.title}),
|
|
55
55
|
/* @__PURE__ */r.jsx(t.Pressable,{onPress:o,accessibilityRole:"button",accessibilityLabel:p,style:c.view(".sheet__x"),testID:"everfur-inbox-sheet-close",children:/* @__PURE__ */r.jsx(InboxIcon,{name:"x",style:c.icon(".sheet__x svg")})})]}),
|
|
56
|
-
/* @__PURE__ */r.jsx(EverfurInbox,{...u,...s===void 0?{}:{onOpen:h},variant:"sheet",style:[{flexShrink:1},u.style]})]})]})}):null}exports.EverfurInbox=EverfurInbox;exports.EverfurInboxBell=EverfurInboxBell;exports.EverfurInboxSheet=EverfurInboxSheet;exports.INBOX_BELL_COPY=
|
|
56
|
+
/* @__PURE__ */r.jsx(EverfurInbox,{...u,...s===void 0?{}:{onOpen:h},variant:"sheet",style:[{flexShrink:1},u.style]})]})]})}):null}exports.EverfurInbox=EverfurInbox;exports.EverfurInboxBell=EverfurInboxBell;exports.EverfurInboxSheet=EverfurInboxSheet;exports.INBOX_BELL_COPY=Dn;exports.INBOX_SHEET_COPY=Pn;exports.createInboxClient=createInboxClient;exports.useEverfurInbox=useEverfurInbox;exports.useEverfurInboxClient=useEverfurInboxClient;exports.useEverfurInboxUnread=useEverfurInboxUnread;
|