@sapia-ai/chatbot-v3 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EmbeddedVideoPlayer-SaMMfDIW.js → EmbeddedVideoPlayer-CNcds-dW.js} +283 -282
- package/dist/Preview-Dmns6UWL.js +84 -0
- package/dist/api.js +1 -1
- package/dist/{dist-DGBYKC8c.js → dist-B9SbMqZU.js} +2693 -2693
- package/dist/embed/createChatbot.d.ts +2 -0
- package/dist/{fix-webm-duration-BW9Fbdzt.js → fix-webm-duration-BWL-ZRDX.js} +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +15479 -2067
- package/dist/jsx-runtime-8QqjHL5t.js +24 -0
- package/dist/messages-Czlp86gl.js +1963 -0
- package/dist/react-B0K-sClg.js +295 -0
- package/dist/{react-Bujo1aK5.js → react-ChCcxVnw.js} +90 -89
- package/dist/{react-GXf8sbzf.js → react-DJysvNxz.js} +72 -71
- package/dist/{react-BVzcquey.js → react-Dbs-sPBo.js} +93 -92
- package/dist/{react-lp7yfM94.js → react-NauLB_WU.js} +91 -90
- package/dist/{react-BGJ7Szvq.js → react-QrtEtv1G.js} +76 -74
- package/dist/{react-BrCGR7Ca.js → react-be7q6yw_.js} +312 -310
- package/dist/{react-CRTg4gz8.js → react-czRIxT0g.js} +85 -84
- package/dist/{react-BMxM8TWJ.js → react-dE7BdGuR.js} +49 -48
- package/dist-umd/sapia-chatbot.umd.js +1 -1
- package/package.json +14 -25
- package/dist/EmbeddedVideoPlayer-SaMMfDIW.js.map +0 -1
- package/dist/Preview-Db-hgkTh.js +0 -83
- package/dist/Preview-Db-hgkTh.js.map +0 -1
- package/dist/dash.all.min-DZ1yEcJk.js.map +0 -1
- package/dist/dist-BSi28_cP.js.map +0 -1
- package/dist/dist-DGBYKC8c.js.map +0 -1
- package/dist/dist-FvHBWiRa.js.map +0 -1
- package/dist/fix-webm-duration-BW9Fbdzt.js.map +0 -1
- package/dist/hls-mBncGwsE.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/max-Btet1snX.js.map +0 -1
- package/dist/messages-C4jqrtSG.js +0 -187
- package/dist/messages-C4jqrtSG.js.map +0 -1
- package/dist/react-BGJ7Szvq.js.map +0 -1
- package/dist/react-BMxM8TWJ.js.map +0 -1
- package/dist/react-BVzcquey.js.map +0 -1
- package/dist/react-BrCGR7Ca.js.map +0 -1
- package/dist/react-Bujo1aK5.js.map +0 -1
- package/dist/react-CRTg4gz8.js.map +0 -1
- package/dist/react-GXf8sbzf.js.map +0 -1
- package/dist/react-lp7yfM94.js.map +0 -1
- package/dist/sapia-chatbot.css +0 -3
- package/dist-umd/sapia-chatbot.umd.js.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { b as e } from "./messages-Czlp86gl.js";
|
|
2
|
+
import { t } from "./react-B0K-sClg.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-player@3.4.0_@svta+cml-cta@1.0.6_@svta+cml-structured-field-values@1.1.3_@svta+cm_a4f64f295cc2a316f39ce360b0a6e480/node_modules/react-player/dist/Preview.js
|
|
4
|
+
var n = /* @__PURE__ */ e(t(), 1), r = "64px", i = {}, a = ({ src: e, light: t, oEmbedUrl: a, onClickPreview: o, playIcon: s, previewTabIndex: c, previewAriaLabel: l }) => {
|
|
5
|
+
let [u, d] = (0, n.useState)(null);
|
|
6
|
+
(0, n.useEffect)(() => {
|
|
7
|
+
!e || !t || !a || f({
|
|
8
|
+
src: e,
|
|
9
|
+
light: t,
|
|
10
|
+
oEmbedUrl: a
|
|
11
|
+
});
|
|
12
|
+
}, [
|
|
13
|
+
e,
|
|
14
|
+
t,
|
|
15
|
+
a
|
|
16
|
+
]);
|
|
17
|
+
let f = async ({ src: e, light: t, oEmbedUrl: r }) => {
|
|
18
|
+
if (n.isValidElement(t)) return;
|
|
19
|
+
if (typeof t == "string") {
|
|
20
|
+
d(t);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (i[e]) {
|
|
24
|
+
d(i[e]);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
d(null);
|
|
28
|
+
let a = await (await fetch(r.replace("{url}", e))).json();
|
|
29
|
+
if (a.thumbnail_url) {
|
|
30
|
+
let t = a.thumbnail_url.replace("height=100", "height=480").replace("-d_295x166", "-d_640");
|
|
31
|
+
d(t), i[e] = t;
|
|
32
|
+
}
|
|
33
|
+
}, p = (e) => {
|
|
34
|
+
(e.key === "Enter" || e.key === " ") && (o == null || o(e));
|
|
35
|
+
}, m = (e) => {
|
|
36
|
+
o == null || o(e);
|
|
37
|
+
}, h = n.isValidElement(t), g = {
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
justifyContent: "center"
|
|
41
|
+
}, _ = {
|
|
42
|
+
preview: {
|
|
43
|
+
width: "100%",
|
|
44
|
+
height: "100%",
|
|
45
|
+
backgroundImage: u && !h ? `url(${u})` : void 0,
|
|
46
|
+
backgroundSize: "cover",
|
|
47
|
+
backgroundPosition: "center",
|
|
48
|
+
cursor: "pointer",
|
|
49
|
+
...g
|
|
50
|
+
},
|
|
51
|
+
shadow: {
|
|
52
|
+
background: "radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",
|
|
53
|
+
borderRadius: r,
|
|
54
|
+
width: r,
|
|
55
|
+
height: r,
|
|
56
|
+
position: h ? "absolute" : void 0,
|
|
57
|
+
...g
|
|
58
|
+
},
|
|
59
|
+
playIcon: {
|
|
60
|
+
borderStyle: "solid",
|
|
61
|
+
borderWidth: "16px 0 16px 26px",
|
|
62
|
+
borderColor: "transparent transparent transparent white",
|
|
63
|
+
marginLeft: "7px"
|
|
64
|
+
}
|
|
65
|
+
}, v = /* @__PURE__ */ n.createElement("div", {
|
|
66
|
+
style: _.shadow,
|
|
67
|
+
className: "react-player__shadow"
|
|
68
|
+
}, /* @__PURE__ */ n.createElement("div", {
|
|
69
|
+
style: _.playIcon,
|
|
70
|
+
className: "react-player__play-icon"
|
|
71
|
+
}));
|
|
72
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
73
|
+
style: _.preview,
|
|
74
|
+
className: "react-player__preview",
|
|
75
|
+
tabIndex: c,
|
|
76
|
+
onClick: m,
|
|
77
|
+
onKeyDown: p,
|
|
78
|
+
...l ? { "aria-label": l } : {}
|
|
79
|
+
}, h ? t : null, s || v);
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
export { a as default };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=Preview-Dmns6UWL.js.map
|
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./messages-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./messages-Czlp86gl.js";
|
|
2
2
|
export { r as API_ORIGIN_BY_ENV, h as AssessmentStatus, u as ButtonType, i as CHATBOT_API_PATH, g as ChatbotApiClient, p as ContentType, f as DEFAULT_LOCAL_API_ORIGIN, l as ENVIRONMENTS, s as MessageSender, t as PHService, d as PiiQuestionType, m as QuestionType, o as REGIONS, n as RuleName, c as VideoQuestionType, a as buildChatbotBaseUrl, e as resolveApiOrigin };
|