@8wave/ai-elements 0.121.0-beta.51 → 0.121.0-beta.52

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.
@@ -1,6 +1,6 @@
1
1
  (function(){try{var __b=new URL(".",import.meta.url).href;if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtE6F15M.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWvU6F15M.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtU6F15M.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuk6F15M.woff2) format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWu06F15M.woff2) format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWxU6F15M.woff2) format('woff2');unicode-range:U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-209F,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqW106F15M.woff2) format('woff2');unicode-range:U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AE,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F8D0-1F8D8,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FAC6,U+1FAC8,U+1FACC-1FADD,U+1FADF-1FAEB,U+1FAEF-1FAFA,U+1FB00-1FBFF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtk6F15M.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWt06F15M.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuU6F.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');unicode-range:U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-209F,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');unicode-range:U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AE,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F8D0-1F8D8,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FAC6,U+1FAC8,U+1FACC-1FADD,U+1FADF-1FAEB,U+1FAEF-1FAFA,U+1FB00-1FBFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
- import { C as e, E as t, S as n, T as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, w as x, x as S, y as ee } from "./_chunks/zod-Cty6wiWN.js";
3
- import { A as te, B as C, C as w, Ct as T, D as E, Dt as ne, E as D, Et as O, F as re, I as k, J as A, K as ie, L as j, M as ae, N as oe, O as M, Ot as N, P as se, Q as ce, R as P, S as F, St as le, T as ue, Tt as de, U as fe, V as pe, Y as me, Z as I, _ as L, _t as he, at as R, b as ge, bt as z, ct as _e, d as ve, dt as ye, et as B, f as V, ft as be, g as H, h as U, ht as W, i as xe, it as Se, k as G, lt as Ce, n as we, pt as Te, q as Ee, r as De, rt as Oe, st as ke, t as K, u as Ae, ut as je, v as q, vt as Me, w as J, wt as Y, x as Ne, xt as X, y as Z, yt as Pe, z as Fe } from "./_chunks/vue.runtime.esm-bundler-DQaOHfo6.js";
2
+ import { C as e, E as t, S as n, T as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, w as x, x as S, y as C } from "./_chunks/zod-Cty6wiWN.js";
3
+ import { A as ee, B as w, C as T, Ct as E, D, Dt as te, E as O, Et as k, F as ne, I as re, J as A, K as ie, L as j, M as ae, N as oe, O as M, Ot as N, P as se, Q as ce, R as P, S as F, St as le, T as ue, Tt as de, U as fe, V as pe, Y as me, Z as I, _ as L, _t as he, at as R, b as ge, bt as z, ct as _e, d as ve, dt as ye, et as B, f as V, ft as be, g as H, h as U, ht as W, i as xe, it as Se, k as G, lt as Ce, n as we, pt as Te, q as Ee, r as De, rt as Oe, st as ke, t as K, u as Ae, ut as je, v as q, vt as Me, w as J, wt as Y, x as Ne, xt as X, y as Z, yt as Pe, z as Fe } from "./_chunks/vue.runtime.esm-bundler-DQaOHfo6.js";
4
4
  import { n as Ie, r as Le, t as Re } from "./_chunks/vue-i18n-DjRtpHH3.js";
5
5
  import { i as ze, n as Be, r as Ve } from "./_chunks/iconify-BPfgHBoT.js";
6
6
  import { A as He, B as Ue, C as We, D as Ge, E as Ke, F as qe, H as Je, I as Ye, L as Xe, M as Ze, N as Qe, O as $e, P as et, R as tt, S as nt, T as rt, V as it, _ as at, a as ot, b as st, c as ct, f as lt, g as ut, h as dt, i as ft, j as pt, k as mt, l as ht, m as gt, n as _t, o as vt, p as yt, r as bt, s as xt, t as St, v as Ct, w as wt, x as Tt, y as Et, z as Dt } from "./_chunks/PkStreamingMarkdown-BP7HK2u0.js";
@@ -274,7 +274,7 @@ function fr(e, t, n) {
274
274
  r = i ? n : t;
275
275
  function a(n, a) {
276
276
  let o = M();
277
- return n ||= o ? te(Rn, null) : null, n && Ln(n), n = In, n._s.has(e) || (i ? dr(e, t, r, n) : ur(e, r, n)), n._s.get(e);
277
+ return n ||= o ? ee(Rn, null) : null, n && Ln(n), n = In, n._s.has(e) || (i ? dr(e, t, r, n) : ur(e, r, n)), n._s.get(e);
278
278
  }
279
279
  return a.$id = e, a;
280
280
  }
@@ -5007,7 +5007,7 @@ var ti = i({
5007
5007
  mediaType: o().regex(Rt),
5008
5008
  url: e(),
5009
5009
  filename: o().optional(),
5010
- providerMetadata: ee(o(), ee(o(), n())).optional()
5010
+ providerMetadata: C(o(), C(o(), n())).optional()
5011
5011
  }), ri = b("type", [ti, ni]);
5012
5012
  i({
5013
5013
  id: o(),
@@ -5034,7 +5034,7 @@ i({
5034
5034
  fallbackModels: h(o()).optional(),
5035
5035
  gatewayOptions: Qt.partial().optional(),
5036
5036
  deviceContext: Nt.optional(),
5037
- externalContext: ee(o(), n()).optional(),
5037
+ externalContext: C(o(), n()).optional(),
5038
5038
  smoothStream: v().optional(),
5039
5039
  hostTools: h(n()).optional(),
5040
5040
  pageTools: n().optional()
@@ -5060,7 +5060,7 @@ var ai = /* @__PURE__ */ new Set([
5060
5060
  messageCountAtLastSummary: o().nullable(),
5061
5061
  createdAt: y(),
5062
5062
  updatedAt: y(),
5063
- metadata: ee(o(), n()),
5063
+ metadata: C(o(), n()),
5064
5064
  totalCostInUSD: o(),
5065
5065
  usage: n(),
5066
5066
  agentId: o().nullable(),
@@ -6481,7 +6481,7 @@ var Qs = async (e, t) => {
6481
6481
  error: null
6482
6482
  };
6483
6483
  }
6484
- let y = t?.jsonParser ?? Ps, b = await h.text(), x = Ms(b), S = x ? await y(b) : null, ee = {
6484
+ let y = t?.jsonParser ?? Ps, b = await h.text(), x = Ms(b), S = x ? await y(b) : null, C = {
6485
6485
  response: h,
6486
6486
  responseText: b,
6487
6487
  request: p,
@@ -6491,8 +6491,8 @@ var Qs = async (e, t) => {
6491
6491
  })
6492
6492
  };
6493
6493
  for (let e of r.onError) if (e) {
6494
- var te;
6495
- await e(Zs(Zs({}, ee), {}, { response: t != null && (te = t.hookOptions) != null && te.cloneResponse ? h.clone() : h }));
6494
+ var ee;
6495
+ await e(Zs(Zs({}, C), {}, { response: t != null && (ee = t.hookOptions) != null && ee.cloneResponse ? h.clone() : h }));
6496
6496
  }
6497
6497
  if (t?.retry) {
6498
6498
  let n = ps(t.retry), i = t.retryAttempt ?? 0;
@@ -8344,7 +8344,7 @@ var Q = {
8344
8344
  null: a,
8345
8345
  number: l,
8346
8346
  object: i,
8347
- record: ee,
8347
+ record: C,
8348
8348
  string: o,
8349
8349
  union: S,
8350
8350
  unknown: n
@@ -10582,9 +10582,9 @@ var mf = "voice-", hf = (e) => e?.role === "assistant" && e.parts.some((e) => e.
10582
10582
  };
10583
10583
  function Mf(e) {
10584
10584
  return fr(`chatbot-${e}`, () => {
10585
- let { t, te: n, locale: r } = Le({ useScope: "global" }), i = W(""), a = W(), o = W(e), s = W(), c = W(), l = W(), u = W(), d = W(), f = W(), p = W(), m = W(), h = W(), g = W(), _ = W(), v = W(), y = W(), b = W(), x = W(), S = W(), ee = he(), te = W(0), C = W(), w = he(), T = he(), E = W(), ne = W({}), D = W(!1), O = W(0), re = W(), k = W(!1), A = pn(), ie = U(() => {
10585
+ let { t, te: n, locale: r } = Le({ useScope: "global" }), i = W(""), a = W(), o = W(e), s = W(), c = W(), l = W(), u = W(), d = W(), f = W(), p = W(), m = W(), h = W(), g = W(), _ = W(), v = W(), y = W(), b = W(), x = W(), S = W(), C = he(), ee = W(0), w = W(), T = he(), E = he(), D = W(), te = W({}), O = W(!1), k = W(0), ne = W(), re = W(!1), A = pn(), ie = U(() => {
10586
10586
  let e = u.value?.theme;
10587
- return e && e !== "auto" || (e = re.value), e ? e === "dark" : A.value;
10587
+ return e && e !== "auto" || (e = ne.value), e ? e === "dark" : A.value;
10588
10588
  }), j = U(() => c.value === "reasoning"), ae = U(() => j.value ? g.value?.filter((e) => ![
10589
10589
  "upvote",
10590
10590
  "downvote",
@@ -10598,12 +10598,12 @@ function Mf(e) {
10598
10598
  set: (e) => {
10599
10599
  oe.value = e;
10600
10600
  }
10601
- }), N = En(U(() => `${o.value}-pageAccessOff`), !1), P = U(() => N.value ? [] : w.value ?? []), F = () => N.value ? [] : T.value?.() ?? [], le = U(() => !!(C.value && w.value?.length)), ue = On(U(() => `${o.value}-pageNotice`), null), de = U(() => {
10602
- let e = C.value?.level;
10601
+ }), N = En(U(() => `${o.value}-pageAccessOff`), !1), P = U(() => N.value ? [] : T.value ?? []), F = () => N.value ? [] : E.value?.() ?? [], le = U(() => !!(w.value && T.value?.length)), ue = On(U(() => `${o.value}-pageNotice`), null), de = U(() => {
10602
+ let e = w.value?.level;
10603
10603
  return e && e !== Ft.Off && P.value.length && !Gt(ue.value ?? void 0, e) ? e : void 0;
10604
10604
  });
10605
10605
  function fe() {
10606
- ue.value = C.value?.level ?? null;
10606
+ ue.value = w.value?.level ?? null;
10607
10607
  }
10608
10608
  let pe = W(), me = W(!1), L = U(() => pe.value?.message?.toLowerCase().includes("conversation-blocked") ?? !1);
10609
10609
  function R(e) {
@@ -10630,11 +10630,11 @@ function Mf(e) {
10630
10630
  ...Vr(),
10631
10631
  ..._e.value ?? {}
10632
10632
  }), ye = () => {
10633
- let e = O.value;
10633
+ let e = k.value;
10634
10634
  return new Promise((t) => {
10635
10635
  let n = setTimeout(() => {
10636
10636
  r(), t(!1);
10637
- }, 3e4), r = I(() => [O.value, Z.value.status], ([i, a]) => {
10637
+ }, 3e4), r = I(() => [k.value, Z.value.status], ([i, a]) => {
10638
10638
  i > e && a === "streaming" && (clearTimeout(n), r(), t(!0));
10639
10639
  });
10640
10640
  });
@@ -10653,7 +10653,7 @@ function Mf(e) {
10653
10653
  }
10654
10654
  let xe = Ec({
10655
10655
  registry: () => [
10656
- ...(ee.value ?? []).filter((e) => !Kt(e.name)),
10656
+ ...(C.value ?? []).filter((e) => !Kt(e.name)),
10657
10657
  ...P.value,
10658
10658
  ...F()
10659
10659
  ],
@@ -10662,11 +10662,11 @@ function Mf(e) {
10662
10662
  confirm: V,
10663
10663
  waitForResume: ye,
10664
10664
  onPendingChange: (e) => {
10665
- te.value = e;
10665
+ ee.value = e;
10666
10666
  },
10667
10667
  onActivity: (e) => {
10668
10668
  if (e?.provider !== "page") {
10669
- E.value = void 0;
10669
+ D.value = void 0;
10670
10670
  return;
10671
10671
  }
10672
10672
  let t = [...P.value, ...F()].find((t) => t.name === e.toolName), n;
@@ -10675,14 +10675,14 @@ function Mf(e) {
10675
10675
  } catch {
10676
10676
  n = void 0;
10677
10677
  }
10678
- n && (ne.value = {
10679
- ...ne.value,
10678
+ n && (te.value = {
10679
+ ...te.value,
10680
10680
  [e.toolCallId]: n
10681
- }), e.readOnly ? E.value = void 0 : (E.value = { title: n ?? t?.annotations?.title ?? e.toolName }, D.value = !0);
10681
+ }), e.readOnly ? D.value = void 0 : (D.value = { title: n ?? t?.annotations?.title ?? e.toolName }, O.value = !0);
10682
10682
  }
10683
10683
  });
10684
10684
  async function Se() {
10685
- G(), E.value = void 0, D.value = !1, it.value = "", await Z.value.stop();
10685
+ G(), D.value = void 0, O.value = !1, it.value = "", await Z.value.stop();
10686
10686
  }
10687
10687
  function G() {
10688
10688
  xe.cancelAll(), B.value?.answer(!1);
@@ -10728,8 +10728,8 @@ function Mf(e) {
10728
10728
  disabledTools: f.value?.disabled,
10729
10729
  fallbackModels: y.value,
10730
10730
  gatewayOptions: b.value,
10731
- hostTools: Tc(ee.value, S.value),
10732
- pageTools: C.value && P.value.length ? {
10731
+ hostTools: Tc(C.value, S.value),
10732
+ pageTools: w.value && P.value.length ? {
10733
10733
  version: 1,
10734
10734
  features: [...At],
10735
10735
  forms: F().map(({ name: e, description: t, inputSchema: n, annotations: r }) => ({
@@ -10803,7 +10803,7 @@ function Mf(e) {
10803
10803
  };
10804
10804
  })
10805
10805
  }), t = Z.value.id === M.value ? Z.value.messages : [];
10806
- return j.value ? e(t) : !k.value && t[0]?.role !== "assistant" ? [Re.value, ...e(t)] : e(t);
10806
+ return j.value ? e(t) : !re.value && t[0]?.role !== "assistant" ? [Re.value, ...e(t)] : e(t);
10807
10807
  }), Be = U(() => {
10808
10808
  let e = u.value?.messagePlaceholder;
10809
10809
  return e?.[r.value] ? e[r.value] : n("placeholder.askAnything") ? t("placeholder.askAnything") : "";
@@ -10949,7 +10949,7 @@ function Mf(e) {
10949
10949
  let Ct = () => {
10950
10950
  let e = Z.value.status;
10951
10951
  return e === "submitted" || e === "streaming";
10952
- }, wt = () => Ct() || Ee?.chatId === M.value || te.value > 0, Tt = () => {
10952
+ }, wt = () => Ct() || Ee?.chatId === M.value || ee.value > 0, Tt = () => {
10953
10953
  let e = Pe();
10954
10954
  return B.value !== void 0 || hf(e) || Af(e);
10955
10955
  }, Et = /* @__PURE__ */ new Set();
@@ -11067,16 +11067,16 @@ function Mf(e) {
11067
11067
  let t = B.value?.toolCallId;
11068
11068
  t && !e.some((e) => e.parts.some((e) => e.toolCallId === t)) && G();
11069
11069
  }), I(() => Z.value.status, (e) => {
11070
- e === "submitted" && (O.value++, Oe = void 0);
11070
+ e === "submitted" && (k.value++, Oe = void 0);
11071
11071
  });
11072
11072
  let Ut;
11073
- I(() => [Z.value.status, te.value], ([e, t]) => {
11073
+ I(() => [Z.value.status, ee.value], ([e, t]) => {
11074
11074
  clearTimeout(Ut), e === "ready" && t === 0 && (Ut = setTimeout(() => {
11075
- D.value = !1;
11075
+ O.value = !1;
11076
11076
  }, 1500));
11077
11077
  });
11078
11078
  let Wt = W(!1), qt;
11079
- I(() => !B.value && !hf(Pe()) && (Ct() || te.value > 0), (e) => {
11079
+ I(() => !B.value && !hf(Pe()) && (Ct() || ee.value > 0), (e) => {
11080
11080
  clearTimeout(qt), e ? Wt.value = !0 : qt = setTimeout(() => {
11081
11081
  Wt.value = !1;
11082
11082
  }, 400);
@@ -11135,7 +11135,7 @@ function Mf(e) {
11135
11135
  Dt();
11136
11136
  }
11137
11137
  }
11138
- }), I(te, (e) => {
11138
+ }), I(ee, (e) => {
11139
11139
  e === 0 && Z.value.status === "ready" && Dt();
11140
11140
  }), I(() => Z.value.status, (e) => {
11141
11141
  e === "ready" && it.value.length > 0 && (it.value = "");
@@ -11145,7 +11145,7 @@ function Mf(e) {
11145
11145
  rt.value = [], yn.value = null;
11146
11146
  }
11147
11147
  async function cn() {
11148
- return it.value = "", ne.value = {}, M.value = ml(), await se(), Z.value.clearError(), pe.value = void 0, me.value = !1, on(!0), Mn("chat"), M.value;
11148
+ return it.value = "", te.value = {}, M.value = ml(), await se(), Z.value.clearError(), pe.value = void 0, me.value = !1, on(!0), Mn("chat"), M.value;
11149
11149
  }
11150
11150
  async function ln(e) {
11151
11151
  Z.value.status !== "ready" && (it.value = "", await Ht()), G(), await Z.value.regenerate(e);
@@ -11302,14 +11302,14 @@ function Mf(e) {
11302
11302
  gatewayOptions: b,
11303
11303
  externalContext: x,
11304
11304
  agentHostTools: S,
11305
- hostToolRegistry: ee,
11306
- hostToolsPending: te,
11307
- agentPageAccess: C,
11308
- pageToolRegistry: w,
11309
- pageFormsProvider: T,
11310
- pageAction: E,
11311
- hostStepTitles: ne,
11312
- pageControlActive: D,
11305
+ hostToolRegistry: C,
11306
+ hostToolsPending: ee,
11307
+ agentPageAccess: w,
11308
+ pageToolRegistry: T,
11309
+ pageFormsProvider: E,
11310
+ pageAction: D,
11311
+ hostStepTitles: te,
11312
+ pageControlActive: O,
11313
11313
  isWorking: Wt,
11314
11314
  stopHostActions: Se,
11315
11315
  pageNoticeLevel: de,
@@ -11319,8 +11319,8 @@ function Mf(e) {
11319
11319
  pageAccessAvailable: le,
11320
11320
  pageAccessOff: N,
11321
11321
  setPageAccessOff: Ce,
11322
- systemTheme: re,
11323
- hideWelcomeMessage: k,
11322
+ systemTheme: ne,
11323
+ hideWelcomeMessage: re,
11324
11324
  isDark: ie,
11325
11325
  chat: Z,
11326
11326
  messages: ze,
@@ -11394,7 +11394,7 @@ var Nf = W(!1), Pf = W(), Ff = W(), If = W(), Lf = W(), Rf = W(!1), zf = W(), Bf
11394
11394
  return {
11395
11395
  PkGlobalDialog: J({
11396
11396
  name: "PkGlobalDialog",
11397
- render: () => E(_n, {
11397
+ render: () => D(_n, {
11398
11398
  modelValue: Nf.value,
11399
11399
  title: Pf.value,
11400
11400
  transition: Ff.value,
@@ -11423,16 +11423,16 @@ var Hf = () => {
11423
11423
  keepOpen: !0,
11424
11424
  title: d
11425
11425
  }, {
11426
- default: () => E("div", [
11427
- E("div", {
11426
+ default: () => D("div", [
11427
+ D("div", {
11428
11428
  class: o ? "" : "mb-sm",
11429
11429
  style: "white-space: pre-line"
11430
11430
  }, a ?? t("message.confirm")),
11431
- o ? E("p", {
11431
+ o ? D("p", {
11432
11432
  class: "text-14 text-word-2 mt-xs mb-sm",
11433
11433
  style: "white-space: pre-line"
11434
11434
  }, o) : void 0,
11435
- c ? E(yn, {
11435
+ c ? D(yn, {
11436
11436
  modelValue: h.value,
11437
11437
  "onUpdate:modelValue": (e) => {
11438
11438
  h.value = e;
@@ -11445,15 +11445,15 @@ var Hf = () => {
11445
11445
  hintLabel: u ?? t("hint.passphrase", { passphrase: c })
11446
11446
  }) : void 0
11447
11447
  ]),
11448
- footer: () => E(gn, () => {
11448
+ footer: () => D(gn, () => {
11449
11449
  let e = [];
11450
- return s || e.push(E(vn, {
11450
+ return s || e.push(D(vn, {
11451
11451
  label: i ?? t("action.cancel"),
11452
11452
  modifiers: "ghost",
11453
11453
  onClick: () => {
11454
11454
  n && m(), p(!1), g.value = !1;
11455
11455
  }
11456
- })), e.push(E(vn, {
11456
+ })), e.push(D(vn, {
11457
11457
  label: r ?? t("action.proceed"),
11458
11458
  modifiers: f ? "danger" : void 0,
11459
11459
  disabled: c ? c !== h.value : !1,
@@ -12442,25 +12442,25 @@ function bh(e, { t, pages: n = () => [] }) {
12442
12442
  }
12443
12443
  let v = jp(), y = v && v !== m && !gp(v, { inert: !1 }) && !mp(v, r) ? v : void 0, b = !s?.destination && location.href !== c, x = !e.isConnected || gp(e, { inert: !1 });
12444
12444
  (b || !s?.destination && x) && await Nm();
12445
- let S = u.stop(), ee = [t];
12446
- if (S.length > 0 && ee.push(`The page said: ${S.map((e) => `«${e}»`).join(" ")}`), s?.destination) ee.push(`The page is loading ${uh(s.destination)}: the conversation goes on there, so read it with page_snapshot before doing anything else.`);
12445
+ let S = u.stop(), C = [t];
12446
+ if (S.length > 0 && C.push(`The page said: ${S.map((e) => `«${e}»`).join(" ")}`), s?.destination) C.push(`The page is loading ${uh(s.destination)}: the conversation goes on there, so read it with page_snapshot before doing anything else.`);
12447
12447
  else if (b || x) {
12448
12448
  let e = h();
12449
- ee.push(`${b ? "The page is now" : "The part of the page that held it closed or was replaced, the page is"} "${document.title}" (${location.pathname}${location.search}). Now:\n${e.text}`), e.truncated && ee.push("[The page goes on: page_snapshot for the rest.]"), !b && p && S.length === 0 && ee.push("[The dialog closed and the page announced nothing: what it held may only be written into the page's form, which its own save button sends. Do not say it is saved until the page shows it.]");
12449
+ C.push(`${b ? "The page is now" : "The part of the page that held it closed or was replaced, the page is"} "${document.title}" (${location.pathname}${location.search}). Now:\n${e.text}`), e.truncated && C.push("[The page goes on: page_snapshot for the rest.]"), !b && p && S.length === 0 && C.push("[The dialog closed and the page announced nothing: what it held may only be written into the page's form, which its own save button sends. Do not say it is saved until the page shows it.]");
12450
12450
  } else {
12451
12451
  let e = i ? g(i.form) : [];
12452
- e.length > 0 && ee.push(`The form was not sent: ${e.join("; ")}.`);
12452
+ e.length > 0 && C.push(`The form was not sent: ${e.join("; ")}.`);
12453
12453
  let t = y ?? d(), n = y ? Sp(y, r) : "";
12454
- ee.push(`${y ? `A dialog opened${n ? ` "${n}"` : ""}, the page behind it is out of reach until it closes. ` : ""}Now:\n${l(t, Jm).text}`), !y && S.length === 0 && e.length === 0 && yp(t, r, Jm) === f && ee.push("[No visible change yet: if the page is still working, wait for it with page_wait; if the action opened something elsewhere, read it with page_snapshot.]");
12454
+ C.push(`${y ? `A dialog opened${n ? ` "${n}"` : ""}, the page behind it is out of reach until it closes. ` : ""}Now:\n${l(t, Jm).text}`), !y && S.length === 0 && e.length === 0 && yp(t, r, Jm) === f && C.push("[No visible change yet: if the page is still working, wait for it with page_wait; if the action opened something elsewhere, read it with page_snapshot.]");
12455
12455
  }
12456
- let te = sh(ee.join("\n"));
12456
+ let ee = sh(C.join("\n"));
12457
12457
  return s ? {
12458
- result: te,
12458
+ result: ee,
12459
12459
  afterOutput: () => {
12460
12460
  s.destination && dh(), s.release();
12461
12461
  },
12462
12462
  abandon: () => s.drop()
12463
- } : te;
12463
+ } : ee;
12464
12464
  }, v = (e) => {
12465
12465
  let t = l(document.body, Qm), n = t.text.split("\n"), r = e.toLowerCase(), i = /* @__PURE__ */ new Set(), a = 0;
12466
12466
  n.forEach((e, t) => {
@@ -12504,33 +12504,33 @@ function bh(e, { t, pages: n = () => [] }) {
12504
12504
  if (!t) return !1;
12505
12505
  for (let e of x().keys()) if (e === t || yh(e, t)) return !0;
12506
12506
  return !1;
12507
- }, ee = (e, t) => e.slice(0, t).map(([e, t]) => `- ${e}${t ? ` (${t})` : ""}`).join("\n") + (e.length > t ? `\n[and ${e.length - t} more]` : ""), te = (e) => {
12507
+ }, C = (e, t) => e.slice(0, t).map(([e, t]) => `- ${e}${t ? ` (${t})` : ""}`).join("\n") + (e.length > t ? `\n[and ${e.length - t} more]` : ""), ee = (e) => {
12508
12508
  let n = e ? b(e) : t("toolApproval.pageElement");
12509
12509
  return n.length > 40 ? `${n.slice(0, 39)}…` : n;
12510
- }, C = /* @__PURE__ */ new Map(), w = (e) => im(e, r, {
12510
+ }, w = /* @__PURE__ */ new Map(), T = (e) => im(e, r, {
12511
12511
  checked: t("toolApproval.fieldChecked"),
12512
12512
  before: s
12513
- }), T = (e) => JSON.stringify(im(e, r, {
12513
+ }), E = (e) => JSON.stringify(im(e, r, {
12514
12514
  checked: t("toolApproval.fieldChecked"),
12515
12515
  whole: !0
12516
- })), E = (e, n, r) => {
12517
- let i = w(e);
12518
- return C.set(r, T(e)), {
12516
+ })), D = (e, n, r) => {
12517
+ let i = T(e);
12518
+ return w.set(r, E(e)), {
12519
12519
  question: n,
12520
12520
  details: i.more ? [...i.fields, {
12521
12521
  label: "",
12522
12522
  value: t("toolApproval.moreFields", { count: i.more })
12523
12523
  }] : i.fields
12524
12524
  };
12525
- }, ne = (e, t) => {
12526
- let n = C.get(t);
12527
- if (C.delete(t), n !== void 0 && n !== T(e)) throw Error("The form changed while the user was deciding: read it again with page_snapshot, and submit only what the user asked for.");
12528
- }, D = (e) => {
12525
+ }, te = (e, t) => {
12526
+ let n = w.get(t);
12527
+ if (w.delete(t), n !== void 0 && n !== E(e)) throw Error("The form changed while the user was deciding: read it again with page_snapshot, and submit only what the user asked for.");
12528
+ }, O = (e) => {
12529
12529
  if (e.ref !== void 0) return d(e);
12530
12530
  let t = document.activeElement;
12531
12531
  for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
12532
12532
  return t ?? document.body;
12533
- }, O = { timeoutMs: Xm }, re = [
12533
+ }, k = { timeoutMs: Xm }, ne = [
12534
12534
  {
12535
12535
  name: "page_snapshot",
12536
12536
  inputSchema: { type: "object" },
@@ -12538,7 +12538,7 @@ function bh(e, { t, pages: n = () => [] }) {
12538
12538
  title: t("messagePart.pageTool.snapshot"),
12539
12539
  readOnlyHint: !0
12540
12540
  },
12541
- policy: O,
12541
+ policy: k,
12542
12542
  async execute(e, { signal: t }) {
12543
12543
  await zm(), ph(t);
12544
12544
  let r = e.scope, { root: i, note: a } = r === void 0 ? m() : {
@@ -12550,7 +12550,7 @@ function bh(e, { t, pages: n = () => [] }) {
12550
12550
  a ?? "",
12551
12551
  o.text,
12552
12552
  o.truncated ? "[The page goes on: call page_snapshot with the scope of a region for the rest.]" : "",
12553
- r === void 0 && s.length > 0 ? `Pages of the site (<id> is any one segment):\n${ee(s, _h)}` : ""
12553
+ r === void 0 && s.length > 0 ? `Pages of the site (<id> is any one segment):\n${C(s, _h)}` : ""
12554
12554
  ].filter(Boolean).join("\n"));
12555
12555
  }
12556
12556
  },
@@ -12561,7 +12561,7 @@ function bh(e, { t, pages: n = () => [] }) {
12561
12561
  title: t("messagePart.pageTool.read"),
12562
12562
  readOnlyHint: !0
12563
12563
  },
12564
- policy: O,
12564
+ policy: k,
12565
12565
  async execute(e, { signal: t }) {
12566
12566
  return await zm(), ph(t), sh(am(u(e), i, r, {
12567
12567
  maxChars: qm,
@@ -12576,7 +12576,7 @@ function bh(e, { t, pages: n = () => [] }) {
12576
12576
  title: t("messagePart.pageTool.find"),
12577
12577
  readOnlyHint: !0
12578
12578
  },
12579
- policy: O,
12579
+ policy: k,
12580
12580
  describe(e) {
12581
12581
  let n = String(e.text ?? "").trim();
12582
12582
  return n ? t("messagePart.pageStep.find", { text: n.length > 40 ? `${n.slice(0, 39)}…` : n }) : void 0;
@@ -12596,7 +12596,7 @@ function bh(e, { t, pages: n = () => [] }) {
12596
12596
  title: t("messagePart.pageTool.wait"),
12597
12597
  readOnlyHint: !0
12598
12598
  },
12599
- policy: O,
12599
+ policy: k,
12600
12600
  async execute(e, { signal: t }) {
12601
12601
  await zm(), ph(t);
12602
12602
  let { text: n, seconds: i } = e, a = String(n ?? "").trim();
@@ -12610,19 +12610,19 @@ function bh(e, { t, pages: n = () => [] }) {
12610
12610
  }
12611
12611
  }
12612
12612
  ];
12613
- return Gt(e.level, Ft.Full) && re.push({
12613
+ return Gt(e.level, Ft.Full) && ne.push({
12614
12614
  name: "page_click",
12615
12615
  inputSchema: { type: "object" },
12616
12616
  annotations: {
12617
12617
  title: t("messagePart.pageTool.click"),
12618
12618
  destructiveHint: !0
12619
12619
  },
12620
- policy: O,
12620
+ policy: k,
12621
12621
  confirmation(e) {
12622
12622
  let n = Number(e.ref), a = i.resolve(n);
12623
12623
  if (!a || Mp(a)) return;
12624
12624
  let o = b(a), s = vm(a);
12625
- if (s) return E(s, t("toolApproval.pageSubmit", { name: o }), String(n));
12625
+ if (s) return D(s, t("toolApproval.pageSubmit", { name: o }), String(n));
12626
12626
  if (ym(a)) return t("toolApproval.pageOpen", { name: o });
12627
12627
  let c = Np(a, r);
12628
12628
  if (c) return t("toolApproval.pageAnswer", {
@@ -12631,11 +12631,11 @@ function bh(e, { t, pages: n = () => [] }) {
12631
12631
  });
12632
12632
  if (p(a)) return bm(a) ? t("toolApproval.pageOpen", { name: o }) : t("toolApproval.pageClick", { name: o });
12633
12633
  },
12634
- describe: (e) => t("messagePart.pageStep.click", { name: te(i.resolve(Number(e.ref))) }),
12634
+ describe: (e) => t("messagePart.pageStep.click", { name: ee(i.resolve(Number(e.ref))) }),
12635
12635
  async execute(e, { signal: t }) {
12636
12636
  await zm(), ph(t);
12637
12637
  let n = d(e), a = qp(n, i.refOf(n), r), o = vm(n);
12638
- if (o && ne(o, String(e.ref)), _m(n), !Bm() && (bm(n) || o)) return hh(`Clicking ${a}.`, () => lm(n));
12638
+ if (o && te(o, String(e.ref)), _m(n), !Bm() && (bm(n) || o)) return hh(`Clicking ${a}.`, () => lm(n));
12639
12639
  let s = n.getAttribute("aria-controls");
12640
12640
  return _({
12641
12641
  element: n,
@@ -12653,9 +12653,9 @@ function bh(e, { t, pages: n = () => [] }) {
12653
12653
  name: "page_fill",
12654
12654
  inputSchema: { type: "object" },
12655
12655
  annotations: { title: t("messagePart.pageTool.fill") },
12656
- policy: O,
12656
+ policy: k,
12657
12657
  describe(e) {
12658
- let n = mh(e).map(({ ref: e }) => te(i.resolve(Number(e))));
12658
+ let n = mh(e).map(({ ref: e }) => ee(i.resolve(Number(e))));
12659
12659
  return t("messagePart.pageStep.fill", { name: n.slice(0, 2).join(", ") + (n.length > 2 ? ` +${n.length - 2}` : "") });
12660
12660
  },
12661
12661
  confirmation(e) {
@@ -12711,7 +12711,7 @@ function bh(e, { t, pages: n = () => [] }) {
12711
12711
  name: "page_scroll",
12712
12712
  inputSchema: { type: "object" },
12713
12713
  annotations: { title: t("messagePart.pageTool.scroll") },
12714
- policy: O,
12714
+ policy: k,
12715
12715
  async execute(e, { signal: t }) {
12716
12716
  await zm(), ph(t);
12717
12717
  let { ref: n, direction: r } = e;
@@ -12721,8 +12721,8 @@ function bh(e, { t, pages: n = () => [] }) {
12721
12721
  name: "page_hover",
12722
12722
  inputSchema: { type: "object" },
12723
12723
  annotations: { title: t("messagePart.pageTool.hover") },
12724
- policy: O,
12725
- describe: (e) => t("messagePart.pageStep.hover", { name: te(i.resolve(Number(e.ref))) }),
12724
+ policy: k,
12725
+ describe: (e) => t("messagePart.pageStep.hover", { name: ee(i.resolve(Number(e.ref))) }),
12726
12726
  confirmation(e) {
12727
12727
  let n = i.resolve(Number(e.ref));
12728
12728
  return n && p(n) ? t("toolApproval.pageHover", { name: b(n) }) : void 0;
@@ -12738,16 +12738,16 @@ function bh(e, { t, pages: n = () => [] }) {
12738
12738
  name: "page_press",
12739
12739
  inputSchema: { type: "object" },
12740
12740
  annotations: { title: t("messagePart.pageTool.press") },
12741
- policy: O,
12741
+ policy: k,
12742
12742
  confirmation(e) {
12743
12743
  let { key: n } = e, i;
12744
12744
  try {
12745
- i = D(e);
12745
+ i = O(e);
12746
12746
  } catch {
12747
12747
  return;
12748
12748
  }
12749
12749
  let a = n === "Enter" ? mm(i) : null;
12750
- if (a) return E(a, t("toolApproval.pageSubmit", { name: b(i) }), `press:${String(e.ref)}`);
12750
+ if (a) return D(a, t("toolApproval.pageSubmit", { name: b(i) }), `press:${String(e.ref)}`);
12751
12751
  let o = n === "Enter" || n === "Space" ? Np(i, r, { anyElement: !0 }) : void 0;
12752
12752
  return o ? t("toolApproval.pageAnswer", {
12753
12753
  question: o,
@@ -12761,19 +12761,19 @@ function bh(e, { t, pages: n = () => [] }) {
12761
12761
  let { key: n, ref: r } = e;
12762
12762
  return t("messagePart.pageStep.press", {
12763
12763
  key: String(n),
12764
- name: r === void 0 ? t("toolApproval.pageFocused") : te(i.resolve(Number(r)))
12764
+ name: r === void 0 ? t("toolApproval.pageFocused") : ee(i.resolve(Number(r)))
12765
12765
  });
12766
12766
  },
12767
12767
  async execute(e, { signal: t }) {
12768
12768
  await zm(), ph(t);
12769
12769
  let n = String(e.key);
12770
12770
  if (!dm.includes(n)) throw Error(`No key "${n}": the keys are ${dm.join(", ")}.`);
12771
- let a = D(e);
12771
+ let a = O(e);
12772
12772
  if (mp(a, r)) throw Error("That element is off limits: the site excluded it.");
12773
12773
  e.ref !== void 0 && a.focus?.();
12774
12774
  let o = a === document.body ? "the page" : qp(a, i.refOf(a), r), s = n === "Enter" ? mm(a) : null;
12775
12775
  if (s) {
12776
- ne(s, `press:${String(e.ref)}`);
12776
+ te(s, `press:${String(e.ref)}`);
12777
12777
  let r = () => {
12778
12778
  fm(a, n) || hm(s);
12779
12779
  };
@@ -12802,7 +12802,7 @@ function bh(e, { t, pages: n = () => [] }) {
12802
12802
  name: "page_back",
12803
12803
  inputSchema: { type: "object" },
12804
12804
  annotations: { title: t("messagePart.pageTool.back") },
12805
- policy: O,
12805
+ policy: k,
12806
12806
  confirmation: () => e.confirmEveryAction || !fh() ? t("toolApproval.pageBack") : void 0,
12807
12807
  async execute(e, { signal: t }) {
12808
12808
  if (await zm(), ph(t), history.length <= 1) throw Error("There is no page before this one in this tab.");
@@ -12812,7 +12812,7 @@ function bh(e, { t, pages: n = () => [] }) {
12812
12812
  name: "page_navigate",
12813
12813
  inputSchema: { type: "object" },
12814
12814
  annotations: { title: t("messagePart.pageTool.navigate") },
12815
- policy: O,
12815
+ policy: k,
12816
12816
  describe(e) {
12817
12817
  try {
12818
12818
  let n = new URL(String(e.url), location.href);
@@ -12828,7 +12828,7 @@ function bh(e, { t, pages: n = () => [] }) {
12828
12828
  let e = [...x().entries()];
12829
12829
  return {
12830
12830
  question: t("toolApproval.pageNavigateUnknown", { url: uh(r) }),
12831
- refusal: `The user did not let you open ${uh(r)}, an address the page does not show. Open one of these instead, or click through the site's menus:\n${ee(e, _h)}`
12831
+ refusal: `The user did not let you open ${uh(r)}, an address the page does not show. Open one of these instead, or click through the site's menus:\n${C(e, _h)}`
12832
12832
  };
12833
12833
  }
12834
12834
  },
@@ -12870,7 +12870,7 @@ function bh(e, { t, pages: n = () => [] }) {
12870
12870
  }
12871
12871
  return hh(`Opening ${r}.`, () => location.replace(n.href));
12872
12872
  }
12873
- }), re;
12873
+ }), ne;
12874
12874
  }
12875
12875
  // src/pageTools/forms.ts
12876
12876
  var xh = 16, Sh = /* @__PURE__ */ new Set([
@@ -13879,7 +13879,7 @@ function p_(e = {}) {
13879
13879
  }, i));
13880
13880
  }
13881
13881
  Se() && be(() => clearTimeout(b));
13882
- async function ee(e) {
13882
+ async function C(e) {
13883
13883
  try {
13884
13884
  let { error: t } = await a.externalToken.refresh({ token: e });
13885
13885
  return !t && (u.value === e && S(e), !0);
@@ -13887,11 +13887,11 @@ function p_(e = {}) {
13887
13887
  return !1;
13888
13888
  }
13889
13889
  }
13890
- async function te(e) {
13890
+ async function ee(e) {
13891
13891
  s.value = !0;
13892
13892
  try {
13893
13893
  let t = x();
13894
- if (o.value.data && t && u_(t, e) && (await ee(e) || u.value !== e)) return;
13894
+ if (o.value.data && t && u_(t, e) && (await C(e) || u.value !== e)) return;
13895
13895
  let { data: n } = await a.signIn.externalToken({ token: e });
13896
13896
  if (u.value !== e) return;
13897
13897
  if (n?.token) {
@@ -13905,20 +13905,20 @@ function p_(e = {}) {
13905
13905
  s.value = !1;
13906
13906
  }
13907
13907
  }
13908
- let C, w, T = !1;
13909
- async function E(e) {
13910
- if (e && C !== e) {
13911
- u.value = e, w = e, C = e;
13908
+ let w, T, E = !1;
13909
+ async function D(e) {
13910
+ if (e && w !== e) {
13911
+ u.value = e, T = e, w = e;
13912
13912
  try {
13913
13913
  await p(async () => {
13914
- u.value === e && await te(e);
13914
+ u.value === e && await ee(e);
13915
13915
  });
13916
13916
  } finally {
13917
- C = void 0;
13917
+ w = void 0;
13918
13918
  }
13919
13919
  }
13920
13920
  }
13921
- async function ne() {
13921
+ async function te() {
13922
13922
  s.value || await p(async () => {
13923
13923
  if (!(u.value || n.value)) {
13924
13924
  s.value = !0;
@@ -13935,43 +13935,43 @@ function p_(e = {}) {
13935
13935
  if (!r.isPending && !r.isRefetching && !s.value && !r.data) {
13936
13936
  if (n.value) return;
13937
13937
  if (u.value) {
13938
- E(u.value);
13938
+ D(u.value);
13939
13939
  return;
13940
13940
  }
13941
13941
  if (e.awaitExternalToken) return;
13942
- ne();
13942
+ te();
13943
13943
  return;
13944
13944
  }
13945
13945
  let i = r.data?.user;
13946
13946
  if (n.value) return;
13947
- if (r.data?.session?.hardExpiresAt && !T) {
13948
- if (T = !0, !u.value) {
13947
+ if (r.data?.session?.hardExpiresAt && !E) {
13948
+ if (E = !0, !u.value) {
13949
13949
  P();
13950
13950
  return;
13951
13951
  }
13952
- if (w !== u.value) {
13953
- E(u.value);
13952
+ if (T !== u.value) {
13953
+ D(u.value);
13954
13954
  return;
13955
13955
  }
13956
13956
  }
13957
13957
  let a = x();
13958
- i && !i.isAnonymous && a && u.value && u.value !== a && w !== u.value || i?.isAnonymous && u.value && w !== u.value ? E(u.value) : i?.isAnonymous && i.id && !Xg(e.cookieName) && Yg(i.id, e.cookieName);
13958
+ i && !i.isAnonymous && a && u.value && u.value !== a && T !== u.value || i?.isAnonymous && u.value && T !== u.value ? D(u.value) : i?.isAnonymous && i.id && !Xg(e.cookieName) && Yg(i.id, e.cookieName);
13959
13959
  }, { immediate: !0 }), I(n, () => {
13960
13960
  o.value.refetch();
13961
13961
  }), I(c, (e, t) => {
13962
- e ? (u.value = e, l.value && E(e)) : t && u.value === t && P();
13962
+ e ? (u.value = e, l.value && D(e)) : t && u.value === t && P();
13963
13963
  });
13964
- function D(t) {
13965
- t.status === 401 && (n.value ? o.value.refetch() : u.value ? E(u.value) : e.awaitExternalToken || ne());
13964
+ function O(t) {
13965
+ t.status === 401 && (n.value ? o.value.refetch() : u.value ? D(u.value) : e.awaitExternalToken || te());
13966
13966
  }
13967
- let O = U(() => o.value.data?.user?.id), re = W();
13968
- async function k(t, n, i) {
13967
+ let k = U(() => o.value.data?.user?.id), ne = W();
13968
+ async function re(t, n, i) {
13969
13969
  let o = await a.signIn.email({
13970
13970
  email: t,
13971
13971
  password: n,
13972
13972
  rememberMe: i
13973
13973
  }), s = o.data;
13974
- return s?.twoFactorRedirect ? (re.value = s.twoFactorToken ? {
13974
+ return s?.twoFactorRedirect ? (ne.value = s.twoFactorToken ? {
13975
13975
  token: s.twoFactorToken,
13976
13976
  methods: s.twoFactorMethods ?? []
13977
13977
  } : void 0, Zg(e.cookieName), o) : (o.data?.token && (r.value = o.data.token, Zg(e.cookieName)), o);
@@ -13999,20 +13999,20 @@ function p_(e = {}) {
13999
13999
  }
14000
14000
  };
14001
14001
  async function ae(e, t) {
14002
- let n = re.value;
14002
+ let n = ne.value;
14003
14003
  if (!n) return j;
14004
14004
  let i = await a.$fetch(A[e], {
14005
14005
  ...ie(n),
14006
14006
  body: { code: t }
14007
14007
  });
14008
- return i.data?.token && (r.value = i.data.token, re.value = void 0), i;
14008
+ return i.data?.token && (r.value = i.data.token, ne.value = void 0), i;
14009
14009
  }
14010
14010
  async function oe() {
14011
- let e = re.value;
14011
+ let e = ne.value;
14012
14012
  return e ? a.$fetch("/two-factor/send-otp", ie(e)) : j;
14013
14013
  }
14014
14014
  function M() {
14015
- re.value = void 0;
14015
+ ne.value = void 0;
14016
14016
  }
14017
14017
  function N(e) {
14018
14018
  return a.signUp.email(e);
@@ -14057,10 +14057,10 @@ function p_(e = {}) {
14057
14057
  isExternalAuth: d,
14058
14058
  token: r,
14059
14059
  headers: i,
14060
- onError: D,
14061
- userId: O,
14062
- signInWithEmail: k,
14063
- twoFactorChallenge: re,
14060
+ onError: O,
14061
+ userId: k,
14062
+ signInWithEmail: re,
14063
+ twoFactorChallenge: ne,
14064
14064
  verifyTwoFactor: ae,
14065
14065
  sendTwoFactorCode: oe,
14066
14066
  cancelTwoFactor: M,
@@ -14068,7 +14068,7 @@ function p_(e = {}) {
14068
14068
  requestPasswordReset: se,
14069
14069
  signInSocial: a.signIn.social,
14070
14070
  signInWithSocialPopup: ce,
14071
- signInWithExternalToken: E,
14071
+ signInWithExternalToken: D,
14072
14072
  signOut: P
14073
14073
  };
14074
14074
  }
@@ -14277,10 +14277,10 @@ function b_() {
14277
14277
  let e = null, t = (e) => {
14278
14278
  e.stopPropagation();
14279
14279
  };
14280
- k(() => {
14280
+ re(() => {
14281
14281
  let n = ue()?.proxy?.$el?.getRootNode();
14282
14282
  n instanceof ShadowRoot && (e = n, e.addEventListener("focusin", t));
14283
- }), re(() => {
14283
+ }), ne(() => {
14284
14284
  e &&= (e.removeEventListener("focusin", t), null);
14285
14285
  });
14286
14286
  }
@@ -14358,7 +14358,7 @@ var D_ = ["src"], O_ = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
14358
14358
  key: 0,
14359
14359
  src: e.imgSrc,
14360
14360
  alt: "avatar",
14361
- onError: n[0] ||= (t) => T(r)(e.imgSrc)
14361
+ onError: n[0] ||= (t) => E(r)(e.imgSrc)
14362
14362
  }, null, 40, D_)) : o.value ? (P(), Z(V, { key: 1 }, [Ne(N(o.value), 1)], 64)) : e.fallbackIcon ? (P(), L(s, {
14363
14363
  key: 2,
14364
14364
  name: e.fallbackIcon
@@ -14413,7 +14413,7 @@ var k_ = {
14413
14413
  }, v = () => {
14414
14414
  _(), a = requestAnimationFrame(v);
14415
14415
  };
14416
- return k(() => {
14416
+ return re(() => {
14417
14417
  let e = n.value;
14418
14418
  i = e?.getContext("webgl", { alpha: !0 }) ?? null;
14419
14419
  let t = m();
@@ -14440,7 +14440,7 @@ var k_ = {
14440
14440
  ]), i.STATIC_DRAW);
14441
14441
  let x = i.getAttribLocation(y, "a_position");
14442
14442
  i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), se(h), g() ? _(10) : v();
14443
- }), re(() => {
14443
+ }), ne(() => {
14444
14444
  cancelAnimationFrame(a), o?.disconnect();
14445
14445
  }), j(() => {
14446
14446
  let e = i;
@@ -14478,30 +14478,30 @@ var P_ = /* @__PURE__ */ J({
14478
14478
  };
14479
14479
  b.value = setTimeout(e, 1e3);
14480
14480
  } else y.value = 0;
14481
- }, { immediate: !0 }), re(() => {
14481
+ }, { immediate: !0 }), ne(() => {
14482
14482
  b.value && clearTimeout(b.value);
14483
14483
  }), (e, t) => {
14484
14484
  let n = Tn, r = Sn;
14485
14485
  return P(), L(r, {
14486
- modifiers: T(g) ? "warning" : "danger",
14486
+ modifiers: E(g) ? "warning" : "danger",
14487
14487
  class: "rounded-lg"
14488
14488
  }, ge({
14489
14489
  default: B(() => [Ne(N(v.value) + " ", 1)]),
14490
14490
  _: 2
14491
- }, [T(g) || !_.value ? {
14491
+ }, [E(g) || !_.value ? {
14492
14492
  name: "footer",
14493
- fn: B(() => [T(g) ? (P(), L(n, {
14493
+ fn: B(() => [E(g) ? (P(), L(n, {
14494
14494
  key: 0,
14495
14495
  icon: "ri:reset-right-line",
14496
14496
  modifiers: "action",
14497
14497
  class: "text-12",
14498
- label: T(i)("action.retryNow"),
14498
+ label: E(i)("action.retryNow"),
14499
14499
  onClick: t[0] ||= (t) => e.$emit("retry")
14500
14500
  }, null, 8, ["label"])) : _.value ? q("", !0) : (P(), L(n, {
14501
14501
  key: 1,
14502
14502
  icon: "reload",
14503
14503
  modifiers: "action",
14504
- label: T(i)("label.newChat"),
14504
+ label: E(i)("label.newChat"),
14505
14505
  onClick: t[1] ||= (t) => e.$emit("reset")
14506
14506
  }, null, 8, ["label"]))]),
14507
14507
  key: "0"
@@ -14533,11 +14533,11 @@ var F_ = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
14533
14533
  name: "ri:feedback-line",
14534
14534
  class: "text-16"
14535
14535
  }),
14536
- H("strong", L_, N(T(n)("action.feedback")), 1),
14536
+ H("strong", L_, N(E(n)("action.feedback")), 1),
14537
14537
  F(a, {
14538
14538
  icon: "ri:close-line",
14539
14539
  modifiers: "action-quiet-small",
14540
- title: T(n)("action.close"),
14540
+ title: E(n)("action.close"),
14541
14541
  class: "ml-auto",
14542
14542
  onClick: r[0] ||= ve((e) => t.$emit("close"), ["stop"])
14543
14543
  }, null, 8, ["title"])
@@ -14545,8 +14545,8 @@ var F_ = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
14545
14545
  default: B(() => [e.submitted ? (P(), Z("div", V_, [H("div", H_, [F(i, {
14546
14546
  name: "ri:check-line",
14547
14547
  class: "text-16 text-success"
14548
- }), H("div", null, [H("strong", U_, N(T(n)("message.feedbackSubmittedTitle")), 1), H("p", W_, N(T(n)("message.feedbackSubmittedMessage")), 1)])])])) : (P(), Z("div", R_, [F(T(s), {
14549
- modelValue: T(l),
14548
+ }), H("div", null, [H("strong", U_, N(E(n)("message.feedbackSubmittedTitle")), 1), H("p", W_, N(E(n)("message.feedbackSubmittedMessage")), 1)])])])) : (P(), Z("div", R_, [F(E(s), {
14549
+ modelValue: E(l),
14550
14550
  "onUpdate:modelValue": r[2] ||= (e) => Ce(l) ? l.value = e : null,
14551
14551
  onSubmit: u
14552
14552
  }, {
@@ -14555,12 +14555,12 @@ var F_ = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
14555
14555
  modifiers: "danger",
14556
14556
  class: "mb-sm",
14557
14557
  content: e.error
14558
- }, null, 8, ["content"])) : q("", !0), F(T(c), {
14558
+ }, null, 8, ["content"])) : q("", !0), F(E(c), {
14559
14559
  name: "comment",
14560
14560
  type: "textarea",
14561
14561
  rows: "3",
14562
- label: T(n)("label.comment"),
14563
- placeholder: T(n)("placeholder.comment"),
14562
+ label: E(n)("label.comment"),
14563
+ placeholder: E(n)("placeholder.comment"),
14564
14564
  modifiers: "compact no-label",
14565
14565
  class: "mb-0"
14566
14566
  }, null, 8, ["label", "placeholder"])]), H("div", B_, [F(d, null, {
@@ -14569,7 +14569,7 @@ var F_ = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
14569
14569
  modifiers: "action-quiet",
14570
14570
  icon: "ri:close-line",
14571
14571
  "icon-position": "right",
14572
- label: T(n)("action.close"),
14572
+ label: E(n)("action.close"),
14573
14573
  onClick: r[1] ||= (e) => t.$emit("close")
14574
14574
  }, null, 8, ["label"]), F(a, {
14575
14575
  type: "submit",
@@ -14578,7 +14578,7 @@ var F_ = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
14578
14578
  "icon-position": "right",
14579
14579
  loading: e.loading,
14580
14580
  disabled: e.loading,
14581
- label: T(n)("action.submit")
14581
+ label: E(n)("action.submit")
14582
14582
  }, null, 8, [
14583
14583
  "loading",
14584
14584
  "disabled",
@@ -14676,7 +14676,7 @@ var X_ = { class: "pk-chatbot-audio" }, Z_ = ["src"], Q_ = {
14676
14676
  }, null, 8, Z_), e.pending && !e.transcript ? (P(), Z("div", Q_, [H("div", $_, [F(c, {
14677
14677
  name: "loading-loop",
14678
14678
  class: "shrink-0"
14679
- }), H("span", ev, N(T(n)("messagePart.audioTranscribing")), 1)])])) : i.value ? (P(), Z("div", tv, [H("button", {
14679
+ }), H("span", ev, N(E(n)("messagePart.audioTranscribing")), 1)])])) : i.value ? (P(), Z("div", tv, [H("button", {
14680
14680
  type: "button",
14681
14681
  class: "pk-chatbot-audio__header pk-chatbot-audio__header--toggle",
14682
14682
  "aria-expanded": r.value,
@@ -14686,7 +14686,7 @@ var X_ = { class: "pk-chatbot-audio" }, Z_ = ["src"], Q_ = {
14686
14686
  name: "ri:file-text-line",
14687
14687
  class: "shrink-0"
14688
14688
  }),
14689
- H("span", rv, N(T(n)("messagePart.audioTranscript")), 1),
14689
+ H("span", rv, N(E(n)("messagePart.audioTranscript")), 1),
14690
14690
  a.value ? (P(), Z("span", iv, N(a.value), 1)) : q("", !0),
14691
14691
  F(c, {
14692
14692
  name: r.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
@@ -14742,7 +14742,7 @@ var lv = ["datetime"], uv = 6e4, dv = /* @__PURE__ */ J({
14742
14742
  }, h = () => {
14743
14743
  r.value = Date.now(), t.autoUpdate && !t.endDate && (i = setTimeout(h, m()));
14744
14744
  };
14745
- return k(() => {
14745
+ return re(() => {
14746
14746
  t.autoUpdate && !t.endDate && (i = setTimeout(h, m()));
14747
14747
  }), j(() => {
14748
14748
  i && clearTimeout(i);
@@ -14752,26 +14752,26 @@ var lv = ["datetime"], uv = 6e4, dv = /* @__PURE__ */ J({
14752
14752
  // ../../packages/components/src/chat/toolComponentMap.ts
14753
14753
  G();
14754
14754
  var fv = {
14755
- requestOAuthConnection: w(() => import("./_chunks/PkToolRequestOAuthConnection-DfjwyGwk.js")),
14756
- shareDocument: w(() => import("./_chunks/PkToolShareDocument-BE02IEEO.js")),
14757
- showArtifact: w(() => import("./_chunks/PkToolShowArtifact-B8l3G0ae.js")),
14758
- showCalendarEvent: w(() => import("./_chunks/PkToolShowCalendarEvent-DADlIzhY.js")),
14759
- showComparison: w(() => import("./_chunks/PkToolShowComparison-BuaD4RhV.js")),
14760
- showContactForm: w(() => import("./_chunks/PkToolShowContactForm-wNiHeOQM.js")),
14761
- showDiagram: w(() => import("./_chunks/PkToolShowDiagram-fTIiANVA.js")),
14762
- showEmail: w(() => import("./_chunks/PkToolShowEmail-e95g25Ih.js")),
14763
- showImageGallery: w(() => import("./_chunks/PkToolShowImageGallery-B9PlDrmn.js")),
14764
- showLocation: w(() => import("./_chunks/PkToolShowLocation-B1ltUJ-K.js")),
14765
- showMessage: w(() => import("./_chunks/PkToolShowMessage-BuuKuXDq.js")),
14766
- showForm: w(() => import("./_chunks/PkToolShowForm-jA0SkiQC.js")),
14767
- showMultipleChoice: w(() => import("./_chunks/PkToolShowForm-jA0SkiQC.js")),
14768
- showProductList: w(() => import("./_chunks/PkToolShowProductList-DRHSe2e7.js")),
14769
- showQrCode: w(() => import("./_chunks/PkToolShowQrCode-CtDI_uu7.js")),
14770
- showSources: w(() => import("./_chunks/PkToolShowSources-K-cNd52t.js")),
14771
- showSuggestedReply: w(() => import("./_chunks/PkToolShowSuggestedReply-BQHtnpb_.js")),
14772
- showVideo: w(() => import("./_chunks/PkToolShowVideo-B21JnsbY.js")),
14773
- showWeather: w(() => import("./_chunks/PkToolShowWeather-DT_TsutU.js")),
14774
- showWebPages: w(() => import("./_chunks/PkToolShowWebPages-CW1Kdg6J.js"))
14755
+ requestOAuthConnection: T(() => import("./_chunks/PkToolRequestOAuthConnection-DfjwyGwk.js")),
14756
+ shareDocument: T(() => import("./_chunks/PkToolShareDocument-BE02IEEO.js")),
14757
+ showArtifact: T(() => import("./_chunks/PkToolShowArtifact-B8l3G0ae.js")),
14758
+ showCalendarEvent: T(() => import("./_chunks/PkToolShowCalendarEvent-DADlIzhY.js")),
14759
+ showComparison: T(() => import("./_chunks/PkToolShowComparison-BuaD4RhV.js")),
14760
+ showContactForm: T(() => import("./_chunks/PkToolShowContactForm-wNiHeOQM.js")),
14761
+ showDiagram: T(() => import("./_chunks/PkToolShowDiagram-fTIiANVA.js")),
14762
+ showEmail: T(() => import("./_chunks/PkToolShowEmail-e95g25Ih.js")),
14763
+ showImageGallery: T(() => import("./_chunks/PkToolShowImageGallery-B9PlDrmn.js")),
14764
+ showLocation: T(() => import("./_chunks/PkToolShowLocation-B1ltUJ-K.js")),
14765
+ showMessage: T(() => import("./_chunks/PkToolShowMessage-BuuKuXDq.js")),
14766
+ showForm: T(() => import("./_chunks/PkToolShowForm-jA0SkiQC.js")),
14767
+ showMultipleChoice: T(() => import("./_chunks/PkToolShowForm-jA0SkiQC.js")),
14768
+ showProductList: T(() => import("./_chunks/PkToolShowProductList-DRHSe2e7.js")),
14769
+ showQrCode: T(() => import("./_chunks/PkToolShowQrCode-CtDI_uu7.js")),
14770
+ showSources: T(() => import("./_chunks/PkToolShowSources-K-cNd52t.js")),
14771
+ showSuggestedReply: T(() => import("./_chunks/PkToolShowSuggestedReply-BQHtnpb_.js")),
14772
+ showVideo: T(() => import("./_chunks/PkToolShowVideo-B21JnsbY.js")),
14773
+ showWeather: T(() => import("./_chunks/PkToolShowWeather-DT_TsutU.js")),
14774
+ showWebPages: T(() => import("./_chunks/PkToolShowWebPages-CW1Kdg6J.js"))
14775
14775
  };
14776
14776
  // ../../packages/components/src/chat/PkToolApprovalPreviewMessage.vue?vue&type=script&setup=true&lang.ts
14777
14777
  G(), Y();
@@ -14844,13 +14844,13 @@ var gv = {
14844
14844
  modifiers: "primary-small",
14845
14845
  disabled: !u.value,
14846
14846
  icon: "ri:check-line",
14847
- label: T(i)("action.proceed"),
14847
+ label: E(i)("action.proceed"),
14848
14848
  onClick: n[0] ||= ve((e) => r("respond", !0), ["stop"])
14849
14849
  }, null, 8, ["disabled", "label"]), F(a, {
14850
14850
  modifiers: "action-quiet-small",
14851
14851
  disabled: !u.value,
14852
14852
  icon: "ri:close-line",
14853
- label: T(i)("action.cancel"),
14853
+ label: E(i)("action.cancel"),
14854
14854
  onClick: n[1] ||= ve((e) => r("respond", !1), ["stop"])
14855
14855
  }, null, 8, ["disabled", "label"])]),
14856
14856
  _: 1
@@ -14882,7 +14882,7 @@ var vv = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl b
14882
14882
  let i = Tn, a = gn;
14883
14883
  return P(), Z("div", vv, [
14884
14884
  H("p", yv, N(e.question), 1),
14885
- e.details?.length ? (P(), Z("dl", bv, [(P(!0), Z(V, null, C(e.details, (e, t) => (P(), Z(V, { key: t }, [e.label ? (P(), Z("dt", xv, N(e.label), 1)) : q("", !0), H("dd", { class: de(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, N(e.value), 3)], 64))), 128))])) : q("", !0),
14885
+ e.details?.length ? (P(), Z("dl", bv, [(P(!0), Z(V, null, w(e.details, (e, t) => (P(), Z(V, { key: t }, [e.label ? (P(), Z("dt", xv, N(e.label), 1)) : q("", !0), H("dd", { class: de(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, N(e.value), 3)], 64))), 128))])) : q("", !0),
14886
14886
  F(a, null, {
14887
14887
  default: B(() => [F(i, {
14888
14888
  modifiers: "primary-small",
@@ -15004,7 +15004,7 @@ var Tv = {
15004
15004
  name: l.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
15005
15005
  class: "shrink-0"
15006
15006
  }, null, 8, ["name"])
15007
- ], 8, Ev), l.value && o.value ? (P(), Z("ul", kv, [(P(!0), Z(V, null, C(o.value, (e) => (P(), Z("li", { key: e.key }, [(P(), L(fe(e.full ? "button" : "div"), {
15007
+ ], 8, Ev), l.value && o.value ? (P(), Z("ul", kv, [(P(!0), Z(V, null, w(o.value, (e) => (P(), Z("li", { key: e.key }, [(P(), L(fe(e.full ? "button" : "div"), {
15008
15008
  type: e.full ? "button" : void 0,
15009
15009
  class: "pk-chatbot-step-payload__row",
15010
15010
  "aria-expanded": e.full ? u.has(e.key) : void 0,
@@ -15213,21 +15213,21 @@ var Iv = { class: "pk-chatbot-step-detail" }, Lv = {
15213
15213
  return (e, t) => {
15214
15214
  let r = Cn;
15215
15215
  return P(), Z("div", Iv, [
15216
- b.value.chips?.length ? (P(), Z("ul", Lv, [(P(!0), Z(V, null, C(b.value.chips, (e, t) => (P(), Z("li", {
15216
+ b.value.chips?.length ? (P(), Z("ul", Lv, [(P(!0), Z(V, null, w(b.value.chips, (e, t) => (P(), Z("li", {
15217
15217
  key: `${t}-${e}`,
15218
15218
  class: "pk-chatbot-step-detail__chip"
15219
15219
  }, [F(r, {
15220
15220
  name: "ri:search-line",
15221
15221
  class: "shrink-0"
15222
15222
  }), H("span", Rv, N(e), 1)]))), 128))])) : q("", !0),
15223
- (P(!0), Z(V, null, C(b.value.facts, (e, t) => (P(), Z("div", {
15223
+ (P(!0), Z(V, null, w(b.value.facts, (e, t) => (P(), Z("div", {
15224
15224
  key: `${t}-${e.text}`,
15225
15225
  class: "pk-chatbot-step-detail__fact"
15226
15226
  }, [F(r, {
15227
15227
  name: e.icon,
15228
15228
  class: "shrink-0"
15229
15229
  }, null, 8, ["name"]), H("span", null, N(e.text), 1)]))), 128)),
15230
- b.value.showEmpty ? (P(), Z("div", zv, N(T(n)("messagePart.stepNoResults")), 1)) : b.value.hits?.length ? (P(), Z("ul", Bv, [(P(!0), Z(V, null, C(b.value.hits, (e) => (P(), Z("li", { key: e.key }, [(P(), L(fe(e.body ? "button" : "div"), {
15230
+ b.value.showEmpty ? (P(), Z("div", zv, N(E(n)("messagePart.stepNoResults")), 1)) : b.value.hits?.length ? (P(), Z("ul", Bv, [(P(!0), Z(V, null, w(b.value.hits, (e) => (P(), Z("li", { key: e.key }, [(P(), L(fe(e.body ? "button" : "div"), {
15231
15231
  type: e.body ? "button" : void 0,
15232
15232
  class: "pk-chatbot-step-detail__hit-header",
15233
15233
  "aria-expanded": e.body ? x.has(e.key) : void 0,
@@ -15249,7 +15249,7 @@ var Iv = { class: "pk-chatbot-step-detail" }, Lv = {
15249
15249
  e.meta ? (P(), Z("span", Wv, N(e.meta), 1)) : q("", !0),
15250
15250
  e.relevance === void 0 ? q("", !0) : (P(), Z("span", Gv, [H("span", {
15251
15251
  class: "pk-chatbot-step-detail__relevance-fill",
15252
- style: ne({ width: `${Math.round(e.relevance * 100)}%` })
15252
+ style: te({ width: `${Math.round(e.relevance * 100)}%` })
15253
15253
  }, null, 4)])),
15254
15254
  e.body ? (P(), L(r, {
15255
15255
  key: 2,
@@ -15268,17 +15268,17 @@ var Iv = { class: "pk-chatbot-step-detail" }, Lv = {
15268
15268
  name: "ri:file-text-line",
15269
15269
  class: "shrink-0"
15270
15270
  }),
15271
- H("span", Yv, [H("span", Xv, N(b.value.passage.title ?? T(n)("messagePart.stepDocument")), 1)]),
15271
+ H("span", Yv, [H("span", Xv, N(b.value.passage.title ?? E(n)("messagePart.stepDocument")), 1)]),
15272
15272
  b.value.passage.meta ? (P(), Z("span", Zv, N(b.value.passage.meta), 1)) : q("", !0)
15273
15273
  ]), H("div", Qv, N(b.value.passage.content), 1)])) : q("", !0),
15274
- T(st)(b.value.rawInput) ? (P(), L(Fv, {
15274
+ E(st)(b.value.rawInput) ? (P(), L(Fv, {
15275
15275
  key: 4,
15276
- label: T(n)("messagePart.stepInput"),
15276
+ label: E(n)("messagePart.stepInput"),
15277
15277
  value: b.value.rawInput
15278
15278
  }, null, 8, ["label", "value"])) : q("", !0),
15279
- T(st)(b.value.rawOutput) ? (P(), L(Fv, {
15279
+ E(st)(b.value.rawOutput) ? (P(), L(Fv, {
15280
15280
  key: 5,
15281
- label: T(n)("messagePart.stepOutput"),
15281
+ label: E(n)("messagePart.stepOutput"),
15282
15282
  value: b.value.rawOutput
15283
15283
  }, null, 8, ["label", "value"])) : q("", !0)
15284
15284
  ]);
@@ -15314,7 +15314,7 @@ var ey = {
15314
15314
  isDark: { type: Boolean }
15315
15315
  },
15316
15316
  setup(e) {
15317
- let t = e, { t: n, n: r } = Le({ useScope: "global" }), i = te(bt, void 0), a = (e) => dt(e) === "output-error" && "errorText" in e && typeof e.errorText == "string" ? e.errorText : void 0, o = U(() => {
15317
+ let t = e, { t: n, n: r } = Le({ useScope: "global" }), i = ee(bt, void 0), a = (e) => dt(e) === "output-error" && "errorText" in e && typeof e.errorText == "string" ? e.errorText : void 0, o = U(() => {
15318
15318
  let e = t.message.parts, r = t.message.metadata?.partTimings, o = [];
15319
15319
  for (let [s, c] of e.entries()) {
15320
15320
  let l = Dt(c), u = yt(c), d = it(c) || !!u;
@@ -15360,13 +15360,13 @@ var ey = {
15360
15360
  name: "ri:route-line",
15361
15361
  class: "shrink-0"
15362
15362
  })),
15363
- H("span", ny, N(T(n)("messagePart.steps")), 1),
15364
- H("span", ry, [Ne(N(T(n)("messagePart.stepCount", o.value.length)) + " ", 1), c(s.value) ? (P(), Z(V, { key: 0 }, [Ne(" · " + N(c(s.value)), 1)], 64)) : q("", !0)]),
15363
+ H("span", ny, N(E(n)("messagePart.steps")), 1),
15364
+ H("span", ry, [Ne(N(E(n)("messagePart.stepCount", o.value.length)) + " ", 1), c(s.value) ? (P(), Z(V, { key: 0 }, [Ne(" · " + N(c(s.value)), 1)], 64)) : q("", !0)]),
15365
15365
  F(i, {
15366
15366
  name: p.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
15367
15367
  class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
15368
15368
  }, null, 8, ["name"])
15369
- ], 8, ty), p.value ? (P(), Z("ol", iy, [(P(!0), Z(V, null, C(o.value, (t) => (P(), Z("li", {
15369
+ ], 8, ty), p.value ? (P(), Z("ol", iy, [(P(!0), Z(V, null, w(o.value, (t) => (P(), Z("li", {
15370
15370
  key: t.key,
15371
15371
  class: de(["pk-chatbot-steps__step", { "pk-chatbot-steps__step--active": t.isActive }])
15372
15372
  }, [(P(), L(fe(t.hasBody ? "button" : "div"), {
@@ -15401,7 +15401,7 @@ var ey = {
15401
15401
  key: 0,
15402
15402
  markdown: t.text,
15403
15403
  "is-dark": e.isDark,
15404
- "tail-length": T(ft),
15404
+ "tail-length": E(ft),
15405
15405
  "inner-class": "wysiwyg",
15406
15406
  class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll"
15407
15407
  }, null, 8, [
@@ -15412,16 +15412,16 @@ var ey = {
15412
15412
  markdown: t.text,
15413
15413
  "is-dark": e.isDark,
15414
15414
  class: "wysiwyg"
15415
- }, null, 8, ["markdown", "is-dark"])])) : t.error ? (P(), Z("div", uy, [H("span", dy, N(T(n)("messagePart.stepError")), 1), H("pre", null, N(t.error), 1)])) : t.hasRichDetail ? (P(), L($v, {
15415
+ }, null, 8, ["markdown", "is-dark"])])) : t.error ? (P(), Z("div", uy, [H("span", dy, N(E(n)("messagePart.stepError")), 1), H("pre", null, N(t.error), 1)])) : t.hasRichDetail ? (P(), L($v, {
15416
15416
  key: 3,
15417
15417
  part: t.part
15418
- }, null, 8, ["part"])) : (P(), Z(V, { key: 4 }, [T(st)(t.toolInput) ? (P(), L(Fv, {
15418
+ }, null, 8, ["part"])) : (P(), Z(V, { key: 4 }, [E(st)(t.toolInput) ? (P(), L(Fv, {
15419
15419
  key: 0,
15420
- label: T(n)("messagePart.stepInput"),
15420
+ label: E(n)("messagePart.stepInput"),
15421
15421
  value: t.toolInput
15422
- }, null, 8, ["label", "value"])) : q("", !0), T(st)(t.toolOutput) ? (P(), L(Fv, {
15422
+ }, null, 8, ["label", "value"])) : q("", !0), E(st)(t.toolOutput) ? (P(), L(Fv, {
15423
15423
  key: 1,
15424
- label: T(n)("messagePart.stepOutput"),
15424
+ label: E(n)("messagePart.stepOutput"),
15425
15425
  value: t.toolOutput
15426
15426
  }, null, 8, ["label", "value"])) : q("", !0)], 64))])) : q("", !0)], 2))), 128))])) : q("", !0)])) : q("", !0);
15427
15427
  };
@@ -15443,11 +15443,11 @@ var py = ["aria-label"], my = {
15443
15443
  let n = e, r = t, { t: i } = Le({ useScope: "global" }), a = U(() => n.items.length > 14);
15444
15444
  return (t, n) => (P(), Z("nav", {
15445
15445
  class: de(["pk-chatbot-outline", { "pk-chatbot-outline--dense": a.value }]),
15446
- "aria-label": T(i)("label.conversationOutline")
15447
- }, [H("div", my, [(P(!0), Z(V, null, C(e.items, (t) => (P(), Z("span", {
15446
+ "aria-label": E(i)("label.conversationOutline")
15447
+ }, [H("div", my, [(P(!0), Z(V, null, w(e.items, (t) => (P(), Z("span", {
15448
15448
  key: t.id,
15449
15449
  class: de(["pk-chatbot-outline__bar", { "pk-chatbot-outline__bar--active": t.id === e.activeId }])
15450
- }, null, 2))), 128))]), H("div", hy, [(P(!0), Z(V, null, C(e.items, (t) => (P(), Z("button", {
15450
+ }, null, 2))), 128))]), H("div", hy, [(P(!0), Z(V, null, w(e.items, (t) => (P(), Z("button", {
15451
15451
  key: t.id,
15452
15452
  type: "button",
15453
15453
  class: de(["pk-chatbot-outline__item", { "pk-chatbot-outline__item--active": t.id === e.activeId }]),
@@ -15478,26 +15478,26 @@ function by(e) {
15478
15478
  if (!t.value) return;
15479
15479
  let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
15480
15480
  u.value = n - r - e < vy, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
15481
- }, ee = () => {
15481
+ }, C = () => {
15482
15482
  if (d || l.value || !t.value) return;
15483
15483
  let e = t.value, n = e.scrollHeight - e.clientHeight;
15484
15484
  n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
15485
15485
  d = !1;
15486
15486
  }));
15487
- }, te = () => {
15488
- !f && t.value && (f = new MutationObserver(ee), f.observe(t.value, {
15487
+ }, ee = () => {
15488
+ !f && t.value && (f = new MutationObserver(C), f.observe(t.value, {
15489
15489
  childList: !0,
15490
15490
  subtree: !0,
15491
15491
  characterData: !0
15492
15492
  }));
15493
- }, C = () => {
15493
+ }, w = () => {
15494
15494
  f?.disconnect(), f = null;
15495
15495
  };
15496
15496
  I(n, (e, t) => {
15497
- e === "streaming" || e === "submitted" ? te() : (e !== "ready" || t !== "streaming") && C();
15497
+ e === "streaming" || e === "submitted" ? ee() : (e !== "ready" || t !== "streaming") && w();
15498
15498
  }), I(r, async () => {
15499
15499
  if (r() && i() !== "assistant") {
15500
- E(), l.value = !1, d = !0;
15500
+ D(), l.value = !1, d = !0;
15501
15501
  try {
15502
15502
  await se(), await o?.(), await se();
15503
15503
  } finally {
@@ -15505,23 +15505,23 @@ function by(e) {
15505
15505
  }
15506
15506
  }
15507
15507
  });
15508
- let w = null, T = () => {
15509
- t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, w && clearTimeout(w), w = setTimeout(E, 300)));
15510
- }, E = () => {
15511
- p?.disconnect(), p = null, m?.disconnect(), m = null, w &&= (clearTimeout(w), null);
15508
+ let T = null, E = () => {
15509
+ t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, T && clearTimeout(T), T = setTimeout(D, 300)));
15510
+ }, D = () => {
15511
+ p?.disconnect(), p = null, m?.disconnect(), m = null, T &&= (clearTimeout(T), null);
15512
15512
  };
15513
- return k(() => {
15513
+ return re(() => {
15514
15514
  if (!t.value) return;
15515
15515
  t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", x, { passive: !0 });
15516
15516
  let e = n() === "submitted" || n() === "streaming";
15517
- e ? te() : (p = new ResizeObserver(T), p.observe(t.value), m = new MutationObserver(T), m.observe(t.value, {
15517
+ e ? ee() : (p = new ResizeObserver(E), p.observe(t.value), m = new MutationObserver(E), m.observe(t.value, {
15518
15518
  childList: !0,
15519
15519
  subtree: !0
15520
15520
  }));
15521
15521
  let r = a?.() ?? t.value.firstElementChild;
15522
- r && (h = new ResizeObserver(ee), h.observe(r)), e || T();
15523
- }), re(() => {
15524
- t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null, C(), E();
15522
+ r && (h = new ResizeObserver(C), h.observe(r)), e || E();
15523
+ }), ne(() => {
15524
+ t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null, w(), D();
15525
15525
  }), {
15526
15526
  handleScroll: S,
15527
15527
  scrollToBottom: _,
@@ -15635,7 +15635,7 @@ var Sy = ["aria-busy"], Cy = {
15635
15635
  "host-confirm-respond"
15636
15636
  ],
15637
15637
  setup(e, { emit: t }) {
15638
- let n = e, r = t, { t: i, te: a, d: o, n: s } = Le({ useScope: "global" }), c = te(bt, void 0), l = A(), u = (e, t) => {
15638
+ let n = e, r = t, { t: i, te: a, d: o, n: s } = Le({ useScope: "global" }), c = ee(bt, void 0), l = A(), u = (e, t) => {
15639
15639
  if (Ke(e)) {
15640
15640
  let n = e.toolCallId;
15641
15641
  n && r("confirm-respond", {
@@ -15674,33 +15674,33 @@ var Sy = ["aria-busy"], Cy = {
15674
15674
  I(y, async () => {
15675
15675
  await se(), S();
15676
15676
  });
15677
- let ee = () => {
15677
+ let C = () => {
15678
15678
  m(), S();
15679
- }, w = (e) => {
15679
+ }, T = (e) => {
15680
15680
  let t = d.value, n = y.value.findIndex((t) => t.id === e), r = x()[n];
15681
15681
  t && r && (g.value = !0, t.scrollTo({
15682
15682
  top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
15683
15683
  behavior: "smooth"
15684
15684
  }));
15685
- }, E = U(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), D = W(0), O = W(!1), re = !1, ie = he(), j = () => n.messages?.[n.messages.length - 1]?.role === "user" || E.value, ae = () => {
15686
- re = !1, O.value = !0, D.value = 0;
15685
+ }, D = U(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), O = W(0), k = W(!1), ne = !1, ie = he(), j = () => n.messages?.[n.messages.length - 1]?.role === "user" || D.value, ae = () => {
15686
+ ne = !1, k.value = !0, O.value = 0;
15687
15687
  }, M = async () => {
15688
15688
  if (!n.messages?.length || n.disableHeightAdjustment) return;
15689
15689
  if (!j()) {
15690
- re && (await se(), d.value?.scrollHeight, j() || ae());
15690
+ ne && (await se(), d.value?.scrollHeight, j() || ae());
15691
15691
  return;
15692
15692
  }
15693
- if (re = !0, O.value = !1, await se(), !d.value) return;
15693
+ if (ne = !0, k.value = !1, await se(), !d.value) return;
15694
15694
  let { paddingTop: e, paddingBottom: t } = getComputedStyle(d.value), r = d.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = f.value && Number.parseFloat(getComputedStyle(f.value).rowGap) || 0, a = x();
15695
15695
  ie.value = a[a.length - 1];
15696
15696
  let o = r - (ie.value?.clientHeight ?? 0) - i;
15697
- r > 0 && (D.value = Math.max(o, 0)), await se();
15697
+ r > 0 && (O.value = Math.max(o, 0)), await se();
15698
15698
  };
15699
15699
  I([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => M()), un([d, ie], () => {
15700
- re && M();
15701
- }), k(() => {
15702
- (E.value || n.awaitingSpokenAnswer) && M();
15703
- }), I(E, (e) => {
15700
+ ne && M();
15701
+ }), re(() => {
15702
+ (D.value || n.awaitingSpokenAnswer) && M();
15703
+ }), I(D, (e) => {
15704
15704
  e || ae();
15705
15705
  });
15706
15706
  let ce = (e) => n.revisedAnswers?.some((t) => t.messageId === e), le = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), ue = /* @__PURE__ */ new Set(["showContactForm"]), R = (e) => !n.interactive && ue.has(Ye(e)) ? { record: !0 } : {}, ge = (e, t) => !n.readonlyFeedback && Pe(e, t), z = (e) => n.readonlyFeedback ? le(e) : void 0, _e = (e) => z(e)?.vote, ye = (e) => {
@@ -15726,7 +15726,7 @@ var Sy = ["aria-busy"], Cy = {
15726
15726
  let e = /* @__PURE__ */ new Map();
15727
15727
  for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, mt(xt($e(t.parts))));
15728
15728
  return e;
15729
- }), Ee = (e) => Te.value.get(e.id) ?? e.parts, De = U(() => n.status === "error"), Oe = U(() => n.awaitingSpokenAnswer === !0 && !E.value), ke = U(() => Oe.value && Ce.value?.role === "user" && !De.value), Ae = (e, t) => t(), je = U(() => {
15729
+ }), Ee = (e) => Te.value.get(e.id) ?? e.parts, De = U(() => n.status === "error"), Oe = U(() => n.awaitingSpokenAnswer === !0 && !D.value), ke = U(() => Oe.value && Ce.value?.role === "user" && !De.value), Ae = (e, t) => t(), je = U(() => {
15730
15730
  let e = we.value;
15731
15731
  return Ct(i, e, c?.value);
15732
15732
  }), Me = U(() => {
@@ -15735,7 +15735,7 @@ var Sy = ["aria-busy"], Cy = {
15735
15735
  }), J = (e) => n.messages?.findIndex((t) => t.id === e), Y = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, X = (e) => Y(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), Pe = (e, t) => (!Y(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), Fe = (e) => {
15736
15736
  let t = e.parts[e.parts.length - 1];
15737
15737
  return Ue(t);
15738
- }, Ie = (e) => e.parts.some((e) => Dt(e) || it(e) || !!yt(e)), Re = (e) => !!n.showExtendedSteps && Ze(e) && Ie(e), ze = (e) => n.hostConfirmation !== void 0 && yt(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, Be = (e, t) => E.value && Y(e) && yt(t)?.state === "input-available", Ve = (e, t, n, r) => {
15738
+ }, Ie = (e) => e.parts.some((e) => Dt(e) || it(e) || !!yt(e)), Re = (e) => !!n.showExtendedSteps && Ze(e) && Ie(e), ze = (e) => n.hostConfirmation !== void 0 && yt(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, Be = (e, t) => D.value && Y(e) && yt(t)?.state === "input-available", Ve = (e, t, n, r) => {
15739
15739
  if (!yt(n) || Re(e)) return !1;
15740
15740
  let i = Be(t, n);
15741
15741
  return i && r === Ee(e).length - 1 ? !1 : i || wt(n) || !Xe(e);
@@ -15770,49 +15770,49 @@ var Sy = ["aria-busy"], Cy = {
15770
15770
  ref_key: "scrollEl",
15771
15771
  ref: d,
15772
15772
  class: de(["pk-chatbot-messages scrollbar-thin", {
15773
- "pk-chatbot-messages--settling": O.value,
15773
+ "pk-chatbot-messages--settling": k.value,
15774
15774
  "pk-chatbot-messages--parent-scrolls": e.parentScrolls
15775
15775
  }]),
15776
15776
  role: "log",
15777
15777
  "aria-live": "polite",
15778
15778
  "aria-relevant": "additions text",
15779
- "aria-busy": E.value,
15780
- style: ne({
15779
+ "aria-busy": D.value,
15780
+ style: te({
15781
15781
  "--chatbot-main-color": e.mainColor,
15782
15782
  "--chatbot-contrast-color": p.value
15783
15783
  }),
15784
- onScroll: ee
15784
+ onScroll: C
15785
15785
  }, [
15786
15786
  e.showScrollToBottom && y.value.length > 1 ? (P(), Z("div", Cy, [F(_y, {
15787
15787
  items: y.value,
15788
15788
  "active-id": b.value,
15789
- onSelect: w
15789
+ onSelect: T
15790
15790
  }, null, 8, ["items", "active-id"])])) : q("", !0),
15791
15791
  H("div", {
15792
15792
  ref_key: "wrapperEl",
15793
15793
  ref: f,
15794
15794
  class: "pk-chatbot-messages__wrapper"
15795
15795
  }, [
15796
- (P(!0), Z(V, null, C(e.messages, (d, f) => (P(), Z(V, { key: d.id }, [
15797
- nt(d) && pt(f) ? (P(), Z("div", wy, [H("span", Ty, N(T(o)(pt(f), "short")), 1)])) : q("", !0),
15796
+ (P(!0), Z(V, null, w(e.messages, (d, f) => (P(), Z(V, { key: d.id }, [
15797
+ nt(d) && pt(f) ? (P(), Z("div", wy, [H("span", Ty, N(E(o)(pt(f), "short")), 1)])) : q("", !0),
15798
15798
  ht.value.quietRuns.has(d.id) ? (P(), Z("div", Ey, [F(m, {
15799
15799
  name: "ri:alarm-line",
15800
15800
  class: "shrink-0"
15801
- }), H("span", null, N(T(i)("label.wakeupQuietRun", {
15801
+ }), H("span", null, N(E(i)("label.wakeupQuietRun", {
15802
15802
  count: ht.value.quietRuns.get(d.id).count,
15803
- time: T(o)(ht.value.quietRuns.get(d.id).lastAt ?? Date.now(), "time")
15804
- }, ht.value.quietRuns.get(d.id).count)), 1)])) : T(li)(d) && !ht.value.hidden.has(d.id) && !e.showAllMessageParts ? (P(), Z("div", {
15803
+ time: E(o)(ht.value.quietRuns.get(d.id).lastAt ?? Date.now(), "time")
15804
+ }, ht.value.quietRuns.get(d.id).count)), 1)])) : E(li)(d) && !ht.value.hidden.has(d.id) && !e.showAllMessageParts ? (P(), Z("div", {
15805
15805
  key: 2,
15806
15806
  class: "pk-chatbot-wakeup",
15807
15807
  title: d.metadata?.wakeup?.reason
15808
15808
  }, [F(m, {
15809
15809
  name: "ri:alarm-line",
15810
15810
  class: "shrink-0"
15811
- }), H("span", null, [Ne(N(T(i)("label.wakeupCheck")) + " ", 1), d.metadata?.createdAt ? (P(), Z(V, { key: 0 }, [Ne(" · " + N(T(o)(d.metadata.createdAt, "time")), 1)], 64)) : q("", !0)])], 8, Dy)) : q("", !0),
15812
- (!T(li)(d) || e.showAllMessageParts) && (!ht.value.hidden.has(d.id) || E.value && Y(f)) && (d.parts.length || Y(f) && E.value && Ze(d)) ? (P(), Z("div", {
15811
+ }), H("span", null, [Ne(N(E(i)("label.wakeupCheck")) + " ", 1), d.metadata?.createdAt ? (P(), Z(V, { key: 0 }, [Ne(" · " + N(E(o)(d.metadata.createdAt, "time")), 1)], 64)) : q("", !0)])], 8, Dy)) : q("", !0),
15812
+ (!E(li)(d) || e.showAllMessageParts) && (!ht.value.hidden.has(d.id) || D.value && Y(f)) && (d.parts.length || Y(f) && D.value && Ze(d)) ? (P(), Z("div", {
15813
15813
  key: 3,
15814
- class: de(["pk-chatbot-message", [`pk-chatbot-message--${d.role}`, { "pk-chatbot-message--loading": E.value && Y(f) && Ze(d) }]]),
15815
- style: ne({ minHeight: Y(f) && Ze(d) && !De.value ? `${D.value}px` : void 0 })
15814
+ class: de(["pk-chatbot-message", [`pk-chatbot-message--${d.role}`, { "pk-chatbot-message--loading": D.value && Y(f) && Ze(d) }]]),
15815
+ style: te({ minHeight: Y(f) && Ze(d) && !De.value ? `${O.value}px` : void 0 })
15816
15816
  }, [
15817
15817
  F(K, {
15818
15818
  appear: "",
@@ -15821,7 +15821,7 @@ var Sy = ["aria-busy"], Cy = {
15821
15821
  default: B(() => [Re(d) ? (P(), L(fy, {
15822
15822
  key: 0,
15823
15823
  message: d,
15824
- "is-streaming": E.value && Y(f),
15824
+ "is-streaming": D.value && Y(f),
15825
15825
  "has-content": Je(d),
15826
15826
  "is-dark": e.isDark
15827
15827
  }, null, 8, [
@@ -15832,7 +15832,7 @@ var Sy = ["aria-busy"], Cy = {
15832
15832
  ])) : q("", !0)]),
15833
15833
  _: 2
15834
15834
  }, 1024),
15835
- (P(!0), Z(V, null, C(Ee(d), (o, s) => (P(), Z(V, { key: T(ct)(o, s) }, [T(Ue)(o) && o.text.trim() ? (P(), L(K, {
15835
+ (P(!0), Z(V, null, w(Ee(d), (o, s) => (P(), Z(V, { key: E(ct)(o, s) }, [E(Ue)(o) && o.text.trim() ? (P(), L(K, {
15836
15836
  key: 0,
15837
15837
  appear: "",
15838
15838
  name: "pk-chatbot-part"
@@ -15841,7 +15841,7 @@ var Sy = ["aria-busy"], Cy = {
15841
15841
  message: d,
15842
15842
  part: o,
15843
15843
  index: f,
15844
- isLoading: E.value
15844
+ isLoading: D.value
15845
15845
  }), () => [Ze(d) ? (P(), L(St, {
15846
15846
  key: 0,
15847
15847
  class: "wysiwyg",
@@ -15861,16 +15861,16 @@ var Sy = ["aria-busy"], Cy = {
15861
15861
  name: _e(d.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
15862
15862
  }, null, 8, ["name"]))], 10, ky)) : q("", !0)])]),
15863
15863
  _: 2
15864
- }, 1024)) : T(tt)(o) ? (P(), L(K, {
15864
+ }, 1024)) : E(tt)(o) ? (P(), L(K, {
15865
15865
  key: 1,
15866
15866
  appear: "",
15867
15867
  name: "pk-chatbot-part"
15868
15868
  }, {
15869
- default: B(() => [T(jt)(o.filename, o.mediaType) ? (P(), Z("div", jy, [F(Pn, {
15869
+ default: B(() => [E(jt)(o.filename, o.mediaType) ? (P(), Z("div", jy, [F(Pn, {
15870
15870
  "media-type": o.mediaType,
15871
15871
  url: o.url,
15872
15872
  filename: o.filename,
15873
- size: T(Qe)(o)?.bytesCount
15873
+ size: E(Qe)(o)?.bytesCount
15874
15874
  }, null, 8, [
15875
15875
  "media-type",
15876
15876
  "url",
@@ -15878,7 +15878,7 @@ var Sy = ["aria-busy"], Cy = {
15878
15878
  "size"
15879
15879
  ]), F(cv, {
15880
15880
  url: o.url,
15881
- transcript: T(et)(o),
15881
+ transcript: E(et)(o),
15882
15882
  pending: e.status === "submitted" && Y(f)
15883
15883
  }, null, 8, [
15884
15884
  "url",
@@ -15889,7 +15889,7 @@ var Sy = ["aria-busy"], Cy = {
15889
15889
  "media-type": o.mediaType,
15890
15890
  url: o.url,
15891
15891
  filename: o.filename,
15892
- size: T(Qe)(o)?.bytesCount
15892
+ size: E(Qe)(o)?.bytesCount
15893
15893
  }, null, 8, [
15894
15894
  "media-type",
15895
15895
  "url",
@@ -15897,7 +15897,7 @@ var Sy = ["aria-busy"], Cy = {
15897
15897
  "size"
15898
15898
  ]))]),
15899
15899
  _: 2
15900
- }, 1024)) : T(We)(o) && !T(rt)(o) ? (P(), L(K, {
15900
+ }, 1024)) : E(We)(o) && !E(rt)(o) ? (P(), L(K, {
15901
15901
  key: 2,
15902
15902
  appear: "",
15903
15903
  name: "pk-chatbot-part"
@@ -15905,7 +15905,7 @@ var Sy = ["aria-busy"], Cy = {
15905
15905
  default: B(() => [(P(), L(_v, {
15906
15906
  key: `approval-${s}`,
15907
15907
  part: o,
15908
- actionable: e.interactive === !0 && (T(Ke)(o) || Y(f)),
15908
+ actionable: e.interactive === !0 && (E(Ke)(o) || Y(f)),
15909
15909
  "call-verdict": e.confirmVerdictsOnCall?.get(o.toolCallId ?? ""),
15910
15910
  onRespond: (e) => u(o, e)
15911
15911
  }, null, 8, [
@@ -15921,7 +15921,7 @@ var Sy = ["aria-busy"], Cy = {
15921
15921
  name: "pk-chatbot-part"
15922
15922
  }, {
15923
15923
  default: B(() => [F(Sv, {
15924
- question: e.hostConfirmation?.question ?? T(i)("toolApproval.hostCall", { name: T(Ct)(T(i), o) }),
15924
+ question: e.hostConfirmation?.question ?? E(i)("toolApproval.hostCall", { name: E(Ct)(E(i), o) }),
15925
15925
  details: e.hostConfirmation?.details,
15926
15926
  onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
15927
15927
  }, null, 8, ["question", "details"])]),
@@ -15933,10 +15933,10 @@ var Sy = ["aria-busy"], Cy = {
15933
15933
  }, {
15934
15934
  default: B(() => [H("div", My, [
15935
15935
  F(m, {
15936
- name: Be(f, o) ? "loading-loop" : T(gt)(o) ?? "ri:apps-line",
15936
+ name: Be(f, o) ? "loading-loop" : E(gt)(o) ?? "ri:apps-line",
15937
15937
  class: "shrink-0"
15938
15938
  }, null, 8, ["name"]),
15939
- H("span", Ny, N(T(Ct)(T(i), o, T(c))), 1),
15939
+ H("span", Ny, N(E(Ct)(E(i), o, E(c))), 1),
15940
15940
  Ge(f, o) ? (P(), Z("span", Py, " · " + N(Ge(f, o)), 1)) : q("", !0)
15941
15941
  ])]),
15942
15942
  _: 2
@@ -15945,21 +15945,21 @@ var Sy = ["aria-busy"], Cy = {
15945
15945
  appear: "",
15946
15946
  name: "pk-chatbot-part"
15947
15947
  }, {
15948
- default: B(() => [!T(l)[o.type] && T(fv)[T(Ye)(o)] ? (P(), L(fe(T(fv)[T(Ye)(o)]), oe({
15949
- key: `component-${s}-${T(dt)(o)}`,
15948
+ default: B(() => [!E(l)[o.type] && E(fv)[E(Ye)(o)] ? (P(), L(fe(E(fv)[E(Ye)(o)]), oe({
15949
+ key: `component-${s}-${E(dt)(o)}`,
15950
15950
  part: o
15951
15951
  }, { ref_for: !0 }, R(o)), null, 16, ["part"])) : pe(t.$slots, o.type, oe({ ref_for: !0 }, {
15952
15952
  message: d,
15953
15953
  part: o,
15954
15954
  index: f,
15955
- isLoading: E.value
15956
- }), () => [e.showAllMessageParts ? (P(), Z("div", Fy, [H("div", Iy, [T(gt)(o) ? (P(), L(m, {
15955
+ isLoading: D.value
15956
+ }), () => [e.showAllMessageParts ? (P(), Z("div", Fy, [H("div", Iy, [E(gt)(o) ? (P(), L(m, {
15957
15957
  key: 0,
15958
- name: T(gt)(o),
15958
+ name: E(gt)(o),
15959
15959
  class: "shrink-0"
15960
- }, null, 8, ["name"])) : q("", !0), H("span", Ly, N(T(ut)(o, {
15961
- t: T(i),
15962
- te: T(a)
15960
+ }, null, 8, ["name"])) : q("", !0), H("span", Ly, N(E(ut)(o, {
15961
+ t: E(i),
15962
+ te: E(a)
15963
15963
  })), 1)])])) : q("", !0)], void 0, 1)]),
15964
15964
  _: 2
15965
15965
  }, 1024)) : q("", !0), F(K, { mode: "out-in" }, {
@@ -15973,7 +15973,7 @@ var Sy = ["aria-busy"], Cy = {
15973
15973
  name: "fade-in",
15974
15974
  mode: "out-in"
15975
15975
  }, {
15976
- default: B(() => [E.value && Y(f) && !Fe(d) && !e.hostConfirmation && Ze(d) && (!Re(d) || Je(d)) ? (P(), Z("div", {
15976
+ default: B(() => [D.value && Y(f) && !Fe(d) && !e.hostConfirmation && Ze(d) && (!Re(d) || Je(d)) ? (P(), Z("div", {
15977
15977
  key: `loading-info-${d.id}`,
15978
15978
  class: "pk-chatbot-message__loading-info"
15979
15979
  }, [H("div", Ry, [
@@ -16004,7 +16004,7 @@ var Sy = ["aria-busy"], Cy = {
16004
16004
  key: 0,
16005
16005
  markdown: we.value.text,
16006
16006
  "is-dark": e.isDark,
16007
- "tail-length": T(ft),
16007
+ "tail-length": E(ft),
16008
16008
  "inner-class": "wysiwyg",
16009
16009
  class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
16010
16010
  }, null, 8, [
@@ -16028,8 +16028,8 @@ var Sy = ["aria-busy"], Cy = {
16028
16028
  key: 0,
16029
16029
  icon: "ri:reset-right-line",
16030
16030
  modifiers: "action-quiet-small",
16031
- title: T(i)("action.regenerate"),
16032
- "aria-label": T(i)("action.regenerate"),
16031
+ title: E(i)("action.regenerate"),
16032
+ "aria-label": E(i)("action.regenerate"),
16033
16033
  onClick: n[1] ||= ve((e) => t.$emit("regenerate"), ["stop"])
16034
16034
  }, null, 8, ["title", "aria-label"])) : q("", !0)]),
16035
16035
  _: 2
@@ -16038,8 +16038,8 @@ var Sy = ["aria-busy"], Cy = {
16038
16038
  default: B(() => [Pe("show-info", f) ? (P(), L(h, {
16039
16039
  key: 0,
16040
16040
  icon: "ri:information-line",
16041
- title: T(i)("action.getMoreInfo"),
16042
- "aria-label": T(i)("action.getMoreInfo"),
16041
+ title: E(i)("action.getMoreInfo"),
16042
+ "aria-label": E(i)("action.getMoreInfo"),
16043
16043
  modifiers: "action-quiet-small",
16044
16044
  onClick: ve((e) => t.$emit("show-info", d), ["stop"])
16045
16045
  }, null, 8, [
@@ -16053,8 +16053,8 @@ var Sy = ["aria-busy"], Cy = {
16053
16053
  default: B(() => [Pe("revise", f) ? (P(), L(h, {
16054
16054
  key: 0,
16055
16055
  icon: ce(d.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
16056
- title: ce(d.id) ? T(i)("action.editRevise") : T(i)("action.createRevise"),
16057
- "aria-label": ce(d.id) ? T(i)("action.editRevise") : T(i)("action.createRevise"),
16056
+ title: ce(d.id) ? E(i)("action.editRevise") : E(i)("action.createRevise"),
16057
+ "aria-label": ce(d.id) ? E(i)("action.editRevise") : E(i)("action.createRevise"),
16058
16058
  modifiers: "action-quiet-small",
16059
16059
  class: de({ "text-brand-graphic": ce(d.id) }),
16060
16060
  onClick: ve((e) => t.$emit("revise", d), ["stop"])
@@ -16071,8 +16071,8 @@ var Sy = ["aria-busy"], Cy = {
16071
16071
  default: B(() => [ge("upvote", f) ? (P(), L(h, {
16072
16072
  key: 0,
16073
16073
  icon: le(d.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
16074
- title: T(i)("action.upvote"),
16075
- "aria-label": T(i)("action.upvote"),
16074
+ title: E(i)("action.upvote"),
16075
+ "aria-label": E(i)("action.upvote"),
16076
16076
  modifiers: "action-quiet-small",
16077
16077
  onClick: ve((e) => t.$emit("upvote", d), ["stop"])
16078
16078
  }, null, 8, [
@@ -16087,8 +16087,8 @@ var Sy = ["aria-busy"], Cy = {
16087
16087
  default: B(() => [ge("downvote", f) ? (P(), L(h, {
16088
16088
  key: 0,
16089
16089
  icon: le(d.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
16090
- title: T(i)("action.downvote"),
16091
- "aria-label": T(i)("action.downvote"),
16090
+ title: E(i)("action.downvote"),
16091
+ "aria-label": E(i)("action.downvote"),
16092
16092
  modifiers: "action-quiet-small",
16093
16093
  onClick: ve((e) => t.$emit("downvote", d), ["stop"])
16094
16094
  }, null, 8, [
@@ -16103,8 +16103,8 @@ var Sy = ["aria-busy"], Cy = {
16103
16103
  default: B(() => [ge("feedback", f) ? (P(), L(h, {
16104
16104
  key: 0,
16105
16105
  icon: le(d.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
16106
- title: T(i)("action.feedback"),
16107
- "aria-label": T(i)("action.feedback"),
16106
+ title: E(i)("action.feedback"),
16107
+ "aria-label": E(i)("action.feedback"),
16108
16108
  modifiers: "action-quiet-small",
16109
16109
  onClick: ve((e) => t.$emit("feedback", d), ["stop"])
16110
16110
  }, null, 8, [
@@ -16120,7 +16120,7 @@ var Sy = ["aria-busy"], Cy = {
16120
16120
  }, 1024),
16121
16121
  !e.showMessageDateTime && d.metadata?.createdAt && d.metadata?.completedAt ? (P(), Z("div", By, [H("time", {
16122
16122
  datetime: new Date(d.metadata.createdAt).toISOString(),
16123
- title: T(o)(new Date(d.metadata.createdAt), "date-time"),
16123
+ title: E(o)(new Date(d.metadata.createdAt), "date-time"),
16124
16124
  class: "flex items-center gap-4 min-w-0"
16125
16125
  }, [F(m, {
16126
16126
  name: "ri:time-line",
@@ -16131,13 +16131,13 @@ var Sy = ["aria-busy"], Cy = {
16131
16131
  }), H("span", Wy, N(Et(d)), 1)])) : q("", !0)])) : q("", !0),
16132
16132
  e.showMessageNumber ? (P(), Z("span", {
16133
16133
  key: 1,
16134
- title: T(i)("label.messageNumber", { n: _t.value[f] }),
16134
+ title: E(i)("label.messageNumber", { n: _t.value[f] }),
16135
16135
  class: "text-12 text-word-3 tabular-nums"
16136
16136
  }, " #" + N(_t.value[f]), 9, Gy)) : q("", !0),
16137
16137
  e.showMessageTokensCount && d.metadata?.totalTokens ? (P(), Z("span", Ky, [F(m, {
16138
16138
  name: "ri:ai-generate-2-line",
16139
16139
  class: "shrink-0"
16140
- }), H("span", qy, N(T(s)(d.metadata.totalTokens, "integer")) + " " + N(T(i)("label.tokens")), 1)])) : q("", !0),
16140
+ }), H("span", qy, N(E(s)(d.metadata.totalTokens, "integer")) + " " + N(E(i)("label.tokens")), 1)])) : q("", !0),
16141
16141
  e.showMessageDateTime && d.metadata?.createdAt ? (P(), Z("time", {
16142
16142
  key: 3,
16143
16143
  datetime: new Date(d.metadata?.createdAt).toISOString(),
@@ -16145,7 +16145,7 @@ var Sy = ["aria-busy"], Cy = {
16145
16145
  }, [F(m, {
16146
16146
  name: "ri:time-line",
16147
16147
  class: "shrink-0"
16148
- }), H("span", Yy, N(T(o)(new Date(d.metadata?.createdAt), "date-time")), 1)], 8, Jy)) : q("", !0),
16148
+ }), H("span", Yy, N(E(o)(new Date(d.metadata?.createdAt), "date-time")), 1)], 8, Jy)) : q("", !0),
16149
16149
  e.showMessageDateTime && d?.metadata?.completedAt && d?.metadata?.createdAt ? (P(), Z("div", Xy, [F(m, {
16150
16150
  name: "ri:hourglass-line",
16151
16151
  class: "shrink-0"
@@ -16185,11 +16185,11 @@ var Sy = ["aria-busy"], Cy = {
16185
16185
  default: B(() => [Oe.value ? (P(), Z("div", {
16186
16186
  key: 0,
16187
16187
  class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
16188
- style: ne({ minHeight: ke.value ? `${D.value}px` : void 0 })
16188
+ style: te({ minHeight: ke.value ? `${O.value}px` : void 0 })
16189
16189
  }, [H("div", Zy, [H("div", Qy, [F(m, {
16190
16190
  name: "loading-loop",
16191
16191
  class: "shrink-0"
16192
- }), H("span", $y, N(T(i)("label.answeringOnTheCall")), 1)])])], 4)) : q("", !0)]),
16192
+ }), H("span", $y, N(E(i)("label.answeringOnTheCall")), 1)])])], 4)) : q("", !0)]),
16193
16193
  _: 1
16194
16194
  }),
16195
16195
  F(K, {
@@ -16207,16 +16207,16 @@ var Sy = ["aria-busy"], Cy = {
16207
16207
  Ce.value?.role === "user" && !ke.value || De.value ? (P(), Z("div", {
16208
16208
  key: 0,
16209
16209
  class: "pk-chatbot-messages__spacer",
16210
- style: ne({ minHeight: `${D.value}px` })
16210
+ style: te({ minHeight: `${O.value}px` })
16211
16211
  }, null, 4)) : q("", !0)
16212
16212
  ], 512),
16213
16213
  F(K, { name: "pk-chatbot-messages-fab" }, {
16214
- default: B(() => [e.showScrollToBottom && (T(g) || !T(_)) ? (P(), Z("button", {
16214
+ default: B(() => [e.showScrollToBottom && (E(g) || !E(_)) ? (P(), Z("button", {
16215
16215
  key: 0,
16216
16216
  type: "button",
16217
16217
  class: "pk-chatbot-messages__scroll-to-bottom",
16218
- title: T(i)("action.scrollToBottom"),
16219
- "aria-label": T(i)("action.scrollToBottom"),
16218
+ title: E(i)("action.scrollToBottom"),
16219
+ "aria-label": E(i)("action.scrollToBottom"),
16220
16220
  onClick: v
16221
16221
  }, [F(m, { name: "ri:arrow-down-line" })], 8, eb)) : q("", !0)]),
16222
16222
  _: 1
@@ -16402,10 +16402,10 @@ var ub = { class: "pk-chatbot-input" }, db = {
16402
16402
  o.value && ob.update(o.value);
16403
16403
  }));
16404
16404
  });
16405
- let g = U(() => a.status === "streaming"), _ = U(() => a.status === "submitted"), v = U(() => g.value || _.value), y = ie(), b = U(() => u.value.length), x = U(() => a.maxMessageLength !== void 0 && b.value > a.maxMessageLength), S = U(() => r.value.some((e) => e.state === "uploading")), ee = U(() => v.value && !a.queueEnabled || S.value || x.value ? !1 : u.value.trim().length > 0), te = U(() => v.value && ee.value), w = "capture" in document.createElement("input"), E = U(() => {
16405
+ let g = U(() => a.status === "streaming"), _ = U(() => a.status === "submitted"), v = U(() => g.value || _.value), y = ie(), b = U(() => u.value.length), x = U(() => a.maxMessageLength !== void 0 && b.value > a.maxMessageLength), S = U(() => r.value.some((e) => e.state === "uploading")), C = U(() => v.value && !a.queueEnabled || S.value || x.value ? !1 : u.value.trim().length > 0), ee = U(() => v.value && C.value), T = "capture" in document.createElement("input"), D = U(() => {
16406
16406
  let e = a.fileUpload?.allowedMimeTypes ?? [];
16407
16407
  return [...e, ...zt(e)].join(",");
16408
- }), ne = U(() => (a.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), D = U(() => w && ne.value.length > 0), A = () => {
16408
+ }), te = U(() => (a.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), O = U(() => T && te.value.length > 0), A = () => {
16409
16409
  s.value?.click();
16410
16410
  }, j = () => {
16411
16411
  c.value?.click();
@@ -16449,13 +16449,13 @@ var ub = { class: "pk-chatbot-input" }, db = {
16449
16449
  }, R = () => {
16450
16450
  he(), i("stop-generation");
16451
16451
  }, ge = () => {
16452
- ee.value && (he(), p(), i("submit"), u.value = "", n.value = "", se(() => {
16452
+ C.value && (he(), p(), i("submit"), u.value = "", n.value = "", se(() => {
16453
16453
  o.value && (o.value.value = "", ob.update(o.value));
16454
16454
  }));
16455
16455
  }, z = (e) => {
16456
16456
  e.shiftKey || e.isComposing || e.keyCode === 229 || (e.preventDefault(), ge());
16457
16457
  };
16458
- k(() => {
16458
+ re(() => {
16459
16459
  o.value && ob(o.value);
16460
16460
  });
16461
16461
  let _e = 0;
@@ -16464,12 +16464,12 @@ var ub = { class: "pk-chatbot-input" }, db = {
16464
16464
  o.value && t !== _e && (_e = t, ob.update(o.value));
16465
16465
  }), I(() => a.placeholder, async () => {
16466
16466
  await se(), o.value && ob.update(o.value);
16467
- }), re(() => {
16467
+ }), ne(() => {
16468
16468
  f(), o.value && ob.destroy(o.value);
16469
16469
  for (let e of r.value) URL.revokeObjectURL(e.localUrl);
16470
16470
  }), (t, n) => {
16471
16471
  let a = Cn, d = Tn, f = bn, p = wn;
16472
- return P(), Z("div", ub, [fe.value.length ? (P(), Z("div", db, [(P(!0), Z(V, null, C(fe.value, (e) => (P(), Z("div", {
16472
+ return P(), Z("div", ub, [fe.value.length ? (P(), Z("div", db, [(P(!0), Z(V, null, w(fe.value, (e) => (P(), Z("div", {
16473
16473
  key: e.id,
16474
16474
  class: "pk-chatbot-input__notice-item"
16475
16475
  }, [
@@ -16503,7 +16503,7 @@ var ub = { class: "pk-chatbot-input" }, db = {
16503
16503
  ref: l,
16504
16504
  class: "pk-chatbot-input__form",
16505
16505
  onSubmit: ve(ge, ["prevent"])
16506
- }, [r.value.length ? (P(), Z("div", pb, [(P(!0), Z(V, null, C(r.value, (e) => (P(), L(Pn, {
16506
+ }, [r.value.length ? (P(), Z("div", pb, [(P(!0), Z(V, null, w(r.value, (e) => (P(), L(Pn, {
16507
16507
  key: e.id,
16508
16508
  "media-type": e.mediaSource?.mimeType ?? e.file.type,
16509
16509
  url: e.localUrl,
@@ -16525,7 +16525,7 @@ var ub = { class: "pk-chatbot-input" }, db = {
16525
16525
  "onRemove"
16526
16526
  ]))), 128))])) : q("", !0), H("div", mb, [
16527
16527
  pe(t.$slots, "prepend"),
16528
- e.fileUpload && e.fileUpload.enabled && (D.value || t.$slots["additional-actions"]) ? (P(), L(p, O(oe({ key: 0 }, {
16528
+ e.fileUpload && e.fileUpload.enabled && (O.value || t.$slots["additional-actions"]) ? (P(), L(p, k(oe({ key: 0 }, {
16529
16529
  placement: "top-start",
16530
16530
  modifiers: "menu",
16531
16531
  flip: !0,
@@ -16542,7 +16542,7 @@ var ub = { class: "pk-chatbot-input" }, db = {
16542
16542
  class: "pk-chat-button__icon"
16543
16543
  })], 16, hb)]),
16544
16544
  items: B(() => [
16545
- D.value ? (P(), L(f, {
16545
+ O.value ? (P(), L(f, {
16546
16546
  key: 0,
16547
16547
  disabled: v.value || e.attachmentLimitReached,
16548
16548
  onClick: j
@@ -16580,17 +16580,17 @@ var ub = { class: "pk-chatbot-input" }, db = {
16580
16580
  type: "file",
16581
16581
  hidden: "",
16582
16582
  multiple: "",
16583
- accept: E.value,
16583
+ accept: D.value,
16584
16584
  onChange: M
16585
16585
  }, null, 40, gb)) : q("", !0),
16586
- e.fileUpload && e.fileUpload.enabled && D.value ? (P(), Z("input", {
16586
+ e.fileUpload && e.fileUpload.enabled && O.value ? (P(), Z("input", {
16587
16587
  key: 3,
16588
16588
  ref_key: "cameraInputEl",
16589
16589
  ref: c,
16590
16590
  type: "file",
16591
16591
  capture: "environment",
16592
16592
  hidden: "",
16593
- accept: ne.value,
16593
+ accept: te.value,
16594
16594
  onChange: M
16595
16595
  }, null, 40, _b)) : q("", !0),
16596
16596
  H("div", vb, [H("textarea", {
@@ -16602,7 +16602,7 @@ var ub = { class: "pk-chatbot-input" }, db = {
16602
16602
  rows: "1",
16603
16603
  enterkeyhint: "send",
16604
16604
  "aria-label": t.$t("label.message"),
16605
- "aria-describedby": e.maxMessageLength ? T(y) : void 0,
16605
+ "aria-describedby": e.maxMessageLength ? E(y) : void 0,
16606
16606
  "aria-invalid": x.value || void 0,
16607
16607
  placeholder: e.placeholder,
16608
16608
  onInput: h,
@@ -16610,7 +16610,7 @@ var ub = { class: "pk-chatbot-input" }, db = {
16610
16610
  }, null, 40, yb)]),
16611
16611
  e.maxMessageLength ? (P(), Z("div", {
16612
16612
  key: 4,
16613
- id: T(y),
16613
+ id: E(y),
16614
16614
  class: de(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": x.value }])
16615
16615
  }, [Ne(N(t.$n(b.value, "integer")) + "/", 1), H("span", xb, N(t.$n(e.maxMessageLength, "integer")), 1)], 10, bb)) : q("", !0),
16616
16616
  e.voiceEnabled && !g.value ? (P(), L(lb, {
@@ -16623,11 +16623,11 @@ var ub = { class: "pk-chatbot-input" }, db = {
16623
16623
  g.value ? (P(), L(lb, {
16624
16624
  key: 6,
16625
16625
  icon: "ri:stop-fill",
16626
- modifiers: te.value ? void 0 : "primary",
16626
+ modifiers: ee.value ? void 0 : "primary",
16627
16627
  title: t.$t("action.stop"),
16628
16628
  onClick: R
16629
16629
  }, null, 8, ["modifiers", "title"])) : q("", !0),
16630
- te.value ? (P(), L(lb, {
16630
+ ee.value ? (P(), L(lb, {
16631
16631
  key: 7,
16632
16632
  type: "submit",
16633
16633
  modifiers: "primary",
@@ -16639,7 +16639,7 @@ var ub = { class: "pk-chatbot-input" }, db = {
16639
16639
  modifiers: "primary",
16640
16640
  icon: _.value ? "loading-loop" : "ri:arrow-up-line",
16641
16641
  title: t.$t("action.submit"),
16642
- disabled: !ee.value
16642
+ disabled: !C.value
16643
16643
  }, null, 8, [
16644
16644
  "icon",
16645
16645
  "title",
@@ -16662,7 +16662,7 @@ var Cb = ["aria-label"], wb = { class: "pk-chatbot-queued__label" }, Tb = { clas
16662
16662
  return P(), Z("ol", {
16663
16663
  class: "pk-chatbot-queued",
16664
16664
  "aria-label": t.$t("label.queuedMessages")
16665
- }, [(P(!0), Z(V, null, C(e.messages, (e, r) => (P(), Z("li", {
16665
+ }, [(P(!0), Z(V, null, w(e.messages, (e, r) => (P(), Z("li", {
16666
16666
  key: `${r}:${e}`,
16667
16667
  class: "pk-chatbot-queued__item"
16668
16668
  }, [H("span", wb, N(t.$t("label.queued")), 1), H("div", Tb, [H("p", Eb, N(e), 1), F(a, { class: "pk-chatbot-queued__actions" }, {
@@ -16763,14 +16763,14 @@ var Ab = .18, jb = .35, Mb = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
16763
16763
  };
16764
16764
  return I(() => t.state, async (e) => {
16765
16765
  e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => Ab * 1.6), await se(), s()) : i === void 0 && (i = requestAnimationFrame(c));
16766
- }, { immediate: !0 }), re(l), (t, r) => (P(), Z("div", {
16766
+ }, { immediate: !0 }), ne(l), (t, r) => (P(), Z("div", {
16767
16767
  class: de(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
16768
16768
  "aria-hidden": "true"
16769
16769
  }, [H("div", {
16770
16770
  ref_key: "barsEl",
16771
16771
  ref: n,
16772
16772
  class: "pk-voice-orb__bars"
16773
- }, [(P(!0), Z(V, null, C(e.bars, (e) => (P(), Z("span", {
16773
+ }, [(P(!0), Z(V, null, w(e.bars, (e) => (P(), Z("span", {
16774
16774
  key: e,
16775
16775
  class: "pk-voice-orb__bar"
16776
16776
  }))), 128))], 512)], 2));
@@ -16836,29 +16836,29 @@ var Nb = {
16836
16836
  o.value ? (P(), Z("span", {
16837
16837
  key: 2,
16838
16838
  class: de(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
16839
- title: T(i)("hint.voiceRemaining"),
16839
+ title: E(i)("hint.voiceRemaining"),
16840
16840
  "aria-hidden": "true"
16841
16841
  }, N(o.value), 11, Lb)) : q("", !0),
16842
16842
  H("div", Rb, [e.error ? (P(), Z(V, { key: 0 }, [F(lb, {
16843
16843
  icon: "ri:refresh-line",
16844
- label: T(i)("action.retry"),
16844
+ label: E(i)("action.retry"),
16845
16845
  onClick: n[0] ||= (e) => r("retry")
16846
16846
  }, null, 8, ["label"]), e.live ? (P(), L(lb, {
16847
16847
  key: 0,
16848
16848
  icon: "ri:stop-circle-line",
16849
16849
  modifiers: "danger",
16850
- title: T(i)("action.hangUp"),
16851
- "aria-label": T(i)("action.hangUp"),
16850
+ title: E(i)("action.hangUp"),
16851
+ "aria-label": E(i)("action.hangUp"),
16852
16852
  onClick: n[1] ||= (e) => r("hang-up")
16853
16853
  }, null, 8, ["title", "aria-label"])) : (P(), L(lb, {
16854
16854
  key: 1,
16855
16855
  icon: "ri:close-line",
16856
- label: T(i)("action.close"),
16856
+ label: E(i)("action.close"),
16857
16857
  onClick: n[2] ||= (e) => r("dismiss")
16858
16858
  }, null, 8, ["label"]))], 64)) : (P(), Z(V, { key: 1 }, [F(lb, {
16859
16859
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
16860
- title: e.muted ? T(i)("action.unmute") : T(i)("action.mute"),
16861
- "aria-label": e.muted ? T(i)("action.unmute") : T(i)("action.mute"),
16860
+ title: e.muted ? E(i)("action.unmute") : E(i)("action.mute"),
16861
+ "aria-label": e.muted ? E(i)("action.unmute") : E(i)("action.mute"),
16862
16862
  "aria-pressed": e.muted,
16863
16863
  onClick: n[3] ||= (e) => r("toggle-mute")
16864
16864
  }, null, 8, [
@@ -16869,8 +16869,8 @@ var Nb = {
16869
16869
  ]), F(lb, {
16870
16870
  icon: "ri:stop-circle-line",
16871
16871
  modifiers: "danger",
16872
- title: T(i)("action.hangUp"),
16873
- "aria-label": T(i)("action.hangUp"),
16872
+ title: E(i)("action.hangUp"),
16873
+ "aria-label": E(i)("action.hangUp"),
16874
16874
  onClick: n[4] ||= (e) => r("hang-up")
16875
16875
  }, null, 8, ["title", "aria-label"])], 64))])
16876
16876
  ], 2);
@@ -16898,9 +16898,9 @@ var Bb = {
16898
16898
  name: "ri:alarm-line",
16899
16899
  class: "shrink-0"
16900
16900
  }),
16901
- H("span", Vb, [H("strong", null, N(T(r)("label.wakeupNext", { time: T(i)(new Date(e.pending.dueAt), "time") })), 1), H("span", Hb, N(e.pending.reason), 1)]),
16901
+ H("span", Vb, [H("strong", null, N(E(r)("label.wakeupNext", { time: E(i)(new Date(e.pending.dueAt), "time") })), 1), H("span", Hb, N(e.pending.reason), 1)]),
16902
16902
  F(s, {
16903
- label: T(r)("action.stop"),
16903
+ label: E(r)("action.stop"),
16904
16904
  modifiers: "action-quiet",
16905
16905
  loading: e.stopping,
16906
16906
  disabled: e.stopping,
@@ -17110,7 +17110,7 @@ function Yb(e) {
17110
17110
  let y = () => v();
17111
17111
  return document.addEventListener("visibilitychange", y), I(() => t.value?.wakeId, (e) => {
17112
17112
  clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, Jb));
17113
- }), re(() => {
17113
+ }), ne(() => {
17114
17114
  i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", y);
17115
17115
  }), {
17116
17116
  pendingWakeup: t,
@@ -17143,7 +17143,7 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17143
17143
  },
17144
17144
  emits: ["show-info", "revise"],
17145
17145
  setup(e, { emit: t }) {
17146
- let n = w(() => import("./_chunks/PkToolShowForm-jA0SkiQC.js")), r = w(() => import("./_chunks/PkToolShowContactForm-wNiHeOQM.js")), i = w(() => import("./_chunks/PkToolShowSuggestedReply-BQHtnpb_.js")), a = w(() => import("./_chunks/PkToolShowSources-K-cNd52t.js")), o = w(() => import("./_chunks/PkToolRequestGeolocation-B51_MHPQ.js")), s = w(() => import("./_chunks/PkToolRequestOAuthConnection-DfjwyGwk.js")), c = w(() => import("./_chunks/PkToolShowLocation-B1ltUJ-K.js")), l = w(() => import("./_chunks/PkToolShowDiagram-fTIiANVA.js")), u = w(() => import("./_chunks/PkToolEditedFile-VFnIlU4j.js")), d = w(() => import("./_chunks/PkToolShareDocument-BE02IEEO.js")), f = e, p = t, m = Mf(f.agentId), { agentInterface: h, agentFileUpload: g, agentType: _, agentVoice: v, actions: y, revisedAnswers: b, messages: x, chat: S, messageFeedbacks: ee, feedbackDialogMessage: te, isFeedbackSubmitting: C, isFeedbackSubmitted: E, feedbackSubmitError: ne, isLeadSubmitted: D, isLoadingSubmitLead: O, submitLeadError: k, input: A, inputMessagePlaceholder: ie, isConversationBlocked: j, baseUrl: ae, pendingAttachments: oe, isAttachmentLimitReached: M, fileLimitError: se, apiClient: ce, isDark: le, hostToolsPending: ue, pageNoticeLevel: fe, hostConfirmation: pe, agentPageAccess: he, hostStepTitles: R, canQueue: z, queuedMessages: _e, backgroundAnswers: ve } = pr(m);
17146
+ let n = T(() => import("./_chunks/PkToolShowForm-jA0SkiQC.js")), r = T(() => import("./_chunks/PkToolShowContactForm-wNiHeOQM.js")), i = T(() => import("./_chunks/PkToolShowSuggestedReply-BQHtnpb_.js")), a = T(() => import("./_chunks/PkToolShowSources-K-cNd52t.js")), o = T(() => import("./_chunks/PkToolRequestGeolocation-B51_MHPQ.js")), s = T(() => import("./_chunks/PkToolRequestOAuthConnection-DfjwyGwk.js")), c = T(() => import("./_chunks/PkToolShowLocation-B1ltUJ-K.js")), l = T(() => import("./_chunks/PkToolShowDiagram-fTIiANVA.js")), u = T(() => import("./_chunks/PkToolEditedFile-VFnIlU4j.js")), d = T(() => import("./_chunks/PkToolShareDocument-BE02IEEO.js")), f = e, p = t, m = Mf(f.agentId), { agentInterface: h, agentFileUpload: g, agentType: _, agentVoice: v, actions: y, revisedAnswers: b, messages: x, chat: S, messageFeedbacks: C, feedbackDialogMessage: ee, isFeedbackSubmitting: w, isFeedbackSubmitted: D, feedbackSubmitError: te, isLeadSubmitted: O, isLoadingSubmitLead: k, submitLeadError: re, input: A, inputMessagePlaceholder: ie, isConversationBlocked: j, baseUrl: ae, pendingAttachments: oe, isAttachmentLimitReached: M, fileLimitError: se, apiClient: ce, isDark: le, hostToolsPending: ue, pageNoticeLevel: fe, hostConfirmation: pe, agentPageAccess: he, hostStepTitles: R, canQueue: z, queuedMessages: _e, backgroundAnswers: ve } = pr(m);
17147
17147
  Fe(bt, R);
17148
17148
  let ye = U(() => _.value === "reasoning" ? void 0 : g.value), V = (e) => ce.value.getMediaDownloadUrl(f.agentId, m.localChatId, e), { handleSubmit: be, stopGeneration: xe, regenerate: Se, onUpvote: G, onDownvote: we, onFeedback: Te, onFeedbackSubmit: Ee, onLeadSubmit: De, startNewChat: Oe, addToolOutput: ke, addToolApprovalResponse: Ae, handleFileSelect: je, clearFileLimitError: Me, refreshMessages: J, appendMessage: Y, closePageNotice: Ne, respondHostConfirmation: X, editQueuedMessage: Pe, removeQueuedMessage: Ie, openBackgroundAnswer: Re, dismissBackgroundAnswer: ze } = m, { t: Be } = Le({ useScope: "global" }), Ve = U(() => ue.value > 0), He = U(() => Ve.value && S.value.status === "ready" ? "streaming" : S.value.status), Ue = Dn(() => he.value?.notice), We = U(() => fe.value ? Ue.value || Be(`message.pageAccessNotice.${fe.value}`) : void 0), Ge = U(() => {
17149
17149
  let e = se.value;
@@ -17268,7 +17268,7 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17268
17268
  }, Rt = () => {
17269
17269
  tt.value = !tt.value, gt.setMuted(tt.value);
17270
17270
  };
17271
- re(() => {
17271
+ ne(() => {
17272
17272
  nt = !0, ut();
17273
17273
  });
17274
17274
  let { pendingWakeup: zt, isStopping: Bt, stop: Vt, spokenTurnStarted: Ht, spokenTurnsWritten: Ut, forgetSpokenTurns: Wt } = Yb({
@@ -17285,7 +17285,7 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17285
17285
  ref_key: "chatViewEl",
17286
17286
  ref: Ze,
17287
17287
  class: de(["pk-chatbot-view-chat", {
17288
- "pk-chatbot-view-chat--dragover": T(et) && ye.value?.enabled,
17288
+ "pk-chatbot-view-chat--dragover": E(et) && ye.value?.enabled,
17289
17289
  "pk-chatbot-view-chat--empty": Ye.value
17290
17290
  }])
17291
17291
  }, [
@@ -17295,9 +17295,9 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17295
17295
  }, {
17296
17296
  default: B(() => [Ye.value ? (P(), L(kb, {
17297
17297
  key: 0,
17298
- greeting: T(Xe),
17299
- logo: T(h)?.logo,
17300
- name: T(m).name
17298
+ greeting: E(Xe),
17299
+ logo: E(h)?.logo,
17300
+ name: E(m).name
17301
17301
  }, null, 8, [
17302
17302
  "greeting",
17303
17303
  "logo",
@@ -17306,47 +17306,47 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17306
17306
  key: 1,
17307
17307
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
17308
17308
  interactive: "",
17309
- messages: T(x),
17309
+ messages: E(x),
17310
17310
  "confirm-verdicts-on-call": jt.value,
17311
- status: T(S).status,
17312
- error: T(S).error,
17313
- "main-color": T(h)?.mainColor,
17314
- "text-color": T(h)?.textColor,
17315
- "revised-answers": T(b),
17316
- actions: T(y),
17317
- "message-feedbacks": T(ee),
17318
- "feedback-message-id": T(te)?.id,
17319
- "feedback-loading": T(C),
17320
- "feedback-submitted": T(E),
17321
- "feedback-error": T(ne),
17322
- "show-extended-steps": T(h)?.showExtendedSteps,
17311
+ status: E(S).status,
17312
+ error: E(S).error,
17313
+ "main-color": E(h)?.mainColor,
17314
+ "text-color": E(h)?.textColor,
17315
+ "revised-answers": E(b),
17316
+ actions: E(y),
17317
+ "message-feedbacks": E(C),
17318
+ "feedback-message-id": E(ee)?.id,
17319
+ "feedback-loading": E(w),
17320
+ "feedback-submitted": E(D),
17321
+ "feedback-error": E(te),
17322
+ "show-extended-steps": E(h)?.showExtendedSteps,
17323
17323
  "awaiting-spoken-answer": rt.value,
17324
17324
  "host-working": Ve.value,
17325
- "host-confirmation": T(pe),
17326
- "is-dark": T(le),
17325
+ "host-confirmation": E(pe),
17326
+ "is-dark": E(le),
17327
17327
  "show-scroll-to-bottom": e.modifier === "fullscreen",
17328
- onFeedbackSubmit: g[0] ||= (e) => T(Ee)(e),
17329
- onFeedbackClose: g[1] ||= (e) => te.value = void 0,
17330
- onRegenerate: T(Se),
17331
- onAutoRetry: T(Se),
17332
- onResetChat: T(Oe),
17328
+ onFeedbackSubmit: g[0] ||= (e) => E(Ee)(e),
17329
+ onFeedbackClose: g[1] ||= (e) => ee.value = void 0,
17330
+ onRegenerate: E(Se),
17331
+ onAutoRetry: E(Se),
17332
+ onResetChat: E(Oe),
17333
17333
  onShowInfo: g[2] ||= (e) => p("show-info", e),
17334
17334
  onRevise: g[3] ||= (e) => p("revise", e),
17335
- onUpvote: T(G),
17336
- onDownvote: T(we),
17337
- onFeedback: T(Te),
17338
- onApprovalRespond: T(Ae),
17335
+ onUpvote: E(G),
17336
+ onDownvote: E(we),
17337
+ onFeedback: E(Te),
17338
+ onApprovalRespond: E(Ae),
17339
17339
  onConfirmRespond: Pt,
17340
- onHostConfirmRespond: T(X)
17340
+ onHostConfirmRespond: E(X)
17341
17341
  }, {
17342
- "tool-showContactForm": B(({ part: e }) => [F(T(r), {
17342
+ "tool-showContactForm": B(({ part: e }) => [F(E(r), {
17343
17343
  part: e,
17344
- readonly: !T(ae),
17345
- submitted: T(D),
17346
- loading: T(O),
17347
- error: T(k),
17348
- "privacy-policy-notice": T(h)?.privacyPolicyNotice,
17349
- onSubmit: T(De)
17344
+ readonly: !E(ae),
17345
+ submitted: E(O),
17346
+ loading: E(k),
17347
+ error: E(re),
17348
+ "privacy-policy-notice": E(h)?.privacyPolicyNotice,
17349
+ onSubmit: E(De)
17350
17350
  }, null, 8, [
17351
17351
  "part",
17352
17352
  "readonly",
@@ -17356,17 +17356,17 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17356
17356
  "privacy-policy-notice",
17357
17357
  "onSubmit"
17358
17358
  ])]),
17359
- "tool-showSuggestedReply": B(({ part: e }) => [F(T(i), {
17359
+ "tool-showSuggestedReply": B(({ part: e }) => [F(E(i), {
17360
17360
  part: e,
17361
17361
  onSelect: (t) => Ft(e, t)
17362
17362
  }, null, 8, ["part", "onSelect"])]),
17363
- "tool-showSources": B(({ part: e }) => [F(T(a), {
17363
+ "tool-showSources": B(({ part: e }) => [F(E(a), {
17364
17364
  part: e,
17365
17365
  "on-expand-context": Qe,
17366
17366
  "on-download": $e
17367
17367
  }, null, 8, ["part"])]),
17368
17368
  "tool-showForm": B(({ part: e }) => [F(K, { mode: "out-in" }, {
17369
- default: B(() => [F(T(n), {
17369
+ default: B(() => [F(E(n), {
17370
17370
  part: e,
17371
17371
  answered: At(e),
17372
17372
  onSelect: (t) => Nt("showForm", e, t)
@@ -17378,7 +17378,7 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17378
17378
  _: 2
17379
17379
  }, 1024)]),
17380
17380
  "tool-showMultipleChoice": B(({ part: e }) => [F(K, { mode: "out-in" }, {
17381
- default: B(() => [F(T(n), {
17381
+ default: B(() => [F(E(n), {
17382
17382
  part: e,
17383
17383
  "allow-custom-answer": "",
17384
17384
  answered: At(e),
@@ -17390,11 +17390,11 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17390
17390
  ])]),
17391
17391
  _: 2
17392
17392
  }, 1024)]),
17393
- "tool-requestOAuthConnection": B(({ part: e }) => [F(T(s), {
17393
+ "tool-requestOAuthConnection": B(({ part: e }) => [F(E(s), {
17394
17394
  part: e,
17395
- "backend-url": T(ae),
17396
- "resolve-connection": (e) => T(ce).getOAuthAuthorizeUrl(f.agentId, e),
17397
- "check-connection": (e) => T(ce).getOAuthConnectionStatus(f.agentId, e),
17395
+ "backend-url": E(ae),
17396
+ "resolve-connection": (e) => E(ce).getOAuthAuthorizeUrl(f.agentId, e),
17397
+ "check-connection": (e) => E(ce).getOAuthConnectionStatus(f.agentId, e),
17398
17398
  onConnected: (t) => Lt(e, t)
17399
17399
  }, null, 8, [
17400
17400
  "part",
@@ -17403,10 +17403,10 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17403
17403
  "check-connection",
17404
17404
  "onConnected"
17405
17405
  ])]),
17406
- "tool-requestGeolocation": B(({ part: e }) => [F(T(o), {
17406
+ "tool-requestGeolocation": B(({ part: e }) => [F(E(o), {
17407
17407
  part: e,
17408
- "call-live": T(gt).isActive.value,
17409
- "reverse-geocode": (e, t) => T(ce).reverseGeocode(e, t),
17408
+ "call-live": E(gt).isActive.value,
17409
+ "reverse-geocode": (e, t) => E(ce).reverseGeocode(e, t),
17410
17410
  onResult: (t) => It(e, t)
17411
17411
  }, null, 8, [
17412
17412
  "part",
@@ -17414,33 +17414,33 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17414
17414
  "reverse-geocode",
17415
17415
  "onResult"
17416
17416
  ])]),
17417
- "tool-showLocation": B(({ part: e }) => [F(T(c), {
17417
+ "tool-showLocation": B(({ part: e }) => [F(E(c), {
17418
17418
  part: e,
17419
- "is-dark": T(le),
17420
- "main-color": T(h)?.mainColor,
17421
- "forward-geocode": (e, t) => T(ce).forwardGeocode(e, t)
17419
+ "is-dark": E(le),
17420
+ "main-color": E(h)?.mainColor,
17421
+ "forward-geocode": (e, t) => E(ce).forwardGeocode(e, t)
17422
17422
  }, null, 8, [
17423
17423
  "part",
17424
17424
  "is-dark",
17425
17425
  "main-color",
17426
17426
  "forward-geocode"
17427
17427
  ])]),
17428
- "tool-showDiagram": B(({ part: e }) => [F(T(l), {
17428
+ "tool-showDiagram": B(({ part: e }) => [F(E(l), {
17429
17429
  part: e,
17430
- "is-dark": T(le)
17430
+ "is-dark": E(le)
17431
17431
  }, null, 8, ["part", "is-dark"])]),
17432
- "tool-editSpreadsheet": B(({ part: e }) => [(P(), L(T(u), {
17433
- key: T(dt)(e),
17432
+ "tool-editSpreadsheet": B(({ part: e }) => [(P(), L(E(u), {
17433
+ key: E(dt)(e),
17434
17434
  part: e,
17435
17435
  "file-url": V
17436
17436
  }, null, 8, ["part"]))]),
17437
- "tool-editWordDocument": B(({ part: e }) => [(P(), L(T(u), {
17438
- key: T(dt)(e),
17437
+ "tool-editWordDocument": B(({ part: e }) => [(P(), L(E(u), {
17438
+ key: E(dt)(e),
17439
17439
  part: e,
17440
17440
  "file-url": V
17441
17441
  }, null, 8, ["part"]))]),
17442
- "tool-shareDocument": B(({ part: e }) => [(P(), L(T(d), {
17443
- key: T(dt)(e),
17442
+ "tool-shareDocument": B(({ part: e }) => [(P(), L(E(d), {
17443
+ key: E(dt)(e),
17444
17444
  part: e,
17445
17445
  "on-download": $e
17446
17446
  }, null, 8, ["part"]))]),
@@ -17448,11 +17448,11 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17448
17448
  }, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
17449
17449
  _: 1
17450
17450
  }),
17451
- T(_e).length ? (P(), L(Db, {
17451
+ E(_e).length ? (P(), L(Db, {
17452
17452
  key: 0,
17453
- messages: T(_e),
17454
- onEdit: T(Pe),
17455
- onRemove: T(Ie)
17453
+ messages: E(_e),
17454
+ onEdit: E(Pe),
17455
+ onRemove: E(Ie)
17456
17456
  }, null, 8, [
17457
17457
  "messages",
17458
17458
  "onEdit",
@@ -17467,49 +17467,49 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17467
17467
  })) : q("", !0)]),
17468
17468
  _: 1
17469
17469
  }),
17470
- T(zt) && !T(j) ? (P(), L(Ub, {
17470
+ E(zt) && !E(j) ? (P(), L(Ub, {
17471
17471
  key: 0,
17472
- pending: T(zt),
17473
- stopping: T(Bt),
17474
- onStop: T(Vt)
17472
+ pending: E(zt),
17473
+ stopping: E(Bt),
17474
+ onStop: E(Vt)
17475
17475
  }, null, 8, [
17476
17476
  "pending",
17477
17477
  "stopping",
17478
17478
  "onStop"
17479
17479
  ])) : q("", !0),
17480
- T(j) ? (P(), Z("div", Zb, N(T(Be)("message.chatErrorConversationBlocked")), 1)) : vt.value === "idle" ? (P(), L(Sb, {
17480
+ E(j) ? (P(), Z("div", Zb, N(E(Be)("message.chatErrorConversationBlocked")), 1)) : vt.value === "idle" ? (P(), L(Sb, {
17481
17481
  key: 3,
17482
- modelValue: T(A),
17482
+ modelValue: E(A),
17483
17483
  "onUpdate:modelValue": g[4] ||= (e) => Ce(A) ? A.value = e : null,
17484
- "pending-attachments": T(oe),
17484
+ "pending-attachments": E(oe),
17485
17485
  "onUpdate:pendingAttachments": g[5] ||= (e) => Ce(oe) ? oe.value = e : null,
17486
- placeholder: T(ie),
17487
- "dismissable-notice": T(qe) && T(S).messages.length <= 1 ? T(qe) : void 0,
17486
+ placeholder: E(ie),
17487
+ "dismissable-notice": E(qe) && E(S).messages.length <= 1 ? E(qe) : void 0,
17488
17488
  "page-notice": We.value,
17489
17489
  status: He.value,
17490
- "max-message-length": T(h)?.maxMessageLength,
17490
+ "max-message-length": E(h)?.maxMessageLength,
17491
17491
  "file-upload": ye.value,
17492
- "attachment-limit-reached": T(M),
17492
+ "attachment-limit-reached": E(M),
17493
17493
  "attachment-notice": Ge.value,
17494
17494
  "voice-enabled": _t.value,
17495
- "queue-enabled": T(z),
17495
+ "queue-enabled": E(z),
17496
17496
  "answer-notices": Ke.value,
17497
- onStopGeneration: T(xe),
17498
- onSubmit: T(be),
17499
- onFileSelect: T(je),
17500
- onDismissAttachmentNotice: T(Me),
17501
- onDismissPageNotice: T(Ne),
17502
- onOpenAnswerNotice: T(Re),
17503
- onDismissAnswerNotice: T(ze),
17497
+ onStopGeneration: E(xe),
17498
+ onSubmit: E(be),
17499
+ onFileSelect: E(je),
17500
+ onDismissAttachmentNotice: E(Me),
17501
+ onDismissPageNotice: E(Ne),
17502
+ onOpenAnswerNotice: E(Re),
17503
+ onDismissAnswerNotice: E(ze),
17504
17504
  onVoiceStart: wt
17505
17505
  }, ge({ _: 2 }, [e.modifier === "fullscreen" ? {
17506
17506
  name: "prepend",
17507
17507
  fn: B(() => [H("span", Qb, [F(O_, {
17508
17508
  modifiers: "surface",
17509
17509
  class: "pk-chatbot-view-chat__agent-chip-avatar",
17510
- "img-src": T(h)?.logo,
17511
- name: T(m).name
17512
- }, null, 8, ["img-src", "name"]), T(m).name ? (P(), Z("strong", $b, N(T(m).name), 1)) : q("", !0)])]),
17510
+ "img-src": E(h)?.logo,
17511
+ name: E(m).name
17512
+ }, null, 8, ["img-src", "name"]), E(m).name ? (P(), Z("strong", $b, N(E(m).name), 1)) : q("", !0)])]),
17513
17513
  key: "0"
17514
17514
  } : void 0]), 1032, [
17515
17515
  "modelValue",
@@ -17537,11 +17537,11 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17537
17537
  state: vt.value,
17538
17538
  sample: St,
17539
17539
  spectrum: Ct,
17540
- "remaining-seconds": T(gt).remainingSeconds.value,
17540
+ "remaining-seconds": E(gt).remainingSeconds.value,
17541
17541
  muted: tt.value,
17542
17542
  error: yt.value,
17543
- "raw-error": T(gt).error.value,
17544
- live: T(gt).isActive.value,
17543
+ "raw-error": E(gt).error.value,
17544
+ live: E(gt).isActive.value,
17545
17545
  class: "pk-chatbot-view-chat__voice",
17546
17546
  onToggleMute: Rt,
17547
17547
  onHangUp: Tt,
@@ -17557,10 +17557,10 @@ var Xb = { class: "pk-chatbot-view-chat__input-stage" }, Zb = {
17557
17557
  ]))
17558
17558
  ]),
17559
17559
  F(K, null, {
17560
- default: B(() => [T(et) && ye.value?.enabled ? (P(), Z("div", ex, [F(_, {
17560
+ default: B(() => [E(et) && ye.value?.enabled ? (P(), Z("div", ex, [F(_, {
17561
17561
  name: "ri:upload-cloud-2-line",
17562
17562
  class: "pk-chatbot-view-chat__drop-overlay-icon"
17563
- }), H("span", null, N(T(Be)("action.dropFile")), 1)])) : q("", !0)]),
17563
+ }), H("span", null, N(E(Be)("action.dropFile")), 1)])) : q("", !0)]),
17564
17564
  _: 1
17565
17565
  })
17566
17566
  ], 2);
@@ -17596,58 +17596,58 @@ var ox = { class: "flex flex-col flex-1 min-h-0 relative" }, sx = {
17596
17596
  f.value || (o.value = e, c("chat"));
17597
17597
  }, b = (e) => o.value === e.id, x = (e, t) => on(qe(e.filter((e) => e.role === t).slice(-1)[0]) || ""), S = (e) => {
17598
17598
  m(e, x(e.messages, "assistant"));
17599
- }, { openDialogConfirm: ee } = Hf(), w = te(h_, void 0), E = U(() => !!w?.eraseConversations && !(w.isExternalAuth?.value ?? !1)), ne = W(!1), D = async () => {
17600
- let e = w?.eraseConversations;
17601
- if (e && E.value && await ee({
17599
+ }, { openDialogConfirm: C } = Hf(), T = ee(h_, void 0), D = U(() => !!T?.eraseConversations && !(T.isExternalAuth?.value ?? !1)), te = W(!1), O = async () => {
17600
+ let e = T?.eraseConversations;
17601
+ if (e && D.value && await C({
17602
17602
  title: n("confirmTitle.deleteMyConversations"),
17603
17603
  questionLabel: n("message.deleteMyConversationsConfirm")
17604
17604
  })) {
17605
- ne.value = !0;
17605
+ te.value = !0;
17606
17606
  try {
17607
17607
  await e(), i.value = [], l();
17608
17608
  } catch {
17609
17609
  r.loadConversations(t.agentId);
17610
17610
  } finally {
17611
- ne.value = !1;
17611
+ te.value = !1;
17612
17612
  }
17613
17613
  }
17614
17614
  };
17615
17615
  return (e, t) => {
17616
17616
  let r = Cn, o = Tn, c = yn, u = gn, d = bn, m = wn;
17617
- return P(), Z("div", ox, [T(a) && T(i).length === 0 ? (P(), Z("div", sx, [H("div", cx, [(P(), Z(V, null, C(5, (e) => H("div", {
17617
+ return P(), Z("div", ox, [E(a) && E(i).length === 0 ? (P(), Z("div", sx, [H("div", cx, [(P(), Z(V, null, w(5, (e) => H("div", {
17618
17618
  key: e,
17619
17619
  class: "vv-item vv-item--roomy vv-item--plain"
17620
17620
  }, [H("div", lx, [H("div", ux, [
17621
17621
  H("div", { class: de(["vv-skeleton h-16 rounded", e % 2 ? "w-192" : "w-128"]) }, [...t[5] ||= [H("div", { class: "vv-skeleton__item" }, null, -1)]], 2),
17622
17622
  t[6] ||= H("div", { class: "vv-skeleton h-12 rounded" }, [H("div", { class: "vv-skeleton__item" })], -1),
17623
17623
  t[7] ||= H("div", { class: "vv-skeleton h-12 rounded w-160" }, [H("div", { class: "vv-skeleton__item" })], -1)
17624
- ])])])), 64))])])) : T(i).length === 0 ? (P(), Z("div", dx, [
17624
+ ])])])), 64))])])) : E(i).length === 0 ? (P(), Z("div", dx, [
17625
17625
  H("div", fx, [F(r, {
17626
17626
  name: "ri:chat-3-line",
17627
17627
  class: "w-28 h-28 text-word-4"
17628
17628
  })]),
17629
- H("div", px, [H("strong", mx, N(T(n)("message.noConversations")), 1), H("span", hx, N(T(n)("message.noConversationsHint")), 1)]),
17629
+ H("div", px, [H("strong", mx, N(E(n)("message.noConversations")), 1), H("span", hx, N(E(n)("message.noConversationsHint")), 1)]),
17630
17630
  F(o, {
17631
17631
  modifiers: "primary rounded",
17632
17632
  icon: "ri:add-line",
17633
17633
  class: "mt-8",
17634
- label: T(n)("action.startNewChat"),
17635
- onClick: t[0] ||= (e) => T(l)()
17634
+ label: E(n)("action.startNewChat"),
17635
+ onClick: t[0] ||= (e) => E(l)()
17636
17636
  }, null, 8, ["label"])
17637
- ])) : (P(), Z("div", gx, [H("ul", _x, [(P(!0), Z(V, null, C(T(i), (e) => (P(), Z("li", {
17637
+ ])) : (P(), Z("div", gx, [H("ul", _x, [(P(!0), Z(V, null, w(E(i), (e) => (P(), Z("li", {
17638
17638
  key: e.id,
17639
17639
  class: de(["vv-item vv-item--roomy", { "vv-item--current": b(e) }])
17640
- }, [T(f) === e.id ? (P(), Z("div", vx, [F(c, {
17641
- modelValue: T(p),
17640
+ }, [E(f) === e.id ? (P(), Z("div", vx, [F(c, {
17641
+ modelValue: E(p),
17642
17642
  "onUpdate:modelValue": t[1] ||= (e) => Ce(p) ? p.value = e : null,
17643
17643
  class: "flex-1 mb-0",
17644
17644
  modifiers: "compact",
17645
17645
  autofocus: "",
17646
17646
  "select-on-focus": "",
17647
17647
  maxlength: 255,
17648
- "aria-label": T(n)("placeholder.insert"),
17649
- placeholder: T(n)("placeholder.insert"),
17650
- onKeydown: (t) => T(_)(t, e.id)
17648
+ "aria-label": E(n)("placeholder.insert"),
17649
+ placeholder: E(n)("placeholder.insert"),
17650
+ onKeydown: (t) => E(_)(t, e.id)
17651
17651
  }, null, 8, [
17652
17652
  "modelValue",
17653
17653
  "aria-label",
@@ -17656,14 +17656,14 @@ var ox = { class: "flex flex-col flex-1 min-h-0 relative" }, sx = {
17656
17656
  ]), F(u, { modifiers: "compact" }, {
17657
17657
  default: B(() => [F(o, {
17658
17658
  icon: "ri:save-line",
17659
- title: T(n)("action.save"),
17659
+ title: E(n)("action.save"),
17660
17660
  modifiers: "action-quiet-small",
17661
- onClick: (t) => T(h)(e.id)
17661
+ onClick: (t) => E(h)(e.id)
17662
17662
  }, null, 8, ["title", "onClick"]), F(o, {
17663
17663
  icon: "ri:close-line",
17664
- title: T(n)("action.cancel"),
17664
+ title: E(n)("action.cancel"),
17665
17665
  modifiers: "action-quiet-small",
17666
- onClick: t[2] ||= (e) => T(g)()
17666
+ onClick: t[2] ||= (e) => E(g)()
17667
17667
  }, null, 8, ["title"])]),
17668
17668
  _: 2
17669
17669
  }, 1024)])) : (P(), Z(V, { key: 1 }, [H("button", {
@@ -17672,20 +17672,20 @@ var ox = { class: "flex flex-col flex-1 min-h-0 relative" }, sx = {
17672
17672
  "aria-current": b(e) ? "true" : void 0,
17673
17673
  onClick: (t) => y(e.id)
17674
17674
  }, [H("div", bx, [H("div", xx, [
17675
- H("strong", Sx, N(T(on)(e.title) || x(e.messages, "assistant")), 1),
17676
- T(s).includes(e.id) ? (P(), L(r, {
17675
+ H("strong", Sx, N(E(on)(e.title) || x(e.messages, "assistant")), 1),
17676
+ E(s).includes(e.id) ? (P(), L(r, {
17677
17677
  key: 0,
17678
17678
  name: "loading-loop",
17679
17679
  role: "img",
17680
- title: T(n)("label.answeringInBackground"),
17681
- "aria-label": T(n)("label.answeringInBackground"),
17680
+ title: E(n)("label.answeringInBackground"),
17681
+ "aria-label": E(n)("label.answeringInBackground"),
17682
17682
  class: "w-16 h-16 shrink-0 text-word-3"
17683
17683
  }, null, 8, ["title", "aria-label"])) : q("", !0),
17684
17684
  F(dv, {
17685
17685
  class: "text-word-4 text-smaller shrink-0",
17686
17686
  date: e.lastMessageAt
17687
17687
  }, null, 8, ["date"])
17688
- ]), H("span", Cx, N(T(on)(T(Ge)(e.summary, T(n))) || x(e.messages, "user")), 1)])], 8, yx), H("div", wx, [F(m, oe({ ref_for: !0 }, {
17688
+ ]), H("span", Cx, N(E(on)(E(Ge)(e.summary, E(n))) || x(e.messages, "user")), 1)])], 8, yx), H("div", wx, [F(m, oe({ ref_for: !0 }, {
17689
17689
  placement: "bottom-end",
17690
17690
  modifiers: "menu",
17691
17691
  flip: !0,
@@ -17693,33 +17693,33 @@ var ox = { class: "flex flex-col flex-1 min-h-0 relative" }, sx = {
17693
17693
  strategy: "fixed"
17694
17694
  }), {
17695
17695
  items: B(() => [F(d, { onClick: (t) => S(e) }, {
17696
- default: B(() => [F(r, { name: "ri:pencil-line" }), Ne(" " + N(T(n)("action.renameChat")), 1)]),
17696
+ default: B(() => [F(r, { name: "ri:pencil-line" }), Ne(" " + N(E(n)("action.renameChat")), 1)]),
17697
17697
  _: 1
17698
- }, 8, ["onClick"]), F(d, { onClick: (t) => T(v)(e.id) }, {
17699
- default: B(() => [F(r, { name: "ri:delete-bin-line" }), Ne(" " + N(T(n)("action.delete")), 1)]),
17698
+ }, 8, ["onClick"]), F(d, { onClick: (t) => E(v)(e.id) }, {
17699
+ default: B(() => [F(r, { name: "ri:delete-bin-line" }), Ne(" " + N(E(n)("action.delete")), 1)]),
17700
17700
  _: 1
17701
17701
  }, 8, ["onClick"])]),
17702
17702
  default: B(() => [F(o, {
17703
17703
  icon: "ri:more-2-fill",
17704
- title: T(n)("action.moreActions"),
17704
+ title: E(n)("action.moreActions"),
17705
17705
  modifiers: "action-quiet-small"
17706
17706
  }, null, 8, ["title"])]),
17707
17707
  _: 2
17708
- }, 1040)])], 64))], 2))), 128))])])), T(i).length > 0 ? (P(), Z("div", Tx, [F(o, {
17708
+ }, 1040)])], 64))], 2))), 128))])])), E(i).length > 0 ? (P(), Z("div", Tx, [F(o, {
17709
17709
  class: "text-14 pointer-events-auto",
17710
17710
  modifiers: "primary rounded",
17711
17711
  icon: "ri:add-line",
17712
- label: T(n)("action.startNewChat"),
17713
- onClick: t[3] ||= ve((e) => T(l)(), ["stop"])
17714
- }, null, 8, ["label"]), E.value ? (P(), L(o, {
17712
+ label: E(n)("action.startNewChat"),
17713
+ onClick: t[3] ||= ve((e) => E(l)(), ["stop"])
17714
+ }, null, 8, ["label"]), D.value ? (P(), L(o, {
17715
17715
  key: 0,
17716
17716
  class: "text-12 pointer-events-auto",
17717
17717
  modifiers: "action-quiet-danger",
17718
17718
  icon: "ri:delete-bin-line",
17719
- loading: ne.value,
17720
- disabled: ne.value,
17721
- label: T(n)("action.deleteMyConversations"),
17722
- onClick: t[4] ||= ve((e) => D(), ["stop"])
17719
+ loading: te.value,
17720
+ disabled: te.value,
17721
+ label: E(n)("action.deleteMyConversations"),
17722
+ onClick: t[4] ||= ve((e) => O(), ["stop"])
17723
17723
  }, null, 8, [
17724
17724
  "loading",
17725
17725
  "disabled",
@@ -17758,40 +17758,40 @@ var Dx = { class: "flex flex-col flex-1 min-h-0 relative" }, Ox = {
17758
17758
  };
17759
17759
  return (e, t) => {
17760
17760
  let r = Cn, i = Tn;
17761
- return P(), Z("div", Dx, [T(o) && T(a).length === 0 ? (P(), Z("div", Ox, [H("div", kx, [(P(), Z(V, null, C(4, (e) => H("div", {
17761
+ return P(), Z("div", Dx, [E(o) && E(a).length === 0 ? (P(), Z("div", Ox, [H("div", kx, [(P(), Z(V, null, w(4, (e) => H("div", {
17762
17762
  key: e,
17763
17763
  class: "vv-item vv-item--roomy vv-item--plain"
17764
- }, [H("div", Ax, [t[2] ||= H("div", { class: "vv-skeleton w-36 h-36 shrink-0 rounded-md" }, [H("div", { class: "vv-skeleton__item" })], -1), H("div", jx, [H("div", { class: de(["vv-skeleton h-14 rounded", e % 2 ? "w-192" : "w-128"]) }, [...t[0] ||= [H("div", { class: "vv-skeleton__item" }, null, -1)]], 2), t[1] ||= H("div", { class: "vv-skeleton h-12 rounded w-96" }, [H("div", { class: "vv-skeleton__item" })], -1)])])])), 64))])])) : T(a).length === 0 ? (P(), Z("div", Mx, [H("div", Nx, [F(r, {
17764
+ }, [H("div", Ax, [t[2] ||= H("div", { class: "vv-skeleton w-36 h-36 shrink-0 rounded-md" }, [H("div", { class: "vv-skeleton__item" })], -1), H("div", jx, [H("div", { class: de(["vv-skeleton h-14 rounded", e % 2 ? "w-192" : "w-128"]) }, [...t[0] ||= [H("div", { class: "vv-skeleton__item" }, null, -1)]], 2), t[1] ||= H("div", { class: "vv-skeleton h-12 rounded w-96" }, [H("div", { class: "vv-skeleton__item" })], -1)])])])), 64))])])) : E(a).length === 0 ? (P(), Z("div", Mx, [H("div", Nx, [F(r, {
17765
17765
  name: "ri:folder-open-line",
17766
17766
  class: "w-28 h-28 text-word-4"
17767
- })]), H("span", Px, N(T(n)("userFiles.chatFilesEmpty")), 1)])) : (P(), Z("div", Fx, [H("ul", Ix, [(P(!0), Z(V, null, C(T(a), (e) => (P(), Z("li", {
17767
+ })]), H("span", Px, N(E(n)("userFiles.chatFilesEmpty")), 1)])) : (P(), Z("div", Fx, [H("ul", Ix, [(P(!0), Z(V, null, w(E(a), (e) => (P(), Z("li", {
17768
17768
  key: e.documentId,
17769
17769
  class: "vv-item vv-item--roomy"
17770
17770
  }, [H("button", {
17771
17771
  type: "button",
17772
17772
  class: "vv-item__entry",
17773
- title: T(n)("userFiles.open"),
17774
- onClick: (t) => T(u)(e)
17775
- }, [H("span", Rx, [T(s)(e) ? (P(), Z("img", {
17773
+ title: E(n)("userFiles.open"),
17774
+ onClick: (t) => E(u)(e)
17775
+ }, [H("span", Rx, [E(s)(e) ? (P(), Z("img", {
17776
17776
  key: 0,
17777
- src: T(c)(e),
17777
+ src: E(c)(e),
17778
17778
  loading: "lazy",
17779
17779
  decoding: "async",
17780
17780
  alt: "",
17781
17781
  class: "pk-chatbot-files__thumb",
17782
- onError: (t) => T(l)(e)
17782
+ onError: (t) => E(l)(e)
17783
17783
  }, null, 40, zx)) : (P(), L(r, {
17784
17784
  key: 1,
17785
- name: T(an)(e.mimeType)
17786
- }, null, 8, ["name"]))]), H("span", Bx, [H("span", Vx, N(e.name || T(n)("userFiles.untitled")), 1), H("span", Hx, N([T(d)(e.createdAt), T(f)(e)].filter(Boolean).join(" · ")), 1)])], 8, Lx), H("div", Ux, [F(i, {
17785
+ name: E(an)(e.mimeType)
17786
+ }, null, 8, ["name"]))]), H("span", Bx, [H("span", Vx, N(e.name || E(n)("userFiles.untitled")), 1), H("span", Hx, N([E(d)(e.createdAt), E(f)(e)].filter(Boolean).join(" · ")), 1)])], 8, Lx), H("div", Ux, [F(i, {
17787
17787
  modifiers: "action-quiet-small",
17788
17788
  icon: "ri:download-line",
17789
- title: T(n)("action.download"),
17790
- onClick: (t) => T(u)(e, !0)
17789
+ title: E(n)("action.download"),
17790
+ onClick: (t) => E(u)(e, !0)
17791
17791
  }, null, 8, ["title", "onClick"]), F(i, {
17792
17792
  modifiers: "action-quiet-small",
17793
17793
  icon: "ri:delete-bin-line",
17794
- title: T(p)(e),
17794
+ title: E(p)(e),
17795
17795
  loading: h.value === e.documentId,
17796
17796
  disabled: h.value === e.documentId,
17797
17797
  onClick: (t) => g(e)
@@ -17819,7 +17819,7 @@ var Gx = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, Kx = { class
17819
17819
  __name: "PkChatbotViewProfile",
17820
17820
  props: { agentId: { type: String } },
17821
17821
  setup(e) {
17822
- let t = e, { t: n } = Le({ useScope: "global" }), { name: r, agentInterface: i } = pr(Mf(t.agentId)), a = te(h_, void 0), o = U(() => a?.user.value ?? null), s = U(() => a?.canManageProfile.value ?? !1), c = U(() => a?.profileUrl.value), l = U(() => a?.isExternalAuth?.value ?? !1), u = W(!1), d = W();
17822
+ let t = e, { t: n } = Le({ useScope: "global" }), { name: r, agentInterface: i } = pr(Mf(t.agentId)), a = ee(h_, void 0), o = U(() => a?.user.value ?? null), s = U(() => a?.canManageProfile.value ?? !1), c = U(() => a?.profileUrl.value), l = U(() => a?.isExternalAuth?.value ?? !1), u = W(!1), d = W();
17823
17823
  async function f() {
17824
17824
  if (a) {
17825
17825
  u.value = !0;
@@ -17838,9 +17838,9 @@ var Gx = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, Kx = { class
17838
17838
  H("div", Kx, [F(O_, {
17839
17839
  modifiers: "surface ring",
17840
17840
  class: "w-64 h-64",
17841
- name: o.value?.name ?? T(r),
17842
- "img-src": o.value?.image ?? T(i)?.logo
17843
- }, null, 8, ["name", "img-src"]), H("div", qx, [o.value?.name ?? T(r) ? (P(), Z("strong", Jx, N(o.value?.name ?? T(r)), 1)) : q("", !0), o.value?.email ? (P(), Z("span", Yx, N(o.value.email), 1)) : q("", !0)])]),
17841
+ name: o.value?.name ?? E(r),
17842
+ "img-src": o.value?.image ?? E(i)?.logo
17843
+ }, null, 8, ["name", "img-src"]), H("div", qx, [o.value?.name ?? E(r) ? (P(), Z("strong", Jx, N(o.value?.name ?? E(r)), 1)) : q("", !0), o.value?.email ? (P(), Z("span", Yx, N(o.value.email), 1)) : q("", !0)])]),
17844
17844
  H("div", Xx, [d.value ? (P(), L(a, {
17845
17845
  key: 0,
17846
17846
  modifiers: "danger",
@@ -17856,7 +17856,7 @@ var Gx = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, Kx = { class
17856
17856
  name: "ri:user-settings-line",
17857
17857
  class: "w-20 h-20 text-word-2"
17858
17858
  })]),
17859
- H("div", $x, [H("span", eS, N(T(n)("action.manageProfile")), 1), H("span", tS, N(T(n)("label.manageProfileDescription")), 1)]),
17859
+ H("div", $x, [H("span", eS, N(E(n)("action.manageProfile")), 1), H("span", tS, N(E(n)("label.manageProfileDescription")), 1)]),
17860
17860
  F(p, {
17861
17861
  name: "ri:arrow-right-s-line",
17862
17862
  class: "w-16 h-16 text-word-4 shrink-0"
@@ -17868,7 +17868,7 @@ var Gx = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, Kx = { class
17868
17868
  icon: "ri:logout-box-line",
17869
17869
  loading: u.value,
17870
17870
  disabled: u.value,
17871
- label: T(n)("action.signOut"),
17871
+ label: E(n)("action.signOut"),
17872
17872
  onClick: f
17873
17873
  }, null, 8, [
17874
17874
  "loading",
@@ -17937,8 +17937,8 @@ var iS = { class: "pk-chatbot__header-start" }, aS = ["title"], oS = { key: 1 },
17937
17937
  An((e) => c.apiClient.resolveShortUrls(e));
17938
17938
  let { messages: l, localChatId: u, activeView: d, chatError: f, isDark: p, pageAccessAvailable: m, pageAccessOff: h } = pr(c), g = Pe(c, "agentId"), { startNewChat: _, stopGeneration: v, regenerate: y, navigate: b, sendMessage: x, setPageAccessOff: S } = c;
17939
17939
  Nn(() => a.agentInterface?.imageHosts, () => a.baseUrl);
17940
- let ee = te(h_, void 0), w = U(() => ee?.canManageProfile.value ?? !1), E = U(() => !w.value && (ee?.canSignIn?.value ?? !1) && r["view-auth"] !== void 0);
17941
- I(w, (e) => {
17940
+ let C = ee(h_, void 0), T = U(() => C?.canManageProfile.value ?? !1), D = U(() => !T.value && (C?.canSignIn?.value ?? !1) && r["view-auth"] !== void 0);
17941
+ I(T, (e) => {
17942
17942
  e && d.value === "auth" && b("chat");
17943
17943
  }), ce(() => {
17944
17944
  c.baseUrl = a.baseUrl, c.basePath = a.basePath, c.name = a.name, c.agentType = a.agentType, c.userId = a.userId, c.agentInterface = a.agentInterface, c.agentModel = a.agentModel, c.agentTools = a.agentTools, c.headers = a.headers, c.revisedAnswers = a.revisedAnswers, c.model = a.model, c.actionsInput = a.actions, c.agentFileUpload = a.agentFileUpload, c.agentVoice = a.voice, c.fallbackModels = a.fallbackModels, c.gatewayOptions = a.gatewayOptions, c.externalContext = a.externalContext, c.agentHostTools = a.hostTools, c.hostToolRegistry = a.hostToolRegistry, c.agentPageAccess = a.pageAccess, c.pageToolRegistry = a.pageToolRegistry, c.pageFormsProvider = a.pageForms, c.systemTheme = a.systemTheme, c.hideWelcomeMessage = a.modifier === "fullscreen";
@@ -17952,7 +17952,7 @@ var iS = { class: "pk-chatbot__header-start" }, aS = ["title"], oS = { key: 1 },
17952
17952
  o("error", t);
17953
17953
  } catch {}
17954
17954
  });
17955
- let re = U(() => a.modifier === "fullscreen"), k = U(() => a.modifier === "panel"), ie = me("chatbotEl"), { width: j } = fn(ie), ae = U(() => j.value > 0 && j.value < 576), M = U(() => j.value > 0 && j.value < 640), se = U(() => j.value >= 848), le = U(() => a.agentType === "reasoning"), ue = U(() => le.value && !l.value.some((e) => e.role === "user")), fe = U(() => !k.value && a.agentInterface?.useColorsForAgentHeader), he = U(() => !k.value || w.value || E.value || m.value || !!a.userFilesEnabled && !!u.value), R = U(() => ["theme", `theme--${p.value ? "dark" : "light"}`]), z = U(() => a.agentInterface?.mainColor), _e = U(() => He(a.agentInterface?.textColor, z.value)), ve = U(() => vt(z.value, _e.value)), ye = Dn(() => a.agentInterface?.footerMessage), be = U(() => d.value === "conversations" ? i("label.conversations") : d.value === "profile" ? i("label.profile") : d.value === "auth" ? i("label.authentication") : d.value === "files" ? i("userFiles.chatFilesTitle") : a.name), W = U(() => l.value?.[l.value.length - 1]);
17955
+ let ne = U(() => a.modifier === "fullscreen"), re = U(() => a.modifier === "panel"), ie = me("chatbotEl"), { width: j } = fn(ie), ae = U(() => j.value > 0 && j.value < 576), M = U(() => j.value > 0 && j.value < 640), se = U(() => j.value >= 848), le = U(() => a.agentType === "reasoning"), ue = U(() => le.value && !l.value.some((e) => e.role === "user")), fe = U(() => !re.value && a.agentInterface?.useColorsForAgentHeader), he = U(() => !re.value || T.value || D.value || m.value || !!a.userFilesEnabled && !!u.value), R = U(() => ["theme", `theme--${p.value ? "dark" : "light"}`]), z = U(() => a.agentInterface?.mainColor), _e = U(() => He(a.agentInterface?.textColor, z.value)), ve = U(() => vt(z.value, _e.value)), ye = Dn(() => a.agentInterface?.footerMessage), be = U(() => d.value === "conversations" ? i("label.conversations") : d.value === "profile" ? i("label.profile") : d.value === "auth" ? i("label.authentication") : d.value === "files" ? i("userFiles.chatFilesTitle") : a.name), W = U(() => l.value?.[l.value.length - 1]);
17956
17956
  return t({
17957
17957
  startNewChat: _,
17958
17958
  regenerate: y,
@@ -17973,19 +17973,19 @@ var iS = { class: "pk-chatbot__header-start" }, aS = ["title"], oS = { key: 1 },
17973
17973
  ref_key: "chatbotEl",
17974
17974
  ref: ie,
17975
17975
  class: de(["pk-chatbot", [R.value, {
17976
- "pk-chatbot--fullscreen": re.value,
17977
- "pk-chatbot--panel": k.value,
17976
+ "pk-chatbot--fullscreen": ne.value,
17977
+ "pk-chatbot--panel": re.value,
17978
17978
  "pk-chatbot--phone": ae.value,
17979
17979
  "pk-chatbot--tight": M.value,
17980
17980
  "pk-chatbot--wide": se.value
17981
17981
  }]]),
17982
- style: ne(ve.value)
17982
+ style: te(ve.value)
17983
17983
  }, [
17984
- re.value ? q("", !0) : (P(), Z("div", {
17984
+ ne.value ? q("", !0) : (P(), Z("div", {
17985
17985
  key: 0,
17986
17986
  class: "pk-chatbot__header",
17987
- style: ne(fe.value ? { backgroundColor: z.value } : void 0)
17988
- }, [H("div", iS, [T(d) === "chat" ? k.value ? q("", !0) : (P(), L(O_, {
17987
+ style: te(fe.value ? { backgroundColor: z.value } : void 0)
17988
+ }, [H("div", iS, [E(d) === "chat" ? re.value ? q("", !0) : (P(), L(O_, {
17989
17989
  key: 1,
17990
17990
  modifiers: "surface ring shrink-0",
17991
17991
  class: "pk-chatbot__avatar",
@@ -17994,40 +17994,40 @@ var iS = { class: "pk-chatbot__header-start" }, aS = ["title"], oS = { key: 1 },
17994
17994
  }, null, 8, ["name", "img-src"])) : (P(), Z(V, { key: 0 }, [F(a, oe({
17995
17995
  modifiers: fe.value ? `action-quiet-${_e.value}` : "action-quiet",
17996
17996
  icon: "ri:arrow-left-s-line",
17997
- title: T(i)("action.goBack")
17998
- }, { onClick: n[0] ||= (e) => T(b)("chat") }), null, 16), F(s, {
17999
- name: T(d) === "conversations" ? "ri:history-line" : T(d) === "files" ? "ri:attachment-2" : "ri:user-line",
17997
+ title: E(i)("action.goBack")
17998
+ }, { onClick: n[0] ||= (e) => E(b)("chat") }), null, 16), F(s, {
17999
+ name: E(d) === "conversations" ? "ri:history-line" : E(d) === "files" ? "ri:attachment-2" : "ri:user-line",
18000
18000
  class: "pk-chatbot__nav-icon",
18001
- style: ne(fe.value ? { color: _e.value } : void 0)
18001
+ style: te(fe.value ? { color: _e.value } : void 0)
18002
18002
  }, null, 8, ["name", "style"])], 64)), H("strong", {
18003
18003
  class: "pk-chatbot__title",
18004
18004
  title: be.value,
18005
- style: ne(fe.value ? { color: _e.value } : void 0)
18005
+ style: te(fe.value ? { color: _e.value } : void 0)
18006
18006
  }, N(be.value), 13, aS)]), F(f, {
18007
18007
  class: "pk-chatbot__header-end",
18008
18008
  modifiers: "compact"
18009
18009
  }, {
18010
18010
  default: B(() => [
18011
- pe(t.$slots, "header-actions", O(D({
18011
+ pe(t.$slots, "header-actions", k(O({
18012
18012
  mainColor: z.value,
18013
18013
  useColorsForAgentHeader: fe.value,
18014
18014
  contrastColor: _e.value,
18015
- startNewChat: T(_),
18016
- stopGeneration: T(v)
18015
+ startNewChat: E(_),
18016
+ stopGeneration: E(v)
18017
18017
  }))),
18018
- k.value ? (P(), Z(V, { key: 0 }, [F(a, {
18018
+ re.value ? (P(), Z(V, { key: 0 }, [F(a, {
18019
18019
  modifiers: fe.value ? `action-quiet-${_e.value}` : "action-quiet",
18020
18020
  icon: "ri:edit-box-line",
18021
- title: T(i)("action.startNewChat"),
18022
- onClick: n[1] ||= (e) => T(_)()
18021
+ title: E(i)("action.startNewChat"),
18022
+ onClick: n[1] ||= (e) => E(_)()
18023
18023
  }, null, 8, ["modifiers", "title"]), le.value ? q("", !0) : (P(), L(a, {
18024
18024
  key: 0,
18025
18025
  modifiers: fe.value ? `action-quiet-${_e.value}` : "action-quiet",
18026
18026
  icon: "ri:history-line",
18027
- title: T(i)("action.viewRecentChats"),
18028
- onClick: n[2] ||= (e) => T(b)("conversations")
18027
+ title: E(i)("action.viewRecentChats"),
18028
+ onClick: n[2] ||= (e) => E(b)("conversations")
18029
18029
  }, null, 8, ["modifiers", "title"]))], 64)) : q("", !0),
18030
- he.value ? (P(), L(l, O(oe({ key: 1 }, {
18030
+ he.value ? (P(), L(l, k(oe({ key: 1 }, {
18031
18031
  placement: "bottom-end",
18032
18032
  modifiers: "menu",
18033
18033
  flip: !0,
@@ -18035,61 +18035,61 @@ var iS = { class: "pk-chatbot__header-start" }, aS = ["title"], oS = { key: 1 },
18035
18035
  strategy: "fixed"
18036
18036
  })), {
18037
18037
  items: B(() => [
18038
- k.value ? q("", !0) : (P(), L(c, {
18038
+ re.value ? q("", !0) : (P(), L(c, {
18039
18039
  key: 0,
18040
- onClick: n[3] ||= (e) => T(_)()
18040
+ onClick: n[3] ||= (e) => E(_)()
18041
18041
  }, {
18042
- default: B(() => [F(s, { name: "ri:edit-box-line" }), Ne(" " + N(T(i)("action.startNewChat")), 1)]),
18042
+ default: B(() => [F(s, { name: "ri:edit-box-line" }), Ne(" " + N(E(i)("action.startNewChat")), 1)]),
18043
18043
  _: 1
18044
18044
  })),
18045
- !le.value && !k.value ? (P(), L(c, {
18045
+ !le.value && !re.value ? (P(), L(c, {
18046
18046
  key: 1,
18047
- onClick: n[4] ||= (e) => T(b)("conversations")
18047
+ onClick: n[4] ||= (e) => E(b)("conversations")
18048
18048
  }, {
18049
- default: B(() => [F(s, { name: "ri:history-line" }), Ne(" " + N(T(i)("action.viewRecentChats")), 1)]),
18049
+ default: B(() => [F(s, { name: "ri:history-line" }), Ne(" " + N(E(i)("action.viewRecentChats")), 1)]),
18050
18050
  _: 1
18051
18051
  })) : q("", !0),
18052
- (w.value || e.userFilesEnabled) && T(u) ? (P(), L(c, {
18052
+ (T.value || e.userFilesEnabled) && E(u) ? (P(), L(c, {
18053
18053
  key: 2,
18054
- onClick: n[5] ||= (e) => T(b)("files")
18054
+ onClick: n[5] ||= (e) => E(b)("files")
18055
18055
  }, {
18056
- default: B(() => [F(s, { name: "ri:attachment-2" }), Ne(" " + N(T(i)("userFiles.chatFilesTitle")), 1)]),
18056
+ default: B(() => [F(s, { name: "ri:attachment-2" }), Ne(" " + N(E(i)("userFiles.chatFilesTitle")), 1)]),
18057
18057
  _: 1
18058
18058
  })) : q("", !0),
18059
- T(m) ? (P(), L(c, {
18059
+ E(m) ? (P(), L(c, {
18060
18060
  key: 3,
18061
- onClick: n[6] ||= (e) => T(S)(!T(h))
18061
+ onClick: n[6] ||= (e) => E(S)(!E(h))
18062
18062
  }, {
18063
- default: B(() => [F(s, { name: T(h) ? "ri:pages-line" : "ri:forbid-line" }, null, 8, ["name"]), Ne(" " + N(T(h) ? T(i)("action.enablePageAccess") : T(i)("action.disablePageAccess")), 1)]),
18063
+ default: B(() => [F(s, { name: E(h) ? "ri:pages-line" : "ri:forbid-line" }, null, 8, ["name"]), Ne(" " + N(E(h) ? E(i)("action.enablePageAccess") : E(i)("action.disablePageAccess")), 1)]),
18064
18064
  _: 1
18065
18065
  })) : q("", !0),
18066
- w.value ? (P(), L(c, {
18066
+ T.value ? (P(), L(c, {
18067
18067
  key: 4,
18068
- onClick: n[7] ||= (e) => T(b)("profile")
18068
+ onClick: n[7] ||= (e) => E(b)("profile")
18069
18069
  }, {
18070
- default: B(() => [F(s, { name: "ri:user-line" }), Ne(" " + N(T(i)("label.profile")), 1)]),
18070
+ default: B(() => [F(s, { name: "ri:user-line" }), Ne(" " + N(E(i)("label.profile")), 1)]),
18071
18071
  _: 1
18072
- })) : E.value ? (P(), L(c, {
18072
+ })) : D.value ? (P(), L(c, {
18073
18073
  key: 5,
18074
- onClick: n[8] ||= (e) => T(b)("auth")
18074
+ onClick: n[8] ||= (e) => E(b)("auth")
18075
18075
  }, {
18076
- default: B(() => [F(s, { name: "ri:account-circle-line" }), Ne(" " + N(T(i)("action.signIn")), 1)]),
18076
+ default: B(() => [F(s, { name: "ri:account-circle-line" }), Ne(" " + N(E(i)("action.signIn")), 1)]),
18077
18077
  _: 1
18078
18078
  })) : q("", !0)
18079
18079
  ]),
18080
- default: B(() => [F(a, O(D({
18080
+ default: B(() => [F(a, k(O({
18081
18081
  modifiers: fe.value ? `action-quiet-${_e.value}` : "action-quiet",
18082
18082
  icon: "ri:more-2-fill",
18083
- title: T(i)("action.moreActions")
18083
+ title: E(i)("action.moreActions")
18084
18084
  })), null, 16)]),
18085
18085
  _: 1
18086
18086
  }, 16)) : q("", !0),
18087
- pe(t.$slots, "actions", O(D({
18087
+ pe(t.$slots, "actions", k(O({
18088
18088
  mainColor: z.value,
18089
18089
  useColorsForAgentHeader: fe.value,
18090
18090
  contrastColor: _e.value,
18091
- startNewChat: T(_),
18092
- stopGeneration: T(v)
18091
+ startNewChat: E(_),
18092
+ stopGeneration: E(v)
18093
18093
  })))
18094
18094
  ]),
18095
18095
  _: 3
@@ -18098,41 +18098,41 @@ var iS = { class: "pk-chatbot__header-start" }, aS = ["title"], oS = { key: 1 },
18098
18098
  default: B(() => [H("div", cS, [F(s, {
18099
18099
  name: "ri:alert-line",
18100
18100
  class: "pk-chatbot__warning-icon"
18101
- }), H("strong", lS, N(T(i)("message.warning")), 1)]), H("p", uS, N(T(i)("message.reasoningAgent")), 1)]),
18101
+ }), H("strong", lS, N(E(i)("message.warning")), 1)]), H("p", uS, N(E(i)("message.reasoningAgent")), 1)]),
18102
18102
  _: 1
18103
18103
  })])])) : q("", !0),
18104
- T(d) === "chat" ? (P(), L(ax, {
18104
+ E(d) === "chat" ? (P(), L(ax, {
18105
18105
  key: 2,
18106
18106
  "agent-id": e.agentId,
18107
18107
  modifier: e.modifier,
18108
18108
  "user-name": e.userName,
18109
18109
  onShowInfo: n[9] ||= (e) => o("show-info", e),
18110
18110
  onRevise: n[10] ||= (e) => o("revise", e)
18111
- }, ge({ _: 2 }, [C(Object.keys(T(r)), (e) => ({
18111
+ }, ge({ _: 2 }, [w(Object.keys(E(r)), (e) => ({
18112
18112
  name: e,
18113
- fn: B((n) => [pe(t.$slots, e, O(D(n)))])
18113
+ fn: B((n) => [pe(t.$slots, e, k(O(n)))])
18114
18114
  }))]), 1032, [
18115
18115
  "agent-id",
18116
18116
  "modifier",
18117
18117
  "user-name"
18118
- ])) : T(d) === "conversations" ? (P(), L(Ex, {
18118
+ ])) : E(d) === "conversations" ? (P(), L(Ex, {
18119
18119
  key: 3,
18120
18120
  "agent-id": e.agentId
18121
- }, ge({ _: 2 }, [C(Object.keys(T(r)), (e) => ({
18121
+ }, ge({ _: 2 }, [w(Object.keys(E(r)), (e) => ({
18122
18122
  name: e,
18123
- fn: B((n) => [pe(t.$slots, e, O(D(n)))])
18124
- }))]), 1032, ["agent-id"])) : T(d) === "files" ? (P(), L(Wx, {
18123
+ fn: B((n) => [pe(t.$slots, e, k(O(n)))])
18124
+ }))]), 1032, ["agent-id"])) : E(d) === "files" ? (P(), L(Wx, {
18125
18125
  key: 4,
18126
18126
  "agent-id": e.agentId
18127
- }, null, 8, ["agent-id"])) : T(d) === "auth" ? (P(), Z("div", dS, [pe(t.$slots, "view-auth")])) : (P(), L(rS, {
18127
+ }, null, 8, ["agent-id"])) : E(d) === "auth" ? (P(), Z("div", dS, [pe(t.$slots, "view-auth")])) : (P(), L(rS, {
18128
18128
  key: 6,
18129
18129
  "agent-id": e.agentId
18130
- }, ge({ _: 2 }, [C(Object.keys(T(r)), (e) => ({
18130
+ }, ge({ _: 2 }, [w(Object.keys(E(r)), (e) => ({
18131
18131
  name: e,
18132
- fn: B((n) => [pe(t.$slots, e, O(D(n)))])
18132
+ fn: B((n) => [pe(t.$slots, e, k(O(n)))])
18133
18133
  }))]), 1032, ["agent-id"])),
18134
- T(ye) ? (P(), Z("div", fS, [F(St, {
18135
- markdown: T(ye),
18134
+ E(ye) ? (P(), Z("div", fS, [F(St, {
18135
+ markdown: E(ye),
18136
18136
  class: "wysiwyg"
18137
18137
  }, null, 8, ["markdown"])])) : q("", !0)
18138
18138
  ], 6);
@@ -18194,15 +18194,15 @@ var _S = 16, vS = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18194
18194
  }, o = 0, s = () => {
18195
18195
  a(), o = requestAnimationFrame(s);
18196
18196
  };
18197
- return k(() => {
18197
+ return re(() => {
18198
18198
  r.value?.showModal(), s();
18199
- }), re(() => {
18199
+ }), ne(() => {
18200
18200
  cancelAnimationFrame(o);
18201
18201
  }), (t, a) => (P(), Z("dialog", {
18202
18202
  ref_key: "dialog",
18203
18203
  ref: r,
18204
18204
  class: de(["pk-host-call-confirm-dialog", { "pk-host-call-confirm-dialog--anchored": i.value }]),
18205
- style: ne(i.value),
18205
+ style: te(i.value),
18206
18206
  onCancel: a[1] ||= ve((e) => n("respond", !1), ["prevent"])
18207
18207
  }, [F(Sv, {
18208
18208
  question: e.question,
@@ -18217,20 +18217,20 @@ var yS = 300, bS = 50, xS = /* @__PURE__ */ new Set(["EMBEDDED-CHAT-WIDGET", "FL
18217
18217
  let e = [], t = document.activeElement;
18218
18218
  for (; t;) e.push(t), t = t.shadowRoot?.activeElement ?? null;
18219
18219
  return e;
18220
- }, TS = () => {
18221
- let e;
18220
+ }, TS = (e) => {
18221
+ let t = (t) => SS(t).filter((t) => !e?.(t)), n;
18222
18222
  try {
18223
- e = SS(document);
18224
- let t = e.length === 0 ? CS(document) : [];
18225
- for (let n = 0; e.length === 0 && t.length > 0 && n < bS; n++) {
18226
- let n = t.shift();
18227
- e = SS(n), t.push(...CS(n));
18223
+ n = t(document);
18224
+ let e = n.length === 0 ? CS(document) : [];
18225
+ for (let r = 0; n.length === 0 && e.length > 0 && r < bS; r++) {
18226
+ let r = e.shift();
18227
+ n = t(r), e.push(...CS(r));
18228
18228
  }
18229
18229
  } catch {
18230
18230
  return null;
18231
18231
  }
18232
- let t = wS();
18233
- return e.find((e) => t.some((t) => e.contains(t))) ?? e[e.length - 1] ?? null;
18232
+ let r = wS();
18233
+ return [...n].reverse().find((e) => r.some((t) => e.contains(t))) ?? n[n.length - 1] ?? null;
18234
18234
  };
18235
18235
  function ES(e) {
18236
18236
  let t = he(null), n, r = () => {
@@ -18322,18 +18322,213 @@ function PS(e, t, n) {
18322
18322
  p(), i = setInterval(p, yS);
18323
18323
  }, { immediate: !0 }), be(a);
18324
18324
  }
18325
+ var FS = 1e3, IS = 3, LS = 1e3, RS = "data-agent-studio-placeholder", zS = "a, button, input, label, select, summary, textarea, [contenteditable]", BS = "dialog[open], [popover]:popover-open", VS = [
18326
+ ["position", "fixed"],
18327
+ ["right", "auto"],
18328
+ ["bottom", "auto"],
18329
+ ["margin-top", "0"],
18330
+ ["margin-right", "0"],
18331
+ ["margin-bottom", "0"],
18332
+ ["margin-left", "0"],
18333
+ ["box-sizing", "border-box"],
18334
+ ["max-width", "none"],
18335
+ ["max-height", "none"],
18336
+ ["z-index", "2147483646"]
18337
+ ], HS = [
18338
+ "left",
18339
+ "top",
18340
+ "width",
18341
+ "height"
18342
+ ], US = () => typeof Element.prototype.moveBefore == "function", WS = (...e) => e.flatMap((e) => e.getAnimations?.() ?? []).filter((e) => e.playState === "running" && Number.isFinite(e.effect?.getComputedTiming().iterations ?? Infinity)), GS = (e) => WS(e).some((e) => {
18343
+ let t = e.effect;
18344
+ if (!t?.getKeyframes || e.playbackRate <= 0) return !1;
18345
+ let { iterations: n, direction: r } = t.getComputedTiming();
18346
+ if (n !== 1 || r !== "normal" && r !== "reverse") return !1;
18347
+ let i = t.getKeyframes(), a = r === "reverse" ? i[0] : i[i.length - 1];
18348
+ return !!a && "opacity" in a && Number(a.opacity) === 0;
18349
+ }), KS = (e) => GS(e) || [...e.children].some(GS), qS = (e, t) => e.width >= t.width * .95 && e.height >= t.height * .95, JS = (e) => {
18350
+ let t = e.getBoundingClientRect();
18351
+ if (!qS(t, {
18352
+ width: window.innerWidth,
18353
+ height: window.innerHeight
18354
+ })) return e;
18355
+ let n = (e) => {
18356
+ let n = e.getBoundingClientRect();
18357
+ return qS(n, t) ? 0 : n.width * n.height;
18358
+ }, r = [...e.children].filter((e) => n(e) > 0).sort((e, t) => n(t) - n(e))[0];
18359
+ return r && !r.matches(zS) ? r : e;
18360
+ }, YS = (e) => e.isConnected && !e.closest("[inert]") && e.getBoundingClientRect().width > 0, XS = (e, t, n) => {
18361
+ let r = t.shadowRoot, i = [...r?.querySelectorAll("*") ?? []].filter((e) => e.scrollTop > 0).map((e) => [e, e.scrollTop]), a = r?.activeElement, o = e;
18362
+ try {
18363
+ o.moveBefore(t, n);
18364
+ } catch {
18365
+ return !1;
18366
+ }
18367
+ for (let [e, t] of i) e.scrollTop = t;
18368
+ return a && r?.activeElement !== a && a.focus({ preventScroll: !0 }), !0;
18369
+ };
18370
+ function ZS(e, t) {
18371
+ let n = he(!1);
18372
+ if (!e || !US()) return n;
18373
+ let r = !1, i, a, o, s, c, l = {
18374
+ x: 0,
18375
+ y: 0
18376
+ }, u, d = 0, f, p, m, h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(), _ = () => {
18377
+ let t = [...VS.map(([e]) => e), ...HS].map((t) => [
18378
+ t,
18379
+ e.style.getPropertyValue(t),
18380
+ e.style.getPropertyPriority(t)
18381
+ ]);
18382
+ for (let [t, n] of VS) e.style.setProperty(t, n, "important");
18383
+ return () => {
18384
+ for (let [n, r, i] of t) r ? e.style.setProperty(n, r, i) : e.style.removeProperty(n);
18385
+ };
18386
+ }, v = (t, n) => {
18387
+ let r = `${n}px`;
18388
+ e.style.getPropertyValue(t) !== r && e.style.setProperty(t, r, "important");
18389
+ }, y = () => {
18390
+ let t = o.getBoundingClientRect();
18391
+ v("width", t.width), v("height", t.height);
18392
+ for (let n = 0; n < 2; n++) {
18393
+ v("left", t.left - l.x), v("top", t.top - l.y);
18394
+ let n = e.getBoundingClientRect(), r = n.left - t.left, i = n.top - t.top;
18395
+ if (Math.abs(r) < .5 && Math.abs(i) < .5) return;
18396
+ l = {
18397
+ x: l.x + r,
18398
+ y: l.y + i
18399
+ };
18400
+ }
18401
+ }, b = () => {
18402
+ let t = o.getBoundingClientRect(), n = e.getBoundingClientRect();
18403
+ if (![
18404
+ [n.left, t.left],
18405
+ [n.top, t.top],
18406
+ [n.width, t.width],
18407
+ [n.height, t.height]
18408
+ ].every(([e, t]) => Math.abs(e - t) < 1) || e.checkVisibility?.({
18409
+ opacityProperty: !0,
18410
+ visibilityProperty: !0
18411
+ }) === !1) return !1;
18412
+ let r = e.shadowRoot, i = (e) => !!r?.contains(e), a = (r ?? document).elementsFromPoint(n.left + n.width / 2, n.top + n.height / 2).find((e) => !(i(e) && e.closest(BS)));
18413
+ return !!a && (e.contains(a) || i(a));
18414
+ }, x = (t) => {
18415
+ if (t.key !== "Escape") return;
18416
+ let n = t.composedPath();
18417
+ n.slice(0, n.indexOf(e)).some((e) => e instanceof Element && e.matches(BS)) || t.preventDefault();
18418
+ }, S = () => {
18419
+ u?.disconnect(), u = void 0, cancelAnimationFrame(d), e.removeEventListener("keydown", x);
18420
+ let t = !!a?.contains(e) || !!i?.contains(e);
18421
+ if (i && !t && e.isConnected && g.add(i), t) {
18422
+ let t = o?.parentNode ? {
18423
+ parent: o.parentNode,
18424
+ next: o
18425
+ } : s;
18426
+ if (t) {
18427
+ let n = t.next?.parentNode === t.parent ? t.next : null;
18428
+ t.parent.isConnected && e.isConnected && XS(t.parent, e, n) || t.parent.insertBefore(e, n);
18429
+ }
18430
+ }
18431
+ o?.remove(), c?.(), i = void 0, a = void 0, o = void 0, s = void 0, c = void 0, n.value = !1;
18432
+ }, C = () => {
18433
+ let e = i, t = WS(e, ...e.children).length > 0;
18434
+ t ? h.delete(e) : g.add(e), S(), t && T();
18435
+ }, ee = () => {
18436
+ if (i && o) {
18437
+ if (YS(o)) {
18438
+ if (y(), !n.value) {
18439
+ if (!b()) {
18440
+ C();
18441
+ return;
18442
+ }
18443
+ n.value = !0;
18444
+ }
18445
+ d = requestAnimationFrame(ee);
18446
+ } else {
18447
+ let t = i;
18448
+ S(), YS(e) && g.add(t), T();
18449
+ }
18450
+ }
18451
+ }, w = (t) => {
18452
+ let n = JS(t), { height: r } = e.getBoundingClientRect(), f = document.createElement("div");
18453
+ f.className = e.className, f.style.cssText = e.style.cssText, f.style.height || (f.style.minHeight = `${r}px`), f.setAttribute("aria-hidden", "true"), f.setAttribute(RS, ""), s = {
18454
+ parent: e.parentNode,
18455
+ next: e.nextSibling
18456
+ }, s.parent.insertBefore(f, e), o = f, c = _(), XS(n, e, null) ? (i = t, a = n, l = {
18457
+ x: 0,
18458
+ y: 0
18459
+ }, y(), e.addEventListener("keydown", x), u = new MutationObserver(T), u.observe(t, {
18460
+ attributes: !0,
18461
+ attributeFilter: [
18462
+ "open",
18463
+ "class",
18464
+ "style"
18465
+ ]
18466
+ }), n !== t && u.observe(n, {
18467
+ attributes: !0,
18468
+ attributeFilter: [
18469
+ "class",
18470
+ "style",
18471
+ "hidden"
18472
+ ]
18473
+ }), u.observe(document, {
18474
+ childList: !0,
18475
+ subtree: !0
18476
+ }), d = requestAnimationFrame(ee)) : (g.add(t), S());
18477
+ }, T = () => {
18478
+ if (!r) return;
18479
+ let t = (e) => !e.open || !e.isConnected;
18480
+ for (let e of [g, h]) for (let n of e) t(n) && e.delete(n);
18481
+ m && t(m.dialog) && (m = void 0);
18482
+ let s = TS((e) => e === p), c = s && !g.has(s) && s.getBoundingClientRect().width > 0 && !KS(s) ? s : null;
18483
+ if (i) {
18484
+ if (i === c && a?.contains(e) && i.contains(a) && o && YS(o)) {
18485
+ n.value && !b() && C();
18486
+ return;
18487
+ }
18488
+ S();
18489
+ }
18490
+ c && !g.has(c) && YS(e) && (h.has(c) ? w(c) : E(c));
18491
+ }, E = (e) => {
18492
+ if (m?.dialog === e) return;
18493
+ let t = { dialog: e };
18494
+ m = t;
18495
+ let n = IS, r = () => {
18496
+ if (m !== t) return;
18497
+ if (--n > 0) {
18498
+ requestAnimationFrame(r);
18499
+ return;
18500
+ }
18501
+ let i = WS(e, ...e.children);
18502
+ Promise.race([Promise.allSettled(i.map((e) => e.finished)), new Promise((e) => setTimeout(e, LS))]).then(() => {
18503
+ m === t && (m = void 0, h.add(e), T());
18504
+ });
18505
+ };
18506
+ requestAnimationFrame(r);
18507
+ }, D = (e) => {
18508
+ e.target === i && e.newState === "closed" && (p = i, T(), p = void 0);
18509
+ }, te = (e) => {
18510
+ e.target instanceof HTMLDialogElement && T();
18511
+ }, O = () => {
18512
+ r = !0, document.addEventListener("beforetoggle", D, !0), document.addEventListener("toggle", te, !0), f = setInterval(T, FS), T();
18513
+ }, k = () => {
18514
+ r = !1, document.removeEventListener("beforetoggle", D, !0), document.removeEventListener("toggle", te, !0), clearInterval(f), f = void 0, m = void 0, i && S(), g.clear(), h.clear();
18515
+ };
18516
+ return I(() => X(t), (e) => {
18517
+ k(), e && O();
18518
+ }, { immediate: !0 }), be(k), n;
18519
+ }
18325
18520
  // ../../packages/components/src/chat/PkChatbotAuth.vue?vue&type=script&setup=true&lang.ts
18326
18521
  G(), Y(), R(), De();
18327
- var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-full min-h-full p-lg overflow-y-auto" }, IS = { class: "pk-chatbot-auth__flip w-full max-w-384 mx-auto my-auto" }, LS = { class: "pk-chatbot-auth__success-icon w-64 h-64 border border-surface-3 rounded-full bg-surface flex items-center justify-center overflow-hidden bg-surface mx-auto mb-md" }, RS = { class: "font-bold text-18 mb-xs" }, zS = { class: "mb-lg text-16 text-word-3" }, BS = {
18522
+ var QS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-full min-h-full p-lg overflow-y-auto" }, $S = { class: "pk-chatbot-auth__flip w-full max-w-384 mx-auto my-auto" }, eC = { class: "pk-chatbot-auth__success-icon w-64 h-64 border border-surface-3 rounded-full bg-surface flex items-center justify-center overflow-hidden bg-surface mx-auto mb-md" }, tC = { class: "font-bold text-18 mb-xs" }, nC = { class: "mb-lg text-16 text-word-3" }, rC = {
18328
18523
  key: "form",
18329
18524
  class: "pk-chatbot-auth__flip-card flex flex-col"
18330
- }, VS = { class: "flex flex-col" }, HS = {
18525
+ }, iC = { class: "flex flex-col" }, aC = {
18331
18526
  key: 0,
18332
18527
  class: "flex justify-center mb-md"
18333
- }, US = ["src", "alt"], WS = { class: "text-center leading-normal mb-lg" }, GS = {
18528
+ }, oC = ["src", "alt"], sC = { class: "text-center leading-normal mb-lg" }, cC = {
18334
18529
  key: 0,
18335
18530
  class: "font-bold text-20 m-0"
18336
- }, KS = { class: "text-14 text-word-3 text-center leading-normal mb-md" }, qS = { class: "flex justify-center mt-md" }, JS = { class: "mb-md" }, YS = { class: "mb-md" }, XS = { class: "mb-md" }, ZS = { class: "vv-separator mt-xs py-xs" }, QS = { class: "pt-lg text-center text-word-3" }, $S = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18531
+ }, lC = { class: "text-14 text-word-3 text-center leading-normal mb-md" }, uC = { class: "flex justify-center mt-md" }, dC = { class: "mb-md" }, fC = { class: "mb-md" }, pC = { class: "mb-md" }, mC = { class: "vv-separator mt-xs py-xs" }, hC = { class: "pt-lg text-center text-word-3" }, gC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18337
18532
  __name: "PkChatbotAuth",
18338
18533
  props: /*@__PURE__*/ ae({
18339
18534
  branding: {
@@ -18381,35 +18576,35 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18381
18576
  email: s(),
18382
18577
  password: _i,
18383
18578
  rememberMe: v().default(!1)
18384
- }), g = i({ email: s() }), { VvForm: _, VvFormField: y } = kn(h, { lazyLoad: !0 }), { VvForm: b, VvFormField: x, clear: S } = kn(yi, { lazyLoad: !0 }), { VvForm: ee, VvFormField: te, clear: C } = kn(g, { lazyLoad: !0 });
18579
+ }), g = i({ email: s() }), { VvForm: _, VvFormField: y } = kn(h, { lazyLoad: !0 }), { VvForm: b, VvFormField: x, clear: S } = kn(yi, { lazyLoad: !0 }), { VvForm: C, VvFormField: ee, clear: w } = kn(g, { lazyLoad: !0 });
18385
18580
  I(u, (e) => {
18386
- e && (S(), C());
18581
+ e && (S(), w());
18387
18582
  });
18388
- let w = W();
18389
- function E() {
18390
- u.value && w.value?.focus();
18583
+ let T = W();
18584
+ function D() {
18585
+ u.value && T.value?.focus();
18391
18586
  }
18392
- function ne(e) {
18587
+ function te(e) {
18393
18588
  d("sign-in", {
18394
18589
  email: e.email,
18395
18590
  password: e.password,
18396
18591
  rememberMe: e.rememberMe ?? !1
18397
18592
  });
18398
18593
  }
18399
- function D(e) {
18594
+ function O(e) {
18400
18595
  d("sign-up", {
18401
18596
  name: e.name.trim(),
18402
18597
  email: e.email,
18403
18598
  password: e.password
18404
18599
  });
18405
18600
  }
18406
- function O(e) {
18601
+ function k(e) {
18407
18602
  d("request-reset", { email: e.email });
18408
18603
  }
18409
- function re(e) {
18604
+ function ne(e) {
18410
18605
  d("social", e);
18411
18606
  }
18412
- let k = U(() => !!r.twoFactorMethods?.length), A = W("totp"), { VvForm: ie, VvFormField: j, clear: ae } = kn(i({ code: o().trim().min(6).max(32) }), { lazyLoad: !0 });
18607
+ let re = U(() => !!r.twoFactorMethods?.length), A = W("totp"), { VvForm: ie, VvFormField: j, clear: ae } = kn(i({ code: o().trim().min(6).max(32) }), { lazyLoad: !0 });
18413
18608
  I(() => r.twoFactorMethods, (e) => {
18414
18609
  e?.length && (A.value = e.includes("totp") ? "totp" : "otp", ae(), A.value === "otp" && d("send-two-factor-code"));
18415
18610
  }, { immediate: !0 });
@@ -18425,41 +18620,41 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18425
18620
  }
18426
18621
  return (t, r) => {
18427
18622
  let i = Cn, o = Tn, s = Sn, h = gn;
18428
- return P(), Z("div", FS, [H("div", IS, [F(K, {
18623
+ return P(), Z("div", QS, [H("div", $S, [F(K, {
18429
18624
  name: "pk-flip",
18430
18625
  mode: "out-in",
18431
- onAfterEnter: E
18626
+ onAfterEnter: D
18432
18627
  }, {
18433
18628
  default: B(() => [u.value ? (P(), Z("div", {
18434
18629
  ref_key: "successCard",
18435
- ref: w,
18630
+ ref: T,
18436
18631
  key: "success",
18437
18632
  tabindex: "-1",
18438
18633
  class: "pk-chatbot-auth__flip-card outline-none flex flex-col text-center leading-normal"
18439
18634
  }, [
18440
- H("div", LS, [F(i, {
18635
+ H("div", eC, [F(i, {
18441
18636
  name: "ri:mail-check-line",
18442
18637
  "aria-hidden": "true",
18443
18638
  class: "text-success w-32 h-32"
18444
18639
  })]),
18445
- H("h1", RS, N(u.value.title), 1),
18446
- H("p", zS, N(u.value.message), 1),
18640
+ H("h1", tC, N(u.value.title), 1),
18641
+ H("p", nC, N(u.value.message), 1),
18447
18642
  F(o, {
18448
18643
  type: "button",
18449
18644
  modifiers: "link",
18450
18645
  icon: "chevron-left",
18451
- label: T(n)("action.backToSignIn"),
18646
+ label: E(n)("action.backToSignIn"),
18452
18647
  onClick: p
18453
18648
  }, null, 8, ["label"])
18454
- ], 512)) : (P(), Z("div", BS, [H("div", VS, [
18455
- T(a)(e.branding?.interface.logo) ? (P(), Z("div", HS, [H("img", {
18649
+ ], 512)) : (P(), Z("div", rC, [H("div", iC, [
18650
+ E(a)(e.branding?.interface.logo) ? (P(), Z("div", aC, [H("img", {
18456
18651
  src: e.branding?.interface.logo,
18457
18652
  alt: e.branding?.name,
18458
18653
  class: "w-64 h-64 border border-surface-3 rounded-full overflow-hidden bg-surface object-contain",
18459
- onError: r[0] ||= (t) => T(c)(e.branding?.interface.logo)
18460
- }, null, 40, US)])) : q("", !0),
18461
- H("div", WS, [e.branding?.name ? (P(), Z("h1", GS, N(e.branding.name), 1)) : q("", !0), (P(), L(fe(e.branding?.name ? "h2" : "h1"), { class: "text-word-3 mb-0" }, {
18462
- default: B(() => [k.value ? (P(), Z(V, { key: 0 }, [Ne(N(T(n)("twoFactor.challengeTitle")), 1)], 64)) : f.value === "sign-in" ? (P(), Z(V, { key: 1 }, [Ne(N(T(n)("auth.signInTitle")), 1)], 64)) : f.value === "sign-up" ? (P(), Z(V, { key: 2 }, [Ne(N(T(n)("auth.signUpTitle")), 1)], 64)) : f.value === "reset" ? (P(), Z(V, { key: 3 }, [Ne(N(T(n)("auth.resetTitle")), 1)], 64)) : q("", !0)]),
18654
+ onError: r[0] ||= (t) => E(c)(e.branding?.interface.logo)
18655
+ }, null, 40, oC)])) : q("", !0),
18656
+ H("div", sC, [e.branding?.name ? (P(), Z("h1", cC, N(e.branding.name), 1)) : q("", !0), (P(), L(fe(e.branding?.name ? "h2" : "h1"), { class: "text-word-3 mb-0" }, {
18657
+ default: B(() => [re.value ? (P(), Z(V, { key: 0 }, [Ne(N(E(n)("twoFactor.challengeTitle")), 1)], 64)) : f.value === "sign-in" ? (P(), Z(V, { key: 1 }, [Ne(N(E(n)("auth.signInTitle")), 1)], 64)) : f.value === "sign-up" ? (P(), Z(V, { key: 2 }, [Ne(N(E(n)("auth.signUpTitle")), 1)], 64)) : f.value === "reset" ? (P(), Z(V, { key: 3 }, [Ne(N(E(n)("auth.resetTitle")), 1)], 64)) : q("", !0)]),
18463
18658
  _: 1
18464
18659
  }))]),
18465
18660
  l.value ? (P(), L(s, {
@@ -18468,25 +18663,25 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18468
18663
  class: "mb-md",
18469
18664
  content: l.value
18470
18665
  }, null, 8, ["content"])) : q("", !0),
18471
- k.value ? (P(), Z(V, { key: 2 }, [
18472
- H("p", KS, N(M.value), 1),
18473
- F(T(ie), {
18666
+ re.value ? (P(), Z(V, { key: 2 }, [
18667
+ H("p", lC, N(M.value), 1),
18668
+ F(E(ie), {
18474
18669
  class: "flex flex-col",
18475
18670
  readonly: e.loading,
18476
18671
  onSubmit: se
18477
18672
  }, {
18478
- default: B(() => [F(T(j), {
18673
+ default: B(() => [F(E(j), {
18479
18674
  name: "code",
18480
18675
  type: "text",
18481
18676
  autocomplete: A.value === "backup" ? "off" : "one-time-code",
18482
- label: A.value === "backup" ? T(n)("twoFactor.backupCode") : T(n)("twoFactor.code"),
18677
+ label: A.value === "backup" ? E(n)("twoFactor.backupCode") : E(n)("twoFactor.code"),
18483
18678
  floating: ""
18484
18679
  }, null, 8, ["autocomplete", "label"]), F(o, {
18485
18680
  type: "submit",
18486
18681
  modifiers: "primary",
18487
18682
  loading: e.loading,
18488
18683
  disabled: e.loading,
18489
- label: T(n)("twoFactor.verify")
18684
+ label: E(n)("twoFactor.verify")
18490
18685
  }, null, 8, [
18491
18686
  "loading",
18492
18687
  "disabled",
@@ -18494,57 +18689,57 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18494
18689
  ])]),
18495
18690
  _: 1
18496
18691
  }, 8, ["readonly"]),
18497
- H("div", qS, [A.value === "totp" ? (P(), L(o, {
18692
+ H("div", uC, [A.value === "totp" ? (P(), L(o, {
18498
18693
  key: 0,
18499
18694
  type: "button",
18500
18695
  modifiers: "link",
18501
- label: T(n)("twoFactor.useBackupCode"),
18696
+ label: E(n)("twoFactor.useBackupCode"),
18502
18697
  onClick: r[1] ||= (e) => oe("backup")
18503
18698
  }, null, 8, ["label"])) : A.value === "backup" ? (P(), L(o, {
18504
18699
  key: 1,
18505
18700
  type: "button",
18506
18701
  modifiers: "link",
18507
- label: T(n)("twoFactor.useApp"),
18702
+ label: E(n)("twoFactor.useApp"),
18508
18703
  onClick: r[2] ||= (e) => oe("totp")
18509
18704
  }, null, 8, ["label"])) : (P(), L(o, {
18510
18705
  key: 2,
18511
18706
  type: "button",
18512
18707
  modifiers: "link",
18513
18708
  disabled: e.loading,
18514
- label: T(n)("twoFactor.sendAgain"),
18709
+ label: E(n)("twoFactor.sendAgain"),
18515
18710
  onClick: r[3] ||= (e) => d("send-two-factor-code")
18516
18711
  }, null, 8, ["disabled", "label"]))])
18517
- ], 64)) : f.value === "sign-in" ? (P(), L(T(_), {
18712
+ ], 64)) : f.value === "sign-in" ? (P(), L(E(_), {
18518
18713
  key: 3,
18519
18714
  class: "flex flex-col",
18520
18715
  readonly: e.loading,
18521
- onSubmit: ne
18716
+ onSubmit: te
18522
18717
  }, {
18523
- default: B(() => [H("div", JS, [
18524
- F(T(y), {
18718
+ default: B(() => [H("div", dC, [
18719
+ F(E(y), {
18525
18720
  name: "email",
18526
18721
  type: "email",
18527
18722
  autocomplete: "username",
18528
- label: T(n)("label.email"),
18723
+ label: E(n)("label.email"),
18529
18724
  floating: ""
18530
18725
  }, null, 8, ["label"]),
18531
- F(T(y), {
18726
+ F(E(y), {
18532
18727
  name: "password",
18533
18728
  type: "password",
18534
18729
  autocomplete: "current-password",
18535
- label: T(n)("label.password"),
18730
+ label: E(n)("label.password"),
18536
18731
  floating: ""
18537
18732
  }, null, 8, ["label"]),
18538
- H("div", YS, [F(o, {
18733
+ H("div", fC, [F(o, {
18539
18734
  type: "button",
18540
18735
  modifiers: "link",
18541
- label: T(n)("action.forgetPassword"),
18736
+ label: E(n)("action.forgetPassword"),
18542
18737
  onClick: r[4] ||= (e) => f.value = "reset"
18543
18738
  }, null, 8, ["label"])]),
18544
- F(T(y), {
18739
+ F(E(y), {
18545
18740
  name: "rememberMe",
18546
18741
  type: "checkbox",
18547
- label: T(n)("label.rememberMe"),
18742
+ label: E(n)("label.rememberMe"),
18548
18743
  switch: ""
18549
18744
  }, null, 8, ["label"])
18550
18745
  ]), F(o, {
@@ -18552,46 +18747,46 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18552
18747
  modifiers: "primary",
18553
18748
  loading: e.loading,
18554
18749
  disabled: e.loading,
18555
- label: T(n)("action.signIn")
18750
+ label: E(n)("action.signIn")
18556
18751
  }, null, 8, [
18557
18752
  "loading",
18558
18753
  "disabled",
18559
18754
  "label"
18560
18755
  ])]),
18561
18756
  _: 1
18562
- }, 8, ["readonly"])) : f.value === "sign-up" ? (P(), L(T(b), {
18757
+ }, 8, ["readonly"])) : f.value === "sign-up" ? (P(), L(E(b), {
18563
18758
  key: 4,
18564
18759
  class: "flex flex-col",
18565
18760
  readonly: e.loading,
18566
- onSubmit: D
18761
+ onSubmit: O
18567
18762
  }, {
18568
- default: B(() => [H("div", XS, [
18569
- F(T(x), {
18763
+ default: B(() => [H("div", pC, [
18764
+ F(E(x), {
18570
18765
  name: "name",
18571
18766
  type: "text",
18572
18767
  autocomplete: "name",
18573
- label: T(n)("label.name"),
18768
+ label: E(n)("label.name"),
18574
18769
  floating: ""
18575
18770
  }, null, 8, ["label"]),
18576
- F(T(x), {
18771
+ F(E(x), {
18577
18772
  name: "email",
18578
18773
  type: "email",
18579
18774
  autocomplete: "username",
18580
- label: T(n)("label.email"),
18775
+ label: E(n)("label.email"),
18581
18776
  floating: ""
18582
18777
  }, null, 8, ["label"]),
18583
- F(T(x), {
18778
+ F(E(x), {
18584
18779
  name: "password",
18585
18780
  type: "password",
18586
18781
  autocomplete: "new-password",
18587
- label: T(n)("label.password"),
18782
+ label: E(n)("label.password"),
18588
18783
  floating: ""
18589
18784
  }, null, 8, ["label"]),
18590
- F(T(x), {
18785
+ F(E(x), {
18591
18786
  name: "passwordConfirmation",
18592
18787
  type: "password",
18593
18788
  autocomplete: "new-password",
18594
- label: T(n)("label.confirmPassword"),
18789
+ label: E(n)("label.confirmPassword"),
18595
18790
  floating: ""
18596
18791
  }, null, 8, ["label"])
18597
18792
  ]), F(o, {
@@ -18599,24 +18794,24 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18599
18794
  modifiers: "primary",
18600
18795
  loading: e.loading,
18601
18796
  disabled: e.loading,
18602
- label: T(n)("action.continue")
18797
+ label: E(n)("action.continue")
18603
18798
  }, null, 8, [
18604
18799
  "loading",
18605
18800
  "disabled",
18606
18801
  "label"
18607
18802
  ])]),
18608
18803
  _: 1
18609
- }, 8, ["readonly"])) : f.value === "reset" ? (P(), L(T(ee), {
18804
+ }, 8, ["readonly"])) : f.value === "reset" ? (P(), L(E(C), {
18610
18805
  key: 5,
18611
18806
  class: "flex flex-col",
18612
18807
  readonly: e.loading,
18613
- onSubmit: O
18808
+ onSubmit: k
18614
18809
  }, {
18615
- default: B(() => [F(T(te), {
18810
+ default: B(() => [F(E(ee), {
18616
18811
  name: "email",
18617
18812
  type: "email",
18618
18813
  autocomplete: "username",
18619
- label: T(n)("label.email"),
18814
+ label: E(n)("label.email"),
18620
18815
  floating: ""
18621
18816
  }, null, 8, ["label"]), F(h, { modifiers: "vertical" }, {
18622
18817
  default: B(() => [F(o, {
@@ -18624,7 +18819,7 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18624
18819
  modifiers: "primary",
18625
18820
  loading: e.loading,
18626
18821
  disabled: e.loading,
18627
- label: T(n)("action.submit")
18822
+ label: E(n)("action.submit")
18628
18823
  }, null, 8, [
18629
18824
  "loading",
18630
18825
  "disabled",
@@ -18634,7 +18829,7 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18634
18829
  })]),
18635
18830
  _: 1
18636
18831
  }, 8, ["readonly"])) : q("", !0),
18637
- !k.value && (f.value === "sign-in" || f.value === "sign-up") && m.value ? (P(), Z(V, { key: 6 }, [H("div", ZS, [H("span", null, N(T(n)("label.or")), 1)]), F(h, {
18832
+ !re.value && (f.value === "sign-in" || f.value === "sign-up") && m.value ? (P(), Z(V, { key: 6 }, [H("div", mC, [H("span", null, N(E(n)("label.or")), 1)]), F(h, {
18638
18833
  modifiers: "vertical",
18639
18834
  class: "gap-xs mt-xs"
18640
18835
  }, {
@@ -18644,64 +18839,64 @@ var FS = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
18644
18839
  modifiers: "secondary",
18645
18840
  icon: "logos:google-icon",
18646
18841
  disabled: e.loading,
18647
- label: T(n)("action.signInWithSocialProvider", { provider: "Google" }),
18648
- onClick: r[5] ||= (e) => re("google")
18842
+ label: E(n)("action.signInWithSocialProvider", { provider: "Google" }),
18843
+ onClick: r[5] ||= (e) => ne("google")
18649
18844
  }, null, 8, ["disabled", "label"])) : q("", !0), e.authMethods?.microsoft ? (P(), L(o, {
18650
18845
  key: 1,
18651
18846
  type: "button",
18652
18847
  modifiers: "secondary",
18653
18848
  icon: "logos:microsoft-icon",
18654
18849
  disabled: e.loading,
18655
- label: T(n)("action.signInWithSocialProvider", { provider: "Microsoft" }),
18656
- onClick: r[6] ||= (e) => re("microsoft")
18850
+ label: E(n)("action.signInWithSocialProvider", { provider: "Microsoft" }),
18851
+ onClick: r[6] ||= (e) => ne("microsoft")
18657
18852
  }, null, 8, ["disabled", "label"])) : q("", !0)]),
18658
18853
  _: 1
18659
18854
  })], 64)) : q("", !0)
18660
- ]), H("div", QS, [k.value ? (P(), L(o, {
18855
+ ]), H("div", hC, [re.value ? (P(), L(o, {
18661
18856
  key: 0,
18662
18857
  type: "button",
18663
18858
  modifiers: "link",
18664
18859
  icon: "chevron-left",
18665
- label: T(n)("action.backToSignIn"),
18860
+ label: E(n)("action.backToSignIn"),
18666
18861
  onClick: r[7] ||= (e) => d("cancel-two-factor")
18667
- }, null, 8, ["label"])) : f.value === "sign-in" ? (P(), Z(V, { key: 1 }, [Ne(N(T(n)("auth.noAccount")) + " ", 1), F(o, {
18862
+ }, null, 8, ["label"])) : f.value === "sign-in" ? (P(), Z(V, { key: 1 }, [Ne(N(E(n)("auth.noAccount")) + " ", 1), F(o, {
18668
18863
  type: "button",
18669
18864
  modifiers: "link",
18670
18865
  class: "font-semibold",
18671
- label: T(n)("action.signUp"),
18866
+ label: E(n)("action.signUp"),
18672
18867
  onClick: r[8] ||= (e) => f.value = "sign-up"
18673
- }, null, 8, ["label"])], 64)) : f.value === "sign-up" ? (P(), Z(V, { key: 2 }, [Ne(N(T(n)("auth.haveAccount")) + " ", 1), F(o, {
18868
+ }, null, 8, ["label"])], 64)) : f.value === "sign-up" ? (P(), Z(V, { key: 2 }, [Ne(N(E(n)("auth.haveAccount")) + " ", 1), F(o, {
18674
18869
  type: "button",
18675
18870
  modifiers: "link",
18676
18871
  class: "font-semibold",
18677
- label: T(n)("action.signIn"),
18872
+ label: E(n)("action.signIn"),
18678
18873
  onClick: r[9] ||= (e) => f.value = "sign-in"
18679
18874
  }, null, 8, ["label"])], 64)) : (P(), L(o, {
18680
18875
  key: 3,
18681
18876
  type: "button",
18682
18877
  modifiers: "link",
18683
18878
  icon: "chevron-left",
18684
- label: T(n)("action.backToSignIn"),
18879
+ label: E(n)("action.backToSignIn"),
18685
18880
  onClick: r[10] ||= (e) => f.value = "sign-in"
18686
18881
  }, null, 8, ["label"]))])]))]),
18687
18882
  _: 1
18688
18883
  })])]);
18689
18884
  };
18690
18885
  }
18691
- }), [["styles", [".pk-chatbot-auth__flip{transform-style:preserve-3d;perspective:1000px;display:grid}.pk-chatbot-auth__flip-card{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1}.pk-chatbot-auth__success-icon{animation:.4s ease-out .3s backwards pk-chatbot-auth-check-pop}.pk-flip-enter-active{animation:.6s ease-out pk-chatbot-auth-flip-in}.pk-flip-leave-active{animation:.6s ease-in pk-chatbot-auth-flip-out}@keyframes pk-chatbot-auth-flip-in{0%{opacity:0;transform:rotateY(-180deg)}to{opacity:1;transform:rotateY(0)}}@keyframes pk-chatbot-auth-flip-out{0%{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(180deg)}}@keyframes pk-chatbot-auth-check-pop{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}"]]]), eC = "@layer volver.reset,volver.preflight,volver.props;@layer volver.components{.pk-loader{width:var(--spacing-48);height:var(--spacing-48);border-radius:50%;animation:1s linear infinite pk-loader-rotate;position:relative}.pk-loader:before{content:\"\";box-sizing:border-box;border:var(--spacing-5) solid var(--color-brand);border-radius:50%;animation:2s linear infinite pk-loader-clip;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){.pk-loader,.pk-loader:before{animation:none}}@keyframes pk-loader-rotate{to{rotate:360deg}}@keyframes pk-loader-clip{0%{clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}25%{clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}50%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}75%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)}to{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)}}}@layer volver.themes,volver.utilities;";
18886
+ }), [["styles", [".pk-chatbot-auth__flip{transform-style:preserve-3d;perspective:1000px;display:grid}.pk-chatbot-auth__flip-card{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1}.pk-chatbot-auth__success-icon{animation:.4s ease-out .3s backwards pk-chatbot-auth-check-pop}.pk-flip-enter-active{animation:.6s ease-out pk-chatbot-auth-flip-in}.pk-flip-leave-active{animation:.6s ease-in pk-chatbot-auth-flip-out}@keyframes pk-chatbot-auth-flip-in{0%{opacity:0;transform:rotateY(-180deg)}to{opacity:1;transform:rotateY(0)}}@keyframes pk-chatbot-auth-flip-out{0%{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(180deg)}}@keyframes pk-chatbot-auth-check-pop{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}"]]]), _C = "@layer volver.reset,volver.preflight,volver.props;@layer volver.components{.pk-loader{width:var(--spacing-48);height:var(--spacing-48);border-radius:50%;animation:1s linear infinite pk-loader-rotate;position:relative}.pk-loader:before{content:\"\";box-sizing:border-box;border:var(--spacing-5) solid var(--color-brand);border-radius:50%;animation:2s linear infinite pk-loader-clip;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){.pk-loader,.pk-loader:before{animation:none}}@keyframes pk-loader-rotate{to{rotate:360deg}}@keyframes pk-loader-clip{0%{clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}25%{clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}50%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}75%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)}to{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)}}}@layer volver.themes,volver.utilities;";
18692
18887
  // ../../packages/components/src/PkLoader.vue
18693
18888
  G();
18694
- var tC = {};
18695
- function nC(e, t) {
18889
+ var vC = {};
18890
+ function yC(e, t) {
18696
18891
  return P(), Z("div", null, [...t[0] ||= [H("div", {
18697
18892
  "aria-hidden": "true",
18698
18893
  class: "pk-loader"
18699
18894
  }, null, -1)]]);
18700
18895
  }
18701
- var rC = /*#__PURE__*/ Mn(tC, [["render", nC], ["styles", [eC]]]);
18896
+ var bC = /*#__PURE__*/ Mn(vC, [["render", yC], ["styles", [_C]]]);
18702
18897
  // ../../packages/components/src/chat/PkWelcomePopup.vue?vue&type=script&setup=true&lang.ts
18703
18898
  G(), Y(), De(), R();
18704
- var iC = { class: "welcome-popup__text" }, aC = ["aria-label"], oC = 100, sC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18899
+ var xC = { class: "welcome-popup__text" }, SC = ["aria-label"], CC = 100, wC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18705
18900
  __name: "PkWelcomePopup",
18706
18901
  props: {
18707
18902
  agentId: { type: String },
@@ -18722,7 +18917,7 @@ var iC = { class: "welcome-popup__text" }, aC = ["aria-label"], oC = 100, sC = /
18722
18917
  c.value = [], s.value = !1;
18723
18918
  let t = e.split(/(\s+)/), n = 0;
18724
18919
  function r() {
18725
- n < t.length ? (c.value.push(t[n]), n++, l = setTimeout(r, oC)) : s.value = !0;
18920
+ n < t.length ? (c.value.push(t[n]), n++, l = setTimeout(r, CC)) : s.value = !0;
18726
18921
  }
18727
18922
  r();
18728
18923
  }
@@ -18746,7 +18941,7 @@ var iC = { class: "welcome-popup__text" }, aC = ["aria-label"], oC = 100, sC = /
18746
18941
  key: 0,
18747
18942
  class: "welcome-popup",
18748
18943
  onClick: ve(m, ["stop"])
18749
- }, [H("p", iC, [(P(!0), Z(V, null, C(c.value, (e, t) => (P(), Z("span", {
18944
+ }, [H("p", xC, [(P(!0), Z(V, null, w(c.value, (e, t) => (P(), Z("span", {
18750
18945
  key: t,
18751
18946
  class: "welcome-popup__word"
18752
18947
  }, N(e), 1))), 128))]), F(K, null, {
@@ -18762,7 +18957,7 @@ var iC = { class: "welcome-popup__text" }, aC = ["aria-label"], oC = 100, sC = /
18762
18957
  width: "14",
18763
18958
  height: "14",
18764
18959
  fill: "currentColor"
18765
- }, [H("path", { d: "M12.0007 10.5865L16.9504 5.63672L18.3646 7.05093L13.4149 12.0007L18.3646 16.9504L16.9504 18.3646L12.0007 13.4149L7.05093 18.3646L5.63672 16.9504L10.5865 12.0007L5.63672 7.05093L7.05093 5.63672L12.0007 10.5865Z" })], -1)]], 8, aC)) : q("", !0)]),
18960
+ }, [H("path", { d: "M12.0007 10.5865L16.9504 5.63672L18.3646 7.05093L13.4149 12.0007L18.3646 16.9504L16.9504 18.3646L12.0007 13.4149L7.05093 18.3646L5.63672 16.9504L10.5865 12.0007L5.63672 7.05093L7.05093 5.63672L12.0007 10.5865Z" })], -1)]], 8, SC)) : q("", !0)]),
18766
18961
  _: 1
18767
18962
  })])) : q("", !0)]),
18768
18963
  _: 1
@@ -18771,30 +18966,30 @@ var iC = { class: "welcome-popup__text" }, aC = ["aria-label"], oC = 100, sC = /
18771
18966
  }), [["styles", [".welcome-popup{background:var(--color-surface);pointer-events:auto;max-width:300px;color:var(--color-word-2);line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl);font-size:var(--text-14);cursor:pointer;box-shadow:0 4px 16px #00000014,0 1px 4px #0000000f}.welcome-popup__word{animation:.3s ease-out both welcome-popup-word-in;display:inline}.welcome-popup__close{background-color:var(--color-surface);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);width:var(--spacing-20);height:var(--spacing-20);top:calc(-1 * var(--spacing-8));right:calc(-1 * var(--spacing-8));padding:var(--spacing-2);cursor:pointer;color:var(--color-word-4);border-radius:var(--rounded-full);transition:var(--transition-colors);box-shadow:var(--shadow-md);justify-content:center;align-items:center;line-height:1;display:flex;position:absolute}.welcome-popup__close:hover{color:var(--color-word)}.welcome-popup-enter-active,.welcome-popup-leave-active{transition:transform var(--duration-300) var(--ease-out), opacity var(--duration-300) var(--ease-out)}.welcome-popup-enter-from{opacity:0;transform:translateY(var(--spacing-32))}.welcome-popup-leave-to{opacity:0}@keyframes welcome-popup-word-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}"]]]);
18772
18967
  // ../../packages/components/src/chat/PkWorkingBeam.vue?vue&type=script&setup=true&lang.ts
18773
18968
  G(), De();
18774
- var cC = {
18969
+ var TC = {
18775
18970
  key: 0,
18776
18971
  class: "pk-working-beam",
18777
18972
  "aria-hidden": "true"
18778
- }, lC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18973
+ }, EC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18779
18974
  __name: "PkWorkingBeam",
18780
18975
  props: { active: { type: Boolean } },
18781
18976
  setup(e) {
18782
18977
  return (t, n) => (P(), L(K, { name: "pk-working-beam" }, {
18783
- default: B(() => [e.active ? (P(), Z("span", cC, [...n[0] ||= [H("span", { class: "pk-working-beam__halo" }, null, -1), H("span", { class: "pk-working-beam__ring" }, [H("span", { class: "pk-working-beam__light" })], -1)]])) : q("", !0)]),
18978
+ default: B(() => [e.active ? (P(), Z("span", TC, [...n[0] ||= [H("span", { class: "pk-working-beam__halo" }, null, -1), H("span", { class: "pk-working-beam__ring" }, [H("span", { class: "pk-working-beam__light" })], -1)]])) : q("", !0)]),
18784
18979
  _: 1
18785
18980
  }));
18786
18981
  }
18787
18982
  }), [["styles", [".pk-working-beam{--pk-working-beam-source:var(--pk-working-beam-color,var(--chatbot-main-color,var(--color-brand)));--pk-working-beam-main:var(--pk-working-beam-source);--pk-working-beam-tone-before:var(--pk-working-beam-main);--pk-working-beam-tone-after:var(--pk-working-beam-main);border-radius:inherit;pointer-events:none;position:absolute;inset:0;container-type:size}@supports (color:oklch(from red l c h)){.pk-working-beam{--pk-working-beam-main:oklch(from var(--pk-working-beam-source) clamp(.55, l, .75) c h);--pk-working-beam-tone-before:oklch(from var(--pk-working-beam-main) l c calc(h - 40));--pk-working-beam-tone-after:oklch(from var(--pk-working-beam-main) l c calc(h + 40))}}.pk-working-beam__halo{border-radius:inherit;box-shadow:inset 0 0 var(--spacing-32) color-mix(in srgb, var(--pk-working-beam-main) 60%, transparent), 0 0 var(--spacing-24) color-mix(in srgb, var(--pk-working-beam-main) 45%, transparent);animation:2s ease-in-out infinite alternate pk-working-beam-pulse;position:absolute;inset:0}.pk-working-beam__ring{border-radius:inherit;padding:var(--spacing-3);-webkit-mask-composite:xor;position:absolute;inset:0;overflow:hidden;-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0;-webkit-mask-size:auto,auto;mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;mask-repeat:repeat,repeat;-webkit-mask-clip:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}.pk-working-beam__light{aspect-ratio:1;background:conic-gradient(transparent 0 12%, var(--pk-working-beam-tone-before) 24%, var(--pk-working-beam-main) 38%, var(--pk-working-beam-tone-after) 46%, transparent 50% 62%, var(--pk-working-beam-tone-before) 74%, var(--pk-working-beam-main) 88%, var(--pk-working-beam-tone-after) 96%, transparent);width:calc(100cqw + 100cqh);animation:4s linear infinite pk-working-beam-turn;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@supports (width:hypot(1px, 1px)){.pk-working-beam__light{width:hypot(100cqw,100cqh)}}@media (prefers-reduced-motion:reduce){.pk-working-beam__halo{animation:none}.pk-working-beam__light{background:var(--pk-working-beam-main);animation:none}}.pk-working-beam-enter-active,.pk-working-beam-leave-active{transition:opacity var(--duration-300) ease-out}.pk-working-beam-enter-from,.pk-working-beam-leave-to{opacity:0}@keyframes pk-working-beam-turn{to{transform:translate(-50%,-50%)rotate(1turn)}}@keyframes pk-working-beam-pulse{0%{opacity:.55}}"]]]);
18788
18983
  // src/components/FloatingChatWidget.ce.vue?vue&type=script&setup=true&lang.ts
18789
18984
  G(), R(), Y(), De();
18790
- var uC = {
18985
+ var DC = {
18791
18986
  key: 0,
18792
18987
  class: "floating-chat-widget__frame",
18793
18988
  "aria-hidden": "true"
18794
- }, dC = {
18989
+ }, OC = {
18795
18990
  key: 0,
18796
18991
  class: "floating-chat-widget__launcher"
18797
- }, fC = ["aria-label", "aria-expanded"], pC = {
18992
+ }, kC = ["aria-label", "aria-expanded"], AC = {
18798
18993
  key: 0,
18799
18994
  class: "w-full h-full",
18800
18995
  xmlns: "http://www.w3.org/2000/svg",
@@ -18802,7 +18997,7 @@ var uC = {
18802
18997
  width: "24",
18803
18998
  height: "24",
18804
18999
  fill: "currentColor"
18805
- }, mC = {
19000
+ }, jC = {
18806
19001
  key: 1,
18807
19002
  class: "w-full h-full",
18808
19003
  xmlns: "http://www.w3.org/2000/svg",
@@ -18810,13 +19005,13 @@ var uC = {
18810
19005
  width: "24",
18811
19006
  height: "24",
18812
19007
  fill: "currentColor"
18813
- }, hC = {
19008
+ }, MC = {
18814
19009
  key: 0,
18815
19010
  class: "floating-chat-widget__chat floating-chat-widget__auth"
18816
- }, gC = { class: "floating-chat-widget__close" }, _C = {
19011
+ }, NC = { class: "floating-chat-widget__close" }, PC = {
18817
19012
  key: 0,
18818
19013
  class: "floating-chat-widget__chat floating-chat-widget__loading"
18819
- }, vC = { class: "floating-chat-widget__close" }, yC = 450, bC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
19014
+ }, FC = { class: "floating-chat-widget__close" }, IC = 450, LC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
18820
19015
  inheritAttrs: !1,
18821
19016
  __name: "FloatingChatWidget.ce",
18822
19017
  props: {
@@ -18872,7 +19067,7 @@ var uC = {
18872
19067
  });
18873
19068
  let { PkGlobalDialog: i } = Vf(), { emit: a } = Ih(), o = W(), s = W(), c = he([]), l = On(U(() => `${n.agentId}-is-open`), !1), u = () => {
18874
19069
  l.value = !l.value, Di(l.value ? "widget_opened" : "widget_closed"), a(l.value ? "opened" : "closed"), l.value || o.value?.stopGeneration();
18875
- }, { session: d, onError: f, headers: p, token: m, userId: h, isExternalAuth: g, signInWithEmail: _, twoFactorChallenge: v, verifyTwoFactor: y, sendTwoFactorCode: b, cancelTwoFactor: x, signUpWithEmail: S, requestPasswordReset: ee, signInWithSocialPopup: te, signInWithExternalToken: C, signOut: w } = p_({
19070
+ }, { session: d, onError: f, headers: p, token: m, userId: h, isExternalAuth: g, signInWithEmail: _, twoFactorChallenge: v, verifyTwoFactor: y, sendTwoFactorCode: b, cancelTwoFactor: x, signUpWithEmail: S, requestPasswordReset: C, signInWithSocialPopup: ee, signInWithExternalToken: w, signOut: T } = p_({
18876
19071
  baseUrl: r,
18877
19072
  externalToken: () => n.externalToken,
18878
19073
  awaitExternalToken: !!n.awaitExternalToken && n.awaitExternalToken !== "false",
@@ -18887,26 +19082,26 @@ var uC = {
18887
19082
  I(h, (e) => {
18888
19083
  e && Ei({ userId: e });
18889
19084
  });
18890
- let { t: E } = Le({ useScope: "global" }), D = m_({
19085
+ let { t: D } = Le({ useScope: "global" }), O = m_({
18891
19086
  agentId: n.agentId,
18892
19087
  baseUrl: r,
18893
19088
  headers: p,
18894
19089
  userId: h
18895
19090
  });
18896
- Lh(() => D.isWorking), Rh(() => D.pageControlActive);
18897
- let O = ES(() => !!D.hostConfirmation || D.pageControlActive);
18898
- PS(O, () => D.pageControlActive, {
18899
- text: () => E("messagePart.pageControlActive"),
18900
- stopLabel: () => E("action.stop"),
18901
- onStop: () => void D.stopHostActions()
19091
+ Lh(() => O.isWorking), Rh(() => O.pageControlActive);
19092
+ let k = ES(() => !!O.hostConfirmation || O.pageControlActive);
19093
+ PS(k, () => O.pageControlActive, {
19094
+ text: () => D("messagePart.pageControlActive"),
19095
+ stopLabel: () => D("action.stop"),
19096
+ onStop: () => void O.stopHostActions()
18902
19097
  });
18903
- let re = x_(o, () => D.localChatId);
19098
+ let ne = x_(o, () => O.localChatId);
18904
19099
  I(l, (e) => {
18905
- e || re.clear();
19100
+ e || ne.clear();
18906
19101
  }), I(h, (e) => {
18907
19102
  e && a("ready");
18908
19103
  });
18909
- function k(e) {
19104
+ function re(e) {
18910
19105
  Oi(/* @__PURE__ */ Error(`${e.type}: ${e.title}`), { status: String(e.status) }), a("chat-error", {
18911
19106
  type: e.type,
18912
19107
  title: e.title,
@@ -18926,19 +19121,19 @@ var uC = {
18926
19121
  ...e.telemetry
18927
19122
  });
18928
19123
  });
18929
- let { registry: R, forms: ge, registerPages: z } = Fh(() => A.value?.capabilities?.pageAccess, E), { authBranding: _e } = __({
19124
+ let { registry: R, forms: ge, registerPages: z } = Fh(() => A.value?.capabilities?.pageAccess, D), { authBranding: _e } = __({
18930
19125
  agent: A,
18931
19126
  branding: ie,
18932
19127
  authMethods: j,
18933
19128
  session: d,
18934
- signOut: w,
19129
+ signOut: T,
18935
19130
  isExternalAuth: g,
18936
19131
  frontendUrl: () => oe.value?.frontendUrl,
18937
19132
  token: m,
18938
19133
  baseUrl: r,
18939
19134
  headers: p,
18940
19135
  cookieName: n.cookieName
18941
- }), ye = U(() => n.floatingButtonPosition ?? A.value?.interface.floatingButtonPosition ?? ie.value?.interface.floatingButtonPosition ?? "right"), V = U(() => t_(n.layout, A.value?.interface.layout ?? ie.value?.interface.layout) === qt.Copilot), be = U(() => V.value && A.value?.interface.workingGlow !== !1 && D.isWorking), xe = U(() => be.value && D.pageControlActive), Se = U(() => nt(A.value?.interface.mainColor) ? { "--pk-working-beam-color": "var(--color-accent)" } : void 0), G = U(() => !V.value && n_(n.appearance, A.value?.interface.appearance ?? ie.value?.interface.appearance) === Ht.Glass), we = U(() => (A.value?.interface.hideFloatingButton ?? ie.value?.interface.hideFloatingButton) === !0);
19136
+ }), ye = U(() => n.floatingButtonPosition ?? A.value?.interface.floatingButtonPosition ?? ie.value?.interface.floatingButtonPosition ?? "right"), V = U(() => t_(n.layout, A.value?.interface.layout ?? ie.value?.interface.layout) === qt.Copilot), be = U(() => V.value && A.value?.interface.workingGlow !== !1 && O.isWorking), xe = U(() => be.value && O.pageControlActive), Se = U(() => nt(A.value?.interface.mainColor) ? { "--pk-working-beam-color": "var(--color-accent)" } : void 0), G = U(() => !V.value && n_(n.appearance, A.value?.interface.appearance ?? ie.value?.interface.appearance) === Ht.Glass), we = U(() => (A.value?.interface.hideFloatingButton ?? ie.value?.interface.hideFloatingButton) === !0);
18942
19137
  E_({
18943
19138
  css: () => A.value?.interface.copilotPageCss ?? ie.value?.interface.copilotPageCss,
18944
19139
  active: () => V.value && l.value
@@ -18947,7 +19142,7 @@ var uC = {
18947
19142
  I(l, () => {
18948
19143
  Te.value = !0, clearTimeout(Ee), Ee = setTimeout(() => {
18949
19144
  Te.value = !1;
18950
- }, yC);
19145
+ }, IC);
18951
19146
  });
18952
19147
  let De = U(() => V.value && Te.value ? "floating-chat-widget-copilot" : void 0), Oe = U(() => {
18953
19148
  let e = [
@@ -18963,9 +19158,9 @@ var uC = {
18963
19158
  sendTwoFactorCode: b,
18964
19159
  cancelTwoFactor: x,
18965
19160
  signUpWithEmail: S,
18966
- requestPasswordReset: ee,
19161
+ requestPasswordReset: C,
18967
19162
  frontendUrl: () => oe.value?.frontendUrl,
18968
- signInWithSocialPopup: te,
19163
+ signInWithSocialPopup: ee,
18969
19164
  refetchSession: () => d.value.refetch(),
18970
19165
  reload: me
18971
19166
  });
@@ -18980,10 +19175,10 @@ var uC = {
18980
19175
  u();
18981
19176
  },
18982
19177
  sendMessage(e) {
18983
- e.trim() && (l.value || u(), re.send(e));
19178
+ e.trim() && (l.value || u(), ne.send(e));
18984
19179
  },
18985
19180
  startNewChat() {
18986
- re.invalidate(), D.startNewChat();
19181
+ ne.invalidate(), O.startNewChat();
18987
19182
  },
18988
19183
  setContext(e) {
18989
19184
  s.value = e;
@@ -18995,30 +19190,30 @@ var uC = {
18995
19190
  c.value = c.value.filter((t) => t.name !== e);
18996
19191
  },
18997
19192
  registerPages: z,
18998
- signIn: C,
18999
- signOut: w,
19193
+ signIn: w,
19194
+ signOut: T,
19000
19195
  get isOpen() {
19001
19196
  return l.value;
19002
19197
  },
19003
19198
  get isWorking() {
19004
- return D.isWorking;
19199
+ return O.isWorking;
19005
19200
  },
19006
19201
  get isControllingPage() {
19007
- return D.pageControlActive;
19202
+ return O.pageControlActive;
19008
19203
  }
19009
19204
  }), (t, n) => {
19010
19205
  let a = Tn;
19011
19206
  return P(), Z("div", {
19012
- class: de(["floating-chat-widget", [T(ue), {
19207
+ class: de(["floating-chat-widget", [E(ue), {
19013
19208
  "floating-chat-widget--position-left": ye.value === "left",
19014
19209
  "floating-chat-widget--copilot": V.value,
19015
19210
  "floating-chat-widget--glass": G.value,
19016
19211
  "floating-chat-widget--no-button": we.value
19017
19212
  }]]),
19018
- style: ne(T(pe))
19213
+ style: te(E(pe))
19019
19214
  }, [
19020
- T(ae) ? (P(), L(fe("style"), { key: 0 }, {
19021
- default: B(() => [Ne(N(T(ae)), 1)]),
19215
+ E(ae) ? (P(), L(fe("style"), { key: 0 }, {
19216
+ default: B(() => [Ne(N(E(ae)), 1)]),
19022
19217
  _: 1
19023
19218
  })) : q("", !0),
19024
19219
  Oe.value ? (P(), L(fe("style"), { key: 1 }, {
@@ -19026,14 +19221,14 @@ var uC = {
19026
19221
  _: 1
19027
19222
  })) : q("", !0),
19028
19223
  F(K, { name: "floating-chat-widget-frame" }, {
19029
- default: B(() => [V.value && T(l) ? (P(), Z("div", uC, [H("div", {
19224
+ default: B(() => [V.value && E(l) ? (P(), Z("div", DC, [H("div", {
19030
19225
  class: "floating-chat-widget__frame-window",
19031
- style: ne(Se.value)
19032
- }, [F(lC, { active: xe.value }, null, 8, ["active"])], 4)])) : q("", !0)]),
19226
+ style: te(Se.value)
19227
+ }, [F(EC, { active: xe.value }, null, 8, ["active"])], 4)])) : q("", !0)]),
19033
19228
  _: 1
19034
19229
  }),
19035
19230
  F(K, { name: "floating-chat-widget-frame" }, {
19036
- default: B(() => [V.value && T(l) ? (P(), Z("div", {
19231
+ default: B(() => [V.value && E(l) ? (P(), Z("div", {
19037
19232
  key: 0,
19038
19233
  class: "floating-chat-widget__backdrop",
19039
19234
  onClick: u
@@ -19041,10 +19236,10 @@ var uC = {
19041
19236
  _: 1
19042
19237
  }),
19043
19238
  F(K, { name: "slide-bottom" }, {
19044
- default: B(() => [(T(A) || T(ie)) && !T(se) && !we.value && !(V.value && T(l)) ? (P(), Z("div", dC, [F(sC, {
19239
+ default: B(() => [(E(A) || E(ie)) && !E(se) && !we.value && !(V.value && E(l)) ? (P(), Z("div", OC, [F(wC, {
19045
19240
  "agent-id": e.agentId,
19046
- message: T(A)?.interface.initialMessage,
19047
- enabled: !T(l) && T(A)?.interface?.welcomePopup,
19241
+ message: E(A)?.interface.initialMessage,
19242
+ enabled: !E(l) && E(A)?.interface?.welcomePopup,
19048
19243
  onOpen: u
19049
19244
  }, null, 8, [
19050
19245
  "agent-id",
@@ -19052,32 +19247,32 @@ var uC = {
19052
19247
  "enabled"
19053
19248
  ]), H("button", {
19054
19249
  type: "button",
19055
- "aria-label": T(l) ? t.$t("action.closeChat") : t.$t("action.openChat"),
19056
- "aria-expanded": T(l),
19250
+ "aria-label": E(l) ? t.$t("action.closeChat") : t.$t("action.openChat"),
19251
+ "aria-expanded": E(l),
19057
19252
  class: "floating-chat-widget__button",
19058
19253
  onClick: ve(u, ["stop"])
19059
- }, [T(l) ? (P(), Z("svg", pC, [...n[5] ||= [H("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }, null, -1)]])) : (P(), Z("svg", mC, [...n[6] ||= [H("path", { d: "M12 1.99996C12.8632 1.99996 13.701 2.10973 14.5 2.31539L14 4.25192C13.3608 4.0874 12.6906 3.99997 12 3.99997C7.58174 3.99997 4.00002 7.58172 4 12C4 13.3344 4.3255 14.6174 4.93945 15.7656L5.28906 16.4189L4.63379 19.3662L7.58105 18.7109L8.23438 19.0605C9.38255 19.6745 10.6656 20 12 20C16.4183 20 20 16.4183 20 12C20 11.6771 19.9805 11.3587 19.9434 11.0459L21.9297 10.8095C21.976 11.1999 22 11.5972 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.69425 21.5746 7.29102 20.8242L2 22L3.17578 16.709C2.42541 15.3057 2 13.7025 2 12C2.00002 6.47714 6.47717 1.99996 12 1.99996ZM19.5293 1.3193C19.7058 0.893513 20.2942 0.8935 20.4707 1.3193L20.7236 1.93063C21.1555 2.97343 21.9615 3.80614 22.9746 4.2568L23.6914 4.57614C24.1022 4.75882 24.1022 5.35635 23.6914 5.53903L22.9326 5.87692C21.945 6.3162 21.1534 7.11943 20.7139 8.1279L20.4668 8.69333C20.2863 9.10747 19.7136 9.10747 19.5332 8.69333L19.2861 8.1279C18.8466 7.11942 18.0551 6.3162 17.0674 5.87692L16.3076 5.53903C15.8974 5.35618 15.8974 4.75895 16.3076 4.57614L17.0254 4.2568C18.0384 3.80614 18.8445 2.97343 19.2764 1.93063L19.5293 1.3193Z" }, null, -1)]]))], 8, fC)])) : q("", !0)]),
19254
+ }, [E(l) ? (P(), Z("svg", AC, [...n[5] ||= [H("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }, null, -1)]])) : (P(), Z("svg", jC, [...n[6] ||= [H("path", { d: "M12 1.99996C12.8632 1.99996 13.701 2.10973 14.5 2.31539L14 4.25192C13.3608 4.0874 12.6906 3.99997 12 3.99997C7.58174 3.99997 4.00002 7.58172 4 12C4 13.3344 4.3255 14.6174 4.93945 15.7656L5.28906 16.4189L4.63379 19.3662L7.58105 18.7109L8.23438 19.0605C9.38255 19.6745 10.6656 20 12 20C16.4183 20 20 16.4183 20 12C20 11.6771 19.9805 11.3587 19.9434 11.0459L21.9297 10.8095C21.976 11.1999 22 11.5972 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.69425 21.5746 7.29102 20.8242L2 22L3.17578 16.709C2.42541 15.3057 2 13.7025 2 12C2.00002 6.47714 6.47717 1.99996 12 1.99996ZM19.5293 1.3193C19.7058 0.893513 20.2942 0.8935 20.4707 1.3193L20.7236 1.93063C21.1555 2.97343 21.9615 3.80614 22.9746 4.2568L23.6914 4.57614C24.1022 4.75882 24.1022 5.35635 23.6914 5.53903L22.9326 5.87692C21.945 6.3162 21.1534 7.11943 20.7139 8.1279L20.4668 8.69333C20.2863 9.10747 19.7136 9.10747 19.5332 8.69333L19.2861 8.1279C18.8466 7.11942 18.0551 6.3162 17.0674 5.87692L16.3076 5.53903C15.8974 5.35618 15.8974 4.75895 16.3076 4.57614L17.0254 4.2568C18.0384 3.80614 18.8445 2.97343 19.2764 1.93063L19.5293 1.3193Z" }, null, -1)]]))], 8, kC)])) : q("", !0)]),
19060
19255
  _: 1
19061
19256
  }),
19062
19257
  F(K, { name: De.value }, {
19063
- default: B(() => [T(l) && (T(M) || T(ce)) && !(T(A) && T(d).data) ? (P(), Z("div", hC, [T(M) ? (P(), L($S, {
19258
+ default: B(() => [E(l) && (E(M) || E(ce)) && !(E(A) && E(d).data) ? (P(), Z("div", MC, [E(M) ? (P(), L(gC, {
19064
19259
  key: 0,
19065
- "error-message": T(ke),
19260
+ "error-message": E(ke),
19066
19261
  "onUpdate:errorMessage": n[0] ||= (e) => Ce(ke) ? ke.value = e : null,
19067
- success: T(Ae),
19262
+ success: E(Ae),
19068
19263
  "onUpdate:success": n[1] ||= (e) => Ce(Ae) ? Ae.value = e : null,
19069
- branding: T(ie),
19070
- "auth-methods": T(j),
19071
- "base-url": T(r),
19072
- loading: T(je),
19073
- "two-factor-methods": T(v)?.methods,
19074
- onSignIn: T(Me),
19075
- onSignUp: T(J),
19076
- onRequestReset: T(Y),
19077
- onSocial: T(X),
19078
- onVerifyTwoFactor: T(Pe),
19079
- onSendTwoFactorCode: T(Fe),
19080
- onCancelTwoFactor: T(Ie)
19264
+ branding: E(ie),
19265
+ "auth-methods": E(j),
19266
+ "base-url": E(r),
19267
+ loading: E(je),
19268
+ "two-factor-methods": E(v)?.methods,
19269
+ onSignIn: E(Me),
19270
+ onSignUp: E(J),
19271
+ onRequestReset: E(Y),
19272
+ onSocial: E(X),
19273
+ onVerifyTwoFactor: E(Pe),
19274
+ onSendTwoFactorCode: E(Fe),
19275
+ onCancelTwoFactor: E(Ie)
19081
19276
  }, null, 8, [
19082
19277
  "error-message",
19083
19278
  "success",
@@ -19093,7 +19288,7 @@ var uC = {
19093
19288
  "onVerifyTwoFactor",
19094
19289
  "onSendTwoFactorCode",
19095
19290
  "onCancelTwoFactor"
19096
- ])) : (P(), L(rC, { key: 1 })), H("span", gC, [F(a, {
19291
+ ])) : (P(), L(bC, { key: 1 })), H("span", NC, [F(a, {
19097
19292
  modifiers: "action-quiet",
19098
19293
  icon: "ri:close-line",
19099
19294
  title: t.$t("action.close"),
@@ -19102,7 +19297,7 @@ var uC = {
19102
19297
  _: 1
19103
19298
  }, 8, ["name"]),
19104
19299
  F(K, { name: De.value }, {
19105
- default: B(() => [T(l) && !T(M) && !T(A) && !T(ce) ? (P(), Z("div", _C, [F(rC), H("span", vC, [F(a, {
19300
+ default: B(() => [E(l) && !E(M) && !E(A) && !E(ce) ? (P(), Z("div", PC, [F(bC), H("span", FC, [F(a, {
19106
19301
  modifiers: "action-quiet",
19107
19302
  icon: "ri:close-line",
19108
19303
  title: t.$t("action.close"),
@@ -19111,20 +19306,20 @@ var uC = {
19111
19306
  _: 1
19112
19307
  }, 8, ["name"]),
19113
19308
  F(K, { name: De.value }, {
19114
- default: B(() => [T(A) && T(l) && T(d).data ? (P(), L(pS, {
19309
+ default: B(() => [E(A) && E(l) && E(d).data ? (P(), L(pS, {
19115
19310
  key: e.agentId,
19116
19311
  ref_key: "chatbotEl",
19117
19312
  ref: o,
19118
19313
  class: "floating-chat-widget__chat",
19119
19314
  modifier: V.value ? "panel" : void 0,
19120
- "base-url": T(r),
19315
+ "base-url": E(r),
19121
19316
  "agent-id": e.agentId,
19122
- "user-id": T(h),
19123
- name: T(A).name,
19124
- "agent-interface": T(A).interface,
19125
- "agent-file-upload": T(A).capabilities?.fileUpload,
19126
- voice: T(A).capabilities?.voice,
19127
- headers: T(p),
19317
+ "user-id": E(h),
19318
+ name: E(A).name,
19319
+ "agent-interface": E(A).interface,
19320
+ "agent-file-upload": E(A).capabilities?.fileUpload,
19321
+ voice: E(A).capabilities?.voice,
19322
+ headers: E(p),
19128
19323
  "system-theme": e.systemTheme,
19129
19324
  actions: [
19130
19325
  "upvote",
@@ -19133,36 +19328,36 @@ var uC = {
19133
19328
  "regenerate"
19134
19329
  ],
19135
19330
  "external-context": s.value,
19136
- "host-tools": T(A).capabilities?.hostTools,
19331
+ "host-tools": E(A).capabilities?.hostTools,
19137
19332
  "host-tool-registry": c.value,
19138
- "page-access": T(A).capabilities?.pageAccess,
19139
- "page-tool-registry": T(R),
19140
- "page-forms": T(ge),
19141
- onError: k,
19142
- onLoaded: T(re).onLoaded
19333
+ "page-access": E(A).capabilities?.pageAccess,
19334
+ "page-tool-registry": E(R),
19335
+ "page-forms": E(ge),
19336
+ onError: re,
19337
+ onLoaded: E(ne).onLoaded
19143
19338
  }, {
19144
19339
  actions: B(({ useColorsForAgentHeader: e }) => [F(a, {
19145
- modifiers: e ? `action-quiet-${T(le)}` : "action-quiet",
19340
+ modifiers: e ? `action-quiet-${E(le)}` : "action-quiet",
19146
19341
  icon: "ri:close-line",
19147
19342
  title: t.$t("action.close"),
19148
19343
  onClick: ve(u, ["stop"])
19149
19344
  }, null, 8, ["modifiers", "title"])]),
19150
- "view-auth": B(() => [F($S, {
19151
- "error-message": T(ke),
19345
+ "view-auth": B(() => [F(gC, {
19346
+ "error-message": E(ke),
19152
19347
  "onUpdate:errorMessage": n[2] ||= (e) => Ce(ke) ? ke.value = e : null,
19153
- success: T(Ae),
19348
+ success: E(Ae),
19154
19349
  "onUpdate:success": n[3] ||= (e) => Ce(Ae) ? Ae.value = e : null,
19155
- branding: T(_e),
19156
- "auth-methods": T(j),
19157
- loading: T(je),
19158
- "two-factor-methods": T(v)?.methods,
19159
- onSignIn: T(Me),
19160
- onSignUp: T(J),
19161
- onRequestReset: T(Y),
19162
- onSocial: T(X),
19163
- onVerifyTwoFactor: T(Pe),
19164
- onSendTwoFactorCode: T(Fe),
19165
- onCancelTwoFactor: T(Ie)
19350
+ branding: E(_e),
19351
+ "auth-methods": E(j),
19352
+ loading: E(je),
19353
+ "two-factor-methods": E(v)?.methods,
19354
+ onSignIn: E(Me),
19355
+ onSignUp: E(J),
19356
+ onRequestReset: E(Y),
19357
+ onSocial: E(X),
19358
+ onVerifyTwoFactor: E(Pe),
19359
+ onSendTwoFactorCode: E(Fe),
19360
+ onCancelTwoFactor: E(Ie)
19166
19361
  }, null, 8, [
19167
19362
  "error-message",
19168
19363
  "success",
@@ -19200,44 +19395,44 @@ var uC = {
19200
19395
  ])) : q("", !0)]),
19201
19396
  _: 1
19202
19397
  }, 8, ["name"]),
19203
- V.value && T(l) ? (P(), Z("div", {
19398
+ V.value && E(l) ? (P(), Z("div", {
19204
19399
  key: 2,
19205
19400
  class: "floating-chat-widget__panel-beam",
19206
- style: ne(Se.value),
19401
+ style: te(Se.value),
19207
19402
  "aria-hidden": "true"
19208
- }, [F(lC, { active: be.value }, null, 8, ["active"])], 4)) : q("", !0),
19403
+ }, [F(EC, { active: be.value }, null, 8, ["active"])], 4)) : q("", !0),
19209
19404
  F(gS, {
19210
- active: T(D).pageControlActive,
19211
- action: T(D).pageAction?.title,
19212
- onStop: n[4] ||= (e) => T(D).stopHostActions()
19405
+ active: E(O).pageControlActive,
19406
+ action: E(O).pageAction?.title,
19407
+ onStop: n[4] ||= (e) => E(O).stopHostActions()
19213
19408
  }, null, 8, ["active", "action"]),
19214
- T(D).hostConfirmation && T(O) ? (P(), L(vS, {
19409
+ E(O).hostConfirmation && E(k) ? (P(), L(vS, {
19215
19410
  key: 3,
19216
- question: T(D).hostConfirmation.question ?? T(E)("toolApproval.prompt"),
19217
- details: T(D).hostConfirmation.details,
19218
- onRespond: T(D).respondHostConfirmation
19411
+ question: E(O).hostConfirmation.question ?? E(D)("toolApproval.prompt"),
19412
+ details: E(O).hostConfirmation.details,
19413
+ onRespond: E(O).respondHostConfirmation
19219
19414
  }, null, 8, [
19220
19415
  "question",
19221
19416
  "details",
19222
19417
  "onRespond"
19223
19418
  ])) : q("", !0),
19224
- F(T(i))
19419
+ F(E(i))
19225
19420
  ], 6);
19226
19421
  };
19227
19422
  }
19228
19423
  }), [["styles", [".floating-chat-widget{--chatbot-copilot-gap:var(--spacing-12);--chatbot-copilot-panel-width:clamp(320px, 24vw, 406px);--chatbot-copilot-duration:.45s;--chatbot-copilot-easing:cubic-bezier(.32, .72, 0, 1);--chatbot-copilot-top:calc(env(safe-area-inset-top) + var(--chatbot-copilot-gap));--chatbot-copilot-right:calc(env(safe-area-inset-right) + var(--chatbot-copilot-gap));--chatbot-copilot-bottom:calc(env(safe-area-inset-bottom) + var(--chatbot-copilot-gap));--chatbot-copilot-left:calc(env(safe-area-inset-left) + var(--chatbot-copilot-gap));display:contents}@media (prefers-reduced-motion:reduce){.floating-chat-widget{--chatbot-copilot-duration:.01ms}}.floating-chat-widget__launcher{bottom:var(--spacing-16);right:var(--spacing-16);align-items:flex-end;gap:var(--spacing-14);z-index:99999997;background:0 0;flex-direction:column;width:fit-content;display:flex;position:fixed}.floating-chat-widget__button{padding:var(--spacing-10);width:var(--spacing-48);height:var(--spacing-48);border-radius:var(--rounded-full);background-color:var(--chatbot-main-color,var(--color-black,#000));color:var(--chatbot-contrast-color,var(--color-white,#fff));cursor:pointer;pointer-events:auto;border:0;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s ease-in-out;display:block;transform:scale(1);box-shadow:0 4px 8px #0003}.floating-chat-widget__button:hover{transform:scale(1.1)}.floating-chat-widget__chat{z-index:2147483647;height:auto;position:fixed;inset:0;overflow:hidden}@media (width>=576px){.floating-chat-widget__chat{border-radius:var(--rounded-xxl);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);width:406px;height:85dvh;inset:auto 16px 78px auto;box-shadow:0 260px 73px #0000,0 166px 67px #00000003,0 94px 56px #00000005,0 42px 42px #00000008,0 10px 23px #0000000a}}.floating-chat-widget__loading,.floating-chat-widget__auth{background-color:var(--color-surface,#fff);justify-content:center;align-items:center;display:flex}.floating-chat-widget__close{top:calc(env(safe-area-inset-top) + var(--spacing-8));right:calc(env(safe-area-inset-right) + var(--spacing-8));position:absolute}@media (width>=576px){.floating-chat-widget__close{display:none}}.floating-chat-widget--position-left .floating-chat-widget__launcher{right:unset;left:var(--spacing-16);align-items:flex-start}@media (width>=576px){.floating-chat-widget--position-left .floating-chat-widget__chat{right:unset;left:16px}}@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){@media (width>=576px){.floating-chat-widget--glass .floating-chat-widget__chat{--chatbot-glass-pane:color-mix(in srgb, var(--color-surface) 70%, transparent);--chatbot-glass-edge:color-mix(in srgb, var(--color-surface) 85%, transparent);--chatbot-glass-light:color-mix(in srgb, color-mix(in oklab, var(--color-surface) 55%, white) 85%, transparent);background-color:color-mix(in srgb, var(--color-surface) 72%, transparent);-webkit-backdrop-filter:blur(24px)saturate(180%);backdrop-filter:blur(24px)saturate(180%);box-shadow:0 1px 2px #0000000f,0 16px 40px -12px #0000003d,0 40px 80px -32px #00000047}.floating-chat-widget--glass .floating-chat-widget__chat:before{content:\"\";z-index:2;border-radius:inherit;padding:var(--spacing-px);background:linear-gradient(135deg, var(--chatbot-glass-light), var(--chatbot-glass-edge) 35%, transparent 60%, var(--chatbot-glass-edge));-webkit-mask-composite:xor;pointer-events:none;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0;-webkit-mask-size:auto,auto;mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;mask-repeat:repeat,repeat;-webkit-mask-clip:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot{background-color:#0000}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot__header{background-color:color-mix(in srgb, var(--color-surface-1) 50%, transparent);border-bottom-color:var(--chatbot-glass-edge)}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-message:not(.pk-chatbot-message--user) .pk-chatbot-message__text,.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-message__loading-info,.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-messages__scroll-to-bottom{background-color:var(--chatbot-glass-pane);border-color:var(--chatbot-glass-edge);box-shadow:inset 0 1px 0 var(--chatbot-glass-light)}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-message--user .pk-chatbot-message__text{background-color:color-mix(in srgb, var(--chatbot-main-color,var(--color-surface-1)) 78%, transparent);border-color:color-mix(in srgb, var(--chatbot-main-color,var(--color-surface-3)) 88%, transparent);box-shadow:inset 0 1px #ffffff40}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input__notice{background-color:var(--chatbot-glass-pane)}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input__notice:after{display:none}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input:has(.pk-chatbot-input__notice) .pk-chatbot-input__form{border-top-left-radius:0;border-top-right-radius:0}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input__form{background-color:var(--chatbot-glass-pane)}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input__form:not(:has(:focus-within)){border-color:var(--chatbot-glass-edge)}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input__textarea,.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot-input__counter{background-color:#0000}.floating-chat-widget--glass .floating-chat-widget__chat .pk-chatbot__footer{border-top-color:var(--chatbot-glass-edge)}}@media (width>=576px) and (prefers-reduced-transparency:reduce){.floating-chat-widget--glass .floating-chat-widget__chat{background-color:var(--color-surface);-webkit-backdrop-filter:none;backdrop-filter:none}}}@media (width>=576px){.floating-chat-widget--no-button .floating-chat-widget__chat{bottom:16px}}.floating-chat-widget--copilot .floating-chat-widget__chat,.floating-chat-widget--copilot .floating-chat-widget__panel-beam{width:auto;height:auto;box-shadow:none;z-index:2147483647;border-radius:0;position:fixed;inset:0}@media (width>=992px){.floating-chat-widget--copilot .floating-chat-widget__chat,.floating-chat-widget--copilot .floating-chat-widget__panel-beam{inset:var(--chatbot-copilot-top) var(--chatbot-copilot-right) var(--chatbot-copilot-bottom) auto;width:var(--chatbot-copilot-panel-width);border-radius:var(--rounded-xl)}}.floating-chat-widget--copilot .floating-chat-widget__chat{background-color:var(--color-surface);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}@media (width>=992px){.floating-chat-widget--copilot .floating-chat-widget__chat{box-shadow:var(--shadow-xl);padding:0}}@media (width>=1280px){.floating-chat-widget--copilot .floating-chat-widget__chat{box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;background-color:#0000;border-radius:0}}.floating-chat-widget--copilot .floating-chat-widget__panel-beam{pointer-events:none}@media (width>=1280px){.floating-chat-widget--copilot .floating-chat-widget__panel-beam{display:none}}.floating-chat-widget--copilot .floating-chat-widget__close{display:block}.floating-chat-widget__backdrop{display:none}@media (width>=992px){.floating-chat-widget__backdrop{z-index:2147483646;background-color:#0000004d;display:block;position:fixed;inset:0}}@media (width>=1280px){.floating-chat-widget__backdrop{display:none}}.floating-chat-widget__frame{display:none}@media (width>=1280px){.floating-chat-widget__frame{z-index:2147483646;pointer-events:none;display:block;position:fixed;inset:0}}.floating-chat-widget__frame-window{inset:var(--chatbot-copilot-gap) calc(var(--chatbot-copilot-panel-width) + 2 * var(--chatbot-copilot-gap)) var(--chatbot-copilot-gap) var(--chatbot-copilot-gap);border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded-xl);box-shadow:0 0 0 100vmax var(--color-surface-2);position:absolute}@media (width>=992px){.floating-chat-widget--copilot.floating-chat-widget--position-left .floating-chat-widget__chat,.floating-chat-widget--copilot.floating-chat-widget--position-left .floating-chat-widget__panel-beam{inset:var(--chatbot-copilot-top) auto var(--chatbot-copilot-bottom) var(--chatbot-copilot-left)}}.floating-chat-widget--copilot.floating-chat-widget--position-left .floating-chat-widget__frame-window{inset:var(--chatbot-copilot-gap) var(--chatbot-copilot-gap) var(--chatbot-copilot-gap) calc(var(--chatbot-copilot-panel-width) + 2 * var(--chatbot-copilot-gap))}.floating-chat-widget-frame-enter-active,.floating-chat-widget-frame-leave-active{transition:opacity var(--chatbot-copilot-duration) var(--chatbot-copilot-easing)}.floating-chat-widget-frame-enter-active .floating-chat-widget__frame-window,.floating-chat-widget-frame-leave-active .floating-chat-widget__frame-window{transition:left var(--chatbot-copilot-duration) var(--chatbot-copilot-easing), right var(--chatbot-copilot-duration) var(--chatbot-copilot-easing)}.floating-chat-widget-frame-enter-from,.floating-chat-widget-frame-leave-to{opacity:0}.floating-chat-widget-frame-enter-from .floating-chat-widget__frame-window,.floating-chat-widget-frame-leave-to .floating-chat-widget__frame-window{right:var(--chatbot-copilot-gap)}.floating-chat-widget-copilot-enter-active,.floating-chat-widget-copilot-leave-active{transition:transform var(--chatbot-copilot-duration) var(--chatbot-copilot-easing)}.floating-chat-widget-copilot-enter-from,.floating-chat-widget-copilot-leave-to{transform:translateX(calc(100% + var(--chatbot-copilot-right)))}.floating-chat-widget--position-left .floating-chat-widget-frame-enter-from .floating-chat-widget__frame-window,.floating-chat-widget--position-left .floating-chat-widget-frame-leave-to .floating-chat-widget__frame-window{left:var(--chatbot-copilot-gap)}.floating-chat-widget--position-left .floating-chat-widget-copilot-enter-from,.floating-chat-widget--position-left .floating-chat-widget-copilot-leave-to{transform:translateX(calc(-100% - var(--chatbot-copilot-left)))}"]]]);
19229
19424
  // src/components/EmbeddedChatWidget.ce.vue?vue&type=script&setup=true&lang.ts
19230
19425
  G(), R(), Y(), De();
19231
- var xC = {
19426
+ var RC = {
19232
19427
  key: 3,
19233
19428
  class: "embedded-chat-widget embedded-chat-widget--not-found"
19234
- }, SC = {
19429
+ }, zC = {
19235
19430
  key: 0,
19236
19431
  class: "embedded-chat-widget embedded-chat-widget--auth"
19237
- }, CC = {
19432
+ }, BC = {
19238
19433
  key: 0,
19239
19434
  class: "embedded-chat-widget embedded-chat-widget--loading"
19240
- }, wC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
19435
+ }, VC = /*#__PURE__*/ Mn(/* @__PURE__ */ J({
19241
19436
  inheritAttrs: !1,
19242
19437
  __name: "EmbeddedChatWidget.ce",
19243
19438
  props: {
@@ -19282,6 +19477,10 @@ var xC = {
19282
19477
  theme: {
19283
19478
  default: void 0,
19284
19479
  type: String
19480
+ },
19481
+ followPageDialogs: {
19482
+ type: [Boolean, String],
19483
+ default: !1
19285
19484
  }
19286
19485
  },
19287
19486
  setup(e, { expose: t }) {
@@ -19291,7 +19490,7 @@ var xC = {
19291
19490
  organizationSlug: n.organizationSlug,
19292
19491
  agentId: n.agentId
19293
19492
  });
19294
- let { session: l, onError: u, headers: d, token: f, userId: p, isExternalAuth: m, signInWithEmail: h, twoFactorChallenge: g, verifyTwoFactor: _, sendTwoFactorCode: v, cancelTwoFactor: y, signUpWithEmail: b, requestPasswordReset: x, signInWithSocialPopup: S, signInWithExternalToken: ee, signOut: te } = p_({
19493
+ let { session: l, onError: u, headers: d, token: f, userId: p, isExternalAuth: m, signInWithEmail: h, twoFactorChallenge: g, verifyTwoFactor: _, sendTwoFactorCode: v, cancelTwoFactor: y, signUpWithEmail: b, requestPasswordReset: x, signInWithSocialPopup: S, signInWithExternalToken: C, signOut: ee } = p_({
19295
19494
  baseUrl: r,
19296
19495
  externalToken: () => n.externalToken,
19297
19496
  awaitExternalToken: !!n.awaitExternalToken && n.awaitExternalToken !== "false",
@@ -19305,60 +19504,60 @@ var xC = {
19305
19504
  I(p, (e) => {
19306
19505
  e && Ei({ userId: e });
19307
19506
  });
19308
- let w = m_({
19507
+ let T = m_({
19309
19508
  agentId: n.agentId,
19310
19509
  baseUrl: r,
19311
19510
  headers: d,
19312
19511
  userId: p
19313
19512
  });
19314
- Lh(() => w.isWorking), Rh(() => w.pageControlActive);
19315
- let E = x_(o, () => w.localChatId);
19513
+ Lh(() => T.isWorking), Rh(() => T.pageControlActive);
19514
+ let D = x_(o, () => T.localChatId);
19316
19515
  I(p, (e) => {
19317
19516
  e && a("ready");
19318
19517
  });
19319
- function D(e) {
19518
+ function O(e) {
19320
19519
  Oi(/* @__PURE__ */ Error(`${e.type}: ${e.title}`), { status: String(e.status) }), a("chat-error", {
19321
19520
  type: e.type,
19322
19521
  title: e.title,
19323
19522
  status: e.status
19324
19523
  }), u(e);
19325
19524
  }
19326
- let { t: O } = Le({ useScope: "global" }), re = ES(() => !!w.hostConfirmation || w.pageControlActive);
19327
- PS(re, () => w.pageControlActive, {
19328
- text: () => O("messagePart.pageControlActive"),
19329
- stopLabel: () => O("action.stop"),
19330
- onStop: () => void w.stopHostActions()
19525
+ let { t: k } = Le({ useScope: "global" }), ne = ES(() => !!T.hostConfirmation || T.pageControlActive), re = ZS(xe(), () => !!n.followPageDialogs && n.followPageDialogs !== "false");
19526
+ PS(ne, () => T.pageControlActive && !re.value, {
19527
+ text: () => k("messagePart.pageControlActive"),
19528
+ stopLabel: () => k("action.stop"),
19529
+ onStop: () => void T.stopHostActions()
19331
19530
  });
19332
- let { agent: k, branding: A, authMethods: ie, deploymentCss: j, deployment: ae, requiresAuth: oe, notFound: M, isLoading: se, reload: ce, themeClass: le, themeStyle: ue } = v_({
19531
+ let { agent: A, branding: ie, authMethods: j, deploymentCss: ae, deployment: oe, requiresAuth: M, notFound: se, isLoading: ce, reload: le, themeClass: ue, themeStyle: me } = v_({
19333
19532
  baseUrl: r,
19334
19533
  organizationSlug: () => n.organizationSlug,
19335
19534
  agentId: () => n.agentId,
19336
19535
  headers: d,
19337
19536
  systemTheme: () => n.systemTheme,
19338
19537
  theme: () => n.theme
19339
- }), me = U(() => n.theme && k.value ? {
19340
- ...k.value.interface,
19538
+ }), R = U(() => n.theme && A.value ? {
19539
+ ...A.value.interface,
19341
19540
  theme: n.theme
19342
- } : k.value?.interface);
19343
- I(ae, (e) => {
19541
+ } : A.value?.interface);
19542
+ I(oe, (e) => {
19344
19543
  e?.telemetry && Ti({
19345
19544
  backendUrl: r,
19346
19545
  ...e.telemetry
19347
19546
  });
19348
19547
  });
19349
- let { registry: R, forms: z, registerPages: _e } = Fh(() => k.value?.capabilities?.pageAccess, O), { authBranding: ve } = __({
19350
- agent: k,
19351
- branding: A,
19352
- authMethods: ie,
19548
+ let { registry: z, forms: _e, registerPages: ve } = Fh(() => A.value?.capabilities?.pageAccess, k), { authBranding: ye } = __({
19549
+ agent: A,
19550
+ branding: ie,
19551
+ authMethods: j,
19353
19552
  session: l,
19354
- signOut: te,
19553
+ signOut: ee,
19355
19554
  isExternalAuth: m,
19356
- frontendUrl: () => ae.value?.frontendUrl,
19555
+ frontendUrl: () => oe.value?.frontendUrl,
19357
19556
  token: f,
19358
19557
  baseUrl: r,
19359
19558
  headers: d,
19360
19559
  cookieName: n.cookieName
19361
- }), { authError: ye, authSuccess: V, authLoading: be, handleSignIn: xe, handleSignUp: Se, handleReset: G, handleSocial: we, handleVerifyTwoFactor: Te, handleSendTwoFactorCode: Ee, handleCancelTwoFactor: De } = y_({
19560
+ }), { authError: V, authSuccess: be, authLoading: Se, handleSignIn: G, handleSignUp: we, handleReset: Te, handleSocial: Ee, handleVerifyTwoFactor: De, handleSendTwoFactorCode: Oe, handleCancelTwoFactor: ke } = y_({
19362
19561
  signInWithEmail: h,
19363
19562
  isTwoFactorPending: () => !!g.value,
19364
19563
  verifyTwoFactor: _,
@@ -19366,24 +19565,24 @@ var xC = {
19366
19565
  cancelTwoFactor: y,
19367
19566
  signUpWithEmail: b,
19368
19567
  requestPasswordReset: x,
19369
- frontendUrl: () => ae.value?.frontendUrl,
19568
+ frontendUrl: () => oe.value?.frontendUrl,
19370
19569
  signInWithSocialPopup: S,
19371
19570
  refetchSession: () => l.value.refetch(),
19372
- reload: ce
19373
- }), Oe = U(() => n.forwardedSlots ? n.forwardedSlots.split(",").map((e) => e.trim()).filter(Boolean) : []), ke = U(() => l.value.data?.user?.isAnonymous ? void 0 : l.value.data?.user?.name), Ae = U(() => {
19571
+ reload: le
19572
+ }), Ae = U(() => n.forwardedSlots ? n.forwardedSlots.split(",").map((e) => e.trim()).filter(Boolean) : []), je = U(() => l.value.data?.user?.isAnonymous ? void 0 : l.value.data?.user?.name), Me = U(() => {
19374
19573
  let e = [
19375
- k.value?.interface?.customCss,
19376
- A.value?.interface.customCss,
19574
+ A.value?.interface?.customCss,
19575
+ ie.value?.interface.customCss,
19377
19576
  n.customCss
19378
19577
  ].filter(Boolean);
19379
19578
  return e.length ? e.join("\n") : void 0;
19380
19579
  });
19381
19580
  return t({
19382
19581
  sendMessage(e) {
19383
- E.send(e);
19582
+ D.send(e);
19384
19583
  },
19385
19584
  startNewChat() {
19386
- E.invalidate(), w.startNewChat();
19585
+ D.invalidate(), T.startNewChat();
19387
19586
  },
19388
19587
  setContext(e) {
19389
19588
  s.value = e;
@@ -19394,64 +19593,64 @@ var xC = {
19394
19593
  unregisterTool(e) {
19395
19594
  c.value = c.value.filter((t) => t.name !== e);
19396
19595
  },
19397
- registerPages: _e,
19398
- signIn: ee,
19399
- signOut: te,
19596
+ registerPages: ve,
19597
+ signIn: C,
19598
+ signOut: ee,
19400
19599
  get isWorking() {
19401
- return w.isWorking;
19600
+ return T.isWorking;
19402
19601
  },
19403
19602
  get isControllingPage() {
19404
- return w.pageControlActive;
19603
+ return T.pageControlActive;
19405
19604
  }
19406
19605
  }), (t, n) => (P(), Z("div", {
19407
- class: de(["embedded-chat-widget-root", T(le)]),
19408
- style: ne(T(ue))
19606
+ class: de(["embedded-chat-widget-root", E(ue)]),
19607
+ style: te(E(me))
19409
19608
  }, [
19410
- T(j) ? (P(), L(fe("style"), { key: 0 }, {
19411
- default: B(() => [Ne(N(T(j)), 1)]),
19609
+ E(ae) ? (P(), L(fe("style"), { key: 0 }, {
19610
+ default: B(() => [Ne(N(E(ae)), 1)]),
19412
19611
  _: 1
19413
19612
  })) : q("", !0),
19414
- Ae.value ? (P(), L(fe("style"), { key: 1 }, {
19415
- default: B(() => [Ne(N(Ae.value), 1)]),
19613
+ Me.value ? (P(), L(fe("style"), { key: 1 }, {
19614
+ default: B(() => [Ne(N(Me.value), 1)]),
19416
19615
  _: 1
19417
19616
  })) : q("", !0),
19418
19617
  F(gS, {
19419
- active: T(w).pageControlActive,
19420
- action: T(w).pageAction?.title,
19421
- onStop: n[0] ||= (e) => T(w).stopHostActions()
19618
+ active: E(T).pageControlActive,
19619
+ action: E(T).pageAction?.title,
19620
+ onStop: n[0] ||= (e) => E(T).stopHostActions()
19422
19621
  }, null, 8, ["active", "action"]),
19423
- T(w).hostConfirmation && T(re) ? (P(), L(vS, {
19622
+ E(T).hostConfirmation && E(ne) && !E(re) ? (P(), L(vS, {
19424
19623
  key: 2,
19425
- question: T(w).hostConfirmation.question ?? T(O)("toolApproval.prompt"),
19426
- details: T(w).hostConfirmation.details,
19427
- onRespond: T(w).respondHostConfirmation
19624
+ question: E(T).hostConfirmation.question ?? E(k)("toolApproval.prompt"),
19625
+ details: E(T).hostConfirmation.details,
19626
+ onRespond: E(T).respondHostConfirmation
19428
19627
  }, null, 8, [
19429
19628
  "question",
19430
19629
  "details",
19431
19630
  "onRespond"
19432
19631
  ])) : q("", !0),
19433
- T(M) ? (P(), Z("div", xC, [H("p", null, N(T(O)("message.agentNotFound")), 1)])) : q("", !0),
19632
+ E(se) ? (P(), Z("div", RC, [H("p", null, N(E(k)("message.agentNotFound")), 1)])) : q("", !0),
19434
19633
  F(K, {
19435
19634
  name: "fade",
19436
19635
  appear: ""
19437
19636
  }, {
19438
- default: B(() => [(T(k) || T(A)) && !T(M) && T(oe) && (!T(l).data?.user?.id || T(l).data?.user?.isAnonymous) ? (P(), Z("div", SC, [T(ie) ? (P(), L($S, {
19637
+ default: B(() => [(E(A) || E(ie)) && !E(se) && E(M) && (!E(l).data?.user?.id || E(l).data?.user?.isAnonymous) ? (P(), Z("div", zC, [E(j) ? (P(), L(gC, {
19439
19638
  key: 0,
19440
- "error-message": T(ye),
19441
- "onUpdate:errorMessage": n[1] ||= (e) => Ce(ye) ? ye.value = e : null,
19442
- success: T(V),
19443
- "onUpdate:success": n[2] ||= (e) => Ce(V) ? V.value = e : null,
19444
- branding: T(A),
19445
- "auth-methods": T(ie),
19446
- loading: T(be),
19447
- "two-factor-methods": T(g)?.methods,
19448
- onSignIn: T(xe),
19449
- onSignUp: T(Se),
19450
- onRequestReset: T(G),
19451
- onSocial: T(we),
19452
- onVerifyTwoFactor: T(Te),
19453
- onSendTwoFactorCode: T(Ee),
19454
- onCancelTwoFactor: T(De)
19639
+ "error-message": E(V),
19640
+ "onUpdate:errorMessage": n[1] ||= (e) => Ce(V) ? V.value = e : null,
19641
+ success: E(be),
19642
+ "onUpdate:success": n[2] ||= (e) => Ce(be) ? be.value = e : null,
19643
+ branding: E(ie),
19644
+ "auth-methods": E(j),
19645
+ loading: E(Se),
19646
+ "two-factor-methods": E(g)?.methods,
19647
+ onSignIn: E(G),
19648
+ onSignUp: E(we),
19649
+ onRequestReset: E(Te),
19650
+ onSocial: E(Ee),
19651
+ onVerifyTwoFactor: E(De),
19652
+ onSendTwoFactorCode: E(Oe),
19653
+ onCancelTwoFactor: E(ke)
19455
19654
  }, null, 8, [
19456
19655
  "error-message",
19457
19656
  "success",
@@ -19466,31 +19665,31 @@ var xC = {
19466
19665
  "onVerifyTwoFactor",
19467
19666
  "onSendTwoFactorCode",
19468
19667
  "onCancelTwoFactor"
19469
- ])) : (P(), L(rC, { key: 1 }))])) : q("", !0)]),
19668
+ ])) : (P(), L(bC, { key: 1 }))])) : q("", !0)]),
19470
19669
  _: 1
19471
19670
  }),
19472
19671
  F(K, {
19473
19672
  name: "fade",
19474
19673
  appear: ""
19475
19674
  }, {
19476
- default: B(() => [T(se) && !T(M) ? (P(), Z("div", CC, [F(rC)])) : q("", !0)]),
19675
+ default: B(() => [E(ce) && !E(se) ? (P(), Z("div", BC, [F(bC)])) : q("", !0)]),
19477
19676
  _: 1
19478
19677
  }),
19479
- T(k) && T(l).data && !T(M) ? (P(), L(pS, {
19678
+ E(A) && E(l).data && !E(se) ? (P(), L(pS, {
19480
19679
  key: 4,
19481
19680
  ref_key: "chatbotEl",
19482
19681
  ref: o,
19483
19682
  class: "embedded-chat-widget",
19484
- "base-url": T(r),
19683
+ "base-url": E(r),
19485
19684
  "agent-id": e.agentId,
19486
- "user-id": T(p),
19487
- name: T(k).name,
19488
- "agent-interface": me.value,
19489
- "agent-file-upload": T(k).capabilities?.fileUpload,
19490
- voice: T(k).capabilities?.voice,
19685
+ "user-id": E(p),
19686
+ name: E(A).name,
19687
+ "agent-interface": R.value,
19688
+ "agent-file-upload": E(A).capabilities?.fileUpload,
19689
+ voice: E(A).capabilities?.voice,
19491
19690
  modifier: e.displayMode,
19492
- "user-name": ke.value,
19493
- headers: T(d),
19691
+ "user-name": je.value,
19692
+ headers: E(d),
19494
19693
  "system-theme": e.systemTheme,
19495
19694
  actions: [
19496
19695
  "upvote",
@@ -19499,32 +19698,32 @@ var xC = {
19499
19698
  "regenerate"
19500
19699
  ],
19501
19700
  "external-context": s.value,
19502
- "host-tools": T(k).capabilities?.hostTools,
19701
+ "host-tools": E(A).capabilities?.hostTools,
19503
19702
  "host-tool-registry": c.value,
19504
- "page-access": T(k).capabilities?.pageAccess,
19505
- "page-tool-registry": T(R),
19506
- "page-forms": T(z),
19507
- onError: D,
19508
- onLoaded: T(E).onLoaded
19703
+ "page-access": E(A).capabilities?.pageAccess,
19704
+ "page-tool-registry": E(z),
19705
+ "page-forms": E(_e),
19706
+ onError: O,
19707
+ onLoaded: E(D).onLoaded
19509
19708
  }, ge({
19510
19709
  "header-actions": B(() => [pe(t.$slots, "header-actions")]),
19511
19710
  actions: B(() => [pe(t.$slots, "actions")]),
19512
- "view-auth": B(() => [F($S, {
19513
- "error-message": T(ye),
19514
- "onUpdate:errorMessage": n[3] ||= (e) => Ce(ye) ? ye.value = e : null,
19515
- success: T(V),
19516
- "onUpdate:success": n[4] ||= (e) => Ce(V) ? V.value = e : null,
19517
- branding: T(ve),
19518
- "auth-methods": T(ie),
19519
- loading: T(be),
19520
- "two-factor-methods": T(g)?.methods,
19521
- onSignIn: T(xe),
19522
- onSignUp: T(Se),
19523
- onRequestReset: T(G),
19524
- onSocial: T(we),
19525
- onVerifyTwoFactor: T(Te),
19526
- onSendTwoFactorCode: T(Ee),
19527
- onCancelTwoFactor: T(De)
19711
+ "view-auth": B(() => [F(gC, {
19712
+ "error-message": E(V),
19713
+ "onUpdate:errorMessage": n[3] ||= (e) => Ce(V) ? V.value = e : null,
19714
+ success: E(be),
19715
+ "onUpdate:success": n[4] ||= (e) => Ce(be) ? be.value = e : null,
19716
+ branding: E(ye),
19717
+ "auth-methods": E(j),
19718
+ loading: E(Se),
19719
+ "two-factor-methods": E(g)?.methods,
19720
+ onSignIn: E(G),
19721
+ onSignUp: E(we),
19722
+ onRequestReset: E(Te),
19723
+ onSocial: E(Ee),
19724
+ onVerifyTwoFactor: E(De),
19725
+ onSendTwoFactorCode: E(Oe),
19726
+ onCancelTwoFactor: E(ke)
19528
19727
  }, null, 8, [
19529
19728
  "error-message",
19530
19729
  "success",
@@ -19541,7 +19740,7 @@ var xC = {
19541
19740
  "onCancelTwoFactor"
19542
19741
  ])]),
19543
19742
  _: 2
19544
- }, [C(Oe.value, (e) => ({
19743
+ }, [w(Ae.value, (e) => ({
19545
19744
  name: e,
19546
19745
  fn: B(() => [pe(t.$slots, e)])
19547
19746
  }))]), 1032, [
@@ -19564,13 +19763,13 @@ var xC = {
19564
19763
  "page-forms",
19565
19764
  "onLoaded"
19566
19765
  ])) : q("", !0),
19567
- F(T(i))
19766
+ F(E(i))
19568
19767
  ], 6));
19569
19768
  }
19570
19769
  }), [["styles", [".embedded-chat-widget-root{display:contents}.embedded-chat-widget{width:100%;height:100%}.embedded-chat-widget--loading,.embedded-chat-widget--not-found,.embedded-chat-widget--auth{justify-content:center;align-items:center;display:flex}.fade-enter-active,.fade-leave-active{transition:opacity .2s}.fade-enter-from,.fade-leave-to{opacity:0}"]]]);
19571
19770
  // src/lib.ts
19572
19771
  De();
19573
- function TC(e) {
19772
+ function HC(e) {
19574
19773
  let { t } = br.global;
19575
19774
  e.use(Qn()), e.use(br), e.provide(Re, br), e.use(Rr, {
19576
19775
  iconsCollections: [zr, Br],
@@ -19596,15 +19795,15 @@ function TC(e) {
19596
19795
  Oi(e instanceof Error ? e : Error(String(e)), { vueInfo: n });
19597
19796
  };
19598
19797
  }
19599
- function EC(e) {
19798
+ function UC(e) {
19600
19799
  let { styles: t } = e;
19601
19800
  return {
19602
- configureApp: TC,
19801
+ configureApp: HC,
19603
19802
  styles: [ki, ...t ?? []]
19604
19803
  };
19605
19804
  }
19606
- var DC = we(bC, EC(bC)), OC = we(wC, EC(wC));
19607
- customElements.define("floating-chat-widget", DC), customElements.define("embedded-chat-widget", OC);
19608
- export { OC as EmbeddedChatWidgetCe, DC as FloatingChatWidgetCe };
19805
+ var WC = we(LC, UC(LC)), GC = we(VC, UC(VC));
19806
+ customElements.define("floating-chat-widget", WC), customElements.define("embedded-chat-widget", GC);
19807
+ export { GC as EmbeddedChatWidgetCe, WC as FloatingChatWidgetCe };
19609
19808
 
19610
19809
  //# sourceMappingURL=ai-elements.es.js.map