@everfur/sdk 0.1.1 → 0.3.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.
- package/CHANGELOG.md +634 -0
- package/README.md +58 -23
- package/consent/package.json +8 -0
- package/dist/Chat-DPUD6dnc.d.cts +128 -0
- package/dist/Chat-DwAC2vhB.d.ts +128 -0
- package/dist/DepthViews-DNEM96Se.d.ts +16 -0
- package/dist/DepthViews-DP0R-DhB.d.cts +19 -0
- package/dist/DepthViews-D_3hl4xk.d.ts +19 -0
- package/dist/DepthViews-DbFhR4Du.d.cts +16 -0
- package/dist/ErrorPolicyPort-CNf4uQZP.d.cts +22 -0
- package/dist/ErrorPolicyPort-CwbfmxzJ.d.ts +22 -0
- package/dist/{EverfurResult-D92-uL82.d.cts → EverfurResult-DN9pL2Ab.d.cts} +11 -10
- package/dist/{EverfurResult-D92-uL82.d.ts → EverfurResult-DN9pL2Ab.d.ts} +11 -10
- package/dist/{PhotoController-BItt5M7u.d.cts → PhotoController-3l7MT9jA.d.cts} +1 -1
- package/dist/{PhotoController-D8zMTdcW.d.ts → PhotoController-vzY5bfY_.d.ts} +1 -1
- package/dist/animations/index.cjs +1 -1997
- package/dist/animations/index.d.cts +35 -35
- package/dist/animations/index.d.ts +35 -35
- package/dist/animations/index.js +1 -1972
- package/dist/attachments-5NeobOCd.d.ts +256 -0
- package/dist/attachments-Bw3iMQgu.d.ts +146 -0
- package/dist/attachments-CQgFrEQ7.d.cts +146 -0
- package/dist/attachments-D8T5re7e.d.cts +256 -0
- package/dist/casesRepository-ClLv6qMl.d.ts +188 -0
- package/dist/casesRepository-DHwtGRYY.d.cts +188 -0
- package/dist/chat/index.cjs +1 -1170
- package/dist/chat/index.d.cts +31 -53
- package/dist/chat/index.d.ts +31 -53
- package/dist/chat/index.js +1 -1167
- package/dist/client/index.cjs +9 -2315
- package/dist/client/index.d.cts +77 -15
- package/dist/client/index.d.ts +77 -15
- package/dist/client/index.js +9 -2215
- package/dist/{config-CiJ0PVBB.d.ts → config-CzTZGlfF.d.cts} +63 -25
- package/dist/{config-BSjBdxrZ.d.cts → config-DW60uRb9.d.ts} +63 -25
- package/dist/consent/index.cjs +1 -0
- package/dist/consent/index.d.cts +33 -0
- package/dist/consent/index.d.ts +33 -0
- package/dist/consent/index.js +1 -0
- package/dist/context-DXhqHlPU.d.ts +159 -0
- package/dist/context-XvTzq1tE.d.cts +159 -0
- package/dist/copy-Mjoo91aS.d.ts +198 -0
- package/dist/copy-bKDNigLb.d.cts +198 -0
- package/dist/core/index.cjs +13 -3178
- package/dist/core/index.d.cts +58 -12
- package/dist/core/index.d.ts +58 -12
- package/dist/core/index.js +13 -3166
- package/dist/depth-CErXCU8J.d.cts +502 -0
- package/dist/depth-DjDcJ6kH.d.ts +502 -0
- package/dist/entitlementRepository-DKdXFgTo.d.cts +698 -0
- package/dist/entitlementRepository-DSbzuyAW.d.ts +698 -0
- package/dist/{identity-DK9zORrG.d.ts → identity-BMx2SUOM.d.ts} +19 -6
- package/dist/{identity-Brl-lDd6.d.cts → identity-DI4eVx9S.d.cts} +19 -6
- package/dist/{ids-CJ1S6adf.d.cts → ids-B2GAAifq.d.cts} +1 -1
- package/dist/{ids-CJ1S6adf.d.ts → ids-B2GAAifq.d.ts} +1 -1
- package/dist/index.cjs +12 -4494
- package/dist/index.d.cts +29 -121
- package/dist/index.d.ts +29 -121
- package/dist/index.js +12 -4470
- package/dist/models-B-Uh2LTf.d.ts +214 -0
- package/dist/models-D2EUxPZY.d.cts +214 -0
- package/dist/notifications/index.cjs +2 -0
- package/dist/notifications/index.d.cts +17 -0
- package/dist/notifications/index.d.ts +17 -0
- package/dist/notifications/index.js +2 -0
- package/dist/pets-CtQdRpWo.d.ts +92 -0
- package/dist/pets-aB8q0JyX.d.cts +92 -0
- package/dist/photo/index.cjs +1 -2189
- package/dist/photo/index.d.cts +6 -6
- package/dist/photo/index.d.ts +6 -6
- package/dist/photo/index.js +1 -2186
- package/dist/ports-BN6RHF9W.d.cts +48 -0
- package/dist/ports-BN6RHF9W.d.ts +48 -0
- package/dist/ports-DEBzEhbp.d.cts +386 -0
- package/dist/ports-DMolTRzU.d.ts +386 -0
- package/dist/profile-CSs1wlXT.d.cts +93 -0
- package/dist/profile-CSs1wlXT.d.ts +93 -0
- package/dist/records/depth/index.cjs +2 -0
- package/dist/records/depth/index.d.cts +13 -0
- package/dist/records/depth/index.d.ts +13 -0
- package/dist/records/depth/index.js +2 -0
- package/dist/records/index.cjs +3 -2839
- package/dist/records/index.d.cts +137 -203
- package/dist/records/index.d.ts +137 -203
- package/dist/records/index.js +3 -2833
- package/dist/requestFunnel-CjW7uDuA.d.ts +87 -0
- package/dist/requestFunnel-L-BQfi0z.d.cts +87 -0
- package/dist/{resolve-Dq_4_agU.d.ts → resolve-D4Ywz5OS.d.cts} +10 -4
- package/dist/{resolve-Dq_4_agU.d.cts → resolve-D4Ywz5OS.d.ts} +10 -4
- package/dist/{runtime-Bvr8yqXm.d.cts → runtime-B8s-_hv8.d.cts} +121 -59
- package/dist/{runtime-BIYzf9cK.d.ts → runtime-BR9ysG0J.d.ts} +121 -59
- package/dist/server/events/index.cjs +2 -0
- package/dist/server/events/index.d.cts +550 -0
- package/dist/server/events/index.d.ts +550 -0
- package/dist/server/events/index.js +2 -0
- package/dist/server/index.cjs +2 -533
- package/dist/server/index.d.cts +73 -18
- package/dist/server/index.d.ts +73 -18
- package/dist/server/index.js +2 -530
- package/dist/species-BXAIMh7I.d.cts +9 -0
- package/dist/species-BXAIMh7I.d.ts +9 -0
- package/dist/televet/index.cjs +1 -0
- package/dist/televet/index.d.cts +60 -0
- package/dist/televet/index.d.ts +60 -0
- package/dist/televet/index.js +1 -0
- package/dist/testing/index.cjs +5 -823
- package/dist/testing/index.d.cts +17 -3
- package/dist/testing/index.d.ts +17 -3
- package/dist/testing/index.js +5 -820
- package/dist/testing/rn/index.cjs +1 -449
- package/dist/testing/rn/index.d.cts +17 -29
- package/dist/testing/rn/index.d.ts +17 -29
- package/dist/testing/rn/index.js +1 -444
- package/dist/testing/web/index.cjs +1 -0
- package/dist/testing/web/index.d.cts +131 -0
- package/dist/testing/web/index.d.ts +131 -0
- package/dist/testing/web/index.js +1 -0
- package/dist/timelineRows-CaohZzXS.d.cts +19 -0
- package/dist/timelineRows-DZed6dAM.d.ts +19 -0
- package/dist/typeStyle-0TydiZ1w.d.cts +19 -0
- package/dist/typeStyle-CWMsoe6b.d.ts +19 -0
- package/dist/uploadTransport-D0M0T4hN.d.ts +38 -0
- package/dist/uploadTransport-DKJHs3Yj.d.cts +38 -0
- package/dist/useRecordsDepth-BHBzJ76R.d.cts +237 -0
- package/dist/useRecordsDepth-BU-OhzH6.d.ts +237 -0
- package/dist/useVetVisit-Bc84hWUU.d.cts +187 -0
- package/dist/useVetVisit-CjmMa896.d.ts +187 -0
- package/dist/video/index.cjs +1 -1941
- package/dist/video/index.d.cts +4 -4
- package/dist/video/index.d.ts +4 -4
- package/dist/video/index.js +1 -1938
- package/dist/view-C3qPIXGX.d.cts +310 -0
- package/dist/view-DtSPYpKa.d.ts +310 -0
- package/dist/visitIntent-D7_yVp1I.d.cts +8 -0
- package/dist/visitIntent-D7_yVp1I.d.ts +8 -0
- package/dist/web/consent/index.cjs +1 -0
- package/dist/web/consent/index.d.cts +34 -0
- package/dist/web/consent/index.d.ts +34 -0
- package/dist/web/consent/index.js +1 -0
- package/dist/web/index.cjs +14 -0
- package/dist/web/index.d.cts +217 -0
- package/dist/web/index.d.ts +217 -0
- package/dist/web/index.js +14 -0
- package/dist/web/notifications/index.cjs +2 -0
- package/dist/web/notifications/index.d.cts +213 -0
- package/dist/web/notifications/index.d.ts +213 -0
- package/dist/web/notifications/index.js +2 -0
- package/dist/web/records/depth/index.cjs +2 -0
- package/dist/web/records/depth/index.d.cts +12 -0
- package/dist/web/records/depth/index.d.ts +12 -0
- package/dist/web/records/depth/index.js +2 -0
- package/dist/web/records/index.cjs +4 -0
- package/dist/web/records/index.d.cts +194 -0
- package/dist/web/records/index.d.ts +194 -0
- package/dist/web/records/index.js +4 -0
- package/dist/web/televet/index.cjs +1 -0
- package/dist/web/televet/index.d.cts +50 -0
- package/dist/web/televet/index.d.ts +50 -0
- package/dist/web/televet/index.js +1 -0
- package/notifications/package.json +8 -0
- package/package.json +197 -9
- package/records/depth/package.json +8 -0
- package/server/events/device-blocked.cjs +15 -0
- package/server/events/package.json +9 -0
- package/televet/package.json +8 -0
- package/testing/web/native-blocked.cjs +12 -0
- package/testing/web/package.json +8 -0
- package/web/consent/native-blocked.cjs +12 -0
- package/web/consent/package.json +8 -0
- package/web/native-blocked.cjs +12 -0
- package/web/notifications/native-blocked.cjs +12 -0
- package/web/notifications/package.json +8 -0
- package/web/package.json +8 -0
- package/web/records/depth/native-blocked.cjs +12 -0
- package/web/records/depth/package.json +8 -0
- package/web/records/native-blocked.cjs +12 -0
- package/web/records/package.json +8 -0
- package/web/televet/native-blocked.cjs +12 -0
- package/web/televet/package.json +8 -0
- package/dist/ChatController-CKdBvPj2.d.ts +0 -146
- package/dist/ChatController-CpUMvvZf.d.cts +0 -146
- package/dist/FilePort-BabWrv7I.d.cts +0 -22
- package/dist/FilePort-BabWrv7I.d.ts +0 -22
- package/dist/petsRepository-BEGb97M9.d.cts +0 -326
- package/dist/petsRepository-Bu18r2kK.d.ts +0 -326
- package/dist/requestFunnel-DuUH-kAe.d.cts +0 -28
- package/dist/requestFunnel-dio5OmR9.d.ts +0 -28
|
@@ -1,449 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var react = require('react');
|
|
4
|
-
require('react-native-safe-area-context');
|
|
5
|
-
var reactNative = require('react-native');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
|
|
8
|
-
// src/rn/testing.ts
|
|
9
|
-
|
|
10
|
-
// src/client/errors/EverfurResult.ts
|
|
11
|
-
var EverfurConfigError = class _EverfurConfigError extends Error {
|
|
12
|
-
constructor(kind, message) {
|
|
13
|
-
super(message);
|
|
14
|
-
this.name = "EverfurConfigError";
|
|
15
|
-
this.kind = kind;
|
|
16
|
-
Object.setPrototypeOf(this, _EverfurConfigError.prototype);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// src/client/theme/tokens.ts
|
|
21
|
-
function deepFreeze(value) {
|
|
22
|
-
if (value !== null && typeof value === "object" && !Object.isFrozen(value)) {
|
|
23
|
-
Object.freeze(value);
|
|
24
|
-
for (const key of Object.keys(value)) {
|
|
25
|
-
deepFreeze(value[key]);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
var SPACE = { xs: 4, sm: 8, md: 12, lg: 16, xl: 24, xxl: 32 };
|
|
31
|
-
var RADIUS = { tile: 5, xs: 6, sm: 10, md: 14, lg: 20, xl: 28, pill: 500 };
|
|
32
|
-
var TYPE_SIZE = {
|
|
33
|
-
nano: 8,
|
|
34
|
-
small: 9,
|
|
35
|
-
micro: 10,
|
|
36
|
-
tiny: 11,
|
|
37
|
-
caption: 12,
|
|
38
|
-
bodyTight: 13,
|
|
39
|
-
body: 14,
|
|
40
|
-
subtitle: 16,
|
|
41
|
-
heading: 18,
|
|
42
|
-
verdict: 24
|
|
43
|
-
};
|
|
44
|
-
var LINE_HEIGHT = { tight: 1.15, snug: 1.3, normal: 1.4, relaxed: 1.55 };
|
|
45
|
-
var WEIGHT = { regular: "400", medium: "500", bold: "700" };
|
|
46
|
-
var LETTER_SPACING = {
|
|
47
|
-
eyebrow: 1,
|
|
48
|
-
monoWide: 0.9,
|
|
49
|
-
headerBrand: -0.42,
|
|
50
|
-
tight: -0.35
|
|
51
|
-
};
|
|
52
|
-
function baseType() {
|
|
53
|
-
return {
|
|
54
|
-
family: "System",
|
|
55
|
-
mono: "monospace",
|
|
56
|
-
fontUrl: null,
|
|
57
|
-
size: TYPE_SIZE,
|
|
58
|
-
lineHeight: LINE_HEIGHT,
|
|
59
|
-
weight: WEIGHT,
|
|
60
|
-
letterSpacing: LETTER_SPACING
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
var MOTION = {
|
|
64
|
-
duration: { instant: 80, fast: 140, normal: 220, slow: 320 },
|
|
65
|
-
spring: { gentle: { damping: 18, stiffness: 200 } },
|
|
66
|
-
easing: { standard: "cubic-bezier(0.4, 0, 0.2, 1)" },
|
|
67
|
-
reducedMotion: false
|
|
68
|
-
};
|
|
69
|
-
var LIGHT_COLOR = {
|
|
70
|
-
brand: "#10462E",
|
|
71
|
-
brandSoft: "rgba(16,70,46,0.10)",
|
|
72
|
-
brandSofter: "rgba(16,70,46,0.15)",
|
|
73
|
-
brandBorder: "rgba(16,70,46,0.18)",
|
|
74
|
-
borderHairlineGreen: "rgba(16,70,46,0.25)",
|
|
75
|
-
surface: "#FFFFFF",
|
|
76
|
-
surfaceCream: "#FDFBF8",
|
|
77
|
-
surfaceSubtle: "#EFE9E3",
|
|
78
|
-
background: "#FFFFFF",
|
|
79
|
-
borderRingCream: "#D8D2C8",
|
|
80
|
-
text: {
|
|
81
|
-
primary: "#111111",
|
|
82
|
-
secondary: "#0E462E",
|
|
83
|
-
muted: "#6E6660",
|
|
84
|
-
placeholder: "rgba(0,0,0,0.30)",
|
|
85
|
-
onBrand: "#FFFFFF",
|
|
86
|
-
metaCool: "#3D3D3D"
|
|
87
|
-
},
|
|
88
|
-
primary: "#10462E",
|
|
89
|
-
onPrimary: "#FFFFFF",
|
|
90
|
-
accent: "#10462E",
|
|
91
|
-
onAccent: "#FFFFFF",
|
|
92
|
-
accentEdge: "#07C168",
|
|
93
|
-
success: "#07C168",
|
|
94
|
-
danger: "#B91C1C",
|
|
95
|
-
errorRed: "#FF1B00",
|
|
96
|
-
warningStrong: "#A45610",
|
|
97
|
-
cautionAccent: "#D9821D",
|
|
98
|
-
riskConcern: "#EFA700",
|
|
99
|
-
badgeBgPositive: "rgba(7,193,104,0.12)",
|
|
100
|
-
badgeBgCaution: "rgba(217,130,29,0.14)",
|
|
101
|
-
badgeBgCritical: "rgba(185,28,28,0.12)",
|
|
102
|
-
badgeBgNeutral: "rgba(110,102,96,0.12)",
|
|
103
|
-
bubbleUser: "#10462E",
|
|
104
|
-
bubbleAssistant: "#FFFFFF",
|
|
105
|
-
skeleton: "#EFE9E3",
|
|
106
|
-
scanButtonPink: "#FFC3BC",
|
|
107
|
-
checkupCardLowRiskBg: "rgba(7,193,104,0.10)",
|
|
108
|
-
checkupCardConcernBg: "rgba(239,167,0,0.10)"
|
|
109
|
-
};
|
|
110
|
-
var EVERFUR_LIGHT = deepFreeze({
|
|
111
|
-
brightness: "light",
|
|
112
|
-
meta: { displayName: "Everfur", logoUrl: null, placeholder: null, hidePoweredBy: false },
|
|
113
|
-
color: LIGHT_COLOR,
|
|
114
|
-
space: SPACE,
|
|
115
|
-
radius: RADIUS,
|
|
116
|
-
type: baseType(),
|
|
117
|
-
motion: MOTION
|
|
118
|
-
});
|
|
119
|
-
var DARK_COLOR = {
|
|
120
|
-
brand: "#6BD39A",
|
|
121
|
-
brandSoft: "rgba(107,211,154,0.12)",
|
|
122
|
-
brandSofter: "rgba(107,211,154,0.18)",
|
|
123
|
-
brandBorder: "rgba(107,211,154,0.22)",
|
|
124
|
-
borderHairlineGreen: "rgba(107,211,154,0.28)",
|
|
125
|
-
surface: "#1C1F23",
|
|
126
|
-
surfaceCream: "#23272C",
|
|
127
|
-
surfaceSubtle: "#23272C",
|
|
128
|
-
background: "#15171A",
|
|
129
|
-
borderRingCream: "#3A3F45",
|
|
130
|
-
text: {
|
|
131
|
-
primary: "#F5F3F0",
|
|
132
|
-
secondary: "#A9E4C4",
|
|
133
|
-
muted: "#9A938C",
|
|
134
|
-
placeholder: "rgba(255,255,255,0.35)",
|
|
135
|
-
onBrand: "#0E1F17",
|
|
136
|
-
metaCool: "#C9C9C9"
|
|
137
|
-
},
|
|
138
|
-
primary: "#6BD39A",
|
|
139
|
-
onPrimary: "#0E1F17",
|
|
140
|
-
accent: "#6BD39A",
|
|
141
|
-
onAccent: "#0E1F17",
|
|
142
|
-
accentEdge: "#34D888",
|
|
143
|
-
success: "#07C168",
|
|
144
|
-
danger: "#B91C1C",
|
|
145
|
-
errorRed: "#FF1B00",
|
|
146
|
-
warningStrong: "#A45610",
|
|
147
|
-
cautionAccent: "#D9821D",
|
|
148
|
-
riskConcern: "#EFA700",
|
|
149
|
-
badgeBgPositive: "rgba(7,193,104,0.18)",
|
|
150
|
-
badgeBgCaution: "rgba(217,130,29,0.20)",
|
|
151
|
-
badgeBgCritical: "rgba(185,28,28,0.22)",
|
|
152
|
-
badgeBgNeutral: "rgba(255,255,255,0.10)",
|
|
153
|
-
bubbleUser: "#6BD39A",
|
|
154
|
-
bubbleAssistant: "#1C1F23",
|
|
155
|
-
skeleton: "#23272C",
|
|
156
|
-
scanButtonPink: "#FFC3BC",
|
|
157
|
-
checkupCardLowRiskBg: "rgba(7,193,104,0.16)",
|
|
158
|
-
checkupCardConcernBg: "rgba(239,167,0,0.16)"
|
|
159
|
-
};
|
|
160
|
-
deepFreeze({
|
|
161
|
-
brightness: "dark",
|
|
162
|
-
meta: { displayName: "Everfur", logoUrl: null, placeholder: null, hidePoweredBy: false },
|
|
163
|
-
color: DARK_COLOR,
|
|
164
|
-
space: SPACE,
|
|
165
|
-
radius: RADIUS,
|
|
166
|
-
type: baseType(),
|
|
167
|
-
motion: MOTION
|
|
168
|
-
});
|
|
169
|
-
var EVERFUR_THEME_CONTEXT_SYMBOL = /* @__PURE__ */ Symbol.for("@everfur/sdk#EverfurThemeContext@v1");
|
|
170
|
-
var globalThemeHost = globalThis;
|
|
171
|
-
var EverfurThemeContext = globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL] ?? (globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL] = react.createContext(EVERFUR_LIGHT));
|
|
172
|
-
EverfurThemeContext.displayName ??= "EverfurThemeContext";
|
|
173
|
-
function useEverfurTheme() {
|
|
174
|
-
return react.useContext(EverfurThemeContext);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// src/rn/facade.ts
|
|
178
|
-
var EVERFUR_CONTEXT_SYMBOL = /* @__PURE__ */ Symbol.for("@everfur/sdk#EverfurContext@v1");
|
|
179
|
-
var globalContextHost = globalThis;
|
|
180
|
-
var EverfurContext = globalContextHost[EVERFUR_CONTEXT_SYMBOL] ?? (globalContextHost[EVERFUR_CONTEXT_SYMBOL] = react.createContext(null));
|
|
181
|
-
EverfurContext.displayName ??= "EverfurContext";
|
|
182
|
-
function useEverfurContext() {
|
|
183
|
-
const ctx = react.useContext(EverfurContext);
|
|
184
|
-
if (ctx === null) {
|
|
185
|
-
throw new EverfurConfigError(
|
|
186
|
-
"not-initialized",
|
|
187
|
-
"Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high."
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
return ctx;
|
|
191
|
-
}
|
|
192
|
-
var DOT_SIZE = 6;
|
|
193
|
-
var LOOP_MS = 520;
|
|
194
|
-
var STAGGER_MS = Math.round(LOOP_MS * 0.18);
|
|
195
|
-
var OPACITY_REST = 0.44;
|
|
196
|
-
var OPACITY_STATIC = 0.5;
|
|
197
|
-
var TRI_IN = [0, 0.5, 1];
|
|
198
|
-
var DOT_INDICES = [0, 1, 2];
|
|
199
|
-
function TypingIndicator() {
|
|
200
|
-
const theme = useEverfurTheme();
|
|
201
|
-
const styles = react.useMemo(() => makeStyles(theme), [theme]);
|
|
202
|
-
const animate = !theme.motion.reducedMotion;
|
|
203
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
204
|
-
reactNative.View,
|
|
205
|
-
{
|
|
206
|
-
style: styles.card,
|
|
207
|
-
accessible: true,
|
|
208
|
-
accessibilityRole: "text",
|
|
209
|
-
accessibilityLabel: "Assistant is typing",
|
|
210
|
-
accessibilityLiveRegion: "polite",
|
|
211
|
-
accessibilityState: { busy: true },
|
|
212
|
-
children: DOT_INDICES.map(
|
|
213
|
-
(index) => animate ? /* @__PURE__ */ jsxRuntime.jsx(AnimatedDot, { index, style: styles.dot }, index) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles.dot, styles.dotStatic] }, index)
|
|
214
|
-
)
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
function AnimatedDot({ index, style }) {
|
|
219
|
-
const t = react.useRef(new reactNative.Animated.Value(0)).current;
|
|
220
|
-
react.useEffect(() => {
|
|
221
|
-
const anim = reactNative.Animated.sequence([
|
|
222
|
-
reactNative.Animated.delay(index * STAGGER_MS),
|
|
223
|
-
reactNative.Animated.loop(reactNative.Animated.timing(t, { toValue: 1, duration: LOOP_MS, useNativeDriver: true }))
|
|
224
|
-
]);
|
|
225
|
-
anim.start();
|
|
226
|
-
return () => anim.stop();
|
|
227
|
-
}, [t, index]);
|
|
228
|
-
const opacity = t.interpolate({ inputRange: TRI_IN, outputRange: [OPACITY_REST, 1, OPACITY_REST] });
|
|
229
|
-
const translateY = t.interpolate({ inputRange: TRI_IN, outputRange: [0, -3.5, 0] });
|
|
230
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [style, { opacity, transform: [{ translateY }] }] });
|
|
231
|
-
}
|
|
232
|
-
function makeStyles(theme) {
|
|
233
|
-
const c = theme.color;
|
|
234
|
-
const s = theme.space;
|
|
235
|
-
const r = theme.radius;
|
|
236
|
-
return reactNative.StyleSheet.create({
|
|
237
|
-
card: {
|
|
238
|
-
alignSelf: "flex-start",
|
|
239
|
-
flexDirection: "row",
|
|
240
|
-
alignItems: "center",
|
|
241
|
-
gap: s.xs,
|
|
242
|
-
paddingHorizontal: s.md,
|
|
243
|
-
paddingVertical: s.sm,
|
|
244
|
-
backgroundColor: c.surfaceCream,
|
|
245
|
-
borderRadius: r.md,
|
|
246
|
-
borderWidth: reactNative.StyleSheet.hairlineWidth,
|
|
247
|
-
borderColor: c.brandBorder
|
|
248
|
-
},
|
|
249
|
-
dot: { width: DOT_SIZE, height: DOT_SIZE, borderRadius: r.pill, backgroundColor: c.brand },
|
|
250
|
-
dotStatic: { opacity: OPACITY_STATIC }
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
var ROTATION_PERIOD_MS = 1400;
|
|
254
|
-
var REVEAL_DELAY_MS = 300;
|
|
255
|
-
function AnalyzingIndicator() {
|
|
256
|
-
const theme = useEverfurTheme();
|
|
257
|
-
const styles = react.useMemo(() => makeStyles2(theme), [theme]);
|
|
258
|
-
const reduced = theme.motion.reducedMotion;
|
|
259
|
-
const [visible, setVisible] = react.useState(false);
|
|
260
|
-
react.useEffect(() => {
|
|
261
|
-
const id = setTimeout(() => setVisible(true), REVEAL_DELAY_MS);
|
|
262
|
-
return () => clearTimeout(id);
|
|
263
|
-
}, []);
|
|
264
|
-
const spin = react.useRef(new reactNative.Animated.Value(0)).current;
|
|
265
|
-
react.useEffect(() => {
|
|
266
|
-
if (reduced || !visible) return;
|
|
267
|
-
const loop = reactNative.Animated.loop(
|
|
268
|
-
reactNative.Animated.timing(spin, {
|
|
269
|
-
toValue: 1,
|
|
270
|
-
duration: ROTATION_PERIOD_MS,
|
|
271
|
-
easing: reactNative.Easing.linear,
|
|
272
|
-
useNativeDriver: true
|
|
273
|
-
})
|
|
274
|
-
);
|
|
275
|
-
loop.start();
|
|
276
|
-
return () => loop.stop();
|
|
277
|
-
}, [reduced, visible, spin]);
|
|
278
|
-
const arcMotionStyle = reduced ? null : { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] };
|
|
279
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
280
|
-
reactNative.View,
|
|
281
|
-
{
|
|
282
|
-
style: styles.wrap,
|
|
283
|
-
accessible: true,
|
|
284
|
-
accessibilityState: { busy: true },
|
|
285
|
-
accessibilityLabel: "Analyzing photo",
|
|
286
|
-
children: visible ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
287
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles.ring, arcMotionStyle] }),
|
|
288
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles.statusLine, children: "Analyzing" })
|
|
289
|
-
] }) : null
|
|
290
|
-
}
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
function makeStyles2(theme) {
|
|
294
|
-
const { color, space, radius, type } = theme;
|
|
295
|
-
const medium = type.weight.medium;
|
|
296
|
-
const ringSize = space.xxl * 2;
|
|
297
|
-
const ringThickness = space.xs;
|
|
298
|
-
return reactNative.StyleSheet.create({
|
|
299
|
-
wrap: {
|
|
300
|
-
flexGrow: 1,
|
|
301
|
-
alignItems: "center",
|
|
302
|
-
justifyContent: "center",
|
|
303
|
-
padding: space.xl,
|
|
304
|
-
gap: space.md
|
|
305
|
-
},
|
|
306
|
-
// One rotating ring: success on the top/right, cream on the remainder. Only the success sweep is perceptible
|
|
307
|
-
// (the cream half is uniform), so this reads as a cream ring with a rotating success arc - the mobile look.
|
|
308
|
-
ring: {
|
|
309
|
-
width: ringSize,
|
|
310
|
-
height: ringSize,
|
|
311
|
-
borderRadius: radius.pill,
|
|
312
|
-
borderWidth: ringThickness,
|
|
313
|
-
borderTopColor: color.success,
|
|
314
|
-
borderRightColor: color.success,
|
|
315
|
-
borderBottomColor: color.borderRingCream,
|
|
316
|
-
borderLeftColor: color.borderRingCream
|
|
317
|
-
},
|
|
318
|
-
// Neutral SDK-owned structural status word (not clinical / product copy), on the brand-green secondary ramp
|
|
319
|
-
// so it sits in the same family as the verdict hero. Legible in both themes via the token.
|
|
320
|
-
statusLine: {
|
|
321
|
-
color: color.text.secondary,
|
|
322
|
-
fontFamily: type.family,
|
|
323
|
-
fontSize: type.size.subtitle,
|
|
324
|
-
lineHeight: type.size.subtitle * type.lineHeight.snug,
|
|
325
|
-
fontWeight: medium,
|
|
326
|
-
letterSpacing: type.letterSpacing.tight,
|
|
327
|
-
textAlign: "center"
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
var PULSE_PERIOD_MS = 1100;
|
|
332
|
-
var PULSE_MAX_SCALE = 1.6;
|
|
333
|
-
var PULSE_START_OPACITY = 0.35;
|
|
334
|
-
function toneSpec(theme, tier) {
|
|
335
|
-
const { color } = theme;
|
|
336
|
-
switch (tier) {
|
|
337
|
-
case "low_risk":
|
|
338
|
-
return { accent: color.success, wash: color.badgeBgPositive, label: "Low risk", pulse: false };
|
|
339
|
-
case "concern":
|
|
340
|
-
return { accent: color.cautionAccent, wash: color.badgeBgCaution, label: "Concern", pulse: true };
|
|
341
|
-
case "uncertain":
|
|
342
|
-
return { accent: color.text.muted, wash: color.badgeBgNeutral, label: "Uncertain", pulse: false };
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
function SeverityBadge({ riskTier }) {
|
|
346
|
-
const theme = useEverfurTheme();
|
|
347
|
-
const styles = react.useMemo(() => makeStyles3(theme), [theme]);
|
|
348
|
-
const pulse = react.useRef(new reactNative.Animated.Value(0)).current;
|
|
349
|
-
const spec = riskTier === null ? null : toneSpec(theme, riskTier);
|
|
350
|
-
const shouldPulse = spec !== null && spec.pulse && !theme.motion.reducedMotion;
|
|
351
|
-
react.useEffect(() => {
|
|
352
|
-
if (!shouldPulse) return;
|
|
353
|
-
const loop = reactNative.Animated.loop(
|
|
354
|
-
reactNative.Animated.timing(pulse, {
|
|
355
|
-
toValue: 1,
|
|
356
|
-
duration: PULSE_PERIOD_MS,
|
|
357
|
-
easing: reactNative.Easing.out(reactNative.Easing.quad),
|
|
358
|
-
useNativeDriver: true
|
|
359
|
-
})
|
|
360
|
-
);
|
|
361
|
-
loop.start();
|
|
362
|
-
return () => loop.stop();
|
|
363
|
-
}, [shouldPulse, pulse]);
|
|
364
|
-
if (spec === null) return null;
|
|
365
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
366
|
-
reactNative.View,
|
|
367
|
-
{
|
|
368
|
-
style: [styles.pill, { backgroundColor: spec.wash }],
|
|
369
|
-
accessible: true,
|
|
370
|
-
accessibilityRole: "text",
|
|
371
|
-
accessibilityLabel: spec.label,
|
|
372
|
-
children: [
|
|
373
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles.dotWrap, children: [
|
|
374
|
-
shouldPulse ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
375
|
-
reactNative.Animated.View,
|
|
376
|
-
{
|
|
377
|
-
pointerEvents: "none",
|
|
378
|
-
style: [
|
|
379
|
-
styles.dotRing,
|
|
380
|
-
{
|
|
381
|
-
backgroundColor: spec.accent,
|
|
382
|
-
opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [PULSE_START_OPACITY, 0] }),
|
|
383
|
-
transform: [{ scale: pulse.interpolate({ inputRange: [0, 1], outputRange: [1, PULSE_MAX_SCALE] }) }]
|
|
384
|
-
}
|
|
385
|
-
]
|
|
386
|
-
}
|
|
387
|
-
) : null,
|
|
388
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles.dot, { backgroundColor: spec.accent }] })
|
|
389
|
-
] }),
|
|
390
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.label, { color: spec.accent }], children: spec.label })
|
|
391
|
-
]
|
|
392
|
-
}
|
|
393
|
-
);
|
|
394
|
-
}
|
|
395
|
-
function makeStyles3(theme) {
|
|
396
|
-
const { space, radius, type } = theme;
|
|
397
|
-
const bold = type.weight.bold;
|
|
398
|
-
const dotSize = space.sm;
|
|
399
|
-
return reactNative.StyleSheet.create({
|
|
400
|
-
pill: {
|
|
401
|
-
alignSelf: "flex-start",
|
|
402
|
-
flexDirection: "row",
|
|
403
|
-
alignItems: "center",
|
|
404
|
-
gap: space.sm,
|
|
405
|
-
paddingHorizontal: space.md,
|
|
406
|
-
paddingVertical: space.xs,
|
|
407
|
-
borderRadius: radius.pill
|
|
408
|
-
},
|
|
409
|
-
dotWrap: {
|
|
410
|
-
width: dotSize,
|
|
411
|
-
height: dotSize,
|
|
412
|
-
alignItems: "center",
|
|
413
|
-
justifyContent: "center"
|
|
414
|
-
},
|
|
415
|
-
dot: {
|
|
416
|
-
width: dotSize,
|
|
417
|
-
height: dotSize,
|
|
418
|
-
borderRadius: radius.pill
|
|
419
|
-
},
|
|
420
|
-
// The pulsing attention ring behind the dot (concern only). backgroundColor + animated opacity/scale set inline.
|
|
421
|
-
dotRing: {
|
|
422
|
-
position: "absolute",
|
|
423
|
-
width: dotSize,
|
|
424
|
-
height: dotSize,
|
|
425
|
-
borderRadius: radius.pill
|
|
426
|
-
},
|
|
427
|
-
label: {
|
|
428
|
-
fontFamily: type.family,
|
|
429
|
-
fontSize: type.size.caption,
|
|
430
|
-
lineHeight: type.size.caption * type.lineHeight.snug,
|
|
431
|
-
fontWeight: bold,
|
|
432
|
-
letterSpacing: type.letterSpacing.eyebrow
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
// src/rn/testing.ts
|
|
438
|
-
function useEverfurTestEntitlements() {
|
|
439
|
-
const { runtime } = useEverfurContext();
|
|
440
|
-
return react.useMemo(
|
|
441
|
-
() => ({ apply: (snapshot) => runtime.updateEntitlements(snapshot) }),
|
|
442
|
-
[runtime]
|
|
443
|
-
);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
exports.AnalyzingIndicator = AnalyzingIndicator;
|
|
447
|
-
exports.SeverityBadge = SeverityBadge;
|
|
448
|
-
exports.TypingIndicator = TypingIndicator;
|
|
449
|
-
exports.useEverfurTestEntitlements = useEverfurTestEntitlements;
|
|
1
|
+
'use strict';var react=require('react'),reactNative=require('react-native'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');var ot=Object.defineProperty;var o=(e,t)=>ot(e,"name",{value:t,configurable:true});var ie=Object.freeze({placeholder:"Message",send:"Send",stop:"Stop",retry:"Try again",followUps:"Follow up questions",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",typing:"Assistant is typing",loading:"Loading",empty:"No messages yet",transcript:"Conversation",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting\u2026",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openMenu:"Open menu",openMenuUnread:"Open menu, unread chats",yourPets:"Your Pets",yourPet:"Your pet",switchActivePet:"Switch active pet, {name}",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active \xB7 ",close:"Close",addAnotherPet:"Add another pet",addPet:"Add a pet",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});function G(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))G(e[t]);}return e}o(G,"deepFreeze");var at=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),le={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},ue={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},se={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},it={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},st={regular:"400",medium:"500",bold:"700"},lt={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},ut=0,k="System",F="monospace",dt=["content","heading","control","compact","badge"];function ct(e){let t={};for(let r of dt)t[r]=e;return t}o(ct,"authoredTierSizes");function de(){return {family:k,mono:F,fontUrl:null,families:{regular:k,medium:k,bold:k,mono:F,monoMedium:F,monoBold:F},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:se,tierSizes:ct(se),lineHeight:it,weight:st,letterSpacing:lt,scale:1,maxScale:ut,scaleCaps:at}}o(de,"baseType");var ce={},Y=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function W(e){return `cubic-bezier(${e.join(", ")})`}o(W,"cssCubicBezier");var pe={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:W(Y.standard),emphasized:W(Y.emphasized),exit:W(Y.exit)},reducedMotion:false},pt={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)"},fe=G({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:pt,space:le,radius:ue,type:de(),motion:pe,slots:ce}),ft={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)"};G({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ft,space:le,radius:ue,type:de(),motion:pe,slots:ce});var me=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ye=globalThis,K=ye[me]??(ye[me]=react.createContext(fe));K.displayName??="EverfurThemeContext";function g(){return react.useContext(K)}o(g,"useEverfurTheme");var ve=6,_e=520,Et=Math.round(_e*.18),he=.44,_t=.5,Ee=[0,.5,1],Rt=[0,1,2];function St(){let e=g(),t=react.useMemo(()=>Ct(e),[e]),r=!e.motion.reducedMotion;return jsxRuntime.jsx(reactNative.View,{style:t.card,accessible:true,accessibilityRole:"text",accessibilityLabel:ie.typing,accessibilityLiveRegion:"polite",accessibilityState:{busy:true},children:Rt.map(n=>r?jsxRuntime.jsx(wt,{index:n,style:t.dot},n):jsxRuntime.jsx(reactNative.View,{style:[t.dot,t.dotStatic]},n))})}o(St,"TypingIndicator");function wt({index:e,style:t}){let r=react.useRef(new reactNative.Animated.Value(0)).current;react.useEffect(()=>{let s=reactNative.Animated.sequence([reactNative.Animated.delay(e*Et),reactNative.Animated.loop(reactNative.Animated.timing(r,{toValue:1,duration:_e,useNativeDriver:true}))]);return s.start(),()=>s.stop()},[r,e]);let n=r.interpolate({inputRange:Ee,outputRange:[he,1,he]}),i=r.interpolate({inputRange:Ee,outputRange:[0,-3.5,0]});return jsxRuntime.jsx(reactNative.Animated.View,{style:[t,{opacity:n,transform:[{translateY:i}]}]})}o(wt,"AnimatedDot");function Ct(e){let t=e.color,r=e.space,n=e.radius;return reactNative.StyleSheet.create({card:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:r.xs,paddingHorizontal:r.md,paddingVertical:r.sm,backgroundColor:t.surfaceCream,borderRadius:n.md,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:t.brandBorder},dot:{width:ve,height:ve,borderRadius:n.pill,backgroundColor:t.brand},dotStatic:{opacity:_t}})}o(Ct,"makeStyles");function Ft(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}o(Ft,"tierMultiplier");function A({tier:e="content",...t}){let{type:r}=g(),n=Ft(r,e);return react.createElement(reactNative.Text,n===void 0?t:{maxFontSizeMultiplier:n,...t})}o(A,"Text");react.forwardRef(o(function(t,r){return react.createElement(reactNative.TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));var Dt=1400,Mt=300;function Lt(){let e=g(),t=react.useMemo(()=>Nt(e),[e]),r=e.motion.reducedMotion,[n,i]=react.useState(false);react.useEffect(()=>{let d=setTimeout(()=>i(true),Mt);return ()=>clearTimeout(d)},[]);let s=react.useRef(new reactNative.Animated.Value(0)).current;react.useEffect(()=>{if(r||!n)return;let d=reactNative.Animated.loop(reactNative.Animated.timing(s,{toValue:1,duration:Dt,easing:reactNative.Easing.linear,useNativeDriver:true}));return d.start(),()=>d.stop()},[r,n,s]);let l=r?null:{transform:[{rotate:s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]};return jsxRuntime.jsx(reactNative.View,{style:t.wrap,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing photo",children:n?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactNative.Animated.View,{style:[t.ring,l]}),jsxRuntime.jsx(A,{style:t.statusLine,children:"Analyzing"})]}):null})}o(Lt,"AnalyzingIndicator");function Nt(e){let{color:t,space:r,radius:n,type:i}=e,s=i.weight.medium,l=r.xxl*2,d=r.xs;return reactNative.StyleSheet.create({wrap:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:r.xl,gap:r.md},ring:{width:l,height:l,borderRadius:n.pill,borderWidth:d,borderTopColor:t.success,borderRightColor:t.success,borderBottomColor:t.borderRingCream,borderLeftColor:t.borderRingCream},statusLine:{color:t.text.secondary,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.snug,fontWeight:s,letterSpacing:i.letterSpacing.tight,textAlign:"center"}})}o(Nt,"makeStyles");var Wt=1100,Gt=1.6,Kt=.35;function $t(e,t){let{color:r}=e;switch(t){case "low_risk":return {accent:r.success,wash:r.badgeBgPositive,label:"Low risk",pulse:false};case "concern":return {accent:r.cautionAccent,wash:r.badgeBgCaution,label:"Concern",pulse:true};case "uncertain":return {accent:r.text.muted,wash:r.badgeBgNeutral,label:"Uncertain",pulse:false}}}o($t,"toneSpec");function Qt({riskTier:e}){let t=g(),r=react.useMemo(()=>Xt(t),[t]),n=react.useRef(new reactNative.Animated.Value(0)).current,i=e===null?null:$t(t,e),s=i!==null&&i.pulse&&!t.motion.reducedMotion;return react.useEffect(()=>{if(!s)return;let l=reactNative.Animated.loop(reactNative.Animated.timing(n,{toValue:1,duration:Wt,easing:reactNative.Easing.out(reactNative.Easing.quad),useNativeDriver:true}));return l.start(),()=>l.stop()},[s,n]),i===null?null:jsxRuntime.jsxs(reactNative.View,{style:[r.pill,{backgroundColor:i.wash}],accessible:true,accessibilityRole:"text",accessibilityLabel:i.label,children:[jsxRuntime.jsxs(reactNative.View,{style:r.dotWrap,children:[s?jsxRuntime.jsx(reactNative.Animated.View,{pointerEvents:"none",style:[r.dotRing,{backgroundColor:i.accent,opacity:n.interpolate({inputRange:[0,1],outputRange:[Kt,0]}),transform:[{scale:n.interpolate({inputRange:[0,1],outputRange:[1,Gt]})}]}]}):null,jsxRuntime.jsx(reactNative.View,{style:[r.dot,{backgroundColor:i.accent}]})]}),jsxRuntime.jsx(A,{style:[r.label,{color:i.accent}],children:i.label})]})}o(Qt,"SeverityBadge");function Xt(e){let{space:t,radius:r,type:n}=e,i=n.weight.bold,s=t.sm;return reactNative.StyleSheet.create({pill:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:t.sm,paddingHorizontal:t.md,paddingVertical:t.xs,borderRadius:r.pill},dotWrap:{width:s,height:s,alignItems:"center",justifyContent:"center"},dot:{width:s,height:s,borderRadius:r.pill},dotRing:{position:"absolute",width:s,height:s,borderRadius:r.pill},label:{fontFamily:n.family,fontSize:n.size.caption,lineHeight:n.size.caption*n.lineHeight.snug,fontWeight:i,letterSpacing:n.letterSpacing.eyebrow}})}o(Xt,"makeStyles");function j(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}o(j,"ok");function u(e){return Object.freeze({ok:false,error:e})}o(u,"err");var z=class z extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,z.prototype);}};o(z,"EverfurConfigError");var S=z;var Te=Symbol.for("@everfur/sdk#EverfurContext@v1"),xe=globalThis,ke=xe[Te]??(xe[Te]=react.createContext(null));ke.displayName??="EverfurContext";function E(){let e=react.useContext(ke);if(e===null)throw new S("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}o(E,"useEverfurContext");function tr(){let{runtime:e}=E();return react.useMemo(()=>({apply:o(t=>e.updateEntitlements(t),"apply")}),[e])}o(tr,"useEverfurTestEntitlements");var J=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(J.map(e=>e.wireCode));var rr=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"}),Oe=Object.freeze(J.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:rr[e.wireCode]}))),nr=new Map(Oe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),or=Object.freeze(["http_envelope",...[...new Set(Oe.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function D(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let n of [t??"http_envelope",...or]){let i=nr.get(n+r);if(i)return i}}o(D,"contractErrorFor");function ar(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(ar,"contractDocUrl");function Ae(e){return null}o(Ae,"publishedDocUrl");var ir=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 Ie(e){return ir[e]}o(Ie,"categoryFor");function Pe(e){let t=D(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(n){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":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"}}o(Pe,"fromWire");var sr=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function Z(e){return sr.has(e)}o(Z,"isAutoRetryable");var lr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function ze(e){return Z(e)||lr.has(e)}o(ze,"isRetryableCode");var ur=500,ee=8e3,je=4;function De(e,t=Math.random){let r=Math.max(0,e),n=Math.min(ur*2**r,ee);return Math.floor(t()*n)}o(De,"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 cr(e){return dr[e]}o(cr,"userFacingError");function Me(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}o(Me,"defineHidden");var pr=/^[a-z][a-z0-9_]{0,63}$/;function m(e,t){let r=D(t?.wireCode,t?.wireEnvelope),n={code:e,category:Ie(e),retryable:t?.retryable??ze(e),displayMessage:cr(e)};if(t?.httpStatus!==void 0&&(n.httpStatus=t.httpStatus),t?.requestId&&(n.requestId=t.requestId),typeof t?.reasonCode=="string"&&pr.test(t.reasonCode)&&(n.reasonCode=t.reasonCode),r);return t?.wireMessage&&Me(n,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Me(n,"raw",t.raw),Object.freeze(n)}o(m,"makeEverfurError");function Le(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})}o(Le,"errorFrame");function yr(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}o(yr,"authHeaders");function w(e,t){return {...e,headers:{...gr(e.headers),...yr(t)}}}o(w,"withAuthHeaders");function gr(e){if(!e)return {};let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(t[r]=n);}return t}o(gr,"stripAuthHeaders");async function Ne(e,t){if(t.mode==="anonymous")return t.transport.request(w(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return u(te())}let n=await t.transport.request(w(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await t.identity.currentToken({forceRefresh:!0});}catch{return u(te())}let s=await t.transport.request(w(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?u(te(s.error.httpStatus)):s}o(Ne,"authedSend");function te(e){return m("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(te,"authRejectedError");function Ue(e){return m("internalError",{retryable:true,wireMessage:br(e)})}o(Ue,"networkError");function br(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}o(br,"describeCause");var vr=3e4,hr=ee*2,Er="idempotency-key",_r=new Set(["POST","PUT","PATCH","DELETE"]),Rr=Object.freeze({onEvent(){}}),Sr=Object.freeze({setTimeout:o((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function M(e){let t=e.observer??Rr,r=e.timers??Sr,n=e.rng??Math.random,i=e.sleep??((y,c)=>Dr(y,r,c)),s=e.maxAttempts??je,l=e.unaryTimeoutMs??vr,d=e.newIdempotencyKey??Cr(),p=o(y=>{try{t.onEvent(y);}catch{}},"emit");async function f(y,c,T){let U=T?.maxAttempts,rt=Math.max(1,U??s),V=T?.idempotent??_r.has(c.method)?d():null,nt=wr(c,V),q=0;for(;;){let _=o(H=>Object.freeze({call:y,method:c.method,path:c.path,attempt:q,...V?{idempotencyKey:V}:{},...H}),"stamp");p(_({phase:"attempt"}));let oe=zr(l,r),ae=jr(oe.signal,c.signal),R;try{R=await Ne({...nt,signal:ae.signal},e.auth);}catch(H){R=u(Ue(H));}finally{ae.dispose(),oe.cancel();}if(R.ok)return p(_({phase:"settled",ok:true,reason:"ok"})),R;let b=R.error,x=xr(b,q,{maxAttempts:rt,rng:n,now:r.now(),aborted:c.signal?.aborted===true,...U!==void 0?{perCallMaxAttempts:U}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),B={ok:false,code:b.code,reason:x.reason,...b.httpStatus!==void 0?{httpStatus:b.httpStatus}:{},...b.requestId!==void 0?{requestId:b.requestId}:{}};if(!x.retry)return p(_({phase:"settled",...B})),u(b);if(p(_({phase:"retry",...B,delayMs:x.delayMs})),await i(x.delayMs,c.signal),c.signal?.aborted===true)return p(_({phase:"settled",...B,reason:"aborted"})),u(b);q+=1;}}o(f,"send");async function C(y){return w(y,await Pr(e.auth))}o(C,"authorize");async function*tt(y,c,T){p(Object.freeze({call:y,phase:"stream.open",method:c.method,path:c.path,attempt:0}));try{yield*e.auth.transport.stream(c,T);}catch{yield Le({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return o(tt,"stream"),Object.freeze({send:f,authorize:C,stream:tt})}o(M,"createRequestFunnel");function wr(e,t){let r={};for(let[n,i]of Object.entries(e.headers??{}))n.toLowerCase()!==Er&&(r[n]=i);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}o(wr,"assembleHeaders");function Cr(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}o(Cr,"defaultIdempotencyKeyFactory");var Tr=10;function xr(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let n=kr(e);if(n==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!Z(e.code))return {retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if(o(()=>{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 l=o(()=>{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(Tr,Math.floor(f)))},"policyCeiling"),d=r.perCallMaxAttempts??l()??r.maxAttempts;if(t+1>=d)return {retry:false,reason:"attempts-exhausted"};let p=Fr(e,r.now);return p!==null?p>hr?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:p}:{retry:true,reason:i,delayMs:De(t,r.rng)}}o(xr,"decideRetry");function kr(e){let t=e.code==="unknown"?Pe(Ir(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}o(kr,"throttleKind");function Fr(e,t){let r=Or(e.raw);if(r===null)return null;let n=r-t;return n>0?n:0}o(Fr,"retryOverrideMs");function Or(e){for(let t of qe(e)){let r=t.resets_at,n=Ar(r);if(n!==null)return n}return null}o(Or,"findResetsAt");function qe(e){if(!Ve(e))return [];let t=[e];for(let r of ["error","detail"]){let n=e[r];Ve(n)&&t.push(n);}return t}o(qe,"candidateScopes");function Ar(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}o(Ar,"parseInstantMs");function Ir(e){for(let t of qe(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}o(Ir,"rawWireCode");function Ve(e){return typeof e=="object"&&e!==null}o(Ve,"isRecord");async function Pr(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}:{}}}o(Pr,"resolveDeviceAuth");function zr(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:o(()=>t.clearTimeout(n),"cancel")}}o(zr,"boundedSignal");function jr(e,t){let r=o(()=>{},"noop");if(!t)return {signal:e,dispose:r};let n=new AbortController;if(e.aborted||t.aborted)return n.abort(),{signal:n.signal,dispose:r};let i=o(()=>n.abort(),"onAbort");return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:o(()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i);},"dispose")}}o(jr,"mergeSignals");function Dr(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let i=t.setTimeout(()=>{r?.removeEventListener("abort",s),n();},e),s=o(()=>{t.clearTimeout(i),n();},"onAbort");r?.addEventListener("abort",s,{once:true});})}o(Dr,"delayAbortable");function L(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(!(n>=56320&&n<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}o(L,"hasLoneSurrogate");function Be(e){return [...e].length}o(Be,"serverLength");var We=new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review","published","failed","revoked"]),He=Object.freeze({submitted:"requested",sent:"requested",dispatching:"requested",awaiting_response:"awaiting_clinic",clinic_responded_no_records:"awaiting_clinic",records_received:"received",parsing_failed:"in_review",review_email_failed:"in_review",clinic_declined:"failed"});function Mr(e){let t=Object.prototype.hasOwnProperty.call(He,e)?He[e]:void 0;if(t!==void 0)return t;let r=e;return We.has(r)?r:"parsing"}o(Mr,"normalizeStatus");var Lr=zod.z.object({request_id:zod.z.string().min(1),pet_ref:zod.z.string().min(1),status:zod.z.string(),simple_status:zod.z.string().nullish(),simple_status_detail:zod.z.string().nullish(),status_label:zod.z.string().optional(),dispatch_status:zod.z.string().nullish(),can_retry_send:zod.z.boolean().optional(),can_revoke:zod.z.boolean().optional(),can_convert_to_upload:zod.z.boolean().optional(),can_update_clinic_email:zod.z.boolean().optional(),reminder_count:zod.z.number().int().nonnegative().optional(),last_reminder_at:zod.z.string().nullish(),waiting_expectation:zod.z.string().nullish(),document_count:zod.z.number().optional(),held_item_count:zod.z.number().optional(),received_at:zod.z.string().nullish(),parsing_started_at:zod.z.string().nullish(),review_started_at:zod.z.string().nullish(),created_at:zod.z.string().optional(),updated_at:zod.z.string().optional(),source:zod.z.string().nullish().catch(null),action_needed_label:zod.z.string().nullish().catch(null),failure_reason:zod.z.string().nullish().catch(null),failure_code:zod.z.string().nullish().catch(null),recovery_stage:zod.z.string().nullish().catch(null),show_clinic_phone:zod.z.boolean().optional().catch(void 0),clinic_name:zod.z.string().nullish().catch(null),clinic_email:zod.z.string().nullish().catch(null),clinic_phone:zod.z.string().nullish().catch(null),converted_to_upload_at:zod.z.string().nullish().catch(null),request_group_id:zod.z.string().nullish().catch(null)}).passthrough();function Ge(e){let t=Lr.safeParse(e);if(!t.success)return null;let r=t.data,n=Nr(r.simple_status),i=n==="requested"&&(r.status==="awaiting_upload"||r.simple_status_detail==="awaiting_owner_upload")?"awaiting_upload":n==="parsing"&&(r.simple_status_detail==="in_review"||r.simple_status_detail==="review_email_failed")?"in_review":n??Mr(r.status);return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:i,simpleStatus:n,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:Ye(r.document_count,0),heldItemCount:Ye(r.held_item_count,0),receivedAt:r.received_at??null,parsingStartedAt:r.parsing_started_at??null,reviewStartedAt:r.review_started_at??null,createdAt:r.created_at??"",updatedAt:r.updated_at??"",wireStatus:r.status,source:r.source??null,actionNeededLabel:r.action_needed_label??null,failureReason:r.failure_reason??null,failureCode:r.failure_code??null,recoveryStage:r.recovery_stage??null,showClinicPhone:r.show_clinic_phone===true,clinicName:r.clinic_name??null,clinicEmail:r.clinic_email??null,clinicPhone:r.clinic_phone??null,convertedToUploadAt:r.converted_to_upload_at??null,requestGroupId:r.request_group_id??null})}o(Ge,"mapRequestView");zod.z.object({request_group_id:zod.z.string().min(1),pet_ref:zod.z.string().min(1),total:zod.z.number().int().nonnegative(),responded:zod.z.number().int().nonnegative(),pending:zod.z.number().int().nonnegative(),members:zod.z.array(zod.z.unknown())});function Nr(e){return !e||e==="awaiting_upload"||e==="in_review"?null:We.has(e)?e:null}o(Nr,"normalizeSimpleStatus");zod.z.object({source_doc_id:zod.z.string().min(1),request_id:zod.z.string().min(1)});var Ur=zod.z.object({label:zod.z.string(),value:zod.z.string()}),Vr=zod.z.object({key:zod.z.string(),category:zod.z.string().optional(),label:zod.z.string().optional(),value:zod.z.string().nullish(),unit:zod.z.string().nullish(),observed_at:zod.z.string().nullish(),status:zod.z.string().nullish(),origin:zod.z.string().nullish(),canonical_key:zod.z.string().nullish()}),qr=zod.z.object({at:zod.z.string(),value:zod.z.number().nullish(),display:zod.z.string().nullish(),origin:zod.z.string().nullish()}),Br=zod.z.object({key:zod.z.string(),label:zod.z.string().optional(),points:zod.z.array(qr).optional()}),Hr=zod.z.object({title:zod.z.string(),detail:zod.z.string().nullish(),due_at:zod.z.string().nullish()}),Yr=zod.z.object({doc_id:zod.z.string(),title:zod.z.string().nullish(),page_count:zod.z.number().nullish(),received_at:zod.z.string().nullish()});zod.z.object({identity:zod.z.array(Ur).optional(),entities:zod.z.array(Vr).optional(),entity_series:zod.z.array(Br).optional(),forward_looking:zod.z.array(Hr).optional(),documents:zod.z.array(Yr).optional()});zod.z.object({pet_ref:zod.z.string().optional(),granted:zod.z.boolean().optional(),version:zod.z.string().nullish(),granted_at:zod.z.string().nullish()});function Ye(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}o(Ye,"numberOr");var Wr="/widget/v1/records/sandbox/requests",Ke=64,Gr=new Set(["records","no_records","declined"]),Kr=new Set(["applied","already_applied","not_applicable"]);function N(e){return m("validationFailed",{retryable:false,wireMessage:e})}o(N,"invalid");function $r(e){return typeof e!="string"||e.length===0?N("request_id is required and must be a non-empty string"):L(e)?N("request_id contains an unpaired surrogate and cannot be encoded"):[...e].length>Ke?N(`request_id is longer than ${Ke} characters`):null}o($r,"requestIdError");function Qr(e){if(typeof e!="object"||e===null)return null;let{result:t,request:r}=e;if(typeof t!="string"||!Kr.has(t))return null;let n=Ge(r);return n===null?null:Object.freeze({result:t,request:n})}o(Qr,"mapActionResult");function $e(e){let t=e.funnel??M({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=o(async(n,i,s,l)=>{let d=$r(i);if(d!==null)return u(d);let p=`${Wr}/${encodeURIComponent(i)}/${s}`,f=await t.send(n,l===void 0?{method:"POST",path:p}:{method:"POST",path:p,body:l});if(!f.ok)return u(f.error);let C=Qr(f.value);return C===null?u(m("internalError",{retryable:false})):j(C)},"run");return {simulateClinicReply(n,i){return typeof i!="string"||!Gr.has(i)?Promise.resolve(u(N("outcome must be records, no_records or declined"))):r("records.sandbox.clinicReply",n,"clinic-reply",{outcome:i})},publishSampleRecord(n){return r("records.sandbox.publishSample",n,"publish-sample")}}}o($e,"createRecordsSandboxController");function Jr(){let{runtime:e,userRef:t,scopeEpoch:r}=E();return react.useMemo(()=>{let{services:n}=e.registry;return $e({auth:n.authFor(t),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}})},[e,t,r])}o(Jr,"useEverfurRecordsSandbox");var re="/widget/v1/televet/sandbox/visits",Zr=128,Qe=64,Ze=new Set(["booked","cancelled","completed","no_show"]),en=new Set(["applied","already_applied","not_applicable"]),Xe=new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),Je=new Set(["24h","30m"]);function v(e){return m("validationFailed",{retryable:false,wireMessage:e})}o(v,"invalid");function ne(e,t,r){return typeof t!="string"||t.length===0?v(`${e} is required and must be a non-empty string`):L(t)?v(`${e} contains an unpaired surrogate and cannot be encoded`):Be(t)>r?v(`${e} is longer than ${r} characters`):null}o(ne,"textError");function tn(e){if(typeof e!="object"||e===null)return null;let{result:t,visit:r}=e;if(typeof t!="string"||!en.has(t)||typeof r!="object"||r===null)return null;let{visit_ref:n,pet_ref:i,status:s,scheduled_at:l}=r;return typeof n!="string"||n.length===0||typeof i!="string"||i.length===0||typeof s!="string"||!Ze.has(s)||typeof l!="string"||l.length===0?null:Object.freeze({result:t,visit:Object.freeze({visitRef:n,petRef:i,status:s,scheduledAt:l})})}o(tn,"mapActionResult");function et(e){let t=e.funnel??M({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=o(async(n,i,s)=>{let l=await t.send(n,{method:"POST",path:i,body:s},{idempotent:false,maxAttempts:1});if(!l.ok)return u(l.error);let d=tn(l.value);return d===null?u(m("internalError",{retryable:false})):j(d)},"run");return {createVisit(n){let i=ne("pet_ref",n,Zr);return i!==null?Promise.resolve(u(i)):r("televet.sandbox.createVisit",re,{pet_ref:n})},advanceVisit(n,i){let s=ne("visit_ref",n,Qe);if(s!==null)return Promise.resolve(u(s));if(typeof i!="string"||!Ze.has(i))return Promise.resolve(u(v("to must be booked, cancelled, completed or no_show")));let l=`${re}/${encodeURIComponent(n)}/advance`;return r("televet.sandbox.advanceVisit",l,{to:i})},simulateVisitEvent(n,i,s){let l=ne("visit_ref",n,Qe);if(l!==null)return Promise.resolve(u(l));if(typeof i!="string"||!Xe.has(i))return Promise.resolve(u(v(`event must be one of ${[...Xe].join(", ")}`)));if(i==="reminder"){if(typeof s!="string"||!Je.has(s))return Promise.resolve(u(v(`stage must be one of ${[...Je].join(", ")} for a reminder`)))}else if(s!==void 0)return Promise.resolve(u(v("stage is only for a reminder")));let d=`${re}/${encodeURIComponent(n)}/simulate`;return r("televet.sandbox.simulateVisitEvent",d,s===void 0?{event:i}:{event:i,stage:s})}}}o(et,"createVetVisitSandboxController");function nn(){let{runtime:e,userRef:t,scopeEpoch:r}=E();return react.useMemo(()=>{let{services:n}=e.registry;return et({auth:n.authFor(t),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}})},[e,t,r])}o(nn,"useEverfurVetVisitSandbox");exports.AnalyzingIndicator=Lt;exports.SeverityBadge=Qt;exports.TypingIndicator=St;exports.useEverfurRecordsSandbox=Jr;exports.useEverfurTestEntitlements=tr;exports.useEverfurVetVisitSandbox=nn;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult } from '../../EverfurResult-DN9pL2Ab.cjs';
|
|
2
|
+
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids-B2GAAifq.cjs';
|
|
3
|
+
export { E as EntitlementSnapshot } from '../../runtime-B8s-_hv8.cjs';
|
|
4
|
+
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../entitlementRepository-DKdXFgTo.cjs';
|
|
5
|
+
export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve-D4Ywz5OS.cjs';
|
|
6
|
+
export { c as RecordsRequestStatus, d as RecordsRequestView, e as RecordsSimpleStatus } from '../../models-D2EUxPZY.cjs';
|
|
4
7
|
import { ReactNode } from 'react';
|
|
5
|
-
import { R as RiskTier } from '../../PhotoController-
|
|
6
|
-
|
|
7
|
-
import '../../
|
|
8
|
-
import '../../
|
|
9
|
-
import '../../
|
|
8
|
+
import { R as RiskTier } from '../../PhotoController-3l7MT9jA.cjs';
|
|
9
|
+
export { EverfurTestEntitlements, RecordsSandboxActionResult, RecordsSandboxClinicReply, RecordsSandboxController, RecordsSandboxResult, VetVisitSandboxActionResult, VetVisitSandboxController, VetVisitSandboxEvent, VetVisitSandboxReminderStage, VetVisitSandboxResult, VetVisitSandboxStatus, VetVisitSandboxVisit, useEverfurRecordsSandbox, useEverfurTestEntitlements, useEverfurVetVisitSandbox } from '../web/index.cjs';
|
|
10
|
+
import '../../config-CzTZGlfF.cjs';
|
|
11
|
+
import '../../casesRepository-DHwtGRYY.cjs';
|
|
12
|
+
import '../../identity-DI4eVx9S.cjs';
|
|
13
|
+
import '../../profile-CSs1wlXT.cjs';
|
|
10
14
|
import '../../cacheEpoch-DknKn3S0.cjs';
|
|
11
15
|
import '../../TelemetryPort-BDNr00hu.cjs';
|
|
12
|
-
import '../../
|
|
13
|
-
import '../../requestFunnel-
|
|
14
|
-
import '../../
|
|
16
|
+
import '../../ports-DEBzEhbp.cjs';
|
|
17
|
+
import '../../requestFunnel-L-BQfi0z.cjs';
|
|
18
|
+
import '../../ErrorPolicyPort-CNf4uQZP.cjs';
|
|
19
|
+
import '../../ports-BN6RHF9W.cjs';
|
|
15
20
|
import '../../CameraPort-Cv31Pz7g.cjs';
|
|
16
21
|
import '../../projection-CeIUsbSk.cjs';
|
|
17
22
|
|
|
@@ -29,21 +34,4 @@ declare function SeverityBadge({ riskTier }: {
|
|
|
29
34
|
readonly riskTier: RiskTier | null;
|
|
30
35
|
}): ReactNode;
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
interface EverfurTestEntitlements {
|
|
34
|
-
/**
|
|
35
|
-
* Replace the entitlement verdict the current <EverfurProvider>'s runtime renders. Drives the SDK's own
|
|
36
|
-
* `useCapability` / `CapabilityGate` across every subpath (they read this one store), so a test/demo can
|
|
37
|
-
* flip a capability on or off and watch the real gates react. Render-only: the server stays authoritative.
|
|
38
|
-
*/
|
|
39
|
-
apply(snapshot: EntitlementSnapshot): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* TEST / DEMO ONLY. Obtain a handle to push a simulated server entitlement verdict into the enclosing
|
|
43
|
-
* <EverfurProvider>'s runtime. Must be called inside an <EverfurProvider>.
|
|
44
|
-
*
|
|
45
|
-
* @throws {EverfurConfigError} kind 'not-initialized' when called outside an <EverfurProvider>.
|
|
46
|
-
*/
|
|
47
|
-
declare function useEverfurTestEntitlements(): EverfurTestEntitlements;
|
|
48
|
-
|
|
49
|
-
export { AnalyzingIndicator, EntitlementSnapshot, type EverfurTestEntitlements, RiskTier, SeverityBadge, TypingIndicator, useEverfurTestEntitlements };
|
|
37
|
+
export { AnalyzingIndicator, RiskTier, SeverityBadge, TypingIndicator };
|