@bymos/agentkit-sdk 0.5.0 → 0.6.1
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 -2
- package/agentkit-widget.iife.js +127 -20
- package/agentkit-widget.js +1547 -1440
- package/index.cjs +128 -21
- package/index.js +283 -176
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var y = M.arrayToEnum([
|
|
|
61
61
|
"never",
|
|
62
62
|
"map",
|
|
63
63
|
"set"
|
|
64
|
-
]),
|
|
64
|
+
]), me = (e) => {
|
|
65
65
|
switch (typeof e) {
|
|
66
66
|
case "undefined":
|
|
67
67
|
return y.undefined;
|
|
@@ -349,13 +349,13 @@ var E = class {
|
|
|
349
349
|
return this._def.description;
|
|
350
350
|
}
|
|
351
351
|
_getType(e) {
|
|
352
|
-
return
|
|
352
|
+
return me(e.data);
|
|
353
353
|
}
|
|
354
354
|
_getOrReturnCtx(e, t) {
|
|
355
355
|
return t || {
|
|
356
356
|
common: e.parent.common,
|
|
357
357
|
data: e.data,
|
|
358
|
-
parsedType:
|
|
358
|
+
parsedType: me(e.data),
|
|
359
359
|
schemaErrorMap: this._def.errorMap,
|
|
360
360
|
path: e.path,
|
|
361
361
|
parent: e.parent
|
|
@@ -367,7 +367,7 @@ var E = class {
|
|
|
367
367
|
ctx: {
|
|
368
368
|
common: e.parent.common,
|
|
369
369
|
data: e.data,
|
|
370
|
-
parsedType:
|
|
370
|
+
parsedType: me(e.data),
|
|
371
371
|
schemaErrorMap: this._def.errorMap,
|
|
372
372
|
path: e.path,
|
|
373
373
|
parent: e.parent
|
|
@@ -399,7 +399,7 @@ var E = class {
|
|
|
399
399
|
schemaErrorMap: this._def.errorMap,
|
|
400
400
|
parent: null,
|
|
401
401
|
data: e,
|
|
402
|
-
parsedType:
|
|
402
|
+
parsedType: me(e)
|
|
403
403
|
};
|
|
404
404
|
return Xt(r, this._parseSync({
|
|
405
405
|
data: e,
|
|
@@ -417,7 +417,7 @@ var E = class {
|
|
|
417
417
|
schemaErrorMap: this._def.errorMap,
|
|
418
418
|
parent: null,
|
|
419
419
|
data: e,
|
|
420
|
-
parsedType:
|
|
420
|
+
parsedType: me(e)
|
|
421
421
|
};
|
|
422
422
|
if (!this["~standard"].async) try {
|
|
423
423
|
const r = this._parseSync({
|
|
@@ -454,7 +454,7 @@ var E = class {
|
|
|
454
454
|
schemaErrorMap: this._def.errorMap,
|
|
455
455
|
parent: null,
|
|
456
456
|
data: e,
|
|
457
|
-
parsedType:
|
|
457
|
+
parsedType: me(e)
|
|
458
458
|
}, n = this._parse({
|
|
459
459
|
data: e,
|
|
460
460
|
path: r.path,
|
|
@@ -571,7 +571,7 @@ var E = class {
|
|
|
571
571
|
isNullable() {
|
|
572
572
|
return this.safeParse(null).success;
|
|
573
573
|
}
|
|
574
|
-
}, ln = /^c[^\s-]{8,}$/i, cn = /^[0-9a-z]+$/, dn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, un = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, hn = /^[a-z0-9_-]{21}$/i, fn = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,
|
|
574
|
+
}, ln = /^c[^\s-]{8,}$/i, cn = /^[0-9a-z]+$/, dn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, un = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, hn = /^[a-z0-9_-]{21}$/i, fn = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, pn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, mn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, gn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", ht, vn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, kn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, bn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, yn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, _n = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xn = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, _r = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", wn = new RegExp(`^${_r}$`);
|
|
575
575
|
function xr(e) {
|
|
576
576
|
let t = "[0-5]\\d";
|
|
577
577
|
e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`);
|
|
@@ -651,7 +651,7 @@ var Ke = class Re extends E {
|
|
|
651
651
|
message: a.message
|
|
652
652
|
}), r.dirty());
|
|
653
653
|
} else if (a.kind === "email")
|
|
654
|
-
|
|
654
|
+
mn.test(t.data) || (n = this._getOrReturnCtx(t, n), k(n, {
|
|
655
655
|
validation: "email",
|
|
656
656
|
code: f.invalid_string,
|
|
657
657
|
message: a.message
|
|
@@ -732,7 +732,7 @@ var Ke = class Re extends E {
|
|
|
732
732
|
code: f.invalid_string,
|
|
733
733
|
validation: "time",
|
|
734
734
|
message: a.message
|
|
735
|
-
}), r.dirty()) : a.kind === "duration" ?
|
|
735
|
+
}), r.dirty()) : a.kind === "duration" ? pn.test(t.data) || (n = this._getOrReturnCtx(t, n), k(n, {
|
|
736
736
|
validation: "duration",
|
|
737
737
|
code: f.invalid_string,
|
|
738
738
|
message: a.message
|
|
@@ -1947,7 +1947,7 @@ var ie = (e) => e instanceof nt ? ie(e.schema) : e instanceof he ? ie(e.innerTyp
|
|
|
1947
1947
|
}
|
|
1948
1948
|
};
|
|
1949
1949
|
function Tt(e, t) {
|
|
1950
|
-
const r =
|
|
1950
|
+
const r = me(e), n = me(t);
|
|
1951
1951
|
if (e === t) return {
|
|
1952
1952
|
valid: !0,
|
|
1953
1953
|
data: e
|
|
@@ -2278,11 +2278,11 @@ var Mn = class Xe extends E {
|
|
|
2278
2278
|
if (this._def.returns instanceof Oe) {
|
|
2279
2279
|
const l = this;
|
|
2280
2280
|
return D(async function(...o) {
|
|
2281
|
-
const c = new te([]), u = await l._def.args.parseAsync(o, i).catch((
|
|
2282
|
-
throw c.addIssue(n(o,
|
|
2281
|
+
const c = new te([]), u = await l._def.args.parseAsync(o, i).catch((p) => {
|
|
2282
|
+
throw c.addIssue(n(o, p)), c;
|
|
2283
2283
|
}), h = await Reflect.apply(s, this, u);
|
|
2284
|
-
return await l._def.returns._def.type.parseAsync(h, i).catch((
|
|
2285
|
-
throw c.addIssue(a(h,
|
|
2284
|
+
return await l._def.returns._def.type.parseAsync(h, i).catch((p) => {
|
|
2285
|
+
throw c.addIssue(a(h, p)), c;
|
|
2286
2286
|
});
|
|
2287
2287
|
});
|
|
2288
2288
|
} else {
|
|
@@ -2758,7 +2758,7 @@ var eo = { object: q.lazycreate }, C;
|
|
|
2758
2758
|
(function(e) {
|
|
2759
2759
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
2760
2760
|
})(C || (C = {}));
|
|
2761
|
-
var P = Ke.create, to = bt.create, ro = Rt.create, no = _t.create, ft = wt.create, ao = St.create, io = Ct.create, so = qe.create, oo = et.create, lo = It.create, jn = Ie.create, co = ge.create, uo = Nt.create, ho = Le.create, Ft = q.create, fo = q.strictCreate,
|
|
2761
|
+
var P = Ke.create, to = bt.create, ro = Rt.create, no = _t.create, ft = wt.create, ao = St.create, io = Ct.create, so = qe.create, oo = et.create, lo = It.create, jn = Ie.create, co = ge.create, uo = Nt.create, ho = Le.create, Ft = q.create, fo = q.strictCreate, po = tt.create, mo = An.create, go = rt.create, vo = ke.create, Rn = En.create, ko = At.create, bo = Et.create, yo = Mn.create, _o = nt.create, xo = at.create, Ar = dt.create, wo = it.create, So = Oe.create, Co = he.create, Io = ue.create, No = be.create, To = he.createWithPreprocess, Lo = Tr.create, Zn = Ft({
|
|
2762
2762
|
mode: Ar([
|
|
2763
2763
|
"light",
|
|
2764
2764
|
"dark",
|
|
@@ -3062,8 +3062,8 @@ function Or(e, t) {
|
|
|
3062
3062
|
return Math.round(e * r) / r;
|
|
3063
3063
|
}
|
|
3064
3064
|
function zn(e) {
|
|
3065
|
-
for (var t, r, n = "Unexpected syntax '".concat(e, "'"), a = /^\s*([a-z-]*)(.*)$/i.exec(e), i = a[1] || void 0, s = {}, l = /([.:#][\w-]+|\[.+?\])/gi, o = function(
|
|
3066
|
-
s[
|
|
3065
|
+
for (var t, r, n = "Unexpected syntax '".concat(e, "'"), a = /^\s*([a-z-]*)(.*)$/i.exec(e), i = a[1] || void 0, s = {}, l = /([.:#][\w-]+|\[.+?\])/gi, o = function(p, g) {
|
|
3066
|
+
s[p] = s[p] || [], s[p].push(g);
|
|
3067
3067
|
}; ; ) {
|
|
3068
3068
|
var c = l.exec(a[2]);
|
|
3069
3069
|
if (!c) break;
|
|
@@ -3094,13 +3094,13 @@ function Dn(e) {
|
|
|
3094
3094
|
}
|
|
3095
3095
|
return t;
|
|
3096
3096
|
}
|
|
3097
|
-
function
|
|
3098
|
-
var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0,
|
|
3099
|
-
g += i + c,
|
|
3097
|
+
function pe(e, t) {
|
|
3098
|
+
var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0, p = 0, g = 0;
|
|
3099
|
+
g += i + c, p += g >>> 16, g &= 65535, p += a + o, h += p >>> 16, p &= 65535, h += n + l, u += h >>> 16, h &= 65535, u += r + s, u &= 65535, e[0] = u << 16 | h, e[1] = p << 16 | g;
|
|
3100
3100
|
}
|
|
3101
3101
|
function X(e, t) {
|
|
3102
|
-
var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0,
|
|
3103
|
-
g += i * c,
|
|
3102
|
+
var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0, p = 0, g = 0;
|
|
3103
|
+
g += i * c, p += g >>> 16, g &= 65535, p += a * c, h += p >>> 16, p &= 65535, p += i * o, h += p >>> 16, p &= 65535, h += n * c, u += h >>> 16, h &= 65535, h += a * o, u += h >>> 16, h &= 65535, h += i * l, u += h >>> 16, h &= 65535, u += r * c + n * o + a * l + i * s, u &= 65535, e[0] = u << 16 | h, e[1] = p << 16 | g;
|
|
3104
3104
|
}
|
|
3105
3105
|
function _e(e, t) {
|
|
3106
3106
|
var r = e[0];
|
|
@@ -3123,7 +3123,7 @@ function Yn(e, t) {
|
|
|
3123
3123
|
t = t || 0;
|
|
3124
3124
|
var n = [0, r.length], a = n[1] % 16, i = n[1] - a, s = [0, t], l = [0, t], o = [0, 0], c = [0, 0], u;
|
|
3125
3125
|
for (u = 0; u < i; u = u + 16)
|
|
3126
|
-
o[0] = r[u + 4] | r[u + 5] << 8 | r[u + 6] << 16 | r[u + 7] << 24, o[1] = r[u] | r[u + 1] << 8 | r[u + 2] << 16 | r[u + 3] << 24, c[0] = r[u + 12] | r[u + 13] << 8 | r[u + 14] << 16 | r[u + 15] << 24, c[1] = r[u + 8] | r[u + 9] << 8 | r[u + 10] << 16 | r[u + 11] << 24, X(o, Be), _e(o, 31), X(o, Ge), Z(s, o), _e(s, 27),
|
|
3126
|
+
o[0] = r[u + 4] | r[u + 5] << 8 | r[u + 6] << 16 | r[u + 7] << 24, o[1] = r[u] | r[u + 1] << 8 | r[u + 2] << 16 | r[u + 3] << 24, c[0] = r[u + 12] | r[u + 13] << 8 | r[u + 14] << 16 | r[u + 15] << 24, c[1] = r[u + 8] | r[u + 9] << 8 | r[u + 10] << 16 | r[u + 11] << 24, X(o, Be), _e(o, 31), X(o, Ge), Z(s, o), _e(s, 27), pe(s, l), X(s, qt), pe(s, Gn), X(c, Ge), _e(c, 33), X(c, Be), Z(l, c), _e(l, 31), pe(l, s), X(l, qt), pe(l, Hn);
|
|
3127
3127
|
o[0] = 0, o[1] = 0, c[0] = 0, c[1] = 0;
|
|
3128
3128
|
var h = [0, 0];
|
|
3129
3129
|
switch (a) {
|
|
@@ -3158,7 +3158,7 @@ function Yn(e, t) {
|
|
|
3158
3158
|
case 1:
|
|
3159
3159
|
h[1] = r[u], Z(o, h), X(o, Be), _e(o, 31), X(o, Ge), Z(s, o);
|
|
3160
3160
|
}
|
|
3161
|
-
return Z(s, n), Z(l, n),
|
|
3161
|
+
return Z(s, n), Z(l, n), pe(s, l), pe(l, s), Kt(s), Kt(l), pe(s, l), pe(l, s), ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[1] >>> 0).toString(16)).slice(-8);
|
|
3162
3162
|
}
|
|
3163
3163
|
function Xn(e) {
|
|
3164
3164
|
var t;
|
|
@@ -3198,7 +3198,7 @@ function Kn(e, t) {
|
|
|
3198
3198
|
return new Promise(function(c) {
|
|
3199
3199
|
var u = Date.now();
|
|
3200
3200
|
Jt(o, function() {
|
|
3201
|
-
for (var h = [],
|
|
3201
|
+
for (var h = [], p = 0; p < arguments.length; p++) h[p] = arguments[p];
|
|
3202
3202
|
var g = l + Date.now() - u;
|
|
3203
3203
|
if (!h[0]) return c({
|
|
3204
3204
|
error: h[1],
|
|
@@ -3228,18 +3228,18 @@ function qn(e, t, r, n) {
|
|
|
3228
3228
|
return function() {
|
|
3229
3229
|
return ne(this, void 0, void 0, function() {
|
|
3230
3230
|
var l, o, c, u, h;
|
|
3231
|
-
return ae(this, function(
|
|
3232
|
-
switch (
|
|
3231
|
+
return ae(this, function(p) {
|
|
3232
|
+
switch (p.label) {
|
|
3233
3233
|
case 0:
|
|
3234
3234
|
return [4, i];
|
|
3235
3235
|
case 1:
|
|
3236
|
-
return l =
|
|
3236
|
+
return l = p.sent(), [4, Qt(l, function(g) {
|
|
3237
3237
|
return Pe(g());
|
|
3238
3238
|
}, n)];
|
|
3239
3239
|
case 2:
|
|
3240
|
-
return o =
|
|
3240
|
+
return o = p.sent(), [4, Promise.all(o)];
|
|
3241
3241
|
case 3:
|
|
3242
|
-
for (c =
|
|
3242
|
+
for (c = p.sent(), u = {}, h = 0; h < a.length; ++h) u[a[h]] = c[h];
|
|
3243
3243
|
return [2, u];
|
|
3244
3244
|
}
|
|
3245
3245
|
});
|
|
@@ -3429,7 +3429,7 @@ function ha(e) {
|
|
|
3429
3429
|
setTimeout(function() {
|
|
3430
3430
|
return l(er("timeout"));
|
|
3431
3431
|
}, Math.min(n, u + a - Date.now()));
|
|
3432
|
-
},
|
|
3432
|
+
}, p = function() {
|
|
3433
3433
|
try {
|
|
3434
3434
|
var g = e.startRendering();
|
|
3435
3435
|
switch (Zr(g) && Pe(g), e.state) {
|
|
@@ -3437,14 +3437,14 @@ function ha(e) {
|
|
|
3437
3437
|
u = Date.now(), o && h();
|
|
3438
3438
|
break;
|
|
3439
3439
|
case "suspended":
|
|
3440
|
-
document.hidden || c++, o && c >= t ? l(er("suspended")) : setTimeout(
|
|
3440
|
+
document.hidden || c++, o && c >= t ? l(er("suspended")) : setTimeout(p, r);
|
|
3441
3441
|
break;
|
|
3442
3442
|
}
|
|
3443
|
-
} catch (
|
|
3444
|
-
l(
|
|
3443
|
+
} catch (m) {
|
|
3444
|
+
l(m);
|
|
3445
3445
|
}
|
|
3446
3446
|
};
|
|
3447
|
-
|
|
3447
|
+
p(), i = function() {
|
|
3448
3448
|
o || (o = !0, u > 0 && h());
|
|
3449
3449
|
};
|
|
3450
3450
|
}), i];
|
|
@@ -3478,17 +3478,17 @@ function Vr(e, t, r) {
|
|
|
3478
3478
|
10,
|
|
3479
3479
|
11
|
|
3480
3480
|
]), [4, new Promise(function(c, u) {
|
|
3481
|
-
var h = !1,
|
|
3481
|
+
var h = !1, p = function() {
|
|
3482
3482
|
h = !0, c();
|
|
3483
3483
|
}, g = function(_) {
|
|
3484
3484
|
h = !0, u(_);
|
|
3485
3485
|
};
|
|
3486
|
-
l.onload =
|
|
3487
|
-
var
|
|
3488
|
-
|
|
3486
|
+
l.onload = p, l.onerror = g;
|
|
3487
|
+
var m = l.style;
|
|
3488
|
+
m.setProperty("display", "block", "important"), m.position = "absolute", m.top = "0", m.left = "0", m.visibility = "hidden", t && "srcdoc" in l ? l.srcdoc = t : l.src = "about:blank", s.body.appendChild(l);
|
|
3489
3489
|
var b = function() {
|
|
3490
3490
|
var _, x;
|
|
3491
|
-
h || (((x = (_ = l.contentWindow) === null || _ === void 0 ? void 0 : _.document) === null || x === void 0 ? void 0 : x.readyState) === "complete" ?
|
|
3491
|
+
h || (((x = (_ = l.contentWindow) === null || _ === void 0 ? void 0 : _.document) === null || x === void 0 ? void 0 : x.readyState) === "complete" ? p() : setTimeout(b, 10));
|
|
3492
3492
|
};
|
|
3493
3493
|
b();
|
|
3494
3494
|
})];
|
|
@@ -3510,14 +3510,14 @@ function Vr(e, t, r) {
|
|
|
3510
3510
|
});
|
|
3511
3511
|
});
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function pa(e) {
|
|
3514
3514
|
for (var t = zn(e), r = t[0], n = t[1], a = document.createElement(r ?? "div"), i = 0, s = Object.keys(n); i < s.length; i++) {
|
|
3515
3515
|
var l = s[i], o = n[l].join(" ");
|
|
3516
|
-
l === "style" ?
|
|
3516
|
+
l === "style" ? ma(a.style, o) : a.setAttribute(l, o);
|
|
3517
3517
|
}
|
|
3518
3518
|
return a;
|
|
3519
3519
|
}
|
|
3520
|
-
function
|
|
3520
|
+
function ma(e, t) {
|
|
3521
3521
|
for (var r = 0, n = t.split(";"); r < n.length; r++) {
|
|
3522
3522
|
var a = n[r], i = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(a);
|
|
3523
3523
|
if (i) {
|
|
@@ -3602,7 +3602,7 @@ function ba() {
|
|
|
3602
3602
|
return Vr(function(t, r) {
|
|
3603
3603
|
var n = r.document;
|
|
3604
3604
|
return ne(e, void 0, void 0, function() {
|
|
3605
|
-
var a, i, s, l, o, c, u, h,
|
|
3605
|
+
var a, i, s, l, o, c, u, h, p, g, m, b;
|
|
3606
3606
|
return ae(this, function(_) {
|
|
3607
3607
|
for (a = n.body, a.style.fontSize = ka, i = n.createElement("div"), i.style.setProperty("visibility", "hidden", "important"), s = {}, l = {}, o = function(x) {
|
|
3608
3608
|
var L = n.createElement("span"), R = L.style;
|
|
@@ -3621,14 +3621,14 @@ function ba() {
|
|
|
3621
3621
|
L(U);
|
|
3622
3622
|
}
|
|
3623
3623
|
return x;
|
|
3624
|
-
},
|
|
3624
|
+
}, p = function(x) {
|
|
3625
3625
|
return xe.some(function(L, R) {
|
|
3626
3626
|
return x[R].offsetWidth !== s[L] || x[R].offsetHeight !== l[L];
|
|
3627
3627
|
});
|
|
3628
|
-
}, g = u(),
|
|
3628
|
+
}, g = u(), m = h(), a.appendChild(i), b = 0; b < xe.length; b++)
|
|
3629
3629
|
s[xe[b]] = g[b].offsetWidth, l[xe[b]] = g[b].offsetHeight;
|
|
3630
3630
|
return [2, tr.filter(function(x) {
|
|
3631
|
-
return m
|
|
3631
|
+
return p(m[x]);
|
|
3632
3632
|
})];
|
|
3633
3633
|
});
|
|
3634
3634
|
});
|
|
@@ -3680,8 +3680,8 @@ function Ca(e) {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
function Ia(e, t) {
|
|
3682
3682
|
Na(e, t);
|
|
3683
|
-
var r =
|
|
3684
|
-
return r !==
|
|
3683
|
+
var r = pt(e);
|
|
3684
|
+
return r !== pt(e) ? ["unstable", "unstable"] : (Ta(e, t), [pt(e), r]);
|
|
3685
3685
|
}
|
|
3686
3686
|
function Na(e, t) {
|
|
3687
3687
|
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"';
|
|
@@ -3712,7 +3712,7 @@ function Ta(e, t) {
|
|
|
3712
3712
|
}
|
|
3713
3713
|
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");
|
|
3714
3714
|
}
|
|
3715
|
-
function
|
|
3715
|
+
function pt(e) {
|
|
3716
3716
|
return e.toDataURL();
|
|
3717
3717
|
}
|
|
3718
3718
|
function La() {
|
|
@@ -3762,12 +3762,12 @@ function Oa() {
|
|
|
3762
3762
|
}, r = [t(e.width), t(e.height)];
|
|
3763
3763
|
return r.sort().reverse(), r;
|
|
3764
3764
|
}
|
|
3765
|
-
var Pa = 2500, Fa = 10, Je,
|
|
3765
|
+
var Pa = 2500, Fa = 10, Je, mt;
|
|
3766
3766
|
function Va() {
|
|
3767
|
-
if (
|
|
3767
|
+
if (mt === void 0) {
|
|
3768
3768
|
var e = function() {
|
|
3769
3769
|
var t = Ot();
|
|
3770
|
-
Pt(t) ?
|
|
3770
|
+
Pt(t) ? mt = setTimeout(e, Pa) : (Je = t, mt = void 0);
|
|
3771
3771
|
};
|
|
3772
3772
|
e();
|
|
3773
3773
|
}
|
|
@@ -4235,7 +4235,7 @@ function ni(e) {
|
|
|
4235
4235
|
switch (c.label) {
|
|
4236
4236
|
case 0:
|
|
4237
4237
|
for (r = document, n = r.createElement("div"), a = new Array(e.length), i = {}, rr(n), o = 0; o < e.length; ++o)
|
|
4238
|
-
s =
|
|
4238
|
+
s = pa(e[o]), s.tagName === "DIALOG" && s.show(), l = r.createElement("div"), rr(l), l.appendChild(s), n.appendChild(l), a[o] = s;
|
|
4239
4239
|
c.label = 1;
|
|
4240
4240
|
case 1:
|
|
4241
4241
|
return r.body ? [3, 3] : [4, ct(50)];
|
|
@@ -4332,8 +4332,8 @@ function or(e) {
|
|
|
4332
4332
|
var j = Math, $ = function() {
|
|
4333
4333
|
return 0;
|
|
4334
4334
|
};
|
|
4335
|
-
function
|
|
4336
|
-
var e = j.acos || $, t = j.acosh || $, r = j.asin || $, n = j.asinh || $, a = j.atanh || $, i = j.atan || $, s = j.sin || $, l = j.sinh || $, o = j.cos || $, c = j.cosh || $, u = j.tan || $, h = j.tanh || $,
|
|
4335
|
+
function pi() {
|
|
4336
|
+
var e = j.acos || $, t = j.acosh || $, r = j.asin || $, n = j.asinh || $, a = j.atanh || $, i = j.atan || $, s = j.sin || $, l = j.sinh || $, o = j.cos || $, c = j.cosh || $, u = j.tan || $, h = j.tanh || $, p = j.exp || $, g = j.expm1 || $, m = j.log1p || $, b = function(I) {
|
|
4337
4337
|
return j.pow(j.PI, I);
|
|
4338
4338
|
}, _ = function(I) {
|
|
4339
4339
|
return j.log(I + j.sqrt(I * I - 1));
|
|
@@ -4371,15 +4371,15 @@ function mi() {
|
|
|
4371
4371
|
tan: u(-1e300),
|
|
4372
4372
|
tanh: h(1),
|
|
4373
4373
|
tanhPf: V(1),
|
|
4374
|
-
exp:
|
|
4374
|
+
exp: p(1),
|
|
4375
4375
|
expm1: g(1),
|
|
4376
4376
|
expm1Pf: U(1),
|
|
4377
|
-
log1p:
|
|
4377
|
+
log1p: m(10),
|
|
4378
4378
|
log1pPf: N(10),
|
|
4379
4379
|
powPI: b(-100)
|
|
4380
4380
|
};
|
|
4381
4381
|
}
|
|
4382
|
-
var
|
|
4382
|
+
var mi = "mmMwWLliI0fiflO&1", gt = {
|
|
4383
4383
|
default: [],
|
|
4384
4384
|
apple: [{ font: "-apple-system-body" }],
|
|
4385
4385
|
serif: [{ fontFamily: "serif" }],
|
|
@@ -4391,13 +4391,13 @@ var pi = "mmMwWLliI0fiflO&1", gt = {
|
|
|
4391
4391
|
function gi() {
|
|
4392
4392
|
return vi(function(e, t) {
|
|
4393
4393
|
for (var r = {}, n = {}, a = 0, i = Object.keys(gt); a < i.length; a++) {
|
|
4394
|
-
var s = i[a], l = gt[s], o = l[0], c = o === void 0 ? {} : o, u = l[1], h = u === void 0 ?
|
|
4395
|
-
|
|
4396
|
-
for (var g = 0,
|
|
4397
|
-
var b =
|
|
4398
|
-
_ !== void 0 && (
|
|
4394
|
+
var s = i[a], l = gt[s], o = l[0], c = o === void 0 ? {} : o, u = l[1], h = u === void 0 ? mi : u, p = e.createElement("span");
|
|
4395
|
+
p.textContent = h, p.style.whiteSpace = "nowrap";
|
|
4396
|
+
for (var g = 0, m = Object.keys(c); g < m.length; g++) {
|
|
4397
|
+
var b = m[g], _ = c[b];
|
|
4398
|
+
_ !== void 0 && (p.style[b] = _);
|
|
4399
4399
|
}
|
|
4400
|
-
r[s] =
|
|
4400
|
+
r[s] = p, t.append(e.createElement("br"), p);
|
|
4401
4401
|
}
|
|
4402
4402
|
for (var x = 0, L = Object.keys(gt); x < L.length; x++) {
|
|
4403
4403
|
var s = L[x];
|
|
@@ -4563,11 +4563,11 @@ function Ai(e) {
|
|
|
4563
4563
|
if (!Br(r)) return $r;
|
|
4564
4564
|
var n = r.getSupportedExtensions(), a = r.getContextAttributes(), i = [], s = [], l = [], o = [], c = [];
|
|
4565
4565
|
if (a) for (var u = 0, h = Object.keys(a); u < h.length; u++) {
|
|
4566
|
-
var
|
|
4567
|
-
s.push("".concat(
|
|
4566
|
+
var p = h[u];
|
|
4567
|
+
s.push("".concat(p, "=").concat(a[p]));
|
|
4568
4568
|
}
|
|
4569
|
-
for (var g = lr(r),
|
|
4570
|
-
var _ = b[
|
|
4569
|
+
for (var g = lr(r), m = 0, b = g; m < b.length; m++) {
|
|
4570
|
+
var _ = b[m], x = r[_];
|
|
4571
4571
|
l.push("".concat(_, "=").concat(x).concat(Si.has(x) ? "=".concat(r.getParameter(x)) : ""));
|
|
4572
4572
|
}
|
|
4573
4573
|
if (n) for (var L = 0, R = n; L < R.length; L++) {
|
|
@@ -4683,7 +4683,7 @@ var Oi = {
|
|
|
4683
4683
|
reducedMotion: ui,
|
|
4684
4684
|
reducedTransparency: hi,
|
|
4685
4685
|
hdr: fi,
|
|
4686
|
-
math:
|
|
4686
|
+
math: pi,
|
|
4687
4687
|
pdfViewerEnabled: ki,
|
|
4688
4688
|
architecture: bi,
|
|
4689
4689
|
applePay: yi,
|
|
@@ -4956,47 +4956,47 @@ async function qi(e, t, r, n = {}) {
|
|
|
4956
4956
|
})
|
|
4957
4957
|
});
|
|
4958
4958
|
if (!s.ok || !s.body) {
|
|
4959
|
-
let
|
|
4959
|
+
let p = `${s.status} ${s.statusText}`;
|
|
4960
4960
|
try {
|
|
4961
4961
|
const g = await s.json();
|
|
4962
|
-
g.error && (
|
|
4962
|
+
g.error && (p = g.error);
|
|
4963
4963
|
} catch {
|
|
4964
4964
|
}
|
|
4965
|
-
throw new Error(
|
|
4965
|
+
throw new Error(p);
|
|
4966
4966
|
}
|
|
4967
4967
|
const l = s.headers.get("x-session-id");
|
|
4968
4968
|
l && r.onSession && r.onSession(l);
|
|
4969
4969
|
const o = s.body.getReader(), c = new TextDecoder();
|
|
4970
4970
|
let u = "";
|
|
4971
|
-
const h = (
|
|
4972
|
-
if (!
|
|
4973
|
-
const g =
|
|
4971
|
+
const h = (p) => {
|
|
4972
|
+
if (!p.startsWith("data: ")) return !1;
|
|
4973
|
+
const g = p.slice(6).trim();
|
|
4974
4974
|
if (!g) return !1;
|
|
4975
4975
|
if (g === "[DONE]")
|
|
4976
4976
|
return r.onEnd(a), !0;
|
|
4977
4977
|
try {
|
|
4978
|
-
const
|
|
4979
|
-
if (
|
|
4980
|
-
const _ =
|
|
4978
|
+
const m = JSON.parse(g);
|
|
4979
|
+
if (m.type === "session") {
|
|
4980
|
+
const _ = m.sessionId;
|
|
4981
4981
|
return _ && r.onSession && r.onSession(_), !1;
|
|
4982
4982
|
}
|
|
4983
|
-
if (
|
|
4983
|
+
if (m.type === "done" || m.type === "stop")
|
|
4984
4984
|
return r.onEnd(a), !0;
|
|
4985
|
-
if (
|
|
4986
|
-
if (
|
|
4987
|
-
const _ =
|
|
4985
|
+
if (m.type === "error") throw new Error(m.message ?? "Stream error");
|
|
4986
|
+
if (m.type === "images") {
|
|
4987
|
+
const _ = m.images;
|
|
4988
4988
|
return _ && r.onImages && r.onImages(_), !1;
|
|
4989
4989
|
}
|
|
4990
|
-
if (
|
|
4991
|
-
const _ =
|
|
4990
|
+
if (m.type === "control_mode") {
|
|
4991
|
+
const _ = m.mode, x = !!m.queued;
|
|
4992
4992
|
return _ && r.onControlMode && r.onControlMode(_, x), x ? (r.onEnd(a), !0) : !1;
|
|
4993
4993
|
}
|
|
4994
|
-
if (
|
|
4995
|
-
const _ =
|
|
4994
|
+
if (m.type === "thinking_chunk") {
|
|
4995
|
+
const _ = m.content;
|
|
4996
4996
|
return _ && r.onThinkingDelta && (i += _, r.onThinkingDelta(_, i)), !1;
|
|
4997
4997
|
}
|
|
4998
|
-
if (
|
|
4999
|
-
const _ =
|
|
4998
|
+
if (m.type === "tool_calls_started") {
|
|
4999
|
+
const _ = m.toolNames ?? [];
|
|
5000
5000
|
return a.length > 0 && !a.endsWith(`
|
|
5001
5001
|
|
|
5002
5002
|
`) && (a = a.replace(/\s+$/, "") + `
|
|
@@ -5005,45 +5005,45 @@ async function qi(e, t, r, n = {}) {
|
|
|
5005
5005
|
|
|
5006
5006
|
`, a)), r.onToolCallsStarted?.(_), !1;
|
|
5007
5007
|
}
|
|
5008
|
-
if (
|
|
5009
|
-
const _ =
|
|
5008
|
+
if (m.type === "assistant_ack") {
|
|
5009
|
+
const _ = m.text;
|
|
5010
5010
|
return _ && r.onAck && r.onAck(_), !1;
|
|
5011
5011
|
}
|
|
5012
|
-
if (
|
|
5013
|
-
const _ =
|
|
5012
|
+
if (m.type === "progress") {
|
|
5013
|
+
const _ = m.stage, x = m.text;
|
|
5014
5014
|
return _ && x && r.onProgress && r.onProgress(_, x), !1;
|
|
5015
5015
|
}
|
|
5016
|
-
if (
|
|
5017
|
-
const _ =
|
|
5016
|
+
if (m.type === "tool_start") {
|
|
5017
|
+
const _ = m.toolId, x = m.text;
|
|
5018
5018
|
return _ && x && r.onToolStart && r.onToolStart(_, x), !1;
|
|
5019
5019
|
}
|
|
5020
|
-
if (
|
|
5021
|
-
const _ =
|
|
5020
|
+
if (m.type === "tool_complete") {
|
|
5021
|
+
const _ = m.toolId, x = m.text, L = m.durationMs;
|
|
5022
5022
|
return _ && x && r.onToolComplete && r.onToolComplete(_, x, L ?? 0), !1;
|
|
5023
5023
|
}
|
|
5024
|
-
if (
|
|
5025
|
-
if (
|
|
5026
|
-
const _ =
|
|
5024
|
+
if (m.type === "model_start" || m.type === "final_meta") {
|
|
5025
|
+
if (m.type === "final_meta" && r.onFinalMeta) {
|
|
5026
|
+
const _ = m.metrics;
|
|
5027
5027
|
r.onFinalMeta(_ ?? {});
|
|
5028
5028
|
}
|
|
5029
5029
|
return !1;
|
|
5030
5030
|
}
|
|
5031
|
-
const b = es(
|
|
5031
|
+
const b = es(m);
|
|
5032
5032
|
b && (a += b, r.onDelta(b, a));
|
|
5033
|
-
} catch (
|
|
5034
|
-
if (!(
|
|
5033
|
+
} catch (m) {
|
|
5034
|
+
if (!(m instanceof SyntaxError)) throw m;
|
|
5035
5035
|
}
|
|
5036
5036
|
return !1;
|
|
5037
5037
|
};
|
|
5038
5038
|
e: for (; ; ) {
|
|
5039
|
-
const { done:
|
|
5040
|
-
if (
|
|
5039
|
+
const { done: p, value: g } = await Ki(o);
|
|
5040
|
+
if (p) break;
|
|
5041
5041
|
u += c.decode(g, { stream: !0 });
|
|
5042
|
-
const
|
|
5042
|
+
const m = u.lastIndexOf(`
|
|
5043
5043
|
`);
|
|
5044
|
-
if (
|
|
5045
|
-
const b = u.slice(0,
|
|
5046
|
-
u = u.slice(
|
|
5044
|
+
if (m === -1) continue;
|
|
5045
|
+
const b = u.slice(0, m);
|
|
5046
|
+
u = u.slice(m + 1);
|
|
5047
5047
|
for (const _ of b.split(`
|
|
5048
5048
|
`)) if (h(_)) break e;
|
|
5049
5049
|
}
|
|
@@ -5460,13 +5460,13 @@ var as = class {
|
|
|
5460
5460
|
},
|
|
5461
5461
|
onToolComplete: (o, c, u) => {
|
|
5462
5462
|
const h = [...this.state.messages.find((g) => g.id === a)?.progressEvents ?? []];
|
|
5463
|
-
let
|
|
5463
|
+
let p = -1;
|
|
5464
5464
|
for (let g = h.length - 1; g >= 0; g--) if (h[g].stage === o && h[g].status === "active") {
|
|
5465
|
-
|
|
5465
|
+
p = g;
|
|
5466
5466
|
break;
|
|
5467
5467
|
}
|
|
5468
|
-
|
|
5469
|
-
...h[
|
|
5468
|
+
p >= 0 && (h[p] = {
|
|
5469
|
+
...h[p],
|
|
5470
5470
|
status: "done",
|
|
5471
5471
|
text: u > 0 ? `${c} (${u}ms)` : c
|
|
5472
5472
|
}), this.updateMessage(a, { progressEvents: h });
|
|
@@ -5596,7 +5596,7 @@ function hs(e) {
|
|
|
5596
5596
|
function fs(e) {
|
|
5597
5597
|
e.remove();
|
|
5598
5598
|
}
|
|
5599
|
-
function
|
|
5599
|
+
function ps(e) {
|
|
5600
5600
|
e.removeAttribute("data-agentkit-root");
|
|
5601
5601
|
}
|
|
5602
5602
|
function Hr(e, t, r, n, a) {
|
|
@@ -5604,13 +5604,13 @@ function Hr(e, t, r, n, a) {
|
|
|
5604
5604
|
let s = !1;
|
|
5605
5605
|
const l = i && a ? hs(a) : !i && a ? us(a) : ds(), o = os(l);
|
|
5606
5606
|
ls(o.styleSlot, n);
|
|
5607
|
-
const c = new as(e, t, (
|
|
5608
|
-
s || u.update(
|
|
5607
|
+
const c = new as(e, t, (p, g) => {
|
|
5608
|
+
s || u.update(p, g);
|
|
5609
5609
|
}), u = r(o.mountPoint, e, c.getState(), {
|
|
5610
5610
|
onOpen: () => h.open(),
|
|
5611
5611
|
onClose: () => h.close(),
|
|
5612
|
-
onSendMessage: (
|
|
5613
|
-
c.sendMessage(
|
|
5612
|
+
onSendMessage: (p, g) => {
|
|
5613
|
+
c.sendMessage(p, g);
|
|
5614
5614
|
},
|
|
5615
5615
|
onReset: () => {
|
|
5616
5616
|
c.resetConversation();
|
|
@@ -5629,20 +5629,20 @@ function Hr(e, t, r, n, a) {
|
|
|
5629
5629
|
toggle() {
|
|
5630
5630
|
c.getState().isOpen ? h.close() : h.open();
|
|
5631
5631
|
},
|
|
5632
|
-
async sendMessage(
|
|
5633
|
-
await c.sendMessage(
|
|
5632
|
+
async sendMessage(p, g) {
|
|
5633
|
+
await c.sendMessage(p, g);
|
|
5634
5634
|
},
|
|
5635
5635
|
reset() {
|
|
5636
5636
|
s || (c.resetConversation(), c.emitter.emit("reset"));
|
|
5637
5637
|
},
|
|
5638
5638
|
destroy() {
|
|
5639
|
-
s || (s = !0, u.destroy(), cs(o.host), i && a ?
|
|
5639
|
+
s || (s = !0, u.destroy(), cs(o.host), i && a ? ps(a) : fs(l), c.emitter.emit("destroy"), c.emitter.removeAllListeners());
|
|
5640
5640
|
},
|
|
5641
|
-
on(
|
|
5642
|
-
c.emitter.on(
|
|
5641
|
+
on(p, g) {
|
|
5642
|
+
c.emitter.on(p, g);
|
|
5643
5643
|
},
|
|
5644
|
-
off(
|
|
5645
|
-
c.emitter.off(
|
|
5644
|
+
off(p, g) {
|
|
5645
|
+
c.emitter.off(p, g);
|
|
5646
5646
|
},
|
|
5647
5647
|
getState() {
|
|
5648
5648
|
return c.getState();
|
|
@@ -5650,9 +5650,9 @@ function Hr(e, t, r, n, a) {
|
|
|
5650
5650
|
};
|
|
5651
5651
|
return h;
|
|
5652
5652
|
}
|
|
5653
|
-
var Ne = /* @__PURE__ */ new Map(),
|
|
5653
|
+
var Ne = /* @__PURE__ */ new Map(), ms = 0;
|
|
5654
5654
|
function Yr(e) {
|
|
5655
|
-
const t = `agentkit-widget-${++
|
|
5655
|
+
const t = `agentkit-widget-${++ms}`, r = e.destroy.bind(e);
|
|
5656
5656
|
return e.destroy = () => {
|
|
5657
5657
|
Ne.delete(t), r();
|
|
5658
5658
|
}, Ne.set(t, e), t;
|
|
@@ -5718,15 +5718,17 @@ var ks = `
|
|
|
5718
5718
|
-webkit-font-smoothing: antialiased;
|
|
5719
5719
|
}
|
|
5720
5720
|
|
|
5721
|
-
/* Dark mode — set data-theme="dark" on the shadow host element
|
|
5721
|
+
/* Dark mode — set data-theme="dark" on the shadow host element.
|
|
5722
|
+
Slate palette, aligned with the KlicForge dashboard dark tokens. */
|
|
5722
5723
|
:host([data-theme="dark"]) {
|
|
5723
|
-
--ak-bg: #
|
|
5724
|
-
--ak-surface: #
|
|
5725
|
-
--ak-text: #
|
|
5726
|
-
--ak-text-muted: #
|
|
5727
|
-
--ak-border: #
|
|
5728
|
-
--ak-bot-bg: #
|
|
5729
|
-
--ak-bot-text: #
|
|
5724
|
+
--ak-bg: #0f172a; /* slate-900 — panel surface */
|
|
5725
|
+
--ak-surface: #1e293b; /* slate-800 — inputs, insets (lift off panel) */
|
|
5726
|
+
--ak-text: #f1f5f9; /* slate-100 */
|
|
5727
|
+
--ak-text-muted: #94a3b8;/* slate-400 */
|
|
5728
|
+
--ak-border: #334155; /* slate-700 */
|
|
5729
|
+
--ak-bot-bg: #1e293b; /* slate-800 — assistant bubble */
|
|
5730
|
+
--ak-bot-text: #f1f5f9; /* slate-100 */
|
|
5731
|
+
--ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
5730
5732
|
--ak-maintenance-fg: #fde68a;
|
|
5731
5733
|
--ak-maintenance-bg: rgba(253, 230, 138, 0.06);
|
|
5732
5734
|
--ak-maintenance-halo: #f59e0b;
|
|
@@ -6451,7 +6453,7 @@ var ks = `
|
|
|
6451
6453
|
align-items: center;
|
|
6452
6454
|
gap: 10px;
|
|
6453
6455
|
padding: 8px 10px;
|
|
6454
|
-
background:
|
|
6456
|
+
background: var(--ak-surface);
|
|
6455
6457
|
border: 1px solid var(--ak-border, #e2e8f0);
|
|
6456
6458
|
border-radius: 12px;
|
|
6457
6459
|
text-decoration: none;
|
|
@@ -7325,6 +7327,111 @@ var ks = `
|
|
|
7325
7327
|
50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }
|
|
7326
7328
|
}
|
|
7327
7329
|
|
|
7330
|
+
/* ── Progress block (tool execution / streaming chain) ───────── */
|
|
7331
|
+
.ak-progress {
|
|
7332
|
+
margin-bottom: 4px;
|
|
7333
|
+
max-width: 80%;
|
|
7334
|
+
}
|
|
7335
|
+
.ak-progress__block {
|
|
7336
|
+
display: inline-flex;
|
|
7337
|
+
flex-direction: column;
|
|
7338
|
+
gap: 3px;
|
|
7339
|
+
padding: 6px 12px;
|
|
7340
|
+
border-radius: 14px;
|
|
7341
|
+
background: var(--ak-bot-bg);
|
|
7342
|
+
border: 1px solid var(--ak-border);
|
|
7343
|
+
font-size: 0.8rem;
|
|
7344
|
+
color: var(--ak-bot-text);
|
|
7345
|
+
opacity: 0.85;
|
|
7346
|
+
animation: ak-msg-in 0.15s ease-out;
|
|
7347
|
+
}
|
|
7348
|
+
.ak-progress__header {
|
|
7349
|
+
display: flex;
|
|
7350
|
+
align-items: center;
|
|
7351
|
+
gap: 8px;
|
|
7352
|
+
}
|
|
7353
|
+
.ak-progress__label {
|
|
7354
|
+
font-weight: 600;
|
|
7355
|
+
font-size: 0.78rem;
|
|
7356
|
+
color: var(--ak-primary, #6366f1);
|
|
7357
|
+
}
|
|
7358
|
+
.ak-progress__toggle {
|
|
7359
|
+
display: inline-flex;
|
|
7360
|
+
align-items: center;
|
|
7361
|
+
gap: 3px;
|
|
7362
|
+
padding: 1px 7px;
|
|
7363
|
+
border: 1px solid var(--ak-border);
|
|
7364
|
+
border-radius: 8px;
|
|
7365
|
+
background: transparent;
|
|
7366
|
+
color: var(--ak-bot-text);
|
|
7367
|
+
font-size: 0.72rem;
|
|
7368
|
+
cursor: pointer;
|
|
7369
|
+
opacity: 0.65;
|
|
7370
|
+
transition: opacity 0.15s;
|
|
7371
|
+
}
|
|
7372
|
+
.ak-progress__toggle:hover { opacity: 0.9; }
|
|
7373
|
+
.ak-progress__toggle--collapsed {
|
|
7374
|
+
display: inline-flex;
|
|
7375
|
+
align-items: center;
|
|
7376
|
+
gap: 5px;
|
|
7377
|
+
padding: 5px 10px;
|
|
7378
|
+
border: 1px solid var(--ak-border);
|
|
7379
|
+
border-radius: 12px;
|
|
7380
|
+
background: transparent;
|
|
7381
|
+
color: var(--ak-bot-text);
|
|
7382
|
+
font-size: 0.78rem;
|
|
7383
|
+
cursor: pointer;
|
|
7384
|
+
opacity: 0.55;
|
|
7385
|
+
transition: opacity 0.15s;
|
|
7386
|
+
margin-bottom: 4px;
|
|
7387
|
+
}
|
|
7388
|
+
.ak-progress__toggle--collapsed:hover { opacity: 0.85; }
|
|
7389
|
+
.ak-progress__text {
|
|
7390
|
+
font-size: 0.78rem;
|
|
7391
|
+
color: var(--ak-bot-text);
|
|
7392
|
+
opacity: 0.75;
|
|
7393
|
+
line-height: 1.4;
|
|
7394
|
+
margin: 0;
|
|
7395
|
+
}
|
|
7396
|
+
/* Active streaming state */
|
|
7397
|
+
.ak-progress__list {
|
|
7398
|
+
list-style: none;
|
|
7399
|
+
margin: 0 0 4px;
|
|
7400
|
+
padding: 0;
|
|
7401
|
+
}
|
|
7402
|
+
.ak-progress__item {
|
|
7403
|
+
display: flex;
|
|
7404
|
+
align-items: center;
|
|
7405
|
+
gap: 7px;
|
|
7406
|
+
padding: 6px 12px;
|
|
7407
|
+
border-radius: 14px;
|
|
7408
|
+
background: var(--ak-bot-bg);
|
|
7409
|
+
border: 1px solid var(--ak-border);
|
|
7410
|
+
font-size: 0.8rem;
|
|
7411
|
+
color: var(--ak-bot-text);
|
|
7412
|
+
font-style: italic;
|
|
7413
|
+
opacity: 0.8;
|
|
7414
|
+
animation: ak-msg-in 0.15s ease-out;
|
|
7415
|
+
}
|
|
7416
|
+
.ak-progress__item--active {
|
|
7417
|
+
/* inherits base .ak-progress__item; subtle pulse to signal in-flight */
|
|
7418
|
+
animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;
|
|
7419
|
+
}
|
|
7420
|
+
@keyframes ak-active-pulse {
|
|
7421
|
+
0%, 100% { opacity: 0.8; }
|
|
7422
|
+
50% { opacity: 1; }
|
|
7423
|
+
}
|
|
7424
|
+
.ak-progress__spinner {
|
|
7425
|
+
display: inline-block;
|
|
7426
|
+
width: 11px;
|
|
7427
|
+
height: 11px;
|
|
7428
|
+
border: 1.5px solid var(--ak-border);
|
|
7429
|
+
border-top-color: var(--ak-primary, #6366f1);
|
|
7430
|
+
border-radius: 50%;
|
|
7431
|
+
flex-shrink: 0;
|
|
7432
|
+
animation: ak-spin 0.7s linear infinite;
|
|
7433
|
+
}
|
|
7434
|
+
|
|
7328
7435
|
/* ── Powered by hanging tab ──────────────────────────────────── */
|
|
7329
7436
|
.ak-branding {
|
|
7330
7437
|
display: inline-flex;
|
|
@@ -8064,21 +8171,21 @@ function Ls(e) {
|
|
|
8064
8171
|
u++;
|
|
8065
8172
|
continue;
|
|
8066
8173
|
}
|
|
8067
|
-
const h = t[u].length - t[u].trimStart().length,
|
|
8174
|
+
const h = t[u].length - t[u].trimStart().length, p = t[u].replace(/^[-*+]\s+/, ""), g = [], m = [];
|
|
8068
8175
|
let b = u + 1;
|
|
8069
8176
|
for (; b < t.length && b < u + 20; ) {
|
|
8070
8177
|
const x = t[b];
|
|
8071
8178
|
if (x.length - x.trimStart().length > h && x.trim() !== "") {
|
|
8072
8179
|
const L = x.trim();
|
|
8073
|
-
/^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-${b}`)) :
|
|
8180
|
+
/^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-${b}`)) : m.push(/* @__PURE__ */ d("p", {
|
|
8074
8181
|
style: { margin: "0.2em 0 0" },
|
|
8075
8182
|
children: H(L)
|
|
8076
8183
|
}, `cont-${b}`)), b++;
|
|
8077
8184
|
} else break;
|
|
8078
8185
|
}
|
|
8079
|
-
const _ =
|
|
8080
|
-
H(
|
|
8081
|
-
|
|
8186
|
+
const _ = m.length > 0 || g.length > 0 ? /* @__PURE__ */ v(de, { children: [
|
|
8187
|
+
H(p),
|
|
8188
|
+
m,
|
|
8082
8189
|
g.length > 0 && /* @__PURE__ */ d("ul", {
|
|
8083
8190
|
style: {
|
|
8084
8191
|
margin: "0.2em 0 0",
|
|
@@ -8086,7 +8193,7 @@ function Ls(e) {
|
|
|
8086
8193
|
},
|
|
8087
8194
|
children: g
|
|
8088
8195
|
})
|
|
8089
|
-
] }) : H(
|
|
8196
|
+
] }) : H(p);
|
|
8090
8197
|
c.push(/* @__PURE__ */ d("li", { children: _ }, `item-${u}`)), u = b;
|
|
8091
8198
|
}
|
|
8092
8199
|
r.push(/* @__PURE__ */ d("ul", {
|
|
@@ -8103,21 +8210,21 @@ function Ls(e) {
|
|
|
8103
8210
|
u++;
|
|
8104
8211
|
continue;
|
|
8105
8212
|
}
|
|
8106
|
-
const h = t[u].length - t[u].trimStart().length,
|
|
8213
|
+
const h = t[u].length - t[u].trimStart().length, p = t[u].replace(/^\d+\.\s+/, ""), g = [], m = [];
|
|
8107
8214
|
let b = u + 1;
|
|
8108
8215
|
for (; b < t.length && b < u + 20; ) {
|
|
8109
8216
|
const x = t[b];
|
|
8110
8217
|
if (x.length - x.trimStart().length > h && x.trim() !== "") {
|
|
8111
8218
|
const L = x.trim();
|
|
8112
|
-
/^\d+\.\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^\d+\.\s+/, "")) }, `nested-order-${b}`)) : /^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-unorder-${b}`)) :
|
|
8219
|
+
/^\d+\.\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^\d+\.\s+/, "")) }, `nested-order-${b}`)) : /^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-unorder-${b}`)) : m.push(/* @__PURE__ */ d("p", {
|
|
8113
8220
|
style: { margin: "0.2em 0 0" },
|
|
8114
8221
|
children: H(L)
|
|
8115
8222
|
}, `cont-${b}`)), b++;
|
|
8116
8223
|
} else break;
|
|
8117
8224
|
}
|
|
8118
|
-
const _ =
|
|
8119
|
-
H(
|
|
8120
|
-
|
|
8225
|
+
const _ = m.length > 0 || g.length > 0 ? /* @__PURE__ */ v(de, { children: [
|
|
8226
|
+
H(p),
|
|
8227
|
+
m,
|
|
8121
8228
|
g.length > 0 && /* @__PURE__ */ d("ol", {
|
|
8122
8229
|
style: {
|
|
8123
8230
|
margin: "0.2em 0 0",
|
|
@@ -8125,7 +8232,7 @@ function Ls(e) {
|
|
|
8125
8232
|
},
|
|
8126
8233
|
children: g
|
|
8127
8234
|
})
|
|
8128
|
-
] }) : H(
|
|
8235
|
+
] }) : H(p);
|
|
8129
8236
|
c.push(/* @__PURE__ */ d("li", { children: _ }, `order-item-${u}`)), u = b;
|
|
8130
8237
|
}
|
|
8131
8238
|
r.push(/* @__PURE__ */ d("ol", {
|
|
@@ -8141,27 +8248,27 @@ function Ls(e) {
|
|
|
8141
8248
|
if (i.includes("|") && n + 1 < t.length && t[n + 1].includes("|")) {
|
|
8142
8249
|
const c = t[n + 1];
|
|
8143
8250
|
if (/^\s*\|?[\s:|*-]+\|[\s:|*-|]+\|?[\s:|*-]*$/.test(c)) {
|
|
8144
|
-
const u = i.split("|").map((
|
|
8145
|
-
const b =
|
|
8251
|
+
const u = i.split("|").map((m) => m.trim()).filter((m) => m.length > 0), h = c.split("|").map((m) => {
|
|
8252
|
+
const b = m.trim();
|
|
8146
8253
|
return b.startsWith(":") && b.endsWith(":") ? "center" : b.endsWith(":") ? "right" : (b.startsWith(":"), "left");
|
|
8147
|
-
}).filter((
|
|
8254
|
+
}).filter((m, b) => b > 0 && b <= u.length), p = [];
|
|
8148
8255
|
let g = n + 2;
|
|
8149
8256
|
for (; g < t.length && t[g].includes("|") && t[g].trim() !== ""; ) {
|
|
8150
|
-
const
|
|
8151
|
-
if (
|
|
8152
|
-
|
|
8257
|
+
const m = t[g].split("|").map((b) => b.trim()).filter((b) => b.length > 0);
|
|
8258
|
+
if (m.length > 0)
|
|
8259
|
+
p.push(m), g++;
|
|
8153
8260
|
else break;
|
|
8154
8261
|
}
|
|
8155
8262
|
r.push(/* @__PURE__ */ v("table", {
|
|
8156
8263
|
className: "ak-md-table",
|
|
8157
|
-
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: u.map((
|
|
8264
|
+
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: u.map((m, b) => /* @__PURE__ */ d("th", {
|
|
8158
8265
|
style: { textAlign: h[b] || "left" },
|
|
8159
8266
|
className: "ak-md-th",
|
|
8160
|
-
children: H(
|
|
8161
|
-
}, `th-${b}`)) }) }), /* @__PURE__ */ d("tbody", { children:
|
|
8267
|
+
children: H(m)
|
|
8268
|
+
}, `th-${b}`)) }) }), /* @__PURE__ */ d("tbody", { children: p.map((m, b) => /* @__PURE__ */ d("tr", { children: u.map((_, x) => /* @__PURE__ */ d("td", {
|
|
8162
8269
|
style: { textAlign: h[x] || "left" },
|
|
8163
8270
|
className: "ak-md-td",
|
|
8164
|
-
children:
|
|
8271
|
+
children: m[x] ? H(m[x]) : ""
|
|
8165
8272
|
}, `td-${b}-${x}`)) }, `tr-${b}`)) })]
|
|
8166
8273
|
}, a++)), n = g;
|
|
8167
8274
|
continue;
|
|
@@ -8194,15 +8301,15 @@ function As({ message: e, thinkingViewable: t = !1 }) {
|
|
|
8194
8301
|
url: e.uploadedImageUrl,
|
|
8195
8302
|
mimeType: "image/jpeg"
|
|
8196
8303
|
}] : [];
|
|
8197
|
-
})(), h = s ? (e.uploadedAttachments ?? []).filter((N) => N.kind === "file") : [],
|
|
8304
|
+
})(), h = s ? (e.uploadedAttachments ?? []).filter((N) => N.kind === "file") : [], p = u.length > 0, g = h.length > 0, m = c || p, b = !s && !l, _ = !!e.isHuman && !s, x = s ? "ak-message--user" : l ? "ak-message--assistant ak-message--error" : _ ? "ak-message--assistant ak-message--operator" : "ak-message--assistant", L = [
|
|
8198
8305
|
"ak-message__bubble",
|
|
8199
8306
|
b ? "ak-message__bubble--md" : "",
|
|
8200
|
-
|
|
8307
|
+
m ? "ak-message__bubble--has-image" : "",
|
|
8201
8308
|
_ ? "ak-message__bubble--operator" : ""
|
|
8202
8309
|
].filter(Boolean).join(" "), R = _ ? e.senderDisplay?.trim() || "Operator" : null, F = R ? R.charAt(0).toUpperCase() : "", U = /* @__PURE__ */ v(de, { children: [/* @__PURE__ */ v("div", {
|
|
8203
8310
|
className: L,
|
|
8204
8311
|
children: [
|
|
8205
|
-
|
|
8312
|
+
p && /* @__PURE__ */ d(dr, {
|
|
8206
8313
|
messageId: `${e.id}-up`,
|
|
8207
8314
|
images: u.map((N) => ({
|
|
8208
8315
|
src: N.url,
|
|
@@ -8233,7 +8340,7 @@ function As({ message: e, thinkingViewable: t = !1 }) {
|
|
|
8233
8340
|
onCellClick: (N) => i(N)
|
|
8234
8341
|
}),
|
|
8235
8342
|
(e.content || o && !e.isThinking && !e.toolStatus) && /* @__PURE__ */ v("div", {
|
|
8236
|
-
className:
|
|
8343
|
+
className: m ? "ak-message__image-caption" : void 0,
|
|
8237
8344
|
children: [b ? Ls(e.content) : e.content, o && !e.isThinking && !e.toolStatus && /* @__PURE__ */ v("span", {
|
|
8238
8345
|
className: "ak-cursor",
|
|
8239
8346
|
"aria-hidden": "true",
|
|
@@ -8534,7 +8641,7 @@ function fr() {
|
|
|
8534
8641
|
children: [/* @__PURE__ */ d("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), /* @__PURE__ */ d("polyline", { points: "14 2 14 8 20 8" })]
|
|
8535
8642
|
});
|
|
8536
8643
|
}
|
|
8537
|
-
function
|
|
8644
|
+
function pr() {
|
|
8538
8645
|
return /* @__PURE__ */ v("svg", {
|
|
8539
8646
|
width: "10",
|
|
8540
8647
|
height: "10",
|
|
@@ -8582,7 +8689,7 @@ function zs(e) {
|
|
|
8582
8689
|
return Qr.includes(e.type);
|
|
8583
8690
|
}
|
|
8584
8691
|
function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…", privacyPolicyUrl: n, termsOfServiceUrl: a, photoSendingEnabled: i = !1, fileUploadEnabled: s = !1, attachmentMaxCount: l = 5, attachmentMaxFileSizeMb: o = 1 }) {
|
|
8585
|
-
const [c, u] = ce(""), [h,
|
|
8692
|
+
const [c, u] = ce(""), [h, p] = ce([]), [g, m] = ce(/* @__PURE__ */ new Map()), [b, _] = ce(!1), x = oe(null), L = oe(null), R = oe(null), F = oe(null), U = oe(null), V = i || s, N = kr(() => o * 1024 * 1024, [o]);
|
|
8586
8693
|
le(() => () => {
|
|
8587
8694
|
g.forEach((A) => URL.revokeObjectURL(A));
|
|
8588
8695
|
}, []), le(() => {
|
|
@@ -8600,14 +8707,14 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
8600
8707
|
V || _(!1);
|
|
8601
8708
|
}, [V]);
|
|
8602
8709
|
function fe() {
|
|
8603
|
-
g.forEach((A) => URL.revokeObjectURL(A)),
|
|
8710
|
+
g.forEach((A) => URL.revokeObjectURL(A)), m(/* @__PURE__ */ new Map()), p([]), L.current && (L.current.value = ""), R.current && (R.current.value = "");
|
|
8604
8711
|
}
|
|
8605
8712
|
function Ae(A) {
|
|
8606
|
-
|
|
8713
|
+
p((O) => {
|
|
8607
8714
|
const J = O[A];
|
|
8608
8715
|
if (J) {
|
|
8609
8716
|
const W = g.get(J.file);
|
|
8610
|
-
W && (URL.revokeObjectURL(W),
|
|
8717
|
+
W && (URL.revokeObjectURL(W), m((B) => {
|
|
8611
8718
|
const Ee = new Map(B);
|
|
8612
8719
|
return Ee.delete(J.file), Ee;
|
|
8613
8720
|
}));
|
|
@@ -8647,9 +8754,9 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
8647
8754
|
kind: O
|
|
8648
8755
|
});
|
|
8649
8756
|
}
|
|
8650
|
-
|
|
8757
|
+
p((B) => {
|
|
8651
8758
|
const Ee = [...B, ...J], Ut = Ee.slice(0, l);
|
|
8652
|
-
return Ee.length > l && W.push(`max ${l} attachments allowed`),
|
|
8759
|
+
return Ee.length > l && W.push(`max ${l} attachments allowed`), m((nn) => {
|
|
8653
8760
|
const ut = new Map(nn);
|
|
8654
8761
|
for (const Ue of Ut) Ue.kind === "image" && !ut.has(Ue.file) && ut.set(Ue.file, URL.createObjectURL(Ue.file));
|
|
8655
8762
|
return ut;
|
|
@@ -8716,7 +8823,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
8716
8823
|
type: "button",
|
|
8717
8824
|
"aria-label": `Remove ${A.file.name}`,
|
|
8718
8825
|
disabled: t,
|
|
8719
|
-
children: /* @__PURE__ */ d(
|
|
8826
|
+
children: /* @__PURE__ */ d(pr, {})
|
|
8720
8827
|
})]
|
|
8721
8828
|
}, J);
|
|
8722
8829
|
}
|
|
@@ -8736,7 +8843,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
8736
8843
|
type: "button",
|
|
8737
8844
|
"aria-label": `Remove ${A.file.name}`,
|
|
8738
8845
|
disabled: t,
|
|
8739
|
-
children: /* @__PURE__ */ d(
|
|
8846
|
+
children: /* @__PURE__ */ d(pr, {})
|
|
8740
8847
|
})
|
|
8741
8848
|
]
|
|
8742
8849
|
}, J);
|
|
@@ -8830,7 +8937,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
8830
8937
|
]
|
|
8831
8938
|
});
|
|
8832
8939
|
}
|
|
8833
|
-
function
|
|
8940
|
+
function mr({ message: e }) {
|
|
8834
8941
|
return e.includes("Origin not allowed") ? /* @__PURE__ */ v("div", {
|
|
8835
8942
|
className: "ak-error ak-error--origin",
|
|
8836
8943
|
role: "alert",
|
|
@@ -8965,7 +9072,7 @@ function gr({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
|
|
|
8965
9072
|
}),
|
|
8966
9073
|
i === "error" && /* @__PURE__ */ d("div", {
|
|
8967
9074
|
className: "ak-init-status ak-init-status--error",
|
|
8968
|
-
children: /* @__PURE__ */ d(
|
|
9075
|
+
children: /* @__PURE__ */ d(mr, { message: s ?? "Widget configuration is invalid." })
|
|
8969
9076
|
}),
|
|
8970
9077
|
i === "disabled" && /* @__PURE__ */ d("div", {
|
|
8971
9078
|
className: "ak-init-status ak-init-status--maintenance",
|
|
@@ -8982,7 +9089,7 @@ function gr({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
|
|
|
8982
9089
|
isLoading: r,
|
|
8983
9090
|
thinkingViewable: e.thinkingViewable
|
|
8984
9091
|
}),
|
|
8985
|
-
n && /* @__PURE__ */ d(
|
|
9092
|
+
n && /* @__PURE__ */ d(mr, { message: n }),
|
|
8986
9093
|
/* @__PURE__ */ d(Ds, {
|
|
8987
9094
|
onSend: l.onSendMessage,
|
|
8988
9095
|
disabled: r,
|
|
@@ -9108,7 +9215,7 @@ function Zo(e) {
|
|
|
9108
9215
|
export {
|
|
9109
9216
|
Ji as ApiClient,
|
|
9110
9217
|
Ds as Composer,
|
|
9111
|
-
|
|
9218
|
+
mr as ErrorState,
|
|
9112
9219
|
ts as EventEmitter,
|
|
9113
9220
|
xs as Header,
|
|
9114
9221
|
Js as Launcher,
|