interview-widget 1.0.2 → 1.0.4

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/widget.es.js CHANGED
@@ -1,9 +1,9 @@
1
- var Fe = Object.defineProperty;
2
- var Le = (t, r, i) => r in t ? Fe(t, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[r] = i;
3
- var F = (t, r, i) => Le(t, typeof r != "symbol" ? r + "" : r, i);
4
- import fe, { createContext as je, useRef as E, useCallback as N, useMemo as X, useContext as re, useSyncExternalStore as Ne, useState as k, useEffect as C } from "react";
5
- import { createPortal as $e } from "react-dom";
6
- var ke = { exports: {} }, se = {};
1
+ var Ue = Object.defineProperty;
2
+ var qe = (i, r, t) => r in i ? Ue(i, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[r] = t;
3
+ var F = (i, r, t) => qe(i, typeof r != "symbol" ? r + "" : r, t);
4
+ import he, { createContext as Ee, useRef as T, useCallback as N, useMemo as X, useContext as re, useSyncExternalStore as Te, useState as k, useEffect as C } from "react";
5
+ import { createPortal as Be } from "react-dom";
6
+ var Ce = { exports: {} }, se = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.js
@@ -13,27 +13,27 @@ var ke = { exports: {} }, se = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var qe = Symbol.for("react.transitional.element"), Oe = Symbol.for("react.fragment");
17
- function Te(t, r, i) {
16
+ var We = Symbol.for("react.transitional.element"), Ge = Symbol.for("react.fragment");
17
+ function Se(i, r, t) {
18
18
  var s = null;
19
- if (i !== void 0 && (s = "" + i), r.key !== void 0 && (s = "" + r.key), "key" in r) {
20
- i = {};
19
+ if (t !== void 0 && (s = "" + t), r.key !== void 0 && (s = "" + r.key), "key" in r) {
20
+ t = {};
21
21
  for (var n in r)
22
- n !== "key" && (i[n] = r[n]);
23
- } else i = r;
24
- return r = i.ref, {
25
- $$typeof: qe,
26
- type: t,
22
+ n !== "key" && (t[n] = r[n]);
23
+ } else t = r;
24
+ return r = t.ref, {
25
+ $$typeof: We,
26
+ type: i,
27
27
  key: s,
28
28
  ref: r !== void 0 ? r : null,
29
- props: i
29
+ props: t
30
30
  };
31
31
  }
32
- se.Fragment = Oe;
33
- se.jsx = Te;
34
- se.jsxs = Te;
35
- ke.exports = se;
36
- var e = ke.exports;
32
+ se.Fragment = Ge;
33
+ se.jsx = Se;
34
+ se.jsxs = Se;
35
+ Ce.exports = se;
36
+ var e = Ce.exports;
37
37
  const $ = {
38
38
  api: {
39
39
  baseUrl: "/api",
@@ -65,155 +65,218 @@ const $ = {
65
65
  enabled: !0
66
66
  }
67
67
  }
68
- }, ne = je(null), Ee = "proctoring-storage", Be = () => {
69
- var t, r;
68
+ }, ge = "iw-storage";
69
+ function Ve() {
70
+ return typeof import.meta < "u" ? "your-secure-encryption-seed-here" : typeof process < "u" && process.env.NEXT_PUBLIC_IW_SECRET ? process.env.NEXT_PUBLIC_IW_SECRET : typeof window < "u" && window.__IW_SECRET__ ? window.__IW_SECRET__ : "proctoring-data-seed";
71
+ }
72
+ const Ie = Ve(), fe = "AES-GCM", me = 12;
73
+ async function Re(i) {
74
+ const t = new TextEncoder().encode(i), s = await crypto.subtle.digest("SHA-256", t);
75
+ return crypto.subtle.importKey("raw", s, fe, !1, [
76
+ "encrypt",
77
+ "decrypt"
78
+ ]);
79
+ }
80
+ function ze() {
81
+ return crypto.getRandomValues(new Uint8Array(me));
82
+ }
83
+ async function He(i, r = "default-seed") {
84
+ try {
85
+ const t = typeof i == "string" ? i : JSON.stringify(i), n = new TextEncoder().encode(t), o = await Re(r), a = ze(), l = await crypto.subtle.encrypt(
86
+ { name: fe, iv: a },
87
+ o,
88
+ n
89
+ ), d = new Uint8Array(a.length + l.byteLength);
90
+ return d.set(new Uint8Array(a), 0), d.set(new Uint8Array(l), a.length), btoa(String.fromCharCode(...Array.from(d)));
91
+ } catch (t) {
92
+ throw console.error("Encryption failed:", t), new Error("Failed to encrypt data");
93
+ }
94
+ }
95
+ async function Ye(i, r = "default-seed") {
96
+ try {
97
+ const t = atob(i), s = new Uint8Array(t.length);
98
+ for (let c = 0; c < t.length; c++)
99
+ s[c] = t.charCodeAt(c);
100
+ const n = s.slice(0, me), o = s.slice(me), a = await Re(r), l = await crypto.subtle.decrypt(
101
+ { name: fe, iv: n },
102
+ a,
103
+ o
104
+ );
105
+ return new TextDecoder().decode(l);
106
+ } catch (t) {
107
+ throw console.error("Decryption failed:", t), new Error("Failed to decrypt data");
108
+ }
109
+ }
110
+ async function Qe(i, r = "default-seed") {
111
+ return He(i, r);
112
+ }
113
+ async function Ke(i, r = "default-seed") {
114
+ const t = await Ye(i, r);
115
+ try {
116
+ return JSON.parse(t);
117
+ } catch {
118
+ return t;
119
+ }
120
+ }
121
+ const ne = Ee(null), Je = async () => {
122
+ var i, r;
70
123
  try {
71
- const i = sessionStorage.getItem(Ee);
72
- if (i) {
73
- const s = JSON.parse(i);
124
+ const t = sessionStorage.getItem(ge);
125
+ if (t) {
126
+ const s = await Ke(t, Ie);
74
127
  return {
75
- logViolations: ((t = s.state) == null ? void 0 : t.logViolations) || [],
128
+ logViolations: ((i = s.state) == null ? void 0 : i.logViolations) || [],
76
129
  totalViolations: ((r = s.state) == null ? void 0 : r.totalViolations) || 0
77
130
  };
78
131
  }
79
- } catch (i) {
132
+ } catch (t) {
80
133
  console.error(
81
134
  "Failed to load proctoring data from session storage:",
82
- i
135
+ t
83
136
  );
84
137
  }
85
138
  return { logViolations: [], totalViolations: 0 };
86
- }, pe = (t) => {
139
+ }, ve = async (i) => {
87
140
  try {
88
- sessionStorage.setItem(
89
- Ee,
90
- JSON.stringify({
91
- state: t,
141
+ const r = await Qe(
142
+ {
143
+ state: i,
92
144
  version: 0
93
- })
145
+ },
146
+ Ie
94
147
  );
148
+ sessionStorage.setItem(ge, r);
95
149
  } catch (r) {
96
150
  console.error("Failed to save proctoring data to session storage:", r);
97
151
  }
98
- }, Ge = ({
99
- children: t
152
+ }, Xe = ({
153
+ children: i
100
154
  }) => {
101
- const r = E(Be()), i = E(/* @__PURE__ */ new Set()), s = N(() => {
102
- i.current.forEach((w) => w());
103
- }, []), n = N((w) => (i.current.add(w), () => {
104
- i.current.delete(w);
105
- }), []), o = N(() => r.current, []), l = N(
106
- (w) => {
155
+ const r = T({
156
+ logViolations: [],
157
+ totalViolations: 0
158
+ }), t = T(/* @__PURE__ */ new Set());
159
+ he.useEffect(() => {
160
+ Je().then((c) => {
161
+ r.current = c, s();
162
+ });
163
+ }, []);
164
+ const s = N(() => {
165
+ t.current.forEach((c) => c());
166
+ }, []), n = N((c) => (t.current.add(c), () => {
167
+ t.current.delete(c);
168
+ }), []), o = N(() => r.current, []), a = N(
169
+ (c) => {
107
170
  r.current = {
108
- logViolations: [...r.current.logViolations, w],
171
+ logViolations: [...r.current.logViolations, c],
109
172
  totalViolations: r.current.totalViolations + 1
110
- }, pe(r.current), s();
173
+ }, ve(r.current), s();
111
174
  },
112
175
  [s]
113
- ), a = N(() => {
176
+ ), l = N(() => {
114
177
  r.current = {
115
178
  logViolations: [],
116
179
  totalViolations: 0
117
- }, pe(r.current), s();
180
+ }, ve(r.current), s();
118
181
  }, [s]), d = X(
119
182
  () => ({
120
183
  getState: o,
121
- addViolation: l,
122
- clearViolations: a,
184
+ addViolation: a,
185
+ clearViolations: l,
123
186
  subscribe: n
124
187
  }),
125
- [o, l, a, n]
188
+ [o, a, l, n]
126
189
  );
127
- return /* @__PURE__ */ e.jsx(ne.Provider, { value: d, children: t });
128
- }, Ue = () => {
129
- const t = re(ne);
130
- if (!t)
190
+ return /* @__PURE__ */ e.jsx(ne.Provider, { value: d, children: i });
191
+ }, Ze = () => {
192
+ const i = re(ne);
193
+ if (!i)
131
194
  throw new Error("useViolations must be used within a ProctoringProvider");
132
- return Ne(
133
- t.subscribe,
134
- () => t.getState().logViolations,
135
- () => t.getState().logViolations
195
+ return Te(
196
+ i.subscribe,
197
+ () => i.getState().logViolations,
198
+ () => i.getState().logViolations
136
199
  );
137
- }, ze = () => {
138
- const t = re(ne);
139
- if (!t)
200
+ }, et = () => {
201
+ const i = re(ne);
202
+ if (!i)
140
203
  throw new Error(
141
204
  "useTotalViolations must be used within a ProctoringProvider"
142
205
  );
143
- return Ne(
144
- t.subscribe,
145
- () => t.getState().totalViolations,
146
- () => t.getState().totalViolations
206
+ return Te(
207
+ i.subscribe,
208
+ () => i.getState().totalViolations,
209
+ () => i.getState().totalViolations
147
210
  );
148
- }, We = () => {
149
- const t = re(ne);
150
- if (!t)
211
+ }, tt = () => {
212
+ const i = re(ne);
213
+ if (!i)
151
214
  throw new Error(
152
215
  "useProctoringActions must be used within a ProctoringProvider"
153
216
  );
154
217
  return {
155
- addViolation: t.addViolation,
156
- clearViolations: t.clearViolations
218
+ addViolation: i.addViolation,
219
+ clearViolations: i.clearViolations
157
220
  };
158
- }, Se = je(
221
+ }, Ae = Ee(
159
222
  null
160
223
  );
161
- function Ve({
162
- config: t = {},
224
+ function it({
225
+ config: i = {},
163
226
  children: r
164
227
  }) {
165
- var s, n, o, l;
166
- const i = {
228
+ var s, n, o, a;
229
+ const t = {
167
230
  api: {
168
231
  ...$.api,
169
- ...t.api,
232
+ ...i.api,
170
233
  retryConfig: {
171
234
  ...$.api.retryConfig,
172
- ...(s = t.api) == null ? void 0 : s.retryConfig
235
+ ...(s = i.api) == null ? void 0 : s.retryConfig
173
236
  }
174
237
  },
175
238
  ui: {
176
239
  ...$.ui,
177
- ...t.ui
240
+ ...i.ui
178
241
  },
179
242
  interview: {
180
243
  ...$.interview,
181
- ...t.interview,
244
+ ...i.interview,
182
245
  timers: {
183
246
  ...$.interview.timers,
184
- ...(n = t.interview) == null ? void 0 : n.timers
247
+ ...(n = i.interview) == null ? void 0 : n.timers
185
248
  },
186
249
  stt: {
187
250
  ...$.interview.stt,
188
- ...(o = t.interview) == null ? void 0 : o.stt
251
+ ...(o = i.interview) == null ? void 0 : o.stt
189
252
  },
190
253
  tts: {
191
254
  ...$.interview.tts,
192
- ...(l = t.interview) == null ? void 0 : l.tts
255
+ ...(a = i.interview) == null ? void 0 : a.tts
193
256
  }
194
257
  }
195
258
  };
196
- return /* @__PURE__ */ e.jsx(Se.Provider, { value: i, children: /* @__PURE__ */ e.jsx(Ge, { children: r }) });
259
+ return /* @__PURE__ */ e.jsx(Ae.Provider, { value: t, children: /* @__PURE__ */ e.jsx(Xe, { children: r }) });
197
260
  }
198
261
  function ae() {
199
- const t = re(Se);
200
- if (!t)
262
+ const i = re(Ae);
263
+ if (!i)
201
264
  throw new Error(
202
265
  "useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>"
203
266
  );
204
- return t;
267
+ return i;
205
268
  }
206
- function Ce() {
269
+ function Me() {
207
270
  return ae().api || $.api;
208
271
  }
209
272
  function Z() {
210
273
  return ae().ui || $.ui;
211
274
  }
212
- function He() {
275
+ function rt() {
213
276
  return ae().interview || $.interview;
214
277
  }
215
- const Ie = ({
216
- className: t,
278
+ const De = ({
279
+ className: i,
217
280
  ...r
218
281
  }) => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
219
282
  "svg",
@@ -227,7 +290,7 @@ const Ie = ({
227
290
  strokeWidth: "2",
228
291
  strokeLinecap: "round",
229
292
  strokeLinejoin: "round",
230
- className: `iw-animate-spin ${t}`,
293
+ className: `iw-animate-spin ${i}`,
231
294
  ...r,
232
295
  children: [
233
296
  /* @__PURE__ */ e.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
@@ -241,17 +304,17 @@ const Ie = ({
241
304
  /* @__PURE__ */ e.jsx("path", { d: "M7.75 7.75l-2.15 -2.15" })
242
305
  ]
243
306
  }
244
- ) }), Re = ({
245
- children: t,
307
+ ) }), _e = ({
308
+ children: i,
246
309
  variant: r = "primary",
247
- size: i = "md",
310
+ size: t = "md",
248
311
  fullWidth: s = !1,
249
312
  isLoading: n = !1,
250
313
  disabled: o,
251
- className: l = "",
252
- ...a
314
+ className: a = "",
315
+ ...l
253
316
  }) => {
254
- const d = "iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2", w = {
317
+ const d = "iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2", c = {
255
318
  primary: "iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",
256
319
  secondary: "iw-bg-primary-100 iw-text-primary-700 iw-hover:bg-primary-200 iw-border iw-border-transparent",
257
320
  outline: "iw-bg-transparent iw-text-primary-700 iw-border iw-border-primary-500 iw-hover:bg-primary-50",
@@ -265,52 +328,52 @@ const Ie = ({
265
328
  return /* @__PURE__ */ e.jsxs(
266
329
  "button",
267
330
  {
268
- className: `${d} ${w[r]} ${u[i]} ${m} ${h} ${l}`,
331
+ className: `${d} ${c[r]} ${u[t]} ${m} ${h} ${a}`,
269
332
  disabled: o || n,
270
- ...a,
333
+ ...l,
271
334
  children: [
272
- n && /* @__PURE__ */ e.jsx(Ie, { height: 16, width: 16, style: { marginRight: "3px" } }),
273
- t
335
+ n && /* @__PURE__ */ e.jsx(De, { height: 16, width: 16, style: { marginRight: "3px" } }),
336
+ i
274
337
  ]
275
338
  }
276
339
  );
277
340
  };
278
- function Qe(t) {
279
- const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
341
+ function st(i) {
342
+ const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);
280
343
  return r ? {
281
344
  r: parseInt(r[1], 16),
282
345
  g: parseInt(r[2], 16),
283
346
  b: parseInt(r[3], 16)
284
347
  } : null;
285
348
  }
286
- function Ye(t, r, i) {
287
- return "#" + [t, r, i].map((s) => {
349
+ function nt(i, r, t) {
350
+ return "#" + [i, r, t].map((s) => {
288
351
  const n = Math.round(s).toString(16);
289
352
  return n.length === 1 ? "0" + n : n;
290
353
  }).join("");
291
354
  }
292
- function Me(t, r) {
293
- const i = Qe(t);
294
- if (!i) return t;
295
- const s = i.r + (255 - i.r) * r, n = i.g + (255 - i.g) * r, o = i.b + (255 - i.b) * r;
296
- return Ye(s, n, o);
355
+ function Pe(i, r) {
356
+ const t = st(i);
357
+ if (!t) return i;
358
+ const s = t.r + (255 - t.r) * r, n = t.g + (255 - t.g) * r, o = t.b + (255 - t.b) * r;
359
+ return nt(s, n, o);
297
360
  }
298
- function Je(t, r = 0.8) {
361
+ function at(i, r = 0.8) {
299
362
  return {
300
- background: `linear-gradient(to bottom, ${Me(t, r)}, #ffffff)`,
363
+ background: `linear-gradient(to bottom, ${Pe(i, r)}, #ffffff)`,
301
364
  color: "#1f2937"
302
365
  };
303
366
  }
304
- function Ke(t) {
305
- return new Promise((r) => setTimeout(r, t));
367
+ function ot(i) {
368
+ return new Promise((r) => setTimeout(r, i));
306
369
  }
307
- function Ae(t) {
308
- return `linear-gradient(to left, ${Me(t, 0.4)}, ${t})`;
370
+ function Fe(i) {
371
+ return `linear-gradient(to left, ${Pe(i, 0.4)}, ${i})`;
309
372
  }
310
- const Xe = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
311
- function Ze(t) {
373
+ const lt = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
374
+ function ct(i) {
312
375
  try {
313
- const r = t.split(".");
376
+ const r = i.split(".");
314
377
  if (r.length !== 3 || !r[1])
315
378
  throw new Error("Invalid JWT token");
316
379
  const s = r[1].replace(/-/g, "+").replace(/_/g, "/"), n = s.padEnd(
@@ -322,7 +385,7 @@ function Ze(t) {
322
385
  return console.error("Error decoding JWT:", r), null;
323
386
  }
324
387
  }
325
- const Pe = (t) => /* @__PURE__ */ e.jsxs(
388
+ const Le = (i) => /* @__PURE__ */ e.jsxs(
326
389
  "svg",
327
390
  {
328
391
  xmlns: "http://www.w3.org/2000/svg",
@@ -334,13 +397,13 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
334
397
  strokeWidth: "2",
335
398
  strokeLinecap: "round",
336
399
  strokeLinejoin: "round",
337
- ...t,
400
+ ...i,
338
401
  children: [
339
402
  /* @__PURE__ */ e.jsx("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }),
340
403
  /* @__PURE__ */ e.jsx("path", { d: "m9 12 2 2 4-4" })
341
404
  ]
342
405
  }
343
- ), De = (t) => /* @__PURE__ */ e.jsxs(
406
+ ), $e = (i) => /* @__PURE__ */ e.jsxs(
344
407
  "svg",
345
408
  {
346
409
  xmlns: "http://www.w3.org/2000/svg",
@@ -352,14 +415,14 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
352
415
  strokeWidth: "2",
353
416
  strokeLinecap: "round",
354
417
  strokeLinejoin: "round",
355
- ...t,
418
+ ...i,
356
419
  children: [
357
420
  /* @__PURE__ */ e.jsx("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
358
421
  /* @__PURE__ */ e.jsx("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
359
422
  /* @__PURE__ */ e.jsx("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
360
423
  ]
361
424
  }
362
- ), et = (t) => /* @__PURE__ */ e.jsxs(
425
+ ), dt = (i) => /* @__PURE__ */ e.jsxs(
363
426
  "svg",
364
427
  {
365
428
  xmlns: "http://www.w3.org/2000/svg",
@@ -371,59 +434,59 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
371
434
  strokeWidth: "2",
372
435
  strokeLinecap: "round",
373
436
  strokeLinejoin: "round",
374
- ...t,
437
+ ...i,
375
438
  children: [
376
439
  /* @__PURE__ */ e.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
377
440
  /* @__PURE__ */ e.jsx("path", { d: "M15 8a5 5 0 0 1 0 8" }),
378
441
  /* @__PURE__ */ e.jsx("path", { d: "M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a.8 .8 0 0 1 1.5 .5v14a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5" })
379
442
  ]
380
443
  }
381
- ), W = (t) => {
382
- const { baseColor: r, borderRadius: i } = Z(), { loading: s, children: n, ...o } = t;
444
+ ), V = (i) => {
445
+ const { baseColor: r, borderRadius: t } = Z(), { loading: s, children: n, ...o } = i;
383
446
  return /* @__PURE__ */ e.jsx(
384
- Re,
447
+ _e,
385
448
  {
386
449
  style: {
387
- background: Ae(r),
388
- borderRadius: i
450
+ background: Fe(r),
451
+ borderRadius: t
389
452
  },
390
453
  ...o,
391
- children: s ? /* @__PURE__ */ e.jsx(Ie, {}) : n
454
+ children: s ? /* @__PURE__ */ e.jsx(De, {}) : n
392
455
  }
393
456
  );
394
- }, tt = [
457
+ }, wt = [
395
458
  "Do not refresh or reload the page during your assessment",
396
459
  "Refrain from switching tabs or opening other applications while the session is in progress",
397
460
  "Ensure your face remains clearly visible on camera at all times",
398
461
  "Avoid frequent distractions or leaving your seat during the session",
399
462
  "Do not disable or interfere with audio/video monitoring"
400
- ], it = ({
401
- isOpen: t,
463
+ ], ut = ({
464
+ isOpen: i,
402
465
  onStart: r,
403
- onClose: i
466
+ onClose: t
404
467
  }) => {
405
- var M;
406
- const s = E(null), n = E(null), { baseColor: o, borderRadius: l } = Z(), [a, d] = k(!1), [w, u] = k(null), [h, m] = k(!1), c = o ?? "#2563eb", g = Ae(c), y = l ?? 18, j = (x, I) => x.startsWith("#") && x.length === 7 ? `${x}${I}` : x, f = [
468
+ var A;
469
+ const s = T(null), n = T(null), { baseColor: o, borderRadius: a } = Z(), [l, d] = k(!1), [c, u] = k(null), [h, m] = k(!1), w = o ?? "#2563eb", f = Fe(w), v = a ?? 18, j = (g, I) => g.startsWith("#") && g.length === 7 ? `${g}${I}` : g, x = [
407
470
  `radial-gradient(120% 85% at 50% 125%, ${j(
408
- c,
471
+ w,
409
472
  "34"
410
473
  )} 0%, transparent 70%)`,
411
474
  `radial-gradient(90% 70% at 10% 130%, ${j(
412
- c,
475
+ w,
413
476
  "24"
414
477
  )} 0%, transparent 72%)`,
415
478
  `radial-gradient(90% 70% at 90% 130%, ${j(
416
- c,
479
+ w,
417
480
  "24"
418
481
  )} 0%, transparent 72%)`,
419
482
  `repeating-linear-gradient(135deg, ${j(
420
- c,
483
+ w,
421
484
  "14"
422
485
  )} 0, ${j(
423
- c,
486
+ w,
424
487
  "14"
425
488
  )} 16px, transparent 16px, transparent 32px)`
426
- ].join(", "), T = a ? {
489
+ ].join(", "), E = l ? {
427
490
  label: "Camera & microphone ready",
428
491
  toneClass: "iw-bg-white/15 iw-text-white",
429
492
  dotClass: "iw-bg-emerald-400"
@@ -435,7 +498,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
435
498
  label: "Allow access to continue",
436
499
  toneClass: "iw-bg-white/15 iw-text-white",
437
500
  dotClass: "iw-bg-rose-300"
438
- }, S = a ? {
501
+ }, S = l ? {
439
502
  badge: "Ready",
440
503
  toneClass: "iw-bg-emerald-50 iw-text-emerald-600",
441
504
  cameraCopy: "Framing looks good for identity verification.",
@@ -450,57 +513,57 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
450
513
  toneClass: "iw-bg-rose-50 iw-text-rose-600",
451
514
  cameraCopy: "Grant camera access to continue with the interview.",
452
515
  micCopy: "Enable microphone access so we can capture your answers."
453
- }, v = [
516
+ }, y = [
454
517
  {
455
518
  label: "Camera feed",
456
519
  description: S.cameraCopy,
457
520
  status: S.badge,
458
521
  toneClass: S.toneClass,
459
- Icon: De
522
+ Icon: $e
460
523
  },
461
524
  {
462
525
  label: "Microphone input",
463
526
  description: S.micCopy,
464
527
  status: S.badge,
465
528
  toneClass: S.toneClass,
466
- Icon: et
529
+ Icon: dt
467
530
  }
468
- ], _ = () => {
469
- n.current && (n.current.getTracks().forEach((x) => x.stop()), n.current = null);
531
+ ], P = () => {
532
+ n.current && (n.current.getTracks().forEach((g) => g.stop()), n.current = null);
470
533
  }, b = async () => {
471
534
  m(!0), u(null);
472
535
  try {
473
- const x = await navigator.mediaDevices.getUserMedia({
536
+ const g = await navigator.mediaDevices.getUserMedia({
474
537
  video: { width: { ideal: 1280 }, height: { ideal: 720 } },
475
538
  audio: !0
476
539
  });
477
- n.current = x, s.current && (s.current.srcObject = x), d(!0);
478
- } catch (x) {
479
- console.error("Media permission error:", x);
540
+ n.current = g, s.current && (s.current.srcObject = g), d(!0);
541
+ } catch (g) {
542
+ console.error("Media permission error:", g);
480
543
  let I = "Unable to access camera or microphone.";
481
- (x == null ? void 0 : x.name) === "NotAllowedError" ? I = "Permissions denied. Please allow access to camera and microphone." : (x == null ? void 0 : x.name) === "NotFoundError" ? I = "No camera/microphone found. Please connect a device and retry." : x != null && x.message && (I = x.message), d(!1), u(I);
544
+ (g == null ? void 0 : g.name) === "NotAllowedError" ? I = "Permissions denied. Please allow access to camera and microphone." : (g == null ? void 0 : g.name) === "NotFoundError" ? I = "No camera/microphone found. Please connect a device and retry." : g != null && g.message && (I = g.message), d(!1), u(I);
482
545
  } finally {
483
546
  m(!1);
484
547
  }
485
548
  };
486
549
  if (C(() => {
487
- if (!t) {
488
- _();
550
+ if (!i) {
551
+ P();
489
552
  return;
490
553
  }
491
554
  return b(), () => {
492
- _();
555
+ P();
493
556
  };
494
- }, [t]), !t) return null;
495
- const P = () => {
496
- r(), _();
557
+ }, [i]), !i) return null;
558
+ const D = () => {
559
+ r(), P();
497
560
  };
498
561
  return /* @__PURE__ */ e.jsx("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/25 iw-backdrop-blur-md iw-p-4", children: /* @__PURE__ */ e.jsxs("div", { className: " iw-w-full iw-max-w-[920px] iw-max-h-[96vh] iw-overflow-auto iw-rounded-3xl iw-bg-white iw-shadow-[0_40px_80px_-28px_rgba(15,23,42,0.25)]", children: [
499
562
  /* @__PURE__ */ e.jsxs(
500
563
  "div",
501
564
  {
502
565
  className: "iw-relative iw-overflow-hidden",
503
- style: { background: g },
566
+ style: { background: f },
504
567
  children: [
505
568
  /* @__PURE__ */ e.jsx(
506
569
  "div",
@@ -534,7 +597,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
534
597
  ),
535
598
  /* @__PURE__ */ e.jsxs("div", { className: "iw-relative iw-grid md:iw-grid-cols-[minmax(0,1fr)_auto] iw-items-start iw-gap-6 iw-px-6 iw-py-7", children: [
536
599
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-flex-col iw-gap-4 iw-text-white", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-4", children: [
537
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-12 iw-w-12 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-white/15 iw-shadow-inner", children: /* @__PURE__ */ e.jsx(Pe, { className: "iw-h-6 iw-w-6" }) }),
600
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-12 iw-w-12 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-white/15 iw-shadow-inner", children: /* @__PURE__ */ e.jsx(Le, { className: "iw-h-6 iw-w-6" }) }),
538
601
  /* @__PURE__ */ e.jsxs("div", { children: [
539
602
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-[11px] iw-font-medium iw-uppercase iw-tracking-wide iw-text-white/70", children: "Pre-interview checklist" }),
540
603
  /* @__PURE__ */ e.jsx("h2", { className: "iw-mt-1 iw-text-xl iw-font-semibold iw-leading-tight", children: "Final checks before you go live" }),
@@ -544,25 +607,25 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
544
607
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-items-start iw-justify-end", children: /* @__PURE__ */ e.jsxs(
545
608
  "div",
546
609
  {
547
- className: `iw-inline-flex iw-items-center iw-gap-2 iw-rounded-full iw-bg-white/10 iw-px-4 iw-py-1.5 iw-text-xs iw-font-medium iw-text-white/85 iw-backdrop-blur-sm ${T.toneClass}`,
610
+ className: `iw-inline-flex iw-items-center iw-gap-2 iw-rounded-full iw-bg-white/10 iw-px-4 iw-py-1.5 iw-text-xs iw-font-medium iw-text-white/85 iw-backdrop-blur-sm ${E.toneClass}`,
548
611
  children: [
549
612
  /* @__PURE__ */ e.jsx(
550
613
  "span",
551
614
  {
552
- className: `iw-inline-flex iw-h-2 iw-w-2 iw-rounded-full ${T.dotClass}`
615
+ className: `iw-inline-flex iw-h-2 iw-w-2 iw-rounded-full ${E.dotClass}`
553
616
  }
554
617
  ),
555
- T.label
618
+ E.label
556
619
  ]
557
620
  }
558
621
  ) }),
559
- i && /* @__PURE__ */ e.jsx(
622
+ t && /* @__PURE__ */ e.jsx(
560
623
  "button",
561
624
  {
562
625
  "aria-label": "Close",
563
626
  className: "iw-absolute iw-top-5 iw-right-5 iw-text-white/70 transition-colors hover:iw-text-white",
564
627
  onClick: () => {
565
- _(), i == null || i();
628
+ P(), t == null || t();
566
629
  },
567
630
  children: "✕"
568
631
  }
@@ -578,7 +641,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
578
641
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-sm iw-font-semibold iw-text-slate-900", children: "Proctoring guidelines" }),
579
642
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-[11px] iw-font-medium iw-uppercase iw-tracking-wide iw-text-slate-400", children: "Required" })
580
643
  ] }),
581
- /* @__PURE__ */ e.jsx("ul", { className: "iw-mt-5 iw-flex iw-flex-col iw-gap-4", children: tt.map((x, I) => /* @__PURE__ */ e.jsx(
644
+ /* @__PURE__ */ e.jsx("ul", { className: "iw-mt-5 iw-flex iw-flex-col iw-gap-4", children: wt.map((g, I) => /* @__PURE__ */ e.jsx(
582
645
  "li",
583
646
  {
584
647
  className: "iw-group iw-overflow-hidden iw-rounded-xl iw-border iw-border-slate-100 iw-bg-slate-50/60 iw-p-4 iw-transition-all hover:iw-border-slate-200 hover:iw-bg-white",
@@ -587,14 +650,14 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
587
650
  "span",
588
651
  {
589
652
  className: "iw-flex iw-h-8 iw-w-8 iw-flex-none iw-items-center iw-justify-center iw-rounded-full iw-text-sm iw-font-semibold iw-text-white",
590
- style: { background: g },
653
+ style: { background: f },
591
654
  children: I + 1
592
655
  }
593
656
  ),
594
- /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-slate-600", children: x })
657
+ /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-slate-600", children: g })
595
658
  ] })
596
659
  },
597
- x
660
+ g
598
661
  )) })
599
662
  ] }) }),
600
663
  /* @__PURE__ */ e.jsxs("section", { className: "iw-flex iw-flex-col iw-gap-5", children: [
@@ -602,7 +665,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
602
665
  "div",
603
666
  {
604
667
  className: "iw-relative iw-flex iw-flex-col iw-gap-6 iw-overflow-hidden iw-rounded-3xl iw-bg-white ",
605
- style: { borderRadius: y },
668
+ style: { borderRadius: v },
606
669
  children: [
607
670
  /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-z-10 iw-rounded-2xl iw-border iw-border-slate-200 iw-bg-slate-50/80 iw-p-3", children: /* @__PURE__ */ e.jsx(
608
671
  "video",
@@ -614,13 +677,13 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
614
677
  className: "iw-h-64 iw-w-full iw-rounded-2xl iw-object-cover",
615
678
  style: {
616
679
  transform: "scaleX(-1)",
617
- borderRadius: y
680
+ borderRadius: v
618
681
  }
619
682
  }
620
683
  ) }),
621
684
  /* @__PURE__ */ e.jsxs("div", { className: "iw-relative iw-grid iw-grid-cols-2 iw-gap-4 iw-px-1", children: [
622
685
  /* @__PURE__ */ e.jsx(
623
- Re,
686
+ _e,
624
687
  {
625
688
  onClick: b,
626
689
  disabled: h,
@@ -628,21 +691,21 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
628
691
  size: "sm",
629
692
  className: "iw-font-medium",
630
693
  style: {
631
- borderColor: c,
632
- borderRadius: y,
633
- color: c
694
+ borderColor: w,
695
+ borderRadius: v,
696
+ color: w
634
697
  },
635
- children: a ? "Recheck permissions" : "Enable camera & mic"
698
+ children: l ? "Recheck permissions" : "Enable camera & mic"
636
699
  }
637
700
  ),
638
701
  /* @__PURE__ */ e.jsx(
639
- W,
702
+ V,
640
703
  {
641
- onClick: P,
642
- disabled: !a,
704
+ onClick: D,
705
+ disabled: !l,
643
706
  className: "iw-h-10 iw-px-6 iw-text-sm",
644
707
  style: {
645
- backgroundColor: c
708
+ backgroundColor: w
646
709
  },
647
710
  children: "Proceed"
648
711
  }
@@ -651,21 +714,21 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
651
714
  ]
652
715
  }
653
716
  ),
654
- /* @__PURE__ */ e.jsx("ul", { className: "iw-grid sm:iw-grid-cols-1 iw-gap-3", children: v.map(
655
- ({ Icon: x, label: I, description: L, status: G, toneClass: B }) => /* @__PURE__ */ e.jsx(
717
+ /* @__PURE__ */ e.jsx("ul", { className: "iw-grid sm:iw-grid-cols-1 iw-gap-3", children: y.map(
718
+ ({ Icon: g, label: I, description: L, status: B, toneClass: q }) => /* @__PURE__ */ e.jsx(
656
719
  "li",
657
720
  {
658
721
  className: "iw-rounded-2xl iw-border iw-border-slate-200/65 iw-bg-white iw-p-4 iw-shadow-sm iw-transition-all hover:iw-border-slate-200",
659
722
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-3", children: [
660
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-xl iw-bg-slate-100", children: /* @__PURE__ */ e.jsx(x, { className: "iw-h-5 iw-w-5 iw-text-slate-600" }) }),
723
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-xl iw-bg-slate-100", children: /* @__PURE__ */ e.jsx(g, { className: "iw-h-5 iw-w-5 iw-text-slate-600" }) }),
661
724
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
662
725
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-between iw-gap-3", children: [
663
726
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-font-medium iw-text-slate-800", children: I }),
664
727
  /* @__PURE__ */ e.jsx(
665
728
  "span",
666
729
  {
667
- className: `iw-rounded-full iw-px-3 iw-py-1 iw-text-[11px] iw-font-semibold ${B}`,
668
- children: G
730
+ className: `iw-rounded-full iw-px-3 iw-py-1 iw-text-[11px] iw-font-semibold ${q}`,
731
+ children: B
669
732
  }
670
733
  )
671
734
  ] }),
@@ -676,8 +739,8 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
676
739
  I
677
740
  )
678
741
  ) }),
679
- w && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-rose-200 iw-bg-rose-50 iw-px-3 iw-py-2 iw-text-xs iw-text-rose-600", children: w }),
680
- !((M = navigator.mediaDevices) != null && M.getUserMedia) && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-amber-200 iw-bg-amber-50 iw-px-3 iw-py-2 iw-text-xs iw-text-amber-700", children: "Your browser does not support media devices. Please use a modern browser like Chrome, Edge, or Firefox." })
742
+ c && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-rose-200 iw-bg-rose-50 iw-px-3 iw-py-2 iw-text-xs iw-text-rose-600", children: c }),
743
+ !((A = navigator.mediaDevices) != null && A.getUserMedia) && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-amber-200 iw-bg-amber-50 iw-px-3 iw-py-2 iw-text-xs iw-text-amber-700", children: "Your browser does not support media devices. Please use a modern browser like Chrome, Edge, or Firefox." })
681
744
  ] })
682
745
  ] }),
683
746
  /* @__PURE__ */ e.jsx("div", { className: " iw-rounded-2xl iw-border iw-border-dashed iw-border-slate-200 iw-bg-slate-50/85 iw-px-5 iw-py-4 iw-text-center", children: /* @__PURE__ */ e.jsx("div", { className: "iw-text-xs iw-text-slate-500", children: "Your session is monitored to protect exam integrity. Continuing confirms you have reviewed and accept these safeguards." }) }),
@@ -687,7 +750,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
687
750
  "aria-hidden": !0,
688
751
  className: "iw-pointer-events-none iw-absolute iw-inset-x-0 iw-bottom-1 iw-h-20",
689
752
  style: {
690
- backgroundImage: f,
753
+ backgroundImage: x,
691
754
  backgroundSize: "100% 120%, 100% 120%, 100% 120%, 32px 32px",
692
755
  backgroundPosition: "center bottom, left 95% bottom, right 95% bottom, center bottom",
693
756
  backgroundRepeat: "no-repeat, no-repeat, no-repeat, repeat",
@@ -701,12 +764,12 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
701
764
  ] })
702
765
  ] }) });
703
766
  };
704
- var D = /* @__PURE__ */ ((t) => (t.IDLE = "idle", t.FETCHING_QUESTION = "fetching_question", t.READING_QUESTION = "reading_question", t.THINKING = "thinking", t.ANSWERING = "answering", t.TRANSCRIBING = "transcribing", t.EDITING = "editing", t.SUBMITTING = "submitting", t.COMPLETED = "completed", t))(D || {});
705
- const rt = {
767
+ var _ = /* @__PURE__ */ ((i) => (i.IDLE = "idle", i.FETCHING_QUESTION = "fetching_question", i.READING_QUESTION = "reading_question", i.THINKING = "thinking", i.ANSWERING = "answering", i.TRANSCRIBING = "transcribing", i.EDITING = "editing", i.SUBMITTING = "submitting", i.COMPLETED = "completed", i))(_ || {});
768
+ const ht = {
706
769
  thinkingDuration: 30,
707
770
  answeringDuration: 120,
708
771
  editingDuration: 30
709
- }, st = {
772
+ }, mt = {
710
773
  idle: {
711
774
  next: "fetching_question"
712
775
  /* FETCHING_QUESTION */
@@ -735,14 +798,14 @@ const rt = {
735
798
  /* COMPLETED */
736
799
  }
737
800
  };
738
- class nt {
739
- constructor(r = {}, i = {}) {
801
+ class gt {
802
+ constructor(r = {}, t = {}) {
740
803
  F(this, "config");
741
804
  F(this, "state");
742
805
  F(this, "phaseIntervalId", null);
743
806
  F(this, "globalIntervalId", null);
744
807
  F(this, "callbacks");
745
- this.config = { ...rt, ...r }, this.callbacks = i, this.state = {
808
+ this.config = { ...ht, ...r }, this.callbacks = t, this.state = {
746
809
  phase: "idle",
747
810
  currentPhaseTimeRemaining: 0,
748
811
  totalTimeElapsed: 0,
@@ -765,18 +828,18 @@ class nt {
765
828
  * Move to next phase
766
829
  */
767
830
  nextPhase() {
768
- const r = this.state.phase, i = st[r];
769
- if (!i) return;
770
- this.stopPhaseTimer(), this.state.phase = i.next;
771
- const s = this.getDurationForPhase(i.next);
831
+ const r = this.state.phase, t = mt[r];
832
+ if (!t) return;
833
+ this.stopPhaseTimer(), this.state.phase = t.next;
834
+ const s = this.getDurationForPhase(t.next);
772
835
  s > 0 ? (this.state.currentPhaseTimeRemaining = s, this.startPhaseTimer()) : this.state.currentPhaseTimeRemaining = 0, this.notifyChange();
773
836
  }
774
837
  /**
775
838
  * Manually complete the interview
776
839
  */
777
840
  completeInterview() {
778
- var r, i;
779
- this.stopGlobalTimer(), this.stopPhaseTimer(), this.state.phase = "completed", (i = (r = this.callbacks).onInterviewEnd) == null || i.call(r), this.notifyChange();
841
+ var r, t;
842
+ this.stopGlobalTimer(), this.stopPhaseTimer(), this.state.phase = "completed", (t = (r = this.callbacks).onInterviewEnd) == null || t.call(r), this.notifyChange();
780
843
  }
781
844
  /**
782
845
  * Cleanup
@@ -804,8 +867,8 @@ class nt {
804
867
  */
805
868
  startGlobalTimer() {
806
869
  this.globalIntervalId = setInterval(() => {
807
- var r, i;
808
- this.state.totalTimeElapsed++, (i = (r = this.callbacks).onTick) == null || i.call(r, this.getState());
870
+ var r, t;
871
+ this.state.totalTimeElapsed++, (t = (r = this.callbacks).onTick) == null || t.call(r, this.getState());
809
872
  }, 1e3);
810
873
  }
811
874
  /**
@@ -832,67 +895,67 @@ class nt {
832
895
  * Notify phase change
833
896
  */
834
897
  notifyChange() {
835
- var r, i;
836
- (i = (r = this.callbacks).onPhaseChange) == null || i.call(r, this.state.phase, this.getState());
898
+ var r, t;
899
+ (t = (r = this.callbacks).onPhaseChange) == null || t.call(r, this.state.phase, this.getState());
837
900
  }
838
901
  }
839
- function at(t = {}) {
840
- const { config: r = {}, callbacks: i = {} } = t, s = E(null);
841
- s.current || (s.current = new nt(r, {}));
842
- const n = s.current, [o, l] = k(n.getState()), a = N(() => {
843
- l(n.getState());
902
+ function ft(i = {}) {
903
+ const { config: r = {}, callbacks: t = {} } = i, s = T(null);
904
+ s.current || (s.current = new gt(r, {}));
905
+ const n = s.current, [o, a] = k(n.getState()), l = N(() => {
906
+ a(n.getState());
844
907
  }, [n]);
845
908
  C(() => {
846
909
  const h = {
847
- onPhaseChange: (m, c) => {
848
- var g;
849
- a(), (g = i.onPhaseChange) == null || g.call(i, m, c);
910
+ onPhaseChange: (m, w) => {
911
+ var f;
912
+ l(), (f = t.onPhaseChange) == null || f.call(t, m, w);
850
913
  },
851
914
  onTick: (m) => {
852
- var c;
853
- a(), (c = i.onTick) == null || c.call(i, m);
915
+ var w;
916
+ l(), (w = t.onTick) == null || w.call(t, m);
854
917
  },
855
918
  onInterviewEnd: () => {
856
919
  var m;
857
- a(), (m = i.onInterviewEnd) == null || m.call(i);
920
+ l(), (m = t.onInterviewEnd) == null || m.call(t);
858
921
  }
859
922
  };
860
923
  n.callbacks = h;
861
- }, [n, i, a]), C(() => () => {
924
+ }, [n, t, l]), C(() => () => {
862
925
  n.destroy();
863
926
  }, [n]);
864
927
  const d = N(() => {
865
- n.startQuestion(), a();
866
- }, [n, a]), w = N(() => {
867
- n.nextPhase(), a();
868
- }, [n, a]), u = N(() => {
869
- n.completeInterview(), a();
870
- }, [n, a]);
928
+ n.startQuestion(), l();
929
+ }, [n, l]), c = N(() => {
930
+ n.nextPhase(), l();
931
+ }, [n, l]), u = N(() => {
932
+ n.completeInterview(), l();
933
+ }, [n, l]);
871
934
  return {
872
935
  state: o,
873
936
  startQuestion: d,
874
- nextPhase: w,
937
+ nextPhase: c,
875
938
  completeInterview: u,
876
939
  timerService: n
877
940
  };
878
941
  }
879
- function ot(t, r = {}) {
880
- const [i, s] = k({
942
+ function xt(i, r = {}) {
943
+ const [t, s] = k({
881
944
  data: null,
882
945
  loading: !1,
883
946
  error: null
884
947
  }), n = N(
885
948
  async (...o) => {
886
- var l, a, d, w;
949
+ var a, l, d, c;
887
950
  s((u) => ({ ...u, loading: !0, error: null }));
888
951
  try {
889
- const u = await t(...o);
952
+ const u = await i(...o);
890
953
  s((h) => ({
891
954
  ...h,
892
955
  data: u,
893
956
  loading: !1,
894
957
  error: null
895
- })), (l = r.onSuccess) == null || l.call(r, u), (a = r.onSettled) == null || a.call(r, u, null);
958
+ })), (a = r.onSuccess) == null || a.call(r, u), (l = r.onSettled) == null || l.call(r, u, null);
896
959
  } catch (u) {
897
960
  const h = u.type ? u : {
898
961
  type: "unknown",
@@ -905,77 +968,77 @@ function ot(t, r = {}) {
905
968
  ...m,
906
969
  loading: !1,
907
970
  error: h
908
- })), (d = r.onError) == null || d.call(r, h), (w = r.onSettled) == null || w.call(r, null, h);
971
+ })), (d = r.onError) == null || d.call(r, h), (c = r.onSettled) == null || c.call(r, null, h);
909
972
  }
910
973
  },
911
- [t, r]
974
+ [i, r]
912
975
  );
913
976
  return {
914
- ...i,
977
+ ...t,
915
978
  execute: n
916
979
  };
917
980
  }
918
- const lt = (t) => {
919
- const [r, i] = k(null), [s, n] = k(!1), o = document, l = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), a = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, d = async (c) => {
920
- var g;
981
+ const pt = (i) => {
982
+ const [r, t] = k(null), [s, n] = k(!1), o = document, a = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), l = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, d = async (w) => {
983
+ var f;
921
984
  try {
922
- if (!l())
985
+ if (!a())
923
986
  throw new Error("Fullscreen is not supported in this environment");
924
- c.requestFullscreen ? await c.requestFullscreen() : c.webkitRequestFullscreen ? await c.webkitRequestFullscreen() : c.mozRequestFullScreen ? await c.mozRequestFullScreen() : c.msRequestFullscreen && await c.msRequestFullscreen();
925
- } catch (y) {
987
+ w.requestFullscreen ? await w.requestFullscreen() : w.webkitRequestFullscreen ? await w.webkitRequestFullscreen() : w.mozRequestFullScreen ? await w.mozRequestFullScreen() : w.msRequestFullscreen && await w.msRequestFullscreen();
988
+ } catch (v) {
926
989
  const j = {
927
990
  name: "FullscreenError",
928
- message: y instanceof Error ? y.message : "Failed to enter fullscreen"
991
+ message: v instanceof Error ? v.message : "Failed to enter fullscreen"
929
992
  };
930
- i(j), (g = t == null ? void 0 : t.onError) == null || g.call(t, j);
993
+ t(j), (f = i == null ? void 0 : i.onError) == null || f.call(i, j);
931
994
  }
932
- }, w = async () => {
933
- var c;
995
+ }, c = async () => {
996
+ var w;
934
997
  try {
935
998
  o.exitFullscreen ? await o.exitFullscreen() : o.webkitExitFullscreen ? await o.webkitExitFullscreen() : o.mozCancelFullScreen ? await o.mozCancelFullScreen() : o.msExitFullscreen && await o.msExitFullscreen();
936
- } catch (g) {
937
- const y = {
999
+ } catch (f) {
1000
+ const v = {
938
1001
  name: "FullscreenError",
939
- message: g instanceof Error ? g.message : "Failed to exit fullscreen"
1002
+ message: f instanceof Error ? f.message : "Failed to exit fullscreen"
940
1003
  };
941
- i(y), (c = t == null ? void 0 : t.onError) == null || c.call(t, y);
1004
+ t(v), (w = i == null ? void 0 : i.onError) == null || w.call(i, v);
942
1005
  }
943
1006
  }, u = N(() => {
944
- var g;
945
- const c = !!a();
946
- n(c), (g = t == null ? void 0 : t.onFullScreenChange) == null || g.call(t, c);
947
- }, [t]);
1007
+ var f;
1008
+ const w = !!l();
1009
+ n(w), (f = i == null ? void 0 : i.onFullScreenChange) == null || f.call(i, w);
1010
+ }, [i]);
948
1011
  C(() => {
949
- const c = [
1012
+ const w = [
950
1013
  "fullscreenchange",
951
1014
  "webkitfullscreenchange",
952
1015
  "mozfullscreenchange",
953
1016
  "MSFullscreenChange"
954
1017
  ];
955
- return c.forEach((g) => {
956
- document.addEventListener(g, u);
1018
+ return w.forEach((f) => {
1019
+ document.addEventListener(f, u);
957
1020
  }), () => {
958
- c.forEach((g) => {
959
- document.removeEventListener(g, u);
1021
+ w.forEach((f) => {
1022
+ document.removeEventListener(f, u);
960
1023
  });
961
1024
  };
962
1025
  }, [u]);
963
- const h = async (c) => {
964
- i(null);
965
- const g = c ?? document.documentElement;
966
- await d(g);
1026
+ const h = async (w) => {
1027
+ t(null);
1028
+ const f = w ?? document.documentElement;
1029
+ await d(f);
967
1030
  };
968
1031
  return {
969
1032
  isFullScreen: s,
970
- toggleFullScreen: async (c) => {
971
- s ? await w() : await h(c);
1033
+ toggleFullScreen: async (w) => {
1034
+ s ? await c() : await h(w);
972
1035
  },
973
1036
  enterFullScreen: h,
974
- exitFullScreen: w,
1037
+ exitFullScreen: c,
975
1038
  error: r
976
1039
  };
977
1040
  };
978
- function ct(t) {
1041
+ function bt(i) {
979
1042
  var r;
980
1043
  if (!navigator.onLine)
981
1044
  return {
@@ -984,57 +1047,57 @@ function ct(t) {
984
1047
  retryable: !0,
985
1048
  userMessage: "Please check your internet connection and try again."
986
1049
  };
987
- if (t.name === "AbortError" || (r = t.message) != null && r.includes("timeout"))
1050
+ if (i.name === "AbortError" || (r = i.message) != null && r.includes("timeout"))
988
1051
  return {
989
1052
  type: "timeout",
990
1053
  message: "Request timed out",
991
1054
  retryable: !0,
992
1055
  userMessage: "The request is taking longer than expected. Please try again."
993
1056
  };
994
- if (t.status) {
995
- const { status: i } = t;
996
- if (i === 401 || i === 403)
1057
+ if (i.status) {
1058
+ const { status: t } = i;
1059
+ if (t === 401 || t === 403)
997
1060
  return {
998
1061
  type: "auth",
999
- status: i,
1062
+ status: t,
1000
1063
  message: "Authentication failed",
1001
1064
  retryable: !1,
1002
1065
  userMessage: "Your session has expired. Please refresh the page."
1003
1066
  };
1004
- if (i === 429)
1067
+ if (t === 429)
1005
1068
  return {
1006
1069
  type: "rate-limit",
1007
- status: i,
1070
+ status: t,
1008
1071
  message: "Too many requests",
1009
1072
  retryable: !0,
1010
1073
  userMessage: "Please wait a moment before trying again."
1011
1074
  };
1012
- if (i >= 500)
1075
+ if (t >= 500)
1013
1076
  return {
1014
1077
  type: "server",
1015
- status: i,
1016
- message: `Server error: ${i}`,
1078
+ status: t,
1079
+ message: `Server error: ${t}`,
1017
1080
  retryable: !0,
1018
1081
  userMessage: "Our servers are experiencing issues. Please try again in a few moments."
1019
1082
  };
1020
- if (i >= 400)
1083
+ if (t >= 400)
1021
1084
  return {
1022
1085
  type: "client",
1023
- status: i,
1024
- message: `Client error: ${i}`,
1086
+ status: t,
1087
+ message: `Client error: ${t}`,
1025
1088
  retryable: !1,
1026
1089
  userMessage: "There was an issue with your request. Please check your input."
1027
1090
  };
1028
1091
  }
1029
1092
  return {
1030
1093
  type: "unknown",
1031
- message: t.message || "Unknown error occurred",
1094
+ message: i.message || "Unknown error occurred",
1032
1095
  retryable: !0,
1033
1096
  userMessage: "Something unexpected happened. Please try again.",
1034
- originalError: t
1097
+ originalError: i
1035
1098
  };
1036
1099
  }
1037
- async function he(t, r = {}, i = {
1100
+ async function xe(i, r = {}, t = {
1038
1101
  attempts: 3,
1039
1102
  backoff: "exponential",
1040
1103
  baseDelay: 1e3,
@@ -1042,35 +1105,35 @@ async function he(t, r = {}, i = {
1042
1105
  jitter: !0
1043
1106
  }) {
1044
1107
  let s;
1045
- for (let n = 1; n <= i.attempts; n++)
1108
+ for (let n = 1; n <= t.attempts; n++)
1046
1109
  try {
1047
- const o = new AbortController(), l = setTimeout(() => o.abort(), 6e4), a = await fetch(t, {
1110
+ const o = new AbortController(), a = setTimeout(() => o.abort(), 6e4), l = await fetch(i, {
1048
1111
  ...r,
1049
1112
  signal: o.signal
1050
1113
  });
1051
- if (clearTimeout(l), a.status >= 400 && a.status < 500 && a.status !== 429)
1052
- return a;
1053
- if (!a.ok)
1054
- throw new Error(`HTTP ${a.status}: ${a.statusText}`);
1055
- return a;
1114
+ if (clearTimeout(a), l.status >= 400 && l.status < 500 && l.status !== 429)
1115
+ return l;
1116
+ if (!l.ok)
1117
+ throw new Error(`HTTP ${l.status}: ${l.statusText}`);
1118
+ return l;
1056
1119
  } catch (o) {
1057
1120
  s = o;
1058
- const l = ct(o);
1059
- if (!l.retryable || n === i.attempts)
1060
- throw l;
1061
- const a = dt(n, i);
1121
+ const a = bt(o);
1122
+ if (!a.retryable || n === t.attempts)
1123
+ throw a;
1124
+ const l = yt(n, t);
1062
1125
  console.warn(
1063
- `API request failed (attempt ${n}/${i.attempts}), retrying in ${a}ms:`,
1064
- l.message
1065
- ), await new Promise((d) => setTimeout(d, a));
1126
+ `API request failed (attempt ${n}/${t.attempts}), retrying in ${l}ms:`,
1127
+ a.message
1128
+ ), await new Promise((d) => setTimeout(d, l));
1066
1129
  }
1067
1130
  throw s;
1068
1131
  }
1069
- function dt(t, r) {
1070
- let i;
1071
- return r.backoff === "exponential" ? i = r.baseDelay * Math.pow(2, t - 1) : i = r.baseDelay, i = Math.min(i, r.maxDelay), r.jitter && (i = i * (0.5 + Math.random() * 0.5)), Math.round(i);
1132
+ function yt(i, r) {
1133
+ let t;
1134
+ return r.backoff === "exponential" ? t = r.baseDelay * Math.pow(2, i - 1) : t = r.baseDelay, t = Math.min(t, r.maxDelay), r.jitter && (t = t * (0.5 + Math.random() * 0.5)), Math.round(t);
1072
1135
  }
1073
- class wt {
1136
+ class vt {
1074
1137
  constructor(r = {}) {
1075
1138
  F(this, "config");
1076
1139
  this.config = r;
@@ -1085,12 +1148,11 @@ class wt {
1085
1148
  * Get default headers for API requests
1086
1149
  */
1087
1150
  getHeaders() {
1088
- var i;
1151
+ var t;
1089
1152
  const r = {
1090
- "Content-Type": "application/json",
1091
- "X-Auth-Token": "appkey"
1153
+ "Content-Type": "application/json"
1092
1154
  };
1093
- return (i = this.config) != null && i.authToken && (r.Authorization = `Bearer ${this.config.authToken}`), r;
1155
+ return (t = this.config) != null && t.authToken && (r.Authorization = `Bearer ${this.config.authToken}`), r;
1094
1156
  }
1095
1157
  /**
1096
1158
  * Get base URL from config with fallback
@@ -1104,58 +1166,58 @@ class wt {
1104
1166
  */
1105
1167
  async generateQuestion({
1106
1168
  interviewId: r,
1107
- isInterviewDone: i = !1,
1169
+ isInterviewDone: t = !1,
1108
1170
  qnaId: s,
1109
1171
  question: n,
1110
1172
  answer: o,
1111
- answerDuration: l
1173
+ answerDuration: a
1112
1174
  }) {
1113
- const a = await he(
1175
+ const l = await xe(
1114
1176
  `${this.getBaseUrl()}/questions/next`,
1115
1177
  {
1116
1178
  method: "POST",
1117
1179
  headers: this.getHeaders(),
1118
1180
  body: JSON.stringify({
1119
1181
  interview_id: r,
1120
- is_interview_done: i,
1182
+ is_interview_done: t,
1121
1183
  qna_id: s,
1122
1184
  question: n,
1123
1185
  answer: o,
1124
1186
  // TODO: Hardcoded for now, will be dynamic later
1125
- answer_duration: l ?? "00:00:30"
1187
+ answer_duration: a ?? "00:00:30"
1126
1188
  })
1127
1189
  }
1128
1190
  );
1129
- if (!a.ok)
1130
- throw new Error(`Failed to get questions: ${a.status}`);
1131
- return await a.json();
1191
+ if (!l.ok)
1192
+ throw new Error(`Failed to get questions: ${l.status}`);
1193
+ return await l.json();
1132
1194
  }
1133
1195
  }
1134
- function ut() {
1135
- const t = ae();
1196
+ function jt() {
1197
+ const i = ae();
1136
1198
  return X(() => {
1137
- const i = t.api || {};
1138
- return new wt(i);
1139
- }, [t.api]);
1199
+ const t = i.api || {};
1200
+ return new vt(t);
1201
+ }, [i.api]);
1140
1202
  }
1141
- const ht = (t) => {
1203
+ const Nt = (i) => {
1142
1204
  C(() => {
1143
1205
  const r = (s) => {
1144
- (s.ctrlKey || s.metaKey) && ["c", "v", "a", "t", "n", "w", "r", "s", "p"].includes(s.key.toLowerCase()) && (s.preventDefault(), t({
1206
+ (s.ctrlKey || s.metaKey) && ["c", "v", "a", "t", "n", "w", "r", "s", "p"].includes(s.key.toLowerCase()) && (s.preventDefault(), i({
1145
1207
  type: "blocked_shortcut",
1146
1208
  severity: "low",
1147
1209
  details: {
1148
1210
  action: "shortcut_pressed",
1149
1211
  reason: `Attempted to use a blocked keyboard shortcut: Ctrl + ${s.key}`
1150
1212
  }
1151
- })), s.key.startsWith("F") && s.key.length <= 3 && (s.preventDefault(), t({
1213
+ })), s.key.startsWith("F") && s.key.length <= 3 && (s.preventDefault(), i({
1152
1214
  type: "blocked_function_key",
1153
1215
  severity: "low",
1154
1216
  details: {
1155
1217
  action: "function_key_pressed",
1156
1218
  reason: `Attempted to use a blocked function key: ${s.key}`
1157
1219
  }
1158
- })), s.altKey && s.key === "Tab" && (s.preventDefault(), t({
1220
+ })), s.altKey && s.key === "Tab" && (s.preventDefault(), i({
1159
1221
  type: "alt_tab_attempt",
1160
1222
  severity: "medium",
1161
1223
  details: {
@@ -1163,8 +1225,8 @@ const ht = (t) => {
1163
1225
  reason: "Attempted to use the Alt + Tab shortcut"
1164
1226
  }
1165
1227
  }));
1166
- }, i = (s) => {
1167
- s.preventDefault(), t({
1228
+ }, t = (s) => {
1229
+ s.preventDefault(), i({
1168
1230
  type: "right_click_attempt",
1169
1231
  severity: "low",
1170
1232
  details: {
@@ -1173,17 +1235,17 @@ const ht = (t) => {
1173
1235
  }
1174
1236
  });
1175
1237
  };
1176
- return document.addEventListener("keydown", r), document.addEventListener("contextmenu", i), () => {
1177
- document.removeEventListener("keydown", r), document.removeEventListener("contextmenu", i);
1238
+ return document.addEventListener("keydown", r), document.addEventListener("contextmenu", t), () => {
1239
+ document.removeEventListener("keydown", r), document.removeEventListener("contextmenu", t);
1178
1240
  };
1179
- }, [t]);
1241
+ }, [i]);
1180
1242
  };
1181
1243
  class R extends Error {
1182
- constructor(r, i, s = !1) {
1183
- super(r), this.code = i, this.recoverable = s, this.name = "STTError";
1244
+ constructor(r, t, s = !1) {
1245
+ super(r), this.code = t, this.recoverable = s, this.name = "STTError";
1184
1246
  }
1185
1247
  }
1186
- class mt {
1248
+ class kt {
1187
1249
  constructor(r = {}) {
1188
1250
  F(this, "config");
1189
1251
  F(this, "mediaRecorder", null);
@@ -1215,7 +1277,7 @@ class mt {
1215
1277
  /**
1216
1278
  * Start recording audio from user's microphone
1217
1279
  */
1218
- async startRecording(r, i) {
1280
+ async startRecording(r, t) {
1219
1281
  var s;
1220
1282
  if (!this.isRecordingSupported())
1221
1283
  throw new R(
@@ -1241,20 +1303,20 @@ class mt {
1241
1303
  this.mediaRecorder = new MediaRecorder(this.recordingStream, {
1242
1304
  mimeType: n
1243
1305
  }), this.mediaRecorder.ondataavailable = (o) => {
1244
- var l;
1245
- o.data.size > 0 && (this.audioChunks.push(o.data), (l = i == null ? void 0 : i.onDataAvailable) == null || l.call(i, o.data));
1306
+ var a;
1307
+ o.data.size > 0 && (this.audioChunks.push(o.data), (a = t == null ? void 0 : t.onDataAvailable) == null || a.call(t, o.data));
1246
1308
  }, this.mediaRecorder.onstop = () => {
1247
1309
  var o;
1248
- (o = i == null ? void 0 : i.onStop) == null || o.call(i);
1310
+ (o = t == null ? void 0 : t.onStop) == null || o.call(t);
1249
1311
  }, this.mediaRecorder.onerror = (o) => {
1250
- var a;
1251
- const l = new R(
1312
+ var l;
1313
+ const a = new R(
1252
1314
  `Recording failed: ${o.error}`,
1253
1315
  "RECORDING_ERROR",
1254
1316
  !0
1255
1317
  );
1256
- (a = i == null ? void 0 : i.onError) == null || a.call(i, l), this.cleanup();
1257
- }, this.mediaRecorder.start(100), (s = i == null ? void 0 : i.onStart) == null || s.call(i), r && r > 0 && (this.autoStopTimeoutId = setTimeout(() => {
1318
+ (l = t == null ? void 0 : t.onError) == null || l.call(t, a), this.cleanup();
1319
+ }, this.mediaRecorder.start(100), (s = t == null ? void 0 : t.onStart) == null || s.call(t), r && r > 0 && (this.autoStopTimeoutId = setTimeout(() => {
1258
1320
  this.isRecording() && this.stopRecording();
1259
1321
  }, r * 1e3));
1260
1322
  } catch (n) {
@@ -1285,19 +1347,19 @@ class mt {
1285
1347
  "NO_ACTIVE_RECORDING",
1286
1348
  !1
1287
1349
  );
1288
- return new Promise((r, i) => {
1350
+ return new Promise((r, t) => {
1289
1351
  if (!this.mediaRecorder) {
1290
- i(
1352
+ t(
1291
1353
  new R("MediaRecorder is null", "MEDIARECORDER_NULL", !1)
1292
1354
  );
1293
1355
  return;
1294
1356
  }
1295
1357
  const s = this.mediaRecorder, n = () => {
1296
1358
  try {
1297
- const o = s.mimeType || "audio/webm", l = new Blob(this.audioChunks, { type: o });
1298
- this.cleanup(), r(l);
1359
+ const o = s.mimeType || "audio/webm", a = new Blob(this.audioChunks, { type: o });
1360
+ this.cleanup(), r(a);
1299
1361
  } catch (o) {
1300
- i(
1362
+ t(
1301
1363
  new R(
1302
1364
  `Failed to create audio blob: ${o instanceof Error ? o.message : String(o)}`,
1303
1365
  "BLOB_CREATION_FAILED",
@@ -1314,24 +1376,24 @@ class mt {
1314
1376
  */
1315
1377
  async transcribe(r) {
1316
1378
  const {
1317
- audioBlob: i,
1379
+ audioBlob: t,
1318
1380
  model: s = this.config.model,
1319
1381
  language: n = this.config.language,
1320
1382
  includeTimestamps: o = this.config.includeTimestamps,
1321
- temperature: l = this.config.temperature
1383
+ temperature: a = this.config.temperature
1322
1384
  } = r;
1323
- if (!i || i.size === 0)
1385
+ if (!t || t.size === 0)
1324
1386
  throw new R(
1325
1387
  "Audio blob is empty or invalid",
1326
1388
  "INVALID_AUDIO",
1327
1389
  !1
1328
1390
  );
1329
1391
  try {
1330
- const a = new FormData(), d = new File([i], "recording.wav", {
1331
- type: i.type || "audio/wav"
1392
+ const l = new FormData(), d = new File([t], "recording.wav", {
1393
+ type: t.type || "audio/wav"
1332
1394
  });
1333
- a.append("file", d), a.append("model", s || "whisper-large-v3-turbo"), a.append("language", n || "en"), a.append("include_timestamps", String(o || !1)), a.append("temperature", String(l || 0));
1334
- const w = await he(
1395
+ l.append("file", d), l.append("model", s || "whisper-large-v3-turbo"), l.append("language", n || "en"), l.append("include_timestamps", String(o || !1)), l.append("temperature", String(a || 0));
1396
+ const c = await xe(
1335
1397
  `${this.config.baseUrl}/speech/transcribe`,
1336
1398
  {
1337
1399
  method: "POST",
@@ -1342,7 +1404,7 @@ class mt {
1342
1404
  Authorization: `Bearer ${this.config.authToken}`
1343
1405
  }
1344
1406
  },
1345
- body: a
1407
+ body: l
1346
1408
  },
1347
1409
  {
1348
1410
  attempts: 1,
@@ -1352,27 +1414,27 @@ class mt {
1352
1414
  jitter: !0
1353
1415
  }
1354
1416
  );
1355
- if (!w.ok) {
1356
- const h = await w.text();
1357
- let m = `STT request failed: ${w.status} ${w.statusText}`;
1417
+ if (!c.ok) {
1418
+ const h = await c.text();
1419
+ let m = `STT request failed: ${c.status} ${c.statusText}`;
1358
1420
  try {
1359
- const c = JSON.parse(h);
1360
- m = c.message || c.error || m;
1421
+ const w = JSON.parse(h);
1422
+ m = w.message || w.error || m;
1361
1423
  } catch {
1362
1424
  m = h || m;
1363
1425
  }
1364
1426
  throw new R(
1365
1427
  m,
1366
- `HTTP_${w.status}`,
1367
- w.status >= 500
1428
+ `HTTP_${c.status}`,
1429
+ c.status >= 500
1368
1430
  );
1369
1431
  }
1370
1432
  return {
1371
- transcript: (await w.json()).data.text ?? ""
1433
+ transcript: (await c.json()).data.text ?? ""
1372
1434
  };
1373
- } catch (a) {
1374
- throw a instanceof R ? a : new R(
1375
- `Transcription failed: ${a instanceof Error ? a.message : String(a)}`,
1435
+ } catch (l) {
1436
+ throw l instanceof R ? l : new R(
1437
+ `Transcription failed: ${l instanceof Error ? l.message : String(l)}`,
1376
1438
  "TRANSCRIPTION_FAILED",
1377
1439
  !0
1378
1440
  );
@@ -1401,9 +1463,9 @@ class mt {
1401
1463
  "audio/mp4",
1402
1464
  "audio/wav"
1403
1465
  ];
1404
- for (const i of r)
1405
- if (MediaRecorder.isTypeSupported(i))
1406
- return i;
1466
+ for (const t of r)
1467
+ if (MediaRecorder.isTypeSupported(t))
1468
+ return t;
1407
1469
  return "audio/webm";
1408
1470
  }
1409
1471
  /**
@@ -1413,87 +1475,87 @@ class mt {
1413
1475
  this.recordingStream && (this.recordingStream.getTracks().forEach((r) => r.stop()), this.recordingStream = null), this.mediaRecorder = null, this.audioChunks = [], this.autoStopTimeoutId && (clearTimeout(this.autoStopTimeoutId), this.autoStopTimeoutId = null);
1414
1476
  }
1415
1477
  }
1416
- const K = new mt(), xt = (t = {}) => {
1417
- const [r, i] = k(!1), [s, n] = k(!1), [o, l] = k(null), [a, d] = k(null), [w, u] = k(null);
1418
- t.config && K.updateConfig(t.config);
1419
- const h = N(async (y) => {
1478
+ const J = new kt(), Et = (i = {}) => {
1479
+ const [r, t] = k(!1), [s, n] = k(!1), [o, a] = k(null), [l, d] = k(null), [c, u] = k(null);
1480
+ i.config && J.updateConfig(i.config);
1481
+ const h = N(async (v) => {
1420
1482
  var j;
1421
1483
  try {
1422
- d(null), l(null), u(null), await K.startRecording(y, {
1484
+ d(null), a(null), u(null), await J.startRecording(v, {
1423
1485
  onStart: () => {
1424
- var f;
1425
- i(!0), (f = t.onStart) == null || f.call(t);
1486
+ var x;
1487
+ t(!0), (x = i.onStart) == null || x.call(i);
1426
1488
  },
1427
1489
  onStop: () => {
1428
- var f;
1429
- i(!1), (f = t.onStop) == null || f.call(t);
1490
+ var x;
1491
+ t(!1), (x = i.onStop) == null || x.call(i);
1430
1492
  },
1431
- onError: (f) => {
1493
+ onError: (x) => {
1432
1494
  var S;
1433
- const T = f instanceof R ? f : new R(f.message, "RECORDING_ERROR", !0);
1434
- d(T), i(!1), (S = t.onError) == null || S.call(t, T);
1495
+ const E = x instanceof R ? x : new R(x.message, "RECORDING_ERROR", !0);
1496
+ d(E), t(!1), (S = i.onError) == null || S.call(i, E);
1435
1497
  }
1436
1498
  });
1437
- } catch (f) {
1438
- const T = f instanceof R ? f : new R(
1439
- f instanceof Error ? f.message : String(f),
1499
+ } catch (x) {
1500
+ const E = x instanceof R ? x : new R(
1501
+ x instanceof Error ? x.message : String(x),
1440
1502
  "START_FAILED",
1441
1503
  !1
1442
1504
  );
1443
- throw d(T), i(!1), (j = t.onError) == null || j.call(t, T), T;
1505
+ throw d(E), t(!1), (j = i.onError) == null || j.call(i, E), E;
1444
1506
  }
1445
1507
  }, []), m = N(async () => {
1446
- var y, j;
1508
+ var v, j;
1447
1509
  try {
1448
- const f = await K.stopRecording();
1449
- return u(f), i(!1), (y = t.onStop) == null || y.call(t), f;
1450
- } catch (f) {
1451
- const T = f instanceof R ? f : new R(
1452
- f instanceof Error ? f.message : String(f),
1510
+ const x = await J.stopRecording();
1511
+ return u(x), t(!1), (v = i.onStop) == null || v.call(i), x;
1512
+ } catch (x) {
1513
+ const E = x instanceof R ? x : new R(
1514
+ x instanceof Error ? x.message : String(x),
1453
1515
  "STOP_FAILED",
1454
1516
  !1
1455
1517
  );
1456
- throw d(T), i(!1), (j = t.onError) == null || j.call(t, T), T;
1518
+ throw d(E), t(!1), (j = i.onError) == null || j.call(i, E), E;
1457
1519
  }
1458
- }, []), c = N(
1459
- async (y, j = {}) => {
1460
- var f, T;
1520
+ }, []), w = N(
1521
+ async (v, j = {}) => {
1522
+ var x, E;
1461
1523
  try {
1462
1524
  d(null), n(!0);
1463
1525
  const S = {
1464
- audioBlob: y,
1526
+ audioBlob: v,
1465
1527
  ...j
1466
- }, v = await K.transcribe(S);
1467
- return l(v.transcript), n(!1), (f = t.onTranscriptionComplete) == null || f.call(t, v), v;
1528
+ }, y = await J.transcribe(S);
1529
+ return a(y.transcript), n(!1), (x = i.onTranscriptionComplete) == null || x.call(i, y), y;
1468
1530
  } catch (S) {
1469
- const v = S instanceof R ? S : new R(
1531
+ const y = S instanceof R ? S : new R(
1470
1532
  S instanceof Error ? S.message : String(S),
1471
1533
  "TRANSCRIPTION_FAILED",
1472
1534
  !0
1473
1535
  );
1474
- throw d(v), n(!1), (T = t.onError) == null || T.call(t, v), v;
1536
+ throw d(y), n(!1), (E = i.onError) == null || E.call(i, y), y;
1475
1537
  }
1476
1538
  },
1477
1539
  []
1478
- ), g = N(() => {
1479
- K.cancelRecording(), i(!1), u(null);
1540
+ ), f = N(() => {
1541
+ J.cancelRecording(), t(!1), u(null);
1480
1542
  }, []);
1481
1543
  return {
1482
1544
  startRecording: h,
1483
1545
  stopRecording: m,
1484
- transcribe: c,
1485
- cancelRecording: g,
1546
+ transcribe: w,
1547
+ cancelRecording: f,
1486
1548
  isRecording: r,
1487
1549
  isTranscribing: s,
1488
1550
  transcript: o,
1489
- error: a,
1490
- audioBlob: w
1551
+ error: l,
1552
+ audioBlob: c
1491
1553
  };
1492
- }, gt = (t) => {
1493
- const r = E(null), i = E(!1);
1554
+ }, Tt = (i) => {
1555
+ const r = T(null), t = T(!1);
1494
1556
  C(() => {
1495
1557
  const s = () => {
1496
- document.hidden && (i.current = !0, r.current && (clearTimeout(r.current), r.current = null), t({
1558
+ document.hidden && (t.current = !0, r.current && (clearTimeout(r.current), r.current = null), i({
1497
1559
  type: "tab_switch",
1498
1560
  severity: "high",
1499
1561
  details: {
@@ -1501,11 +1563,11 @@ const K = new mt(), xt = (t = {}) => {
1501
1563
  reason: "Attempted to switch tabs or applications"
1502
1564
  }
1503
1565
  }), setTimeout(() => {
1504
- i.current = !1;
1566
+ t.current = !1;
1505
1567
  }, 100));
1506
1568
  }, n = () => {
1507
- i.current || (r.current = setTimeout(() => {
1508
- i.current || t({
1569
+ t.current || (r.current = setTimeout(() => {
1570
+ t.current || i({
1509
1571
  type: "focus_loss",
1510
1572
  severity: "medium",
1511
1573
  details: {
@@ -1518,11 +1580,11 @@ const K = new mt(), xt = (t = {}) => {
1518
1580
  return document.addEventListener("visibilitychange", s), window.addEventListener("blur", n), () => {
1519
1581
  document.removeEventListener("visibilitychange", s), window.removeEventListener("blur", n), r.current && clearTimeout(r.current);
1520
1582
  };
1521
- }, [t]);
1522
- }, ft = () => {
1583
+ }, [i]);
1584
+ }, Ct = () => {
1523
1585
  C(() => {
1524
- const t = document.createElement("style");
1525
- return t.textContent = `
1586
+ const i = document.createElement("style");
1587
+ return i.textContent = `
1526
1588
  * {
1527
1589
  -webkit-user-select: none !important;
1528
1590
  -moz-user-select: none !important;
@@ -1535,12 +1597,12 @@ const K = new mt(), xt = (t = {}) => {
1535
1597
  -ms-user-select: text !important;
1536
1598
  user-select: text !important;
1537
1599
  }
1538
- `, document.head.appendChild(t), () => {
1539
- document.head.removeChild(t);
1600
+ `, document.head.appendChild(i), () => {
1601
+ document.head.removeChild(i);
1540
1602
  };
1541
1603
  }, []);
1542
1604
  };
1543
- class pt {
1605
+ class St {
1544
1606
  constructor(r = {}) {
1545
1607
  F(this, "config");
1546
1608
  F(this, "currentAudio", null);
@@ -1563,12 +1625,12 @@ class pt {
1563
1625
  */
1564
1626
  async synthesizeSpeech(r) {
1565
1627
  const {
1566
- text: i,
1628
+ text: t,
1567
1629
  voice: s = this.config.voice,
1568
1630
  speed: n = this.config.speed
1569
1631
  } = r, o = new URLSearchParams();
1570
- o.append("text", i), o.append("voice", s || "string"), o.append("speed", (n == null ? void 0 : n.toString()) || "1");
1571
- const l = await he(
1632
+ o.append("text", t), o.append("voice", s || "string"), o.append("speed", (n == null ? void 0 : n.toString()) || "1");
1633
+ const a = await xe(
1572
1634
  `${this.config.baseUrl}/speech/synthesize`,
1573
1635
  {
1574
1636
  method: "POST",
@@ -1590,15 +1652,15 @@ class pt {
1590
1652
  jitter: !1
1591
1653
  }
1592
1654
  );
1593
- if (!l.ok)
1655
+ if (!a.ok)
1594
1656
  throw new Error(
1595
- `TTS request failed: ${l.status} ${l.statusText}`
1657
+ `TTS request failed: ${a.status} ${a.statusText}`
1596
1658
  );
1597
- const a = l.headers.get("content-type");
1598
- if (a && a.includes("audio/"))
1599
- return l.blob();
1659
+ const l = a.headers.get("content-type");
1660
+ if (l && l.includes("audio/"))
1661
+ return a.blob();
1600
1662
  try {
1601
- const d = await l.json();
1663
+ const d = await a.json();
1602
1664
  throw new Error(`TTS Error: ${JSON.stringify(d)}`);
1603
1665
  } catch {
1604
1666
  throw new Error("TTS request failed with unknown error");
@@ -1607,35 +1669,35 @@ class pt {
1607
1669
  /**
1608
1670
  * Speak text and return a promise that resolves when playback completes
1609
1671
  */
1610
- async speak(r, i) {
1672
+ async speak(r, t) {
1611
1673
  var s, n;
1612
1674
  try {
1613
- this.stop(), (s = i == null ? void 0 : i.onStart) == null || s.call(i);
1614
- const o = await this.synthesizeSpeech(r), l = URL.createObjectURL(o);
1615
- return this.currentAudio = new Audio(l), new Promise((a, d) => {
1675
+ this.stop(), (s = t == null ? void 0 : t.onStart) == null || s.call(t);
1676
+ const o = await this.synthesizeSpeech(r), a = URL.createObjectURL(o);
1677
+ return this.currentAudio = new Audio(a), new Promise((l, d) => {
1616
1678
  if (!this.currentAudio) {
1617
1679
  d(new Error("Audio element not created"));
1618
1680
  return;
1619
1681
  }
1620
- const w = this.currentAudio;
1621
- w.onended = () => {
1682
+ const c = this.currentAudio;
1683
+ c.onended = () => {
1622
1684
  var u;
1623
- URL.revokeObjectURL(l), this.currentAudio = null, (u = i == null ? void 0 : i.onEnd) == null || u.call(i), a();
1624
- }, w.onerror = (u) => {
1685
+ URL.revokeObjectURL(a), this.currentAudio = null, (u = t == null ? void 0 : t.onEnd) == null || u.call(t), l();
1686
+ }, c.onerror = (u) => {
1625
1687
  var m;
1626
- URL.revokeObjectURL(l), this.currentAudio = null;
1688
+ URL.revokeObjectURL(a), this.currentAudio = null;
1627
1689
  const h = new Error(`Audio playback failed: ${u}`);
1628
- (m = i == null ? void 0 : i.onError) == null || m.call(i, h), d(h);
1629
- }, w.play().catch((u) => {
1690
+ (m = t == null ? void 0 : t.onError) == null || m.call(t, h), d(h);
1691
+ }, c.play().catch((u) => {
1630
1692
  var m;
1631
- URL.revokeObjectURL(l), this.currentAudio = null;
1693
+ URL.revokeObjectURL(a), this.currentAudio = null;
1632
1694
  const h = new Error(`Failed to play audio: ${u.message}`);
1633
- (m = i == null ? void 0 : i.onError) == null || m.call(i, h), d(h);
1695
+ (m = t == null ? void 0 : t.onError) == null || m.call(t, h), d(h);
1634
1696
  });
1635
1697
  });
1636
1698
  } catch (o) {
1637
- const l = o instanceof Error ? o : new Error(`TTS Error: ${String(o)}`);
1638
- throw (n = i == null ? void 0 : i.onError) == null || n.call(i, l), l;
1699
+ const a = o instanceof Error ? o : new Error(`TTS Error: ${String(o)}`);
1700
+ throw (n = t == null ? void 0 : t.onError) == null || n.call(t, a), a;
1639
1701
  }
1640
1702
  }
1641
1703
  /**
@@ -1651,84 +1713,166 @@ class pt {
1651
1713
  return this.currentAudio !== null && !this.currentAudio.paused;
1652
1714
  }
1653
1715
  }
1654
- const we = new pt(), bt = (t = {}) => {
1655
- const [r, i] = k(!1), [s, n] = k(!1), [o, l] = k(null);
1656
- t.config && we.updateConfig(t.config);
1657
- const a = N(
1658
- async (w, u = {}) => {
1716
+ const we = new St(), It = (i = {}) => {
1717
+ const [r, t] = k(!1), [s, n] = k(!1), [o, a] = k(null);
1718
+ i.config && we.updateConfig(i.config);
1719
+ const l = N(
1720
+ async (c, u = {}) => {
1659
1721
  var h;
1660
1722
  try {
1661
- l(null), n(!0);
1723
+ a(null), n(!0);
1662
1724
  const m = {
1663
- text: w,
1725
+ text: c,
1664
1726
  ...u
1665
1727
  };
1666
1728
  await we.speak(m, {
1667
1729
  onStart: () => {
1668
- var c;
1669
- n(!1), i(!0), (c = t.onStart) == null || c.call(t);
1730
+ var w;
1731
+ n(!1), t(!0), (w = i.onStart) == null || w.call(i);
1670
1732
  },
1671
1733
  onEnd: () => {
1672
- var c;
1673
- i(!1), (c = t.onEnd) == null || c.call(t);
1734
+ var w;
1735
+ t(!1), (w = i.onEnd) == null || w.call(i);
1674
1736
  },
1675
- onError: (c) => {
1676
- var g;
1677
- i(!1), n(!1), l(c), (g = t.onError) == null || g.call(t, c);
1737
+ onError: (w) => {
1738
+ var f;
1739
+ t(!1), n(!1), a(w), (f = i.onError) == null || f.call(i, w);
1678
1740
  }
1679
1741
  });
1680
1742
  } catch (m) {
1681
- const c = m instanceof Error ? m : new Error(String(m));
1682
- throw l(c), i(!1), n(!1), (h = t.onError) == null || h.call(t, c), c;
1743
+ const w = m instanceof Error ? m : new Error(String(m));
1744
+ throw a(w), t(!1), n(!1), (h = i.onError) == null || h.call(i, w), w;
1683
1745
  }
1684
1746
  },
1685
- [t]
1747
+ [i]
1686
1748
  ), d = N(() => {
1687
- we.stop(), i(!1), n(!1);
1749
+ we.stop(), t(!1), n(!1);
1688
1750
  }, []);
1689
1751
  return {
1690
- speak: a,
1752
+ speak: l,
1691
1753
  stop: d,
1692
1754
  isPlaying: r,
1693
1755
  isLoading: s,
1694
1756
  error: o
1695
1757
  };
1696
- }, vt = ({
1697
- onViolation: t,
1758
+ }, Rt = ({
1759
+ onViolation: i,
1698
1760
  onEnd: r,
1699
- maxViolations: i = 5
1761
+ maxViolations: t = 5
1700
1762
  }) => {
1701
- const { addViolation: s } = We(), n = Ue(), o = ze(), l = E(o);
1763
+ const { addViolation: s } = tt(), n = Ze(), o = et(), a = T(o);
1702
1764
  C(() => {
1703
- l.current = o;
1765
+ a.current = o;
1704
1766
  }, [o]);
1705
- const a = N(
1706
- (w) => {
1707
- r && r(w, l.current);
1767
+ const l = N(
1768
+ (c) => {
1769
+ r && r(c, a.current);
1708
1770
  },
1709
1771
  [r]
1710
1772
  );
1711
1773
  return {
1712
1774
  logViolation: N(
1713
- ({ type: w, severity: u, details: h }) => {
1775
+ ({ type: c, severity: u, details: h }) => {
1714
1776
  const m = {
1715
- id: Xe(),
1716
- type: w,
1777
+ id: lt(),
1778
+ type: c,
1717
1779
  severity: u,
1718
1780
  details: h,
1719
1781
  timestamp: Date.now()
1720
1782
  };
1721
1783
  s(m);
1722
- const c = l.current + 1;
1723
- t && t(m, c), c >= i && a("excessive_violations");
1784
+ const w = a.current + 1;
1785
+ i && i(m, w), w >= t && l("excessive_violations");
1724
1786
  },
1725
- [s, t, i, a]
1787
+ [s, i, t, l]
1726
1788
  ),
1727
- onInterviewEnd: a,
1789
+ onInterviewEnd: l,
1728
1790
  violationCount: o,
1729
1791
  logList: n
1730
1792
  };
1731
- }, me = (t) => /* @__PURE__ */ e.jsxs(
1793
+ }, At = () => {
1794
+ C(() => {
1795
+ function i() {
1796
+ console.clear(), console.log(
1797
+ `
1798
+ %c
1799
+ ╔═══════════════════════════════════════════════════════════════════════╗
1800
+ ║ ║
1801
+ ║ 🤖✨ AI INTERVIEW PLATFORM ✨🤖 ║
1802
+ ║ ║
1803
+ ╚═══════════════════════════════════════════════════════════════════════╝
1804
+
1805
+ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡
1806
+ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1807
+ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
1808
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1809
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1810
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1811
+ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
1812
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1813
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1814
+ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
1815
+
1816
+ `,
1817
+ "color: #ff6b35; font-size: 14px; font-family: monospace; line-height: 0.8; text-shadow: 0 0 10px #ff6b35;"
1818
+ ), console.log(
1819
+ "%c🚨 SECURITY BREACH DETECTED 🚨",
1820
+ `color: #ff3366;
1821
+ font-size: 28px;
1822
+ font-weight: bold;
1823
+ text-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366;
1824
+ background: linear-gradient(45deg, #ff3366, #ff6b35);
1825
+ -webkit-background-clip: text;
1826
+ -webkit-text-fill-color: transparent;
1827
+ padding: 20px;`
1828
+ ), console.log(
1829
+ `
1830
+ %c
1831
+ ◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
1832
+ ◇ ◇
1833
+ ◆ 🔒 INTERVIEW INTEGRITY SYSTEM ACTIVATED 🔒 ◆
1834
+ ◇ ◇
1835
+ ◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
1836
+
1837
+ `,
1838
+ "color: #4ecdc4; font-size: 16px; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"
1839
+ ), console.log(
1840
+ `
1841
+ %c┌───────────────────────────────────────────────────────────┐
1842
+ │ │
1843
+ │ 🛡️ UNAUTHORIZED DEVELOPER TOOLS ACCESS DETECTED 🛡️ │
1844
+ │ │
1845
+ │ ⚠️ Your actions are being monitored and recorded │
1846
+ │ 📊 This violation has been logged with timestamp │
1847
+ │ 🚨 Interview administrators have been notified │
1848
+ │ ⏱️ Session integrity: COMPROMISED │
1849
+ │ │
1850
+ │ 💡 IMMEDIATE ACTION REQUIRED: │
1851
+ │ Close developer tools to continue interview │
1852
+ └─────────────────────────────────────────────────────────────┘`,
1853
+ "color: #ffd93d; font-size: 14px; font-family: monospace; background: rgba(255, 217, 61, 0.1); padding: 10px;"
1854
+ );
1855
+ }
1856
+ const r = { open: !1, orientation: null }, t = 160, s = setInterval(() => {
1857
+ window.outerHeight - window.innerHeight > t || window.outerWidth - window.innerWidth > t ? r.open || (r.open = !0, r.orientation = window.outerWidth - window.innerWidth > t ? "vertical" : "horizontal", i()) : r.open && (r.open = !1, console.log(
1858
+ "%c🌟 Developer tools closed. Interview continues smoothly! ✨",
1859
+ "color: #4ecdc4; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"
1860
+ ));
1861
+ }, 500), n = (a) => {
1862
+ if (a.keyCode === 123 || a.ctrlKey && a.shiftKey && (a.keyCode === 73 || a.keyCode === 74) || a.ctrlKey && a.keyCode === 85)
1863
+ return a.preventDefault(), console.log(
1864
+ "%c🎭 Nice try! Keyboard shortcuts are disabled during interviews ✨",
1865
+ "color: #ffd93d; font-weight: bold; text-shadow: 0 0 10px #ffd93d;"
1866
+ ), !1;
1867
+ }, o = (a) => (a.preventDefault(), console.log(
1868
+ "%c🌈 Right-click menu disabled for interview integrity! 🎪",
1869
+ "color: #ff9ff3; font-weight: bold; text-shadow: 0 0 10px #ff9ff3;"
1870
+ ), !1);
1871
+ return document.addEventListener("keydown", n), document.addEventListener("contextmenu", o), () => {
1872
+ clearInterval(s), document.removeEventListener("keydown", n), document.removeEventListener("contextmenu", o), delete window.showStats, delete window.interviewTips;
1873
+ };
1874
+ }, []);
1875
+ }, pe = (i) => /* @__PURE__ */ e.jsxs(
1732
1876
  "svg",
1733
1877
  {
1734
1878
  xmlns: "http://www.w3.org/2000/svg",
@@ -1740,7 +1884,7 @@ const we = new pt(), bt = (t = {}) => {
1740
1884
  strokeWidth: "2",
1741
1885
  strokeLinecap: "round",
1742
1886
  strokeLinejoin: "round",
1743
- ...t,
1887
+ ...i,
1744
1888
  children: [
1745
1889
  /* @__PURE__ */ e.jsx("path", { d: "M12 2a10 10 0 0 1 7.38 16.75" }),
1746
1890
  /* @__PURE__ */ e.jsx("path", { d: "M12 6v6l4 2" }),
@@ -1750,36 +1894,36 @@ const we = new pt(), bt = (t = {}) => {
1750
1894
  /* @__PURE__ */ e.jsx("path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38" })
1751
1895
  ]
1752
1896
  }
1753
- ), yt = (t, r, i) => Math.max(r, Math.min(i, t)), be = (t) => {
1754
- const r = Math.max(0, Math.floor(t)), i = Math.floor(r / 60).toString().padStart(2, "0"), s = (r % 60).toString().padStart(2, "0");
1755
- return `${i}:${s}`;
1756
- }, xe = ({
1757
- total: t,
1897
+ ), Mt = (i, r, t) => Math.max(r, Math.min(t, i)), je = (i) => {
1898
+ const r = Math.max(0, Math.floor(i)), t = Math.floor(r / 60).toString().padStart(2, "0"), s = (r % 60).toString().padStart(2, "0");
1899
+ return `${t}:${s}`;
1900
+ }, be = ({
1901
+ total: i,
1758
1902
  remaining: r,
1759
- size: i = 64,
1903
+ size: t = 64,
1760
1904
  strokeWidth: s = 6,
1761
1905
  className: n = "",
1762
1906
  showLabel: o = !0
1763
1907
  }) => {
1764
- const l = Math.max(1, t || 1), a = yt(r / l, 0, 1), { radius: d, circumference: w, dashOffset: u, center: h } = X(() => {
1765
- const g = (i - s) / 2, y = 2 * Math.PI * g, j = y * (1 - a), f = Math.round(s) % 2 === 1, T = i / 2 + (f ? 0.5 : 0);
1766
- return { radius: g, circumference: y, dashOffset: j, center: T };
1767
- }, [i, s, a]), m = X(() => a <= 0.25 ? "iw-stroke-red-500" : a <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [a]), c = a <= 0.25 ? "iw-animate-pulse" : "";
1908
+ const a = Math.max(1, i || 1), l = Mt(r / a, 0, 1), { radius: d, circumference: c, dashOffset: u, center: h } = X(() => {
1909
+ const f = (t - s) / 2, v = 2 * Math.PI * f, j = v * (1 - l), x = Math.round(s) % 2 === 1, E = t / 2 + (x ? 0.5 : 0);
1910
+ return { radius: f, circumference: v, dashOffset: j, center: E };
1911
+ }, [t, s, l]), m = X(() => l <= 0.25 ? "iw-stroke-red-500" : l <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [l]), w = l <= 0.25 ? "iw-animate-pulse" : "";
1768
1912
  return /* @__PURE__ */ e.jsxs(
1769
1913
  "div",
1770
1914
  {
1771
1915
  className: `iw-relative iw-inline-flex iw-items-center iw-justify-center iw-rounded-full iw-bg-white ${n}`,
1772
- style: { width: i, height: i },
1773
- "aria-label": `Time remaining ${be(r)}`,
1916
+ style: { width: t, height: t },
1917
+ "aria-label": `Time remaining ${je(r)}`,
1774
1918
  role: "timer",
1775
1919
  "aria-live": "polite",
1776
1920
  children: [
1777
1921
  /* @__PURE__ */ e.jsx(
1778
1922
  "svg",
1779
1923
  {
1780
- width: i,
1781
- height: i,
1782
- viewBox: `0 0 ${i} ${i}`,
1924
+ width: t,
1925
+ height: t,
1926
+ viewBox: `0 0 ${t} ${t}`,
1783
1927
  preserveAspectRatio: "xMidYMid meet",
1784
1928
  children: /* @__PURE__ */ e.jsxs("g", { transform: `rotate(-90 ${h} ${h})`, children: [
1785
1929
  /* @__PURE__ */ e.jsx(
@@ -1801,11 +1945,11 @@ const we = new pt(), bt = (t = {}) => {
1801
1945
  cx: h,
1802
1946
  cy: h,
1803
1947
  r: d,
1804
- className: `${m} ${c}`,
1948
+ className: `${m} ${w}`,
1805
1949
  strokeWidth: s,
1806
1950
  strokeLinecap: "round",
1807
1951
  fill: "none",
1808
- strokeDasharray: w,
1952
+ strokeDasharray: c,
1809
1953
  strokeDashoffset: u,
1810
1954
  shapeRendering: "geometricPrecision",
1811
1955
  vectorEffect: "non-scaling-stroke",
@@ -1820,40 +1964,40 @@ const we = new pt(), bt = (t = {}) => {
1820
1964
  o && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0", children: /* @__PURE__ */ e.jsx(
1821
1965
  "span",
1822
1966
  {
1823
- className: `iw-text-[11px] iw-font-semibold iw-tabular-nums ${a <= 0.25 ? "iw-text-red-600" : a <= 0.5 ? "iw-text-yellow-600" : "iw-text-green-600"}`,
1824
- children: be(r)
1967
+ className: `iw-text-[11px] iw-font-semibold iw-tabular-nums ${l <= 0.25 ? "iw-text-red-600" : l <= 0.5 ? "iw-text-yellow-600" : "iw-text-green-600"}`,
1968
+ children: je(r)
1825
1969
  }
1826
1970
  ) })
1827
1971
  ]
1828
1972
  }
1829
1973
  );
1830
- }, jt = ({
1831
- label: t,
1974
+ }, Dt = ({
1975
+ label: i,
1832
1976
  error: r,
1833
- fullWidth: i = !1,
1977
+ fullWidth: t = !1,
1834
1978
  className: s = "",
1835
1979
  id: n,
1836
1980
  ...o
1837
1981
  }) => {
1838
- const l = n || `textarea-${Math.random().toString(36).substring(2, 9)}`, a = "iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all", d = r ? "iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500" : "", w = i ? "iw-w-full" : "", u = s.includes("iw-h-full") || i ? "iw-h-full" : "";
1982
+ const a = n || `textarea-${Math.random().toString(36).substring(2, 9)}`, l = "iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all", d = r ? "iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500" : "", c = t ? "iw-w-full" : "", u = s.includes("iw-h-full") || t ? "iw-h-full" : "";
1839
1983
  return /* @__PURE__ */ e.jsxs(
1840
1984
  "div",
1841
1985
  {
1842
- className: `iw-h-full iw-flex iw-flex-col ${i ? "iw-w-full" : ""}`,
1986
+ className: `iw-h-full iw-flex iw-flex-col ${t ? "iw-w-full" : ""}`,
1843
1987
  children: [
1844
- t && /* @__PURE__ */ e.jsx(
1988
+ i && /* @__PURE__ */ e.jsx(
1845
1989
  "label",
1846
1990
  {
1847
- htmlFor: l,
1991
+ htmlFor: a,
1848
1992
  className: "iw-block iw-text-sm iw-font-medium iw-text-gray-700 iw-mb-1",
1849
- children: t
1993
+ children: i
1850
1994
  }
1851
1995
  ),
1852
1996
  /* @__PURE__ */ e.jsx(
1853
1997
  "textarea",
1854
1998
  {
1855
- id: l,
1856
- className: `${a} ${d} ${w} ${u} ${s}`,
1999
+ id: a,
2000
+ className: `${l} ${d} ${c} ${u} ${s}`,
1857
2001
  "aria-invalid": r ? "true" : "false",
1858
2002
  ...o
1859
2003
  }
@@ -1862,27 +2006,27 @@ const we = new pt(), bt = (t = {}) => {
1862
2006
  ]
1863
2007
  }
1864
2008
  );
1865
- }, Nt = ({
1866
- value: t,
2009
+ }, _t = ({
2010
+ value: i,
1867
2011
  onChange: r,
1868
- onSubmit: i,
2012
+ onSubmit: t,
1869
2013
  isSubmitDisabled: s,
1870
2014
  state: n,
1871
2015
  editingTime: o
1872
2016
  }) => {
1873
- const l = (a) => {
1874
- a.key === "Enter" && (a.ctrlKey || a.metaKey) && !s && (a.preventDefault(), i());
2017
+ const a = (l) => {
2018
+ l.key === "Enter" && (l.ctrlKey || l.metaKey) && !s && (l.preventDefault(), t());
1875
2019
  };
1876
2020
  return /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-h-full ", children: [
1877
2021
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-between", children: [
1878
2022
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Your Answer" }),
1879
2023
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-2", children: [
1880
2024
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-1", children: [
1881
- /* @__PURE__ */ e.jsx(me, { className: "iw-size-4 iw-text-orange-600" }),
2025
+ /* @__PURE__ */ e.jsx(pe, { className: "iw-size-4 iw-text-orange-600" }),
1882
2026
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to edit: " })
1883
2027
  ] }),
1884
2028
  /* @__PURE__ */ e.jsx(
1885
- xe,
2029
+ be,
1886
2030
  {
1887
2031
  total: o,
1888
2032
  remaining: n.currentPhaseTimeRemaining,
@@ -1894,26 +2038,26 @@ const we = new pt(), bt = (t = {}) => {
1894
2038
  ] }),
1895
2039
  /* @__PURE__ */ e.jsxs("div", { className: " iw-overflow-hidden iw-flex iw-flex-col iw-h-full iw-mt-2", children: [
1896
2040
  /* @__PURE__ */ e.jsx(
1897
- jt,
2041
+ Dt,
1898
2042
  {
1899
- value: t,
2043
+ value: i,
1900
2044
  onChange: r,
1901
- onKeyDown: l,
2045
+ onKeyDown: a,
1902
2046
  placeholder: "Type your answer here...",
1903
2047
  className: " iw-w-full iw-h-full iw-flex-1 iw-resize-none !iw-p-4 iw-bg-transparent iw-min-h-full focus-visible:iw-outline-0",
1904
- onPaste: (a) => a.preventDefault(),
1905
- onCopy: (a) => a.preventDefault(),
1906
- onCut: (a) => a.preventDefault(),
1907
- onDrop: (a) => a.preventDefault(),
1908
- onDragOver: (a) => a.preventDefault()
2048
+ onPaste: (l) => l.preventDefault(),
2049
+ onCopy: (l) => l.preventDefault(),
2050
+ onCut: (l) => l.preventDefault(),
2051
+ onDrop: (l) => l.preventDefault(),
2052
+ onDragOver: (l) => l.preventDefault()
1909
2053
  }
1910
2054
  ),
1911
- /* @__PURE__ */ e.jsx("div", { className: "iw-w-full iw-grid iw-grid-cols-1 iw-mt-4", children: /* @__PURE__ */ e.jsx(W, { onClick: i, disabled: s, children: "Submit Answer" }) })
2055
+ /* @__PURE__ */ e.jsx("div", { className: "iw-w-full iw-grid iw-grid-cols-1 iw-mt-4", children: /* @__PURE__ */ e.jsx(V, { onClick: t, disabled: s, children: "Submit Answer" }) })
1912
2056
  ] })
1913
2057
  ] });
1914
- }, kt = ({ className: t = "" }) => {
2058
+ }, Pt = ({ className: i = "" }) => {
1915
2059
  var n;
1916
- const { authToken: r } = Ce(), i = r ? Ze(r) : null, s = E(null);
2060
+ const { authToken: r } = Me(), t = r ? ct(r) : null, s = T(null);
1917
2061
  return C(() => {
1918
2062
  let o = null;
1919
2063
  return (async () => {
@@ -1922,13 +2066,13 @@ const we = new pt(), bt = (t = {}) => {
1922
2066
  video: !0,
1923
2067
  audio: !1
1924
2068
  }), s.current && (s.current.srcObject = o);
1925
- } catch (a) {
1926
- console.error("Error accessing camera:", a);
2069
+ } catch (l) {
2070
+ console.error("Error accessing camera:", l);
1927
2071
  }
1928
2072
  })(), () => {
1929
- o && o.getTracks().forEach((a) => a.stop());
2073
+ o && o.getTracks().forEach((l) => l.stop());
1930
2074
  };
1931
- }, []), /* @__PURE__ */ e.jsxs("div", { className: `iw-relative ${t}`, children: [
2075
+ }, []), /* @__PURE__ */ e.jsxs("div", { className: `iw-relative ${i}`, children: [
1932
2076
  /* @__PURE__ */ e.jsx(
1933
2077
  "video",
1934
2078
  {
@@ -1946,18 +2090,18 @@ const we = new pt(), bt = (t = {}) => {
1946
2090
  /* @__PURE__ */ e.jsx("div", { className: "iw-size-2 iw-animate-pulse iw-rounded-full iw-bg-red-500" }),
1947
2091
  /* @__PURE__ */ e.jsx("span", { className: "iw-font-medium iw-text-white", children: "Recording" })
1948
2092
  ] }),
1949
- ((n = i == null ? void 0 : i.data) == null ? void 0 : n.user_name) && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-black/40 iw-px-4 iw-py-2 iw-backdrop-blur-md", children: /* @__PURE__ */ e.jsx("span", { className: "iw-font-medium iw-text-white", children: i.data.user_name }) })
2093
+ ((n = t == null ? void 0 : t.data) == null ? void 0 : n.user_name) && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-black/40 iw-px-4 iw-py-2 iw-backdrop-blur-md", children: /* @__PURE__ */ e.jsx("span", { className: "iw-font-medium iw-text-white", children: t.data.user_name }) })
1950
2094
  ] });
1951
- }, Tt = ({
1952
- question: t,
2095
+ }, Ft = ({
2096
+ question: i,
1953
2097
  isLoading: r = !1
1954
2098
  }) => {
1955
- const { baseColor: i } = Z();
2099
+ const { baseColor: t } = Z();
1956
2100
  return /* @__PURE__ */ e.jsx(
1957
2101
  "div",
1958
2102
  {
1959
2103
  className: "iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-p-6 ",
1960
- style: Je(i, 0.85),
2104
+ style: at(t, 0.85),
1961
2105
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-8", children: [
1962
2106
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-flex-col iw-items-center iw-relative iw-h-32 iw-w-32 iw-shrink-0 iw-shadow iw-rounded-lg iw-bg-white", children: /* @__PURE__ */ e.jsx("div", { className: "iw-mt-2", children: /* @__PURE__ */ e.jsx(
1963
2107
  "img",
@@ -1970,55 +2114,55 @@ const we = new pt(), bt = (t = {}) => {
1970
2114
  r ? /* @__PURE__ */ e.jsxs("div", { className: "iw-animate-pulse iw-w-full iw-space-y-3 iw-mr-10", children: [
1971
2115
  /* @__PURE__ */ e.jsx("div", { className: "iw-h-5 iw-bg-gray-200 iw-rounded iw-w-full" }),
1972
2116
  /* @__PURE__ */ e.jsx("div", { className: "iw-h-5 iw-bg-gray-200 iw-rounded iw-w-3/4" })
1973
- ] }) : /* @__PURE__ */ e.jsx("p", { className: "iw-text-lg iw-leading-8", children: t == null ? void 0 : t.question })
2117
+ ] }) : /* @__PURE__ */ e.jsx("p", { className: "iw-text-lg iw-leading-8", children: i == null ? void 0 : i.question })
1974
2118
  ] })
1975
2119
  }
1976
2120
  );
1977
- }, ve = ({
1978
- currentQuestion: t,
2121
+ }, Ne = ({
2122
+ currentQuestion: i,
1979
2123
  phase: r,
1980
- className: i = "",
2124
+ className: t = "",
1981
2125
  children: s
1982
2126
  }) => /* @__PURE__ */ e.jsxs(
1983
2127
  "div",
1984
2128
  {
1985
- className: `iw-p-4 iw-space-y-4 iw-pb-6 ${i} iw-min-h-[calc(100vh_-_3.8rem)] iw-flex iw-flex-col iw-justify-between`,
2129
+ className: `iw-p-4 iw-space-y-4 iw-pb-6 ${t} iw-min-h-[calc(100vh_-_3.8rem)] iw-flex iw-flex-col iw-justify-between`,
1986
2130
  children: [
1987
2131
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-items-start iw-justify-between iw-gap-3", children: /* @__PURE__ */ e.jsx("div", { className: "iw-flex-1", children: /* @__PURE__ */ e.jsx(
1988
- Tt,
2132
+ Ft,
1989
2133
  {
1990
- question: t,
1991
- isLoading: r === D.FETCHING_QUESTION || r === D.IDLE
2134
+ question: i,
2135
+ isLoading: r === _.FETCHING_QUESTION || r === _.IDLE
1992
2136
  }
1993
2137
  ) }) }),
1994
2138
  /* @__PURE__ */ e.jsxs("div", { className: "iw iw-bg-[#F6F6F6] iw-grid iw-grid-cols-2 iw-rounded-[14px] iw-p-6", children: [
1995
- /* @__PURE__ */ e.jsx("div", { className: "iw-min-h-[400px] iw-max-h-[600px]", children: /* @__PURE__ */ e.jsx(kt, {}) }),
2139
+ /* @__PURE__ */ e.jsx("div", { className: "iw-min-h-[400px] iw-max-h-[600px]", children: /* @__PURE__ */ e.jsx(Pt, {}) }),
1996
2140
  /* @__PURE__ */ e.jsx("div", { className: "iw-bg-white iw-rounded-r-xl iw-shadow iw-p-6", children: s })
1997
2141
  ] })
1998
2142
  ]
1999
2143
  }
2000
- ), _e = ({
2001
- isOpen: t,
2144
+ ), Oe = ({
2145
+ isOpen: i,
2002
2146
  onClose: r,
2003
- children: i,
2147
+ children: t,
2004
2148
  title: s,
2005
2149
  showCloseButton: n = !0,
2006
2150
  closeOnOverlayClick: o = !0,
2007
- closeOnEscape: l = !0,
2008
- className: a = ""
2151
+ closeOnEscape: a = !0,
2152
+ className: l = ""
2009
2153
  }) => {
2010
2154
  if (C(() => {
2011
- if (!t || !l) return;
2155
+ if (!i || !a) return;
2012
2156
  const u = (h) => {
2013
2157
  h.key === "Escape" && r();
2014
2158
  };
2015
2159
  return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
2016
- }, [t, l, r]), C(() => (t ? (document.body.style.overflow = "hidden", document.body.classList.add("interview-widget-container")) : (document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container")), () => {
2160
+ }, [i, a, r]), C(() => (i ? (document.body.style.overflow = "hidden", document.body.classList.add("interview-widget-container")) : (document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container")), () => {
2017
2161
  document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container");
2018
- }), [t]), !t) return null;
2162
+ }), [i]), !i) return null;
2019
2163
  const d = (u) => {
2020
2164
  o && u.target === u.currentTarget && r();
2021
- }, w = /* @__PURE__ */ e.jsxs("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center", children: [
2165
+ }, c = /* @__PURE__ */ e.jsxs("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center", children: [
2022
2166
  /* @__PURE__ */ e.jsx(
2023
2167
  "div",
2024
2168
  {
@@ -2029,7 +2173,7 @@ const we = new pt(), bt = (t = {}) => {
2029
2173
  /* @__PURE__ */ e.jsxs(
2030
2174
  "div",
2031
2175
  {
2032
- className: `iw-relative iw-bg-white iw-rounded-lg iw-shadow-xl iw-max-w-md iw-w-full iw-mx-4 iw-max-h-[90vh] iw-overflow-hidden ${a}`,
2176
+ className: `iw-relative iw-bg-white iw-rounded-lg iw-shadow-xl iw-max-w-md iw-w-full iw-mx-4 iw-max-h-[90vh] iw-overflow-hidden ${l}`,
2033
2177
  role: "dialog",
2034
2178
  "aria-modal": "true",
2035
2179
  "aria-labelledby": s ? "dialog-title" : void 0,
@@ -2070,21 +2214,21 @@ const we = new pt(), bt = (t = {}) => {
2070
2214
  }
2071
2215
  )
2072
2216
  ] }),
2073
- /* @__PURE__ */ e.jsx("div", { className: "iw-p-4 iw-overflow-y-auto", children: i })
2217
+ /* @__PURE__ */ e.jsx("div", { className: "iw-p-4 iw-overflow-y-auto", children: t })
2074
2218
  ]
2075
2219
  }
2076
2220
  )
2077
2221
  ] });
2078
- return $e(w, document.body);
2079
- }, Et = ({
2080
- confirmExitInterview: t,
2222
+ return Be(c, document.body);
2223
+ }, Lt = ({
2224
+ confirmExitInterview: i,
2081
2225
  isOpen: r,
2082
- onClose: i
2226
+ onClose: t
2083
2227
  }) => /* @__PURE__ */ e.jsx(
2084
- _e,
2228
+ Oe,
2085
2229
  {
2086
2230
  isOpen: r,
2087
- onClose: i,
2231
+ onClose: t,
2088
2232
  title: "Exit Interview",
2089
2233
  closeOnOverlayClick: !1,
2090
2234
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-space-y-5", children: [
@@ -2100,23 +2244,27 @@ const we = new pt(), bt = (t = {}) => {
2100
2244
  "button",
2101
2245
  {
2102
2246
  className: "iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-border iw-border-slate-200 iw-bg-white iw-px-4 iw-py-2 iw-text-sm iw-font-medium iw-text-slate-600 iw-shadow-sm iw-transition hover:iw-bg-slate-50",
2103
- onClick: i,
2247
+ onClick: t,
2104
2248
  children: "Stay in interview"
2105
2249
  }
2106
2250
  ),
2107
2251
  /* @__PURE__ */ e.jsx(
2108
2252
  "button",
2109
2253
  {
2110
- className: "iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-bg-gradient-to-r iw-from-red-500/80 iw-to-red-600/80 iw-px-4 iw-py-2 iw-text-sm iw-font-semibold iw-text-white iw-shadow-[0_12px_30px_-16px_rgba(244,63,94,0.65)] iw-transition hover:iw-brightness-110",
2111
- onClick: t,
2254
+ className: "iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-px-4 iw-py-2 iw-text-sm iw-font-semibold iw-text-white iw-transition hover:iw-brightness-110",
2255
+ style: {
2256
+ background: "linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))",
2257
+ boxShadow: "0 12px 30px -16px rgba(244, 63, 94, 0.65)"
2258
+ },
2259
+ onClick: i,
2112
2260
  children: "Confirm exit"
2113
2261
  }
2114
2262
  )
2115
2263
  ] })
2116
2264
  ] })
2117
2265
  }
2118
- ), ye = ({ title: t, onExit: r }) => {
2119
- const { baseColor: i } = Z(), [s, n] = k(!1);
2266
+ ), ke = ({ title: i, onExit: r }) => {
2267
+ const { baseColor: t } = Z(), [s, n] = k(!1);
2120
2268
  return /* @__PURE__ */ e.jsxs("header", { className: "iw-w-full iw-text-gray-900", children: [
2121
2269
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mx-auto iw-flex iw-items-center iw-justify-between iw-px-4 iw-pb-4 iw-pt-2", children: [
2122
2270
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-space-x-2", children: [
@@ -2124,17 +2272,20 @@ const we = new pt(), bt = (t = {}) => {
2124
2272
  "div",
2125
2273
  {
2126
2274
  className: "iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",
2127
- style: { backgroundColor: i },
2275
+ style: { backgroundColor: t },
2128
2276
  children: "N"
2129
2277
  }
2130
2278
  ),
2131
2279
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-font-medium", children: "Novara" })
2132
2280
  ] }),
2133
- /* @__PURE__ */ e.jsx("h1", { className: "iw-text-base iw-font-bold", children: t }),
2281
+ /* @__PURE__ */ e.jsx("h1", { className: "iw-text-base iw-font-bold", children: i }),
2134
2282
  /* @__PURE__ */ e.jsx(
2135
2283
  "button",
2136
2284
  {
2137
- className: "iw-text-sm iw-text-white iw-bg-gradient-to-r iw-from-red-500/80 iw-to-red-600/80 iw-px-4 iw-py-2 iw-rounded-md",
2285
+ className: "iw-text-sm iw-text-white iw-px-4 iw-py-2 iw-rounded-md",
2286
+ style: {
2287
+ background: "linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))"
2288
+ },
2138
2289
  onClick: () => n(!0),
2139
2290
  children: "Exit Interview"
2140
2291
  }
@@ -2142,7 +2293,7 @@ const we = new pt(), bt = (t = {}) => {
2142
2293
  ] }),
2143
2294
  /* @__PURE__ */ e.jsx("div", { className: "iw-h-px iw-bg-gray-200" }),
2144
2295
  /* @__PURE__ */ e.jsx(
2145
- Et,
2296
+ Lt,
2146
2297
  {
2147
2298
  isOpen: s,
2148
2299
  confirmExitInterview: () => {
@@ -2152,111 +2303,111 @@ const we = new pt(), bt = (t = {}) => {
2152
2303
  }
2153
2304
  )
2154
2305
  ] });
2155
- }, St = ({
2156
- className: t = "",
2306
+ }, $t = ({
2307
+ className: i = "",
2157
2308
  width: r,
2158
- height: i = 56,
2309
+ height: t = 56,
2159
2310
  barWidth: s = 3,
2160
2311
  gap: n = 2,
2161
2312
  fftSize: o = 1024,
2162
- smoothingTimeConstant: l = 0.8,
2163
- mediaStream: a,
2313
+ smoothingTimeConstant: a = 0.8,
2314
+ mediaStream: l,
2164
2315
  startOnMount: d = !0
2165
2316
  }) => {
2166
- const { baseColor: w } = Z(), u = E(null), h = E(null), m = E(null), c = E(null), g = E(null), y = E(null), j = E(!1), [f, T] = k(null);
2317
+ const { baseColor: c } = Z(), u = T(null), h = T(null), m = T(null), w = T(null), f = T(null), v = T(null), j = T(!1), [x, E] = k(null);
2167
2318
  C(() => {
2168
2319
  if (r || !h.current) return;
2169
- const v = h.current, _ = () => {
2170
- const P = u.current;
2171
- if (!P) return;
2172
- const M = v.clientWidth, x = i;
2173
- P.width = Math.max(1, Math.floor(M * window.devicePixelRatio || 1)), P.height = Math.max(1, Math.floor(x * window.devicePixelRatio || 1));
2174
- }, b = new ResizeObserver(_);
2175
- return b.observe(v), _(), () => b.disconnect();
2176
- }, [r, i]), C(() => {
2320
+ const y = h.current, P = () => {
2321
+ const D = u.current;
2322
+ if (!D) return;
2323
+ const A = y.clientWidth, g = t;
2324
+ D.width = Math.max(1, Math.floor(A * window.devicePixelRatio || 1)), D.height = Math.max(1, Math.floor(g * window.devicePixelRatio || 1));
2325
+ }, b = new ResizeObserver(P);
2326
+ return b.observe(y), P(), () => b.disconnect();
2327
+ }, [r, t]), C(() => {
2177
2328
  if (!r) return;
2178
- const v = u.current;
2179
- v && (v.width = Math.max(
2329
+ const y = u.current;
2330
+ y && (y.width = Math.max(
2180
2331
  1,
2181
2332
  Math.floor(r * (window.devicePixelRatio || 1))
2182
- ), v.height = Math.max(
2333
+ ), y.height = Math.max(
2183
2334
  1,
2184
- Math.floor(i * (window.devicePixelRatio || 1))
2335
+ Math.floor(t * (window.devicePixelRatio || 1))
2185
2336
  ));
2186
- }, [r, i]), C(() => {
2187
- let v = !1;
2337
+ }, [r, t]), C(() => {
2338
+ let y = !1;
2188
2339
  return (async () => {
2189
2340
  try {
2190
2341
  const b = new (window.AudioContext || window.webkitAudioContext)();
2191
2342
  m.current = b;
2192
- let P = a;
2193
- if (!P) {
2343
+ let D = l;
2344
+ if (!D) {
2194
2345
  if (!d) return;
2195
- P = await navigator.mediaDevices.getUserMedia({
2346
+ D = await navigator.mediaDevices.getUserMedia({
2196
2347
  audio: !0,
2197
2348
  video: !1
2198
2349
  }), j.current = !0;
2199
2350
  }
2200
- if (v) return;
2201
- const M = b.createAnalyser();
2202
- M.fftSize = o, M.smoothingTimeConstant = l, c.current = M;
2203
- const x = b.createMediaStreamSource(P);
2204
- g.current = x, x.connect(M), S();
2351
+ if (y) return;
2352
+ const A = b.createAnalyser();
2353
+ A.fftSize = o, A.smoothingTimeConstant = a, w.current = A;
2354
+ const g = b.createMediaStreamSource(D);
2355
+ f.current = g, g.connect(A), S();
2205
2356
  } catch (b) {
2206
- T((b == null ? void 0 : b.message) || "Failed to initialize microphone");
2357
+ E((b == null ? void 0 : b.message) || "Failed to initialize microphone");
2207
2358
  }
2208
2359
  })(), () => {
2209
- var b, P, M, x;
2210
- v = !0, y.current && cancelAnimationFrame(y.current);
2360
+ var b, D, A, g;
2361
+ y = !0, v.current && cancelAnimationFrame(v.current);
2211
2362
  try {
2212
- (b = g.current) == null || b.disconnect();
2363
+ (b = f.current) == null || b.disconnect();
2213
2364
  } catch {
2214
2365
  }
2215
2366
  try {
2216
- (P = c.current) == null || P.disconnect();
2367
+ (D = w.current) == null || D.disconnect();
2217
2368
  } catch {
2218
2369
  }
2219
- j.current && ((x = ((M = g.current) == null ? void 0 : M.mediaStream) || void 0) == null || x.getTracks().forEach((I) => I.stop())), m.current && m.current.state !== "closed" && m.current.close();
2370
+ j.current && ((g = ((A = f.current) == null ? void 0 : A.mediaStream) || void 0) == null || g.getTracks().forEach((I) => I.stop())), m.current && m.current.state !== "closed" && m.current.close();
2220
2371
  };
2221
- }, [a, o, l, d]);
2372
+ }, [l, o, a, d]);
2222
2373
  const S = () => {
2223
- const v = u.current, _ = c.current;
2224
- if (!v || !_) return;
2225
- const b = v.getContext("2d");
2374
+ const y = u.current, P = w.current;
2375
+ if (!y || !P) return;
2376
+ const b = y.getContext("2d");
2226
2377
  if (!b) return;
2227
- const P = window.devicePixelRatio || 1, M = v.width, x = v.height, I = _.frequencyBinCount, L = new Uint8Array(I), G = () => {
2228
- y.current = requestAnimationFrame(G), _.getByteTimeDomainData(L), b.clearRect(0, 0, M, x), b.fillStyle = "rgba(0,0,0,0)", b.fillRect(0, 0, M, x);
2229
- const B = Math.max(1, Math.floor(s * P)), V = Math.max(1, Math.floor(n * P)), H = B + V, q = Math.max(8, Math.floor((M + V) / H)), z = Math.floor(L.length / q);
2230
- for (let A = 0; A < q; A++) {
2231
- const Q = Math.min(L.length - 1, A * z), oe = L[Q] / 128 - 1, U = Math.abs(oe), le = Math.pow(U, 0.6), Y = Math.max(x * 0.06, le * (x * 0.9)), ce = A * H, de = (x - Y) / 2, J = 140 - Math.min(140, 140 * U), ee = 85, p = 48 + Math.floor(12 * (1 - U));
2232
- b.fillStyle = `${w}`, b.shadowColor = `hsla(${J}, ${ee}%, ${p}%, ${0.25 * U})`, b.shadowBlur = 8 * U;
2233
- const O = Math.min(B / 2, Y / 2);
2234
- Ct(b, ce, de, B, Y, O), b.fill();
2378
+ const D = window.devicePixelRatio || 1, A = y.width, g = y.height, I = P.frequencyBinCount, L = new Uint8Array(I), B = () => {
2379
+ v.current = requestAnimationFrame(B), P.getByteTimeDomainData(L), b.clearRect(0, 0, A, g), b.fillStyle = "rgba(0,0,0,0)", b.fillRect(0, 0, A, g);
2380
+ const q = Math.max(1, Math.floor(s * D)), z = Math.max(1, Math.floor(n * D)), H = q + z, O = Math.max(8, Math.floor((A + z) / H)), G = Math.floor(L.length / O);
2381
+ for (let M = 0; M < O; M++) {
2382
+ const Y = Math.min(L.length - 1, M * G), oe = L[Y] / 128 - 1, W = Math.abs(oe), le = Math.pow(W, 0.6), Q = Math.max(g * 0.06, le * (g * 0.9)), ce = M * H, de = (g - Q) / 2, K = 140 - Math.min(140, 140 * W), ee = 85, p = 48 + Math.floor(12 * (1 - W));
2383
+ b.fillStyle = `${c}`, b.shadowColor = `hsla(${K}, ${ee}%, ${p}%, ${0.25 * W})`, b.shadowBlur = 8 * W;
2384
+ const U = Math.min(q / 2, Q / 2);
2385
+ Ot(b, ce, de, q, Q, U), b.fill();
2235
2386
  }
2236
2387
  };
2237
- G();
2388
+ B();
2238
2389
  };
2239
2390
  return /* @__PURE__ */ e.jsxs(
2240
2391
  "div",
2241
2392
  {
2242
2393
  ref: h,
2243
- className: `iw-relative iw-w-full iw-overflow-hidden iw-rounded-md iw-bg-gray-50 ${t}`,
2244
- style: { height: i },
2394
+ className: `iw-relative iw-w-full iw-overflow-hidden iw-rounded-md iw-bg-gray-50 ${i}`,
2395
+ style: { height: t },
2245
2396
  children: [
2246
2397
  /* @__PURE__ */ e.jsx("canvas", { ref: u, className: "iw-w-full iw-h-full" }),
2247
- f && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center", children: /* @__PURE__ */ e.jsx("span", { className: "iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded", children: f }) })
2398
+ x && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center", children: /* @__PURE__ */ e.jsx("span", { className: "iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded", children: x }) })
2248
2399
  ]
2249
2400
  }
2250
2401
  );
2251
2402
  };
2252
- function Ct(t, r, i, s, n, o) {
2253
- const l = Math.min(o, s / 2, n / 2);
2254
- t.beginPath(), t.moveTo(r + l, i), t.lineTo(r + s - l, i), t.quadraticCurveTo(r + s, i, r + s, i + l), t.lineTo(r + s, i + n - l), t.quadraticCurveTo(r + s, i + n, r + s - l, i + n), t.lineTo(r + l, i + n), t.quadraticCurveTo(r, i + n, r, i + n - l), t.lineTo(r, i + l), t.quadraticCurveTo(r, i, r + l, i), t.closePath();
2403
+ function Ot(i, r, t, s, n, o) {
2404
+ const a = Math.min(o, s / 2, n / 2);
2405
+ i.beginPath(), i.moveTo(r + a, t), i.lineTo(r + s - a, t), i.quadraticCurveTo(r + s, t, r + s, t + a), i.lineTo(r + s, t + n - a), i.quadraticCurveTo(r + s, t + n, r + s - a, t + n), i.lineTo(r + a, t + n), i.quadraticCurveTo(r, t + n, r, t + n - a), i.lineTo(r, t + a), i.quadraticCurveTo(r, t, r + a, t), i.closePath();
2255
2406
  }
2256
- const It = ({
2257
- state: t,
2407
+ const Ut = ({
2408
+ state: i,
2258
2409
  answeringTime: r,
2259
- nextPhase: i,
2410
+ nextPhase: t,
2260
2411
  sttError: s
2261
2412
  }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-justify-between iw-h-full ", children: [
2262
2413
  /* @__PURE__ */ e.jsxs("div", { children: [
@@ -2264,14 +2415,14 @@ const It = ({
2264
2415
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "You may start speaking now. We're listening...." }),
2265
2416
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-2", children: [
2266
2417
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-1", children: [
2267
- /* @__PURE__ */ e.jsx(me, { className: "iw-size-4 iw-text-orange-600" }),
2418
+ /* @__PURE__ */ e.jsx(pe, { className: "iw-size-4 iw-text-orange-600" }),
2268
2419
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to talk: " })
2269
2420
  ] }),
2270
2421
  /* @__PURE__ */ e.jsx(
2271
- xe,
2422
+ be,
2272
2423
  {
2273
2424
  total: r,
2274
- remaining: t.currentPhaseTimeRemaining,
2425
+ remaining: i.currentPhaseTimeRemaining,
2275
2426
  size: 50,
2276
2427
  strokeWidth: 4
2277
2428
  }
@@ -2281,24 +2432,24 @@ const It = ({
2281
2432
  /* @__PURE__ */ e.jsx("p", { className: "iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: "Done talking? Click the button to review your answer." })
2282
2433
  ] }),
2283
2434
  /* @__PURE__ */ e.jsxs("div", { children: [
2284
- /* @__PURE__ */ e.jsx(St, {}),
2435
+ /* @__PURE__ */ e.jsx($t, {}),
2285
2436
  s && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2286
2437
  "Recording error: ",
2287
2438
  s.message
2288
2439
  ] })
2289
2440
  ] }),
2290
2441
  /* @__PURE__ */ e.jsx("div", { className: "iw-w-full iw-grid iw-grid-cols-1", children: /* @__PURE__ */ e.jsx(
2291
- W,
2442
+ V,
2292
2443
  {
2293
2444
  onClick: () => {
2294
- i();
2445
+ t();
2295
2446
  },
2296
2447
  children: "Transcribe My Answer"
2297
2448
  }
2298
2449
  ) })
2299
2450
  ] });
2300
- function Rt() {
2301
- const [t, r] = k(!0), i = X(
2451
+ function qt() {
2452
+ const [i, r] = k(!0), t = X(
2302
2453
  () => [0, 1, 2].map((s) => ({ id: s })),
2303
2454
  []
2304
2455
  );
@@ -2308,8 +2459,8 @@ function Rt() {
2308
2459
  }, 1500);
2309
2460
  return () => clearInterval(s);
2310
2461
  }, []), /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full", children: [
2311
- /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-w-80 iw-h-48 ", "aria-hidden": !0, children: i.map((s, n) => {
2312
- const o = n * 50, l = t ? o : o + 12, a = t ? 1 : 0.08, d = n * 140;
2462
+ /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-w-80 iw-h-48 ", "aria-hidden": !0, children: t.map((s, n) => {
2463
+ const o = n * 50, a = i ? o : o + 12, l = i ? 1 : 0.08, d = n * 140;
2313
2464
  return /* @__PURE__ */ e.jsx(
2314
2465
  "div",
2315
2466
  {
@@ -2317,8 +2468,8 @@ function Rt() {
2317
2468
  className: "iw-absolute iw-w-full iw-rounded-lg iw-p-4 iw-shadow-md iw-bg-gradient-to-b iw-from-gray-50 iw-to-gray-100 iw-overflow-hidden",
2318
2469
  style: {
2319
2470
  top: 0,
2320
- transform: `translateY(${l}px)`,
2321
- opacity: a,
2471
+ transform: `translateY(${a}px)`,
2472
+ opacity: l,
2322
2473
  transition: `transform 600ms cubic-bezier(.2,.9,.3,1) ${d}ms, opacity 400ms ease ${d}ms`
2323
2474
  },
2324
2475
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-gap-3 iw-items-center", children: [
@@ -2335,10 +2486,10 @@ function Rt() {
2335
2486
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-center", children: /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-500 iw-font-medium", children: "Preparing your question..." }) })
2336
2487
  ] });
2337
2488
  }
2338
- const Mt = ({
2339
- size: t = "192px",
2489
+ const Bt = ({
2490
+ size: i = "192px",
2340
2491
  className: r,
2341
- colors: i,
2492
+ colors: t,
2342
2493
  animationDuration: s = 20
2343
2494
  }) => {
2344
2495
  const o = { ...{
@@ -2349,22 +2500,22 @@ const Mt = ({
2349
2500
  // Pastel blue
2350
2501
  c3: "oklch(78% 0.14 280)"
2351
2502
  // Pastel purple/lavender
2352
- }, ...i }, l = parseInt(t.replace("px", ""), 10), a = l < 50 ? Math.max(l * 8e-3, 1) : Math.max(l * 0.015, 4), d = l < 50 ? Math.max(l * 4e-3, 1.2) : Math.max(l * 8e-3, 1.5), w = l < 50 ? Math.max(l * 4e-3, 0.05) : Math.max(l * 8e-3, 0.1), u = l < 50 ? Math.max(l * 4e-3, 0.5) : Math.max(l * 8e-3, 2), h = l < 30 ? "0%" : l < 50 ? "5%" : l < 100 ? "15%" : "25%", m = l < 30 ? 1.1 : l < 50 ? Math.max(d * 1.2, 1.3) : d;
2503
+ }, ...t }, a = parseInt(i.replace("px", ""), 10), l = a < 50 ? Math.max(a * 8e-3, 1) : Math.max(a * 0.015, 4), d = a < 50 ? Math.max(a * 4e-3, 1.2) : Math.max(a * 8e-3, 1.5), c = a < 50 ? Math.max(a * 4e-3, 0.05) : Math.max(a * 8e-3, 0.1), u = a < 50 ? Math.max(a * 4e-3, 0.5) : Math.max(a * 8e-3, 2), h = a < 30 ? "0%" : a < 50 ? "5%" : a < 100 ? "15%" : "25%", m = a < 30 ? 1.1 : a < 50 ? Math.max(d * 1.2, 1.3) : d;
2353
2504
  return /* @__PURE__ */ e.jsx(
2354
2505
  "div",
2355
2506
  {
2356
2507
  className: `siri-orb ${r}`,
2357
2508
  style: {
2358
- width: t,
2359
- height: t,
2509
+ width: i,
2510
+ height: i,
2360
2511
  "--bg": o.bg,
2361
2512
  "--c1": o.c1,
2362
2513
  "--c2": o.c2,
2363
2514
  "--c3": o.c3,
2364
2515
  "--animation-duration": `${s}s`,
2365
- "--blur-amount": `${a}px`,
2516
+ "--blur-amount": `${l}px`,
2366
2517
  "--contrast-amount": m,
2367
- "--dot-size": `${w}px`,
2518
+ "--dot-size": `${c}px`,
2368
2519
  "--shadow-spread": `${u}px`,
2369
2520
  "--mask-radius": h
2370
2521
  },
@@ -2477,46 +2628,46 @@ const Mt = ({
2477
2628
  }
2478
2629
  );
2479
2630
  };
2480
- function At({ ttsError: t }) {
2631
+ function Wt({ ttsError: i }) {
2481
2632
  return /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full", children: [
2482
- /* @__PURE__ */ e.jsx(Mt, { size: "80px" }),
2483
- t && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2633
+ /* @__PURE__ */ e.jsx(Bt, { size: "80px" }),
2634
+ i && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2484
2635
  "Audio playback failed: ",
2485
- t.message
2636
+ i.message
2486
2637
  ] }),
2487
2638
  /* @__PURE__ */ e.jsx("p", { className: "iw-text- iw-text-gray-700", children: "Your AI interviewer is speaking..." })
2488
2639
  ] });
2489
2640
  }
2490
- const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ", children: [
2641
+ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ", children: [
2491
2642
  /* @__PURE__ */ e.jsxs("div", { children: [
2492
2643
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Get Ready to Answer" }),
2493
2644
  /* @__PURE__ */ e.jsx("p", { className: "iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: "After 30-seconds thinking time, recording will start automatically, or you can begin recording early by clicking the button below." })
2494
2645
  ] }),
2495
2646
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-2", children: [
2496
2647
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-1", children: [
2497
- /* @__PURE__ */ e.jsx(me, { className: "iw-size-4 iw-text-orange-600" }),
2648
+ /* @__PURE__ */ e.jsx(pe, { className: "iw-size-4 iw-text-orange-600" }),
2498
2649
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to think: " })
2499
2650
  ] }),
2500
2651
  /* @__PURE__ */ e.jsx(
2501
- xe,
2652
+ be,
2502
2653
  {
2503
2654
  total: r,
2504
- remaining: t.currentPhaseTimeRemaining,
2655
+ remaining: i.currentPhaseTimeRemaining,
2505
2656
  size: 50,
2506
2657
  strokeWidth: 4
2507
2658
  }
2508
2659
  )
2509
2660
  ] }),
2510
2661
  /* @__PURE__ */ e.jsx("div", { className: "iw-w-full iw-grid iw-grid-cols-1", children: /* @__PURE__ */ e.jsx(
2511
- W,
2662
+ V,
2512
2663
  {
2513
2664
  onClick: () => {
2514
- i();
2665
+ t();
2515
2666
  },
2516
2667
  children: "Start Answering"
2517
2668
  }
2518
2669
  ) })
2519
- ] }), Dt = ({ sttError: t }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
2670
+ ] }), Vt = ({ sttError: i }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
2520
2671
  /* @__PURE__ */ e.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 60 60", fill: "none", children: [
2521
2672
  /* @__PURE__ */ e.jsx(
2522
2673
  "rect",
@@ -2552,12 +2703,12 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2552
2703
  ] }),
2553
2704
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1 iw-mt-3", children: "Just a moment... We're analyzing your response" }),
2554
2705
  /* @__PURE__ */ e.jsx("p", { className: "iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: "After transcription, you'll have 45 sec to review your answer." }),
2555
- t && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2706
+ i && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2556
2707
  "Transcription error: ",
2557
- t.message,
2558
- t.recoverable && " (attempting to continue)"
2708
+ i.message,
2709
+ i.recoverable && " (attempting to continue)"
2559
2710
  ] })
2560
- ] }), ie = (t) => /* @__PURE__ */ e.jsxs(
2711
+ ] }), ie = (i) => /* @__PURE__ */ e.jsxs(
2561
2712
  "svg",
2562
2713
  {
2563
2714
  xmlns: "http://www.w3.org/2000/svg",
@@ -2569,14 +2720,14 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2569
2720
  strokeWidth: "2",
2570
2721
  strokeLinecap: "round",
2571
2722
  strokeLinejoin: "round",
2572
- ...t,
2723
+ ...i,
2573
2724
  children: [
2574
2725
  /* @__PURE__ */ e.jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
2575
2726
  /* @__PURE__ */ e.jsx("path", { d: "M12 9v4" }),
2576
2727
  /* @__PURE__ */ e.jsx("path", { d: "M12 17h.01" })
2577
2728
  ]
2578
2729
  }
2579
- ), _t = (t) => /* @__PURE__ */ e.jsxs(
2730
+ ), zt = (i) => /* @__PURE__ */ e.jsxs(
2580
2731
  "svg",
2581
2732
  {
2582
2733
  xmlns: "http://www.w3.org/2000/svg",
@@ -2588,13 +2739,13 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2588
2739
  strokeWidth: "2",
2589
2740
  strokeLinecap: "round",
2590
2741
  strokeLinejoin: "round",
2591
- ...t,
2742
+ ...i,
2592
2743
  children: [
2593
2744
  /* @__PURE__ */ e.jsx("path", { d: "M12 6v6l4 2" }),
2594
2745
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" })
2595
2746
  ]
2596
2747
  }
2597
- ), Ft = (t) => /* @__PURE__ */ e.jsxs(
2748
+ ), Ht = (i) => /* @__PURE__ */ e.jsxs(
2598
2749
  "svg",
2599
2750
  {
2600
2751
  xmlns: "http://www.w3.org/2000/svg",
@@ -2606,13 +2757,13 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2606
2757
  strokeWidth: "2",
2607
2758
  strokeLinecap: "round",
2608
2759
  strokeLinejoin: "round",
2609
- ...t,
2760
+ ...i,
2610
2761
  children: [
2611
2762
  /* @__PURE__ */ e.jsx("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }),
2612
2763
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "3" })
2613
2764
  ]
2614
2765
  }
2615
- ), Lt = (t) => /* @__PURE__ */ e.jsxs(
2766
+ ), Yt = (i) => /* @__PURE__ */ e.jsxs(
2616
2767
  "svg",
2617
2768
  {
2618
2769
  xmlns: "http://www.w3.org/2000/svg",
@@ -2624,7 +2775,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2624
2775
  strokeWidth: "2",
2625
2776
  strokeLinecap: "round",
2626
2777
  strokeLinejoin: "round",
2627
- ...t,
2778
+ ...i,
2628
2779
  children: [
2629
2780
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "3" }),
2630
2781
  /* @__PURE__ */ e.jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
@@ -2633,7 +2784,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2633
2784
  /* @__PURE__ */ e.jsx("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })
2634
2785
  ]
2635
2786
  }
2636
- ), ue = (t) => /* @__PURE__ */ e.jsxs(
2787
+ ), ue = (i) => /* @__PURE__ */ e.jsxs(
2637
2788
  "svg",
2638
2789
  {
2639
2790
  xmlns: "http://www.w3.org/2000/svg",
@@ -2645,7 +2796,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2645
2796
  strokeWidth: "2",
2646
2797
  strokeLinecap: "round",
2647
2798
  strokeLinejoin: "round",
2648
- ...t,
2799
+ ...i,
2649
2800
  children: [
2650
2801
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "3" }),
2651
2802
  /* @__PURE__ */ e.jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
@@ -2654,7 +2805,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2654
2805
  /* @__PURE__ */ e.jsx("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })
2655
2806
  ]
2656
2807
  }
2657
- ), $t = (t) => /* @__PURE__ */ e.jsxs(
2808
+ ), Qt = (i) => /* @__PURE__ */ e.jsxs(
2658
2809
  "svg",
2659
2810
  {
2660
2811
  xmlns: "http://www.w3.org/2000/svg",
@@ -2666,7 +2817,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2666
2817
  strokeWidth: "2",
2667
2818
  strokeLinecap: "round",
2668
2819
  strokeLinejoin: "round",
2669
- ...t,
2820
+ ...i,
2670
2821
  children: [
2671
2822
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "3" }),
2672
2823
  /* @__PURE__ */ e.jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
@@ -2676,46 +2827,46 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2676
2827
  ]
2677
2828
  }
2678
2829
  ), te = 5;
2679
- function qt({
2680
- isOpen: t,
2830
+ function Kt({
2831
+ isOpen: i,
2681
2832
  onClose: r,
2682
- warningCount: i,
2833
+ warningCount: t,
2683
2834
  violationType: s,
2684
2835
  onDisqualify: n
2685
2836
  }) {
2686
- const [o, l] = k(10), a = E(r);
2837
+ const [o, a] = k(10), l = T(r);
2687
2838
  if (C(() => {
2688
- a.current = r;
2839
+ l.current = r;
2689
2840
  }, [r]), C(() => {
2690
- if (!t) return;
2841
+ if (!i) return;
2691
2842
  const m = setInterval(() => {
2692
- l((c) => c <= 1 ? (a.current(), 10) : c - 1);
2843
+ a((w) => w <= 1 ? (l.current(), 10) : w - 1);
2693
2844
  }, 1e3);
2694
2845
  return () => clearInterval(m);
2695
- }, [t]), C(() => {
2696
- t && l(10);
2697
- }, [t]), C(() => (t ? (document.body.style.overflow = "hidden", document.body.classList.add("interview-widget-container")) : (document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container")), () => {
2846
+ }, [i]), C(() => {
2847
+ i && a(10);
2848
+ }, [i]), C(() => (i ? (document.body.style.overflow = "hidden", document.body.classList.add("interview-widget-container")) : (document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container")), () => {
2698
2849
  document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container");
2699
- }), [t]), !t) return null;
2700
- const w = (() => {
2850
+ }), [i]), !i) return null;
2851
+ const c = (() => {
2701
2852
  switch (s) {
2702
2853
  case "tab_switch":
2703
2854
  return {
2704
2855
  title: "Tab Switch Detected",
2705
2856
  description: "You attempted to switch to another tab or reload application.",
2706
- icon: /* @__PURE__ */ e.jsx(Ft, { className: "iw-h-5 iw-w-5" })
2857
+ icon: /* @__PURE__ */ e.jsx(Ht, { className: "iw-h-5 iw-w-5" })
2707
2858
  };
2708
2859
  case "fullscreen_exit":
2709
2860
  return {
2710
2861
  title: "Full Screen Exit Detected",
2711
2862
  description: "You attempted to exit full screen mode.",
2712
- icon: /* @__PURE__ */ e.jsx(De, { className: "iw-h-5 iw-w-5" })
2863
+ icon: /* @__PURE__ */ e.jsx($e, { className: "iw-h-5 iw-w-5" })
2713
2864
  };
2714
2865
  case "focus_loss":
2715
2866
  return {
2716
2867
  title: "Focus Loss Detected",
2717
2868
  description: "You lost focus from the interview window.",
2718
- icon: /* @__PURE__ */ e.jsx(Lt, { className: "iw-h-5 iw-w-5" })
2869
+ icon: /* @__PURE__ */ e.jsx(Yt, { className: "iw-h-5 iw-w-5" })
2719
2870
  };
2720
2871
  case "blocked_shortcut":
2721
2872
  return {
@@ -2727,7 +2878,7 @@ function qt({
2727
2878
  return {
2728
2879
  title: "Right Click Attempted",
2729
2880
  description: "You attempted to use the right click.",
2730
- icon: /* @__PURE__ */ e.jsx($t, { className: "iw-h-5 iw-w-5" })
2881
+ icon: /* @__PURE__ */ e.jsx(Qt, { className: "iw-h-5 iw-w-5" })
2731
2882
  };
2732
2883
  case "alt_tab_attempt":
2733
2884
  return {
@@ -2748,8 +2899,8 @@ function qt({
2748
2899
  icon: /* @__PURE__ */ e.jsx(ie, { className: "iw-h-5 iw-w-5" })
2749
2900
  };
2750
2901
  }
2751
- })(), u = te - i, h = () => {
2752
- i + 1 > te ? n() : r();
2902
+ })(), u = te - t, h = () => {
2903
+ t + 1 > te ? n() : r();
2753
2904
  };
2754
2905
  return /* @__PURE__ */ e.jsx("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-black/60 iw-p-4 iw-backdrop-blur-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-w-full iw-max-w-md iw-rounded-2xl iw-border iw-border-gray-100 iw-bg-white iw-shadow-xl", children: [
2755
2906
  /* @__PURE__ */ e.jsxs("div", { className: "iw-p-6 iw-pb-0", children: [
@@ -2759,16 +2910,16 @@ function qt({
2759
2910
  /* @__PURE__ */ e.jsx("h2", { className: "iw-mb-1 iw-text-xl iw-font-semibold iw-text-gray-900", children: "Security Violation" }),
2760
2911
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-2", children: [
2761
2912
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-gray-500", children: "Warning" }),
2762
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-gap-1", children: Array.from({ length: te }).map((m, c) => /* @__PURE__ */ e.jsx(
2913
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-gap-1", children: Array.from({ length: te }).map((m, w) => /* @__PURE__ */ e.jsx(
2763
2914
  "div",
2764
2915
  {
2765
- className: `iw-h-2 iw-w-2 iw-rounded-full ${c <= i - 1 ? "iw-bg-red-500" : "iw-bg-gray-200"}`
2916
+ className: `iw-h-2 iw-w-2 iw-rounded-full ${w <= t - 1 ? "iw-bg-red-500" : "iw-bg-gray-200"}`
2766
2917
  },
2767
- c
2918
+ w
2768
2919
  )) }),
2769
2920
  /* @__PURE__ */ e.jsxs("span", { className: "iw-text-sm iw-text-gray-500", children: [
2770
2921
  "(",
2771
- i,
2922
+ t,
2772
2923
  "/",
2773
2924
  te,
2774
2925
  ")"
@@ -2776,17 +2927,27 @@ function qt({
2776
2927
  ] })
2777
2928
  ] })
2778
2929
  ] }),
2779
- /* @__PURE__ */ e.jsx("div", { className: "iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-bg-gradient-to-r iw-from-red-50 iw-to-orange-50 iw-p-5", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-4", children: [
2780
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm", children: w.icon }),
2781
- /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
2782
- /* @__PURE__ */ e.jsx("h3", { className: "iw-mb-2 iw-font-semibold iw-text-gray-900", children: w.title }),
2783
- /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-leading-relaxed iw-text-gray-700", children: w.description }),
2784
- /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600", children: [
2785
- /* @__PURE__ */ e.jsx(Pe, { className: "iw-h-3 iw-w-3" }),
2786
- /* @__PURE__ */ e.jsx("span", { children: "This action is monitored for interview integrity" })
2930
+ /* @__PURE__ */ e.jsx(
2931
+ "div",
2932
+ {
2933
+ className: "iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-p-5",
2934
+ style: {
2935
+ background: "linear-gradient(to right, rgb(254, 242, 242), rgb(254, 245, 235))",
2936
+ borderColor: "rgb(254, 226, 226)"
2937
+ },
2938
+ children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-4", children: [
2939
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm", children: c.icon }),
2940
+ /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
2941
+ /* @__PURE__ */ e.jsx("h3", { className: "iw-mb-2 iw-font-semibold iw-text-gray-900", children: c.title }),
2942
+ /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-leading-relaxed iw-text-gray-700", children: c.description }),
2943
+ /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600", children: [
2944
+ /* @__PURE__ */ e.jsx(Le, { className: "iw-h-3 iw-w-3" }),
2945
+ /* @__PURE__ */ e.jsx("span", { children: "This action is monitored for interview integrity" })
2946
+ ] })
2947
+ ] })
2787
2948
  ] })
2788
- ] })
2789
- ] }) }),
2949
+ }
2950
+ ),
2790
2951
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mb-5 iw-grid iw-grid-cols-2 iw-gap-3", children: [
2791
2952
  /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-xl iw-border iw-border-amber-200 iw-bg-amber-50 iw-p-4", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-text-center", children: [
2792
2953
  /* @__PURE__ */ e.jsx("div", { className: "iw-mb-1 iw-text-2xl iw-font-bold iw-text-amber-600", children: u }),
@@ -2794,23 +2955,32 @@ function qt({
2794
2955
  ] }) }),
2795
2956
  /* @__PURE__ */ e.jsx("div", { className: "iw-border-primary-100 iw-bg-primary-50 iw-rounded-xl iw-border iw-p-4", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-text-center", children: [
2796
2957
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mb-1 iw-flex iw-items-center iw-justify-center iw-gap-1.5", children: [
2797
- /* @__PURE__ */ e.jsx(_t, { className: "iw-text-primary-600 iw-h-4 iw-w-4" }),
2958
+ /* @__PURE__ */ e.jsx(zt, { className: "iw-text-primary-600 iw-h-4 iw-w-4" }),
2798
2959
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-primary-600 iw-text-2xl iw-font-bold", children: o })
2799
2960
  ] }),
2800
2961
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-primary-700 iw-text-xs iw-font-medium", children: "Auto Close" })
2801
2962
  ] }) })
2802
2963
  ] }),
2803
- u === 1 && /* @__PURE__ */ e.jsx("div", { className: "iw-mb-5 iw-rounded-2xl iw-bg-gradient-to-r iw-from-red-600/90 iw-to-red-500/90 iw-p-4 iw-text-white", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-3", children: [
2804
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20", children: /* @__PURE__ */ e.jsx(ie, { className: "iw-h-4 iw-w-4" }) }),
2805
- /* @__PURE__ */ e.jsxs("div", { children: [
2806
- /* @__PURE__ */ e.jsx("div", { className: "iw-text-sm iw-font-semibold", children: "Final Warning" }),
2807
- /* @__PURE__ */ e.jsx("div", { className: "iw-text-xs iw-text-red-100", children: "Next violation will disqualify you from this interview" })
2808
- ] })
2809
- ] }) })
2964
+ u === 1 && /* @__PURE__ */ e.jsx(
2965
+ "div",
2966
+ {
2967
+ className: "iw-mb-5 iw-rounded-2xl iw-p-4 iw-text-white",
2968
+ style: {
2969
+ background: "linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"
2970
+ },
2971
+ children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-3", children: [
2972
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20", children: /* @__PURE__ */ e.jsx(ie, { className: "iw-h-4 iw-w-4" }) }),
2973
+ /* @__PURE__ */ e.jsxs("div", { children: [
2974
+ /* @__PURE__ */ e.jsx("div", { className: "iw-text-sm iw-font-semibold", children: "Final Warning" }),
2975
+ /* @__PURE__ */ e.jsx("div", { className: "iw-text-xs iw-text-red-100", children: "Next violation will disqualify you from this interview" })
2976
+ ] })
2977
+ ] })
2978
+ }
2979
+ )
2810
2980
  ] }),
2811
2981
  /* @__PURE__ */ e.jsxs("div", { className: "iw-p-6 iw-pt-0", children: [
2812
2982
  /* @__PURE__ */ e.jsx(
2813
- W,
2983
+ V,
2814
2984
  {
2815
2985
  onClick: h,
2816
2986
  className: "iw-h-12 iw-w-full iw-rounded-xl iw-bg-gray-800 iw-text-sm iw-font-medium iw-text-white iw-hover:bg-gray-800",
@@ -2821,7 +2991,7 @@ function qt({
2821
2991
  ] })
2822
2992
  ] }) });
2823
2993
  }
2824
- const Ot = (t) => /* @__PURE__ */ e.jsxs(
2994
+ const Jt = (i) => /* @__PURE__ */ e.jsxs(
2825
2995
  "svg",
2826
2996
  {
2827
2997
  xmlns: "http://www.w3.org/2000/svg",
@@ -2833,24 +3003,24 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2833
3003
  strokeWidth: "2",
2834
3004
  strokeLinecap: "round",
2835
3005
  strokeLinejoin: "round",
2836
- ...t,
3006
+ ...i,
2837
3007
  children: [
2838
3008
  /* @__PURE__ */ e.jsx("path", { d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z" }),
2839
3009
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" })
2840
3010
  ]
2841
3011
  }
2842
- ), Bt = ({
2843
- showHardReloadWarning: t,
3012
+ ), Xt = ({
3013
+ showHardReloadWarning: i,
2844
3014
  onContinue: r
2845
3015
  }) => {
2846
- const i = () => {
3016
+ const t = () => {
2847
3017
  r();
2848
3018
  };
2849
3019
  return /* @__PURE__ */ e.jsxs(
2850
- _e,
3020
+ Oe,
2851
3021
  {
2852
- isOpen: t,
2853
- onClose: i,
3022
+ isOpen: i,
3023
+ onClose: t,
2854
3024
  closeOnOverlayClick: !1,
2855
3025
  closeOnEscape: !1,
2856
3026
  showCloseButton: !1,
@@ -2865,10 +3035,10 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2865
3035
  /* @__PURE__ */ e.jsx("div", { className: "iw-pt-2 iw-pb-4", children: /* @__PURE__ */ e.jsxs(
2866
3036
  "button",
2867
3037
  {
2868
- onClick: i,
3038
+ onClick: t,
2869
3039
  className: "iw-w-full iw-flex iw-items-center iw-justify-center iw-gap-2 iw-px-4 iw-py-3 iw-bg-gray-100 iw-text-gray-600 iw-rounded-md iw-font-medium iw-transition-colors hover:iw-bg-gray-200 focus:iw-outline-none focus:iw-ring-2 focus:iw-ring-gray-400 focus:iw-ring-offset-2",
2870
3040
  children: [
2871
- /* @__PURE__ */ e.jsx(Ot, { className: "iw-size-4" }),
3041
+ /* @__PURE__ */ e.jsx(Jt, { className: "iw-size-4" }),
2872
3042
  "Continue Session"
2873
3043
  ]
2874
3044
  }
@@ -2876,15 +3046,15 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2876
3046
  ]
2877
3047
  }
2878
3048
  );
2879
- }, Gt = ({ children: t, onDisqualify: r }) => {
2880
- const [i, s] = k(!1), [n, o] = k(!1), [l, a] = k("fullscreen_exit"), { logViolation: d, violationCount: w } = vt({
3049
+ }, Zt = ({ children: i, onDisqualify: r }) => {
3050
+ const [t, s] = k(!1), [n, o] = k(!1), [a, l] = k("fullscreen_exit"), { logViolation: d, violationCount: c } = Rt({
2881
3051
  maxViolations: 5,
2882
- onViolation: (g) => {
2883
- n || (s(!0), a(g.type));
3052
+ onViolation: (f) => {
3053
+ n || (s(!0), l(f.type));
2884
3054
  }
2885
- }), { enterFullScreen: u, isFullScreen: h, exitFullScreen: m } = lt({
2886
- onFullScreenChange(g) {
2887
- !g && !n && (s(!0), d({
3055
+ }), { enterFullScreen: u, isFullScreen: h, exitFullScreen: m } = pt({
3056
+ onFullScreenChange(f) {
3057
+ !f && !n && (s(!0), d({
2888
3058
  type: "fullscreen_exit",
2889
3059
  severity: "high",
2890
3060
  details: {
@@ -2896,26 +3066,26 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2896
3066
  });
2897
3067
  C(() => {
2898
3068
  u();
2899
- }, []), gt(d), ht(d), ft();
2900
- const c = () => {
3069
+ }, []), Tt(d), Nt(d), Ct(), At();
3070
+ const w = () => {
2901
3071
  o(!0), m(), s(!1), r == null || r();
2902
3072
  };
2903
3073
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2904
- /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-h-full iw-w-full", children: t }),
3074
+ /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-h-full iw-w-full", children: i }),
2905
3075
  /* @__PURE__ */ e.jsx(
2906
- qt,
3076
+ Kt,
2907
3077
  {
2908
- warningCount: w,
2909
- isOpen: i,
2910
- violationType: l,
3078
+ warningCount: c,
3079
+ isOpen: t,
3080
+ violationType: a,
2911
3081
  onClose: () => {
2912
3082
  s(!1), u();
2913
3083
  },
2914
- onDisqualify: c
3084
+ onDisqualify: w
2915
3085
  }
2916
3086
  ),
2917
- !i && w > 0 && !n && /* @__PURE__ */ e.jsx(
2918
- Bt,
3087
+ !t && c > 0 && !n && /* @__PURE__ */ e.jsx(
3088
+ Xt,
2919
3089
  {
2920
3090
  showHardReloadWarning: !h,
2921
3091
  logViolation: d,
@@ -2923,49 +3093,49 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2923
3093
  }
2924
3094
  )
2925
3095
  ] });
2926
- }, Ut = ({
2927
- interviewTitle: t,
3096
+ }, ei = ({
3097
+ interviewTitle: i,
2928
3098
  interviewId: r,
2929
- onComplete: i,
3099
+ onComplete: t,
2930
3100
  onDisqualify: s,
2931
3101
  className: n = ""
2932
3102
  }) => {
2933
- const o = ut(), { baseUrl: l, authToken: a } = Ce(), { timers: d, stt: w, tts: u, proctoring: h } = He(), [m, c] = k(null), [g, y] = k(""), j = E(""), f = E(null), T = {
3103
+ const o = jt(), { baseUrl: a, authToken: l } = Me(), { timers: d, stt: c, tts: u, proctoring: h } = rt(), [m, w] = k(null), [f, v] = k(""), j = T(""), x = T(null), E = {
2934
3104
  thinkingTime: (d == null ? void 0 : d.thinkingDuration) || 30,
2935
3105
  answeringTime: (d == null ? void 0 : d.answeringDuration) || 120,
2936
3106
  editingTime: (d == null ? void 0 : d.editingDuration) || 30
2937
- }, { thinkingTime: S, answeringTime: v, editingTime: _ } = T;
3107
+ }, { thinkingTime: S, answeringTime: y, editingTime: P } = E;
2938
3108
  C(() => {
2939
- j.current = g;
2940
- }, [g]);
2941
- const b = E(!1), {
2942
- speak: P,
2943
- stop: M,
2944
- error: x
2945
- } = bt({
3109
+ j.current = f;
3110
+ }, [f]);
3111
+ const b = T(!1), {
3112
+ speak: D,
3113
+ stop: A,
3114
+ error: g
3115
+ } = It({
2946
3116
  config: {
2947
- baseUrl: l,
3117
+ baseUrl: a,
2948
3118
  provider: u == null ? void 0 : u.provider,
2949
- authToken: a
3119
+ authToken: l
2950
3120
  },
2951
3121
  onEnd: () => {
2952
- b.current = !1, A();
3122
+ b.current = !1, M();
2953
3123
  },
2954
3124
  onError: () => {
2955
- b.current || (b.current = !0, A());
3125
+ b.current || (b.current = !0, M());
2956
3126
  }
2957
- }), I = E(!1), L = E(!1), {
2958
- startRecording: G,
2959
- stopRecording: B,
2960
- transcribe: V,
3127
+ }), I = T(!1), L = T(!1), {
3128
+ startRecording: B,
3129
+ stopRecording: q,
3130
+ transcribe: z,
2961
3131
  error: H
2962
- } = xt({
3132
+ } = Et({
2963
3133
  config: {
2964
- baseUrl: l,
2965
- provider: w == null ? void 0 : w.provider,
2966
- model: w == null ? void 0 : w.model,
2967
- language: w == null ? void 0 : w.language,
2968
- authToken: a
3134
+ baseUrl: a,
3135
+ provider: c == null ? void 0 : c.provider,
3136
+ model: c == null ? void 0 : c.model,
3137
+ language: c == null ? void 0 : c.language,
3138
+ authToken: l
2969
3139
  },
2970
3140
  onStart: () => {
2971
3141
  I.current = !1, L.current = !1;
@@ -2973,167 +3143,167 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2973
3143
  onStop: () => {
2974
3144
  },
2975
3145
  onTranscriptionComplete: (p) => {
2976
- y(p.transcript), L.current || (L.current = !0, A());
3146
+ v(p.transcript), L.current || (L.current = !0, M());
2977
3147
  },
2978
3148
  onError: (p) => {
2979
- console.error("STT Error:", p), I.current || (I.current = !0, A());
3149
+ console.error("STT Error:", p), I.current || (I.current = !0, M());
2980
3150
  }
2981
- }), { state: q, startQuestion: z, nextPhase: A, completeInterview: Q } = at({
3151
+ }), { state: O, startQuestion: G, nextPhase: M, completeInterview: Y } = ft({
2982
3152
  config: {
2983
3153
  thinkingDuration: S,
2984
- answeringDuration: v,
2985
- editingDuration: _
3154
+ answeringDuration: y,
3155
+ editingDuration: P
2986
3156
  },
2987
3157
  callbacks: {
2988
3158
  onPhaseChange: (p) => {
2989
3159
  switch (p) {
2990
- case D.FETCHING_QUESTION:
3160
+ case _.FETCHING_QUESTION:
2991
3161
  oe();
2992
3162
  break;
2993
- case D.READING_QUESTION:
2994
- Y();
3163
+ case _.READING_QUESTION:
3164
+ Q();
2995
3165
  break;
2996
- case D.ANSWERING:
3166
+ case _.ANSWERING:
2997
3167
  ce();
2998
3168
  break;
2999
- case D.TRANSCRIBING:
3169
+ case _.TRANSCRIBING:
3000
3170
  de();
3001
3171
  break;
3002
- case D.SUBMITTING:
3172
+ case _.SUBMITTING:
3003
3173
  le();
3004
3174
  break;
3005
3175
  }
3006
3176
  },
3007
3177
  onInterviewEnd: () => {
3008
- i == null || i();
3178
+ t == null || t();
3009
3179
  }
3010
3180
  }
3011
3181
  });
3012
3182
  C(() => {
3013
- z();
3183
+ G();
3014
3184
  }, []);
3015
- const { execute: oe, loading: U } = ot(
3185
+ const { execute: oe, loading: W } = xt(
3016
3186
  async () => {
3017
- var O, ge;
3187
+ var U, ye;
3018
3188
  const p = await o.generateQuestion({
3019
3189
  interviewId: r,
3020
- question: ((O = f.current) == null ? void 0 : O.question) || "",
3021
- qnaId: ((ge = f.current) == null ? void 0 : ge.qna_id) || "",
3190
+ question: ((U = x.current) == null ? void 0 : U.question) || "",
3191
+ qnaId: ((ye = x.current) == null ? void 0 : ye.qna_id) || "",
3022
3192
  answer: j.current
3023
3193
  });
3024
- return f.current = p.data, p;
3194
+ return x.current = p.data, p;
3025
3195
  },
3026
3196
  {
3027
3197
  onSuccess: async (p) => {
3028
- p && p.data && (y(""), c(p.data), A());
3198
+ p && p.data && (v(""), w(p.data), M());
3029
3199
  },
3030
3200
  onError: (p) => {
3031
3201
  console.error("Failed to fetch questions:", p);
3032
3202
  }
3033
3203
  }
3034
3204
  ), le = N(async () => {
3035
- z();
3036
- }, [z]), Y = N(async () => {
3205
+ G();
3206
+ }, [G]), Q = N(async () => {
3037
3207
  var p;
3038
- if ((p = f.current) != null && p.question)
3208
+ if ((p = x.current) != null && p.question)
3039
3209
  try {
3040
- b.current = !1, await P(f.current.question), f.current.is_interview_done && (await Ke(2e3), Q());
3041
- } catch (O) {
3042
- console.error("Failed to speak question:", O);
3210
+ b.current = !1, await D(x.current.question), x.current.is_interview_done && (await ot(2e3), Y());
3211
+ } catch (U) {
3212
+ console.error("Failed to speak question:", U);
3043
3213
  }
3044
3214
  else
3045
- A();
3046
- }, [P, A, Q]), ce = N(async () => {
3215
+ M();
3216
+ }, [D, M, Y]), ce = N(async () => {
3047
3217
  try {
3048
- await G(v);
3218
+ await B(y);
3049
3219
  } catch (p) {
3050
- console.error("Failed to start recording:", p), A();
3220
+ console.error("Failed to start recording:", p), M();
3051
3221
  }
3052
- }, [G, A]), de = N(async () => {
3222
+ }, [B, M]), de = N(async () => {
3053
3223
  try {
3054
- const p = await B();
3055
- await V(p);
3224
+ const p = await q();
3225
+ await z(p);
3056
3226
  } catch (p) {
3057
- console.error("STT processing failed:", p), !I.current && !L.current && (I.current = !0, A());
3227
+ console.error("STT processing failed:", p), !I.current && !L.current && (I.current = !0, M());
3058
3228
  }
3059
- }, [B, V, A]), J = N(
3229
+ }, [q, z, M]), K = N(
3060
3230
  async (p) => {
3061
- M(), (await o.generateQuestion({
3231
+ A(), (await o.generateQuestion({
3062
3232
  interviewId: r,
3063
3233
  isInterviewDone: !0
3064
- })).success && (p == null || p(), Q());
3234
+ })).success && (p == null || p(), Y(), sessionStorage.removeItem(ge));
3065
3235
  },
3066
- [r, M, o]
3236
+ [r, A, o]
3067
3237
  ), ee = () => {
3068
- const { phase: p } = q;
3238
+ const { phase: p } = O;
3069
3239
  switch (p) {
3070
- case D.IDLE:
3240
+ case _.IDLE:
3071
3241
  return /* @__PURE__ */ e.jsxs("div", { className: "iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full", children: [
3072
3242
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Ready to start the Interview?" }),
3073
3243
  /* @__PURE__ */ e.jsx("p", { className: "iw-max-w-xl iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: `You will be asked a series of behavioral and technical questions. For each one you'll get a short thinking period, then a timed recording window. We'll transcribe your response so you can review and edit it before submitting. Click "Start Interview" when you're ready.` }),
3074
- /* @__PURE__ */ e.jsx(W, { onClick: z, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
3244
+ /* @__PURE__ */ e.jsx(V, { onClick: G, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
3075
3245
  ] });
3076
- case D.FETCHING_QUESTION:
3077
- return /* @__PURE__ */ e.jsx(Rt, {});
3078
- case D.READING_QUESTION:
3079
- return /* @__PURE__ */ e.jsx(At, { ttsError: x });
3080
- case D.THINKING:
3246
+ case _.FETCHING_QUESTION:
3247
+ return /* @__PURE__ */ e.jsx(qt, {});
3248
+ case _.READING_QUESTION:
3249
+ return /* @__PURE__ */ e.jsx(Wt, { ttsError: g });
3250
+ case _.THINKING:
3081
3251
  return /* @__PURE__ */ e.jsx(
3082
- Pt,
3252
+ Gt,
3083
3253
  {
3084
- state: q,
3254
+ state: O,
3085
3255
  thinkingTime: S,
3086
- nextPhase: A
3256
+ nextPhase: M
3087
3257
  }
3088
3258
  );
3089
- case D.ANSWERING:
3259
+ case _.ANSWERING:
3090
3260
  return /* @__PURE__ */ e.jsx(
3091
- It,
3261
+ Ut,
3092
3262
  {
3093
- state: q,
3094
- answeringTime: v,
3095
- nextPhase: A,
3263
+ state: O,
3264
+ answeringTime: y,
3265
+ nextPhase: M,
3096
3266
  sttError: H
3097
3267
  }
3098
3268
  );
3099
- case D.TRANSCRIBING:
3100
- return /* @__PURE__ */ e.jsx(Dt, { sttError: H });
3101
- case D.EDITING:
3102
- case D.SUBMITTING:
3269
+ case _.TRANSCRIBING:
3270
+ return /* @__PURE__ */ e.jsx(Vt, { sttError: H });
3271
+ case _.EDITING:
3272
+ case _.SUBMITTING:
3103
3273
  return /* @__PURE__ */ e.jsx("div", { className: "iw-space-y-4 iw-h-full", children: /* @__PURE__ */ e.jsx(
3104
- Nt,
3274
+ _t,
3105
3275
  {
3106
- value: g,
3107
- onChange: (O) => y(O.target.value),
3108
- onSubmit: () => A(),
3109
- isSubmitDisabled: !g.trim() || U,
3110
- state: q,
3111
- editingTime: _
3276
+ value: f,
3277
+ onChange: (U) => v(U.target.value),
3278
+ onSubmit: () => M(),
3279
+ isSubmitDisabled: !f.trim() || W,
3280
+ state: O,
3281
+ editingTime: P
3112
3282
  }
3113
3283
  ) });
3114
- case D.COMPLETED:
3284
+ case _.COMPLETED:
3115
3285
  return null;
3116
3286
  default:
3117
3287
  return null;
3118
3288
  }
3119
3289
  };
3120
3290
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: h != null && h.enabled ? /* @__PURE__ */ e.jsxs(
3121
- Gt,
3291
+ Zt,
3122
3292
  {
3123
- onDisqualify: () => J(s),
3293
+ onDisqualify: () => K(s),
3124
3294
  children: [
3125
3295
  /* @__PURE__ */ e.jsx(
3126
- ye,
3296
+ ke,
3127
3297
  {
3128
- title: t,
3129
- onExit: () => J()
3298
+ title: i,
3299
+ onExit: () => K()
3130
3300
  }
3131
3301
  ),
3132
3302
  /* @__PURE__ */ e.jsx(
3133
- ve,
3303
+ Ne,
3134
3304
  {
3135
3305
  currentQuestion: m,
3136
- phase: q.phase,
3306
+ phase: O.phase,
3137
3307
  className: n,
3138
3308
  children: ee()
3139
3309
  }
@@ -3142,63 +3312,63 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
3142
3312
  }
3143
3313
  ) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3144
3314
  /* @__PURE__ */ e.jsx(
3145
- ye,
3315
+ ke,
3146
3316
  {
3147
- title: t,
3148
- onExit: () => J()
3317
+ title: i,
3318
+ onExit: () => K()
3149
3319
  }
3150
3320
  ),
3151
3321
  /* @__PURE__ */ e.jsx(
3152
- ve,
3322
+ Ne,
3153
3323
  {
3154
3324
  currentQuestion: m,
3155
- phase: q.phase,
3325
+ phase: O.phase,
3156
3326
  className: n,
3157
3327
  children: ee()
3158
3328
  }
3159
3329
  )
3160
3330
  ] }) });
3161
- }, zt = ({
3162
- title: t,
3331
+ }, ti = ({
3332
+ title: i,
3163
3333
  interviewId: r,
3164
- onInterviewEnd: i,
3334
+ onInterviewEnd: t,
3165
3335
  onInterviewDisqualify: s,
3166
3336
  className: n = ""
3167
3337
  }) => {
3168
- const [o, l] = fe.useState(!1), [a, d] = fe.useState(!0), w = E(null);
3338
+ const [o, a] = he.useState(!1), [l, d] = he.useState(!0), c = T(null);
3169
3339
  return o ? /* @__PURE__ */ e.jsx("div", { className: "interview-widget-container", children: /* @__PURE__ */ e.jsx(
3170
3340
  "div",
3171
3341
  {
3172
- ref: w,
3342
+ ref: c,
3173
3343
  className: `iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${n}`,
3174
3344
  children: /* @__PURE__ */ e.jsx("div", { className: " iw-h-full iw-flex iw-flex-col", children: /* @__PURE__ */ e.jsx(
3175
- Ut,
3345
+ ei,
3176
3346
  {
3177
- interviewTitle: t ?? "Interview",
3347
+ interviewTitle: i ?? "Interview",
3178
3348
  interviewId: r,
3179
3349
  className: n,
3180
- onComplete: i || (() => {
3350
+ onComplete: t || (() => {
3181
3351
  }),
3182
3352
  onDisqualify: s
3183
3353
  }
3184
3354
  ) })
3185
3355
  }
3186
3356
  ) }) : /* @__PURE__ */ e.jsx("div", { className: "interview-widget-container", children: /* @__PURE__ */ e.jsx(
3187
- it,
3357
+ ut,
3188
3358
  {
3189
- isOpen: a,
3359
+ isOpen: l,
3190
3360
  onStart: () => {
3191
- l(!0), d(!1);
3361
+ a(!0), d(!1);
3192
3362
  }
3193
3363
  }
3194
3364
  ) });
3195
3365
  };
3196
3366
  typeof window < "u" && (window.InterviewWidget = {
3197
- InterviewWidget: zt,
3198
- InterviewWidgetProvider: Ve
3367
+ InterviewWidget: ti,
3368
+ InterviewWidgetProvider: it
3199
3369
  });
3200
3370
  export {
3201
- zt as InterviewWidget,
3202
- Ve as InterviewWidgetProvider,
3203
- zt as default
3371
+ ti as InterviewWidget,
3372
+ it as InterviewWidgetProvider,
3373
+ ti as default
3204
3374
  };