@genpact/genome.mfe.mgtwin-app 1.1.426-alpha → 1.1.428-alpha
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/AssessmentAMA-9735e352.mjs +451 -0
- package/dist/{AssessmentSimulation-c6101739.mjs → AssessmentSimulation-c5947cb0.mjs} +1779 -1811
- package/dist/{EditSkillAdminData-c3350a7d.mjs → EditSkillAdminData-a7d3044d.mjs} +2 -2
- package/dist/{EditSkillData-8565e07b.mjs → EditSkillData-1e921018.mjs} +2 -2
- package/dist/{HomeView-b9660032.mjs → HomeView-44b663ce.mjs} +4 -4
- package/dist/{Loading-070ada6e.mjs → Loading-c24045fa.mjs} +1 -1
- package/dist/{PaperAirplaneIcon-d5f4b1ec.mjs → PaperAirplaneIcon-cbcf8b3d.mjs} +1 -1
- package/dist/{PromptTesting-e88bf8fb.mjs → PromptTesting-ce6a5a6b.mjs} +3 -3
- package/dist/{SkillAutomation-d5bd4ccb.mjs → SkillAutomation-dbdfe062.mjs} +3 -3
- package/dist/{SkillData-c3208aed.mjs → SkillData-2a78929e.mjs} +3 -3
- package/dist/{Testcase-a7f8faca.mjs → Testcase-b6271407.mjs} +3 -3
- package/dist/{UnderMaintenance-e360b709.mjs → UnderMaintenance-cc38f517.mjs} +1 -1
- package/dist/{VoiceTestcase-db47e3fc.mjs → VoiceTestcase-e08807e8.mjs} +3 -3
- package/dist/{XMarkIcon-7641e6ad.mjs → XMarkIcon-d1956f93.mjs} +1 -1
- package/dist/{api-52aa6d93.mjs → api-53d9e4e0.mjs} +1 -1
- package/dist/{index.es-98ba12bd.mjs → index.es-1321ec08.mjs} +7 -7
- package/dist/{main-de1dd730.mjs → main-287a9330.mjs} +234 -234
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +95 -93
- package/dist/native/aiguru-native.css +1 -1
- package/dist/native/aiguru-native.umd.min.js +99 -97
- package/dist/simulationPopup.vue_vue_type_script_setup_true_lang-d231e228.mjs +160 -0
- package/dist/style.css +1 -1
- package/dist/{voiceServices-521854ef.mjs → voiceServices-efe54c88.mjs} +2 -2
- package/package.json +1 -1
- package/dist/AssessmentAMA-607a1640.mjs +0 -404
- package/dist/simulationPopup.vue_vue_type_script_setup_true_lang-b98b7cb2.mjs +0 -125
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import { r as P, _ as K, a as Y, b as J, c as X, L as Z } from "./simulationPopup.vue_vue_type_script_setup_true_lang-d231e228.mjs";
|
|
2
|
+
import { _ as ee, Q as E } from "./constants-e0c83ac4.mjs";
|
|
3
|
+
import { o as u, c as h, a as t, d as b, z as q, r as y, G as te, I as se, b as m, u as L, B as F, t as C, p as N, g as Q, h as v, s as V, T as ne, H as G, C as oe, F as ae, e as re, f as S, N as R, J as z, k as U, E as W, q as ie, w as le, m as ce, P as de, n as ue, R as _e, x as me, l as H, i as pe } from "./main-287a9330.mjs";
|
|
4
|
+
import { _ as M } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { u as D, i as O } from "./api-53d9e4e0.mjs";
|
|
6
|
+
import "./loadernew-ac153a51.mjs";
|
|
7
|
+
function he(n, e) {
|
|
8
|
+
return u(), h("svg", {
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "none",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
"stroke-width": "1.5",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
}, [
|
|
16
|
+
t("path", {
|
|
17
|
+
"stroke-linecap": "round",
|
|
18
|
+
"stroke-linejoin": "round",
|
|
19
|
+
d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
|
|
20
|
+
})
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
const fe = { class: "flex h-14 w-full flex-1 items-center justify-between bg-black md:pr-6 lg:pr-6" }, ge = ["href"], xe = /* @__PURE__ */ t("img", {
|
|
24
|
+
class: "h-16 w-auto cursor-pointer",
|
|
25
|
+
src: K,
|
|
26
|
+
alt: "Genome Logo"
|
|
27
|
+
}, null, -1), ye = [
|
|
28
|
+
xe
|
|
29
|
+
], ve = ["href"], Ae = /* @__PURE__ */ t("img", {
|
|
30
|
+
class: "h-6 w-28 cursor-pointer md:w-36",
|
|
31
|
+
src: ee,
|
|
32
|
+
alt: "Aiguru Logo"
|
|
33
|
+
}, null, -1), we = [
|
|
34
|
+
Ae
|
|
35
|
+
], be = /* @__PURE__ */ b({
|
|
36
|
+
__name: "headerAMA",
|
|
37
|
+
setup(n) {
|
|
38
|
+
const e = q(), a = y(""), r = y(""), _ = P(te(se, void 0), window.location);
|
|
39
|
+
return _ === "prod" ? a.value = "https://genome.genpact.com" : a.value = "https://genome-dev.genpact.com", _ === "prod" ? r.value = "https://genome.genpact.com/#aiguru" : r.value = "https://genome-dev.genpact.com/#aiguru", (c, o) => (u(), h("nav", fe, [
|
|
40
|
+
t("a", {
|
|
41
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
42
|
+
href: m(e).url(a.value),
|
|
43
|
+
target: "_blank"
|
|
44
|
+
}, ye, 8, ge),
|
|
45
|
+
t("a", {
|
|
46
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
47
|
+
href: m(e).url(r.value),
|
|
48
|
+
target: "_blank"
|
|
49
|
+
}, we, 8, ve)
|
|
50
|
+
]));
|
|
51
|
+
}
|
|
52
|
+
}), ke = { class: "fontFormattingAMA flex justify-start py-2" }, $e = { class: "w-full max-w-[92%]" }, Fe = { class: "fontFormattingAMA rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-4 py-3 text-lg font-semibold text-[#181C23] md:py-4 md:text-xl" }, qe = { key: 0 }, Me = ["innerHTML"], Ie = /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1), Se = /* @__PURE__ */ b({
|
|
53
|
+
__name: "greetingsAMA",
|
|
54
|
+
setup(n) {
|
|
55
|
+
const e = L(), a = q(), r = ` Hi ${e.learnerName || "Learner"}! 👋`, _ = F(() => r), c = F(() => a.text(r.replace("👋", "👋")));
|
|
56
|
+
return F(() => `I'm here and ready to help! What would you like to know about <span class='font-[600]'>${e.amaSkillName || "Skill"}</span>? <br/> Ask me to explain concepts, provide examples, or clarify anything that seems confusing.`), (o, i) => (u(), h("section", null, [
|
|
57
|
+
t("div", ke, [
|
|
58
|
+
t("div", $e, [
|
|
59
|
+
t("div", Fe, [
|
|
60
|
+
m(a).native ? (u(), h("div", qe, C(c.value), 1)) : (u(), h("div", {
|
|
61
|
+
key: 1,
|
|
62
|
+
innerHTML: _.value
|
|
63
|
+
}, null, 8, Me))
|
|
64
|
+
]),
|
|
65
|
+
Ie
|
|
66
|
+
])
|
|
67
|
+
])
|
|
68
|
+
]));
|
|
69
|
+
}
|
|
70
|
+
}), Le = (n) => (N("data-v-2d52af07"), n = n(), Q(), n), Ce = { class: "fontFormattingAMA flex justify-start py-2" }, Ee = { class: "w-full max-w-[92%]" }, Be = { class: "line-break rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-4 py-3 text-sm leading-6 text-[#3f4451] md:py-4 md:text-base md:leading-7" }, Ne = ["innerHTML"], Qe = /* @__PURE__ */ Le(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Re = /* @__PURE__ */ b({
|
|
71
|
+
__name: "responseAMA",
|
|
72
|
+
props: {
|
|
73
|
+
answer: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: !0
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
setup(n) {
|
|
79
|
+
const e = n, a = q(), r = (o) => o.replace(/\*\*(.+?)\*\*/g, '<strong style="color: #181C23;">$1</strong>').replace(/\*/g, ""), _ = (o) => {
|
|
80
|
+
const i = [];
|
|
81
|
+
let f = [];
|
|
82
|
+
const s = () => {
|
|
83
|
+
f.length && (i.push({ html: `<ul style="list-style: disc; margin: 4px 0 4px 1.5rem; padding: 0;">${f.join("")}</ul>`, block: !0 }), f = []);
|
|
84
|
+
};
|
|
85
|
+
for (const l of o.split(`
|
|
86
|
+
`)) {
|
|
87
|
+
const x = l.match(/^\s*[-*•]\s+(.*)$/);
|
|
88
|
+
if (x) {
|
|
89
|
+
f.push(`<li style="margin: 2px 0;">${r(x[1])}</li>`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
s();
|
|
93
|
+
const d = l.match(/^\s*#{1,6}\s*(.*)$/);
|
|
94
|
+
d ? i.push({ html: `<div style="margin-top: 6px; font-weight: 700; color: #181C23;">${r(d[1])}</div>`, block: !0 }) : i.push({ html: r(l), block: !1 });
|
|
95
|
+
}
|
|
96
|
+
return s(), i.reduce((l, x, d) => d === 0 ? x.html : l + (x.block || i[d - 1].block ? "" : `
|
|
97
|
+
`) + x.html, "");
|
|
98
|
+
}, c = F(() => {
|
|
99
|
+
const o = _(e.answer).replace(
|
|
100
|
+
/Assessment Rating & Feedback/g,
|
|
101
|
+
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
102
|
+
), i = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, f = o.replace(i, (s, l, x) => `<a href="${a.url(x)}" target="_blank" rel="noopener noreferrer" style="color: #00AECF; text-decoration: underline;">${l}</a>`);
|
|
103
|
+
return a.html(f);
|
|
104
|
+
});
|
|
105
|
+
return (o, i) => (u(), h("div", Ce, [
|
|
106
|
+
t("div", Ee, [
|
|
107
|
+
t("div", Be, [
|
|
108
|
+
t("span", {
|
|
109
|
+
class: "fontFormattingAMA answer-link",
|
|
110
|
+
innerHTML: c.value
|
|
111
|
+
}, null, 8, Ne)
|
|
112
|
+
]),
|
|
113
|
+
Qe
|
|
114
|
+
])
|
|
115
|
+
]));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const Te = /* @__PURE__ */ M(Re, [["__scopeId", "data-v-2d52af07"]]), je = { class: "fontFormattingAMA flex justify-end py-2" }, He = { class: "max-w-[80%]" }, Ve = { class: "rounded-2xl rounded-br-sm bg-[#FFAB28] px-4 py-3" }, Ge = { class: "fontFormattingAMA whitespace-pre-line break-words text-sm leading-6 text-[#181C23] md:text-base" }, ze = /* @__PURE__ */ t("div", { class: "mt-1 text-right text-xs text-gray-400" }, "You", -1), Ue = /* @__PURE__ */ b({
|
|
119
|
+
__name: "learnerAMA",
|
|
120
|
+
props: {
|
|
121
|
+
question: {
|
|
122
|
+
type: String,
|
|
123
|
+
required: !0
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
setup(n) {
|
|
127
|
+
return (e, a) => (u(), h("div", je, [
|
|
128
|
+
t("div", He, [
|
|
129
|
+
t("div", Ve, [
|
|
130
|
+
t("div", Ge, C(n.question), 1)
|
|
131
|
+
]),
|
|
132
|
+
ze
|
|
133
|
+
])
|
|
134
|
+
]));
|
|
135
|
+
}
|
|
136
|
+
}), T = (n) => (N("data-v-402974e4"), n = n(), Q(), n), We = { class: "fontFormattingAMA flex w-full justify-start py-2" }, De = { class: "w-full max-w-[92%]" }, Oe = { class: "rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-4 py-4" }, Pe = {
|
|
137
|
+
class: "flex items-center gap-2.5",
|
|
138
|
+
role: "status",
|
|
139
|
+
"aria-live": "polite"
|
|
140
|
+
}, Ke = /* @__PURE__ */ T(() => /* @__PURE__ */ t("span", {
|
|
141
|
+
class: "dots flex shrink-0 items-center gap-1",
|
|
142
|
+
"aria-hidden": "true"
|
|
143
|
+
}, [
|
|
144
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
145
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
146
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" })
|
|
147
|
+
], -1)), Ye = /* @__PURE__ */ T(() => /* @__PURE__ */ t("div", { class: "mt-4 space-y-2.5" }, [
|
|
148
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-full rounded" }),
|
|
149
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-11/12 rounded" }),
|
|
150
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-4/6 rounded" })
|
|
151
|
+
], -1)), Je = /* @__PURE__ */ T(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Xe = /* @__PURE__ */ b({
|
|
152
|
+
__name: "LoadingResponseAMA",
|
|
153
|
+
setup(n) {
|
|
154
|
+
const e = q(), a = [
|
|
155
|
+
"Generating response",
|
|
156
|
+
"Fetching the best response for you",
|
|
157
|
+
"Thinking... give me a moment",
|
|
158
|
+
"One moment while I gather the information",
|
|
159
|
+
"Hang in tight, we are almost there",
|
|
160
|
+
"Almost there... just a bit longer",
|
|
161
|
+
"Compiling a response for you"
|
|
162
|
+
], r = y(0), _ = setInterval(() => {
|
|
163
|
+
var c, o;
|
|
164
|
+
!((o = (c = e.scope) == null ? void 0 : c.isActive) != null && o.call(c)) && e.native || (r.value = (r.value + 1) % a.length);
|
|
165
|
+
}, 5e3);
|
|
166
|
+
return e.own(() => clearInterval(_)), (c, o) => (u(), h("div", We, [
|
|
167
|
+
t("div", De, [
|
|
168
|
+
t("div", Oe, [
|
|
169
|
+
t("div", Pe, [
|
|
170
|
+
Ke,
|
|
171
|
+
v(ne, {
|
|
172
|
+
name: "fade",
|
|
173
|
+
mode: "out-in"
|
|
174
|
+
}, {
|
|
175
|
+
default: V(() => [
|
|
176
|
+
(u(), h("span", {
|
|
177
|
+
key: r.value,
|
|
178
|
+
class: "text-xs italic leading-4 text-gray-500"
|
|
179
|
+
}, C(a[r.value]), 1))
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
})
|
|
183
|
+
]),
|
|
184
|
+
Ye
|
|
185
|
+
]),
|
|
186
|
+
Je
|
|
187
|
+
])
|
|
188
|
+
]));
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
const Ze = /* @__PURE__ */ M(Xe, [["__scopeId", "data-v-402974e4"]]), et = { key: 0 }, tt = { key: 1 }, st = {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: "flex"
|
|
194
|
+
}, nt = /* @__PURE__ */ b({
|
|
195
|
+
__name: "conversationAMA",
|
|
196
|
+
setup(n) {
|
|
197
|
+
let e = y(""), a = y("");
|
|
198
|
+
e.value = '<a style="color:#00AECF;"', a.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
199
|
+
const r = L(), _ = q(), c = y(), o = () => {
|
|
200
|
+
var s;
|
|
201
|
+
const i = _.native && _.root && typeof _.root.querySelectorAll == "function" ? _.root.querySelectorAll('[name="askQuestion"]') : document.getElementsByName("askQuestion"), f = Array.from(i);
|
|
202
|
+
f.length && ((s = f.pop()) == null || s.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
203
|
+
};
|
|
204
|
+
return G(o), oe(o), (i, f) => (u(), h("div", {
|
|
205
|
+
ref_key: "nestedElement",
|
|
206
|
+
ref: c,
|
|
207
|
+
class: "smooth-scroll overflow-auto md:px-6 px-2"
|
|
208
|
+
}, [
|
|
209
|
+
v(Se),
|
|
210
|
+
(u(!0), h(ae, null, re(m(r).conversations, (s, l) => (u(), h("div", { key: l }, [
|
|
211
|
+
s.question ? (u(), h("div", et, [
|
|
212
|
+
v(Ue, {
|
|
213
|
+
question: s.question,
|
|
214
|
+
c2question: s.c2question,
|
|
215
|
+
"show-feedback": s.showFeedback,
|
|
216
|
+
id: `qId${l}`,
|
|
217
|
+
name: "askQuestion",
|
|
218
|
+
"que-id": l
|
|
219
|
+
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
220
|
+
])) : S("", !0),
|
|
221
|
+
s.answer ? (u(), h("div", tt, [
|
|
222
|
+
v(Te, {
|
|
223
|
+
question: s == null ? void 0 : s.question,
|
|
224
|
+
c2question: s == null ? void 0 : s.c2question,
|
|
225
|
+
"show-sources": s == null ? void 0 : s.showSources,
|
|
226
|
+
questionId: s.id,
|
|
227
|
+
answer: s.answer.replaceAll("<a", m(e)).replaceAll("<ul", m(a)),
|
|
228
|
+
"show-feedback": s.showFeedback,
|
|
229
|
+
"related-ques": s.relatedQues,
|
|
230
|
+
"options-array": s.optionsArray,
|
|
231
|
+
"ans-id": l
|
|
232
|
+
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
233
|
+
])) : S("", !0)
|
|
234
|
+
]))), 128)),
|
|
235
|
+
m(r).dotLoader ? (u(), h("div", st, [
|
|
236
|
+
v(Ze)
|
|
237
|
+
])) : S("", !0)
|
|
238
|
+
], 512));
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
const ot = /* @__PURE__ */ M(nt, [["__scopeId", "data-v-ee7bc477"]]), B = (n) => String(n.query.amaId ?? "");
|
|
242
|
+
function at(n, e, a, r, _, c = (o) => !1) {
|
|
243
|
+
const o = y(!1);
|
|
244
|
+
let i = 0, f = !0;
|
|
245
|
+
const s = () => {
|
|
246
|
+
i += 1, o.value = !1, e.dotLoader = !1;
|
|
247
|
+
};
|
|
248
|
+
R(() => B(n), s), z(() => {
|
|
249
|
+
f = !1, s();
|
|
250
|
+
});
|
|
251
|
+
const l = (d, p) => f && d === i && p === B(n);
|
|
252
|
+
return { isWaitingResponse: o, sendQuestion: async () => {
|
|
253
|
+
var k, $, g;
|
|
254
|
+
if (e.question.trim().length < 1) {
|
|
255
|
+
a.setError("Please enter answer!");
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (e.amaQuestionsLeft <= 0) {
|
|
259
|
+
a.setError("You have exhausted your question limit!");
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const d = ++i, p = B(n);
|
|
263
|
+
o.value = !0, e.dotLoader = !0;
|
|
264
|
+
const A = e.question;
|
|
265
|
+
e.conversations.push({ question: A }), e.question = "";
|
|
266
|
+
const I = {
|
|
267
|
+
skillId: p,
|
|
268
|
+
question: A,
|
|
269
|
+
past_messages: e.past_messages
|
|
270
|
+
};
|
|
271
|
+
try {
|
|
272
|
+
const w = await r(I);
|
|
273
|
+
if (!l(d, p))
|
|
274
|
+
return;
|
|
275
|
+
e.addConversation((k = w.data) == null ? void 0 : k.body, "new"), o.value = !1, e.dotLoader = !1;
|
|
276
|
+
} catch (w) {
|
|
277
|
+
if (c(w) || !l(d, p))
|
|
278
|
+
return;
|
|
279
|
+
o.value = !1, e.dotLoader = !1, _(w) ? a.setError((g = ($ = w.response) == null ? void 0 : $.data) == null ? void 0 : g.message) : a.setError("There was an issue, please contact helpmate");
|
|
280
|
+
}
|
|
281
|
+
} };
|
|
282
|
+
}
|
|
283
|
+
const j = (n) => (N("data-v-e7af0969"), n = n(), Q(), n), rt = { class: "w-full bg-white px-2 pb-3 pt-3 md:px-6" }, it = { class: "relative" }, lt = { class: "pointer-events-none absolute inset-y-0 left-3 flex items-center md:left-4" }, ct = {
|
|
284
|
+
class: "flex h-8 w-8 items-center justify-center rounded-full bg-[#FFF4E0] text-[#E08A00] md:h-9 md:w-9",
|
|
285
|
+
"aria-hidden": "true"
|
|
286
|
+
}, dt = ["placeholder"], ut = { class: "absolute inset-y-0 right-2 flex items-center md:right-3" }, _t = {
|
|
287
|
+
key: 1,
|
|
288
|
+
class: "flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF4E0]",
|
|
289
|
+
role: "status",
|
|
290
|
+
"aria-label": "Waiting for response",
|
|
291
|
+
title: "Waiting for response"
|
|
292
|
+
}, mt = /* @__PURE__ */ j(() => /* @__PURE__ */ t("span", { class: "h-5 w-5 animate-spin rounded-full border-[2.5px] border-[#FFAB28] border-t-transparent" }, null, -1)), pt = [
|
|
293
|
+
mt
|
|
294
|
+
], ht = { class: "fontFormattingAMA flex flex-wrap items-center justify-center gap-x-1.5 gap-y-0.5 pt-2 text-center text-xs text-gray-500 md:text-sm" }, ft = /* @__PURE__ */ j(() => /* @__PURE__ */ t("span", null, "Note: AI-generated response may not be fully accurate; check with experts for critical information.", -1)), gt = /* @__PURE__ */ j(() => /* @__PURE__ */ t("span", {
|
|
295
|
+
class: "hidden sm:inline",
|
|
296
|
+
"aria-hidden": "true"
|
|
297
|
+
}, "·", -1)), xt = { class: "font-semibold text-[#181C23]" }, yt = /* @__PURE__ */ b({
|
|
298
|
+
__name: "NewQuestionAMA",
|
|
299
|
+
setup(n) {
|
|
300
|
+
const e = L(), a = U();
|
|
301
|
+
e.question = "";
|
|
302
|
+
const r = y(null), _ = y(!1), c = y(E), o = W(), i = D(), { isWaitingResponse: f, sendQuestion: s } = at(
|
|
303
|
+
o,
|
|
304
|
+
e,
|
|
305
|
+
a,
|
|
306
|
+
(d) => i.postApi("/amaBotResponse", d),
|
|
307
|
+
ie.isAxiosError,
|
|
308
|
+
O
|
|
309
|
+
);
|
|
310
|
+
G(() => {
|
|
311
|
+
r.value.focus();
|
|
312
|
+
});
|
|
313
|
+
const l = F(() => e.question.trim().length > 0);
|
|
314
|
+
R(
|
|
315
|
+
() => e.question,
|
|
316
|
+
async () => {
|
|
317
|
+
await _e();
|
|
318
|
+
const d = r.value;
|
|
319
|
+
d && (d.style.height = "auto", d.style.height = `${d.scrollHeight}px`);
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
const x = (d) => {
|
|
323
|
+
const p = d.length;
|
|
324
|
+
c.value = E - p, _.value = p >= E;
|
|
325
|
+
};
|
|
326
|
+
return (d, p) => (u(), h("div", rt, [
|
|
327
|
+
t("div", it, [
|
|
328
|
+
t("div", lt, [
|
|
329
|
+
t("span", ct, [
|
|
330
|
+
v(m(he), { class: "h-4 w-4 md:h-5 md:w-5" })
|
|
331
|
+
])
|
|
332
|
+
]),
|
|
333
|
+
le(t("textarea", {
|
|
334
|
+
ref_key: "AiSearch",
|
|
335
|
+
ref: r,
|
|
336
|
+
"onUpdate:modelValue": p[0] || (p[0] = (A) => m(e).question = A),
|
|
337
|
+
rows: "1",
|
|
338
|
+
class: "fontFormattingAMA block max-h-40 w-full resize-none overflow-y-auto rounded-2xl border border-[#FFAB28]/40 bg-white py-3 pl-14 pr-16 text-sm leading-6 text-[#181C23] shadow-[0_4px_16px_rgba(7,50,98,0.08)] transition placeholder:text-gray-400 hover:border-[#FFAB28]/70 focus:border-[#FFAB28] focus:outline-none focus:ring-4 focus:ring-[#FFAB28]/20 md:py-4 md:pl-16 md:pr-20 md:text-base",
|
|
339
|
+
placeholder: `Ask me about ${m(e).amaSkillName || "Skill Name"}`,
|
|
340
|
+
onKeydown: p[1] || (p[1] = de(me((A) => m(f) ? "" : m(s)(), ["exact", "prevent"]), ["enter"])),
|
|
341
|
+
onInput: p[2] || (p[2] = (A) => x(m(e).question))
|
|
342
|
+
}, null, 40, dt), [
|
|
343
|
+
[ce, m(e).question]
|
|
344
|
+
]),
|
|
345
|
+
t("div", ut, [
|
|
346
|
+
m(f) ? (u(), h("span", _t, pt)) : (u(), h("button", {
|
|
347
|
+
key: 0,
|
|
348
|
+
type: "button",
|
|
349
|
+
title: "Send",
|
|
350
|
+
"aria-label": "Send question",
|
|
351
|
+
class: ue([l.value ? "bg-[#FFAB28] text-[#181C23] shadow-md hover:-translate-y-0.5 hover:shadow-lg" : "bg-[#FFAB28]/40 text-[#181C23]/60", "flex h-10 w-10 items-center justify-center rounded-full transition"]),
|
|
352
|
+
onClick: p[3] || (p[3] = (A) => m(s)())
|
|
353
|
+
}, [
|
|
354
|
+
v(m(Y), {
|
|
355
|
+
class: "h-5 w-5",
|
|
356
|
+
"aria-hidden": "true"
|
|
357
|
+
})
|
|
358
|
+
], 2))
|
|
359
|
+
])
|
|
360
|
+
]),
|
|
361
|
+
t("div", ht, [
|
|
362
|
+
v(m(J), {
|
|
363
|
+
class: "h-4 w-4 shrink-0 text-[#E08A00]",
|
|
364
|
+
"aria-hidden": "true"
|
|
365
|
+
}),
|
|
366
|
+
ft,
|
|
367
|
+
gt,
|
|
368
|
+
t("span", xt, C(m(e).amaQuestionsLeft) + " questions remaining for the day", 1)
|
|
369
|
+
])
|
|
370
|
+
]));
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
const vt = /* @__PURE__ */ M(yt, [["__scopeId", "data-v-e7af0969"]]), At = (n) => String(n.query.amaId ?? "");
|
|
374
|
+
function wt(n, e, a, r, _ = (c) => !1) {
|
|
375
|
+
const c = y(!0), o = y(!1);
|
|
376
|
+
let i = 0;
|
|
377
|
+
const f = (l) => {
|
|
378
|
+
e.amaSkillId = l, e.amaSkillName = "", e.amaQuestionsLeft = 0, e.question = "", e.conversations = [], e.past_messages = [];
|
|
379
|
+
}, s = async (l) => {
|
|
380
|
+
var p, A, I, k, $;
|
|
381
|
+
const x = ++i;
|
|
382
|
+
c.value = !0, o.value = !1, f(l);
|
|
383
|
+
let d = !1;
|
|
384
|
+
try {
|
|
385
|
+
const g = await r(l);
|
|
386
|
+
if (x !== i)
|
|
387
|
+
return;
|
|
388
|
+
e.initialize(g.data), e.amaQuestionsLeft = (p = g == null ? void 0 : g.data) == null ? void 0 : p.questionsLeftAIGC, e.amaSkillName = (A = g == null ? void 0 : g.data) == null ? void 0 : A.skillName;
|
|
389
|
+
} catch (g) {
|
|
390
|
+
if (_(g)) {
|
|
391
|
+
d = !0;
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
if (x !== i)
|
|
395
|
+
return;
|
|
396
|
+
const w = g && typeof g == "object" && ((I = g.response) == null ? void 0 : I.status);
|
|
397
|
+
w === 424 || w === 425 ? o.value = !0 : w ? a.setError(($ = (k = g.response) == null ? void 0 : k.data) == null ? void 0 : $.message) : a.setError("There was an issue, please contact helpmate");
|
|
398
|
+
} finally {
|
|
399
|
+
!d && x === i && (c.value = !1);
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
return R(() => At(n), (l) => {
|
|
403
|
+
s(l);
|
|
404
|
+
}, { immediate: !0 }), z(() => {
|
|
405
|
+
i += 1;
|
|
406
|
+
}), { loaderValue: c, notAllowedModalVisible: o };
|
|
407
|
+
}
|
|
408
|
+
const bt = {
|
|
409
|
+
key: 1,
|
|
410
|
+
class: "flex h-screen flex-col items-stretch"
|
|
411
|
+
}, kt = { class: "z-20 shrink-0" }, $t = { class: "mx-auto flex min-h-0 w-full flex-1 flex-col bg-white pt-4 md:w-11/12 md:pt-6" }, Ft = { class: "shrink-0" }, qt = /* @__PURE__ */ b({
|
|
412
|
+
__name: "AssessmentAMA",
|
|
413
|
+
setup(n) {
|
|
414
|
+
const e = L(), a = U(), r = W(), _ = D(), { loaderValue: c, notAllowedModalVisible: o } = wt(
|
|
415
|
+
r,
|
|
416
|
+
e,
|
|
417
|
+
a,
|
|
418
|
+
(i) => _.getApi(`/getLearnerData?amaSkillId=${i}`),
|
|
419
|
+
O
|
|
420
|
+
);
|
|
421
|
+
return (i, f) => (u(), h("section", null, [
|
|
422
|
+
m(o) ? (u(), H(X, {
|
|
423
|
+
key: 0,
|
|
424
|
+
tone: "error",
|
|
425
|
+
title: "Assessment Access Required"
|
|
426
|
+
}, {
|
|
427
|
+
default: V(() => [
|
|
428
|
+
pe(" You don't have access to this assessment. Please contact to administrator ")
|
|
429
|
+
]),
|
|
430
|
+
_: 1
|
|
431
|
+
})) : S("", !0),
|
|
432
|
+
t("div", null, [
|
|
433
|
+
m(c) ? (u(), H(Z, { key: 0 })) : (u(), h("main", bt, [
|
|
434
|
+
t("div", kt, [
|
|
435
|
+
v(be)
|
|
436
|
+
]),
|
|
437
|
+
t("div", $t, [
|
|
438
|
+
v(ot, { class: "min-h-0 flex-1" }),
|
|
439
|
+
t("div", Ft, [
|
|
440
|
+
v(vt)
|
|
441
|
+
])
|
|
442
|
+
])
|
|
443
|
+
]))
|
|
444
|
+
])
|
|
445
|
+
]));
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
const Bt = /* @__PURE__ */ M(qt, [["__scopeId", "data-v-82f9750d"]]);
|
|
449
|
+
export {
|
|
450
|
+
Bt as default
|
|
451
|
+
};
|