@bymos/agentkit-sdk 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -210,9 +210,9 @@ var De = (e, t) => {
210
210
  r = t.defaultError, R.assertNever(e);
211
211
  }
212
212
  return { message: r };
213
- }, Ta = De;
213
+ }, Aa = De;
214
214
  function Ht() {
215
- return Ta;
215
+ return Aa;
216
216
  }
217
217
  var Gt = (e) => {
218
218
  const { data: t, path: r, errorMaps: n, issueData: a } = e, i = [...r, ...a.path || []], s = {
@@ -300,7 +300,7 @@ var ee = class Nn {
300
300
  }), Y = (e) => ({
301
301
  status: "valid",
302
302
  value: e
303
- }), Ar = (e) => e.status === "aborted", Tr = (e) => e.status === "dirty", Re = (e) => e.status === "valid", ft = (e) => typeof Promise < "u" && e instanceof Promise, w;
303
+ }), Tr = (e) => e.status === "aborted", Ar = (e) => e.status === "dirty", Re = (e) => e.status === "valid", ft = (e) => typeof Promise < "u" && e instanceof Promise, w;
304
304
  (function(e) {
305
305
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t?.message;
306
306
  })(w || (w = {}));
@@ -1342,7 +1342,7 @@ Kt.create = (e) => new Kt({
1342
1342
  coerce: e?.coerce || !1,
1343
1343
  ...N(e)
1344
1344
  });
1345
- var qt = class An extends L {
1345
+ var qt = class Tn extends L {
1346
1346
  _parse(t) {
1347
1347
  if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== b.date) {
1348
1348
  const a = this._getOrReturnCtx(t);
@@ -1377,7 +1377,7 @@ var qt = class An extends L {
1377
1377
  };
1378
1378
  }
1379
1379
  _addCheck(t) {
1380
- return new An({
1380
+ return new Tn({
1381
1381
  ...this._def,
1382
1382
  checks: [...this._def.checks, t]
1383
1383
  });
@@ -1600,12 +1600,12 @@ je.create = (e, t) => new je({
1600
1600
  typeName: I.ZodArray,
1601
1601
  ...N(t)
1602
1602
  });
1603
- function Te(e) {
1603
+ function Ae(e) {
1604
1604
  if (e instanceof ie) {
1605
1605
  const t = {};
1606
1606
  for (const r in e.shape) {
1607
1607
  const n = e.shape[r];
1608
- t[r] = _e.create(Te(n));
1608
+ t[r] = _e.create(Ae(n));
1609
1609
  }
1610
1610
  return new ie({
1611
1611
  ...e._def,
@@ -1613,8 +1613,8 @@ function Te(e) {
1613
1613
  });
1614
1614
  } else return e instanceof je ? new je({
1615
1615
  ...e._def,
1616
- type: Te(e.element)
1617
- }) : e instanceof _e ? _e.create(Te(e.unwrap())) : e instanceof Ie ? Ie.create(Te(e.unwrap())) : e instanceof Ce ? Ce.create(e.items.map((t) => Te(t))) : e;
1616
+ type: Ae(e.element)
1617
+ }) : e instanceof _e ? _e.create(Ae(e.unwrap())) : e instanceof Ie ? Ie.create(Ae(e.unwrap())) : e instanceof Ce ? Ce.create(e.items.map((t) => Ae(t))) : e;
1618
1618
  }
1619
1619
  var ie = class ne extends L {
1620
1620
  constructor() {
@@ -1769,7 +1769,7 @@ var ie = class ne extends L {
1769
1769
  });
1770
1770
  }
1771
1771
  deepPartial() {
1772
- return Te(this);
1772
+ return Ae(this);
1773
1773
  }
1774
1774
  partial(t) {
1775
1775
  const r = {};
@@ -1891,7 +1891,7 @@ _t.create = (e, t) => new _t({
1891
1891
  typeName: I.ZodUnion,
1892
1892
  ...N(t)
1893
1893
  });
1894
- var fe = (e) => e instanceof kt ? fe(e.schema) : e instanceof ke ? fe(e.innerType()) : e instanceof yt ? [e.value] : e instanceof Lt ? e.options : e instanceof bt ? R.objectValues(e.enum) : e instanceof xt ? fe(e._def.innerType) : e instanceof mt ? [void 0] : e instanceof gt ? [null] : e instanceof _e ? [void 0, ...fe(e.unwrap())] : e instanceof Ie ? [null, ...fe(e.unwrap())] : e instanceof jn || e instanceof St ? fe(e.unwrap()) : e instanceof wt ? fe(e._def.innerType) : [], ei = class Tn extends L {
1894
+ var fe = (e) => e instanceof kt ? fe(e.schema) : e instanceof ke ? fe(e.innerType()) : e instanceof yt ? [e.value] : e instanceof Lt ? e.options : e instanceof bt ? R.objectValues(e.enum) : e instanceof xt ? fe(e._def.innerType) : e instanceof mt ? [void 0] : e instanceof gt ? [null] : e instanceof _e ? [void 0, ...fe(e.unwrap())] : e instanceof Ie ? [null, ...fe(e.unwrap())] : e instanceof jn || e instanceof St ? fe(e.unwrap()) : e instanceof wt ? fe(e._def.innerType) : [], ei = class An extends L {
1895
1895
  _parse(t) {
1896
1896
  const { ctx: r } = this._processInputParams(t);
1897
1897
  if (r.parsedType !== b.object)
@@ -1934,7 +1934,7 @@ var fe = (e) => e instanceof kt ? fe(e.schema) : e instanceof ke ? fe(e.innerTyp
1934
1934
  a.set(o, i);
1935
1935
  }
1936
1936
  }
1937
- return new Tn({
1937
+ return new An({
1938
1938
  typeName: I.ZodDiscriminatedUnion,
1939
1939
  discriminator: t,
1940
1940
  options: r,
@@ -1983,9 +1983,9 @@ function nr(e, t) {
1983
1983
  var vt = class extends L {
1984
1984
  _parse(e) {
1985
1985
  const { status: t, ctx: r } = this._processInputParams(e), n = (a, i) => {
1986
- if (Ar(a) || Ar(i)) return C;
1986
+ if (Tr(a) || Tr(i)) return C;
1987
1987
  const s = nr(a.value, i.value);
1988
- return s.valid ? ((Tr(a) || Tr(i)) && t.dirty(), {
1988
+ return s.valid ? ((Ar(a) || Ar(i)) && t.dirty(), {
1989
1989
  status: t.value,
1990
1990
  value: s.data
1991
1991
  }) : (y(r, { code: _.invalid_intersection_types }), C);
@@ -2751,11 +2751,11 @@ St.create = (e, t) => new St({
2751
2751
  typeName: I.ZodReadonly,
2752
2752
  ...N(t)
2753
2753
  });
2754
- var cc = { object: ie.lazycreate }, I;
2754
+ var dc = { object: ie.lazycreate }, I;
2755
2755
  (function(e) {
2756
2756
  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";
2757
2757
  })(I || (I = {}));
2758
- var H = pt.create, dc = Yt.create, uc = cr.create, hc = Jt.create, Ft = Kt.create, fc = qt.create, pc = er.create, mc = mt.create, gc = gt.create, _c = tr.create, ni = Le.create, vc = we.create, kc = rr.create, yc = je.create, vr = ie.create, bc = ie.strictCreate, xc = _t.create, wc = ei.create, Sc = vt.create, Cc = Ce.create, ai = ti.create, Ic = ir.create, Nc = sr.create, Ec = ri.create, Mc = kt.create, Ac = yt.create, dr = Lt.create, Tc = bt.create, Lc = Ue.create, Rc = ke.create, jc = _e.create, Oc = Ie.create, Zc = ke.createWithPreprocess, $c = On.create, ii = vr({
2758
+ var H = pt.create, uc = Yt.create, hc = cr.create, fc = Jt.create, Ft = Kt.create, pc = qt.create, mc = er.create, gc = mt.create, _c = gt.create, vc = tr.create, ni = Le.create, kc = we.create, yc = rr.create, bc = je.create, vr = ie.create, xc = ie.strictCreate, wc = _t.create, Sc = ei.create, Cc = vt.create, Ic = Ce.create, ai = ti.create, Nc = ir.create, Ec = sr.create, Mc = ri.create, Tc = kt.create, Ac = yt.create, dr = Lt.create, Lc = bt.create, Rc = Ue.create, jc = ke.create, Oc = _e.create, Zc = Ie.create, $c = ke.createWithPreprocess, Pc = On.create, ii = vr({
2759
2759
  mode: dr([
2760
2760
  "light",
2761
2761
  "dark",
@@ -3359,7 +3359,7 @@ function Mi() {
3359
3359
  var e = document;
3360
3360
  return e.fullscreenElement || e.msFullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || null;
3361
3361
  }
3362
- function Ai() {
3362
+ function Ti() {
3363
3363
  var e = document;
3364
3364
  return (e.exitFullscreen || e.msExitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen).call(e);
3365
3365
  }
@@ -3375,7 +3375,7 @@ function br() {
3375
3375
  /android/i.test(n.appVersion)
3376
3376
  ]) >= 2 : !1;
3377
3377
  }
3378
- function Ti() {
3378
+ function Ai() {
3379
3379
  var e = navigator, t = window, r = Audio.prototype, n = t.visualViewport;
3380
3380
  return G([
3381
3381
  "srLatency" in r,
@@ -3410,7 +3410,7 @@ function ji() {
3410
3410
  return se() && !yr() && !Ni();
3411
3411
  }
3412
3412
  function Oi() {
3413
- return se() && Ke() && Qe() || Je() && Ti() && Ii();
3413
+ return se() && Ke() && Qe() || Je() && Ai() && Ii();
3414
3414
  }
3415
3415
  function Zi(e) {
3416
3416
  var t = 3, r = 500, n = 500, a = 5e3, i = function() {
@@ -3775,7 +3775,7 @@ function ds() {
3775
3775
  return ue(this, function(r) {
3776
3776
  switch (r.label) {
3777
3777
  case 0:
3778
- return t = hr(), fr(t) ? ct ? [2, Fn([], ct, !0)] : Mi() ? [4, Ai()] : [3, 2] : [3, 2];
3778
+ return t = hr(), fr(t) ? ct ? [2, Fn([], ct, !0)] : Mi() ? [4, Ti()] : [3, 2] : [3, 2];
3779
3779
  case 1:
3780
3780
  r.sent(), t = hr(), r.label = 2;
3781
3781
  case 2:
@@ -4273,14 +4273,14 @@ function Ms() {
4273
4273
  if (matchMedia("(color-gamut: ".concat(r, ")")).matches) return r;
4274
4274
  }
4275
4275
  }
4276
- function As() {
4276
+ function Ts() {
4277
4277
  if (Wr("inverted")) return !0;
4278
4278
  if (Wr("none")) return !1;
4279
4279
  }
4280
4280
  function Wr(e) {
4281
4281
  return matchMedia("(inverted-colors: ".concat(e, ")")).matches;
4282
4282
  }
4283
- function Ts() {
4283
+ function As() {
4284
4284
  if (Vr("active")) return !0;
4285
4285
  if (Vr("none")) return !1;
4286
4286
  }
@@ -4328,24 +4328,24 @@ var j = Math, B = function() {
4328
4328
  return 0;
4329
4329
  };
4330
4330
  function Ps() {
4331
- var e = j.acos || B, t = j.acosh || B, r = j.asin || B, n = j.asinh || B, a = j.atanh || B, i = j.atan || B, s = j.sin || B, o = j.sinh || B, l = j.cos || B, c = j.cosh || B, h = j.tan || B, u = j.tanh || B, p = j.exp || B, f = j.expm1 || B, g = j.log1p || B, v = function(A) {
4332
- return j.pow(j.PI, A);
4333
- }, x = function(A) {
4334
- return j.log(A + j.sqrt(A * A - 1));
4335
- }, m = function(A) {
4336
- return j.log(A + j.sqrt(A * A + 1));
4337
- }, k = function(A) {
4338
- return j.log((1 + A) / (1 - A)) / 2;
4339
- }, E = function(A) {
4340
- return j.exp(A) - 1 / j.exp(A) / 2;
4341
- }, O = function(A) {
4342
- return (j.exp(A) + 1 / j.exp(A)) / 2;
4343
- }, F = function(A) {
4344
- return j.exp(A) - 1;
4345
- }, z = function(A) {
4346
- return (j.exp(2 * A) - 1) / (j.exp(2 * A) + 1);
4347
- }, D = function(A) {
4348
- return j.log(1 + A);
4331
+ var e = j.acos || B, t = j.acosh || B, r = j.asin || B, n = j.asinh || B, a = j.atanh || B, i = j.atan || B, s = j.sin || B, o = j.sinh || B, l = j.cos || B, c = j.cosh || B, h = j.tan || B, u = j.tanh || B, p = j.exp || B, f = j.expm1 || B, g = j.log1p || B, v = function(T) {
4332
+ return j.pow(j.PI, T);
4333
+ }, x = function(T) {
4334
+ return j.log(T + j.sqrt(T * T - 1));
4335
+ }, m = function(T) {
4336
+ return j.log(T + j.sqrt(T * T + 1));
4337
+ }, k = function(T) {
4338
+ return j.log((1 + T) / (1 - T)) / 2;
4339
+ }, E = function(T) {
4340
+ return j.exp(T) - 1 / j.exp(T) / 2;
4341
+ }, O = function(T) {
4342
+ return (j.exp(T) + 1 / j.exp(T)) / 2;
4343
+ }, F = function(T) {
4344
+ return j.exp(T) - 1;
4345
+ }, z = function(T) {
4346
+ return (j.exp(2 * T) - 1) / (j.exp(2 * T) + 1);
4347
+ }, D = function(T) {
4348
+ return j.log(1 + T);
4349
4349
  };
4350
4350
  return {
4351
4351
  acos: e(0.12312423423423424),
@@ -4579,8 +4579,8 @@ function eo(e) {
4579
4579
  }
4580
4580
  }
4581
4581
  }
4582
- for (var A = 0, S = Js; A < S.length; A++)
4583
- for (var Z = S[A], he = 0, Ze = Qs; he < Ze.length; he++) {
4582
+ for (var T = 0, S = Js; T < S.length; T++)
4583
+ for (var Z = S[T], he = 0, Ze = Qs; he < Ze.length; he++) {
4584
4584
  var et = Ze[he], Zt = to(r, Z, et);
4585
4585
  c.push("".concat(Z, ".").concat(et, "=").concat(Zt.join(",")));
4586
4586
  }
@@ -4671,8 +4671,8 @@ var so = {
4671
4671
  vendorFlavors: xs,
4672
4672
  cookiesEnabled: ws,
4673
4673
  colorGamut: Ms,
4674
- invertedColors: As,
4675
- forcedColors: Ts,
4674
+ invertedColors: Ts,
4675
+ forcedColors: As,
4676
4676
  monochrome: Rs,
4677
4677
  contrast: js,
4678
4678
  reducedMotion: Os,
@@ -5132,11 +5132,11 @@ var Mo = class {
5132
5132
  removeAllListeners() {
5133
5133
  this.listeners.clear();
5134
5134
  }
5135
- }, Ao = "agentforge";
5135
+ }, To = "agentforge";
5136
5136
  function xr(e) {
5137
- return `${Ao}:session:${e}`;
5137
+ return `${To}:session:${e}`;
5138
5138
  }
5139
- function To(e) {
5139
+ function Ao(e) {
5140
5140
  try {
5141
5141
  return sessionStorage.getItem(xr(e)) ?? void 0;
5142
5142
  } catch {
@@ -5181,7 +5181,7 @@ function It(e) {
5181
5181
  const t = Math.floor(e / 6e4), r = Math.round(e % 6e4 / 1e3);
5182
5182
  return r > 0 ? `${t}m ${r}s` : `${t}m`;
5183
5183
  }
5184
- function Ae() {
5184
+ function Te() {
5185
5185
  return `msg-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
5186
5186
  }
5187
5187
  var Ro = class {
@@ -5198,7 +5198,7 @@ var Ro = class {
5198
5198
  preview: e.preview,
5199
5199
  configChannel: e.configChannel
5200
5200
  }), this.emitter = new Mo(), this.initializeFingerprint();
5201
- const n = e.sessionId ?? To(e.agentId);
5201
+ const n = e.sessionId ?? Ao(e.agentId);
5202
5202
  e.sessionId && at(e.agentId, e.sessionId);
5203
5203
  const a = e.mode === "inline";
5204
5204
  this.state = {
@@ -5285,7 +5285,7 @@ var Ro = class {
5285
5285
  kind: o.mimeType.startsWith("image/") ? "image" : "file"
5286
5286
  })) : void 0;
5287
5287
  return {
5288
- id: Ae(),
5288
+ id: Te(),
5289
5289
  role: n.role,
5290
5290
  content: n.content,
5291
5291
  images: !i && n.images && n.images.length > 0 ? n.images : void 0,
@@ -5322,7 +5322,7 @@ var Ro = class {
5322
5322
  if (typeof a.content != "string" || a.id && this.state.messages.some((i) => i.id === a.id)) return;
5323
5323
  if (a.direction === "human") {
5324
5324
  const i = {
5325
- id: a.id ?? Ae(),
5325
+ id: a.id ?? Te(),
5326
5326
  role: "assistant",
5327
5327
  content: a.content,
5328
5328
  createdAt: a.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
@@ -5338,7 +5338,7 @@ var Ro = class {
5338
5338
  }
5339
5339
  if (a.direction === "ai") {
5340
5340
  const i = {
5341
- id: a.id ?? Ae(),
5341
+ id: a.id ?? Te(),
5342
5342
  role: "assistant",
5343
5343
  content: a.content,
5344
5344
  createdAt: a.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
@@ -5422,7 +5422,7 @@ var Ro = class {
5422
5422
  return;
5423
5423
  }
5424
5424
  const a = n.filter((l) => l.kind === "image"), i = {
5425
- id: Ae(),
5425
+ id: Te(),
5426
5426
  role: "user",
5427
5427
  content: e.trim(),
5428
5428
  uploadedImageUrl: a[0]?.url,
@@ -5463,7 +5463,7 @@ var Ro = class {
5463
5463
  return;
5464
5464
  }
5465
5465
  const i = {
5466
- id: Ae(),
5466
+ id: Te(),
5467
5467
  role: "assistant",
5468
5468
  content: a.content,
5469
5469
  images: a.images,
@@ -5490,7 +5490,7 @@ var Ro = class {
5490
5490
  }
5491
5491
  }
5492
5492
  async sendStreaming(e, t, r, n = !1) {
5493
- const a = Ae(), i = {
5493
+ const a = Te(), i = {
5494
5494
  id: a,
5495
5495
  role: "assistant",
5496
5496
  content: "",
@@ -5693,7 +5693,10 @@ function $o(e, t) {
5693
5693
  function Po(e) {
5694
5694
  e.remove();
5695
5695
  }
5696
- function Fo() {
5696
+ function Fo(e) {
5697
+ document.body ? document.body.appendChild(e) : document.addEventListener("DOMContentLoaded", () => document.body.appendChild(e), { once: !0 });
5698
+ }
5699
+ function Wo() {
5697
5700
  const e = document.createElement("div");
5698
5701
  return e.setAttribute("data-agentkit-root", "floating"), e.style.cssText = [
5699
5702
  "position: fixed",
@@ -5701,9 +5704,9 @@ function Fo() {
5701
5704
  "right: 24px",
5702
5705
  "z-index: 2147483647",
5703
5706
  "pointer-events: none"
5704
- ].join("; "), document.body.appendChild(e), e;
5707
+ ].join("; "), Fo(e), e;
5705
5708
  }
5706
- function Wo(e) {
5709
+ function Vo(e) {
5707
5710
  getComputedStyle(e).position === "static" && (e.style.position = "relative");
5708
5711
  const t = document.createElement("div");
5709
5712
  return t.setAttribute("data-agentkit-root", "floating"), t.style.cssText = [
@@ -5714,19 +5717,19 @@ function Wo(e) {
5714
5717
  "pointer-events: none"
5715
5718
  ].join("; "), e.appendChild(t), t;
5716
5719
  }
5717
- function Vo(e) {
5720
+ function zo(e) {
5718
5721
  return e.setAttribute("data-agentkit-root", "inline"), getComputedStyle(e).position === "static" && (e.style.position = "relative"), e;
5719
5722
  }
5720
- function zo(e) {
5723
+ function Do(e) {
5721
5724
  e.remove();
5722
5725
  }
5723
- function Do(e) {
5726
+ function Uo(e) {
5724
5727
  e.removeAttribute("data-agentkit-root");
5725
5728
  }
5726
5729
  function ta(e, t, r, n, a) {
5727
5730
  const i = e.mode === "inline";
5728
5731
  let s = !1;
5729
- const o = i && a ? Vo(a) : !i && a ? Wo(a) : Fo(), l = Zo(o);
5732
+ const o = i && a ? zo(a) : !i && a ? Vo(a) : Wo(), l = Zo(o);
5730
5733
  $o(l.styleSlot, n);
5731
5734
  const c = new Ro(e, t, (p, f) => {
5732
5735
  s || h.update(p, f);
@@ -5760,7 +5763,7 @@ function ta(e, t, r, n, a) {
5760
5763
  s || (c.resetConversation(), c.emitter.emit("reset"));
5761
5764
  },
5762
5765
  destroy() {
5763
- s || (s = !0, c.closeEventStream(), h.destroy(), Po(l.host), i && a ? Do(a) : zo(o), c.emitter.emit("destroy"), c.emitter.removeAllListeners());
5766
+ s || (s = !0, c.closeEventStream(), h.destroy(), Po(l.host), i && a ? Uo(a) : Do(o), c.emitter.emit("destroy"), c.emitter.removeAllListeners());
5764
5767
  },
5765
5768
  on(p, f) {
5766
5769
  c.emitter.on(p, f);
@@ -5774,31 +5777,31 @@ function ta(e, t, r, n, a) {
5774
5777
  };
5775
5778
  return u;
5776
5779
  }
5777
- var Ve = /* @__PURE__ */ new Map(), Uo = 0;
5780
+ var Ve = /* @__PURE__ */ new Map(), Bo = 0;
5778
5781
  function ra(e) {
5779
- const t = `agentkit-widget-${++Uo}`, r = e.destroy.bind(e);
5782
+ const t = `agentkit-widget-${++Bo}`, r = e.destroy.bind(e);
5780
5783
  return e.destroy = () => {
5781
5784
  Ve.delete(t), r();
5782
5785
  }, Ve.set(t, e), t;
5783
5786
  }
5784
- function Bo(e, t, r) {
5787
+ function Ho(e, t, r) {
5785
5788
  const n = {
5786
5789
  ...e,
5787
5790
  mode: "floating"
5788
5791
  }, a = ta(Rt(n), n, t, r);
5789
5792
  return ra(a), a;
5790
5793
  }
5791
- function Ho(e, t, r, n) {
5794
+ function Go(e, t, r, n) {
5792
5795
  const a = {
5793
5796
  ...t,
5794
5797
  mode: "inline"
5795
5798
  }, i = ta(Rt(a), a, r, n, e);
5796
5799
  return ra(i), i;
5797
5800
  }
5798
- function Go(e) {
5801
+ function Yo(e) {
5799
5802
  e ? Ve.get(e)?.destroy() : (Ve.forEach((t) => t.destroy()), Ve.clear());
5800
5803
  }
5801
- var jt, M, na, Yo, xe, Yr, aa, ia, Dt, dt, ze, sa, wr, pr, mr, Xo, Nt = {}, Et = [], Jo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, qe = Array.isArray;
5804
+ var jt, M, na, Xo, xe, Yr, aa, ia, Dt, dt, ze, sa, wr, pr, mr, Jo, Nt = {}, Et = [], Qo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, qe = Array.isArray;
5802
5805
  function ge(e, t) {
5803
5806
  for (var r in t) e[r] = t[r];
5804
5807
  return e;
@@ -5841,7 +5844,7 @@ function Oe(e, t) {
5841
5844
  for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
5842
5845
  return typeof e.type == "function" ? Oe(e) : null;
5843
5846
  }
5844
- function Qo(e) {
5847
+ function Ko(e) {
5845
5848
  if (e.__P && e.__d) {
5846
5849
  var t = e.__v, r = t.__e, n = [], a = [], i = ge({}, t);
5847
5850
  i.__v = t.__v + 1, M.vnode && M.vnode(i), Cr(e.__P, i, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [r] : null, n, r ?? Oe(t), !!(32 & t.__u), a), i.__v = t.__v, i.__.__k[i.__i] = i, da(n, i, a), t.__e = t.__ = null, i.__e != r && oa(i);
@@ -5857,19 +5860,19 @@ function Xr(e) {
5857
5860
  }
5858
5861
  function Mt() {
5859
5862
  try {
5860
- for (var e, t = 1; xe.length; ) xe.length > t && xe.sort(ia), e = xe.shift(), t = xe.length, Qo(e);
5863
+ for (var e, t = 1; xe.length; ) xe.length > t && xe.sort(ia), e = xe.shift(), t = xe.length, Ko(e);
5861
5864
  } finally {
5862
5865
  xe.length = Mt.__r = 0;
5863
5866
  }
5864
5867
  }
5865
5868
  function la(e, t, r, n, a, i, s, o, l, c, h) {
5866
5869
  var u, p, f, g, v, x, m, k = n && n.__k || Et, E = t.length;
5867
- for (l = Ko(r, t, k, l, E), u = 0; u < E; u++) (f = r.__k[u]) != null && (p = f.__i != -1 && k[f.__i] || Nt, f.__i = u, x = Cr(e, f, p, a, i, s, o, l, c, h), g = f.__e, f.ref && p.ref != f.ref && (p.ref && Ir(p.ref, null, f), h.push(f.ref, f.__c || g, f)), v == null && g != null && (v = g), (m = !!(4 & f.__u)) || p.__k === f.__k ? (l = ca(f, l, e, m), m && p.__e && (p.__e = null)) : typeof f.type == "function" && x !== void 0 ? l = x : g && (l = g.nextSibling), f.__u &= -7);
5870
+ for (l = qo(r, t, k, l, E), u = 0; u < E; u++) (f = r.__k[u]) != null && (p = f.__i != -1 && k[f.__i] || Nt, f.__i = u, x = Cr(e, f, p, a, i, s, o, l, c, h), g = f.__e, f.ref && p.ref != f.ref && (p.ref && Ir(p.ref, null, f), h.push(f.ref, f.__c || g, f)), v == null && g != null && (v = g), (m = !!(4 & f.__u)) || p.__k === f.__k ? (l = ca(f, l, e, m), m && p.__e && (p.__e = null)) : typeof f.type == "function" && x !== void 0 ? l = x : g && (l = g.nextSibling), f.__u &= -7);
5868
5871
  return r.__e = v, l;
5869
5872
  }
5870
- function Ko(e, t, r, n, a) {
5873
+ function qo(e, t, r, n, a) {
5871
5874
  var i, s, o, l, c, h = r.length, u = h, p = 0;
5872
- for (e.__k = new Array(a), i = 0; i < a; i++) (s = t[i]) != null && typeof s != "boolean" && typeof s != "function" ? (typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? s = e.__k[i] = ut(null, s, null, null, null) : qe(s) ? s = e.__k[i] = ut(q, { children: s }, null, null, null) : s.constructor === void 0 && s.__b > 0 ? s = e.__k[i] = ut(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : e.__k[i] = s, l = i + p, s.__ = e, s.__b = e.__b + 1, o = null, (c = s.__i = qo(s, r, l, u)) != -1 && (u--, (o = r[c]) && (o.__u |= 2)), o == null || o.__v == null ? (c == -1 && (a > h ? p-- : a < h && p++), typeof s.type != "function" && (s.__u |= 4)) : c != l && (c == l - 1 ? p-- : c == l + 1 ? p++ : (c > l ? p-- : p++, s.__u |= 4))) : e.__k[i] = null;
5875
+ for (e.__k = new Array(a), i = 0; i < a; i++) (s = t[i]) != null && typeof s != "boolean" && typeof s != "function" ? (typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? s = e.__k[i] = ut(null, s, null, null, null) : qe(s) ? s = e.__k[i] = ut(q, { children: s }, null, null, null) : s.constructor === void 0 && s.__b > 0 ? s = e.__k[i] = ut(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : e.__k[i] = s, l = i + p, s.__ = e, s.__b = e.__b + 1, o = null, (c = s.__i = el(s, r, l, u)) != -1 && (u--, (o = r[c]) && (o.__u |= 2)), o == null || o.__v == null ? (c == -1 && (a > h ? p-- : a < h && p++), typeof s.type != "function" && (s.__u |= 4)) : c != l && (c == l - 1 ? p-- : c == l + 1 ? p++ : (c > l ? p-- : p++, s.__u |= 4))) : e.__k[i] = null;
5873
5876
  if (u) for (i = 0; i < h; i++) (o = r[i]) != null && (2 & o.__u) == 0 && (o.__e == n && (n = Oe(o)), ha(o, o));
5874
5877
  return n;
5875
5878
  }
@@ -5885,12 +5888,12 @@ function ca(e, t, r, n) {
5885
5888
  while (t != null && t.nodeType == 8);
5886
5889
  return t;
5887
5890
  }
5888
- function At(e, t) {
5891
+ function Tt(e, t) {
5889
5892
  return t = t || [], e == null || typeof e == "boolean" || (qe(e) ? e.some(function(r) {
5890
- At(r, t);
5893
+ Tt(r, t);
5891
5894
  }) : t.push(e)), t;
5892
5895
  }
5893
- function qo(e, t, r, n) {
5896
+ function el(e, t, r, n) {
5894
5897
  var a, i, s, o = e.key, l = e.type, c = t[r], h = c != null && (2 & c.__u) == 0;
5895
5898
  if (c === null && o == null || h && o == c.key && l == c.type) return r;
5896
5899
  if (n > (h ? 1 : 0)) {
@@ -5899,7 +5902,7 @@ function qo(e, t, r, n) {
5899
5902
  return -1;
5900
5903
  }
5901
5904
  function Jr(e, t, r) {
5902
- t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Jo.test(t) ? r : r + "px";
5905
+ t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Qo.test(t) ? r : r + "px";
5903
5906
  }
5904
5907
  function it(e, t, r, n, a) {
5905
5908
  var i, s;
@@ -5930,11 +5933,11 @@ function Qr(e) {
5930
5933
  };
5931
5934
  }
5932
5935
  function Cr(e, t, r, n, a, i, s, o, l, c) {
5933
- var h, u, p, f, g, v, x, m, k, E, O, F, z, D, A, S = t.type;
5936
+ var h, u, p, f, g, v, x, m, k, E, O, F, z, D, T, S = t.type;
5934
5937
  if (t.constructor !== void 0) return null;
5935
5938
  128 & r.__u && (l = !!(32 & r.__u), i = [o = t.__e = r.__e]), (h = M.__b) && h(t);
5936
5939
  e: if (typeof S == "function") try {
5937
- if (m = t.props, k = S.prototype && S.prototype.render, E = (h = S.contextType) && n[h.__c], O = h ? E ? E.props.value : h.__ : n, r.__c ? x = (u = t.__c = r.__c).__ = u.__E : (k ? t.__c = u = new S(m, O) : (t.__c = u = new ve(m, O), u.constructor = S, u.render = tl), E && E.sub(u), u.state || (u.state = {}), u.__n = n, p = u.__d = !0, u.__h = [], u._sb = []), k && u.__s == null && (u.__s = u.state), k && S.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = ge({}, u.__s)), ge(u.__s, S.getDerivedStateFromProps(m, u.__s))), f = u.props, g = u.state, u.__v = t, p) k && S.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), k && u.componentDidMount != null && u.__h.push(u.componentDidMount);
5940
+ if (m = t.props, k = S.prototype && S.prototype.render, E = (h = S.contextType) && n[h.__c], O = h ? E ? E.props.value : h.__ : n, r.__c ? x = (u = t.__c = r.__c).__ = u.__E : (k ? t.__c = u = new S(m, O) : (t.__c = u = new ve(m, O), u.constructor = S, u.render = rl), E && E.sub(u), u.state || (u.state = {}), u.__n = n, p = u.__d = !0, u.__h = [], u._sb = []), k && u.__s == null && (u.__s = u.state), k && S.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = ge({}, u.__s)), ge(u.__s, S.getDerivedStateFromProps(m, u.__s))), f = u.props, g = u.state, u.__v = t, p) k && S.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), k && u.componentDidMount != null && u.__h.push(u.componentDidMount);
5938
5941
  else {
5939
5942
  if (k && S.getDerivedStateFromProps == null && m !== f && u.componentWillReceiveProps != null && u.componentWillReceiveProps(m, O), t.__v == r.__v || !u.__e && u.shouldComponentUpdate != null && u.shouldComponentUpdate(m, u.__s, O) === !1) {
5940
5943
  t.__v != r.__v && (u.props = m, u.state = u.__s, u.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(Z) {
@@ -5956,13 +5959,13 @@ function Cr(e, t, r, n, a, i, s, o, l, c) {
5956
5959
  for (t.__u |= l ? 160 : 128; o && o.nodeType == 8 && o.nextSibling; ) o = o.nextSibling;
5957
5960
  i[i.indexOf(o)] = null, t.__e = o;
5958
5961
  } else {
5959
- for (A = i.length; A--; ) Sr(i[A]);
5962
+ for (T = i.length; T--; ) Sr(i[T]);
5960
5963
  gr(t);
5961
5964
  }
5962
5965
  else t.__e = r.__e, t.__k = r.__k, Z.then || gr(t);
5963
5966
  M.__e(Z, t, r);
5964
5967
  }
5965
- else i == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : o = t.__e = el(r.__e, t, r, n, a, i, s, l, c);
5968
+ else i == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : o = t.__e = tl(r.__e, t, r, n, a, i, s, l, c);
5966
5969
  return (h = M.diffed) && h(t), 128 & t.__u ? void 0 : o;
5967
5970
  }
5968
5971
  function gr(e) {
@@ -5983,7 +5986,7 @@ function da(e, t, r) {
5983
5986
  function ua(e) {
5984
5987
  return typeof e != "object" || e == null || e.__b > 0 ? e : qe(e) ? e.map(ua) : e.constructor !== void 0 ? null : ge({}, e);
5985
5988
  }
5986
- function el(e, t, r, n, a, i, s, o, l) {
5989
+ function tl(e, t, r, n, a, i, s, o, l) {
5987
5990
  var c, h, u, p, f, g, v, x = r.props || Nt, m = t.props, k = t.type;
5988
5991
  if (k == "svg" ? a = "http://www.w3.org/2000/svg" : k == "math" ? a = "http://www.w3.org/1998/Math/MathML" : a || (a = "http://www.w3.org/1999/xhtml"), i != null) {
5989
5992
  for (c = 0; c < i.length; c++) if ((f = i[c]) && "setAttribute" in f == !!k && (k ? f.localName == k : f.nodeType == 3)) {
@@ -6029,7 +6032,7 @@ function ha(e, t, r) {
6029
6032
  if (n = e.__k) for (a = 0; a < n.length; a++) n[a] && ha(n[a], t, r || typeof e.type != "function");
6030
6033
  r || Sr(e.__e), e.__c = e.__ = e.__e = void 0;
6031
6034
  }
6032
- function tl(e, t, r) {
6035
+ function rl(e, t, r) {
6033
6036
  return this.constructor(e, r);
6034
6037
  }
6035
6038
  function fa(e, t, r) {
@@ -6043,7 +6046,7 @@ jt = Et.slice, M = { __e: function(e, t, r, n) {
6043
6046
  e = o;
6044
6047
  }
6045
6048
  throw e;
6046
- } }, na = 0, Yo = function(e) {
6049
+ } }, na = 0, Xo = function(e) {
6047
6050
  return e != null && e.constructor === void 0;
6048
6051
  }, ve.prototype.setState = function(e, t) {
6049
6052
  var r = this.__s != null && this.__s != this.state ? this.__s : this.__s = ge({}, this.state);
@@ -6052,7 +6055,7 @@ jt = Et.slice, M = { __e: function(e, t, r, n) {
6052
6055
  this.__v && (this.__e = !0, e && this.__h.push(e), Xr(this));
6053
6056
  }, ve.prototype.render = q, xe = [], aa = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ia = function(e, t) {
6054
6057
  return e.__v.__b - t.__v.__b;
6055
- }, Mt.__r = 0, Dt = Math.random().toString(8), dt = "__d" + Dt, ze = "__a" + Dt, sa = /(PointerCapture)$|Capture$/i, wr = 0, pr = Qr(!1), mr = Qr(!0), Xo = 0;
6058
+ }, Mt.__r = 0, Dt = Math.random().toString(8), dt = "__d" + Dt, ze = "__a" + Dt, sa = /(PointerCapture)$|Capture$/i, wr = 0, pr = Qr(!1), mr = Qr(!0), Jo = 0;
6056
6059
  var Ge, W, Ut, Kr, Ye = 0, pa = [], V = M, qr = V.__b, en = V.__r, tn = V.diffed, rn = V.__c, nn = V.unmount, an = V.__;
6057
6060
  function Nr(e, t) {
6058
6061
  V.__h && V.__h(W, e, Ye || t), Ye = 0;
@@ -6063,9 +6066,9 @@ function Nr(e, t) {
6063
6066
  return e >= r.__.length && r.__.push({}), r.__[e];
6064
6067
  }
6065
6068
  function oe(e) {
6066
- return Ye = 1, rl(ga, e);
6069
+ return Ye = 1, nl(ga, e);
6067
6070
  }
6068
- function rl(e, t, r) {
6071
+ function nl(e, t, r) {
6069
6072
  var n = Nr(Ge++, 2);
6070
6073
  if (n.t = e, !n.__c && (n.__ = [r ? r(t) : ga(void 0, t), function(o) {
6071
6074
  var l = n.__N ? n.__N[0] : n.__[0], c = n.t(l, o);
@@ -6112,12 +6115,12 @@ function Ot(e, t) {
6112
6115
  var r = Nr(Ge++, 7);
6113
6116
  return ma(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
6114
6117
  }
6115
- function nl(e, t) {
6118
+ function al(e, t) {
6116
6119
  return Ye = 8, Ot(function() {
6117
6120
  return e;
6118
6121
  }, t);
6119
6122
  }
6120
- function al() {
6123
+ function il() {
6121
6124
  for (var e; e = pa.shift(); ) {
6122
6125
  var t = e.__H;
6123
6126
  if (e.__P && t) try {
@@ -6140,7 +6143,7 @@ V.__b = function(e) {
6140
6143
  }, V.diffed = function(e) {
6141
6144
  tn && tn(e);
6142
6145
  var t = e.__c;
6143
- t && t.__H && (t.__H.__h.length && (pa.push(t) !== 1 && Kr === V.requestAnimationFrame || ((Kr = V.requestAnimationFrame) || il)(al)), t.__H.__.some(function(r) {
6146
+ t && t.__H && (t.__H.__h.length && (pa.push(t) !== 1 && Kr === V.requestAnimationFrame || ((Kr = V.requestAnimationFrame) || sl)(il)), t.__H.__.some(function(r) {
6144
6147
  r.u && (r.__H = r.u), r.u = void 0;
6145
6148
  })), Ut = W = null;
6146
6149
  }, V.__c = function(e, t) {
@@ -6167,7 +6170,7 @@ V.__b = function(e) {
6167
6170
  }), r.__H = void 0, t && V.__e(t, r.__v));
6168
6171
  };
6169
6172
  var sn = typeof requestAnimationFrame == "function";
6170
- function il(e) {
6173
+ function sl(e) {
6171
6174
  var t, r = function() {
6172
6175
  clearTimeout(n), sn && cancelAnimationFrame(t), setTimeout(e);
6173
6176
  }, n = setTimeout(r, 35);
@@ -6189,7 +6192,7 @@ function ma(e, t) {
6189
6192
  function ga(e, t) {
6190
6193
  return typeof t == "function" ? t(e) : t;
6191
6194
  }
6192
- function sl(e, t) {
6195
+ function ol(e, t) {
6193
6196
  for (var r in t) e[r] = t[r];
6194
6197
  return e;
6195
6198
  }
@@ -6208,19 +6211,19 @@ var cn = M.__b;
6208
6211
  M.__b = function(e) {
6209
6212
  e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), cn && cn(e);
6210
6213
  };
6211
- var Pc = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
6212
- var ol = M.__e;
6214
+ var Fc = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
6215
+ var ll = M.__e;
6213
6216
  M.__e = function(e, t, r, n) {
6214
6217
  if (e.then) {
6215
6218
  for (var a, i = t; i = i.__; ) if ((a = i.__c) && a.__c) return t.__e ?? (t.__e = r.__e, t.__k = r.__k), a.__c(e, t);
6216
6219
  }
6217
- ol(e, t, r, n);
6220
+ ll(e, t, r, n);
6218
6221
  };
6219
6222
  var dn = M.unmount;
6220
6223
  function _a(e, t, r) {
6221
6224
  return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(n) {
6222
6225
  typeof n.__c == "function" && n.__c();
6223
- }), e.__c.__H = null), (e = sl({}, e)).__c != null && (e.__c.__P === r && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(n) {
6226
+ }), e.__c.__H = null), (e = ol({}, e)).__c != null && (e.__c.__P === r && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(n) {
6224
6227
  return _a(n, t, r);
6225
6228
  })), e;
6226
6229
  }
@@ -6292,7 +6295,7 @@ var un = function(e, t, r) {
6292
6295
  };
6293
6296
  }, st.prototype.render = function(e) {
6294
6297
  this.i = null, this.l = /* @__PURE__ */ new Map();
6295
- var t = At(e.children);
6298
+ var t = Tt(e.children);
6296
6299
  e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
6297
6300
  for (var r = t.length; r--; ) this.l.set(t[r], this.i = [
6298
6301
  1,
@@ -6306,10 +6309,10 @@ var un = function(e, t, r) {
6306
6309
  un(e, r, t);
6307
6310
  });
6308
6311
  };
6309
- var ll = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, cl = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, dl = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ul = /[A-Z0-9]/g, hl = typeof document < "u", fl = function(e) {
6312
+ var cl = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, dl = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ul = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, hl = /[A-Z0-9]/g, fl = typeof document < "u", pl = function(e) {
6310
6313
  return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
6311
6314
  };
6312
- function pl(e, t, r) {
6315
+ function ml(e, t, r) {
6313
6316
  return t.__k ?? (t.textContent = ""), fa(e, t), typeof r == "function" && r(), e ? e.__c : null;
6314
6317
  }
6315
6318
  ve.prototype.isReactComponent = !0, [
@@ -6340,7 +6343,7 @@ M.event = function(e) {
6340
6343
  return this.defaultPrevented;
6341
6344
  }, e.nativeEvent = e;
6342
6345
  };
6343
- var ya, ml = {
6346
+ var ya, gl = {
6344
6347
  configurable: !0,
6345
6348
  get: function() {
6346
6349
  return this.class;
@@ -6351,17 +6354,17 @@ M.vnode = function(e) {
6351
6354
  var r = t.props, n = t.type, a = {}, i = n.indexOf("-") == -1;
6352
6355
  for (var s in r) {
6353
6356
  var o = r[s];
6354
- if (!(s === "value" && "defaultValue" in r && o == null || hl && s === "children" && n === "noscript" || s === "class" || s === "className")) {
6357
+ if (!(s === "value" && "defaultValue" in r && o == null || fl && s === "children" && n === "noscript" || s === "class" || s === "className")) {
6355
6358
  var l = s.toLowerCase();
6356
- s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && o === !0 ? o = "" : l === "translate" && o === "no" ? o = !1 : l[0] === "o" && l[1] === "n" ? l === "ondoubleclick" ? s = "ondblclick" : l !== "onchange" || n !== "input" && n !== "textarea" || fl(r.type) ? l === "onfocus" ? s = "onfocusin" : l === "onblur" ? s = "onfocusout" : dl.test(s) && (s = l) : l = s = "oninput" : i && cl.test(s) ? s = s.replace(ul, "-$&").toLowerCase() : o === null && (o = void 0), l === "oninput" && a[s = l] && (s = "oninputCapture"), a[s] = o;
6359
+ s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && o === !0 ? o = "" : l === "translate" && o === "no" ? o = !1 : l[0] === "o" && l[1] === "n" ? l === "ondoubleclick" ? s = "ondblclick" : l !== "onchange" || n !== "input" && n !== "textarea" || pl(r.type) ? l === "onfocus" ? s = "onfocusin" : l === "onblur" ? s = "onfocusout" : ul.test(s) && (s = l) : l = s = "oninput" : i && dl.test(s) ? s = s.replace(hl, "-$&").toLowerCase() : o === null && (o = void 0), l === "oninput" && a[s = l] && (s = "oninputCapture"), a[s] = o;
6357
6360
  }
6358
6361
  }
6359
- n == "select" && (a.multiple && Array.isArray(a.value) && (a.value = At(r.children).forEach(function(c) {
6362
+ n == "select" && (a.multiple && Array.isArray(a.value) && (a.value = Tt(r.children).forEach(function(c) {
6360
6363
  c.props.selected = a.value.indexOf(c.props.value) != -1;
6361
- })), a.defaultValue != null && (a.value = At(r.children).forEach(function(c) {
6364
+ })), a.defaultValue != null && (a.value = Tt(r.children).forEach(function(c) {
6362
6365
  c.props.selected = a.multiple ? a.defaultValue.indexOf(c.props.value) != -1 : a.defaultValue == c.props.value;
6363
- }))), r.class && !r.className ? (a.class = r.class, Object.defineProperty(a, "className", ml)) : r.className && (a.class = a.className = r.className), t.props = a;
6364
- })(e), e.$$typeof = ll, fn && fn(e);
6366
+ }))), r.class && !r.className ? (a.class = r.class, Object.defineProperty(a, "className", gl)) : r.className && (a.class = a.className = r.className), t.props = a;
6367
+ })(e), e.$$typeof = cl, fn && fn(e);
6365
6368
  };
6366
6369
  var pn = M.__r;
6367
6370
  M.__r = function(e) {
@@ -6373,20 +6376,20 @@ M.diffed = function(e) {
6373
6376
  var t = e.props, r = e.__e;
6374
6377
  r != null && e.type === "textarea" && "value" in t && t.value !== r.value && (r.value = t.value == null ? "" : t.value), ya = null;
6375
6378
  };
6376
- function gl(e) {
6379
+ function _l(e) {
6377
6380
  return !!e.__k && (fa(null, e), !0);
6378
6381
  }
6379
- function _l(e) {
6382
+ function vl(e) {
6380
6383
  return {
6381
6384
  render: function(t) {
6382
- pl(t, e);
6385
+ ml(t, e);
6383
6386
  },
6384
6387
  unmount: function() {
6385
- gl(e);
6388
+ _l(e);
6386
6389
  }
6387
6390
  };
6388
6391
  }
6389
- function vl(e) {
6392
+ function kl(e) {
6390
6393
  const { theme: t } = e, r = [
6391
6394
  `--ak-accent: ${t.accentColor}`,
6392
6395
  `--ak-font: ${t.fontFamily}`,
@@ -6394,10 +6397,10 @@ function vl(e) {
6394
6397
  ];
6395
6398
  return r.push(`--ak-accent-hover: color-mix(in srgb, ${t.accentColor} 85%, black)`), `:host { ${r.join("; ")} }`;
6396
6399
  }
6397
- function kl(e) {
6400
+ function yl(e) {
6398
6401
  return e !== "system" ? e : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
6399
6402
  }
6400
- var yl = `
6403
+ var bl = `
6401
6404
  *, *::before, *::after {
6402
6405
  box-sizing: border-box;
6403
6406
  margin: 0;
@@ -8303,7 +8306,7 @@ var yl = `
8303
8306
  }
8304
8307
  }
8305
8308
  `;
8306
- var bl = 0;
8309
+ var xl = 0;
8307
8310
  function d(e, t, r, n, a, i) {
8308
8311
  t || (t = {});
8309
8312
  var s, o, l = t;
@@ -8319,7 +8322,7 @@ function d(e, t, r, n, a, i) {
8319
8322
  __e: null,
8320
8323
  __c: null,
8321
8324
  constructor: void 0,
8322
- __v: --bl,
8325
+ __v: --xl,
8323
8326
  __i: -1,
8324
8327
  __u: 0,
8325
8328
  __source: a,
@@ -8328,7 +8331,7 @@ function d(e, t, r, n, a, i) {
8328
8331
  if (typeof e == "function" && (s = e.defaultProps)) for (o in s) l[o] === void 0 && (l[o] = s[o]);
8329
8332
  return M.vnode && M.vnode(c), c;
8330
8333
  }
8331
- function xl() {
8334
+ function wl() {
8332
8335
  return /* @__PURE__ */ d("svg", {
8333
8336
  width: "16",
8334
8337
  height: "16",
@@ -8367,7 +8370,7 @@ function xl() {
8367
8370
  ]
8368
8371
  });
8369
8372
  }
8370
- function wl() {
8373
+ function Sl() {
8371
8374
  return /* @__PURE__ */ d("svg", {
8372
8375
  width: "14",
8373
8376
  height: "14",
@@ -8389,7 +8392,7 @@ function wl() {
8389
8392
  })]
8390
8393
  });
8391
8394
  }
8392
- function Sl() {
8395
+ function Cl() {
8393
8396
  return /* @__PURE__ */ d("svg", {
8394
8397
  width: "16",
8395
8398
  height: "16",
@@ -8402,7 +8405,7 @@ function Sl() {
8402
8405
  children: [/* @__PURE__ */ d("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ d("path", { d: "M3 3v5h5" })]
8403
8406
  });
8404
8407
  }
8405
- function Cl({ title: e, subtitle: t, avatarUrl: r, onClose: n, onReset: a, hideClose: i = !1 }) {
8408
+ function Il({ title: e, subtitle: t, avatarUrl: r, onClose: n, onReset: a, hideClose: i = !1 }) {
8406
8409
  const [s, o] = oe(!1);
8407
8410
  return /* @__PURE__ */ d("div", {
8408
8411
  className: `ak-header${s ? " ak-header--confirming" : ""}`,
@@ -8417,7 +8420,7 @@ function Cl({ title: e, subtitle: t, avatarUrl: r, onClose: n, onReset: a, hideC
8417
8420
  }) : /* @__PURE__ */ d("span", {
8418
8421
  className: "ak-header__bot-icon",
8419
8422
  "aria-hidden": "true",
8420
- children: /* @__PURE__ */ d(xl, {})
8423
+ children: /* @__PURE__ */ d(wl, {})
8421
8424
  }),
8422
8425
  /* @__PURE__ */ d("div", {
8423
8426
  className: "ak-header__title-group",
@@ -8446,14 +8449,14 @@ function Cl({ title: e, subtitle: t, avatarUrl: r, onClose: n, onReset: a, hideC
8446
8449
  "aria-label": "New conversation",
8447
8450
  type: "button",
8448
8451
  title: "Start a new conversation (Retains current conversation to memory)",
8449
- children: /* @__PURE__ */ d(Sl, {})
8452
+ children: /* @__PURE__ */ d(Cl, {})
8450
8453
  }),
8451
8454
  !i && /* @__PURE__ */ d("button", {
8452
8455
  className: "ak-header__close",
8453
8456
  onClick: n,
8454
8457
  "aria-label": "Close chat",
8455
8458
  type: "button",
8456
- children: /* @__PURE__ */ d(wl, {})
8459
+ children: /* @__PURE__ */ d(Sl, {})
8457
8460
  })
8458
8461
  ]
8459
8462
  })
@@ -8502,7 +8505,7 @@ function Xe(e) {
8502
8505
  "tel"
8503
8506
  ].includes(r) ? t : null : t;
8504
8507
  }
8505
- function Il(e) {
8508
+ function Nl(e) {
8506
8509
  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)\$/g, "$1").replace(/\x00DOLLAR\x00/g, "$").replace(/\\[a-zA-Z]+\*?/g, "").replace(/\n{3,}/g, `
8507
8510
 
8508
8511
  `);
@@ -8515,8 +8518,8 @@ function ba(e) {
8515
8518
  return () => clearInterval(r);
8516
8519
  }, [e]);
8517
8520
  }
8518
- var Nl = 800;
8519
- function El({ up: e }) {
8521
+ var El = 800;
8522
+ function Ml({ up: e }) {
8520
8523
  return /* @__PURE__ */ d("svg", {
8521
8524
  width: "10",
8522
8525
  height: "10",
@@ -8530,7 +8533,7 @@ function El({ up: e }) {
8530
8533
  children: /* @__PURE__ */ d("polyline", { points: e ? "18 15 12 9 6 15" : "6 9 12 15 18 9" })
8531
8534
  });
8532
8535
  }
8533
- function Tt({ event: e, active: t }) {
8536
+ function At({ event: e, active: t }) {
8534
8537
  return t ? /* @__PURE__ */ d("span", {
8535
8538
  className: "ak-progress__spinner",
8536
8539
  "aria-hidden": "true"
@@ -8569,7 +8572,7 @@ function gn({ events: e, live: t, answerStartedAtMs: r }) {
8569
8572
  return /* @__PURE__ */ d("li", {
8570
8573
  className: l ? "ak-progress__step ak-progress__step--active" : "ak-progress__step",
8571
8574
  children: [
8572
- /* @__PURE__ */ d(Tt, {
8575
+ /* @__PURE__ */ d(At, {
8573
8576
  event: s,
8574
8577
  active: l
8575
8578
  }),
@@ -8586,11 +8589,11 @@ function gn({ events: e, live: t, answerStartedAtMs: r }) {
8586
8589
  })
8587
8590
  });
8588
8591
  }
8589
- function Ml({ events: e, answerStartedAtMs: t }) {
8592
+ function Tl({ events: e, answerStartedAtMs: t }) {
8590
8593
  const [r, n] = oe(0), a = Math.min(r, e.length - 1), i = a < e.length - 1;
8591
8594
  K(() => {
8592
8595
  if (!i) return;
8593
- const h = setTimeout(() => n((u) => Math.min(u + 1, e.length - 1)), Nl);
8596
+ const h = setTimeout(() => n((u) => Math.min(u + 1, e.length - 1)), El);
8594
8597
  return () => clearTimeout(h);
8595
8598
  }, [
8596
8599
  i,
@@ -8606,7 +8609,7 @@ function Ml({ events: e, answerStartedAtMs: t }) {
8606
8609
  children: /* @__PURE__ */ d("li", {
8607
8610
  className: "ak-progress__item ak-progress__item--active",
8608
8611
  children: [
8609
- o ? /* @__PURE__ */ d(Tt, {
8612
+ o ? /* @__PURE__ */ d(At, {
8610
8613
  event: s,
8611
8614
  active: !1
8612
8615
  }) : /* @__PURE__ */ d("span", {
@@ -8649,7 +8652,7 @@ function Al({ ackText: e, events: t = [], collapsed: r = !0, isComplete: n = !1,
8649
8652
  events: t,
8650
8653
  live: !0,
8651
8654
  answerStartedAtMs: i
8652
- }) : /* @__PURE__ */ d(Ml, {
8655
+ }) : /* @__PURE__ */ d(Tl, {
8653
8656
  events: t,
8654
8657
  answerStartedAtMs: i
8655
8658
  });
@@ -8663,7 +8666,7 @@ function Al({ ackText: e, events: t = [], collapsed: r = !0, isComplete: n = !1,
8663
8666
  "aria-expanded": s,
8664
8667
  "aria-label": s ? "Hide working steps" : "Show working steps",
8665
8668
  children: [
8666
- /* @__PURE__ */ d(Tt, {
8669
+ /* @__PURE__ */ d(At, {
8667
8670
  event: {
8668
8671
  stage: "",
8669
8672
  text: "",
@@ -8682,7 +8685,7 @@ function Al({ ackText: e, events: t = [], collapsed: r = !0, isComplete: n = !1,
8682
8685
  t.length === 1 ? "" : "s"
8683
8686
  ]
8684
8687
  }),
8685
- /* @__PURE__ */ d(El, { up: s })
8688
+ /* @__PURE__ */ d(Ml, { up: s })
8686
8689
  ]
8687
8690
  }), s && /* @__PURE__ */ d(gn, {
8688
8691
  events: t,
@@ -8692,7 +8695,7 @@ function Al({ ackText: e, events: t = [], collapsed: r = !0, isComplete: n = !1,
8692
8695
  className: "ak-progress",
8693
8696
  children: /* @__PURE__ */ d("p", {
8694
8697
  className: "ak-progress__summary ak-progress__summary--static",
8695
- children: [/* @__PURE__ */ d(Tt, {
8698
+ children: [/* @__PURE__ */ d(At, {
8696
8699
  event: {
8697
8700
  stage: "",
8698
8701
  text: "",
@@ -8704,7 +8707,7 @@ function Al({ ackText: e, events: t = [], collapsed: r = !0, isComplete: n = !1,
8704
8707
  })
8705
8708
  }) : null;
8706
8709
  }
8707
- function Tl() {
8710
+ function Ll() {
8708
8711
  return /* @__PURE__ */ d("svg", {
8709
8712
  className: "ak-agent-status__icon",
8710
8713
  width: "13",
@@ -8715,12 +8718,12 @@ function Tl() {
8715
8718
  children: /* @__PURE__ */ d("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" })
8716
8719
  });
8717
8720
  }
8718
- function Ll({ status: e }) {
8721
+ function Rl({ status: e }) {
8719
8722
  return /* @__PURE__ */ d("div", {
8720
8723
  className: "ak-agent-status",
8721
8724
  role: "status",
8722
8725
  "aria-live": "polite",
8723
- children: [/* @__PURE__ */ d(Tl, {}), /* @__PURE__ */ d("span", {
8726
+ children: [/* @__PURE__ */ d(Ll, {}), /* @__PURE__ */ d("span", {
8724
8727
  className: "ak-agent-status__text",
8725
8728
  children: e
8726
8729
  })]
@@ -9025,7 +9028,7 @@ function kn({ url: e, mimeType: t, fileName: r }) {
9025
9028
  })]
9026
9029
  });
9027
9030
  }
9028
- function Rl(e) {
9031
+ function jl(e) {
9029
9032
  try {
9030
9033
  return new Date(e).toLocaleTimeString([], {
9031
9034
  hour: "2-digit",
@@ -9071,8 +9074,8 @@ function Q(e) {
9071
9074
  }
9072
9075
  return r < e.length && t.push(e.slice(r)), t;
9073
9076
  }
9074
- function jl(e) {
9075
- e = Il(e);
9077
+ function Ol(e) {
9078
+ e = Nl(e);
9076
9079
  const t = e.split(`
9077
9080
  `), r = [];
9078
9081
  let n = 0, a = 0;
@@ -9252,7 +9255,7 @@ function jl(e) {
9252
9255
  }
9253
9256
  return /* @__PURE__ */ d(q, { children: r });
9254
9257
  }
9255
- function Ol({ message: e }) {
9258
+ function Zl({ message: e }) {
9256
9259
  const [t, r] = oe(null), [n, a] = oe(null), i = e.role === "user", s = e.status === "error", o = e.status === "streaming", l = !!(e.images && e.images.length > 0), c = !!(e.documents && e.documents.length > 0), h = (() => {
9257
9260
  if (!i) return [];
9258
9261
  const S = (e.uploadedAttachments ?? []).filter((Z) => Z.kind === "image").map((Z) => ({
@@ -9312,7 +9315,7 @@ function Ol({ message: e }) {
9312
9315
  }),
9313
9316
  e.content && /* @__PURE__ */ d("div", {
9314
9317
  className: g ? "ak-message__image-caption" : void 0,
9315
- children: [m ? jl(e.content) : e.content, o && /* @__PURE__ */ d("span", {
9318
+ children: [m ? Ol(e.content) : e.content, o && /* @__PURE__ */ d("span", {
9316
9319
  className: "ak-cursor",
9317
9320
  "aria-hidden": "true",
9318
9321
  children: [
@@ -9324,10 +9327,10 @@ function Ol({ message: e }) {
9324
9327
  }),
9325
9328
  /* @__PURE__ */ d("span", {
9326
9329
  className: "ak-message__time",
9327
- children: Rl(e.createdAt)
9330
+ children: jl(e.createdAt)
9328
9331
  })
9329
9332
  ]
9330
- }), A = !!e.content || g || f || c || !o && !e.toolStatus;
9333
+ }), T = !!e.content || g || f || c || !o && !e.toolStatus;
9331
9334
  return /* @__PURE__ */ d("div", {
9332
9335
  className: `ak-message ${E}`,
9333
9336
  children: [
@@ -9349,7 +9352,7 @@ function Ol({ message: e }) {
9349
9352
  /* @__PURE__ */ d("span", { className: "ak-typing-row__dot" })
9350
9353
  ]
9351
9354
  }),
9352
- !i && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ d(Ll, { status: e.toolStatus }),
9355
+ !i && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ d(Rl, { status: e.toolStatus }),
9353
9356
  k && /* @__PURE__ */ d("span", {
9354
9357
  className: "ak-message__sender-label",
9355
9358
  children: [/* @__PURE__ */ d("span", {
@@ -9361,7 +9364,7 @@ function Ol({ message: e }) {
9361
9364
  children: F
9362
9365
  })]
9363
9366
  }),
9364
- A && D,
9367
+ T && D,
9365
9368
  h.length > 0 && /* @__PURE__ */ d(vn, {
9366
9369
  images: h.map((S) => ({
9367
9370
  src: S.url,
@@ -9388,7 +9391,7 @@ function Ol({ message: e }) {
9388
9391
  ]
9389
9392
  });
9390
9393
  }
9391
- function Zl() {
9394
+ function $l() {
9392
9395
  return /* @__PURE__ */ d("div", {
9393
9396
  className: "ak-typing",
9394
9397
  "aria-label": "Assistant is typing",
@@ -9399,7 +9402,7 @@ function Zl() {
9399
9402
  ]
9400
9403
  });
9401
9404
  }
9402
- function $l(e, t) {
9405
+ function Pl(e, t) {
9403
9406
  const r = [];
9404
9407
  let n = null;
9405
9408
  for (const a of e) {
@@ -9418,8 +9421,8 @@ function $l(e, t) {
9418
9421
  }
9419
9422
  return r;
9420
9423
  }
9421
- function Pl({ messages: e, isLoading: t, operatorFallbackLabel: r = "Operator" }) {
9422
- const n = me(null), a = me(null), i = me(!0), s = Ot(() => $l(e, r), [e, r]);
9424
+ function Fl({ messages: e, isLoading: t, operatorFallbackLabel: r = "Operator" }) {
9425
+ const n = me(null), a = me(null), i = me(!0), s = Ot(() => Pl(e, r), [e, r]);
9423
9426
  return K(() => {
9424
9427
  if (!(n.current?.parentElement ?? n.current)) return;
9425
9428
  const o = (h) => {
@@ -9448,13 +9451,13 @@ function Pl({ messages: e, isLoading: t, operatorFallbackLabel: r = "Operator" }
9448
9451
  className: "ak-handoff-divider__label",
9449
9452
  children: o.label
9450
9453
  })
9451
- }, o.id) : /* @__PURE__ */ d(Ol, { message: o.message }, o.message.id)),
9452
- t && !e.some((o) => o.status === "streaming") && /* @__PURE__ */ d(Zl, {}),
9454
+ }, o.id) : /* @__PURE__ */ d(Zl, { message: o.message }, o.message.id)),
9455
+ t && !e.some((o) => o.status === "streaming") && /* @__PURE__ */ d($l, {}),
9453
9456
  /* @__PURE__ */ d("div", { ref: a })
9454
9457
  ]
9455
9458
  });
9456
9459
  }
9457
- function Fl() {
9460
+ function Wl() {
9458
9461
  return /* @__PURE__ */ d("svg", {
9459
9462
  width: "30",
9460
9463
  height: "30",
@@ -9494,7 +9497,7 @@ function Fl() {
9494
9497
  ]
9495
9498
  });
9496
9499
  }
9497
- function Wl({ title: e, description: t, suggestedQuestions: r, avatarUrl: n, onSelect: a }) {
9500
+ function Vl({ title: e, description: t, suggestedQuestions: r, avatarUrl: n, onSelect: a }) {
9498
9501
  const i = (r ?? []).filter((s) => (s.title ?? "").trim().length > 0);
9499
9502
  return /* @__PURE__ */ d("div", {
9500
9503
  className: "ak-empty-state",
@@ -9517,7 +9520,7 @@ function Wl({ title: e, description: t, suggestedQuestions: r, avatarUrl: n, onS
9517
9520
  }) : /* @__PURE__ */ d("span", {
9518
9521
  className: "ak-empty-state__bot-icon",
9519
9522
  "aria-hidden": "true",
9520
- children: /* @__PURE__ */ d(Fl, {})
9523
+ children: /* @__PURE__ */ d(Wl, {})
9521
9524
  })
9522
9525
  }),
9523
9526
  /* @__PURE__ */ d("p", {
@@ -9548,8 +9551,8 @@ function Wl({ title: e, description: t, suggestedQuestions: r, avatarUrl: n, onS
9548
9551
  ]
9549
9552
  });
9550
9553
  }
9551
- var Vl = "https://klicforge.ai/privacy-policy", zl = "https://klicforge.ai/terms-of-service";
9552
- function Dl() {
9554
+ var zl = "https://klicforge.ai/privacy-policy", Dl = "https://klicforge.ai/terms-of-service";
9555
+ function Ul() {
9553
9556
  return /* @__PURE__ */ d("svg", {
9554
9557
  width: "16",
9555
9558
  height: "16",
@@ -9567,7 +9570,7 @@ function Dl() {
9567
9570
  }), /* @__PURE__ */ d("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })]
9568
9571
  });
9569
9572
  }
9570
- function Ul() {
9573
+ function Bl() {
9571
9574
  return /* @__PURE__ */ d("svg", {
9572
9575
  width: "14",
9573
9576
  height: "14",
@@ -9589,7 +9592,7 @@ function Ul() {
9589
9592
  })]
9590
9593
  });
9591
9594
  }
9592
- function Bl() {
9595
+ function Hl() {
9593
9596
  return /* @__PURE__ */ d("svg", {
9594
9597
  width: "14",
9595
9598
  height: "14",
@@ -9652,30 +9655,30 @@ var xa = [
9652
9655
  ".md",
9653
9656
  ".txt",
9654
9657
  ".csv"
9655
- ], Hl = [...wa, ...xa].join(","), Sa = [
9658
+ ], Gl = [...wa, ...xa].join(","), Sa = [
9656
9659
  "image/jpeg",
9657
9660
  "image/png",
9658
9661
  "image/gif",
9659
9662
  "image/webp"
9660
- ], Gl = Sa.join(",");
9661
- function Yl(e) {
9663
+ ], Yl = Sa.join(",");
9664
+ function Xl(e) {
9662
9665
  if (xa.includes(e.type)) return !0;
9663
9666
  const t = e.name.toLowerCase();
9664
9667
  return wa.some((r) => t.endsWith(r));
9665
9668
  }
9666
- function Xl(e) {
9669
+ function Jl(e) {
9667
9670
  return Sa.includes(e.type);
9668
9671
  }
9669
- function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…", photoSendingEnabled: n = !1, fileUploadEnabled: a = !1, attachmentMaxCount: i = 5, attachmentMaxFileSizeMb: s = 1 }) {
9672
+ function Ql({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…", photoSendingEnabled: n = !1, fileUploadEnabled: a = !1, attachmentMaxCount: i = 5, attachmentMaxFileSizeMb: s = 1 }) {
9670
9673
  const [o, l] = oe(""), [c, h] = oe([]), [u, p] = oe(/* @__PURE__ */ new Map()), [f, g] = oe(!1), v = me(null), x = me(null), m = me(null), k = me(null), E = me(null), O = n || a, F = Ot(() => s * 1024 * 1024, [s]);
9671
9674
  K(() => () => {
9672
- u.forEach((T) => URL.revokeObjectURL(T));
9675
+ u.forEach((A) => URL.revokeObjectURL(A));
9673
9676
  }, []), K(() => {
9674
9677
  t || v.current?.focus();
9675
9678
  }, [t]);
9676
- const z = nl((T) => {
9679
+ const z = al((A) => {
9677
9680
  if (!f) return;
9678
- const P = T.composedPath ? T.composedPath() : [], re = !!k.current && P.includes(k.current), U = !!E.current && P.includes(E.current);
9681
+ const P = A.composedPath ? A.composedPath() : [], re = !!k.current && P.includes(k.current), U = !!E.current && P.includes(E.current);
9679
9682
  !re && !U && g(!1);
9680
9683
  }, [f]);
9681
9684
  K(() => {
@@ -9685,11 +9688,11 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9685
9688
  O || g(!1);
9686
9689
  }, [O]);
9687
9690
  function D() {
9688
- u.forEach((T) => URL.revokeObjectURL(T)), p(/* @__PURE__ */ new Map()), h([]), x.current && (x.current.value = ""), m.current && (m.current.value = "");
9691
+ u.forEach((A) => URL.revokeObjectURL(A)), p(/* @__PURE__ */ new Map()), h([]), x.current && (x.current.value = ""), m.current && (m.current.value = "");
9689
9692
  }
9690
- function A(T) {
9693
+ function T(A) {
9691
9694
  h((P) => {
9692
- const re = P[T];
9695
+ const re = P[A];
9693
9696
  if (re) {
9694
9697
  const U = u.get(re.file);
9695
9698
  U && (URL.revokeObjectURL(U), p((X) => {
@@ -9697,29 +9700,29 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9697
9700
  return $e.delete(re.file), $e;
9698
9701
  }));
9699
9702
  }
9700
- return P.filter((U, X) => X !== T);
9703
+ return P.filter((U, X) => X !== A);
9701
9704
  });
9702
9705
  }
9703
9706
  function S() {
9704
- const T = o.trim();
9705
- !T && c.length === 0 || t || (e(T, c), l(""), D(), v.current && (v.current.style.height = "auto"));
9707
+ const A = o.trim();
9708
+ !A && c.length === 0 || t || (e(A, c), l(""), D(), v.current && (v.current.style.height = "auto"));
9706
9709
  }
9707
- function Z(T) {
9708
- T.key === "Enter" && !T.shiftKey && (T.preventDefault(), S());
9710
+ function Z(A) {
9711
+ A.key === "Enter" && !A.shiftKey && (A.preventDefault(), S());
9709
9712
  }
9710
- function he(T) {
9711
- const P = T.currentTarget;
9713
+ function he(A) {
9714
+ const P = A.currentTarget;
9712
9715
  l(P.value), P.style.height = "auto", P.style.height = `${P.scrollHeight}px`;
9713
9716
  }
9714
- function Ze(T, P) {
9715
- if (T.length === 0) return;
9717
+ function Ze(A, P) {
9718
+ if (A.length === 0) return;
9716
9719
  const re = [], U = [];
9717
- for (const X of T) {
9718
- if (P === "image" && !Xl(X)) {
9720
+ for (const X of A) {
9721
+ if (P === "image" && !Jl(X)) {
9719
9722
  U.push(`${X.name} (image type not supported)`);
9720
9723
  continue;
9721
9724
  }
9722
- if (P === "file" && !Yl(X)) {
9725
+ if (P === "file" && !Xl(X)) {
9723
9726
  U.push(`${X.name} (file type not supported)`);
9724
9727
  continue;
9725
9728
  }
@@ -9734,8 +9737,8 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9734
9737
  }
9735
9738
  h((X) => {
9736
9739
  const $e = [...X, ...re], Er = $e.slice(0, i);
9737
- return $e.length > i && U.push(`max ${i} attachments allowed`), p((Aa) => {
9738
- const $t = new Map(Aa);
9740
+ return $e.length > i && U.push(`max ${i} attachments allowed`), p((Ta) => {
9741
+ const $t = new Map(Ta);
9739
9742
  for (const tt of Er) tt.kind === "image" && !$t.has(tt.file) && $t.set(tt.file, URL.createObjectURL(tt.file));
9740
9743
  return $t;
9741
9744
  }), Er;
@@ -9743,13 +9746,13 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9743
9746
  • ${U.join(`
9744
9747
  • `)}`);
9745
9748
  }
9746
- function et(T) {
9747
- const P = Array.from(T.currentTarget.files ?? []);
9748
- T.currentTarget.value = "", Ze(P, "image");
9749
+ function et(A) {
9750
+ const P = Array.from(A.currentTarget.files ?? []);
9751
+ A.currentTarget.value = "", Ze(P, "image");
9749
9752
  }
9750
- function Zt(T) {
9751
- const P = Array.from(T.currentTarget.files ?? []);
9752
- T.currentTarget.value = "", Ze(P, "file");
9753
+ function Zt(A) {
9754
+ const P = Array.from(A.currentTarget.files ?? []);
9755
+ A.currentTarget.value = "", Ze(P, "file");
9753
9756
  }
9754
9757
  function Na() {
9755
9758
  g(!1), x.current?.click();
@@ -9771,7 +9774,7 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9771
9774
  type: "button",
9772
9775
  role: "menuitem",
9773
9776
  disabled: t,
9774
- children: [/* @__PURE__ */ d(Bl, {}), /* @__PURE__ */ d("span", { children: "Photo" })]
9777
+ children: [/* @__PURE__ */ d(Hl, {}), /* @__PURE__ */ d("span", { children: "Photo" })]
9775
9778
  }), a && /* @__PURE__ */ d("button", {
9776
9779
  className: "ak-composer__attach-menu-item",
9777
9780
  onClick: Ea,
@@ -9784,22 +9787,22 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9784
9787
  c.length > 0 && /* @__PURE__ */ d("div", {
9785
9788
  className: "ak-composer__attachments",
9786
9789
  role: "list",
9787
- children: c.map((T, P) => {
9788
- const re = `${T.file.name}-${P}`;
9789
- if (T.kind === "image") {
9790
- const U = u.get(T.file);
9790
+ children: c.map((A, P) => {
9791
+ const re = `${A.file.name}-${P}`;
9792
+ if (A.kind === "image") {
9793
+ const U = u.get(A.file);
9791
9794
  return /* @__PURE__ */ d("div", {
9792
9795
  className: "ak-composer__preview-wrap",
9793
9796
  role: "listitem",
9794
9797
  children: [U && /* @__PURE__ */ d("img", {
9795
9798
  src: U,
9796
- alt: T.file.name,
9799
+ alt: A.file.name,
9797
9800
  className: "ak-composer__preview-img"
9798
9801
  }), /* @__PURE__ */ d("button", {
9799
9802
  className: "ak-composer__preview-remove",
9800
- onClick: () => A(P),
9803
+ onClick: () => T(P),
9801
9804
  type: "button",
9802
- "aria-label": `Remove ${T.file.name}`,
9805
+ "aria-label": `Remove ${A.file.name}`,
9803
9806
  disabled: t,
9804
9807
  children: /* @__PURE__ */ d(xn, {})
9805
9808
  })]
@@ -9812,14 +9815,14 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9812
9815
  /* @__PURE__ */ d(bn, {}),
9813
9816
  /* @__PURE__ */ d("span", {
9814
9817
  className: "ak-composer__file-chip-name",
9815
- title: T.file.name,
9816
- children: T.file.name
9818
+ title: A.file.name,
9819
+ children: A.file.name
9817
9820
  }),
9818
9821
  /* @__PURE__ */ d("button", {
9819
9822
  className: "ak-composer__file-chip-remove",
9820
- onClick: () => A(P),
9823
+ onClick: () => T(P),
9821
9824
  type: "button",
9822
- "aria-label": `Remove ${T.file.name}`,
9825
+ "aria-label": `Remove ${A.file.name}`,
9823
9826
  disabled: t,
9824
9827
  children: /* @__PURE__ */ d(xn, {})
9825
9828
  })
@@ -9835,7 +9838,7 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9835
9838
  ref: x,
9836
9839
  type: "file",
9837
9840
  multiple: !0,
9838
- accept: Gl,
9841
+ accept: Yl,
9839
9842
  className: "ak-composer__file-input",
9840
9843
  onChange: et,
9841
9844
  disabled: t,
@@ -9845,7 +9848,7 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9845
9848
  ref: m,
9846
9849
  type: "file",
9847
9850
  multiple: !0,
9848
- accept: Hl,
9851
+ accept: Gl,
9849
9852
  className: "ak-composer__file-input",
9850
9853
  onChange: Zt,
9851
9854
  disabled: t,
@@ -9856,13 +9859,13 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9856
9859
  children: /* @__PURE__ */ d("button", {
9857
9860
  ref: E,
9858
9861
  className: `ak-composer__attach${f ? " ak-composer__attach--open" : ""}`,
9859
- onClick: () => g((T) => !T),
9862
+ onClick: () => g((A) => !A),
9860
9863
  disabled: t,
9861
9864
  "aria-label": "Attachment options",
9862
9865
  "aria-haspopup": "true",
9863
9866
  "aria-expanded": f,
9864
9867
  type: "button",
9865
- children: /* @__PURE__ */ d(Ul, {})
9868
+ children: /* @__PURE__ */ d(Bl, {})
9866
9869
  })
9867
9870
  })
9868
9871
  ] }),
@@ -9883,7 +9886,7 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9883
9886
  disabled: !Ma,
9884
9887
  "aria-label": "Send message",
9885
9888
  type: "button",
9886
- children: /* @__PURE__ */ d(Dl, {})
9889
+ children: /* @__PURE__ */ d(Ul, {})
9887
9890
  })
9888
9891
  ]
9889
9892
  }),
@@ -9893,7 +9896,7 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9893
9896
  "By chatting you agree to our",
9894
9897
  " ",
9895
9898
  /* @__PURE__ */ d("a", {
9896
- href: Vl,
9899
+ href: zl,
9897
9900
  target: "_blank",
9898
9901
  rel: "noopener noreferrer",
9899
9902
  children: "Privacy Policy"
@@ -9902,7 +9905,7 @@ function Jl({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
9902
9905
  "and",
9903
9906
  " ",
9904
9907
  /* @__PURE__ */ d("a", {
9905
- href: zl,
9908
+ href: Dl,
9906
9909
  target: "_blank",
9907
9910
  rel: "noopener noreferrer",
9908
9911
  children: "Terms of Service"
@@ -9946,7 +9949,7 @@ function wn({ message: e }) {
9946
9949
  })]
9947
9950
  });
9948
9951
  }
9949
- function Ql() {
9952
+ function Kl() {
9950
9953
  return /* @__PURE__ */ d("svg", {
9951
9954
  width: "28",
9952
9955
  height: "28",
@@ -9964,7 +9967,7 @@ function Ql() {
9964
9967
  }), /* @__PURE__ */ d("path", { d: "M12 7v5l3 2" })]
9965
9968
  });
9966
9969
  }
9967
- function Kl() {
9970
+ function ql() {
9968
9971
  return /* @__PURE__ */ d("div", {
9969
9972
  className: "ak-maintenance",
9970
9973
  role: "status",
@@ -9976,7 +9979,7 @@ function Kl() {
9976
9979
  }),
9977
9980
  /* @__PURE__ */ d("div", {
9978
9981
  className: "ak-maintenance__icon",
9979
- children: /* @__PURE__ */ d(Ql, {})
9982
+ children: /* @__PURE__ */ d(Kl, {})
9980
9983
  }),
9981
9984
  /* @__PURE__ */ d("p", {
9982
9985
  className: "ak-maintenance__title",
@@ -9989,7 +9992,7 @@ function Kl() {
9989
9992
  ]
9990
9993
  });
9991
9994
  }
9992
- function ql() {
9995
+ function ec() {
9993
9996
  return /* @__PURE__ */ d("svg", {
9994
9997
  width: "11",
9995
9998
  height: "11",
@@ -10008,11 +10011,11 @@ function ql() {
10008
10011
  })]
10009
10012
  });
10010
10013
  }
10011
- function ec() {
10014
+ function tc() {
10012
10015
  return /* @__PURE__ */ d("div", {
10013
10016
  className: "ak-branding",
10014
10017
  children: [
10015
- /* @__PURE__ */ d(ql, {}),
10018
+ /* @__PURE__ */ d(ec, {}),
10016
10019
  /* @__PURE__ */ d("span", {
10017
10020
  className: "ak-branding__label",
10018
10021
  children: "Powered by"
@@ -10032,7 +10035,7 @@ function Sn({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
10032
10035
  role: "dialog",
10033
10036
  "aria-label": e.title,
10034
10037
  children: [
10035
- /* @__PURE__ */ d(Cl, {
10038
+ /* @__PURE__ */ d(Il, {
10036
10039
  title: e.title,
10037
10040
  subtitle: e.subtitle,
10038
10041
  avatarUrl: e.avatarUrl,
@@ -10053,21 +10056,21 @@ function Sn({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
10053
10056
  }),
10054
10057
  i === "disabled" && /* @__PURE__ */ d("div", {
10055
10058
  className: "ak-init-status ak-init-status--maintenance",
10056
- children: /* @__PURE__ */ d(Kl, {})
10059
+ children: /* @__PURE__ */ d(ql, {})
10057
10060
  }),
10058
10061
  i === "ready" && /* @__PURE__ */ d(q, { children: [
10059
- t.length === 0 ? /* @__PURE__ */ d(Wl, {
10062
+ t.length === 0 ? /* @__PURE__ */ d(Vl, {
10060
10063
  title: e.title,
10061
10064
  description: e.description ?? e.subtitle,
10062
10065
  suggestedQuestions: e.suggestedQuestions,
10063
10066
  avatarUrl: e.avatarUrl,
10064
10067
  onSelect: (l) => o.onSendMessage(l, [])
10065
- }) : /* @__PURE__ */ d(Pl, {
10068
+ }) : /* @__PURE__ */ d(Fl, {
10066
10069
  messages: t,
10067
10070
  isLoading: r
10068
10071
  }),
10069
10072
  n && /* @__PURE__ */ d(wn, { message: n }),
10070
- /* @__PURE__ */ d(Jl, {
10073
+ /* @__PURE__ */ d(Ql, {
10071
10074
  onSend: o.onSendMessage,
10072
10075
  disabled: r,
10073
10076
  placeholder: "Type a message…",
@@ -10078,10 +10081,10 @@ function Sn({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
10078
10081
  })
10079
10082
  ] })
10080
10083
  ]
10081
- }), !a && /* @__PURE__ */ d(ec, {})]
10084
+ }), !a && /* @__PURE__ */ d(tc, {})]
10082
10085
  });
10083
10086
  }
10084
- function tc() {
10087
+ function rc() {
10085
10088
  return /* @__PURE__ */ d("svg", {
10086
10089
  width: "24",
10087
10090
  height: "24",
@@ -10094,7 +10097,7 @@ function tc() {
10094
10097
  children: /* @__PURE__ */ d("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
10095
10098
  });
10096
10099
  }
10097
- function rc() {
10100
+ function nc() {
10098
10101
  return /* @__PURE__ */ d("svg", {
10099
10102
  width: "22",
10100
10103
  height: "22",
@@ -10107,7 +10110,7 @@ function rc() {
10107
10110
  children: /* @__PURE__ */ d("polyline", { points: "6,9 12,15 18,9" })
10108
10111
  });
10109
10112
  }
10110
- function nc({ isOpen: e, onClick: t, avatarUrl: r, ariaLabel: n = "Toggle chat" }) {
10113
+ function ac({ isOpen: e, onClick: t, avatarUrl: r, ariaLabel: n = "Toggle chat" }) {
10111
10114
  const a = !e && !!r;
10112
10115
  return /* @__PURE__ */ d("button", {
10113
10116
  className: `ak-launcher${a ? " ak-launcher--avatar" : ""}`,
@@ -10115,12 +10118,12 @@ function nc({ isOpen: e, onClick: t, avatarUrl: r, ariaLabel: n = "Toggle chat"
10115
10118
  "aria-label": n,
10116
10119
  "aria-expanded": e,
10117
10120
  type: "button",
10118
- children: e ? /* @__PURE__ */ d(rc, {}) : a ? /* @__PURE__ */ d("img", {
10121
+ children: e ? /* @__PURE__ */ d(nc, {}) : a ? /* @__PURE__ */ d("img", {
10119
10122
  src: r,
10120
10123
  alt: "",
10121
10124
  className: "ak-launcher__avatar-img",
10122
10125
  "aria-hidden": "true"
10123
- }) : /* @__PURE__ */ d(tc, {})
10126
+ }) : /* @__PURE__ */ d(rc, {})
10124
10127
  });
10125
10128
  }
10126
10129
  function Cn({ config: e, state: t, callbacks: r }) {
@@ -10128,7 +10131,7 @@ function Cn({ config: e, state: t, callbacks: r }) {
10128
10131
  return K(() => {
10129
10132
  const i = a.current?.getRootNode()?.host;
10130
10133
  if (!i) return;
10131
- const s = kl(e.theme.mode);
10134
+ const s = yl(e.theme.mode);
10132
10135
  i.setAttribute("data-theme", s);
10133
10136
  }, [e.theme.mode]), K(() => {
10134
10137
  if (n) return;
@@ -10159,7 +10162,7 @@ function Cn({ config: e, state: t, callbacks: r }) {
10159
10162
  initStatus: t.initStatus,
10160
10163
  initError: t.initError,
10161
10164
  callbacks: r
10162
- }), /* @__PURE__ */ d(nc, {
10165
+ }), /* @__PURE__ */ d(ac, {
10163
10166
  isOpen: t.isOpen,
10164
10167
  onClick: t.isOpen ? r.onClose : r.onOpen,
10165
10168
  avatarUrl: e.avatarUrl
@@ -10167,7 +10170,7 @@ function Cn({ config: e, state: t, callbacks: r }) {
10167
10170
  });
10168
10171
  }
10169
10172
  var Ca = (e, t, r, n) => {
10170
- const a = _l(e);
10173
+ const a = vl(e);
10171
10174
  return a.render(He(Cn, {
10172
10175
  config: t,
10173
10176
  state: r,
@@ -10187,31 +10190,31 @@ var Ca = (e, t, r, n) => {
10187
10190
  }
10188
10191
  };
10189
10192
  };
10190
- function ac(e) {
10191
- return yl + `
10192
- ` + vl(e);
10193
+ function ic(e) {
10194
+ return bl + `
10195
+ ` + kl(e);
10193
10196
  }
10194
10197
  function Ia(e, t) {
10195
- return ac(Rt({
10198
+ return ic(Rt({
10196
10199
  ...e,
10197
10200
  mode: t
10198
10201
  }));
10199
10202
  }
10200
- function ic(e, t = Ca, r) {
10201
- return Bo(e, t, r ?? Ia(e, "floating"));
10203
+ function sc(e, t = Ca, r) {
10204
+ return Ho(e, t, r ?? Ia(e, "floating"));
10202
10205
  }
10203
- function sc(e, t, r = Ca, n) {
10204
- return Ho(e, t, r, n ?? Ia(t, "inline"));
10206
+ function oc(e, t, r = Ca, n) {
10207
+ return Go(e, t, r, n ?? Ia(t, "inline"));
10205
10208
  }
10206
- function oc(e) {
10207
- Go(e);
10209
+ function lc(e) {
10210
+ Yo(e);
10208
10211
  }
10209
- var lc = {
10210
- init: ic,
10211
- mount: sc,
10212
- destroy: oc
10212
+ var cc = {
10213
+ init: sc,
10214
+ mount: oc,
10215
+ destroy: lc
10213
10216
  };
10214
- window.AgentKit = lc;
10217
+ window.AgentKit = cc;
10215
10218
  export {
10216
- lc as AgentKit
10219
+ cc as AgentKit
10217
10220
  };