interview-widget 1.0.1 → 1.0.3

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,7 +1,7 @@
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";
1
+ var _e = Object.defineProperty;
2
+ var Le = (t, r, i) => r in t ? _e(t, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[r] = i;
3
+ var _ = (t, r, i) => Le(t, typeof r != "symbol" ? r + "" : r, i);
4
+ import fe, { createContext as je, useRef as T, useCallback as N, useMemo as X, useContext as re, useSyncExternalStore as Ne, useState as k, useEffect as C } from "react";
5
5
  import { createPortal as $e } from "react-dom";
6
6
  var ke = { exports: {} }, se = {};
7
7
  /**
@@ -13,8 +13,8 @@ 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 Oe = Symbol.for("react.transitional.element"), qe = Symbol.for("react.fragment");
17
+ function Ee(t, r, i) {
18
18
  var s = null;
19
19
  if (i !== void 0 && (s = "" + i), r.key !== void 0 && (s = "" + r.key), "key" in r) {
20
20
  i = {};
@@ -22,16 +22,16 @@ function Te(t, r, i) {
22
22
  n !== "key" && (i[n] = r[n]);
23
23
  } else i = r;
24
24
  return r = i.ref, {
25
- $$typeof: qe,
25
+ $$typeof: Oe,
26
26
  type: t,
27
27
  key: s,
28
28
  ref: r !== void 0 ? r : null,
29
29
  props: i
30
30
  };
31
31
  }
32
- se.Fragment = Oe;
33
- se.jsx = Te;
34
- se.jsxs = Te;
32
+ se.Fragment = qe;
33
+ se.jsx = Ee;
34
+ se.jsxs = Ee;
35
35
  ke.exports = se;
36
36
  var e = ke.exports;
37
37
  const $ = {
@@ -65,10 +65,10 @@ const $ = {
65
65
  enabled: !0
66
66
  }
67
67
  }
68
- }, ne = je(null), Ee = "proctoring-storage", Be = () => {
68
+ }, ne = je(null), Te = "proctoring-storage", Ue = () => {
69
69
  var t, r;
70
70
  try {
71
- const i = sessionStorage.getItem(Ee);
71
+ const i = sessionStorage.getItem(Te);
72
72
  if (i) {
73
73
  const s = JSON.parse(i);
74
74
  return {
@@ -86,7 +86,7 @@ const $ = {
86
86
  }, pe = (t) => {
87
87
  try {
88
88
  sessionStorage.setItem(
89
- Ee,
89
+ Te,
90
90
  JSON.stringify({
91
91
  state: t,
92
92
  version: 0
@@ -95,14 +95,14 @@ const $ = {
95
95
  } catch (r) {
96
96
  console.error("Failed to save proctoring data to session storage:", r);
97
97
  }
98
- }, Ge = ({
98
+ }, ze = ({
99
99
  children: t
100
100
  }) => {
101
- const r = E(Be()), i = E(/* @__PURE__ */ new Set()), s = N(() => {
101
+ const r = T(Ue()), i = T(/* @__PURE__ */ new Set()), s = N(() => {
102
102
  i.current.forEach((w) => w());
103
103
  }, []), n = N((w) => (i.current.add(w), () => {
104
104
  i.current.delete(w);
105
- }), []), o = N(() => r.current, []), l = N(
105
+ }), []), o = N(() => r.current, []), a = N(
106
106
  (w) => {
107
107
  r.current = {
108
108
  logViolations: [...r.current.logViolations, w],
@@ -110,7 +110,7 @@ const $ = {
110
110
  }, pe(r.current), s();
111
111
  },
112
112
  [s]
113
- ), a = N(() => {
113
+ ), l = N(() => {
114
114
  r.current = {
115
115
  logViolations: [],
116
116
  totalViolations: 0
@@ -118,14 +118,14 @@ const $ = {
118
118
  }, [s]), d = X(
119
119
  () => ({
120
120
  getState: o,
121
- addViolation: l,
122
- clearViolations: a,
121
+ addViolation: a,
122
+ clearViolations: l,
123
123
  subscribe: n
124
124
  }),
125
- [o, l, a, n]
125
+ [o, a, l, n]
126
126
  );
127
127
  return /* @__PURE__ */ e.jsx(ne.Provider, { value: d, children: t });
128
- }, Ue = () => {
128
+ }, Be = () => {
129
129
  const t = re(ne);
130
130
  if (!t)
131
131
  throw new Error("useViolations must be used within a ProctoringProvider");
@@ -134,7 +134,7 @@ const $ = {
134
134
  () => t.getState().logViolations,
135
135
  () => t.getState().logViolations
136
136
  );
137
- }, ze = () => {
137
+ }, Ge = () => {
138
138
  const t = re(ne);
139
139
  if (!t)
140
140
  throw new Error(
@@ -155,14 +155,14 @@ const $ = {
155
155
  addViolation: t.addViolation,
156
156
  clearViolations: t.clearViolations
157
157
  };
158
- }, Se = je(
158
+ }, Ce = je(
159
159
  null
160
160
  );
161
161
  function Ve({
162
162
  config: t = {},
163
163
  children: r
164
164
  }) {
165
- var s, n, o, l;
165
+ var s, n, o, a;
166
166
  const i = {
167
167
  api: {
168
168
  ...$.api,
@@ -189,21 +189,21 @@ function Ve({
189
189
  },
190
190
  tts: {
191
191
  ...$.interview.tts,
192
- ...(l = t.interview) == null ? void 0 : l.tts
192
+ ...(a = t.interview) == null ? void 0 : a.tts
193
193
  }
194
194
  }
195
195
  };
196
- return /* @__PURE__ */ e.jsx(Se.Provider, { value: i, children: /* @__PURE__ */ e.jsx(Ge, { children: r }) });
196
+ return /* @__PURE__ */ e.jsx(Ce.Provider, { value: i, children: /* @__PURE__ */ e.jsx(ze, { children: r }) });
197
197
  }
198
198
  function ae() {
199
- const t = re(Se);
199
+ const t = re(Ce);
200
200
  if (!t)
201
201
  throw new Error(
202
202
  "useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>"
203
203
  );
204
204
  return t;
205
205
  }
206
- function Ce() {
206
+ function Se() {
207
207
  return ae().api || $.api;
208
208
  }
209
209
  function Z() {
@@ -248,8 +248,8 @@ const Ie = ({
248
248
  fullWidth: s = !1,
249
249
  isLoading: n = !1,
250
250
  disabled: o,
251
- className: l = "",
252
- ...a
251
+ className: a = "",
252
+ ...l
253
253
  }) => {
254
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 = {
255
255
  primary: "iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",
@@ -265,9 +265,9 @@ const Ie = ({
265
265
  return /* @__PURE__ */ e.jsxs(
266
266
  "button",
267
267
  {
268
- className: `${d} ${w[r]} ${u[i]} ${m} ${h} ${l}`,
268
+ className: `${d} ${w[r]} ${u[i]} ${m} ${h} ${a}`,
269
269
  disabled: o || n,
270
- ...a,
270
+ ...l,
271
271
  children: [
272
272
  n && /* @__PURE__ */ e.jsx(Ie, { height: 16, width: 16, style: { marginRight: "3px" } }),
273
273
  t
@@ -295,13 +295,13 @@ function Me(t, r) {
295
295
  const s = i.r + (255 - i.r) * r, n = i.g + (255 - i.g) * r, o = i.b + (255 - i.b) * r;
296
296
  return Ye(s, n, o);
297
297
  }
298
- function Je(t, r = 0.8) {
298
+ function Ke(t, r = 0.8) {
299
299
  return {
300
300
  background: `linear-gradient(to bottom, ${Me(t, r)}, #ffffff)`,
301
301
  color: "#1f2937"
302
302
  };
303
303
  }
304
- function Ke(t) {
304
+ function Je(t) {
305
305
  return new Promise((r) => setTimeout(r, t));
306
306
  }
307
307
  function Ae(t) {
@@ -322,7 +322,7 @@ function Ze(t) {
322
322
  return console.error("Error decoding JWT:", r), null;
323
323
  }
324
324
  }
325
- const Pe = (t) => /* @__PURE__ */ e.jsxs(
325
+ const De = (t) => /* @__PURE__ */ e.jsxs(
326
326
  "svg",
327
327
  {
328
328
  xmlns: "http://www.w3.org/2000/svg",
@@ -340,7 +340,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
340
340
  /* @__PURE__ */ e.jsx("path", { d: "m9 12 2 2 4-4" })
341
341
  ]
342
342
  }
343
- ), De = (t) => /* @__PURE__ */ e.jsxs(
343
+ ), Pe = (t) => /* @__PURE__ */ e.jsxs(
344
344
  "svg",
345
345
  {
346
346
  xmlns: "http://www.w3.org/2000/svg",
@@ -403,7 +403,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
403
403
  onClose: i
404
404
  }) => {
405
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 = [
406
+ const s = T(null), n = T(null), { baseColor: o, borderRadius: a } = Z(), [l, d] = k(!1), [w, u] = k(null), [h, m] = k(!1), c = o ?? "#2563eb", x = Ae(c), y = a ?? 18, j = (g, I) => g.startsWith("#") && g.length === 7 ? `${g}${I}` : g, f = [
407
407
  `radial-gradient(120% 85% at 50% 125%, ${j(
408
408
  c,
409
409
  "34"
@@ -423,7 +423,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
423
423
  c,
424
424
  "14"
425
425
  )} 16px, transparent 16px, transparent 32px)`
426
- ].join(", "), T = a ? {
426
+ ].join(", "), E = l ? {
427
427
  label: "Camera & microphone ready",
428
428
  toneClass: "iw-bg-white/15 iw-text-white",
429
429
  dotClass: "iw-bg-emerald-400"
@@ -435,7 +435,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
435
435
  label: "Allow access to continue",
436
436
  toneClass: "iw-bg-white/15 iw-text-white",
437
437
  dotClass: "iw-bg-rose-300"
438
- }, S = a ? {
438
+ }, S = l ? {
439
439
  badge: "Ready",
440
440
  toneClass: "iw-bg-emerald-50 iw-text-emerald-600",
441
441
  cameraCopy: "Framing looks good for identity verification.",
@@ -456,7 +456,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
456
456
  description: S.cameraCopy,
457
457
  status: S.badge,
458
458
  toneClass: S.toneClass,
459
- Icon: De
459
+ Icon: Pe
460
460
  },
461
461
  {
462
462
  label: "Microphone input",
@@ -465,42 +465,42 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
465
465
  toneClass: S.toneClass,
466
466
  Icon: et
467
467
  }
468
- ], _ = () => {
469
- n.current && (n.current.getTracks().forEach((x) => x.stop()), n.current = null);
468
+ ], F = () => {
469
+ n.current && (n.current.getTracks().forEach((g) => g.stop()), n.current = null);
470
470
  }, b = async () => {
471
471
  m(!0), u(null);
472
472
  try {
473
- const x = await navigator.mediaDevices.getUserMedia({
473
+ const g = await navigator.mediaDevices.getUserMedia({
474
474
  video: { width: { ideal: 1280 }, height: { ideal: 720 } },
475
475
  audio: !0
476
476
  });
477
- n.current = x, s.current && (s.current.srcObject = x), d(!0);
478
- } catch (x) {
479
- console.error("Media permission error:", x);
477
+ n.current = g, s.current && (s.current.srcObject = g), d(!0);
478
+ } catch (g) {
479
+ console.error("Media permission error:", g);
480
480
  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);
481
+ (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
482
  } finally {
483
483
  m(!1);
484
484
  }
485
485
  };
486
486
  if (C(() => {
487
487
  if (!t) {
488
- _();
488
+ F();
489
489
  return;
490
490
  }
491
491
  return b(), () => {
492
- _();
492
+ F();
493
493
  };
494
494
  }, [t]), !t) return null;
495
- const P = () => {
496
- r(), _();
495
+ const D = () => {
496
+ r(), F();
497
497
  };
498
498
  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
499
  /* @__PURE__ */ e.jsxs(
500
500
  "div",
501
501
  {
502
502
  className: "iw-relative iw-overflow-hidden",
503
- style: { background: g },
503
+ style: { background: x },
504
504
  children: [
505
505
  /* @__PURE__ */ e.jsx(
506
506
  "div",
@@ -534,7 +534,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
534
534
  ),
535
535
  /* @__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
536
  /* @__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" }) }),
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(De, { className: "iw-h-6 iw-w-6" }) }),
538
538
  /* @__PURE__ */ e.jsxs("div", { children: [
539
539
  /* @__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
540
  /* @__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,15 +544,15 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
544
544
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-items-start iw-justify-end", children: /* @__PURE__ */ e.jsxs(
545
545
  "div",
546
546
  {
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}`,
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 ${E.toneClass}`,
548
548
  children: [
549
549
  /* @__PURE__ */ e.jsx(
550
550
  "span",
551
551
  {
552
- className: `iw-inline-flex iw-h-2 iw-w-2 iw-rounded-full ${T.dotClass}`
552
+ className: `iw-inline-flex iw-h-2 iw-w-2 iw-rounded-full ${E.dotClass}`
553
553
  }
554
554
  ),
555
- T.label
555
+ E.label
556
556
  ]
557
557
  }
558
558
  ) }),
@@ -562,7 +562,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
562
562
  "aria-label": "Close",
563
563
  className: "iw-absolute iw-top-5 iw-right-5 iw-text-white/70 transition-colors hover:iw-text-white",
564
564
  onClick: () => {
565
- _(), i == null || i();
565
+ F(), i == null || i();
566
566
  },
567
567
  children: "✕"
568
568
  }
@@ -578,7 +578,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
578
578
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-sm iw-font-semibold iw-text-slate-900", children: "Proctoring guidelines" }),
579
579
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-[11px] iw-font-medium iw-uppercase iw-tracking-wide iw-text-slate-400", children: "Required" })
580
580
  ] }),
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(
581
+ /* @__PURE__ */ e.jsx("ul", { className: "iw-mt-5 iw-flex iw-flex-col iw-gap-4", children: tt.map((g, I) => /* @__PURE__ */ e.jsx(
582
582
  "li",
583
583
  {
584
584
  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 +587,14 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
587
587
  "span",
588
588
  {
589
589
  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 },
590
+ style: { background: x },
591
591
  children: I + 1
592
592
  }
593
593
  ),
594
- /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-slate-600", children: x })
594
+ /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-slate-600", children: g })
595
595
  ] })
596
596
  },
597
- x
597
+ g
598
598
  )) })
599
599
  ] }) }),
600
600
  /* @__PURE__ */ e.jsxs("section", { className: "iw-flex iw-flex-col iw-gap-5", children: [
@@ -632,14 +632,14 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
632
632
  borderRadius: y,
633
633
  color: c
634
634
  },
635
- children: a ? "Recheck permissions" : "Enable camera & mic"
635
+ children: l ? "Recheck permissions" : "Enable camera & mic"
636
636
  }
637
637
  ),
638
638
  /* @__PURE__ */ e.jsx(
639
639
  W,
640
640
  {
641
- onClick: P,
642
- disabled: !a,
641
+ onClick: D,
642
+ disabled: !l,
643
643
  className: "iw-h-10 iw-px-6 iw-text-sm",
644
644
  style: {
645
645
  backgroundColor: c
@@ -652,20 +652,20 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
652
652
  }
653
653
  ),
654
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(
655
+ ({ Icon: g, label: I, description: L, status: z, toneClass: U }) => /* @__PURE__ */ e.jsx(
656
656
  "li",
657
657
  {
658
658
  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
659
  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" }) }),
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(g, { className: "iw-h-5 iw-w-5 iw-text-slate-600" }) }),
661
661
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
662
662
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-between iw-gap-3", children: [
663
663
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-font-medium iw-text-slate-800", children: I }),
664
664
  /* @__PURE__ */ e.jsx(
665
665
  "span",
666
666
  {
667
- className: `iw-rounded-full iw-px-3 iw-py-1 iw-text-[11px] iw-font-semibold ${B}`,
668
- children: G
667
+ className: `iw-rounded-full iw-px-3 iw-py-1 iw-text-[11px] iw-font-semibold ${U}`,
668
+ children: z
669
669
  }
670
670
  )
671
671
  ] }),
@@ -701,7 +701,7 @@ const Pe = (t) => /* @__PURE__ */ e.jsxs(
701
701
  ] })
702
702
  ] }) });
703
703
  };
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 || {});
704
+ var P = /* @__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))(P || {});
705
705
  const rt = {
706
706
  thinkingDuration: 30,
707
707
  answeringDuration: 120,
@@ -737,11 +737,11 @@ const rt = {
737
737
  };
738
738
  class nt {
739
739
  constructor(r = {}, i = {}) {
740
- F(this, "config");
741
- F(this, "state");
742
- F(this, "phaseIntervalId", null);
743
- F(this, "globalIntervalId", null);
744
- F(this, "callbacks");
740
+ _(this, "config");
741
+ _(this, "state");
742
+ _(this, "phaseIntervalId", null);
743
+ _(this, "globalIntervalId", null);
744
+ _(this, "callbacks");
745
745
  this.config = { ...rt, ...r }, this.callbacks = i, this.state = {
746
746
  phase: "idle",
747
747
  currentPhaseTimeRemaining: 0,
@@ -837,37 +837,37 @@ class nt {
837
837
  }
838
838
  }
839
839
  function at(t = {}) {
840
- const { config: r = {}, callbacks: i = {} } = t, s = E(null);
840
+ const { config: r = {}, callbacks: i = {} } = t, s = T(null);
841
841
  s.current || (s.current = new nt(r, {}));
842
- const n = s.current, [o, l] = k(n.getState()), a = N(() => {
843
- l(n.getState());
842
+ const n = s.current, [o, a] = k(n.getState()), l = N(() => {
843
+ a(n.getState());
844
844
  }, [n]);
845
845
  C(() => {
846
846
  const h = {
847
847
  onPhaseChange: (m, c) => {
848
- var g;
849
- a(), (g = i.onPhaseChange) == null || g.call(i, m, c);
848
+ var x;
849
+ l(), (x = i.onPhaseChange) == null || x.call(i, m, c);
850
850
  },
851
851
  onTick: (m) => {
852
852
  var c;
853
- a(), (c = i.onTick) == null || c.call(i, m);
853
+ l(), (c = i.onTick) == null || c.call(i, m);
854
854
  },
855
855
  onInterviewEnd: () => {
856
856
  var m;
857
- a(), (m = i.onInterviewEnd) == null || m.call(i);
857
+ l(), (m = i.onInterviewEnd) == null || m.call(i);
858
858
  }
859
859
  };
860
860
  n.callbacks = h;
861
- }, [n, i, a]), C(() => () => {
861
+ }, [n, i, l]), C(() => () => {
862
862
  n.destroy();
863
863
  }, [n]);
864
864
  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]);
865
+ n.startQuestion(), l();
866
+ }, [n, l]), w = N(() => {
867
+ n.nextPhase(), l();
868
+ }, [n, l]), u = N(() => {
869
+ n.completeInterview(), l();
870
+ }, [n, l]);
871
871
  return {
872
872
  state: o,
873
873
  startQuestion: d,
@@ -883,7 +883,7 @@ function ot(t, r = {}) {
883
883
  error: null
884
884
  }), n = N(
885
885
  async (...o) => {
886
- var l, a, d, w;
886
+ var a, l, d, w;
887
887
  s((u) => ({ ...u, loading: !0, error: null }));
888
888
  try {
889
889
  const u = await t(...o);
@@ -892,7 +892,7 @@ function ot(t, r = {}) {
892
892
  data: u,
893
893
  loading: !1,
894
894
  error: null
895
- })), (l = r.onSuccess) == null || l.call(r, u), (a = r.onSettled) == null || a.call(r, u, null);
895
+ })), (a = r.onSuccess) == null || a.call(r, u), (l = r.onSettled) == null || l.call(r, u, null);
896
896
  } catch (u) {
897
897
  const h = u.type ? u : {
898
898
  type: "unknown",
@@ -916,10 +916,10 @@ function ot(t, r = {}) {
916
916
  };
917
917
  }
918
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;
919
+ const [r, i] = 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 (c) => {
920
+ var x;
921
921
  try {
922
- if (!l())
922
+ if (!a())
923
923
  throw new Error("Fullscreen is not supported in this environment");
924
924
  c.requestFullscreen ? await c.requestFullscreen() : c.webkitRequestFullscreen ? await c.webkitRequestFullscreen() : c.mozRequestFullScreen ? await c.mozRequestFullScreen() : c.msRequestFullscreen && await c.msRequestFullscreen();
925
925
  } catch (y) {
@@ -927,23 +927,23 @@ const lt = (t) => {
927
927
  name: "FullscreenError",
928
928
  message: y instanceof Error ? y.message : "Failed to enter fullscreen"
929
929
  };
930
- i(j), (g = t == null ? void 0 : t.onError) == null || g.call(t, j);
930
+ i(j), (x = t == null ? void 0 : t.onError) == null || x.call(t, j);
931
931
  }
932
932
  }, w = async () => {
933
933
  var c;
934
934
  try {
935
935
  o.exitFullscreen ? await o.exitFullscreen() : o.webkitExitFullscreen ? await o.webkitExitFullscreen() : o.mozCancelFullScreen ? await o.mozCancelFullScreen() : o.msExitFullscreen && await o.msExitFullscreen();
936
- } catch (g) {
936
+ } catch (x) {
937
937
  const y = {
938
938
  name: "FullscreenError",
939
- message: g instanceof Error ? g.message : "Failed to exit fullscreen"
939
+ message: x instanceof Error ? x.message : "Failed to exit fullscreen"
940
940
  };
941
941
  i(y), (c = t == null ? void 0 : t.onError) == null || c.call(t, y);
942
942
  }
943
943
  }, u = N(() => {
944
- var g;
945
- const c = !!a();
946
- n(c), (g = t == null ? void 0 : t.onFullScreenChange) == null || g.call(t, c);
944
+ var x;
945
+ const c = !!l();
946
+ n(c), (x = t == null ? void 0 : t.onFullScreenChange) == null || x.call(t, c);
947
947
  }, [t]);
948
948
  C(() => {
949
949
  const c = [
@@ -952,18 +952,18 @@ const lt = (t) => {
952
952
  "mozfullscreenchange",
953
953
  "MSFullscreenChange"
954
954
  ];
955
- return c.forEach((g) => {
956
- document.addEventListener(g, u);
955
+ return c.forEach((x) => {
956
+ document.addEventListener(x, u);
957
957
  }), () => {
958
- c.forEach((g) => {
959
- document.removeEventListener(g, u);
958
+ c.forEach((x) => {
959
+ document.removeEventListener(x, u);
960
960
  });
961
961
  };
962
962
  }, [u]);
963
963
  const h = async (c) => {
964
964
  i(null);
965
- const g = c ?? document.documentElement;
966
- await d(g);
965
+ const x = c ?? document.documentElement;
966
+ await d(x);
967
967
  };
968
968
  return {
969
969
  isFullScreen: s,
@@ -1044,25 +1044,25 @@ async function he(t, r = {}, i = {
1044
1044
  let s;
1045
1045
  for (let n = 1; n <= i.attempts; n++)
1046
1046
  try {
1047
- const o = new AbortController(), l = setTimeout(() => o.abort(), 6e4), a = await fetch(t, {
1047
+ const o = new AbortController(), a = setTimeout(() => o.abort(), 6e4), l = await fetch(t, {
1048
1048
  ...r,
1049
1049
  signal: o.signal
1050
1050
  });
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;
1051
+ if (clearTimeout(a), l.status >= 400 && l.status < 500 && l.status !== 429)
1052
+ return l;
1053
+ if (!l.ok)
1054
+ throw new Error(`HTTP ${l.status}: ${l.statusText}`);
1055
+ return l;
1056
1056
  } catch (o) {
1057
1057
  s = o;
1058
- const l = ct(o);
1059
- if (!l.retryable || n === i.attempts)
1060
- throw l;
1061
- const a = dt(n, i);
1058
+ const a = ct(o);
1059
+ if (!a.retryable || n === i.attempts)
1060
+ throw a;
1061
+ const l = dt(n, i);
1062
1062
  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));
1063
+ `API request failed (attempt ${n}/${i.attempts}), retrying in ${l}ms:`,
1064
+ a.message
1065
+ ), await new Promise((d) => setTimeout(d, l));
1066
1066
  }
1067
1067
  throw s;
1068
1068
  }
@@ -1072,7 +1072,7 @@ function dt(t, r) {
1072
1072
  }
1073
1073
  class wt {
1074
1074
  constructor(r = {}) {
1075
- F(this, "config");
1075
+ _(this, "config");
1076
1076
  this.config = r;
1077
1077
  }
1078
1078
  /**
@@ -1087,8 +1087,7 @@ class wt {
1087
1087
  getHeaders() {
1088
1088
  var i;
1089
1089
  const r = {
1090
- "Content-Type": "application/json",
1091
- "X-Auth-Token": "appkey"
1090
+ "Content-Type": "application/json"
1092
1091
  };
1093
1092
  return (i = this.config) != null && i.authToken && (r.Authorization = `Bearer ${this.config.authToken}`), r;
1094
1093
  }
@@ -1108,9 +1107,9 @@ class wt {
1108
1107
  qnaId: s,
1109
1108
  question: n,
1110
1109
  answer: o,
1111
- answerDuration: l
1110
+ answerDuration: a
1112
1111
  }) {
1113
- const a = await he(
1112
+ const l = await he(
1114
1113
  `${this.getBaseUrl()}/questions/next`,
1115
1114
  {
1116
1115
  method: "POST",
@@ -1122,13 +1121,13 @@ class wt {
1122
1121
  question: n,
1123
1122
  answer: o,
1124
1123
  // TODO: Hardcoded for now, will be dynamic later
1125
- answer_duration: l ?? "00:00:30"
1124
+ answer_duration: a ?? "00:00:30"
1126
1125
  })
1127
1126
  }
1128
1127
  );
1129
- if (!a.ok)
1130
- throw new Error(`Failed to get questions: ${a.status}`);
1131
- return await a.json();
1128
+ if (!l.ok)
1129
+ throw new Error(`Failed to get questions: ${l.status}`);
1130
+ return await l.json();
1132
1131
  }
1133
1132
  }
1134
1133
  function ut() {
@@ -1185,11 +1184,11 @@ class R extends Error {
1185
1184
  }
1186
1185
  class mt {
1187
1186
  constructor(r = {}) {
1188
- F(this, "config");
1189
- F(this, "mediaRecorder", null);
1190
- F(this, "audioChunks", []);
1191
- F(this, "recordingStream", null);
1192
- F(this, "autoStopTimeoutId", null);
1187
+ _(this, "config");
1188
+ _(this, "mediaRecorder", null);
1189
+ _(this, "audioChunks", []);
1190
+ _(this, "recordingStream", null);
1191
+ _(this, "autoStopTimeoutId", null);
1193
1192
  this.config = {
1194
1193
  baseUrl: "http://localhost:8000",
1195
1194
  provider: "groq",
@@ -1241,19 +1240,19 @@ class mt {
1241
1240
  this.mediaRecorder = new MediaRecorder(this.recordingStream, {
1242
1241
  mimeType: n
1243
1242
  }), 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));
1243
+ var a;
1244
+ o.data.size > 0 && (this.audioChunks.push(o.data), (a = i == null ? void 0 : i.onDataAvailable) == null || a.call(i, o.data));
1246
1245
  }, this.mediaRecorder.onstop = () => {
1247
1246
  var o;
1248
1247
  (o = i == null ? void 0 : i.onStop) == null || o.call(i);
1249
1248
  }, this.mediaRecorder.onerror = (o) => {
1250
- var a;
1251
- const l = new R(
1249
+ var l;
1250
+ const a = new R(
1252
1251
  `Recording failed: ${o.error}`,
1253
1252
  "RECORDING_ERROR",
1254
1253
  !0
1255
1254
  );
1256
- (a = i == null ? void 0 : i.onError) == null || a.call(i, l), this.cleanup();
1255
+ (l = i == null ? void 0 : i.onError) == null || l.call(i, a), this.cleanup();
1257
1256
  }, this.mediaRecorder.start(100), (s = i == null ? void 0 : i.onStart) == null || s.call(i), r && r > 0 && (this.autoStopTimeoutId = setTimeout(() => {
1258
1257
  this.isRecording() && this.stopRecording();
1259
1258
  }, r * 1e3));
@@ -1294,8 +1293,8 @@ class mt {
1294
1293
  }
1295
1294
  const s = this.mediaRecorder, n = () => {
1296
1295
  try {
1297
- const o = s.mimeType || "audio/webm", l = new Blob(this.audioChunks, { type: o });
1298
- this.cleanup(), r(l);
1296
+ const o = s.mimeType || "audio/webm", a = new Blob(this.audioChunks, { type: o });
1297
+ this.cleanup(), r(a);
1299
1298
  } catch (o) {
1300
1299
  i(
1301
1300
  new R(
@@ -1318,7 +1317,7 @@ class mt {
1318
1317
  model: s = this.config.model,
1319
1318
  language: n = this.config.language,
1320
1319
  includeTimestamps: o = this.config.includeTimestamps,
1321
- temperature: l = this.config.temperature
1320
+ temperature: a = this.config.temperature
1322
1321
  } = r;
1323
1322
  if (!i || i.size === 0)
1324
1323
  throw new R(
@@ -1327,10 +1326,10 @@ class mt {
1327
1326
  !1
1328
1327
  );
1329
1328
  try {
1330
- const a = new FormData(), d = new File([i], "recording.wav", {
1329
+ const l = new FormData(), d = new File([i], "recording.wav", {
1331
1330
  type: i.type || "audio/wav"
1332
1331
  });
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));
1332
+ 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));
1334
1333
  const w = await he(
1335
1334
  `${this.config.baseUrl}/speech/transcribe`,
1336
1335
  {
@@ -1342,7 +1341,7 @@ class mt {
1342
1341
  Authorization: `Bearer ${this.config.authToken}`
1343
1342
  }
1344
1343
  },
1345
- body: a
1344
+ body: l
1346
1345
  },
1347
1346
  {
1348
1347
  attempts: 1,
@@ -1370,9 +1369,9 @@ class mt {
1370
1369
  return {
1371
1370
  transcript: (await w.json()).data.text ?? ""
1372
1371
  };
1373
- } catch (a) {
1374
- throw a instanceof R ? a : new R(
1375
- `Transcription failed: ${a instanceof Error ? a.message : String(a)}`,
1372
+ } catch (l) {
1373
+ throw l instanceof R ? l : new R(
1374
+ `Transcription failed: ${l instanceof Error ? l.message : String(l)}`,
1376
1375
  "TRANSCRIPTION_FAILED",
1377
1376
  !0
1378
1377
  );
@@ -1413,13 +1412,13 @@ class mt {
1413
1412
  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
1413
  }
1415
1414
  }
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);
1415
+ const J = new mt(), gt = (t = {}) => {
1416
+ const [r, i] = k(!1), [s, n] = k(!1), [o, a] = k(null), [l, d] = k(null), [w, u] = k(null);
1417
+ t.config && J.updateConfig(t.config);
1419
1418
  const h = N(async (y) => {
1420
1419
  var j;
1421
1420
  try {
1422
- d(null), l(null), u(null), await K.startRecording(y, {
1421
+ d(null), a(null), u(null), await J.startRecording(y, {
1423
1422
  onStart: () => {
1424
1423
  var f;
1425
1424
  i(!0), (f = t.onStart) == null || f.call(t);
@@ -1430,67 +1429,67 @@ const K = new mt(), xt = (t = {}) => {
1430
1429
  },
1431
1430
  onError: (f) => {
1432
1431
  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);
1432
+ const E = f instanceof R ? f : new R(f.message, "RECORDING_ERROR", !0);
1433
+ d(E), i(!1), (S = t.onError) == null || S.call(t, E);
1435
1434
  }
1436
1435
  });
1437
1436
  } catch (f) {
1438
- const T = f instanceof R ? f : new R(
1437
+ const E = f instanceof R ? f : new R(
1439
1438
  f instanceof Error ? f.message : String(f),
1440
1439
  "START_FAILED",
1441
1440
  !1
1442
1441
  );
1443
- throw d(T), i(!1), (j = t.onError) == null || j.call(t, T), T;
1442
+ throw d(E), i(!1), (j = t.onError) == null || j.call(t, E), E;
1444
1443
  }
1445
1444
  }, []), m = N(async () => {
1446
1445
  var y, j;
1447
1446
  try {
1448
- const f = await K.stopRecording();
1447
+ const f = await J.stopRecording();
1449
1448
  return u(f), i(!1), (y = t.onStop) == null || y.call(t), f;
1450
1449
  } catch (f) {
1451
- const T = f instanceof R ? f : new R(
1450
+ const E = f instanceof R ? f : new R(
1452
1451
  f instanceof Error ? f.message : String(f),
1453
1452
  "STOP_FAILED",
1454
1453
  !1
1455
1454
  );
1456
- throw d(T), i(!1), (j = t.onError) == null || j.call(t, T), T;
1455
+ throw d(E), i(!1), (j = t.onError) == null || j.call(t, E), E;
1457
1456
  }
1458
1457
  }, []), c = N(
1459
1458
  async (y, j = {}) => {
1460
- var f, T;
1459
+ var f, E;
1461
1460
  try {
1462
1461
  d(null), n(!0);
1463
1462
  const S = {
1464
1463
  audioBlob: y,
1465
1464
  ...j
1466
- }, v = await K.transcribe(S);
1467
- return l(v.transcript), n(!1), (f = t.onTranscriptionComplete) == null || f.call(t, v), v;
1465
+ }, v = await J.transcribe(S);
1466
+ return a(v.transcript), n(!1), (f = t.onTranscriptionComplete) == null || f.call(t, v), v;
1468
1467
  } catch (S) {
1469
1468
  const v = S instanceof R ? S : new R(
1470
1469
  S instanceof Error ? S.message : String(S),
1471
1470
  "TRANSCRIPTION_FAILED",
1472
1471
  !0
1473
1472
  );
1474
- throw d(v), n(!1), (T = t.onError) == null || T.call(t, v), v;
1473
+ throw d(v), n(!1), (E = t.onError) == null || E.call(t, v), v;
1475
1474
  }
1476
1475
  },
1477
1476
  []
1478
- ), g = N(() => {
1479
- K.cancelRecording(), i(!1), u(null);
1477
+ ), x = N(() => {
1478
+ J.cancelRecording(), i(!1), u(null);
1480
1479
  }, []);
1481
1480
  return {
1482
1481
  startRecording: h,
1483
1482
  stopRecording: m,
1484
1483
  transcribe: c,
1485
- cancelRecording: g,
1484
+ cancelRecording: x,
1486
1485
  isRecording: r,
1487
1486
  isTranscribing: s,
1488
1487
  transcript: o,
1489
- error: a,
1488
+ error: l,
1490
1489
  audioBlob: w
1491
1490
  };
1492
- }, gt = (t) => {
1493
- const r = E(null), i = E(!1);
1491
+ }, xt = (t) => {
1492
+ const r = T(null), i = T(!1);
1494
1493
  C(() => {
1495
1494
  const s = () => {
1496
1495
  document.hidden && (i.current = !0, r.current && (clearTimeout(r.current), r.current = null), t({
@@ -1542,8 +1541,8 @@ const K = new mt(), xt = (t = {}) => {
1542
1541
  };
1543
1542
  class pt {
1544
1543
  constructor(r = {}) {
1545
- F(this, "config");
1546
- F(this, "currentAudio", null);
1544
+ _(this, "config");
1545
+ _(this, "currentAudio", null);
1547
1546
  this.config = {
1548
1547
  baseUrl: "http://localhost:8000",
1549
1548
  provider: "piper",
@@ -1568,7 +1567,7 @@ class pt {
1568
1567
  speed: n = this.config.speed
1569
1568
  } = r, o = new URLSearchParams();
1570
1569
  o.append("text", i), o.append("voice", s || "string"), o.append("speed", (n == null ? void 0 : n.toString()) || "1");
1571
- const l = await he(
1570
+ const a = await he(
1572
1571
  `${this.config.baseUrl}/speech/synthesize`,
1573
1572
  {
1574
1573
  method: "POST",
@@ -1590,15 +1589,15 @@ class pt {
1590
1589
  jitter: !1
1591
1590
  }
1592
1591
  );
1593
- if (!l.ok)
1592
+ if (!a.ok)
1594
1593
  throw new Error(
1595
- `TTS request failed: ${l.status} ${l.statusText}`
1594
+ `TTS request failed: ${a.status} ${a.statusText}`
1596
1595
  );
1597
- const a = l.headers.get("content-type");
1598
- if (a && a.includes("audio/"))
1599
- return l.blob();
1596
+ const l = a.headers.get("content-type");
1597
+ if (l && l.includes("audio/"))
1598
+ return a.blob();
1600
1599
  try {
1601
- const d = await l.json();
1600
+ const d = await a.json();
1602
1601
  throw new Error(`TTS Error: ${JSON.stringify(d)}`);
1603
1602
  } catch {
1604
1603
  throw new Error("TTS request failed with unknown error");
@@ -1611,8 +1610,8 @@ class pt {
1611
1610
  var s, n;
1612
1611
  try {
1613
1612
  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) => {
1613
+ const o = await this.synthesizeSpeech(r), a = URL.createObjectURL(o);
1614
+ return this.currentAudio = new Audio(a), new Promise((l, d) => {
1616
1615
  if (!this.currentAudio) {
1617
1616
  d(new Error("Audio element not created"));
1618
1617
  return;
@@ -1620,22 +1619,22 @@ class pt {
1620
1619
  const w = this.currentAudio;
1621
1620
  w.onended = () => {
1622
1621
  var u;
1623
- URL.revokeObjectURL(l), this.currentAudio = null, (u = i == null ? void 0 : i.onEnd) == null || u.call(i), a();
1622
+ URL.revokeObjectURL(a), this.currentAudio = null, (u = i == null ? void 0 : i.onEnd) == null || u.call(i), l();
1624
1623
  }, w.onerror = (u) => {
1625
1624
  var m;
1626
- URL.revokeObjectURL(l), this.currentAudio = null;
1625
+ URL.revokeObjectURL(a), this.currentAudio = null;
1627
1626
  const h = new Error(`Audio playback failed: ${u}`);
1628
1627
  (m = i == null ? void 0 : i.onError) == null || m.call(i, h), d(h);
1629
1628
  }, w.play().catch((u) => {
1630
1629
  var m;
1631
- URL.revokeObjectURL(l), this.currentAudio = null;
1630
+ URL.revokeObjectURL(a), this.currentAudio = null;
1632
1631
  const h = new Error(`Failed to play audio: ${u.message}`);
1633
1632
  (m = i == null ? void 0 : i.onError) == null || m.call(i, h), d(h);
1634
1633
  });
1635
1634
  });
1636
1635
  } 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;
1636
+ const a = o instanceof Error ? o : new Error(`TTS Error: ${String(o)}`);
1637
+ throw (n = i == null ? void 0 : i.onError) == null || n.call(i, a), a;
1639
1638
  }
1640
1639
  }
1641
1640
  /**
@@ -1652,13 +1651,13 @@ class pt {
1652
1651
  }
1653
1652
  }
1654
1653
  const we = new pt(), bt = (t = {}) => {
1655
- const [r, i] = k(!1), [s, n] = k(!1), [o, l] = k(null);
1654
+ const [r, i] = k(!1), [s, n] = k(!1), [o, a] = k(null);
1656
1655
  t.config && we.updateConfig(t.config);
1657
- const a = N(
1656
+ const l = N(
1658
1657
  async (w, u = {}) => {
1659
1658
  var h;
1660
1659
  try {
1661
- l(null), n(!0);
1660
+ a(null), n(!0);
1662
1661
  const m = {
1663
1662
  text: w,
1664
1663
  ...u
@@ -1673,13 +1672,13 @@ const we = new pt(), bt = (t = {}) => {
1673
1672
  i(!1), (c = t.onEnd) == null || c.call(t);
1674
1673
  },
1675
1674
  onError: (c) => {
1676
- var g;
1677
- i(!1), n(!1), l(c), (g = t.onError) == null || g.call(t, c);
1675
+ var x;
1676
+ i(!1), n(!1), a(c), (x = t.onError) == null || x.call(t, c);
1678
1677
  }
1679
1678
  });
1680
1679
  } catch (m) {
1681
1680
  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;
1681
+ throw a(c), i(!1), n(!1), (h = t.onError) == null || h.call(t, c), c;
1683
1682
  }
1684
1683
  },
1685
1684
  [t]
@@ -1687,7 +1686,7 @@ const we = new pt(), bt = (t = {}) => {
1687
1686
  we.stop(), i(!1), n(!1);
1688
1687
  }, []);
1689
1688
  return {
1690
- speak: a,
1689
+ speak: l,
1691
1690
  stop: d,
1692
1691
  isPlaying: r,
1693
1692
  isLoading: s,
@@ -1698,13 +1697,13 @@ const we = new pt(), bt = (t = {}) => {
1698
1697
  onEnd: r,
1699
1698
  maxViolations: i = 5
1700
1699
  }) => {
1701
- const { addViolation: s } = We(), n = Ue(), o = ze(), l = E(o);
1700
+ const { addViolation: s } = We(), n = Be(), o = Ge(), a = T(o);
1702
1701
  C(() => {
1703
- l.current = o;
1702
+ a.current = o;
1704
1703
  }, [o]);
1705
- const a = N(
1704
+ const l = N(
1706
1705
  (w) => {
1707
- r && r(w, l.current);
1706
+ r && r(w, a.current);
1708
1707
  },
1709
1708
  [r]
1710
1709
  );
@@ -1719,15 +1718,97 @@ const we = new pt(), bt = (t = {}) => {
1719
1718
  timestamp: Date.now()
1720
1719
  };
1721
1720
  s(m);
1722
- const c = l.current + 1;
1723
- t && t(m, c), c >= i && a("excessive_violations");
1721
+ const c = a.current + 1;
1722
+ t && t(m, c), c >= i && l("excessive_violations");
1724
1723
  },
1725
- [s, t, i, a]
1724
+ [s, t, i, l]
1726
1725
  ),
1727
- onInterviewEnd: a,
1726
+ onInterviewEnd: l,
1728
1727
  violationCount: o,
1729
1728
  logList: n
1730
1729
  };
1730
+ }, yt = () => {
1731
+ C(() => {
1732
+ function t() {
1733
+ console.clear(), console.log(
1734
+ `
1735
+ %c
1736
+ ╔═══════════════════════════════════════════════════════════════════════╗
1737
+ ║ ║
1738
+ ║ 🤖✨ AI INTERVIEW PLATFORM ✨🤖 ║
1739
+ ║ ║
1740
+ ╚═══════════════════════════════════════════════════════════════════════╝
1741
+
1742
+ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡
1743
+ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1744
+ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
1745
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1746
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1747
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1748
+ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
1749
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1750
+ ⚡⚡⚡ ⚡⚡⚡⚡⚡ ⚡⚡⚡⚡⚡
1751
+ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
1752
+
1753
+ `,
1754
+ "color: #ff6b35; font-size: 14px; font-family: monospace; line-height: 0.8; text-shadow: 0 0 10px #ff6b35;"
1755
+ ), console.log(
1756
+ "%c🚨 SECURITY BREACH DETECTED 🚨",
1757
+ `color: #ff3366;
1758
+ font-size: 28px;
1759
+ font-weight: bold;
1760
+ text-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366;
1761
+ background: linear-gradient(45deg, #ff3366, #ff6b35);
1762
+ -webkit-background-clip: text;
1763
+ -webkit-text-fill-color: transparent;
1764
+ padding: 20px;`
1765
+ ), console.log(
1766
+ `
1767
+ %c
1768
+ ◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
1769
+ ◇ ◇
1770
+ ◆ 🔒 INTERVIEW INTEGRITY SYSTEM ACTIVATED 🔒 ◆
1771
+ ◇ ◇
1772
+ ◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
1773
+
1774
+ `,
1775
+ "color: #4ecdc4; font-size: 16px; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"
1776
+ ), console.log(
1777
+ `
1778
+ %c┌───────────────────────────────────────────────────────────┐
1779
+ │ │
1780
+ │ 🛡️ UNAUTHORIZED DEVELOPER TOOLS ACCESS DETECTED 🛡️ │
1781
+ │ │
1782
+ │ ⚠️ Your actions are being monitored and recorded │
1783
+ │ 📊 This violation has been logged with timestamp │
1784
+ │ 🚨 Interview administrators have been notified │
1785
+ │ ⏱️ Session integrity: COMPROMISED │
1786
+ │ │
1787
+ │ 💡 IMMEDIATE ACTION REQUIRED: │
1788
+ │ Close developer tools to continue interview │
1789
+ └─────────────────────────────────────────────────────────────┘`,
1790
+ "color: #ffd93d; font-size: 14px; font-family: monospace; background: rgba(255, 217, 61, 0.1); padding: 10px;"
1791
+ );
1792
+ }
1793
+ const r = { open: !1, orientation: null }, i = 160, s = setInterval(() => {
1794
+ window.outerHeight - window.innerHeight > i || window.outerWidth - window.innerWidth > i ? r.open || (r.open = !0, r.orientation = window.outerWidth - window.innerWidth > i ? "vertical" : "horizontal", t()) : r.open && (r.open = !1, console.log(
1795
+ "%c🌟 Developer tools closed. Interview continues smoothly! ✨",
1796
+ "color: #4ecdc4; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"
1797
+ ));
1798
+ }, 500), n = (a) => {
1799
+ if (a.keyCode === 123 || a.ctrlKey && a.shiftKey && (a.keyCode === 73 || a.keyCode === 74) || a.ctrlKey && a.keyCode === 85)
1800
+ return a.preventDefault(), console.log(
1801
+ "%c🎭 Nice try! Keyboard shortcuts are disabled during interviews ✨",
1802
+ "color: #ffd93d; font-weight: bold; text-shadow: 0 0 10px #ffd93d;"
1803
+ ), !1;
1804
+ }, o = (a) => (a.preventDefault(), console.log(
1805
+ "%c🌈 Right-click menu disabled for interview integrity! 🎪",
1806
+ "color: #ff9ff3; font-weight: bold; text-shadow: 0 0 10px #ff9ff3;"
1807
+ ), !1);
1808
+ return document.addEventListener("keydown", n), document.addEventListener("contextmenu", o), () => {
1809
+ clearInterval(s), document.removeEventListener("keydown", n), document.removeEventListener("contextmenu", o), delete window.showStats, delete window.interviewTips;
1810
+ };
1811
+ }, []);
1731
1812
  }, me = (t) => /* @__PURE__ */ e.jsxs(
1732
1813
  "svg",
1733
1814
  {
@@ -1750,10 +1831,10 @@ const we = new pt(), bt = (t = {}) => {
1750
1831
  /* @__PURE__ */ e.jsx("path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38" })
1751
1832
  ]
1752
1833
  }
1753
- ), yt = (t, r, i) => Math.max(r, Math.min(i, t)), be = (t) => {
1834
+ ), jt = (t, r, i) => Math.max(r, Math.min(i, t)), be = (t) => {
1754
1835
  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
1836
  return `${i}:${s}`;
1756
- }, xe = ({
1837
+ }, ge = ({
1757
1838
  total: t,
1758
1839
  remaining: r,
1759
1840
  size: i = 64,
@@ -1761,10 +1842,10 @@ const we = new pt(), bt = (t = {}) => {
1761
1842
  className: n = "",
1762
1843
  showLabel: o = !0
1763
1844
  }) => {
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" : "";
1845
+ const a = Math.max(1, t || 1), l = jt(r / a, 0, 1), { radius: d, circumference: w, dashOffset: u, center: h } = X(() => {
1846
+ const x = (i - s) / 2, y = 2 * Math.PI * x, j = y * (1 - l), f = Math.round(s) % 2 === 1, E = i / 2 + (f ? 0.5 : 0);
1847
+ return { radius: x, circumference: y, dashOffset: j, center: E };
1848
+ }, [i, s, l]), m = X(() => l <= 0.25 ? "iw-stroke-red-500" : l <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [l]), c = l <= 0.25 ? "iw-animate-pulse" : "";
1768
1849
  return /* @__PURE__ */ e.jsxs(
1769
1850
  "div",
1770
1851
  {
@@ -1820,14 +1901,14 @@ const we = new pt(), bt = (t = {}) => {
1820
1901
  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
1902
  "span",
1822
1903
  {
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"}`,
1904
+ 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"}`,
1824
1905
  children: be(r)
1825
1906
  }
1826
1907
  ) })
1827
1908
  ]
1828
1909
  }
1829
1910
  );
1830
- }, jt = ({
1911
+ }, Nt = ({
1831
1912
  label: t,
1832
1913
  error: r,
1833
1914
  fullWidth: i = !1,
@@ -1835,7 +1916,7 @@ const we = new pt(), bt = (t = {}) => {
1835
1916
  id: n,
1836
1917
  ...o
1837
1918
  }) => {
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" : "";
1919
+ 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" : "", w = i ? "iw-w-full" : "", u = s.includes("iw-h-full") || i ? "iw-h-full" : "";
1839
1920
  return /* @__PURE__ */ e.jsxs(
1840
1921
  "div",
1841
1922
  {
@@ -1844,7 +1925,7 @@ const we = new pt(), bt = (t = {}) => {
1844
1925
  t && /* @__PURE__ */ e.jsx(
1845
1926
  "label",
1846
1927
  {
1847
- htmlFor: l,
1928
+ htmlFor: a,
1848
1929
  className: "iw-block iw-text-sm iw-font-medium iw-text-gray-700 iw-mb-1",
1849
1930
  children: t
1850
1931
  }
@@ -1852,8 +1933,8 @@ const we = new pt(), bt = (t = {}) => {
1852
1933
  /* @__PURE__ */ e.jsx(
1853
1934
  "textarea",
1854
1935
  {
1855
- id: l,
1856
- className: `${a} ${d} ${w} ${u} ${s}`,
1936
+ id: a,
1937
+ className: `${l} ${d} ${w} ${u} ${s}`,
1857
1938
  "aria-invalid": r ? "true" : "false",
1858
1939
  ...o
1859
1940
  }
@@ -1862,7 +1943,7 @@ const we = new pt(), bt = (t = {}) => {
1862
1943
  ]
1863
1944
  }
1864
1945
  );
1865
- }, Nt = ({
1946
+ }, kt = ({
1866
1947
  value: t,
1867
1948
  onChange: r,
1868
1949
  onSubmit: i,
@@ -1870,8 +1951,8 @@ const we = new pt(), bt = (t = {}) => {
1870
1951
  state: n,
1871
1952
  editingTime: o
1872
1953
  }) => {
1873
- const l = (a) => {
1874
- a.key === "Enter" && (a.ctrlKey || a.metaKey) && !s && (a.preventDefault(), i());
1954
+ const a = (l) => {
1955
+ l.key === "Enter" && (l.ctrlKey || l.metaKey) && !s && (l.preventDefault(), i());
1875
1956
  };
1876
1957
  return /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-h-full ", children: [
1877
1958
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-between", children: [
@@ -1882,7 +1963,7 @@ const we = new pt(), bt = (t = {}) => {
1882
1963
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to edit: " })
1883
1964
  ] }),
1884
1965
  /* @__PURE__ */ e.jsx(
1885
- xe,
1966
+ ge,
1886
1967
  {
1887
1968
  total: o,
1888
1969
  remaining: n.currentPhaseTimeRemaining,
@@ -1894,26 +1975,26 @@ const we = new pt(), bt = (t = {}) => {
1894
1975
  ] }),
1895
1976
  /* @__PURE__ */ e.jsxs("div", { className: " iw-overflow-hidden iw-flex iw-flex-col iw-h-full iw-mt-2", children: [
1896
1977
  /* @__PURE__ */ e.jsx(
1897
- jt,
1978
+ Nt,
1898
1979
  {
1899
1980
  value: t,
1900
1981
  onChange: r,
1901
- onKeyDown: l,
1982
+ onKeyDown: a,
1902
1983
  placeholder: "Type your answer here...",
1903
1984
  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()
1985
+ onPaste: (l) => l.preventDefault(),
1986
+ onCopy: (l) => l.preventDefault(),
1987
+ onCut: (l) => l.preventDefault(),
1988
+ onDrop: (l) => l.preventDefault(),
1989
+ onDragOver: (l) => l.preventDefault()
1909
1990
  }
1910
1991
  ),
1911
1992
  /* @__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" }) })
1912
1993
  ] })
1913
1994
  ] });
1914
- }, kt = ({ className: t = "" }) => {
1995
+ }, Et = ({ className: t = "" }) => {
1915
1996
  var n;
1916
- const { authToken: r } = Ce(), i = r ? Ze(r) : null, s = E(null);
1997
+ const { authToken: r } = Se(), i = r ? Ze(r) : null, s = T(null);
1917
1998
  return C(() => {
1918
1999
  let o = null;
1919
2000
  return (async () => {
@@ -1922,11 +2003,11 @@ const we = new pt(), bt = (t = {}) => {
1922
2003
  video: !0,
1923
2004
  audio: !1
1924
2005
  }), s.current && (s.current.srcObject = o);
1925
- } catch (a) {
1926
- console.error("Error accessing camera:", a);
2006
+ } catch (l) {
2007
+ console.error("Error accessing camera:", l);
1927
2008
  }
1928
2009
  })(), () => {
1929
- o && o.getTracks().forEach((a) => a.stop());
2010
+ o && o.getTracks().forEach((l) => l.stop());
1930
2011
  };
1931
2012
  }, []), /* @__PURE__ */ e.jsxs("div", { className: `iw-relative ${t}`, children: [
1932
2013
  /* @__PURE__ */ e.jsx(
@@ -1957,7 +2038,7 @@ const we = new pt(), bt = (t = {}) => {
1957
2038
  "div",
1958
2039
  {
1959
2040
  className: "iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-p-6 ",
1960
- style: Je(i, 0.85),
2041
+ style: Ke(i, 0.85),
1961
2042
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-8", children: [
1962
2043
  /* @__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
2044
  "img",
@@ -1988,32 +2069,32 @@ const we = new pt(), bt = (t = {}) => {
1988
2069
  Tt,
1989
2070
  {
1990
2071
  question: t,
1991
- isLoading: r === D.FETCHING_QUESTION || r === D.IDLE
2072
+ isLoading: r === P.FETCHING_QUESTION || r === P.IDLE
1992
2073
  }
1993
2074
  ) }) }),
1994
2075
  /* @__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, {}) }),
2076
+ /* @__PURE__ */ e.jsx("div", { className: "iw-min-h-[400px] iw-max-h-[600px]", children: /* @__PURE__ */ e.jsx(Et, {}) }),
1996
2077
  /* @__PURE__ */ e.jsx("div", { className: "iw-bg-white iw-rounded-r-xl iw-shadow iw-p-6", children: s })
1997
2078
  ] })
1998
2079
  ]
1999
2080
  }
2000
- ), _e = ({
2081
+ ), Fe = ({
2001
2082
  isOpen: t,
2002
2083
  onClose: r,
2003
2084
  children: i,
2004
2085
  title: s,
2005
2086
  showCloseButton: n = !0,
2006
2087
  closeOnOverlayClick: o = !0,
2007
- closeOnEscape: l = !0,
2008
- className: a = ""
2088
+ closeOnEscape: a = !0,
2089
+ className: l = ""
2009
2090
  }) => {
2010
2091
  if (C(() => {
2011
- if (!t || !l) return;
2092
+ if (!t || !a) return;
2012
2093
  const u = (h) => {
2013
2094
  h.key === "Escape" && r();
2014
2095
  };
2015
2096
  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")), () => {
2097
+ }, [t, a, 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")), () => {
2017
2098
  document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container");
2018
2099
  }), [t]), !t) return null;
2019
2100
  const d = (u) => {
@@ -2029,7 +2110,7 @@ const we = new pt(), bt = (t = {}) => {
2029
2110
  /* @__PURE__ */ e.jsxs(
2030
2111
  "div",
2031
2112
  {
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}`,
2113
+ 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
2114
  role: "dialog",
2034
2115
  "aria-modal": "true",
2035
2116
  "aria-labelledby": s ? "dialog-title" : void 0,
@@ -2076,12 +2157,12 @@ const we = new pt(), bt = (t = {}) => {
2076
2157
  )
2077
2158
  ] });
2078
2159
  return $e(w, document.body);
2079
- }, Et = ({
2160
+ }, Ct = ({
2080
2161
  confirmExitInterview: t,
2081
2162
  isOpen: r,
2082
2163
  onClose: i
2083
2164
  }) => /* @__PURE__ */ e.jsx(
2084
- _e,
2165
+ Fe,
2085
2166
  {
2086
2167
  isOpen: r,
2087
2168
  onClose: i,
@@ -2107,7 +2188,11 @@ const we = new pt(), bt = (t = {}) => {
2107
2188
  /* @__PURE__ */ e.jsx(
2108
2189
  "button",
2109
2190
  {
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",
2191
+ 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",
2192
+ style: {
2193
+ background: "linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))",
2194
+ boxShadow: "0 12px 30px -16px rgba(244, 63, 94, 0.65)"
2195
+ },
2111
2196
  onClick: t,
2112
2197
  children: "Confirm exit"
2113
2198
  }
@@ -2134,7 +2219,10 @@ const we = new pt(), bt = (t = {}) => {
2134
2219
  /* @__PURE__ */ e.jsx(
2135
2220
  "button",
2136
2221
  {
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",
2222
+ className: "iw-text-sm iw-text-white iw-px-4 iw-py-2 iw-rounded-md",
2223
+ style: {
2224
+ background: "linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))"
2225
+ },
2138
2226
  onClick: () => n(!0),
2139
2227
  children: "Exit Interview"
2140
2228
  }
@@ -2142,7 +2230,7 @@ const we = new pt(), bt = (t = {}) => {
2142
2230
  ] }),
2143
2231
  /* @__PURE__ */ e.jsx("div", { className: "iw-h-px iw-bg-gray-200" }),
2144
2232
  /* @__PURE__ */ e.jsx(
2145
- Et,
2233
+ Ct,
2146
2234
  {
2147
2235
  isOpen: s,
2148
2236
  confirmExitInterview: () => {
@@ -2159,20 +2247,20 @@ const we = new pt(), bt = (t = {}) => {
2159
2247
  barWidth: s = 3,
2160
2248
  gap: n = 2,
2161
2249
  fftSize: o = 1024,
2162
- smoothingTimeConstant: l = 0.8,
2163
- mediaStream: a,
2250
+ smoothingTimeConstant: a = 0.8,
2251
+ mediaStream: l,
2164
2252
  startOnMount: d = !0
2165
2253
  }) => {
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);
2254
+ const { baseColor: w } = Z(), u = T(null), h = T(null), m = T(null), c = T(null), x = T(null), y = T(null), j = T(!1), [f, E] = k(null);
2167
2255
  C(() => {
2168
2256
  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();
2257
+ const v = h.current, F = () => {
2258
+ const D = u.current;
2259
+ if (!D) return;
2260
+ const M = v.clientWidth, g = i;
2261
+ D.width = Math.max(1, Math.floor(M * window.devicePixelRatio || 1)), D.height = Math.max(1, Math.floor(g * window.devicePixelRatio || 1));
2262
+ }, b = new ResizeObserver(F);
2263
+ return b.observe(v), F(), () => b.disconnect();
2176
2264
  }, [r, i]), C(() => {
2177
2265
  if (!r) return;
2178
2266
  const v = u.current;
@@ -2189,52 +2277,52 @@ const we = new pt(), bt = (t = {}) => {
2189
2277
  try {
2190
2278
  const b = new (window.AudioContext || window.webkitAudioContext)();
2191
2279
  m.current = b;
2192
- let P = a;
2193
- if (!P) {
2280
+ let D = l;
2281
+ if (!D) {
2194
2282
  if (!d) return;
2195
- P = await navigator.mediaDevices.getUserMedia({
2283
+ D = await navigator.mediaDevices.getUserMedia({
2196
2284
  audio: !0,
2197
2285
  video: !1
2198
2286
  }), j.current = !0;
2199
2287
  }
2200
2288
  if (v) return;
2201
2289
  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();
2290
+ M.fftSize = o, M.smoothingTimeConstant = a, c.current = M;
2291
+ const g = b.createMediaStreamSource(D);
2292
+ x.current = g, g.connect(M), S();
2205
2293
  } catch (b) {
2206
- T((b == null ? void 0 : b.message) || "Failed to initialize microphone");
2294
+ E((b == null ? void 0 : b.message) || "Failed to initialize microphone");
2207
2295
  }
2208
2296
  })(), () => {
2209
- var b, P, M, x;
2297
+ var b, D, M, g;
2210
2298
  v = !0, y.current && cancelAnimationFrame(y.current);
2211
2299
  try {
2212
- (b = g.current) == null || b.disconnect();
2300
+ (b = x.current) == null || b.disconnect();
2213
2301
  } catch {
2214
2302
  }
2215
2303
  try {
2216
- (P = c.current) == null || P.disconnect();
2304
+ (D = c.current) == null || D.disconnect();
2217
2305
  } catch {
2218
2306
  }
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();
2307
+ j.current && ((g = ((M = x.current) == null ? void 0 : M.mediaStream) || void 0) == null || g.getTracks().forEach((I) => I.stop())), m.current && m.current.state !== "closed" && m.current.close();
2220
2308
  };
2221
- }, [a, o, l, d]);
2309
+ }, [l, o, a, d]);
2222
2310
  const S = () => {
2223
- const v = u.current, _ = c.current;
2224
- if (!v || !_) return;
2311
+ const v = u.current, F = c.current;
2312
+ if (!v || !F) return;
2225
2313
  const b = v.getContext("2d");
2226
2314
  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();
2315
+ const D = window.devicePixelRatio || 1, M = v.width, g = v.height, I = F.frequencyBinCount, L = new Uint8Array(I), z = () => {
2316
+ y.current = requestAnimationFrame(z), F.getByteTimeDomainData(L), b.clearRect(0, 0, M, g), b.fillStyle = "rgba(0,0,0,0)", b.fillRect(0, 0, M, g);
2317
+ const U = Math.max(1, Math.floor(s * D)), V = Math.max(1, Math.floor(n * D)), H = U + V, O = Math.max(8, Math.floor((M + V) / H)), G = Math.floor(L.length / O);
2318
+ for (let A = 0; A < O; A++) {
2319
+ const Q = Math.min(L.length - 1, A * G), oe = L[Q] / 128 - 1, B = Math.abs(oe), le = Math.pow(B, 0.6), Y = Math.max(g * 0.06, le * (g * 0.9)), ce = A * H, de = (g - Y) / 2, K = 140 - Math.min(140, 140 * B), ee = 85, p = 48 + Math.floor(12 * (1 - B));
2320
+ b.fillStyle = `${w}`, b.shadowColor = `hsla(${K}, ${ee}%, ${p}%, ${0.25 * B})`, b.shadowBlur = 8 * B;
2321
+ const q = Math.min(U / 2, Y / 2);
2322
+ It(b, ce, de, U, Y, q), b.fill();
2235
2323
  }
2236
2324
  };
2237
- G();
2325
+ z();
2238
2326
  };
2239
2327
  return /* @__PURE__ */ e.jsxs(
2240
2328
  "div",
@@ -2249,11 +2337,11 @@ const we = new pt(), bt = (t = {}) => {
2249
2337
  }
2250
2338
  );
2251
2339
  };
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();
2340
+ function It(t, r, i, s, n, o) {
2341
+ const a = Math.min(o, s / 2, n / 2);
2342
+ t.beginPath(), t.moveTo(r + a, i), t.lineTo(r + s - a, i), t.quadraticCurveTo(r + s, i, r + s, i + a), t.lineTo(r + s, i + n - a), t.quadraticCurveTo(r + s, i + n, r + s - a, i + n), t.lineTo(r + a, i + n), t.quadraticCurveTo(r, i + n, r, i + n - a), t.lineTo(r, i + a), t.quadraticCurveTo(r, i, r + a, i), t.closePath();
2255
2343
  }
2256
- const It = ({
2344
+ const Rt = ({
2257
2345
  state: t,
2258
2346
  answeringTime: r,
2259
2347
  nextPhase: i,
@@ -2268,7 +2356,7 @@ const It = ({
2268
2356
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to talk: " })
2269
2357
  ] }),
2270
2358
  /* @__PURE__ */ e.jsx(
2271
- xe,
2359
+ ge,
2272
2360
  {
2273
2361
  total: r,
2274
2362
  remaining: t.currentPhaseTimeRemaining,
@@ -2297,7 +2385,7 @@ const It = ({
2297
2385
  }
2298
2386
  ) })
2299
2387
  ] });
2300
- function Rt() {
2388
+ function Mt() {
2301
2389
  const [t, r] = k(!0), i = X(
2302
2390
  () => [0, 1, 2].map((s) => ({ id: s })),
2303
2391
  []
@@ -2309,7 +2397,7 @@ function Rt() {
2309
2397
  return () => clearInterval(s);
2310
2398
  }, []), /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full", children: [
2311
2399
  /* @__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;
2400
+ const o = n * 50, a = t ? o : o + 12, l = t ? 1 : 0.08, d = n * 140;
2313
2401
  return /* @__PURE__ */ e.jsx(
2314
2402
  "div",
2315
2403
  {
@@ -2317,8 +2405,8 @@ function Rt() {
2317
2405
  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
2406
  style: {
2319
2407
  top: 0,
2320
- transform: `translateY(${l}px)`,
2321
- opacity: a,
2408
+ transform: `translateY(${a}px)`,
2409
+ opacity: l,
2322
2410
  transition: `transform 600ms cubic-bezier(.2,.9,.3,1) ${d}ms, opacity 400ms ease ${d}ms`
2323
2411
  },
2324
2412
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-gap-3 iw-items-center", children: [
@@ -2335,7 +2423,7 @@ function Rt() {
2335
2423
  /* @__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
2424
  ] });
2337
2425
  }
2338
- const Mt = ({
2426
+ const At = ({
2339
2427
  size: t = "192px",
2340
2428
  className: r,
2341
2429
  colors: i,
@@ -2349,7 +2437,7 @@ const Mt = ({
2349
2437
  // Pastel blue
2350
2438
  c3: "oklch(78% 0.14 280)"
2351
2439
  // 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;
2440
+ }, ...i }, a = parseInt(t.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), w = 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
2441
  return /* @__PURE__ */ e.jsx(
2354
2442
  "div",
2355
2443
  {
@@ -2362,7 +2450,7 @@ const Mt = ({
2362
2450
  "--c2": o.c2,
2363
2451
  "--c3": o.c3,
2364
2452
  "--animation-duration": `${s}s`,
2365
- "--blur-amount": `${a}px`,
2453
+ "--blur-amount": `${l}px`,
2366
2454
  "--contrast-amount": m,
2367
2455
  "--dot-size": `${w}px`,
2368
2456
  "--shadow-spread": `${u}px`,
@@ -2477,9 +2565,9 @@ const Mt = ({
2477
2565
  }
2478
2566
  );
2479
2567
  };
2480
- function At({ ttsError: t }) {
2568
+ function Dt({ ttsError: t }) {
2481
2569
  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" }),
2570
+ /* @__PURE__ */ e.jsx(At, { size: "80px" }),
2483
2571
  t && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2484
2572
  "Audio playback failed: ",
2485
2573
  t.message
@@ -2498,7 +2586,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2498
2586
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to think: " })
2499
2587
  ] }),
2500
2588
  /* @__PURE__ */ e.jsx(
2501
- xe,
2589
+ ge,
2502
2590
  {
2503
2591
  total: r,
2504
2592
  remaining: t.currentPhaseTimeRemaining,
@@ -2516,7 +2604,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2516
2604
  children: "Start Answering"
2517
2605
  }
2518
2606
  ) })
2519
- ] }), Dt = ({ sttError: t }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
2607
+ ] }), Ft = ({ sttError: t }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
2520
2608
  /* @__PURE__ */ e.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 60 60", fill: "none", children: [
2521
2609
  /* @__PURE__ */ e.jsx(
2522
2610
  "rect",
@@ -2594,7 +2682,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2594
2682
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" })
2595
2683
  ]
2596
2684
  }
2597
- ), Ft = (t) => /* @__PURE__ */ e.jsxs(
2685
+ ), Lt = (t) => /* @__PURE__ */ e.jsxs(
2598
2686
  "svg",
2599
2687
  {
2600
2688
  xmlns: "http://www.w3.org/2000/svg",
@@ -2612,7 +2700,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2612
2700
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "3" })
2613
2701
  ]
2614
2702
  }
2615
- ), Lt = (t) => /* @__PURE__ */ e.jsxs(
2703
+ ), $t = (t) => /* @__PURE__ */ e.jsxs(
2616
2704
  "svg",
2617
2705
  {
2618
2706
  xmlns: "http://www.w3.org/2000/svg",
@@ -2654,7 +2742,7 @@ const Pt = ({ state: t, thinkingTime: r, nextPhase: i }) => /* @__PURE__ */ e.js
2654
2742
  /* @__PURE__ */ e.jsx("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })
2655
2743
  ]
2656
2744
  }
2657
- ), $t = (t) => /* @__PURE__ */ e.jsxs(
2745
+ ), Ot = (t) => /* @__PURE__ */ e.jsxs(
2658
2746
  "svg",
2659
2747
  {
2660
2748
  xmlns: "http://www.w3.org/2000/svg",
@@ -2683,17 +2771,17 @@ function qt({
2683
2771
  violationType: s,
2684
2772
  onDisqualify: n
2685
2773
  }) {
2686
- const [o, l] = k(10), a = E(r);
2774
+ const [o, a] = k(10), l = T(r);
2687
2775
  if (C(() => {
2688
- a.current = r;
2776
+ l.current = r;
2689
2777
  }, [r]), C(() => {
2690
2778
  if (!t) return;
2691
2779
  const m = setInterval(() => {
2692
- l((c) => c <= 1 ? (a.current(), 10) : c - 1);
2780
+ a((c) => c <= 1 ? (l.current(), 10) : c - 1);
2693
2781
  }, 1e3);
2694
2782
  return () => clearInterval(m);
2695
2783
  }, [t]), C(() => {
2696
- t && l(10);
2784
+ t && a(10);
2697
2785
  }, [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")), () => {
2698
2786
  document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container");
2699
2787
  }), [t]), !t) return null;
@@ -2703,19 +2791,19 @@ function qt({
2703
2791
  return {
2704
2792
  title: "Tab Switch Detected",
2705
2793
  description: "You attempted to switch to another tab or reload application.",
2706
- icon: /* @__PURE__ */ e.jsx(Ft, { className: "iw-h-5 iw-w-5" })
2794
+ icon: /* @__PURE__ */ e.jsx(Lt, { className: "iw-h-5 iw-w-5" })
2707
2795
  };
2708
2796
  case "fullscreen_exit":
2709
2797
  return {
2710
2798
  title: "Full Screen Exit Detected",
2711
2799
  description: "You attempted to exit full screen mode.",
2712
- icon: /* @__PURE__ */ e.jsx(De, { className: "iw-h-5 iw-w-5" })
2800
+ icon: /* @__PURE__ */ e.jsx(Pe, { className: "iw-h-5 iw-w-5" })
2713
2801
  };
2714
2802
  case "focus_loss":
2715
2803
  return {
2716
2804
  title: "Focus Loss Detected",
2717
2805
  description: "You lost focus from the interview window.",
2718
- icon: /* @__PURE__ */ e.jsx(Lt, { className: "iw-h-5 iw-w-5" })
2806
+ icon: /* @__PURE__ */ e.jsx($t, { className: "iw-h-5 iw-w-5" })
2719
2807
  };
2720
2808
  case "blocked_shortcut":
2721
2809
  return {
@@ -2727,7 +2815,7 @@ function qt({
2727
2815
  return {
2728
2816
  title: "Right Click Attempted",
2729
2817
  description: "You attempted to use the right click.",
2730
- icon: /* @__PURE__ */ e.jsx($t, { className: "iw-h-5 iw-w-5" })
2818
+ icon: /* @__PURE__ */ e.jsx(Ot, { className: "iw-h-5 iw-w-5" })
2731
2819
  };
2732
2820
  case "alt_tab_attempt":
2733
2821
  return {
@@ -2776,17 +2864,27 @@ function qt({
2776
2864
  ] })
2777
2865
  ] })
2778
2866
  ] }),
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" })
2867
+ /* @__PURE__ */ e.jsx(
2868
+ "div",
2869
+ {
2870
+ className: "iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-p-5",
2871
+ style: {
2872
+ background: "linear-gradient(to right, rgb(254, 242, 242), rgb(254, 245, 235))",
2873
+ borderColor: "rgb(254, 226, 226)"
2874
+ },
2875
+ children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-4", children: [
2876
+ /* @__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 }),
2877
+ /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
2878
+ /* @__PURE__ */ e.jsx("h3", { className: "iw-mb-2 iw-font-semibold iw-text-gray-900", children: w.title }),
2879
+ /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-leading-relaxed iw-text-gray-700", children: w.description }),
2880
+ /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600", children: [
2881
+ /* @__PURE__ */ e.jsx(De, { className: "iw-h-3 iw-w-3" }),
2882
+ /* @__PURE__ */ e.jsx("span", { children: "This action is monitored for interview integrity" })
2883
+ ] })
2884
+ ] })
2787
2885
  ] })
2788
- ] })
2789
- ] }) }),
2886
+ }
2887
+ ),
2790
2888
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mb-5 iw-grid iw-grid-cols-2 iw-gap-3", children: [
2791
2889
  /* @__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
2890
  /* @__PURE__ */ e.jsx("div", { className: "iw-mb-1 iw-text-2xl iw-font-bold iw-text-amber-600", children: u }),
@@ -2800,13 +2898,22 @@ function qt({
2800
2898
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-primary-700 iw-text-xs iw-font-medium", children: "Auto Close" })
2801
2899
  ] }) })
2802
2900
  ] }),
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
- ] }) })
2901
+ u === 1 && /* @__PURE__ */ e.jsx(
2902
+ "div",
2903
+ {
2904
+ className: "iw-mb-5 iw-rounded-2xl iw-p-4 iw-text-white",
2905
+ style: {
2906
+ background: "linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"
2907
+ },
2908
+ children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-3", children: [
2909
+ /* @__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" }) }),
2910
+ /* @__PURE__ */ e.jsxs("div", { children: [
2911
+ /* @__PURE__ */ e.jsx("div", { className: "iw-text-sm iw-font-semibold", children: "Final Warning" }),
2912
+ /* @__PURE__ */ e.jsx("div", { className: "iw-text-xs iw-text-red-100", children: "Next violation will disqualify you from this interview" })
2913
+ ] })
2914
+ ] })
2915
+ }
2916
+ )
2810
2917
  ] }),
2811
2918
  /* @__PURE__ */ e.jsxs("div", { className: "iw-p-6 iw-pt-0", children: [
2812
2919
  /* @__PURE__ */ e.jsx(
@@ -2821,7 +2928,7 @@ function qt({
2821
2928
  ] })
2822
2929
  ] }) });
2823
2930
  }
2824
- const Ot = (t) => /* @__PURE__ */ e.jsxs(
2931
+ const Ut = (t) => /* @__PURE__ */ e.jsxs(
2825
2932
  "svg",
2826
2933
  {
2827
2934
  xmlns: "http://www.w3.org/2000/svg",
@@ -2839,7 +2946,7 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2839
2946
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" })
2840
2947
  ]
2841
2948
  }
2842
- ), Bt = ({
2949
+ ), zt = ({
2843
2950
  showHardReloadWarning: t,
2844
2951
  onContinue: r
2845
2952
  }) => {
@@ -2847,7 +2954,7 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2847
2954
  r();
2848
2955
  };
2849
2956
  return /* @__PURE__ */ e.jsxs(
2850
- _e,
2957
+ Fe,
2851
2958
  {
2852
2959
  isOpen: t,
2853
2960
  onClose: i,
@@ -2868,7 +2975,7 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2868
2975
  onClick: i,
2869
2976
  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
2977
  children: [
2871
- /* @__PURE__ */ e.jsx(Ot, { className: "iw-size-4" }),
2978
+ /* @__PURE__ */ e.jsx(Ut, { className: "iw-size-4" }),
2872
2979
  "Continue Session"
2873
2980
  ]
2874
2981
  }
@@ -2876,15 +2983,15 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2876
2983
  ]
2877
2984
  }
2878
2985
  );
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({
2986
+ }, Bt = ({ children: t, onDisqualify: r }) => {
2987
+ const [i, s] = k(!1), [n, o] = k(!1), [a, l] = k("fullscreen_exit"), { logViolation: d, violationCount: w } = vt({
2881
2988
  maxViolations: 5,
2882
- onViolation: (g) => {
2883
- n || (s(!0), a(g.type));
2989
+ onViolation: (x) => {
2990
+ n || (s(!0), l(x.type));
2884
2991
  }
2885
2992
  }), { enterFullScreen: u, isFullScreen: h, exitFullScreen: m } = lt({
2886
- onFullScreenChange(g) {
2887
- !g && !n && (s(!0), d({
2993
+ onFullScreenChange(x) {
2994
+ !x && !n && (s(!0), d({
2888
2995
  type: "fullscreen_exit",
2889
2996
  severity: "high",
2890
2997
  details: {
@@ -2896,7 +3003,7 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2896
3003
  });
2897
3004
  C(() => {
2898
3005
  u();
2899
- }, []), gt(d), ht(d), ft();
3006
+ }, []), xt(d), ht(d), ft(), yt();
2900
3007
  const c = () => {
2901
3008
  o(!0), m(), s(!1), r == null || r();
2902
3009
  };
@@ -2907,7 +3014,7 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2907
3014
  {
2908
3015
  warningCount: w,
2909
3016
  isOpen: i,
2910
- violationType: l,
3017
+ violationType: a,
2911
3018
  onClose: () => {
2912
3019
  s(!1), u();
2913
3020
  },
@@ -2915,7 +3022,7 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2915
3022
  }
2916
3023
  ),
2917
3024
  !i && w > 0 && !n && /* @__PURE__ */ e.jsx(
2918
- Bt,
3025
+ zt,
2919
3026
  {
2920
3027
  showHardReloadWarning: !h,
2921
3028
  logViolation: d,
@@ -2923,30 +3030,30 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2923
3030
  }
2924
3031
  )
2925
3032
  ] });
2926
- }, Ut = ({
3033
+ }, Gt = ({
2927
3034
  interviewTitle: t,
2928
3035
  interviewId: r,
2929
3036
  onComplete: i,
2930
3037
  onDisqualify: s,
2931
3038
  className: n = ""
2932
3039
  }) => {
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 = {
3040
+ const o = ut(), { baseUrl: a, authToken: l } = Se(), { timers: d, stt: w, tts: u, proctoring: h } = He(), [m, c] = k(null), [x, y] = k(""), j = T(""), f = T(null), E = {
2934
3041
  thinkingTime: (d == null ? void 0 : d.thinkingDuration) || 30,
2935
3042
  answeringTime: (d == null ? void 0 : d.answeringDuration) || 120,
2936
3043
  editingTime: (d == null ? void 0 : d.editingDuration) || 30
2937
- }, { thinkingTime: S, answeringTime: v, editingTime: _ } = T;
3044
+ }, { thinkingTime: S, answeringTime: v, editingTime: F } = E;
2938
3045
  C(() => {
2939
- j.current = g;
2940
- }, [g]);
2941
- const b = E(!1), {
2942
- speak: P,
3046
+ j.current = x;
3047
+ }, [x]);
3048
+ const b = T(!1), {
3049
+ speak: D,
2943
3050
  stop: M,
2944
- error: x
3051
+ error: g
2945
3052
  } = bt({
2946
3053
  config: {
2947
- baseUrl: l,
3054
+ baseUrl: a,
2948
3055
  provider: u == null ? void 0 : u.provider,
2949
- authToken: a
3056
+ authToken: l
2950
3057
  },
2951
3058
  onEnd: () => {
2952
3059
  b.current = !1, A();
@@ -2954,18 +3061,18 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2954
3061
  onError: () => {
2955
3062
  b.current || (b.current = !0, A());
2956
3063
  }
2957
- }), I = E(!1), L = E(!1), {
2958
- startRecording: G,
2959
- stopRecording: B,
3064
+ }), I = T(!1), L = T(!1), {
3065
+ startRecording: z,
3066
+ stopRecording: U,
2960
3067
  transcribe: V,
2961
3068
  error: H
2962
- } = xt({
3069
+ } = gt({
2963
3070
  config: {
2964
- baseUrl: l,
3071
+ baseUrl: a,
2965
3072
  provider: w == null ? void 0 : w.provider,
2966
3073
  model: w == null ? void 0 : w.model,
2967
3074
  language: w == null ? void 0 : w.language,
2968
- authToken: a
3075
+ authToken: l
2969
3076
  },
2970
3077
  onStart: () => {
2971
3078
  I.current = !1, L.current = !1;
@@ -2978,28 +3085,28 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
2978
3085
  onError: (p) => {
2979
3086
  console.error("STT Error:", p), I.current || (I.current = !0, A());
2980
3087
  }
2981
- }), { state: q, startQuestion: z, nextPhase: A, completeInterview: Q } = at({
3088
+ }), { state: O, startQuestion: G, nextPhase: A, completeInterview: Q } = at({
2982
3089
  config: {
2983
3090
  thinkingDuration: S,
2984
3091
  answeringDuration: v,
2985
- editingDuration: _
3092
+ editingDuration: F
2986
3093
  },
2987
3094
  callbacks: {
2988
3095
  onPhaseChange: (p) => {
2989
3096
  switch (p) {
2990
- case D.FETCHING_QUESTION:
3097
+ case P.FETCHING_QUESTION:
2991
3098
  oe();
2992
3099
  break;
2993
- case D.READING_QUESTION:
3100
+ case P.READING_QUESTION:
2994
3101
  Y();
2995
3102
  break;
2996
- case D.ANSWERING:
3103
+ case P.ANSWERING:
2997
3104
  ce();
2998
3105
  break;
2999
- case D.TRANSCRIBING:
3106
+ case P.TRANSCRIBING:
3000
3107
  de();
3001
3108
  break;
3002
- case D.SUBMITTING:
3109
+ case P.SUBMITTING:
3003
3110
  le();
3004
3111
  break;
3005
3112
  }
@@ -3010,15 +3117,15 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
3010
3117
  }
3011
3118
  });
3012
3119
  C(() => {
3013
- z();
3120
+ G();
3014
3121
  }, []);
3015
- const { execute: oe, loading: U } = ot(
3122
+ const { execute: oe, loading: B } = ot(
3016
3123
  async () => {
3017
- var O, ge;
3124
+ var q, xe;
3018
3125
  const p = await o.generateQuestion({
3019
3126
  interviewId: r,
3020
- question: ((O = f.current) == null ? void 0 : O.question) || "",
3021
- qnaId: ((ge = f.current) == null ? void 0 : ge.qna_id) || "",
3127
+ question: ((q = f.current) == null ? void 0 : q.question) || "",
3128
+ qnaId: ((xe = f.current) == null ? void 0 : xe.qna_id) || "",
3022
3129
  answer: j.current
3023
3130
  });
3024
3131
  return f.current = p.data, p;
@@ -3032,108 +3139,108 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
3032
3139
  }
3033
3140
  }
3034
3141
  ), le = N(async () => {
3035
- z();
3036
- }, [z]), Y = N(async () => {
3142
+ G();
3143
+ }, [G]), Y = N(async () => {
3037
3144
  var p;
3038
3145
  if ((p = f.current) != null && p.question)
3039
3146
  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);
3147
+ b.current = !1, await D(f.current.question), f.current.is_interview_done && (await Je(2e3), Q());
3148
+ } catch (q) {
3149
+ console.error("Failed to speak question:", q);
3043
3150
  }
3044
3151
  else
3045
3152
  A();
3046
- }, [P, A, Q]), ce = N(async () => {
3153
+ }, [D, A, Q]), ce = N(async () => {
3047
3154
  try {
3048
- await G(v);
3155
+ await z(v);
3049
3156
  } catch (p) {
3050
3157
  console.error("Failed to start recording:", p), A();
3051
3158
  }
3052
- }, [G, A]), de = N(async () => {
3159
+ }, [z, A]), de = N(async () => {
3053
3160
  try {
3054
- const p = await B();
3161
+ const p = await U();
3055
3162
  await V(p);
3056
3163
  } catch (p) {
3057
3164
  console.error("STT processing failed:", p), !I.current && !L.current && (I.current = !0, A());
3058
3165
  }
3059
- }, [B, V, A]), J = N(
3166
+ }, [U, V, A]), K = N(
3060
3167
  async (p) => {
3061
3168
  M(), (await o.generateQuestion({
3062
3169
  interviewId: r,
3063
3170
  isInterviewDone: !0
3064
- })).success && (p == null || p(), Q());
3171
+ })).success && (p == null || p(), Q(), sessionStorage.removeItem("proctoring-storage"));
3065
3172
  },
3066
3173
  [r, M, o]
3067
3174
  ), ee = () => {
3068
- const { phase: p } = q;
3175
+ const { phase: p } = O;
3069
3176
  switch (p) {
3070
- case D.IDLE:
3177
+ case P.IDLE:
3071
3178
  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
3179
  /* @__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
3180
  /* @__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" })
3181
+ /* @__PURE__ */ e.jsx(W, { onClick: G, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
3075
3182
  ] });
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:
3183
+ case P.FETCHING_QUESTION:
3184
+ return /* @__PURE__ */ e.jsx(Mt, {});
3185
+ case P.READING_QUESTION:
3186
+ return /* @__PURE__ */ e.jsx(Dt, { ttsError: g });
3187
+ case P.THINKING:
3081
3188
  return /* @__PURE__ */ e.jsx(
3082
3189
  Pt,
3083
3190
  {
3084
- state: q,
3191
+ state: O,
3085
3192
  thinkingTime: S,
3086
3193
  nextPhase: A
3087
3194
  }
3088
3195
  );
3089
- case D.ANSWERING:
3196
+ case P.ANSWERING:
3090
3197
  return /* @__PURE__ */ e.jsx(
3091
- It,
3198
+ Rt,
3092
3199
  {
3093
- state: q,
3200
+ state: O,
3094
3201
  answeringTime: v,
3095
3202
  nextPhase: A,
3096
3203
  sttError: H
3097
3204
  }
3098
3205
  );
3099
- case D.TRANSCRIBING:
3100
- return /* @__PURE__ */ e.jsx(Dt, { sttError: H });
3101
- case D.EDITING:
3102
- case D.SUBMITTING:
3206
+ case P.TRANSCRIBING:
3207
+ return /* @__PURE__ */ e.jsx(Ft, { sttError: H });
3208
+ case P.EDITING:
3209
+ case P.SUBMITTING:
3103
3210
  return /* @__PURE__ */ e.jsx("div", { className: "iw-space-y-4 iw-h-full", children: /* @__PURE__ */ e.jsx(
3104
- Nt,
3211
+ kt,
3105
3212
  {
3106
- value: g,
3107
- onChange: (O) => y(O.target.value),
3213
+ value: x,
3214
+ onChange: (q) => y(q.target.value),
3108
3215
  onSubmit: () => A(),
3109
- isSubmitDisabled: !g.trim() || U,
3110
- state: q,
3111
- editingTime: _
3216
+ isSubmitDisabled: !x.trim() || B,
3217
+ state: O,
3218
+ editingTime: F
3112
3219
  }
3113
3220
  ) });
3114
- case D.COMPLETED:
3221
+ case P.COMPLETED:
3115
3222
  return null;
3116
3223
  default:
3117
3224
  return null;
3118
3225
  }
3119
3226
  };
3120
3227
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: h != null && h.enabled ? /* @__PURE__ */ e.jsxs(
3121
- Gt,
3228
+ Bt,
3122
3229
  {
3123
- onDisqualify: () => J(s),
3230
+ onDisqualify: () => K(s),
3124
3231
  children: [
3125
3232
  /* @__PURE__ */ e.jsx(
3126
3233
  ye,
3127
3234
  {
3128
3235
  title: t,
3129
- onExit: () => J()
3236
+ onExit: () => K()
3130
3237
  }
3131
3238
  ),
3132
3239
  /* @__PURE__ */ e.jsx(
3133
3240
  ve,
3134
3241
  {
3135
3242
  currentQuestion: m,
3136
- phase: q.phase,
3243
+ phase: O.phase,
3137
3244
  className: n,
3138
3245
  children: ee()
3139
3246
  }
@@ -3145,34 +3252,34 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
3145
3252
  ye,
3146
3253
  {
3147
3254
  title: t,
3148
- onExit: () => J()
3255
+ onExit: () => K()
3149
3256
  }
3150
3257
  ),
3151
3258
  /* @__PURE__ */ e.jsx(
3152
3259
  ve,
3153
3260
  {
3154
3261
  currentQuestion: m,
3155
- phase: q.phase,
3262
+ phase: O.phase,
3156
3263
  className: n,
3157
3264
  children: ee()
3158
3265
  }
3159
3266
  )
3160
3267
  ] }) });
3161
- }, zt = ({
3268
+ }, Wt = ({
3162
3269
  title: t,
3163
3270
  interviewId: r,
3164
3271
  onInterviewEnd: i,
3165
3272
  onInterviewDisqualify: s,
3166
3273
  className: n = ""
3167
3274
  }) => {
3168
- const [o, l] = fe.useState(!1), [a, d] = fe.useState(!0), w = E(null);
3275
+ const [o, a] = fe.useState(!1), [l, d] = fe.useState(!0), w = T(null);
3169
3276
  return o ? /* @__PURE__ */ e.jsx("div", { className: "interview-widget-container", children: /* @__PURE__ */ e.jsx(
3170
3277
  "div",
3171
3278
  {
3172
3279
  ref: w,
3173
3280
  className: `iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${n}`,
3174
3281
  children: /* @__PURE__ */ e.jsx("div", { className: " iw-h-full iw-flex iw-flex-col", children: /* @__PURE__ */ e.jsx(
3175
- Ut,
3282
+ Gt,
3176
3283
  {
3177
3284
  interviewTitle: t ?? "Interview",
3178
3285
  interviewId: r,
@@ -3186,19 +3293,19 @@ const Ot = (t) => /* @__PURE__ */ e.jsxs(
3186
3293
  ) }) : /* @__PURE__ */ e.jsx("div", { className: "interview-widget-container", children: /* @__PURE__ */ e.jsx(
3187
3294
  it,
3188
3295
  {
3189
- isOpen: a,
3296
+ isOpen: l,
3190
3297
  onStart: () => {
3191
- l(!0), d(!1);
3298
+ a(!0), d(!1);
3192
3299
  }
3193
3300
  }
3194
3301
  ) });
3195
3302
  };
3196
3303
  typeof window < "u" && (window.InterviewWidget = {
3197
- InterviewWidget: zt,
3304
+ InterviewWidget: Wt,
3198
3305
  InterviewWidgetProvider: Ve
3199
3306
  });
3200
3307
  export {
3201
- zt as InterviewWidget,
3308
+ Wt as InterviewWidget,
3202
3309
  Ve as InterviewWidgetProvider,
3203
- zt as default
3310
+ Wt as default
3204
3311
  };