@genpact/genome.mfe.mgtwin-app 1.1.275-alpha → 1.1.277-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/{ArrowLeftCircleIcon-45250164.mjs → ArrowLeftCircleIcon-48133ca7.mjs} +1 -1
- package/dist/{AssessmentAMA-faec09a0.mjs → AssessmentAMA-69c350d7.mjs} +175 -171
- package/dist/{AssessmentSimulation-772d1728.mjs → AssessmentSimulation-f00b7df0.mjs} +5 -5
- package/dist/{EditSkillAdminData-2d3ea527.mjs → EditSkillAdminData-0734e5cf.mjs} +3 -3
- package/dist/{EditSkillData-d508c679.mjs → EditSkillData-e0e58c47.mjs} +3 -3
- package/dist/{HomeView-1e1113f5.mjs → HomeView-b9ad9cdb.mjs} +5 -5
- package/dist/{Loading-000fa163.mjs → Loading-b76703b7.mjs} +1 -1
- package/dist/{LoadingSimulation-fcfccc93.mjs → LoadingSimulation-2c13f264.mjs} +1 -1
- package/dist/{Modal-1645738a.mjs → Modal-bfe5c4db.mjs} +1 -1
- package/dist/{PromptTesting-ede8ab87.mjs → PromptTesting-d1c1cc97.mjs} +2 -2
- package/dist/{SkillAutomation-38a40c13.mjs → SkillAutomation-3251cad2.mjs} +3 -3
- package/dist/{SkillData-379df161.mjs → SkillData-cfcea861.mjs} +3 -3
- package/dist/{UnderMaintenance-de3dea98.mjs → UnderMaintenance-d8c8846e.mjs} +1 -1
- package/dist/{_commonjsHelpers-fb050ae5.mjs → _commonjsHelpers-bae71877.mjs} +1 -1
- package/dist/{api-4d088800.mjs → api-a01f1679.mjs} +1 -1
- package/dist/{main-276ff0ff.mjs → main-a8dcba22.mjs} +1822 -1821
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { d as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { p as
|
|
1
|
+
import { _ as ge, a as fe, L as ve } from "./LoadingSimulation-2c13f264.mjs";
|
|
2
|
+
import { _ as ye, Q as j, a as xe } from "./Modal-bfe5c4db.mjs";
|
|
3
|
+
import { d as I, r as d, H as V, o as u, c as m, a as s, u as C, y as D, t as R, G as we, p as H, g as z, C as O, z as Ae, K as be, h as q, F as $e, e as ke, f as U, b as M, k as me, w as qe, m as Me, L as Ie, q as T, s as Le, l as Se } from "./main-a8dcba22.mjs";
|
|
4
|
+
import { _ as N } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { p as ue, g as pe } from "./api-a01f1679.mjs";
|
|
6
6
|
import "./loadernew-ac153a51.mjs";
|
|
7
|
-
const
|
|
7
|
+
const Ee = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, Fe = ["href"], Te = /* @__PURE__ */ s("img", {
|
|
8
8
|
class: "h-11 w-auto cursor-pointer",
|
|
9
|
-
src:
|
|
9
|
+
src: ge,
|
|
10
10
|
alt: "Genome Logo"
|
|
11
|
-
}, null, -1),
|
|
12
|
-
|
|
13
|
-
],
|
|
11
|
+
}, null, -1), Re = [
|
|
12
|
+
Te
|
|
13
|
+
], Ne = ["href"], Be = /* @__PURE__ */ s("img", {
|
|
14
14
|
class: "h-9 w-28 cursor-pointer md:w-36",
|
|
15
|
-
src:
|
|
15
|
+
src: ye,
|
|
16
16
|
alt: "Aiguru Logo"
|
|
17
|
-
}, null, -1),
|
|
18
|
-
|
|
19
|
-
],
|
|
17
|
+
}, null, -1), Ce = [
|
|
18
|
+
Be
|
|
19
|
+
], Qe = /* @__PURE__ */ I({
|
|
20
20
|
__name: "headerAMA",
|
|
21
|
-
setup(
|
|
22
|
-
const t = d(""),
|
|
23
|
-
return V === "prod" ? t.value = "https://genome.genpact.com" : t.value = "https://genome-dev.genpact.com", V === "prod" ?
|
|
24
|
-
|
|
21
|
+
setup(l) {
|
|
22
|
+
const t = d(""), n = d("");
|
|
23
|
+
return V === "prod" ? t.value = "https://genome.genpact.com" : t.value = "https://genome-dev.genpact.com", V === "prod" ? n.value = "https://genome.genpact.com/#aiguru" : n.value = "https://genome-dev.genpact.com/#aiguru", (a, i) => (u(), m("nav", Ee, [
|
|
24
|
+
s("a", {
|
|
25
25
|
class: "px-2 md:px-0 lg:px-0",
|
|
26
26
|
href: t.value,
|
|
27
27
|
target: "_blank"
|
|
28
|
-
},
|
|
29
|
-
|
|
28
|
+
}, Re, 8, Fe),
|
|
29
|
+
s("a", {
|
|
30
30
|
class: "px-2 md:px-0 lg:px-0",
|
|
31
|
-
href:
|
|
31
|
+
href: n.value,
|
|
32
32
|
target: "_blank"
|
|
33
|
-
},
|
|
33
|
+
}, Ce, 8, Ne)
|
|
34
34
|
]));
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), Pe = { class: "flex items-end justify-start" }, je = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, Ue = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]" }, Ve = { class: "w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]" }, De = /* @__PURE__ */ s("br", null, null, -1), He = /* @__PURE__ */ I({
|
|
37
37
|
__name: "greetingsAMA",
|
|
38
|
-
setup(
|
|
39
|
-
const t = C(),
|
|
38
|
+
setup(l) {
|
|
39
|
+
const t = C(), n = ` Hi ${t.learnerName || "Expert"}, and welcome!`, a = D(() => n), i = D(() => t.welcomeMessage);
|
|
40
40
|
return (w, y) => (u(), m("section", null, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
s("div", Pe, [
|
|
42
|
+
s("div", je, [
|
|
43
|
+
s("div", Ue, R(a.value), 1),
|
|
44
|
+
s("div", Ve, R(i.value), 1)
|
|
45
45
|
])
|
|
46
46
|
]),
|
|
47
|
-
|
|
47
|
+
De
|
|
48
48
|
]));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), ze = { class: "fontFormattingAMA flex items-end justify-start py-2" }, Oe = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Ge = ["innerHTML"], Ye = /* @__PURE__ */ I({
|
|
51
51
|
__name: "responseAMA",
|
|
52
52
|
props: {
|
|
53
53
|
answer: {
|
|
@@ -55,25 +55,25 @@ const Se = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#0
|
|
|
55
55
|
required: !0
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
setup(
|
|
59
|
-
const t =
|
|
58
|
+
setup(l) {
|
|
59
|
+
const t = l, n = D(() => {
|
|
60
60
|
const a = t.answer.replace(/[*#]/g, "").replace(
|
|
61
61
|
/Assessment Rating & Feedback/g,
|
|
62
62
|
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
63
63
|
), i = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
|
|
64
64
|
return a.replace(i, (w, y, c) => `<a href="${c}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${y}</a>`);
|
|
65
65
|
});
|
|
66
|
-
return (a, i) => (u(), m("div",
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
return (a, i) => (u(), m("div", ze, [
|
|
67
|
+
s("div", Oe, [
|
|
68
|
+
s("span", {
|
|
69
69
|
class: "fontFormattingAMA",
|
|
70
|
-
innerHTML:
|
|
71
|
-
}, null, 8,
|
|
70
|
+
innerHTML: n.value
|
|
71
|
+
}, null, 8, Ge)
|
|
72
72
|
])
|
|
73
73
|
]));
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
|
-
const
|
|
76
|
+
const Ke = /* @__PURE__ */ N(Ye, [["__scopeId", "data-v-ebd005b7"]]), We = { class: "flex justify-end items-end py-3" }, Ze = { class: "max-w-[80%]" }, Je = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, Xe = /* @__PURE__ */ I({
|
|
77
77
|
__name: "learnerAMA",
|
|
78
78
|
props: {
|
|
79
79
|
question: {
|
|
@@ -81,21 +81,21 @@ const Ge = /* @__PURE__ */ R(Oe, [["__scopeId", "data-v-ebd005b7"]]), Ke = { cla
|
|
|
81
81
|
required: !0
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
setup(
|
|
85
|
-
return (t,
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
setup(l) {
|
|
85
|
+
return (t, n) => (u(), m("div", We, [
|
|
86
|
+
s("div", Ze, [
|
|
87
|
+
s("div", Je, R(l.question), 1)
|
|
88
88
|
])
|
|
89
89
|
]));
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
], -1)),
|
|
91
|
+
}), es = (l) => (H("data-v-12a02acf"), l = l(), z(), l), ss = { class: "flex w-full flex-col items-start justify-start bg-white" }, ts = { class: "bot-typing-animation gap-1" }, as = { class: "block w-full text-lg italic text-gray-800" }, os = /* @__PURE__ */ es(() => /* @__PURE__ */ s("span", { class: "dot-animation" }, [
|
|
92
|
+
/* @__PURE__ */ s("span", null, "."),
|
|
93
|
+
/* @__PURE__ */ s("span", null, "."),
|
|
94
|
+
/* @__PURE__ */ s("span", null, ".")
|
|
95
|
+
], -1)), ns = /* @__PURE__ */ we('<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), rs = /* @__PURE__ */ I({
|
|
96
96
|
__name: "LoadingResponseAMA",
|
|
97
|
-
setup(
|
|
98
|
-
const t = d("Generating response"),
|
|
97
|
+
setup(l) {
|
|
98
|
+
const t = d("Generating response"), n = d([
|
|
99
99
|
"This may take a few seconds",
|
|
100
100
|
"Fetching the best response for you",
|
|
101
101
|
"Thinking... give me a moment",
|
|
@@ -105,25 +105,25 @@ const Ge = /* @__PURE__ */ R(Oe, [["__scopeId", "data-v-ebd005b7"]]), Ke = { cla
|
|
|
105
105
|
"Compiling a response for you"
|
|
106
106
|
]);
|
|
107
107
|
return setTimeout(() => {
|
|
108
|
-
const a = Math.floor(Math.random() *
|
|
109
|
-
t.value =
|
|
110
|
-
}, 15e3), (a, i) => (u(), m("div",
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
const a = Math.floor(Math.random() * n.value.length);
|
|
109
|
+
t.value = n.value[a];
|
|
110
|
+
}, 15e3), (a, i) => (u(), m("div", ss, [
|
|
111
|
+
s("div", ts, [
|
|
112
|
+
s("div", as, R(t.value), 1),
|
|
113
|
+
os
|
|
114
114
|
]),
|
|
115
|
-
|
|
115
|
+
ns
|
|
116
116
|
]));
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
const
|
|
119
|
+
const ls = /* @__PURE__ */ N(rs, [["__scopeId", "data-v-12a02acf"]]), cs = { key: 0 }, is = { key: 1 }, ds = {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "flex"
|
|
122
|
-
},
|
|
122
|
+
}, us = /* @__PURE__ */ I({
|
|
123
123
|
__name: "conversationAMA",
|
|
124
|
-
setup(
|
|
125
|
-
let t = d(""),
|
|
126
|
-
t.value = '<a style="color:#00AECF;"',
|
|
124
|
+
setup(l) {
|
|
125
|
+
let t = d(""), n = d("");
|
|
126
|
+
t.value = '<a style="color:#00AECF;"', n.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
127
127
|
const a = C(), i = d(), w = () => {
|
|
128
128
|
i.value.scrollTo(0, i.value.scrollHeight);
|
|
129
129
|
};
|
|
@@ -131,21 +131,21 @@ const ns = /* @__PURE__ */ R(os, [["__scopeId", "data-v-12a02acf"]]), rs = { key
|
|
|
131
131
|
var o;
|
|
132
132
|
const y = document.getElementsByName("askQuestion"), c = Array.from(y);
|
|
133
133
|
console.log("New array===>", c), y.length && ((o = c == null ? void 0 : c.pop()) == null || o.scrollIntoView({ behavior: "smooth", block: "center" })), window.addEventListener("custom-event", w);
|
|
134
|
-
}),
|
|
134
|
+
}), Ae(() => {
|
|
135
135
|
var o;
|
|
136
136
|
const y = document.getElementsByName("askQuestion"), c = Array.from(y);
|
|
137
137
|
console.log("New array===>", c), y.length && ((o = c == null ? void 0 : c.pop()) == null || o.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
138
|
-
}),
|
|
138
|
+
}), be(() => {
|
|
139
139
|
window.removeEventListener("custom-event", w);
|
|
140
140
|
}), (y, c) => (u(), m("div", {
|
|
141
141
|
ref_key: "nestedElement",
|
|
142
142
|
ref: i,
|
|
143
143
|
class: "smooth-scroll overflow-auto md:px-6 px-2"
|
|
144
144
|
}, [
|
|
145
|
-
q(
|
|
146
|
-
(u(!0), m(
|
|
147
|
-
o.question ? (u(), m("div",
|
|
148
|
-
q(
|
|
145
|
+
q(He),
|
|
146
|
+
(u(!0), m($e, null, ke(M(a).conversations, (o, A) => (u(), m("div", { key: A }, [
|
|
147
|
+
o.question ? (u(), m("div", cs, [
|
|
148
|
+
q(Xe, {
|
|
149
149
|
question: o.question,
|
|
150
150
|
c2question: o.c2question,
|
|
151
151
|
"show-feedback": o.showFeedback,
|
|
@@ -153,62 +153,63 @@ const ns = /* @__PURE__ */ R(os, [["__scopeId", "data-v-12a02acf"]]), rs = { key
|
|
|
153
153
|
name: "askQuestion",
|
|
154
154
|
"que-id": A
|
|
155
155
|
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
156
|
-
])) :
|
|
157
|
-
o.answer ? (u(), m("div",
|
|
158
|
-
q(
|
|
156
|
+
])) : U("", !0),
|
|
157
|
+
o.answer ? (u(), m("div", is, [
|
|
158
|
+
q(Ke, {
|
|
159
159
|
question: o == null ? void 0 : o.question,
|
|
160
160
|
c2question: o == null ? void 0 : o.c2question,
|
|
161
161
|
"show-sources": o == null ? void 0 : o.showSources,
|
|
162
162
|
questionId: o.id,
|
|
163
|
-
answer: o.answer.replaceAll("<a",
|
|
163
|
+
answer: o.answer.replaceAll("<a", M(t)).replaceAll("<ul", M(n)),
|
|
164
164
|
"show-feedback": o.showFeedback,
|
|
165
165
|
"related-ques": o.relatedQues,
|
|
166
166
|
"options-array": o.optionsArray,
|
|
167
167
|
"ans-id": A,
|
|
168
168
|
onCharTyped: w
|
|
169
169
|
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
170
|
-
])) :
|
|
170
|
+
])) : U("", !0)
|
|
171
171
|
]))), 128)),
|
|
172
|
-
|
|
173
|
-
q(
|
|
174
|
-
])) :
|
|
172
|
+
M(a).dotLoader ? (u(), m("div", ds, [
|
|
173
|
+
q(ls)
|
|
174
|
+
])) : U("", !0)
|
|
175
175
|
], 512));
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
],
|
|
178
|
+
const ps = /* @__PURE__ */ N(us, [["__scopeId", "data-v-f92feaf3"]]), Q = (l) => (H("data-v-916b3704"), l = l(), z(), l), ms = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, _s = { class: "py-2" }, hs = { class: "flex" }, gs = { class: "z-1 relative w-full" }, fs = { class: "relative w-full" }, vs = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, ys = { key: 0 }, xs = /* @__PURE__ */ Q(() => /* @__PURE__ */ s("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)), ws = [
|
|
179
|
+
xs
|
|
180
|
+
], As = {
|
|
181
181
|
key: 1,
|
|
182
182
|
class: "tooltip"
|
|
183
|
-
},
|
|
183
|
+
}, bs = /* @__PURE__ */ Q(() => /* @__PURE__ */ s("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), $s = /* @__PURE__ */ Q(() => /* @__PURE__ */ s("img", {
|
|
184
184
|
class: "w-7 h-7",
|
|
185
|
-
src:
|
|
185
|
+
src: fe,
|
|
186
186
|
alt: "watingIcon"
|
|
187
|
-
}, null, -1)),
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
],
|
|
191
|
-
/* @__PURE__ */ e("div", { class: "flex justify-start items-start text-[#161916] italic" }, " 10 questions remaining for the day "),
|
|
192
|
-
/* @__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. ")
|
|
193
|
-
], -1)), qs = /* @__PURE__ */ M({
|
|
187
|
+
}, null, -1)), ks = [
|
|
188
|
+
bs,
|
|
189
|
+
$s
|
|
190
|
+
], qs = { class: "flex justify-start gap-2 md:gap-1" }, Ms = { class: "pt-1 text-start font-sans" }, Is = { class: "flex justify-start items-start text-[#161916] italic" }, Ls = /* @__PURE__ */ Q(() => /* @__PURE__ */ s("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. ", -1)), Ss = /* @__PURE__ */ I({
|
|
194
191
|
__name: "NewQuestionAMA",
|
|
195
|
-
setup(
|
|
196
|
-
const t = C(),
|
|
192
|
+
setup(l) {
|
|
193
|
+
const t = C(), n = me(), a = d("");
|
|
197
194
|
t.question = "";
|
|
198
|
-
const i = d(null), w = d(!1), y = d(
|
|
195
|
+
const i = d(null), w = d(!1), y = d(j), c = d(!1);
|
|
199
196
|
O(() => {
|
|
200
197
|
i.value.focus();
|
|
201
198
|
});
|
|
202
|
-
const o = ($) => new URLSearchParams(window.location.search).get($) || "", A = d(o("amaId")),
|
|
199
|
+
const o = ($) => new URLSearchParams(window.location.search).get($) || "", A = d(o("amaId")), Y = d(o("corpusId")), L = ($) => {
|
|
203
200
|
const p = $.length;
|
|
204
|
-
y.value =
|
|
205
|
-
},
|
|
201
|
+
y.value = j - p, w.value = p >= j;
|
|
202
|
+
}, B = async () => {
|
|
206
203
|
var $, p, k, f, x, b;
|
|
207
204
|
try {
|
|
208
205
|
if (t.question.trim().length < 1) {
|
|
209
206
|
console.log("Please enter answer!");
|
|
210
207
|
return;
|
|
211
208
|
}
|
|
209
|
+
if (t.amaQuestionsLeft <= 0) {
|
|
210
|
+
n.setError("You have exhausted your question limit!");
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
212
213
|
c.value = !0, t.dotLoader = !0;
|
|
213
214
|
const _ = {
|
|
214
215
|
question: t.question
|
|
@@ -216,16 +217,16 @@ const ds = /* @__PURE__ */ R(is, [["__scopeId", "data-v-f92feaf3"]]), P = (r) =>
|
|
|
216
217
|
console.log("ques", _), t.conversations.push(_);
|
|
217
218
|
const v = d("");
|
|
218
219
|
v.value = t.question, t.question = "";
|
|
219
|
-
const
|
|
220
|
+
const r = {
|
|
220
221
|
amaId: A.value,
|
|
221
|
-
amaCorpusId:
|
|
222
|
+
amaCorpusId: Y.value,
|
|
222
223
|
past_messages: t.past_messages,
|
|
223
224
|
question: v.value,
|
|
224
225
|
prompt: t.generatedPrompt
|
|
225
|
-
}, h = await
|
|
226
|
+
}, h = await ue("/amaBotResponse", r);
|
|
226
227
|
if (((p = ($ = h == null ? void 0 : h.data) == null ? void 0 : $.body) == null ? void 0 : p.answer) === "") {
|
|
227
228
|
console.log("in the if case calling api again");
|
|
228
|
-
const g = await
|
|
229
|
+
const g = await ue("/amaBotResponse", r);
|
|
229
230
|
t.addConversation((k = g.data) == null ? void 0 : k.body, "new");
|
|
230
231
|
} else
|
|
231
232
|
console.log("in the else case"), t.addConversation((f = h.data) == null ? void 0 : f.body, "new");
|
|
@@ -233,72 +234,75 @@ const ds = /* @__PURE__ */ R(is, [["__scopeId", "data-v-f92feaf3"]]), P = (r) =>
|
|
|
233
234
|
} catch (_) {
|
|
234
235
|
if (console.error(_), t.dotLoader = !1, T.isAxiosError(_)) {
|
|
235
236
|
const v = _;
|
|
236
|
-
console.log("Error found!"), console.error((x = v.response) == null ? void 0 : x.data),
|
|
237
|
+
console.log("Error found!"), console.error((x = v.response) == null ? void 0 : x.data), n.setError(((b = v.response) == null ? void 0 : b.data).message);
|
|
237
238
|
} else
|
|
238
|
-
|
|
239
|
+
n.setError("There was an issue, please contact helpmate");
|
|
239
240
|
}
|
|
240
241
|
};
|
|
241
|
-
return ($, p) => (u(), m("div",
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
c.value ? (u(), m("div",
|
|
242
|
+
return ($, p) => (u(), m("div", ms, [
|
|
243
|
+
s("div", _s, [
|
|
244
|
+
s("div", hs, [
|
|
245
|
+
s("div", gs, [
|
|
246
|
+
s("div", fs, [
|
|
247
|
+
s("div", vs, [
|
|
248
|
+
c.value ? (u(), m("div", As, ks)) : (u(), m("div", ys, [
|
|
248
249
|
(u(), m("svg", {
|
|
249
|
-
onClick: p[0] || (p[0] = (k) =>
|
|
250
|
+
onClick: p[0] || (p[0] = (k) => B()),
|
|
250
251
|
xmlns: "http://www.w3.org/2000/svg",
|
|
251
252
|
fill: "currentColor",
|
|
252
253
|
class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
|
|
253
254
|
viewBox: "0 0 16 16"
|
|
254
|
-
},
|
|
255
|
+
}, ws))
|
|
255
256
|
]))
|
|
256
257
|
]),
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
s("div", qs, [
|
|
259
|
+
qe(s("input", {
|
|
259
260
|
onKeyup: [
|
|
260
|
-
p[1] || (p[1] =
|
|
261
|
-
p[3] || (p[3] = (k) =>
|
|
261
|
+
p[1] || (p[1] = Ie((k) => c.value ? "" : B(), ["enter"])),
|
|
262
|
+
p[3] || (p[3] = (k) => L(M(t).question))
|
|
262
263
|
],
|
|
263
|
-
"onUpdate:modelValue": p[2] || (p[2] = (k) =>
|
|
264
|
+
"onUpdate:modelValue": p[2] || (p[2] = (k) => M(t).question = k),
|
|
264
265
|
class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",
|
|
265
266
|
placeholder: "Write your answer here...",
|
|
266
267
|
type: "text",
|
|
267
268
|
ref_key: "AiSearch",
|
|
268
269
|
ref: i
|
|
269
270
|
}, null, 544), [
|
|
270
|
-
[
|
|
271
|
+
[Me, M(t).question]
|
|
271
272
|
])
|
|
272
273
|
])
|
|
273
274
|
]),
|
|
274
|
-
|
|
275
|
+
s("div", Ms, [
|
|
276
|
+
s("div", Is, R(M(t).amaQuestionsLeft) + " questions remaining for the day ", 1),
|
|
277
|
+
Ls
|
|
278
|
+
])
|
|
275
279
|
])
|
|
276
280
|
])
|
|
277
281
|
])
|
|
278
282
|
]));
|
|
279
283
|
}
|
|
280
284
|
});
|
|
281
|
-
const
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
], -1)),
|
|
285
|
+
const Es = /* @__PURE__ */ N(Ss, [["__scopeId", "data-v-916b3704"]]), G = (l) => (H("data-v-137589f5"), l = l(), z(), l), Fs = /* @__PURE__ */ G(() => /* @__PURE__ */ s("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
|
|
286
|
+
/* @__PURE__ */ s("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
|
|
287
|
+
/* @__PURE__ */ s("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 ")
|
|
288
|
+
], -1)), Ts = {
|
|
285
289
|
key: 1,
|
|
286
290
|
className: "h-screen flex flex-col items-stretch"
|
|
287
|
-
},
|
|
291
|
+
}, Rs = { class: "z-20" }, Ns = /* @__PURE__ */ G(() => /* @__PURE__ */ s("div", { class: "mt-6" }, null, -1)), Bs = { class: "flex h-full items-stretch overflow-hidden" }, Cs = { class: "mx-auto w-11/12 bg-white" }, Qs = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, Ps = /* @__PURE__ */ G(() => /* @__PURE__ */ s("div", { class: "mt-[160px]" }, null, -1)), js = { class: "relative" }, Us = /* @__PURE__ */ I({
|
|
288
292
|
__name: "AssessmentAMA",
|
|
289
|
-
setup(
|
|
290
|
-
const t = d(!0),
|
|
293
|
+
setup(l) {
|
|
294
|
+
const t = d(!0), n = d(!1), a = C(), i = me(), w = d(""), y = localStorage.getItem("accessToken");
|
|
291
295
|
let c = "", o = "", A = "";
|
|
292
|
-
const
|
|
293
|
-
a.amaSkillId =
|
|
294
|
-
const
|
|
296
|
+
const L = d(((f) => new URLSearchParams(window.location.search).get(f) || "")("amaId"));
|
|
297
|
+
a.amaSkillId = L.value ?? "";
|
|
298
|
+
const B = ["703331197", "703380812", "703331909", "703363051", "703319578"];
|
|
295
299
|
O(async () => {
|
|
296
300
|
t.value = !0, await $(), await k(), t.value = !1;
|
|
297
301
|
});
|
|
298
302
|
const $ = async () => {
|
|
299
303
|
var f, x, b, _, v;
|
|
300
304
|
try {
|
|
301
|
-
if (
|
|
305
|
+
if (L.value === null)
|
|
302
306
|
throw {
|
|
303
307
|
response: {
|
|
304
308
|
status: 424,
|
|
@@ -308,15 +312,15 @@ const Ms = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-7eef4de2"]]), G = (r) =>
|
|
|
308
312
|
}
|
|
309
313
|
};
|
|
310
314
|
console.log("before calling get learner");
|
|
311
|
-
const
|
|
312
|
-
`/getLearnerData?forSimulation=true&skillForSimulation=${
|
|
315
|
+
const r = await pe(
|
|
316
|
+
`/getLearnerData?forSimulation=true&skillForSimulation=${L.value}`
|
|
313
317
|
);
|
|
314
|
-
a.initialize(
|
|
315
|
-
} catch (
|
|
316
|
-
if (console.error(
|
|
317
|
-
const h =
|
|
318
|
+
a.initialize(r.data), await p();
|
|
319
|
+
} catch (r) {
|
|
320
|
+
if (console.error(r), t.value = !1, T.isAxiosError(r) && ((f = r.response) != null && f.status) || r && typeof r == "object" && "response" in r && r.response && typeof r.response == "object" && "status" in r.response && r.response.status) {
|
|
321
|
+
const h = r;
|
|
318
322
|
if (console.log("Error found!"), console.error((x = h.response) == null ? void 0 : x.data), ((b = h.response) == null ? void 0 : b.status) === 424 || ((_ = h.response) == null ? void 0 : _.status) === 425) {
|
|
319
|
-
|
|
323
|
+
n.value = !0;
|
|
320
324
|
return;
|
|
321
325
|
}
|
|
322
326
|
i.setError(((v = h.response) == null ? void 0 : v.data).message);
|
|
@@ -324,21 +328,21 @@ const Ms = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-7eef4de2"]]), G = (r) =>
|
|
|
324
328
|
i.setError("There was an issue, please contact helpmate");
|
|
325
329
|
}
|
|
326
330
|
}, p = async () => {
|
|
327
|
-
var f, x, b, _, v,
|
|
331
|
+
var f, x, b, _, v, r, h, S, g, F, K, W, Z, J, X, ee, se, te, ae, oe, ne, re, le, ce, ie, de;
|
|
328
332
|
console.log("Start getAssessmentDetails");
|
|
329
333
|
try {
|
|
330
|
-
V === "prod" ? c = `https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${
|
|
331
|
-
const
|
|
332
|
-
console.log("response from GetAMA",
|
|
333
|
-
const E = (
|
|
334
|
-
a.mcqType = (J = (Z =
|
|
335
|
-
const
|
|
334
|
+
V === "prod" ? c = `https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${L.value}` : c = `https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${L.value}`;
|
|
335
|
+
const e = await pe(c);
|
|
336
|
+
console.log("response from GetAMA", e), w.value = (x = (f = e == null ? void 0 : e.data) == null ? void 0 : f.data) == null ? void 0 : x.name, a.welcomeMessage = (_ = (b = e == null ? void 0 : e.data) == null ? void 0 : b.data) == null ? void 0 : _.displayMsg, console.log("response from GetAMA skill Name", w.value), a.skillNameForSimulation = w.value, a.generatedPrompt = (r = (v = e == null ? void 0 : e.data) == null ? void 0 : v.data) == null ? void 0 : r.generatedPrompt, o = (S = (h = e == null ? void 0 : e.data) == null ? void 0 : h.data) == null ? void 0 : S.accessBand, A = (F = (g = e == null ? void 0 : e.data) == null ? void 0 : g.data) == null ? void 0 : F.accessOhrList;
|
|
337
|
+
const E = (W = (K = e == null ? void 0 : e.data) == null ? void 0 : K.data) == null ? void 0 : W.createdBy;
|
|
338
|
+
a.mcqType = (J = (Z = e == null ? void 0 : e.data) == null ? void 0 : Z.data) == null ? void 0 : J.mcqTypes, a.storeFinalFeedback = (ee = (X = e == null ? void 0 : e.data) == null ? void 0 : X.data) == null ? void 0 : ee.storeFinalFeedback, a.storeFinalScore = (te = (se = e == null ? void 0 : e.data) == null ? void 0 : se.data) == null ? void 0 : te.storeFinalScore, a.amaQuestionsLeft = (oe = (ae = e == null ? void 0 : e.data) == null ? void 0 : ae.data) == null ? void 0 : oe.amaQuestionsLeft, console.log("store mcqType====>", a.mcqType);
|
|
339
|
+
const _e = a == null ? void 0 : a.band_code;
|
|
336
340
|
console.log("accessBand , accessOhrList====>", o, A);
|
|
337
|
-
const
|
|
338
|
-
if (console.log("bands ,====>",
|
|
341
|
+
const P = (ne = o == null ? void 0 : o.split(",")) == null ? void 0 : ne.map((he) => he.trim());
|
|
342
|
+
if (console.log("bands ,====>", P), E === (a == null ? void 0 : a.ohr) || B.includes(a == null ? void 0 : a.ohr))
|
|
339
343
|
console.log("User has access to this assessment.");
|
|
340
344
|
else {
|
|
341
|
-
if (
|
|
345
|
+
if (P.length === 0 && A.length === 0)
|
|
342
346
|
throw console.log("Both bands and exceptionOHR are empty. Access denied."), {
|
|
343
347
|
response: {
|
|
344
348
|
status: 424,
|
|
@@ -347,7 +351,7 @@ const Ms = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-7eef4de2"]]), G = (r) =>
|
|
|
347
351
|
}
|
|
348
352
|
}
|
|
349
353
|
};
|
|
350
|
-
if (
|
|
354
|
+
if (P.includes(_e) || A.includes(a == null ? void 0 : a.ohr))
|
|
351
355
|
console.log("User has access to this assessment.");
|
|
352
356
|
else
|
|
353
357
|
throw console.log("User does not have access to this assessment."), {
|
|
@@ -360,19 +364,19 @@ const Ms = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-7eef4de2"]]), G = (r) =>
|
|
|
360
364
|
};
|
|
361
365
|
}
|
|
362
366
|
console.log("end getAssessmentDetails");
|
|
363
|
-
} catch (
|
|
364
|
-
if (console.error(
|
|
365
|
-
const E =
|
|
366
|
-
if (console.log("Error found!"), console.error((
|
|
367
|
-
|
|
367
|
+
} catch (e) {
|
|
368
|
+
if (console.error(e), t.value = !1, T.isAxiosError(e) && ((re = e.response) != null && re.status) || e && typeof e == "object" && "response" in e && e.response && typeof e.response == "object" && "status" in e.response && e.response.status) {
|
|
369
|
+
const E = e;
|
|
370
|
+
if (console.log("Error found!"), console.error((le = E.response) == null ? void 0 : le.data), ((ce = E.response) == null ? void 0 : ce.status) === 424 || ((ie = E.response) == null ? void 0 : ie.status) === 425) {
|
|
371
|
+
n.value = !0;
|
|
368
372
|
return;
|
|
369
373
|
}
|
|
370
|
-
i.setError(((
|
|
374
|
+
i.setError(((de = E.response) == null ? void 0 : de.data).message);
|
|
371
375
|
} else
|
|
372
376
|
i.setError("There was an issue, please contact helpmate");
|
|
373
377
|
}
|
|
374
378
|
}, k = async () => {
|
|
375
|
-
var f, x, b, _, v,
|
|
379
|
+
var f, x, b, _, v, r, h, S;
|
|
376
380
|
try {
|
|
377
381
|
const g = await T({
|
|
378
382
|
url: "https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",
|
|
@@ -382,36 +386,36 @@ const Ms = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-7eef4de2"]]), G = (r) =>
|
|
|
382
386
|
},
|
|
383
387
|
method: "get"
|
|
384
388
|
});
|
|
385
|
-
a.genomeFunctionValue = (b = (x = (f = g == null ? void 0 : g.data) == null ? void 0 : f.role_function) == null ? void 0 : x.function) == null ? void 0 : b.name, a.genomeRoleValue = (
|
|
389
|
+
a.genomeFunctionValue = (b = (x = (f = g == null ? void 0 : g.data) == null ? void 0 : f.role_function) == null ? void 0 : x.function) == null ? void 0 : b.name, a.genomeRoleValue = (r = (v = (_ = g == null ? void 0 : g.data) == null ? void 0 : _.role_function) == null ? void 0 : v.role) == null ? void 0 : r.name, console.log("profile data", a.genomeFunctionValue, a.genomeRoleValue);
|
|
386
390
|
} catch (g) {
|
|
387
391
|
if (console.error(g), t.value = !1, T.isAxiosError(g)) {
|
|
388
392
|
const F = g;
|
|
389
|
-
console.log("Error found!"), console.error((h = F.response) == null ? void 0 : h.data), i.setError(((
|
|
393
|
+
console.log("Error found!"), console.error((h = F.response) == null ? void 0 : h.data), i.setError(((S = F.response) == null ? void 0 : S.data).message);
|
|
390
394
|
} else
|
|
391
395
|
i.setError("There was an issue, please contact helpmate");
|
|
392
396
|
}
|
|
393
397
|
};
|
|
394
398
|
return (f, x) => (u(), m("section", null, [
|
|
395
|
-
q(
|
|
396
|
-
default:
|
|
397
|
-
|
|
399
|
+
q(xe, { "is-visible": n.value }, {
|
|
400
|
+
default: Le(() => [
|
|
401
|
+
Fs
|
|
398
402
|
]),
|
|
399
403
|
_: 1
|
|
400
404
|
}, 8, ["is-visible"]),
|
|
401
|
-
|
|
402
|
-
t.value ? (u(),
|
|
403
|
-
|
|
404
|
-
q(
|
|
405
|
+
s("div", null, [
|
|
406
|
+
t.value ? (u(), Se(ve, { key: 0 })) : (u(), m("main", Ts, [
|
|
407
|
+
s("div", Rs, [
|
|
408
|
+
q(Qe)
|
|
405
409
|
]),
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
q(
|
|
411
|
-
|
|
410
|
+
Ns,
|
|
411
|
+
s("div", Bs, [
|
|
412
|
+
s("div", Cs, [
|
|
413
|
+
s("div", Qs, [
|
|
414
|
+
q(ps),
|
|
415
|
+
Ps
|
|
412
416
|
]),
|
|
413
|
-
|
|
414
|
-
q(
|
|
417
|
+
s("div", js, [
|
|
418
|
+
q(Es)
|
|
415
419
|
])
|
|
416
420
|
])
|
|
417
421
|
])
|
|
@@ -420,7 +424,7 @@ const Ms = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-7eef4de2"]]), G = (r) =>
|
|
|
420
424
|
]));
|
|
421
425
|
}
|
|
422
426
|
});
|
|
423
|
-
const
|
|
427
|
+
const Ys = /* @__PURE__ */ N(Us, [["__scopeId", "data-v-137589f5"]]);
|
|
424
428
|
export {
|
|
425
|
-
|
|
429
|
+
Ys as default
|
|
426
430
|
};
|