@genpact/genome.mfe.mgtwin-app 1.1.315-alpha → 1.1.317-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.
Files changed (23) hide show
  1. package/dist/{ArrowLeftCircleIcon-39762b31.mjs → ArrowLeftCircleIcon-c9f2a7b9.mjs} +1 -1
  2. package/dist/AssessmentAMA-b07e83d5.mjs +354 -0
  3. package/dist/{AssessmentSimulation-e8b2b114.mjs → AssessmentSimulation-70ee812d.mjs} +5071 -5236
  4. package/dist/{EditSkillAdminData-da1542fa.mjs → EditSkillAdminData-e696c69b.mjs} +9 -9
  5. package/dist/{EditSkillData-2eafa942.mjs → EditSkillData-f1176639.mjs} +7 -7
  6. package/dist/{HomeView-d7f2acb7.mjs → HomeView-abfafcbb.mjs} +5 -5
  7. package/dist/{Loading-c7be062d.mjs → Loading-f3465c5e.mjs} +1 -1
  8. package/dist/{LoadingSimulation-8a2c4725.mjs → LoadingSimulation-e594bd82.mjs} +1 -1
  9. package/dist/{Modal-65cfe959.mjs → Modal-9f4995ec.mjs} +1 -1
  10. package/dist/{PaperAirplaneIcon-7966efb2.mjs → PaperAirplaneIcon-d2ca0f8c.mjs} +1 -1
  11. package/dist/{PromptTesting-0b873496.mjs → PromptTesting-856736c6.mjs} +3 -3
  12. package/dist/{SkillAutomation-1d886d3f.mjs → SkillAutomation-32b6a9eb.mjs} +7 -7
  13. package/dist/{SkillData-8fa9b186.mjs → SkillData-8a1e24db.mjs} +9 -9
  14. package/dist/{Testcase-aefea752.mjs → Testcase-f59e7f03.mjs} +3 -3
  15. package/dist/{UnderMaintenance-2a07f65e.mjs → UnderMaintenance-eb471018.mjs} +1 -1
  16. package/dist/{_commonjsHelpers-777ec84c.mjs → _commonjsHelpers-9c3f6692.mjs} +1 -1
  17. package/dist/{api-4b466ad8.mjs → api-ee91e0ad.mjs} +1 -1
  18. package/dist/{main-736b05ea.mjs → main-3eaa1b6a.mjs} +2379 -2375
  19. package/dist/mgtwin.es.min.js +1 -1
  20. package/dist/mgtwin.umd.min.js +15 -15
  21. package/dist/style.css +1 -1
  22. package/package.json +1 -1
  23. package/dist/AssessmentAMA-b6427c19.mjs +0 -501
@@ -1,4 +1,4 @@
1
- import { o as e, c as r, a } from "./main-736b05ea.mjs";
1
+ import { o as e, c as r, a } from "./main-3eaa1b6a.mjs";
2
2
  function c(l, o) {
3
3
  return e(), r("svg", {
4
4
  xmlns: "http://www.w3.org/2000/svg",
@@ -0,0 +1,354 @@
1
+ import { _ as H, a as U, L as V } from "./LoadingSimulation-e594bd82.mjs";
2
+ import { _ as B, Q as M, a as z } from "./Modal-9f4995ec.mjs";
3
+ import { d as y, r as d, H as R, o as c, c as u, a as e, u as k, y as L, t as S, G, p as E, g as C, C as N, z as D, h as v, F as W, e as O, f as I, b as x, k as F, w as Z, m as K, M as Y, q as T, s as J, l as X } from "./main-3eaa1b6a.mjs";
4
+ import { _ as $ } from "./_plugin-vue_export-helper-dad06003.mjs";
5
+ import { p as ee, g as te } from "./api-ee91e0ad.mjs";
6
+ import "./loadernew-ac153a51.mjs";
7
+ const se = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, ae = ["href"], oe = /* @__PURE__ */ e("img", {
8
+ class: "h-11 w-auto cursor-pointer",
9
+ src: H,
10
+ alt: "Genome Logo"
11
+ }, null, -1), ne = [
12
+ oe
13
+ ], re = ["href"], le = /* @__PURE__ */ e("img", {
14
+ class: "h-9 w-28 cursor-pointer md:w-36",
15
+ src: B,
16
+ alt: "Aiguru Logo"
17
+ }, null, -1), ie = [
18
+ le
19
+ ], ce = /* @__PURE__ */ y({
20
+ __name: "headerAMA",
21
+ setup(n) {
22
+ const t = d(""), o = d("");
23
+ return R === "prod" ? t.value = "https://genome.genpact.com" : t.value = "https://genome-dev.genpact.com", R === "prod" ? o.value = "https://genome.genpact.com/#aiguru" : o.value = "https://genome-dev.genpact.com/#aiguru", (l, _) => (c(), u("nav", se, [
24
+ e("a", {
25
+ class: "px-2 md:px-0 lg:px-0",
26
+ href: t.value,
27
+ target: "_blank"
28
+ }, ne, 8, ae),
29
+ e("a", {
30
+ class: "px-2 md:px-0 lg:px-0",
31
+ href: o.value,
32
+ target: "_blank"
33
+ }, ie, 8, re)
34
+ ]));
35
+ }
36
+ }), de = { class: "flex items-end justify-start" }, ue = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, _e = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]" }, pe = ["innerHTML"], me = { class: "w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]" }, he = ["innerHTML"], fe = /* @__PURE__ */ e("br", null, null, -1), ge = /* @__PURE__ */ y({
37
+ __name: "greetingsAMA",
38
+ setup(n) {
39
+ const t = k(), o = ` Hi ${t.learnerName || "Learner"}! &#128075;`, l = L(() => o), _ = L(() => `Welcome to AI Guru Connect — your on-demand learning buddy.<br/> Ask me anything about the <span class='font-[600]'>${t.amaSkillName || "Skill"}</span>, and I’ll give you quick, clear answers so you can keep learning without pause.`);
40
+ return (m, r) => (c(), u("section", null, [
41
+ e("div", de, [
42
+ e("div", ue, [
43
+ e("div", _e, [
44
+ e("div", { innerHTML: l.value }, null, 8, pe)
45
+ ]),
46
+ e("div", me, [
47
+ e("div", { innerHTML: _.value }, null, 8, he)
48
+ ])
49
+ ])
50
+ ]),
51
+ fe
52
+ ]));
53
+ }
54
+ }), ve = { class: "fontFormattingAMA flex items-end justify-start py-2" }, xe = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, ye = ["innerHTML"], we = /* @__PURE__ */ y({
55
+ __name: "responseAMA",
56
+ props: {
57
+ answer: {
58
+ type: String,
59
+ required: !0
60
+ }
61
+ },
62
+ setup(n) {
63
+ const t = n, o = L(() => {
64
+ const l = t.answer.replace(/[*#]/g, "").replace(
65
+ /Assessment Rating & Feedback/g,
66
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
67
+ ), _ = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
68
+ return l.replace(_, (m, r, s) => `<a href="${s}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${r}</a>`);
69
+ });
70
+ return (l, _) => (c(), u("div", ve, [
71
+ e("div", xe, [
72
+ e("span", {
73
+ class: "fontFormattingAMA",
74
+ innerHTML: o.value
75
+ }, null, 8, ye)
76
+ ])
77
+ ]));
78
+ }
79
+ });
80
+ const Ae = /* @__PURE__ */ $(we, [["__scopeId", "data-v-38edcca6"]]), be = { class: "flex justify-end items-end py-3" }, $e = { class: "max-w-[80%]" }, ke = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, qe = /* @__PURE__ */ y({
81
+ __name: "learnerAMA",
82
+ props: {
83
+ question: {
84
+ type: String,
85
+ required: !0
86
+ }
87
+ },
88
+ setup(n) {
89
+ return (t, o) => (c(), u("div", be, [
90
+ e("div", $e, [
91
+ e("div", ke, S(n.question), 1)
92
+ ])
93
+ ]));
94
+ }
95
+ }), Me = (n) => (E("data-v-12a02acf"), n = n(), C(), n), Ie = { class: "flex w-full flex-col items-start justify-start bg-white" }, Le = { class: "bot-typing-animation gap-1" }, Se = { class: "block w-full text-lg italic text-gray-800" }, Ee = /* @__PURE__ */ Me(() => /* @__PURE__ */ e("span", { class: "dot-animation" }, [
96
+ /* @__PURE__ */ e("span", null, "."),
97
+ /* @__PURE__ */ e("span", null, "."),
98
+ /* @__PURE__ */ e("span", null, ".")
99
+ ], -1)), Ce = /* @__PURE__ */ G('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>', 1), Ne = /* @__PURE__ */ y({
100
+ __name: "LoadingResponseAMA",
101
+ setup(n) {
102
+ const t = d("Generating response"), o = d([
103
+ "This may take a few seconds",
104
+ "Fetching the best response for you",
105
+ "Thinking... give me a moment",
106
+ "One moment while I gather the information",
107
+ "Hang in tight, we are almost there",
108
+ "Almost there... just a bit longer",
109
+ "Compiling a response for you"
110
+ ]);
111
+ return setTimeout(() => {
112
+ const l = Math.floor(Math.random() * o.value.length);
113
+ t.value = o.value[l];
114
+ }, 15e3), (l, _) => (c(), u("div", Ie, [
115
+ e("div", Le, [
116
+ e("div", Se, S(t.value), 1),
117
+ Ee
118
+ ]),
119
+ Ce
120
+ ]));
121
+ }
122
+ });
123
+ const Qe = /* @__PURE__ */ $(Ne, [["__scopeId", "data-v-12a02acf"]]), Re = { key: 0 }, Fe = { key: 1 }, Te = {
124
+ key: 0,
125
+ class: "flex"
126
+ }, je = /* @__PURE__ */ y({
127
+ __name: "conversationAMA",
128
+ setup(n) {
129
+ let t = d(""), o = d("");
130
+ t.value = '<a style="color:#00AECF;"', o.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
131
+ const l = k(), _ = d();
132
+ return N(() => {
133
+ var s;
134
+ const m = document.getElementsByName("askQuestion"), r = Array.from(m);
135
+ m.length && ((s = r == null ? void 0 : r.pop()) == null || s.scrollIntoView({ behavior: "smooth", block: "center" }));
136
+ }), D(() => {
137
+ var s;
138
+ const m = document.getElementsByName("askQuestion"), r = Array.from(m);
139
+ m.length && ((s = r == null ? void 0 : r.pop()) == null || s.scrollIntoView({ behavior: "smooth", block: "center" }));
140
+ }), (m, r) => (c(), u("div", {
141
+ ref_key: "nestedElement",
142
+ ref: _,
143
+ class: "smooth-scroll overflow-auto md:px-6 px-2"
144
+ }, [
145
+ v(ge),
146
+ (c(!0), u(W, null, O(x(l).conversations, (s, p) => (c(), u("div", { key: p }, [
147
+ s.question ? (c(), u("div", Re, [
148
+ v(qe, {
149
+ question: s.question,
150
+ c2question: s.c2question,
151
+ "show-feedback": s.showFeedback,
152
+ id: `qId${p}`,
153
+ name: "askQuestion",
154
+ "que-id": p
155
+ }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
156
+ ])) : I("", !0),
157
+ s.answer ? (c(), u("div", Fe, [
158
+ v(Ae, {
159
+ question: s == null ? void 0 : s.question,
160
+ c2question: s == null ? void 0 : s.c2question,
161
+ "show-sources": s == null ? void 0 : s.showSources,
162
+ questionId: s.id,
163
+ answer: s.answer.replaceAll("<a", x(t)).replaceAll("<ul", x(o)),
164
+ "show-feedback": s.showFeedback,
165
+ "related-ques": s.relatedQues,
166
+ "options-array": s.optionsArray,
167
+ "ans-id": p
168
+ }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
169
+ ])) : I("", !0)
170
+ ]))), 128)),
171
+ x(l).dotLoader ? (c(), u("div", Te, [
172
+ v(Qe)
173
+ ])) : I("", !0)
174
+ ], 512));
175
+ }
176
+ });
177
+ const Pe = /* @__PURE__ */ $(je, [["__scopeId", "data-v-e6168dd4"]]), q = (n) => (E("data-v-482b2d96"), n = n(), C(), n), He = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, Ue = { class: "py-2" }, Ve = { class: "flex" }, Be = { class: "z-1 relative w-full" }, ze = { class: "relative w-full" }, Ge = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, De = { key: 0 }, We = /* @__PURE__ */ q(() => /* @__PURE__ */ e("path", { d: "M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z" }, null, -1)), Oe = [
178
+ We
179
+ ], Ze = {
180
+ key: 1,
181
+ class: "tooltip"
182
+ }, Ke = /* @__PURE__ */ q(() => /* @__PURE__ */ e("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), Ye = /* @__PURE__ */ q(() => /* @__PURE__ */ e("img", {
183
+ class: "w-7 h-7",
184
+ src: U,
185
+ alt: "watingIcon"
186
+ }, null, -1)), Je = [
187
+ Ke,
188
+ Ye
189
+ ], Xe = { class: "flex justify-start" }, et = { class: "flex justify-start items-start text-[#161916]" }, tt = /* @__PURE__ */ q(() => /* @__PURE__ */ e("div", { class: "pt-1 text-start font-sans" }, [
190
+ /* @__PURE__ */ e("div", { class: "text-xs font-bold text-gray-500 md:text-sm" }, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
191
+ ], -1)), st = /* @__PURE__ */ y({
192
+ __name: "NewQuestionAMA",
193
+ setup(n) {
194
+ const t = k(), o = F();
195
+ t.question = "";
196
+ const l = d(null), _ = d(!1), m = d(M), r = d(!1);
197
+ N(() => {
198
+ l.value.focus();
199
+ });
200
+ const p = d(((h) => new URLSearchParams(window.location.search).get(h) || "")("amaId"));
201
+ console.log("amaId", p.value);
202
+ const w = (h) => {
203
+ const i = h.length;
204
+ m.value = M - i, _.value = i >= M;
205
+ }, A = async () => {
206
+ var h, i, f, b;
207
+ try {
208
+ if (t.question.trim().length < 1) {
209
+ o.setError("Please enter answer!");
210
+ return;
211
+ }
212
+ if (t.amaQuestionsLeft <= 0) {
213
+ o.setError("You have exhausted your question limit!");
214
+ return;
215
+ }
216
+ r.value = !0, t.dotLoader = !0;
217
+ const a = {
218
+ question: t == null ? void 0 : t.question
219
+ };
220
+ t.conversations.push(a);
221
+ const g = d("");
222
+ g.value = t == null ? void 0 : t.question, t.question = "";
223
+ const j = {
224
+ skillId: p.value,
225
+ question: g.value,
226
+ past_messages: t.past_messages
227
+ }, P = await ee("/amaBotResponse", j);
228
+ t.addConversation((h = P.data) == null ? void 0 : h.body, "new"), r.value = !1, t.dotLoader = !1;
229
+ } catch (a) {
230
+ if (console.error(a), t.dotLoader = !1, r.value = !1, T.isAxiosError(a)) {
231
+ const g = a;
232
+ console.log("Error found!"), console.error((i = g.response) == null ? void 0 : i.data), o.setError((b = (f = g.response) == null ? void 0 : f.data) == null ? void 0 : b.message);
233
+ } else
234
+ o.setError("There was an issue, please contact helpmate");
235
+ }
236
+ };
237
+ return (h, i) => (c(), u("div", He, [
238
+ e("div", Ue, [
239
+ e("div", Ve, [
240
+ e("div", Be, [
241
+ e("div", ze, [
242
+ e("div", Ge, [
243
+ r.value ? (c(), u("div", Ze, Je)) : (c(), u("div", De, [
244
+ (c(), u("svg", {
245
+ onClick: i[0] || (i[0] = (f) => A()),
246
+ xmlns: "http://www.w3.org/2000/svg",
247
+ fill: "currentColor",
248
+ class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
249
+ viewBox: "0 0 16 16"
250
+ }, Oe))
251
+ ]))
252
+ ]),
253
+ e("div", Xe, [
254
+ Z(e("input", {
255
+ onKeyup: [
256
+ i[1] || (i[1] = Y((f) => r.value ? "" : A(), ["enter"])),
257
+ i[3] || (i[3] = (f) => w(x(t).question))
258
+ ],
259
+ "onUpdate:modelValue": i[2] || (i[2] = (f) => x(t).question = f),
260
+ class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",
261
+ placeholder: "Write your answer here...",
262
+ type: "text",
263
+ ref_key: "AiSearch",
264
+ ref: l
265
+ }, null, 544), [
266
+ [K, x(t).question]
267
+ ])
268
+ ])
269
+ ]),
270
+ e("div", et, S(x(t).amaQuestionsLeft) + " questions remaining for the day ", 1),
271
+ tt
272
+ ])
273
+ ])
274
+ ])
275
+ ]));
276
+ }
277
+ });
278
+ const at = /* @__PURE__ */ $(st, [["__scopeId", "data-v-482b2d96"]]), Q = (n) => (E("data-v-944ca5e3"), n = n(), C(), n), ot = /* @__PURE__ */ Q(() => /* @__PURE__ */ e("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
279
+ /* @__PURE__ */ e("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
280
+ /* @__PURE__ */ e("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ")
281
+ ], -1)), nt = {
282
+ key: 1,
283
+ className: "h-screen flex flex-col items-stretch"
284
+ }, rt = { class: "z-20" }, lt = /* @__PURE__ */ Q(() => /* @__PURE__ */ e("div", { class: "mt-6" }, null, -1)), it = { class: "flex h-full items-stretch overflow-hidden" }, ct = { class: "mx-auto w-11/12 bg-white" }, dt = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, ut = /* @__PURE__ */ Q(() => /* @__PURE__ */ e("div", { class: "mt-[160px]" }, null, -1)), _t = { class: "relative" }, pt = /* @__PURE__ */ y({
285
+ __name: "AssessmentAMA",
286
+ setup(n) {
287
+ const t = d(!0), o = d(!1), l = k(), _ = F();
288
+ d("");
289
+ const r = d(((p) => new URLSearchParams(window.location.search).get(p) || "")("amaId"));
290
+ l.amaSkillId = r.value ?? "", N(async () => {
291
+ t.value = !0, await s(), t.value = !1;
292
+ });
293
+ const s = async () => {
294
+ var p, w, A, h, i, f, b;
295
+ try {
296
+ if (r.value === null)
297
+ throw {
298
+ response: {
299
+ status: 424,
300
+ data: {
301
+ message: "Invalid URL"
302
+ }
303
+ }
304
+ };
305
+ console.log("before calling get learner");
306
+ const a = await te(
307
+ `/getLearnerData?amaSkillId=${r.value}`
308
+ );
309
+ l.initialize(a.data), l.amaQuestionsLeft = (p = a == null ? void 0 : a.data) == null ? void 0 : p.questionsLeftAIGC, l.amaSkillName = (w = a == null ? void 0 : a.data) == null ? void 0 : w.skillName, t.value = !1;
310
+ } catch (a) {
311
+ if (console.error(a), t.value = !1, T.isAxiosError(a) && ((A = a.response) != null && A.status) || a && typeof a == "object" && "response" in a && a.response && typeof a.response == "object" && "status" in a.response && a.response.status) {
312
+ const g = a;
313
+ if (console.log("Error found!"), console.error((h = g.response) == null ? void 0 : h.data), ((i = g.response) == null ? void 0 : i.status) === 424 || ((f = g.response) == null ? void 0 : f.status) === 425) {
314
+ o.value = !0;
315
+ return;
316
+ }
317
+ _.setError(((b = g.response) == null ? void 0 : b.data).message);
318
+ } else
319
+ _.setError("There was an issue, please contact helpmate");
320
+ }
321
+ };
322
+ return (p, w) => (c(), u("section", null, [
323
+ v(z, { "is-visible": o.value }, {
324
+ default: J(() => [
325
+ ot
326
+ ]),
327
+ _: 1
328
+ }, 8, ["is-visible"]),
329
+ e("div", null, [
330
+ t.value ? (c(), X(V, { key: 0 })) : (c(), u("main", nt, [
331
+ e("div", rt, [
332
+ v(ce)
333
+ ]),
334
+ lt,
335
+ e("div", it, [
336
+ e("div", ct, [
337
+ e("div", dt, [
338
+ v(Pe),
339
+ ut
340
+ ]),
341
+ e("div", _t, [
342
+ v(at)
343
+ ])
344
+ ])
345
+ ])
346
+ ]))
347
+ ])
348
+ ]));
349
+ }
350
+ });
351
+ const yt = /* @__PURE__ */ $(pt, [["__scopeId", "data-v-944ca5e3"]]);
352
+ export {
353
+ yt as default
354
+ };