@evelan/jexity-widget 0.19.3-canary.50 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +458 -454
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +294 -290
- package/dist/react.mjs.map +1 -1
- package/dist/types/module/visitor/visitor.state.d.ts.map +1 -1
- package/dist/widget.js +11 -11
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createContext as ds, useState as hs, useRef as Bi, useEffect as ps, createElement as er, useContext as gs } from "react";
|
|
2
2
|
const co = ds(null);
|
|
3
|
-
function
|
|
3
|
+
function Cp(t) {
|
|
4
4
|
const { children: e, ...i } = t, [n, r] = hs(!1), o = Bi(null), a = Bi(null), l = Bi(null), c = i.mode === "embedded";
|
|
5
5
|
ps(() => {
|
|
6
6
|
let h = !1;
|
|
7
|
-
return Promise.resolve().then(() =>
|
|
7
|
+
return Promise.resolve().then(() => _p).then(
|
|
8
8
|
(g) => {
|
|
9
9
|
if (h)
|
|
10
10
|
return;
|
|
@@ -40,7 +40,7 @@ function _p(t) {
|
|
|
40
40
|
}) : e
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Ip() {
|
|
44
44
|
const t = gs(co);
|
|
45
45
|
if (!t)
|
|
46
46
|
throw new Error("useJexityChat must be used within a <JexityChatProvider>");
|
|
@@ -4495,7 +4495,7 @@ function Fc(t, e, i) {
|
|
|
4495
4495
|
});
|
|
4496
4496
|
return I(() => {
|
|
4497
4497
|
r({ config: null, settled: !1 });
|
|
4498
|
-
const o = i ?? "https://
|
|
4498
|
+
const o = i ?? "https://festive-mouse-978.eu-west-1.convex.cloud", a = o ? ua(o) : void 0;
|
|
4499
4499
|
if (!a || !t) {
|
|
4500
4500
|
r({ config: null, settled: !0 });
|
|
4501
4501
|
return;
|
|
@@ -4559,7 +4559,7 @@ function Qc({
|
|
|
4559
4559
|
preExcludedPaths: o
|
|
4560
4560
|
}) {
|
|
4561
4561
|
I(() => {
|
|
4562
|
-
const a = n ?? "https://
|
|
4562
|
+
const a = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", l = a ? ua(a) : void 0;
|
|
4563
4563
|
if (!l || !t)
|
|
4564
4564
|
return;
|
|
4565
4565
|
if (ca.value = { orgSlug: t, projSlug: e, siteUrl: l }, i) {
|
|
@@ -5161,11 +5161,15 @@ function Xc(t) {
|
|
|
5161
5161
|
};
|
|
5162
5162
|
}, [t]);
|
|
5163
5163
|
}
|
|
5164
|
-
const ga = "jex-session-history", fa = ga, ma = 1440 * 60 * 1e3, re = q([]), pe = q(null), Fe = q(void 0), mn = q(!1), zn = pn(() => re.value.length > 0), xt = q(null);
|
|
5165
|
-
function
|
|
5166
|
-
|
|
5164
|
+
const ga = "jex-session-history", fa = ga, ma = 1440 * 60 * 1e3, re = q([]), pe = q(null), Fe = q(void 0), mn = q(!1), zn = pn(() => re.value.length > 0), xt = q(null), eu = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", tu = 6;
|
|
5165
|
+
function iu() {
|
|
5166
|
+
let t = "";
|
|
5167
|
+
const e = new Uint8Array(1);
|
|
5168
|
+
for (; t.length < tu; )
|
|
5169
|
+
crypto.getRandomValues(e), e[0] < 252 && (t += eu[e[0] % 36]);
|
|
5170
|
+
return "JEX-" + t;
|
|
5167
5171
|
}
|
|
5168
|
-
function
|
|
5172
|
+
function nu(t) {
|
|
5169
5173
|
if (t === null)
|
|
5170
5174
|
return null;
|
|
5171
5175
|
if (typeof t == "number" && Number.isFinite(t) && t >= 0)
|
|
@@ -5177,10 +5181,10 @@ function xa(t, e, i) {
|
|
|
5177
5181
|
const n = typeof i == "number" ? i : ma;
|
|
5178
5182
|
return t.filter((r) => e - r.lastActivityAt <= n);
|
|
5179
5183
|
}
|
|
5180
|
-
function
|
|
5184
|
+
function ru(t, e, i, n) {
|
|
5181
5185
|
return i ? xa(t, e, n) : t;
|
|
5182
5186
|
}
|
|
5183
|
-
function
|
|
5187
|
+
function ou(t) {
|
|
5184
5188
|
try {
|
|
5185
5189
|
const e = sessionStorage.getItem(fa);
|
|
5186
5190
|
if (!e)
|
|
@@ -5189,7 +5193,7 @@ function nu(t) {
|
|
|
5189
5193
|
if (i.v !== 1 || !Array.isArray(i.entries))
|
|
5190
5194
|
return Fe.value = void 0, [];
|
|
5191
5195
|
const n = Object.prototype.hasOwnProperty.call(i, "timeoutMs");
|
|
5192
|
-
return Fe.value =
|
|
5196
|
+
return Fe.value = nu(i.timeoutMs), ru(
|
|
5193
5197
|
i.entries,
|
|
5194
5198
|
t,
|
|
5195
5199
|
n,
|
|
@@ -5206,17 +5210,17 @@ function ni(t) {
|
|
|
5206
5210
|
} catch {
|
|
5207
5211
|
}
|
|
5208
5212
|
}
|
|
5209
|
-
function
|
|
5210
|
-
const t = Date.now(), e =
|
|
5213
|
+
function au() {
|
|
5214
|
+
const t = Date.now(), e = ou(t);
|
|
5211
5215
|
re.value = e, ni(e), pe.value = e[e.length - 1]?.ref ?? null, mn.value = !0;
|
|
5212
5216
|
}
|
|
5213
|
-
function
|
|
5217
|
+
function su(t) {
|
|
5214
5218
|
Fe.value = t;
|
|
5215
5219
|
const e = Date.now(), i = xa(re.value, e, t), n = pe.value !== null && !i.some((r) => r.ref === pe.value);
|
|
5216
5220
|
return re.value = i, n && (pe.value = null), ni(i), { activeRefPruned: n };
|
|
5217
5221
|
}
|
|
5218
5222
|
function Lr() {
|
|
5219
|
-
const t =
|
|
5223
|
+
const t = iu(), e = Date.now(), i = [...re.value, { ref: t, startedAt: e, lastActivityAt: e }];
|
|
5220
5224
|
return re.value = i, pe.value = t, ni(i), t;
|
|
5221
5225
|
}
|
|
5222
5226
|
function zr() {
|
|
@@ -5240,10 +5244,10 @@ const ue = q(ba());
|
|
|
5240
5244
|
function ba() {
|
|
5241
5245
|
return zn.value ? [{ id: "home" }] : [{ id: "home" }, { id: "chat" }];
|
|
5242
5246
|
}
|
|
5243
|
-
function
|
|
5247
|
+
function lu() {
|
|
5244
5248
|
ue.value = ba();
|
|
5245
5249
|
}
|
|
5246
|
-
const
|
|
5250
|
+
const cu = q("screen");
|
|
5247
5251
|
function $e(t) {
|
|
5248
5252
|
ue.value = [...ue.value, t];
|
|
5249
5253
|
}
|
|
@@ -5253,18 +5257,18 @@ function $n() {
|
|
|
5253
5257
|
function xn(t) {
|
|
5254
5258
|
ue.value = [...ue.value.slice(0, -1), t];
|
|
5255
5259
|
}
|
|
5256
|
-
const
|
|
5257
|
-
function
|
|
5260
|
+
const uu = 6e4, Qt = q(!1), bn = q(!1), vn = /* @__PURE__ */ new Set();
|
|
5261
|
+
function du(t) {
|
|
5258
5262
|
return vn.add(t), () => {
|
|
5259
5263
|
vn.delete(t);
|
|
5260
5264
|
};
|
|
5261
5265
|
}
|
|
5262
|
-
function
|
|
5266
|
+
function hu() {
|
|
5263
5267
|
const t = pe.value;
|
|
5264
5268
|
return t ? re.value.find((e) => e.ref === t)?.lastActivityAt ?? null : null;
|
|
5265
5269
|
}
|
|
5266
5270
|
function $r(t) {
|
|
5267
|
-
const e =
|
|
5271
|
+
const e = hu();
|
|
5268
5272
|
return e === null ? !1 : Date.now() - e > t;
|
|
5269
5273
|
}
|
|
5270
5274
|
function yn() {
|
|
@@ -5287,7 +5291,7 @@ function yn() {
|
|
|
5287
5291
|
function ci() {
|
|
5288
5292
|
Qt.value && (Qt.value = !1);
|
|
5289
5293
|
}
|
|
5290
|
-
function
|
|
5294
|
+
function pu(t = ma) {
|
|
5291
5295
|
let e = document.visibilityState === "hidden" ? Date.now() : null;
|
|
5292
5296
|
const i = () => {
|
|
5293
5297
|
if (document.visibilityState === "hidden") {
|
|
@@ -5299,12 +5303,12 @@ function du(t = ma) {
|
|
|
5299
5303
|
document.addEventListener("visibilitychange", i);
|
|
5300
5304
|
const n = setInterval(() => {
|
|
5301
5305
|
bn.value || $r(t) && yn();
|
|
5302
|
-
},
|
|
5306
|
+
}, uu);
|
|
5303
5307
|
return () => {
|
|
5304
5308
|
document.removeEventListener("visibilitychange", i), clearInterval(n), e = null;
|
|
5305
5309
|
};
|
|
5306
5310
|
}
|
|
5307
|
-
function
|
|
5311
|
+
function gu(t) {
|
|
5308
5312
|
const e = {}, { primaryColor: i, theme: n } = t;
|
|
5309
5313
|
if (i && (e["--jex-primary"] = i, e["--jex-bg-trigger"] = i, e["--jex-bg-header"] = i, e["--jex-bg-msg-user"] = i, e["--jex-bg-send-btn"] = i), t.accentColor && (e["--jex-accent"] = t.accentColor), n?.bg) {
|
|
5310
5314
|
const r = n.bg;
|
|
@@ -5330,7 +5334,7 @@ function Oi({ size: t = 24 }) {
|
|
|
5330
5334
|
/* @__PURE__ */ s("path", { d: "M9 13v2" })
|
|
5331
5335
|
] });
|
|
5332
5336
|
}
|
|
5333
|
-
function
|
|
5337
|
+
function fu() {
|
|
5334
5338
|
const t = _();
|
|
5335
5339
|
return ue.value.length > 1 ? /* @__PURE__ */ s(
|
|
5336
5340
|
"button",
|
|
@@ -5342,7 +5346,7 @@ function pu() {
|
|
|
5342
5346
|
}
|
|
5343
5347
|
) : /* @__PURE__ */ s(Oi, { size: 24 });
|
|
5344
5348
|
}
|
|
5345
|
-
function
|
|
5349
|
+
function mu({ title: t }) {
|
|
5346
5350
|
return /* @__PURE__ */ s("div", { class: "jex-header-info", children: /* @__PURE__ */ s("h3", { children: t }) });
|
|
5347
5351
|
}
|
|
5348
5352
|
function va({ size: t = 28 }) {
|
|
@@ -5351,7 +5355,7 @@ function va({ size: t = 28 }) {
|
|
|
5351
5355
|
/* @__PURE__ */ s("path", { d: "m6 6 12 12" })
|
|
5352
5356
|
] });
|
|
5353
5357
|
}
|
|
5354
|
-
function
|
|
5358
|
+
function xu() {
|
|
5355
5359
|
const t = _();
|
|
5356
5360
|
return /* @__PURE__ */ s(
|
|
5357
5361
|
"button",
|
|
@@ -5367,20 +5371,20 @@ function fu() {
|
|
|
5367
5371
|
}
|
|
5368
5372
|
);
|
|
5369
5373
|
}
|
|
5370
|
-
function
|
|
5374
|
+
function bu({ action: t, showClose: e = !0 }) {
|
|
5371
5375
|
return !t && !e ? null : /* @__PURE__ */ s("div", { class: "jex-header-right", children: [
|
|
5372
5376
|
t,
|
|
5373
|
-
e && /* @__PURE__ */ s(
|
|
5377
|
+
e && /* @__PURE__ */ s(xu, {})
|
|
5374
5378
|
] });
|
|
5375
5379
|
}
|
|
5376
5380
|
function Dr({ title: t, rightAction: e, showClose: i = !0 }) {
|
|
5377
5381
|
return /* @__PURE__ */ s("header", { class: "jex-chat-header", children: [
|
|
5378
|
-
/* @__PURE__ */ s(
|
|
5379
|
-
/* @__PURE__ */ s(
|
|
5380
|
-
/* @__PURE__ */ s(
|
|
5382
|
+
/* @__PURE__ */ s(fu, {}),
|
|
5383
|
+
/* @__PURE__ */ s(mu, { title: t }),
|
|
5384
|
+
/* @__PURE__ */ s(bu, { action: e, showClose: i })
|
|
5381
5385
|
] });
|
|
5382
5386
|
}
|
|
5383
|
-
function
|
|
5387
|
+
function vu({ size: t = 14 }) {
|
|
5384
5388
|
return /* @__PURE__ */ s("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" }) });
|
|
5385
5389
|
}
|
|
5386
5390
|
function Ur() {
|
|
@@ -5392,7 +5396,7 @@ function Ur() {
|
|
|
5392
5396
|
rel: "noopener noreferrer",
|
|
5393
5397
|
class: "jex-branding",
|
|
5394
5398
|
children: [
|
|
5395
|
-
/* @__PURE__ */ s(
|
|
5399
|
+
/* @__PURE__ */ s(vu, { size: 14 }),
|
|
5396
5400
|
/* @__PURE__ */ s("span", { children: [
|
|
5397
5401
|
"Powered by ",
|
|
5398
5402
|
/* @__PURE__ */ s("strong", { children: "Jexity" })
|
|
@@ -5404,7 +5408,7 @@ function Ur() {
|
|
|
5404
5408
|
function ya({ size: t = 28 }) {
|
|
5405
5409
|
return /* @__PURE__ */ s("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
5406
5410
|
}
|
|
5407
|
-
function
|
|
5411
|
+
function yu({ size: t = 24, ...e }) {
|
|
5408
5412
|
return /* @__PURE__ */ s(
|
|
5409
5413
|
"svg",
|
|
5410
5414
|
{
|
|
@@ -5421,37 +5425,37 @@ function bu({ size: t = 24, ...e }) {
|
|
|
5421
5425
|
}
|
|
5422
5426
|
);
|
|
5423
5427
|
}
|
|
5424
|
-
const
|
|
5428
|
+
const ku = {
|
|
5425
5429
|
chat: /* @__PURE__ */ s(ya, { size: 28 }),
|
|
5426
5430
|
bot: /* @__PURE__ */ s(Oi, { size: 28 }),
|
|
5427
|
-
sparkles: /* @__PURE__ */ s(
|
|
5428
|
-
},
|
|
5431
|
+
sparkles: /* @__PURE__ */ s(yu, { size: 28 })
|
|
5432
|
+
}, wu = {
|
|
5429
5433
|
none: "0px",
|
|
5430
5434
|
sm: "0.5rem",
|
|
5431
5435
|
md: "0.75rem",
|
|
5432
5436
|
lg: "1.25rem",
|
|
5433
5437
|
full: "9999px"
|
|
5434
5438
|
};
|
|
5435
|
-
function
|
|
5439
|
+
function ju({ radius: t = "full", iconOption: e = "chat", label: i }) {
|
|
5436
5440
|
const n = _(), r = i ?? n.fabLabel, o = r !== "";
|
|
5437
5441
|
return /* @__PURE__ */ s(
|
|
5438
5442
|
"button",
|
|
5439
5443
|
{
|
|
5440
5444
|
class: `jex-floating-button${V.value ? "" : " jex-fab-pulse"}${!V.value && o ? " jex-has-label" : ""}`,
|
|
5441
|
-
style: { borderRadius:
|
|
5445
|
+
style: { borderRadius: wu[t] ?? "9999px" },
|
|
5442
5446
|
onClick: () => {
|
|
5443
5447
|
V.value = !V.value;
|
|
5444
5448
|
},
|
|
5445
5449
|
"aria-label": V.value ? n.closeChatAriaLabel : n.openChatAriaLabel,
|
|
5446
5450
|
children: V.value ? /* @__PURE__ */ s(va, { size: 28 }) : /* @__PURE__ */ s("div", { class: "jex-fab-inner", children: [
|
|
5447
|
-
|
|
5451
|
+
ku[e],
|
|
5448
5452
|
o && /* @__PURE__ */ s("span", { class: "jex-fab-label", children: r })
|
|
5449
5453
|
] })
|
|
5450
5454
|
}
|
|
5451
5455
|
);
|
|
5452
5456
|
}
|
|
5453
5457
|
const Ti = q(!1);
|
|
5454
|
-
function
|
|
5458
|
+
function _u(t, e) {
|
|
5455
5459
|
return e ? `jex-proactive-dismissed:${t}:${e}` : `jex-proactive-dismissed:${t}`;
|
|
5456
5460
|
}
|
|
5457
5461
|
function Br(t) {
|
|
@@ -5461,22 +5465,22 @@ function Br(t) {
|
|
|
5461
5465
|
return !1;
|
|
5462
5466
|
}
|
|
5463
5467
|
}
|
|
5464
|
-
function
|
|
5468
|
+
function Su(t) {
|
|
5465
5469
|
try {
|
|
5466
5470
|
sessionStorage.setItem(t, "1");
|
|
5467
5471
|
} catch {
|
|
5468
5472
|
}
|
|
5469
5473
|
}
|
|
5470
|
-
function
|
|
5474
|
+
function Cu(t) {
|
|
5471
5475
|
return t.isOpen || t.mode === "off" || t.hasHistory || t.dismissed ? "skip" : t.mode === "teaser" ? "teaser" : "open";
|
|
5472
5476
|
}
|
|
5473
|
-
function
|
|
5477
|
+
function Iu({ title: t, message: e, guardKey: i }) {
|
|
5474
5478
|
const n = _();
|
|
5475
5479
|
function r() {
|
|
5476
5480
|
Ti.value = !1, V.value = !0;
|
|
5477
5481
|
}
|
|
5478
5482
|
function o(a) {
|
|
5479
|
-
a.stopPropagation(),
|
|
5483
|
+
a.stopPropagation(), Su(i), Ti.value = !1;
|
|
5480
5484
|
}
|
|
5481
5485
|
return /* @__PURE__ */ s(
|
|
5482
5486
|
"div",
|
|
@@ -5513,7 +5517,7 @@ function Su({ title: t, message: e, guardKey: i }) {
|
|
|
5513
5517
|
);
|
|
5514
5518
|
}
|
|
5515
5519
|
const wt = q("");
|
|
5516
|
-
function
|
|
5520
|
+
function Tu(t) {
|
|
5517
5521
|
if (!t)
|
|
5518
5522
|
return;
|
|
5519
5523
|
const e = t.trim().split(/\s+/)[0];
|
|
@@ -5529,36 +5533,36 @@ function ka() {
|
|
|
5529
5533
|
function wa() {
|
|
5530
5534
|
ka() && (Wt.value = !0);
|
|
5531
5535
|
}
|
|
5532
|
-
function
|
|
5536
|
+
function Ru() {
|
|
5533
5537
|
Dn.value = !0, Wt.value = !1;
|
|
5534
5538
|
}
|
|
5535
5539
|
function Vr() {
|
|
5536
5540
|
Dn.value = !1, Wt.value = !1, Ri.value = null;
|
|
5537
5541
|
}
|
|
5538
|
-
const Ue = q([]),
|
|
5539
|
-
function
|
|
5542
|
+
const Ue = q([]), Au = 4, Pu = 8 * 1024 * 1024;
|
|
5543
|
+
function Eu() {
|
|
5540
5544
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
|
|
5541
5545
|
}
|
|
5542
|
-
function
|
|
5543
|
-
const e = Array.from(t).filter((r) => r.type.startsWith("image/") && r.size <=
|
|
5546
|
+
function qu(t) {
|
|
5547
|
+
const e = Array.from(t).filter((r) => r.type.startsWith("image/") && r.size <= Pu);
|
|
5544
5548
|
if (e.length === 0)
|
|
5545
5549
|
return;
|
|
5546
|
-
const i =
|
|
5550
|
+
const i = Au - Ue.value.length;
|
|
5547
5551
|
if (i <= 0)
|
|
5548
5552
|
return;
|
|
5549
5553
|
const n = e.slice(0, i).map((r) => ({
|
|
5550
5554
|
// Falls back to a non-crypto id when host page is HTTP — see genAttachmentId.
|
|
5551
|
-
id:
|
|
5555
|
+
id: Eu(),
|
|
5552
5556
|
file: r,
|
|
5553
5557
|
previewUrl: URL.createObjectURL(r)
|
|
5554
5558
|
}));
|
|
5555
5559
|
Ue.value = [...Ue.value, ...n];
|
|
5556
5560
|
}
|
|
5557
|
-
function
|
|
5561
|
+
function Nu(t) {
|
|
5558
5562
|
const e = Ue.value.find((i) => i.id === t);
|
|
5559
5563
|
e && URL.revokeObjectURL(e.previewUrl), Ue.value = Ue.value.filter((i) => i.id !== t);
|
|
5560
5564
|
}
|
|
5561
|
-
function
|
|
5565
|
+
function Mu() {
|
|
5562
5566
|
for (const t of Ue.value)
|
|
5563
5567
|
URL.revokeObjectURL(t.previewUrl);
|
|
5564
5568
|
Ue.value = [];
|
|
@@ -5583,8 +5587,8 @@ function ja(t, e) {
|
|
|
5583
5587
|
};
|
|
5584
5588
|
return new Proxy({}, i);
|
|
5585
5589
|
}
|
|
5586
|
-
const
|
|
5587
|
-
|
|
5590
|
+
const Lu = () => ja("components", []), oe = Al;
|
|
5591
|
+
Lu();
|
|
5588
5592
|
function _a({ sessionId: t, visitorId: e, ensureSession: i }) {
|
|
5589
5593
|
const n = rt(oe.functions.chat.public.conversations.send);
|
|
5590
5594
|
return async function(r) {
|
|
@@ -5598,7 +5602,7 @@ function _a({ sessionId: t, visitorId: e, ensureSession: i }) {
|
|
|
5598
5602
|
const o = t && e ? { sessionId: t, visitorId: e } : await i();
|
|
5599
5603
|
if (!o)
|
|
5600
5604
|
return;
|
|
5601
|
-
wt.value = "",
|
|
5605
|
+
wt.value = "", Mu();
|
|
5602
5606
|
try {
|
|
5603
5607
|
const a = await n({
|
|
5604
5608
|
sessionId: o.sessionId,
|
|
@@ -5615,7 +5619,7 @@ function _a({ sessionId: t, visitorId: e, ensureSession: i }) {
|
|
|
5615
5619
|
}
|
|
5616
5620
|
};
|
|
5617
5621
|
}
|
|
5618
|
-
function
|
|
5622
|
+
function zu() {
|
|
5619
5623
|
const t = Ht.value, e = Fr.value;
|
|
5620
5624
|
I(() => {
|
|
5621
5625
|
if (t === null)
|
|
@@ -5632,29 +5636,29 @@ function Mu() {
|
|
|
5632
5636
|
const i = t !== null, n = i ? Math.max(0, Math.ceil((t - e) / 1e3)) : 0;
|
|
5633
5637
|
return { isActive: i, remainingSeconds: n };
|
|
5634
5638
|
}
|
|
5635
|
-
function
|
|
5636
|
-
const t = _(), { isActive: e, remainingSeconds: i } =
|
|
5639
|
+
function Ou() {
|
|
5640
|
+
const t = _(), { isActive: e, remainingSeconds: i } = zu();
|
|
5637
5641
|
return e ? /* @__PURE__ */ s("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(i)) }) : null;
|
|
5638
5642
|
}
|
|
5639
5643
|
const gt = q(null), Kt = q(null);
|
|
5640
5644
|
function Sa() {
|
|
5641
5645
|
Kt.value = null;
|
|
5642
5646
|
}
|
|
5643
|
-
function
|
|
5647
|
+
function $u() {
|
|
5644
5648
|
const t = _(), e = gt.value;
|
|
5645
5649
|
if (e === null)
|
|
5646
5650
|
return null;
|
|
5647
5651
|
const i = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
|
|
5648
5652
|
return /* @__PURE__ */ s("div", { class: "jex-session-error-notice", role: "alert", "aria-live": "assertive", children: i });
|
|
5649
5653
|
}
|
|
5650
|
-
function
|
|
5654
|
+
function Du({ size: t = 18 }) {
|
|
5651
5655
|
return /* @__PURE__ */ s("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
5652
5656
|
/* @__PURE__ */ s("path", { d: "M22 2 11 13" }),
|
|
5653
5657
|
/* @__PURE__ */ s("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
|
|
5654
5658
|
] });
|
|
5655
5659
|
}
|
|
5656
5660
|
const Qr = 132;
|
|
5657
|
-
function
|
|
5661
|
+
function Uu({ onSend: t }) {
|
|
5658
5662
|
const e = be(null), i = be(null);
|
|
5659
5663
|
I(() => {
|
|
5660
5664
|
const l = e.current;
|
|
@@ -5672,7 +5676,7 @@ function $u({ onSend: t }) {
|
|
|
5672
5676
|
}
|
|
5673
5677
|
function o(l) {
|
|
5674
5678
|
const c = l.currentTarget;
|
|
5675
|
-
c.files && c.files.length > 0 &&
|
|
5679
|
+
c.files && c.files.length > 0 && qu(c.files), c.value = "";
|
|
5676
5680
|
}
|
|
5677
5681
|
function a(l) {
|
|
5678
5682
|
const c = l.target;
|
|
@@ -5680,8 +5684,8 @@ function $u({ onSend: t }) {
|
|
|
5680
5684
|
}
|
|
5681
5685
|
return { textareaRef: e, fileInputRef: i, onKeyDown: n, onAttachClick: r, onFilesPicked: o, onCardClick: a };
|
|
5682
5686
|
}
|
|
5683
|
-
function
|
|
5684
|
-
const o = _(), a = wt, l = Ue, { textareaRef: c, fileInputRef: u, onKeyDown: h, onAttachClick: g, onFilesPicked: d, onCardClick: p } =
|
|
5687
|
+
function Bu({ isStreaming: t, disabled: e, inputDisabled: i, onSend: n, onFocus: r }) {
|
|
5688
|
+
const o = _(), a = wt, l = Ue, { textareaRef: c, fileInputRef: u, onKeyDown: h, onAttachClick: g, onFilesPicked: d, onCardClick: p } = Uu({ onSend: n }), f = a.value.trim().length > 0, y = l.value.length > 0, m = (f || y) && !e;
|
|
5685
5689
|
return /* @__PURE__ */ s("div", { class: "jex-composer-card", onClick: p, children: [
|
|
5686
5690
|
y && /* @__PURE__ */ s("div", { class: "jex-composer-attachments", role: "list", children: l.value.map((b) => /* @__PURE__ */ s("div", { class: "jex-attachment-chip", role: "listitem", children: [
|
|
5687
5691
|
/* @__PURE__ */ s("img", { src: b.previewUrl, alt: b.file.name, class: "jex-attachment-thumb" }),
|
|
@@ -5692,7 +5696,7 @@ function Du({ isStreaming: t, disabled: e, inputDisabled: i, onSend: n, onFocus:
|
|
|
5692
5696
|
class: "jex-attachment-remove",
|
|
5693
5697
|
"aria-label": o.removeAttachmentAriaLabel,
|
|
5694
5698
|
onClick: () => {
|
|
5695
|
-
|
|
5699
|
+
Nu(b.id);
|
|
5696
5700
|
},
|
|
5697
5701
|
children: /* @__PURE__ */ s("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
5698
5702
|
/* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -5769,7 +5773,7 @@ function Du({ isStreaming: t, disabled: e, inputDisabled: i, onSend: n, onFocus:
|
|
|
5769
5773
|
onClick: n,
|
|
5770
5774
|
"aria-label": o.sendAriaLabel,
|
|
5771
5775
|
disabled: e || !f && !y,
|
|
5772
|
-
children: /* @__PURE__ */ s(
|
|
5776
|
+
children: /* @__PURE__ */ s(Du, { size: 16 })
|
|
5773
5777
|
}
|
|
5774
5778
|
)
|
|
5775
5779
|
] })
|
|
@@ -5822,7 +5826,7 @@ function Hr({ variant: t, isOpen: e = !1, onAcknowledge: i }) {
|
|
|
5822
5826
|
)
|
|
5823
5827
|
] });
|
|
5824
5828
|
}
|
|
5825
|
-
function
|
|
5829
|
+
function Fu({
|
|
5826
5830
|
sessionId: t,
|
|
5827
5831
|
visitorId: e,
|
|
5828
5832
|
isLoading: i,
|
|
@@ -5833,7 +5837,7 @@ function Uu({
|
|
|
5833
5837
|
}) {
|
|
5834
5838
|
const l = _(), c = wt, u = Mn.value, h = _a({ sessionId: t, visitorId: e, ensureSession: o }), g = Ht.value !== null && Ht.value > Date.now(), d = i || n || g, p = u === "explicit" && Wt.value;
|
|
5835
5839
|
function f() {
|
|
5836
|
-
|
|
5840
|
+
Ru();
|
|
5837
5841
|
const m = Ri.value;
|
|
5838
5842
|
Ri.value = null, m && h(m);
|
|
5839
5843
|
}
|
|
@@ -5857,12 +5861,12 @@ function Uu({
|
|
|
5857
5861
|
!m || d || await h(m);
|
|
5858
5862
|
}
|
|
5859
5863
|
return /* @__PURE__ */ s("div", { class: "jex-chat-input", children: [
|
|
5860
|
-
/* @__PURE__ */ s(
|
|
5861
|
-
/* @__PURE__ */ s(
|
|
5864
|
+
/* @__PURE__ */ s(Ou, {}),
|
|
5865
|
+
/* @__PURE__ */ s($u, {}),
|
|
5862
5866
|
u === "chip" && /* @__PURE__ */ s(Hr, { variant: "chip" }),
|
|
5863
5867
|
/* @__PURE__ */ s("div", { class: `jex-chat-input-composer-gate${p ? " jex-chat-input-composer-gate-open" : ""}`, children: [
|
|
5864
5868
|
/* @__PURE__ */ s(
|
|
5865
|
-
|
|
5869
|
+
Bu,
|
|
5866
5870
|
{
|
|
5867
5871
|
isStreaming: n,
|
|
5868
5872
|
disabled: d,
|
|
@@ -5882,14 +5886,14 @@ function Uu({
|
|
|
5882
5886
|
] })
|
|
5883
5887
|
] });
|
|
5884
5888
|
}
|
|
5885
|
-
const
|
|
5889
|
+
const Vu = (...t) => t.filter((e, i, n) => !!e && e.trim() !== "" && n.indexOf(e) === i).join(" ").trim(), Wr = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Qu = (t) => t.replace(
|
|
5886
5890
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
5887
5891
|
(e, i, n) => n ? n.toUpperCase() : i.toLowerCase()
|
|
5888
5892
|
), Kr = (t) => {
|
|
5889
|
-
const e =
|
|
5893
|
+
const e = Qu(t);
|
|
5890
5894
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
5891
5895
|
};
|
|
5892
|
-
var
|
|
5896
|
+
var Hu = {
|
|
5893
5897
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5894
5898
|
width: 24,
|
|
5895
5899
|
height: 24,
|
|
@@ -5900,12 +5904,12 @@ var Vu = {
|
|
|
5900
5904
|
"stroke-linecap": "round",
|
|
5901
5905
|
"stroke-linejoin": "round"
|
|
5902
5906
|
};
|
|
5903
|
-
const
|
|
5907
|
+
const Wu = (t) => {
|
|
5904
5908
|
for (const e in t)
|
|
5905
5909
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
5906
5910
|
return !0;
|
|
5907
5911
|
return !1;
|
|
5908
|
-
},
|
|
5912
|
+
}, Ku = ({
|
|
5909
5913
|
color: t = "currentColor",
|
|
5910
5914
|
size: e = 24,
|
|
5911
5915
|
strokeWidth: i = 2,
|
|
@@ -5917,23 +5921,23 @@ const Qu = (t) => {
|
|
|
5917
5921
|
}) => xe(
|
|
5918
5922
|
"svg",
|
|
5919
5923
|
{
|
|
5920
|
-
...
|
|
5924
|
+
...Hu,
|
|
5921
5925
|
width: String(e),
|
|
5922
5926
|
height: e,
|
|
5923
5927
|
stroke: t,
|
|
5924
5928
|
"stroke-width": n ? Number(i) * 24 / Number(e) : i,
|
|
5925
5929
|
class: ["lucide", a].join(" "),
|
|
5926
|
-
...!r && !
|
|
5930
|
+
...!r && !Wu(l) && { "aria-hidden": "true" },
|
|
5927
5931
|
...l
|
|
5928
5932
|
},
|
|
5929
5933
|
[...o.map(([c, u]) => xe(c, u)), ...Ee(r)]
|
|
5930
|
-
),
|
|
5934
|
+
), Gu = (t, e) => {
|
|
5931
5935
|
const i = ({ class: n = "", className: r = "", children: o, ...a }) => xe(
|
|
5932
|
-
|
|
5936
|
+
Ku,
|
|
5933
5937
|
{
|
|
5934
5938
|
...a,
|
|
5935
5939
|
iconNode: e,
|
|
5936
|
-
class:
|
|
5940
|
+
class: Vu(
|
|
5937
5941
|
`lucide-${Wr(Kr(t))}`,
|
|
5938
5942
|
`lucide-${Wr(t)}`,
|
|
5939
5943
|
n,
|
|
@@ -5943,7 +5947,7 @@ const Qu = (t) => {
|
|
|
5943
5947
|
o
|
|
5944
5948
|
);
|
|
5945
5949
|
return i.displayName = Kr(t), i;
|
|
5946
|
-
},
|
|
5950
|
+
}, Ju = Gu("corner-up-left", [
|
|
5947
5951
|
["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
|
|
5948
5952
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
|
|
5949
5953
|
]);
|
|
@@ -5962,14 +5966,14 @@ function A(t, e = "") {
|
|
|
5962
5966
|
}, getRegex: () => new RegExp(i, e) };
|
|
5963
5967
|
return n;
|
|
5964
5968
|
}
|
|
5965
|
-
var
|
|
5969
|
+
var Zu = (() => {
|
|
5966
5970
|
try {
|
|
5967
5971
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
5968
5972
|
} catch {
|
|
5969
5973
|
return !1;
|
|
5970
5974
|
}
|
|
5971
|
-
})(), se = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) },
|
|
5972
|
-
]`).replace("lheading", Ta).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() },
|
|
5975
|
+
})(), se = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Yu = /^(?:[ \t]*(?:\n|$))+/, Xu = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ed = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ri = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, td = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Bn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Ia = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ta = A(Ia).replace(/bull/g, Bn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), id = A(Ia).replace(/bull/g, Bn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Fn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, nd = /^[^\n]+/, Vn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, rd = A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Vn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), od = A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Bn).getRegex(), $i = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Qn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ad = A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Qn).replace("tag", $i).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ra = A(Fn).replace("hr", ri).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $i).getRegex(), sd = A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ra).getRegex(), Hn = { blockquote: sd, code: Xu, def: rd, fences: ed, heading: td, hr: ri, html: ad, lheading: Ta, list: od, newline: Yu, paragraph: Ra, table: Xe, text: nd }, Gr = A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ri).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $i).getRegex(), ld = { ...Hn, lheading: id, table: Gr, paragraph: A(Fn).replace("hr", ri).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $i).getRegex() }, cd = { ...Hn, html: A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Qn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Xe, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: A(Fn).replace("hr", ri).replace("heading", ` *#{1,6} *[^
|
|
5976
|
+
]`).replace("lheading", Ta).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ud = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, dd = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Aa = /^( {2,}|\\)\n(?!\s*$)/, hd = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ct = /[\p{P}\p{S}]/u, Di = /[\s\p{P}\p{S}]/u, Wn = /[^\s\p{P}\p{S}]/u, pd = A(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Di).getRegex(), Pa = /(?!~)[\p{P}\p{S}]/u, gd = /(?!~)[\s\p{P}\p{S}]/u, fd = /(?:[^\s\p{P}\p{S}]|~)/u, md = A(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Zu ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ea = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, xd = A(Ea, "u").replace(/punct/g, Ct).getRegex(), bd = A(Ea, "u").replace(/punct/g, Pa).getRegex(), qa = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", vd = A(qa, "gu").replace(/notPunctSpace/g, Wn).replace(/punctSpace/g, Di).replace(/punct/g, Ct).getRegex(), yd = A(qa, "gu").replace(/notPunctSpace/g, fd).replace(/punctSpace/g, gd).replace(/punct/g, Pa).getRegex(), kd = A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Wn).replace(/punctSpace/g, Di).replace(/punct/g, Ct).getRegex(), wd = A(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ct).getRegex(), jd = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", _d = A(jd, "gu").replace(/notPunctSpace/g, Wn).replace(/punctSpace/g, Di).replace(/punct/g, Ct).getRegex(), Sd = A(/\\(punct)/, "gu").replace(/punct/g, Ct).getRegex(), Cd = A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Id = A(Qn).replace("(?:-->|$)", "-->").getRegex(), Td = A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Id).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ai = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Rd = A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ai).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Na = A(/^!?\[(label)\]\[(ref)\]/).replace("label", Ai).replace("ref", Vn).getRegex(), Ma = A(/^!?\[(ref)\](?:\[\])?/).replace("ref", Vn).getRegex(), Ad = A("reflink|nolink(?!\\()", "g").replace("reflink", Na).replace("nolink", Ma).getRegex(), Jr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Kn = { _backpedal: Xe, anyPunctuation: Sd, autolink: Cd, blockSkip: md, br: Aa, code: dd, del: Xe, delLDelim: Xe, delRDelim: Xe, emStrongLDelim: xd, emStrongRDelimAst: vd, emStrongRDelimUnd: kd, escape: ud, link: Rd, nolink: Ma, punctuation: pd, reflink: Na, reflinkSearch: Ad, tag: Td, text: hd, url: Xe }, Pd = { ...Kn, link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Ai).getRegex(), reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ai).getRegex() }, kn = { ...Kn, emStrongRDelimAst: yd, emStrongLDelim: bd, delLDelim: wd, delRDelim: _d, url: A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Jr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Jr).getRegex() }, Ed = { ...kn, br: A(Aa).replace("{2,}", "*").getRegex(), text: A(kn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ui = { normal: Hn, gfm: ld, pedantic: cd }, At = { normal: Kn, gfm: kn, breaks: Ed, pedantic: Pd }, qd = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Zr = (t) => qd[t];
|
|
5973
5977
|
function Te(t, e) {
|
|
5974
5978
|
if (e) {
|
|
5975
5979
|
if (se.escapeTest.test(t)) return t.replace(se.escapeReplace, Zr);
|
|
@@ -6003,7 +6007,7 @@ function Pt(t, e, i) {
|
|
|
6003
6007
|
r++;
|
|
6004
6008
|
return t.slice(0, n - r);
|
|
6005
6009
|
}
|
|
6006
|
-
function
|
|
6010
|
+
function Nd(t, e) {
|
|
6007
6011
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
6008
6012
|
let i = 0;
|
|
6009
6013
|
for (let n = 0; n < t.length; n++) if (t[n] === "\\") n++;
|
|
@@ -6011,7 +6015,7 @@ function Ed(t, e) {
|
|
|
6011
6015
|
else if (t[n] === e[1] && (i--, i < 0)) return n;
|
|
6012
6016
|
return i > 0 ? -2 : -1;
|
|
6013
6017
|
}
|
|
6014
|
-
function
|
|
6018
|
+
function Md(t, e = 0) {
|
|
6015
6019
|
let i = e, n = "";
|
|
6016
6020
|
for (let r of t) if (r === " ") {
|
|
6017
6021
|
let o = 4 - i % 4;
|
|
@@ -6025,7 +6029,7 @@ function eo(t, e, i, n, r) {
|
|
|
6025
6029
|
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: i, href: o, title: a, text: l, tokens: n.inlineTokens(l) };
|
|
6026
6030
|
return n.state.inLink = !1, c;
|
|
6027
6031
|
}
|
|
6028
|
-
function
|
|
6032
|
+
function Ld(t, e, i) {
|
|
6029
6033
|
let n = t.match(i.other.indentCodeCompensation);
|
|
6030
6034
|
if (n === null) return e;
|
|
6031
6035
|
let r = n[1];
|
|
@@ -6060,7 +6064,7 @@ var Pi = class {
|
|
|
6060
6064
|
fences(t) {
|
|
6061
6065
|
let e = this.rules.block.fences.exec(t);
|
|
6062
6066
|
if (e) {
|
|
6063
|
-
let i = e[0], n =
|
|
6067
|
+
let i = e[0], n = Ld(i, e[3] || "", this.rules);
|
|
6064
6068
|
return { type: "code", raw: i, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: n };
|
|
6065
6069
|
}
|
|
6066
6070
|
}
|
|
@@ -6130,7 +6134,7 @@ ${h}` : h;
|
|
|
6130
6134
|
let c = !1, u = "", h = "";
|
|
6131
6135
|
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
6132
6136
|
u = e[0], t = t.substring(u.length);
|
|
6133
|
-
let g =
|
|
6137
|
+
let g = Md(e[2].split(`
|
|
6134
6138
|
`, 1)[0], e[1].length), d = t.split(`
|
|
6135
6139
|
`, 1)[0], p = !g.trim(), f = 0;
|
|
6136
6140
|
if (this.options.pedantic ? (f = 2, h = g.trimStart()) : p ? f = e[1].length + 1 : (f = g.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, h = g.slice(f), f += e[1].length), p && this.rules.other.blankLine.test(d) && (u += d + `
|
|
@@ -6243,7 +6247,7 @@ ${h}` : h;
|
|
|
6243
6247
|
let o = Pt(i.slice(0, -1), "\\");
|
|
6244
6248
|
if ((i.length - o.length) % 2 === 0) return;
|
|
6245
6249
|
} else {
|
|
6246
|
-
let o =
|
|
6250
|
+
let o = Nd(e[2], "()");
|
|
6247
6251
|
if (o === -2) return;
|
|
6248
6252
|
if (o > -1) {
|
|
6249
6253
|
let a = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + o;
|
|
@@ -6884,7 +6888,7 @@ ${t}</tr>
|
|
|
6884
6888
|
provideParser() {
|
|
6885
6889
|
return this.block ? ke.parse : ke.parseInline;
|
|
6886
6890
|
}
|
|
6887
|
-
},
|
|
6891
|
+
}, zd = class {
|
|
6888
6892
|
defaults = Un();
|
|
6889
6893
|
options = this.setOptions;
|
|
6890
6894
|
parse = this.parseMarkdown(!0);
|
|
@@ -7044,7 +7048,7 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
7044
7048
|
throw i;
|
|
7045
7049
|
};
|
|
7046
7050
|
}
|
|
7047
|
-
}, nt = new
|
|
7051
|
+
}, nt = new zd();
|
|
7048
7052
|
function z(t, e) {
|
|
7049
7053
|
return nt.parse(t, e);
|
|
7050
7054
|
}
|
|
@@ -7080,7 +7084,7 @@ z.setOptions({
|
|
|
7080
7084
|
breaks: !0,
|
|
7081
7085
|
gfm: !0
|
|
7082
7086
|
});
|
|
7083
|
-
function
|
|
7087
|
+
function Od({ text: t }) {
|
|
7084
7088
|
const e = J(() => {
|
|
7085
7089
|
if (!t)
|
|
7086
7090
|
return "";
|
|
@@ -7089,7 +7093,7 @@ function Ld({ text: t }) {
|
|
|
7089
7093
|
}, [t]);
|
|
7090
7094
|
return /* @__PURE__ */ s("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
|
|
7091
7095
|
}
|
|
7092
|
-
function
|
|
7096
|
+
function $d(t) {
|
|
7093
7097
|
const e = t.trim().split(/\s+/).filter(Boolean);
|
|
7094
7098
|
return e.length === 0 ? "?" : e.map((i) => i[0]).join("").slice(0, 2).toUpperCase();
|
|
7095
7099
|
}
|
|
@@ -7100,7 +7104,7 @@ function ht({ text: t, streaming: e, error: i, authorId: n, authorName: r, autho
|
|
|
7100
7104
|
].filter(Boolean).join(" ");
|
|
7101
7105
|
return /* @__PURE__ */ s("div", { class: "jex-message-row bot", children: [
|
|
7102
7106
|
/* @__PURE__ */ s("div", { class: "jex-message-head", children: [
|
|
7103
|
-
/* @__PURE__ */ s("div", { class: `jex-avatar ${u ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: u && o && !h ? /* @__PURE__ */ s("img", { src: o, alt: r ?? "", class: "jex-avatar-img", onError: d }) : u ? /* @__PURE__ */ s("span", { class: "jex-avatar-initials", children:
|
|
7107
|
+
/* @__PURE__ */ s("div", { class: `jex-avatar ${u ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: u && o && !h ? /* @__PURE__ */ s("img", { src: o, alt: r ?? "", class: "jex-avatar-img", onError: d }) : u ? /* @__PURE__ */ s("span", { class: "jex-avatar-initials", children: $d(r ?? "") }) : a && !h ? /* @__PURE__ */ s("img", { src: a, alt: "", class: "jex-avatar-img", onError: d }) : /* @__PURE__ */ s(Oi, { size: 14 }) }),
|
|
7104
7108
|
f && /* @__PURE__ */ s("span", { class: "jex-message-author", children: f }),
|
|
7105
7109
|
u && r && /* @__PURE__ */ s(
|
|
7106
7110
|
"button",
|
|
@@ -7110,19 +7114,19 @@ function ht({ text: t, streaming: e, error: i, authorId: n, authorName: r, autho
|
|
|
7110
7114
|
"aria-label": p,
|
|
7111
7115
|
title: p,
|
|
7112
7116
|
onClick: () => {
|
|
7113
|
-
|
|
7117
|
+
Tu(r);
|
|
7114
7118
|
},
|
|
7115
|
-
children: /* @__PURE__ */ s(
|
|
7119
|
+
children: /* @__PURE__ */ s(Ju, { size: 12 })
|
|
7116
7120
|
}
|
|
7117
7121
|
)
|
|
7118
7122
|
] }),
|
|
7119
7123
|
/* @__PURE__ */ s("div", { class: y, children: [
|
|
7120
|
-
/* @__PURE__ */ s(
|
|
7124
|
+
/* @__PURE__ */ s(Od, { text: t }),
|
|
7121
7125
|
e && /* @__PURE__ */ s("span", { class: "jex-streaming-cursor" })
|
|
7122
7126
|
] })
|
|
7123
7127
|
] });
|
|
7124
7128
|
}
|
|
7125
|
-
function
|
|
7129
|
+
function Dd({ questions: t, disabled: e, onPick: i }) {
|
|
7126
7130
|
return t.length === 0 ? null : /* @__PURE__ */ s("div", { class: "jex-starter-chips", children: t.map((n) => /* @__PURE__ */ s(
|
|
7127
7131
|
"button",
|
|
7128
7132
|
{
|
|
@@ -7137,7 +7141,7 @@ function Od({ questions: t, disabled: e, onPick: i }) {
|
|
|
7137
7141
|
n
|
|
7138
7142
|
)) });
|
|
7139
7143
|
}
|
|
7140
|
-
function
|
|
7144
|
+
function Ud({ text: t }) {
|
|
7141
7145
|
return /* @__PURE__ */ s("div", { class: "jex-message user", children: t });
|
|
7142
7146
|
}
|
|
7143
7147
|
function La() {
|
|
@@ -7151,7 +7155,7 @@ function za() {
|
|
|
7151
7155
|
});
|
|
7152
7156
|
};
|
|
7153
7157
|
}
|
|
7154
|
-
function
|
|
7158
|
+
function Bd({ message: t, sessionId: e, visitorId: i, waitingSetAt: n }) {
|
|
7155
7159
|
const r = _();
|
|
7156
7160
|
return t.formData ? /* @__PURE__ */ s("div", { class: "jex-inline-form-submitted", children: [
|
|
7157
7161
|
/* @__PURE__ */ s("span", { class: "jex-inline-form-check", children: "✓" }),
|
|
@@ -7164,7 +7168,7 @@ function Dd({ message: t, sessionId: e, visitorId: i, waitingSetAt: n }) {
|
|
|
7164
7168
|
] })
|
|
7165
7169
|
] })
|
|
7166
7170
|
] }) : /* @__PURE__ */ s("div", { class: "jex-message-row bot", children: /* @__PURE__ */ s(
|
|
7167
|
-
|
|
7171
|
+
Fd,
|
|
7168
7172
|
{
|
|
7169
7173
|
messageId: t._id,
|
|
7170
7174
|
sessionId: e,
|
|
@@ -7173,7 +7177,7 @@ function Dd({ message: t, sessionId: e, visitorId: i, waitingSetAt: n }) {
|
|
|
7173
7177
|
}
|
|
7174
7178
|
) });
|
|
7175
7179
|
}
|
|
7176
|
-
function
|
|
7180
|
+
function Fd({ messageId: t, sessionId: e, visitorId: i, waitingSetAt: n }) {
|
|
7177
7181
|
const r = _(), [o, a] = R(""), [l, c] = R(""), [u, h] = R(!1), g = ii.value, d = /^https?:\/\//i.test(g) ? g : ti, p = La(), f = za();
|
|
7178
7182
|
async function y(m) {
|
|
7179
7183
|
if (m.preventDefault(), !u) {
|
|
@@ -7246,29 +7250,29 @@ function Ud({ messageId: t, sessionId: e, visitorId: i, waitingSetAt: n }) {
|
|
|
7246
7250
|
] })
|
|
7247
7251
|
] });
|
|
7248
7252
|
}
|
|
7249
|
-
function
|
|
7253
|
+
function Vd() {
|
|
7250
7254
|
return rt(oe.functions.magicline.public.submitForm);
|
|
7251
7255
|
}
|
|
7252
|
-
function
|
|
7256
|
+
function Qd() {
|
|
7253
7257
|
return Xt(oe.functions.magicline.actions.getTrialConfig);
|
|
7254
7258
|
}
|
|
7255
|
-
function
|
|
7259
|
+
function Hd() {
|
|
7256
7260
|
return Xt(oe.functions.magicline.actions.listTrialSlots);
|
|
7257
7261
|
}
|
|
7258
|
-
function
|
|
7262
|
+
function Wd() {
|
|
7259
7263
|
return Xt(oe.functions.magicline.actions.getRateBundles);
|
|
7260
7264
|
}
|
|
7261
7265
|
function Oa() {
|
|
7262
7266
|
return Xt(oe.functions.magicline.actions.getContractPreview);
|
|
7263
7267
|
}
|
|
7264
|
-
function
|
|
7268
|
+
function Kd() {
|
|
7265
7269
|
return Xt(oe.functions.magicline.actions.submitContractCreation);
|
|
7266
7270
|
}
|
|
7267
|
-
const Jn = { en: Ln, de: ha },
|
|
7271
|
+
const Jn = { en: Ln, de: ha }, Gd = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
7268
7272
|
function $a(t) {
|
|
7269
|
-
return
|
|
7273
|
+
return Gd.test(t.trim());
|
|
7270
7274
|
}
|
|
7271
|
-
function
|
|
7275
|
+
function Jd(t, e = /* @__PURE__ */ new Date()) {
|
|
7272
7276
|
const i = t.trim();
|
|
7273
7277
|
if (i === "")
|
|
7274
7278
|
return null;
|
|
@@ -7290,7 +7294,7 @@ function Ua() {
|
|
|
7290
7294
|
const t = ii.value;
|
|
7291
7295
|
return /^https?:\/\//i.test(t) ? t : ti;
|
|
7292
7296
|
}
|
|
7293
|
-
const
|
|
7297
|
+
const Zd = {
|
|
7294
7298
|
DE: 22,
|
|
7295
7299
|
AT: 20,
|
|
7296
7300
|
CH: 21,
|
|
@@ -7306,16 +7310,16 @@ const Gd = {
|
|
|
7306
7310
|
DK: 18,
|
|
7307
7311
|
FI: 18,
|
|
7308
7312
|
PT: 25
|
|
7309
|
-
},
|
|
7313
|
+
}, Yd = 15, Xd = 34;
|
|
7310
7314
|
function Ba(t) {
|
|
7311
7315
|
return t.replace(/\s+/g, "").toUpperCase();
|
|
7312
7316
|
}
|
|
7313
|
-
function
|
|
7314
|
-
const e = Ba(t), i = e.slice(0, 2), n =
|
|
7317
|
+
function eh(t) {
|
|
7318
|
+
const e = Ba(t), i = e.slice(0, 2), n = Zd[i];
|
|
7315
7319
|
if (n !== void 0) {
|
|
7316
7320
|
if (e.length !== n)
|
|
7317
7321
|
return !1;
|
|
7318
|
-
} else if (e.length <
|
|
7322
|
+
} else if (e.length < Yd || e.length > Xd)
|
|
7319
7323
|
return !1;
|
|
7320
7324
|
const r = e.slice(4) + e.slice(0, 4);
|
|
7321
7325
|
let o = "";
|
|
@@ -7335,7 +7339,7 @@ function Yd(t) {
|
|
|
7335
7339
|
}
|
|
7336
7340
|
return a === 1;
|
|
7337
7341
|
}
|
|
7338
|
-
function
|
|
7342
|
+
function th(t) {
|
|
7339
7343
|
const e = Ba(t);
|
|
7340
7344
|
if (e.length <= 8)
|
|
7341
7345
|
return e;
|
|
@@ -7365,7 +7369,7 @@ function qi(t, e, i) {
|
|
|
7365
7369
|
const [o, a] = r[i];
|
|
7366
7370
|
return `${t} ${n ? a : o}`;
|
|
7367
7371
|
}
|
|
7368
|
-
function
|
|
7372
|
+
function ih(t, e) {
|
|
7369
7373
|
const i = t.trim();
|
|
7370
7374
|
if (i === "")
|
|
7371
7375
|
return "—";
|
|
@@ -7389,7 +7393,7 @@ function Zn(t, e, i) {
|
|
|
7389
7393
|
}[r];
|
|
7390
7394
|
return o === void 0 ? `${t} ${e.toLowerCase()}` : o.replace("{n}", String(t));
|
|
7391
7395
|
}
|
|
7392
|
-
function
|
|
7396
|
+
function nh(t, e, i, n, r) {
|
|
7393
7397
|
const o = Jn[r], a = we(t, e, r);
|
|
7394
7398
|
switch (i) {
|
|
7395
7399
|
case "TERM_BASED":
|
|
@@ -7406,19 +7410,19 @@ function th(t, e, i, n, r) {
|
|
|
7406
7410
|
return a;
|
|
7407
7411
|
}
|
|
7408
7412
|
}
|
|
7409
|
-
function
|
|
7413
|
+
function rh(t, e, i, n) {
|
|
7410
7414
|
return e === "PERCENTAGE" ? `-${t}%` : `-${we(t, i, n)}`;
|
|
7411
7415
|
}
|
|
7412
|
-
const
|
|
7416
|
+
const oh = {
|
|
7413
7417
|
startpaket: "magiclineFeeStarterPackage",
|
|
7414
7418
|
"starter package": "magiclineFeeStarterPackage",
|
|
7415
7419
|
trainerpauschale: "magiclineFeeTrainerFee"
|
|
7416
7420
|
};
|
|
7417
7421
|
function Fa(t, e) {
|
|
7418
|
-
const i = t.trim().toLowerCase(), n =
|
|
7422
|
+
const i = t.trim().toLowerCase(), n = oh[i];
|
|
7419
7423
|
return n !== void 0 ? e[n] : t;
|
|
7420
7424
|
}
|
|
7421
|
-
function
|
|
7425
|
+
function ah(t, e, i) {
|
|
7422
7426
|
const n = Jn[i];
|
|
7423
7427
|
if (t === "NONE")
|
|
7424
7428
|
return n.magiclineRenewalNone;
|
|
@@ -7428,7 +7432,7 @@ function rh(t, e, i) {
|
|
|
7428
7432
|
}
|
|
7429
7433
|
return "";
|
|
7430
7434
|
}
|
|
7431
|
-
const Va = ["MALE", "FEMALE", "UNISEX"],
|
|
7435
|
+
const Va = ["MALE", "FEMALE", "UNISEX"], sh = [
|
|
7432
7436
|
{ code: "DE", label: "Germany / Deutschland" },
|
|
7433
7437
|
{ code: "AT", label: "Austria / Österreich" },
|
|
7434
7438
|
{ code: "CH", label: "Switzerland / Schweiz" },
|
|
@@ -7445,11 +7449,11 @@ const Va = ["MALE", "FEMALE", "UNISEX"], oh = [
|
|
|
7445
7449
|
{ code: "GB", label: "United Kingdom" },
|
|
7446
7450
|
{ code: "US", label: "United States" }
|
|
7447
7451
|
];
|
|
7448
|
-
function
|
|
7452
|
+
function lh(t, e) {
|
|
7449
7453
|
const i = [];
|
|
7450
7454
|
return e && i.push("trainer"), i.push("slot"), i.push("personal"), (t.address.visible || t.zip.visible) && i.push("address"), i.push("confirm"), i;
|
|
7451
7455
|
}
|
|
7452
|
-
const
|
|
7456
|
+
const ch = {
|
|
7453
7457
|
firstName: "",
|
|
7454
7458
|
lastName: "",
|
|
7455
7459
|
email: "",
|
|
@@ -7466,7 +7470,7 @@ const sh = {
|
|
|
7466
7470
|
consent: !1,
|
|
7467
7471
|
trainerRequired: !0
|
|
7468
7472
|
};
|
|
7469
|
-
function
|
|
7473
|
+
function uh(t, e) {
|
|
7470
7474
|
switch (e.type) {
|
|
7471
7475
|
case "set":
|
|
7472
7476
|
return { ...t, [e.key]: e.value };
|
|
@@ -7478,11 +7482,11 @@ function lh(t, e) {
|
|
|
7478
7482
|
return t;
|
|
7479
7483
|
}
|
|
7480
7484
|
}
|
|
7481
|
-
function
|
|
7485
|
+
function dh({
|
|
7482
7486
|
sessionId: t,
|
|
7483
7487
|
visitorId: e
|
|
7484
7488
|
}) {
|
|
7485
|
-
const i =
|
|
7489
|
+
const i = Qd(), n = Hd(), [r, o] = he(uh, ch), [a, l] = he(
|
|
7486
7490
|
(b, v) => v,
|
|
7487
7491
|
{ phase: "loading" }
|
|
7488
7492
|
), [c, u] = he(
|
|
@@ -7551,22 +7555,22 @@ function ch({
|
|
|
7551
7555
|
refetchSlots: f
|
|
7552
7556
|
};
|
|
7553
7557
|
}
|
|
7554
|
-
function
|
|
7558
|
+
function hh({
|
|
7555
7559
|
formMessageId: t,
|
|
7556
7560
|
sessionId: e,
|
|
7557
7561
|
visitorId: i,
|
|
7558
7562
|
slotUnavailable: n = !1,
|
|
7559
7563
|
retryPending: r = !1
|
|
7560
7564
|
}) {
|
|
7561
|
-
const o = _(), a =
|
|
7565
|
+
const o = _(), a = Vd(), { fields: l, setField: c, setTrainerRequired: u, configState: h, slotsState: g, refetchSlots: d } = dh({ sessionId: e, visitorId: i });
|
|
7562
7566
|
return h.phase === "loading" ? /* @__PURE__ */ s("div", { class: "jex-inline-form jex-magicline-form", children: [
|
|
7563
7567
|
/* @__PURE__ */ s("div", { class: "jex-inline-form-title", children: o.magiclineTrialTitle }),
|
|
7564
7568
|
/* @__PURE__ */ s("div", { class: "jex-magicline-slots-hint", children: o.magiclineConfigLoading })
|
|
7565
7569
|
] }) : h.phase === "error" ? /* @__PURE__ */ s("div", { class: "jex-inline-form jex-magicline-form", children: [
|
|
7566
7570
|
/* @__PURE__ */ s("div", { class: "jex-inline-form-title", children: o.magiclineTrialTitle }),
|
|
7567
|
-
/* @__PURE__ */ s("div", { class: "jex-magicline-slots-hint", role: "alert", children:
|
|
7571
|
+
/* @__PURE__ */ s("div", { class: "jex-magicline-slots-hint", role: "alert", children: yh(h.code, h.backendMessage, o) })
|
|
7568
7572
|
] }) : /* @__PURE__ */ s(
|
|
7569
|
-
|
|
7573
|
+
ph,
|
|
7570
7574
|
{
|
|
7571
7575
|
formMessageId: t,
|
|
7572
7576
|
sessionId: e,
|
|
@@ -7583,7 +7587,7 @@ function uh({
|
|
|
7583
7587
|
}
|
|
7584
7588
|
);
|
|
7585
7589
|
}
|
|
7586
|
-
function
|
|
7590
|
+
function ph({
|
|
7587
7591
|
formMessageId: t,
|
|
7588
7592
|
sessionId: e,
|
|
7589
7593
|
visitorId: i,
|
|
@@ -7598,7 +7602,7 @@ function dh({
|
|
|
7598
7602
|
submitForm: g
|
|
7599
7603
|
}) {
|
|
7600
7604
|
const d = _(), { plan: p, minimumAge: f, bookingWithoutTrainerAllowed: y, studioZoneId: m } = o, b = J(
|
|
7601
|
-
() =>
|
|
7605
|
+
() => lh(p, y),
|
|
7602
7606
|
[p, y]
|
|
7603
7607
|
), v = n ? Math.max(b.indexOf("slot"), 0) : 0, [x, C] = R(v), [T, N] = R({}), [Q, ee] = R(!1), [X, M] = R(null), Z = J(() => Ua(), []), ve = Math.min(x, b.length - 1), k = b[ve], W = ve === b.length - 1, It = ve === 0;
|
|
7604
7608
|
function We(H) {
|
|
@@ -7607,7 +7611,7 @@ function dh({
|
|
|
7607
7611
|
return a.slotId === "" && (P.slotId = d.magiclineSlotRequiredError), P;
|
|
7608
7612
|
if (H === "personal") {
|
|
7609
7613
|
if (a.firstName.trim() === "" && (P.firstName = d.magiclineRequiredError), a.lastName.trim() === "" && (P.lastName = d.magiclineRequiredError), p.email.visible && p.email.required && a.email.trim() === "" && (P.email = d.magiclineRequiredError), a.email.trim() !== "" && !$a(a.email) && (P.email = d.magiclineEmailError), p.phone.visible && p.phone.required && a.phone.trim() === "" && (P.phone = d.magiclineRequiredError), p.gender.visible && p.gender.required && a.gender === "" && (P.gender = d.magiclineRequiredError), p.dateOfBirth.visible && (p.dateOfBirth.required && a.birthDate.trim() === "" && (P.birthDate = d.magiclineRequiredError), a.birthDate.trim() !== "")) {
|
|
7610
|
-
const ge =
|
|
7614
|
+
const ge = Jd(a.birthDate);
|
|
7611
7615
|
ge !== null && ge < 0 ? P.birthDate = d.magiclineRequiredError : f > 0 && ge !== null && ge < f && (P.birthDate = d.magiclineMinAgeError.replace("{age}", String(f)));
|
|
7612
7616
|
}
|
|
7613
7617
|
return P;
|
|
@@ -7635,7 +7639,7 @@ function dh({
|
|
|
7635
7639
|
}
|
|
7636
7640
|
N({}), M(null), ee(!0);
|
|
7637
7641
|
try {
|
|
7638
|
-
const P =
|
|
7642
|
+
const P = kh(p, a);
|
|
7639
7643
|
await g({
|
|
7640
7644
|
sessionId: e,
|
|
7641
7645
|
visitorId: i,
|
|
@@ -7650,7 +7654,7 @@ function dh({
|
|
|
7650
7654
|
function Tt() {
|
|
7651
7655
|
W ? Ge() : Ke();
|
|
7652
7656
|
}
|
|
7653
|
-
const lt =
|
|
7657
|
+
const lt = vh(k, d), _e = `jex-ml-consent-${t}`;
|
|
7654
7658
|
return /* @__PURE__ */ s("div", { class: "jex-inline-form jex-magicline-form", children: [
|
|
7655
7659
|
/* @__PURE__ */ s("div", { class: "jex-magicline-wizard-header", children: [
|
|
7656
7660
|
/* @__PURE__ */ s("div", { class: "jex-inline-form-title", children: d.magiclineTrialTitle }),
|
|
@@ -7668,7 +7672,7 @@ function dh({
|
|
|
7668
7672
|
] }),
|
|
7669
7673
|
/* @__PURE__ */ s("div", { class: "jex-form", role: "group", "aria-label": lt, children: [
|
|
7670
7674
|
k === "trainer" ? /* @__PURE__ */ s(
|
|
7671
|
-
|
|
7675
|
+
gh,
|
|
7672
7676
|
{
|
|
7673
7677
|
formMessageId: t,
|
|
7674
7678
|
trainerRequired: a.trainerRequired,
|
|
@@ -7677,7 +7681,7 @@ function dh({
|
|
|
7677
7681
|
}
|
|
7678
7682
|
) : null,
|
|
7679
7683
|
k === "slot" ? /* @__PURE__ */ s(
|
|
7680
|
-
|
|
7684
|
+
fh,
|
|
7681
7685
|
{
|
|
7682
7686
|
slotsState: u,
|
|
7683
7687
|
slotId: a.slotId,
|
|
@@ -7693,7 +7697,7 @@ function dh({
|
|
|
7693
7697
|
}
|
|
7694
7698
|
) : null,
|
|
7695
7699
|
k === "personal" ? /* @__PURE__ */ s(
|
|
7696
|
-
|
|
7700
|
+
mh,
|
|
7697
7701
|
{
|
|
7698
7702
|
plan: p,
|
|
7699
7703
|
fields: a,
|
|
@@ -7703,7 +7707,7 @@ function dh({
|
|
|
7703
7707
|
}
|
|
7704
7708
|
) : null,
|
|
7705
7709
|
k === "address" ? /* @__PURE__ */ s(
|
|
7706
|
-
|
|
7710
|
+
xh,
|
|
7707
7711
|
{
|
|
7708
7712
|
plan: p,
|
|
7709
7713
|
fields: a,
|
|
@@ -7713,7 +7717,7 @@ function dh({
|
|
|
7713
7717
|
}
|
|
7714
7718
|
) : null,
|
|
7715
7719
|
k === "confirm" ? /* @__PURE__ */ s(
|
|
7716
|
-
|
|
7720
|
+
bh,
|
|
7717
7721
|
{
|
|
7718
7722
|
consentId: _e,
|
|
7719
7723
|
privacyUrl: Z,
|
|
@@ -7750,7 +7754,7 @@ function dh({
|
|
|
7750
7754
|
] })
|
|
7751
7755
|
] });
|
|
7752
7756
|
}
|
|
7753
|
-
function
|
|
7757
|
+
function gh({ formMessageId: t, trainerRequired: e, disabled: i, onChange: n }) {
|
|
7754
7758
|
const r = _(), o = `jex-ml-trainer-${t}`;
|
|
7755
7759
|
return /* @__PURE__ */ s("div", { class: "jex-magicline-radio-group", role: "radiogroup", "aria-label": r.magiclineStepTrainer, children: [
|
|
7756
7760
|
/* @__PURE__ */ s(
|
|
@@ -7797,7 +7801,7 @@ function hh({ formMessageId: t, trainerRequired: e, disabled: i, onChange: n })
|
|
|
7797
7801
|
)
|
|
7798
7802
|
] });
|
|
7799
7803
|
}
|
|
7800
|
-
function
|
|
7804
|
+
function fh({
|
|
7801
7805
|
slotsState: t,
|
|
7802
7806
|
slotId: e,
|
|
7803
7807
|
studioZoneId: i,
|
|
@@ -7850,7 +7854,7 @@ function ph({
|
|
|
7850
7854
|
a !== void 0 ? /* @__PURE__ */ s("div", { class: "jex-magicline-error", role: "alert", children: a }) : null
|
|
7851
7855
|
] });
|
|
7852
7856
|
}
|
|
7853
|
-
function
|
|
7857
|
+
function mh({ plan: t, fields: e, errors: i, disabled: n, setField: r }) {
|
|
7854
7858
|
const o = _(), a = J(() => Da(), []);
|
|
7855
7859
|
return /* @__PURE__ */ s($, { children: [
|
|
7856
7860
|
/* @__PURE__ */ s("div", { class: "jex-magicline-row", children: [
|
|
@@ -7945,12 +7949,12 @@ function gh({ plan: t, fields: e, errors: i, disabled: n, setField: r }) {
|
|
|
7945
7949
|
onChange: (l) => {
|
|
7946
7950
|
r("gender", l);
|
|
7947
7951
|
},
|
|
7948
|
-
options: Va.map((l) => ({ value: l, label:
|
|
7952
|
+
options: Va.map((l) => ({ value: l, label: wh(l, o) }))
|
|
7949
7953
|
}
|
|
7950
7954
|
) : null
|
|
7951
7955
|
] });
|
|
7952
7956
|
}
|
|
7953
|
-
function
|
|
7957
|
+
function xh({ plan: t, fields: e, errors: i, disabled: n, setField: r }) {
|
|
7954
7958
|
const o = _();
|
|
7955
7959
|
return /* @__PURE__ */ s($, { children: [
|
|
7956
7960
|
t.address.visible ? /* @__PURE__ */ s($, { children: [
|
|
@@ -8010,7 +8014,7 @@ function fh({ plan: t, fields: e, errors: i, disabled: n, setField: r }) {
|
|
|
8010
8014
|
onChange: (a) => {
|
|
8011
8015
|
r("country", a);
|
|
8012
8016
|
},
|
|
8013
|
-
options:
|
|
8017
|
+
options: sh.map((a) => ({ value: a.code, label: a.label }))
|
|
8014
8018
|
}
|
|
8015
8019
|
)
|
|
8016
8020
|
] }) : null,
|
|
@@ -8030,7 +8034,7 @@ function fh({ plan: t, fields: e, errors: i, disabled: n, setField: r }) {
|
|
|
8030
8034
|
) : null
|
|
8031
8035
|
] });
|
|
8032
8036
|
}
|
|
8033
|
-
function
|
|
8037
|
+
function bh({
|
|
8034
8038
|
consentId: t,
|
|
8035
8039
|
privacyUrl: e,
|
|
8036
8040
|
studioZoneId: i,
|
|
@@ -8159,7 +8163,7 @@ function Qa({
|
|
|
8159
8163
|
function me(t, e, i) {
|
|
8160
8164
|
return e ? t : t + i.magiclineOptionalSuffix;
|
|
8161
8165
|
}
|
|
8162
|
-
function
|
|
8166
|
+
function vh(t, e) {
|
|
8163
8167
|
switch (t) {
|
|
8164
8168
|
case "trainer":
|
|
8165
8169
|
return e.magiclineStepTrainer;
|
|
@@ -8175,10 +8179,10 @@ function xh(t, e) {
|
|
|
8175
8179
|
return "";
|
|
8176
8180
|
}
|
|
8177
8181
|
}
|
|
8178
|
-
function
|
|
8182
|
+
function yh(t, e, i) {
|
|
8179
8183
|
return e.trim() !== "" ? e : t === "unsupported" ? i.magiclineConfigUnsupported : t === "inconsistent" ? i.magiclineConfigInconsistent : i.magiclineConfigUnavailable;
|
|
8180
8184
|
}
|
|
8181
|
-
function
|
|
8185
|
+
function kh(t, e) {
|
|
8182
8186
|
const i = {
|
|
8183
8187
|
firstname: e.firstName.trim(),
|
|
8184
8188
|
lastname: e.lastName.trim(),
|
|
@@ -8188,7 +8192,7 @@ function vh(t, e) {
|
|
|
8188
8192
|
};
|
|
8189
8193
|
return t.email.visible && e.email.trim() !== "" && (i.email = e.email.trim()), t.phone.visible && e.phone.trim() !== "" && (i.phone = e.phone.trim()), t.dateOfBirth.visible && e.birthDate.trim() !== "" && (i.dateOfBirth = e.birthDate.trim()), t.gender.visible && e.gender !== "" && (i.gender = e.gender), t.address.visible && (e.street.trim() !== "" && (i.street = e.street.trim()), e.houseNumber.trim() !== "" && (i.houseNumber = e.houseNumber.trim()), e.city.trim() !== "" && (i.city = e.city.trim()), e.country !== "" && (i.country = e.country)), t.zip.visible && e.zip.trim() !== "" && (i.zip = e.zip.trim()), e.note.trim() !== "" && (i.note = e.note.trim()), i;
|
|
8190
8194
|
}
|
|
8191
|
-
function
|
|
8195
|
+
function wh(t, e) {
|
|
8192
8196
|
return t === "MALE" ? e.magiclineGenderMale : t === "FEMALE" ? e.magiclineGenderFemale : e.magiclineGenderUnisex;
|
|
8193
8197
|
}
|
|
8194
8198
|
function Ha(t, e, i) {
|
|
@@ -8217,7 +8221,7 @@ function Ha(t, e, i) {
|
|
|
8217
8221
|
});
|
|
8218
8222
|
}
|
|
8219
8223
|
}
|
|
8220
|
-
const
|
|
8224
|
+
const jh = {
|
|
8221
8225
|
termId: null,
|
|
8222
8226
|
selectedModuleIds: [],
|
|
8223
8227
|
acknowledgedBlocks: {},
|
|
@@ -8245,7 +8249,7 @@ const kh = {
|
|
|
8245
8249
|
sepa: !1
|
|
8246
8250
|
}
|
|
8247
8251
|
};
|
|
8248
|
-
function
|
|
8252
|
+
function _h(t, e) {
|
|
8249
8253
|
switch (e.type) {
|
|
8250
8254
|
case "setTermId":
|
|
8251
8255
|
return t.termId === e.termId ? t : {
|
|
@@ -8307,14 +8311,14 @@ const to = {
|
|
|
8307
8311
|
voucherStatus: "idle",
|
|
8308
8312
|
voucherRequestId: 0,
|
|
8309
8313
|
voucherUnavailable: !1
|
|
8310
|
-
},
|
|
8311
|
-
function
|
|
8314
|
+
}, Sh = "voucher:";
|
|
8315
|
+
function Ch(t) {
|
|
8312
8316
|
const e = {};
|
|
8313
8317
|
for (const i of Object.keys(t))
|
|
8314
|
-
i.startsWith(
|
|
8318
|
+
i.startsWith(Sh) || (e[i] = t[i]);
|
|
8315
8319
|
return e;
|
|
8316
8320
|
}
|
|
8317
|
-
function
|
|
8321
|
+
function Ih(t, e) {
|
|
8318
8322
|
switch (e.type) {
|
|
8319
8323
|
case "SET_VOUCHER_DRAFT": {
|
|
8320
8324
|
const i = t.appliedVoucher !== null || t.voucherStatus === "applied";
|
|
@@ -8367,10 +8371,10 @@ function Sh(t, e) {
|
|
|
8367
8371
|
return t;
|
|
8368
8372
|
}
|
|
8369
8373
|
}
|
|
8370
|
-
function
|
|
8374
|
+
function Th(t, e) {
|
|
8371
8375
|
switch (e.type) {
|
|
8372
8376
|
case "dropVoucherAcks": {
|
|
8373
|
-
const i =
|
|
8377
|
+
const i = Ch(t.acknowledgedBlocks);
|
|
8374
8378
|
return Object.keys(i).length === Object.keys(t.acknowledgedBlocks).length ? t : { ...t, acknowledgedBlocks: i };
|
|
8375
8379
|
}
|
|
8376
8380
|
case "seedVoucherAcks": {
|
|
@@ -8382,14 +8386,14 @@ function Ch(t, e) {
|
|
|
8382
8386
|
return { ...t, acknowledgedBlocks: i };
|
|
8383
8387
|
}
|
|
8384
8388
|
default:
|
|
8385
|
-
return
|
|
8389
|
+
return _h(t, e);
|
|
8386
8390
|
}
|
|
8387
8391
|
}
|
|
8388
|
-
function
|
|
8392
|
+
function Rh({
|
|
8389
8393
|
sessionId: t,
|
|
8390
8394
|
visitorId: e
|
|
8391
8395
|
}) {
|
|
8392
|
-
const i =
|
|
8396
|
+
const i = Wd(), n = Oa(), [r, o] = he(Th, jh), [a, l] = he(Ih, to), [c, u] = he(
|
|
8393
8397
|
(w, S) => S,
|
|
8394
8398
|
{ phase: "loading" }
|
|
8395
8399
|
), h = be(null), [g, d] = he(
|
|
@@ -8583,17 +8587,17 @@ function Ih({
|
|
|
8583
8587
|
clearVoucher: st
|
|
8584
8588
|
};
|
|
8585
8589
|
}
|
|
8586
|
-
function
|
|
8590
|
+
function Ah(t) {
|
|
8587
8591
|
return t !== null && t.optionalModules.length > 0 ? ["offer", "upgrades", "personal", "address", "payment", "review"] : ["offer", "personal", "address", "payment", "review"];
|
|
8588
8592
|
}
|
|
8589
|
-
function
|
|
8593
|
+
function Ph({
|
|
8590
8594
|
formMessageId: t,
|
|
8591
8595
|
sessionId: e,
|
|
8592
8596
|
visitorId: i,
|
|
8593
8597
|
projectId: n,
|
|
8594
8598
|
formStatus: r
|
|
8595
8599
|
}) {
|
|
8596
|
-
const o = _(), a = Ne.value, l =
|
|
8600
|
+
const o = _(), a = Ne.value, l = Kd(), c = Oa(), u = Rh({ sessionId: e, visitorId: i }), {
|
|
8597
8601
|
fields: h,
|
|
8598
8602
|
offersState: g,
|
|
8599
8603
|
previewState: d,
|
|
@@ -8635,7 +8639,7 @@ function Rh({
|
|
|
8635
8639
|
return /* @__PURE__ */ s(io, { customerNumber: null });
|
|
8636
8640
|
if (le === null && !ne && r === "failed")
|
|
8637
8641
|
return /* @__PURE__ */ s(no, { message: o.magiclineFailedDetail });
|
|
8638
|
-
const B = J(() =>
|
|
8642
|
+
const B = J(() => Ah(p), [p]), ut = Math.min(P, B.length - 1), Ce = B[ut], Yn = ut === B.length - 1, Ya = ut === 0;
|
|
8639
8643
|
function Xa(L) {
|
|
8640
8644
|
const E = {};
|
|
8641
8645
|
if (L === "offer")
|
|
@@ -8659,7 +8663,7 @@ function Rh({
|
|
|
8659
8663
|
const Y = h.address;
|
|
8660
8664
|
return Y.street.trim() === "" && (E.street = o.magiclineRequiredError), Y.houseNumber.trim() === "" && (E.houseNumber = o.magiclineRequiredError), Y.zipCode.trim() === "" && (E.zipCode = o.magiclineRequiredError), Y.city.trim() === "" && (E.city = o.magiclineRequiredError), E;
|
|
8661
8665
|
}
|
|
8662
|
-
return L === "payment" && (h.payment.accountHolder.trim() === "" && (E.accountHolder = o.magiclineRequiredError),
|
|
8666
|
+
return L === "payment" && (h.payment.accountHolder.trim() === "" && (E.accountHolder = o.magiclineRequiredError), eh(h.payment.iban) || (E.iban = o.magiclineIbanInvalidError), h.consents.privacy || (E.privacy = o.magiclineConsentError), h.consents.sepa || (E.sepa = o.magiclineConsentError)), E;
|
|
8663
8667
|
}
|
|
8664
8668
|
function es() {
|
|
8665
8669
|
const L = Xa(Ce);
|
|
@@ -8813,7 +8817,7 @@ function Rh({
|
|
|
8813
8817
|
function os() {
|
|
8814
8818
|
Yn ? ns() : es();
|
|
8815
8819
|
}
|
|
8816
|
-
const Xn =
|
|
8820
|
+
const Xn = Vh(Ce, o), as = b === "applying" || v.trim() !== "" && v.trim() !== (C ?? ""), ss = Ce === "review" && (d.phase !== "ready" || !y || as), ls = ne || ss;
|
|
8817
8821
|
return /* @__PURE__ */ s("div", { class: "jex-inline-form jex-magicline-form", children: [
|
|
8818
8822
|
/* @__PURE__ */ s("div", { class: "jex-magicline-wizard-header", children: [
|
|
8819
8823
|
/* @__PURE__ */ s("div", { class: "jex-inline-form-title", children: o.magiclineContractTitle }),
|
|
@@ -8831,7 +8835,7 @@ function Rh({
|
|
|
8831
8835
|
] }),
|
|
8832
8836
|
/* @__PURE__ */ s("div", { class: "jex-form", role: "group", "aria-label": Xn, children: [
|
|
8833
8837
|
Ce === "offer" ? /* @__PURE__ */ s(
|
|
8834
|
-
|
|
8838
|
+
Eh,
|
|
8835
8839
|
{
|
|
8836
8840
|
offersState: g,
|
|
8837
8841
|
selectedTermId: h.termId,
|
|
@@ -8843,7 +8847,7 @@ function Rh({
|
|
|
8843
8847
|
}
|
|
8844
8848
|
) : null,
|
|
8845
8849
|
Ce === "upgrades" && p !== null ? /* @__PURE__ */ s(
|
|
8846
|
-
|
|
8850
|
+
Mh,
|
|
8847
8851
|
{
|
|
8848
8852
|
modules: p.optionalModules,
|
|
8849
8853
|
selectedModuleIds: h.selectedModuleIds,
|
|
@@ -8856,7 +8860,7 @@ function Rh({
|
|
|
8856
8860
|
}
|
|
8857
8861
|
) : null,
|
|
8858
8862
|
Ce === "personal" ? /* @__PURE__ */ s(
|
|
8859
|
-
|
|
8863
|
+
zh,
|
|
8860
8864
|
{
|
|
8861
8865
|
personal: h.personal,
|
|
8862
8866
|
errors: Me,
|
|
@@ -8865,7 +8869,7 @@ function Rh({
|
|
|
8865
8869
|
}
|
|
8866
8870
|
) : null,
|
|
8867
8871
|
Ce === "address" ? /* @__PURE__ */ s(
|
|
8868
|
-
|
|
8872
|
+
Oh,
|
|
8869
8873
|
{
|
|
8870
8874
|
address: h.address,
|
|
8871
8875
|
errors: Me,
|
|
@@ -8874,7 +8878,7 @@ function Rh({
|
|
|
8874
8878
|
}
|
|
8875
8879
|
) : null,
|
|
8876
8880
|
Ce === "payment" ? /* @__PURE__ */ s(
|
|
8877
|
-
|
|
8881
|
+
$h,
|
|
8878
8882
|
{
|
|
8879
8883
|
formMessageId: t,
|
|
8880
8884
|
fields: h,
|
|
@@ -8887,7 +8891,7 @@ function Rh({
|
|
|
8887
8891
|
}
|
|
8888
8892
|
) : null,
|
|
8889
8893
|
Ce === "review" ? /* @__PURE__ */ s(
|
|
8890
|
-
|
|
8894
|
+
Dh,
|
|
8891
8895
|
{
|
|
8892
8896
|
fields: h,
|
|
8893
8897
|
term: p,
|
|
@@ -8956,7 +8960,7 @@ function no({ message: t }) {
|
|
|
8956
8960
|
] })
|
|
8957
8961
|
] });
|
|
8958
8962
|
}
|
|
8959
|
-
function
|
|
8963
|
+
function Eh({
|
|
8960
8964
|
offersState: t,
|
|
8961
8965
|
selectedTermId: e,
|
|
8962
8966
|
widgetLocale: i,
|
|
@@ -8975,13 +8979,13 @@ function Ah({
|
|
|
8975
8979
|
] });
|
|
8976
8980
|
if (t.phase === "empty")
|
|
8977
8981
|
return /* @__PURE__ */ s("div", { class: "jex-magicline-slots-hint", role: "alert", "aria-live": "polite", children: l.magiclineNoOffers });
|
|
8978
|
-
const c =
|
|
8982
|
+
const c = Fh(t.terms);
|
|
8979
8983
|
return /* @__PURE__ */ s($, { children: [
|
|
8980
8984
|
/* @__PURE__ */ s("div", { class: "jex-magicline-radio-group", role: "radiogroup", "aria-label": l.magiclineStepOffer, children: c.map((u) => /* @__PURE__ */ s("div", { class: "jex-magicline-offer-group", children: [
|
|
8981
8985
|
/* @__PURE__ */ s("div", { class: "jex-magicline-offer-bundle-name", children: u.bundleName }),
|
|
8982
8986
|
u.bundleDescription !== null ? /* @__PURE__ */ s("div", { class: "jex-magicline-offer-bundle-desc", children: u.bundleDescription }) : null,
|
|
8983
8987
|
u.terms.map((h) => /* @__PURE__ */ s(
|
|
8984
|
-
|
|
8988
|
+
qh,
|
|
8985
8989
|
{
|
|
8986
8990
|
term: h,
|
|
8987
8991
|
checked: e === h.termId,
|
|
@@ -8992,7 +8996,7 @@ function Ah({
|
|
|
8992
8996
|
h.termId
|
|
8993
8997
|
)),
|
|
8994
8998
|
/* @__PURE__ */ s(
|
|
8995
|
-
|
|
8999
|
+
Nh,
|
|
8996
9000
|
{
|
|
8997
9001
|
subDescription: u.bundleSubDescription,
|
|
8998
9002
|
footnote: u.footnote
|
|
@@ -9002,7 +9006,7 @@ function Ah({
|
|
|
9002
9006
|
r !== void 0 ? /* @__PURE__ */ s("div", { class: "jex-magicline-error", role: "alert", children: r }) : null
|
|
9003
9007
|
] });
|
|
9004
9008
|
}
|
|
9005
|
-
function
|
|
9009
|
+
function qh({ term: t, checked: e, widgetLocale: i, disabled: n, onSelect: r }) {
|
|
9006
9010
|
const o = _(), a = qi(t.termValue, t.termUnit, i), l = we(t.price, t.currencyCode, i), c = t.flatFees.find((h) => h.isStarterPackage), u = t.flatFees.filter((h) => !h.isStarterPackage);
|
|
9007
9011
|
return /* @__PURE__ */ s(
|
|
9008
9012
|
"label",
|
|
@@ -9065,8 +9069,8 @@ function Ph({ term: t, checked: e, widgetLocale: i, disabled: n, onSelect: r })
|
|
|
9065
9069
|
}
|
|
9066
9070
|
);
|
|
9067
9071
|
}
|
|
9068
|
-
function
|
|
9069
|
-
const i = _(), n =
|
|
9072
|
+
function Nh({ subDescription: t, footnote: e }) {
|
|
9073
|
+
const i = _(), n = Bh(t), r = e !== null && e.trim() !== "";
|
|
9070
9074
|
return n.length === 0 && !r ? null : /* @__PURE__ */ s("details", { class: "jex-magicline-bundle-details", children: [
|
|
9071
9075
|
/* @__PURE__ */ s("summary", { class: "jex-magicline-bundle-details-summary", children: i.magiclineDetails }),
|
|
9072
9076
|
/* @__PURE__ */ s("div", { class: "jex-magicline-bundle-details-body", children: [
|
|
@@ -9075,7 +9079,7 @@ function Eh({ subDescription: t, footnote: e }) {
|
|
|
9075
9079
|
] })
|
|
9076
9080
|
] });
|
|
9077
9081
|
}
|
|
9078
|
-
function
|
|
9082
|
+
function Mh({
|
|
9079
9083
|
modules: t,
|
|
9080
9084
|
selectedModuleIds: e,
|
|
9081
9085
|
acknowledgedBlocks: i,
|
|
@@ -9089,7 +9093,7 @@ function qh({
|
|
|
9089
9093
|
return t.length === 0 ? /* @__PURE__ */ s("div", { class: "jex-magicline-slots-hint", children: c.magiclineUpgradesNone }) : /* @__PURE__ */ s($, { children: [
|
|
9090
9094
|
/* @__PURE__ */ s("div", { class: "jex-magicline-slots-hint", children: c.magiclineUpgradesIntro }),
|
|
9091
9095
|
/* @__PURE__ */ s("div", { class: "jex-magicline-upgrade-group", children: t.map((u) => /* @__PURE__ */ s(
|
|
9092
|
-
|
|
9096
|
+
Lh,
|
|
9093
9097
|
{
|
|
9094
9098
|
module: u,
|
|
9095
9099
|
selected: e.includes(u.id),
|
|
@@ -9104,7 +9108,7 @@ function qh({
|
|
|
9104
9108
|
o !== void 0 ? /* @__PURE__ */ s("div", { class: "jex-magicline-error", role: "alert", children: o }) : null
|
|
9105
9109
|
] });
|
|
9106
9110
|
}
|
|
9107
|
-
function
|
|
9111
|
+
function Lh({
|
|
9108
9112
|
module: t,
|
|
9109
9113
|
selected: e,
|
|
9110
9114
|
consentChecked: i,
|
|
@@ -9113,13 +9117,13 @@ function Nh({
|
|
|
9113
9117
|
onToggle: o,
|
|
9114
9118
|
onAck: a
|
|
9115
9119
|
}) {
|
|
9116
|
-
const l = _(), c =
|
|
9120
|
+
const l = _(), c = nh(
|
|
9117
9121
|
t.price,
|
|
9118
9122
|
t.currencyCode,
|
|
9119
9123
|
t.paymentFrequencyType,
|
|
9120
9124
|
t.recurringUnit,
|
|
9121
9125
|
n
|
|
9122
|
-
), u =
|
|
9126
|
+
), u = ah(t.extensionType, t.termExtension, n), h = t.termLabel !== null && t.termLabel !== "" ? t.termLabel : l.magiclineUpgradeOneTime, g = t.consent;
|
|
9123
9127
|
return /* @__PURE__ */ s("div", { class: e ? "jex-magicline-upgrade-card jex-magicline-upgrade-card-active" : "jex-magicline-upgrade-card", children: [
|
|
9124
9128
|
/* @__PURE__ */ s("label", { class: "jex-magicline-upgrade-head", children: [
|
|
9125
9129
|
/* @__PURE__ */ s(
|
|
@@ -9158,7 +9162,7 @@ function Nh({
|
|
|
9158
9162
|
) : null
|
|
9159
9163
|
] });
|
|
9160
9164
|
}
|
|
9161
|
-
function
|
|
9165
|
+
function zh({ personal: t, errors: e, disabled: i, setPersonal: n }) {
|
|
9162
9166
|
const r = _(), o = J(() => Da(), []);
|
|
9163
9167
|
return /* @__PURE__ */ s($, { children: [
|
|
9164
9168
|
/* @__PURE__ */ s("div", { class: "jex-magicline-row", children: [
|
|
@@ -9227,7 +9231,7 @@ function Mh({ personal: t, errors: e, disabled: i, setPersonal: n }) {
|
|
|
9227
9231
|
e.dateOfBirth !== void 0 ? /* @__PURE__ */ s("span", { class: "jex-magicline-error", role: "alert", children: e.dateOfBirth }) : null
|
|
9228
9232
|
] }),
|
|
9229
9233
|
/* @__PURE__ */ s(
|
|
9230
|
-
|
|
9234
|
+
Uh,
|
|
9231
9235
|
{
|
|
9232
9236
|
label: r.magiclineGender,
|
|
9233
9237
|
value: t.gender,
|
|
@@ -9238,7 +9242,7 @@ function Mh({ personal: t, errors: e, disabled: i, setPersonal: n }) {
|
|
|
9238
9242
|
onChange: (a) => {
|
|
9239
9243
|
n("gender", a);
|
|
9240
9244
|
},
|
|
9241
|
-
options: Va.map((a) => ({ value: a, label:
|
|
9245
|
+
options: Va.map((a) => ({ value: a, label: Qh(a, r) }))
|
|
9242
9246
|
}
|
|
9243
9247
|
),
|
|
9244
9248
|
/* @__PURE__ */ s(
|
|
@@ -9258,7 +9262,7 @@ function Mh({ personal: t, errors: e, disabled: i, setPersonal: n }) {
|
|
|
9258
9262
|
)
|
|
9259
9263
|
] });
|
|
9260
9264
|
}
|
|
9261
|
-
function
|
|
9265
|
+
function Oh({ address: t, errors: e, disabled: i, setAddress: n }) {
|
|
9262
9266
|
const r = _();
|
|
9263
9267
|
return /* @__PURE__ */ s($, { children: [
|
|
9264
9268
|
/* @__PURE__ */ s("div", { class: "jex-magicline-row", children: [
|
|
@@ -9327,7 +9331,7 @@ function Lh({ address: t, errors: e, disabled: i, setAddress: n }) {
|
|
|
9327
9331
|
] })
|
|
9328
9332
|
] });
|
|
9329
9333
|
}
|
|
9330
|
-
function
|
|
9334
|
+
function $h({
|
|
9331
9335
|
formMessageId: t,
|
|
9332
9336
|
fields: e,
|
|
9333
9337
|
errors: i,
|
|
@@ -9404,7 +9408,7 @@ function zh({
|
|
|
9404
9408
|
i.sepa !== void 0 ? /* @__PURE__ */ s("div", { class: "jex-magicline-error", role: "alert", children: i.sepa }) : null
|
|
9405
9409
|
] });
|
|
9406
9410
|
}
|
|
9407
|
-
function
|
|
9411
|
+
function Dh({
|
|
9408
9412
|
fields: t,
|
|
9409
9413
|
term: e,
|
|
9410
9414
|
previewState: i,
|
|
@@ -9462,7 +9466,7 @@ function Oh({
|
|
|
9462
9466
|
d !== null && d.voucherType === "DISCOUNT" ? /* @__PURE__ */ s("div", { class: "jex-magicline-summary-row jex-magicline-voucher-discount-row", children: [
|
|
9463
9467
|
/* @__PURE__ */ s("dt", { children: m.magiclineVoucherAppliedDiscount.replace(
|
|
9464
9468
|
"{discount}",
|
|
9465
|
-
|
|
9469
|
+
rh(
|
|
9466
9470
|
d.discountValue,
|
|
9467
9471
|
d.discountType,
|
|
9468
9472
|
b.currencyCode,
|
|
@@ -9499,7 +9503,7 @@ function Oh({
|
|
|
9499
9503
|
/* @__PURE__ */ s("dl", { class: "jex-magicline-summary jex-magicline-summary-section", children: [
|
|
9500
9504
|
/* @__PURE__ */ s("div", { class: "jex-magicline-summary-row", children: [
|
|
9501
9505
|
/* @__PURE__ */ s("dt", { children: m.magiclineReviewStartsOn }),
|
|
9502
|
-
/* @__PURE__ */ s("dd", { children:
|
|
9506
|
+
/* @__PURE__ */ s("dd", { children: ih(b.startDate, n) })
|
|
9503
9507
|
] }),
|
|
9504
9508
|
/* @__PURE__ */ s("div", { class: "jex-magicline-summary-row", children: [
|
|
9505
9509
|
/* @__PURE__ */ s("dt", { children: m.magiclineSummaryName }),
|
|
@@ -9511,7 +9515,7 @@ function Oh({
|
|
|
9511
9515
|
] }),
|
|
9512
9516
|
/* @__PURE__ */ s("div", { class: "jex-magicline-summary-row", children: [
|
|
9513
9517
|
/* @__PURE__ */ s("dt", { children: m.magiclineReviewPayment }),
|
|
9514
|
-
/* @__PURE__ */ s("dd", { children:
|
|
9518
|
+
/* @__PURE__ */ s("dd", { children: th(t.payment.iban) })
|
|
9515
9519
|
] })
|
|
9516
9520
|
] }),
|
|
9517
9521
|
ve ? /* @__PURE__ */ s("div", { class: "jex-magicline-voucher-section", children: [
|
|
@@ -9690,7 +9694,7 @@ function Pe({
|
|
|
9690
9694
|
a !== void 0 ? /* @__PURE__ */ s("span", { id: c, class: "jex-magicline-error", role: "alert", children: a }) : null
|
|
9691
9695
|
] });
|
|
9692
9696
|
}
|
|
9693
|
-
function
|
|
9697
|
+
function Uh({
|
|
9694
9698
|
label: t,
|
|
9695
9699
|
value: e,
|
|
9696
9700
|
required: i,
|
|
@@ -9722,11 +9726,11 @@ function $h({
|
|
|
9722
9726
|
o !== void 0 ? /* @__PURE__ */ s("span", { class: "jex-magicline-error", role: "alert", children: o }) : null
|
|
9723
9727
|
] });
|
|
9724
9728
|
}
|
|
9725
|
-
function
|
|
9729
|
+
function Bh(t) {
|
|
9726
9730
|
return t === null ? [] : t.split(`
|
|
9727
9731
|
`).map((e) => e.replace(/^\s*[-•]\s*/, "").trim()).filter((e) => e !== "");
|
|
9728
9732
|
}
|
|
9729
|
-
function
|
|
9733
|
+
function Fh(t) {
|
|
9730
9734
|
const e = [], i = /* @__PURE__ */ new Map();
|
|
9731
9735
|
for (const n of t) {
|
|
9732
9736
|
let r = i.get(n.bundleId);
|
|
@@ -9741,7 +9745,7 @@ function Uh(t) {
|
|
|
9741
9745
|
}
|
|
9742
9746
|
return e;
|
|
9743
9747
|
}
|
|
9744
|
-
function
|
|
9748
|
+
function Vh(t, e) {
|
|
9745
9749
|
switch (t) {
|
|
9746
9750
|
case "offer":
|
|
9747
9751
|
return e.magiclineStepOffer;
|
|
@@ -9759,10 +9763,10 @@ function Bh(t, e) {
|
|
|
9759
9763
|
return "";
|
|
9760
9764
|
}
|
|
9761
9765
|
}
|
|
9762
|
-
function
|
|
9766
|
+
function Qh(t, e) {
|
|
9763
9767
|
return t === "MALE" ? e.magiclineGenderMale : t === "FEMALE" ? e.magiclineGenderFemale : e.magiclineGenderUnisex;
|
|
9764
9768
|
}
|
|
9765
|
-
function
|
|
9769
|
+
function Hh({ message: t, sessionId: e, visitorId: i }) {
|
|
9766
9770
|
const n = _(), r = t.magiclineForm, o = !!r && r.status === "open" && !!r.submissionId, a = ki(
|
|
9767
9771
|
oe.functions.magicline.public.getSubmissionStatus,
|
|
9768
9772
|
o && r?.submissionId ? { sessionId: e, visitorId: i, submissionId: r.submissionId } : "skip"
|
|
@@ -9771,7 +9775,7 @@ function Vh({ message: t, sessionId: e, visitorId: i }) {
|
|
|
9771
9775
|
return null;
|
|
9772
9776
|
if (r.action === "contractCreation")
|
|
9773
9777
|
return t.projectId ? /* @__PURE__ */ s(
|
|
9774
|
-
|
|
9778
|
+
Ph,
|
|
9775
9779
|
{
|
|
9776
9780
|
formMessageId: t._id,
|
|
9777
9781
|
sessionId: e,
|
|
@@ -9800,7 +9804,7 @@ function Vh({ message: t, sessionId: e, visitorId: i }) {
|
|
|
9800
9804
|
return null;
|
|
9801
9805
|
const l = a != null && a.errorCode === "slot_unavailable", c = o && a === void 0;
|
|
9802
9806
|
return /* @__PURE__ */ s(
|
|
9803
|
-
|
|
9807
|
+
hh,
|
|
9804
9808
|
{
|
|
9805
9809
|
formMessageId: t._id,
|
|
9806
9810
|
sessionId: e,
|
|
@@ -9810,13 +9814,13 @@ function Vh({ message: t, sessionId: e, visitorId: i }) {
|
|
|
9810
9814
|
}
|
|
9811
9815
|
);
|
|
9812
9816
|
}
|
|
9813
|
-
const
|
|
9817
|
+
const Wh = {
|
|
9814
9818
|
crawl: "🌐",
|
|
9815
9819
|
file: "📄",
|
|
9816
9820
|
snippet: "💡",
|
|
9817
9821
|
qa: "❓"
|
|
9818
9822
|
};
|
|
9819
|
-
function
|
|
9823
|
+
function Kh({ sources: t }) {
|
|
9820
9824
|
const e = _(), [i, n] = R(!1);
|
|
9821
9825
|
return t.length === 0 ? null : /* @__PURE__ */ s("div", { class: "jex-sources-row", children: [
|
|
9822
9826
|
/* @__PURE__ */ s(
|
|
@@ -9839,10 +9843,10 @@ function Hh({ sources: t }) {
|
|
|
9839
9843
|
}
|
|
9840
9844
|
),
|
|
9841
9845
|
i ? /* @__PURE__ */ s("div", { class: "jex-sources-pills", children: t.map((r, o) => {
|
|
9842
|
-
const a = r.sourceType === "crawl", l =
|
|
9846
|
+
const a = r.sourceType === "crawl", l = Gh(r), c = a && r.url ? `${r.title}
|
|
9843
9847
|
${r.url}` : r.title, u = /* @__PURE__ */ s($, { children: [
|
|
9844
9848
|
typeof r.id == "number" ? /* @__PURE__ */ s("span", { class: "jex-source-id", children: r.id }) : null,
|
|
9845
|
-
/* @__PURE__ */ s("span", { class: "jex-source-type", children:
|
|
9849
|
+
/* @__PURE__ */ s("span", { class: "jex-source-type", children: Wh[r.sourceType] }),
|
|
9846
9850
|
/* @__PURE__ */ s("span", { class: "jex-source-label", children: l }),
|
|
9847
9851
|
/* @__PURE__ */ s("span", { class: "jex-source-score", children: [
|
|
9848
9852
|
"· ",
|
|
@@ -9864,7 +9868,7 @@ ${r.url}` : r.title, u = /* @__PURE__ */ s($, { children: [
|
|
|
9864
9868
|
}) }) : null
|
|
9865
9869
|
] });
|
|
9866
9870
|
}
|
|
9867
|
-
function
|
|
9871
|
+
function Gh(t) {
|
|
9868
9872
|
if (t.sourceType === "crawl" && t.url)
|
|
9869
9873
|
try {
|
|
9870
9874
|
const e = new URL(t.url);
|
|
@@ -9873,22 +9877,22 @@ function Wh(t) {
|
|
|
9873
9877
|
}
|
|
9874
9878
|
return t.title;
|
|
9875
9879
|
}
|
|
9876
|
-
function
|
|
9880
|
+
function Jh() {
|
|
9877
9881
|
return /* @__PURE__ */ s("div", { class: "jex-typing", children: [
|
|
9878
9882
|
/* @__PURE__ */ s("span", {}),
|
|
9879
9883
|
/* @__PURE__ */ s("span", {}),
|
|
9880
9884
|
/* @__PURE__ */ s("span", {})
|
|
9881
9885
|
] });
|
|
9882
9886
|
}
|
|
9883
|
-
const
|
|
9887
|
+
const Zh = /\s?\[\d+\]/g;
|
|
9884
9888
|
function oo(t) {
|
|
9885
|
-
return t.replace(
|
|
9889
|
+
return t.replace(Zh, "");
|
|
9886
9890
|
}
|
|
9887
|
-
function
|
|
9891
|
+
function Yh(t) {
|
|
9888
9892
|
return t?.at(-1)?._creationTime ?? 0;
|
|
9889
9893
|
}
|
|
9890
|
-
function
|
|
9891
|
-
const h = _(), g = be(null), [d, p] = R(null), f =
|
|
9894
|
+
function Xh({ conversations: t, greeting: e, botName: i, starterQuestions: n, onPickStarter: r, sessionNotFound: o, resumeFailed: a, onStartFresh: l, sessionId: c, visitorId: u }) {
|
|
9895
|
+
const h = _(), g = be(null), [d, p] = R(null), f = Yh(t), y = za(), m = be(null);
|
|
9892
9896
|
I(() => {
|
|
9893
9897
|
if (!u || !t)
|
|
9894
9898
|
return;
|
|
@@ -9901,7 +9905,7 @@ function Zh({ conversations: t, greeting: e, botName: i, starterQuestions: n, on
|
|
|
9901
9905
|
return /* @__PURE__ */ s("div", { class: "jex-chat-messages", children: [
|
|
9902
9906
|
/* @__PURE__ */ s(ht, { text: e, botName: i }),
|
|
9903
9907
|
v ? /* @__PURE__ */ s(
|
|
9904
|
-
|
|
9908
|
+
Dd,
|
|
9905
9909
|
{
|
|
9906
9910
|
questions: n,
|
|
9907
9911
|
disabled: gi.value,
|
|
@@ -9928,7 +9932,7 @@ function Zh({ conversations: t, greeting: e, botName: i, starterQuestions: n, on
|
|
|
9928
9932
|
return /* @__PURE__ */ s(ht, { text: T, botName: i }, x._id);
|
|
9929
9933
|
}
|
|
9930
9934
|
if (x.contentType === "escalation-form" && c && u)
|
|
9931
|
-
return
|
|
9935
|
+
return cu.value === "screen" && !x.formData ? d === x._id ? null : /* @__PURE__ */ s("div", { class: "jex-inline-form jex-inline-form-card", children: [
|
|
9932
9936
|
/* @__PURE__ */ s("div", { class: "jex-inline-form-title", children: h.escalationPromptTitle }),
|
|
9933
9937
|
/* @__PURE__ */ s("div", { class: "jex-inline-form-subtitle", children: h.escalationPromptSubtitle }),
|
|
9934
9938
|
/* @__PURE__ */ s(
|
|
@@ -9953,21 +9957,21 @@ function Zh({ conversations: t, greeting: e, botName: i, starterQuestions: n, on
|
|
|
9953
9957
|
children: h.escalationSkip
|
|
9954
9958
|
}
|
|
9955
9959
|
)
|
|
9956
|
-
] }, x._id) : /* @__PURE__ */ s(
|
|
9960
|
+
] }, x._id) : /* @__PURE__ */ s(Bd, { message: x, sessionId: c, visitorId: u, waitingSetAt: f }, x._id);
|
|
9957
9961
|
if (x.contentType === "magicline-form" && c && u)
|
|
9958
|
-
return /* @__PURE__ */ s(
|
|
9962
|
+
return /* @__PURE__ */ s(Hh, { message: x, sessionId: c, visitorId: u }, x._id);
|
|
9959
9963
|
if (x.contentType === "escalation-confirm") {
|
|
9960
9964
|
const T = x.noticeKind === "escalation-confirmed" ? h.noticeEscalationConfirmed.replace("{name}", x.noticeData?.visitorName ?? "").replace("{email}", x.noticeData?.visitorEmail ?? "").replace("{ref}", x.noticeData?.visitorId ?? "") : x.content;
|
|
9961
9965
|
return /* @__PURE__ */ s(ht, { text: T, botName: i }, x._id);
|
|
9962
9966
|
}
|
|
9963
9967
|
if (x.role === "user")
|
|
9964
|
-
return /* @__PURE__ */ s(
|
|
9968
|
+
return /* @__PURE__ */ s(Ud, { text: x.content }, x._id);
|
|
9965
9969
|
const C = {
|
|
9966
9970
|
authorId: x.authorId,
|
|
9967
9971
|
authorName: x.authorName,
|
|
9968
9972
|
authorImage: x.authorImage
|
|
9969
9973
|
};
|
|
9970
|
-
return x.status === "streaming" && x.content === "" ? /* @__PURE__ */ s(
|
|
9974
|
+
return x.status === "streaming" && x.content === "" ? /* @__PURE__ */ s(Jh, {}, x._id) : x.status === "streaming" ? /* @__PURE__ */ s(ht, { text: oo(x.content), streaming: !0, botName: i, ...C }, x._id) : x.status === "error" ? /* @__PURE__ */ s(
|
|
9971
9975
|
ht,
|
|
9972
9976
|
{
|
|
9973
9977
|
text: x.errorMessage ?? `${h.somethingWentWrong}. ${h.tryAgain}.`,
|
|
@@ -9978,13 +9982,13 @@ function Zh({ conversations: t, greeting: e, botName: i, starterQuestions: n, on
|
|
|
9978
9982
|
x._id
|
|
9979
9983
|
) : /* @__PURE__ */ s("div", { children: [
|
|
9980
9984
|
/* @__PURE__ */ s(ht, { text: oo(x.content), botName: i, ...C }),
|
|
9981
|
-
x.sources && x.sources.length > 0 ? /* @__PURE__ */ s(
|
|
9985
|
+
x.sources && x.sources.length > 0 ? /* @__PURE__ */ s(Kh, { sources: x.sources }) : null
|
|
9982
9986
|
] }, x._id);
|
|
9983
9987
|
}),
|
|
9984
9988
|
/* @__PURE__ */ s("div", { ref: g })
|
|
9985
9989
|
] });
|
|
9986
9990
|
}
|
|
9987
|
-
function
|
|
9991
|
+
function ep() {
|
|
9988
9992
|
const t = _();
|
|
9989
9993
|
function e() {
|
|
9990
9994
|
const i = Kt.peek();
|
|
@@ -10024,7 +10028,7 @@ function Wa({ message: t }) {
|
|
|
10024
10028
|
t && /* @__PURE__ */ s("p", { class: "jex-loading-message", children: t })
|
|
10025
10029
|
] }) : null;
|
|
10026
10030
|
}
|
|
10027
|
-
function
|
|
10031
|
+
function tp({ sessionId: t, visitorId: e }) {
|
|
10028
10032
|
const i = ki(
|
|
10029
10033
|
oe.functions.chat.public.conversations.listBySession,
|
|
10030
10034
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
@@ -10039,7 +10043,7 @@ function Xh({ sessionId: t, visitorId: e }) {
|
|
|
10039
10043
|
isStreaming: o
|
|
10040
10044
|
};
|
|
10041
10045
|
}
|
|
10042
|
-
function
|
|
10046
|
+
function ip(t) {
|
|
10043
10047
|
const e = _(), i = be(null), n = be(null), [r, o] = R(!1);
|
|
10044
10048
|
I(() => {
|
|
10045
10049
|
try {
|
|
@@ -10112,7 +10116,7 @@ function ep(t) {
|
|
|
10112
10116
|
};
|
|
10113
10117
|
}, []);
|
|
10114
10118
|
}
|
|
10115
|
-
function
|
|
10119
|
+
function np({ sessionId: t, visitorId: e }) {
|
|
10116
10120
|
const i = rt(oe.functions.chat.public.visitorPresence.heartbeat);
|
|
10117
10121
|
I(() => {
|
|
10118
10122
|
if (!t || !e)
|
|
@@ -10133,11 +10137,11 @@ function tp({ sessionId: t, visitorId: e }) {
|
|
|
10133
10137
|
};
|
|
10134
10138
|
}, [t, e, i]);
|
|
10135
10139
|
}
|
|
10136
|
-
function
|
|
10140
|
+
function rp() {
|
|
10137
10141
|
return rt(oe.functions.chat.public.helpdesk.createEscalationRequest);
|
|
10138
10142
|
}
|
|
10139
10143
|
function Ka({ sessionId: t, visitorId: e, ensureSession: i, onSkipForm: n }) {
|
|
10140
|
-
const r = _(), o =
|
|
10144
|
+
const r = _(), o = rp(), [a, l] = R(!1), [c, u] = R(null);
|
|
10141
10145
|
async function h() {
|
|
10142
10146
|
if (!a) {
|
|
10143
10147
|
l(!0), u(null);
|
|
@@ -10169,9 +10173,9 @@ function Ka({ sessionId: t, visitorId: e, ensureSession: i, onSkipForm: n }) {
|
|
|
10169
10173
|
}
|
|
10170
10174
|
return { requestHuman: h, busy: a, error: c };
|
|
10171
10175
|
}
|
|
10172
|
-
function
|
|
10173
|
-
const g = _(), { conversations: d, sessionStatus: p, isLoading: f, isStreaming: y } =
|
|
10174
|
-
|
|
10176
|
+
function op({ greeting: t, botName: e, starterQuestions: i, sessionId: n, visitorId: r, isLoading: o, sessionNotFound: a, resumeFailed: l, isOrgDeleted: c, ensureSession: u, startFresh: h }) {
|
|
10177
|
+
const g = _(), { conversations: d, sessionStatus: p, isLoading: f, isStreaming: y } = tp({ sessionId: n, visitorId: r });
|
|
10178
|
+
ip(d), np({ sessionId: n, visitorId: r }), I(() => {
|
|
10175
10179
|
const C = Kt.peek();
|
|
10176
10180
|
if (C === null || !d || d.length === 0)
|
|
10177
10181
|
return;
|
|
@@ -10196,7 +10200,7 @@ function np({ greeting: t, botName: e, starterQuestions: i, sessionId: n, visito
|
|
|
10196
10200
|
r && On(r);
|
|
10197
10201
|
}, [r]), c ? /* @__PURE__ */ s("div", { class: "jex-chat-messages", children: /* @__PURE__ */ s("div", { class: "jex-session-notice", children: g.chatNoLongerAvailable }) }) : b === "resume" && (!n || f) ? /* @__PURE__ */ s(Wa, { message: g.resumeConversation }) : /* @__PURE__ */ s($, { children: [
|
|
10198
10202
|
/* @__PURE__ */ s(
|
|
10199
|
-
|
|
10203
|
+
Xh,
|
|
10200
10204
|
{
|
|
10201
10205
|
conversations: d,
|
|
10202
10206
|
greeting: t,
|
|
@@ -10212,10 +10216,10 @@ function np({ greeting: t, botName: e, starterQuestions: i, sessionId: n, visito
|
|
|
10212
10216
|
visitorId: r
|
|
10213
10217
|
}
|
|
10214
10218
|
),
|
|
10215
|
-
Kt.value !== null && /* @__PURE__ */ s(
|
|
10219
|
+
Kt.value !== null && /* @__PURE__ */ s(ep, {}),
|
|
10216
10220
|
x && /* @__PURE__ */ s("div", { class: "jex-session-error-notice", role: "alert", style: { margin: "8px 16px 0" }, children: x }),
|
|
10217
10221
|
/* @__PURE__ */ s(
|
|
10218
|
-
|
|
10222
|
+
Fu,
|
|
10219
10223
|
{
|
|
10220
10224
|
sessionId: n,
|
|
10221
10225
|
visitorId: r,
|
|
@@ -10237,7 +10241,7 @@ function Ga(t) {
|
|
|
10237
10241
|
function Ja(t) {
|
|
10238
10242
|
return t?.anyOnline ? "online" : t?.anyAway ? "away" : "offline";
|
|
10239
10243
|
}
|
|
10240
|
-
function
|
|
10244
|
+
function ap({ formMessageId: t, sessionId: e, visitorId: i, orgSlug: n }) {
|
|
10241
10245
|
const r = _(), o = ii.value, a = /^https?:\/\//i.test(o) ? o : ti, [l, c] = R(""), [u, h] = R(""), g = Ga(n), d = g && !g.anyOnline ? r.escalationOfflineSubtitle : r.escalationSubtitle, p = La(), [f, y] = R(!1), [m, b] = R(null);
|
|
10242
10246
|
async function v(x) {
|
|
10243
10247
|
x.preventDefault(), y(!0), b(null);
|
|
@@ -10327,7 +10331,7 @@ function ao({ sessionId: t, visitorId: e, ensureSession: i, availability: n }) {
|
|
|
10327
10331
|
l && /* @__PURE__ */ s("div", { class: "jex-handoff-error", role: "alert", children: l })
|
|
10328
10332
|
] });
|
|
10329
10333
|
}
|
|
10330
|
-
async function
|
|
10334
|
+
async function sp() {
|
|
10331
10335
|
const t = ca.value;
|
|
10332
10336
|
if (!t)
|
|
10333
10337
|
return console.warn("[JexityChat] Bootstrap refresh skipped — inputs missing"), { ok: !1, reason: "no-inputs" };
|
|
@@ -10343,7 +10347,7 @@ function so(t) {
|
|
|
10343
10347
|
function Za(t) {
|
|
10344
10348
|
return t instanceof bi ? t.data?.code === "UNAUTHORIZED_ORIGIN" : !1;
|
|
10345
10349
|
}
|
|
10346
|
-
function
|
|
10350
|
+
function lp(t = 1e4) {
|
|
10347
10351
|
return Qe.value ? Promise.resolve(Qe.value) : new Promise((e) => {
|
|
10348
10352
|
let i = !1;
|
|
10349
10353
|
const n = (a) => {
|
|
@@ -10355,9 +10359,9 @@ function ap(t = 1e4) {
|
|
|
10355
10359
|
});
|
|
10356
10360
|
});
|
|
10357
10361
|
}
|
|
10358
|
-
function
|
|
10362
|
+
function cp(t, e) {
|
|
10359
10363
|
const i = be(null), n = mt(!1), r = mt(!1), o = mt(!1), a = mt(null), l = rt(oe.functions.chat.public.sessions.createOrResume), c = async (p) => {
|
|
10360
|
-
const f = await
|
|
10364
|
+
const f = await lp();
|
|
10361
10365
|
if (!f)
|
|
10362
10366
|
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), gt.value = "no-token", null;
|
|
10363
10367
|
const y = (v) => ({
|
|
@@ -10376,7 +10380,7 @@ function sp(t, e) {
|
|
|
10376
10380
|
} catch (v) {
|
|
10377
10381
|
if (!Za(v))
|
|
10378
10382
|
throw v;
|
|
10379
|
-
const x = await
|
|
10383
|
+
const x = await sp();
|
|
10380
10384
|
if (!x.ok)
|
|
10381
10385
|
return gt.value = x.reason === "rate_limited" ? "network" : "unauthorized", null;
|
|
10382
10386
|
m = await l(y(x.token));
|
|
@@ -10405,7 +10409,7 @@ function sp(t, e) {
|
|
|
10405
10409
|
}, [t, e, l, n, r, o]), h = O(() => {
|
|
10406
10410
|
i.current = null, r.value = !1, o.value = !1, Vr();
|
|
10407
10411
|
}, [r, o]);
|
|
10408
|
-
I(() =>
|
|
10412
|
+
I(() => du(h), [h]);
|
|
10409
10413
|
const g = O(async () => {
|
|
10410
10414
|
i.current = null, o.value = !1, r.value = !1, Vr();
|
|
10411
10415
|
const p = Lr();
|
|
@@ -10431,7 +10435,7 @@ function sp(t, e) {
|
|
|
10431
10435
|
resetSession: h
|
|
10432
10436
|
};
|
|
10433
10437
|
}
|
|
10434
|
-
function
|
|
10438
|
+
function up({ botName: t, availability: e, onResetSession: i }) {
|
|
10435
10439
|
const n = _(), [r, o] = R(""), a = e?.anyOnline === !0, l = Ja(e);
|
|
10436
10440
|
function c() {
|
|
10437
10441
|
ci(), xt.value = "escalate", i(), zr(), $e({ id: "chat" });
|
|
@@ -10525,7 +10529,7 @@ function lp({ botName: t, availability: e, onResetSession: i }) {
|
|
|
10525
10529
|
] })
|
|
10526
10530
|
] });
|
|
10527
10531
|
}
|
|
10528
|
-
function
|
|
10532
|
+
function dp({ title: t }) {
|
|
10529
10533
|
const e = _();
|
|
10530
10534
|
return /* @__PURE__ */ s("div", { class: "jex-selection", children: [
|
|
10531
10535
|
/* @__PURE__ */ s("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
|
|
@@ -10557,7 +10561,7 @@ function cp({ title: t }) {
|
|
|
10557
10561
|
] })
|
|
10558
10562
|
] });
|
|
10559
10563
|
}
|
|
10560
|
-
function
|
|
10564
|
+
function hp() {
|
|
10561
10565
|
const t = _(), [e, i] = R(""), [n, r] = R(""), [o, a] = R("");
|
|
10562
10566
|
async function l(c) {
|
|
10563
10567
|
c.preventDefault(), xn({ id: "loading", message: t.submittingTicket }), await new Promise((h) => {
|
|
@@ -10613,7 +10617,7 @@ function up() {
|
|
|
10613
10617
|
] })
|
|
10614
10618
|
] });
|
|
10615
10619
|
}
|
|
10616
|
-
function
|
|
10620
|
+
function pp({ ticketRef: t }) {
|
|
10617
10621
|
const e = _();
|
|
10618
10622
|
return /* @__PURE__ */ s("div", { class: "jex-confirmation", children: [
|
|
10619
10623
|
/* @__PURE__ */ s("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
|
|
@@ -10633,7 +10637,7 @@ function dp({ ticketRef: t }) {
|
|
|
10633
10637
|
)
|
|
10634
10638
|
] });
|
|
10635
10639
|
}
|
|
10636
|
-
function
|
|
10640
|
+
function gp({ message: t, onRetry: e, onBack: i }) {
|
|
10637
10641
|
const n = _();
|
|
10638
10642
|
return /* @__PURE__ */ s("div", { class: "jex-overlay jex-error", children: [
|
|
10639
10643
|
/* @__PURE__ */ s("p", { class: "jex-error-message", children: t }),
|
|
@@ -10648,11 +10652,11 @@ function lo({ greeting: t, starterQuestions: e, title: i, botName: n, orgSlug: r
|
|
|
10648
10652
|
(v) => v.id === "confirmation"
|
|
10649
10653
|
);
|
|
10650
10654
|
return /* @__PURE__ */ s("div", { class: "jex-screen-container", children: [
|
|
10651
|
-
m.id === "home" && /* @__PURE__ */ s(
|
|
10652
|
-
m.id === "selection" && /* @__PURE__ */ s(
|
|
10653
|
-
m.id === "form" && /* @__PURE__ */ s(
|
|
10655
|
+
m.id === "home" && /* @__PURE__ */ s(up, { botName: n, availability: o, onResetSession: f }),
|
|
10656
|
+
m.id === "selection" && /* @__PURE__ */ s(dp, { title: i }),
|
|
10657
|
+
m.id === "form" && /* @__PURE__ */ s(hp, {}),
|
|
10654
10658
|
m.id === "escalation-form" && /* @__PURE__ */ s(
|
|
10655
|
-
|
|
10659
|
+
ap,
|
|
10656
10660
|
{
|
|
10657
10661
|
formMessageId: m.formMessageId,
|
|
10658
10662
|
sessionId: m.sessionId,
|
|
@@ -10661,9 +10665,9 @@ function lo({ greeting: t, starterQuestions: e, title: i, botName: n, orgSlug: r
|
|
|
10661
10665
|
waitingSetAt: m.waitingSetAt
|
|
10662
10666
|
}
|
|
10663
10667
|
),
|
|
10664
|
-
m.id === "confirmation" && b && /* @__PURE__ */ s(
|
|
10668
|
+
m.id === "confirmation" && b && /* @__PURE__ */ s(pp, { ticketRef: b.ref }),
|
|
10665
10669
|
m.id === "chat" && /* @__PURE__ */ s(
|
|
10666
|
-
|
|
10670
|
+
op,
|
|
10667
10671
|
{
|
|
10668
10672
|
greeting: t,
|
|
10669
10673
|
botName: n,
|
|
@@ -10680,7 +10684,7 @@ function lo({ greeting: t, starterQuestions: e, title: i, botName: n, orgSlug: r
|
|
|
10680
10684
|
),
|
|
10681
10685
|
m.id === "loading" && /* @__PURE__ */ s(Wa, { message: m.message }),
|
|
10682
10686
|
m.id === "error" && /* @__PURE__ */ s(
|
|
10683
|
-
|
|
10687
|
+
gp,
|
|
10684
10688
|
{
|
|
10685
10689
|
message: m.message,
|
|
10686
10690
|
onRetry: () => xn({ id: "loading" }),
|
|
@@ -10689,7 +10693,7 @@ function lo({ greeting: t, starterQuestions: e, title: i, botName: n, orgSlug: r
|
|
|
10689
10693
|
)
|
|
10690
10694
|
] });
|
|
10691
10695
|
}
|
|
10692
|
-
function
|
|
10696
|
+
function fp({ options: t }) {
|
|
10693
10697
|
return Qc({
|
|
10694
10698
|
orgSlug: t.orgSlug,
|
|
10695
10699
|
projSlug: t.projSlug,
|
|
@@ -10697,14 +10701,14 @@ function pp({ options: t }) {
|
|
|
10697
10701
|
convexUrl: t.convexUrl,
|
|
10698
10702
|
preAllowedUrls: t.allowedUrls ?? [],
|
|
10699
10703
|
preExcludedPaths: t.excludePaths
|
|
10700
|
-
}), Kc() ? /* @__PURE__ */ s(
|
|
10704
|
+
}), Kc() ? /* @__PURE__ */ s(mp, { options: t }) : null;
|
|
10701
10705
|
}
|
|
10702
|
-
function
|
|
10706
|
+
function mp({ options: t }) {
|
|
10703
10707
|
const e = Fc(t.orgSlug, t.projSlug, t.convexUrl);
|
|
10704
|
-
Xc(t.parentOrigin), I(() => (
|
|
10708
|
+
Xc(t.parentOrigin), I(() => (au(), lu(), () => {
|
|
10705
10709
|
mn.value = !1;
|
|
10706
10710
|
}), []);
|
|
10707
|
-
const { sessionId: i, visitorId: n, isLoading: r, sessionNotFound: o, resumeFailed: a, isOrgDeleted: l, ensureSession: c, startFresh: u, resetSession: h } =
|
|
10711
|
+
const { sessionId: i, visitorId: n, isLoading: r, sessionNotFound: o, resumeFailed: a, isOrgDeleted: l, ensureSession: c, startFresh: u, resetSession: h } = cp(t.orgSlug, t.projSlug), g = Ga(t.orgSlug), d = $c(t, e.config), p = Fe.value, f = mn.value, y = e.config !== null || p !== void 0 || e.settled, m = e.config !== null ? d.sessionTimeoutMs : p !== void 0 ? p : d.sessionTimeoutMs;
|
|
10708
10712
|
I(() => {
|
|
10709
10713
|
Ne.value = pa(d.locale);
|
|
10710
10714
|
}, [d.locale]), I(() => {
|
|
@@ -10719,7 +10723,7 @@ function gp({ options: t }) {
|
|
|
10719
10723
|
}, [V.value, d.mode]), I(() => {
|
|
10720
10724
|
if (f && y && d.mode !== "embedded" && m !== null)
|
|
10721
10725
|
try {
|
|
10722
|
-
return
|
|
10726
|
+
return pu(m);
|
|
10723
10727
|
} catch (M) {
|
|
10724
10728
|
console.warn("[JexityChat] Idle-lock watcher failed to start:", M);
|
|
10725
10729
|
return;
|
|
@@ -10727,10 +10731,10 @@ function gp({ options: t }) {
|
|
|
10727
10731
|
}, [f, d.mode, y, m]), I(() => {
|
|
10728
10732
|
if (!f || !y)
|
|
10729
10733
|
return;
|
|
10730
|
-
const { activeRefPruned: M } =
|
|
10734
|
+
const { activeRefPruned: M } = su(m);
|
|
10731
10735
|
M && yn();
|
|
10732
10736
|
}, [f, y, m]);
|
|
10733
|
-
const b = d.position === "bottom-left", v = d.colorScheme === "dark" || d.colorScheme === "light" ? d.colorScheme : "", x =
|
|
10737
|
+
const b = d.position === "bottom-left", v = d.colorScheme === "dark" || d.colorScheme === "light" ? d.colorScheme : "", x = gu({
|
|
10734
10738
|
...t,
|
|
10735
10739
|
primaryColor: d.primaryColor,
|
|
10736
10740
|
accentColor: d.accentColor,
|
|
@@ -10739,12 +10743,12 @@ function gp({ options: t }) {
|
|
|
10739
10743
|
borderRadius: d.borderRadius,
|
|
10740
10744
|
windowWidth: d.windowWidth,
|
|
10741
10745
|
windowHeight: d.windowHeight
|
|
10742
|
-
}), C = d.mode === "embedded", T = ue.value, N = T[T.length - 1]?.id === "chat", Q = e.config !== null || C || !!t.parentOrigin, ee = Q ? x : { ...x, visibility: "hidden" }, X =
|
|
10746
|
+
}), C = d.mode === "embedded", T = ue.value, N = T[T.length - 1]?.id === "chat", Q = e.config !== null || C || !!t.parentOrigin, ee = Q ? x : { ...x, visibility: "hidden" }, X = _u(t.orgSlug, t.projSlug);
|
|
10743
10747
|
return I(() => {
|
|
10744
10748
|
if (C || !Q || d.proactiveMode === "off" || Br(X))
|
|
10745
10749
|
return;
|
|
10746
10750
|
const M = window.setTimeout(() => {
|
|
10747
|
-
const Z =
|
|
10751
|
+
const Z = Cu({
|
|
10748
10752
|
mode: d.proactiveMode,
|
|
10749
10753
|
isOpen: V.peek(),
|
|
10750
10754
|
hasHistory: zn.peek(),
|
|
@@ -10823,9 +10827,9 @@ function gp({ options: t }) {
|
|
|
10823
10827
|
),
|
|
10824
10828
|
!d.hideBranding && /* @__PURE__ */ s(Ur, {})
|
|
10825
10829
|
] }),
|
|
10826
|
-
Ti.value && !V.value && /* @__PURE__ */ s(
|
|
10830
|
+
Ti.value && !V.value && /* @__PURE__ */ s(Iu, { title: d.title, message: d.greeting, guardKey: X }),
|
|
10827
10831
|
/* @__PURE__ */ s(
|
|
10828
|
-
|
|
10832
|
+
ju,
|
|
10829
10833
|
{
|
|
10830
10834
|
iconOption: d.triggerIcon,
|
|
10831
10835
|
radius: d.triggerRadius,
|
|
@@ -10836,34 +10840,34 @@ function gp({ options: t }) {
|
|
|
10836
10840
|
}
|
|
10837
10841
|
);
|
|
10838
10842
|
}
|
|
10839
|
-
const fp = `.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-fab-pulse{animation:jex-fab-pulse 2.4s ease-out infinite}@keyframes jex-fab-pulse{0%{box-shadow:var(--jex-shadow),0 0 color-mix(in srgb,var(--jex-bg-trigger) 50%,transparent)}70%{box-shadow:var(--jex-shadow),0 0 0 14px color-mix(in srgb,var(--jex-bg-trigger) 0%,transparent)}to{box-shadow:var(--jex-shadow),0 0 color-mix(in srgb,var(--jex-bg-trigger) 0%,transparent)}}@media(prefers-reduced-motion:reduce){.jex-fab-pulse{animation:none}}.jex-proactive-teaser{display:flex;align-items:flex-start;gap:10px;width:280px;max-width:calc(100vw - 48px);padding:12px 14px;align-self:flex-end;background:var(--jex-bg-window);color:var(--jex-text-main);border:1px solid var(--jex-border-window);border-radius:var(--jex-radius);box-shadow:var(--jex-shadow);cursor:pointer;text-align:left;animation:jex-teaser-in .22s ease-out}.jex-proactive-avatar{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;background:var(--jex-bg-avatar-agent);color:var(--jex-text-avatar-agent)}.jex-proactive-body{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-proactive-title{font-weight:600;font-size:13px;line-height:1.2}.jex-proactive-message{font-size:13px;line-height:1.35;color:var(--jex-text-muted)}.jex-proactive-dismiss{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:22px;height:22px;margin:-4px -4px 0 0;padding:0;border:none;background:transparent;color:var(--jex-text-muted);cursor:pointer;border-radius:9999px}.jex-proactive-dismiss:hover{background:var(--jex-bg-msg-bot)}@keyframes jex-teaser-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.jex-proactive-teaser{animation:none}}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:14px 16px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;width:100%;padding:0;border:none;background:transparent;font-family:inherit;text-align:left;cursor:pointer;animation:jexFadeIn .4s ease both}.jex-home-hero:disabled{cursor:default;opacity:.7}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:var(--jex-dot-color, #9ca3af);border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}.jex-home-status-dot--online{--jex-dot-color: #10b981}.jex-home-status-dot--away{--jex-dot-color: #fbbf24}.jex-home-status-dot--offline{--jex-dot-color: #9ca3af}@keyframes jexPulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--jex-dot-color, #9ca3af) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--jex-dot-color, #9ca3af) 0%,transparent)}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:13px;font-weight:500;color:var(--jex-text-muted);letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-section-label{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--jex-text-muted)}.jex-home-lookup-section{display:flex;flex-direction:column;gap:8px;margin-top:auto}.jex-home-lookup-label{font-size:12px;font-weight:500;color:var(--jex-text-muted)}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:12px;color:var(--jex-text-muted);margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start;flex-direction:column;align-items:stretch;gap:6px;max-width:92%}.jex-message-head{display:flex;align-items:center;gap:8px;padding-left:2px}.jex-message-head .jex-avatar{margin-bottom:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author{font-size:13px;font-weight:600;color:var(--jex-text-main);line-height:1.2}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-radius:16px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-chat-input-composer-gate{position:relative}.jex-chat-input-composer-gate-open{z-index:2}.jex-chat-input-composer-gate-open .jex-composer-card{pointer-events:none}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-privacy-notice-link,.jex-privacy-chip-link{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px;text-decoration-color:color-mix(in srgb,var(--jex-primary) 50%,transparent);transition:text-decoration-color .15s}.jex-privacy-notice-link:hover,.jex-privacy-chip-link:hover{text-decoration-color:var(--jex-primary)}.jex-privacy-chip{align-self:center;display:inline-flex;align-items:center;gap:6px;max-width:100%;margin:0;padding:5px 10px;border-radius:999px;background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));color:var(--jex-primary);font-size:10px;font-weight:650;line-height:1.2}.jex-privacy-chip-icon{display:inline-flex;flex-shrink:0}.jex-privacy-chip-link{color:inherit;text-decoration:none}.jex-privacy-explicit{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;flex-direction:column;gap:10px;min-height:100%;padding:10px 12px 12px;border:1px solid var(--jex-border-window);border-radius:14px 14px 10px 10px;background:var(--jex-bg-window);box-shadow:0 -12px 36px #0f172a24;pointer-events:auto}.jex-privacy-explicit-content{display:flex;align-items:flex-start;gap:10px}.jex-privacy-explicit-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:8px;background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));color:var(--jex-primary);flex-shrink:0}.jex-privacy-explicit-copy{min-width:0;flex:1}.jex-privacy-explicit-title{color:var(--jex-text-main);font-size:12px;font-weight:750;line-height:1.2;margin-bottom:3px}.jex-privacy-explicit-body{margin:0;color:var(--jex-text-muted);font-size:10px;line-height:1.35}.jex-privacy-explicit-button{width:100%;border:none;border-radius:10px;background:var(--jex-bg-send-btn);color:var(--jex-text-header);cursor:pointer;font-family:inherit;font-size:12px;font-weight:750;padding:9px 12px;transition:background .15s ease,transform .12s ease}.jex-privacy-explicit-button:hover{background:var(--jex-primary-hover)}.jex-privacy-explicit-button:active{transform:scale(.98)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-magicline-row{display:flex;flex-direction:column;gap:8px}.jex-magicline-row>*{min-width:0}.jex-magicline-field{display:flex;flex-direction:column;gap:4px}.jex-magicline-field-label{font-size:12px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-magicline-select{width:100%;appearance:none;cursor:pointer;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px 16px}.jex-magicline-slots-hint{font-size:12px;color:var(--jex-text-muted, #64748b);line-height:1.4;padding:2px 0}.jex-magicline-consent{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.35;color:var(--jex-text-muted, #64748b);margin-top:2px;cursor:pointer}.jex-magicline-consent input[type=checkbox]{flex-shrink:0;margin-top:1px;accent-color:var(--jex-primary, #115A62)}.jex-magicline-error{font-size:12px;color:#dc2626;line-height:1.35}.jex-magicline-failed{border-color:color-mix(in srgb,#dc2626 35%,var(--jex-border-input, #e2e8f0))}.jex-magicline-failed-icon{background:color-mix(in srgb,#dc2626 15%,transparent);color:#dc2626}.jex-magicline-wizard-header{display:flex;flex-direction:column;gap:6px}.jex-magicline-wizard-progress{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.jex-magicline-wizard-step-label{font-size:13px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-wizard-counter{font-size:11px;color:var(--jex-text-muted, #64748b);flex-shrink:0}.jex-magicline-wizard-dots{display:flex;gap:6px}.jex-magicline-wizard-dot{width:7px;height:7px;border-radius:50%;background:color-mix(in srgb,var(--jex-text-muted, #64748b) 35%,transparent)}.jex-magicline-wizard-dot-active{background:var(--jex-primary, #115A62)}.jex-magicline-wizard-nav{display:flex;align-items:center;gap:8px;margin-top:4px}.jex-magicline-wizard-next{flex:1;margin-top:0}.jex-magicline-wizard-back{padding:10px 14px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);background:transparent;color:var(--jex-text-main, #0f172a);font-size:14px;font-weight:600;cursor:pointer}.jex-magicline-wizard-back:hover{background:var(--jex-bg-window, #fff)}.jex-magicline-wizard-back:disabled,.jex-magicline-wizard-next:disabled{opacity:.7;cursor:not-allowed}.jex-magicline-radio-group{display:flex;flex-direction:column;gap:8px}.jex-magicline-radio-card{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;color:var(--jex-text-main, #0f172a);cursor:pointer}.jex-magicline-radio-card-active{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 8%,transparent)}.jex-magicline-radio-card input[type=radio]{flex-shrink:0;accent-color:var(--jex-primary, #115A62)}.jex-magicline-slots-error{display:flex;flex-direction:column;gap:6px}.jex-magicline-retry{align-self:flex-start;padding:6px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);background:transparent;color:var(--jex-text-main, #0f172a);font-size:13px;font-weight:600;cursor:pointer}.jex-magicline-retry:hover{background:var(--jex-bg-window, #fff)}.jex-magicline-retry:disabled{opacity:.7;cursor:not-allowed}.jex-magicline-voucher-section{display:flex;flex-direction:column;gap:6px;margin-top:4px}.jex-magicline-voucher-field{flex-direction:row;align-items:stretch;gap:8px}.jex-magicline-voucher-field .jex-form-input{flex:1;min-width:0}.jex-magicline-voucher-apply{flex:0 0 auto;padding:10px 16px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap}.jex-magicline-voucher-apply:hover{background:var(--jex-primary-hover)}.jex-magicline-voucher-apply:disabled{opacity:.7;cursor:not-allowed}.jex-magicline-review-wrap{position:relative}.jex-magicline-review-body{display:flex;flex-direction:column;gap:10px;transition:opacity .15s ease}.jex-magicline-review-body--reloading{opacity:.5;pointer-events:none}.jex-magicline-review-overlay{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-top:48px}.jex-magicline-review-spinner{width:28px;height:28px;border-radius:50%;border:3px solid color-mix(in srgb,var(--jex-primary, #115A62) 25%,transparent);border-top-color:var(--jex-primary, #115A62);animation:jex-magicline-spin .7s linear infinite}@keyframes jex-magicline-spin{to{transform:rotate(360deg)}}.jex-magicline-voucher-discount-row dt,.jex-magicline-voucher-remarks-row dt{flex-shrink:1;min-width:0}.jex-magicline-voucher-remarks-row dd{min-width:0;overflow-wrap:anywhere;word-break:break-word}.jex-magicline-summary{display:flex;flex-direction:column;gap:6px;margin:0;padding:10px 12px;border-radius:8px;background:var(--jex-bg-window, #fff);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-magicline-summary-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.jex-magicline-summary-row dt{font-size:12px;color:var(--jex-text-muted, #64748b);flex-shrink:0}.jex-magicline-summary-row dd{margin:0;font-size:13px;font-weight:500;color:var(--jex-text-main, #0f172a);text-align:right;min-width:0}.jex-magicline-summary-section{margin-top:8px}.jex-magicline-summary-heading{font-size:12px;font-weight:600;color:var(--jex-text-main, #0f172a);margin-bottom:2px}.jex-magicline-summary-totals{background:color-mix(in srgb,var(--jex-primary, #115A62) 6%,transparent);border-color:color-mix(in srgb,var(--jex-primary, #115A62) 25%,transparent)}.jex-magicline-summary-total-row dt,.jex-magicline-summary-total-row dd{font-size:14px;font-weight:700;color:var(--jex-text-main, #0f172a)}.jex-magicline-summary-total-row dt{flex-shrink:1;min-width:0}.jex-magicline-summary-total-row dd{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.jex-magicline-offer-group{display:flex;flex-direction:column;gap:8px}.jex-magicline-offer-bundle-name{font-size:13px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-offer-bundle-desc{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-radio-card .jex-magicline-offer-term{display:flex;flex-direction:column;gap:4px;flex:1}.jex-magicline-offer-term-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.jex-magicline-offer-term-length{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-offer-term-price{font-size:13px;font-weight:500;color:var(--jex-primary, #115A62)}.jex-magicline-offer-term-note{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-static-value{padding:9px 12px;border-radius:8px;font-size:14px;color:var(--jex-text-main, #0f172a);background:var(--jex-bg-window, #f8fafc);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-magicline-terms{display:flex;flex-direction:column;gap:10px;padding:10px 12px;border-radius:8px;background:var(--jex-bg-window, #fff);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-magicline-upgrades-recap-title,.jex-magicline-terms-title{font-size:12px;font-weight:600;color:var(--jex-text-main, #0f172a);margin-bottom:2px}.jex-magicline-terms-content{font-size:12px;line-height:1.5;color:var(--jex-text-muted, #64748b);white-space:pre-wrap}.jex-magicline-upgrade-group{display:flex;flex-direction:column;gap:8px}.jex-magicline-upgrade-card{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;color:var(--jex-text-main, #0f172a);cursor:pointer}.jex-magicline-upgrade-card-active{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 8%,transparent)}.jex-magicline-upgrade-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;cursor:pointer}.jex-magicline-upgrade-info{display:flex;flex-direction:column;gap:2px;flex:1}.jex-magicline-upgrade-name{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-upgrade-desc{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-upgrade-price{font-size:13px;font-weight:500;color:var(--jex-primary, #115A62)}.jex-magicline-upgrade-status{flex-shrink:0;font-size:11px;font-weight:600;padding:2px 7px;border-radius:6px;border:1px solid var(--jex-border-input, #e2e8f0);color:var(--jex-text-muted, #64748b);background:transparent;white-space:nowrap}.jex-magicline-upgrade-card-active .jex-magicline-upgrade-status{border-color:var(--jex-primary, #115A62);color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 12%,transparent)}.jex-magicline-terms-prompt{font-size:13px;font-weight:600;color:var(--jex-text-main, #0f172a);margin-bottom:4px}.jex-magicline-bundle-details{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-bundle-details-summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--jex-primary, #115A62);list-style-position:inside}.jex-magicline-bundle-details-summary:hover{text-decoration:underline}.jex-magicline-bundle-details-body{display:flex;flex-direction:column;gap:6px;margin-top:6px}.jex-magicline-bundle-details-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:2px;line-height:1.4}.jex-magicline-bundle-details-footnote{margin:0;line-height:1.4}.jex-magicline-consent-region{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding:6px 8px;border-left:3px solid var(--jex-primary, #115A62);border-radius:6px;background:color-mix(in srgb,var(--jex-primary, #115A62) 6%,transparent)}.jex-magicline-required-pill{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 12%,transparent);vertical-align:middle}.jex-magicline-consent-body{display:flex;flex-direction:column;gap:1px}.jex-magicline-consent-recap{display:flex;flex-direction:column;gap:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-starter-chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}.jex-starter-chip{display:inline-flex;align-items:center;border-radius:999px;padding:7px 13px;background:var(--jex-bg-window);border:1px solid var(--jex-border-input);color:var(--jex-primary);text-align:left;font-size:13.5px;font-weight:500;line-height:1.2;cursor:pointer;transition:background .15s,border-color .15s,opacity .15s}.jex-starter-chip:hover:not(:disabled){background:color-mix(in srgb,var(--jex-primary) 8%,var(--jex-bg-window));border-color:var(--jex-primary)}.jex-starter-chip:disabled{opacity:.5;cursor:default}.jex-presence-dot{position:absolute;top:2px;right:2px;width:8px;height:8px;border-radius:999px;box-shadow:0 0 0 2px var(--jex-bg-header, #115A62)}.jex-presence-dot--online{background:#10b981}.jex-presence-dot--away{background:#fbbf24}.jex-presence-dot--offline{background:#9ca3af}@keyframes jex-ripple-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.6);opacity:0}}.jex-waiting-card{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;margin:0 12px 8px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem)}.jex-waiting-indicator{position:relative;flex-shrink:0;width:20px;height:20px;margin-top:2px;display:flex;align-items:center;justify-content:center}.jex-waiting-dot{position:relative;z-index:1;width:8px;height:8px;border-radius:50%;background:var(--jex-primary, #115A62)}.jex-waiting-ripple{position:absolute;inset:0;width:8px;height:8px;margin:auto;border-radius:50%;background:var(--jex-primary, #115A62);animation:jex-ripple-expand 1.6s ease-out infinite}@media(prefers-reduced-motion:reduce){.jex-waiting-ripple{animation:none}}.jex-waiting-body{display:flex;flex-direction:column;gap:4px;min-width:0}.jex-waiting-title{font-weight:600;font-size:14px;color:var(--jex-text-main, #0f172a);line-height:1.3}.jex-waiting-subtitle{font-size:12px;color:var(--jex-text-muted, #64748b);line-height:1.4}.jex-waiting-leave-email{margin-top:6px;padding:0;border:none;background:transparent;color:var(--jex-primary, #115A62);font-size:12px;font-family:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer;text-align:left}.jex-waiting-leave-email:hover{opacity:.8}`;
|
|
10840
|
-
function
|
|
10843
|
+
const xp = `.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-fab-pulse{animation:jex-fab-pulse 2.4s ease-out infinite}@keyframes jex-fab-pulse{0%{box-shadow:var(--jex-shadow),0 0 color-mix(in srgb,var(--jex-bg-trigger) 50%,transparent)}70%{box-shadow:var(--jex-shadow),0 0 0 14px color-mix(in srgb,var(--jex-bg-trigger) 0%,transparent)}to{box-shadow:var(--jex-shadow),0 0 color-mix(in srgb,var(--jex-bg-trigger) 0%,transparent)}}@media(prefers-reduced-motion:reduce){.jex-fab-pulse{animation:none}}.jex-proactive-teaser{display:flex;align-items:flex-start;gap:10px;width:280px;max-width:calc(100vw - 48px);padding:12px 14px;align-self:flex-end;background:var(--jex-bg-window);color:var(--jex-text-main);border:1px solid var(--jex-border-window);border-radius:var(--jex-radius);box-shadow:var(--jex-shadow);cursor:pointer;text-align:left;animation:jex-teaser-in .22s ease-out}.jex-proactive-avatar{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;background:var(--jex-bg-avatar-agent);color:var(--jex-text-avatar-agent)}.jex-proactive-body{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-proactive-title{font-weight:600;font-size:13px;line-height:1.2}.jex-proactive-message{font-size:13px;line-height:1.35;color:var(--jex-text-muted)}.jex-proactive-dismiss{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:22px;height:22px;margin:-4px -4px 0 0;padding:0;border:none;background:transparent;color:var(--jex-text-muted);cursor:pointer;border-radius:9999px}.jex-proactive-dismiss:hover{background:var(--jex-bg-msg-bot)}@keyframes jex-teaser-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.jex-proactive-teaser{animation:none}}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:14px 16px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;width:100%;padding:0;border:none;background:transparent;font-family:inherit;text-align:left;cursor:pointer;animation:jexFadeIn .4s ease both}.jex-home-hero:disabled{cursor:default;opacity:.7}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:var(--jex-dot-color, #9ca3af);border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}.jex-home-status-dot--online{--jex-dot-color: #10b981}.jex-home-status-dot--away{--jex-dot-color: #fbbf24}.jex-home-status-dot--offline{--jex-dot-color: #9ca3af}@keyframes jexPulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--jex-dot-color, #9ca3af) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--jex-dot-color, #9ca3af) 0%,transparent)}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:13px;font-weight:500;color:var(--jex-text-muted);letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-section-label{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--jex-text-muted)}.jex-home-lookup-section{display:flex;flex-direction:column;gap:8px;margin-top:auto}.jex-home-lookup-label{font-size:12px;font-weight:500;color:var(--jex-text-muted)}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:12px;color:var(--jex-text-muted);margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start;flex-direction:column;align-items:stretch;gap:6px;max-width:92%}.jex-message-head{display:flex;align-items:center;gap:8px;padding-left:2px}.jex-message-head .jex-avatar{margin-bottom:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author{font-size:13px;font-weight:600;color:var(--jex-text-main);line-height:1.2}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-radius:16px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-chat-input-composer-gate{position:relative}.jex-chat-input-composer-gate-open{z-index:2}.jex-chat-input-composer-gate-open .jex-composer-card{pointer-events:none}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-privacy-notice-link,.jex-privacy-chip-link{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px;text-decoration-color:color-mix(in srgb,var(--jex-primary) 50%,transparent);transition:text-decoration-color .15s}.jex-privacy-notice-link:hover,.jex-privacy-chip-link:hover{text-decoration-color:var(--jex-primary)}.jex-privacy-chip{align-self:center;display:inline-flex;align-items:center;gap:6px;max-width:100%;margin:0;padding:5px 10px;border-radius:999px;background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));color:var(--jex-primary);font-size:10px;font-weight:650;line-height:1.2}.jex-privacy-chip-icon{display:inline-flex;flex-shrink:0}.jex-privacy-chip-link{color:inherit;text-decoration:none}.jex-privacy-explicit{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;flex-direction:column;gap:10px;min-height:100%;padding:10px 12px 12px;border:1px solid var(--jex-border-window);border-radius:14px 14px 10px 10px;background:var(--jex-bg-window);box-shadow:0 -12px 36px #0f172a24;pointer-events:auto}.jex-privacy-explicit-content{display:flex;align-items:flex-start;gap:10px}.jex-privacy-explicit-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:8px;background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));color:var(--jex-primary);flex-shrink:0}.jex-privacy-explicit-copy{min-width:0;flex:1}.jex-privacy-explicit-title{color:var(--jex-text-main);font-size:12px;font-weight:750;line-height:1.2;margin-bottom:3px}.jex-privacy-explicit-body{margin:0;color:var(--jex-text-muted);font-size:10px;line-height:1.35}.jex-privacy-explicit-button{width:100%;border:none;border-radius:10px;background:var(--jex-bg-send-btn);color:var(--jex-text-header);cursor:pointer;font-family:inherit;font-size:12px;font-weight:750;padding:9px 12px;transition:background .15s ease,transform .12s ease}.jex-privacy-explicit-button:hover{background:var(--jex-primary-hover)}.jex-privacy-explicit-button:active{transform:scale(.98)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-magicline-row{display:flex;flex-direction:column;gap:8px}.jex-magicline-row>*{min-width:0}.jex-magicline-field{display:flex;flex-direction:column;gap:4px}.jex-magicline-field-label{font-size:12px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-magicline-select{width:100%;appearance:none;cursor:pointer;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px 16px}.jex-magicline-slots-hint{font-size:12px;color:var(--jex-text-muted, #64748b);line-height:1.4;padding:2px 0}.jex-magicline-consent{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.35;color:var(--jex-text-muted, #64748b);margin-top:2px;cursor:pointer}.jex-magicline-consent input[type=checkbox]{flex-shrink:0;margin-top:1px;accent-color:var(--jex-primary, #115A62)}.jex-magicline-error{font-size:12px;color:#dc2626;line-height:1.35}.jex-magicline-failed{border-color:color-mix(in srgb,#dc2626 35%,var(--jex-border-input, #e2e8f0))}.jex-magicline-failed-icon{background:color-mix(in srgb,#dc2626 15%,transparent);color:#dc2626}.jex-magicline-wizard-header{display:flex;flex-direction:column;gap:6px}.jex-magicline-wizard-progress{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.jex-magicline-wizard-step-label{font-size:13px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-wizard-counter{font-size:11px;color:var(--jex-text-muted, #64748b);flex-shrink:0}.jex-magicline-wizard-dots{display:flex;gap:6px}.jex-magicline-wizard-dot{width:7px;height:7px;border-radius:50%;background:color-mix(in srgb,var(--jex-text-muted, #64748b) 35%,transparent)}.jex-magicline-wizard-dot-active{background:var(--jex-primary, #115A62)}.jex-magicline-wizard-nav{display:flex;align-items:center;gap:8px;margin-top:4px}.jex-magicline-wizard-next{flex:1;margin-top:0}.jex-magicline-wizard-back{padding:10px 14px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);background:transparent;color:var(--jex-text-main, #0f172a);font-size:14px;font-weight:600;cursor:pointer}.jex-magicline-wizard-back:hover{background:var(--jex-bg-window, #fff)}.jex-magicline-wizard-back:disabled,.jex-magicline-wizard-next:disabled{opacity:.7;cursor:not-allowed}.jex-magicline-radio-group{display:flex;flex-direction:column;gap:8px}.jex-magicline-radio-card{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;color:var(--jex-text-main, #0f172a);cursor:pointer}.jex-magicline-radio-card-active{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 8%,transparent)}.jex-magicline-radio-card input[type=radio]{flex-shrink:0;accent-color:var(--jex-primary, #115A62)}.jex-magicline-slots-error{display:flex;flex-direction:column;gap:6px}.jex-magicline-retry{align-self:flex-start;padding:6px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);background:transparent;color:var(--jex-text-main, #0f172a);font-size:13px;font-weight:600;cursor:pointer}.jex-magicline-retry:hover{background:var(--jex-bg-window, #fff)}.jex-magicline-retry:disabled{opacity:.7;cursor:not-allowed}.jex-magicline-voucher-section{display:flex;flex-direction:column;gap:6px;margin-top:4px}.jex-magicline-voucher-field{flex-direction:row;align-items:stretch;gap:8px}.jex-magicline-voucher-field .jex-form-input{flex:1;min-width:0}.jex-magicline-voucher-apply{flex:0 0 auto;padding:10px 16px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap}.jex-magicline-voucher-apply:hover{background:var(--jex-primary-hover)}.jex-magicline-voucher-apply:disabled{opacity:.7;cursor:not-allowed}.jex-magicline-review-wrap{position:relative}.jex-magicline-review-body{display:flex;flex-direction:column;gap:10px;transition:opacity .15s ease}.jex-magicline-review-body--reloading{opacity:.5;pointer-events:none}.jex-magicline-review-overlay{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-top:48px}.jex-magicline-review-spinner{width:28px;height:28px;border-radius:50%;border:3px solid color-mix(in srgb,var(--jex-primary, #115A62) 25%,transparent);border-top-color:var(--jex-primary, #115A62);animation:jex-magicline-spin .7s linear infinite}@keyframes jex-magicline-spin{to{transform:rotate(360deg)}}.jex-magicline-voucher-discount-row dt,.jex-magicline-voucher-remarks-row dt{flex-shrink:1;min-width:0}.jex-magicline-voucher-remarks-row dd{min-width:0;overflow-wrap:anywhere;word-break:break-word}.jex-magicline-summary{display:flex;flex-direction:column;gap:6px;margin:0;padding:10px 12px;border-radius:8px;background:var(--jex-bg-window, #fff);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-magicline-summary-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.jex-magicline-summary-row dt{font-size:12px;color:var(--jex-text-muted, #64748b);flex-shrink:0}.jex-magicline-summary-row dd{margin:0;font-size:13px;font-weight:500;color:var(--jex-text-main, #0f172a);text-align:right;min-width:0}.jex-magicline-summary-section{margin-top:8px}.jex-magicline-summary-heading{font-size:12px;font-weight:600;color:var(--jex-text-main, #0f172a);margin-bottom:2px}.jex-magicline-summary-totals{background:color-mix(in srgb,var(--jex-primary, #115A62) 6%,transparent);border-color:color-mix(in srgb,var(--jex-primary, #115A62) 25%,transparent)}.jex-magicline-summary-total-row dt,.jex-magicline-summary-total-row dd{font-size:14px;font-weight:700;color:var(--jex-text-main, #0f172a)}.jex-magicline-summary-total-row dt{flex-shrink:1;min-width:0}.jex-magicline-summary-total-row dd{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.jex-magicline-offer-group{display:flex;flex-direction:column;gap:8px}.jex-magicline-offer-bundle-name{font-size:13px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-offer-bundle-desc{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-radio-card .jex-magicline-offer-term{display:flex;flex-direction:column;gap:4px;flex:1}.jex-magicline-offer-term-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.jex-magicline-offer-term-length{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-offer-term-price{font-size:13px;font-weight:500;color:var(--jex-primary, #115A62)}.jex-magicline-offer-term-note{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-static-value{padding:9px 12px;border-radius:8px;font-size:14px;color:var(--jex-text-main, #0f172a);background:var(--jex-bg-window, #f8fafc);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-magicline-terms{display:flex;flex-direction:column;gap:10px;padding:10px 12px;border-radius:8px;background:var(--jex-bg-window, #fff);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-magicline-upgrades-recap-title,.jex-magicline-terms-title{font-size:12px;font-weight:600;color:var(--jex-text-main, #0f172a);margin-bottom:2px}.jex-magicline-terms-content{font-size:12px;line-height:1.5;color:var(--jex-text-muted, #64748b);white-space:pre-wrap}.jex-magicline-upgrade-group{display:flex;flex-direction:column;gap:8px}.jex-magicline-upgrade-card{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;color:var(--jex-text-main, #0f172a);cursor:pointer}.jex-magicline-upgrade-card-active{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 8%,transparent)}.jex-magicline-upgrade-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;cursor:pointer}.jex-magicline-upgrade-info{display:flex;flex-direction:column;gap:2px;flex:1}.jex-magicline-upgrade-name{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-magicline-upgrade-desc{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-upgrade-price{font-size:13px;font-weight:500;color:var(--jex-primary, #115A62)}.jex-magicline-upgrade-status{flex-shrink:0;font-size:11px;font-weight:600;padding:2px 7px;border-radius:6px;border:1px solid var(--jex-border-input, #e2e8f0);color:var(--jex-text-muted, #64748b);background:transparent;white-space:nowrap}.jex-magicline-upgrade-card-active .jex-magicline-upgrade-status{border-color:var(--jex-primary, #115A62);color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 12%,transparent)}.jex-magicline-terms-prompt{font-size:13px;font-weight:600;color:var(--jex-text-main, #0f172a);margin-bottom:4px}.jex-magicline-bundle-details{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-magicline-bundle-details-summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--jex-primary, #115A62);list-style-position:inside}.jex-magicline-bundle-details-summary:hover{text-decoration:underline}.jex-magicline-bundle-details-body{display:flex;flex-direction:column;gap:6px;margin-top:6px}.jex-magicline-bundle-details-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:2px;line-height:1.4}.jex-magicline-bundle-details-footnote{margin:0;line-height:1.4}.jex-magicline-consent-region{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding:6px 8px;border-left:3px solid var(--jex-primary, #115A62);border-radius:6px;background:color-mix(in srgb,var(--jex-primary, #115A62) 6%,transparent)}.jex-magicline-required-pill{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 12%,transparent);vertical-align:middle}.jex-magicline-consent-body{display:flex;flex-direction:column;gap:1px}.jex-magicline-consent-recap{display:flex;flex-direction:column;gap:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-starter-chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}.jex-starter-chip{display:inline-flex;align-items:center;border-radius:999px;padding:7px 13px;background:var(--jex-bg-window);border:1px solid var(--jex-border-input);color:var(--jex-primary);text-align:left;font-size:13.5px;font-weight:500;line-height:1.2;cursor:pointer;transition:background .15s,border-color .15s,opacity .15s}.jex-starter-chip:hover:not(:disabled){background:color-mix(in srgb,var(--jex-primary) 8%,var(--jex-bg-window));border-color:var(--jex-primary)}.jex-starter-chip:disabled{opacity:.5;cursor:default}.jex-presence-dot{position:absolute;top:2px;right:2px;width:8px;height:8px;border-radius:999px;box-shadow:0 0 0 2px var(--jex-bg-header, #115A62)}.jex-presence-dot--online{background:#10b981}.jex-presence-dot--away{background:#fbbf24}.jex-presence-dot--offline{background:#9ca3af}@keyframes jex-ripple-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.6);opacity:0}}.jex-waiting-card{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;margin:0 12px 8px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem)}.jex-waiting-indicator{position:relative;flex-shrink:0;width:20px;height:20px;margin-top:2px;display:flex;align-items:center;justify-content:center}.jex-waiting-dot{position:relative;z-index:1;width:8px;height:8px;border-radius:50%;background:var(--jex-primary, #115A62)}.jex-waiting-ripple{position:absolute;inset:0;width:8px;height:8px;margin:auto;border-radius:50%;background:var(--jex-primary, #115A62);animation:jex-ripple-expand 1.6s ease-out infinite}@media(prefers-reduced-motion:reduce){.jex-waiting-ripple{animation:none}}.jex-waiting-body{display:flex;flex-direction:column;gap:4px;min-width:0}.jex-waiting-title{font-weight:600;font-size:14px;color:var(--jex-text-main, #0f172a);line-height:1.3}.jex-waiting-subtitle{font-size:12px;color:var(--jex-text-muted, #64748b);line-height:1.4}.jex-waiting-leave-email{margin-top:6px;padding:0;border:none;background:transparent;color:var(--jex-primary, #115A62);font-size:12px;font-family:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer;text-align:left}.jex-waiting-leave-email:hover{opacity:.8}`;
|
|
10844
|
+
function bp(t) {
|
|
10841
10845
|
const e = document.createElement("style");
|
|
10842
|
-
e.textContent =
|
|
10846
|
+
e.textContent = xp, t.appendChild(e);
|
|
10843
10847
|
}
|
|
10844
|
-
const
|
|
10848
|
+
const vp = "https://festive-mouse-978.eu-west-1.convex.cloud";
|
|
10845
10849
|
let en = null;
|
|
10846
|
-
function
|
|
10847
|
-
const e = t ??
|
|
10850
|
+
function yp(t) {
|
|
10851
|
+
const e = t ?? vp;
|
|
10848
10852
|
if (!e)
|
|
10849
10853
|
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
10850
10854
|
return en || (en = new yc(zc(e))), en;
|
|
10851
10855
|
}
|
|
10852
|
-
function
|
|
10856
|
+
function kp(t, e) {
|
|
10853
10857
|
const i = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
10854
10858
|
for (; i.firstChild; )
|
|
10855
10859
|
i.removeChild(i.firstChild);
|
|
10856
|
-
|
|
10860
|
+
bp(i), Ci.value = e.source, Qe.value = e.bootstrapToken, ue.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), V.value = !0);
|
|
10857
10861
|
const n = document.createElement("div");
|
|
10858
10862
|
return e.mode === "embedded" && (n.style.cssText = "width:100%;height:100%"), i.appendChild(n), tt(
|
|
10859
|
-
/* @__PURE__ */ s(wc, { client:
|
|
10863
|
+
/* @__PURE__ */ s(wc, { client: yp(e.convexUrl), children: /* @__PURE__ */ s(fp, { options: e }) }),
|
|
10860
10864
|
n
|
|
10861
10865
|
), function() {
|
|
10862
10866
|
tt(null, n), V.value = !1, Ci.value = void 0, Qe.value = void 0, ue.value = [{ id: "home" }];
|
|
10863
10867
|
};
|
|
10864
10868
|
}
|
|
10865
|
-
function
|
|
10866
|
-
const n =
|
|
10869
|
+
function wp(t, e, i) {
|
|
10870
|
+
const n = kp(t, e), r = /* @__PURE__ */ new Set(), o = V.subscribe((a) => {
|
|
10867
10871
|
for (const l of r)
|
|
10868
10872
|
l(a);
|
|
10869
10873
|
});
|
|
@@ -10891,21 +10895,21 @@ function yp(t, e, i) {
|
|
|
10891
10895
|
};
|
|
10892
10896
|
}
|
|
10893
10897
|
let Et = null;
|
|
10894
|
-
function
|
|
10898
|
+
function jp(t) {
|
|
10895
10899
|
Et && Et.shutdown();
|
|
10896
10900
|
let e;
|
|
10897
10901
|
t.container ? e = typeof t.container == "string" ? document.querySelector(t.container) : t.container : (e = document.createElement("div"), e.id = "jexity-chat-widget", document.body.appendChild(e));
|
|
10898
|
-
const i =
|
|
10902
|
+
const i = wp(e, t, () => {
|
|
10899
10903
|
t.container || e.remove(), Et === i && (Et = null);
|
|
10900
10904
|
});
|
|
10901
10905
|
return Et = i, i;
|
|
10902
10906
|
}
|
|
10903
|
-
const
|
|
10907
|
+
const _p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10904
10908
|
__proto__: null,
|
|
10905
|
-
JexityChat:
|
|
10909
|
+
JexityChat: jp
|
|
10906
10910
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10907
10911
|
export {
|
|
10908
|
-
|
|
10909
|
-
|
|
10912
|
+
Cp as JexityChatProvider,
|
|
10913
|
+
Ip as useJexityChat
|
|
10910
10914
|
};
|
|
10911
10915
|
//# sourceMappingURL=react.mjs.map
|