@1024pix/epreuves-components 2.1.0 → 2.2.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/dist/{LLMMessage.ce-CcaSmq0J.js → LLMMessage.ce-D_SYQOna.js} +22 -22
- package/dist/{Loading.ce-kO02LfAR.js → Loading.ce-CjAv1WaY.js} +1 -1
- package/dist/{NavigationButton.ce-BUeEdL4x.js → NavigationButton.ce-DlErTyfv.js} +5 -5
- package/dist/Retry--whpA3a8.js +18 -0
- package/dist/{_plugin-vue_export-helper-BGEtPlxS.js → _plugin-vue_export-helper-CP5OpzZH.js} +976 -966
- package/dist/components/calcul-impact.ce.js.js +2 -2
- package/dist/components/capacity-calculation.ce.js.js +116 -129
- package/dist/components/clickable-image.ce.js.js +86 -69
- package/dist/components/complete-phrase.ce.js.js +129 -66
- package/dist/components/flip-cards.ce.js.js +4 -4
- package/dist/components/image-quiz.ce.js.js +2 -2
- package/dist/components/image-quizzes.ce.js.js +2 -2
- package/dist/components/llm-compare-messages.ce.js.js +3 -3
- package/dist/components/llm-messages.ce.js.js +6 -6
- package/dist/components/llm-prompt-select.ce.js.js +10 -10
- package/dist/components/message-conversation.ce.js.js +14 -14
- package/dist/components/pix-article.ce.js.js +2 -2
- package/dist/components/pix-carousel.ce.js.js +11 -12
- package/dist/components/pix-cursor.ce.js.js +10 -10
- package/dist/components/qcm-deepfake.ce.js.js +107 -100
- package/dist/{i18n-D3E2CT0o.js → i18n-BB4WILwM.js} +12 -12
- package/dist/{image-quiz.ce-Qe3SbGDF.js → image-quiz.ce-UlVFo5Sr.js} +11 -11
- package/dist/index.js +1 -1
- package/dist/metadata.js +1 -1
- package/dist/schema.js +7 -4
- package/dist/{shadow-dom-Bqt3ZRMI.js → shadow-dom-D3DtD_VO.js} +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { u as
|
|
3
|
-
const
|
|
1
|
+
import { d as B, g as E, r as f, h as N, j as O, k as c, c as x, o as m, a as y, l as P, m as W, F as j, b as D, q as L, t as b, v as q, x as T, y as U, _ as V, f as X } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
|
+
import { u as C } from "../normalize-props-AlmAfi_u.js";
|
|
3
|
+
const Y = { class: "container" }, G = ["onMouseenter", "onFocusin", "onClick", "aria-label"], d = 10, H = /* @__PURE__ */ B({
|
|
4
4
|
__name: "ClickableImage.ce",
|
|
5
5
|
props: {
|
|
6
6
|
image: { type: Object },
|
|
7
7
|
areas: { type: Array }
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
|
|
9
|
+
setup(s, { expose: I }) {
|
|
10
|
+
const l = E("image"), r = f(1), g = new ResizeObserver(() => $());
|
|
11
|
+
function $() {
|
|
12
|
+
l.value.naturalWidth && (r.value = l.value.offsetWidth / l.value.naturalWidth);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
g.observe(
|
|
16
|
-
}),
|
|
14
|
+
N(() => {
|
|
15
|
+
g.observe(l.value);
|
|
16
|
+
}), O(() => {
|
|
17
17
|
g.disconnect();
|
|
18
18
|
});
|
|
19
|
-
const h =
|
|
19
|
+
const h = c(() => s.areas.map((e) => ({
|
|
20
20
|
...e,
|
|
21
|
-
coords:
|
|
21
|
+
coords: M(e.coords),
|
|
22
|
+
spot: S(e.spot ?? { x: 0, y: 0 })
|
|
22
23
|
})));
|
|
23
|
-
function
|
|
24
|
+
function M(e) {
|
|
24
25
|
return {
|
|
25
26
|
x1: e.x1 * r.value,
|
|
26
27
|
y1: e.y1 * r.value,
|
|
@@ -28,93 +29,109 @@ const U = { name: "image-map" }, V = ["shape", "coords", "onMouseenter", "onClic
|
|
|
28
29
|
y2: e.y2 * r.value
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
function S(e) {
|
|
33
|
+
return {
|
|
34
|
+
x: e.x * r.value,
|
|
35
|
+
y: e.y * r.value
|
|
36
|
+
};
|
|
34
37
|
}
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
const p = f();
|
|
39
|
+
function k(e) {
|
|
40
|
+
p.value = e;
|
|
37
41
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
function w() {
|
|
43
|
+
p.value = void 0;
|
|
44
|
+
}
|
|
45
|
+
const i = f();
|
|
46
|
+
function A(e) {
|
|
47
|
+
i.value = e;
|
|
41
48
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
49
|
+
function F() {
|
|
50
|
+
i.value = void 0;
|
|
44
51
|
}
|
|
45
|
-
const u =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}), S = p(() => {
|
|
52
|
+
const v = c(() => i.value ?? p.value), u = c(() => {
|
|
53
|
+
if (v.value !== void 0)
|
|
54
|
+
return h.value[v.value];
|
|
55
|
+
}), _ = c(() => {
|
|
50
56
|
if (!u.value) return {};
|
|
51
|
-
const { tooltipPosition: e, coords: { x1:
|
|
57
|
+
const { tooltipPosition: e, coords: { x1: o, y1: t, x2: a, y2: n } } = u.value;
|
|
52
58
|
switch (e) {
|
|
53
59
|
case "top":
|
|
54
60
|
return {
|
|
55
|
-
left: `${
|
|
61
|
+
left: `${o + (a - o) / 2}px`,
|
|
56
62
|
transform: "translate(-50%, -100%)",
|
|
57
|
-
top: `${
|
|
63
|
+
top: `${t - d}px`
|
|
58
64
|
};
|
|
59
65
|
case "bottom":
|
|
60
66
|
return {
|
|
61
|
-
left: `${
|
|
67
|
+
left: `${o + (a - o) / 2}px`,
|
|
62
68
|
transform: "translateX(-50%)",
|
|
63
|
-
top: `${
|
|
69
|
+
top: `${n + d}px`
|
|
64
70
|
};
|
|
65
71
|
case "left":
|
|
66
72
|
return {
|
|
67
|
-
left: `${
|
|
68
|
-
top: `${
|
|
73
|
+
left: `${o - d}px`,
|
|
74
|
+
top: `${t + (n - t) / 2}px`,
|
|
69
75
|
transform: "translate(-100%, -50%)"
|
|
70
76
|
};
|
|
71
77
|
default:
|
|
72
78
|
return {
|
|
73
|
-
left: `${
|
|
74
|
-
top: `${
|
|
79
|
+
left: `${a + d}px`,
|
|
80
|
+
top: `${t + (n - t) / 2}px`,
|
|
75
81
|
transform: "translateY(-50%)"
|
|
76
82
|
};
|
|
77
83
|
}
|
|
78
84
|
});
|
|
79
|
-
function
|
|
80
|
-
|
|
85
|
+
function R() {
|
|
86
|
+
i.value = void 0;
|
|
81
87
|
}
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
onClick: t[3] || (t[3] = (o) => A())
|
|
85
|
-
}, [
|
|
86
|
-
x("img", P(a.image, {
|
|
88
|
+
return I({ reset: R }), (e, o) => (m(), x("div", Y, [
|
|
89
|
+
y("img", W(s.image, {
|
|
87
90
|
ref: "image",
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
onLoad: o[0] || (o[0] = (t) => $()),
|
|
92
|
+
onClick: o[1] || (o[1] = (t) => F()),
|
|
93
|
+
alt: ""
|
|
90
94
|
}), null, 16),
|
|
91
|
-
x("
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
(m(!0), x(j, null, D(h.value, (t, a) => (m(), x("button", {
|
|
96
|
+
key: a,
|
|
97
|
+
style: b({
|
|
98
|
+
"--y1": `${t.coords.y1}px`,
|
|
99
|
+
"--y2": `${t.coords.y2}px`,
|
|
100
|
+
"--x1": `${t.coords.x1}px`,
|
|
101
|
+
"--x2": `${t.coords.x2}px`
|
|
102
|
+
}),
|
|
103
|
+
class: "area",
|
|
104
|
+
onMouseenter: (n) => k(a),
|
|
105
|
+
onMouseleave: o[2] || (o[2] = (n) => w()),
|
|
106
|
+
onFocusin: (n) => k(a),
|
|
107
|
+
onFocusout: o[3] || (o[3] = (n) => w()),
|
|
108
|
+
onClick: L((n) => A(a), ["stop"]),
|
|
109
|
+
"aria-label": t.info
|
|
110
|
+
}, [
|
|
111
|
+
y("span", {
|
|
112
|
+
class: q(["spot", { active: v.value === a }]),
|
|
113
|
+
style: b({
|
|
114
|
+
"--s-x": `${t.spot.x}px`,
|
|
115
|
+
"--s-y": `${t.spot.y}px`
|
|
116
|
+
})
|
|
117
|
+
}, null, 6)
|
|
118
|
+
], 44, G))), 128)),
|
|
119
|
+
P(y("p", {
|
|
102
120
|
class: "tooltip",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
[D, u.value]
|
|
121
|
+
"aria-hidden": "true",
|
|
122
|
+
style: b(_.value)
|
|
123
|
+
}, U(u.value?.info), 5), [
|
|
124
|
+
[T, u.value]
|
|
108
125
|
])
|
|
109
126
|
]));
|
|
110
127
|
}
|
|
111
|
-
}),
|
|
112
|
-
|
|
113
|
-
...
|
|
128
|
+
}), J = "*{font-family:Nunito,Roboto,sans-serif;color:var(#253858)}.container{position:relative;max-width:100%;border:1px solid #ccc}.container img{width:100%;height:auto;display:block}.container .area{cursor:pointer;position:absolute;top:var(--y1);left:var(--x1);height:calc(var(--y2) - var(--y1));width:calc(var(--x2) - var(--x1));border:none;background:transparent}.container .spot{cursor:pointer;position:absolute;width:32px;aspect-ratio:1;border:solid 4px #d9d9d9;background:#d9d9d999;border-radius:50%;top:50%;left:50%;transform:translate(calc(-50% + var(--s-x)),calc(-50% + var(--s-y)))}.container .spot.active{border-color:#6495ed}.container .tooltip{position:absolute;background-color:#000000d9;color:#fff;padding:8px 12px;border-radius:6px;font-size:14px;max-width:260px;z-index:10}", K = /* @__PURE__ */ V(H, [["styles", [J]]]), z = X(K);
|
|
129
|
+
z.prototype.normalizeProps = (s) => ({
|
|
130
|
+
...s,
|
|
114
131
|
image: {
|
|
115
|
-
...
|
|
116
|
-
height:
|
|
117
|
-
width:
|
|
132
|
+
...s.image,
|
|
133
|
+
height: C(s.height),
|
|
134
|
+
width: C(s.width)
|
|
118
135
|
}
|
|
119
136
|
});
|
|
120
|
-
window.customElements.define("clickable-image",
|
|
137
|
+
window.customElements.define("clickable-image", z);
|
|
@@ -1,34 +1,83 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { a as
|
|
3
|
-
import { u as
|
|
4
|
-
import { L as
|
|
5
|
-
const
|
|
6
|
-
"complete-phrase": {
|
|
7
|
-
},
|
|
1
|
+
import { d as g, c as s, o as t, a, y as c, t as j, _ as y, v as S, L as M, B as R, r as b, k as w, E, F as $, b as q, e as k, z as L, f as T } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
|
+
import { a as V, i as B, b as I } from "../i18n-BB4WILwM.js";
|
|
3
|
+
import { u as O } from "../normalize-props-AlmAfi_u.js";
|
|
4
|
+
import { L as P } from "../LLMMessage.ce-D_SYQOna.js";
|
|
5
|
+
const D = {}, F = {}, W = {}, H = {
|
|
6
|
+
"complete-phrase": { title: "Probabilité du mot suivant", description: "La barre indique la probabilité de chaque mot. Plus elle est longue, plus le mot est probable dans ce contexte.", ariaLabelDescription: "Le mot {{name}} a une probabilité de {{percent}}%", clickHereButton: "Révéler le mot", successfullyCompletedSentence: "Cliquez sur le mot choisit par l’IA dans les propositions suivantes :", feedback: "En effet, c'est le mot le plus probable !" }
|
|
7
|
+
}, Q = {}, U = {}, G = { class: "probability-bar" }, J = { "aria-hidden": "true" }, K = { class: "sr-only" }, X = /* @__PURE__ */ g({
|
|
8
8
|
__name: "ProbabilityBar.ce",
|
|
9
9
|
props: {
|
|
10
10
|
name: { type: String },
|
|
11
11
|
percent: { type: Number }
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style:
|
|
14
|
+
return (d, o) => (t(), s("div", G, [
|
|
15
|
+
a("p", J, c(e.name), 1),
|
|
16
|
+
a("p", K, c(d.$t("complete-phrase.ariaLabelDescription", { name: e.name, percent: e.percent })), 1),
|
|
17
|
+
a("div", {
|
|
18
|
+
style: j(`width: ${e.percent}%`),
|
|
19
19
|
class: "probability-bar__percent",
|
|
20
20
|
"aria-hidden": "true"
|
|
21
21
|
}, null, 4),
|
|
22
|
-
o[0] || (o[0] =
|
|
22
|
+
o[0] || (o[0] = a("div", {
|
|
23
23
|
class: "probability-bar__background",
|
|
24
24
|
"aria-hidden": "true"
|
|
25
25
|
}, null, -1))
|
|
26
26
|
]));
|
|
27
27
|
}
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
}), Y = ".probability-bar[data-v-195ffe53]{font-family:Roboto,sans-serif;padding-bottom:10px;position:relative}.probability-bar p[data-v-195ffe53]{margin:0}.probability-bar__percent[data-v-195ffe53]{position:absolute;left:0;z-index:2;height:6px;border-radius:5px;background-color:var(--pix-neutral-900)}.probability-bar__background[data-v-195ffe53]{position:absolute;left:0;z-index:1;width:100%;height:6px;border-radius:5px;background-color:var(--pix-neutral-100)}.sr-only[data-v-195ffe53]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}", Z = /* @__PURE__ */ y(X, [["styles", [Y]], ["__scopeId", "data-v-195ffe53"]]), ee = /* @__PURE__ */ g({
|
|
29
|
+
__name: "Button.ce",
|
|
30
|
+
props: {
|
|
31
|
+
label: { type: String },
|
|
32
|
+
state: { type: String }
|
|
33
|
+
},
|
|
34
|
+
setup(e) {
|
|
35
|
+
return (d, o) => (t(), s("button", {
|
|
36
|
+
class: S(["complete-phrase_button", e.state])
|
|
37
|
+
}, [
|
|
38
|
+
M(d.$slots, "icon"),
|
|
39
|
+
R(" " + c(e.label), 1)
|
|
40
|
+
], 2));
|
|
41
|
+
}
|
|
42
|
+
}), te = ".complete-phrase_button{--pix-neutral-0: #fff;--pix-neutral-800: #253858;--pix-neutral-900: #122647;--pix-secondary-500: #ffcb33;--pix-secondary-700: #a16206}.complete-phrase_button.primary{--background-color: var(--pix-neutral-800);--background-color-hover: var(--pix-neutral-900);--color: var(--pix-neutral-0);--color-hover: var(--pix-neutral-0)}.complete-phrase_button.warning{--background-color: var(--pix-secondary-500);--background-color-hover: var(--pix-secondary-700);--color: var(--pix-neutral-900);--color-hover: var(--pix-neutral-0)}.complete-phrase_button.primary,.complete-phrase_button.warning{align-items:center;background-color:var(--background-color);border:2px solid transparent;border-radius:8px;color:var(--color);cursor:pointer;display:flex;font-family:Roboto,sans-serif;font-size:1rem;font-weight:700;justify-content:center;gap:8px;line-height:24px;margin:0 auto;outline:none;padding:8px 24px;transition:background-color ease .5s,color ease .5s;width:fit-content;white-space:nowrap}:is(.complete-phrase_button.primary,.complete-phrase_button.warning)[aria-disabled=true]{cursor:not-allowed;opacity:.5}:is(.complete-phrase_button.primary,.complete-phrase_button.warning):not([aria-disabled=true]):hover{background-color:var(--background-color-hover);color:var(--color-hover);transition:background-color ease .5s,color ease .5s}:is(.complete-phrase_button.primary,.complete-phrase_button.warning):not([aria-disabled=true]):hover svg{color:var(--color-hover);transition:color ease .5s}", ae = /* @__PURE__ */ y(ee, [["styles", [te]]]), oe = { class: "qcu" }, re = { class: "qcu__list" }, ie = ["id", "aria-label", "value", "checked", "disabled"], se = { for: "`choice${index}`" }, ne = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "feedback"
|
|
45
|
+
}, le = /* @__PURE__ */ g({
|
|
46
|
+
__name: "QCU.ce",
|
|
47
|
+
props: {
|
|
48
|
+
list: { type: Array },
|
|
49
|
+
title: { type: String }
|
|
50
|
+
},
|
|
51
|
+
emits: ["visible"],
|
|
52
|
+
setup(e, { emit: d }) {
|
|
53
|
+
const o = d, r = b(null), m = w(() => e.list.find((n) => n.percent === 100).name), p = b(!1);
|
|
54
|
+
function u(n) {
|
|
55
|
+
r.value = n.target.value, m.value === r.value && (o("visible"), p.value = !0);
|
|
56
|
+
}
|
|
57
|
+
return (n, x) => (t(), s("div", oe, [
|
|
58
|
+
a("p", null, c(e.title), 1),
|
|
59
|
+
a("section", re, [
|
|
60
|
+
(t(!0), s($, null, q(e.list, (_, h) => (t(), s("div", {
|
|
61
|
+
class: "qcu__list-choice",
|
|
62
|
+
key: h
|
|
63
|
+
}, [
|
|
64
|
+
a("input", {
|
|
65
|
+
id: `choice${h}`,
|
|
66
|
+
type: "radio",
|
|
67
|
+
name: "qcu-choice",
|
|
68
|
+
onClick: u,
|
|
69
|
+
"aria-label": _.name,
|
|
70
|
+
value: _.name,
|
|
71
|
+
checked: r.value === _.name,
|
|
72
|
+
disabled: p.value
|
|
73
|
+
}, null, 8, ie),
|
|
74
|
+
a("label", se, c(_.name), 1)
|
|
75
|
+
]))), 128))
|
|
76
|
+
]),
|
|
77
|
+
m.value === r.value ? (t(), s("section", ne, c(n.$t("complete-phrase.feedback")), 1)) : E("", !0)
|
|
78
|
+
]));
|
|
79
|
+
}
|
|
80
|
+
}), ce = "[data-v-ddadee99]{--pix-neutral-100: #cdd1d9;--pix-neutral-900: #122647;font-family:Roboto,sans-serif;color:var(--pix-neutral-900)}.qcu[data-v-ddadee99]{align-items:center;display:flex;flex-direction:column;gap:16px}.qcu p[data-v-ddadee99]{margin:0}.qcu__list[data-v-ddadee99]{display:flex;gap:16px}.qcu__list-choice[data-v-ddadee99]{position:relative}.qcu__list-choice input[data-v-ddadee99]{appearance:none;height:100%;outline:none;position:absolute;width:100%}.qcu__list-choice input:checked+label[data-v-ddadee99]{background-color:var(--pix-info-500);color:var(--pix-neutral-0)}.qcu__list-choice input[data-v-ddadee99]:hover{cursor:pointer}.qcu__list-choice input:hover+label[data-v-ddadee99]{background-color:var(--pix-info-500);color:var(--pix-neutral-0);transition:background-color .5s ease,color .5s ease}.qcu__list-choice input:disabled+label[data-v-ddadee99],.qcu__list-choice input[data-v-ddadee99]:disabled:hover{cursor:not-allowed}.qcu__list-choice input:disabled:not(:checked)+label[data-v-ddadee99],.qcu__list-choice input:disabled:hover:not(:checked)+label[data-v-ddadee99]{background:var(--pix-info-50);color:var(--pix-neutral-900);cursor:not-allowed;opacity:.5;transition:none}.qcu__list-choice label[data-v-ddadee99]{align-items:center;background:var(--pix-info-50);border-radius:4px;color:inherit;display:flex;font-weight:700;gap:10px;justify-content:center;padding:4px 8px;transition:background-color .5s ease,color .5s ease}.qcu .feedback[data-v-ddadee99]{display:flex;padding:8px 16px;flex-direction:column;align-items:flex-start;gap:16px;align-self:stretch;border-radius:8px;background:var(--pix-info-50)}", de = /* @__PURE__ */ y(le, [["styles", [ce]], ["__scopeId", "data-v-ddadee99"]]), pe = { class: "complete-phrase" }, ue = ["aria-level"], be = { class: "complete-phrase__description" }, me = { class: "complete-phrase__container" }, _e = { class: "complete-phrase-container__conversation" }, ve = { class: "complete-phrase-container__probabilities" }, he = ["id", "aria-hidden"], fe = /* @__PURE__ */ g({
|
|
32
81
|
__name: "CompletePhrase.ce",
|
|
33
82
|
props: {
|
|
34
83
|
listOfProbabilityBarsLists: { type: Array },
|
|
@@ -37,70 +86,84 @@ const T = {}, D = {}, E = {}, I = {
|
|
|
37
86
|
wordsToAdd: { type: Array },
|
|
38
87
|
titleLevel: { type: Number }
|
|
39
88
|
},
|
|
40
|
-
setup(e, { expose:
|
|
41
|
-
const o = e, r =
|
|
42
|
-
|
|
43
|
-
|
|
89
|
+
setup(e, { expose: d }) {
|
|
90
|
+
const o = e, r = b(0), m = b(o.llmMessage), p = b(!1), u = b(o.wordsToAdd), n = b(!1), x = w(() => {
|
|
91
|
+
const [i] = o.listOfProbabilityBarsLists.filter((l, v) => v === r.value);
|
|
92
|
+
return i;
|
|
93
|
+
}), _ = w(() => {
|
|
94
|
+
let [i] = u.value, l = "complete-message-word";
|
|
95
|
+
if (p.value) {
|
|
96
|
+
const [v] = x.value;
|
|
97
|
+
i = v.name, l += ` complete-message-word--${n.value ? "visible" : "hidden"}`;
|
|
98
|
+
}
|
|
99
|
+
return `<p>${m.value} <span class="${l}">${i}</span></p>`;
|
|
100
|
+
});
|
|
101
|
+
function h() {
|
|
102
|
+
p.value = !1, m.value = o.llmMessage, u.value = o.wordsToAdd, r.value = 0;
|
|
44
103
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
const [i, ...
|
|
48
|
-
|
|
104
|
+
function A() {
|
|
105
|
+
u.value.length === 1 && (p.value = !0), r.value += 1;
|
|
106
|
+
const [i, ...l] = u.value;
|
|
107
|
+
u.value = l, m.value += `<span class="complete-message-word">${i} </span>`;
|
|
49
108
|
}
|
|
50
|
-
return
|
|
51
|
-
reset:
|
|
52
|
-
}), (i,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
109
|
+
return d({
|
|
110
|
+
reset: h
|
|
111
|
+
}), (i, l) => (t(), s("div", pe, [
|
|
112
|
+
a("div", {
|
|
113
|
+
class: "complete-phrase__title",
|
|
114
|
+
role: "heading",
|
|
115
|
+
"aria-level": e.titleLevel
|
|
116
|
+
}, c(i.$t("complete-phrase.title")), 9, ue),
|
|
117
|
+
a("p", be, c(i.$t("complete-phrase.description")), 1),
|
|
118
|
+
a("section", me, [
|
|
119
|
+
a("div", _e, [
|
|
120
|
+
L(P, {
|
|
56
121
|
class: "container__message",
|
|
57
122
|
message: { content: e.userMessage, direction: "outbound" }
|
|
58
123
|
}, null, 8, ["message"]),
|
|
59
|
-
|
|
124
|
+
L(P, {
|
|
60
125
|
class: "container__message",
|
|
61
|
-
message: { content:
|
|
126
|
+
message: { content: _.value, direction: "inbound" }
|
|
62
127
|
}, null, 8, ["message"])
|
|
63
128
|
]),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
]),
|
|
71
|
-
t("div", Y, [
|
|
72
|
-
t("div", {
|
|
73
|
-
class: "container__title",
|
|
74
|
-
role: "heading",
|
|
75
|
-
"aria-level": e.titleLevel
|
|
76
|
-
}, s(i.$t("complete-phrase.iaSuggestions")), 9, Z),
|
|
77
|
-
t("p", ee, s(i.$t("complete-phrase.explanation")), 1),
|
|
78
|
-
t("div", te, [
|
|
79
|
-
(a(!0), n(v, null, h(e.listOfProbabilityBarsLists, (P, l) => (a(), n("div", {
|
|
80
|
-
class: B(["probability", { hidden: l !== r.value }]),
|
|
81
|
-
key: l,
|
|
82
|
-
id: `currentProbability${l}`,
|
|
83
|
-
"aria-hidden": l !== r.value
|
|
129
|
+
a("div", ve, [
|
|
130
|
+
(t(!0), s($, null, q(e.listOfProbabilityBarsLists, (v, f) => (t(), s("div", {
|
|
131
|
+
class: S(["probability", { hidden: f !== r.value }]),
|
|
132
|
+
key: f,
|
|
133
|
+
id: `currentProbability${f}`,
|
|
134
|
+
"aria-hidden": f !== r.value
|
|
84
135
|
}, [
|
|
85
|
-
(
|
|
86
|
-
name:
|
|
87
|
-
percent:
|
|
88
|
-
key:
|
|
136
|
+
(t(!0), s($, null, q(v, (C, N) => (t(), k(Z, {
|
|
137
|
+
name: C.name,
|
|
138
|
+
percent: C.percent,
|
|
139
|
+
key: N
|
|
89
140
|
}, null, 8, ["name", "percent"]))), 128))
|
|
90
|
-
], 10,
|
|
141
|
+
], 10, he))), 128))
|
|
91
142
|
])
|
|
92
|
-
])
|
|
143
|
+
]),
|
|
144
|
+
p.value ? (t(), k(de, {
|
|
145
|
+
key: 1,
|
|
146
|
+
list: x.value,
|
|
147
|
+
title: i.$t("complete-phrase.successfullyCompletedSentence"),
|
|
148
|
+
onVisible: l[0] || (l[0] = (v) => n.value = !0)
|
|
149
|
+
}, null, 8, ["list", "title"])) : (t(), k(ae, {
|
|
150
|
+
key: 0,
|
|
151
|
+
onClick: A,
|
|
152
|
+
state: "primary",
|
|
153
|
+
label: i.$t("complete-phrase.clickHereButton"),
|
|
154
|
+
"aria-describedby": `currentProbability${r.value}`
|
|
155
|
+
}, null, 8, ["label", "aria-describedby"]))
|
|
93
156
|
]));
|
|
94
157
|
}
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
const
|
|
158
|
+
}), ge = "[data-v-be9b10f3]{--pix-info-50: #e6f2fe;--pix-info-500: #3b82f6;--pix-neutral-0: #fff;--pix-neutral-100: #cdd1d9;--pix-neutral-900: #122647;font-family:Roboto,sans-serif;color:var(--pix-neutral-900)}.complete-phrase__title[data-v-be9b10f3]{font-family:Nunito,sans-serif;font-size:1.75rem;font-weight:700;line-height:36px;text-align:center}.complete-phrase__description[data-v-be9b10f3]{text-align:center;font-size:1rem;font-weight:400;line-height:24px}.complete-phrase__container[data-v-be9b10f3]{display:grid;gap:32px;grid-template-columns:3fr 2fr;margin-bottom:24px}.complete-phrase-container__conversation[data-v-be9b10f3]{background:#fff;border:1px solid var(--pix-neutral-100);border-radius:16px;display:flex;flex-direction:column;gap:32px;padding:1rem}.complete-phrase-container__conversation .message[data-v-be9b10f3]{align-items:center}.complete-phrase-container__probabilities[data-v-be9b10f3]{display:grid}.complete-phrase-container__probabilities .probability[data-v-be9b10f3]{display:flex;flex-direction:column;gap:16px;grid-row:1;grid-column:1}.complete-phrase-container__probabilities .probability.hidden[data-v-be9b10f3]{visibility:hidden}@media(max-width:600px){.complete-phrase__container[data-v-be9b10f3]{grid-template-columns:1fr}.complete-phrase-container__probabilities .probability.hidden[data-v-be9b10f3]{display:none}}", ye = /* @__PURE__ */ y(fe, [["styles", [ge]], ["__scopeId", "data-v-be9b10f3"]]);
|
|
159
|
+
V(/* @__PURE__ */ Object.assign({ "./locales/en.json": D, "./locales/es-419.json": F, "./locales/es.json": W, "./locales/fr.json": H, "./locales/it.json": Q, "./locales/nl.json": U })).catch((e) => console.error(e));
|
|
160
|
+
const z = T(ye, {
|
|
98
161
|
configureApp(e) {
|
|
99
|
-
|
|
162
|
+
B.changeLanguage(document?.documentElement?.lang || navigator.language), e.use(I, { i18next: B });
|
|
100
163
|
}
|
|
101
164
|
});
|
|
102
|
-
|
|
165
|
+
z.prototype.normalizeProps = (e) => ({
|
|
103
166
|
...e,
|
|
104
|
-
titleLevel:
|
|
167
|
+
titleLevel: O(e.titleLevel)
|
|
105
168
|
});
|
|
106
|
-
window.customElements.define("complete-phrase",
|
|
169
|
+
window.customElements.define("complete-phrase", z);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as m, c as n, o as d, F as u,
|
|
1
|
+
import { d as m, c as n, o as d, F as u, a as t, v, G as p, y as f, E as y, _ as h, r as w, b as k, H as g, z as F, f as _ } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
2
|
import { u as L } from "../normalize-props-AlmAfi_u.js";
|
|
3
3
|
const C = ["aria-hidden"], z = ["src"], N = ["title-level"], S = ["aria-hidden"], $ = ["aria-level"], B = { class: "description" }, E = { class: "image-container" }, U = ["src"], j = /* @__PURE__ */ m({
|
|
4
4
|
__name: "FlipCard.ce",
|
|
@@ -49,7 +49,7 @@ const C = ["aria-hidden"], z = ["src"], N = ["title-level"], S = ["aria-hidden"]
|
|
|
49
49
|
], 10, S)
|
|
50
50
|
], 64));
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
52
|
+
}), K = "[data-v-897a493f]{box-sizing:border-box}.card[data-v-897a493f]{align-items:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#fff;border-radius:12px;color:#253858;display:flex;flex-direction:column;gap:1.2rem;inset:0;justify-content:center;padding:18px;position:absolute;transform:translateZ(0);transition:transform ease .5s}.card .title[data-v-897a493f]{font-family:Nunito,sans-serif;font-size:1rem;font-weight:700;line-height:29px}.card.recto.red[data-v-897a493f]{background:linear-gradient(150deg,#fff,#ff7373)}.card.recto.yellow[data-v-897a493f]{background:linear-gradient(150deg,#fff,#ffec73)}.card.recto.blue[data-v-897a493f]{background:linear-gradient(150deg,#fff,#2491ff)}.card.recto.purple[data-v-897a493f]{background:linear-gradient(150deg,#fff,#9177f2)}.card.recto.green[data-v-897a493f]{background:linear-gradient(150deg,#fff,#52d987)}.card.recto.pink[data-v-897a493f]{background:linear-gradient(150deg,#fff,#f041bf)}.card.recto .icon[data-v-897a493f]{display:block;height:auto;width:40px}.card.verso[data-v-897a493f]{line-height:1.2rem;padding:8px;text-align:center;transform:rotateY(180deg) translateZ(0)}.card.verso.flipped.red[data-v-897a493f]{border:2px solid #ff7373}.card.verso.flipped.yellow[data-v-897a493f]{border:2px solid #ffec73}.card.verso.flipped.blue[data-v-897a493f]{border:2px solid #2491ff}.card.verso.flipped.purple[data-v-897a493f]{border:2px solid #9177f2}.card.verso.flipped.green[data-v-897a493f]{border:2px solid #52d987}.card.verso.flipped.pink[data-v-897a493f]{border:2px solid #f041bf}.card.verso .description[data-v-897a493f]{font-size:.9rem;margin:0 0 8px}.card.verso .image-container[data-v-897a493f]{margin:8px 8px 16px;overflow:hidden;width:160px}.card.verso img[data-v-897a493f]{display:block;height:100%;object-fit:contain;width:100%}", V = /* @__PURE__ */ h(j, [["styles", [K]], ["__scopeId", "data-v-897a493f"]]), D = { class: "flip-cards" }, I = ["aria-level"], R = ["aria-expanded", "onClick", "onKeydown"], Y = { class: "flip-container" }, Z = /* @__PURE__ */ m({
|
|
53
53
|
__name: "FlipCards.ce",
|
|
54
54
|
props: {
|
|
55
55
|
titleLevel: { default: 2, type: Number },
|
|
@@ -66,7 +66,7 @@ const C = ["aria-hidden"], z = ["src"], N = ["title-level"], S = ["aria-hidden"]
|
|
|
66
66
|
), s = (i, c) => {
|
|
67
67
|
c.preventDefault(), i.isFlipped = !i.isFlipped;
|
|
68
68
|
};
|
|
69
|
-
return (i, c) => (d(), n("div",
|
|
69
|
+
return (i, c) => (d(), n("div", D, [
|
|
70
70
|
t("div", {
|
|
71
71
|
role: "heading",
|
|
72
72
|
"aria-level": e.titleLevel,
|
|
@@ -85,7 +85,7 @@ const C = ["aria-hidden"], z = ["src"], N = ["title-level"], S = ["aria-hidden"]
|
|
|
85
85
|
]
|
|
86
86
|
}, [
|
|
87
87
|
t("div", Y, [
|
|
88
|
-
F(
|
|
88
|
+
F(V, {
|
|
89
89
|
color: a.color,
|
|
90
90
|
description: a.description,
|
|
91
91
|
icon: a.icon,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../_plugin-vue_export-helper-
|
|
2
|
-
import { n as p } from "../image-quiz.ce-
|
|
1
|
+
import "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
|
+
import { n as p } from "../image-quiz.ce-UlVFo5Sr.js";
|
|
3
3
|
import "../normalize-props-AlmAfi_u.js";
|
|
4
4
|
export {
|
|
5
5
|
p as normalizeImageQuizProps
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as l, r as f, w, c as p, o,
|
|
2
|
-
import { I as A, n as I } from "../image-quiz.ce-
|
|
1
|
+
import { d as l, r as f, w, c as p, o, b as g, e as d, m as q, F as v, f as y } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
|
+
import { I as A, n as I } from "../image-quiz.ce-UlVFo5Sr.js";
|
|
3
3
|
const _ = /* @__PURE__ */ l({
|
|
4
4
|
__name: "ImageQuizzes.ce",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as c, c as t, o as s,
|
|
2
|
-
import { L as l } from "../LLMMessage.ce-
|
|
3
|
-
import { p as u } from "../shadow-dom-
|
|
1
|
+
import { d as c, c as t, o as s, a as e, y as n, F as r, b as m, z as i, _ as p, f as g } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
|
+
import { L as l } from "../LLMMessage.ce-D_SYQOna.js";
|
|
3
|
+
import { p as u } from "../shadow-dom-D3DtD_VO.js";
|
|
4
4
|
const f = {
|
|
5
5
|
class: "header",
|
|
6
6
|
"aria-hidden": "true"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as c,
|
|
2
|
-
import { L as h } from "../LLMMessage.ce-
|
|
3
|
-
import { p as _ } from "../shadow-dom-
|
|
1
|
+
import { d as c, C as m, D as i, c as t, o as e, F as p, b as d, e as f, _ as g, f as u } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
|
+
import { L as h } from "../LLMMessage.ce-D_SYQOna.js";
|
|
3
|
+
import { p as _ } from "../shadow-dom-D3DtD_VO.js";
|
|
4
4
|
const x = {
|
|
5
5
|
class: "llm-messages",
|
|
6
6
|
"aria-live": "polite"
|
|
@@ -19,11 +19,11 @@ const x = {
|
|
|
19
19
|
return i(async () => {
|
|
20
20
|
a.messages, r();
|
|
21
21
|
}), (L, w) => (e(), t("div", x, [
|
|
22
|
-
(e(!0), t(p, null, d(s.messages, (l, n) => (e(),
|
|
22
|
+
(e(!0), t(p, null, d(s.messages, (l, n) => (e(), f(h, {
|
|
23
23
|
key: n,
|
|
24
24
|
message: l
|
|
25
25
|
}, null, 8, ["message"]))), 128))
|
|
26
26
|
]));
|
|
27
27
|
}
|
|
28
|
-
}), v = "*{box-sizing:border-box}:host{height:100%;overflow:auto;scroll-behavior:smooth}@media(prefers-reduced-motion:reduce){:host{scroll-behavior:auto}}.llm-messages{display:flex;flex-direction:column;gap:29px;padding:24px}", y = /* @__PURE__ */
|
|
29
|
-
window.customElements.define("llm-messages",
|
|
28
|
+
}), v = "*{box-sizing:border-box}:host{height:100%;overflow:auto;scroll-behavior:smooth}@media(prefers-reduced-motion:reduce){:host{scroll-behavior:auto}}.llm-messages{display:flex;flex-direction:column;gap:29px;padding:24px}", y = /* @__PURE__ */ g(b, [["styles", [v]]]);
|
|
29
|
+
window.customElements.define("llm-messages", u(y));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as y, r as c,
|
|
1
|
+
import { d as y, r as c, A as h, c as d, o as m, z as w, a, B as k, F as b, b as L, y as S, _ as C, f as P } from "../_plugin-vue_export-helper-CP5OpzZH.js";
|
|
2
2
|
import { u as N } from "../normalize-props-AlmAfi_u.js";
|
|
3
3
|
import "./llm-messages.ce.js.js";
|
|
4
|
-
const
|
|
4
|
+
const B = { class: "prompt-select" }, M = { class: "prompt-select__options" }, z = ["disabled", "onClick"], A = /* @__PURE__ */ y({
|
|
5
5
|
__name: "LLMPromptSelect.ce",
|
|
6
6
|
props: {
|
|
7
7
|
messages: { type: Array },
|
|
@@ -46,27 +46,27 @@ const M = { class: "prompt-select" }, z = { class: "prompt-select__options" }, A
|
|
|
46
46
|
}
|
|
47
47
|
return (e, t) => {
|
|
48
48
|
const p = h("llm-messages");
|
|
49
|
-
return m(), d(
|
|
49
|
+
return m(), d(b, null, [
|
|
50
50
|
w(p, { messages: s.value }, null, 8, ["messages"]),
|
|
51
|
-
a("div",
|
|
51
|
+
a("div", B, [
|
|
52
52
|
t[0] || (t[0] = a("p", { class: "prompt-select__label" }, [
|
|
53
53
|
k(" Sélectionner un des prompts "),
|
|
54
54
|
a("span", { class: "sr-only" }, " une fois sélectionnés, les prompts ne sont plus disponibles. ")
|
|
55
55
|
], -1)),
|
|
56
|
-
a("div",
|
|
57
|
-
(m(!0), d(
|
|
56
|
+
a("div", M, [
|
|
57
|
+
(m(!0), d(b, null, L(u.value, (n, i) => (m(), d("button", {
|
|
58
58
|
key: i,
|
|
59
59
|
disabled: n.disabled || l.value,
|
|
60
60
|
onClick: (f) => v(n)
|
|
61
|
-
}, S(n.prompt), 9,
|
|
61
|
+
}, S(n.prompt), 9, z))), 128))
|
|
62
62
|
])
|
|
63
63
|
])
|
|
64
64
|
], 64);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
}), E = ".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}llm-messages{display:block;height:400px}.prompt-select{font-family:Roboto,sans-serif;border-top:solid 1px #253858;padding:16px 24px 24px}.prompt-select__label{margin-top:0;font-weight:700;color:#253858}.prompt-select__options{display:flex;gap:1rem;justify-content:left;flex-wrap:wrap}.prompt-select__options>button{padding:1rem 1.5rem;border:none;background:#cec3f4;border-radius:16px;border:1px solid #ffffff;color:#130261;font-size:.875rem;box-shadow:0 4px 12px -4px #957ee833}.prompt-select__options>button:hover:not(:disabled){background:#9a8dc7;color:#fff;cursor:pointer}.prompt-select__options>button:disabled{cursor:not-allowed;color:#1010104d}", V = /* @__PURE__ */ C(
|
|
68
|
-
|
|
67
|
+
}), E = ".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}llm-messages{display:block;height:400px}.prompt-select{font-family:Roboto,sans-serif;border-top:solid 1px #253858;padding:16px 24px 24px}.prompt-select__label{margin-top:0;font-weight:700;color:#253858}.prompt-select__options{display:flex;gap:1rem;justify-content:left;flex-wrap:wrap}.prompt-select__options>button{padding:1rem 1.5rem;border:none;background:#cec3f4;border-radius:16px;border:1px solid #ffffff;color:#130261;font-size:.875rem;box-shadow:0 4px 12px -4px #957ee833}.prompt-select__options>button:hover:not(:disabled){background:#9a8dc7;color:#fff;cursor:pointer}.prompt-select__options>button:disabled{cursor:not-allowed;color:#1010104d}", V = /* @__PURE__ */ C(A, [["styles", [E]]]), _ = P(V);
|
|
68
|
+
_.prototype.normalizeProps = (r) => ({
|
|
69
69
|
...r,
|
|
70
70
|
speed: N(r.speed)
|
|
71
71
|
});
|
|
72
|
-
window.customElements.define("llm-prompt-select",
|
|
72
|
+
window.customElements.define("llm-prompt-select", _);
|