@bymos/agentkit-sdk 0.9.4 → 0.9.5
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/README.md +2 -1
- package/agentkit-widget.iife.js +240 -239
- package/agentkit-widget.js +240 -239
- package/index.cjs +240 -239
- package/index.d.ts +13 -4
- package/index.js +728 -751
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2760,6 +2760,7 @@ var dt = ct({
|
|
|
2760
2760
|
subtitle: B().optional(),
|
|
2761
2761
|
description: B().optional(),
|
|
2762
2762
|
avatarUrl: B().optional(),
|
|
2763
|
+
launcherLabel: B().optional(),
|
|
2763
2764
|
streaming: ot().optional(),
|
|
2764
2765
|
preview: ot().optional(),
|
|
2765
2766
|
skipServerConfigFetch: ot().optional(),
|
|
@@ -2769,10 +2770,11 @@ var dt = ct({
|
|
|
2769
2770
|
}), mt = pt.omit({
|
|
2770
2771
|
agentId: !0,
|
|
2771
2772
|
apiBaseUrl: !0
|
|
2772
|
-
}).partial(),
|
|
2773
|
+
}).partial(), V = {
|
|
2773
2774
|
mode: "floating",
|
|
2774
2775
|
streaming: !0,
|
|
2775
2776
|
title: "AI Assistant",
|
|
2777
|
+
launcherLabel: "",
|
|
2776
2778
|
theme: {
|
|
2777
2779
|
mode: "light",
|
|
2778
2780
|
accentColor: "#4f46e5",
|
|
@@ -2780,15 +2782,15 @@ var dt = ct({
|
|
|
2780
2782
|
borderRadius: "12px"
|
|
2781
2783
|
}
|
|
2782
2784
|
};
|
|
2783
|
-
function
|
|
2785
|
+
function ht(e, t) {
|
|
2784
2786
|
pt.parse(e);
|
|
2785
2787
|
let n, r = t ? { ...t } : void 0;
|
|
2786
2788
|
r && typeof r.theme == "object" && r.theme !== null ? (n = r.theme, delete r.theme) : r && typeof r.theme == "string" && (n = { mode: r.theme }, delete r.theme);
|
|
2787
|
-
let i = r ? mt.passthrough().safeParse(r).data : void 0, a = i ?
|
|
2788
|
-
mode: a.theme?.mode ?? n?.mode ??
|
|
2789
|
-
accentColor: a.theme?.accentColor || n?.accentColor ||
|
|
2790
|
-
fontFamily: a.theme?.fontFamily ?? n?.fontFamily ??
|
|
2791
|
-
borderRadius: a.theme?.borderRadius ?? n?.borderRadius ??
|
|
2789
|
+
let i = r ? mt.passthrough().safeParse(r).data : void 0, a = i ? gt(i, e) : e, o = {
|
|
2790
|
+
mode: a.theme?.mode ?? n?.mode ?? V.theme.mode,
|
|
2791
|
+
accentColor: a.theme?.accentColor || n?.accentColor || V.theme.accentColor,
|
|
2792
|
+
fontFamily: a.theme?.fontFamily ?? n?.fontFamily ?? V.theme.fontFamily,
|
|
2793
|
+
borderRadius: a.theme?.borderRadius ?? n?.borderRadius ?? V.theme.borderRadius
|
|
2792
2794
|
};
|
|
2793
2795
|
return {
|
|
2794
2796
|
agentId: a.agentId,
|
|
@@ -2801,8 +2803,8 @@ function gt(e, t) {
|
|
|
2801
2803
|
email: a.user?.email
|
|
2802
2804
|
},
|
|
2803
2805
|
sessionId: a.sessionId,
|
|
2804
|
-
mode: a.mode ??
|
|
2805
|
-
title: a.title ??
|
|
2806
|
+
mode: a.mode ?? V.mode,
|
|
2807
|
+
title: a.title ?? V.title,
|
|
2806
2808
|
subtitle: a.subtitle,
|
|
2807
2809
|
description: a.description,
|
|
2808
2810
|
suggestedQuestions: (() => {
|
|
@@ -2810,7 +2812,8 @@ function gt(e, t) {
|
|
|
2810
2812
|
return Array.isArray(e) ? e : [];
|
|
2811
2813
|
})(),
|
|
2812
2814
|
avatarUrl: a.avatarUrl,
|
|
2813
|
-
|
|
2815
|
+
launcherLabel: (a.launcherLabel ?? V.launcherLabel).trim().slice(0, 40),
|
|
2816
|
+
streaming: a.streaming ?? V.streaming,
|
|
2814
2817
|
preview: a.preview === !0,
|
|
2815
2818
|
skipServerConfigFetch: a.skipServerConfigFetch === !0,
|
|
2816
2819
|
configChannel: a.configChannel,
|
|
@@ -2837,22 +2840,22 @@ function gt(e, t) {
|
|
|
2837
2840
|
})()
|
|
2838
2841
|
};
|
|
2839
2842
|
}
|
|
2840
|
-
function
|
|
2843
|
+
function gt(e, t) {
|
|
2841
2844
|
let n = { ...e };
|
|
2842
2845
|
for (let e of Object.keys(t)) {
|
|
2843
2846
|
let r = t[e];
|
|
2844
|
-
r != null && (n[e] = typeof r == "object" && !Array.isArray(r) && n[e] !== null && typeof n[e] == "object" ?
|
|
2847
|
+
r != null && (n[e] = typeof r == "object" && !Array.isArray(r) && n[e] !== null && typeof n[e] == "object" ? gt(n[e], r) : r);
|
|
2845
2848
|
}
|
|
2846
2849
|
return n;
|
|
2847
2850
|
}
|
|
2848
2851
|
// ../../node_modules/.pnpm/tslib@2.9.1/node_modules/tslib/tslib.es6.mjs
|
|
2849
|
-
var
|
|
2850
|
-
return
|
|
2852
|
+
var _t = function() {
|
|
2853
|
+
return _t = Object.assign || function(e) {
|
|
2851
2854
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
2852
2855
|
return e;
|
|
2853
|
-
},
|
|
2856
|
+
}, _t.apply(this, arguments);
|
|
2854
2857
|
};
|
|
2855
|
-
function
|
|
2858
|
+
function H(e, t, n, r) {
|
|
2856
2859
|
function i(e) {
|
|
2857
2860
|
return e instanceof n ? e : new n(function(t) {
|
|
2858
2861
|
t(e);
|
|
@@ -2879,7 +2882,7 @@ function V(e, t, n, r) {
|
|
|
2879
2882
|
c((r = r.apply(e, t || [])).next());
|
|
2880
2883
|
});
|
|
2881
2884
|
}
|
|
2882
|
-
function
|
|
2885
|
+
function U(e, t) {
|
|
2883
2886
|
var n = {
|
|
2884
2887
|
label: 0,
|
|
2885
2888
|
sent: function() {
|
|
@@ -2949,18 +2952,18 @@ function H(e, t) {
|
|
|
2949
2952
|
};
|
|
2950
2953
|
}
|
|
2951
2954
|
}
|
|
2952
|
-
function
|
|
2955
|
+
function vt(e, t, n) {
|
|
2953
2956
|
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
2954
2957
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
2955
2958
|
}
|
|
2956
2959
|
// ../../node_modules/.pnpm/@fingerprintjs+fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js
|
|
2957
|
-
var
|
|
2958
|
-
function
|
|
2960
|
+
var yt = "4.6.2";
|
|
2961
|
+
function bt(e, t) {
|
|
2959
2962
|
return new Promise(function(n) {
|
|
2960
2963
|
return setTimeout(n, e, t);
|
|
2961
2964
|
});
|
|
2962
2965
|
}
|
|
2963
|
-
function
|
|
2966
|
+
function xt() {
|
|
2964
2967
|
return new Promise(function(e) {
|
|
2965
2968
|
var t = new MessageChannel();
|
|
2966
2969
|
t.port1.onmessage = function() {
|
|
@@ -2968,22 +2971,22 @@ function St() {
|
|
|
2968
2971
|
}, t.port2.postMessage(null);
|
|
2969
2972
|
});
|
|
2970
2973
|
}
|
|
2971
|
-
function
|
|
2974
|
+
function St(e, t) {
|
|
2972
2975
|
t === void 0 && (t = Infinity);
|
|
2973
2976
|
var n = window.requestIdleCallback;
|
|
2974
2977
|
return n ? new Promise(function(e) {
|
|
2975
2978
|
return n.call(window, function() {
|
|
2976
2979
|
return e();
|
|
2977
2980
|
}, { timeout: t });
|
|
2978
|
-
}) :
|
|
2981
|
+
}) : bt(Math.min(e, t));
|
|
2979
2982
|
}
|
|
2980
|
-
function
|
|
2983
|
+
function Ct(e) {
|
|
2981
2984
|
return !!e && typeof e.then == "function";
|
|
2982
2985
|
}
|
|
2983
|
-
function
|
|
2986
|
+
function wt(e, t) {
|
|
2984
2987
|
try {
|
|
2985
2988
|
var n = e();
|
|
2986
|
-
|
|
2989
|
+
Ct(n) ? n.then(function(e) {
|
|
2987
2990
|
return t(!0, e);
|
|
2988
2991
|
}, function(e) {
|
|
2989
2992
|
return t(!1, e);
|
|
@@ -2992,13 +2995,13 @@ function Tt(e, t) {
|
|
|
2992
2995
|
t(!1, e);
|
|
2993
2996
|
}
|
|
2994
2997
|
}
|
|
2995
|
-
function
|
|
2996
|
-
return n === void 0 && (n = 16),
|
|
2998
|
+
function Tt(e, t, n) {
|
|
2999
|
+
return n === void 0 && (n = 16), H(this, void 0, void 0, function() {
|
|
2997
3000
|
var r, i, a, o;
|
|
2998
|
-
return
|
|
3001
|
+
return U(this, function(s) {
|
|
2999
3002
|
switch (s.label) {
|
|
3000
3003
|
case 0: r = Array(e.length), i = Date.now(), a = 0, s.label = 1;
|
|
3001
|
-
case 1: return a < e.length ? (r[a] = t(e[a], a), o = Date.now(), o >= i + n ? (i = o, [4,
|
|
3004
|
+
case 1: return a < e.length ? (r[a] = t(e[a], a), o = Date.now(), o >= i + n ? (i = o, [4, xt()]) : [3, 3]) : [3, 4];
|
|
3002
3005
|
case 2: s.sent(), s.label = 3;
|
|
3003
3006
|
case 3: return ++a, [3, 1];
|
|
3004
3007
|
case 4: return [2, r];
|
|
@@ -3006,36 +3009,36 @@ function Et(e, t, n) {
|
|
|
3006
3009
|
});
|
|
3007
3010
|
});
|
|
3008
3011
|
}
|
|
3009
|
-
function
|
|
3012
|
+
function Et(e) {
|
|
3010
3013
|
return e.then(void 0, function() {}), e;
|
|
3011
3014
|
}
|
|
3012
|
-
function
|
|
3015
|
+
function Dt(e, t) {
|
|
3013
3016
|
for (var n = 0, r = e.length; n < r; ++n) if (e[n] === t) return !0;
|
|
3014
3017
|
return !1;
|
|
3015
3018
|
}
|
|
3016
|
-
function
|
|
3017
|
-
return !
|
|
3019
|
+
function Ot(e, t) {
|
|
3020
|
+
return !Dt(e, t);
|
|
3018
3021
|
}
|
|
3019
|
-
function
|
|
3022
|
+
function kt(e) {
|
|
3020
3023
|
return parseInt(e);
|
|
3021
3024
|
}
|
|
3022
|
-
function
|
|
3025
|
+
function W(e) {
|
|
3023
3026
|
return parseFloat(e);
|
|
3024
3027
|
}
|
|
3025
|
-
function
|
|
3028
|
+
function G(e, t) {
|
|
3026
3029
|
return typeof e == "number" && isNaN(e) ? t : e;
|
|
3027
3030
|
}
|
|
3028
|
-
function
|
|
3031
|
+
function K(e) {
|
|
3029
3032
|
return e.reduce(function(e, t) {
|
|
3030
3033
|
return e + +!!t;
|
|
3031
3034
|
}, 0);
|
|
3032
3035
|
}
|
|
3033
|
-
function
|
|
3036
|
+
function At(e, t) {
|
|
3034
3037
|
if (t === void 0 && (t = 1), Math.abs(t) >= 1) return Math.round(e / t) * t;
|
|
3035
3038
|
var n = 1 / t;
|
|
3036
3039
|
return Math.round(e * n) / n;
|
|
3037
3040
|
}
|
|
3038
|
-
function
|
|
3041
|
+
function jt(e) {
|
|
3039
3042
|
for (var t = `Unexpected syntax '${e}'`, n = /^\s*([a-z-]*)(.*)$/i.exec(e), r = n[1] || void 0, i = {}, a = /([.:#][\w-]+|\[.+?\])/gi, o = function(e, t) {
|
|
3040
3043
|
i[e] = i[e] || [], i[e].push(t);
|
|
3041
3044
|
};;) {
|
|
@@ -3059,7 +3062,7 @@ function Mt(e) {
|
|
|
3059
3062
|
}
|
|
3060
3063
|
return [r, i];
|
|
3061
3064
|
}
|
|
3062
|
-
function
|
|
3065
|
+
function Mt(e) {
|
|
3063
3066
|
for (var t = new Uint8Array(e.length), n = 0; n < e.length; n++) {
|
|
3064
3067
|
var r = e.charCodeAt(n);
|
|
3065
3068
|
if (r > 127) return new TextEncoder().encode(e);
|
|
@@ -3067,72 +3070,72 @@ function Nt(e) {
|
|
|
3067
3070
|
}
|
|
3068
3071
|
return t;
|
|
3069
3072
|
}
|
|
3070
|
-
function
|
|
3073
|
+
function Nt(e, t) {
|
|
3071
3074
|
var n = e[0] >>> 16, r = e[0] & 65535, i = e[1] >>> 16, a = e[1] & 65535, o = t[0] >>> 16, s = t[0] & 65535, c = t[1] >>> 16, l = t[1] & 65535, u = 0, d = 0, f = 0, p = 0;
|
|
3072
3075
|
p += a + l, f += p >>> 16, p &= 65535, f += i + c, d += f >>> 16, f &= 65535, d += r + s, u += d >>> 16, d &= 65535, u += n + o, u &= 65535, e[0] = u << 16 | d, e[1] = f << 16 | p;
|
|
3073
3076
|
}
|
|
3074
|
-
function
|
|
3077
|
+
function q(e, t) {
|
|
3075
3078
|
var n = e[0] >>> 16, r = e[0] & 65535, i = e[1] >>> 16, a = e[1] & 65535, o = t[0] >>> 16, s = t[0] & 65535, c = t[1] >>> 16, l = t[1] & 65535, u = 0, d = 0, f = 0, p = 0;
|
|
3076
3079
|
p += a * l, f += p >>> 16, p &= 65535, f += i * l, d += f >>> 16, f &= 65535, f += a * c, d += f >>> 16, f &= 65535, d += r * l, u += d >>> 16, d &= 65535, d += i * c, u += d >>> 16, d &= 65535, d += a * s, u += d >>> 16, d &= 65535, u += n * l + r * c + i * s + a * o, u &= 65535, e[0] = u << 16 | d, e[1] = f << 16 | p;
|
|
3077
3080
|
}
|
|
3078
|
-
function
|
|
3081
|
+
function Pt(e, t) {
|
|
3079
3082
|
var n = e[0];
|
|
3080
3083
|
t %= 64, t === 32 ? (e[0] = e[1], e[1] = n) : t < 32 ? (e[0] = n << t | e[1] >>> 32 - t, e[1] = e[1] << t | n >>> 32 - t) : (t -= 32, e[0] = e[1] << t | n >>> 32 - t, e[1] = n << t | e[1] >>> 32 - t);
|
|
3081
3084
|
}
|
|
3082
|
-
function
|
|
3085
|
+
function J(e, t) {
|
|
3083
3086
|
t %= 64, t !== 0 && (t < 32 ? (e[0] = e[1] >>> 32 - t, e[1] <<= t) : (e[0] = e[1] << t - 32, e[1] = 0));
|
|
3084
3087
|
}
|
|
3085
|
-
function
|
|
3088
|
+
function Y(e, t) {
|
|
3086
3089
|
e[0] ^= t[0], e[1] ^= t[1];
|
|
3087
3090
|
}
|
|
3088
|
-
var
|
|
3089
|
-
function
|
|
3091
|
+
var Ft = [4283543511, 3981806797], It = [3301882366, 444984403];
|
|
3092
|
+
function Lt(e) {
|
|
3090
3093
|
var t = [0, e[0] >>> 1];
|
|
3091
|
-
|
|
3094
|
+
Y(e, t), q(e, Ft), t[1] = e[0] >>> 1, Y(e, t), q(e, It), t[1] = e[0] >>> 1, Y(e, t);
|
|
3092
3095
|
}
|
|
3093
|
-
var
|
|
3094
|
-
function
|
|
3095
|
-
var n =
|
|
3096
|
+
var Rt = [2277735313, 289559509], zt = [1291169091, 658871167], Bt = [0, 5], Vt = [0, 1390208809], Ht = [0, 944331445];
|
|
3097
|
+
function Ut(e, t) {
|
|
3098
|
+
var n = Mt(e);
|
|
3096
3099
|
t ||= 0;
|
|
3097
|
-
for (var r = [0, n.length], i = r[1] % 16, a = r[1] - i, o = [0, t], s = [0, t], c = [0, 0], l = [0, 0], u = 0; u < a; u += 16) c[0] = n[u + 4] | n[u + 5] << 8 | n[u + 6] << 16 | n[u + 7] << 24, c[1] = n[u] | n[u + 1] << 8 | n[u + 2] << 16 | n[u + 3] << 24, l[0] = n[u + 12] | n[u + 13] << 8 | n[u + 14] << 16 | n[u + 15] << 24, l[1] = n[u + 8] | n[u + 9] << 8 | n[u + 10] << 16 | n[u + 11] << 24,
|
|
3100
|
+
for (var r = [0, n.length], i = r[1] % 16, a = r[1] - i, o = [0, t], s = [0, t], c = [0, 0], l = [0, 0], u = 0; u < a; u += 16) c[0] = n[u + 4] | n[u + 5] << 8 | n[u + 6] << 16 | n[u + 7] << 24, c[1] = n[u] | n[u + 1] << 8 | n[u + 2] << 16 | n[u + 3] << 24, l[0] = n[u + 12] | n[u + 13] << 8 | n[u + 14] << 16 | n[u + 15] << 24, l[1] = n[u + 8] | n[u + 9] << 8 | n[u + 10] << 16 | n[u + 11] << 24, q(c, Rt), Pt(c, 31), q(c, zt), Y(o, c), Pt(o, 27), Nt(o, s), q(o, Bt), Nt(o, Vt), q(l, zt), Pt(l, 33), q(l, Rt), Y(s, l), Pt(s, 31), Nt(s, o), q(s, Bt), Nt(s, Ht);
|
|
3098
3101
|
c[0] = 0, c[1] = 0, l[0] = 0, l[1] = 0;
|
|
3099
3102
|
var d = [0, 0];
|
|
3100
3103
|
switch (i) {
|
|
3101
|
-
case 15: d[1] = n[u + 14],
|
|
3102
|
-
case 14: d[1] = n[u + 13],
|
|
3103
|
-
case 13: d[1] = n[u + 12],
|
|
3104
|
-
case 12: d[1] = n[u + 11],
|
|
3105
|
-
case 11: d[1] = n[u + 10],
|
|
3106
|
-
case 10: d[1] = n[u + 9],
|
|
3107
|
-
case 9: d[1] = n[u + 8],
|
|
3108
|
-
case 8: d[1] = n[u + 7],
|
|
3109
|
-
case 7: d[1] = n[u + 6],
|
|
3110
|
-
case 6: d[1] = n[u + 5],
|
|
3111
|
-
case 5: d[1] = n[u + 4],
|
|
3112
|
-
case 4: d[1] = n[u + 3],
|
|
3113
|
-
case 3: d[1] = n[u + 2],
|
|
3114
|
-
case 2: d[1] = n[u + 1],
|
|
3115
|
-
case 1: d[1] = n[u],
|
|
3116
|
-
}
|
|
3117
|
-
return
|
|
3118
|
-
}
|
|
3119
|
-
function
|
|
3120
|
-
return
|
|
3104
|
+
case 15: d[1] = n[u + 14], J(d, 48), Y(l, d);
|
|
3105
|
+
case 14: d[1] = n[u + 13], J(d, 40), Y(l, d);
|
|
3106
|
+
case 13: d[1] = n[u + 12], J(d, 32), Y(l, d);
|
|
3107
|
+
case 12: d[1] = n[u + 11], J(d, 24), Y(l, d);
|
|
3108
|
+
case 11: d[1] = n[u + 10], J(d, 16), Y(l, d);
|
|
3109
|
+
case 10: d[1] = n[u + 9], J(d, 8), Y(l, d);
|
|
3110
|
+
case 9: d[1] = n[u + 8], Y(l, d), q(l, zt), Pt(l, 33), q(l, Rt), Y(s, l);
|
|
3111
|
+
case 8: d[1] = n[u + 7], J(d, 56), Y(c, d);
|
|
3112
|
+
case 7: d[1] = n[u + 6], J(d, 48), Y(c, d);
|
|
3113
|
+
case 6: d[1] = n[u + 5], J(d, 40), Y(c, d);
|
|
3114
|
+
case 5: d[1] = n[u + 4], J(d, 32), Y(c, d);
|
|
3115
|
+
case 4: d[1] = n[u + 3], J(d, 24), Y(c, d);
|
|
3116
|
+
case 3: d[1] = n[u + 2], J(d, 16), Y(c, d);
|
|
3117
|
+
case 2: d[1] = n[u + 1], J(d, 8), Y(c, d);
|
|
3118
|
+
case 1: d[1] = n[u], Y(c, d), q(c, Rt), Pt(c, 31), q(c, zt), Y(o, c);
|
|
3119
|
+
}
|
|
3120
|
+
return Y(o, r), Y(s, r), Nt(o, s), Nt(s, o), Lt(o), Lt(s), Nt(o, s), Nt(s, o), ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8);
|
|
3121
|
+
}
|
|
3122
|
+
function Wt(e) {
|
|
3123
|
+
return _t({
|
|
3121
3124
|
name: e.name,
|
|
3122
3125
|
message: e.message,
|
|
3123
3126
|
stack: e.stack?.split("\n")
|
|
3124
3127
|
}, e);
|
|
3125
3128
|
}
|
|
3126
|
-
function
|
|
3129
|
+
function Gt(e) {
|
|
3127
3130
|
return /^function\s.*?\{\s*\[native code]\s*}$/.test(String(e));
|
|
3128
3131
|
}
|
|
3129
|
-
function
|
|
3132
|
+
function Kt(e) {
|
|
3130
3133
|
return typeof e != "function";
|
|
3131
3134
|
}
|
|
3132
|
-
function
|
|
3133
|
-
var n =
|
|
3135
|
+
function qt(e, t) {
|
|
3136
|
+
var n = Et(new Promise(function(n) {
|
|
3134
3137
|
var r = Date.now();
|
|
3135
|
-
|
|
3138
|
+
wt(e.bind(null, t), function() {
|
|
3136
3139
|
var e = [...arguments], t = Date.now() - r;
|
|
3137
3140
|
if (!e[0]) return n(function() {
|
|
3138
3141
|
return {
|
|
@@ -3141,7 +3144,7 @@ function Jt(e, t) {
|
|
|
3141
3144
|
};
|
|
3142
3145
|
});
|
|
3143
3146
|
var i = e[1];
|
|
3144
|
-
if (
|
|
3147
|
+
if (Kt(i)) return n(function() {
|
|
3145
3148
|
return {
|
|
3146
3149
|
value: i,
|
|
3147
3150
|
duration: t
|
|
@@ -3150,7 +3153,7 @@ function Jt(e, t) {
|
|
|
3150
3153
|
n(function() {
|
|
3151
3154
|
return new Promise(function(e) {
|
|
3152
3155
|
var n = Date.now();
|
|
3153
|
-
|
|
3156
|
+
wt(i, function() {
|
|
3154
3157
|
var r = [...arguments], i = t + Date.now() - n;
|
|
3155
3158
|
if (!r[0]) return e({
|
|
3156
3159
|
error: r[1],
|
|
@@ -3171,20 +3174,20 @@ function Jt(e, t) {
|
|
|
3171
3174
|
});
|
|
3172
3175
|
};
|
|
3173
3176
|
}
|
|
3174
|
-
function
|
|
3177
|
+
function Jt(e, t, n, r) {
|
|
3175
3178
|
var i = Object.keys(e).filter(function(e) {
|
|
3176
|
-
return
|
|
3177
|
-
}), a =
|
|
3178
|
-
return
|
|
3179
|
+
return Ot(n, e);
|
|
3180
|
+
}), a = Et(Tt(i, function(n) {
|
|
3181
|
+
return qt(e[n], t);
|
|
3179
3182
|
}, r));
|
|
3180
3183
|
return function() {
|
|
3181
|
-
return
|
|
3184
|
+
return H(this, void 0, void 0, function() {
|
|
3182
3185
|
var e, t, n, o, s;
|
|
3183
|
-
return
|
|
3186
|
+
return U(this, function(c) {
|
|
3184
3187
|
switch (c.label) {
|
|
3185
3188
|
case 0: return [4, a];
|
|
3186
|
-
case 1: return e = c.sent(), [4,
|
|
3187
|
-
return
|
|
3189
|
+
case 1: return e = c.sent(), [4, Tt(e, function(e) {
|
|
3190
|
+
return Et(e());
|
|
3188
3191
|
}, r)];
|
|
3189
3192
|
case 2: return t = c.sent(), [4, Promise.all(t)];
|
|
3190
3193
|
case 3:
|
|
@@ -3195,9 +3198,9 @@ function Yt(e, t, n, r) {
|
|
|
3195
3198
|
});
|
|
3196
3199
|
};
|
|
3197
3200
|
}
|
|
3198
|
-
function
|
|
3201
|
+
function Yt() {
|
|
3199
3202
|
var e = window, t = navigator;
|
|
3200
|
-
return
|
|
3203
|
+
return K([
|
|
3201
3204
|
"MSCSSMatrix" in e,
|
|
3202
3205
|
"msSetImmediate" in e,
|
|
3203
3206
|
"msIndexedDB" in e,
|
|
@@ -3205,18 +3208,18 @@ function Xt() {
|
|
|
3205
3208
|
"msPointerEnabled" in t
|
|
3206
3209
|
]) >= 4;
|
|
3207
3210
|
}
|
|
3208
|
-
function
|
|
3211
|
+
function Xt() {
|
|
3209
3212
|
var e = window, t = navigator;
|
|
3210
|
-
return
|
|
3213
|
+
return K([
|
|
3211
3214
|
"msWriteProfilerMark" in e,
|
|
3212
3215
|
"MSStream" in e,
|
|
3213
3216
|
"msLaunchUri" in t,
|
|
3214
3217
|
"msSaveBlob" in t
|
|
3215
|
-
]) >= 3 && !
|
|
3218
|
+
]) >= 3 && !Yt();
|
|
3216
3219
|
}
|
|
3217
|
-
function
|
|
3220
|
+
function Zt() {
|
|
3218
3221
|
var e = window, t = navigator;
|
|
3219
|
-
return
|
|
3222
|
+
return K([
|
|
3220
3223
|
"webkitPersistentStorage" in t,
|
|
3221
3224
|
"webkitTemporaryStorage" in t,
|
|
3222
3225
|
(t.vendor || "").indexOf("Google") === 0,
|
|
@@ -3226,9 +3229,9 @@ function Qt() {
|
|
|
3226
3229
|
"webkitSpeechGrammar" in e
|
|
3227
3230
|
]) >= 5;
|
|
3228
3231
|
}
|
|
3229
|
-
function
|
|
3232
|
+
function X() {
|
|
3230
3233
|
var e = window, t = navigator;
|
|
3231
|
-
return
|
|
3234
|
+
return K([
|
|
3232
3235
|
"ApplePayError" in e,
|
|
3233
3236
|
"CSSPrimitiveValue" in e,
|
|
3234
3237
|
"Counter" in e,
|
|
@@ -3237,9 +3240,9 @@ function Y() {
|
|
|
3237
3240
|
"WebKitMediaKeys" in e
|
|
3238
3241
|
]) >= 4;
|
|
3239
3242
|
}
|
|
3240
|
-
function
|
|
3243
|
+
function Qt() {
|
|
3241
3244
|
var e = window, t = e.HTMLElement, n = e.Document;
|
|
3242
|
-
return
|
|
3245
|
+
return K([
|
|
3243
3246
|
"safari" in e,
|
|
3244
3247
|
!("ongestureend" in e),
|
|
3245
3248
|
!("TouchEvent" in e),
|
|
@@ -3248,13 +3251,13 @@ function $t() {
|
|
|
3248
3251
|
n && "pointerLockElement" in n.prototype
|
|
3249
3252
|
]) >= 4;
|
|
3250
3253
|
}
|
|
3251
|
-
function
|
|
3254
|
+
function $t() {
|
|
3252
3255
|
var e = window;
|
|
3253
|
-
return
|
|
3256
|
+
return Gt(e.print) && String(e.browser) === "[object WebPageNamespace]";
|
|
3254
3257
|
}
|
|
3255
|
-
function
|
|
3258
|
+
function en() {
|
|
3256
3259
|
var e = window;
|
|
3257
|
-
return
|
|
3260
|
+
return K([
|
|
3258
3261
|
"buildID" in navigator,
|
|
3259
3262
|
"MozAppearance" in (document.documentElement?.style ?? {}),
|
|
3260
3263
|
"onmozfullscreenchange" in e,
|
|
@@ -3263,36 +3266,36 @@ function tn() {
|
|
|
3263
3266
|
"CanvasCaptureMediaStream" in e
|
|
3264
3267
|
]) >= 4;
|
|
3265
3268
|
}
|
|
3266
|
-
function
|
|
3269
|
+
function tn() {
|
|
3267
3270
|
var e = window;
|
|
3268
|
-
return
|
|
3271
|
+
return K([
|
|
3269
3272
|
!("MediaSettingsRange" in e),
|
|
3270
3273
|
"RTCEncodedAudioFrame" in e,
|
|
3271
3274
|
"" + e.Intl == "[object Intl]",
|
|
3272
3275
|
"" + e.Reflect == "[object Reflect]"
|
|
3273
3276
|
]) >= 3;
|
|
3274
3277
|
}
|
|
3275
|
-
function
|
|
3278
|
+
function nn() {
|
|
3276
3279
|
var e = window, t = e.URLPattern;
|
|
3277
|
-
return
|
|
3280
|
+
return K([
|
|
3278
3281
|
"union" in Set.prototype,
|
|
3279
3282
|
"Iterator" in e,
|
|
3280
3283
|
t && "hasRegExpGroups" in t.prototype,
|
|
3281
3284
|
"RGB8" in WebGLRenderingContext.prototype
|
|
3282
3285
|
]) >= 3;
|
|
3283
3286
|
}
|
|
3284
|
-
function
|
|
3287
|
+
function rn() {
|
|
3285
3288
|
var e = window;
|
|
3286
|
-
return
|
|
3289
|
+
return K([
|
|
3287
3290
|
"DOMRectList" in e,
|
|
3288
3291
|
"RTCPeerConnectionIceEvent" in e,
|
|
3289
3292
|
"SVGGeometryElement" in e,
|
|
3290
3293
|
"ontransitioncancel" in e
|
|
3291
3294
|
]) >= 3;
|
|
3292
3295
|
}
|
|
3293
|
-
function
|
|
3296
|
+
function an() {
|
|
3294
3297
|
var e = window, t = navigator, n = e.CSS, r = e.HTMLButtonElement;
|
|
3295
|
-
return
|
|
3298
|
+
return K([
|
|
3296
3299
|
!("getStorageUpdates" in t),
|
|
3297
3300
|
r && "popover" in r.prototype,
|
|
3298
3301
|
"CSSCounterStyleRule" in e,
|
|
@@ -3300,38 +3303,38 @@ function on() {
|
|
|
3300
3303
|
n.supports("text-transform: full-width")
|
|
3301
3304
|
]) >= 4;
|
|
3302
3305
|
}
|
|
3303
|
-
function
|
|
3306
|
+
function on() {
|
|
3304
3307
|
if (navigator.platform === "iPad") return !0;
|
|
3305
3308
|
var e = screen, t = e.width / e.height;
|
|
3306
|
-
return
|
|
3309
|
+
return K([
|
|
3307
3310
|
"MediaSource" in window,
|
|
3308
3311
|
!!Element.prototype.webkitRequestFullscreen,
|
|
3309
3312
|
t > .65 && t < 1.53
|
|
3310
3313
|
]) >= 2;
|
|
3311
3314
|
}
|
|
3312
|
-
function
|
|
3315
|
+
function sn() {
|
|
3313
3316
|
var e = document;
|
|
3314
3317
|
return e.fullscreenElement || e.msFullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || null;
|
|
3315
3318
|
}
|
|
3316
|
-
function
|
|
3319
|
+
function cn() {
|
|
3317
3320
|
var e = document;
|
|
3318
3321
|
return (e.exitFullscreen || e.msExitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen).call(e);
|
|
3319
3322
|
}
|
|
3320
|
-
function
|
|
3321
|
-
var e =
|
|
3322
|
-
return e ?
|
|
3323
|
+
function ln() {
|
|
3324
|
+
var e = Zt(), t = en(), n = window, r = navigator, i = "connection";
|
|
3325
|
+
return e ? K([
|
|
3323
3326
|
!("SharedWorker" in n),
|
|
3324
3327
|
r[i] && "ontypechange" in r[i],
|
|
3325
3328
|
!("sinkId" in new Audio())
|
|
3326
|
-
]) >= 2 : t ?
|
|
3329
|
+
]) >= 2 : t ? K([
|
|
3327
3330
|
"onorientationchange" in n,
|
|
3328
3331
|
"orientation" in n,
|
|
3329
3332
|
/android/i.test(r.appVersion)
|
|
3330
3333
|
]) >= 2 : !1;
|
|
3331
3334
|
}
|
|
3332
|
-
function
|
|
3335
|
+
function un() {
|
|
3333
3336
|
var e = navigator, t = window, n = Audio.prototype, r = t.visualViewport;
|
|
3334
|
-
return
|
|
3337
|
+
return K([
|
|
3335
3338
|
"srLatency" in n,
|
|
3336
3339
|
"srChannelCount" in n,
|
|
3337
3340
|
"devicePosture" in e,
|
|
@@ -3339,19 +3342,19 @@ function dn() {
|
|
|
3339
3342
|
"getTextInformation" in Image.prototype
|
|
3340
3343
|
]) >= 3;
|
|
3341
3344
|
}
|
|
3342
|
-
function
|
|
3343
|
-
return
|
|
3345
|
+
function dn() {
|
|
3346
|
+
return mn() ? -4 : fn();
|
|
3344
3347
|
}
|
|
3345
|
-
function
|
|
3348
|
+
function fn() {
|
|
3346
3349
|
var e = window, t = e.OfflineAudioContext || e.webkitOfflineAudioContext;
|
|
3347
3350
|
if (!t) return -2;
|
|
3348
|
-
if (
|
|
3351
|
+
if (pn()) return -1;
|
|
3349
3352
|
var n = 4500, r = new t(1, 5e3, 44100), i = r.createOscillator();
|
|
3350
3353
|
i.type = "triangle", i.frequency.value = 1e4;
|
|
3351
3354
|
var a = r.createDynamicsCompressor();
|
|
3352
3355
|
a.threshold.value = -50, a.knee.value = 40, a.ratio.value = 12, a.attack.value = 0, a.release.value = .25, i.connect(a), a.connect(r.destination), i.start(0);
|
|
3353
|
-
var o =
|
|
3354
|
-
return
|
|
3356
|
+
var o = hn(r), s = o[0], c = o[1], l = Et(s.then(function(e) {
|
|
3357
|
+
return gn(e.getChannelData(0).subarray(n));
|
|
3355
3358
|
}, function(e) {
|
|
3356
3359
|
if (e.name === "timeout" || e.name === "suspended") return -3;
|
|
3357
3360
|
throw e;
|
|
@@ -3360,13 +3363,13 @@ function pn() {
|
|
|
3360
3363
|
return c(), l;
|
|
3361
3364
|
};
|
|
3362
3365
|
}
|
|
3363
|
-
function
|
|
3364
|
-
return
|
|
3366
|
+
function pn() {
|
|
3367
|
+
return X() && !Qt() && !rn();
|
|
3365
3368
|
}
|
|
3366
|
-
function
|
|
3367
|
-
return
|
|
3369
|
+
function mn() {
|
|
3370
|
+
return X() && an() && $t() || Zt() && un() && nn();
|
|
3368
3371
|
}
|
|
3369
|
-
function
|
|
3372
|
+
function hn(e) {
|
|
3370
3373
|
var t = function() {};
|
|
3371
3374
|
return [new Promise(function(n, r) {
|
|
3372
3375
|
var i = !1, a = 0, o = 0;
|
|
@@ -3375,16 +3378,16 @@ function gn(e) {
|
|
|
3375
3378
|
};
|
|
3376
3379
|
var s = function() {
|
|
3377
3380
|
setTimeout(function() {
|
|
3378
|
-
return r(
|
|
3381
|
+
return r(_n("timeout"));
|
|
3379
3382
|
}, Math.min(500, o + 5e3 - Date.now()));
|
|
3380
3383
|
}, c = function() {
|
|
3381
3384
|
try {
|
|
3382
3385
|
var t = e.startRendering();
|
|
3383
|
-
switch (
|
|
3386
|
+
switch (Ct(t) && Et(t), e.state) {
|
|
3384
3387
|
case "running":
|
|
3385
3388
|
o = Date.now(), i && s();
|
|
3386
3389
|
break;
|
|
3387
|
-
case "suspended": document.hidden || a++, i && a >= 3 ? r(
|
|
3390
|
+
case "suspended": document.hidden || a++, i && a >= 3 ? r(_n("suspended")) : setTimeout(c, 500);
|
|
3388
3391
|
}
|
|
3389
3392
|
} catch (e) {
|
|
3390
3393
|
r(e);
|
|
@@ -3395,22 +3398,22 @@ function gn(e) {
|
|
|
3395
3398
|
};
|
|
3396
3399
|
}), t];
|
|
3397
3400
|
}
|
|
3398
|
-
function
|
|
3401
|
+
function gn(e) {
|
|
3399
3402
|
for (var t = 0, n = 0; n < e.length; ++n) t += Math.abs(e[n]);
|
|
3400
3403
|
return t;
|
|
3401
3404
|
}
|
|
3402
|
-
function
|
|
3405
|
+
function _n(e) {
|
|
3403
3406
|
var t = Error(e);
|
|
3404
3407
|
return t.name = e, t;
|
|
3405
3408
|
}
|
|
3406
|
-
function
|
|
3409
|
+
function vn(e, t, n) {
|
|
3407
3410
|
var r;
|
|
3408
|
-
return n === void 0 && (n = 50),
|
|
3411
|
+
return n === void 0 && (n = 50), H(this, void 0, void 0, function() {
|
|
3409
3412
|
var i, a;
|
|
3410
|
-
return
|
|
3413
|
+
return U(this, function(o) {
|
|
3411
3414
|
switch (o.label) {
|
|
3412
3415
|
case 0: i = document, o.label = 1;
|
|
3413
|
-
case 1: return i.body ? [3, 3] : [4,
|
|
3416
|
+
case 1: return i.body ? [3, 3] : [4, bt(n)];
|
|
3414
3417
|
case 2: return o.sent(), [3, 1];
|
|
3415
3418
|
case 3: a = i.createElement("iframe"), o.label = 4;
|
|
3416
3419
|
case 4: return o.trys.push([
|
|
@@ -3433,7 +3436,7 @@ function yn(e, t, n) {
|
|
|
3433
3436
|
c();
|
|
3434
3437
|
})];
|
|
3435
3438
|
case 5: o.sent(), o.label = 6;
|
|
3436
|
-
case 6: return a.contentWindow?.document?.body ? [3, 8] : [4,
|
|
3439
|
+
case 6: return a.contentWindow?.document?.body ? [3, 8] : [4, bt(n)];
|
|
3437
3440
|
case 7: return o.sent(), [3, 6];
|
|
3438
3441
|
case 8: return [4, e(a, a.contentWindow)];
|
|
3439
3442
|
case 9: return [2, o.sent()];
|
|
@@ -3443,14 +3446,14 @@ function yn(e, t, n) {
|
|
|
3443
3446
|
});
|
|
3444
3447
|
});
|
|
3445
3448
|
}
|
|
3446
|
-
function
|
|
3447
|
-
for (var t =
|
|
3449
|
+
function yn(e) {
|
|
3450
|
+
for (var t = jt(e), n = t[0], r = t[1], i = document.createElement(n ?? "div"), a = 0, o = Object.keys(r); a < o.length; a++) {
|
|
3448
3451
|
var s = o[a], c = r[s].join(" ");
|
|
3449
|
-
s === "style" ?
|
|
3452
|
+
s === "style" ? bn(i.style, c) : i.setAttribute(s, c);
|
|
3450
3453
|
}
|
|
3451
3454
|
return i;
|
|
3452
3455
|
}
|
|
3453
|
-
function
|
|
3456
|
+
function bn(e, t) {
|
|
3454
3457
|
for (var n = 0, r = t.split(";"); n < r.length; n++) {
|
|
3455
3458
|
var i = r[n], a = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(i);
|
|
3456
3459
|
if (a) {
|
|
@@ -3459,7 +3462,7 @@ function xn(e, t) {
|
|
|
3459
3462
|
}
|
|
3460
3463
|
}
|
|
3461
3464
|
}
|
|
3462
|
-
function
|
|
3465
|
+
function xn() {
|
|
3463
3466
|
for (var e = window;;) {
|
|
3464
3467
|
var t = e.parent;
|
|
3465
3468
|
if (!t || t === e) return !1;
|
|
@@ -3472,48 +3475,48 @@ function Sn() {
|
|
|
3472
3475
|
e = t;
|
|
3473
3476
|
}
|
|
3474
3477
|
}
|
|
3475
|
-
var
|
|
3478
|
+
var Sn = "mmMwWLliI0O&1", Cn = "48px", wn = [
|
|
3476
3479
|
"monospace",
|
|
3477
3480
|
"sans-serif",
|
|
3478
3481
|
"serif"
|
|
3479
|
-
],
|
|
3480
|
-
function
|
|
3482
|
+
], Tn = /* @__PURE__ */ "sans-serif-thin.ARNO PRO.Agency FB.Arabic Typesetting.Arial Unicode MS.AvantGarde Bk BT.BankGothic Md BT.Batang.Bitstream Vera Sans Mono.Calibri.Century.Century Gothic.Clarendon.EUROSTILE.Franklin Gothic.Futura Bk BT.Futura Md BT.GOTHAM.Gill Sans.HELV.Haettenschweiler.Helvetica Neue.Humanst521 BT.Leelawadee.Letter Gothic.Levenim MT.Lucida Bright.Lucida Sans.Menlo.MS Mincho.MS Outlook.MS Reference Specialty.MS UI Gothic.MT Extra.MYRIAD PRO.Marlett.Meiryo UI.Microsoft Uighur.Minion Pro.Monotype Corsiva.PMingLiU.Pristina.SCRIPTINA.Segoe UI Light.Serifa.SimHei.Small Fonts.Staccato222 BT.TRAJAN PRO.Univers CE 55 Medium.Vrinda.ZWAdobeF".split(".");
|
|
3483
|
+
function En() {
|
|
3481
3484
|
var e = this;
|
|
3482
|
-
return
|
|
3485
|
+
return vn(function(t, n) {
|
|
3483
3486
|
var r = n.document;
|
|
3484
|
-
return
|
|
3487
|
+
return H(e, void 0, void 0, function() {
|
|
3485
3488
|
var e, t, n, i, a, o, s, c, l, u, d, f;
|
|
3486
|
-
return
|
|
3487
|
-
for (e = r.body, e.style.fontSize =
|
|
3489
|
+
return U(this, function(p) {
|
|
3490
|
+
for (e = r.body, e.style.fontSize = Cn, t = r.createElement("div"), t.style.setProperty("visibility", "hidden", "important"), n = {}, i = {}, a = function(e) {
|
|
3488
3491
|
var n = r.createElement("span"), i = n.style;
|
|
3489
|
-
return i.position = "absolute", i.top = "0", i.left = "0", i.fontFamily = e, n.textContent =
|
|
3492
|
+
return i.position = "absolute", i.top = "0", i.left = "0", i.fontFamily = e, n.textContent = Sn, t.appendChild(n), n;
|
|
3490
3493
|
}, o = function(e, t) {
|
|
3491
3494
|
return a(`'${e}',${t}`);
|
|
3492
3495
|
}, s = function() {
|
|
3493
|
-
return
|
|
3496
|
+
return wn.map(a);
|
|
3494
3497
|
}, c = function() {
|
|
3495
3498
|
for (var e = {}, t = function(t) {
|
|
3496
|
-
e[t] =
|
|
3499
|
+
e[t] = wn.map(function(e) {
|
|
3497
3500
|
return o(t, e);
|
|
3498
3501
|
});
|
|
3499
|
-
}, n = 0, r =
|
|
3502
|
+
}, n = 0, r = Tn; n < r.length; n++) {
|
|
3500
3503
|
var i = r[n];
|
|
3501
3504
|
t(i);
|
|
3502
3505
|
}
|
|
3503
3506
|
return e;
|
|
3504
3507
|
}, l = function(e) {
|
|
3505
|
-
return
|
|
3508
|
+
return wn.some(function(t, r) {
|
|
3506
3509
|
return e[r].offsetWidth !== n[t] || e[r].offsetHeight !== i[t];
|
|
3507
3510
|
});
|
|
3508
|
-
}, u = s(), d = c(), e.appendChild(t), f = 0; f <
|
|
3509
|
-
return [2,
|
|
3511
|
+
}, u = s(), d = c(), e.appendChild(t), f = 0; f < wn.length; f++) n[wn[f]] = u[f].offsetWidth, i[wn[f]] = u[f].offsetHeight;
|
|
3512
|
+
return [2, Tn.filter(function(e) {
|
|
3510
3513
|
return l(d[e]);
|
|
3511
3514
|
})];
|
|
3512
3515
|
});
|
|
3513
3516
|
});
|
|
3514
3517
|
});
|
|
3515
3518
|
}
|
|
3516
|
-
function
|
|
3519
|
+
function Dn() {
|
|
3517
3520
|
var e = navigator.plugins;
|
|
3518
3521
|
if (e) {
|
|
3519
3522
|
for (var t = [], n = 0; n < e.length; ++n) {
|
|
@@ -3536,38 +3539,38 @@ function On() {
|
|
|
3536
3539
|
return t;
|
|
3537
3540
|
}
|
|
3538
3541
|
}
|
|
3539
|
-
function
|
|
3540
|
-
return
|
|
3542
|
+
function On() {
|
|
3543
|
+
return kn(Ln());
|
|
3541
3544
|
}
|
|
3542
|
-
function
|
|
3543
|
-
var t, n = !1, r, i, a =
|
|
3544
|
-
return
|
|
3545
|
+
function kn(e) {
|
|
3546
|
+
var t, n = !1, r, i, a = An(), o = a[0], s = a[1];
|
|
3547
|
+
return jn(o, s) ? (n = Mn(s), e ? r = i = "skipped" : (t = Nn(o, s), r = t[0], i = t[1])) : r = i = "unsupported", {
|
|
3545
3548
|
winding: n,
|
|
3546
3549
|
geometry: r,
|
|
3547
3550
|
text: i
|
|
3548
3551
|
};
|
|
3549
3552
|
}
|
|
3550
|
-
function
|
|
3553
|
+
function An() {
|
|
3551
3554
|
var e = document.createElement("canvas");
|
|
3552
3555
|
return e.width = 1, e.height = 1, [e, e.getContext("2d")];
|
|
3553
3556
|
}
|
|
3554
|
-
function
|
|
3557
|
+
function jn(e, t) {
|
|
3555
3558
|
return !!(t && e.toDataURL);
|
|
3556
3559
|
}
|
|
3557
|
-
function
|
|
3560
|
+
function Mn(e) {
|
|
3558
3561
|
return e.rect(0, 0, 10, 10), e.rect(2, 2, 6, 6), !e.isPointInPath(5, 5, "evenodd");
|
|
3559
3562
|
}
|
|
3560
|
-
function
|
|
3561
|
-
|
|
3562
|
-
var n =
|
|
3563
|
-
return n ===
|
|
3563
|
+
function Nn(e, t) {
|
|
3564
|
+
Pn(e, t);
|
|
3565
|
+
var n = In(e);
|
|
3566
|
+
return n === In(e) ? (Fn(e, t), [In(e), n]) : ["unstable", "unstable"];
|
|
3564
3567
|
}
|
|
3565
|
-
function
|
|
3568
|
+
function Pn(e, t) {
|
|
3566
3569
|
e.width = 240, e.height = 60, t.textBaseline = "alphabetic", t.fillStyle = "#f60", t.fillRect(100, 1, 62, 20), t.fillStyle = "#069", t.font = "11pt \"Times New Roman\"";
|
|
3567
3570
|
var n = "Cwm fjordbank gly 😃";
|
|
3568
3571
|
t.fillText(n, 2, 15), t.fillStyle = "rgba(102, 204, 0, 0.2)", t.font = "18pt Arial", t.fillText(n, 4, 45);
|
|
3569
3572
|
}
|
|
3570
|
-
function
|
|
3573
|
+
function Fn(e, t) {
|
|
3571
3574
|
e.width = 122, e.height = 110, t.globalCompositeOperation = "multiply";
|
|
3572
3575
|
for (var n = 0, r = [
|
|
3573
3576
|
[
|
|
@@ -3591,15 +3594,15 @@ function In(e, t) {
|
|
|
3591
3594
|
}
|
|
3592
3595
|
t.fillStyle = "#f9c", t.arc(60, 60, 60, 0, Math.PI * 2, !0), t.arc(60, 60, 20, 0, Math.PI * 2, !0), t.fill("evenodd");
|
|
3593
3596
|
}
|
|
3594
|
-
function
|
|
3597
|
+
function In(e) {
|
|
3595
3598
|
return e.toDataURL();
|
|
3596
3599
|
}
|
|
3597
|
-
function
|
|
3598
|
-
return
|
|
3600
|
+
function Ln() {
|
|
3601
|
+
return X() && an() && $t();
|
|
3599
3602
|
}
|
|
3600
|
-
function
|
|
3603
|
+
function Rn() {
|
|
3601
3604
|
var e = navigator, t = 0, n;
|
|
3602
|
-
e.maxTouchPoints === void 0 ? e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints) : t =
|
|
3605
|
+
e.maxTouchPoints === void 0 ? e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints) : t = kt(e.maxTouchPoints);
|
|
3603
3606
|
try {
|
|
3604
3607
|
document.createEvent("TouchEvent"), n = !0;
|
|
3605
3608
|
} catch {
|
|
@@ -3612,72 +3615,72 @@ function zn() {
|
|
|
3612
3615
|
touchStart: r
|
|
3613
3616
|
};
|
|
3614
3617
|
}
|
|
3615
|
-
function
|
|
3618
|
+
function zn() {
|
|
3616
3619
|
return navigator.oscpu;
|
|
3617
3620
|
}
|
|
3618
|
-
function
|
|
3621
|
+
function Bn() {
|
|
3619
3622
|
var e = navigator, t = [], n = e.language || e.userLanguage || e.browserLanguage || e.systemLanguage;
|
|
3620
|
-
if (n !== void 0 && t.push([n]), Array.isArray(e.languages))
|
|
3623
|
+
if (n !== void 0 && t.push([n]), Array.isArray(e.languages)) Zt() && tn() || t.push(e.languages);
|
|
3621
3624
|
else if (typeof e.languages == "string") {
|
|
3622
3625
|
var r = e.languages;
|
|
3623
3626
|
r && t.push(r.split(","));
|
|
3624
3627
|
}
|
|
3625
3628
|
return t;
|
|
3626
3629
|
}
|
|
3627
|
-
function
|
|
3630
|
+
function Vn() {
|
|
3628
3631
|
return window.screen.colorDepth;
|
|
3629
3632
|
}
|
|
3633
|
+
function Hn() {
|
|
3634
|
+
return G(W(navigator.deviceMemory), void 0);
|
|
3635
|
+
}
|
|
3630
3636
|
function Un() {
|
|
3631
|
-
|
|
3637
|
+
if (!(X() && an() && $t())) return Wn();
|
|
3632
3638
|
}
|
|
3633
3639
|
function Wn() {
|
|
3634
|
-
if (!(Y() && on() && en())) return Gn();
|
|
3635
|
-
}
|
|
3636
|
-
function Gn() {
|
|
3637
3640
|
var e = screen, t = function(e) {
|
|
3638
|
-
return
|
|
3641
|
+
return G(kt(e), null);
|
|
3639
3642
|
}, n = [t(e.width), t(e.height)];
|
|
3640
3643
|
return n.sort().reverse(), n;
|
|
3641
3644
|
}
|
|
3642
|
-
var
|
|
3643
|
-
function
|
|
3644
|
-
if (
|
|
3645
|
+
var Gn = 2500, Kn = 10, qn, Jn;
|
|
3646
|
+
function Yn() {
|
|
3647
|
+
if (Jn === void 0) {
|
|
3645
3648
|
var e = function() {
|
|
3646
|
-
var t =
|
|
3647
|
-
|
|
3649
|
+
var t = Qn();
|
|
3650
|
+
$n(t) ? Jn = setTimeout(e, Gn) : (qn = t, Jn = void 0);
|
|
3648
3651
|
};
|
|
3649
3652
|
e();
|
|
3650
3653
|
}
|
|
3651
3654
|
}
|
|
3652
|
-
function
|
|
3655
|
+
function Xn() {
|
|
3653
3656
|
var e = this;
|
|
3654
|
-
return
|
|
3655
|
-
return
|
|
3657
|
+
return Yn(), function() {
|
|
3658
|
+
return H(e, void 0, void 0, function() {
|
|
3656
3659
|
var e;
|
|
3657
|
-
return
|
|
3660
|
+
return U(this, function(t) {
|
|
3658
3661
|
switch (t.label) {
|
|
3659
|
-
case 0: return e =
|
|
3660
|
-
case 1: t.sent(), e =
|
|
3661
|
-
case 2: return
|
|
3662
|
+
case 0: return e = Qn(), $n(e) ? qn ? [2, vt([], qn, !0)] : sn() ? [4, cn()] : [3, 2] : [3, 2];
|
|
3663
|
+
case 1: t.sent(), e = Qn(), t.label = 2;
|
|
3664
|
+
case 2: return $n(e) || (qn = e), [2, e];
|
|
3662
3665
|
}
|
|
3663
3666
|
});
|
|
3664
3667
|
});
|
|
3665
3668
|
};
|
|
3666
3669
|
}
|
|
3667
|
-
function
|
|
3670
|
+
function Zn() {
|
|
3668
3671
|
var e = this;
|
|
3669
|
-
if (
|
|
3672
|
+
if (X() && an() && $t()) return function() {
|
|
3670
3673
|
return Promise.resolve(void 0);
|
|
3671
3674
|
};
|
|
3672
|
-
var t =
|
|
3675
|
+
var t = Xn();
|
|
3673
3676
|
return function() {
|
|
3674
|
-
return
|
|
3677
|
+
return H(e, void 0, void 0, function() {
|
|
3675
3678
|
var e, n;
|
|
3676
|
-
return
|
|
3679
|
+
return U(this, function(r) {
|
|
3677
3680
|
switch (r.label) {
|
|
3678
3681
|
case 0: return [4, t()];
|
|
3679
3682
|
case 1: return e = r.sent(), n = function(e) {
|
|
3680
|
-
return e === null ? null :
|
|
3683
|
+
return e === null ? null : At(e, Kn);
|
|
3681
3684
|
}, [2, [
|
|
3682
3685
|
n(e[0]),
|
|
3683
3686
|
n(e[1]),
|
|
@@ -3689,70 +3692,70 @@ function Qn() {
|
|
|
3689
3692
|
});
|
|
3690
3693
|
};
|
|
3691
3694
|
}
|
|
3692
|
-
function
|
|
3695
|
+
function Qn() {
|
|
3693
3696
|
var e = screen;
|
|
3694
3697
|
return [
|
|
3695
|
-
W(
|
|
3696
|
-
W(
|
|
3697
|
-
W(
|
|
3698
|
-
W(
|
|
3698
|
+
G(W(e.availTop), null),
|
|
3699
|
+
G(W(e.width) - W(e.availWidth) - G(W(e.availLeft), 0), null),
|
|
3700
|
+
G(W(e.height) - W(e.availHeight) - G(W(e.availTop), 0), null),
|
|
3701
|
+
G(W(e.availLeft), null)
|
|
3699
3702
|
];
|
|
3700
3703
|
}
|
|
3701
|
-
function
|
|
3704
|
+
function $n(e) {
|
|
3702
3705
|
for (var t = 0; t < 4; ++t) if (e[t]) return !1;
|
|
3703
3706
|
return !0;
|
|
3704
3707
|
}
|
|
3705
|
-
function
|
|
3706
|
-
return
|
|
3708
|
+
function er() {
|
|
3709
|
+
return G(kt(navigator.hardwareConcurrency), void 0);
|
|
3707
3710
|
}
|
|
3708
|
-
function
|
|
3711
|
+
function tr() {
|
|
3709
3712
|
var e = window.Intl?.DateTimeFormat;
|
|
3710
3713
|
if (e) {
|
|
3711
3714
|
var t = new e().resolvedOptions().timeZone;
|
|
3712
3715
|
if (t) return t;
|
|
3713
3716
|
}
|
|
3714
|
-
var n = -
|
|
3717
|
+
var n = -nr();
|
|
3715
3718
|
return `UTC${n >= 0 ? "+" : ""}${n}`;
|
|
3716
3719
|
}
|
|
3717
|
-
function
|
|
3720
|
+
function nr() {
|
|
3718
3721
|
var e = (/* @__PURE__ */ new Date()).getFullYear();
|
|
3719
|
-
return Math.max(
|
|
3722
|
+
return Math.max(W(new Date(e, 0, 1).getTimezoneOffset()), W(new Date(e, 6, 1).getTimezoneOffset()));
|
|
3720
3723
|
}
|
|
3721
|
-
function
|
|
3724
|
+
function rr() {
|
|
3722
3725
|
try {
|
|
3723
3726
|
return !!window.sessionStorage;
|
|
3724
3727
|
} catch {
|
|
3725
3728
|
return !0;
|
|
3726
3729
|
}
|
|
3727
3730
|
}
|
|
3728
|
-
function
|
|
3731
|
+
function ir() {
|
|
3729
3732
|
try {
|
|
3730
3733
|
return !!window.localStorage;
|
|
3731
3734
|
} catch {
|
|
3732
3735
|
return !0;
|
|
3733
3736
|
}
|
|
3734
3737
|
}
|
|
3735
|
-
function
|
|
3736
|
-
if (!(
|
|
3738
|
+
function ar() {
|
|
3739
|
+
if (!(Yt() || Xt())) try {
|
|
3737
3740
|
return !!window.indexedDB;
|
|
3738
3741
|
} catch {
|
|
3739
3742
|
return !0;
|
|
3740
3743
|
}
|
|
3741
3744
|
}
|
|
3742
|
-
function
|
|
3745
|
+
function or() {
|
|
3743
3746
|
return !!window.openDatabase;
|
|
3744
3747
|
}
|
|
3745
|
-
function
|
|
3748
|
+
function sr() {
|
|
3746
3749
|
return navigator.cpuClass;
|
|
3747
3750
|
}
|
|
3748
|
-
function
|
|
3751
|
+
function cr() {
|
|
3749
3752
|
var e = navigator.platform;
|
|
3750
|
-
return e === "MacIntel" &&
|
|
3753
|
+
return e === "MacIntel" && X() && !Qt() ? on() ? "iPad" : "iPhone" : e;
|
|
3751
3754
|
}
|
|
3752
|
-
function
|
|
3755
|
+
function lr() {
|
|
3753
3756
|
return navigator.vendor || "";
|
|
3754
3757
|
}
|
|
3755
|
-
function
|
|
3758
|
+
function ur() {
|
|
3756
3759
|
for (var e = [], t = 0, n = [
|
|
3757
3760
|
"chrome",
|
|
3758
3761
|
"safari",
|
|
@@ -3775,7 +3778,7 @@ function dr() {
|
|
|
3775
3778
|
}
|
|
3776
3779
|
return e.sort();
|
|
3777
3780
|
}
|
|
3778
|
-
function
|
|
3781
|
+
function dr() {
|
|
3779
3782
|
var e = document;
|
|
3780
3783
|
try {
|
|
3781
3784
|
e.cookie = "cookietest=1; SameSite=Strict;";
|
|
@@ -3785,7 +3788,7 @@ function fr() {
|
|
|
3785
3788
|
return !1;
|
|
3786
3789
|
}
|
|
3787
3790
|
}
|
|
3788
|
-
function
|
|
3791
|
+
function fr() {
|
|
3789
3792
|
var e = atob;
|
|
3790
3793
|
return {
|
|
3791
3794
|
abpIndo: [
|
|
@@ -4074,18 +4077,18 @@ function pr() {
|
|
|
4074
4077
|
]
|
|
4075
4078
|
};
|
|
4076
4079
|
}
|
|
4077
|
-
function
|
|
4080
|
+
function pr(e) {
|
|
4078
4081
|
var t = (e === void 0 ? {} : e).debug;
|
|
4079
|
-
return
|
|
4082
|
+
return H(this, void 0, void 0, function() {
|
|
4080
4083
|
var e, n, r, i, a, o;
|
|
4081
|
-
return
|
|
4084
|
+
return U(this, function(s) {
|
|
4082
4085
|
switch (s.label) {
|
|
4083
|
-
case 0: return
|
|
4086
|
+
case 0: return mr() ? (e = fr(), n = Object.keys(e), r = (o = []).concat.apply(o, n.map(function(t) {
|
|
4084
4087
|
return e[t];
|
|
4085
|
-
})), [4,
|
|
4086
|
-
case 1: return i = s.sent(), t &&
|
|
4088
|
+
})), [4, hr(r)]) : [2, void 0];
|
|
4089
|
+
case 1: return i = s.sent(), t && _r(e, i), a = n.filter(function(t) {
|
|
4087
4090
|
var n = e[t];
|
|
4088
|
-
return
|
|
4091
|
+
return K(n.map(function(e) {
|
|
4089
4092
|
return i[e];
|
|
4090
4093
|
})) > n.length * .6;
|
|
4091
4094
|
}), a.sort(), [2, a];
|
|
@@ -4093,19 +4096,19 @@ function mr(e) {
|
|
|
4093
4096
|
});
|
|
4094
4097
|
});
|
|
4095
4098
|
}
|
|
4096
|
-
function
|
|
4097
|
-
return
|
|
4099
|
+
function mr() {
|
|
4100
|
+
return X() || ln();
|
|
4098
4101
|
}
|
|
4099
|
-
function
|
|
4102
|
+
function hr(e) {
|
|
4100
4103
|
var t;
|
|
4101
|
-
return
|
|
4104
|
+
return H(this, void 0, void 0, function() {
|
|
4102
4105
|
var n, r, i, a, o, s, c, o;
|
|
4103
|
-
return
|
|
4106
|
+
return U(this, function(l) {
|
|
4104
4107
|
switch (l.label) {
|
|
4105
4108
|
case 0:
|
|
4106
|
-
for (n = document, r = n.createElement("div"), i = Array(e.length), a = {},
|
|
4109
|
+
for (n = document, r = n.createElement("div"), i = Array(e.length), a = {}, gr(r), o = 0; o < e.length; ++o) s = yn(e[o]), s.tagName === "DIALOG" && s.show(), c = n.createElement("div"), gr(c), c.appendChild(s), r.appendChild(c), i[o] = s;
|
|
4107
4110
|
l.label = 1;
|
|
4108
|
-
case 1: return n.body ? [3, 3] : [4,
|
|
4111
|
+
case 1: return n.body ? [3, 3] : [4, bt(50)];
|
|
4109
4112
|
case 2: return l.sent(), [3, 1];
|
|
4110
4113
|
case 3:
|
|
4111
4114
|
n.body.appendChild(r);
|
|
@@ -4119,10 +4122,10 @@ function gr(e) {
|
|
|
4119
4122
|
});
|
|
4120
4123
|
});
|
|
4121
4124
|
}
|
|
4122
|
-
function
|
|
4125
|
+
function gr(e) {
|
|
4123
4126
|
e.style.setProperty("visibility", "hidden", "important"), e.style.setProperty("display", "block", "important");
|
|
4124
4127
|
}
|
|
4125
|
-
function
|
|
4128
|
+
function _r(e, t) {
|
|
4126
4129
|
for (var n = "DOM blockers debug:\n```", r = 0, i = Object.keys(e); r < i.length; r++) {
|
|
4127
4130
|
var a = i[r];
|
|
4128
4131
|
n += `
|
|
@@ -4134,7 +4137,7 @@ ${a}:`;
|
|
|
4134
4137
|
}
|
|
4135
4138
|
}
|
|
4136
4139
|
}
|
|
4137
|
-
function
|
|
4140
|
+
function vr() {
|
|
4138
4141
|
for (var e = 0, t = [
|
|
4139
4142
|
"rec2020",
|
|
4140
4143
|
"p3",
|
|
@@ -4144,108 +4147,108 @@ function yr() {
|
|
|
4144
4147
|
if (matchMedia(`(color-gamut: ${n})`).matches) return n;
|
|
4145
4148
|
}
|
|
4146
4149
|
}
|
|
4147
|
-
function
|
|
4148
|
-
if (
|
|
4149
|
-
if (
|
|
4150
|
+
function yr() {
|
|
4151
|
+
if (br("inverted")) return !0;
|
|
4152
|
+
if (br("none")) return !1;
|
|
4150
4153
|
}
|
|
4151
|
-
function
|
|
4154
|
+
function br(e) {
|
|
4152
4155
|
return matchMedia(`(inverted-colors: ${e})`).matches;
|
|
4153
4156
|
}
|
|
4154
|
-
function
|
|
4155
|
-
if (
|
|
4156
|
-
if (
|
|
4157
|
+
function xr() {
|
|
4158
|
+
if (Sr("active")) return !0;
|
|
4159
|
+
if (Sr("none")) return !1;
|
|
4157
4160
|
}
|
|
4158
|
-
function
|
|
4161
|
+
function Sr(e) {
|
|
4159
4162
|
return matchMedia(`(forced-colors: ${e})`).matches;
|
|
4160
4163
|
}
|
|
4161
|
-
var
|
|
4162
|
-
function
|
|
4164
|
+
var Cr = 100;
|
|
4165
|
+
function wr() {
|
|
4163
4166
|
if (matchMedia("(min-monochrome: 0)").matches) {
|
|
4164
|
-
for (var e = 0; e <=
|
|
4167
|
+
for (var e = 0; e <= Cr; ++e) if (matchMedia(`(max-monochrome: ${e})`).matches) return e;
|
|
4165
4168
|
throw Error("Too high value");
|
|
4166
4169
|
}
|
|
4167
4170
|
}
|
|
4168
|
-
function
|
|
4169
|
-
if (
|
|
4170
|
-
if (
|
|
4171
|
-
if (
|
|
4172
|
-
if (
|
|
4171
|
+
function Tr() {
|
|
4172
|
+
if (Er("no-preference")) return 0;
|
|
4173
|
+
if (Er("high") || Er("more")) return 1;
|
|
4174
|
+
if (Er("low") || Er("less")) return -1;
|
|
4175
|
+
if (Er("forced")) return 10;
|
|
4173
4176
|
}
|
|
4174
|
-
function
|
|
4177
|
+
function Er(e) {
|
|
4175
4178
|
return matchMedia(`(prefers-contrast: ${e})`).matches;
|
|
4176
4179
|
}
|
|
4177
|
-
function
|
|
4178
|
-
if (
|
|
4179
|
-
if (
|
|
4180
|
+
function Dr() {
|
|
4181
|
+
if (Or("reduce")) return !0;
|
|
4182
|
+
if (Or("no-preference")) return !1;
|
|
4180
4183
|
}
|
|
4181
|
-
function
|
|
4184
|
+
function Or(e) {
|
|
4182
4185
|
return matchMedia(`(prefers-reduced-motion: ${e})`).matches;
|
|
4183
4186
|
}
|
|
4184
|
-
function
|
|
4185
|
-
if (
|
|
4186
|
-
if (
|
|
4187
|
+
function kr() {
|
|
4188
|
+
if (Ar("reduce")) return !0;
|
|
4189
|
+
if (Ar("no-preference")) return !1;
|
|
4187
4190
|
}
|
|
4188
|
-
function
|
|
4191
|
+
function Ar(e) {
|
|
4189
4192
|
return matchMedia(`(prefers-reduced-transparency: ${e})`).matches;
|
|
4190
4193
|
}
|
|
4191
|
-
function
|
|
4192
|
-
if (
|
|
4193
|
-
if (
|
|
4194
|
+
function jr() {
|
|
4195
|
+
if (Mr("high")) return !0;
|
|
4196
|
+
if (Mr("standard")) return !1;
|
|
4194
4197
|
}
|
|
4195
|
-
function
|
|
4198
|
+
function Mr(e) {
|
|
4196
4199
|
return matchMedia(`(dynamic-range: ${e})`).matches;
|
|
4197
4200
|
}
|
|
4198
|
-
var
|
|
4201
|
+
var Z = Math, Q = function() {
|
|
4199
4202
|
return 0;
|
|
4200
4203
|
};
|
|
4201
|
-
function
|
|
4202
|
-
var e =
|
|
4204
|
+
function Nr() {
|
|
4205
|
+
var e = Z.acos || Q, t = Z.acosh || Q, n = Z.asin || Q, r = Z.asinh || Q, i = Z.atanh || Q, a = Z.atan || Q, o = Z.sin || Q, s = Z.sinh || Q, c = Z.cos || Q, l = Z.cosh || Q, u = Z.tan || Q, d = Z.tanh || Q, f = Z.exp || Q, p = Z.expm1 || Q, m = Z.log1p || Q;
|
|
4203
4206
|
return {
|
|
4204
4207
|
acos: e(.12312423423423424),
|
|
4205
4208
|
acosh: t(1e308),
|
|
4206
4209
|
acoshPf: function(e) {
|
|
4207
|
-
return
|
|
4210
|
+
return Z.log(e + Z.sqrt(e * e - 1));
|
|
4208
4211
|
}(1e154),
|
|
4209
4212
|
asin: n(.12312423423423424),
|
|
4210
4213
|
asinh: r(1),
|
|
4211
4214
|
asinhPf: function(e) {
|
|
4212
|
-
return
|
|
4215
|
+
return Z.log(e + Z.sqrt(2));
|
|
4213
4216
|
}(1),
|
|
4214
4217
|
atanh: i(.5),
|
|
4215
4218
|
atanhPf: function(e) {
|
|
4216
|
-
return
|
|
4219
|
+
return Z.log(3) / 2;
|
|
4217
4220
|
}(.5),
|
|
4218
4221
|
atan: a(.5),
|
|
4219
4222
|
sin: o(-1e300),
|
|
4220
4223
|
sinh: s(1),
|
|
4221
4224
|
sinhPf: function(e) {
|
|
4222
|
-
return
|
|
4225
|
+
return Z.exp(e) - 1 / Z.exp(e) / 2;
|
|
4223
4226
|
}(1),
|
|
4224
4227
|
cos: c(10.000000000123),
|
|
4225
4228
|
cosh: l(1),
|
|
4226
4229
|
coshPf: function(e) {
|
|
4227
|
-
return (
|
|
4230
|
+
return (Z.exp(e) + 1 / Z.exp(e)) / 2;
|
|
4228
4231
|
}(1),
|
|
4229
4232
|
tan: u(-1e300),
|
|
4230
4233
|
tanh: d(1),
|
|
4231
4234
|
tanhPf: function(e) {
|
|
4232
|
-
return (
|
|
4235
|
+
return (Z.exp(2) - 1) / (Z.exp(2) + 1);
|
|
4233
4236
|
}(1),
|
|
4234
4237
|
exp: f(1),
|
|
4235
4238
|
expm1: p(1),
|
|
4236
4239
|
expm1Pf: function(e) {
|
|
4237
|
-
return
|
|
4240
|
+
return Z.exp(e) - 1;
|
|
4238
4241
|
}(1),
|
|
4239
4242
|
log1p: m(10),
|
|
4240
4243
|
log1pPf: function(e) {
|
|
4241
|
-
return
|
|
4244
|
+
return Z.log(11);
|
|
4242
4245
|
}(10),
|
|
4243
4246
|
powPI: function(e) {
|
|
4244
|
-
return
|
|
4247
|
+
return Z.pow(Z.PI, e);
|
|
4245
4248
|
}(-100)
|
|
4246
4249
|
};
|
|
4247
4250
|
}
|
|
4248
|
-
var
|
|
4251
|
+
var Pr = "mmMwWLliI0fiflO&1", Fr = {
|
|
4249
4252
|
default: [],
|
|
4250
4253
|
apple: [{ font: "-apple-system-body" }],
|
|
4251
4254
|
serif: [{ fontFamily: "serif" }],
|
|
@@ -4254,10 +4257,10 @@ var Fr = "mmMwWLliI0fiflO&1", Ir = {
|
|
|
4254
4257
|
min: [{ fontSize: "1px" }],
|
|
4255
4258
|
system: [{ fontFamily: "system-ui" }]
|
|
4256
4259
|
};
|
|
4257
|
-
function
|
|
4258
|
-
return
|
|
4259
|
-
for (var n = {}, r = {}, i = 0, a = Object.keys(
|
|
4260
|
-
var o = a[i], s =
|
|
4260
|
+
function Ir() {
|
|
4261
|
+
return Lr(function(e, t) {
|
|
4262
|
+
for (var n = {}, r = {}, i = 0, a = Object.keys(Fr); i < a.length; i++) {
|
|
4263
|
+
var o = a[i], s = Fr[o], c = s[0], l = c === void 0 ? {} : c, u = s[1], d = u === void 0 ? Pr : u, f = e.createElement("span");
|
|
4261
4264
|
f.textContent = d, f.style.whiteSpace = "nowrap";
|
|
4262
4265
|
for (var p = 0, m = Object.keys(l); p < m.length; p++) {
|
|
4263
4266
|
var h = m[p], g = l[h];
|
|
@@ -4265,50 +4268,50 @@ function Lr() {
|
|
|
4265
4268
|
}
|
|
4266
4269
|
n[o] = f, t.append(e.createElement("br"), f);
|
|
4267
4270
|
}
|
|
4268
|
-
for (var _ = 0, v = Object.keys(
|
|
4271
|
+
for (var _ = 0, v = Object.keys(Fr); _ < v.length; _++) {
|
|
4269
4272
|
var o = v[_];
|
|
4270
4273
|
r[o] = n[o].getBoundingClientRect().width;
|
|
4271
4274
|
}
|
|
4272
4275
|
return r;
|
|
4273
4276
|
});
|
|
4274
4277
|
}
|
|
4275
|
-
function
|
|
4276
|
-
return t === void 0 && (t = 4e3),
|
|
4278
|
+
function Lr(e, t) {
|
|
4279
|
+
return t === void 0 && (t = 4e3), vn(function(n, r) {
|
|
4277
4280
|
var i = r.document, a = i.body, o = a.style;
|
|
4278
|
-
o.width = `${t}px`, o.webkitTextSizeAdjust = o.textSizeAdjust = "none",
|
|
4281
|
+
o.width = `${t}px`, o.webkitTextSizeAdjust = o.textSizeAdjust = "none", Zt() ? a.style.zoom = `${1 / r.devicePixelRatio}` : X() && (a.style.zoom = "reset");
|
|
4279
4282
|
var s = i.createElement("div");
|
|
4280
|
-
return s.textContent =
|
|
4283
|
+
return s.textContent = vt([], Array(t / 20 | 0), !0).map(function() {
|
|
4281
4284
|
return "word";
|
|
4282
4285
|
}).join(" "), a.appendChild(s), e(i, a);
|
|
4283
4286
|
}, "<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
|
|
4284
4287
|
}
|
|
4285
|
-
function
|
|
4288
|
+
function Rr() {
|
|
4286
4289
|
return navigator.pdfViewerEnabled;
|
|
4287
4290
|
}
|
|
4288
|
-
function
|
|
4291
|
+
function zr() {
|
|
4289
4292
|
var e = /* @__PURE__ */ new Float32Array(1), t = new Uint8Array(e.buffer);
|
|
4290
4293
|
return e[0] = Infinity, e[0] -= e[0], t[3];
|
|
4291
4294
|
}
|
|
4292
|
-
function
|
|
4295
|
+
function Br() {
|
|
4293
4296
|
var e = window.ApplePaySession;
|
|
4294
4297
|
if (typeof e?.canMakePayments != "function") return -1;
|
|
4295
|
-
if (
|
|
4298
|
+
if (Vr()) return -3;
|
|
4296
4299
|
try {
|
|
4297
4300
|
return +!!e.canMakePayments();
|
|
4298
4301
|
} catch (e) {
|
|
4299
|
-
return
|
|
4302
|
+
return Hr(e);
|
|
4300
4303
|
}
|
|
4301
4304
|
}
|
|
4302
|
-
var
|
|
4303
|
-
function
|
|
4305
|
+
var Vr = xn;
|
|
4306
|
+
function Hr(e) {
|
|
4304
4307
|
if (e instanceof Error && e.name === "InvalidAccessError" && /\bfrom\b.*\binsecure\b/i.test(e.message)) return -2;
|
|
4305
4308
|
throw e;
|
|
4306
4309
|
}
|
|
4307
|
-
function
|
|
4310
|
+
function Ur() {
|
|
4308
4311
|
var e = document.createElement("a"), t = e.attributionSourceId ?? e.attributionsourceid;
|
|
4309
4312
|
return t === void 0 ? void 0 : String(t);
|
|
4310
4313
|
}
|
|
4311
|
-
var
|
|
4314
|
+
var Wr = -1, Gr = -2, Kr = /* @__PURE__ */ new Set([
|
|
4312
4315
|
10752,
|
|
4313
4316
|
2849,
|
|
4314
4317
|
2884,
|
|
@@ -4390,7 +4393,7 @@ var Gr = -1, Kr = -2, qr = /* @__PURE__ */ new Set([
|
|
|
4390
4393
|
7936,
|
|
4391
4394
|
7937,
|
|
4392
4395
|
7938
|
|
4393
|
-
]),
|
|
4396
|
+
]), qr = /* @__PURE__ */ new Set([
|
|
4394
4397
|
34047,
|
|
4395
4398
|
35723,
|
|
4396
4399
|
36063,
|
|
@@ -4401,19 +4404,19 @@ var Gr = -1, Kr = -2, qr = /* @__PURE__ */ new Set([
|
|
|
4401
4404
|
36392,
|
|
4402
4405
|
36795,
|
|
4403
4406
|
38449
|
|
4404
|
-
]),
|
|
4407
|
+
]), Jr = ["FRAGMENT_SHADER", "VERTEX_SHADER"], Yr = [
|
|
4405
4408
|
"LOW_FLOAT",
|
|
4406
4409
|
"MEDIUM_FLOAT",
|
|
4407
4410
|
"HIGH_FLOAT",
|
|
4408
4411
|
"LOW_INT",
|
|
4409
4412
|
"MEDIUM_INT",
|
|
4410
4413
|
"HIGH_INT"
|
|
4411
|
-
],
|
|
4412
|
-
function
|
|
4413
|
-
var t = e.cache, n =
|
|
4414
|
-
if (!n) return
|
|
4415
|
-
if (!
|
|
4416
|
-
var r =
|
|
4414
|
+
], Xr = "WEBGL_debug_renderer_info", Zr = "WEBGL_polygon_mode";
|
|
4415
|
+
function Qr(e) {
|
|
4416
|
+
var t = e.cache, n = ei(t);
|
|
4417
|
+
if (!n) return Wr;
|
|
4418
|
+
if (!oi(n)) return Gr;
|
|
4419
|
+
var r = ii() ? null : n.getExtension(Xr);
|
|
4417
4420
|
return {
|
|
4418
4421
|
version: n.getParameter(n.VERSION)?.toString() || "",
|
|
4419
4422
|
vendor: n.getParameter(n.VENDOR)?.toString() || "",
|
|
@@ -4423,32 +4426,32 @@ function $r(e) {
|
|
|
4423
4426
|
shadingLanguageVersion: n.getParameter(n.SHADING_LANGUAGE_VERSION)?.toString() || ""
|
|
4424
4427
|
};
|
|
4425
4428
|
}
|
|
4426
|
-
function
|
|
4427
|
-
var t = e.cache, n =
|
|
4428
|
-
if (!n) return
|
|
4429
|
-
if (!
|
|
4429
|
+
function $r(e) {
|
|
4430
|
+
var t = e.cache, n = ei(t);
|
|
4431
|
+
if (!n) return Wr;
|
|
4432
|
+
if (!oi(n)) return Gr;
|
|
4430
4433
|
var r = n.getSupportedExtensions(), i = n.getContextAttributes(), a = [], o = [], s = [], c = [], l = [];
|
|
4431
4434
|
if (i) for (var u = 0, d = Object.keys(i); u < d.length; u++) {
|
|
4432
4435
|
var f = d[u];
|
|
4433
4436
|
o.push(`${f}=${i[f]}`);
|
|
4434
4437
|
}
|
|
4435
|
-
for (var p =
|
|
4438
|
+
for (var p = ni(n), m = 0, h = p; m < h.length; m++) {
|
|
4436
4439
|
var g = h[m], _ = n[g];
|
|
4437
|
-
s.push(`${g}=${_}${
|
|
4440
|
+
s.push(`${g}=${_}${Kr.has(_) ? `=${n.getParameter(_)}` : ""}`);
|
|
4438
4441
|
}
|
|
4439
4442
|
if (r) for (var v = 0, y = r; v < y.length; v++) {
|
|
4440
4443
|
var b = y[v];
|
|
4441
|
-
if (!(b ===
|
|
4444
|
+
if (!(b === Xr && ii() || b === Zr && ai())) {
|
|
4442
4445
|
var x = n.getExtension(b);
|
|
4443
4446
|
if (!x) a.push(b);
|
|
4444
|
-
else for (var S = 0, C =
|
|
4447
|
+
else for (var S = 0, C = ni(x); S < C.length; S++) {
|
|
4445
4448
|
var g = C[S], _ = x[g];
|
|
4446
|
-
c.push(`${g}=${_}${
|
|
4449
|
+
c.push(`${g}=${_}${qr.has(_) ? `=${n.getParameter(_)}` : ""}`);
|
|
4447
4450
|
}
|
|
4448
4451
|
}
|
|
4449
4452
|
}
|
|
4450
|
-
for (var w = 0, T =
|
|
4451
|
-
var k = O[D], A =
|
|
4453
|
+
for (var w = 0, T = Jr; w < T.length; w++) for (var E = T[w], D = 0, O = Yr; D < O.length; D++) {
|
|
4454
|
+
var k = O[D], A = ti(n, E, k);
|
|
4452
4455
|
l.push(`${E}.${k}=${A.join(",")}`);
|
|
4453
4456
|
}
|
|
4454
4457
|
return c.sort(), s.sort(), {
|
|
@@ -4460,7 +4463,7 @@ function ei(e) {
|
|
|
4460
4463
|
unsupportedExtensions: a
|
|
4461
4464
|
};
|
|
4462
4465
|
}
|
|
4463
|
-
function
|
|
4466
|
+
function ei(e) {
|
|
4464
4467
|
if (e.webgl) return e.webgl.context;
|
|
4465
4468
|
var t = document.createElement("canvas"), n;
|
|
4466
4469
|
t.addEventListener("webglCreateContextError", function() {
|
|
@@ -4475,7 +4478,7 @@ function ti(e) {
|
|
|
4475
4478
|
}
|
|
4476
4479
|
return e.webgl = { context: n }, n;
|
|
4477
4480
|
}
|
|
4478
|
-
function
|
|
4481
|
+
function ti(e, t, n) {
|
|
4479
4482
|
var r = e.getShaderPrecisionFormat(e[t], e[n]);
|
|
4480
4483
|
return r ? [
|
|
4481
4484
|
r.rangeMin,
|
|
@@ -4483,179 +4486,179 @@ function ni(e, t, n) {
|
|
|
4483
4486
|
r.precision
|
|
4484
4487
|
] : [];
|
|
4485
4488
|
}
|
|
4486
|
-
function
|
|
4487
|
-
return Object.keys(e.__proto__).filter(
|
|
4489
|
+
function ni(e) {
|
|
4490
|
+
return Object.keys(e.__proto__).filter(ri);
|
|
4488
4491
|
}
|
|
4489
|
-
function
|
|
4492
|
+
function ri(e) {
|
|
4490
4493
|
return typeof e == "string" && !e.match(/[^A-Z0-9_x]/);
|
|
4491
4494
|
}
|
|
4492
|
-
function
|
|
4493
|
-
return
|
|
4495
|
+
function ii() {
|
|
4496
|
+
return en();
|
|
4494
4497
|
}
|
|
4495
|
-
function
|
|
4496
|
-
return
|
|
4498
|
+
function ai() {
|
|
4499
|
+
return Zt() || X();
|
|
4497
4500
|
}
|
|
4498
|
-
function
|
|
4501
|
+
function oi(e) {
|
|
4499
4502
|
return typeof e.getParameter == "function";
|
|
4500
4503
|
}
|
|
4501
|
-
function
|
|
4502
|
-
if (!(
|
|
4504
|
+
function si() {
|
|
4505
|
+
if (!(ln() || X())) return -2;
|
|
4503
4506
|
if (!window.AudioContext) return -1;
|
|
4504
4507
|
var e = new AudioContext().baseLatency;
|
|
4505
4508
|
return e == null ? -1 : isFinite(e) ? e : -3;
|
|
4506
4509
|
}
|
|
4507
|
-
function
|
|
4510
|
+
function ci() {
|
|
4508
4511
|
if (!window.Intl) return -1;
|
|
4509
4512
|
var e = window.Intl.DateTimeFormat;
|
|
4510
4513
|
if (!e) return -2;
|
|
4511
4514
|
var t = e().resolvedOptions().locale;
|
|
4512
4515
|
return !t && t !== "" ? -3 : t;
|
|
4513
4516
|
}
|
|
4514
|
-
var
|
|
4515
|
-
fonts:
|
|
4516
|
-
domBlockers:
|
|
4517
|
-
fontPreferences:
|
|
4518
|
-
audio:
|
|
4519
|
-
screenFrame:
|
|
4520
|
-
canvas:
|
|
4521
|
-
osCpu:
|
|
4522
|
-
languages:
|
|
4523
|
-
colorDepth:
|
|
4524
|
-
deviceMemory:
|
|
4525
|
-
screenResolution:
|
|
4526
|
-
hardwareConcurrency:
|
|
4527
|
-
timezone:
|
|
4528
|
-
sessionStorage:
|
|
4529
|
-
localStorage:
|
|
4530
|
-
indexedDB:
|
|
4531
|
-
openDatabase:
|
|
4532
|
-
cpuClass:
|
|
4533
|
-
platform:
|
|
4534
|
-
plugins:
|
|
4535
|
-
touchSupport:
|
|
4536
|
-
vendor:
|
|
4537
|
-
vendorFlavors:
|
|
4538
|
-
cookiesEnabled:
|
|
4539
|
-
colorGamut:
|
|
4540
|
-
invertedColors:
|
|
4541
|
-
forcedColors:
|
|
4542
|
-
monochrome:
|
|
4543
|
-
contrast:
|
|
4544
|
-
reducedMotion:
|
|
4545
|
-
reducedTransparency:
|
|
4546
|
-
hdr:
|
|
4547
|
-
math:
|
|
4548
|
-
pdfViewerEnabled:
|
|
4549
|
-
architecture:
|
|
4550
|
-
applePay:
|
|
4551
|
-
privateClickMeasurement:
|
|
4552
|
-
audioBaseLatency:
|
|
4553
|
-
dateTimeLocale:
|
|
4554
|
-
webGlBasics:
|
|
4555
|
-
webGlExtensions:
|
|
4517
|
+
var li = {
|
|
4518
|
+
fonts: En,
|
|
4519
|
+
domBlockers: pr,
|
|
4520
|
+
fontPreferences: Ir,
|
|
4521
|
+
audio: dn,
|
|
4522
|
+
screenFrame: Zn,
|
|
4523
|
+
canvas: On,
|
|
4524
|
+
osCpu: zn,
|
|
4525
|
+
languages: Bn,
|
|
4526
|
+
colorDepth: Vn,
|
|
4527
|
+
deviceMemory: Hn,
|
|
4528
|
+
screenResolution: Un,
|
|
4529
|
+
hardwareConcurrency: er,
|
|
4530
|
+
timezone: tr,
|
|
4531
|
+
sessionStorage: rr,
|
|
4532
|
+
localStorage: ir,
|
|
4533
|
+
indexedDB: ar,
|
|
4534
|
+
openDatabase: or,
|
|
4535
|
+
cpuClass: sr,
|
|
4536
|
+
platform: cr,
|
|
4537
|
+
plugins: Dn,
|
|
4538
|
+
touchSupport: Rn,
|
|
4539
|
+
vendor: lr,
|
|
4540
|
+
vendorFlavors: ur,
|
|
4541
|
+
cookiesEnabled: dr,
|
|
4542
|
+
colorGamut: vr,
|
|
4543
|
+
invertedColors: yr,
|
|
4544
|
+
forcedColors: xr,
|
|
4545
|
+
monochrome: wr,
|
|
4546
|
+
contrast: Tr,
|
|
4547
|
+
reducedMotion: Dr,
|
|
4548
|
+
reducedTransparency: kr,
|
|
4549
|
+
hdr: jr,
|
|
4550
|
+
math: Nr,
|
|
4551
|
+
pdfViewerEnabled: Rr,
|
|
4552
|
+
architecture: zr,
|
|
4553
|
+
applePay: Br,
|
|
4554
|
+
privateClickMeasurement: Ur,
|
|
4555
|
+
audioBaseLatency: si,
|
|
4556
|
+
dateTimeLocale: ci,
|
|
4557
|
+
webGlBasics: Qr,
|
|
4558
|
+
webGlExtensions: $r
|
|
4556
4559
|
};
|
|
4557
|
-
function
|
|
4558
|
-
return
|
|
4560
|
+
function ui(e) {
|
|
4561
|
+
return Jt(li, e, []);
|
|
4559
4562
|
}
|
|
4560
|
-
var
|
|
4561
|
-
function
|
|
4562
|
-
var t =
|
|
4563
|
+
var di = "$ if upgrade to Pro: https://fpjs.dev/pro";
|
|
4564
|
+
function fi(e) {
|
|
4565
|
+
var t = pi(e), n = mi(t);
|
|
4563
4566
|
return {
|
|
4564
4567
|
score: t,
|
|
4565
|
-
comment:
|
|
4568
|
+
comment: di.replace(/\$/g, `${n}`)
|
|
4566
4569
|
};
|
|
4567
4570
|
}
|
|
4568
|
-
function
|
|
4569
|
-
if (
|
|
4570
|
-
if (
|
|
4571
|
+
function pi(e) {
|
|
4572
|
+
if (ln()) return .4;
|
|
4573
|
+
if (X()) return Qt() && !(an() && $t()) ? .5 : .3;
|
|
4571
4574
|
var t = "value" in e.platform ? e.platform.value : "";
|
|
4572
4575
|
return /^Win/.test(t) ? .6 : /^Mac/.test(t) ? .5 : .7;
|
|
4573
4576
|
}
|
|
4574
|
-
function
|
|
4575
|
-
return
|
|
4577
|
+
function mi(e) {
|
|
4578
|
+
return At(.99 + .01 * e, 1e-4);
|
|
4576
4579
|
}
|
|
4577
|
-
function
|
|
4580
|
+
function hi(e) {
|
|
4578
4581
|
for (var t = "", n = 0, r = Object.keys(e).sort(); n < r.length; n++) {
|
|
4579
4582
|
var i = r[n], a = e[i], o = "error" in a ? "error" : JSON.stringify(a.value);
|
|
4580
4583
|
t += `${t ? "|" : ""}${i.replace(/([:|\\])/g, "\\$1")}:${o}`;
|
|
4581
4584
|
}
|
|
4582
4585
|
return t;
|
|
4583
4586
|
}
|
|
4584
|
-
function
|
|
4587
|
+
function gi(e) {
|
|
4585
4588
|
return JSON.stringify(e, function(e, t) {
|
|
4586
|
-
return t instanceof Error ?
|
|
4589
|
+
return t instanceof Error ? Wt(t) : t;
|
|
4587
4590
|
}, 2);
|
|
4588
4591
|
}
|
|
4589
|
-
function
|
|
4590
|
-
return
|
|
4592
|
+
function _i(e) {
|
|
4593
|
+
return Ut(hi(e));
|
|
4591
4594
|
}
|
|
4592
|
-
function
|
|
4595
|
+
function vi(e) {
|
|
4593
4596
|
var t;
|
|
4594
4597
|
return {
|
|
4595
4598
|
get visitorId() {
|
|
4596
|
-
return t === void 0 && (t =
|
|
4599
|
+
return t === void 0 && (t = _i(this.components)), t;
|
|
4597
4600
|
},
|
|
4598
4601
|
set visitorId(e) {
|
|
4599
4602
|
t = e;
|
|
4600
4603
|
},
|
|
4601
|
-
confidence:
|
|
4604
|
+
confidence: fi(e),
|
|
4602
4605
|
components: e,
|
|
4603
|
-
version:
|
|
4606
|
+
version: yt
|
|
4604
4607
|
};
|
|
4605
4608
|
}
|
|
4606
|
-
function
|
|
4607
|
-
return e === void 0 && (e = 50),
|
|
4609
|
+
function yi(e) {
|
|
4610
|
+
return e === void 0 && (e = 50), St(e, e * 2);
|
|
4608
4611
|
}
|
|
4609
|
-
function
|
|
4612
|
+
function bi(e, t) {
|
|
4610
4613
|
return { get: function(n) {
|
|
4611
|
-
return
|
|
4614
|
+
return H(this, void 0, void 0, function() {
|
|
4612
4615
|
var r, i;
|
|
4613
|
-
return
|
|
4616
|
+
return U(this, function(a) {
|
|
4614
4617
|
switch (a.label) {
|
|
4615
4618
|
case 0: return [4, e()];
|
|
4616
|
-
case 1: return r = a.sent(), i =
|
|
4619
|
+
case 1: return r = a.sent(), i = vi(r), t || n?.debug, [2, i];
|
|
4617
4620
|
}
|
|
4618
4621
|
});
|
|
4619
4622
|
});
|
|
4620
4623
|
} };
|
|
4621
4624
|
}
|
|
4622
|
-
function
|
|
4625
|
+
function xi() {
|
|
4623
4626
|
if (!(window.__fpjs_d_m || Math.random() >= .001)) try {
|
|
4624
4627
|
var e = new XMLHttpRequest();
|
|
4625
|
-
e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${
|
|
4628
|
+
e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${yt}/npm-monitoring`, !0), e.send();
|
|
4626
4629
|
} catch {}
|
|
4627
4630
|
}
|
|
4628
|
-
function
|
|
4629
|
-
return e === void 0 && (e = {}),
|
|
4631
|
+
function Si(e) {
|
|
4632
|
+
return e === void 0 && (e = {}), H(this, void 0, void 0, function() {
|
|
4630
4633
|
var t, n, r;
|
|
4631
|
-
return
|
|
4634
|
+
return U(this, function(i) {
|
|
4632
4635
|
switch (i.label) {
|
|
4633
|
-
case 0: return (e.monitoring ?? !0) &&
|
|
4634
|
-
case 1: return i.sent(), r =
|
|
4636
|
+
case 0: return (e.monitoring ?? !0) && xi(), t = e.delayFallback, n = e.debug, [4, yi(t)];
|
|
4637
|
+
case 1: return i.sent(), r = ui({
|
|
4635
4638
|
cache: {},
|
|
4636
4639
|
debug: n
|
|
4637
|
-
}), [2,
|
|
4640
|
+
}), [2, bi(r, n)];
|
|
4638
4641
|
}
|
|
4639
4642
|
});
|
|
4640
4643
|
});
|
|
4641
4644
|
}
|
|
4642
|
-
var
|
|
4643
|
-
load:
|
|
4644
|
-
hashComponents:
|
|
4645
|
-
componentsToDebugString:
|
|
4645
|
+
var Ci = {
|
|
4646
|
+
load: Si,
|
|
4647
|
+
hashComponents: _i,
|
|
4648
|
+
componentsToDebugString: gi
|
|
4646
4649
|
};
|
|
4647
4650
|
// ../../packages/widget-sdk/src/api/request-options.ts
|
|
4648
|
-
function
|
|
4651
|
+
function wi(e) {
|
|
4649
4652
|
return e.preview ? "include" : "same-origin";
|
|
4650
4653
|
}
|
|
4651
|
-
function
|
|
4654
|
+
function Ti(e) {
|
|
4652
4655
|
return e.sessionToken ? { "x-widget-session-token": e.sessionToken } : {};
|
|
4653
4656
|
}
|
|
4654
|
-
function
|
|
4657
|
+
function Ei(e, t) {
|
|
4655
4658
|
return t.configChannel === "draft" ? `${e}${e.includes("?") ? "&" : "?"}configChannel=draft` : e;
|
|
4656
4659
|
}
|
|
4657
4660
|
// ../../packages/widget-sdk/src/api/client.ts
|
|
4658
|
-
var
|
|
4661
|
+
var Di = class {
|
|
4659
4662
|
baseUrl;
|
|
4660
4663
|
options;
|
|
4661
4664
|
sessionToken;
|
|
@@ -4664,15 +4667,15 @@ var Oi = class {
|
|
|
4664
4667
|
this.baseUrl = e, this.options = t;
|
|
4665
4668
|
}
|
|
4666
4669
|
get credentials() {
|
|
4667
|
-
return
|
|
4670
|
+
return wi(this.options);
|
|
4668
4671
|
}
|
|
4669
4672
|
channel(e) {
|
|
4670
|
-
return
|
|
4673
|
+
return Ei(e, this.options);
|
|
4671
4674
|
}
|
|
4672
4675
|
authHeaders() {
|
|
4673
4676
|
return {
|
|
4674
4677
|
"Content-Type": "application/json",
|
|
4675
|
-
...
|
|
4678
|
+
...Ti({ sessionToken: this.sessionToken })
|
|
4676
4679
|
};
|
|
4677
4680
|
}
|
|
4678
4681
|
getSessionToken() {
|
|
@@ -4858,7 +4861,7 @@ var Oi = class {
|
|
|
4858
4861
|
}
|
|
4859
4862
|
};
|
|
4860
4863
|
// ../../packages/widget-sdk/src/api/sse-reader.ts
|
|
4861
|
-
async function*
|
|
4864
|
+
async function* Oi(e, t) {
|
|
4862
4865
|
if (!e.body) return;
|
|
4863
4866
|
let n = e.body.getReader(), r = new TextDecoder(), i = "", a = () => {
|
|
4864
4867
|
if (!t) return n.read();
|
|
@@ -4884,16 +4887,16 @@ async function* ki(e, t) {
|
|
|
4884
4887
|
}
|
|
4885
4888
|
}
|
|
4886
4889
|
// ../../packages/widget-sdk/src/api/stream.ts
|
|
4887
|
-
var
|
|
4888
|
-
async function
|
|
4890
|
+
var ki = 12e4;
|
|
4891
|
+
async function Ai(e, t, n, r = {}) {
|
|
4889
4892
|
let i = "", a = !1;
|
|
4890
4893
|
try {
|
|
4891
|
-
let o = await fetch(
|
|
4894
|
+
let o = await fetch(Ei(`${e}/v1/agents/${encodeURIComponent(t.agentId)}/responses:stream`, r), {
|
|
4892
4895
|
method: "POST",
|
|
4893
|
-
credentials:
|
|
4896
|
+
credentials: wi(r),
|
|
4894
4897
|
headers: {
|
|
4895
4898
|
"Content-Type": "application/json",
|
|
4896
|
-
...
|
|
4899
|
+
...Ti(r)
|
|
4897
4900
|
},
|
|
4898
4901
|
body: JSON.stringify({
|
|
4899
4902
|
message: t.message,
|
|
@@ -4977,20 +4980,20 @@ async function ji(e, t, n, r = {}) {
|
|
|
4977
4980
|
}
|
|
4978
4981
|
return !1;
|
|
4979
4982
|
}
|
|
4980
|
-
let r =
|
|
4983
|
+
let r = ji(t);
|
|
4981
4984
|
r && (i += r, n.onDelta(r, i));
|
|
4982
4985
|
} catch (e) {
|
|
4983
4986
|
if (!(e instanceof SyntaxError)) throw e;
|
|
4984
4987
|
}
|
|
4985
4988
|
return !1;
|
|
4986
4989
|
};
|
|
4987
|
-
for await (let e of
|
|
4990
|
+
for await (let e of Oi(o, ki)) if (l(e)) break;
|
|
4988
4991
|
n.onEnd(i);
|
|
4989
4992
|
} catch (e) {
|
|
4990
4993
|
n.onError(e instanceof Error ? e : Error(String(e)));
|
|
4991
4994
|
}
|
|
4992
4995
|
}
|
|
4993
|
-
function
|
|
4996
|
+
function ji(e) {
|
|
4994
4997
|
let t = e.choices;
|
|
4995
4998
|
if (Array.isArray(t) && t.length > 0) {
|
|
4996
4999
|
let e = t[0]?.delta, n = e?.content ?? e?.text ?? "";
|
|
@@ -5004,26 +5007,26 @@ function Mi(e) {
|
|
|
5004
5007
|
return e.response || (e.text ?? e.content ?? "");
|
|
5005
5008
|
}
|
|
5006
5009
|
// ../../packages/widget-sdk/src/api/reconnect.ts
|
|
5007
|
-
function
|
|
5010
|
+
function Mi(e, t, n) {
|
|
5008
5011
|
let r = t * 2 ** (e - 1), i = Math.min(r, n), a = i * .3;
|
|
5009
5012
|
return Math.floor(i - a + a * 2 * Math.random());
|
|
5010
5013
|
}
|
|
5011
|
-
async function
|
|
5014
|
+
async function Ni(e, t, n, r = {}) {
|
|
5012
5015
|
let i = await fetch(`${e}/v1/sessions/${encodeURIComponent(t)}/runs/${encodeURIComponent(n)}`, { credentials: r.preview ? "include" : "same-origin" });
|
|
5013
5016
|
if (!i.ok) throw Error(`Failed to fetch run ${n}: ${i.status}`);
|
|
5014
5017
|
let a = await i.json();
|
|
5015
5018
|
if (!a.success || !a.data) throw Error(a.error ?? `Failed to fetch run ${n}`);
|
|
5016
5019
|
return a.data;
|
|
5017
5020
|
}
|
|
5018
|
-
async function
|
|
5021
|
+
async function Pi(e, t, n, r = {}) {
|
|
5019
5022
|
let i = r.maxAttempts ?? 3, a;
|
|
5020
5023
|
for (let o = 1; o <= i; o++) {
|
|
5021
5024
|
if (o > 1) {
|
|
5022
|
-
let e =
|
|
5025
|
+
let e = Mi(o - 1, 500, 4e3);
|
|
5023
5026
|
await new Promise((t) => setTimeout(t, e));
|
|
5024
5027
|
}
|
|
5025
5028
|
try {
|
|
5026
|
-
let a = await
|
|
5029
|
+
let a = await Ni(e, t, n, r);
|
|
5027
5030
|
if (a.status !== "running" || o === i) return a;
|
|
5028
5031
|
} catch (e) {
|
|
5029
5032
|
if (a = e instanceof Error ? e : Error(String(e)), o === i) throw a;
|
|
@@ -5032,37 +5035,37 @@ async function Fi(e, t, n, r = {}) {
|
|
|
5032
5035
|
throw a ?? /* @__PURE__ */ Error(`Failed to fetch run ${n}`);
|
|
5033
5036
|
}
|
|
5034
5037
|
// ../../packages/widget-sdk/src/api/turnstile.ts
|
|
5035
|
-
var
|
|
5038
|
+
var Fi = 15e3, Ii, Li, Ri, zi, Bi = [];
|
|
5036
5039
|
function Vi() {
|
|
5037
5040
|
zi || (zi = (e) => {
|
|
5038
|
-
if (!
|
|
5041
|
+
if (!Ii || e.source !== Ii.contentWindow || Ri && e.origin !== Ri) return;
|
|
5039
5042
|
let t = e.data;
|
|
5040
5043
|
t && typeof t.type == "string" && (t.type === "turnstile-token" && typeof t.token == "string" ? Bi.shift()?.resolve(t.token) : t.type === "turnstile-error" && Bi.shift()?.reject(Error(t.message ?? "Turnstile verification failed")));
|
|
5041
5044
|
}, window.addEventListener("message", zi));
|
|
5042
5045
|
}
|
|
5043
5046
|
function Hi() {
|
|
5044
|
-
|
|
5047
|
+
Ii?.remove(), Ii = void 0, Li = void 0;
|
|
5045
5048
|
}
|
|
5046
5049
|
function Ui(e) {
|
|
5047
|
-
if (
|
|
5050
|
+
if (Ii && Li) return Li;
|
|
5048
5051
|
if (typeof window > "u" || typeof document > "u") return Promise.reject(/* @__PURE__ */ Error("Turnstile requires a browser environment"));
|
|
5049
5052
|
Vi(), Ri = new URL(e).origin;
|
|
5050
5053
|
let t = document.createElement("iframe");
|
|
5051
5054
|
return t.src = `${e.replace(/\/$/, "")}/v1/widget/turnstile-challenge`, t.style.display = "none", t.setAttribute("aria-hidden", "true"), t.sandbox.add("allow-scripts", "allow-same-origin"), Li = new Promise((e, n) => {
|
|
5052
5055
|
let r = setTimeout(() => {
|
|
5053
5056
|
window.removeEventListener("message", i), n(/* @__PURE__ */ Error("Turnstile challenge page failed to load"));
|
|
5054
|
-
},
|
|
5057
|
+
}, Fi);
|
|
5055
5058
|
function i(n) {
|
|
5056
5059
|
n.source === t.contentWindow && n.data?.type === "turnstile-ready" && (clearTimeout(r), window.removeEventListener("message", i), e());
|
|
5057
5060
|
}
|
|
5058
5061
|
window.addEventListener("message", i);
|
|
5059
5062
|
}).catch((e) => {
|
|
5060
5063
|
throw Hi(), e;
|
|
5061
|
-
}),
|
|
5064
|
+
}), Ii = t, document.body.appendChild(t), Li;
|
|
5062
5065
|
}
|
|
5063
5066
|
async function Wi(e) {
|
|
5064
|
-
if (await Ui(e), !
|
|
5065
|
-
let t =
|
|
5067
|
+
if (await Ui(e), !Ii?.contentWindow) throw Error("Turnstile challenge frame unavailable");
|
|
5068
|
+
let t = Ii.contentWindow, n = Ri;
|
|
5066
5069
|
return new Promise((e, r) => {
|
|
5067
5070
|
let i = {
|
|
5068
5071
|
resolve: (t) => {
|
|
@@ -5074,7 +5077,7 @@ async function Wi(e) {
|
|
|
5074
5077
|
}, a = setTimeout(() => {
|
|
5075
5078
|
let e = Bi.indexOf(i);
|
|
5076
5079
|
e !== -1 && Bi.splice(e, 1), r(/* @__PURE__ */ Error("Turnstile verification timed out"));
|
|
5077
|
-
},
|
|
5080
|
+
}, Fi);
|
|
5078
5081
|
Bi.push(i), t.postMessage({ type: "turnstile-solve" }, n);
|
|
5079
5082
|
});
|
|
5080
5083
|
}
|
|
@@ -5174,7 +5177,7 @@ var ia = 2e3, aa = class {
|
|
|
5174
5177
|
eventSource = null;
|
|
5175
5178
|
emitter;
|
|
5176
5179
|
constructor(e, t, n) {
|
|
5177
|
-
this.hostConfig = t, this.onStateChange = n, this.config = e, this.apiClient = new
|
|
5180
|
+
this.hostConfig = t, this.onStateChange = n, this.config = e, this.apiClient = new Di(e.apiBaseUrl, {
|
|
5178
5181
|
preview: e.preview,
|
|
5179
5182
|
configChannel: e.configChannel
|
|
5180
5183
|
}), this.emitter = new Gi(), this.initializeFingerprint();
|
|
@@ -5209,7 +5212,7 @@ var ia = 2e3, aa = class {
|
|
|
5209
5212
|
}
|
|
5210
5213
|
async initializeFingerprint() {
|
|
5211
5214
|
try {
|
|
5212
|
-
let e = await (await
|
|
5215
|
+
let e = await (await Ci.load()).get();
|
|
5213
5216
|
this.fingerprint = e.visitorId;
|
|
5214
5217
|
} catch {
|
|
5215
5218
|
this.fingerprint = void 0;
|
|
@@ -5245,7 +5248,7 @@ var ia = 2e3, aa = class {
|
|
|
5245
5248
|
}
|
|
5246
5249
|
if (!this.config.skipServerConfigFetch) {
|
|
5247
5250
|
let e = await this.apiClient.fetchWidgetConfig(this.config.agentId, this.config.tenantId);
|
|
5248
|
-
e && (this.config =
|
|
5251
|
+
e && (this.config = ht(this.hostConfig, e), this.onStateChange(this.getState(), this.config));
|
|
5249
5252
|
}
|
|
5250
5253
|
if (this.setState({ initStatus: "ready" }), !this.state.sessionId) return;
|
|
5251
5254
|
this.openEventStream();
|
|
@@ -5501,7 +5504,7 @@ var ia = 2e3, aa = class {
|
|
|
5501
5504
|
};
|
|
5502
5505
|
this.setState({ messages: [...this.state.messages, a] }), this.emitter.emit("stream:start");
|
|
5503
5506
|
let o = !1, s = !1, c = null, l = null, u = Date.now(), d = null;
|
|
5504
|
-
await
|
|
5507
|
+
await Ai(this.config.apiBaseUrl, {
|
|
5505
5508
|
agentId: this.config.agentId,
|
|
5506
5509
|
message: e,
|
|
5507
5510
|
sessionId: this.state.sessionId,
|
|
@@ -5649,7 +5652,7 @@ var ia = 2e3, aa = class {
|
|
|
5649
5652
|
let t = this.state.messages.find((e) => e.id === i);
|
|
5650
5653
|
t && this.emitter.emit("message:received", t);
|
|
5651
5654
|
}, a = this.state.messages.find((e) => e.id === i)?.runId, s = this.state.sessionId;
|
|
5652
|
-
a && s ?
|
|
5655
|
+
a && s ? Pi(this.config.apiBaseUrl, s, a, { preview: this.config.preview }).then((r) => {
|
|
5653
5656
|
r.status === "done" && r.finalText ? n(r.finalText) : t(r.errorMessage || e.message || "Something went wrong. Please try again.");
|
|
5654
5657
|
}).catch(() => t(e.message || "Something went wrong. Please try again.")) : t(e.message || "Something went wrong. Please try again.");
|
|
5655
5658
|
}
|
|
@@ -5779,21 +5782,21 @@ function xa(e, t, n) {
|
|
|
5779
5782
|
let r = {
|
|
5780
5783
|
...e,
|
|
5781
5784
|
mode: "floating"
|
|
5782
|
-
}, i = _a(
|
|
5785
|
+
}, i = _a(ht(r), r, t, n);
|
|
5783
5786
|
return ba(i), i;
|
|
5784
5787
|
}
|
|
5785
5788
|
function Sa(e, t, n, r) {
|
|
5786
5789
|
let i = {
|
|
5787
5790
|
...t,
|
|
5788
5791
|
mode: "floating"
|
|
5789
|
-
}, a = _a(
|
|
5792
|
+
}, a = _a(ht(i), i, n, r, e);
|
|
5790
5793
|
return ba(a), a;
|
|
5791
5794
|
}
|
|
5792
5795
|
function Ca(e, t, n, r) {
|
|
5793
5796
|
let i = {
|
|
5794
5797
|
...t,
|
|
5795
5798
|
mode: "inline"
|
|
5796
|
-
}, a = _a(
|
|
5799
|
+
}, a = _a(ht(i), i, n, r, e);
|
|
5797
5800
|
return ba(a), a;
|
|
5798
5801
|
}
|
|
5799
5802
|
function wa(e) {
|
|
@@ -5809,18 +5812,55 @@ function Ea(e) {
|
|
|
5809
5812
|
`--ak-font: ${t.fontFamily}`,
|
|
5810
5813
|
`--ak-radius: ${t.borderRadius}`
|
|
5811
5814
|
];
|
|
5812
|
-
|
|
5815
|
+
n.push(`--ak-accent-hover: color-mix(in srgb, ${t.accentColor} 85%, black)`);
|
|
5816
|
+
let r = Ma(t.accentColor);
|
|
5817
|
+
return n.push(`--ak-on-accent: ${r}`, `--ak-user-text: ${r}`), `:host { ${n.join("; ")} }`;
|
|
5813
5818
|
}
|
|
5814
5819
|
function Da(e) {
|
|
5815
5820
|
return e === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
|
|
5816
5821
|
}
|
|
5822
|
+
var Oa = "#ffffff", ka = "#111827";
|
|
5823
|
+
function Aa(e) {
|
|
5824
|
+
let t = e.trim().toLowerCase(), n = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);
|
|
5825
|
+
if (n) {
|
|
5826
|
+
let e = n[1];
|
|
5827
|
+
return e.length <= 4 ? [
|
|
5828
|
+
0,
|
|
5829
|
+
1,
|
|
5830
|
+
2
|
|
5831
|
+
].map((t) => parseInt(e[t] + e[t], 16)) : [
|
|
5832
|
+
0,
|
|
5833
|
+
2,
|
|
5834
|
+
4
|
|
5835
|
+
].map((t) => parseInt(e.slice(t, t + 2), 16));
|
|
5836
|
+
}
|
|
5837
|
+
let r = /^rgba?\(\s*(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)/.exec(t);
|
|
5838
|
+
return r ? [
|
|
5839
|
+
Number(r[1]),
|
|
5840
|
+
Number(r[2]),
|
|
5841
|
+
Number(r[3])
|
|
5842
|
+
].map((e) => Math.min(255, e)) : null;
|
|
5843
|
+
}
|
|
5844
|
+
function ja([e, t, n]) {
|
|
5845
|
+
let r = (e) => {
|
|
5846
|
+
let t = e / 255;
|
|
5847
|
+
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
5848
|
+
};
|
|
5849
|
+
return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
|
|
5850
|
+
}
|
|
5851
|
+
function Ma(e) {
|
|
5852
|
+
let t = Aa(e);
|
|
5853
|
+
if (!t) return Oa;
|
|
5854
|
+
let n = ja(t), r = ja(Aa(ka)), i = 1.05 / (n + .05);
|
|
5855
|
+
return (n + .05) / (r + .05) > i ? ka : Oa;
|
|
5856
|
+
}
|
|
5817
5857
|
// ../../packages/widget-ui/src/theme/styles.ts
|
|
5818
|
-
var Oa = "\n*, *::before, *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n:host {\n /* Neutral and status defaults are copied from packages/design-tokens/tokens.css (light\n :root / dark .dark) — the widget is CDN-bundled, so they stay literals here.\n __tests__/design-token-parity.test.ts fails when the two drift. */\n --ak-accent: #4f46e5; /* --primary (white text 6.3:1) */\n --ak-accent-hover: #4338ca; /* --primary-hover */\n --ak-bg: #ffffff; /* --surface */\n --ak-surface: #f7f8fa; /* --bg */\n --ak-text: #0e1220; /* --fg */\n --ak-text-muted: #525c70; /* --fg-muted */\n --ak-border: #e3e6ec; /* --border */\n --ak-border-strong: #818a9d; /* --border-strong */\n --ak-hover: rgb(14 18 32 / 0.04); /* --hover */\n --ak-user-bg: var(--ak-accent);\n --ak-user-text: #ffffff;\n --ak-bot-bg: #eef0f4; /* --surface-muted */\n --ak-bot-text: #0e1220; /* --fg */\n --ak-success: #0a9466; /* --success */\n --ak-warning: #d98a0b; /* --warning */\n --ak-warning-fg: #8a4b06; /* --warning-fg */\n --ak-warning-soft: #fdf3e2; /* --warning-soft */\n --ak-danger: #c4302b; /* --danger */\n --ak-danger-fg: #b4232b; /* --danger-fg */\n --ak-danger-soft: #fdeced; /* --danger-soft */\n --ak-danger-border: color-mix(in srgb, var(--ak-danger) 35%, transparent);\n --ak-maintenance-fg: var(--ak-warning-fg);\n --ak-maintenance-bg: var(--ak-warning-soft);\n --ak-maintenance-halo: var(--ak-warning);\n --ak-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --ak-radius: 12px;\n /* Chat surface texture — scattered line doodles, tiled. Neutral stroke (not accent-tinted)\n so it stays a texture rather than competing with brand colour. Alpha is baked into the\n SVG stroke, so the light/dark variants differ only in stroke rgba. */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(0,0,0,0.045)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-pattern-size: 210px;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);\n --ak-launcher-size: 56px;\n /* Panel-to-launcher offset. Negative pulls the launcher up toward the panel.\n Applied as a margin on .ak-shell-wrap because CSS gap rejects negatives. */\n --ak-launcher-gap: -12px;\n font-family: var(--ak-font);\n -webkit-font-smoothing: antialiased;\n}\n\n/* Dark mode — set data-theme=\"dark\" on the shadow host element.\n Values from tokens.css .dark (see the :host note above). */\n:host([data-theme=\"dark\"]) {\n --ak-bg: #111521; /* --surface — panel */\n --ak-surface: #171c2a; /* --surface-raised — inputs, insets lift off the panel */\n --ak-text: #eef0f6; /* --fg */\n --ak-text-muted: #a3acbd; /* --fg-muted */\n --ak-border: #232a3a; /* --border */\n --ak-border-strong: #5f687c; /* --border-strong */\n --ak-hover: rgb(255 255 255 / 0.05); /* --hover */\n --ak-bot-bg: #20263a; /* --surface-muted — assistant bubble */\n --ak-bot-text: #eef0f6; /* --fg */\n --ak-success: #2fbf87;\n --ak-warning: #e5a43a;\n --ak-warning-fg: #f2bd5c;\n --ak-warning-soft: #2c2110;\n --ak-danger: #d93a3f;\n --ak-danger-fg: #ff8a8f;\n --ak-danger-soft: #331417;\n /* Same doodle tile, white stroke — dark surfaces need ~1.5x the alpha to read the same */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);\n}\n\n/* ── Floating layout ─────────────────────────────────────────── */\n.ak-floating {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 0;\n pointer-events: none;\n}\n.ak-floating > * {\n pointer-events: all;\n}\n\n/* ── Inline layout ───────────────────────────────────────────── */\n.ak-inline {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n}\n\n/* ── Launcher button ─────────────────────────────────────────── */\n.ak-launcher {\n width: var(--ak-launcher-size);\n height: var(--ak-launcher-size);\n border-radius: 50%;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n box-shadow: 0 4px 16px color-mix(in srgb, var(--ak-accent) 45%, transparent);\n transition: background 0.2s, transform 0.15s, box-shadow 0.2s;\n flex-shrink: 0;\n}\n.ak-launcher:hover {\n background: var(--ak-accent-hover);\n transform: scale(1.08);\n box-shadow: 0 6px 24px color-mix(in srgb, var(--ak-accent) 55%, transparent);\n}\n.ak-launcher:active {\n transform: scale(0.95);\n}\n.ak-launcher svg {\n pointer-events: none;\n}\n/* Launcher showing avatar image instead of chat icon */\n.ak-launcher--avatar {\n padding: 0;\n overflow: hidden;\n}\n.ak-launcher__avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n pointer-events: none;\n}\n\n/* ── Shell wrapper (positions the hanging branding tab) ─────── */\n.ak-shell-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: var(--ak-launcher-gap);\n}\n\n/* ── Widget shell / panel ────────────────────────────────────── */\n.ak-shell {\n background: var(--ak-bg);\n border-radius: var(--ak-radius);\n box-shadow: var(--ak-shadow);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n}\n.ak-shell--floating {\n width: 380px;\n height: 580px;\n}\n.ak-shell--inline {\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n display: flex;\n flex-direction: column;\n}\n/* Inline shell-wrap fills its container and suppresses the duplicate widget header\n (the sidebar already renders its own header and close button). */\n.ak-inline .ak-shell-wrap {\n width: 100%;\n height: 100%;\n /* No launcher in inline mode — the negative offset would overflow the host. */\n margin-bottom: 0;\n}\n.ak-inline .ak-header {\n display: none;\n}\n.ak-shell-enter {\n animation: ak-panel-in 0.2s ease-out;\n}\n@keyframes ak-panel-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Header ──────────────────────────────────────────────────── */\n.ak-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--ak-accent);\n color: #fff;\n flex-shrink: 0;\n gap: 8px;\n}\n.ak-header--confirming {\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 0;\n}\n.ak-header__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n}\n.ak-header__status {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n /* Not --ak-success: this dot sits on the accent fill, where the token green is too dark. */\n background: #4ade80;\n flex-shrink: 0;\n}\n.ak-header__title-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n}\n.ak-header__title {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.ak-header__subtitle {\n font-size: 11px;\n font-weight: 400;\n opacity: 0.8;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ak-header__close {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__close:hover {\n background: rgba(255, 255, 255, 0.35);\n}\n.ak-header__avatar {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n border: 2px solid rgba(255, 255, 255, 0.3);\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__bot-icon {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n flex-shrink: 0;\n}\n.ak-header__button {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__button:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__button--active {\n background: rgba(255, 255, 255, 0.3);\n}\n.ak-header__confirm {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 0 0;\n margin: 8px 0 0;\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n animation: ak-confirm-in 0.18s ease-out;\n}\n@keyframes ak-confirm-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-header__confirm-text {\n display: flex;\n flex-direction: column;\n gap: 1px;\n flex: 1;\n min-width: 0;\n}\n.ak-header__confirm-title {\n font-size: 13px;\n font-weight: 600;\n color: #fff;\n line-height: 1.3;\n}\n.ak-header__confirm-sub {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.75);\n line-height: 1.3;\n}\n.ak-header__confirm-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n.ak-header__confirm-cancel {\n padding: 5px 10px;\n border-radius: 6px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n background: transparent;\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-cancel:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__confirm-cancel:active {\n background: rgba(255, 255, 255, 0.25);\n}\n.ak-header__confirm-ok {\n padding: 5px 10px;\n border-radius: 6px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-ok:hover {\n background: rgba(239, 68, 68, 0.7);\n}\n.ak-header__confirm-ok:active {\n background: rgba(239, 68, 68, 0.85);\n}\n\n/* ── Message list ────────────────────────────────────────────── */\n.ak-messages {\n flex: 1;\n overflow-y: auto;\n padding: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n scroll-behavior: smooth;\n min-height: 0; /* Allow flex child to shrink below its content height */\n /* Faint doodle texture so bubbles read as objects on a surface, not floating on flat colour.\n background-attachment defaults to scroll = anchored to the padding box, so the\n pattern stays put while messages scroll. */\n background-image: var(--ak-pattern);\n background-size: var(--ak-pattern-size) var(--ak-pattern-size);\n}\n.ak-messages::-webkit-scrollbar { width: 4px; }\n.ak-messages::-webkit-scrollbar-track { background: transparent; }\n.ak-messages::-webkit-scrollbar-thumb {\n background: var(--ak-border);\n border-radius: 4px;\n}\n\n/* ── Empty state ─────────────────────────────────────────────── */\n.ak-empty-state {\n flex: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: safe center;\n padding: 16px;\n text-align: center;\n gap: 16px;\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0;\n /* Glow layer is translucent so the same doodle texture as .ak-messages shows through —\n keeps empty state and message list on one continuous surface. */\n background-color: var(--ak-bg);\n background-image:\n radial-gradient(ellipse 110% 55% at 50% 0%,\n color-mix(in srgb, var(--ak-accent) 10%, transparent),\n transparent 72%\n ),\n var(--ak-pattern);\n background-size: auto, var(--ak-pattern-size) var(--ak-pattern-size);\n}\n/* Decorative blurred orb behind the avatar */\n.ak-empty-state__glow {\n position: absolute;\n top: -24px;\n left: 50%;\n transform: translateX(-50%);\n width: 180px;\n height: 180px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--ak-accent) 18%, transparent);\n filter: blur(48px);\n pointer-events: none;\n}\n.ak-empty-state__body {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n position: relative;\n width: 100%;\n}\n.ak-empty-state__avatar {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n background: var(--ak-bg);\n border: 2px solid color-mix(in srgb, var(--ak-accent) 25%, var(--ak-border));\n box-shadow:\n 0 0 0 4px color-mix(in srgb, var(--ak-accent) 10%, transparent),\n 0 4px 16px color-mix(in srgb, var(--ak-accent) 20%, transparent);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-accent);\n margin-bottom: 4px;\n flex-shrink: 0;\n}\n.ak-empty-state__avatar-img {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n object-fit: cover;\n}\n.ak-empty-state__bot-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ak-empty-state__title {\n margin: 0;\n font-size: 16px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-empty-state__description {\n margin: 0;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.55;\n width: 100%;\n}\n/* Suggested question chips — 2-column grid */\n.ak-empty-state__suggestions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n width: 100%;\n}\n.ak-empty-state__suggestion {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: color-mix(in srgb, var(--ak-accent) 5%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 16%, var(--ak-border));\n border-radius: 10px;\n padding: 10px 12px;\n cursor: pointer;\n text-align: left;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n/* Odd last item spans both columns so the grid doesn't look lopsided */\n.ak-empty-state__suggestion:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n}\n.ak-empty-state__suggestion:hover {\n background: color-mix(in srgb, var(--ak-accent) 10%, var(--ak-bg));\n border-color: color-mix(in srgb, var(--ak-accent) 30%, var(--ak-border));\n}\n.ak-empty-state__suggestion-title {\n font-size: 13px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.4;\n}\n.ak-empty-state__suggestion-desc {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n margin-top: 2px;\n}\n\n/* ── Message bubbles ─────────────────────────────────────────── */\n.ak-message {\n display: flex;\n flex-direction: column;\n max-width: 86%;\n animation: ak-msg-in 0.15s ease-out;\n}\n@keyframes ak-msg-in {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-message--user {\n align-self: flex-end;\n align-items: flex-end;\n}\n.ak-message--assistant {\n align-self: flex-start;\n align-items: flex-start;\n}\n.ak-message__bubble {\n padding: 8px 12px;\n border-radius: 16px;\n font-size: 14px;\n line-height: 1.55;\n word-break: break-word;\n white-space: pre-wrap;\n max-width: 100%;\n min-width: 0;\n}\n.ak-message__bubble--md {\n white-space: normal;\n}\n.ak-message--user .ak-message__bubble {\n background: var(--ak-user-bg);\n color: var(--ak-user-text);\n border-bottom-right-radius: 4px;\n}\n.ak-message--assistant .ak-message__bubble {\n background: var(--ak-bot-bg);\n color: var(--ak-bot-text);\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n}\n.ak-message--error .ak-message__bubble {\n background: var(--ak-danger-soft);\n color: var(--ak-danger-fg);\n border-color: var(--ak-danger-border);\n}\n.ak-message--operator .ak-message__bubble--operator {\n background: color-mix(in srgb, var(--ak-accent) 8%, var(--ak-bot-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 22%, var(--ak-border));\n}\n.ak-message__time {\n display: block;\n text-align: right;\n font-size: 11px;\n color: var(--ak-text-muted);\n margin-top: 2px;\n padding: 0 4px;\n}\n.ak-message--user .ak-message__time {\n color: rgba(255, 255, 255, 0.7);\n}\n.ak-message__sender-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--ak-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0 2px;\n margin-bottom: 4px;\n}\n.ak-message--operator .ak-message__sender-label {\n color: var(--ak-accent);\n font-weight: 600;\n}\n.ak-message__operator-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--ak-accent);\n color: #fff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n flex-shrink: 0;\n}\n.ak-message__operator-name {\n line-height: 1;\n}\n.ak-handoff-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 4px;\n color: var(--ak-text-muted);\n font-size: 11px;\n font-weight: 500;\n}\n.ak-handoff-divider::before,\n.ak-handoff-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--ak-border);\n}\n.ak-handoff-divider__label {\n white-space: nowrap;\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--ak-accent) 6%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n color: color-mix(in srgb, var(--ak-accent) 70%, var(--ak-text));\n}\n/* ── Message avatar (assistant only, when avatarUrl is set) ─── */\n.ak-message--with-avatar {\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n}\n.ak-message__avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n background: var(--ak-surface);\n}\n.ak-message__body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-width: 0;\n}\n\n/* ── Generated images ────────────────────────────────────────── */\n\n/* Bubble that contains an image — remove padding so image is flush at top */\n.ak-message__bubble--has-image {\n padding: 0;\n overflow: hidden;\n}\n\n.ak-message__images {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.ak-message__image-wrap {\n position: relative;\n line-height: 0;\n}\n\n/* Clicking the image opens it in a new tab */\n.ak-message__image-link {\n display: block;\n line-height: 0;\n}\n\n.ak-message__image {\n width: 100%;\n display: block;\n transition: filter 0.2s;\n}\n\n.ak-message__image-link:hover .ak-message__image {\n filter: brightness(0.93);\n}\n\n/* ── Image gallery (count-aware layouts) ───────────────────────────────── */\n.ak-gallery {\n position: relative;\n width: 100%;\n background: var(--ak-bg);\n overflow: hidden;\n}\n\n/* Single hero: natural aspect, contained inside a white frame so transparent\n * product PNGs read clearly. Caps at 320px tall to keep bubble compact. */\n.ak-gallery--single {\n line-height: 0;\n}\n.ak-gallery--single .ak-gallery__cell--hero {\n display: block;\n background: var(--ak-bg);\n}\n.ak-gallery__img--contain {\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n background: var(--ak-bg);\n display: block;\n}\n\n/* 2-up: side-by-side squares, gap-1 */\n.ak-gallery--two {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n}\n\n/* 3-up: big left + 2 stacked right; container holds aspect */\n.ak-gallery--three {\n display: grid;\n grid-template-columns: 2fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n aspect-ratio: 4 / 3;\n}\n.ak-gallery--three > .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n}\n.ak-gallery--three .ak-gallery__col {\n display: grid;\n grid-template-rows: 1fr 1fr;\n gap: 2px;\n}\n\n/* 4-up (and 5+): 2x2 grid */\n.ak-gallery--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n}\n\n.ak-gallery__cell {\n position: relative;\n display: block;\n overflow: hidden;\n background: var(--ak-surface);\n aspect-ratio: 1 / 1;\n line-height: 0;\n text-decoration: none;\n}\n\n/* Override aspect-ratio for the 3-up layout's column cells (they take parent height) */\n.ak-gallery--three .ak-gallery__col .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n width: 100%;\n}\n\n.ak-gallery__img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n transition: transform 0.2s ease-out, filter 0.2s;\n}\n\n.ak-gallery__cell:hover .ak-gallery__img {\n transform: scale(1.04);\n filter: brightness(0.97);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: -2px;\n}\n\n.ak-gallery__overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(15, 23, 42, 0.6);\n color: #ffffff;\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.01em;\n pointer-events: none;\n}\n\n/* ── File chips (user-uploaded .pdf/.md/.txt/.csv) ─────────────────────── */\n.ak-message__files {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px 4px;\n}\n.ak-message__bubble--has-image .ak-message__files {\n padding: 8px 8px 4px;\n}\n\n.ak-file-chip {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n text-decoration: none;\n color: var(--ak-text);\n transition: border-color 0.15s, box-shadow 0.15s;\n max-width: 100%;\n}\n\n.ak-file-chip:hover {\n border-color: var(--ak-border-strong);\n box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);\n}\n\n.ak-file-chip:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n\n.ak-file-chip__icon {\n flex-shrink: 0;\n width: 34px;\n height: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n\n.ak-file-chip__icon--pdf { background: #fff1f2; color: #e11d48; }\n.ak-file-chip__icon--csv { background: #ecfdf5; color: #059669; }\n.ak-file-chip__icon--md { background: #f5f3ff; color: #7c3aed; }\n.ak-file-chip__icon--txt { background: #f1f5f9; color: #475569; }\n.ak-file-chip__icon--default { background: #eef2ff; color: #4f46e5; }\n\n.ak-file-chip__body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1.2;\n}\n\n.ak-file-chip__name {\n font-size: 13px;\n font-weight: 500;\n color: var(--ak-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 220px;\n}\n\n.ak-file-chip__label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n color: var(--ak-text-muted);\n margin-top: 2px;\n}\n\n/* In user-side bubble (dark primary background), invert chip surface for legibility */\n.ak-message--user .ak-file-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n/* ── Voice note player (audio attachment) ──────────────────────────────── */\n.ak-audio-chip {\n display: inline-flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n max-width: 100%;\n}\n\n.ak-message--user .ak-audio-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n.ak-audio-chip__player {\n height: 36px;\n max-width: 260px;\n}\n\n.ak-audio-chip__transcript {\n margin: 0;\n font-size: 12px;\n font-style: italic;\n line-height: 1.4;\n color: var(--ak-text-muted);\n}\n\n/* ── Lightbox (image preview modal) ────────────────────────────────────── */\n.ak-lightbox {\n position: fixed;\n inset: 0;\n z-index: 2147483600; /* near max int — sits above any host-page content */\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: rgba(15, 23, 42, 0.85);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n animation: ak-lightbox-in 0.12s ease-out;\n}\n\n@keyframes ak-lightbox-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.ak-lightbox__img {\n max-width: 92vw;\n max-height: 88vh;\n border-radius: 8px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);\n user-select: none;\n display: block;\n}\n\n.ak-lightbox__toolbar {\n position: absolute;\n top: 16px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ak-lightbox__counter {\n display: inline-flex;\n align-items: center;\n height: 28px;\n padding: 0 12px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n font-size: 12px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n\n.ak-lightbox__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n text-decoration: none;\n padding: 0;\n}\n\n.ak-lightbox__btn:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__btn:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n.ak-lightbox__nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n padding: 0;\n}\n\n.ak-lightbox__nav:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__nav--prev { left: 16px; }\n.ak-lightbox__nav--next { right: 16px; }\n\n.ak-lightbox__nav:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n/* Gallery cells must be styled as plain buttons (we converted from <a>) */\n.ak-gallery__cell {\n border: none;\n padding: 0;\n margin: 0;\n cursor: zoom-in;\n font: inherit;\n color: inherit;\n background: var(--ak-surface);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: -2px;\n}\n\n/* Faint download icon — always present, top-right corner of the image */\n.ak-message__image-dl-icon {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 26px;\n height: 26px;\n background: rgba(0, 0, 0, 0.28);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.75);\n text-decoration: none;\n transition: background 0.15s, color 0.15s;\n}\n\n.ak-message__image-dl-icon:hover {\n background: rgba(0, 0, 0, 0.55);\n color: #ffffff;\n}\n\n/* Caption / text below the image, inside the same bubble */\n.ak-message__image-caption {\n padding: 8px 10px 8px;\n font-size: 14px;\n font-style: normal;\n color: var(--ak-text);\n line-height: 1.45;\n}\n\n/* User-uploaded image caption uses user bubble colors */\n.ak-message--user .ak-message__image-caption {\n color: rgba(255, 255, 255, 0.8);\n font-style: normal;\n}\n\n/* ── Typing indicator ────────────────────────────────────────── */\n.ak-typing {\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 9px 12px;\n background: var(--ak-bot-bg);\n border-radius: 16px;\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n align-self: flex-start;\n width: fit-content;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing__dot {\n width: 7px;\n height: 7px;\n background: var(--ak-text-muted);\n border-radius: 50%;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing__dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes ak-bounce {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }\n 30% { transform: translateY(-5px); opacity: 1; }\n}\n\n/* ── Init status (validating / error) ───────────────────────── */\n.ak-init-status {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n.ak-init-spinner {\n width: 28px;\n height: 28px;\n border: 3px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n animation: ak-spin 0.7s linear infinite;\n}\n@keyframes ak-spin {\n to { transform: rotate(360deg); }\n}\n.ak-init-status--error {\n justify-content: flex-start;\n}\n.ak-init-status--maintenance {\n padding: 28px 24px;\n}\n\n/* ── Composer ────────────────────────────────────────────────── */\n.ak-composer {\n position: relative; /* establishes positioning context for the attachment submenu */\n padding: 8px 12px 10px;\n border-top: 1px solid var(--ak-border);\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--ak-bg);\n flex-shrink: 0;\n}\n\n/* Hidden native file input */\n.ak-composer__file-input {\n display: none;\n}\n\n/* Composer card — the dashboard ChatComposer layout: the message row (text, mic at its\n right edge) over a divider and a toolbar (+ … send), both on the same side padding.\n The + and mic glyphs (20px in a 32px box) are pulled flush with the text edges. */\n.ak-composer__input-wrap {\n display: flex;\n flex-direction: column;\n background: var(--ak-bg);\n border: 1px solid color-mix(in srgb, var(--ak-border-strong) 40%, transparent);\n border-radius: 16px;\n box-shadow: 0 1px 3px rgba(14, 18, 32, 0.06), 0 1px 2px rgba(14, 18, 32, 0.04);\n transition: border-color 0.15s;\n}\n.ak-composer__input-wrap:focus-within {\n border-color: var(--ak-accent);\n}\n.ak-composer__row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px 8px;\n}\n.ak-composer__toolbar {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n border-top: 1px solid var(--ak-border);\n}\n\n/* Attach button wrapper */\n.ak-composer__attach-wrap {\n flex-shrink: 0;\n margin-left: -6px;\n}\n\n/* Icon controls (\"+\" and mic): borderless, a hover fill rather than an outline */\n.ak-composer__attach,\n.ak-composer__mic {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__attach:hover:not(:disabled),\n.ak-composer__mic:hover:not(:disabled),\n.ak-composer__attach--open {\n color: var(--ak-text);\n background: var(--ak-hover);\n}\n.ak-composer__attach:focus-visible,\n.ak-composer__mic:focus-visible,\n.ak-composer__send:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n.ak-composer__attach:disabled,\n.ak-composer__mic:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n/* Flush right, and -4px vertically so the 32px box doesn't grow the 24px text row */\n.ak-composer__mic {\n margin: -4px -6px -4px 0;\n}\n\n/* Attachment submenu — floats above the composer, positioned relative to .ak-composer */\n.ak-composer__attach-menu {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 12px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 10px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n padding: 4px;\n min-width: 130px;\n z-index: 10;\n}\n\n/* Individual item inside the attachment submenu */\n.ak-composer__attach-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n cursor: pointer;\n transition: background 0.12s;\n text-align: left;\n}\n.ak-composer__attach-menu-item:hover:not(:disabled) {\n background: var(--ak-bg);\n}\n.ak-composer__attach-menu-item:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Textarea — borderless, transparent, fills the message row */\n.ak-composer__input {\n flex: 1;\n padding: 0;\n border: none;\n border-radius: 0;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 16px; /* iOS zooms the page when a focused input is under 16px */\n line-height: 1.5;\n resize: none;\n outline: none;\n min-height: 24px;\n max-height: 110px;\n overflow-y: auto;\n}\n.ak-composer__input::placeholder {\n color: var(--ak-text-muted);\n}\n\n/* Recording bar — replaces the input row while a voice note is being recorded */\n.ak-composer__recording {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n padding: 8px 12px;\n}\n.ak-composer__recording-timer {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n}\n.ak-composer__recording-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--ak-danger);\n animation: ak-recording-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ak-recording-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.35;\n }\n}\n.ak-composer__recording-cancel,\n.ak-composer__recording-stop {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.15s, color 0.15s;\n}\n.ak-composer__recording-cancel {\n background: transparent;\n color: var(--ak-text-muted);\n}\n.ak-composer__recording-cancel:hover {\n color: var(--ak-text);\n background: var(--ak-hover);\n}\n.ak-composer__recording-stop {\n background: var(--ak-accent);\n color: white;\n}\n.ak-composer__recording-stop:hover {\n background: var(--ak-accent-hover);\n}\n\n/* Send button — rounded square at the toolbar's right end */\n.ak-composer__send {\n width: 32px;\n height: 32px;\n margin-left: auto;\n border-radius: 8px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__send:hover:not(:disabled) {\n background: var(--ak-accent-hover);\n}\n/* Disabled sits on the muted fill rather than a faded accent, so it stays visible on dark */\n.ak-composer__send:disabled {\n background: var(--ak-bot-bg);\n color: var(--ak-text-muted);\n cursor: not-allowed;\n}\n\n/* Old photo button — hidden but keep so file-input trigger still works */\n.ak-composer__photo {\n display: none;\n}\n\n/* Image preview strip above the input row */\n.ak-composer__preview {\n display: flex;\n gap: 6px;\n padding: 0 2px;\n}\n.ak-composer__preview-wrap {\n position: relative;\n width: 60px;\n height: 60px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n flex-shrink: 0;\n}\n.ak-composer__preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n.ak-composer__preview-remove {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.55);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n padding: 0;\n transition: background 0.15s;\n}\n.ak-composer__preview-remove:hover {\n background: rgba(0, 0, 0, 0.8);\n}\n\n/* ── Streaming cursor ────────────────────────────────────────── */\n.ak-cursor {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n margin-left: 4px;\n vertical-align: middle;\n}\n.ak-cursor__dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-cursor__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-cursor__dot:nth-child(3) { animation-delay: 0.4s; }\n\n/* Pre-first-chunk wait — deliberately shares the metrics of .ak-progress__item\n and .ak-progress__summary so dots → activity line → summary never reflow. */\n.ak-typing-row {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* One text line at the shared row metrics, so the dots occupy exactly the\n box the activity line and summary will occupy (border-box). */\n min-height: calc(0.76rem * 1.4 + 4px);\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing-row__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--ak-bot-text);\n opacity: 0.5;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing-row__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing-row__dot:nth-child(3) { animation-delay: 0.4s; }\n@media (prefers-reduced-motion: reduce) {\n .ak-typing-row__dot,\n .ak-cursor__dot,\n .ak-typing__dot,\n .ak-progress__item--active,\n .ak-agent-status__icon {\n animation: none;\n }\n}\n\n/* ── Markdown rendering ──────────────────────────────────────── */\n.ak-message__bubble--md {\n white-space: normal;\n min-width: 0;\n}\n.ak-message__bubble--md .ak-md-p {\n margin: 0 0 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-p:last-child {\n margin-bottom: 0;\n}\n/* Collapse margins between paragraph and following list */\n.ak-message__bubble--md .ak-md-p + .ak-md-ul,\n.ak-message__bubble--md .ak-md-p + .ak-md-ol {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1,\n.ak-message__bubble--md .ak-md-h2,\n.ak-message__bubble--md .ak-md-h3 {\n font-weight: 700;\n line-height: 1.3;\n margin: 0.6em 0 0.3em;\n}\n.ak-message__bubble--md .ak-md-h1:first-child,\n.ak-message__bubble--md .ak-md-h2:first-child,\n.ak-message__bubble--md .ak-md-h3:first-child {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1 { font-size: 1.12em; }\n.ak-message__bubble--md .ak-md-h2 { font-size: 1.04em; }\n.ak-message__bubble--md .ak-md-h3 { font-size: 0.97em; }\n.ak-message__bubble--md .ak-md-ul,\n.ak-message__bubble--md .ak-md-ol {\n padding-left: 1.4em;\n margin: 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-ul li,\n.ak-message__bubble--md .ak-md-ol li {\n margin-bottom: 0.15em;\n}\n.ak-message__bubble--md .ak-md-pre-wrap {\n position: relative;\n margin: 0.4em 0;\n border-radius: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgba(0, 0, 0, 0.08);\n max-width: 100%;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-wrap {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre-lang {\n display: block;\n padding: 3px 10px;\n font-size: 10px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n opacity: 0.55;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-lang {\n border-bottom-color: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre {\n margin: 0;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n white-space: pre;\n box-sizing: border-box;\n}\n.ak-message__bubble--md .ak-md-code {\n display: block;\n font-family: inherit;\n font-size: inherit;\n}\n.ak-message__bubble--md .ak-md-ic {\n background: rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1px 5px;\n font-size: 0.87em;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-ic {\n background: rgba(255, 255, 255, 0.2);\n}\n.ak-message__bubble--md .ak-md-hr {\n border: none;\n border-top: 1px solid currentColor;\n opacity: 0.2;\n margin: 0.5em 0;\n}\n.ak-message__bubble--md a {\n color: var(--ak-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-message--user .ak-message__bubble--md a {\n color: rgba(255, 255, 255, 0.9);\n}\n.ak-message__bubble--md .ak-md-table {\n width: 100%;\n border-collapse: collapse;\n margin: 0.4em 0;\n font-size: 0.95em;\n line-height: 1.5;\n}\n.ak-message__bubble--md .ak-md-th {\n padding: 8px 10px;\n text-align: left;\n border-bottom: 2px solid var(--ak-accent) !important;\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent) !important;\n font-weight: 600;\n color: var(--ak-text) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-th {\n border-bottom-color: rgba(255, 255, 255, 0.5) !important;\n background: rgba(0, 0, 0, 0.25) !important;\n color: #ffffff !important;\n font-weight: 700;\n}\n.ak-message__bubble--md .ak-md-td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--ak-border) !important;\n color: var(--ak-text) !important;\n}\n.ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: color-mix(in srgb, var(--ak-surface), transparent 40%) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-td {\n color: #ffffff !important;\n border-bottom-color: rgba(255, 255, 255, 0.25) !important;\n}\n.ak-message--user .ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: rgba(0, 0, 0, 0.15) !important;\n}\n\n/* ── Composer disclaimer ─────────────────────────────────────── */\n.ak-composer__disclaimer {\n font-size: 11px;\n color: var(--ak-text-muted);\n text-align: center;\n line-height: 1.4;\n}\n.ak-composer__disclaimer a {\n color: var(--ak-text-muted);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-composer__disclaimer a:hover {\n color: var(--ak-accent);\n}\n\n/* ── Maintenance state ───────────────────────────────────────── */\n.ak-maintenance {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 320px;\n padding: 8px 4px;\n animation: ak-maintenance-enter 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;\n}\n.ak-maintenance__halo {\n position: absolute;\n top: -6px;\n left: 50%;\n width: 120px;\n height: 120px;\n transform: translateX(-50%);\n border-radius: 50%;\n background: radial-gradient(\n closest-side,\n var(--ak-maintenance-halo) 0%,\n transparent 72%\n );\n opacity: 0.22;\n filter: blur(4px);\n pointer-events: none;\n animation: ak-maintenance-pulse 2.8s ease-in-out infinite;\n}\n.ak-maintenance__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--ak-maintenance-bg);\n color: var(--ak-maintenance-fg);\n border: 1px solid color-mix(in srgb, var(--ak-maintenance-halo) 40%, transparent);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n}\n.ak-maintenance__title {\n margin-top: 16px;\n font-size: 15px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-maintenance__description {\n margin-top: 6px;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.5;\n max-width: 28ch;\n}\n\n@keyframes ak-maintenance-enter {\n from {\n opacity: 0;\n transform: translateY(6px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ak-maintenance-pulse {\n 0%, 100% { opacity: 0.18; transform: translateX(-50%) scale(1); }\n 50% { opacity: 0.32; transform: translateX(-50%) scale(1.06); }\n}\n@media (prefers-reduced-motion: reduce) {\n .ak-maintenance,\n .ak-maintenance__halo,\n .ak-maintenance__icon {\n animation: none;\n }\n}\n\n/* ── Error banner ────────────────────────────────────────────── */\n.ak-error {\n padding: 12px 16px;\n background: var(--ak-danger-soft);\n color: var(--ak-danger-fg);\n font-size: 13px;\n border-top: 1px solid var(--ak-danger-border);\n text-align: left;\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.ak-error__icon {\n font-size: 16px;\n line-height: 1;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.ak-error__content {\n flex: 1;\n}\n\n.ak-error__title {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.ak-error__description {\n font-size: 13px;\n margin: 0 0 4px 0;\n line-height: 1.4;\n opacity: 0.9;\n}\n\n.ak-error__message {\n font-size: 13px;\n margin: 0;\n line-height: 1.4;\n opacity: 0.85;\n}\n\n/* Specific styling for origin restriction errors */\n.ak-error--origin {\n background: var(--ak-warning-soft); /* warning, not danger: less alarming */\n color: var(--ak-warning-fg);\n border-top: 1px solid var(--ak-warning);\n}\n\n/* ── Agent status indicator ──────────────────────────────────── */\n/* Same bare row as .ak-progress__item / .ak-typing-row — activity-off tenants\n see the tool status swap in without the surrounding box changing size. */\n.ak-agent-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n padding: 2px 0;\n color: var(--ak-bot-text);\n font-size: 0.76rem;\n line-height: 1.4;\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-agent-status__icon {\n flex-shrink: 0;\n color: var(--ak-accent);\n animation: ak-sparkle-pulse 2.5s ease-in-out infinite;\n}\n.ak-agent-status__text {\n line-height: 1.4;\n}\n@keyframes ak-sparkle-pulse {\n 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }\n 50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }\n}\n\n/* ── Progress block (tool execution / streaming chain) ───────── */\n.ak-progress {\n margin-bottom: 4px;\n max-width: 80%;\n}\n.ak-progress__block {\n display: inline-flex;\n flex-direction: column;\n gap: 3px;\n padding: 6px 12px;\n border-radius: 14px;\n background: var(--ak-bot-bg);\n border: 1px solid var(--ak-border);\n font-size: 0.8rem;\n color: var(--ak-bot-text);\n opacity: 0.85;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ak-progress__label {\n font-weight: 600;\n font-size: 0.78rem;\n color: var(--ak-accent);\n}\n.ak-progress__toggle {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 7px;\n border: 1px solid var(--ak-border);\n border-radius: 8px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.72rem;\n cursor: pointer;\n opacity: 0.65;\n transition: opacity 0.15s;\n}\n.ak-progress__toggle:hover { opacity: 0.9; }\n.ak-progress__toggle--collapsed {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 10px;\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.78rem;\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 0.15s;\n margin-bottom: 4px;\n}\n.ak-progress__toggle--collapsed:hover { opacity: 0.85; }\n.ak-progress__text {\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n line-height: 1.4;\n margin: 0;\n}\n/* Active streaming state */\n.ak-progress__list {\n list-style: none;\n margin: 0 0 4px;\n padding: 0;\n}\n/* Bare row, not a pill — identical metrics to .ak-progress__summary so the\n live line and the post-turn \"Worked for Ns\" swap without a size change. */\n.ak-progress__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n line-height: 1.4;\n color: var(--ak-bot-text);\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__item--active {\n /* inherits base .ak-progress__item; subtle pulse to signal in-flight */\n animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;\n}\n@keyframes ak-active-pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n}\n/* Claude-style step list (detailed mode) */\n.ak-progress__steps {\n list-style: none;\n margin: 0 0 4px;\n padding: 2px 0;\n}\n.ak-progress__step {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n line-height: 1.4;\n}\n.ak-progress__step--active {\n opacity: 0.9;\n}\n.ak-progress__step-text {\n min-width: 0;\n}\n.ak-progress__step-dur {\n opacity: 0.65;\n flex-shrink: 0;\n}\n.ak-progress__step-icon {\n flex-shrink: 0;\n opacity: 0.55;\n}\n.ak-progress__step-icon--fail {\n color: var(--ak-danger);\n opacity: 0.9;\n}\n/* Post-turn summary row (\"Worked for Ns · N steps\") */\n.ak-progress__summary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* Shrink-to-fit as a column flex item would otherwise break \"Worked for 8.4s\"\n onto two lines, doubling the row height as the turn ends. */\n white-space: nowrap;\n border: none;\n background: transparent;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n cursor: pointer;\n transition: opacity 0.15s;\n}\n.ak-progress__summary:hover { opacity: 0.85; }\n.ak-progress__summary--static {\n cursor: default;\n}\n.ak-progress__summary--static:hover { opacity: 0.6; }\n.ak-progress__spinner {\n display: inline-block;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n flex-shrink: 0;\n animation: ak-spin 0.7s linear infinite;\n}\n\n/* ── Powered by hanging tab ──────────────────────────────────── */\n.ak-branding {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px 4px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-top: none;\n border-radius: 0 0 8px 8px;\n margin-left: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);\n}\n.ak-branding__logo {\n width: 11px;\n height: 11px;\n flex-shrink: 0;\n color: var(--ak-accent);\n opacity: 0.75;\n}\n.ak-branding__label {\n font-size: 9px;\n color: var(--ak-text-muted);\n opacity: 0.75;\n}\n.ak-branding__name {\n font-size: 9px;\n font-weight: 600;\n color: var(--ak-accent);\n opacity: 0.75;\n letter-spacing: -0.01em;\n}\n\n/* ── Mobile: full-viewport panel ─────────────────────────────── */\n@media (max-width: 639px) {\n @keyframes ak-panel-in-mobile {\n from { opacity: 0; transform: translateY(32px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.\n Give it its own fixed position so it fills the viewport independently,\n bypassing the outer container's bottom/right offsets. */\n :host([data-open]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n pointer-events: none;\n }\n\n :host([data-open]) .ak-floating {\n width: 100%;\n height: 100%;\n align-items: stretch;\n gap: 0;\n }\n\n :host([data-open]) .ak-shell-wrap {\n flex: 1;\n min-height: 0;\n width: 100%;\n align-items: stretch;\n /* Launcher is hidden here — the negative offset would leave a dead strip. */\n margin-bottom: 0;\n }\n\n :host([data-open]) .ak-shell--floating {\n width: 100%;\n flex: 1;\n height: auto;\n border-radius: 0;\n box-shadow: none;\n border-left: none;\n border-right: none;\n border-top: none;\n }\n\n :host([data-open]) .ak-launcher {\n display: none;\n }\n\n :host([data-open]) .ak-shell-enter {\n animation: ak-panel-in-mobile 0.22s ease-out;\n }\n\n :host([data-open]) .ak-branding {\n display: none;\n }\n}\n";
|
|
5858
|
+
var Na = "\n*, *::before, *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n:host {\n /* Neutral and status defaults are copied from packages/design-tokens/tokens.css (light\n :root / dark .dark) — the widget is CDN-bundled, so they stay literals here.\n __tests__/design-token-parity.test.ts fails when the two drift. */\n --ak-accent: #4f46e5; /* --primary (white text 6.3:1) */\n --ak-accent-hover: #4338ca; /* --primary-hover */\n --ak-bg: #ffffff; /* --surface */\n --ak-surface: #f7f8fa; /* --bg */\n --ak-text: #0e1220; /* --fg */\n --ak-text-muted: #525c70; /* --fg-muted */\n --ak-border: #e3e6ec; /* --border */\n --ak-border-strong: #818a9d; /* --border-strong */\n --ak-hover: rgb(14 18 32 / 0.04); /* --hover */\n --ak-user-bg: var(--ak-accent);\n --ak-on-accent: #ffffff; /* text/icons on the accent; tokens.ts picks white or ink per tenant accent */\n --ak-user-text: var(--ak-on-accent);\n --ak-bot-bg: #eef0f4; /* --surface-muted */\n --ak-bot-text: #0e1220; /* --fg */\n --ak-success: #0a9466; /* --success */\n --ak-warning: #d98a0b; /* --warning */\n --ak-warning-fg: #8a4b06; /* --warning-fg */\n --ak-warning-soft: #fdf3e2; /* --warning-soft */\n --ak-danger: #c4302b; /* --danger */\n --ak-danger-fg: #b4232b; /* --danger-fg */\n --ak-danger-soft: #fdeced; /* --danger-soft */\n --ak-danger-border: color-mix(in srgb, var(--ak-danger) 35%, transparent);\n --ak-maintenance-fg: var(--ak-warning-fg);\n --ak-maintenance-bg: var(--ak-warning-soft);\n --ak-maintenance-halo: var(--ak-warning);\n --ak-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --ak-radius: 12px;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);\n --ak-launcher-size: 56px;\n /* Panel-to-launcher offset. Negative pulls the launcher up toward the panel.\n Applied as a margin on .ak-shell-wrap because CSS gap rejects negatives. */\n --ak-launcher-gap: -12px;\n font-family: var(--ak-font);\n -webkit-font-smoothing: antialiased;\n}\n\n/* Dark mode — set data-theme=\"dark\" on the shadow host element.\n Values from tokens.css .dark (see the :host note above). */\n:host([data-theme=\"dark\"]) {\n --ak-bg: #111521; /* --surface — panel */\n --ak-surface: #171c2a; /* --surface-raised — inputs, insets lift off the panel */\n --ak-text: #eef0f6; /* --fg */\n --ak-text-muted: #a3acbd; /* --fg-muted */\n --ak-border: #232a3a; /* --border */\n --ak-border-strong: #5f687c; /* --border-strong */\n --ak-hover: rgb(255 255 255 / 0.05); /* --hover */\n --ak-bot-bg: #20263a; /* --surface-muted — assistant bubble */\n --ak-bot-text: #eef0f6; /* --fg */\n --ak-success: #2fbf87;\n --ak-warning: #e5a43a;\n --ak-warning-fg: #f2bd5c;\n --ak-warning-soft: #2c2110;\n --ak-danger: #d93a3f;\n --ak-danger-fg: #ff8a8f;\n --ak-danger-soft: #331417;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);\n}\n\n/* ── Floating layout ─────────────────────────────────────────── */\n.ak-floating {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 0;\n pointer-events: none;\n}\n.ak-floating > * {\n pointer-events: all;\n}\n\n/* ── Inline layout ───────────────────────────────────────────── */\n.ak-inline {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n}\n\n/* ── Launcher button ─────────────────────────────────────────── */\n/* Closed with a label it is a pill: face (or chat icon) + short text. Open, or with an\n empty label, it is a round button. */\n.ak-launcher {\n min-width: var(--ak-launcher-size);\n height: var(--ak-launcher-size);\n border-radius: 999px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n color: var(--ak-on-accent);\n font-family: var(--ak-font);\n box-shadow: 0 6px 20px color-mix(in srgb, var(--ak-accent) 35%, transparent);\n transition: background 0.2s, transform 0.15s, box-shadow 0.2s;\n flex-shrink: 0;\n}\n.ak-launcher:hover {\n background: var(--ak-accent-hover);\n transform: translateY(-1px);\n box-shadow: 0 8px 26px color-mix(in srgb, var(--ak-accent) 45%, transparent);\n}\n.ak-launcher:active {\n transform: scale(0.97);\n}\n.ak-launcher:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 3px;\n}\n.ak-launcher svg {\n pointer-events: none;\n}\n.ak-launcher--pill {\n padding: 0 22px 0 6px;\n}\n.ak-launcher__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: calc(var(--ak-launcher-size) - 12px);\n height: calc(var(--ak-launcher-size) - 12px);\n border-radius: 50%;\n}\n.ak-launcher--pill .ak-launcher__icon {\n background: color-mix(in srgb, var(--ak-on-accent) 18%, transparent);\n}\n.ak-launcher--pill .ak-launcher__icon svg {\n width: 20px;\n height: 20px;\n}\n.ak-launcher__label {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: -0.01em;\n white-space: nowrap;\n /* A 40-char label is ~340px; keep the pill inside a narrow phone viewport. */\n max-width: calc(100vw - 120px);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n/* Launcher showing avatar image instead of chat icon */\n.ak-launcher--avatar:not(.ak-launcher--pill) {\n padding: 0;\n overflow: hidden;\n}\n.ak-launcher__avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n pointer-events: none;\n}\n.ak-launcher--pill .ak-launcher__avatar-img {\n width: calc(var(--ak-launcher-size) - 12px);\n height: calc(var(--ak-launcher-size) - 12px);\n border: 2px solid rgba(255, 255, 255, 0.85);\n flex-shrink: 0;\n}\n\n/* ── Shell wrapper (positions the hanging branding tab) ─────── */\n.ak-shell-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: var(--ak-launcher-gap);\n}\n\n/* ── Widget shell / panel ────────────────────────────────────── */\n.ak-shell {\n background: var(--ak-bg);\n border-radius: var(--ak-radius);\n box-shadow: var(--ak-shadow);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n}\n.ak-shell--floating {\n width: 380px;\n height: 580px;\n}\n.ak-shell--inline {\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n display: flex;\n flex-direction: column;\n}\n/* Inline shell-wrap fills its container and suppresses the duplicate widget header\n (the sidebar already renders its own header and close button). */\n.ak-inline .ak-shell-wrap {\n width: 100%;\n height: 100%;\n /* No launcher in inline mode — the negative offset would overflow the host. */\n margin-bottom: 0;\n}\n.ak-inline .ak-header {\n display: none;\n}\n.ak-shell-enter {\n animation: ak-panel-in 0.2s ease-out;\n}\n@keyframes ak-panel-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Header ──────────────────────────────────────────────────── */\n/* A tinted greeting card: the agent's face, name and subtitle on a soft wash of the accent.\n Before the first message it is large; .ak-header--compact shrinks it to one row. */\n.ak-header {\n display: flex;\n flex-direction: column;\n padding: 20px 18px 18px;\n background: color-mix(in srgb, var(--ak-accent) 9%, var(--ak-bg));\n color: var(--ak-text);\n border-bottom: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n flex-shrink: 0;\n}\n.ak-header__row {\n display: flex;\n align-items: center;\n width: 100%;\n gap: 14px;\n}\n.ak-header__face {\n position: relative;\n width: 56px;\n height: 56px;\n flex-shrink: 0;\n}\n.ak-header__avatar,\n.ak-header__bot {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 3px solid var(--ak-bg);\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);\n}\n.ak-header__avatar {\n display: block;\n object-fit: cover;\n background: var(--ak-bg);\n}\n.ak-header__bot {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--ak-accent);\n color: var(--ak-on-accent);\n}\n/* Online dot, sitting on the face's lower edge */\n.ak-header__status {\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--ak-success);\n border: 2px solid var(--ak-bg);\n}\n.ak-header__title-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n.ak-header__title {\n font-size: 18px;\n font-weight: 700;\n line-height: 1.25;\n letter-spacing: -0.015em;\n}\n.ak-header__subtitle {\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n}\n.ak-header__actions {\n display: flex;\n align-items: center;\n gap: 4px;\n align-self: flex-start;\n margin: -6px -6px 0 0;\n}\n.ak-header__close,\n.ak-header__button {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.ak-header__close:hover,\n.ak-header__button:hover,\n.ak-header__button--active {\n background: color-mix(in srgb, var(--ak-text) 8%, transparent);\n color: var(--ak-text);\n}\n.ak-header__close:focus-visible,\n.ak-header__button:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 1px;\n}\n/* In conversation: one row, smaller face, single-line subtitle */\n.ak-header--compact {\n padding: 12px 14px;\n}\n.ak-header--compact .ak-header__row {\n gap: 10px;\n}\n.ak-header--compact .ak-header__face {\n width: 36px;\n height: 36px;\n}\n.ak-header--compact .ak-header__avatar,\n.ak-header--compact .ak-header__bot {\n border-width: 2px;\n box-shadow: none;\n}\n.ak-header--compact .ak-header__status {\n width: 10px;\n height: 10px;\n right: -1px;\n bottom: -1px;\n}\n.ak-header--compact .ak-header__title {\n font-size: 15px;\n font-weight: 600;\n}\n.ak-header--compact .ak-header__subtitle {\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ak-header--compact .ak-header__actions {\n align-self: center;\n margin: 0 -4px 0 0;\n}\n.ak-header__confirm {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 12px 0 0;\n margin: 12px 0 0;\n border-top: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n animation: ak-confirm-in 0.18s ease-out;\n}\n@keyframes ak-confirm-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-header__confirm-text {\n display: flex;\n flex-direction: column;\n gap: 1px;\n flex: 1;\n min-width: 0;\n}\n.ak-header__confirm-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n}\n.ak-header__confirm-sub {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.3;\n}\n.ak-header__confirm-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n.ak-header__confirm-cancel,\n.ak-header__confirm-ok {\n padding: 6px 12px;\n border-radius: 8px;\n font-family: var(--ak-font);\n font-size: 12px;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-cancel {\n border: 1px solid var(--ak-border);\n background: var(--ak-bg);\n color: var(--ak-text);\n font-weight: 500;\n}\n.ak-header__confirm-cancel:hover {\n background: var(--ak-surface);\n}\n.ak-header__confirm-ok {\n border: none;\n background: var(--ak-danger);\n color: #fff;\n font-weight: 600;\n}\n.ak-header__confirm-ok:hover {\n background: var(--ak-danger-fg);\n}\n\n/* ── Message list ────────────────────────────────────────────── */\n.ak-messages {\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n scroll-behavior: smooth;\n min-height: 0; /* Allow flex child to shrink below its content height */\n}\n.ak-messages::-webkit-scrollbar { width: 4px; }\n.ak-messages::-webkit-scrollbar-track { background: transparent; }\n.ak-messages::-webkit-scrollbar-thumb {\n background: var(--ak-border);\n border-radius: 4px;\n}\n\n/* ── Empty state ─────────────────────────────────────────────── */\n/* The header carries the face and name, so this is just the description and the\n suggested questions as quick-action tiles. */\n.ak-empty-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n padding: 18px 16px;\n gap: 14px;\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0;\n background: var(--ak-bg);\n}\n.ak-empty-state__description {\n margin: 0;\n font-size: 14px;\n color: var(--ak-text-muted);\n line-height: 1.55;\n}\n/* Quick actions — 2-column grid */\n.ak-empty-state__suggestions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n width: 100%;\n}\n.ak-empty-state__suggestion {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-radius: 14px;\n padding: 12px 14px;\n min-height: 64px;\n cursor: pointer;\n text-align: left;\n font-family: var(--ak-font);\n transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;\n}\n/* Odd last item spans both columns so the grid doesn't look lopsided */\n.ak-empty-state__suggestion:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n}\n.ak-empty-state__suggestion:hover {\n border-color: color-mix(in srgb, var(--ak-accent) 45%, var(--ak-border));\n box-shadow: 0 2px 10px color-mix(in srgb, var(--ak-accent) 12%, transparent);\n}\n.ak-empty-state__suggestion:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n.ak-empty-state__suggestion-title {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n font-size: 14px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.4;\n}\n.ak-empty-state__suggestion-title svg {\n flex-shrink: 0;\n margin-top: 3px;\n color: var(--ak-accent);\n}\n.ak-empty-state__suggestion-desc {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n margin-top: 4px;\n}\n\n/* ── Message bubbles ─────────────────────────────────────────── */\n.ak-message {\n display: flex;\n flex-direction: column;\n max-width: 86%;\n animation: ak-msg-in 0.15s ease-out;\n}\n@keyframes ak-msg-in {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-message--user {\n align-self: flex-end;\n align-items: flex-end;\n}\n.ak-message--assistant {\n align-self: flex-start;\n align-items: flex-start;\n}\n.ak-message__bubble {\n padding: 10px 14px;\n border-radius: 18px;\n font-size: 14px;\n line-height: 1.55;\n word-break: break-word;\n white-space: pre-wrap;\n max-width: 100%;\n min-width: 0;\n}\n.ak-message__bubble--md {\n white-space: normal;\n}\n.ak-message--user .ak-message__bubble {\n background: var(--ak-user-bg);\n color: var(--ak-user-text);\n border-bottom-right-radius: 6px;\n}\n.ak-message--assistant .ak-message__bubble {\n background: var(--ak-bot-bg);\n color: var(--ak-bot-text);\n border-bottom-left-radius: 6px;\n}\n.ak-message--error .ak-message__bubble {\n background: var(--ak-danger-soft);\n color: var(--ak-danger-fg);\n border-color: var(--ak-danger-border);\n}\n.ak-message--operator .ak-message__bubble--operator {\n background: color-mix(in srgb, var(--ak-accent) 8%, var(--ak-bot-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 22%, var(--ak-border));\n}\n.ak-message__time {\n display: block;\n text-align: right;\n font-size: 11px;\n color: var(--ak-text-muted);\n margin-top: 2px;\n padding: 0 4px;\n}\n.ak-message--user .ak-message__time {\n color: color-mix(in srgb, var(--ak-on-accent) 70%, transparent);\n}\n.ak-message__sender-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--ak-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0 2px;\n margin-bottom: 4px;\n}\n.ak-message--operator .ak-message__sender-label {\n color: var(--ak-accent);\n font-weight: 600;\n}\n.ak-message__operator-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--ak-accent);\n color: var(--ak-on-accent);\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n flex-shrink: 0;\n}\n.ak-message__operator-name {\n line-height: 1;\n}\n.ak-handoff-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 4px;\n color: var(--ak-text-muted);\n font-size: 11px;\n font-weight: 500;\n}\n.ak-handoff-divider::before,\n.ak-handoff-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--ak-border);\n}\n.ak-handoff-divider__label {\n white-space: nowrap;\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--ak-accent) 6%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n color: color-mix(in srgb, var(--ak-accent) 70%, var(--ak-text));\n}\n/* ── Message avatar (assistant only, when avatarUrl is set) ─── */\n.ak-message--with-avatar {\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n}\n.ak-message__avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n background: var(--ak-surface);\n}\n.ak-message__body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-width: 0;\n}\n\n/* ── Generated images ────────────────────────────────────────── */\n\n/* Bubble that contains an image — remove padding so image is flush at top */\n.ak-message__bubble--has-image {\n padding: 0;\n overflow: hidden;\n}\n\n.ak-message__images {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.ak-message__image-wrap {\n position: relative;\n line-height: 0;\n}\n\n/* Clicking the image opens it in a new tab */\n.ak-message__image-link {\n display: block;\n line-height: 0;\n}\n\n.ak-message__image {\n width: 100%;\n display: block;\n transition: filter 0.2s;\n}\n\n.ak-message__image-link:hover .ak-message__image {\n filter: brightness(0.93);\n}\n\n/* ── Image gallery (count-aware layouts) ───────────────────────────────── */\n.ak-gallery {\n position: relative;\n width: 100%;\n background: var(--ak-bg);\n overflow: hidden;\n}\n\n/* Single hero: natural aspect, contained inside a white frame so transparent\n * product PNGs read clearly. Caps at 320px tall to keep bubble compact. */\n.ak-gallery--single {\n line-height: 0;\n}\n.ak-gallery--single .ak-gallery__cell--hero {\n display: block;\n background: var(--ak-bg);\n}\n.ak-gallery__img--contain {\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n background: var(--ak-bg);\n display: block;\n}\n\n/* 2-up: side-by-side squares, gap-1 */\n.ak-gallery--two {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n}\n\n/* 3-up: big left + 2 stacked right; container holds aspect */\n.ak-gallery--three {\n display: grid;\n grid-template-columns: 2fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n aspect-ratio: 4 / 3;\n}\n.ak-gallery--three > .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n}\n.ak-gallery--three .ak-gallery__col {\n display: grid;\n grid-template-rows: 1fr 1fr;\n gap: 2px;\n}\n\n/* 4-up (and 5+): 2x2 grid */\n.ak-gallery--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n}\n\n.ak-gallery__cell {\n position: relative;\n display: block;\n overflow: hidden;\n background: var(--ak-surface);\n aspect-ratio: 1 / 1;\n line-height: 0;\n text-decoration: none;\n}\n\n/* Override aspect-ratio for the 3-up layout's column cells (they take parent height) */\n.ak-gallery--three .ak-gallery__col .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n width: 100%;\n}\n\n.ak-gallery__img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n transition: transform 0.2s ease-out, filter 0.2s;\n}\n\n.ak-gallery__cell:hover .ak-gallery__img {\n transform: scale(1.04);\n filter: brightness(0.97);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: -2px;\n}\n\n.ak-gallery__overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(15, 23, 42, 0.6);\n color: #ffffff;\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.01em;\n pointer-events: none;\n}\n\n/* ── File chips (user-uploaded .pdf/.md/.txt/.csv) ─────────────────────── */\n.ak-message__files {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px 4px;\n}\n.ak-message__bubble--has-image .ak-message__files {\n padding: 8px 8px 4px;\n}\n\n.ak-file-chip {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n text-decoration: none;\n color: var(--ak-text);\n transition: border-color 0.15s, box-shadow 0.15s;\n max-width: 100%;\n}\n\n.ak-file-chip:hover {\n border-color: var(--ak-border-strong);\n box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);\n}\n\n.ak-file-chip:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n\n.ak-file-chip__icon {\n flex-shrink: 0;\n width: 34px;\n height: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n\n.ak-file-chip__icon--pdf { background: #fff1f2; color: #e11d48; }\n.ak-file-chip__icon--csv { background: #ecfdf5; color: #059669; }\n.ak-file-chip__icon--md { background: #f5f3ff; color: #7c3aed; }\n.ak-file-chip__icon--txt { background: #f1f5f9; color: #475569; }\n.ak-file-chip__icon--default { background: #eef2ff; color: #4f46e5; }\n\n.ak-file-chip__body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1.2;\n}\n\n.ak-file-chip__name {\n font-size: 13px;\n font-weight: 500;\n color: var(--ak-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 220px;\n}\n\n.ak-file-chip__label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n color: var(--ak-text-muted);\n margin-top: 2px;\n}\n\n/* In user-side bubble (dark primary background), invert chip surface for legibility */\n.ak-message--user .ak-file-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n/* ── Voice note player (audio attachment) ──────────────────────────────── */\n.ak-audio-chip {\n display: inline-flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n max-width: 100%;\n}\n\n.ak-message--user .ak-audio-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n.ak-audio-chip__player {\n height: 36px;\n max-width: 260px;\n}\n\n.ak-audio-chip__transcript {\n margin: 0;\n font-size: 12px;\n font-style: italic;\n line-height: 1.4;\n color: var(--ak-text-muted);\n}\n\n/* ── Lightbox (image preview modal) ────────────────────────────────────── */\n.ak-lightbox {\n position: fixed;\n inset: 0;\n z-index: 2147483600; /* near max int — sits above any host-page content */\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: rgba(15, 23, 42, 0.85);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n animation: ak-lightbox-in 0.12s ease-out;\n}\n\n@keyframes ak-lightbox-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.ak-lightbox__img {\n max-width: 92vw;\n max-height: 88vh;\n border-radius: 8px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);\n user-select: none;\n display: block;\n}\n\n.ak-lightbox__toolbar {\n position: absolute;\n top: 16px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ak-lightbox__counter {\n display: inline-flex;\n align-items: center;\n height: 28px;\n padding: 0 12px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n font-size: 12px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n\n.ak-lightbox__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n text-decoration: none;\n padding: 0;\n}\n\n.ak-lightbox__btn:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__btn:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n.ak-lightbox__nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n padding: 0;\n}\n\n.ak-lightbox__nav:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__nav--prev { left: 16px; }\n.ak-lightbox__nav--next { right: 16px; }\n\n.ak-lightbox__nav:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n/* Gallery cells must be styled as plain buttons (we converted from <a>) */\n.ak-gallery__cell {\n border: none;\n padding: 0;\n margin: 0;\n cursor: zoom-in;\n font: inherit;\n color: inherit;\n background: var(--ak-surface);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: -2px;\n}\n\n/* Faint download icon — always present, top-right corner of the image */\n.ak-message__image-dl-icon {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 26px;\n height: 26px;\n background: rgba(0, 0, 0, 0.28);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.75);\n text-decoration: none;\n transition: background 0.15s, color 0.15s;\n}\n\n.ak-message__image-dl-icon:hover {\n background: rgba(0, 0, 0, 0.55);\n color: #ffffff;\n}\n\n/* Caption / text below the image, inside the same bubble */\n.ak-message__image-caption {\n padding: 8px 10px 8px;\n font-size: 14px;\n font-style: normal;\n color: var(--ak-text);\n line-height: 1.45;\n}\n\n/* User-uploaded image caption uses user bubble colors */\n.ak-message--user .ak-message__image-caption {\n color: color-mix(in srgb, var(--ak-on-accent) 80%, transparent);\n font-style: normal;\n}\n\n/* ── Typing indicator ────────────────────────────────────────── */\n.ak-typing {\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 9px 12px;\n background: var(--ak-bot-bg);\n border-radius: 16px;\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n align-self: flex-start;\n width: fit-content;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing__dot {\n width: 7px;\n height: 7px;\n background: var(--ak-text-muted);\n border-radius: 50%;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing__dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes ak-bounce {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }\n 30% { transform: translateY(-5px); opacity: 1; }\n}\n\n/* ── Init status (validating / error) ───────────────────────── */\n.ak-init-status {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n.ak-init-spinner {\n width: 28px;\n height: 28px;\n border: 3px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n animation: ak-spin 0.7s linear infinite;\n}\n@keyframes ak-spin {\n to { transform: rotate(360deg); }\n}\n.ak-init-status--error {\n justify-content: flex-start;\n}\n.ak-init-status--maintenance {\n padding: 28px 24px;\n}\n\n/* ── Composer ────────────────────────────────────────────────── */\n.ak-composer {\n position: relative; /* establishes positioning context for the attachment submenu */\n padding: 8px 12px 10px;\n border-top: 1px solid var(--ak-border);\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--ak-bg);\n flex-shrink: 0;\n}\n\n/* Hidden native file input */\n.ak-composer__file-input {\n display: none;\n}\n\n/* Composer card — the dashboard ChatComposer layout: the message row (text, mic at its\n right edge) over a divider and a toolbar (+ … send), both on the same side padding.\n The + and mic glyphs (20px in a 32px box) are pulled flush with the text edges. */\n.ak-composer__input-wrap {\n display: flex;\n flex-direction: column;\n background: var(--ak-bg);\n border: 1px solid color-mix(in srgb, var(--ak-border-strong) 40%, transparent);\n border-radius: 16px;\n box-shadow: 0 1px 3px rgba(14, 18, 32, 0.06), 0 1px 2px rgba(14, 18, 32, 0.04);\n transition: border-color 0.15s;\n}\n.ak-composer__input-wrap:focus-within {\n border-color: var(--ak-accent);\n}\n.ak-composer__row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px 8px;\n}\n.ak-composer__toolbar {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n border-top: 1px solid var(--ak-border);\n}\n\n/* Attach button wrapper */\n.ak-composer__attach-wrap {\n flex-shrink: 0;\n margin-left: -6px;\n}\n\n/* Icon controls (\"+\" and mic): borderless, a hover fill rather than an outline */\n.ak-composer__attach,\n.ak-composer__mic {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__attach:hover:not(:disabled),\n.ak-composer__mic:hover:not(:disabled),\n.ak-composer__attach--open {\n color: var(--ak-text);\n background: var(--ak-hover);\n}\n.ak-composer__attach:focus-visible,\n.ak-composer__mic:focus-visible,\n.ak-composer__send:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n.ak-composer__attach:disabled,\n.ak-composer__mic:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n/* Flush right, and -4px vertically so the 32px box doesn't grow the 24px text row */\n.ak-composer__mic {\n margin: -4px -6px -4px 0;\n}\n\n/* Attachment submenu — floats above the composer, positioned relative to .ak-composer */\n.ak-composer__attach-menu {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 12px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 10px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n padding: 4px;\n min-width: 130px;\n z-index: 10;\n}\n\n/* Individual item inside the attachment submenu */\n.ak-composer__attach-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n cursor: pointer;\n transition: background 0.12s;\n text-align: left;\n}\n.ak-composer__attach-menu-item:hover:not(:disabled) {\n background: var(--ak-bg);\n}\n.ak-composer__attach-menu-item:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Textarea — borderless, transparent, fills the message row */\n.ak-composer__input {\n flex: 1;\n padding: 0;\n border: none;\n border-radius: 0;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 16px; /* iOS zooms the page when a focused input is under 16px */\n line-height: 1.5;\n resize: none;\n outline: none;\n min-height: 24px;\n max-height: 110px;\n overflow-y: auto;\n}\n.ak-composer__input::placeholder {\n color: var(--ak-text-muted);\n}\n\n/* Recording bar — replaces the input row while a voice note is being recorded */\n.ak-composer__recording {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n padding: 8px 12px;\n}\n.ak-composer__recording-timer {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n}\n.ak-composer__recording-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--ak-danger);\n animation: ak-recording-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ak-recording-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.35;\n }\n}\n.ak-composer__recording-cancel,\n.ak-composer__recording-stop {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.15s, color 0.15s;\n}\n.ak-composer__recording-cancel {\n background: transparent;\n color: var(--ak-text-muted);\n}\n.ak-composer__recording-cancel:hover {\n color: var(--ak-text);\n background: var(--ak-hover);\n}\n.ak-composer__recording-stop {\n background: var(--ak-accent);\n color: var(--ak-on-accent);\n}\n.ak-composer__recording-stop:hover {\n background: var(--ak-accent-hover);\n}\n\n/* Send button — rounded square at the toolbar's right end */\n.ak-composer__send {\n width: 32px;\n height: 32px;\n margin-left: auto;\n border-radius: 8px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-on-accent);\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__send:hover:not(:disabled) {\n background: var(--ak-accent-hover);\n}\n/* Disabled sits on the muted fill rather than a faded accent, so it stays visible on dark */\n.ak-composer__send:disabled {\n background: var(--ak-bot-bg);\n color: var(--ak-text-muted);\n cursor: not-allowed;\n}\n\n/* Old photo button — hidden but keep so file-input trigger still works */\n.ak-composer__photo {\n display: none;\n}\n\n/* Image preview strip above the input row */\n.ak-composer__preview {\n display: flex;\n gap: 6px;\n padding: 0 2px;\n}\n.ak-composer__preview-wrap {\n position: relative;\n width: 60px;\n height: 60px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n flex-shrink: 0;\n}\n.ak-composer__preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n.ak-composer__preview-remove {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.55);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n padding: 0;\n transition: background 0.15s;\n}\n.ak-composer__preview-remove:hover {\n background: rgba(0, 0, 0, 0.8);\n}\n\n/* ── Streaming cursor ────────────────────────────────────────── */\n.ak-cursor {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n margin-left: 4px;\n vertical-align: middle;\n}\n.ak-cursor__dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-cursor__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-cursor__dot:nth-child(3) { animation-delay: 0.4s; }\n\n/* Pre-first-chunk wait — deliberately shares the metrics of .ak-progress__item\n and .ak-progress__summary so dots → activity line → summary never reflow. */\n.ak-typing-row {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* One text line at the shared row metrics, so the dots occupy exactly the\n box the activity line and summary will occupy (border-box). */\n min-height: calc(0.76rem * 1.4 + 4px);\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing-row__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--ak-bot-text);\n opacity: 0.5;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing-row__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing-row__dot:nth-child(3) { animation-delay: 0.4s; }\n@media (prefers-reduced-motion: reduce) {\n .ak-typing-row__dot,\n .ak-cursor__dot,\n .ak-typing__dot,\n .ak-progress__item--active,\n .ak-agent-status__icon {\n animation: none;\n }\n}\n\n/* ── Markdown rendering ──────────────────────────────────────── */\n.ak-message__bubble--md {\n white-space: normal;\n min-width: 0;\n}\n.ak-message__bubble--md .ak-md-p {\n margin: 0 0 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-p:last-child {\n margin-bottom: 0;\n}\n/* Collapse margins between paragraph and following list */\n.ak-message__bubble--md .ak-md-p + .ak-md-ul,\n.ak-message__bubble--md .ak-md-p + .ak-md-ol {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1,\n.ak-message__bubble--md .ak-md-h2,\n.ak-message__bubble--md .ak-md-h3 {\n font-weight: 700;\n line-height: 1.3;\n margin: 0.6em 0 0.3em;\n}\n.ak-message__bubble--md .ak-md-h1:first-child,\n.ak-message__bubble--md .ak-md-h2:first-child,\n.ak-message__bubble--md .ak-md-h3:first-child {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1 { font-size: 1.12em; }\n.ak-message__bubble--md .ak-md-h2 { font-size: 1.04em; }\n.ak-message__bubble--md .ak-md-h3 { font-size: 0.97em; }\n.ak-message__bubble--md .ak-md-ul,\n.ak-message__bubble--md .ak-md-ol {\n padding-left: 1.4em;\n margin: 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-ul li,\n.ak-message__bubble--md .ak-md-ol li {\n margin-bottom: 0.15em;\n}\n.ak-message__bubble--md .ak-md-pre-wrap {\n position: relative;\n margin: 0.4em 0;\n border-radius: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgba(0, 0, 0, 0.08);\n max-width: 100%;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-wrap {\n background: color-mix(in srgb, var(--ak-on-accent) 15%, transparent);\n}\n.ak-message__bubble--md .ak-md-pre-lang {\n display: block;\n padding: 3px 10px;\n font-size: 10px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n opacity: 0.55;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-lang {\n border-bottom-color: color-mix(in srgb, var(--ak-on-accent) 15%, transparent);\n}\n.ak-message__bubble--md .ak-md-pre {\n margin: 0;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n white-space: pre;\n box-sizing: border-box;\n}\n.ak-message__bubble--md .ak-md-code {\n display: block;\n font-family: inherit;\n font-size: inherit;\n}\n.ak-message__bubble--md .ak-md-ic {\n background: rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1px 5px;\n font-size: 0.87em;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-ic {\n background: color-mix(in srgb, var(--ak-on-accent) 20%, transparent);\n}\n.ak-message__bubble--md .ak-md-hr {\n border: none;\n border-top: 1px solid currentColor;\n opacity: 0.2;\n margin: 0.5em 0;\n}\n.ak-message__bubble--md a {\n color: var(--ak-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-message--user .ak-message__bubble--md a {\n color: color-mix(in srgb, var(--ak-on-accent) 90%, transparent);\n}\n.ak-message__bubble--md .ak-md-table {\n width: 100%;\n border-collapse: collapse;\n margin: 0.4em 0;\n font-size: 0.95em;\n line-height: 1.5;\n}\n.ak-message__bubble--md .ak-md-th {\n padding: 8px 10px;\n text-align: left;\n border-bottom: 2px solid var(--ak-accent) !important;\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent) !important;\n font-weight: 600;\n color: var(--ak-text) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-th {\n border-bottom-color: color-mix(in srgb, var(--ak-on-accent) 50%, transparent) !important;\n background: rgba(0, 0, 0, 0.25) !important;\n color: var(--ak-user-text) !important;\n font-weight: 700;\n}\n.ak-message__bubble--md .ak-md-td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--ak-border) !important;\n color: var(--ak-text) !important;\n}\n.ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: color-mix(in srgb, var(--ak-surface), transparent 40%) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-td {\n color: var(--ak-user-text) !important;\n border-bottom-color: color-mix(in srgb, var(--ak-on-accent) 25%, transparent) !important;\n}\n.ak-message--user .ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: rgba(0, 0, 0, 0.15) !important;\n}\n\n/* ── Composer disclaimer ─────────────────────────────────────── */\n.ak-composer__disclaimer {\n font-size: 11px;\n color: var(--ak-text-muted);\n text-align: center;\n line-height: 1.4;\n}\n.ak-composer__disclaimer a {\n color: var(--ak-text-muted);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-composer__disclaimer a:hover {\n color: var(--ak-accent);\n}\n\n/* ── Maintenance state ───────────────────────────────────────── */\n.ak-maintenance {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 320px;\n padding: 8px 4px;\n animation: ak-maintenance-enter 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;\n}\n.ak-maintenance__halo {\n position: absolute;\n top: -6px;\n left: 50%;\n width: 120px;\n height: 120px;\n transform: translateX(-50%);\n border-radius: 50%;\n background: radial-gradient(\n closest-side,\n var(--ak-maintenance-halo) 0%,\n transparent 72%\n );\n opacity: 0.22;\n filter: blur(4px);\n pointer-events: none;\n animation: ak-maintenance-pulse 2.8s ease-in-out infinite;\n}\n.ak-maintenance__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--ak-maintenance-bg);\n color: var(--ak-maintenance-fg);\n border: 1px solid color-mix(in srgb, var(--ak-maintenance-halo) 40%, transparent);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n}\n.ak-maintenance__title {\n margin-top: 16px;\n font-size: 15px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-maintenance__description {\n margin-top: 6px;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.5;\n max-width: 28ch;\n}\n\n@keyframes ak-maintenance-enter {\n from {\n opacity: 0;\n transform: translateY(6px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ak-maintenance-pulse {\n 0%, 100% { opacity: 0.18; transform: translateX(-50%) scale(1); }\n 50% { opacity: 0.32; transform: translateX(-50%) scale(1.06); }\n}\n@media (prefers-reduced-motion: reduce) {\n .ak-maintenance,\n .ak-maintenance__halo,\n .ak-maintenance__icon {\n animation: none;\n }\n}\n\n/* ── Error banner ────────────────────────────────────────────── */\n.ak-error {\n padding: 12px 16px;\n background: var(--ak-danger-soft);\n color: var(--ak-danger-fg);\n font-size: 13px;\n border-top: 1px solid var(--ak-danger-border);\n text-align: left;\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.ak-error__icon {\n font-size: 16px;\n line-height: 1;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.ak-error__content {\n flex: 1;\n}\n\n.ak-error__title {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.ak-error__description {\n font-size: 13px;\n margin: 0 0 4px 0;\n line-height: 1.4;\n opacity: 0.9;\n}\n\n.ak-error__message {\n font-size: 13px;\n margin: 0;\n line-height: 1.4;\n opacity: 0.85;\n}\n\n/* Specific styling for origin restriction errors */\n.ak-error--origin {\n background: var(--ak-warning-soft); /* warning, not danger: less alarming */\n color: var(--ak-warning-fg);\n border-top: 1px solid var(--ak-warning);\n}\n\n/* ── Agent status indicator ──────────────────────────────────── */\n/* Same bare row as .ak-progress__item / .ak-typing-row — activity-off tenants\n see the tool status swap in without the surrounding box changing size. */\n.ak-agent-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n padding: 2px 0;\n color: var(--ak-bot-text);\n font-size: 0.76rem;\n line-height: 1.4;\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-agent-status__icon {\n flex-shrink: 0;\n color: var(--ak-accent);\n animation: ak-sparkle-pulse 2.5s ease-in-out infinite;\n}\n.ak-agent-status__text {\n line-height: 1.4;\n}\n@keyframes ak-sparkle-pulse {\n 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }\n 50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }\n}\n\n/* ── Progress block (tool execution / streaming chain) ───────── */\n.ak-progress {\n margin-bottom: 4px;\n max-width: 80%;\n}\n.ak-progress__block {\n display: inline-flex;\n flex-direction: column;\n gap: 3px;\n padding: 6px 12px;\n border-radius: 14px;\n background: var(--ak-bot-bg);\n border: 1px solid var(--ak-border);\n font-size: 0.8rem;\n color: var(--ak-bot-text);\n opacity: 0.85;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ak-progress__label {\n font-weight: 600;\n font-size: 0.78rem;\n color: var(--ak-accent);\n}\n.ak-progress__toggle {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 7px;\n border: 1px solid var(--ak-border);\n border-radius: 8px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.72rem;\n cursor: pointer;\n opacity: 0.65;\n transition: opacity 0.15s;\n}\n.ak-progress__toggle:hover { opacity: 0.9; }\n.ak-progress__toggle--collapsed {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 10px;\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.78rem;\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 0.15s;\n margin-bottom: 4px;\n}\n.ak-progress__toggle--collapsed:hover { opacity: 0.85; }\n.ak-progress__text {\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n line-height: 1.4;\n margin: 0;\n}\n/* Active streaming state */\n.ak-progress__list {\n list-style: none;\n margin: 0 0 4px;\n padding: 0;\n}\n/* Bare row, not a pill — identical metrics to .ak-progress__summary so the\n live line and the post-turn \"Worked for Ns\" swap without a size change. */\n.ak-progress__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n line-height: 1.4;\n color: var(--ak-bot-text);\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__item--active {\n /* inherits base .ak-progress__item; subtle pulse to signal in-flight */\n animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;\n}\n@keyframes ak-active-pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n}\n/* Claude-style step list (detailed mode) */\n.ak-progress__steps {\n list-style: none;\n margin: 0 0 4px;\n padding: 2px 0;\n}\n.ak-progress__step {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n line-height: 1.4;\n}\n.ak-progress__step--active {\n opacity: 0.9;\n}\n.ak-progress__step-text {\n min-width: 0;\n}\n.ak-progress__step-dur {\n opacity: 0.65;\n flex-shrink: 0;\n}\n.ak-progress__step-icon {\n flex-shrink: 0;\n opacity: 0.55;\n}\n.ak-progress__step-icon--fail {\n color: var(--ak-danger);\n opacity: 0.9;\n}\n/* Post-turn summary row (\"Worked for Ns · N steps\") */\n.ak-progress__summary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* Shrink-to-fit as a column flex item would otherwise break \"Worked for 8.4s\"\n onto two lines, doubling the row height as the turn ends. */\n white-space: nowrap;\n border: none;\n background: transparent;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n cursor: pointer;\n transition: opacity 0.15s;\n}\n.ak-progress__summary:hover { opacity: 0.85; }\n.ak-progress__summary--static {\n cursor: default;\n}\n.ak-progress__summary--static:hover { opacity: 0.6; }\n.ak-progress__spinner {\n display: inline-block;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n flex-shrink: 0;\n animation: ak-spin 0.7s linear infinite;\n}\n\n/* ── Powered by hanging tab ──────────────────────────────────── */\n.ak-branding {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px 4px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-top: none;\n border-radius: 0 0 8px 8px;\n margin-left: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);\n}\n.ak-branding__logo {\n display: block;\n width: 14px;\n height: 14px;\n flex-shrink: 0;\n border-radius: 3px;\n}\n.ak-branding__label {\n font-size: 9px;\n color: var(--ak-text-muted);\n opacity: 0.75;\n}\n.ak-branding__name {\n font-size: 9px;\n font-weight: 600;\n color: var(--ak-text);\n opacity: 0.75;\n letter-spacing: -0.01em;\n}\n\n/* ── Mobile: full-viewport panel ─────────────────────────────── */\n@media (max-width: 639px) {\n @keyframes ak-panel-in-mobile {\n from { opacity: 0; transform: translateY(32px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.\n Give it its own fixed position so it fills the viewport independently,\n bypassing the outer container's bottom/right offsets. */\n :host([data-open]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n pointer-events: none;\n }\n\n :host([data-open]) .ak-floating {\n width: 100%;\n height: 100%;\n align-items: stretch;\n gap: 0;\n }\n\n :host([data-open]) .ak-shell-wrap {\n flex: 1;\n min-height: 0;\n width: 100%;\n align-items: stretch;\n /* Launcher is hidden here — the negative offset would leave a dead strip. */\n margin-bottom: 0;\n }\n\n :host([data-open]) .ak-shell--floating {\n width: 100%;\n flex: 1;\n height: auto;\n border-radius: 0;\n box-shadow: none;\n border-left: none;\n border-right: none;\n border-top: none;\n }\n\n :host([data-open]) .ak-launcher {\n display: none;\n }\n\n :host([data-open]) .ak-shell-enter {\n animation: ak-panel-in-mobile 0.22s ease-out;\n }\n\n :host([data-open]) .ak-branding {\n display: none;\n }\n}\n", Pa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAIAAAD9b0jDAAAHd0lEQVR42k1WaWxU1xX+zr33vTebx2O8AY3XsBibJSxhKQJCSFiCAYeUJEooTYEuKQXC8iN0U0vzo0hdpKJUUUshogskqJS2ainBgAiNQ4JYWrMYsoBdiLHHnvF4PPNm3nJPf4xp++/q6Jx7zvm+q/t9VFXXSEREYGYABDDw4EDMLIhIiEJYF0LMIAIAcCGbBBXKATCzwvBtYM0MFkIAxKyZiAAl5dDQUM7OMABmQMdKyqWSvtaCBBE0M4HADAYIhd6KiAr5/P8jgsAwTBWPxxc9vuAbX9vo+z6AUCi4+7U9becvjBw50nMdzRiemqGZxXAlKWaAGQQiGu5JICJm7XmeJOz+/ncmNjUWVvvggwvjxtTV1tYcOnyksrLS830wAAYRMZhBggAIBv8PSECzZmYCTMPoi8dbWlZMbGp0XNdxXGbs/uFra9e+uHP7Vt9zmR8ACkJhMh5eURRGJAJAD6AGwJ7vW5axY9tWZgazaRonW08ZSs2ZM2v8+LHLli2J9/UpYxg9zQxBEEJrH4CgYR4LrGqAGCyV0dfX17JqRVPTBK21lFJr/at9+3fs3FGgdcf2rdpzC3yylBBEABGEEACLYVYBIhKCBEEQ+Z5nGnLbK5uZ2XU9Ijp77h/t7e1z584B4DjO5+fMal6xPJ4YIO2LRLfM20wCDAIBJAAWBBJCSnI9oVkYhtHb2/vM6paJTY2u6wYClhBi795f3rxx463DR4jINE0iWvvsF7z+uyFLOc0v+1XjRD5DUmpmBqi6vrHwjhyPy4oplRFaczYzcO5s64SG8UTU3n711wd+u//AwWAwWD+m/sSxt8+1tr5z6vTNvqS1cKn95FPtV7TX8a/AG1+hUJRYA1AFNInY8cXYSn/mGHxrX2LD+pbGCQ0M/HzvL44ePbZ+/fply5as+9KGriuXm5990R7TYD3RohvnJ91g/N1P821n7Zw3eWQ4ndGuDwYpZi2INAvHobPXVE9Kj6pUW7ZsBdDZ2fnmm7979XvfbWocP7Z69IJFT16avRSPLcr70fhdu/vQJaftlOhqK1X2rLJ4bXVu/9ni0ogbDZEsKa1IZWjdkvzjU/zObutSR/z5557Z8OV1vvYDVvDUmTO5vGMaRuXIyjKTD9zQWf+hfx88kji4N3bt6PrpoeaZdefPtgoVvnjH3LQ8N7vBO9+hlNZcFMbBdwKP1OlZD+cyg7R1yyYAeTsXCstHp00++d6VpsmTu+7en7Ng/owDO68c//1YuvvVdU8veWpHXUOTYag/n2pL9nSumWn1J9X7HUJICAJpTxcHddo1jp5LPbHqi40TGuycI83AYKLnr0cOjbGvo+dmoutGOpPetGhcS+5vg4m+xStXjZ80xck7ADZtfqW3L3fmo8Dxy9Rvw5JalpRVMBNBbFxkr5iSXf/03AA8xxgRDufPvLXP//DEN+cGp02+X8ZteqCjoS65sGIo8Unf7Z7EgsULmIGh2xOK7ozyPlwyMXWnV8Yz0pAso7EKIkDIwyfTNZPWrFj5QrrnvjJU973eXZt3rZuUn9HMoTlTisauLq6usyKXirxrNbZ8/ejV6qnzRo0oSt/7xDKLO/pHvfyjC7aMGMJnEFXVNbLWUkltZ6oWLo8URU3XVuSl09mloe6XpqmyRzSmzkN4FtCPgdO48XH6vPrjDe8PiSiHR/jC8ALRrON2njwmTdP3mQRRVe0ECMH5fORzFXasNvPwQjV2qhUQRaFAeSziuxx0vQgPhkSeWed1IG9EfUtJSYl09rOUncmz03GxqPPdiN2fuvWRCAaINVXVNQLgzGDN4VYjd//eT/YkbyUy4xb4lfWu78hYCRVFGZKkAuD7vmZGdgjJJIQykveiN0+PGKVKN21XU+Z1tcznXFaYARkrH839vdbi1c7SdYNyZHDNWhUtCl48bqY+E8I07WxQu5abs7ycmUsbmVRoqN9K9hi5VKzncmmiPbz6hdi3fzwQqs/KMHl5/d4JREuour6JMinvtb94FbXCHvJg5cxy/9Nb5b/ZqOzBdM28AVUufReGBTBcx2OEeSB2930IkXz+Da9uYlAnTMvVlqU1B15dgrwtRyh4M1ZmZ6x144N21tC3rlp/+mnxqZ+Ra/vZIfPjtsijjwXKy0MWLIsiESNqavPMPrDHyrCuHJO3/5njqBuq1jntqRjZqcD101RbVZf4+jEdGCGut4Y6/m51XSAnq4Mx9txASax+267uhlWDKR9au54Oh0RNlWVcPn5rzw+ceEIELMoMQBn5h6bbk1c64+axESh/vZnKl252KhqiFw7KZBeE8swIDEs6tldWG3huix0ojXf0GoJZM8BaayijdFxlxEvm3t5L3be0GWLXkfm0YM8tGj00+yWVTVDN+OkidVcbYTYjTExaE4E1s2npTJYzg0bIeCC1pFkTk2c7vhVSRRG4DhV0QygShNyQdDJ+dDRV1zWwsoiZ2AeBSBQ+b2i/IDqsGVSQG9JagyBIEGutfZB4YBVAgAaYhPAcxaTYc7mgUMxaMxMEAUIyM3TBvfCwyj7wDQQwyf8KfsERMWsCa6H+A89M9AV72eVmAAAAAElFTkSuQmCC";
|
|
5819
5859
|
// ../../packages/widget-ui/src/components/Header.tsx
|
|
5820
|
-
function
|
|
5860
|
+
function Fa() {
|
|
5821
5861
|
return /* @__PURE__ */ l("svg", {
|
|
5822
|
-
width: "
|
|
5823
|
-
height: "
|
|
5862
|
+
width: "50%",
|
|
5863
|
+
height: "50%",
|
|
5824
5864
|
viewBox: "0 0 24 24",
|
|
5825
5865
|
fill: "none",
|
|
5826
5866
|
stroke: "currentColor",
|
|
@@ -5856,7 +5896,7 @@ function ka() {
|
|
|
5856
5896
|
]
|
|
5857
5897
|
});
|
|
5858
5898
|
}
|
|
5859
|
-
function
|
|
5899
|
+
function Ia() {
|
|
5860
5900
|
return /* @__PURE__ */ l("svg", {
|
|
5861
5901
|
width: "14",
|
|
5862
5902
|
height: "14",
|
|
@@ -5878,7 +5918,7 @@ function Aa() {
|
|
|
5878
5918
|
})]
|
|
5879
5919
|
});
|
|
5880
5920
|
}
|
|
5881
|
-
function
|
|
5921
|
+
function La() {
|
|
5882
5922
|
return /* @__PURE__ */ l("svg", {
|
|
5883
5923
|
width: "16",
|
|
5884
5924
|
height: "16",
|
|
@@ -5891,22 +5931,24 @@ function ja() {
|
|
|
5891
5931
|
children: [/* @__PURE__ */ c("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ c("path", { d: "M3 3v5h5" })]
|
|
5892
5932
|
});
|
|
5893
5933
|
}
|
|
5894
|
-
function
|
|
5895
|
-
let [
|
|
5934
|
+
function Ra({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideClose: a = !1, compact: s = !1 }) {
|
|
5935
|
+
let [u, d] = o(!1);
|
|
5896
5936
|
return /* @__PURE__ */ l("div", {
|
|
5897
|
-
className: `ak-header${s ? " ak-header--confirming" : ""}`,
|
|
5937
|
+
className: `ak-header${s ? " ak-header--compact" : ""}${u ? " ak-header--confirming" : ""}`,
|
|
5898
5938
|
children: [/* @__PURE__ */ l("div", {
|
|
5899
5939
|
className: "ak-header__row",
|
|
5900
5940
|
children: [
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
alt: "",
|
|
5904
|
-
className: "ak-header__avatar",
|
|
5905
|
-
"aria-hidden": "true"
|
|
5906
|
-
}) : /* @__PURE__ */ c("span", {
|
|
5907
|
-
className: "ak-header__bot-icon",
|
|
5941
|
+
/* @__PURE__ */ l("span", {
|
|
5942
|
+
className: "ak-header__face",
|
|
5908
5943
|
"aria-hidden": "true",
|
|
5909
|
-
children: /* @__PURE__ */ c(
|
|
5944
|
+
children: [n ? /* @__PURE__ */ c("img", {
|
|
5945
|
+
src: n,
|
|
5946
|
+
alt: "",
|
|
5947
|
+
className: "ak-header__avatar"
|
|
5948
|
+
}) : /* @__PURE__ */ c("span", {
|
|
5949
|
+
className: "ak-header__bot",
|
|
5950
|
+
children: /* @__PURE__ */ c(Fa, {})
|
|
5951
|
+
}), /* @__PURE__ */ c("span", { className: "ak-header__status" })]
|
|
5910
5952
|
}),
|
|
5911
5953
|
/* @__PURE__ */ l("div", {
|
|
5912
5954
|
className: "ak-header__title-group",
|
|
@@ -5919,35 +5961,24 @@ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
|
|
|
5919
5961
|
})]
|
|
5920
5962
|
}),
|
|
5921
5963
|
/* @__PURE__ */ l("div", {
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
title: "Start a new conversation (Retains current conversation to memory)",
|
|
5938
|
-
children: /* @__PURE__ */ c(ja, {})
|
|
5939
|
-
}),
|
|
5940
|
-
!a && /* @__PURE__ */ c("button", {
|
|
5941
|
-
className: "ak-header__close",
|
|
5942
|
-
onClick: r,
|
|
5943
|
-
"aria-label": "Close chat",
|
|
5944
|
-
type: "button",
|
|
5945
|
-
children: /* @__PURE__ */ c(Aa, {})
|
|
5946
|
-
})
|
|
5947
|
-
]
|
|
5964
|
+
className: "ak-header__actions",
|
|
5965
|
+
children: [i && /* @__PURE__ */ c("button", {
|
|
5966
|
+
className: `ak-header__button${u ? " ak-header__button--active" : ""}`,
|
|
5967
|
+
onClick: () => d(!0),
|
|
5968
|
+
"aria-label": "New conversation",
|
|
5969
|
+
type: "button",
|
|
5970
|
+
title: "Start a new conversation (Retains current conversation to memory)",
|
|
5971
|
+
children: /* @__PURE__ */ c(La, {})
|
|
5972
|
+
}), !a && /* @__PURE__ */ c("button", {
|
|
5973
|
+
className: "ak-header__close",
|
|
5974
|
+
onClick: r,
|
|
5975
|
+
"aria-label": "Close chat",
|
|
5976
|
+
type: "button",
|
|
5977
|
+
children: /* @__PURE__ */ c(Ia, {})
|
|
5978
|
+
})]
|
|
5948
5979
|
})
|
|
5949
5980
|
]
|
|
5950
|
-
}),
|
|
5981
|
+
}), u && /* @__PURE__ */ l("div", {
|
|
5951
5982
|
className: "ak-header__confirm",
|
|
5952
5983
|
role: "alert",
|
|
5953
5984
|
children: [/* @__PURE__ */ l("div", {
|
|
@@ -5964,13 +5995,13 @@ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
|
|
|
5964
5995
|
children: [/* @__PURE__ */ c("button", {
|
|
5965
5996
|
className: "ak-header__confirm-cancel",
|
|
5966
5997
|
type: "button",
|
|
5967
|
-
onClick: () =>
|
|
5998
|
+
onClick: () => d(!1),
|
|
5968
5999
|
children: "Cancel"
|
|
5969
6000
|
}), /* @__PURE__ */ c("button", {
|
|
5970
6001
|
className: "ak-header__confirm-ok",
|
|
5971
6002
|
type: "button",
|
|
5972
6003
|
onClick: () => {
|
|
5973
|
-
i?.(),
|
|
6004
|
+
i?.(), d(!1);
|
|
5974
6005
|
},
|
|
5975
6006
|
children: "End chat"
|
|
5976
6007
|
})]
|
|
@@ -5979,7 +6010,7 @@ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
|
|
|
5979
6010
|
});
|
|
5980
6011
|
}
|
|
5981
6012
|
// ../../packages/widget-ui/src/lib/safe-url.ts
|
|
5982
|
-
function
|
|
6013
|
+
function za(e) {
|
|
5983
6014
|
if (!e) return null;
|
|
5984
6015
|
let t = e.trim();
|
|
5985
6016
|
if (!t) return null;
|
|
@@ -5993,11 +6024,11 @@ function Na(e) {
|
|
|
5993
6024
|
].includes(n) ? t : null : t;
|
|
5994
6025
|
}
|
|
5995
6026
|
// ../../packages/widget-ui/src/lib/strip-latex.ts
|
|
5996
|
-
function
|
|
6027
|
+
function Ba(e) {
|
|
5997
6028
|
return e.replace(/\\text\{([^}]*)\}/g, "$1").replace(/\\implies/g, "→").replace(/\\Rightarrow/g, "⟹").replace(/\\times/g, "×").replace(/\\div/g, "÷").replace(/\\cdot/g, "·").replace(/\\quad/g, " ").replace(/\\qquad/g, " ").replace(/\\leq/g, "≤").replace(/\\geq/g, "≥").replace(/\\neq/g, "≠").replace(/\\approx/g, "≈").replace(/\\infty/g, "∞").replace(/\\\((.+?)\\\)/gs, "$1").replace(/\\\[[\s\S]+?\\\]/g, "").replace(/\\\$/g, "\0DOLLAR\0").replace(/\$\$(?!\d)[\s\S]+?\$\$/g, "").replace(/\$(?![\s\d])([^$\n]+?)(?<!\s)\$(?!\d)/g, "$1").replace(/\x00DOLLAR\x00/g, "$").replace(/\\[a-zA-Z]+\*?/g, "").replace(/\n{3,}/g, "\n\n");
|
|
5998
6029
|
}
|
|
5999
6030
|
// ../../packages/widget-ui/src/components/ProgressBlock.tsx
|
|
6000
|
-
function
|
|
6031
|
+
function Va(e) {
|
|
6001
6032
|
let [, t] = o(0);
|
|
6002
6033
|
r(() => {
|
|
6003
6034
|
if (!e) return;
|
|
@@ -6005,8 +6036,8 @@ function Fa(e) {
|
|
|
6005
6036
|
return () => clearInterval(n);
|
|
6006
6037
|
}, [e]);
|
|
6007
6038
|
}
|
|
6008
|
-
var
|
|
6009
|
-
function
|
|
6039
|
+
var Ha = 800;
|
|
6040
|
+
function Ua({ up: e }) {
|
|
6010
6041
|
return /* @__PURE__ */ c("svg", {
|
|
6011
6042
|
width: "10",
|
|
6012
6043
|
height: "10",
|
|
@@ -6020,7 +6051,7 @@ function La({ up: e }) {
|
|
|
6020
6051
|
children: /* @__PURE__ */ c("polyline", { points: e ? "18 15 12 9 6 15" : "6 9 12 15 18 9" })
|
|
6021
6052
|
});
|
|
6022
6053
|
}
|
|
6023
|
-
function
|
|
6054
|
+
function Wa({ event: e, active: t }) {
|
|
6024
6055
|
return t ? /* @__PURE__ */ c("span", {
|
|
6025
6056
|
className: "ak-progress__spinner",
|
|
6026
6057
|
"aria-hidden": "true"
|
|
@@ -6048,8 +6079,8 @@ function Ra({ event: e, active: t }) {
|
|
|
6048
6079
|
})] }) : /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12" })
|
|
6049
6080
|
});
|
|
6050
6081
|
}
|
|
6051
|
-
function
|
|
6052
|
-
|
|
6082
|
+
function Ga({ events: e, live: t, answerStartedAtMs: n }) {
|
|
6083
|
+
Va(t && !n && e.some((e) => e.status === "active"));
|
|
6053
6084
|
let r = n ?? Date.now(), i = e[0]?.startedAtMs, a = e.reduce((e, t, n) => t.status === "active" ? n : e, -1);
|
|
6054
6085
|
return /* @__PURE__ */ c("ul", {
|
|
6055
6086
|
className: "ak-progress__steps",
|
|
@@ -6059,7 +6090,7 @@ function za({ events: e, live: t, answerStartedAtMs: n }) {
|
|
|
6059
6090
|
return /* @__PURE__ */ l("li", {
|
|
6060
6091
|
className: o ? "ak-progress__step ak-progress__step--active" : "ak-progress__step",
|
|
6061
6092
|
children: [
|
|
6062
|
-
/* @__PURE__ */ c(
|
|
6093
|
+
/* @__PURE__ */ c(Wa, {
|
|
6063
6094
|
event: e,
|
|
6064
6095
|
active: o
|
|
6065
6096
|
}),
|
|
@@ -6076,11 +6107,11 @@ function za({ events: e, live: t, answerStartedAtMs: n }) {
|
|
|
6076
6107
|
})
|
|
6077
6108
|
});
|
|
6078
6109
|
}
|
|
6079
|
-
function
|
|
6110
|
+
function Ka({ events: e, answerStartedAtMs: t }) {
|
|
6080
6111
|
let [n, i] = o(0), a = Math.min(n, e.length - 1), s = a < e.length - 1;
|
|
6081
6112
|
r(() => {
|
|
6082
6113
|
if (!s) return;
|
|
6083
|
-
let t = setTimeout(() => i((t) => Math.min(t + 1, e.length - 1)),
|
|
6114
|
+
let t = setTimeout(() => i((t) => Math.min(t + 1, e.length - 1)), Ha);
|
|
6084
6115
|
return () => clearTimeout(t);
|
|
6085
6116
|
}, [
|
|
6086
6117
|
s,
|
|
@@ -6088,7 +6119,7 @@ function Ba({ events: e, answerStartedAtMs: t }) {
|
|
|
6088
6119
|
e.length
|
|
6089
6120
|
]);
|
|
6090
6121
|
let u = e[a], d = !s && u.status === "done";
|
|
6091
|
-
|
|
6122
|
+
Va(!d && !t);
|
|
6092
6123
|
let f = e[0]?.startedAtMs, p = d ? null : $i(f ? (t ?? Date.now()) - f : void 0);
|
|
6093
6124
|
return /* @__PURE__ */ c("ul", {
|
|
6094
6125
|
className: "ak-progress__list",
|
|
@@ -6096,7 +6127,7 @@ function Ba({ events: e, answerStartedAtMs: t }) {
|
|
|
6096
6127
|
children: /* @__PURE__ */ l("li", {
|
|
6097
6128
|
className: "ak-progress__item ak-progress__item--active",
|
|
6098
6129
|
children: [
|
|
6099
|
-
d ? /* @__PURE__ */ c(
|
|
6130
|
+
d ? /* @__PURE__ */ c(Wa, {
|
|
6100
6131
|
event: u,
|
|
6101
6132
|
active: !1
|
|
6102
6133
|
}) : /* @__PURE__ */ c("span", {
|
|
@@ -6115,7 +6146,7 @@ function Ba({ events: e, answerStartedAtMs: t }) {
|
|
|
6115
6146
|
})
|
|
6116
6147
|
});
|
|
6117
6148
|
}
|
|
6118
|
-
function
|
|
6149
|
+
function qa({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1, turnMeta: a, answerStartedAtMs: s }) {
|
|
6119
6150
|
let [u, d] = o(!n);
|
|
6120
6151
|
r(() => {
|
|
6121
6152
|
i && d(!n);
|
|
@@ -6134,11 +6165,11 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
|
|
|
6134
6165
|
children: e
|
|
6135
6166
|
})]
|
|
6136
6167
|
})
|
|
6137
|
-
}) : null : f === "detailed" ? /* @__PURE__ */ c(
|
|
6168
|
+
}) : null : f === "detailed" ? /* @__PURE__ */ c(Ga, {
|
|
6138
6169
|
events: t,
|
|
6139
6170
|
live: !0,
|
|
6140
6171
|
answerStartedAtMs: s
|
|
6141
|
-
}) : /* @__PURE__ */ c(
|
|
6172
|
+
}) : /* @__PURE__ */ c(Ka, {
|
|
6142
6173
|
events: t,
|
|
6143
6174
|
answerStartedAtMs: s
|
|
6144
6175
|
});
|
|
@@ -6152,7 +6183,7 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
|
|
|
6152
6183
|
"aria-expanded": u,
|
|
6153
6184
|
"aria-label": u ? "Hide working steps" : "Show working steps",
|
|
6154
6185
|
children: [
|
|
6155
|
-
/* @__PURE__ */ c(
|
|
6186
|
+
/* @__PURE__ */ c(Wa, {
|
|
6156
6187
|
event: {
|
|
6157
6188
|
stage: "",
|
|
6158
6189
|
text: "",
|
|
@@ -6171,9 +6202,9 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
|
|
|
6171
6202
|
t.length === 1 ? "" : "s"
|
|
6172
6203
|
]
|
|
6173
6204
|
}),
|
|
6174
|
-
/* @__PURE__ */ c(
|
|
6205
|
+
/* @__PURE__ */ c(Ua, { up: u })
|
|
6175
6206
|
]
|
|
6176
|
-
}), u && /* @__PURE__ */ c(
|
|
6207
|
+
}), u && /* @__PURE__ */ c(Ga, {
|
|
6177
6208
|
events: t,
|
|
6178
6209
|
live: !1
|
|
6179
6210
|
})]
|
|
@@ -6181,7 +6212,7 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
|
|
|
6181
6212
|
className: "ak-progress",
|
|
6182
6213
|
children: /* @__PURE__ */ l("p", {
|
|
6183
6214
|
className: "ak-progress__summary ak-progress__summary--static",
|
|
6184
|
-
children: [/* @__PURE__ */ c(
|
|
6215
|
+
children: [/* @__PURE__ */ c(Wa, {
|
|
6185
6216
|
event: {
|
|
6186
6217
|
stage: "",
|
|
6187
6218
|
text: "",
|
|
@@ -6194,7 +6225,7 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
|
|
|
6194
6225
|
}) : null;
|
|
6195
6226
|
}
|
|
6196
6227
|
// ../../packages/widget-ui/src/components/MessageBubble.tsx
|
|
6197
|
-
function
|
|
6228
|
+
function Ja() {
|
|
6198
6229
|
return /* @__PURE__ */ c("svg", {
|
|
6199
6230
|
className: "ak-agent-status__icon",
|
|
6200
6231
|
width: "13",
|
|
@@ -6205,18 +6236,18 @@ function Ha() {
|
|
|
6205
6236
|
children: /* @__PURE__ */ c("path", { d: "M12 2C12 2 12.7 8.1 14.5 9.5C16.3 10.9 22 12 22 12C22 12 16.3 13.1 14.5 14.5C12.7 15.9 12 22 12 22C12 22 11.3 15.9 9.5 14.5C7.7 13.1 2 12 2 12C2 12 7.7 10.9 9.5 9.5C11.3 8.1 12 2 12 2Z" })
|
|
6206
6237
|
});
|
|
6207
6238
|
}
|
|
6208
|
-
function
|
|
6239
|
+
function Ya({ status: e }) {
|
|
6209
6240
|
return /* @__PURE__ */ l("div", {
|
|
6210
6241
|
className: "ak-agent-status",
|
|
6211
6242
|
role: "status",
|
|
6212
6243
|
"aria-live": "polite",
|
|
6213
|
-
children: [/* @__PURE__ */ c(
|
|
6244
|
+
children: [/* @__PURE__ */ c(Ja, {}), /* @__PURE__ */ c("span", {
|
|
6214
6245
|
className: "ak-agent-status__text",
|
|
6215
6246
|
children: e
|
|
6216
6247
|
})]
|
|
6217
6248
|
});
|
|
6218
6249
|
}
|
|
6219
|
-
function
|
|
6250
|
+
function Xa({ messageId: e, images: t, onCellClick: n }) {
|
|
6220
6251
|
if (t.length === 0) return null;
|
|
6221
6252
|
let r = t.length;
|
|
6222
6253
|
if (r === 1) {
|
|
@@ -6234,7 +6265,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
|
|
|
6234
6265
|
className: "ak-gallery__img ak-gallery__img--contain"
|
|
6235
6266
|
})
|
|
6236
6267
|
}), /* @__PURE__ */ c("a", {
|
|
6237
|
-
href:
|
|
6268
|
+
href: za(e.downloadHref) ?? void 0,
|
|
6238
6269
|
download: !0,
|
|
6239
6270
|
className: "ak-message__image-dl-icon",
|
|
6240
6271
|
title: "Download image",
|
|
@@ -6264,7 +6295,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
|
|
|
6264
6295
|
}
|
|
6265
6296
|
if (r === 2) return /* @__PURE__ */ c("div", {
|
|
6266
6297
|
className: "ak-gallery ak-gallery--two",
|
|
6267
|
-
children: t.map((t, r) => /* @__PURE__ */ c(
|
|
6298
|
+
children: t.map((t, r) => /* @__PURE__ */ c(Za, {
|
|
6268
6299
|
src: t.src,
|
|
6269
6300
|
alt: t.alt,
|
|
6270
6301
|
onClick: () => n(r)
|
|
@@ -6272,17 +6303,17 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
|
|
|
6272
6303
|
});
|
|
6273
6304
|
if (r === 3) return /* @__PURE__ */ l("div", {
|
|
6274
6305
|
className: "ak-gallery ak-gallery--three",
|
|
6275
|
-
children: [/* @__PURE__ */ c(
|
|
6306
|
+
children: [/* @__PURE__ */ c(Za, {
|
|
6276
6307
|
src: t[0].src,
|
|
6277
6308
|
alt: t[0].alt,
|
|
6278
6309
|
onClick: () => n(0)
|
|
6279
6310
|
}, t[0].key ?? `${e}-0`), /* @__PURE__ */ l("div", {
|
|
6280
6311
|
className: "ak-gallery__col",
|
|
6281
|
-
children: [/* @__PURE__ */ c(
|
|
6312
|
+
children: [/* @__PURE__ */ c(Za, {
|
|
6282
6313
|
src: t[1].src,
|
|
6283
6314
|
alt: t[1].alt,
|
|
6284
6315
|
onClick: () => n(1)
|
|
6285
|
-
}, t[1].key ?? `${e}-1`), /* @__PURE__ */ c(
|
|
6316
|
+
}, t[1].key ?? `${e}-1`), /* @__PURE__ */ c(Za, {
|
|
6286
6317
|
src: t[2].src,
|
|
6287
6318
|
alt: t[2].alt,
|
|
6288
6319
|
onClick: () => n(2)
|
|
@@ -6294,7 +6325,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
|
|
|
6294
6325
|
className: "ak-gallery ak-gallery--grid",
|
|
6295
6326
|
children: i.map((t, r) => {
|
|
6296
6327
|
let o = r === i.length - 1;
|
|
6297
|
-
return /* @__PURE__ */ c(
|
|
6328
|
+
return /* @__PURE__ */ c(Za, {
|
|
6298
6329
|
src: t.src,
|
|
6299
6330
|
alt: t.alt,
|
|
6300
6331
|
overlayCount: o && a > 0 ? a : 0,
|
|
@@ -6303,7 +6334,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
|
|
|
6303
6334
|
})
|
|
6304
6335
|
});
|
|
6305
6336
|
}
|
|
6306
|
-
function
|
|
6337
|
+
function Za({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
|
|
6307
6338
|
return /* @__PURE__ */ l("button", {
|
|
6308
6339
|
type: "button",
|
|
6309
6340
|
onClick: r,
|
|
@@ -6320,7 +6351,7 @@ function Ga({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
|
|
|
6320
6351
|
})]
|
|
6321
6352
|
});
|
|
6322
6353
|
}
|
|
6323
|
-
function
|
|
6354
|
+
function Qa({ images: e, index: t, onClose: n, onIndexChange: i }) {
|
|
6324
6355
|
let a = t !== null, o = a && t !== null ? Math.min(Math.max(0, t), e.length - 1) : 0, u = a ? e[o] : null;
|
|
6325
6356
|
return r(() => {
|
|
6326
6357
|
if (!a) return;
|
|
@@ -6354,7 +6385,7 @@ function Ka({ images: e, index: t, onClose: n, onIndexChange: i }) {
|
|
|
6354
6385
|
]
|
|
6355
6386
|
}),
|
|
6356
6387
|
/* @__PURE__ */ c("a", {
|
|
6357
|
-
href:
|
|
6388
|
+
href: za(u.downloadHref) ?? void 0,
|
|
6358
6389
|
download: !0,
|
|
6359
6390
|
target: "_blank",
|
|
6360
6391
|
rel: "noopener noreferrer",
|
|
@@ -6458,7 +6489,7 @@ function Ka({ images: e, index: t, onClose: n, onIndexChange: i }) {
|
|
|
6458
6489
|
]
|
|
6459
6490
|
});
|
|
6460
6491
|
}
|
|
6461
|
-
function
|
|
6492
|
+
function $a({ url: e, mimeType: t, fileName: n }) {
|
|
6462
6493
|
let r = (() => {
|
|
6463
6494
|
if (n) return n;
|
|
6464
6495
|
try {
|
|
@@ -6484,7 +6515,7 @@ function qa({ url: e, mimeType: t, fileName: n }) {
|
|
|
6484
6515
|
label: i || "FILE"
|
|
6485
6516
|
};
|
|
6486
6517
|
return /* @__PURE__ */ l("a", {
|
|
6487
|
-
href:
|
|
6518
|
+
href: za(e) ?? void 0,
|
|
6488
6519
|
target: "_blank",
|
|
6489
6520
|
rel: "noopener noreferrer",
|
|
6490
6521
|
className: "ak-file-chip",
|
|
@@ -6515,7 +6546,7 @@ function qa({ url: e, mimeType: t, fileName: n }) {
|
|
|
6515
6546
|
})]
|
|
6516
6547
|
});
|
|
6517
6548
|
}
|
|
6518
|
-
function
|
|
6549
|
+
function eo({ url: e, mimeType: t, transcript: n }) {
|
|
6519
6550
|
return /* @__PURE__ */ l("div", {
|
|
6520
6551
|
className: "ak-audio-chip",
|
|
6521
6552
|
children: [/* @__PURE__ */ c("audio", {
|
|
@@ -6533,7 +6564,7 @@ function Ja({ url: e, mimeType: t, transcript: n }) {
|
|
|
6533
6564
|
})]
|
|
6534
6565
|
});
|
|
6535
6566
|
}
|
|
6536
|
-
function
|
|
6567
|
+
function to(e) {
|
|
6537
6568
|
try {
|
|
6538
6569
|
return new Date(e).toLocaleTimeString([], {
|
|
6539
6570
|
hour: "2-digit",
|
|
@@ -6543,12 +6574,12 @@ function Ya(e) {
|
|
|
6543
6574
|
return "";
|
|
6544
6575
|
}
|
|
6545
6576
|
}
|
|
6546
|
-
var
|
|
6577
|
+
var no = /(`[^`\n]+`|\*\*[^*\n]+\*\*|\*[^*\n]+\*|!\[[^\]\n]*\]\([^)\n]+\)|\[[^\]\n]+\]\([^)\n]+\))/g;
|
|
6547
6578
|
function $(e) {
|
|
6548
6579
|
let t = [], n = 0, r = 0;
|
|
6549
|
-
|
|
6580
|
+
no.lastIndex = 0;
|
|
6550
6581
|
let i;
|
|
6551
|
-
for (; (i =
|
|
6582
|
+
for (; (i = no.exec(e)) !== null;) {
|
|
6552
6583
|
i.index > n && t.push(e.slice(n, i.index));
|
|
6553
6584
|
let a = i[0];
|
|
6554
6585
|
if (a.startsWith("`")) t.push(/* @__PURE__ */ c("code", {
|
|
@@ -6558,7 +6589,7 @@ function $(e) {
|
|
|
6558
6589
|
else if (a.startsWith("**")) t.push(/* @__PURE__ */ c("strong", { children: a.slice(2, -2) }, r++));
|
|
6559
6590
|
else if (a.startsWith("*")) t.push(/* @__PURE__ */ c("em", { children: a.slice(1, -1) }, r++));
|
|
6560
6591
|
else if (a.startsWith("![")) {
|
|
6561
|
-
let e = a.match(/!\[([^\]]*)\]\(([^)]+)\)/), n =
|
|
6592
|
+
let e = a.match(/!\[([^\]]*)\]\(([^)]+)\)/), n = za(e?.[2]);
|
|
6562
6593
|
e && n ? t.push(/* @__PURE__ */ c("a", {
|
|
6563
6594
|
href: n,
|
|
6564
6595
|
target: "_blank",
|
|
@@ -6566,7 +6597,7 @@ function $(e) {
|
|
|
6566
6597
|
children: e[1] || "image"
|
|
6567
6598
|
}, r++)) : e && t.push(e[1] || "image");
|
|
6568
6599
|
} else {
|
|
6569
|
-
let e = a.match(/\[(.+?)\]\((.+?)\)/), n =
|
|
6600
|
+
let e = a.match(/\[(.+?)\]\((.+?)\)/), n = za(e?.[2]);
|
|
6570
6601
|
e && n ? t.push(/* @__PURE__ */ c("a", {
|
|
6571
6602
|
href: n,
|
|
6572
6603
|
target: "_blank",
|
|
@@ -6578,8 +6609,8 @@ function $(e) {
|
|
|
6578
6609
|
}
|
|
6579
6610
|
return n < e.length && t.push(e.slice(n)), t;
|
|
6580
6611
|
}
|
|
6581
|
-
function
|
|
6582
|
-
e =
|
|
6612
|
+
function ro(e) {
|
|
6613
|
+
e = Ba(e);
|
|
6583
6614
|
let t = e.split("\n"), n = [], r = 0, i = 0;
|
|
6584
6615
|
for (; r < t.length;) {
|
|
6585
6616
|
let e = t[r], a = e.match(/^(\s*)```/);
|
|
@@ -6748,7 +6779,7 @@ function Za(e) {
|
|
|
6748
6779
|
}
|
|
6749
6780
|
return /* @__PURE__ */ c(s, { children: n });
|
|
6750
6781
|
}
|
|
6751
|
-
function
|
|
6782
|
+
function io({ message: e }) {
|
|
6752
6783
|
let [t, n] = o(null), [r, i] = o(null), a = e.role === "user", s = e.status === "error", u = e.status === "streaming", d = !!(e.images && e.images.length > 0), f = !!(e.documents && e.documents.length > 0), p = (() => {
|
|
6753
6784
|
if (!a) return [];
|
|
6754
6785
|
let t = (e.uploadedAttachments ?? []).filter((e) => e.kind === "image").map((e) => ({
|
|
@@ -6768,7 +6799,7 @@ function Qa({ message: e }) {
|
|
|
6768
6799
|
].filter(Boolean).join(" "), O = T ? e.senderDisplay?.trim() || "Operator" : null, k = O ? O.charAt(0).toUpperCase() : "", A = /* @__PURE__ */ l("div", {
|
|
6769
6800
|
className: D,
|
|
6770
6801
|
children: [
|
|
6771
|
-
g && /* @__PURE__ */ c(
|
|
6802
|
+
g && /* @__PURE__ */ c(Xa, {
|
|
6772
6803
|
messageId: `${e.id}-up`,
|
|
6773
6804
|
images: p.map((e) => ({
|
|
6774
6805
|
src: e.url,
|
|
@@ -6779,7 +6810,7 @@ function Qa({ message: e }) {
|
|
|
6779
6810
|
}),
|
|
6780
6811
|
_ && /* @__PURE__ */ c("div", {
|
|
6781
6812
|
className: "ak-message__files",
|
|
6782
|
-
children: m.map((t, n) => /* @__PURE__ */ c(
|
|
6813
|
+
children: m.map((t, n) => /* @__PURE__ */ c($a, {
|
|
6783
6814
|
url: t.url,
|
|
6784
6815
|
mimeType: t.mimeType,
|
|
6785
6816
|
fileName: t.fileName
|
|
@@ -6787,13 +6818,13 @@ function Qa({ message: e }) {
|
|
|
6787
6818
|
}),
|
|
6788
6819
|
v && /* @__PURE__ */ c("div", {
|
|
6789
6820
|
className: "ak-message__files",
|
|
6790
|
-
children: h.map((t, n) => /* @__PURE__ */ c(
|
|
6821
|
+
children: h.map((t, n) => /* @__PURE__ */ c(eo, {
|
|
6791
6822
|
url: t.url,
|
|
6792
6823
|
mimeType: t.mimeType,
|
|
6793
6824
|
transcript: n === 0 ? b?.transcript ?? null : null
|
|
6794
6825
|
}, `${e.id}-up-audio-${n}`))
|
|
6795
6826
|
}),
|
|
6796
|
-
d && /* @__PURE__ */ c(
|
|
6827
|
+
d && /* @__PURE__ */ c(Xa, {
|
|
6797
6828
|
messageId: `${e.id}-asst`,
|
|
6798
6829
|
images: e.images.map((e, t) => {
|
|
6799
6830
|
let n = e.url ?? (e.base64 ? `data:${e.mimeType};base64,${e.base64}` : null);
|
|
@@ -6808,7 +6839,7 @@ function Qa({ message: e }) {
|
|
|
6808
6839
|
}),
|
|
6809
6840
|
f && /* @__PURE__ */ c("div", {
|
|
6810
6841
|
className: "ak-message__files",
|
|
6811
|
-
children: e.documents.map((t, n) => t.url ? /* @__PURE__ */ c(
|
|
6842
|
+
children: e.documents.map((t, n) => t.url ? /* @__PURE__ */ c($a, {
|
|
6812
6843
|
url: t.url,
|
|
6813
6844
|
mimeType: t.mimeType,
|
|
6814
6845
|
fileName: t.fileName
|
|
@@ -6816,7 +6847,7 @@ function Qa({ message: e }) {
|
|
|
6816
6847
|
}),
|
|
6817
6848
|
x && /* @__PURE__ */ l("div", {
|
|
6818
6849
|
className: y ? "ak-message__image-caption" : void 0,
|
|
6819
|
-
children: [w ?
|
|
6850
|
+
children: [w ? ro(x) : x, u && /* @__PURE__ */ l("span", {
|
|
6820
6851
|
className: "ak-cursor",
|
|
6821
6852
|
"aria-hidden": "true",
|
|
6822
6853
|
children: [
|
|
@@ -6828,14 +6859,14 @@ function Qa({ message: e }) {
|
|
|
6828
6859
|
}),
|
|
6829
6860
|
/* @__PURE__ */ c("span", {
|
|
6830
6861
|
className: "ak-message__time",
|
|
6831
|
-
children:
|
|
6862
|
+
children: to(e.createdAt)
|
|
6832
6863
|
})
|
|
6833
6864
|
]
|
|
6834
6865
|
}), ee = !!e.content || y || _ || f || !u && !e.toolStatus;
|
|
6835
6866
|
return /* @__PURE__ */ l("div", {
|
|
6836
6867
|
className: `ak-message ${E}`,
|
|
6837
6868
|
children: [
|
|
6838
|
-
!a && (e.ackText || e.progressEvents && e.progressEvents.length > 0 || e.turnMeta) && /* @__PURE__ */ c(
|
|
6869
|
+
!a && (e.ackText || e.progressEvents && e.progressEvents.length > 0 || e.turnMeta) && /* @__PURE__ */ c(qa, {
|
|
6839
6870
|
ackText: e.ackText,
|
|
6840
6871
|
events: e.progressEvents,
|
|
6841
6872
|
collapsed: e.progressCollapsed,
|
|
@@ -6853,7 +6884,7 @@ function Qa({ message: e }) {
|
|
|
6853
6884
|
/* @__PURE__ */ c("span", { className: "ak-typing-row__dot" })
|
|
6854
6885
|
]
|
|
6855
6886
|
}),
|
|
6856
|
-
!a && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ c(
|
|
6887
|
+
!a && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ c(Ya, { status: e.toolStatus }),
|
|
6857
6888
|
T && /* @__PURE__ */ l("span", {
|
|
6858
6889
|
className: "ak-message__sender-label",
|
|
6859
6890
|
children: [/* @__PURE__ */ c("span", {
|
|
@@ -6866,7 +6897,7 @@ function Qa({ message: e }) {
|
|
|
6866
6897
|
})]
|
|
6867
6898
|
}),
|
|
6868
6899
|
ee && A,
|
|
6869
|
-
p.length > 0 && /* @__PURE__ */ c(
|
|
6900
|
+
p.length > 0 && /* @__PURE__ */ c(Qa, {
|
|
6870
6901
|
images: p.map((e) => ({
|
|
6871
6902
|
src: e.url,
|
|
6872
6903
|
alt: e.fileName ?? "Uploaded image",
|
|
@@ -6876,7 +6907,7 @@ function Qa({ message: e }) {
|
|
|
6876
6907
|
onClose: () => n(null),
|
|
6877
6908
|
onIndexChange: n
|
|
6878
6909
|
}),
|
|
6879
|
-
d && /* @__PURE__ */ c(
|
|
6910
|
+
d && /* @__PURE__ */ c(Qa, {
|
|
6880
6911
|
images: e.images.map((e) => {
|
|
6881
6912
|
let t = e.url ?? (e.base64 ? `data:${e.mimeType};base64,${e.base64}` : null);
|
|
6882
6913
|
return t ? {
|
|
@@ -6893,7 +6924,7 @@ function Qa({ message: e }) {
|
|
|
6893
6924
|
});
|
|
6894
6925
|
}
|
|
6895
6926
|
// ../../packages/widget-ui/src/components/TypingIndicator.tsx
|
|
6896
|
-
function
|
|
6927
|
+
function ao() {
|
|
6897
6928
|
return /* @__PURE__ */ l("div", {
|
|
6898
6929
|
className: "ak-typing",
|
|
6899
6930
|
"aria-label": "Assistant is typing",
|
|
@@ -6905,7 +6936,7 @@ function $a() {
|
|
|
6905
6936
|
});
|
|
6906
6937
|
}
|
|
6907
6938
|
// ../../packages/widget-ui/src/components/MessageList.tsx
|
|
6908
|
-
function
|
|
6939
|
+
function oo(e, t) {
|
|
6909
6940
|
let n = [], r = null;
|
|
6910
6941
|
for (let i of e) {
|
|
6911
6942
|
if (i.role === "assistant") {
|
|
@@ -6923,8 +6954,8 @@ function eo(e, t) {
|
|
|
6923
6954
|
}
|
|
6924
6955
|
return n;
|
|
6925
6956
|
}
|
|
6926
|
-
function
|
|
6927
|
-
let o = a(null), s = a(null), u = a(!0), d = i(() =>
|
|
6957
|
+
function so({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }) {
|
|
6958
|
+
let o = a(null), s = a(null), u = a(!0), d = i(() => oo(e, n), [e, n]);
|
|
6928
6959
|
r(() => {
|
|
6929
6960
|
if (!(o.current?.parentElement ?? o.current)) return;
|
|
6930
6961
|
let e = (e) => {
|
|
@@ -6954,17 +6985,17 @@ function to({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }
|
|
|
6954
6985
|
className: "ak-handoff-divider__label",
|
|
6955
6986
|
children: e.label
|
|
6956
6987
|
})
|
|
6957
|
-
}, e.id) : /* @__PURE__ */ c(
|
|
6958
|
-
t && !e.some((e) => e.status === "streaming") && /* @__PURE__ */ c(
|
|
6988
|
+
}, e.id) : /* @__PURE__ */ c(io, { message: e.message }, e.message.id)),
|
|
6989
|
+
t && !e.some((e) => e.status === "streaming") && /* @__PURE__ */ c(ao, {}),
|
|
6959
6990
|
/* @__PURE__ */ c("div", { ref: s })
|
|
6960
6991
|
]
|
|
6961
6992
|
});
|
|
6962
6993
|
}
|
|
6963
6994
|
// ../../packages/widget-ui/src/components/EmptyState.tsx
|
|
6964
|
-
function
|
|
6965
|
-
return /* @__PURE__ */
|
|
6966
|
-
width: "
|
|
6967
|
-
height: "
|
|
6995
|
+
function co() {
|
|
6996
|
+
return /* @__PURE__ */ c("svg", {
|
|
6997
|
+
width: "14",
|
|
6998
|
+
height: "14",
|
|
6968
6999
|
viewBox: "0 0 24 24",
|
|
6969
7000
|
fill: "none",
|
|
6970
7001
|
stroke: "currentColor",
|
|
@@ -6972,92 +7003,37 @@ function no() {
|
|
|
6972
7003
|
strokeLinecap: "round",
|
|
6973
7004
|
strokeLinejoin: "round",
|
|
6974
7005
|
"aria-hidden": "true",
|
|
6975
|
-
children:
|
|
6976
|
-
/* @__PURE__ */ c("rect", {
|
|
6977
|
-
x: "3",
|
|
6978
|
-
y: "11",
|
|
6979
|
-
width: "18",
|
|
6980
|
-
height: "10",
|
|
6981
|
-
rx: "2"
|
|
6982
|
-
}),
|
|
6983
|
-
/* @__PURE__ */ c("circle", {
|
|
6984
|
-
cx: "12",
|
|
6985
|
-
cy: "5",
|
|
6986
|
-
r: "2"
|
|
6987
|
-
}),
|
|
6988
|
-
/* @__PURE__ */ c("path", { d: "M12 7v4" }),
|
|
6989
|
-
/* @__PURE__ */ c("line", {
|
|
6990
|
-
x1: "8",
|
|
6991
|
-
y1: "16",
|
|
6992
|
-
x2: "8",
|
|
6993
|
-
y2: "16"
|
|
6994
|
-
}),
|
|
6995
|
-
/* @__PURE__ */ c("line", {
|
|
6996
|
-
x1: "16",
|
|
6997
|
-
y1: "16",
|
|
6998
|
-
x2: "16",
|
|
6999
|
-
y2: "16"
|
|
7000
|
-
})
|
|
7001
|
-
]
|
|
7006
|
+
children: /* @__PURE__ */ c("path", { d: "M5 12h14M13 6l6 6-6 6" })
|
|
7002
7007
|
});
|
|
7003
7008
|
}
|
|
7004
|
-
function
|
|
7005
|
-
let
|
|
7009
|
+
function lo({ description: e, suggestedQuestions: t, onSelect: n }) {
|
|
7010
|
+
let r = (t ?? []).filter((e) => (e.title ?? "").trim().length > 0);
|
|
7006
7011
|
return /* @__PURE__ */ l("div", {
|
|
7007
7012
|
className: "ak-empty-state",
|
|
7008
7013
|
"aria-label": "Start a conversation",
|
|
7009
|
-
children: [
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
/* @__PURE__ */ l("
|
|
7015
|
-
className: "ak-empty-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
children: /* @__PURE__ */ c(no, {})
|
|
7028
|
-
})
|
|
7029
|
-
}),
|
|
7030
|
-
/* @__PURE__ */ c("p", {
|
|
7031
|
-
className: "ak-empty-state__title",
|
|
7032
|
-
children: e
|
|
7033
|
-
}),
|
|
7034
|
-
t && /* @__PURE__ */ c("p", {
|
|
7035
|
-
className: "ak-empty-state__description",
|
|
7036
|
-
children: t
|
|
7037
|
-
})
|
|
7038
|
-
]
|
|
7039
|
-
}),
|
|
7040
|
-
a.length > 0 && /* @__PURE__ */ c("div", {
|
|
7041
|
-
className: "ak-empty-state__suggestions",
|
|
7042
|
-
children: a.map((e, t) => /* @__PURE__ */ l("button", {
|
|
7043
|
-
className: "ak-empty-state__suggestion",
|
|
7044
|
-
onClick: () => i?.(e.prompt ?? e.title),
|
|
7045
|
-
type: "button",
|
|
7046
|
-
children: [/* @__PURE__ */ c("span", {
|
|
7047
|
-
className: "ak-empty-state__suggestion-title",
|
|
7048
|
-
children: e.title
|
|
7049
|
-
}), e.description && /* @__PURE__ */ c("span", {
|
|
7050
|
-
className: "ak-empty-state__suggestion-desc",
|
|
7051
|
-
children: e.description
|
|
7052
|
-
})]
|
|
7053
|
-
}, t))
|
|
7054
|
-
})
|
|
7055
|
-
]
|
|
7014
|
+
children: [e && /* @__PURE__ */ c("p", {
|
|
7015
|
+
className: "ak-empty-state__description",
|
|
7016
|
+
children: e
|
|
7017
|
+
}), r.length > 0 && /* @__PURE__ */ c("div", {
|
|
7018
|
+
className: "ak-empty-state__suggestions",
|
|
7019
|
+
children: r.map((e, t) => /* @__PURE__ */ l("button", {
|
|
7020
|
+
className: "ak-empty-state__suggestion",
|
|
7021
|
+
onClick: () => n?.(e.prompt ?? e.title),
|
|
7022
|
+
type: "button",
|
|
7023
|
+
children: [/* @__PURE__ */ l("span", {
|
|
7024
|
+
className: "ak-empty-state__suggestion-title",
|
|
7025
|
+
children: [e.title, /* @__PURE__ */ c(co, {})]
|
|
7026
|
+
}), e.description && /* @__PURE__ */ c("span", {
|
|
7027
|
+
className: "ak-empty-state__suggestion-desc",
|
|
7028
|
+
children: e.description
|
|
7029
|
+
})]
|
|
7030
|
+
}, t))
|
|
7031
|
+
})]
|
|
7056
7032
|
});
|
|
7057
7033
|
}
|
|
7058
7034
|
// ../../packages/widget-ui/src/components/Composer.tsx
|
|
7059
|
-
var
|
|
7060
|
-
function
|
|
7035
|
+
var uo = "https://klicforge.ai/privacy-policy", fo = "https://klicforge.ai/terms-of-service";
|
|
7036
|
+
function po() {
|
|
7061
7037
|
return /* @__PURE__ */ l("svg", {
|
|
7062
7038
|
width: "16",
|
|
7063
7039
|
height: "16",
|
|
@@ -7075,7 +7051,7 @@ function oo() {
|
|
|
7075
7051
|
}), /* @__PURE__ */ c("polyline", { points: "5 12 12 5 19 12" })]
|
|
7076
7052
|
});
|
|
7077
7053
|
}
|
|
7078
|
-
function
|
|
7054
|
+
function mo() {
|
|
7079
7055
|
return /* @__PURE__ */ l("svg", {
|
|
7080
7056
|
width: "20",
|
|
7081
7057
|
height: "20",
|
|
@@ -7097,7 +7073,7 @@ function so() {
|
|
|
7097
7073
|
})]
|
|
7098
7074
|
});
|
|
7099
7075
|
}
|
|
7100
|
-
function
|
|
7076
|
+
function ho() {
|
|
7101
7077
|
return /* @__PURE__ */ l("svg", {
|
|
7102
7078
|
width: "14",
|
|
7103
7079
|
height: "14",
|
|
@@ -7114,7 +7090,7 @@ function co() {
|
|
|
7114
7090
|
})]
|
|
7115
7091
|
});
|
|
7116
7092
|
}
|
|
7117
|
-
function
|
|
7093
|
+
function go() {
|
|
7118
7094
|
return /* @__PURE__ */ l("svg", {
|
|
7119
7095
|
width: "14",
|
|
7120
7096
|
height: "14",
|
|
@@ -7127,7 +7103,7 @@ function lo() {
|
|
|
7127
7103
|
children: [/* @__PURE__ */ c("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), /* @__PURE__ */ c("polyline", { points: "14 2 14 8 20 8" })]
|
|
7128
7104
|
});
|
|
7129
7105
|
}
|
|
7130
|
-
function
|
|
7106
|
+
function _o() {
|
|
7131
7107
|
return /* @__PURE__ */ l("svg", {
|
|
7132
7108
|
width: "10",
|
|
7133
7109
|
height: "10",
|
|
@@ -7150,7 +7126,7 @@ function uo() {
|
|
|
7150
7126
|
})]
|
|
7151
7127
|
});
|
|
7152
7128
|
}
|
|
7153
|
-
function
|
|
7129
|
+
function vo() {
|
|
7154
7130
|
return /* @__PURE__ */ l("svg", {
|
|
7155
7131
|
width: "20",
|
|
7156
7132
|
height: "20",
|
|
@@ -7178,7 +7154,7 @@ function fo() {
|
|
|
7178
7154
|
]
|
|
7179
7155
|
});
|
|
7180
7156
|
}
|
|
7181
|
-
function
|
|
7157
|
+
function yo() {
|
|
7182
7158
|
return /* @__PURE__ */ c("svg", {
|
|
7183
7159
|
width: "12",
|
|
7184
7160
|
height: "12",
|
|
@@ -7193,46 +7169,46 @@ function po() {
|
|
|
7193
7169
|
})
|
|
7194
7170
|
});
|
|
7195
7171
|
}
|
|
7196
|
-
var
|
|
7172
|
+
var bo = [
|
|
7197
7173
|
"application/pdf",
|
|
7198
7174
|
"text/markdown",
|
|
7199
7175
|
"text/plain",
|
|
7200
7176
|
"text/csv"
|
|
7201
|
-
],
|
|
7177
|
+
], xo = [
|
|
7202
7178
|
".pdf",
|
|
7203
7179
|
".md",
|
|
7204
7180
|
".txt",
|
|
7205
7181
|
".csv"
|
|
7206
|
-
],
|
|
7182
|
+
], So = [...xo, ...bo].join(","), Co = [
|
|
7207
7183
|
"image/jpeg",
|
|
7208
7184
|
"image/png",
|
|
7209
7185
|
"image/gif",
|
|
7210
7186
|
"image/webp"
|
|
7211
|
-
],
|
|
7187
|
+
], wo = Co.join(","), To = [
|
|
7212
7188
|
"audio/webm;codecs=opus",
|
|
7213
7189
|
"audio/webm",
|
|
7214
7190
|
"audio/mp4",
|
|
7215
7191
|
"audio/ogg;codecs=opus"
|
|
7216
7192
|
];
|
|
7217
|
-
function
|
|
7218
|
-
return typeof MediaRecorder > "u" ? null :
|
|
7193
|
+
function Eo() {
|
|
7194
|
+
return typeof MediaRecorder > "u" ? null : To.find((e) => MediaRecorder.isTypeSupported(e)) ?? null;
|
|
7219
7195
|
}
|
|
7220
|
-
function
|
|
7196
|
+
function Do(e) {
|
|
7221
7197
|
return e.includes("mp4") ? "mp4" : e.includes("ogg") ? "ogg" : "webm";
|
|
7222
7198
|
}
|
|
7223
|
-
function
|
|
7199
|
+
function Oo(e) {
|
|
7224
7200
|
let t = Math.floor(e / 1e3), n = Math.floor(t / 60), r = t % 60;
|
|
7225
7201
|
return `${n}:${String(r).padStart(2, "0")}`;
|
|
7226
7202
|
}
|
|
7227
|
-
function
|
|
7228
|
-
if (
|
|
7203
|
+
function ko(e) {
|
|
7204
|
+
if (bo.includes(e.type)) return !0;
|
|
7229
7205
|
let t = e.name.toLowerCase();
|
|
7230
|
-
return
|
|
7206
|
+
return xo.some((e) => t.endsWith(e));
|
|
7231
7207
|
}
|
|
7232
|
-
function
|
|
7233
|
-
return
|
|
7208
|
+
function Ao(e) {
|
|
7209
|
+
return Co.includes(e.type);
|
|
7234
7210
|
}
|
|
7235
|
-
function
|
|
7211
|
+
function jo({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…", photoSendingEnabled: d = !1, fileUploadEnabled: f = !1, voiceNoteEnabled: p = !1, voiceNoteMaxDurationSec: m = 120, attachmentMaxCount: h = 5, attachmentMaxFileSizeMb: g = 1, onRecordingError: _ }) {
|
|
7236
7212
|
let [v, y] = o(""), [b, x] = o([]), [S, C] = o(/* @__PURE__ */ new Map()), [w, T] = o(!1), [E, D] = o(!1), [O, k] = o(0), A = a(null), ee = a(null), j = a(null), M = a(null), te = a(null), ne = a(null), N = a(null), re = a([]), ie = a(null), ae = a(0), oe = a(null), se = a(!1), ce = a(!1), le = a(v);
|
|
7237
7213
|
le.current = v;
|
|
7238
7214
|
let ue = a(b);
|
|
@@ -7295,7 +7271,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7295
7271
|
_?.(`Only ${h} attachments can be sent at once`);
|
|
7296
7272
|
return;
|
|
7297
7273
|
}
|
|
7298
|
-
let n =
|
|
7274
|
+
let n = Eo();
|
|
7299
7275
|
if (!n) {
|
|
7300
7276
|
_?.("Voice recording is not supported in this browser");
|
|
7301
7277
|
return;
|
|
@@ -7316,7 +7292,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7316
7292
|
xe();
|
|
7317
7293
|
let t = se.current, r = Date.now() - ae.current, i = new Blob(re.current, { type: n });
|
|
7318
7294
|
if (re.current = [], t || r < 300 || de.current) return;
|
|
7319
|
-
let a = new File([i], `voice-note.${
|
|
7295
|
+
let a = new File([i], `voice-note.${Do(n)}`, { type: n }), o = le.current.trim(), s = [...ue.current, {
|
|
7320
7296
|
file: a,
|
|
7321
7297
|
kind: "audio",
|
|
7322
7298
|
durationMs: r
|
|
@@ -7340,7 +7316,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7340
7316
|
function Ee(e, t) {
|
|
7341
7317
|
if (e.length === 0) return;
|
|
7342
7318
|
let n = [], r = [];
|
|
7343
|
-
for (let i of e) t === "image" && !
|
|
7319
|
+
for (let i of e) t === "image" && !Ao(i) ? r.push(`${i.name} (image type not supported)`) : t === "file" && !ko(i) ? r.push(`${i.name} (file type not supported)`) : i.size > pe ? r.push(`${i.name} (over ${g} MB)`) : n.push({
|
|
7344
7320
|
file: i,
|
|
7345
7321
|
kind: t
|
|
7346
7322
|
});
|
|
@@ -7381,14 +7357,14 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7381
7357
|
type: "button",
|
|
7382
7358
|
role: "menuitem",
|
|
7383
7359
|
disabled: t,
|
|
7384
|
-
children: [/* @__PURE__ */ c(
|
|
7360
|
+
children: [/* @__PURE__ */ c(ho, {}), /* @__PURE__ */ c("span", { children: "Photo" })]
|
|
7385
7361
|
}), f && /* @__PURE__ */ l("button", {
|
|
7386
7362
|
className: "ak-composer__attach-menu-item",
|
|
7387
7363
|
onClick: Ae,
|
|
7388
7364
|
type: "button",
|
|
7389
7365
|
role: "menuitem",
|
|
7390
7366
|
disabled: t,
|
|
7391
|
-
children: [/* @__PURE__ */ c(
|
|
7367
|
+
children: [/* @__PURE__ */ c(go, {}), /* @__PURE__ */ c("span", { children: "File" })]
|
|
7392
7368
|
})]
|
|
7393
7369
|
}),
|
|
7394
7370
|
b.length > 0 && /* @__PURE__ */ c("div", {
|
|
@@ -7411,7 +7387,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7411
7387
|
type: "button",
|
|
7412
7388
|
"aria-label": `Remove ${e.file.name}`,
|
|
7413
7389
|
disabled: t,
|
|
7414
|
-
children: /* @__PURE__ */ c(
|
|
7390
|
+
children: /* @__PURE__ */ c(_o, {})
|
|
7415
7391
|
})]
|
|
7416
7392
|
}, r);
|
|
7417
7393
|
}
|
|
@@ -7419,7 +7395,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7419
7395
|
className: "ak-composer__file-chip",
|
|
7420
7396
|
role: "listitem",
|
|
7421
7397
|
children: [
|
|
7422
|
-
/* @__PURE__ */ c(
|
|
7398
|
+
/* @__PURE__ */ c(go, {}),
|
|
7423
7399
|
/* @__PURE__ */ c("span", {
|
|
7424
7400
|
className: "ak-composer__file-chip-name",
|
|
7425
7401
|
title: e.file.name,
|
|
@@ -7431,7 +7407,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7431
7407
|
type: "button",
|
|
7432
7408
|
"aria-label": `Remove ${e.file.name}`,
|
|
7433
7409
|
disabled: t,
|
|
7434
|
-
children: /* @__PURE__ */ c(
|
|
7410
|
+
children: /* @__PURE__ */ c(_o, {})
|
|
7435
7411
|
})
|
|
7436
7412
|
]
|
|
7437
7413
|
}, r);
|
|
@@ -7441,7 +7417,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7441
7417
|
ref: ee,
|
|
7442
7418
|
type: "file",
|
|
7443
7419
|
multiple: !0,
|
|
7444
|
-
accept:
|
|
7420
|
+
accept: wo,
|
|
7445
7421
|
className: "ak-composer__file-input",
|
|
7446
7422
|
onChange: De,
|
|
7447
7423
|
disabled: t,
|
|
@@ -7450,7 +7426,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7450
7426
|
ref: j,
|
|
7451
7427
|
type: "file",
|
|
7452
7428
|
multiple: !0,
|
|
7453
|
-
accept:
|
|
7429
|
+
accept: So,
|
|
7454
7430
|
className: "ak-composer__file-input",
|
|
7455
7431
|
onChange: Oe,
|
|
7456
7432
|
disabled: t,
|
|
@@ -7466,11 +7442,11 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7466
7442
|
onClick: () => Ce(!0),
|
|
7467
7443
|
"aria-label": "Cancel recording",
|
|
7468
7444
|
type: "button",
|
|
7469
|
-
children: /* @__PURE__ */ c(
|
|
7445
|
+
children: /* @__PURE__ */ c(_o, {})
|
|
7470
7446
|
}),
|
|
7471
7447
|
/* @__PURE__ */ l("span", {
|
|
7472
7448
|
className: "ak-composer__recording-timer",
|
|
7473
|
-
children: [/* @__PURE__ */ c("span", { className: "ak-composer__recording-dot" }),
|
|
7449
|
+
children: [/* @__PURE__ */ c("span", { className: "ak-composer__recording-dot" }), Oo(O)]
|
|
7474
7450
|
}),
|
|
7475
7451
|
/* @__PURE__ */ c("button", {
|
|
7476
7452
|
ref: ne,
|
|
@@ -7478,7 +7454,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7478
7454
|
onClick: () => Ce(!1),
|
|
7479
7455
|
"aria-label": "Stop recording",
|
|
7480
7456
|
type: "button",
|
|
7481
|
-
children: /* @__PURE__ */ c(
|
|
7457
|
+
children: /* @__PURE__ */ c(yo, {})
|
|
7482
7458
|
})
|
|
7483
7459
|
]
|
|
7484
7460
|
}) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", {
|
|
@@ -7500,7 +7476,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7500
7476
|
"aria-label": b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
|
|
7501
7477
|
title: b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
|
|
7502
7478
|
type: "button",
|
|
7503
|
-
children: /* @__PURE__ */ c(
|
|
7479
|
+
children: /* @__PURE__ */ c(vo, {})
|
|
7504
7480
|
})]
|
|
7505
7481
|
}), /* @__PURE__ */ l("div", {
|
|
7506
7482
|
className: "ak-composer__toolbar",
|
|
@@ -7515,7 +7491,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7515
7491
|
"aria-haspopup": "true",
|
|
7516
7492
|
"aria-expanded": w,
|
|
7517
7493
|
type: "button",
|
|
7518
|
-
children: /* @__PURE__ */ c(
|
|
7494
|
+
children: /* @__PURE__ */ c(mo, {})
|
|
7519
7495
|
})
|
|
7520
7496
|
}), /* @__PURE__ */ c("button", {
|
|
7521
7497
|
className: "ak-composer__send",
|
|
@@ -7523,7 +7499,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7523
7499
|
disabled: !je,
|
|
7524
7500
|
"aria-label": "Send message",
|
|
7525
7501
|
type: "button",
|
|
7526
|
-
children: /* @__PURE__ */ c(
|
|
7502
|
+
children: /* @__PURE__ */ c(po, {})
|
|
7527
7503
|
})]
|
|
7528
7504
|
})] })
|
|
7529
7505
|
}),
|
|
@@ -7533,7 +7509,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7533
7509
|
"By chatting you agree to our",
|
|
7534
7510
|
" ",
|
|
7535
7511
|
/* @__PURE__ */ c("a", {
|
|
7536
|
-
href:
|
|
7512
|
+
href: uo,
|
|
7537
7513
|
target: "_blank",
|
|
7538
7514
|
rel: "noopener noreferrer",
|
|
7539
7515
|
children: "Privacy Policy"
|
|
@@ -7542,7 +7518,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7542
7518
|
"and",
|
|
7543
7519
|
" ",
|
|
7544
7520
|
/* @__PURE__ */ c("a", {
|
|
7545
|
-
href:
|
|
7521
|
+
href: fo,
|
|
7546
7522
|
target: "_blank",
|
|
7547
7523
|
rel: "noopener noreferrer",
|
|
7548
7524
|
children: "Terms of Service"
|
|
@@ -7555,7 +7531,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
|
|
|
7555
7531
|
});
|
|
7556
7532
|
}
|
|
7557
7533
|
// ../../packages/widget-ui/src/components/ErrorState.tsx
|
|
7558
|
-
function
|
|
7534
|
+
function Mo({ message: e }) {
|
|
7559
7535
|
return e.includes("Origin not allowed") ? /* @__PURE__ */ l("div", {
|
|
7560
7536
|
className: "ak-error ak-error--origin",
|
|
7561
7537
|
role: "alert",
|
|
@@ -7588,7 +7564,7 @@ function Eo({ message: e }) {
|
|
|
7588
7564
|
});
|
|
7589
7565
|
}
|
|
7590
7566
|
// ../../packages/widget-ui/src/components/MaintenanceState.tsx
|
|
7591
|
-
function
|
|
7567
|
+
function No() {
|
|
7592
7568
|
return /* @__PURE__ */ l("svg", {
|
|
7593
7569
|
width: "28",
|
|
7594
7570
|
height: "28",
|
|
@@ -7606,7 +7582,7 @@ function Do() {
|
|
|
7606
7582
|
}), /* @__PURE__ */ c("path", { d: "M12 7v5l3 2" })]
|
|
7607
7583
|
});
|
|
7608
7584
|
}
|
|
7609
|
-
function
|
|
7585
|
+
function Po() {
|
|
7610
7586
|
return /* @__PURE__ */ l("div", {
|
|
7611
7587
|
className: "ak-maintenance",
|
|
7612
7588
|
role: "status",
|
|
@@ -7618,7 +7594,7 @@ function Oo() {
|
|
|
7618
7594
|
}),
|
|
7619
7595
|
/* @__PURE__ */ c("div", {
|
|
7620
7596
|
className: "ak-maintenance__icon",
|
|
7621
|
-
children: /* @__PURE__ */ c(
|
|
7597
|
+
children: /* @__PURE__ */ c(No, {})
|
|
7622
7598
|
}),
|
|
7623
7599
|
/* @__PURE__ */ c("p", {
|
|
7624
7600
|
className: "ak-maintenance__title",
|
|
@@ -7632,30 +7608,23 @@ function Oo() {
|
|
|
7632
7608
|
});
|
|
7633
7609
|
}
|
|
7634
7610
|
// ../../packages/widget-ui/src/components/WidgetShell.tsx
|
|
7635
|
-
function
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7611
|
+
function Fo() {
|
|
7612
|
+
let [e, t] = o(!1);
|
|
7613
|
+
return e ? null : /* @__PURE__ */ c("img", {
|
|
7614
|
+
src: Pa,
|
|
7615
|
+
width: 14,
|
|
7616
|
+
height: 14,
|
|
7617
|
+
alt: "",
|
|
7641
7618
|
"aria-hidden": "true",
|
|
7642
7619
|
className: "ak-branding__logo",
|
|
7643
|
-
|
|
7644
|
-
width: "24",
|
|
7645
|
-
height: "24",
|
|
7646
|
-
rx: "5",
|
|
7647
|
-
fill: "currentColor"
|
|
7648
|
-
}), /* @__PURE__ */ c("path", {
|
|
7649
|
-
d: "M12 5L7 13h3.5v6l6.5-9H13.5V5z",
|
|
7650
|
-
fill: "white"
|
|
7651
|
-
})]
|
|
7620
|
+
onError: () => t(!0)
|
|
7652
7621
|
});
|
|
7653
7622
|
}
|
|
7654
|
-
function
|
|
7623
|
+
function Io() {
|
|
7655
7624
|
return /* @__PURE__ */ l("div", {
|
|
7656
7625
|
className: "ak-branding",
|
|
7657
7626
|
children: [
|
|
7658
|
-
/* @__PURE__ */ c(
|
|
7627
|
+
/* @__PURE__ */ c(Fo, {}),
|
|
7659
7628
|
/* @__PURE__ */ c("span", {
|
|
7660
7629
|
className: "ak-branding__label",
|
|
7661
7630
|
children: "Powered by"
|
|
@@ -7667,7 +7636,7 @@ function Ao() {
|
|
|
7667
7636
|
]
|
|
7668
7637
|
});
|
|
7669
7638
|
}
|
|
7670
|
-
function
|
|
7639
|
+
function Lo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initStatus: a, initError: u, callbacks: d }) {
|
|
7671
7640
|
let [f, p] = o(null);
|
|
7672
7641
|
return /* @__PURE__ */ l("div", {
|
|
7673
7642
|
className: i ? "ak-shell-wrap" : "ak-shell-wrap ak-shell-enter",
|
|
@@ -7676,13 +7645,14 @@ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
|
|
|
7676
7645
|
role: "dialog",
|
|
7677
7646
|
"aria-label": e.title,
|
|
7678
7647
|
children: [
|
|
7679
|
-
/* @__PURE__ */ c(
|
|
7648
|
+
/* @__PURE__ */ c(Ra, {
|
|
7680
7649
|
title: e.title,
|
|
7681
7650
|
subtitle: e.subtitle,
|
|
7682
7651
|
avatarUrl: e.avatarUrl,
|
|
7683
7652
|
onClose: d.onClose,
|
|
7684
7653
|
onReset: a === "ready" ? d.onReset : void 0,
|
|
7685
|
-
hideClose: i
|
|
7654
|
+
hideClose: i,
|
|
7655
|
+
compact: a === "ready" && t.length > 0
|
|
7686
7656
|
}),
|
|
7687
7657
|
a === "validating" && /* @__PURE__ */ c("div", {
|
|
7688
7658
|
className: "ak-init-status",
|
|
@@ -7693,25 +7663,23 @@ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
|
|
|
7693
7663
|
}),
|
|
7694
7664
|
a === "error" && /* @__PURE__ */ c("div", {
|
|
7695
7665
|
className: "ak-init-status ak-init-status--error",
|
|
7696
|
-
children: /* @__PURE__ */ c(
|
|
7666
|
+
children: /* @__PURE__ */ c(Mo, { message: u ?? "Widget configuration is invalid." })
|
|
7697
7667
|
}),
|
|
7698
7668
|
a === "disabled" && /* @__PURE__ */ c("div", {
|
|
7699
7669
|
className: "ak-init-status ak-init-status--maintenance",
|
|
7700
|
-
children: /* @__PURE__ */ c(
|
|
7670
|
+
children: /* @__PURE__ */ c(Po, {})
|
|
7701
7671
|
}),
|
|
7702
7672
|
a === "ready" && /* @__PURE__ */ l(s, { children: [
|
|
7703
|
-
t.length === 0 ? /* @__PURE__ */ c(
|
|
7704
|
-
|
|
7705
|
-
description: e.description ?? e.subtitle,
|
|
7673
|
+
t.length === 0 ? /* @__PURE__ */ c(lo, {
|
|
7674
|
+
description: e.description,
|
|
7706
7675
|
suggestedQuestions: e.suggestedQuestions,
|
|
7707
|
-
avatarUrl: e.avatarUrl,
|
|
7708
7676
|
onSelect: (e) => d.onSendMessage(e, [])
|
|
7709
|
-
}) : /* @__PURE__ */ c(
|
|
7677
|
+
}) : /* @__PURE__ */ c(so, {
|
|
7710
7678
|
messages: t,
|
|
7711
7679
|
isLoading: n
|
|
7712
7680
|
}),
|
|
7713
|
-
(r || f) && /* @__PURE__ */ c(
|
|
7714
|
-
/* @__PURE__ */ c(
|
|
7681
|
+
(r || f) && /* @__PURE__ */ c(Mo, { message: r ?? f }),
|
|
7682
|
+
/* @__PURE__ */ c(jo, {
|
|
7715
7683
|
onSend: (e, t) => {
|
|
7716
7684
|
p(null), d.onSendMessage(e, t);
|
|
7717
7685
|
},
|
|
@@ -7727,11 +7695,11 @@ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
|
|
|
7727
7695
|
})
|
|
7728
7696
|
] })
|
|
7729
7697
|
]
|
|
7730
|
-
}), !i && /* @__PURE__ */ c(
|
|
7698
|
+
}), !i && /* @__PURE__ */ c(Io, {})]
|
|
7731
7699
|
});
|
|
7732
7700
|
}
|
|
7733
7701
|
// ../../packages/widget-ui/src/components/Launcher.tsx
|
|
7734
|
-
function
|
|
7702
|
+
function Ro() {
|
|
7735
7703
|
return /* @__PURE__ */ c("svg", {
|
|
7736
7704
|
width: "24",
|
|
7737
7705
|
height: "24",
|
|
@@ -7744,7 +7712,7 @@ function Mo() {
|
|
|
7744
7712
|
children: /* @__PURE__ */ c("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
7745
7713
|
});
|
|
7746
7714
|
}
|
|
7747
|
-
function
|
|
7715
|
+
function zo() {
|
|
7748
7716
|
return /* @__PURE__ */ c("svg", {
|
|
7749
7717
|
width: "22",
|
|
7750
7718
|
height: "22",
|
|
@@ -7757,24 +7725,32 @@ function No() {
|
|
|
7757
7725
|
children: /* @__PURE__ */ c("polyline", { points: "6,9 12,15 18,9" })
|
|
7758
7726
|
});
|
|
7759
7727
|
}
|
|
7760
|
-
function
|
|
7761
|
-
let i = !e && !!n;
|
|
7762
|
-
return /* @__PURE__ */
|
|
7763
|
-
className: `ak-launcher${i ? " ak-launcher--avatar" : ""}`,
|
|
7728
|
+
function Bo({ isOpen: e, onClick: t, avatarUrl: n, label: r }) {
|
|
7729
|
+
let i = !e && r.length > 0, a = !e && !!n;
|
|
7730
|
+
return /* @__PURE__ */ l("button", {
|
|
7731
|
+
className: `ak-launcher${i ? " ak-launcher--pill" : ""}${a ? " ak-launcher--avatar" : ""}`,
|
|
7764
7732
|
onClick: t,
|
|
7765
|
-
"aria-label": r,
|
|
7733
|
+
"aria-label": e ? "Close chat" : r || "Open chat",
|
|
7766
7734
|
"aria-expanded": e,
|
|
7767
7735
|
type: "button",
|
|
7768
|
-
children: e ? /* @__PURE__ */ c(
|
|
7736
|
+
children: [e ? /* @__PURE__ */ c(zo, {}) : a ? /* @__PURE__ */ c("img", {
|
|
7769
7737
|
src: n,
|
|
7770
7738
|
alt: "",
|
|
7771
7739
|
className: "ak-launcher__avatar-img",
|
|
7772
7740
|
"aria-hidden": "true"
|
|
7773
|
-
}) : /* @__PURE__ */ c(
|
|
7741
|
+
}) : /* @__PURE__ */ c("span", {
|
|
7742
|
+
className: "ak-launcher__icon",
|
|
7743
|
+
"aria-hidden": "true",
|
|
7744
|
+
children: /* @__PURE__ */ c(Ro, {})
|
|
7745
|
+
}), i && /* @__PURE__ */ c("span", {
|
|
7746
|
+
className: "ak-launcher__label",
|
|
7747
|
+
"aria-hidden": "true",
|
|
7748
|
+
children: r
|
|
7749
|
+
})]
|
|
7774
7750
|
});
|
|
7775
7751
|
}
|
|
7776
7752
|
// ../../packages/widget-ui/src/WidgetApp.tsx
|
|
7777
|
-
function
|
|
7753
|
+
function Vo({ config: e, state: t, callbacks: n }) {
|
|
7778
7754
|
let i = e.mode === "inline", o = a(null);
|
|
7779
7755
|
return r(() => {
|
|
7780
7756
|
let t = o.current?.getRootNode()?.host;
|
|
@@ -7788,7 +7764,7 @@ function Fo({ config: e, state: t, callbacks: n }) {
|
|
|
7788
7764
|
}, [i, t.isOpen]), t.initStatus === "disabled" && !i ? null : i ? /* @__PURE__ */ c("div", {
|
|
7789
7765
|
ref: o,
|
|
7790
7766
|
className: "ak-inline",
|
|
7791
|
-
children: /* @__PURE__ */ c(
|
|
7767
|
+
children: /* @__PURE__ */ c(Lo, {
|
|
7792
7768
|
config: e,
|
|
7793
7769
|
messages: t.messages,
|
|
7794
7770
|
isLoading: t.isLoading,
|
|
@@ -7801,7 +7777,7 @@ function Fo({ config: e, state: t, callbacks: n }) {
|
|
|
7801
7777
|
}) : /* @__PURE__ */ l("div", {
|
|
7802
7778
|
ref: o,
|
|
7803
7779
|
className: "ak-floating",
|
|
7804
|
-
children: [t.isOpen && /* @__PURE__ */ c(
|
|
7780
|
+
children: [t.isOpen && /* @__PURE__ */ c(Lo, {
|
|
7805
7781
|
config: e,
|
|
7806
7782
|
messages: t.messages,
|
|
7807
7783
|
isLoading: t.isLoading,
|
|
@@ -7810,23 +7786,24 @@ function Fo({ config: e, state: t, callbacks: n }) {
|
|
|
7810
7786
|
initStatus: t.initStatus,
|
|
7811
7787
|
initError: t.initError,
|
|
7812
7788
|
callbacks: n
|
|
7813
|
-
}), /* @__PURE__ */ c(
|
|
7789
|
+
}), /* @__PURE__ */ c(Bo, {
|
|
7814
7790
|
isOpen: t.isOpen,
|
|
7815
7791
|
onClick: t.isOpen ? n.onClose : n.onOpen,
|
|
7816
|
-
avatarUrl: e.avatarUrl
|
|
7792
|
+
avatarUrl: e.avatarUrl,
|
|
7793
|
+
label: e.launcherLabel
|
|
7817
7794
|
})]
|
|
7818
7795
|
});
|
|
7819
7796
|
}
|
|
7820
7797
|
// ../../packages/widget-ui/src/index.ts
|
|
7821
|
-
var
|
|
7798
|
+
var Ho = (n, r, i, a) => {
|
|
7822
7799
|
let o = e(n);
|
|
7823
|
-
return o.render(t(
|
|
7800
|
+
return o.render(t(Vo, {
|
|
7824
7801
|
config: r,
|
|
7825
7802
|
state: i,
|
|
7826
7803
|
callbacks: a
|
|
7827
7804
|
})), {
|
|
7828
7805
|
update(e, n) {
|
|
7829
|
-
o.render(t(
|
|
7806
|
+
o.render(t(Vo, {
|
|
7830
7807
|
config: n,
|
|
7831
7808
|
state: e,
|
|
7832
7809
|
callbacks: a
|
|
@@ -7839,26 +7816,26 @@ var Io = (n, r, i, a) => {
|
|
|
7839
7816
|
}
|
|
7840
7817
|
};
|
|
7841
7818
|
};
|
|
7842
|
-
function
|
|
7843
|
-
return
|
|
7819
|
+
function Uo(e) {
|
|
7820
|
+
return Na + "\n" + Ea(e);
|
|
7844
7821
|
}
|
|
7845
7822
|
// src/api.ts
|
|
7846
|
-
function
|
|
7847
|
-
return
|
|
7823
|
+
function Wo(e, t) {
|
|
7824
|
+
return Uo(ht({
|
|
7848
7825
|
...e,
|
|
7849
7826
|
mode: t
|
|
7850
7827
|
}));
|
|
7851
7828
|
}
|
|
7852
|
-
function
|
|
7853
|
-
return xa(e, t, n ??
|
|
7829
|
+
function Go(e, t = Ho, n) {
|
|
7830
|
+
return xa(e, t, n ?? Wo(e, "floating"));
|
|
7854
7831
|
}
|
|
7855
|
-
function
|
|
7856
|
-
return Ca(e, t, n, r ??
|
|
7832
|
+
function Ko(e, t, n = Ho, r) {
|
|
7833
|
+
return Ca(e, t, n, r ?? Wo(t, "inline"));
|
|
7857
7834
|
}
|
|
7858
|
-
function
|
|
7859
|
-
return Sa(e, t, n, r ??
|
|
7835
|
+
function qo(e, t, n = Ho, r) {
|
|
7836
|
+
return Sa(e, t, n, r ?? Wo(t, "floating"));
|
|
7860
7837
|
}
|
|
7861
|
-
function
|
|
7838
|
+
function Jo(e) {
|
|
7862
7839
|
wa(e);
|
|
7863
7840
|
}
|
|
7864
|
-
export {
|
|
7841
|
+
export { Di as ApiClient, jo as Composer, Mo as ErrorState, Gi as EventEmitter, Ra as Header, Bo as Launcher, io as MessageBubble, so as MessageList, ao as TypingIndicator, Vo as WidgetApp, aa as WidgetClient, Lo as WidgetShell, Ea as buildThemeVars, Uo as buildWidgetCSS, Xi as clearSession, fa as createFloatingContainer, ca as createShadowHost, _a as createWidget, Jo as destroy, wa as destroyWidget, Ji as getSessionId, Go as init, la as injectStyles, Ta as listWidgets, Ko as mount, qo as mountFloating, ht as normalizeConfig, ma as prepareInlineContainer, ua as removeShadowHost, Ho as renderWidget, Da as resolveThemeMode, Yi as setSessionId, Ai as streamChat, Na as widgetCSS };
|