@everfur/sdk 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/CHANGELOG.md +69 -4
  2. package/README.md +6 -1
  3. package/dist/{Chat-DwAC2vhB.d.ts → Chat-BZZ-Py5l.d.ts} +3 -3
  4. package/dist/{Chat-DPUD6dnc.d.cts → Chat-Dq4fffIO.d.cts} +3 -3
  5. package/dist/{DepthViews-DNEM96Se.d.ts → DepthViews-BG3E25MD.d.ts} +1 -1
  6. package/dist/{DepthViews-DP0R-DhB.d.cts → DepthViews-B_hIypI6.d.cts} +1 -1
  7. package/dist/{DepthViews-DbFhR4Du.d.cts → DepthViews-CL75jyRA.d.cts} +1 -1
  8. package/dist/{DepthViews-D_3hl4xk.d.ts → DepthViews-CkYri51q.d.ts} +1 -1
  9. package/dist/animations/index.cjs +1 -1
  10. package/dist/animations/index.d.cts +3 -3
  11. package/dist/animations/index.d.ts +3 -3
  12. package/dist/animations/index.js +1 -1
  13. package/dist/{attachments-CQgFrEQ7.d.cts → attachments-BorG422I.d.cts} +2 -2
  14. package/dist/{attachments-5NeobOCd.d.ts → attachments-BrUWQYNK.d.ts} +5 -4
  15. package/dist/{attachments-D8T5re7e.d.cts → attachments-D_SECjr1.d.cts} +5 -4
  16. package/dist/{attachments-Bw3iMQgu.d.ts → attachments-DpldrvIW.d.ts} +2 -2
  17. package/dist/bookingCopy-CqtDYvCR.d.ts +732 -0
  18. package/dist/bookingCopy-SREvkG19.d.cts +732 -0
  19. package/dist/{entitlementRepository-DSbzuyAW.d.ts → branding-CsRdeNwK.d.cts} +1 -133
  20. package/dist/{entitlementRepository-DKdXFgTo.d.cts → branding-CsRdeNwK.d.ts} +1 -133
  21. package/dist/callCopy-DoQKG3-L.d.cts +40 -0
  22. package/dist/callCopy-DoQKG3-L.d.ts +40 -0
  23. package/dist/casesRepository-DwtZVsbj.d.cts +51 -0
  24. package/dist/casesRepository-v6QczS9N.d.ts +51 -0
  25. package/dist/chat/index.cjs +1 -1
  26. package/dist/chat/index.d.cts +9 -8
  27. package/dist/chat/index.d.ts +9 -8
  28. package/dist/chat/index.js +1 -1
  29. package/dist/client/index.cjs +5 -5
  30. package/dist/client/index.d.cts +10 -8
  31. package/dist/client/index.d.ts +10 -8
  32. package/dist/client/index.js +5 -5
  33. package/dist/{config-CzTZGlfF.d.cts → config--Wu1Umhd.d.cts} +2 -2
  34. package/dist/{config-DW60uRb9.d.ts → config-C7eb_IMD.d.ts} +2 -2
  35. package/dist/consent/index.cjs +1 -1
  36. package/dist/consent/index.d.cts +5 -5
  37. package/dist/consent/index.d.ts +5 -5
  38. package/dist/consent/index.js +1 -1
  39. package/dist/{context-XvTzq1tE.d.cts → context-CL3lyuy1.d.cts} +6 -6
  40. package/dist/{context-DXhqHlPU.d.ts → context-CahAEha8.d.ts} +6 -6
  41. package/dist/{copy-Mjoo91aS.d.ts → copy-DdVFDL01.d.ts} +2 -2
  42. package/dist/{copy-bKDNigLb.d.cts → copy-UeUJVk8X.d.cts} +2 -2
  43. package/dist/core/index.cjs +7 -7
  44. package/dist/core/index.d.cts +118 -29
  45. package/dist/core/index.d.ts +118 -29
  46. package/dist/core/index.js +7 -7
  47. package/dist/{depth-CErXCU8J.d.cts → depth-D5HwcvKC.d.cts} +34 -3
  48. package/dist/{depth-DjDcJ6kH.d.ts → depth-DvPwPuT_.d.ts} +34 -3
  49. package/dist/entitlementRepository-B7egEdW6.d.ts +43 -0
  50. package/dist/entitlementRepository-BpJ7tiwl.d.cts +43 -0
  51. package/dist/{identity-DI4eVx9S.d.cts → identity-C2-08BZW.d.cts} +2 -2
  52. package/dist/{identity-BMx2SUOM.d.ts → identity-CEi9GRFZ.d.ts} +2 -2
  53. package/dist/index.cjs +6 -6
  54. package/dist/index.d.cts +17 -16
  55. package/dist/index.d.ts +17 -16
  56. package/dist/index.js +6 -6
  57. package/dist/notifications/index.cjs +2 -2
  58. package/dist/notifications/index.d.cts +2 -2
  59. package/dist/notifications/index.d.ts +2 -2
  60. package/dist/notifications/index.js +2 -2
  61. package/dist/optionalModule-DbJmsq5f.d.cts +21 -0
  62. package/dist/optionalModule-DbJmsq5f.d.ts +21 -0
  63. package/dist/{pets-CtQdRpWo.d.ts → pets-DJv2sj2H.d.ts} +1 -1
  64. package/dist/{pets-aB8q0JyX.d.cts → pets-JVCXgRgR.d.cts} +1 -1
  65. package/dist/{casesRepository-DHwtGRYY.d.cts → petsRepository-B_gKbAzJ.d.cts} +2 -48
  66. package/dist/{casesRepository-ClLv6qMl.d.ts → petsRepository-Bk6GDwLs.d.ts} +2 -48
  67. package/dist/photo/index.cjs +1 -1
  68. package/dist/photo/index.js +1 -1
  69. package/dist/{ports-DEBzEhbp.d.cts → ports-BY2ph0_y.d.cts} +5 -15
  70. package/dist/{ports-DMolTRzU.d.ts → ports-D7YW8qz9.d.ts} +5 -15
  71. package/dist/records/depth/index.cjs +2 -2
  72. package/dist/records/depth/index.d.cts +7 -7
  73. package/dist/records/depth/index.d.ts +7 -7
  74. package/dist/records/depth/index.js +2 -2
  75. package/dist/records/index.cjs +3 -3
  76. package/dist/records/index.d.cts +9 -9
  77. package/dist/records/index.d.ts +9 -9
  78. package/dist/records/index.js +3 -3
  79. package/dist/{requestFunnel-L-BQfi0z.d.cts → requestFunnel-BjDpqqvm.d.cts} +25 -2
  80. package/dist/{requestFunnel-CjW7uDuA.d.ts → requestFunnel-DFMGcluw.d.ts} +25 -2
  81. package/dist/{runtime-B8s-_hv8.d.cts → runtimeTypes-gZEJu-da.d.cts} +9 -99
  82. package/dist/{runtime-BR9ysG0J.d.ts → runtimeTypes-w5KqBMcs.d.ts} +9 -99
  83. package/dist/server/events/index.cjs +1 -1
  84. package/dist/server/events/index.d.cts +2 -2
  85. package/dist/server/events/index.d.ts +2 -2
  86. package/dist/server/events/index.js +1 -1
  87. package/dist/server/index.cjs +1 -1
  88. package/dist/server/index.d.cts +3 -3
  89. package/dist/server/index.d.ts +3 -3
  90. package/dist/server/index.js +1 -1
  91. package/dist/televet/booking/index.cjs +1 -0
  92. package/dist/televet/booking/index.d.cts +294 -0
  93. package/dist/televet/booking/index.d.ts +294 -0
  94. package/dist/televet/booking/index.js +1 -0
  95. package/dist/televet/call/index.cjs +1 -0
  96. package/dist/televet/call/index.d.cts +141 -0
  97. package/dist/televet/call/index.d.ts +141 -0
  98. package/dist/televet/call/index.js +1 -0
  99. package/dist/televet/index.cjs +1 -1
  100. package/dist/televet/index.d.cts +87 -5
  101. package/dist/televet/index.d.ts +87 -5
  102. package/dist/televet/index.js +1 -1
  103. package/dist/testing/index.cjs +3 -3
  104. package/dist/testing/index.d.cts +2 -2
  105. package/dist/testing/index.d.ts +2 -2
  106. package/dist/testing/index.js +3 -3
  107. package/dist/testing/rn/index.cjs +1 -1
  108. package/dist/testing/rn/index.d.cts +9 -8
  109. package/dist/testing/rn/index.d.ts +9 -8
  110. package/dist/testing/rn/index.js +1 -1
  111. package/dist/testing/web/index.cjs +1 -1
  112. package/dist/testing/web/index.d.cts +9 -8
  113. package/dist/testing/web/index.d.ts +9 -8
  114. package/dist/testing/web/index.js +1 -1
  115. package/dist/{timelineRows-DZed6dAM.d.ts → timelineRows-C15jxFFH.d.ts} +1 -1
  116. package/dist/{timelineRows-CaohZzXS.d.cts → timelineRows-odO8g9r2.d.cts} +1 -1
  117. package/dist/typeStyle-CKqVYD6L.d.cts +111 -0
  118. package/dist/typeStyle-DmoyacDG.d.ts +111 -0
  119. package/dist/{useRecordsDepth-BHBzJ76R.d.cts → useRecordsDepth-C6rjEaLn.d.cts} +1 -1
  120. package/dist/{useRecordsDepth-BU-OhzH6.d.ts → useRecordsDepth-crhBllQK.d.ts} +1 -1
  121. package/dist/video/index.cjs +1 -1
  122. package/dist/video/index.js +1 -1
  123. package/dist/{view-DtSPYpKa.d.ts → view-Bxwxp4xD.d.ts} +2 -2
  124. package/dist/{view-C3qPIXGX.d.cts → view-DyitEO0m.d.cts} +2 -2
  125. package/dist/web/consent/index.cjs +1 -1
  126. package/dist/web/consent/index.d.cts +5 -5
  127. package/dist/web/consent/index.d.ts +5 -5
  128. package/dist/web/consent/index.js +1 -1
  129. package/dist/web/index.cjs +7 -7
  130. package/dist/web/index.d.cts +18 -17
  131. package/dist/web/index.d.ts +18 -17
  132. package/dist/web/index.js +7 -7
  133. package/dist/web/notifications/index.cjs +2 -2
  134. package/dist/web/notifications/index.d.cts +3 -3
  135. package/dist/web/notifications/index.d.ts +3 -3
  136. package/dist/web/notifications/index.js +2 -2
  137. package/dist/web/records/depth/index.cjs +2 -2
  138. package/dist/web/records/depth/index.d.cts +7 -7
  139. package/dist/web/records/depth/index.d.ts +7 -7
  140. package/dist/web/records/depth/index.js +2 -2
  141. package/dist/web/records/index.cjs +3 -3
  142. package/dist/web/records/index.d.cts +102 -11
  143. package/dist/web/records/index.d.ts +102 -11
  144. package/dist/web/records/index.js +3 -3
  145. package/dist/web/televet/booking/index.cjs +1 -0
  146. package/dist/web/televet/booking/index.d.cts +349 -0
  147. package/dist/web/televet/booking/index.d.ts +349 -0
  148. package/dist/web/televet/booking/index.js +1 -0
  149. package/dist/web/televet/call/index.cjs +1 -0
  150. package/dist/web/televet/call/index.d.cts +142 -0
  151. package/dist/web/televet/call/index.d.ts +142 -0
  152. package/dist/web/televet/call/index.js +1 -0
  153. package/dist/web/televet/index.cjs +1 -1
  154. package/dist/web/televet/index.d.cts +90 -4
  155. package/dist/web/televet/index.d.ts +90 -4
  156. package/dist/web/televet/index.js +1 -1
  157. package/package.json +72 -4
  158. package/televet/booking/package.json +8 -0
  159. package/televet/call/package.json +8 -0
  160. package/web/televet/booking/native-blocked.cjs +12 -0
  161. package/web/televet/booking/package.json +8 -0
  162. package/web/televet/call/native-blocked.cjs +12 -0
  163. package/web/televet/call/package.json +8 -0
  164. package/dist/typeStyle-0TydiZ1w.d.cts +0 -19
  165. package/dist/typeStyle-CWMsoe6b.d.ts +0 -19
@@ -1 +1 @@
1
- import {createContext,forwardRef,createElement,useState,useEffect,useCallback,useSyncExternalStore,useMemo,useRef,useContext,Component}from'react';import {TextInput,AccessibilityInfo,View,Image,ActivityIndicator,StyleSheet,Text}from'react-native';import {jsx,jsxs}from'react/jsx-runtime';import {z}from'zod';var Mt=Object.defineProperty;var n=(e,t)=>Mt(e,"name",{value:t,configurable:true});function ie(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))ie(e[t]);}return e}n(ie,"deepFreeze");var Dt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),Ue={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Be={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Le={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},zt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},jt={regular:"400",medium:"500",bold:"700"},Nt={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},Lt=0,G="System",Y="monospace",Ut=["content","heading","control","compact","badge"];function Bt(e){let t={};for(let r of Ut)t[r]=e;return t}n(Bt,"authoredTierSizes");function Ke(){return {family:G,mono:Y,fontUrl:null,families:{regular:G,medium:G,bold:G,mono:Y,monoMedium:Y,monoBold:Y},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Le,tierSizes:Bt(Le),lineHeight:zt,weight:jt,letterSpacing:Nt,scale:1,maxScale:Lt,scaleCaps:Dt}}n(Ke,"baseType");var qe={},oe=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function ae(e){return `cubic-bezier(${e.join(", ")})`}n(ae,"cssCubicBezier");var Ve={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:ae(oe.standard),emphasized:ae(oe.emphasized),exit:ae(oe.exit)},reducedMotion:false},Kt={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FDFBF8",surfaceSubtle:"#EFE9E3",background:"#FFFFFF",borderRingCream:"#D8D2C8",chatGround:"#FFFFFF",composerFill:"#FDFBF8",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#111111",secondary:"#0E462E",muted:"#6E6660",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#B91C1C",errorRed:"#FF1B00",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(185,28,28,0.12)",badgeBgNeutral:"rgba(110,102,96,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},He=ie({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:Kt,space:Ue,radius:Be,type:Ke(),motion:Ve,slots:qe}),qt={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A938C",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};ie({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:qt,space:Ue,radius:Be,type:Ke(),motion:Ve,slots:qe});var We=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Ge=globalThis,se=Ge[We]??(Ge[We]=createContext(He));se.displayName??="EverfurThemeContext";function D(){return useContext(se)}n(D,"useEverfurTheme");function $t(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n($t,"tierMultiplier");function $({tier:e="content",...t}){let{type:r}=D(),o=$t(r,e);return createElement(Text,o===void 0?t:{maxFontSizeMultiplier:o,...t})}n($,"Text");forwardRef(n(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function Q(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}n(Q,"assertNever");function $e(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}n($e,"errorFrame");var Jt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function Qe(e,t){let r=e.type,o=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:o}:{fontFamily:o,fontWeight:r.weight[Jt[t]]}}n(Qe,"face");var ue=class ue extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey};}static getDerivedStateFromError(){return {failed:true}}static getDerivedStateFromProps(r,o){return Object.is(r.resetKey,o.key)?null:{failed:false,key:r.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};n(ue,"HostRenderBoundary");var le=ue;function er({render:e}){return e()}n(er,"RenderHost");function de({render:e,fallback:t,resetKey:r}){return createElement(le,{fallback:t,resetKey:r,children:createElement(er,{render:e})})}n(de,"HostRender");var ce=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(ce.map(e=>e.wireCode));var tr=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",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",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"}),Ze=Object.freeze(ce.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:tr[e.wireCode]}))),rr=new Map(Ze.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),nr=Object.freeze(["http_envelope",...[...new Set(Ze.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function X(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let o of [t??"http_envelope",...nr]){let a=rr.get(o+r);if(a)return a}}n(X,"contractErrorFor");function or(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}n(or,"contractDocUrl");function et(e){return null}n(et,"publishedDocUrl");var ar=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"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 tt(e){return ar[e]}n(tt,"categoryFor");function rt(e){let t=X(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),o=r.replace(/[^A-Z0-9]/g,"");if(o==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(o){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":return "rateLimited";case "IDEMPOTENCYKEYCONFLICT":case "IDEMPOTENCYCONFLICT":return "idempotencyConflict";case "ACCESSDENIED":case "FORBIDDEN":return "accessDenied";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"}}n(rt,"fromWire");var ir=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function pe(e){return ir.has(e)}n(pe,"isAutoRetryable");var sr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function nt(e){return pe(e)||sr.has(e)}n(nt,"isRetryableCode");var lr=500,fe=8e3,ot=4;function at(e,t=Math.random){let r=Math.max(0,e),o=Math.min(lr*2**r,fe);return Math.floor(t()*o)}n(at,"backoffDelayMs");var dr=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:"This feature isn't available on your account right now.",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:"Something in that request was not right. Check the details and try again.",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.",unknown:"Something went wrong. Please try again."});function U(e){return dr[e]}n(U,"userFacingError");function it(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}n(it,"defineHidden");var ur=/^[a-z][a-z0-9_]{0,63}$/;function N(e,t){let r=X(t?.wireCode,t?.wireEnvelope),o={code:e,category:tt(e),retryable:t?.retryable??nt(e),displayMessage:U(e)};if(t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&ur.test(t.reasonCode)&&(o.reasonCode=t.reasonCode),r);return t?.wireMessage&&it(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&it(o,"raw",t.raw),Object.freeze(o)}n(N,"makeEverfurError");var cr=Object.freeze({chat:Object.freeze(["chat.message.create"]),records:Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:Object.freeze(["records.clinic.create"]),video:Object.freeze(["video.gait.execute"]),photo:Object.freeze(["photo.checkup.execute"]),animations:Object.freeze(["animations.state.read"]),televet:Object.freeze(["televet.visit.create"])});function pr(e){return cr[e]}n(pr,"requires");function st(e,t,r){let o=pr(e),a=new Map;for(let u of t)a.set(u.resource,u);if(r?.isPending===true&&o.some(u=>!a.has(u)))return ye({name:e,enabled:false,isPending:true,limits:{}});let s=fr(o,a);return o.filter(u=>a.get(u)?.granted!==true).length===0?ye({name:e,enabled:true,isPending:false,limits:s}):ye({name:e,enabled:false,isPending:false,limits:s,disabled:yr(o,a)})}n(st,"decideCapability");function fr(e,t){let r={};for(let o of e){let a=t.get(o)?.limits;if(a)for(let[s,d]of Object.entries(a)){let u=r[s];r[s]=u===void 0?d:Math.min(u,d);}}return r}n(fr,"mergeLimits");function yr(e,t){for(let r of e){let o=t.get(r)?.disabled;if(o)return Object.freeze({reason:o.reason,level:o.level,recoverable:o.recoverable})}return Object.freeze({reason:U("accessDenied"),level:"user_entitlement",recoverable:false})}n(yr,"disabledFor");function ye(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),Object.freeze(t)}n(ye,"freezeDecision");function me(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}n(me,"ok");function P(e){return Object.freeze({ok:false,error:e})}n(P,"err");var J=class J extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,J.prototype);}};n(J,"EverfurConfigError");var B=J;var lt=Symbol.for("@everfur/sdk#EverfurContext@v1"),dt=globalThis,ut=dt[lt]??(dt[lt]=createContext(null));ut.displayName??="EverfurContext";function Z(){let e=useContext(ut);if(e===null)throw new B("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}n(Z,"useEverfurContext");function K(e){let{runtime:t}=Z(),r=t.entitlements,o=useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot);return useMemo(()=>st(e,o.decisions,{isPending:o.isPending}),[e,o])}n(K,"useCapability");var hr=48;function Er(e){return e.isPending?"pending":e.enabled?"enabled":"disabled"}n(Er,"selectView");function yt(e){let{capability:t,children:r,renderDisabled:o,renderPending:a,style:s}=e,d=K(t),u=useMemo(()=>Er(d),[d]);switch(u){case "enabled":return r;case "pending":return a?jsx(de,{render:a,fallback:jsx(pt,{capability:t,style:s})}):jsx(pt,{capability:t,style:s});case "disabled":return o?jsx(de,{render:()=>o(d),fallback:jsx(ft,{decision:d,style:s}),resetKey:d}):jsx(ft,{decision:d,style:s});default:return Q(u)}}n(yt,"CapabilityGate");function pt({capability:e,style:t}){let r=D(),o=useMemo(()=>mt(r),[r]);return jsx(View,{style:[o.offstate,t],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${e}`,children:jsx(View,{style:o.skeletonBar})})}n(pt,"PendingSkeleton");function ft({decision:e,style:t}){let r=D(),o=useMemo(()=>mt(r),[r]),a=e.disabled?.reason??"";return jsx(View,{style:[o.offstate,t],accessible:true,accessibilityRole:"text",accessibilityLabel:a,children:a.length>0?jsx($,{style:o.offstateText,children:a}):null})}n(ft,"OffState");function mt(e){let{color:t,space:r,radius:o,type:a}=e;return StyleSheet.create({offstate:{minHeight:hr,justifyContent:"center",paddingHorizontal:r.lg,paddingVertical:r.md,backgroundColor:t.surfaceCream,borderRadius:o.md,borderWidth:StyleSheet.hairlineWidth,borderColor:t.brandBorder},offstateText:{...Qe(e,"regular"),fontSize:a.size.body,lineHeight:Math.round(a.size.body*a.lineHeight.normal),color:t.text.muted},skeletonBar:{height:r.md,borderRadius:o.xs,backgroundColor:t.brandSofter}})}n(mt,"makeStyles");function _r(){let e=new Uint8Array(16),t=globalThis.crypto;if(typeof t?.getRandomValues=="function")t.getRandomValues(e);else for(let o=0;o<e.length;o+=1)e[o]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=[];for(let o=0;o<e.length;o+=1)r.push(e[o].toString(16).padStart(2,"0"));return r.slice(0,4).join("")+"-"+r.slice(4,6).join("")+"-"+r.slice(6,8).join("")+"-"+r.slice(8,10).join("")+"-"+r.slice(10,16).join("")}n(_r,"newSessionId");function Sr(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}n(Sr,"authHeaders");function q(e,t){return {...e,headers:{...Rr(e.headers),...Sr(t)}}}n(q,"withAuthHeaders");function Rr(e){if(!e)return {};let t={};for(let[r,o]of Object.entries(e)){let a=r.toLowerCase();a==="authorization"||a==="x-everfur-partner-key"||(t[r]=o);}return t}n(Rr,"stripAuthHeaders");async function bt(e,t){if(t.mode==="anonymous")return t.transport.request(q(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return P(ge())}let o=await t.transport.request(q(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(o.ok||o.error.httpStatus!==401)return o;let a;try{a=await t.identity.currentToken({forceRefresh:!0});}catch{return P(ge())}let s=await t.transport.request(q(e,{mode:"personalized",token:a,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?P(ge(s.error.httpStatus)):s}n(bt,"authedSend");function ge(e){return N("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}n(ge,"authRejectedError");function vt(e){return N("internalError",{retryable:true,wireMessage:Tr(e)})}n(vt,"networkError");function Tr(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}n(Tr,"describeCause");var Cr=3e4,wr=fe*2,kr="idempotency-key",xr=new Set(["POST","PUT","PATCH","DELETE"]),Fr=Object.freeze({onEvent(){}}),Pr=Object.freeze({setTimeout:n((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:n(e=>clearTimeout(e),"clearTimeout"),now:n(()=>Date.now(),"now")});function ht(e){let t=e.observer??Fr,r=e.timers??Pr,o=e.rng??Math.random,a=e.sleep??((y,c)=>qr(y,r,c)),s=e.maxAttempts??ot,d=e.unaryTimeoutMs??Cr,u=e.newIdempotencyKey??Ar(),m=n(y=>{try{t.onEvent(y);}catch{}},"emit");async function f(y,c,R){let _=R?.maxAttempts,x=Math.max(1,_??s),v=R?.idempotent??xr.has(c.method)?u():null,F=Or(c,v),M=0;for(;;){let l=n(S=>Object.freeze({call:y,method:c.method,path:c.path,attempt:M,...v?{idempotencyKey:v}:{},...S}),"stamp");m(l({phase:"attempt"}));let E=Br(d,r),O=Kr(E.signal,c.signal),A;try{A=await bt({...F,signal:O.signal},e.auth);}catch(S){A=P(vt(S));}finally{O.dispose(),E.cancel();}if(A.ok)return m(l({phase:"settled",ok:true,reason:"ok"})),A;let i=A.error,p=Mr(i,M,{maxAttempts:x,rng:o,now:r.now(),aborted:c.signal?.aborted===true,..._!==void 0?{perCallMaxAttempts:_}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),g={ok:false,code:i.code,reason:p.reason,...i.httpStatus!==void 0?{httpStatus:i.httpStatus}:{},...i.requestId!==void 0?{requestId:i.requestId}:{}};if(!p.retry)return m(l({phase:"settled",...g})),P(i);if(m(l({phase:"retry",...g,delayMs:p.delayMs})),await a(p.delayMs,c.signal),c.signal?.aborted===true)return m(l({phase:"settled",...g,reason:"aborted"})),P(i);M+=1;}}n(f,"send");async function b(y){return q(y,await Ur(e.auth))}n(b,"authorize");async function*h(y,c,R){m(Object.freeze({call:y,phase:"stream.open",method:c.method,path:c.path,attempt:0}));try{yield*e.auth.transport.stream(c,R);}catch{yield $e({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return n(h,"stream"),Object.freeze({send:f,authorize:b,stream:h})}n(ht,"createRequestFunnel");function Or(e,t){let r={};for(let[o,a]of Object.entries(e.headers??{}))o.toLowerCase()!==kr&&(r[o]=a);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}n(Or,"assembleHeaders");function Ar(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}n(Ar,"defaultIdempotencyKeyFactory");var Ir=10;function Mr(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let o=Dr(e);if(o==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(o!=="burst"&&!pe(e.code))return {retry:false,reason:"terminal-code"};let a=o==="burst"?"burst-throttle":"retryable-code";if(n(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let d=n(()=>{if(r.policy===void 0)return null;let f;try{f=r.policy.maxAttempts(e.code);}catch{return null}return typeof f!="number"||!Number.isFinite(f)?null:Math.max(1,Math.min(Ir,Math.floor(f)))},"policyCeiling"),u=r.perCallMaxAttempts??d()??r.maxAttempts;if(t+1>=u)return {retry:false,reason:"attempts-exhausted"};let m=zr(e,r.now);return m!==null?m>wr?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:a,delayMs:m}:{retry:true,reason:a,delayMs:at(t,r.rng)}}n(Mr,"decideRetry");function Dr(e){let t=e.code==="unknown"?rt(Lr(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}n(Dr,"throttleKind");function zr(e,t){let r=jr(e.raw);if(r===null)return null;let o=r-t;return o>0?o:0}n(zr,"retryOverrideMs");function jr(e){for(let t of Et(e)){let r=t.resets_at,o=Nr(r);if(o!==null)return o}return null}n(jr,"findResetsAt");function Et(e){if(!gt(e))return [];let t=[e];for(let r of ["error","detail"]){let o=e[r];gt(o)&&t.push(o);}return t}n(Et,"candidateScopes");function Nr(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}n(Nr,"parseInstantMs");function Lr(e){for(let t of Et(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}n(Lr,"rawWireCode");function gt(e){return typeof e=="object"&&e!==null}n(gt,"isRecord");async function Ur(e){return e.mode==="anonymous"?{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}:{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}n(Ur,"resolveDeviceAuth");function Br(e,t){let r=new AbortController,o=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:n(()=>t.clearTimeout(o),"cancel")}}n(Br,"boundedSignal");function Kr(e,t){let r=n(()=>{},"noop");if(!t)return {signal:e,dispose:r};let o=new AbortController;if(e.aborted||t.aborted)return o.abort(),{signal:o.signal,dispose:r};let a=n(()=>o.abort(),"onAbort");return e.addEventListener("abort",a,{once:true}),t.addEventListener("abort",a,{once:true}),{signal:o.signal,dispose:n(()=>{e.removeEventListener("abort",a),t.removeEventListener("abort",a);},"dispose")}}n(Kr,"mergeSignals");function qr(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(o=>{let a=t.setTimeout(()=>{r?.removeEventListener("abort",s),o();},e),s=n(()=>{t.clearTimeout(a),o();},"onAbort");r?.addEventListener("abort",s,{once:true});})}n(qr,"delayAbortable");function _t(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let o=e.charCodeAt(t+1);if(!(o>=56320&&o<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}n(_t,"hasLoneSurrogate");function he(e){let t={url:e.url,kind:e.kind,expiresAt:e.expires_at};return typeof e.loop_duration_ms=="number"&&(t.loopDurationMs=e.loop_duration_ms),typeof e.cache_key=="string"&&e.cache_key.length>0&&(t.cacheKey=e.cache_key),Object.freeze(t)}n(he,"mapTier");function Ee(e){let t={};e.tiers.animation&&(t.animation=he(e.tiers.animation)),e.tiers.image&&(t.image=he(e.tiers.image));let r={};e.overlays.weather_alert&&(r.weatherAlert=he(e.overlays.weather_alert));let o={category:e.category,tiers:Object.freeze(t),overlays:Object.freeze(r),idle:"bundled",ttlSeconds:e.ttl_seconds,degraded:e.degraded};return typeof e.cache_epoch=="number"&&(o.cacheEpoch=e.cache_epoch),Object.freeze(o)}n(Ee,"mapPetStateResponse");var Vr=z.enum(["webp","video"]),Hr=z.enum(["health","attention","moment","activity","mood","idle"]),_e=z.object({url:z.string(),kind:Vr.default("webp"),loop_duration_ms:z.number().nullish(),expires_at:z.string(),cache_key:z.string().nullish()}),St=z.object({category:Hr,tiers:z.object({animation:_e.optional(),image:_e.optional()}).default({}),overlays:z.object({weather_alert:_e.optional()}).default({}),idle:z.literal("bundled").default("bundled"),ttl_seconds:z.number(),degraded:z.boolean().default(false),cache_epoch:z.number().default(0)});function Se(e){let t=St.safeParse(e);return t.success?t.data:null}n(Se,"parsePetStateWire");function Re(e){return Wr(ht({auth:e}))}n(Re,"createPetStateRepository");function Wr(e){return {async getState(t,r){if(_t(t))return P(N("validationFailed",{retryable:false,wireMessage:"pet_ref contains an unpaired surrogate and cannot be encoded"}));let o=`/widget/v1/pets/${encodeURIComponent(t)}/state`,a=await e.send("animations.getState",r?.signal?{method:"GET",path:o,signal:r.signal}:{method:"GET",path:o});if(a.ok){let s=Se(a.value);return s===null?P(N("internalError",{retryable:true})):me(Ee(s))}return a.error.httpStatus===404?me(null):P(a.error)}}}n(Wr,"createPetStateRepositoryOver");function Te(e){if(e===void 0)return "bundled:none";if(typeof e=="number")return `bundled:${e}`;if("kind"in e)return `bundled:${e.id}`;let t=e.uri,r=t.indexOf("?");return r===-1?t:t.slice(0,r)}n(Te,"stableMediaKey");function Ce(e){return e.hasPhoto&&!e.photoFailed?"photo":e.canAnimate&&!e.animationFailed?"animation":e.hasImage&&!e.imageFailed?"image":"idle"}n(Ce,"selectTier");function we(e,t){switch(e){case "photo":return {failed:V({...t,photo:true}),reason:"network_error"};case "animation":return {failed:V({...t,animation:true}),reason:"network_error"};case "image":return {failed:V({...t,image:true}),reason:"network_error"};case "idle":return {failed:V(t),reason:"idle_asset_failed"};default:return {failed:V(t),reason:"network_error"}}}n(we,"retireTier");var H=Object.freeze({photo:false,animation:false,image:false});function V(e){return Object.freeze({photo:e.photo,animation:e.animation,image:e.image})}n(V,"freezeFailed");function Gr(e){switch(e){case "activity":case "mood":case "moment":case "idle":return true;case "health":case "attention":return false;default:return false}}n(Gr,"isLoaderSafeCategory");var ke="everfur.petState.cacheEpoch";function xe(e){let t=0,r=false,o=null,a=n(async s=>{if(r||(t=await Yr(e.kv),r=true),s<=t)return false;try{await e.kv.setItem(ke,String(s));}catch{}t=s;try{await e.cache.clearMemoryCache();}catch{}try{await e.cache.clearDiskCache();}catch{}return true},"run");return {async sync(s){return typeof s!="number"||!Number.isFinite(s)||s<=0||r&&s<=t?false:o||(o=a(s).finally(()=>{o=null;}),o)}}}n(xe,"createCacheEpochGuard");async function Yr(e){let t;try{t=await e.getItem(ke);}catch{return 0}if(t===null)return 0;let r=Number(t);return Number.isFinite(r)&&r>0?r:0}n(Yr,"readStoredEpoch");var Fe=1,Pe="everfur.manifest.lastKnownGood",L=Object.freeze({kind:"bundled",id:"everfur-idle"}),W=Object.freeze({schemaVersion:Fe,revision:"compiled-default",surfaces:Object.freeze({animations:Object.freeze({enabled:true,idle:L})})}),$r=z.object({kind:z.literal("bundled"),id:z.string().min(1)}),Qr=z.object({enabled:z.boolean().default(true),idle:$r.optional()}),Xr=z.object({schema_version:z.number().int(),revision:z.string().default(""),surfaces:z.object({animations:Qr.optional()}).default({})});function Oe(e){let t=Xr.safeParse(e);if(!t.success)return {ok:false,reason:"unparseable"};if(t.data.schema_version>Fe)return {ok:false,reason:"newer_schema"};let r=t.data.surfaces.animations,o={};return r&&(o.animations=Object.freeze({enabled:r.enabled,idle:r.idle?Object.freeze({...r.idle}):L})),{ok:true,manifest:Object.freeze({schemaVersion:t.data.schema_version,revision:t.data.revision,surfaces:Object.freeze(o)})}}n(Oe,"parseManifest");async function Jr(e,t,r){if(e!=null){let a=Oe(e);if(a.ok)return await Zr(t,e),r.track("manifest.fallback",{source:"live"}),Object.freeze({manifest:a.manifest,source:"live"});a.reason==="newer_schema"&&r.track("manifest.refused_newer",{});}let o=await en(t);return o?(r.track("manifest.fallback",{source:"last-known-good"}),Object.freeze({manifest:o,source:"last-known-good"})):(r.track("manifest.fallback",{source:"compiled-default"}),Object.freeze({manifest:W,source:"compiled-default"}))}n(Jr,"resolveManifest");function Ae(e){return e.surfaces.animations??W.surfaces.animations??{enabled:true,idle:L}}n(Ae,"animationsSurfaceOf");async function Zr(e,t){try{await e.setItem(Pe,JSON.stringify(t));}catch{}}n(Zr,"writeLastKnownGood");async function en(e){let t;try{t=await e.getItem(Pe);}catch{return null}if(t===null)return null;let r;try{r=JSON.parse(t);}catch{return null}let o=Oe(r);return o.ok?o.manifest:null}n(en,"readLastKnownGood");var Rt=Object.freeze({data:null,isPending:false,isError:false,error:null,isDark:false});function Ie(e){let{repo:t,cacheEpoch:r,timers:o}=e,a=new Set,s=new Map,d=Rt,u=null,m=null,f=false,b=null,h=null,y=null,c=0,R=n(()=>{for(let i of a)i();},"emit"),_=n(i=>{d=Object.freeze({...d,...i}),R();},"patch"),x=n(()=>{h!==null&&(o.clearTimeout(h),h=null);},"clearRemint"),j=n(i=>i?Math.max(1,i.ttlSeconds)*1e3:6e4,"staleMs"),v=n(i=>{let p=s.get(i);p!==void 0&&(s.delete(i),s.set(i,p));},"touchWarm"),F=n((i,p)=>{for(s.delete(i),s.set(i,Object.freeze({data:p,fetchedAt:o.now()}));s.size>32;){let g=s.keys().next().value;if(g===void 0||g===i)break;s.delete(g);}},"setWarm"),M=n(i=>{let p=s.get(i);return p?!!(p.data.tiers.animation||p.data.tiers.image):false},"hasGoodTiers"),l=n((i,p)=>{if(x(),!f)return;let g=Math.max(1,p)*1e3,S=c;h=o.setTimeout(()=>{h=null,!(S!==c||u!==i||!f)&&E(i,0);},g);},"scheduleRemint"),E=n(async(i,p)=>{if(u!==i||b===i||!f)return;let g=c;y?.abort();let S=new AbortController;y=S;let w=await t.getState(i,{signal:S.signal});if(!(g!==c||u!==i)){if(w.ok){let T=w.value;if(T===null){O(i);return}r.sync(T.cacheEpoch);let ne=!!(T.tiers.animation||T.tiers.image);if(T.degraded&&!ne&&M(i)){_({isError:false,error:null,isPending:false,isDark:false}),l(i,T.ttlSeconds);return}F(i,T),m=i,_({data:T,isPending:false,isError:false,error:null,isDark:false}),l(i,T.ttlSeconds);return}if(Tt(w.error)){A(i,w.error);return}if(_({isError:true,error:w.error,isPending:d.data===null&&m!==i}),p<2){x();let T=500*(p+1),ne=c;h=o.setTimeout(()=>{h=null,!(ne!==c||u!==i||!f)&&E(i,p+1);},T);}else l(i,5);}},"fetchOnce"),O=n(i=>{b=i,s.delete(i),x(),m=i,_({data:null,isPending:false,isError:false,error:null,isDark:true});},"onTerminalDark"),A=n((i,p)=>{b=i,s.delete(i),x(),m=i,_({data:null,isPending:false,isError:false,error:p,isDark:true});},"onTerminalDisabled");return {observe(i,p){let g=p.isFocused!==f;if(f=p.isFocused,i!==u){if(c+=1,y?.abort(),y=null,x(),b=null,u=i,i===null){m=null,d=Rt,R();return}let w=s.get(i),T=w&&o.now()-w.fetchedAt<j(w.data)?w:null;T?(v(i),m=i,_({data:T.data,isPending:false,isError:false,error:null,isDark:false})):_({isPending:true,isError:false,error:null,isDark:false}),f&&E(i,0);return}if(!g||i===null)return;if(!f){x();return}let S=s.get(i);!S||o.now()-S.fetchedAt>=j(S.data)?b!==i&&E(i,0):l(i,S.data.ttlSeconds);},getSnapshot(){return d},subscribe(i){return a.add(i),()=>{a.delete(i);}},getCachedPetStateMedia(i){let p=s.get(i);return !p||o.now()-p.fetchedAt>=j(p.data)?null:(v(i),p.data)},dispose(){c+=1,y?.abort(),y=null,x(),a.clear(),s.clear();}}}n(Ie,"createPetStateStore");function Tt(e){if(typeof e!="object"||e===null)return false;let t=e,r=typeof t.status=="number"?t.status:t.httpStatus;return r===403||r===404}n(Tt,"isTerminalPetStateError");var Ct=Object.freeze({track(){},trackExpectedFailure(){}});function ee(e){let t=e.telemetry??Ct,r=e.timers??nn(e.now),o=Ie({repo:e.repo,cacheEpoch:xe({kv:e.kv,cache:e.cache}),timers:r}),a=new Set,s=H,d="none",u=false,m=null,f=null,b=false,h=0,y="",c=rn(_()),R=false;function _(){let l=e.manifest?e.manifest():W;return Ae(l)}n(_,"surface");let x=n(()=>{for(let l of a)l();},"emit"),j=o.subscribe(()=>{v();});function v(){let l=o.getSnapshot();(l.data!==f||l.isDark!==b)&&(f=l.data,b=l.isDark,s=H,d=l.isDark?"dark_or_missing":"none",h+=1),F(l);}n(v,"onStoreChange");function F(l=o.getSnapshot()){let E=_(),O=tn(E,l,{failed:s,fallbackReason:d,paused:u,photoUrl:m,reducedMotion:e.reducedMotion()});c=O,M(O),x();}n(F,"recompute");function M(l){if(l.kind!=="ready")return;let E=`${l.category}|${l.tier}|${l.fallbackReason}|${l.reducedMotion?1:0}`;E!==y&&(y=E,t.track("pet_state_shown",{category:l.category,tier:l.tier,fallback_reason:l.fallbackReason,reduced_motion:l.reducedMotion}),l.fallbackReason==="idle_asset_failed"&&t.trackExpectedFailure("idle_asset_failed",{category:l.category}));}return n(M,"maybeEmitShown"),{observe(l,E){R||(m=E.photoUrl??null,s=H,o.observe(l,{isFocused:E.isFocused}),v());},getState(){return c},subscribe(l){return a.add(l),()=>{a.delete(l);}},onMediaError(){if(R||c.kind!=="ready")return;let l=we(c.tier,s);s=l.failed,d=l.reason,F();},setPaused(l){R||u===l||(u=l,F());},dispose(){R||(R=true,j(),o.dispose(),a.clear());}}}n(ee,"createAnimationController");function tn(e,t,r){let o=e.idle;if(!e.enabled)return Object.freeze({kind:"disabled",reason:U("accessDenied"),level:"partner_config",source:o,idle:e.idle});if(t.isPending&&t.data===null&&!t.isDark)return Object.freeze({kind:"pending",showSkeleton:true,source:o});let a=t.data,s=a?.category??"idle",d=a?.tiers.animation,u=a?.tiers.image,m=!!d&&d?.kind==="webp"&&!r.reducedMotion&&!r.failed.animation,f=Ce({hasPhoto:r.photoUrl!==null&&r.photoUrl.length>0,photoFailed:r.failed.photo,canAnimate:m,animationFailed:r.failed.animation,hasImage:!!u,imageFailed:r.failed.image}),b=o,h=null,y=false;f==="photo"&&r.photoUrl?b=Me(r.photoUrl,void 0):f==="animation"&&d?(b=Me(d.url,d.cacheKey),h=d.loopDurationMs??null,y=d.cacheKey!==void 0):f==="image"&&u&&(b=Me(u.url,u.cacheKey),y=u.cacheKey!==void 0);let c=b.kind==="uri"?b.cacheKey:`bundled:${b.id}`;return Object.freeze({kind:"ready",tier:f,source:b,recyclingKey:c,category:s,loopDurationMs:h,paused:r.paused,reducedMotion:r.reducedMotion,cacheHit:y,fallbackReason:r.fallbackReason,isDark:t.isDark,isTransientError:t.isError})}n(tn,"buildView");function Me(e,t){return Object.freeze({kind:"uri",uri:e,cacheKey:t??Te({uri:e})})}n(Me,"uriSource");function rn(e){return Object.freeze({kind:"pending",showSkeleton:true,source:e.idle})}n(rn,"pendingView");function nn(e){return {setTimeout:n((t,r)=>setTimeout(t,r),"setTimeout"),clearTimeout:n(t=>clearTimeout(t),"clearTimeout"),now:e}}n(nn,"defaultTimers");var ln=Object.freeze({kind:"pending",showSkeleton:true,source:L}),dn=n(()=>{},"NOOP_UNSUBSCRIBE");function ze(e){let{petRef:t,repo:r,cache:o,kv:a,isFocused:s=true,photoUrl:d=null,telemetry:u,reducedMotion:m,manifest:f,timers:b,now:h}=e,{runtime:y,userRef:c}=Z(),R=K("animations"),_=un(m),j=r!==void 0&&o!==void 0&&a!==void 0?"override":`${c??""}|${t??""}`,[v,F]=useState(null);useEffect(()=>{if(r!==void 0&&o!==void 0&&a!==void 0){let g={repo:r,cache:o,kv:a,reducedMotion:_,now:h??kt,...u?{telemetry:u}:{},...f?{manifest:f}:{},...b?{timers:b}:{}},S=ee(g);return F(S),()=>{F(w=>w===S?null:w),S.dispose();}}let{services:i}=y.registry,p=y.registry.acquire("animations",`${c??""}|${t??""}`,()=>ee({repo:Re(i.authFor(c)),cache:i.imageCache,kv:i.kv,reducedMotion:_,now:h??kt,telemetry:i.telemetry,...f?{manifest:f}:{},...b?{timers:b}:{}}),g=>g.dispose());return F(p),()=>{F(g=>g===p?null:g),y.registry.release(p);}},[j,r,o,a,y]),useEffect(()=>{v?.observe(t,{isFocused:s,photoUrl:d});},[v,t,s,d]);let M=useCallback(i=>v?v.subscribe(i):dn,[v]),l=useCallback(()=>v?v.getState():ln,[v]),E=useSyncExternalStore(M,l,l),O=useCallback(()=>{v?.onMediaError();},[v]),A=useCallback(i=>{v?.setPaused(i);},[v]);return useMemo(()=>({capability:R,state:E,onMediaError:O,setPaused:A}),[R,E,O,A])}n(ze,"useAnimations");function un(e){let t=useRef(true);return useEffect(()=>{if(e)return;let r=true,o=AccessibilityInfo.isReduceMotionEnabled?.();o&&typeof o.then=="function"&&o.then(s=>{r&&(t.current=s);});let a=AccessibilityInfo.addEventListener?.("reduceMotionChanged",s=>{t.current=s;});return ()=>{r=false,a?.remove?.();}},[e]),useMemo(()=>e??(()=>t.current),[e])}n(un,"useSystemReducedMotion");function kt(){return Date.now()}n(kt,"defaultNow");var bn=200,vn=300,je=120;function gn(e){let{style:t,accessibilityLabel:r}=e,o={accessibilityLabel:r,decorative:At(e)};return jsx(yt,{capability:"animations",style:t,renderPending:()=>jsx(re,{style:t,a11y:o,busy:true}),renderDisabled:a=>jsx(re,{style:t,a11y:o,reason:a.disabled?.reason??""}),children:jsx(hn,{...e})})}n(gn,"PetStateView");function At(e){return e.decorative===true||e.accessibilityLabel===void 0}n(At,"isDecorative");function hn(e){let t=Ne(),r={accessibilityLabel:e.accessibilityLabel,decorative:At(e)},o=ze(Sn(e));return jsx(View,{style:[t.container,e.style],children:En(o.state,o.onMediaError,r)})}n(hn,"PetStateBody");function En(e,t,r){switch(e.kind){case "pending":return jsx(Pt,{source:e.source,recyclingKey:"pending",reducedMotion:true,a11y:r,busy:true,onMediaError:t});case "disabled":return jsx(re,{a11y:r,reason:e.reason});case "ready":return jsx(Pt,{source:e.source,recyclingKey:e.recyclingKey,reducedMotion:e.reducedMotion,a11y:r,onMediaError:t});default:return Q(e)}}n(En,"renderState");function Pt({source:e,recyclingKey:t,reducedMotion:r,a11y:o,busy:a,onMediaError:s}){let d=Ne();return e.kind==="uri"?jsx(Image,{source:{uri:e.uri},onError:s,fadeDuration:r?0:bn,style:d.media,...It(o)},t):jsx(re,{a11y:o,busy:a})}n(Pt,"MediaNode");function re({style:e,a11y:t,busy:r,reason:o}){let a=Ne();return jsxs(View,{style:[a.idlePlaceholder,e],...It(t),children:[r?jsx(_n,{}):null,o&&o.length>0?jsx($,{style:a.reasonText,children:o}):null]})}n(re,"IdleRegion");function _n(){let e=D(),[t,r]=useState(false);return useEffect(()=>{let o=setTimeout(()=>r(true),vn);return ()=>clearTimeout(o)},[]),t?jsx(ActivityIndicator,{color:e.color.brand}):null}n(_n,"DelayedSpinner");function It(e){if(e.decorative)return {accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};let t=e.accessibilityLabel;return t!==void 0?{accessible:true,accessibilityRole:"image",accessibilityLabel:t}:{accessible:true,accessibilityRole:"image"}}n(It,"a11yProps");function Sn(e){let t={petRef:e.petRef,repo:e.repo,cache:e.cache,kv:e.kv};return e.isFocused!==void 0&&(t.isFocused=e.isFocused),e.photoUrl!==void 0&&(t.photoUrl=e.photoUrl),e.telemetry!==void 0&&(t.telemetry=e.telemetry),e.reducedMotion!==void 0&&(t.reducedMotion=e.reducedMotion),e.manifest!==void 0&&(t.manifest=e.manifest),e.timers!==void 0&&(t.timers=e.timers),e.now!==void 0&&(t.now=e.now),t}n(Sn,"buildParams");function Ne(){let e=D();return useMemo(()=>Rn(e),[e])}n(Ne,"useStyles");function Rn(e){return StyleSheet.create({container:{minHeight:je,width:"100%",backgroundColor:e.color.surfaceCream,borderRadius:e.radius.lg,overflow:"hidden"},media:{minHeight:je,width:"100%"},idlePlaceholder:{minHeight:je,width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:e.color.surfaceCream,borderRadius:e.radius.lg,borderWidth:StyleSheet.hairlineWidth,borderColor:e.color.borderRingCream,padding:e.space.lg},reasonText:{marginTop:e.space.sm,fontFamily:e.type.family,fontSize:e.type.size.bodyTight,lineHeight:Math.round(e.type.size.bodyTight*e.type.lineHeight.normal),fontWeight:e.type.weight.medium,color:e.color.text.muted,textAlign:"center"}})}n(Rn,"makeStyles");export{ke as CACHE_EPOCH_STORAGE_KEY,L as COMPILED_DEFAULT_IDLE,W as COMPILED_DEFAULT_MANIFEST,Pe as MANIFEST_LKG_STORAGE_KEY,H as NO_FAILURES,gn as PetStateView,Fe as SUPPORTED_SCHEMA_VERSION,Ae as animationsSurfaceOf,ee as createAnimationController,xe as createCacheEpochGuard,Re as createPetStateRepository,Ie as createPetStateStore,Gr as isLoaderSafeCategory,Tt as isTerminalPetStateError,Ee as mapPetStateResponse,_r as newSessionId,Oe as parseManifest,Se as parsePetStateWire,St as petStateResponseWireSchema,Jr as resolveManifest,we as retireTier,Ce as selectTier,Te as stableMediaKey,ze as useAnimations};
1
+ import {createContext,forwardRef,createElement,useState,useEffect,useCallback,useSyncExternalStore,useMemo,useRef,useContext,Component}from'react';import {TextInput,AccessibilityInfo,View,Image,ActivityIndicator,StyleSheet,Text}from'react-native';import {jsx,jsxs}from'react/jsx-runtime';import {z}from'zod';var Mt=Object.defineProperty;var n=(e,t)=>Mt(e,"name",{value:t,configurable:true});function ie(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))ie(e[t]);}return e}n(ie,"deepFreeze");var Dt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),Ue={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Be={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Le={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},zt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},jt={regular:"400",medium:"500",bold:"700"},Nt={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},Lt=0,G="System",Y="monospace",Ut=["content","heading","control","compact","badge"];function Bt(e){let t={};for(let r of Ut)t[r]=e;return t}n(Bt,"authoredTierSizes");function Ke(){return {family:G,mono:Y,fontUrl:null,families:{regular:G,medium:G,bold:G,mono:Y,monoMedium:Y,monoBold:Y},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Le,tierSizes:Bt(Le),lineHeight:zt,weight:jt,letterSpacing:Nt,scale:1,maxScale:Lt,scaleCaps:Dt}}n(Ke,"baseType");var qe={},oe=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function ae(e){return `cubic-bezier(${e.join(", ")})`}n(ae,"cssCubicBezier");var Ve={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:ae(oe.standard),emphasized:ae(oe.emphasized),exit:ae(oe.exit)},reducedMotion:false},Kt={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FDFBF8",surfaceSubtle:"#EFE9E3",background:"#FFFFFF",borderRingCream:"#D8D2C8",chatGround:"#FFFFFF",composerFill:"#FDFBF8",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#111111",secondary:"#0E462E",muted:"#6E6660",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#B91C1C",errorRed:"#FF1B00",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(185,28,28,0.12)",badgeBgNeutral:"rgba(110,102,96,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},He=ie({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:Kt,space:Ue,radius:Be,type:Ke(),motion:Ve,slots:qe}),qt={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A938C",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};ie({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:qt,space:Ue,radius:Be,type:Ke(),motion:Ve,slots:qe});var We=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Ge=globalThis,se=Ge[We]??(Ge[We]=createContext(He));se.displayName??="EverfurThemeContext";function M(){return useContext(se)}n(M,"useEverfurTheme");function $t(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n($t,"tierMultiplier");function $({tier:e="content",...t}){let{type:r}=M(),o=$t(r,e);return createElement(Text,o===void 0?t:{maxFontSizeMultiplier:o,...t})}n($,"Text");forwardRef(n(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function Q(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}n(Q,"assertNever");function $e(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}n($e,"errorFrame");var Jt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function Qe(e,t){let r=e.type,o=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:o}:{fontFamily:o,fontWeight:r.weight[Jt[t]]}}n(Qe,"face");var ue=class ue extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey};}static getDerivedStateFromError(){return {failed:true}}static getDerivedStateFromProps(r,o){return Object.is(r.resetKey,o.key)?null:{failed:false,key:r.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};n(ue,"HostRenderBoundary");var le=ue;function er({render:e}){return e()}n(er,"RenderHost");function de({render:e,fallback:t,resetKey:r}){return createElement(le,{fallback:t,resetKey:r,children:createElement(er,{render:e})})}n(de,"HostRender");var ce=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(ce.map(e=>e.wireCode));var tr=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",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",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"}),Ze=Object.freeze(ce.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:tr[e.wireCode]}))),rr=new Map(Ze.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),nr=Object.freeze(["http_envelope",...[...new Set(Ze.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function X(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let o of [t??"http_envelope",...nr]){let a=rr.get(o+r);if(a)return a}}n(X,"contractErrorFor");function or(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}n(or,"contractDocUrl");function et(e){return null}n(et,"publishedDocUrl");var ar=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"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 tt(e){return ar[e]}n(tt,"categoryFor");function rt(e){let t=X(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),o=r.replace(/[^A-Z0-9]/g,"");if(o==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(o){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":return "rateLimited";case "IDEMPOTENCYKEYCONFLICT":case "IDEMPOTENCYCONFLICT":return "idempotencyConflict";case "ACCESSDENIED":case "FORBIDDEN":return "accessDenied";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"}}n(rt,"fromWire");var ir=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function pe(e){return ir.has(e)}n(pe,"isAutoRetryable");var sr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function nt(e){return pe(e)||sr.has(e)}n(nt,"isRetryableCode");var lr=500,fe=8e3,ot=4;function at(e,t=Math.random){let r=Math.max(0,e),o=Math.min(lr*2**r,fe);return Math.floor(t()*o)}n(at,"backoffDelayMs");var dr=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:"This feature isn't available on your account right now.",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:"Something in that request was not right. Check the details and try again.",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.",unknown:"Something went wrong. Please try again."});function U(e){return dr[e]}n(U,"userFacingError");function it(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}n(it,"defineHidden");var ur=/^[a-z][a-z0-9_]{0,63}$/;function N(e,t){let r=X(t?.wireCode,t?.wireEnvelope),o={code:e,category:tt(e),retryable:t?.retryable??nt(e),displayMessage:U(e)};if(t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&ur.test(t.reasonCode)&&(o.reasonCode=t.reasonCode),r);return t?.wireMessage&&it(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&it(o,"raw",t.raw),Object.freeze(o)}n(N,"makeEverfurError");var cr=Object.freeze({chat:Object.freeze(["chat.message.create"]),records:Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:Object.freeze(["records.clinic.create"]),video:Object.freeze(["video.gait.execute"]),photo:Object.freeze(["photo.checkup.execute"]),animations:Object.freeze(["animations.state.read"]),televet:Object.freeze(["televet.visit.create"])});function pr(e){return cr[e]}n(pr,"requires");function st(e,t,r){let o=pr(e),a=new Map;for(let c of t)a.set(c.resource,c);if(r?.isPending===true&&o.some(c=>!a.has(c)))return ye({name:e,enabled:false,isPending:true,limits:{}});let s=fr(o,a);return o.filter(c=>a.get(c)?.granted!==true).length===0?ye({name:e,enabled:true,isPending:false,limits:s}):ye({name:e,enabled:false,isPending:false,limits:s,disabled:yr(o,a)})}n(st,"decideCapability");function fr(e,t){let r={};for(let o of e){let a=t.get(o)?.limits;if(a)for(let[s,d]of Object.entries(a)){let c=r[s];r[s]=c===void 0?d:Math.min(c,d);}}return r}n(fr,"mergeLimits");function yr(e,t){for(let r of e){let o=t.get(r)?.disabled;if(o)return Object.freeze({reason:o.reason,level:o.level,recoverable:o.recoverable})}return Object.freeze({reason:U("accessDenied"),level:"user_entitlement",recoverable:false})}n(yr,"disabledFor");function ye(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),Object.freeze(t)}n(ye,"freezeDecision");function me(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}n(me,"ok");function P(e){return Object.freeze({ok:false,error:e})}n(P,"err");var J=class J extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,J.prototype);}};n(J,"EverfurConfigError");var B=J;var lt=Symbol.for("@everfur/sdk#EverfurContext@v1"),dt=globalThis,ut=dt[lt]??(dt[lt]=createContext(null));ut.displayName??="EverfurContext";function Z(){let e=useContext(ut);if(e===null)throw new B("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}n(Z,"useEverfurContext");function K(e){let{runtime:t}=Z(),r=t.entitlements,o=useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot);return useMemo(()=>st(e,o.decisions,{isPending:o.isPending}),[e,o])}n(K,"useCapability");var hr=48;function Er(e){return e.isPending?"pending":e.enabled?"enabled":"disabled"}n(Er,"selectView");function yt(e){let{capability:t,children:r,renderDisabled:o,renderPending:a,style:s}=e,d=K(t),c=useMemo(()=>Er(d),[d]);switch(c){case "enabled":return r;case "pending":return a?jsx(de,{render:a,fallback:jsx(pt,{capability:t,style:s})}):jsx(pt,{capability:t,style:s});case "disabled":return o?jsx(de,{render:()=>o(d),fallback:jsx(ft,{decision:d,style:s}),resetKey:d}):jsx(ft,{decision:d,style:s});default:return Q(c)}}n(yt,"CapabilityGate");function pt({capability:e,style:t}){let r=M(),o=useMemo(()=>mt(r),[r]);return jsx(View,{style:[o.offstate,t],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${e}`,children:jsx(View,{style:o.skeletonBar})})}n(pt,"PendingSkeleton");function ft({decision:e,style:t}){let r=M(),o=useMemo(()=>mt(r),[r]),a=e.disabled?.reason??"";return jsx(View,{style:[o.offstate,t],accessible:true,accessibilityRole:"text",accessibilityLabel:a,children:a.length>0?jsx($,{style:o.offstateText,children:a}):null})}n(ft,"OffState");function mt(e){let{color:t,space:r,radius:o,type:a}=e;return StyleSheet.create({offstate:{minHeight:hr,justifyContent:"center",paddingHorizontal:r.lg,paddingVertical:r.md,backgroundColor:t.surfaceCream,borderRadius:o.md,borderWidth:StyleSheet.hairlineWidth,borderColor:t.brandBorder},offstateText:{...Qe(e,"regular"),fontSize:a.size.body,lineHeight:Math.round(a.size.body*a.lineHeight.normal),color:t.text.muted},skeletonBar:{height:r.md,borderRadius:o.xs,backgroundColor:t.brandSofter}})}n(mt,"makeStyles");function _r(){let e=new Uint8Array(16),t=globalThis.crypto;if(typeof t?.getRandomValues=="function")t.getRandomValues(e);else for(let o=0;o<e.length;o+=1)e[o]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=[];for(let o=0;o<e.length;o+=1)r.push(e[o].toString(16).padStart(2,"0"));return r.slice(0,4).join("")+"-"+r.slice(4,6).join("")+"-"+r.slice(6,8).join("")+"-"+r.slice(8,10).join("")+"-"+r.slice(10,16).join("")}n(_r,"newSessionId");function Sr(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}n(Sr,"authHeaders");function q(e,t){return {...e,headers:{...Rr(e.headers),...Sr(t)}}}n(q,"withAuthHeaders");function Rr(e){if(!e)return {};let t={};for(let[r,o]of Object.entries(e)){let a=r.toLowerCase();a==="authorization"||a==="x-everfur-partner-key"||(t[r]=o);}return t}n(Rr,"stripAuthHeaders");async function bt(e,t){if(t.mode==="anonymous")return t.transport.request(q(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return P(ge())}let o=await t.transport.request(q(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(o.ok||o.error.httpStatus!==401)return o;let a;try{a=await t.identity.currentToken({forceRefresh:!0});}catch{return P(ge())}let s=await t.transport.request(q(e,{mode:"personalized",token:a,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?P(ge(s.error.httpStatus)):s}n(bt,"authedSend");function ge(e){return N("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}n(ge,"authRejectedError");function vt(e){return N("internalError",{retryable:true,wireMessage:Tr(e)})}n(vt,"networkError");function Tr(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}n(Tr,"describeCause");var Cr=3e4,wr=fe*2,kr="idempotency-key",xr=new Set(["POST","PUT","PATCH","DELETE"]),Fr=Object.freeze({onEvent(){}}),Pr=Object.freeze({setTimeout:n((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:n(e=>clearTimeout(e),"clearTimeout"),now:n(()=>Date.now(),"now")});function Or(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}n(Or,"seededIdempotencyKey");function ht(e){let t=e.observer??Fr,r=e.timers??Pr,o=e.rng??Math.random,a=e.sleep??((y,p)=>Vr(y,r,p)),s=e.maxAttempts??ot,d=e.unaryTimeoutMs??Cr,c=e.newIdempotencyKey??Ir(),m=n(y=>{try{t.onEvent(y);}catch{}},"emit");async function f(y,p,_){let S=_?.maxAttempts,F=Math.max(1,S??s),I=_?.idempotent??xr.has(p.method),h=_?.idempotencyKey===void 0?null:Or(_.idempotencyKey),C=I?h??c():null,z=Ar(p,C),l=0;for(;;){let v=n(T=>Object.freeze({call:y,method:p.method,path:p.path,attempt:l,...C?{idempotencyKey:C}:{},...T}),"stamp");m(v({phase:"attempt"}));let O=Kr(d,r),j=qr(O.signal,p.signal),i;try{i=await bt({...z,signal:j.signal},e.auth);}catch(T){i=P(vt(T));}finally{j.dispose(),O.cancel();}if(i.ok)return m(v({phase:"settled",ok:true,reason:"ok"})),i;let u=i.error,g=Dr(u,l,{maxAttempts:F,rng:o,now:r.now(),aborted:p.signal?.aborted===true,...S!==void 0?{perCallMaxAttempts:S}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),R={ok:false,code:u.code,reason:g.reason,...u.httpStatus!==void 0?{httpStatus:u.httpStatus}:{},...u.requestId!==void 0?{requestId:u.requestId}:{}};if(!g.retry)return m(v({phase:"settled",...R})),P(u);if(m(v({phase:"retry",...R,delayMs:g.delayMs})),await a(g.delayMs,p.signal),p.signal?.aborted===true)return m(v({phase:"settled",...R,reason:"aborted"})),P(u);l+=1;}}n(f,"send");async function b(y){return q(y,await Br(e.auth))}n(b,"authorize");async function*E(y,p,_){m(Object.freeze({call:y,phase:"stream.open",method:p.method,path:p.path,attempt:0}));try{yield*e.auth.transport.stream(p,_);}catch{yield $e({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return n(E,"stream"),Object.freeze({send:f,authorize:b,stream:E})}n(ht,"createRequestFunnel");function Ar(e,t){let r={};for(let[o,a]of Object.entries(e.headers??{}))o.toLowerCase()!==kr&&(r[o]=a);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}n(Ar,"assembleHeaders");function Ir(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}n(Ir,"defaultIdempotencyKeyFactory");var Mr=10;function Dr(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let o=zr(e);if(o==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(o!=="burst"&&!pe(e.code))return {retry:false,reason:"terminal-code"};let a=o==="burst"?"burst-throttle":"retryable-code";if(n(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let d=n(()=>{if(r.policy===void 0)return null;let f;try{f=r.policy.maxAttempts(e.code);}catch{return null}return typeof f!="number"||!Number.isFinite(f)?null:Math.max(1,Math.min(Mr,Math.floor(f)))},"policyCeiling"),c=r.perCallMaxAttempts??d()??r.maxAttempts;if(t+1>=c)return {retry:false,reason:"attempts-exhausted"};let m=jr(e,r.now);return m!==null?m>wr?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:a,delayMs:m}:{retry:true,reason:a,delayMs:at(t,r.rng)}}n(Dr,"decideRetry");function zr(e){let t=e.code==="unknown"?rt(Ur(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}n(zr,"throttleKind");function jr(e,t){let r=Nr(e.raw);if(r===null)return null;let o=r-t;return o>0?o:0}n(jr,"retryOverrideMs");function Nr(e){for(let t of Et(e)){let r=t.resets_at,o=Lr(r);if(o!==null)return o}return null}n(Nr,"findResetsAt");function Et(e){if(!gt(e))return [];let t=[e];for(let r of ["error","detail"]){let o=e[r];gt(o)&&t.push(o);}return t}n(Et,"candidateScopes");function Lr(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}n(Lr,"parseInstantMs");function Ur(e){for(let t of Et(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}n(Ur,"rawWireCode");function gt(e){return typeof e=="object"&&e!==null}n(gt,"isRecord");async function Br(e){return e.mode==="anonymous"?{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}:{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}n(Br,"resolveDeviceAuth");function Kr(e,t){let r=new AbortController,o=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:n(()=>t.clearTimeout(o),"cancel")}}n(Kr,"boundedSignal");function qr(e,t){let r=n(()=>{},"noop");if(!t)return {signal:e,dispose:r};let o=new AbortController;if(e.aborted||t.aborted)return o.abort(),{signal:o.signal,dispose:r};let a=n(()=>o.abort(),"onAbort");return e.addEventListener("abort",a,{once:true}),t.addEventListener("abort",a,{once:true}),{signal:o.signal,dispose:n(()=>{e.removeEventListener("abort",a),t.removeEventListener("abort",a);},"dispose")}}n(qr,"mergeSignals");function Vr(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(o=>{let a=t.setTimeout(()=>{r?.removeEventListener("abort",s),o();},e),s=n(()=>{t.clearTimeout(a),o();},"onAbort");r?.addEventListener("abort",s,{once:true});})}n(Vr,"delayAbortable");function _t(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let o=e.charCodeAt(t+1);if(!(o>=56320&&o<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}n(_t,"hasLoneSurrogate");function he(e){let t={url:e.url,kind:e.kind,expiresAt:e.expires_at};return typeof e.loop_duration_ms=="number"&&(t.loopDurationMs=e.loop_duration_ms),typeof e.cache_key=="string"&&e.cache_key.length>0&&(t.cacheKey=e.cache_key),Object.freeze(t)}n(he,"mapTier");function Ee(e){let t={};e.tiers.animation&&(t.animation=he(e.tiers.animation)),e.tiers.image&&(t.image=he(e.tiers.image));let r={};e.overlays.weather_alert&&(r.weatherAlert=he(e.overlays.weather_alert));let o={category:e.category,tiers:Object.freeze(t),overlays:Object.freeze(r),idle:"bundled",ttlSeconds:e.ttl_seconds,degraded:e.degraded};return typeof e.cache_epoch=="number"&&(o.cacheEpoch=e.cache_epoch),Object.freeze(o)}n(Ee,"mapPetStateResponse");var Hr=z.enum(["webp","video"]),Wr=z.enum(["health","attention","moment","activity","mood","idle"]),_e=z.object({url:z.string(),kind:Hr.default("webp"),loop_duration_ms:z.number().nullish(),expires_at:z.string(),cache_key:z.string().nullish()}),St=z.object({category:Wr,tiers:z.object({animation:_e.optional(),image:_e.optional()}).default({}),overlays:z.object({weather_alert:_e.optional()}).default({}),idle:z.literal("bundled").default("bundled"),ttl_seconds:z.number(),degraded:z.boolean().default(false),cache_epoch:z.number().default(0)});function Se(e){let t=St.safeParse(e);return t.success?t.data:null}n(Se,"parsePetStateWire");function Re(e){return Gr(ht({auth:e}))}n(Re,"createPetStateRepository");function Gr(e){return {async getState(t,r){if(_t(t))return P(N("validationFailed",{retryable:false,wireMessage:"pet_ref contains an unpaired surrogate and cannot be encoded"}));let o=`/widget/v1/pets/${encodeURIComponent(t)}/state`,a=await e.send("animations.getState",r?.signal?{method:"GET",path:o,signal:r.signal}:{method:"GET",path:o});if(a.ok){let s=Se(a.value);return s===null?P(N("internalError",{retryable:true})):me(Ee(s))}return a.error.httpStatus===404?me(null):P(a.error)}}}n(Gr,"createPetStateRepositoryOver");function Te(e){if(e===void 0)return "bundled:none";if(typeof e=="number")return `bundled:${e}`;if("kind"in e)return `bundled:${e.id}`;let t=e.uri,r=t.indexOf("?");return r===-1?t:t.slice(0,r)}n(Te,"stableMediaKey");function Ce(e){return e.hasPhoto&&!e.photoFailed?"photo":e.canAnimate&&!e.animationFailed?"animation":e.hasImage&&!e.imageFailed?"image":"idle"}n(Ce,"selectTier");function we(e,t){switch(e){case "photo":return {failed:V({...t,photo:true}),reason:"network_error"};case "animation":return {failed:V({...t,animation:true}),reason:"network_error"};case "image":return {failed:V({...t,image:true}),reason:"network_error"};case "idle":return {failed:V(t),reason:"idle_asset_failed"};default:return {failed:V(t),reason:"network_error"}}}n(we,"retireTier");var H=Object.freeze({photo:false,animation:false,image:false});function V(e){return Object.freeze({photo:e.photo,animation:e.animation,image:e.image})}n(V,"freezeFailed");function Yr(e){switch(e){case "activity":case "mood":case "moment":case "idle":return true;case "health":case "attention":return false;default:return false}}n(Yr,"isLoaderSafeCategory");var ke="everfur.petState.cacheEpoch";function xe(e){let t=0,r=false,o=null,a=n(async s=>{if(r||(t=await $r(e.kv),r=true),s<=t)return false;try{await e.kv.setItem(ke,String(s));}catch{}t=s;try{await e.cache.clearMemoryCache();}catch{}try{await e.cache.clearDiskCache();}catch{}return true},"run");return {async sync(s){return typeof s!="number"||!Number.isFinite(s)||s<=0||r&&s<=t?false:o||(o=a(s).finally(()=>{o=null;}),o)}}}n(xe,"createCacheEpochGuard");async function $r(e){let t;try{t=await e.getItem(ke);}catch{return 0}if(t===null)return 0;let r=Number(t);return Number.isFinite(r)&&r>0?r:0}n($r,"readStoredEpoch");var Fe=1,Pe="everfur.manifest.lastKnownGood",L=Object.freeze({kind:"bundled",id:"everfur-idle"}),W=Object.freeze({schemaVersion:Fe,revision:"compiled-default",surfaces:Object.freeze({animations:Object.freeze({enabled:true,idle:L})})}),Qr=z.object({kind:z.literal("bundled"),id:z.string().min(1)}),Xr=z.object({enabled:z.boolean().default(true),idle:Qr.optional()}),Jr=z.object({schema_version:z.number().int(),revision:z.string().default(""),surfaces:z.object({animations:Xr.optional()}).default({})});function Oe(e){let t=Jr.safeParse(e);if(!t.success)return {ok:false,reason:"unparseable"};if(t.data.schema_version>Fe)return {ok:false,reason:"newer_schema"};let r=t.data.surfaces.animations,o={};return r&&(o.animations=Object.freeze({enabled:r.enabled,idle:r.idle?Object.freeze({...r.idle}):L})),{ok:true,manifest:Object.freeze({schemaVersion:t.data.schema_version,revision:t.data.revision,surfaces:Object.freeze(o)})}}n(Oe,"parseManifest");async function Zr(e,t,r){if(e!=null){let a=Oe(e);if(a.ok)return await en(t,e),r.track("manifest.fallback",{source:"live"}),Object.freeze({manifest:a.manifest,source:"live"});a.reason==="newer_schema"&&r.track("manifest.refused_newer",{});}let o=await tn(t);return o?(r.track("manifest.fallback",{source:"last-known-good"}),Object.freeze({manifest:o,source:"last-known-good"})):(r.track("manifest.fallback",{source:"compiled-default"}),Object.freeze({manifest:W,source:"compiled-default"}))}n(Zr,"resolveManifest");function Ae(e){return e.surfaces.animations??W.surfaces.animations??{enabled:true,idle:L}}n(Ae,"animationsSurfaceOf");async function en(e,t){try{await e.setItem(Pe,JSON.stringify(t));}catch{}}n(en,"writeLastKnownGood");async function tn(e){let t;try{t=await e.getItem(Pe);}catch{return null}if(t===null)return null;let r;try{r=JSON.parse(t);}catch{return null}let o=Oe(r);return o.ok?o.manifest:null}n(tn,"readLastKnownGood");var Rt=Object.freeze({data:null,isPending:false,isError:false,error:null,isDark:false});function Ie(e){let{repo:t,cacheEpoch:r,timers:o}=e,a=new Set,s=new Map,d=Rt,c=null,m=null,f=false,b=null,E=null,y=null,p=0,_=n(()=>{for(let i of a)i();},"emit"),S=n(i=>{d=Object.freeze({...d,...i}),_();},"patch"),F=n(()=>{E!==null&&(o.clearTimeout(E),E=null);},"clearRemint"),I=n(i=>i?Math.max(1,i.ttlSeconds)*1e3:6e4,"staleMs"),h=n(i=>{let u=s.get(i);u!==void 0&&(s.delete(i),s.set(i,u));},"touchWarm"),C=n((i,u)=>{for(s.delete(i),s.set(i,Object.freeze({data:u,fetchedAt:o.now()}));s.size>32;){let g=s.keys().next().value;if(g===void 0||g===i)break;s.delete(g);}},"setWarm"),z=n(i=>{let u=s.get(i);return u?!!(u.data.tiers.animation||u.data.tiers.image):false},"hasGoodTiers"),l=n((i,u)=>{if(F(),!f)return;let g=Math.max(1,u)*1e3,R=p;E=o.setTimeout(()=>{E=null,!(R!==p||c!==i||!f)&&v(i,0);},g);},"scheduleRemint"),v=n(async(i,u)=>{if(c!==i||b===i||!f)return;let g=p;y?.abort();let R=new AbortController;y=R;let T=await t.getState(i,{signal:R.signal});if(!(g!==p||c!==i)){if(T.ok){let w=T.value;if(w===null){O(i);return}r.sync(w.cacheEpoch);let ne=!!(w.tiers.animation||w.tiers.image);if(w.degraded&&!ne&&z(i)){S({isError:false,error:null,isPending:false,isDark:false}),l(i,w.ttlSeconds);return}C(i,w),m=i,S({data:w,isPending:false,isError:false,error:null,isDark:false}),l(i,w.ttlSeconds);return}if(Tt(T.error)){j(i,T.error);return}if(S({isError:true,error:T.error,isPending:d.data===null&&m!==i}),u<2){F();let w=500*(u+1),ne=p;E=o.setTimeout(()=>{E=null,!(ne!==p||c!==i||!f)&&v(i,u+1);},w);}else l(i,5);}},"fetchOnce"),O=n(i=>{b=i,s.delete(i),F(),m=i,S({data:null,isPending:false,isError:false,error:null,isDark:true});},"onTerminalDark"),j=n((i,u)=>{b=i,s.delete(i),F(),m=i,S({data:null,isPending:false,isError:false,error:u,isDark:true});},"onTerminalDisabled");return {observe(i,u){let g=u.isFocused!==f;if(f=u.isFocused,i!==c){if(p+=1,y?.abort(),y=null,F(),b=null,c=i,i===null){m=null,d=Rt,_();return}let T=s.get(i),w=T&&o.now()-T.fetchedAt<I(T.data)?T:null;w?(h(i),m=i,S({data:w.data,isPending:false,isError:false,error:null,isDark:false})):S({isPending:true,isError:false,error:null,isDark:false}),f&&v(i,0);return}if(!g||i===null)return;if(!f){F();return}let R=s.get(i);!R||o.now()-R.fetchedAt>=I(R.data)?b!==i&&v(i,0):l(i,R.data.ttlSeconds);},getSnapshot(){return d},subscribe(i){return a.add(i),()=>{a.delete(i);}},getCachedPetStateMedia(i){let u=s.get(i);return !u||o.now()-u.fetchedAt>=I(u.data)?null:(h(i),u.data)},dispose(){p+=1,y?.abort(),y=null,F(),a.clear(),s.clear();}}}n(Ie,"createPetStateStore");function Tt(e){if(typeof e!="object"||e===null)return false;let t=e,r=typeof t.status=="number"?t.status:t.httpStatus;return r===403||r===404}n(Tt,"isTerminalPetStateError");var Ct=Object.freeze({track(){},trackExpectedFailure(){}});function ee(e){let t=e.telemetry??Ct,r=e.timers??on(e.now),o=Ie({repo:e.repo,cacheEpoch:xe({kv:e.kv,cache:e.cache}),timers:r}),a=new Set,s=H,d="none",c=false,m=null,f=null,b=false,E=0,y="",p=nn(S()),_=false;function S(){let l=e.manifest?e.manifest():W;return Ae(l)}n(S,"surface");let F=n(()=>{for(let l of a)l();},"emit"),I=o.subscribe(()=>{h();});function h(){let l=o.getSnapshot();(l.data!==f||l.isDark!==b)&&(f=l.data,b=l.isDark,s=H,d=l.isDark?"dark_or_missing":"none",E+=1),C(l);}n(h,"onStoreChange");function C(l=o.getSnapshot()){let v=S(),O=rn(v,l,{failed:s,fallbackReason:d,paused:c,photoUrl:m,reducedMotion:e.reducedMotion()});p=O,z(O),F();}n(C,"recompute");function z(l){if(l.kind!=="ready")return;let v=`${l.category}|${l.tier}|${l.fallbackReason}|${l.reducedMotion?1:0}`;v!==y&&(y=v,t.track("pet_state_shown",{category:l.category,tier:l.tier,fallback_reason:l.fallbackReason,reduced_motion:l.reducedMotion}),l.fallbackReason==="idle_asset_failed"&&t.trackExpectedFailure("idle_asset_failed",{category:l.category}));}return n(z,"maybeEmitShown"),{observe(l,v){_||(m=v.photoUrl??null,s=H,o.observe(l,{isFocused:v.isFocused}),h());},getState(){return p},subscribe(l){return a.add(l),()=>{a.delete(l);}},onMediaError(){if(_||p.kind!=="ready")return;let l=we(p.tier,s);s=l.failed,d=l.reason,C();},setPaused(l){_||c===l||(c=l,C());},dispose(){_||(_=true,I(),o.dispose(),a.clear());}}}n(ee,"createAnimationController");function rn(e,t,r){let o=e.idle;if(!e.enabled)return Object.freeze({kind:"disabled",reason:U("accessDenied"),level:"partner_config",source:o,idle:e.idle});if(t.isPending&&t.data===null&&!t.isDark)return Object.freeze({kind:"pending",showSkeleton:true,source:o});let a=t.data,s=a?.category??"idle",d=a?.tiers.animation,c=a?.tiers.image,m=!!d&&d?.kind==="webp"&&!r.reducedMotion&&!r.failed.animation,f=Ce({hasPhoto:r.photoUrl!==null&&r.photoUrl.length>0,photoFailed:r.failed.photo,canAnimate:m,animationFailed:r.failed.animation,hasImage:!!c,imageFailed:r.failed.image}),b=o,E=null,y=false;f==="photo"&&r.photoUrl?b=Me(r.photoUrl,void 0):f==="animation"&&d?(b=Me(d.url,d.cacheKey),E=d.loopDurationMs??null,y=d.cacheKey!==void 0):f==="image"&&c&&(b=Me(c.url,c.cacheKey),y=c.cacheKey!==void 0);let p=b.kind==="uri"?b.cacheKey:`bundled:${b.id}`;return Object.freeze({kind:"ready",tier:f,source:b,recyclingKey:p,category:s,loopDurationMs:E,paused:r.paused,reducedMotion:r.reducedMotion,cacheHit:y,fallbackReason:r.fallbackReason,isDark:t.isDark,isTransientError:t.isError})}n(rn,"buildView");function Me(e,t){return Object.freeze({kind:"uri",uri:e,cacheKey:t??Te({uri:e})})}n(Me,"uriSource");function nn(e){return Object.freeze({kind:"pending",showSkeleton:true,source:e.idle})}n(nn,"pendingView");function on(e){return {setTimeout:n((t,r)=>setTimeout(t,r),"setTimeout"),clearTimeout:n(t=>clearTimeout(t),"clearTimeout"),now:e}}n(on,"defaultTimers");var dn=Object.freeze({kind:"pending",showSkeleton:true,source:L}),un=n(()=>{},"NOOP_UNSUBSCRIBE");function ze(e){let{petRef:t,repo:r,cache:o,kv:a,isFocused:s=true,photoUrl:d=null,telemetry:c,reducedMotion:m,manifest:f,timers:b,now:E}=e,{runtime:y,userRef:p}=Z(),_=K("animations"),S=cn(m),I=r!==void 0&&o!==void 0&&a!==void 0?"override":`${p??""}|${t??""}`,[h,C]=useState(null);useEffect(()=>{if(r!==void 0&&o!==void 0&&a!==void 0){let g={repo:r,cache:o,kv:a,reducedMotion:S,now:E??kt,...c?{telemetry:c}:{},...f?{manifest:f}:{},...b?{timers:b}:{}},R=ee(g);return C(R),()=>{C(T=>T===R?null:T),R.dispose();}}let{services:i}=y.registry,u=y.registry.acquire("animations",`${p??""}|${t??""}`,()=>ee({repo:Re(i.authFor(p)),cache:i.imageCache,kv:i.kv,reducedMotion:S,now:E??kt,telemetry:i.telemetry,...f?{manifest:f}:{},...b?{timers:b}:{}}),g=>g.dispose());return C(u),()=>{C(g=>g===u?null:g),y.registry.release(u);}},[I,r,o,a,y]),useEffect(()=>{h?.observe(t,{isFocused:s,photoUrl:d});},[h,t,s,d]);let z=useCallback(i=>h?h.subscribe(i):un,[h]),l=useCallback(()=>h?h.getState():dn,[h]),v=useSyncExternalStore(z,l,l),O=useCallback(()=>{h?.onMediaError();},[h]),j=useCallback(i=>{h?.setPaused(i);},[h]);return useMemo(()=>({capability:_,state:v,onMediaError:O,setPaused:j}),[_,v,O,j])}n(ze,"useAnimations");function cn(e){let t=useRef(true);return useEffect(()=>{if(e)return;let r=true,o=AccessibilityInfo.isReduceMotionEnabled?.();o&&typeof o.then=="function"&&o.then(s=>{r&&(t.current=s);});let a=AccessibilityInfo.addEventListener?.("reduceMotionChanged",s=>{t.current=s;});return ()=>{r=false,a?.remove?.();}},[e]),useMemo(()=>e??(()=>t.current),[e])}n(cn,"useSystemReducedMotion");function kt(){return Date.now()}n(kt,"defaultNow");var vn=200,gn=300,je=120;function hn(e){let{style:t,accessibilityLabel:r}=e,o={accessibilityLabel:r,decorative:At(e)};return jsx(yt,{capability:"animations",style:t,renderPending:()=>jsx(re,{style:t,a11y:o,busy:true}),renderDisabled:a=>jsx(re,{style:t,a11y:o,reason:a.disabled?.reason??""}),children:jsx(En,{...e})})}n(hn,"PetStateView");function At(e){return e.decorative===true||e.accessibilityLabel===void 0}n(At,"isDecorative");function En(e){let t=Ne(),r={accessibilityLabel:e.accessibilityLabel,decorative:At(e)},o=ze(Rn(e));return jsx(View,{style:[t.container,e.style],children:_n(o.state,o.onMediaError,r)})}n(En,"PetStateBody");function _n(e,t,r){switch(e.kind){case "pending":return jsx(Pt,{source:e.source,recyclingKey:"pending",reducedMotion:true,a11y:r,busy:true,onMediaError:t});case "disabled":return jsx(re,{a11y:r,reason:e.reason});case "ready":return jsx(Pt,{source:e.source,recyclingKey:e.recyclingKey,reducedMotion:e.reducedMotion,a11y:r,onMediaError:t});default:return Q(e)}}n(_n,"renderState");function Pt({source:e,recyclingKey:t,reducedMotion:r,a11y:o,busy:a,onMediaError:s}){let d=Ne();return e.kind==="uri"?jsx(Image,{source:{uri:e.uri},onError:s,fadeDuration:r?0:vn,style:d.media,...It(o)},t):jsx(re,{a11y:o,busy:a})}n(Pt,"MediaNode");function re({style:e,a11y:t,busy:r,reason:o}){let a=Ne();return jsxs(View,{style:[a.idlePlaceholder,e],...It(t),children:[r?jsx(Sn,{}):null,o&&o.length>0?jsx($,{style:a.reasonText,children:o}):null]})}n(re,"IdleRegion");function Sn(){let e=M(),[t,r]=useState(false);return useEffect(()=>{let o=setTimeout(()=>r(true),gn);return ()=>clearTimeout(o)},[]),t?jsx(ActivityIndicator,{color:e.color.brand}):null}n(Sn,"DelayedSpinner");function It(e){if(e.decorative)return {accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};let t=e.accessibilityLabel;return t!==void 0?{accessible:true,accessibilityRole:"image",accessibilityLabel:t}:{accessible:true,accessibilityRole:"image"}}n(It,"a11yProps");function Rn(e){let t={petRef:e.petRef,repo:e.repo,cache:e.cache,kv:e.kv};return e.isFocused!==void 0&&(t.isFocused=e.isFocused),e.photoUrl!==void 0&&(t.photoUrl=e.photoUrl),e.telemetry!==void 0&&(t.telemetry=e.telemetry),e.reducedMotion!==void 0&&(t.reducedMotion=e.reducedMotion),e.manifest!==void 0&&(t.manifest=e.manifest),e.timers!==void 0&&(t.timers=e.timers),e.now!==void 0&&(t.now=e.now),t}n(Rn,"buildParams");function Ne(){let e=M();return useMemo(()=>Tn(e),[e])}n(Ne,"useStyles");function Tn(e){return StyleSheet.create({container:{minHeight:je,width:"100%",backgroundColor:e.color.surfaceCream,borderRadius:e.radius.lg,overflow:"hidden"},media:{minHeight:je,width:"100%"},idlePlaceholder:{minHeight:je,width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:e.color.surfaceCream,borderRadius:e.radius.lg,borderWidth:StyleSheet.hairlineWidth,borderColor:e.color.borderRingCream,padding:e.space.lg},reasonText:{marginTop:e.space.sm,fontFamily:e.type.family,fontSize:e.type.size.bodyTight,lineHeight:Math.round(e.type.size.bodyTight*e.type.lineHeight.normal),fontWeight:e.type.weight.medium,color:e.color.text.muted,textAlign:"center"}})}n(Tn,"makeStyles");export{ke as CACHE_EPOCH_STORAGE_KEY,L as COMPILED_DEFAULT_IDLE,W as COMPILED_DEFAULT_MANIFEST,Pe as MANIFEST_LKG_STORAGE_KEY,H as NO_FAILURES,hn as PetStateView,Fe as SUPPORTED_SCHEMA_VERSION,Ae as animationsSurfaceOf,ee as createAnimationController,xe as createCacheEpochGuard,Re as createPetStateRepository,Ie as createPetStateStore,Yr as isLoaderSafeCategory,Tt as isTerminalPetStateError,Ee as mapPetStateResponse,_r as newSessionId,Oe as parseManifest,Se as parsePetStateWire,St as petStateResponseWireSchema,Zr as resolveManifest,we as retireTier,Ce as selectTier,Te as stableMediaKey,ze as useAnimations};
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurError } from './EverfurResult-DN9pL2Ab.cjs';
2
- import { R as RequestFunnel } from './requestFunnel-L-BQfi0z.cjs';
2
+ import { R as RequestFunnel } from './requestFunnel-BjDpqqvm.cjs';
3
3
  import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports-BN6RHF9W.cjs';
4
- import { R as ReadableStore, T as Timers } from './ports-DEBzEhbp.cjs';
4
+ import { R as ReadableStore, T as Timers } from './ports-BY2ph0_y.cjs';
5
5
 
6
6
  /** The image MIME types the chat accepts (the server's `CHAT_ATTACHMENT` rule, plus the `image/jpg` alias). */
7
7
  declare const ATTACHMENT_MIME_TYPES: readonly string[];
@@ -1,10 +1,11 @@
1
1
  import { E as EverfurError, c as EverfurResult } from './EverfurResult-DN9pL2Ab.js';
2
2
  import { C as ConversationId, P as PetRef, b as ResponseId } from './ids-B2GAAifq.js';
3
- import { f as ChatFeedbackType, j as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-DMolTRzU.js';
4
- import { C as CheckinAnswer, a as CheckinOutcome, b as WidgetPet } from './casesRepository-ClLv6qMl.js';
5
- import { i as UrgencyLevel } from './config-DW60uRb9.js';
3
+ import { f as ChatFeedbackType, j as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-D7YW8qz9.js';
4
+ import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-v6QczS9N.js';
5
+ import { i as UrgencyLevel } from './config-C7eb_IMD.js';
6
+ import { W as WidgetPet } from './petsRepository-Bk6GDwLs.js';
6
7
  import { U as UploadTransport, F as FileHandle } from './ports-BN6RHF9W.js';
7
- import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-Bw3iMQgu.js';
8
+ import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-DpldrvIW.js';
8
9
 
9
10
  /** The three thumbs. `'neutral'` is the app's rotated thumbs-down glyph. */
10
11
  type ChatSentiment = 'up' | 'neutral' | 'down';
@@ -1,10 +1,11 @@
1
1
  import { E as EverfurError, c as EverfurResult } from './EverfurResult-DN9pL2Ab.cjs';
2
2
  import { C as ConversationId, P as PetRef, b as ResponseId } from './ids-B2GAAifq.cjs';
3
- import { f as ChatFeedbackType, j as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-DEBzEhbp.cjs';
4
- import { C as CheckinAnswer, a as CheckinOutcome, b as WidgetPet } from './casesRepository-DHwtGRYY.cjs';
5
- import { i as UrgencyLevel } from './config-CzTZGlfF.cjs';
3
+ import { f as ChatFeedbackType, j as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-BY2ph0_y.cjs';
4
+ import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-DwtZVsbj.cjs';
5
+ import { i as UrgencyLevel } from './config--Wu1Umhd.cjs';
6
+ import { W as WidgetPet } from './petsRepository-B_gKbAzJ.cjs';
6
7
  import { U as UploadTransport, F as FileHandle } from './ports-BN6RHF9W.cjs';
7
- import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-CQgFrEQ7.cjs';
8
+ import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-BorG422I.cjs';
8
9
 
9
10
  /** The three thumbs. `'neutral'` is the app's rotated thumbs-down glyph. */
10
11
  type ChatSentiment = 'up' | 'neutral' | 'down';
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurError } from './EverfurResult-DN9pL2Ab.js';
2
- import { R as RequestFunnel } from './requestFunnel-CjW7uDuA.js';
2
+ import { R as RequestFunnel } from './requestFunnel-DFMGcluw.js';
3
3
  import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports-BN6RHF9W.js';
4
- import { R as ReadableStore, T as Timers } from './ports-DMolTRzU.js';
4
+ import { R as ReadableStore, T as Timers } from './ports-D7YW8qz9.js';
5
5
 
6
6
  /** The image MIME types the chat accepts (the server's `CHAT_ATTACHMENT` rule, plus the `image/jpg` alias). */
7
7
  declare const ATTACHMENT_MIME_TYPES: readonly string[];