@pagelines/sdk 1.0.820 → 1.0.822

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/AgentWrap.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as e } from "./rolldown-runtime.js";
2
2
  import { s as t, t as n } from "./sdkClient.js";
3
3
  import { Agent as r, CHAT_ISSUE_COPY as i, CUSTOMER_AGENT_STATE_LABEL as a, SettingsObject as o, createLogger as s, customerAgentState as c, getDefaultAvatarUrl as u, isAssistantSilenceControl as f, parseChatCardFencePayload as p, parseChatVisualFencePayload as m } from "@pagelines/core";
4
- import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as ne, onMounted as re, onUnmounted as ie, openBlock as P, ref as F, renderList as I, renderSlot as ae, resolveDynamicComponent as R, shallowRef as B, toDisplayString as H, unref as U, useTemplateRef as oe, vModelText as se, watch as ce, withCtx as ue, withDirectives as de, withKeys as pe, withModifiers as W } from "vue";
4
+ import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as ne, onMounted as re, onUnmounted as ie, openBlock as P, ref as F, renderList as I, renderSlot as ae, resolveDynamicComponent as R, shallowRef as B, toDisplayString as H, unref as oe, useTemplateRef as se, vModelText as ce, watch as ue, withCtx as U, withDirectives as de, withKeys as pe, withModifiers as W } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
6
  var he = { class: "spinner max-w-sm" }, G = {
7
7
  class: "ring-circular h-full w-full origin-center",
@@ -613,7 +613,7 @@ Current User:
613
613
  });
614
614
  }
615
615
  setupBoundaryWatcher() {
616
- ce(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
616
+ ue(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
617
617
  this.scheduleBoundary(e);
618
618
  });
619
619
  }
@@ -675,12 +675,12 @@ Current User:
675
675
  });
676
676
  }
677
677
  setupModeWatcher() {
678
- ce(this.agentMode, async (e, t) => {
678
+ ue(this.agentMode, async (e, t) => {
679
679
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
680
680
  });
681
681
  }
682
682
  setupAvailabilityWatcher() {
683
- ce(() => [this.chatEnabled, this._agent.state.value.lifecycle], ([e]) => {
683
+ ue(() => [this.chatEnabled, this._agent.state.value.lifecycle], ([e]) => {
684
684
  if (!(!this.isTextMode || this.isConnecting)) {
685
685
  if (e) {
686
686
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -1107,7 +1107,7 @@ var Ee = {
1107
1107
  src: e.agent.avatarUrl.value,
1108
1108
  alt: e.agent.displayName.value,
1109
1109
  class: "w-full h-full object-cover",
1110
- onError: n[0] || (n[0] = (...e) => U(handleImageError) && U(handleImageError)(...e))
1110
+ onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1111
1111
  }, null, 40, Ne)], 2), S("div", Pe, [e.isOnline ? (P(), x(h, { key: 0 }, [n[1] || (n[1] = S("div", {
1112
1112
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1113
1113
  style: { "animation-duration": "3s" }
@@ -1365,64 +1365,64 @@ function _unsupportedIterableToArray(e, t) {
1365
1365
  return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
1366
1366
  }
1367
1367
  }
1368
- var J = Object.entries, Qe = Object.setPrototypeOf, $e = Object.isFrozen, et = Object.getPrototypeOf, tt = Object.getOwnPropertyDescriptor, nt = Object.freeze, rt = Object.seal, it = Object.create, at = typeof Reflect < "u" && Reflect, st = at.apply, ct = at.construct;
1369
- nt || (nt = function freeze(e) {
1368
+ var Qe = Object.entries, $e = Object.setPrototypeOf, et = Object.isFrozen, J = Object.getPrototypeOf, tt = Object.getOwnPropertyDescriptor, X = Object.freeze, nt = Object.seal, rt = Object.create, it = typeof Reflect < "u" && Reflect, at = it.apply, st = it.construct;
1369
+ X || (X = function freeze(e) {
1370
1370
  return e;
1371
- }), rt || (rt = function seal(e) {
1371
+ }), nt || (nt = function seal(e) {
1372
1372
  return e;
1373
- }), st || (st = function apply(e, t) {
1373
+ }), at || (at = function apply(e, t) {
1374
1374
  var n = [...arguments].slice(2);
1375
1375
  return e.apply(t, n);
1376
- }), ct || (ct = function construct(e) {
1376
+ }), st || (st = function construct(e) {
1377
1377
  return new e(...[...arguments].slice(1));
1378
1378
  });
1379
- var lt = unapply(Array.prototype.forEach), ut = unapply(Array.prototype.lastIndexOf), dt = unapply(Array.prototype.pop), ft = unapply(Array.prototype.push), pt = unapply(Array.prototype.splice), mt = Array.isArray, ht = unapply(String.prototype.toLowerCase), gt = unapply(String.prototype.toString), _t = unapply(String.prototype.match), vt = unapply(String.prototype.replace), yt = unapply(String.prototype.indexOf), bt = unapply(String.prototype.trim), xt = unapply(Number.prototype.toString), St = unapply(Boolean.prototype.toString), Ct = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), wt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), X = unapply(Object.prototype.hasOwnProperty), Z = unapply(Object.prototype.toString), Q = unapply(RegExp.prototype.test), Tt = unconstruct(TypeError);
1379
+ var ct = unapply(Array.prototype.forEach), lt = unapply(Array.prototype.lastIndexOf), ut = unapply(Array.prototype.pop), dt = unapply(Array.prototype.push), ft = unapply(Array.prototype.splice), pt = Array.isArray, mt = unapply(String.prototype.toLowerCase), ht = unapply(String.prototype.toString), gt = unapply(String.prototype.match), _t = unapply(String.prototype.replace), vt = unapply(String.prototype.indexOf), yt = unapply(String.prototype.trim), bt = unapply(Number.prototype.toString), xt = unapply(Boolean.prototype.toString), St = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), Ct = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), wt = unapply(Object.prototype.hasOwnProperty), Z = unapply(Object.prototype.toString), Q = unapply(RegExp.prototype.test), Tt = unconstruct(TypeError);
1380
1380
  function unapply(e) {
1381
1381
  return function(t) {
1382
1382
  t instanceof RegExp && (t.lastIndex = 0);
1383
1383
  var n = [...arguments].slice(1);
1384
- return st(e, t, n);
1384
+ return at(e, t, n);
1385
1385
  };
1386
1386
  }
1387
1387
  function unconstruct(e) {
1388
1388
  return function() {
1389
- return ct(e, [...arguments]);
1389
+ return st(e, [...arguments]);
1390
1390
  };
1391
1391
  }
1392
1392
  function addToSet(e, t) {
1393
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ht;
1394
- if (Qe && Qe(e, null), !mt(t)) return e;
1393
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mt;
1394
+ if ($e && $e(e, null), !pt(t)) return e;
1395
1395
  let r = t.length;
1396
1396
  for (; r--;) {
1397
1397
  let i = t[r];
1398
1398
  if (typeof i == "string") {
1399
1399
  let e = n(i);
1400
- e !== i && ($e(t) || (t[r] = e), i = e);
1400
+ e !== i && (et(t) || (t[r] = e), i = e);
1401
1401
  }
1402
1402
  e[i] = !0;
1403
1403
  }
1404
1404
  return e;
1405
1405
  }
1406
1406
  function cleanArray(e) {
1407
- for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
1407
+ for (let t = 0; t < e.length; t++) wt(e, t) || (e[t] = null);
1408
1408
  return e;
1409
1409
  }
1410
1410
  function clone(e) {
1411
- let t = it(null);
1412
- for (let r of J(e)) {
1411
+ let t = rt(null);
1412
+ for (let r of Qe(e)) {
1413
1413
  var n = _slicedToArray(r, 2);
1414
1414
  let i = n[0], a = n[1];
1415
- X(e, i) && (mt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1415
+ wt(e, i) && (pt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1416
1416
  }
1417
1417
  return t;
1418
1418
  }
1419
1419
  function stringifyValue(e) {
1420
1420
  switch (typeof e) {
1421
1421
  case "string": return e;
1422
- case "number": return xt(e);
1423
- case "boolean": return St(e);
1424
- case "bigint": return Ct ? Ct(e) : "0";
1425
- case "symbol": return wt ? wt(e) : "Symbol()";
1422
+ case "number": return bt(e);
1423
+ case "boolean": return xt(e);
1424
+ case "bigint": return St ? St(e) : "0";
1425
+ case "symbol": return Ct ? Ct(e) : "Symbol()";
1426
1426
  case "undefined": return Z(e);
1427
1427
  case "function":
1428
1428
  case "object": {
@@ -1444,7 +1444,7 @@ function lookupGetter(e, t) {
1444
1444
  if (n.get) return unapply(n.get);
1445
1445
  if (typeof n.value == "function") return unapply(n.value);
1446
1446
  }
1447
- e = et(e);
1447
+ e = J(e);
1448
1448
  }
1449
1449
  function fallbackValue() {
1450
1450
  return null;
@@ -1458,7 +1458,7 @@ function isRegex(e) {
1458
1458
  return !1;
1459
1459
  }
1460
1460
  }
1461
- var Et = nt(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Dt = nt(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Ot = nt([
1461
+ var Et = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Dt = X(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Ot = X([
1462
1462
  "feBlend",
1463
1463
  "feColorMatrix",
1464
1464
  "feComponentTransfer",
@@ -1484,7 +1484,7 @@ var Et = nt(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1484
1484
  "feSpotLight",
1485
1485
  "feTile",
1486
1486
  "feTurbulence"
1487
- ]), kt = nt([
1487
+ ]), kt = X([
1488
1488
  "animate",
1489
1489
  "color-profile",
1490
1490
  "cursor",
@@ -1507,7 +1507,7 @@ var Et = nt(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1507
1507
  "solidcolor",
1508
1508
  "unknown",
1509
1509
  "use"
1510
- ]), At = nt(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), jt = nt([
1510
+ ]), At = X(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), jt = X([
1511
1511
  "maction",
1512
1512
  "maligngroup",
1513
1513
  "malignmark",
@@ -1523,13 +1523,13 @@ var Et = nt(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1523
1523
  "annotation-xml",
1524
1524
  "mprescripts",
1525
1525
  "none"
1526
- ]), Mt = nt(["#text"]), Nt = nt(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Pt = nt(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ft = nt(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), It = nt([
1526
+ ]), Mt = X(["#text"]), Nt = X(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Pt = X(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ft = X(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), It = X([
1527
1527
  "xlink:href",
1528
1528
  "xml:id",
1529
1529
  "xlink:title",
1530
1530
  "xml:space",
1531
1531
  "xmlns:xlink"
1532
- ]), Lt = rt(/{{[\w\W]*|^[\w\W]*}}/g), Rt = rt(/<%[\w\W]*|^[\w\W]*%>/g), zt = rt(/\${[\w\W]*/g), Bt = rt(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vt = rt(/^aria-[\-\w]+$/), Ht = rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ut = rt(/^(?:\w+script|data):/i), Wt = rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Gt = rt(/^html$/i), Kt = rt(/^[a-z][.\w]*(-[.\w]+)+$/i), qt = rt(/<[/\w!]/g), Jt = rt(/<[/\w]/g), Yt = rt(/<\/no(script|embed|frames)/i), Xt = rt(/\/>/i), Zt = {
1532
+ ]), Lt = nt(/{{[\w\W]*|^[\w\W]*}}/g), Rt = nt(/<%[\w\W]*|^[\w\W]*%>/g), zt = nt(/\${[\w\W]*/g), Bt = nt(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vt = nt(/^aria-[\-\w]+$/), Ht = nt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ut = nt(/^(?:\w+script|data):/i), Wt = nt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Gt = nt(/^html$/i), Kt = nt(/^[a-z][.\w]*(-[.\w]+)+$/i), qt = nt(/<[/\w!]/g), Jt = nt(/<[/\w]/g), Yt = nt(/<\/no(script|embed|frames)/i), Xt = nt(/\/>/i), Zt = {
1533
1533
  element: 1,
1534
1534
  attribute: 2,
1535
1535
  text: 3,
@@ -1574,7 +1574,7 @@ var Et = nt(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1574
1574
  uponSanitizeShadowNode: []
1575
1575
  };
1576
1576
  }, tn = function _resolveSetOption(e, t, n, r) {
1577
- return X(e, t) && mt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1577
+ return wt(e, t) && pt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1578
1578
  };
1579
1579
  function createDOMPurify() {
1580
1580
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qt(), DOMPurify = (e) => createDOMPurify(e);
@@ -1607,8 +1607,8 @@ function createDOMPurify() {
1607
1607
  }, ie = function _getDefaultTrustedTypesPolicy() {
1608
1608
  return A || (k = $t(u, r), A = !0), k;
1609
1609
  }, P = t, F = P.implementation, I = P.createNodeIterator, ae = P.createDocumentFragment, R = P.getElementsByTagName, B = n.importNode, H = en();
1610
- DOMPurify.isSupported = typeof J == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1611
- let U = Lt, oe = Rt, se = zt, ce = Bt, ue = Vt, de = Ut, pe = Wt, W = Kt, he = Ht, G = null, _e = addToSet({}, [
1610
+ DOMPurify.isSupported = typeof Qe == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1611
+ let oe = Lt, se = Rt, ce = zt, ue = Bt, U = Vt, de = Ut, pe = Wt, W = Kt, he = Ht, G = null, _e = addToSet({}, [
1612
1612
  ...Et,
1613
1613
  ...Dt,
1614
1614
  ...Ot,
@@ -1619,7 +1619,7 @@ function createDOMPurify() {
1619
1619
  ...Pt,
1620
1620
  ...Ft,
1621
1621
  ...It
1622
- ]), q = Object.seal(it(null, {
1622
+ ]), q = Object.seal(rt(null, {
1623
1623
  tagNameCheck: {
1624
1624
  writable: !0,
1625
1625
  configurable: !1,
@@ -1638,7 +1638,7 @@ function createDOMPurify() {
1638
1638
  enumerable: !0,
1639
1639
  value: !1
1640
1640
  }
1641
- })), ye = null, be = null, Se = Object.seal(it(null, {
1641
+ })), ye = null, be = null, Se = Object.seal(rt(null, {
1642
1642
  tagCheck: {
1643
1643
  writable: !0,
1644
1644
  configurable: !1,
@@ -1673,36 +1673,36 @@ function createDOMPurify() {
1673
1673
  "value",
1674
1674
  "style",
1675
1675
  "xmlns"
1676
- ]), Ye = "http://www.w3.org/1998/Math/MathML", Xe = "http://www.w3.org/2000/svg", Ze = "http://www.w3.org/1999/xhtml", Qe = Ze, $e = !1, et = null, tt = addToSet({}, [
1676
+ ]), Ye = "http://www.w3.org/1998/Math/MathML", Xe = "http://www.w3.org/2000/svg", Ze = "http://www.w3.org/1999/xhtml", $e = Ze, et = !1, J = null, tt = addToSet({}, [
1677
1677
  Ye,
1678
1678
  Xe,
1679
1679
  Ze
1680
- ], gt), at = nt([
1680
+ ], ht), it = X([
1681
1681
  "mi",
1682
1682
  "mo",
1683
1683
  "mn",
1684
1684
  "ms",
1685
1685
  "mtext"
1686
- ]), st = addToSet({}, at), ct = nt(["annotation-xml"]), xt = addToSet({}, ct), St = addToSet({}, [
1686
+ ]), at = addToSet({}, it), st = X(["annotation-xml"]), bt = addToSet({}, st), xt = addToSet({}, [
1687
1687
  "title",
1688
1688
  "style",
1689
1689
  "font",
1690
1690
  "a",
1691
1691
  "script"
1692
- ]), Ct = null, wt = ["application/xhtml+xml", "text/html"], Z = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1692
+ ]), St = null, Ct = ["application/xhtml+xml", "text/html"], Z = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1693
1693
  return e instanceof RegExp || e instanceof Function;
1694
1694
  }, on = function _parseConfig() {
1695
1695
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1696
1696
  if (nn && nn === e) return;
1697
- (!e || typeof e != "object") && (e = {}), e = clone(e), Ct = wt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Z = Ct === "application/xhtml+xml" ? gt : ht, G = tn(e, "ALLOWED_TAGS", _e, { transform: Z }), K = tn(e, "ALLOWED_ATTR", ve, { transform: Z }), et = tn(e, "ALLOWED_NAMESPACES", tt, { transform: gt }), qe = tn(e, "ADD_URI_SAFE_ATTR", Je, {
1697
+ (!e || typeof e != "object") && (e = {}), e = clone(e), St = Ct.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Z = St === "application/xhtml+xml" ? ht : mt, G = tn(e, "ALLOWED_TAGS", _e, { transform: Z }), K = tn(e, "ALLOWED_ATTR", ve, { transform: Z }), J = tn(e, "ALLOWED_NAMESPACES", tt, { transform: ht }), qe = tn(e, "ADD_URI_SAFE_ATTR", Je, {
1698
1698
  transform: Z,
1699
1699
  base: Je
1700
1700
  }), Ge = tn(e, "ADD_DATA_URI_TAGS", Ke, {
1701
1701
  transform: Z,
1702
1702
  base: Ke
1703
- }), Ue = tn(e, "FORBID_CONTENTS", We, { transform: Z }), ye = tn(e, "FORBID_TAGS", clone({}), { transform: Z }), be = tn(e, "FORBID_ATTR", clone({}), { transform: Z }), He = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ce = e.ALLOW_ARIA_ATTR !== !1, we = e.ALLOW_DATA_ATTR !== !1, Te = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = e.SAFE_FOR_TEMPLATES || !1, Oe = e.SAFE_FOR_XML !== !1, ke = e.WHOLE_DOCUMENT || !1, Pe = e.RETURN_DOM || !1, Fe = e.RETURN_DOM_FRAGMENT || !1, Ie = e.RETURN_TRUSTED_TYPE || !1, Ne = e.FORCE_BODY || !1, Le = e.SANITIZE_DOM !== !1, Re = e.SANITIZE_NAMED_PROPS || !1, Be = e.KEEP_CONTENT !== !1, Ve = e.IN_PLACE || !1, he = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ht, Qe = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Ze, st = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, at), xt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, ct);
1704
- let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : it(null);
1705
- if (q = it(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (q.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (q.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), rt(q), De && (we = !1), Fe && (Pe = !0), He && (G = addToSet({}, Mt), K = it(null), He.html === !0 && (addToSet(G, Et), addToSet(K, Nt)), He.svg === !0 && (addToSet(G, Dt), addToSet(K, Pt), addToSet(K, It)), He.svgFilters === !0 && (addToSet(G, Ot), addToSet(K, Pt), addToSet(K, It)), He.mathMl === !0 && (addToSet(G, At), addToSet(K, Ft), addToSet(K, It))), Se.tagCheck = null, Se.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Se.tagCheck = e.ADD_TAGS : mt(e.ADD_TAGS) && (G === _e && (G = clone(G)), addToSet(G, e.ADD_TAGS, Z))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Se.attributeCheck = e.ADD_ATTR : mt(e.ADD_ATTR) && (K === ve && (K = clone(K)), addToSet(K, e.ADD_ATTR, Z))), X(e, "ADD_URI_SAFE_ATTR") && mt(e.ADD_URI_SAFE_ATTR) && addToSet(qe, e.ADD_URI_SAFE_ATTR, Z), X(e, "FORBID_CONTENTS") && mt(e.FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.FORBID_CONTENTS, Z)), X(e, "ADD_FORBID_CONTENTS") && mt(e.ADD_FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.ADD_FORBID_CONTENTS, Z)), Be && (G["#text"] = !0), ke && addToSet(G, [
1703
+ }), Ue = tn(e, "FORBID_CONTENTS", We, { transform: Z }), ye = tn(e, "FORBID_TAGS", clone({}), { transform: Z }), be = tn(e, "FORBID_ATTR", clone({}), { transform: Z }), He = wt(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ce = e.ALLOW_ARIA_ATTR !== !1, we = e.ALLOW_DATA_ATTR !== !1, Te = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = e.SAFE_FOR_TEMPLATES || !1, Oe = e.SAFE_FOR_XML !== !1, ke = e.WHOLE_DOCUMENT || !1, Pe = e.RETURN_DOM || !1, Fe = e.RETURN_DOM_FRAGMENT || !1, Ie = e.RETURN_TRUSTED_TYPE || !1, Ne = e.FORCE_BODY || !1, Le = e.SANITIZE_DOM !== !1, Re = e.SANITIZE_NAMED_PROPS || !1, Be = e.KEEP_CONTENT !== !1, Ve = e.IN_PLACE || !1, he = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ht, $e = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Ze, at = wt(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, it), bt = wt(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, st);
1704
+ let t = wt(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : rt(null);
1705
+ if (q = rt(null), wt(t, "tagNameCheck") && an(t.tagNameCheck) && (q.tagNameCheck = t.tagNameCheck), wt(t, "attributeNameCheck") && an(t.attributeNameCheck) && (q.attributeNameCheck = t.attributeNameCheck), wt(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), nt(q), De && (we = !1), Fe && (Pe = !0), He && (G = addToSet({}, Mt), K = rt(null), He.html === !0 && (addToSet(G, Et), addToSet(K, Nt)), He.svg === !0 && (addToSet(G, Dt), addToSet(K, Pt), addToSet(K, It)), He.svgFilters === !0 && (addToSet(G, Ot), addToSet(K, Pt), addToSet(K, It)), He.mathMl === !0 && (addToSet(G, At), addToSet(K, Ft), addToSet(K, It))), Se.tagCheck = null, Se.attributeCheck = null, wt(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Se.tagCheck = e.ADD_TAGS : pt(e.ADD_TAGS) && (G === _e && (G = clone(G)), addToSet(G, e.ADD_TAGS, Z))), wt(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Se.attributeCheck = e.ADD_ATTR : pt(e.ADD_ATTR) && (K === ve && (K = clone(K)), addToSet(K, e.ADD_ATTR, Z))), wt(e, "ADD_URI_SAFE_ATTR") && pt(e.ADD_URI_SAFE_ATTR) && addToSet(qe, e.ADD_URI_SAFE_ATTR, Z), wt(e, "FORBID_CONTENTS") && pt(e.FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.FORBID_CONTENTS, Z)), wt(e, "ADD_FORBID_CONTENTS") && pt(e.ADD_FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.ADD_FORBID_CONTENTS, Z)), Be && (G["#text"] = !0), ke && addToSet(G, [
1706
1706
  "html",
1707
1707
  "head",
1708
1708
  "body"
@@ -1717,27 +1717,27 @@ function createDOMPurify() {
1717
1717
  throw C = t, e;
1718
1718
  }
1719
1719
  } else e.TRUSTED_TYPES_POLICY === null ? (C = void 0, T = "") : (C === void 0 && (C = ie()), C && typeof T == "string" && (T = ne("")));
1720
- nt && nt(e), nn = e;
1720
+ X && X(e), nn = e;
1721
1721
  }, sn = addToSet({}, [
1722
1722
  ...Dt,
1723
1723
  ...Ot,
1724
1724
  ...kt
1725
1725
  ]), cn = addToSet({}, [...At, ...jt]), ln = function _checkSvgNamespace(e, t, n) {
1726
- return t.namespaceURI === Ze ? e === "svg" : t.namespaceURI === Ye ? e === "svg" && (n === "annotation-xml" || st[n]) : !!sn[e];
1726
+ return t.namespaceURI === Ze ? e === "svg" : t.namespaceURI === Ye ? e === "svg" && (n === "annotation-xml" || at[n]) : !!sn[e];
1727
1727
  }, un = function _checkMathMlNamespace(e, t, n) {
1728
- return t.namespaceURI === Ze ? e === "math" : t.namespaceURI === Xe ? e === "math" && xt[n] : !!cn[e];
1728
+ return t.namespaceURI === Ze ? e === "math" : t.namespaceURI === Xe ? e === "math" && bt[n] : !!cn[e];
1729
1729
  }, dn = function _checkHtmlNamespace(e, t, n) {
1730
- return t.namespaceURI === Xe && !xt[n] || t.namespaceURI === Ye && !st[n] ? !1 : !cn[e] && (St[e] || !sn[e]);
1730
+ return t.namespaceURI === Xe && !bt[n] || t.namespaceURI === Ye && !at[n] ? !1 : !cn[e] && (xt[e] || !sn[e]);
1731
1731
  }, fn = function _checkValidNamespace(e) {
1732
1732
  let t = v(e);
1733
1733
  (!t || !t.tagName) && (t = {
1734
- namespaceURI: Qe,
1734
+ namespaceURI: $e,
1735
1735
  tagName: "template"
1736
1736
  });
1737
- let n = ht(e.tagName), r = ht(t.tagName);
1738
- return et[e.namespaceURI] ? e.namespaceURI === Xe ? ln(n, t, r) : e.namespaceURI === Ye ? un(n, t, r) : e.namespaceURI === Ze ? dn(n, t, r) : !!(Ct === "application/xhtml+xml" && et[e.namespaceURI]) : !1;
1737
+ let n = mt(e.tagName), r = mt(t.tagName);
1738
+ return J[e.namespaceURI] ? e.namespaceURI === Xe ? ln(n, t, r) : e.namespaceURI === Ye ? un(n, t, r) : e.namespaceURI === Ze ? dn(n, t, r) : !!(St === "application/xhtml+xml" && J[e.namespaceURI]) : !1;
1739
1739
  }, pn = function _forceRemove(e) {
1740
- ft(DOMPurify.removed, { element: e });
1740
+ dt(DOMPurify.removed, { element: e });
1741
1741
  try {
1742
1742
  v(e).removeChild(e);
1743
1743
  } catch {
@@ -1748,9 +1748,9 @@ function createDOMPurify() {
1748
1748
  let t = _(e);
1749
1749
  if (t) {
1750
1750
  let e = [];
1751
- lt(t, (t) => {
1752
- ft(e, t);
1753
- }), lt(e, (e) => {
1751
+ ct(t, (t) => {
1752
+ dt(e, t);
1753
+ }), ct(e, (e) => {
1754
1754
  try {
1755
1755
  m(e);
1756
1756
  } catch {}
@@ -1765,12 +1765,12 @@ function createDOMPurify() {
1765
1765
  }
1766
1766
  }, hn = function _removeAttribute(e, t) {
1767
1767
  try {
1768
- ft(DOMPurify.removed, {
1768
+ dt(DOMPurify.removed, {
1769
1769
  attribute: t.getAttributeNode(e),
1770
1770
  from: t
1771
1771
  });
1772
1772
  } catch {
1773
- ft(DOMPurify.removed, {
1773
+ dt(DOMPurify.removed, {
1774
1774
  attribute: null,
1775
1775
  from: t
1776
1776
  });
@@ -1821,32 +1821,32 @@ function createDOMPurify() {
1821
1821
  let n = null, r = null;
1822
1822
  if (Ne) e = "<remove></remove>" + e;
1823
1823
  else {
1824
- let t = _t(e, /^[\r\n\t ]+/);
1824
+ let t = gt(e, /^[\r\n\t ]+/);
1825
1825
  r = t && t[0];
1826
1826
  }
1827
- Ct === "application/xhtml+xml" && Qe === Ze && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1827
+ St === "application/xhtml+xml" && $e === Ze && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1828
1828
  let i = C ? ne(e) : e;
1829
- if (Qe === Ze) try {
1830
- n = new c().parseFromString(i, Ct);
1829
+ if ($e === Ze) try {
1830
+ n = new c().parseFromString(i, St);
1831
1831
  } catch {}
1832
1832
  if (!n || !n.documentElement) {
1833
- n = F.createDocument(Qe, "template", null);
1833
+ n = F.createDocument($e, "template", null);
1834
1834
  try {
1835
- n.documentElement.innerHTML = $e ? T : i;
1835
+ n.documentElement.innerHTML = et ? T : i;
1836
1836
  } catch {}
1837
1837
  }
1838
1838
  let a = n.body || n.documentElement;
1839
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), Qe === Ze ? R.call(n, ke ? "html" : "body")[0] : ke ? n.documentElement : a;
1839
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), $e === Ze ? R.call(n, ke ? "html" : "body")[0] : ke ? n.documentElement : a;
1840
1840
  }, bn = function _createNodeIterator(e) {
1841
1841
  return I.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1842
1842
  }, xn = function _stripTemplateExpressions(e) {
1843
- return e = vt(e, U, " "), e = vt(e, oe, " "), e = vt(e, se, " "), e;
1843
+ return e = _t(e, oe, " "), e = _t(e, se, " "), e = _t(e, ce, " "), e;
1844
1844
  }, Sn = function _scrubTemplateExpressions(e) {
1845
1845
  e.normalize();
1846
1846
  let t = I.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1847
1847
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1848
1848
  let r = e.querySelectorAll?.call(e, "template");
1849
- r && lt(r, (e) => {
1849
+ r && ct(r, (e) => {
1850
1850
  wn(e.content) && Sn(e.content);
1851
1851
  });
1852
1852
  }, Cn = function _isClobbered(e) {
@@ -1868,7 +1868,7 @@ function createDOMPurify() {
1868
1868
  }
1869
1869
  };
1870
1870
  function _executeHooks(e, t, n) {
1871
- e.length !== 0 && lt(e, (e) => {
1871
+ e.length !== 0 && ct(e, (e) => {
1872
1872
  e.call(DOMPurify, t, n, nn);
1873
1873
  });
1874
1874
  }
@@ -1903,16 +1903,16 @@ function createDOMPurify() {
1903
1903
  if ((x ? x(e) : e.nodeType) === Zt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Q(Yt, e.innerHTML)) return pn(e), !0;
1904
1904
  if (De && e.nodeType === Zt.text) {
1905
1905
  let t = xn(e.textContent);
1906
- e.textContent !== t && (ft(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1906
+ e.textContent !== t && (dt(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1907
1907
  }
1908
1908
  return _executeHooks(H.afterSanitizeElements, e, null), !1;
1909
1909
  }, kn = function _isValidAttribute(e, n, r) {
1910
1910
  if (be[n] || Oe && n === "patchsrc" || Oe && n === "for" && e !== "label" && e !== "output" || Le && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1911
1911
  let i = K[n] || Se.attributeCheck instanceof Function && Se.attributeCheck(n, e);
1912
- if (!(we && Q(ce, n)) && !(Ce && Q(ue, n))) {
1912
+ if (!(we && Q(ue, n)) && !(Ce && Q(U, n))) {
1913
1913
  if (!i) {
1914
1914
  if (!(jn(e) && (q.tagNameCheck instanceof RegExp && Q(q.tagNameCheck, e) || q.tagNameCheck instanceof Function && q.tagNameCheck(e)) && (q.attributeNameCheck instanceof RegExp && Q(q.attributeNameCheck, n) || q.attributeNameCheck instanceof Function && q.attributeNameCheck(n, e)) || n === "is" && q.allowCustomizedBuiltInElements && (q.tagNameCheck instanceof RegExp && Q(q.tagNameCheck, r) || q.tagNameCheck instanceof Function && q.tagNameCheck(r)))) return !1;
1915
- } else if (!qe[n] && !Q(he, vt(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && yt(r, "data:") === 0 && Ge[e]) && !(Te && !Q(de, vt(r, pe, ""))) && r) return !1;
1915
+ } else if (!qe[n] && !Q(he, _t(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && vt(r, "data:") === 0 && Ge[e]) && !(Te && !Q(de, _t(r, pe, ""))) && r) return !1;
1916
1916
  }
1917
1917
  return !0;
1918
1918
  }, An = addToSet({}, [
@@ -1925,7 +1925,7 @@ function createDOMPurify() {
1925
1925
  "font-face-uri",
1926
1926
  "missing-glyph"
1927
1927
  ]), jn = function _isBasicCustomElement(e) {
1928
- return !An[ht(e)] && Q(W, e);
1928
+ return !An[mt(e)] && Q(W, e);
1929
1929
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1930
1930
  if (C && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1931
1931
  case "TrustedHTML": return ne(r);
@@ -1934,7 +1934,7 @@ function createDOMPurify() {
1934
1934
  return r;
1935
1935
  }, Nn = function _setAttributeValue(e, t, n, r) {
1936
1936
  try {
1937
- n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : dt(DOMPurify.removed);
1937
+ n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : ut(DOMPurify.removed);
1938
1938
  } catch {
1939
1939
  hn(t, e);
1940
1940
  }
@@ -1950,12 +1950,12 @@ function createDOMPurify() {
1950
1950
  forceKeepAttr: void 0
1951
1951
  }, r = t.length, i = Z(e.nodeName);
1952
1952
  for (; r--;) {
1953
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Z(o), f = c, p = o === "value" ? f : bt(f);
1954
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(H.uponSanitizeAttribute, e, n), p = n.attrValue, Re && (u === "id" || u === "name") && yt(p, ze) !== 0 && (hn(o, e), p = ze + p), Oe && Q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1953
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Z(o), f = c, p = o === "value" ? f : yt(f);
1954
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(H.uponSanitizeAttribute, e, n), p = n.attrValue, Re && (u === "id" || u === "name") && vt(p, ze) !== 0 && (hn(o, e), p = ze + p), Oe && Q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1955
1955
  hn(o, e);
1956
1956
  continue;
1957
1957
  }
1958
- if (u === "attributename" && _t(p, "href")) {
1958
+ if (u === "attributename" && gt(p, "href")) {
1959
1959
  hn(o, e);
1960
1960
  continue;
1961
1961
  }
@@ -2023,7 +2023,7 @@ function createDOMPurify() {
2023
2023
  };
2024
2024
  return DOMPurify.sanitize = function(e) {
2025
2025
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
2026
- if ($e = !e, $e && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Tt("dirty is not a string, aborting");
2026
+ if (et = !e, et && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Tt("dirty is not a string, aborting");
2027
2027
  if (!DOMPurify.isSupported) return e;
2028
2028
  Ae ? (G = je, K = Me) : on(t), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (G = clone(G)), H.uponSanitizeAttribute.length > 0 && (K = clone(K)), DOMPurify.removed = [];
2029
2029
  let s = Ve && typeof e != "string" && Tn(e);
@@ -2050,11 +2050,11 @@ function createDOMPurify() {
2050
2050
  try {
2051
2051
  for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
2052
2052
  } catch (t) {
2053
- throw s && (mn(e), lt(DOMPurify.removed, (e) => {
2053
+ throw s && (mn(e), ct(DOMPurify.removed, (e) => {
2054
2054
  e.element && _n(e.element);
2055
2055
  })), t;
2056
2056
  }
2057
- if (s) return lt(DOMPurify.removed, (e) => {
2057
+ if (s) return ct(DOMPurify.removed, (e) => {
2058
2058
  e.element && _n(e.element);
2059
2059
  }), De && Sn(e), e;
2060
2060
  if (Pe) {
@@ -2074,17 +2074,17 @@ function createDOMPurify() {
2074
2074
  let r = Z(e), i = Z(t);
2075
2075
  return kn(r, i, n);
2076
2076
  }, DOMPurify.addHook = function(e, t) {
2077
- typeof t == "function" && X(H, e) && ft(H[e], t);
2077
+ typeof t == "function" && wt(H, e) && dt(H[e], t);
2078
2078
  }, DOMPurify.removeHook = function(e, t) {
2079
- if (X(H, e)) {
2079
+ if (wt(H, e)) {
2080
2080
  if (t !== void 0) {
2081
- let n = ut(H[e], t);
2082
- return n === -1 ? void 0 : pt(H[e], n, 1)[0];
2081
+ let n = lt(H[e], t);
2082
+ return n === -1 ? void 0 : ft(H[e], n, 1)[0];
2083
2083
  }
2084
- return dt(H[e]);
2084
+ return ut(H[e]);
2085
2085
  }
2086
2086
  }, DOMPurify.removeHooks = function(e) {
2087
- X(H, e) && (H[e] = []);
2087
+ wt(H, e) && (H[e] = []);
2088
2088
  }, DOMPurify.removeAllHooks = function() {
2089
2089
  H = en();
2090
2090
  }, DOMPurify;
@@ -4022,7 +4022,7 @@ var Pr = [
4022
4022
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
4023
4023
  seriesIndex: 0
4024
4024
  }));
4025
- }), oe = v(() => {
4025
+ }), se = v(() => {
4026
4026
  let e = f.value;
4027
4027
  if (!e?.data.length) return [];
4028
4028
  let t = e.data[e.data.length - 1];
@@ -4038,7 +4038,7 @@ var Pr = [
4038
4038
  seriesIndex: n
4039
4039
  };
4040
4040
  });
4041
- }), se = v(() => {
4041
+ }), ce = v(() => {
4042
4042
  let e = f.value;
4043
4043
  if (!e?.data.length || e.chartType !== "line") return [];
4044
4044
  let t = e.data.length - 1, n = e.data[t];
@@ -4051,7 +4051,7 @@ var Pr = [
4051
4051
  seriesIndex: i
4052
4052
  };
4053
4053
  }).filter((e) => e !== null);
4054
- }), ce = v(() => {
4054
+ }), ue = v(() => {
4055
4055
  let e = m.value;
4056
4056
  if (!e) return [];
4057
4057
  let t = e.data.map((t) => ({
@@ -4067,7 +4067,7 @@ var Pr = [
4067
4067
  series: r
4068
4068
  })
4069
4069
  }));
4070
- }), ue = v(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), de = [
4070
+ }), U = v(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), de = [
4071
4071
  "var(--color-theme-900)",
4072
4072
  "var(--color-primary-500)",
4073
4073
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
@@ -4160,7 +4160,7 @@ var Pr = [
4160
4160
  "text-anchor": "end",
4161
4161
  "font-size": "9.5",
4162
4162
  style: M({ fill: G.value })
4163
- }, H(U(formatChatVisualTick)({
4163
+ }, H(oe(formatChatVisualTick)({
4164
4164
  value: e,
4165
4165
  shared: T.value
4166
4166
  })), 13, Vr))), 128))]),
@@ -4206,7 +4206,7 @@ var Pr = [
4206
4206
  r: "2.6",
4207
4207
  style: M({ fill: seriesColor(t) })
4208
4208
  }, null, 12, Gr)) : b("", !0)], 64))), 128))]))), 128)),
4209
- (P(!0), x(h, null, I(se.value, (e) => (P(), x("circle", {
4209
+ (P(!0), x(h, null, I(ce.value, (e) => (P(), x("circle", {
4210
4210
  key: `marker-${e.key}`,
4211
4211
  cx: e.cx,
4212
4212
  cy: e.cy,
@@ -4220,10 +4220,10 @@ var Pr = [
4220
4220
  y: e.angled ? A.value.height - A.value.bottom + 12 : A.value.height - 6,
4221
4221
  "text-anchor": e.anchor,
4222
4222
  "font-size": "9.5",
4223
- transform: e.angled ? `rotate(${U(-40)} ${e.x} ${A.value.height - A.value.bottom + 12})` : void 0,
4223
+ transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${A.value.height - A.value.bottom + 12})` : void 0,
4224
4224
  style: M({ fill: G.value })
4225
4225
  }, H(e.label), 13, qr))), 128))
4226
- ], 12, zr)), oe.value.length > 1 || f.value.chartType !== "bar" ? (P(), x("div", Jr, [(P(!0), x(h, null, I(oe.value, (e) => (P(), x("div", {
4226
+ ], 12, zr)), se.value.length > 1 || f.value.chartType !== "bar" ? (P(), x("div", Jr, [(P(!0), x(h, null, I(se.value, (e) => (P(), x("div", {
4227
4227
  key: e.key,
4228
4228
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4229
4229
  }, [
@@ -4236,7 +4236,7 @@ var Pr = [
4236
4236
  class: "font-semibold tabular-nums",
4237
4237
  style: M({ color: W.value })
4238
4238
  }, H(e.value), 5)
4239
- ]))), 128))])) : b("", !0)], 8, Ir)) : m.value ? (P(), x("div", Yr, [(P(!0), x(h, null, I(ce.value, (e, t) => (P(), x("div", { key: e.key }, [S("div", Xr, [S("span", {
4239
+ ]))), 128))])) : b("", !0)], 8, Ir)) : m.value ? (P(), x("div", Yr, [(P(!0), x(h, null, I(ue.value, (e, t) => (P(), x("div", { key: e.key }, [S("div", Xr, [S("span", {
4240
4240
  class: "truncate font-medium",
4241
4241
  style: M({ color: W.value })
4242
4242
  }, H(e.name), 5), S("span", Zr, [S("span", {
@@ -4254,18 +4254,18 @@ var Pr = [
4254
4254
  width: `${Math.max(2, e.percent * 100)}%`,
4255
4255
  background: seriesColor(t)
4256
4256
  })
4257
- }, null, 4)], 4)]))), 128))])) : c.value && ue.value ? (P(), x("div", Qr, [(P(), x("svg", {
4257
+ }, null, 4)], 4)]))), 128))])) : c.value && U.value ? (P(), x("div", Qr, [(P(), x("svg", {
4258
4258
  "data-test": "chat-visual-diagram-svg",
4259
4259
  class: "block h-auto overflow-visible",
4260
- viewBox: `0 0 ${ue.value.width} ${ue.value.height}`,
4260
+ viewBox: `0 0 ${U.value.width} ${U.value.height}`,
4261
4261
  style: M({
4262
- width: `${ue.value.width}px`,
4263
- aspectRatio: `${ue.value.width} / ${ue.value.height}`
4262
+ width: `${U.value.width}px`,
4263
+ aspectRatio: `${U.value.width} / ${U.value.height}`
4264
4264
  }),
4265
4265
  role: "img",
4266
4266
  "aria-label": o.value.meta.title
4267
4267
  }, [
4268
- (P(!0), x(h, null, I(ue.value.edges, (e) => (P(), x("line", {
4268
+ (P(!0), x(h, null, I(U.value.edges, (e) => (P(), x("line", {
4269
4269
  key: e.key,
4270
4270
  "data-test": "chat-visual-diagram-edge",
4271
4271
  "data-from": e.from,
@@ -4279,14 +4279,14 @@ var Pr = [
4279
4279
  "vector-effect": "non-scaling-stroke",
4280
4280
  style: M({ stroke: be.value })
4281
4281
  }, null, 12, ei))), 128)),
4282
- (P(!0), x(h, null, I(ue.value.edges, (e) => (P(), x("circle", {
4282
+ (P(!0), x(h, null, I(U.value.edges, (e) => (P(), x("circle", {
4283
4283
  key: `${e.key}-dot`,
4284
4284
  cx: e.x2,
4285
4285
  cy: e.y2,
4286
4286
  r: "2.4",
4287
4287
  style: M({ fill: be.value })
4288
4288
  }, null, 12, ti))), 128)),
4289
- (P(!0), x(h, null, I(ue.value.edges.filter((e) => e.label), (e) => (P(), x("foreignObject", {
4289
+ (P(!0), x(h, null, I(U.value.edges.filter((e) => e.label), (e) => (P(), x("foreignObject", {
4290
4290
  key: `${e.key}-label`,
4291
4291
  x: e.labelX - 55,
4292
4292
  y: e.labelY - 12,
@@ -4300,7 +4300,7 @@ var Pr = [
4300
4300
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4301
4301
  })
4302
4302
  }, H(e.label), 5)], 8, ni))), 128)),
4303
- (P(!0), x(h, null, I(ue.value.nodes, (e) => (P(), x("g", {
4303
+ (P(!0), x(h, null, I(U.value.nodes, (e) => (P(), x("g", {
4304
4304
  key: e.id,
4305
4305
  "data-test": "chat-visual-diagram-node",
4306
4306
  "data-node-id": e.id,
@@ -4357,7 +4357,7 @@ var Pr = [
4357
4357
  emits: ["action"],
4358
4358
  setup(e, { emit: t }) {
4359
4359
  let n = e, r = t, i = B(n.text), a;
4360
- ce([() => n.text, () => n.streaming], ([e, t]) => {
4360
+ ue([() => n.text, () => n.streaming], ([e, t]) => {
4361
4361
  if (!t) {
4362
4362
  a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
4363
4363
  return;
@@ -4616,82 +4616,95 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4616
4616
  }, yi = { class: "relative z-10 flex flex-1 flex-col items-center justify-center px-8 pb-24" }, bi = { "data-voice-assistant-avatar": "" }, xi = {
4617
4617
  "data-test": "voice-histogram",
4618
4618
  "aria-hidden": "true",
4619
- class: "mt-10 flex h-4 items-center gap-[3px]"
4619
+ class: "mt-10 flex h-[38px] items-center gap-[5px]"
4620
4620
  }, Si = {
4621
4621
  "data-test": "voice-presence-status",
4622
4622
  role: "status",
4623
4623
  "aria-live": "polite",
4624
4624
  class: "sr-only"
4625
- }, Ci = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-16 pb-[max(3rem,env(safe-area-inset-bottom))]" }, wi = [
4625
+ }, Ci = {
4626
+ "data-test": "voice-visible-status",
4627
+ "aria-hidden": "true",
4628
+ class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
4629
+ }, wi = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Ti = [
4626
4630
  "disabled",
4627
4631
  "aria-label",
4628
4632
  "aria-pressed",
4629
4633
  "title"
4630
- ], Ti = .1, Ei = 60, Di = 320, Oi = /*@__PURE__*/ k({
4634
+ ], Ei = 5, Di = 33, Oi = .7, ki = .1, Ai = 60, ji = 320, Mi = /*@__PURE__*/ k({
4631
4635
  __name: "VoiceMode",
4632
4636
  props: {
4633
4637
  agent: {},
4634
4638
  chatController: {},
4635
- isLight: { type: Boolean }
4639
+ isLight: { type: Boolean },
4640
+ backdropSrc: {}
4636
4641
  },
4637
4642
  emits: ["end"],
4638
4643
  setup(e, { expose: t, emit: n }) {
4639
- let r = n, i = F(0), a = F("mic"), o = F("idle"), s = F(!1), c = B(!1), u = B(!1), f = B(), p = oe("endButton"), m = oe("muteButton"), _ = !1, te, b = v(() => s.value ? "error" : o.value === "live" ? a.value === "playback" && i.value > .01 ? "speaking" : "listening" : "connecting"), C = [
4644
+ let r = n, i = F(0), a = F("mic"), o = F("idle"), s = F(!1), c = F(!1), u = F({ active: !1 }), f = B(!1), p = B(!1), m = B(), _ = se("endButton"), te = se("muteButton"), b = !1, C, k = v(() => s.value ? "error" : o.value === "live" ? i.value > .01 ? a.value === "playback" ? "speaking" : "listening" : u.value.active ? "working" : c.value ? "thinking" : "listening" : "connecting"), A = v(() => k.value === "connecting" || k.value === "thinking" || k.value === "working"), ne = [
4640
4645
  0,
4641
4646
  2,
4642
4647
  4,
4643
4648
  6,
4644
4649
  8
4645
- ], k = C.map(() => 0), A = F(k), ne = F(k), ae = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, R = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), U = 0, se = 0;
4650
+ ], ae = ne.map(() => 0), R = F(ae), oe = F(ae), ce = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, ue = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), U = 0, de = 0;
4646
4651
  async function end() {
4647
- _ = !0, await f.value?.end();
4652
+ b = !0, await m.value?.end();
4648
4653
  }
4649
4654
  t({ end });
4650
4655
  function easeFrame(e) {
4651
4656
  U = 0;
4652
- let t = Math.min(64, Math.max(0, e - se));
4653
- se = e;
4657
+ let t = Math.min(64, Math.max(0, e - de));
4658
+ de = e;
4654
4659
  let ease = (e, n) => {
4655
- let r = n > e ? Ei : Di;
4660
+ let r = n > e ? Ai : ji;
4656
4661
  return e + (n - e) * (1 - Math.exp(-t / r));
4657
4662
  };
4658
- ne.value = ne.value.map((e, t) => ease(e, A.value[t] ?? 0)), !ne.value.every((e, t) => Math.abs((A.value[t] ?? 0) - e) <= 5e-4) || A.value.some((e) => e > 0) ? U = R(easeFrame) : ne.value = k;
4663
+ oe.value = oe.value.map((e, t) => ease(e, R.value[t] ?? 0)), !oe.value.every((e, t) => Math.abs((R.value[t] ?? 0) - e) <= 5e-4) || R.value.some((e) => e > 0) ? U = ue(easeFrame) : oe.value = ae;
4659
4664
  }
4660
4665
  function followLevel(e) {
4661
- let gate = (e) => Math.max(0, e - Ti) / (1 - Ti);
4662
- if (A.value = C.map((t) => c.value ? 0 : gate(Math.min(1, Math.max(0, e?.[t] ?? i.value)))), ae?.matches) {
4663
- ne.value = A.value;
4666
+ let gate = (e) => Math.max(0, e - ki) / (1 - ki);
4667
+ if (R.value = ne.map((t) => f.value ? 0 : gate(Math.min(1, Math.max(0, e?.[t] ?? i.value)))), ce?.matches) {
4668
+ oe.value = R.value;
4664
4669
  return;
4665
4670
  }
4666
- U || (se = performance.now(), U = R(easeFrame));
4671
+ U || (de = performance.now(), U = ue(easeFrame));
4667
4672
  }
4668
- let ce = v(() => ne.value.map((e) => Math.round((2 + Math.sqrt(Math.min(1, Math.max(0, e))) * 14) * 10) / 10)), ue = v(() => b.value === "error" ? "bg-red-500" : c.value ? "bg-theme-400" : b.value === "connecting" ? "bg-amber-500" : b.value === "speaking" ? "bg-primary-500" : "bg-green-500"), de = {
4673
+ let W = v(() => oe.value.map((e) => Math.round((Ei + Math.min(1, Math.max(0, e)) ** Oi * Di) * 10) / 10)), he = v(() => k.value === "error" ? "bg-red-500" : f.value ? "bg-theme-400" : k.value === "connecting" || k.value === "thinking" ? "bg-amber-500" : k.value === "working" || k.value === "speaking" ? "bg-primary-500" : "bg-green-500"), G = {
4669
4674
  connecting: "Connecting",
4670
4675
  listening: "Listening",
4676
+ thinking: "Thinking",
4677
+ working: "Working",
4671
4678
  speaking: "Speaking",
4672
4679
  error: "Connection problem"
4673
- }, W = v(() => de[b.value]);
4680
+ }, _e = v(() => k.value === "working" ? u.value.description || "Working on it" : G[k.value]), K = v(() => k.value === "working" || k.value === "error" ? _e.value : "");
4674
4681
  function emitEnd() {
4675
- _ || (_ = !0, r("end"));
4682
+ b || (b = !0, r("end"));
4676
4683
  }
4677
4684
  function trapFocus(e) {
4678
- e.shiftKey && document.activeElement === p.value ? (e.preventDefault(), m.value?.focus()) : !e.shiftKey && document.activeElement === m.value && (e.preventDefault(), p.value?.focus());
4685
+ e.shiftKey && document.activeElement === _.value ? (e.preventDefault(), te.value?.focus()) : !e.shiftKey && document.activeElement === te.value && (e.preventDefault(), _.value?.focus());
4679
4686
  }
4680
4687
  async function toggleMute() {
4681
- let e = f.value;
4682
- if (!e || u.value) return;
4683
- u.value = !0;
4688
+ let e = m.value;
4689
+ if (!e || p.value) return;
4690
+ p.value = !0;
4684
4691
  let t = await e.toggleMuted();
4685
- t !== void 0 && (c.value = t, followLevel(void 0)), u.value = !1;
4692
+ t !== void 0 && (f.value = t, followLevel(void 0)), p.value = !1;
4686
4693
  }
4687
4694
  return re(async () => {
4688
- p.value?.focus({ preventScroll: !0 });
4695
+ _.value?.focus({ preventScroll: !0 });
4689
4696
  let t = e.chatController?.createVoiceClient({
4690
4697
  onLevel: (e) => {
4691
4698
  a.value = e.source, i.value = e.level, followLevel(e.bands);
4692
4699
  },
4693
4700
  onStateChange: (e) => {
4694
- o.value = e, e === "ended" && (s.value ? te = setTimeout(emitEnd, 1600) : emitEnd());
4701
+ o.value = e, e === "ended" && (s.value ? C = setTimeout(emitEnd, 1600) : emitEnd());
4702
+ },
4703
+ onThinkingChange: (e) => {
4704
+ c.value = e;
4705
+ },
4706
+ onWorkChange: (e) => {
4707
+ u.value = e;
4695
4708
  },
4696
4709
  onError: (t) => {
4697
4710
  s.value = !0, e.chatController?.notify?.(voiceErrorMessage(t.code)), e.chatController?.logger?.warn("voice.session.failed", {
@@ -4707,20 +4720,20 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4707
4720
  emitEnd();
4708
4721
  return;
4709
4722
  }
4710
- f.value = t, await t.start();
4723
+ m.value = t, await t.start();
4711
4724
  }), ie(() => {
4712
- _ = !0, te && clearTimeout(te), U && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(U), U = 0, f.value?.end();
4725
+ b = !0, C && clearTimeout(C), U && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(U), U = 0, m.value?.end();
4713
4726
  }), (t, n) => (P(), x("div", {
4714
4727
  "data-test": "voice-mode",
4715
4728
  "data-voice-state": o.value,
4716
- "data-voice-activity": b.value,
4729
+ "data-voice-activity": k.value,
4717
4730
  class: "relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",
4718
4731
  onKeydown: pe(trapFocus, ["tab"])
4719
4732
  }, [
4720
- e.agent.avatar.value?.src ? (P(), x("img", {
4733
+ e.backdropSrc ? (P(), x("img", {
4721
4734
  key: 0,
4722
4735
  "data-test": "voice-background-image",
4723
- src: e.agent.avatar.value.src,
4736
+ src: e.backdropSrc,
4724
4737
  alt: "",
4725
4738
  "aria-hidden": "true",
4726
4739
  draggable: "false",
@@ -4737,70 +4750,71 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4737
4750
  "show-status": !1,
4738
4751
  "show-owner-mark": !1,
4739
4752
  "is-light": !1,
4740
- class: "size-28"
4753
+ class: "size-32"
4741
4754
  }, null, 8, ["agent"])]),
4742
- S("div", xi, [(P(!0), x(h, null, I(ce.value, (e, t) => (P(), x("span", {
4755
+ S("div", xi, [(P(!0), x(h, null, I(W.value, (e, t) => (P(), x("span", {
4743
4756
  key: t,
4744
4757
  "data-test": "voice-histogram-bar",
4745
- class: j(["w-[2.5px] rounded-full transition-colors duration-150", [ue.value, b.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
4758
+ class: j(["w-[5px] rounded-full transition-colors duration-150", [he.value, A.value ? "pl-voice-bar-wave" : ""]]),
4746
4759
  style: M({
4747
4760
  height: `${e}px`,
4748
- ...b.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4761
+ ...A.value ? { animationDelay: `${t * 90}ms` } : {}
4749
4762
  })
4750
4763
  }, null, 6))), 128))]),
4751
- S("div", Si, H(W.value), 1)
4764
+ S("div", Si, H(_e.value), 1),
4765
+ S("p", Ci, H(K.value), 1)
4752
4766
  ]),
4753
- S("div", Ci, [S("button", {
4767
+ S("div", wi, [S("button", {
4754
4768
  ref_key: "endButton",
4755
- ref: p,
4769
+ ref: _,
4756
4770
  type: "button",
4757
4771
  "data-test": "voice-end-btn",
4758
- class: "flex size-14 cursor-pointer items-center justify-center rounded-full bg-white/10 text-white ring-1 ring-white/20 transition-colors hover:bg-white/15 active:bg-white/25",
4772
+ class: "flex size-16 cursor-pointer items-center justify-center rounded-full bg-white/10 text-white ring-1 ring-white/20 transition-colors hover:bg-white/15 active:bg-white/25",
4759
4773
  "aria-label": "Hang up",
4760
4774
  title: "Hang up",
4761
4775
  onClick: emitEnd
4762
4776
  }, [...n[0] || (n[0] = [S("i", {
4763
- class: "i-tabler-x size-[22px]",
4777
+ class: "i-tabler-x size-[25px]",
4764
4778
  "aria-hidden": "true"
4765
4779
  }, null, -1)])], 512), S("button", {
4766
4780
  ref_key: "muteButton",
4767
- ref: m,
4781
+ ref: te,
4768
4782
  type: "button",
4769
4783
  "data-test": "voice-mute-btn",
4770
- class: j(["flex size-14 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [c.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", o.value === "live" && !u.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
4771
- disabled: o.value !== "live" || u.value,
4772
- "aria-label": c.value ? "Unmute microphone" : "Mute microphone",
4773
- "aria-pressed": c.value,
4774
- title: c.value ? "Unmute microphone" : "Mute microphone",
4784
+ class: j(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [f.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", o.value === "live" && !p.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
4785
+ disabled: o.value !== "live" || p.value,
4786
+ "aria-label": f.value ? "Unmute microphone" : "Mute microphone",
4787
+ "aria-pressed": f.value,
4788
+ title: f.value ? "Unmute microphone" : "Mute microphone",
4775
4789
  onClick: toggleMute
4776
4790
  }, [S("i", {
4777
- class: j([c.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[22px]"]),
4791
+ class: j([f.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[25px]"]),
4778
4792
  "aria-hidden": "true"
4779
- }, null, 2)], 10, wi)])
4793
+ }, null, 2)], 10, Ti)])
4780
4794
  ], 40, gi));
4781
4795
  }
4782
- }), ki = /* @__PURE__ */ e((e, t) => {
4796
+ }), Ni = /* @__PURE__ */ e((e, t) => {
4783
4797
  let n = e.__vccOpts || e;
4784
4798
  for (let [e, r] of t) n[e] = r;
4785
4799
  return n;
4786
- }, "default"), Ai = /*#__PURE__*/ ki(Oi, [["__scopeId", "data-v-b08148e6"]]), ji = {
4800
+ }, "default"), Pi = /*#__PURE__*/ Ni(Mi, [["__scopeId", "data-v-0ef90b85"]]), Fi = {
4787
4801
  key: 0,
4788
4802
  class: "pb-4"
4789
- }, Mi = {
4803
+ }, Ii = {
4790
4804
  key: 1,
4791
4805
  "data-test": "messaging-sdk-header",
4792
4806
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4793
- }, Ni = { class: "min-w-0 flex-1" }, Pi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Fi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Ii = {
4807
+ }, Li = { class: "min-w-0 flex-1" }, Ri = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, zi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Bi = {
4794
4808
  key: 0,
4795
4809
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4796
- }, Li = ["aria-label"], Ri = {
4810
+ }, Vi = ["aria-label"], Hi = {
4797
4811
  key: 0,
4798
4812
  "data-test": "messaging-empty-state",
4799
4813
  class: "flex flex-col items-center justify-center px-4"
4800
- }, zi = ["title"], Bi = {
4814
+ }, Ui = ["title"], Wi = {
4801
4815
  key: 0,
4802
4816
  class: "flex items-center gap-3 py-3 px-2"
4803
- }, Vi = ["data-journal-outcome"], Hi = [
4817
+ }, Gi = ["data-journal-outcome"], Ki = [
4804
4818
  "data-message-id",
4805
4819
  "data-message-sender",
4806
4820
  "data-conversation-id",
@@ -4811,7 +4825,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4811
4825
  "data-issue-action-label",
4812
4826
  "data-issue-action-url",
4813
4827
  "data-streaming"
4814
- ], Ui = { class: "max-w-[85%] min-w-0" }, Wi = ["href"], Gi = [
4828
+ ], qi = { class: "max-w-[85%] min-w-0" }, Ji = ["href"], Yi = [
4815
4829
  "data-message-id",
4816
4830
  "data-message-sender",
4817
4831
  "data-conversation-id",
@@ -4820,7 +4834,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4820
4834
  "data-issue-code",
4821
4835
  "data-issue-bucket",
4822
4836
  "data-streaming"
4823
- ], Ki = [
4837
+ ], Xi = [
4824
4838
  "data-test",
4825
4839
  "data-message-id",
4826
4840
  "data-message-sender",
@@ -4830,57 +4844,57 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4830
4844
  "data-streaming",
4831
4845
  "data-queued",
4832
4846
  "aria-label"
4833
- ], qi = ["src", "alt"], Ji = ["src"], Yi = ["href"], Xi = {
4847
+ ], Zi = ["src", "alt"], Qi = ["src"], $i = ["href"], ea = {
4834
4848
  key: 0,
4835
4849
  "data-test": "messaging-message-text-part"
4836
- }, Zi = [
4850
+ }, ta = [
4837
4851
  "src",
4838
4852
  "alt",
4839
4853
  "data-attachment-placement"
4840
- ], Qi = ["src", "data-attachment-placement"], $i = ["href", "data-attachment-placement"], ea = ["data-journal-outcome"], ta = {
4854
+ ], na = ["src", "data-attachment-placement"], ra = ["href", "data-attachment-placement"], ia = ["data-journal-outcome"], aa = {
4841
4855
  key: 2,
4842
4856
  "data-test": "messaging-tool-activity-tail",
4843
4857
  "aria-label": "Assistant is still working",
4844
4858
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4845
- }, na = ["data-journal-outcome"], ra = ["data-test", "data-working-description"], ia = {
4859
+ }, oa = ["data-journal-outcome"], sa = ["data-test", "data-working-description"], ca = {
4846
4860
  class: "flex items-center gap-[5px]",
4847
4861
  "aria-hidden": "true"
4848
- }, aa = { class: "truncate" }, oa = ["data-issue-code"], sa = ["href"], ca = ["inert", "aria-hidden"], la = ["data-seat-state"], ua = ["src", "alt"], da = { class: "max-w-20 truncate" }, fa = ["onClick"], pa = {
4862
+ }, la = { class: "truncate" }, ua = ["data-issue-code"], da = ["href"], fa = ["inert", "aria-hidden"], pa = ["data-seat-state"], ma = ["src", "alt"], ha = { class: "max-w-20 truncate" }, ga = ["onClick"], _a = {
4849
4863
  key: 0,
4850
4864
  class: "shrink-0 flex items-center justify-center size-14"
4851
- }, ma = ["data-composer-action"], ha = ["placeholder", "disabled"], ga = { class: "font-mono text-sm tabular-nums" }, _a = { class: "mt-2.5 flex items-center" }, va = [
4865
+ }, va = ["data-composer-action"], ya = ["placeholder", "disabled"], ba = { class: "font-mono text-sm tabular-nums" }, xa = { class: "mt-2.5 flex items-center" }, Sa = [
4852
4866
  "disabled",
4853
4867
  "aria-label",
4854
4868
  "title"
4855
- ], ya = {
4869
+ ], Ca = {
4856
4870
  key: 0,
4857
4871
  class: "i-svg-spinners-ring-resize size-5"
4858
- }, ba = {
4872
+ }, wa = {
4859
4873
  key: 1,
4860
4874
  class: "i-tabler-plus size-5"
4861
- }, xa = { class: "sr-only" }, Sa = { class: "flex items-center gap-2" }, Ca = ["aria-label", "title"], wa = { class: "sr-only" }, Ta = [
4875
+ }, Ta = { class: "sr-only" }, Ea = { class: "flex items-center gap-2" }, Da = ["aria-label", "title"], Oa = { class: "sr-only" }, ka = [
4862
4876
  "disabled",
4863
4877
  "aria-label",
4864
4878
  "title"
4865
- ], Ea = {
4879
+ ], Aa = {
4866
4880
  class: "flex h-4 items-center gap-[2px]",
4867
4881
  "aria-hidden": "true"
4868
- }, Da = [
4882
+ }, ja = [
4869
4883
  "data-composer-action",
4870
4884
  "disabled",
4871
4885
  "aria-label",
4872
4886
  "title"
4873
- ], Oa = {
4887
+ ], Ma = {
4874
4888
  key: 0,
4875
4889
  class: "i-tabler-player-stop-filled size-3.5"
4876
- }, ka = {
4890
+ }, Na = {
4877
4891
  key: 1,
4878
4892
  class: "i-tabler-arrow-up size-[17px]"
4879
- }, Aa = { class: "sr-only" }, ja = {
4893
+ }, Pa = { class: "sr-only" }, Fa = {
4880
4894
  key: 2,
4881
4895
  "data-test": "messaging-ai-notice",
4882
4896
  class: "mx-auto max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"
4883
- }, Ma = /*#__PURE__*/ ki(/* @__PURE__ */ k({
4897
+ }, Ia = /*#__PURE__*/ Ni(/* @__PURE__ */ k({
4884
4898
  __name: "ElAgentChat",
4885
4899
  props: {
4886
4900
  chatController: {},
@@ -4941,8 +4955,8 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4941
4955
  return m.value.length && ne.value ? t.filter((e) => e.id !== ne.value) : t;
4942
4956
  }), B = v(() => {
4943
4957
  if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
4944
- }), U = v(() => e.chatController?.workJournal?.value), oe = v(() => {
4945
- if (!U.value && !m.value.length) return;
4958
+ }), oe = v(() => e.chatController?.workJournal?.value), se = v(() => {
4959
+ if (!oe.value && !m.value.length) return;
4946
4960
  let e = R.value, t = e[e.length - 1];
4947
4961
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4948
4962
  }), he = v(() => {
@@ -5011,7 +5025,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5011
5025
  if (!f.value) return;
5012
5026
  let e = R.value, t = e[e.length - 1];
5013
5027
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
5014
- }), ve = v(() => !f.value || B.value || U.value || m.value.length ? !1 : K.value === void 0), q = v(() => B.value ?? (ve.value ? "Thinking…" : void 0)), ye = v(() => s.value?.sendBlockedReason), be = v(() => ye.value === "agent_deleted"), Se = v(() => p.value ? "Connecting..." : ye.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), Ce = v(() => c(e.agent.state.value)), we = v(() => {
5028
+ }), ve = v(() => !f.value || B.value || oe.value || m.value.length ? !1 : K.value === void 0), q = v(() => B.value ?? (ve.value ? "Thinking…" : void 0)), ye = v(() => s.value?.sendBlockedReason), be = v(() => ye.value === "agent_deleted"), Se = v(() => p.value ? "Connecting..." : ye.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), Ce = v(() => c(e.agent.state.value)), we = v(() => {
5015
5029
  if (Ge.value || !Ce.value || Ce.value === "awake") return;
5016
5030
  let t = e.agent.displayName.value || e.agent.name.value || "Your assistant";
5017
5031
  return Ce.value === "changing" ? `${t} will be right back…` : `${t} is ${a[Ce.value].toLowerCase()}.`;
@@ -5026,16 +5040,25 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5026
5040
  function isQueuedMessage(e) {
5027
5041
  return Ie.value?.has(e) ?? !1;
5028
5042
  }
5029
- let Re = v(() => Ne.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), ze = v(() => Me.value && !Ae.value && !!ke.value?.canUseBrowserRecording), Be = v(() => ke.value?.isActive.value ?? !1), Ve = v(() => ke.value?.elapsedLabel.value ?? "0:00"), Ue = v(() => ke.value?.statusText.value ?? "Release to send"), We = v(() => ke.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), Ge = F(!1), Ke = F(), qe = v(() => e.chatController?.canStartVoice?.value ?? !1), Je = v(() => qe.value && !Ge.value && !Be.value && Ne.value === "idle"), Ye = v(() => !u.value), Xe = v(() => Ye.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5043
+ let Re = v(() => Ne.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), ze = v(() => Me.value && !Ae.value && !!ke.value?.canUseBrowserRecording), Be = v(() => ke.value?.isActive.value ?? !1), Ve = v(() => ke.value?.elapsedLabel.value ?? "0:00"), Ue = v(() => ke.value?.statusText.value ?? "Release to send"), We = v(() => ke.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), Ge = F(!1), Ke = F(), qe = F(), Je = F(), Ye = 0;
5044
+ ue(() => e.agent.avatar.value?.src, (e) => {
5045
+ let t = ++Ye;
5046
+ if (Je.value = void 0, !e || typeof Image > "u") return;
5047
+ let n = new Image();
5048
+ n.onload = () => {
5049
+ t === Ye && (Je.value = e);
5050
+ }, n.src = e;
5051
+ }, { immediate: !0 });
5052
+ let Xe = v(() => e.chatController?.canStartVoice?.value ?? !1), Qe = v(() => Xe.value && !Ge.value && !Be.value && Ne.value === "idle"), $e = v(() => !u.value), et = v(() => $e.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5030
5053
  function startVoiceConversation() {
5031
- !Je.value || Ye.value || (Ge.value = !0);
5054
+ !Qe.value || $e.value || (qe.value = Je.value, Ge.value = !0);
5032
5055
  }
5033
5056
  async function endVoiceConversation() {
5034
5057
  if (!Ge.value) return;
5035
5058
  let t = Ke.value?.end();
5036
- Ge.value = !1, await A(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5059
+ Ge.value = !1, qe.value = void 0, await A(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5037
5060
  }
5038
- let J = v(() => e.variant === "light"), Qe = v(() => J.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), $e = v(() => J.value ? "text-theme-300" : "text-white/30");
5061
+ let J = v(() => e.variant === "light"), tt = v(() => J.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), X = v(() => J.value ? "text-theme-300" : "text-white/30");
5039
5062
  re(async () => {
5040
5063
  e.chatController && !u.value && await e.chatController.startTextConversation();
5041
5064
  }), ie(() => {
@@ -5065,7 +5088,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5065
5088
  function adjustTextareaHeight() {
5066
5089
  i.value && (i.value.style.height = "auto", i.value.style.height = `${Math.min(i.value.scrollHeight, 150)}px`);
5067
5090
  }
5068
- ce(Ee, () => A(() => adjustTextareaHeight()));
5091
+ ue(Ee, () => A(() => adjustTextareaHeight()));
5069
5092
  function triggerFileInput() {
5070
5093
  o.value?.click();
5071
5094
  }
@@ -5113,20 +5136,20 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5113
5136
  "data-test": "messaging-root",
5114
5137
  class: j(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5115
5138
  }, [
5116
- e.showHeader && !J.value ? (P(), x("div", ji, [T(Le, {
5139
+ e.showHeader && !J.value ? (P(), x("div", Fi, [T(Le, {
5117
5140
  agent: e.agent,
5118
5141
  "is-online": u.value
5119
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (P(), x("div", Mi, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5142
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (P(), x("div", Ii, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5120
5143
  T(He, {
5121
5144
  agent: e.agent,
5122
5145
  "is-light": J.value,
5123
5146
  class: "size-10"
5124
5147
  }, null, 8, ["agent", "is-light"]),
5125
- S("div", Ni, [S("div", Pi, H(e.agent.displayName.value), 1), S("div", Fi, H(e.agent.title.value || "Assistant"), 1)]),
5126
- e.headerMeta ? (P(), x("span", Ii, H(e.headerMeta), 1)) : b("", !0)
5148
+ S("div", Li, [S("div", Ri, H(e.agent.displayName.value), 1), S("div", zi, H(e.agent.title.value || "Assistant"), 1)]),
5149
+ e.headerMeta ? (P(), x("span", Bi, H(e.headerMeta), 1)) : b("", !0)
5127
5150
  ], 2)])) : b("", !0),
5128
5151
  T(_, { name: "voice-call" }, {
5129
- default: ue(() => [Ge.value ? (P(), x("div", {
5152
+ default: U(() => [Ge.value ? (P(), x("div", {
5130
5153
  key: 0,
5131
5154
  "data-test": "voice-call-overlay",
5132
5155
  role: "dialog",
@@ -5134,15 +5157,20 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5134
5157
  "aria-label": `Voice conversation with ${e.agent.displayName.value}`,
5135
5158
  class: "fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",
5136
5159
  onKeydown: a[0] || (a[0] = pe((e) => endVoiceConversation(), ["esc"]))
5137
- }, [T(Ai, {
5160
+ }, [T(Pi, {
5138
5161
  ref_key: "voiceMode",
5139
5162
  ref: Ke,
5140
5163
  agent: e.agent,
5141
5164
  "chat-controller": e.chatController,
5165
+ "backdrop-src": qe.value,
5142
5166
  "is-light": !1,
5143
5167
  class: "voice-call-card h-full w-full sm:max-h-[620px] sm:max-w-[420px] sm:flex-none sm:rounded-[32px] sm:shadow-[0_32px_80px_rgba(5,15,25,0.45)]",
5144
5168
  onEnd: endVoiceConversation
5145
- }, null, 8, ["agent", "chat-controller"])], 40, Li)) : b("", !0)]),
5169
+ }, null, 8, [
5170
+ "agent",
5171
+ "chat-controller",
5172
+ "backdrop-src"
5173
+ ])], 40, Vi)) : b("", !0)]),
5146
5174
  _: 1
5147
5175
  }),
5148
5176
  p.value ? (P(), x("div", {
@@ -5150,7 +5178,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5150
5178
  class: j(["py-16 flex flex-col items-center justify-center gap-2 text-sm", J.value ? "text-theme-400" : "text-theme-600"])
5151
5179
  }, [T(_e, { class: "size-4" })], 2)) : e.setupHint ? (P(), x("div", {
5152
5180
  key: 3,
5153
- class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", $e.value])
5181
+ class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", X.value])
5154
5182
  }, [a[20] || (a[20] = S("i", { class: "i-tabler-tool size-3" }, null, -1)), S("span", null, H(e.setupHint), 1)], 2)) : b("", !0),
5155
5183
  T(pi, {
5156
5184
  ref_key: "chatScroller",
@@ -5159,23 +5187,23 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5159
5187
  "aria-hidden": Ge.value ? "true" : void 0,
5160
5188
  class: j(R.value.length === 0 ? "flex-none" : "flex-1")
5161
5189
  }, {
5162
- default: ue(() => [S("div", { class: j([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5163
- R.value.length === 0 && !p.value ? (P(), x("div", Ri, [ae(t.$slots, "empty-heading", {
5190
+ default: U(() => [S("div", { class: j([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5191
+ R.value.length === 0 && !p.value ? (P(), x("div", Hi, [ae(t.$slots, "empty-heading", {
5164
5192
  agent: e.agent,
5165
5193
  isLight: J.value
5166
5194
  }, () => [T(He, {
5167
5195
  agent: e.agent,
5168
5196
  "is-light": J.value,
5169
5197
  class: "mb-4 size-20 @sm/chat:size-24"
5170
- }, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", J.value ? "text-theme-900" : "text-white"]) }, H(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (P(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", $e.value]) }, H(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
5198
+ }, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", J.value ? "text-theme-900" : "text-white"]) }, H(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (P(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", X.value]) }, H(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
5171
5199
  class: j(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", J.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5172
5200
  title: n.value.tooltip
5173
- }, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, H(n.value.label), 1)], 10, zi)], 64))])) : b("", !0),
5201
+ }, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, H(n.value.label), 1)], 10, Ui)], 64))])) : b("", !0),
5174
5202
  (P(!0), x(h, null, I(R.value, (e, t) => (P(), x(h, { key: e.id }, [
5175
- shouldShowTimeDivider(R.value, t) ? (P(), x("div", Bi, [
5176
- S("div", { class: j(["flex-1 h-px", Qe.value]) }, null, 2),
5177
- S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", $e.value]) }, H(shouldShowTimeDivider(R.value, t)), 3),
5178
- S("div", { class: j(["flex-1 h-px", Qe.value]) }, null, 2)
5203
+ shouldShowTimeDivider(R.value, t) ? (P(), x("div", Wi, [
5204
+ S("div", { class: j(["flex-1 h-px", tt.value]) }, null, 2),
5205
+ S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", X.value]) }, H(shouldShowTimeDivider(R.value, t)), 3),
5206
+ S("div", { class: j(["flex-1 h-px", tt.value]) }, null, 2)
5179
5207
  ])) : b("", !0),
5180
5208
  messageWorkJournal(e) ? (P(), x("div", {
5181
5209
  key: 1,
@@ -5185,7 +5213,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5185
5213
  }, [T(Ze, {
5186
5214
  model: messageWorkJournal(e),
5187
5215
  "is-light": J.value
5188
- }, null, 8, ["model", "is-light"])], 8, Vi)) : b("", !0),
5216
+ }, null, 8, ["model", "is-light"])], 8, Gi)) : b("", !0),
5189
5217
  isSystemExplainerMessage(e) ? (P(), x("div", {
5190
5218
  key: 2,
5191
5219
  "data-test": "messaging-system-msg",
@@ -5200,7 +5228,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5200
5228
  "data-issue-action-url": e.issue?.actionUrl,
5201
5229
  "data-streaming": e.id === K.value ? "true" : void 0,
5202
5230
  class: "flex gap-2 items-end justify-start mb-4"
5203
- }, [S("div", Ui, [S("div", { class: j(["mb-1 pl-1 text-[11px] font-medium", J.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), S("div", { class: j(["pl-1", J.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (P(), te(ui, {
5231
+ }, [S("div", qi, [S("div", { class: j(["mb-1 pl-1 text-[11px] font-medium", J.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), S("div", { class: j(["pl-1", J.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (P(), te(ui, {
5204
5232
  key: 0,
5205
5233
  text: e.text,
5206
5234
  inverted: !J.value,
@@ -5221,7 +5249,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5221
5249
  "data-test": "messaging-system-msg-action",
5222
5250
  class: j(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", J.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5223
5251
  onClick: a[2] || (a[2] = W(() => {}, ["stop"]))
5224
- }, [C(H(e.issue.actionLabel) + " ", 1), a[21] || (a[21] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Wi)) : b("", !0)], 2)])], 8, Hi)) : e.sender === "system" ? (P(), x("div", {
5252
+ }, [C(H(e.issue.actionLabel) + " ", 1), a[21] || (a[21] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Ji)) : b("", !0)], 2)])], 8, Ki)) : e.sender === "system" ? (P(), x("div", {
5225
5253
  key: 3,
5226
5254
  "data-test": "messaging-system-status-msg",
5227
5255
  "data-message-id": e.id,
@@ -5240,7 +5268,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5240
5268
  text: e.text,
5241
5269
  inverted: !J.value,
5242
5270
  onClick: a[3] || (a[3] = W(() => {}, ["stop"]))
5243
- }, null, 8, ["text", "inverted"])], 10, Gi)) : (P(), x("div", {
5271
+ }, null, 8, ["text", "inverted"])], 10, Yi)) : (P(), x("div", {
5244
5272
  key: 4,
5245
5273
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5246
5274
  "data-message-id": e.id,
@@ -5270,14 +5298,14 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5270
5298
  "data-test": "messaging-attachment",
5271
5299
  "data-attachment-placement": "block",
5272
5300
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5273
- }, null, 8, qi)) : e.type === "audio" ? (P(), x("audio", {
5301
+ }, null, 8, Zi)) : e.type === "audio" ? (P(), x("audio", {
5274
5302
  key: 1,
5275
5303
  src: e.src,
5276
5304
  controls: "",
5277
5305
  "data-test": "messaging-attachment",
5278
5306
  "data-attachment-placement": "block",
5279
5307
  class: "max-w-full"
5280
- }, null, 8, Ji)) : (P(), x("a", {
5308
+ }, null, 8, Qi)) : (P(), x("a", {
5281
5309
  key: 2,
5282
5310
  href: e.src,
5283
5311
  target: "_blank",
@@ -5285,11 +5313,11 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5285
5313
  "data-test": "messaging-attachment",
5286
5314
  "data-attachment-placement": "block",
5287
5315
  class: j(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5288
- }, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(e.filename), 1)], 10, Yi))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (P(), x("div", {
5316
+ }, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(e.filename), 1)], 10, $i))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (P(), x("div", {
5289
5317
  key: 1,
5290
5318
  "data-test": "messaging-message-content",
5291
5319
  class: j(e.sender === "user" ? J.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : J.value ? "text-theme-800" : "text-white/95")
5292
- }, [(P(!0), x(h, null, I(messageRenderParts(e), (t) => (P(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (P(), x("div", Xi, [T(ui, {
5320
+ }, [(P(!0), x(h, null, I(messageRenderParts(e), (t) => (P(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (P(), x("div", ea, [T(ui, {
5293
5321
  text: t.text,
5294
5322
  inverted: e.sender === "user" || !J.value,
5295
5323
  streaming: e.id === K.value,
@@ -5306,14 +5334,14 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5306
5334
  "data-test": "messaging-attachment",
5307
5335
  "data-attachment-placement": t.placement,
5308
5336
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5309
- }, null, 8, Zi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (P(), x("audio", {
5337
+ }, null, 8, ta)) : t.kind === "attachment" && t.attachment.type === "audio" ? (P(), x("audio", {
5310
5338
  key: 2,
5311
5339
  src: t.attachment.src,
5312
5340
  controls: "",
5313
5341
  "data-test": "messaging-attachment",
5314
5342
  "data-attachment-placement": t.placement,
5315
5343
  class: "my-2 max-w-full"
5316
- }, null, 8, Qi)) : t.kind === "attachment" ? (P(), x("a", {
5344
+ }, null, 8, na)) : t.kind === "attachment" ? (P(), x("a", {
5317
5345
  key: 3,
5318
5346
  href: t.attachment.src,
5319
5347
  target: "_blank",
@@ -5321,8 +5349,8 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5321
5349
  "data-test": "messaging-attachment",
5322
5350
  "data-attachment-placement": t.placement,
5323
5351
  class: j(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5324
- }, [a[24] || (a[24] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(t.attachment.filename), 1)], 10, $i)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, Ki)),
5325
- e.id === oe.value ? (P(), x(h, { key: 5 }, [m.value.length ? (P(!0), x(h, { key: 0 }, I(m.value, (e) => (P(), x(h, { key: e.id }, [e.kind === "work" ? (P(), x("div", {
5352
+ }, [a[24] || (a[24] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(t.attachment.filename), 1)], 10, ra)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, Xi)),
5353
+ e.id === se.value ? (P(), x(h, { key: 5 }, [m.value.length ? (P(!0), x(h, { key: 0 }, I(m.value, (e) => (P(), x(h, { key: e.id }, [e.kind === "work" ? (P(), x("div", {
5326
5354
  key: 0,
5327
5355
  "data-test": "messaging-tool-activity",
5328
5356
  "data-journal-outcome": e.journal.outcome,
@@ -5330,7 +5358,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5330
5358
  }, [T(Ze, {
5331
5359
  model: e.journal,
5332
5360
  "is-light": J.value
5333
- }, null, 8, ["model", "is-light"])], 8, ea)) : e.kind === "text" && e.content ? (P(), x("div", {
5361
+ }, null, 8, ["model", "is-light"])], 8, ia)) : e.kind === "text" && e.content ? (P(), x("div", {
5334
5362
  key: 1,
5335
5363
  "data-test": "messaging-live-text-block",
5336
5364
  class: j(["mb-4", J.value ? "text-theme-800" : "text-white/95"])
@@ -5344,15 +5372,15 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5344
5372
  "text",
5345
5373
  "inverted",
5346
5374
  "streaming"
5347
- ])], 2)) : (P(), x("div", ta, [T(_e, { class: j(["size-3.5", J.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : U.value ? (P(), x("div", {
5375
+ ])], 2)) : (P(), x("div", aa, [T(_e, { class: j(["size-3.5", J.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : oe.value ? (P(), x("div", {
5348
5376
  key: 1,
5349
5377
  "data-test": "messaging-tool-activity",
5350
- "data-journal-outcome": U.value.outcome,
5378
+ "data-journal-outcome": oe.value.outcome,
5351
5379
  class: "mb-4 w-full"
5352
5380
  }, [T(Ze, {
5353
- model: U.value,
5381
+ model: oe.value,
5354
5382
  "is-light": J.value
5355
- }, null, 8, ["model", "is-light"])], 8, na)) : b("", !0)], 64)) : b("", !0)
5383
+ }, null, 8, ["model", "is-light"])], 8, oa)) : b("", !0)], 64)) : b("", !0)
5356
5384
  ], 64))), 128)),
5357
5385
  q.value ? (P(), x("div", {
5358
5386
  key: 1,
@@ -5361,12 +5389,12 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5361
5389
  role: "status",
5362
5390
  "aria-live": "polite",
5363
5391
  class: j(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", J.value ? "text-theme-500" : "text-white/50"])
5364
- }, [S("span", ia, [(P(), x(h, null, I(3, (e) => S("span", {
5392
+ }, [S("span", ca, [(P(), x(h, null, I(3, (e) => S("span", {
5365
5393
  key: e,
5366
5394
  "data-test": "messaging-thinking-dot",
5367
5395
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5368
5396
  style: M({ animationDelay: `${(e - 1) * .18}s` })
5369
- }, null, 4)), 64))]), S("span", aa, H(q.value), 1)], 10, ra)) : b("", !0),
5397
+ }, null, 4)), 64))]), S("span", la, H(q.value), 1)], 10, sa)) : b("", !0),
5370
5398
  G.value ? (P(), x("div", {
5371
5399
  key: 2,
5372
5400
  "data-test": "messaging-transient-issue",
@@ -5383,8 +5411,8 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5383
5411
  href: G.value.actionUrl,
5384
5412
  class: "shrink-0 underline underline-offset-2",
5385
5413
  onClick: a[6] || (a[6] = W(() => {}, ["stop"]))
5386
- }, H(G.value.actionLabel), 9, sa)) : b("", !0)
5387
- ], 10, oa)) : b("", !0)
5414
+ }, H(G.value.actionLabel), 9, da)) : b("", !0)
5415
+ ], 10, ua)) : b("", !0)
5388
5416
  ], 2)]),
5389
5417
  _: 3
5390
5418
  }, 8, [
@@ -5408,7 +5436,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5408
5436
  role: "status",
5409
5437
  "aria-live": "polite",
5410
5438
  class: j(["py-3 text-center text-[14px]", J.value ? "text-theme-500" : "text-white/70"])
5411
- }, H(we.value), 11, la)) : (P(), x(h, { key: 1 }, [
5439
+ }, H(we.value), 11, pa)) : (P(), x(h, { key: 1 }, [
5412
5440
  De.value.length > 0 ? (P(), x("div", {
5413
5441
  key: 0,
5414
5442
  class: j(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
@@ -5420,13 +5448,13 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5420
5448
  src: e.src,
5421
5449
  alt: e.filename,
5422
5450
  class: j(["size-14 rounded-xl object-cover border", J.value ? "border-black/10" : "border-white/20"])
5423
- }, null, 10, ua)) : (P(), x("div", {
5451
+ }, null, 10, ma)) : (P(), x("div", {
5424
5452
  key: 1,
5425
5453
  class: j(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", J.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5426
- }, [a[26] || (a[26] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", da, H(e.filename), 1)], 2)), S("button", {
5454
+ }, [a[26] || (a[26] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", ha, H(e.filename), 1)], 2)), S("button", {
5427
5455
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
5428
5456
  onClick: (e) => removeAttachment(t)
5429
- }, [...a[27] || (a[27] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, fa)]))), 128)), Oe.value ? (P(), x("div", pa, [T(_e, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
5457
+ }, [...a[27] || (a[27] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, ga)]))), 128)), Oe.value ? (P(), x("div", _a, [T(_e, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
5430
5458
  je.value ? (P(), x("input", {
5431
5459
  key: 1,
5432
5460
  ref_key: "fileInput",
@@ -5447,7 +5475,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5447
5475
  class: j(["flex min-w-0 items-center gap-2 py-1", J.value ? "text-theme-700" : "text-white/80"])
5448
5476
  }, [
5449
5477
  a[28] || (a[28] = S("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5450
- S("span", ga, H(Ve.value), 1),
5478
+ S("span", ba, H(Ve.value), 1),
5451
5479
  S("span", { class: j(["min-w-0 truncate text-sm", J.value ? "text-theme-400" : "text-white/45"]) }, H(Ue.value), 3)
5452
5480
  ], 2)) : de((P(), x("textarea", {
5453
5481
  key: 0,
@@ -5470,7 +5498,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5470
5498
  },
5471
5499
  class: j(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", J.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5472
5500
  onKeydown: handleKeydown
5473
- }, null, 42, ha)), [[se, Ee.value]]), S("div", _a, [
5501
+ }, null, 42, ya)), [[ce, Ee.value]]), S("div", xa, [
5474
5502
  S("button", {
5475
5503
  class: j(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
5476
5504
  je.value ? "cursor-pointer" : "cursor-default",
@@ -5481,9 +5509,9 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5481
5509
  "aria-label": je.value ? "Attach file" : "File attachments unavailable",
5482
5510
  title: je.value ? "Attach file" : "File attachments unavailable",
5483
5511
  onClick: a[8] || (a[8] = (e) => je.value && triggerFileInput())
5484
- }, [Oe.value ? (P(), x("i", ya)) : (P(), x("i", ba)), S("span", xa, H(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, va),
5512
+ }, [Oe.value ? (P(), x("i", Ca)) : (P(), x("i", wa)), S("span", Ta, H(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Sa),
5485
5513
  a[31] || (a[31] = S("div", { class: "flex-1" }, null, -1)),
5486
- S("div", Sa, [(ze.value || Be.value) && !Ge.value ? (P(), x("button", {
5514
+ S("div", Ea, [(ze.value || Be.value) && !Ge.value ? (P(), x("button", {
5487
5515
  key: 0,
5488
5516
  "data-test": "messaging-record-audio-btn",
5489
5517
  class: j(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Be.value ? J.value ? "text-theme-900 scale-110" : "text-white scale-110" : J.value ? "text-theme-500" : "text-white/60"]),
@@ -5498,15 +5526,15 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5498
5526
  a[16] || (a[16] = pe(W((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5499
5527
  ],
5500
5528
  onKeyup: [a[13] || (a[13] = pe(W((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), a[15] || (a[15] = pe(W((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5501
- }, [S("i", { class: j([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", wa, H(We.value), 1)], 42, Ca)) : b("", !0), Je.value ? (P(), x("button", {
5529
+ }, [S("i", { class: j([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", Oa, H(We.value), 1)], 42, Da)) : b("", !0), Qe.value ? (P(), x("button", {
5502
5530
  key: 1,
5503
5531
  "data-test": "messaging-voice-start-btn",
5504
- class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", Ye.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5505
- disabled: Ye.value,
5506
- "aria-label": Xe.value,
5507
- title: Xe.value,
5532
+ class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", $e.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5533
+ disabled: $e.value,
5534
+ "aria-label": et.value,
5535
+ title: et.value,
5508
5536
  onClick: a[17] || (a[17] = (e) => startVoiceConversation())
5509
- }, [S("span", Ea, [(P(), x(h, null, I([
5537
+ }, [S("span", Aa, [(P(), x(h, null, I([
5510
5538
  7,
5511
5539
  13,
5512
5540
  16,
@@ -5516,7 +5544,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5516
5544
  key: e,
5517
5545
  class: "w-[2px] rounded-full bg-current",
5518
5546
  style: M({ height: `${e}px` })
5519
- }, null, 4)), 64))]), a[29] || (a[29] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, Ta)) : Be.value ? b("", !0) : (P(), x(h, { key: 2 }, [Fe.value ? (P(), x("button", {
5547
+ }, null, 4)), 64))]), a[29] || (a[29] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, ka)) : Be.value ? b("", !0) : (P(), x(h, { key: 2 }, [Fe.value ? (P(), x("button", {
5520
5548
  key: 0,
5521
5549
  "data-test": "messaging-secondary-stop-btn",
5522
5550
  class: j(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", J.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
@@ -5534,22 +5562,22 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5534
5562
  "aria-label": Re.value,
5535
5563
  title: Re.value,
5536
5564
  onClick: a[19] || (a[19] = (e) => handleComposerAction())
5537
- }, [Ne.value === "stop" ? (P(), x("i", Oa)) : (P(), x("i", ka)), S("span", Aa, H(Re.value), 1)], 10, Da)], 64))])
5538
- ])], 10, ma),
5539
- e.centered && R.value.length > 0 ? (P(), x("p", ja, H(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
5540
- ], 64))], !0)], 10, ca)
5565
+ }, [Ne.value === "stop" ? (P(), x("i", Ma)) : (P(), x("i", Na)), S("span", Pa, H(Re.value), 1)], 10, ja)], 64))])
5566
+ ])], 10, va),
5567
+ e.centered && R.value.length > 0 ? (P(), x("p", Fa, H(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
5568
+ ], 64))], !0)], 10, fa)
5541
5569
  ], 2));
5542
5570
  }
5543
- }), [["__scopeId", "data-v-ff007beb"]]), Na = { class: "agent-wrap" }, Pa = {
5571
+ }), [["__scopeId", "data-v-6feb48be"]]), La = { class: "agent-wrap" }, Ra = {
5544
5572
  key: 0,
5545
5573
  class: "flex items-center justify-center h-full"
5546
- }, Fa = {
5574
+ }, za = {
5547
5575
  key: 2,
5548
5576
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5549
5577
  role: "status",
5550
5578
  "aria-live": "polite",
5551
5579
  "data-test": "agent-unavailable"
5552
- }, Ia = /* @__PURE__ */ k({
5580
+ }, Ba = /* @__PURE__ */ k({
5553
5581
  __name: "AgentWrap",
5554
5582
  props: {
5555
5583
  sdk: {},
@@ -5645,15 +5673,15 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5645
5673
  });
5646
5674
  }
5647
5675
  }
5648
- return re(loadAgent), (t, n) => (P(), x("div", Na, [o.value ? (P(), x("div", Pa, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ae(t.$slots, "default", {
5649
- sdk: U(a),
5676
+ return re(loadAgent), (t, n) => (P(), x("div", La, [o.value ? (P(), x("div", Ra, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ae(t.$slots, "default", {
5677
+ sdk: oe(a),
5650
5678
  agent: c.value,
5651
5679
  context: e.clientContext ?? e.context,
5652
5680
  firstMessage: e.firstMessage,
5653
5681
  buttonText: e.buttonText,
5654
5682
  buttonIcon: e.buttonIcon,
5655
5683
  loading: o.value
5656
- }, void 0, void 0, 1) : u.value ? (P(), x("div", Fa, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
5684
+ }, void 0, void 0, 1) : u.value ? (P(), x("div", za, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
5657
5685
  type: "button",
5658
5686
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5659
5687
  "data-test": "agent-unavailable-retry",
@@ -5662,6 +5690,6 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5662
5690
  }
5663
5691
  });
5664
5692
  //#endregion
5665
- export { ui as a, ke as c, handleImageError as d, parseButtonTemplate as f, _e as g, r as h, ki as i, De as l, K as m, Ma as n, Le as o, AgentChatController as p, Ai as r, je as s, Ia as t, getAgentAvatarUrl as u };
5693
+ export { ui as a, ke as c, handleImageError as d, parseButtonTemplate as f, _e as g, r as h, Ni as i, De as l, K as m, Ia as n, Le as o, AgentChatController as p, Pi as r, je as s, Ba as t, getAgentAvatarUrl as u };
5666
5694
 
5667
5695
  //# sourceMappingURL=AgentWrap.js.map