@liip/liipgpt 1.0.1 → 1.0.2

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.
Files changed (33) hide show
  1. package/button/liipgpt-button.iife.js +6 -6
  2. package/chat/liipgpt-chat.iife.js +31 -31
  3. package/config/index.cjs +2 -1
  4. package/config/index.d.ts +8 -0
  5. package/config/index.js +2 -1
  6. package/configurator/_app/env.js +1 -1
  7. package/configurator/_app/immutable/chunks/{CthtHExI.js → BnEwtLey.js} +3 -3
  8. package/configurator/_app/immutable/chunks/{lxJsdCDD.js → CBr0si-w.js} +1 -1
  9. package/configurator/_app/immutable/chunks/{BMvVlUrl.js → CQ3p7-DI.js} +1 -1
  10. package/configurator/_app/immutable/chunks/CqH0QXRP.js +1 -0
  11. package/configurator/_app/immutable/chunks/{BcMr1Isb.js → CxgcR10w.js} +1 -1
  12. package/configurator/_app/immutable/chunks/{C6QPkKVb.js → Cy8wbfRb.js} +1 -1
  13. package/configurator/_app/immutable/chunks/{HtQdmN-S.js → D6mAnY0-.js} +1 -1
  14. package/configurator/_app/immutable/chunks/{8PzG14q7.js → DeDaIr-m.js} +1 -1
  15. package/configurator/_app/immutable/chunks/{Crb1ifvw.js → dR-jW0T5.js} +32 -32
  16. package/configurator/_app/immutable/chunks/qnNG2BJ8.js +3 -0
  17. package/configurator/_app/immutable/entry/{app.DLjyDu01.js → app.DQ1xtJww.js} +2 -2
  18. package/configurator/_app/immutable/entry/start.CxotJNtS.js +1 -0
  19. package/configurator/_app/immutable/nodes/{0.Cu_Gc0Ri.js → 0.1RFJkIO3.js} +3 -1
  20. package/configurator/_app/immutable/nodes/{1.CMbEHgX0.js → 1.BGVJgVHX.js} +1 -1
  21. package/configurator/_app/immutable/nodes/2.DEQ8Upwu.js +1 -0
  22. package/configurator/_app/immutable/nodes/{3.CnRlwgWw.js → 3.BYbNCdl3.js} +1 -1
  23. package/configurator/_app/version.json +1 -1
  24. package/configurator/index.html +6 -6
  25. package/configurator/sidebar.html +6 -6
  26. package/index.cjs +3 -1
  27. package/index.d.ts +33 -0
  28. package/index.js +3 -1
  29. package/package.json +1 -1
  30. package/configurator/_app/immutable/chunks/Blpq5ghW.js +0 -3
  31. package/configurator/_app/immutable/chunks/DpWDGuko.js +0 -1
  32. package/configurator/_app/immutable/entry/start.Dri2trH_.js +0 -1
  33. package/configurator/_app/immutable/nodes/2.gQZZQ4pa.js +0 -1
package/config/index.cjs CHANGED
@@ -4299,7 +4299,8 @@ var completeChatConfigSchema = exports_external.object({
4299
4299
  translations: translationsSchema,
4300
4300
  buttonHref: exports_external.string().optional(),
4301
4301
  addQueryToUrlParams: exports_external.boolean().optional(),
4302
- renderKatex: exports_external.boolean().optional()
4302
+ renderKatex: exports_external.boolean().optional(),
4303
+ sendReferrer: exports_external.enum(["all", "own", "none", "location"]).optional()
4303
4304
  });
4304
4305
  var chatConfigSchema = completeChatConfigSchema.partial();
4305
4306
  var chatConfigSchemaWithLegacyThemeName = chatConfigSchema.and(exports_external.object({
package/config/index.d.ts CHANGED
@@ -5560,6 +5560,12 @@ export declare const chatConfigSchema: z.ZodObject<{
5560
5560
  buttonHref: z.ZodOptional<z.ZodOptional<z.ZodString>>;
5561
5561
  addQueryToUrlParams: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
5562
5562
  renderKatex: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
5563
+ sendReferrer: z.ZodOptional<z.ZodOptional<z.ZodEnum<[
5564
+ "all",
5565
+ "own",
5566
+ "none",
5567
+ "location"
5568
+ ]>>>;
5563
5569
  }, "strip", z.ZodTypeAny, {
5564
5570
  menu?: Partial<Record<"en" | "de" | "fr" | "it", {
5565
5571
  label: string;
@@ -5907,6 +5913,7 @@ export declare const chatConfigSchema: z.ZodObject<{
5907
5913
  buttonHref?: string | undefined;
5908
5914
  addQueryToUrlParams?: boolean | undefined;
5909
5915
  renderKatex?: boolean | undefined;
5916
+ sendReferrer?: "all" | "own" | "none" | "location" | undefined;
5910
5917
  }, {
5911
5918
  menu?: Partial<Record<"en" | "de" | "fr" | "it", {
5912
5919
  label: string;
@@ -6254,6 +6261,7 @@ export declare const chatConfigSchema: z.ZodObject<{
6254
6261
  buttonHref?: string | undefined;
6255
6262
  addQueryToUrlParams?: boolean | undefined;
6256
6263
  renderKatex?: boolean | undefined;
6264
+ sendReferrer?: "all" | "own" | "none" | "location" | undefined;
6257
6265
  }>;
6258
6266
  export type ChatConfig = z.infer<typeof chatConfigSchema>;
6259
6267
  declare const themeSchema: ZodObject<{
package/config/index.js CHANGED
@@ -4275,7 +4275,8 @@ var completeChatConfigSchema = exports_external.object({
4275
4275
  translations: translationsSchema,
4276
4276
  buttonHref: exports_external.string().optional(),
4277
4277
  addQueryToUrlParams: exports_external.boolean().optional(),
4278
- renderKatex: exports_external.boolean().optional()
4278
+ renderKatex: exports_external.boolean().optional(),
4279
+ sendReferrer: exports_external.enum(["all", "own", "none", "location"]).optional()
4279
4280
  });
4280
4281
  var chatConfigSchema = completeChatConfigSchema.partial();
4281
4282
  var chatConfigSchemaWithLegacyThemeName = chatConfigSchema.and(exports_external.object({
@@ -1 +1 @@
1
- export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"1.0.1"}
1
+ export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"1.0.2"}
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./lxJsdCDD.js","./NZTpNUN0.js","./DUt8zN7X.js","./BiXZbQqO.js","./8PzG14q7.js","./Dq6jck_i.js","./Crb1ifvw.js","./C6QPkKVb.js","./Blpq5ghW.js","./D5wkZK_2.js","./BcMr1Isb.js","./DpWDGuko.js","./BMvVlUrl.js","./HtQdmN-S.js"])))=>i.map(i=>d[i]);
2
- import{i as j,b as rt,_ as st}from"./Dq6jck_i.js";import"./NZTpNUN0.js";import{aq as nt,ac as Mt,T as lt,ai as ge,aj as Ft,af as be,_ as dt,aB as X,aC as ct,i as ut,h as Pt,aF as pt,ao as ht,K as oe,an as Dt,at as Ht,aG as Rt,ag as At,ad as Gt,aH as Jt,aI as Ot,c as K,p as ke,f as T,s as e,g as o,t as V,e as ye,b as u,d as xe,v as te,r as t,u as Q,aE as ft,o as Ut,H as D,a as E,F as i,G as P,aD as Nt,aJ as we,aK as vt,I as mt,L as gt}from"./DUt8zN7X.js";import{a as qe,s as W,d as _t,n as c,e as Z,i as $,I as ee,o as Zt,t as $t,p as Qt,S as s,C as Vt,P as fe,R as bt,q as _e,N as Wt,r as Kt,u as Yt,v as Xt,M as ei,f as ti,w as ii,h as ai,x as oi,y as wt}from"./Crb1ifvw.js";import{p as ie,s as ri,r as si}from"./BiXZbQqO.js";import{g as ni}from"./Blpq5ghW.js";import{p as li}from"./C6QPkKVb.js";var di=Gt|Jt|Ot;function ci(p,a,l){new ui(p,a,l)}class ui{#t;#s;#r;#n;#i;#a=null;#e=null;#o=!1;constructor(a,l,r){this.#t=a,this.#r=l,this.#n=r,this.#s=nt,this.#i=Mt(()=>{lt.b=this,ge&&Ft();try{this.#a=be(()=>r(this.#t))}catch(h){this.error(h)}},di),ge&&(this.#t=nt)}#l(a){var l=lt,r=ut,h=Pt;dt(this.#i),X(this.#i),ct(this.#i.ctx);try{return a()}finally{dt(l),X(r),ct(h)}}error(a){var l=this.#r.onerror;let r=this.#r.failed;const h=()=>{this.#e!==null&&At(this.#e,()=>{this.#e=null}),this.#a=this.#l(()=>(this.#o=!1,be(()=>this.#n(this.#t))))};if(this.#o||!l&&!r)throw a;var g=ut;try{X(null),l?.(a,h)}finally{X(g)}this.#a&&(pt(this.#a),this.#a=null),this.#e&&(pt(this.#e),this.#e=null),ge&&(ht(this.#s),oe(),ht(Dt())),r&&Ht(()=>{this.#e=this.#l(()=>{this.#o=!0;try{return be(()=>{r(this.#t,()=>a,()=>h)})}catch(B){return Rt(B,this.#i.parent),null}finally{this.#o=!1}})})}}var pi=T('<div class="swatch svelte-ys8164"><div class="swatch__color svelte-ys8164"></div> <div class="swatch__label svelte-ys8164"> </div></div>');const hi={hash:"svelte-ys8164",code:`.swatch {display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;width:100%;overflow:hidden;border:1px solid var(--line-color);border-radius:var(--card-border-radius);&:hover .swatch__label.svelte-ys8164 {opacity:1;}}.swatch__color.svelte-ys8164 {aspect-ratio:1;width:100%;}.swatch__label.svelte-ys8164 {display:none;width:100%;padding:6px;background:white;color:black;font-size:10px;transition:opacity 0.2s ease;
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CBr0si-w.js","./NZTpNUN0.js","./DUt8zN7X.js","./BiXZbQqO.js","./DeDaIr-m.js","./Dq6jck_i.js","./dR-jW0T5.js","./Cy8wbfRb.js","./qnNG2BJ8.js","./D5wkZK_2.js","./CxgcR10w.js","./CqH0QXRP.js","./CQ3p7-DI.js","./D6mAnY0-.js"])))=>i.map(i=>d[i]);
2
+ import{i as j,b as rt,_ as st}from"./Dq6jck_i.js";import"./NZTpNUN0.js";import{aq as nt,ac as Mt,T as lt,ai as ge,aj as Ft,af as be,_ as dt,aB as X,aC as ct,i as ut,h as Pt,aF as pt,ao as ht,K as oe,an as Dt,at as Ht,aG as Rt,ag as At,ad as Gt,aH as Jt,aI as Ot,c as K,p as ke,f as T,s as e,g as o,t as V,e as ye,b as u,d as xe,v as te,r as t,u as Q,aE as ft,o as Ut,H as D,a as E,F as i,G as P,aD as Nt,aJ as we,aK as vt,I as mt,L as gt}from"./DUt8zN7X.js";import{a as qe,s as W,d as _t,n as c,e as Z,i as $,I as ee,o as Zt,t as $t,p as Qt,S as s,C as Vt,P as fe,R as bt,q as _e,N as Wt,r as Kt,u as Yt,v as Xt,M as ei,f as ti,w as ii,h as ai,x as oi,y as wt}from"./dR-jW0T5.js";import{p as ie,s as ri,r as si}from"./BiXZbQqO.js";import{g as ni}from"./qnNG2BJ8.js";import{p as li}from"./Cy8wbfRb.js";var di=Gt|Jt|Ot;function ci(p,a,l){new ui(p,a,l)}class ui{#t;#s;#r;#n;#i;#a=null;#e=null;#o=!1;constructor(a,l,r){this.#t=a,this.#r=l,this.#n=r,this.#s=nt,this.#i=Mt(()=>{lt.b=this,ge&&Ft();try{this.#a=be(()=>r(this.#t))}catch(h){this.error(h)}},di),ge&&(this.#t=nt)}#l(a){var l=lt,r=ut,h=Pt;dt(this.#i),X(this.#i),ct(this.#i.ctx);try{return a()}finally{dt(l),X(r),ct(h)}}error(a){var l=this.#r.onerror;let r=this.#r.failed;const h=()=>{this.#e!==null&&At(this.#e,()=>{this.#e=null}),this.#a=this.#l(()=>(this.#o=!1,be(()=>this.#n(this.#t))))};if(this.#o||!l&&!r)throw a;var g=ut;try{X(null),l?.(a,h)}finally{X(g)}this.#a&&(pt(this.#a),this.#a=null),this.#e&&(pt(this.#e),this.#e=null),ge&&(ht(this.#s),oe(),ht(Dt())),r&&Ht(()=>{this.#e=this.#l(()=>{this.#o=!0;try{return be(()=>{r(this.#t,()=>a,()=>h)})}catch(B){return Rt(B,this.#i.parent),null}finally{this.#o=!1}})})}}var pi=T('<div class="swatch svelte-ys8164"><div class="swatch__color svelte-ys8164"></div> <div class="swatch__label svelte-ys8164"> </div></div>');const hi={hash:"svelte-ys8164",code:`.swatch {display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;width:100%;overflow:hidden;border:1px solid var(--line-color);border-radius:var(--card-border-radius);&:hover .swatch__label.svelte-ys8164 {opacity:1;}}.swatch__color.svelte-ys8164 {aspect-ratio:1;width:100%;}.swatch__label.svelte-ys8164 {display:none;width:100%;padding:6px;background:white;color:black;font-size:10px;transition:opacity 0.2s ease;
3
3
 
4
4
  @media (min-width: 768px) {display:block;
5
5
  }}`};function ae(p,a){ke(a,!1),qe(p,hi);let l=ie(a,"name",12),r=ie(a,"key",12),h=ie(a,"value",12);var g=pi(),B=o(g),z=e(B,2),H=o(z,!0);return t(z),t(g),V(()=>{W(g,"title",`Color ${r()}: ${h()}`),_t(B,`background-color: var(--color-${l()??""}-${r()??""});`),ye(H,r())}),u(p,g),xe({get name(){return l()},set name(y){l(y),te()},get key(){return r()},set key(y){r(y),te()},get value(){return h()},set value(y){h(y),te()}})}K(ae,{name:{},key:{},value:{}},[],[],!0);var vi=T('<ol><li class="toast" data-type="error"><div data-icon=""><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg></div> <div data-content=""><div data-title="">Error notification</div></div></li> <li class="toast" data-type="warning"><div data-icon=""><svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg></div> <div data-content=""><div data-title="">Warning notification</div></div></li> <li class="toast" data-type="success"><div data-icon=""><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg></div> <div data-content=""><div data-title="">Success notification</div></div></li> <li class="toast" data-type="info"><div data-icon=""><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg></div> <div data-content=""><div data-title="">Info notification</div></div></li></ol>');function yt(p){var a=vi();u(p,a)}K(yt,{},[],[],!0);var mi=T(`<h1>Title h1</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <em>Morbi sagittis suscipit nisl at varius. Fusce vitae pellentesque lacus.</em> <strong>Sed sed enim in elit vulputate finibus ac in arcu. Donec venenatis tempus facilisis.</strong></p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis suscipit nisl at varius. Fusce vitae pellentesque lacus. <a href="https://www.google.com">Check it on google</a> . Sed sed enim in elit vulputate finibus ac in arcu. Donec venenatis tempus facilisis.</p> <h2>Title h2</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis suscipit nisl at varius. Fusce vitae pellentesque lacus. Sed sed
@@ -25,4 +25,4 @@ Bitte lassen Sie mich wissen, ob Sie weitere Informationen zu einem bestimmten T
25
25
  dolore magna aliqua. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div> <div class="reference-number__domain transition-colors"><span class="truncate">www.liip.ch</span></div></a></div> <h2>Menu</h2> <div style="display: flex; gap: 1rem; margin-bottom: 1rem;"><!> <!> <!></div> <h3>Menu example</h3> <div class="context-box__content svelte-eb6y9j"><ul class="context-box__menu"><li><a class="context-box__menu-item transition-colors" href="https://www.liip.ch/de" target="_blank"><div aria-hidden="true" class="svg svg--externalLink context-box__menu-item__icon"><svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"></path><path d="m18 17v-11h-11"></path></g></svg></div> <span>Menü Beispiel</span></a></li></ul> <hr class="context-box__separator"/> <div class="context-box__title">Sprache auswählen</div> <ul class="context-box__menu"><li><button class="context-box__menu-item transition-colors active"><div aria-hidden="true" class="svg svg--internalLink context-box__menu-item__icon"><svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"></path><path d="m13 19 7-7-7-7"></path></g></svg></div> <span>Deutsch</span></button></li> <li><button class="context-box__menu-item transition-colors"><div aria-hidden="true" class="svg svg--internalLink context-box__menu-item__icon"><svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"></path><path d="m13 19 7-7-7-7"></path></g></svg></div> <span>English</span></button></li> <li><button class="context-box__menu-item transition-colors"><div aria-hidden="true" class="svg svg--internalLink context-box__menu-item__icon"><svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"></path><path d="m13 19 7-7-7-7"></path></g></svg></div> <span>Français</span></button></li> <li><button class="context-box__menu-item transition-colors"><div aria-hidden="true" class="svg svg--internalLink context-box__menu-item__icon"><svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"></path><path d="m13 19 7-7-7-7"></path></g></svg></div> <span>Italiano</span></button></li></ul> <hr class="context-box__separator"/> <div class="color-scheme-selector"><button class="color-scheme-selector__button transition-colors"><div aria-hidden="true" class="svg svg--lightMode"><svg viewBox="0 0 24 24" fill="none"><path d="M18.5625 12C18.5625 10.2595 17.8711 8.59032 16.6404 7.35961C15.4097 6.1289 13.7405 5.4375 12 5.4375C10.2595 5.4375 8.59032 6.1289 7.35961 7.35961C6.1289 8.59032 5.4375 10.2595 5.4375 12C5.4375 13.7405 6.1289 15.4097 7.35961 16.6404C8.59032 17.8711 10.2595 18.5625 12 18.5625C13.7405 18.5625 15.4097 17.8711 16.6404 16.6404C17.8711 15.4097 18.5625 13.7405 18.5625 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 20.4375V22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.4375 12H22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 3.5625V1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.5625 12H1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.03469 17.9663L4.70813 19.2929" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.9662 17.9663L19.2919 19.2919" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.9672 6.03461L19.2928 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.03375 6.03461L4.70813 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div> <span>Hell</span></button> <hr class="color-scheme-selector__separator"/> <button class="color-scheme-selector__button transition-colors color-scheme-selector__button--active"><div aria-hidden="true" class="svg svg--darkMode"><svg viewBox="0 0 24 24" fill="none"><path d="M17.4546 19.3866C19.2134 18.1336 20.4574 16.2846 20.9554 14.1833C20.27 14.9892 19.4098 15.6282 18.4403 16.0517C17.4708 16.4753 16.4176 16.6723 15.3605 16.6277C14.3035 16.5831 13.2706 16.2981 12.3402 15.7944C11.4098 15.2908 10.6065 14.5816 9.99136 13.7209C9.37618 12.8601 8.96532 11.8705 8.78999 10.8272C8.61467 9.78384 8.67951 8.71426 8.97957 7.69974C9.27963 6.68522 9.80703 5.75246 10.5217 4.97235C11.2363 4.19223 12.1194 3.5853 13.1038 3.19768C11.6649 3.0599 10.2141 3.2727 8.87542 3.81787C7.53673 4.36304 6.35002 5.22437 5.41679 6.32817C4.48357 7.43197 3.83159 8.7454 3.51665 10.1561C3.2017 11.5668 3.23314 13.0328 3.6083 14.4287C3.98345 15.8246 4.69115 17.1089 5.67085 18.1717C6.65055 19.2344 7.87311 20.0441 9.23394 20.5313C10.5948 21.0186 12.0534 21.169 13.485 20.9696C14.9166 20.7703 16.2787 20.2271 17.4546 19.3866Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div> <span>Dunkel</span></button></div></div> <h2>Feedback Form</h2> <div class="dialog-content svelte-eb6y9j"><div class="dialog-header"><div class="dialog-title"><h3 class="h4">Feedback geben, um unseren Chatbot zu verbessern</h3></div> <button class="dialog-close"><span class="sr-only">Close</span> <div aria-hidden="true" class="svg svg--dismiss"><svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"></path><path d="m18.257 5.742-12.514 12.514"></path></g></svg></div></button></div> <div class="dialog-description" id="bits-92" data-dialog-description="" data-state="open"><form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"/></div></form></div></div> <h2>Tooltip</h2> <div class="tooltip-container" style="height: 100px"><div class="tooltip tooltip-top" style="">I'm a tooltip</div></div></div> <div class="container text-container"><hr/> <h2>Notifications</h2> <!></div> <div class="container text-container"><hr/> <h2>Chat</h2></div> <div class="chat-page__messages"></div> <div class="text-container container" style="padding-bottom: 200px;"><hr/> <h2>Typography</h2> <!> <hr/> <h2>Icons</h2> <div style="color: currentColor; display: flex; flex-wrap: wrap; gap: 1rem;"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div></div>`,3),yi=T('<main class="chat-app svelte-eb6y9j"><div class="chat-app__container svelte-eb6y9j"><div class="chat-app__main svelte-eb6y9j"><!></div></div></main>');const ki={hash:"svelte-eb6y9j",code:`.color-swatches.svelte-eb6y9j {display:flex;grid-template-columns:repeat(13, 1fr);max-width:100%;margin:0;gap:0.25rem;}.chat-app.svelte-eb6y9j,
26
26
  .chat-app__container.svelte-eb6y9j {width:100%;height:100%;background:var(--body-background);}.chat-app__container.svelte-eb6y9j {overflow-y:auto;}.chat-app__main.svelte-eb6y9j {background:transparent;}.card.svelte-eb6y9j {padding:1rem;border-width:var(--card-border-width);border-radius:var(--card-border-radius);border-color:var(--card-border-color);background:var(--card-background);color:var(--card-color);&:hover {background:var(--card-hover-background);color:var(--card-hover-color);}}.pill.svelte-eb6y9j {display:inline-flex;max-width:100%;margin-top:var(--spacer-8);padding:var(--spacer-2) var(--spacer-10);border-width:var(--pill-default-border-width);border-radius:var(--pill-default-border-radius);border-color:var(--pill-default-border-color);background:var(--pill-default-background);box-shadow:var(--pill-default-box-shadow);color:var(--pill-default-color);font-weight:700;font-size:var(--font-xs);&:hover {background:var(--pill-default-hover-background);color:var(--pill-default-hover-color);}}.dialog-content.svelte-eb6y9j {position:relative;top:0;left:0;transform:none;}.context-box__content.svelte-eb6y9j {position:relative;}`};function xt(p,a){ke(a,!0),qe(p,ki);let l=ie(a,"data",7),r=P(()=>c.t);Q(()=>{const d={lang:l().options.lang.value,forceTheme:l().options?.["force-theme"]?.value,apiUrl:l().options["api-url"].value,features:""};Ut(()=>c.init(d).catch(b=>{console.error("Failed to init chat logic",b)}))});const h=gi;var g=yi();ft(d=>{var b=D(),M=E(b);{var n=v=>{var x=wi(),k=E(x);Z(k,17,()=>c.themeBase.fontURLs??[],$,(F,I)=>{var A=bi();V(()=>W(A,"href",i(I))),u(F,A)});var C=e(k,2);ee(C,{id:"font-css",get css(){return c.themeBase.fontCSS}});var w=e(C,2);const f=P(()=>ti(c.theme));ee(w,{id:"theme-css",get css(){return i(f)}});var q=e(w,2);ee(q,{id:"app-css",get css(){return Zt}});var m=e(q,2);ee(m,{id:"custom-css",get css(){return c.themeBase.customCSS}}),u(v,x)};j(M,v=>{c.initialized&&v(n)})}u(d,b)});let B;var z=o(g),H=o(z),y=o(H);{var R=d=>{var b=fi();$t(2,b,()=>Qt,()=>({duration:200,delay:300})),u(d,b)},Y=d=>{var b=_i(),M=E(b),n=e(o(M),8),v=o(n);{var x=_=>{var S=D(),G=E(S);Z(G,17,()=>Object.entries(c.theme.colors.brand),$,(J,O)=>{var L=P(()=>we(i(O),2));let U=()=>i(L)[0],N=()=>i(L)[1];ae(J,{name:"brand",get key(){return U()},get value(){return N()}})}),u(_,S)};j(v,_=>{c.theme.colors?.brand&&_(x)})}t(n);var k=e(n,4),C=o(k);{var w=_=>{var S=D(),G=E(S);Z(G,17,()=>Object.entries(c.theme.colors.highlight),$,(J,O)=>{var L=P(()=>we(i(O),2));let U=()=>i(L)[0],N=()=>i(L)[1];ae(J,{name:"highlight",get key(){return U()},get value(){return N()}})}),u(_,S)};j(C,_=>{c.theme?.colors?.highlight&&_(w)})}t(k);var f=e(k,4),q=o(f);{var m=_=>{var S=D(),G=E(S);Z(G,17,()=>Object.entries(c.theme.colors.grey),$,(J,O)=>{var L=P(()=>we(i(O),2));let U=()=>i(L)[0],N=()=>i(L)[1];ae(J,{name:"grey",get key(){return U()},get value(){return N()}})}),u(_,S)};j(q,_=>{c.theme?.colors?.grey&&_(m)})}t(f),t(M);var F=e(M,4),I=e(o(F),10),A=o(I);s(A,{name:"avatar",class:"introduction__avatar"});var qt=e(A,2);s(qt,{name:"avatar",class:"message__bot-avatar"}),t(I);var Ce=e(I,4);Vt(Ce,{onSubmit:()=>{}});var re=e(Ce,2),Se=o(re);fe(Se,{predefinedQuestion:{label:"Question one",question:""},onSubmit:()=>{}});var Te=e(Se,2);fe(Te,{predefinedQuestion:{label:"Question two",question:""},onSubmit:()=>{}});var Ct=e(Te,2);fe(Ct,{predefinedQuestion:{label:"Question three",question:""},onSubmit:()=>{}}),t(re);var se=e(re,4),Be=o(se);bt(Be,{title:"Reference title",number:1,domainName:"www.liip.ch",url:"https://www.liip.ch"});var St=e(Be,2);bt(St,{title:"Reference title",number:2,domainName:"www.liip.ch",url:"https://www.liip.ch"}),t(se);var ne=e(se,2),Ie=o(ne),le=e(o(Ie));_e(le,"data-source",JSON.stringify({url:"https://www.liip.ch",considered:!0,referencesIndex:{all:3,used:1},display:{card:{title:"Reference tooltip example",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",badge:"www.liip.ch"}}})),_e(le,"data-used-index","1"),_e(le,"data-all-index","3"),oe(),t(Ie),t(ne);var de=e(ne,6),Ee=o(de);Wt(Ee,{});var Le=e(Ee,2);Kt(Le,{get chatLogic(){return c}});var Tt=e(Le,2);Yt(Tt,{onclick:()=>{}}),t(de);var je=e(de,8),ze=e(o(je),2),ce=o(ze),Me=o(ce);Xt(Me,{get classificationConfig(){return c.data.chatConfig.classification},impact:0,quality:0});var ue=e(Me,2),pe=o(ue),Bt=o(pe,!0);t(pe);var It=e(pe,2);t(ue);var Fe=e(ue,2),he=o(Fe),Et=o(he,!0);t(he);var Lt=e(he,2);t(Fe),t(ce),t(ze),t(je),oe(4),t(F);var ve=e(F,2),jt=e(o(ve),4);yt(jt),t(ve);var me=e(ve,4);Z(me,21,()=>h,$,(_,S)=>{ei(_,{get message(){return i(S)},get logic(){return c},onmessageupdate:()=>{}})}),t(me);var Pe=e(me,2),De=e(o(Pe),4);kt(De);var He=e(De,6),Re=o(He);s(Re,{name:"predefinedQuestion"});var Ae=e(Re,2);s(Ae,{name:"edit"});var Ge=e(Ae,2);s(Ge,{name:"newConversation"});var Je=e(Ge,2);s(Je,{name:"voteUp"});var Oe=e(Je,2);s(Oe,{name:"voteDown"});var Ue=e(Oe,2);s(Ue,{name:"retry"});var Ne=e(Ue,2);s(Ne,{name:"message"});var Ze=e(Ne,2);s(Ze,{name:"thread"});var $e=e(Ze,2);s($e,{name:"submit"});var Qe=e($e,2);s(Qe,{name:"expand"});var Ve=e(Qe,2);s(Ve,{name:"help"});var We=e(Ve,2);s(We,{name:"attach"});var Ke=e(We,2);s(Ke,{name:"record"});var Ye=e(Ke,2);s(Ye,{name:"reward"});var Xe=e(Ye,2);s(Xe,{name:"share"});var et=e(Xe,2);s(et,{name:"audio"});var tt=e(et,2);s(tt,{name:"copy"});var it=e(tt,2);s(it,{name:"dismiss"});var at=e(it,2);s(at,{name:"menu"});var ot=e(at,2);s(ot,{name:"lightMode"});var zt=e(ot,2);s(zt,{name:"darkMode"}),t(He),t(Pe),V(()=>{ye(Bt,i(r).feedbackFormMessage),W(It,"placeholder",i(r).feedbackFormMessagePlaceholder),ye(Et,i(r).feedbackFormEmail),W(Lt,"placeholder",i(r).feedbackFormEmailPlaceholder)}),Nt("submit",ce,async()=>{}),u(d,b)};j(y,d=>{c.initialized?d(Y,!1):d(R)})}return t(H),t(z),t(g),V(d=>B=_t(g,"",B,d),[()=>({"color-scheme":c.colorScheme})]),u(p,g),xe({get data(){return l()},set data(d){l(d),te()}})}K(xt,{data:{}},[],[],!0);var xi=T('<div id="chat-wrapper" class="svelte-1h9zc1h"><div></div> <!> <div></div></div>'),qi=T('<div id="preview" class="svelte-1h9zc1h"><iframe title="sidebar" id="sidebar" class="svelte-1h9zc1h"></iframe> <!></div>');const Ci={hash:"svelte-1h9zc1h",code:`html,
27
27
  body {width:100%;height:100%;margin:0;padding:0;}#sidebar.svelte-1h9zc1h {width:500px;height:100%;border:none;}#preview.svelte-1h9zc1h {display:flex;align-items:center;justify-content:center;width:100%;height:100%;}#chat-wrapper.svelte-1h9zc1h {container-name:preview-container;
28
- /* stylelint-disable-next-line property-disallowed-list */container-type:size;width:100%;height:100%;}`};function Si(p,a){ke(a,!0),qe(p,Ci);let l=si(a,["$$slots","$$events","$$legacy","$$host"]),r=P(()=>a.data);Q(()=>{window.onmessage=function(n){if(typeof n.data=="string"&&n.data.startsWith("liipgpt-url:")){const v=new URLSearchParams(n.data.replace("liipgpt-url:",""));ni("?"+v.toString(),{replaceState:!0})}}});const h=n=>`/build/${n}/liipgpt-${n}.iife.js`,g=async n=>{n==="build"&&(await import(h("chat")),await import(h("button"))),n==="dev"&&(await st(()=>import("./lxJsdCDD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),await st(()=>import("./HtQdmN-S.js"),__vite__mapDeps([13,1,2,3,12,5,6,7,8,9,10,11]),import.meta.url)),n==="server"&&(import(wt(a.data.options,"chat")),import(wt(a.data.options,"button")))};let B="server",z=P(()=>a.data.options?.["preview-mode"]?.value??B);Q(()=>{g(i(z))});const H=`./sidebar${li.url.search}`;let y=mt(void 0),R=mt(void 0);const Y=(n,v)=>{const x=document.createElement("script"),k=document.createTextNode(v);x.appendChild(k),n.replaceChildren(x)};Q(()=>{i(y)&&Y(i(y),i(r).options.CHAT_CONFIG_OVERRIDE.value||"")}),Q(()=>{i(R)&&Y(i(R),i(r).options.onclosechat.value||"")});var d=qi();ft(n=>{var v=D(),x=E(v);{var k=(C,w)=>{{var f=m=>{vt.title="LiipGPT Configurator | Components"},q=m=>{vt.title="LiipGPT Configurator"};j(C,m=>{i(r).options["show-components"].value?m(f):m(q,!1)},w)}};j(x,C=>{C(k,!1)})}u(n,v)});var b=o(d),M=e(b,2);ii(M,()=>i(r),n=>{var v=D(),x=E(v);{var k=w=>{var f=D(),q=E(f);ci(q,{onerror:m=>console.error("Rendering error of components",m)},m=>{xt(m,ri(()=>l))}),u(w,f)},C=w=>{var f=xi(),q=o(f);rt(q,I=>gt(y,I),()=>i(y));var m=e(q,2);ai(m,()=>oi(i(r).options));var F=e(m,2);rt(F,I=>gt(R,I),()=>i(R)),t(f),u(w,f)};j(x,w=>{i(r).options["show-components"].value?w(k):w(C,!1)})}u(n,v)}),t(d),V(()=>W(b,"src",H)),u(p,d),xe()}K(Si,{},[],[],!0);export{Si as _,ci as b};
28
+ /* stylelint-disable-next-line property-disallowed-list */container-type:size;width:100%;height:100%;}`};function Si(p,a){ke(a,!0),qe(p,Ci);let l=si(a,["$$slots","$$events","$$legacy","$$host"]),r=P(()=>a.data);Q(()=>{window.onmessage=function(n){if(typeof n.data=="string"&&n.data.startsWith("liipgpt-url:")){const v=new URLSearchParams(n.data.replace("liipgpt-url:",""));ni("?"+v.toString(),{replaceState:!0})}}});const h=n=>`/build/${n}/liipgpt-${n}.iife.js`,g=async n=>{n==="build"&&(await import(h("chat")),await import(h("button"))),n==="dev"&&(await st(()=>import("./CBr0si-w.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),await st(()=>import("./D6mAnY0-.js"),__vite__mapDeps([13,1,2,3,12,5,6,7,8,9,10,11]),import.meta.url)),n==="server"&&(import(wt(a.data.options,"chat")),import(wt(a.data.options,"button")))};let B="server",z=P(()=>a.data.options?.["preview-mode"]?.value??B);Q(()=>{g(i(z))});const H=`./sidebar${li.url.search}`;let y=mt(void 0),R=mt(void 0);const Y=(n,v)=>{const x=document.createElement("script"),k=document.createTextNode(v);x.appendChild(k),n.replaceChildren(x)};Q(()=>{i(y)&&Y(i(y),i(r).options.CHAT_CONFIG_OVERRIDE.value||"")}),Q(()=>{i(R)&&Y(i(R),i(r).options.onclosechat.value||"")});var d=qi();ft(n=>{var v=D(),x=E(v);{var k=(C,w)=>{{var f=m=>{vt.title="LiipGPT Configurator | Components"},q=m=>{vt.title="LiipGPT Configurator"};j(C,m=>{i(r).options["show-components"].value?m(f):m(q,!1)},w)}};j(x,C=>{C(k,!1)})}u(n,v)});var b=o(d),M=e(b,2);ii(M,()=>i(r),n=>{var v=D(),x=E(v);{var k=w=>{var f=D(),q=E(f);ci(q,{onerror:m=>console.error("Rendering error of components",m)},m=>{xt(m,ri(()=>l))}),u(w,f)},C=w=>{var f=xi(),q=o(f);rt(q,I=>gt(y,I),()=>i(y));var m=e(q,2);ai(m,()=>oi(i(r).options));var F=e(m,2);rt(F,I=>gt(R,I),()=>i(R)),t(f),u(w,f)};j(x,w=>{i(r).options["show-components"].value?w(k):w(C,!1)})}u(n,v)}),t(d),V(()=>W(b,"src",H)),u(p,d),xe()}K(Si,{},[],[],!0);export{Si as _,ci as b};
@@ -1 +1 @@
1
- import"./NZTpNUN0.js";import{p as k,E as B,F as d,G as m,d as T,v as r,c as A}from"./DUt8zN7X.js";import{p as o,s as R}from"./BiXZbQqO.js";import{C as U}from"./8PzG14q7.js";import{E as _}from"./BMvVlUrl.js";function E(S,t){k(t,!0);let a=o(t,"forceTheme",7),l=o(t,"apiUrl",7),i=o(t,"apiKey",7),u=o(t,"speechRecognitionApiKey",7),n=o(t,"lang",7),s=o(t,"features",7),y=o(t,"loaderBackground",7),g=o(t,"loaderColor",7),f=o(t,"flyout",7),c=o(t,"flyoutStyle",7),p=o(t,"flyoutClass",7),h=m(()=>({forceTheme:a(),apiUrl:l(),apiKey:i(),speechRecognitionApiKey:u(),lang:n(),features:s(),loaderBackground:y(),loaderColor:g(),flyout:f(),flyoutStyle:c(),flyoutClass:p()}));const b=m(()=>d(h).flyout??!1);return _(S,{get silent(){return d(b)},body:(C,K=B)=>{U(C,R({host:t.$$host,get onError(){return K()}},()=>d(h)))},$$slots:{body:!0}}),T({get forceTheme(){return a()},set forceTheme(e){a(e),r()},get apiUrl(){return l()},set apiUrl(e){l(e),r()},get apiKey(){return i()},set apiKey(e){i(e),r()},get speechRecognitionApiKey(){return u()},set speechRecognitionApiKey(e){u(e),r()},get lang(){return n()},set lang(e){n(e),r()},get features(){return s()},set features(e){s(e),r()},get loaderBackground(){return y()},set loaderBackground(e){y(e),r()},get loaderColor(){return g()},set loaderColor(e){g(e),r()},get flyout(){return f()},set flyout(e){f(e),r()},get flyoutStyle(){return c()},set flyoutStyle(e){c(e),r()},get flyoutClass(){return p()},set flyoutClass(e){p(e),r()}})}customElements.define("liipgpt-chat",A(E,{forceTheme:{attribute:"force-theme",type:"String"},apiUrl:{attribute:"api-url",type:"String"},apiKey:{attribute:"api-key",type:"String"},speechRecognitionApiKey:{attribute:"speech-recognition-api-key",type:"String"},lang:{attribute:"lang",type:"String"},features:{attribute:"features",type:"String"},loaderBackground:{attribute:"loader-background",type:"String"},loaderColor:{attribute:"loader-color",type:"String"},flyout:{attribute:"flyout",type:"Boolean"},flyoutStyle:{attribute:"flyout-style",type:"String"},flyoutClass:{attribute:"flyout-class",type:"String"}},[],[],!0));export{E as LiipGPTChat};
1
+ import"./NZTpNUN0.js";import{p as k,E as B,F as d,G as m,d as T,v as r,c as A}from"./DUt8zN7X.js";import{p as o,s as R}from"./BiXZbQqO.js";import{C as U}from"./DeDaIr-m.js";import{E as _}from"./CQ3p7-DI.js";function E(S,t){k(t,!0);let a=o(t,"forceTheme",7),l=o(t,"apiUrl",7),i=o(t,"apiKey",7),u=o(t,"speechRecognitionApiKey",7),n=o(t,"lang",7),s=o(t,"features",7),y=o(t,"loaderBackground",7),g=o(t,"loaderColor",7),f=o(t,"flyout",7),c=o(t,"flyoutStyle",7),p=o(t,"flyoutClass",7),h=m(()=>({forceTheme:a(),apiUrl:l(),apiKey:i(),speechRecognitionApiKey:u(),lang:n(),features:s(),loaderBackground:y(),loaderColor:g(),flyout:f(),flyoutStyle:c(),flyoutClass:p()}));const b=m(()=>d(h).flyout??!1);return _(S,{get silent(){return d(b)},body:(C,K=B)=>{U(C,R({host:t.$$host,get onError(){return K()}},()=>d(h)))},$$slots:{body:!0}}),T({get forceTheme(){return a()},set forceTheme(e){a(e),r()},get apiUrl(){return l()},set apiUrl(e){l(e),r()},get apiKey(){return i()},set apiKey(e){i(e),r()},get speechRecognitionApiKey(){return u()},set speechRecognitionApiKey(e){u(e),r()},get lang(){return n()},set lang(e){n(e),r()},get features(){return s()},set features(e){s(e),r()},get loaderBackground(){return y()},set loaderBackground(e){y(e),r()},get loaderColor(){return g()},set loaderColor(e){g(e),r()},get flyout(){return f()},set flyout(e){f(e),r()},get flyoutStyle(){return c()},set flyoutStyle(e){c(e),r()},get flyoutClass(){return p()},set flyoutClass(e){p(e),r()}})}customElements.define("liipgpt-chat",A(E,{forceTheme:{attribute:"force-theme",type:"String"},apiUrl:{attribute:"api-url",type:"String"},apiKey:{attribute:"api-key",type:"String"},speechRecognitionApiKey:{attribute:"speech-recognition-api-key",type:"String"},lang:{attribute:"lang",type:"String"},features:{attribute:"features",type:"String"},loaderBackground:{attribute:"loader-background",type:"String"},loaderColor:{attribute:"loader-color",type:"String"},flyout:{attribute:"flyout",type:"Boolean"},flyoutStyle:{attribute:"flyout-style",type:"String"},flyoutClass:{attribute:"flyout-class",type:"String"}},[],[],!0));export{E as LiipGPTChat};
@@ -1,4 +1,4 @@
1
- import"./NZTpNUN0.js";import{p as J,H as b,a as d,F as k,I as K,b as n,E as x,J as L,d as P,v as q,K as R,f as B,s as E,t as T,e as U,L as S,g as w,r as z,M as j,c as A}from"./DUt8zN7X.js";import{i as F}from"./Dq6jck_i.js";import{a as D}from"./Crb1ifvw.js";import{p as M}from"./BiXZbQqO.js";import{b as G}from"./CthtHExI.js";var N=(u,a)=>a()(),O=B('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),Q=B(" <!>",1);const V={hash:"svelte-4thrqu",code:`
1
+ import"./NZTpNUN0.js";import{p as J,H as b,a as d,F as k,I as K,b as n,E as x,J as L,d as P,v as q,K as R,f as B,s as E,t as T,e as U,L as S,g as w,r as z,M as j,c as A}from"./DUt8zN7X.js";import{i as F}from"./Dq6jck_i.js";import{a as D}from"./dR-jW0T5.js";import{p as M}from"./BiXZbQqO.js";import{b as G}from"./BnEwtLey.js";var N=(u,a)=>a()(),O=B('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),Q=B(" <!>",1);const V={hash:"svelte-4thrqu",code:`
2
2
  /* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-4thrqu {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
3
3
  BlinkMacSystemFont,
4
4
  avenir next,
@@ -0,0 +1 @@
1
+ import"./NZTpNUN0.js";import{ay as Ge,ac as Ue,az as ve,ah as be,aA as ne,Y as fe,N as ge,at as Ve,_ as we,aB as ye,aC as _e,h as Je,ae as xe,af as ie,ag as se,v as x,ai as $,aj as Xe,am as Ze,an as Ke,ao as Qe,ap as ke,aq as $e,M as et,c as Le,p as je,H as Q,a as L,b as h,d as Me,f as q,g as j,J as ze,r as M,t as he,X as Ee,aD as ee,aE as tt,F as e,G as E,s as V,I as te,L as le}from"./DUt8zN7X.js";import{i as J,b as Se}from"./Dq6jck_i.js";import{s as Oe,b as Te,c as Ce,d as qe,e as rt,i as ot,I as re,f as at,h as ce,g as nt,j as it,k as st,l as lt,m as ct}from"./dR-jW0T5.js";import{p as S,r as dt}from"./BiXZbQqO.js";import"./CxgcR10w.js";import"./Cy8wbfRb.js";const de=0,oe=1,pe=2;function Ie(Z,o,v,w,k){$&&Xe();var i=Z,T=Ge(),z=Je,s=be,l,y,d,_=T?fe(void 0):ge(void 0,!1,!1),Y=T?fe(void 0):ge(void 0,!1,!1),O=!1;function t(a,u){O=!0,u&&(we(r),ye(r),_e(z));try{a===de&&v&&(l?xe(l):l=ie(()=>v(i))),a===oe&&w&&(y?xe(y):y=ie(()=>w(i,_))),a!==de&&l&&se(l,()=>l=null),a!==oe&&y&&se(y,()=>y=null),a!==pe&&d&&se(d,()=>d=null)}finally{u&&(_e(null),ye(null),we(null),x())}}var r=Ue(()=>{if(s===(s=o()))return;let a=$&&ve(s)===(i.data===Ze);if(a&&(i=Ke(),Qe(i),ke(!1),a=!0),ve(s)){var u=s;O=!1,u.then(n=>{u===s&&(ne(_,n),t(oe,!0))},n=>{if(u===s)throw ne(Y,n),t(pe,!0),Y.v}),$?v&&(l=ie(()=>v(i))):Ve(()=>{O||t(de,!0)})}else ne(_,s),t(oe,!1);return a&&ke(!0),()=>s=be});$&&(i=$e)}const pt='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-6: .375rem;--spacer-8: .5rem;--spacer-10: .625rem;--spacer-12: .75rem;--spacer-16: 1rem;--spacer-20: 1.25rem;--spacer-24: 1.5rem;--spacer-28: 1.75rem;--spacer-32: 2rem;--spacer-40: 2.5rem;--spacer-48: 3rem;--spacer-56: 3.5rem;--spacer-64: 4rem;--spacer-80: 5rem;--spacer-120: 7.5rem;--spacer-r-8: clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12: clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16: clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20: clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24: clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28: clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32: clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40: clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48: clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56: clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64: clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80: clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96: clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120: clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--font-xs: .75em;--font-sm: .875em;--font-body: 1rem;--font-h3: clamp(1.125rem, .9545rem + .8523cqw, 1.5rem);--font-h2: clamp(1.25rem, .7955rem + 2.2727cqw, 2.25rem);--font-h1: clamp(1.5rem, .8182rem + 3.4091cqw, 3rem);--font-weight-normal: 400;--font-weight-bold: 700;--line-height-default: 1.5;--line-height-snug: 1.375;--line-height-tight: 1.25;--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--z-index-flyout: 10000;--z-index-dialog: 600;--z-index-loader: 500;--z-index-reference-number: 400;--z-index-footer: 300;--z-index-tooltip: 200;--z-index-header: 100;--z-index-local-overlay: 10;--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--fly-in-id: 0;--chat-footer-height: 0}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app{:where(h1,h2,h3,h4,h5,h6){font-weight:var(--font-weight-bold);line-height:var(--line-height-tight)}:where(b,strong){font-weight:var(--font-weight-bold)}:where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color);&::-moz-placeholder{color:var(--input-placeholder-color)}&::placeholder{color:var(--input-placeholder-color)}}:where(input[type=radio],input[type=checkbox]){margin:0}:where(*:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}& *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}& *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}>*{color:var(--body-color);font-style:normal;font-weight:var(--font-weight-normal);font-size:var(--body-font-size, var(--font-body));line-height:var(--line-height-default);font-family:var(--font-family);font-optical-sizing:auto}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}::-webkit-scrollbar-thumb:hover{background-color:#00000080}*{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}::-webkit-scrollbar-thumb{visibility:hidden}*:hover::-webkit-scrollbar-thumb,*:active::-webkit-scrollbar-thumb,*:focus::-webkit-scrollbar-thumb{visibility:visible}}}@layer utilities{.chat-app{:where(.expand-interaction){position:relative;&:after{position:absolute;inset:0;background-color:transparent;content:""}}:where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}:where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}:where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}:where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}:where(.mounted .fly-in){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}:where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}:where(.line-clamp--2){-webkit-line-clamp:2}:where(.line-clamp--12){-webkit-line-clamp:12}:where(.container){width:100%;max-width:var(--container-max-width, 1024px);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16);@container chat-container (min-width: 640px){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}@container chat-container (min-width: 768px){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}:where(.text-container){>:where(h1){font-size:var(--font-h1)}>:where(h2){font-size:var(--font-h2)}>:where(h3){font-size:var(--font-h3)}>:where(h4,h5,h6){font-size:var(--font-body)}>:where(p,ul,ol,img,table){display:block;margin-bottom:var(--spacer-r-24)}>:where(div){margin:var(--spacer-r-40) 0}>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}>:where(ul:not(.no-list-styling),ol:not(.no-list-styling)){>:where(li){margin-bottom:var(--spacer-12);&:last-child{margin-bottom:0}}}>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}>:where(ul:not(.no-list-styling)){>:where(li){position:relative;padding-left:1em;&:before{position:absolute;top:0;left:0;content:"•";font-size:.9em}}}>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}:where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight, var(--font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration, underline);text-decoration:var(--anchor-text-decoration, underline);text-underline-offset:var(--anchor-text-underline-offset, .15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function);&:hover{color:var(--anchor-hover-color)}}&:first-child{margin-top:0}&:last-child{margin-bottom:0}:where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}:where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--line-height-tight);text-align:left;vertical-align:bottom}:where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}:where(tr:last-child td){border-bottom:none}}}}@layer base{.svg{width:var(--spacer-r-24);height:auto;& svg{display:block;width:100%;height:auto;overflow:visible}}}@layer components{.chat-app{display:contents}.chat-app__container{display:flex;height:100%}.chat-app__main{container-name:chat-container;container-type:inline-size;display:block;width:100%;height:100%;transform:scale(1);background:var(--body-background)}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__header{padding:var(--spacer-16);@container chat-container (min-width: 640px){padding:var(--spacer-12)}z-index:var(--z-index-header);position:fixed;top:0;right:0;left:0;border-width:var(--header-border-width);border-style:solid;border-color:var(--header-border-color);background:var(--header-background);box-shadow:var(--header-box-shadow);pointer-events:none}.chat-app__header-container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacer-r-12);>:where(*){pointer-events:auto}}.chat-app__body{position:relative;width:100%;height:100%}.chat-app__page-transition{width:100%;height:100%}.chat-app__aside{visibility:hidden;width:0;overflow:hidden;background:var(--color-brand-100);opacity:0;transition:width .3s ease-in-out,opacity .3s ease-in-out;&.open{visibility:visible;width:300px;opacity:1}}}@layer components{.open-button{--open-button-avatar-height: var(--spacer-r-80);--open-button-avatar-width: var(--spacer-r-80);--open-button-duration: .4s;--open-button-delay: .3s;--open-button-ease: ease-in-out;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease),padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);.open-button:hover &{transform:translateY(0);background:var(--open-button-hover-background, var(--open-button-background));color:var(--open-button-hover-color, var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease);.open-button:hover &{transition:width var(--open-button-duration) var(--open-button-ease),height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}}.open-button__description{position:relative;width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease);.open-button:hover &{transform:scale(1.05)}}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@media (prefers-reduced-motion: reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}}';var g=typeof window<"u"?window:{screen:{},navigator:{}},X=(g.matchMedia||function(){return{matches:!1}}).bind(g),ht={get passive(){return!0}},Be=function(){};g.addEventListener&&g.addEventListener("p",Be,ht);g.removeEventListener&&g.removeEventListener("p",Be,!1);var ue="ontouchstart"in g,ut="TouchEvent"in g,mt=ue||ut&&X("(any-pointer: coarse)").matches,Ne=(g.navigator.maxTouchPoints||0)>0||mt,De=g.navigator.userAgent||"",vt=X("(pointer: coarse)").matches&&/iPad|Macintosh/.test(De)&&Math.min(g.screen.width||0,g.screen.height||0)>=768,He=(X("(pointer: coarse)").matches||!X("(pointer: fine)").matches&&ue)&&!/Windows.*Firefox/.test(De),bt=X("(any-pointer: fine)").matches||X("(any-hover: hover)").matches||vt||!ue,Ae=Ne&&(bt||!He)?"hybrid":Ne?"touchOnly":"mouseOnly",ft=Ae==="mouseOnly"?"mouse":Ae==="touchOnly"||He?"touch":"mouse",gt=q("<a><!></a>"),wt=q('<button type="button"><!></button>');function Pe(Z,o){je(o,!1);let v=S(o,"href",12),w=S(o,"onclick",12),k=S(o,"onmouseenter",12),i=S(o,"onmouseleave",12),T=S(o,"style",12),z=S(o,"className",12),s=S(o,"isStandalone",12,!1),l=S(o,"children",12);const y=Array.isArray(z())?z():z()?[z()]:[];var d=Q(),_=L(d);{var Y=t=>{var r=gt();let a;var u=j(r);ze(u,l),M(r),he(n=>{Oe(r,"href",v()),a=Te(r,1,Ce(y),null,a,n),qe(r,T())},[()=>({"open-button--standalone":s()})],Ee),ee("mouseenter",r,function(...n){k()?.apply(this,n)}),ee("mouseleave",r,function(...n){i()?.apply(this,n)}),h(t,r)},O=t=>{var r=wt();r.__click=function(...n){w()?.apply(this,n)};let a;var u=j(r);ze(u,l),M(r),he(n=>{a=Te(r,1,Ce(y),null,a,n),qe(r,T())},[()=>({"open-button--standalone":s()})],Ee),ee("mouseenter",r,function(...n){k()?.apply(this,n)}),ee("mouseleave",r,function(...n){i()?.apply(this,n)}),h(t,r)};J(_,t=>{v()?t(Y):t(O,!1)})}return h(Z,d),Me({get href(){return v()},set href(t){v(t),x()},get onclick(){return w()},set onclick(t){w(t),x()},get onmouseenter(){return k()},set onmouseenter(t){k(t),x()},get onmouseleave(){return i()},set onmouseleave(t){i(t),x()},get style(){return T()},set style(t){T(t),x()},get className(){return z()},set className(t){z(t),x()},get isStandalone(){return s()},set isStandalone(t){s(t),x()},get children(){return l()},set children(t){l(t),x()}})}et(["click"]);Le(Pe,{href:{},onclick:{},onmouseenter:{},onmouseleave:{},style:{},className:{},isStandalone:{},children:{}},[],[],!0);var yt=q('<div class="open-button__title"><!></div>'),_t=q('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),xt=q('<div class="open-button__text"><!> <!></div>'),kt=q('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),zt=q('<link rel="stylesheet"/>'),Et=q("<!> <!>",1),St=q('<!> <!> <!> <main class="chat-app"><!></main>',1);function Tt(Z,o){je(o,!0);const v=(p,m)=>{let b=()=>m?.().theme,I=()=>m?.().language;const c=E(()=>{const{openButtonTitle:f,openButtonDescription:D}=b().translations[I()];return{openButtonTitle:f,openButtonDescription:D}}),C=E(()=>b().fullTheme[e(w)].tokens.svgs),B=E(()=>["open-button",o.buttonClass]);Pe(p,{get href(){return b().buttonHref},get onclick(){return o.onclick},onmouseenter:t,onmouseleave:r,get style(){return o.buttonStyle},get className(){return e(B)},get isStandalone(){return e(l)},children:(f,D)=>{var N=kt(),H=L(N);{var P=W=>{var U=xt(),me=j(U);{var Re=F=>{var A=yt(),K=j(A);ce(K,()=>e(c).openButtonTitle),M(A),h(F,A)};J(me,F=>{e(c).openButtonTitle&&F(Re)})}var We=V(me,2);{var Fe=F=>{var A=_t(),K=j(A),Ye=j(K);ce(Ye,()=>e(c).openButtonDescription),M(K),Se(K,ae=>le(_,ae),()=>e(_)),M(A),Se(A,ae=>le(d,ae),()=>e(d)),h(F,A)};J(We,F=>{e(c).openButtonDescription&&ft==="mouse"&&F(Fe)})}M(U),h(W,U)};J(H,W=>{(e(c).openButtonTitle||e(c).openButtonDescription)&&W(P)})}var R=V(H,2),G=j(R);ce(G,()=>e(C).avatar),M(R),h(f,N)},$$slots:{default:!0}})};let w=te("light"),k=S(o,"host",7),i=S(o,"onError",7),T=dt(o,["$$slots","$$events","$$legacy","$$host","host","onError"]);const z=async p=>{const b=await(await fetch(`${p}/chatconfig`)).json();return ct.parse(b)},s=async({forceTheme:p,lang:m,apiUrl:b})=>{const I=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await z(b);let c;m?c=nt(m):c=it();const C=st(I),B=Object.keys(C.fullTheme);return le(w,lt(B),!0),{theme:C,language:c}};let l=E(()=>!!k()),y=te(!1),d=te(void 0),_=te(void 0),Y=E(()=>e(_)?.offsetWidth??0),O=E(()=>e(_)?.offsetHeight??0);function t(){!e(_)||!e(d)||(e(d).style.width=`${e(Y)}px`,e(d).style.height=`${e(O)}px`)}function r(){!e(y)&&e(d)&&(e(d).style.width="0",e(d).style.height="0")}let a=E(()=>s(T).catch(p=>i()(p)));var u=Q();tt(p=>{var m=Q(),b=L(m);{var I=c=>{var C=Q(),B=L(C);Ie(B,()=>e(a),null,(f,D)=>{var N=Et();const H=E(()=>e(D).theme.fullTheme[e(w)]);var P=L(N);rt(P,17,()=>e(H).fontURLs??[],ot,(G,W)=>{var U=zt();he(()=>Oe(U,"href",e(W))),h(G,U)});var R=V(P,2);re(R,{id:"font-css",get css(){return e(H).fontCSS}}),h(f,N)}),h(c,C)};J(b,c=>{e(l)&&c(I)})}h(p,m)});var n=L(u);return Ie(n,()=>e(a),p=>{},(p,m)=>{var b=Q();const I=E(()=>e(m).theme.fullTheme[e(w)]);var c=L(b);{var C=f=>{var D=St(),N=L(D);const H=E(()=>at(e(I).tokens));re(N,{id:"theme-css",get css(){return e(H)}});var P=V(N,2);re(P,{id:"app-css",get css(){return pt}});var R=V(P,2);re(R,{id:"custom-css",get css(){return e(I).customCSS}});var G=V(R,2),W=j(G);v(W,()=>e(m)),M(G),h(f,D)},B=f=>{v(f,()=>e(m))};J(c,f=>{e(l)?f(C):f(B,!1)})}h(p,b)}),h(Z,u),Me({get host(){return k()},set host(p){k(p),x()},get onError(){return i()},set onError(p){i(p),x()}})}Le(Tt,{host:{},onError:{}},[],[],!0);export{Tt as O};
@@ -1,4 +1,4 @@
1
- const Vt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Pt="1.0.1";function Je(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var oe,xe;function Qe(){if(xe)return oe;xe=1;var a=function(k){return e(k)&&!t(k)};function e(g){return!!g&&typeof g=="object"}function t(g){var k=Object.prototype.toString.call(g);return k==="[object RegExp]"||k==="[object Date]"||o(g)}var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103;function o(g){return g.$$typeof===n}function s(g){return Array.isArray(g)?[]:{}}function i(g,k){return k.clone!==!1&&k.isMergeableObject(g)?z(s(g),g,k):g}function h(g,k,w){return g.concat(k).map(function(R){return i(R,w)})}function f(g,k){if(!k.customMerge)return z;var w=k.customMerge(g);return typeof w=="function"?w:z}function b(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(k){return Object.propertyIsEnumerable.call(g,k)}):[]}function I(g){return Object.keys(g).concat(b(g))}function G(g,k){try{return k in g}catch{return!1}}function qe(g,k){return G(g,k)&&!(Object.hasOwnProperty.call(g,k)&&Object.propertyIsEnumerable.call(g,k))}function He(g,k,w){var R={};return w.isMergeableObject(g)&&I(g).forEach(function(j){R[j]=i(g[j],w)}),I(k).forEach(function(j){qe(g,j)||(G(g,j)&&w.isMergeableObject(k[j])?R[j]=f(j,w)(g[j],k[j],w):R[j]=i(k[j],w))}),R}function z(g,k,w){w=w||{},w.arrayMerge=w.arrayMerge||h,w.isMergeableObject=w.isMergeableObject||a,w.cloneUnlessOtherwiseSpecified=i;var R=Array.isArray(k),j=Array.isArray(g),Ge=R===j;return Ge?R?w.arrayMerge(g,k,w):He(g,k,w):i(k,w)}z.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(R,j){return z(R,j,w)},{})};var Ye=z;return oe=Ye,oe}var Xe=Qe();const Ke=Je(Xe),Le={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},header:{background:"transparent"},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},box:{custom:{shadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"}},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},line:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:{minRem:.5,maxRem:.75},hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},card:{color:"inherit",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},pillDefault:{color:"var(--color-grey-700)",background:"var(--color-grey-200)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--font-weight-bold)",separatorColor:"var(--line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:{minRem:.75,maxRem:1},borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5}},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--line-color)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--card-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:{minRem:.5,maxRem:.75}},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesTrigger:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceNumeral:{color:"var(--anchor-color)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.25,maxRem:.25},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--box-shadow)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:{minRem:.2,maxRem:.3}}},svgs:{predefinedQuestion:'<svg viewBox="0 0 24 24" ><path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',edit:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>',newConversation:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></g></svg>',voteUp:'<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',voteDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>',retry:'<svg viewBox="0 0 24 24"><path d="M5.5 18.928A9.5 9.5 0 0 1 17.061 3.956" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m18.5 9.498 0 -4.5 4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m5.5 14.498 0 4.5 -4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M18.5 5.071A9.5 9.5 0 0 1 6.883 20.006" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',message:'<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
1
+ const Vt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Pt="1.0.2";function Je(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var oe,xe;function Qe(){if(xe)return oe;xe=1;var a=function(k){return e(k)&&!t(k)};function e(g){return!!g&&typeof g=="object"}function t(g){var k=Object.prototype.toString.call(g);return k==="[object RegExp]"||k==="[object Date]"||o(g)}var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103;function o(g){return g.$$typeof===n}function s(g){return Array.isArray(g)?[]:{}}function i(g,k){return k.clone!==!1&&k.isMergeableObject(g)?z(s(g),g,k):g}function h(g,k,w){return g.concat(k).map(function(R){return i(R,w)})}function f(g,k){if(!k.customMerge)return z;var w=k.customMerge(g);return typeof w=="function"?w:z}function b(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(k){return Object.propertyIsEnumerable.call(g,k)}):[]}function I(g){return Object.keys(g).concat(b(g))}function G(g,k){try{return k in g}catch{return!1}}function qe(g,k){return G(g,k)&&!(Object.hasOwnProperty.call(g,k)&&Object.propertyIsEnumerable.call(g,k))}function He(g,k,w){var R={};return w.isMergeableObject(g)&&I(g).forEach(function(j){R[j]=i(g[j],w)}),I(k).forEach(function(j){qe(g,j)||(G(g,j)&&w.isMergeableObject(k[j])?R[j]=f(j,w)(g[j],k[j],w):R[j]=i(k[j],w))}),R}function z(g,k,w){w=w||{},w.arrayMerge=w.arrayMerge||h,w.isMergeableObject=w.isMergeableObject||a,w.cloneUnlessOtherwiseSpecified=i;var R=Array.isArray(k),j=Array.isArray(g),Ge=R===j;return Ge?R?w.arrayMerge(g,k,w):He(g,k,w):i(k,w)}z.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(R,j){return z(R,j,w)},{})};var Ye=z;return oe=Ye,oe}var Xe=Qe();const Ke=Je(Xe),Le={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},header:{background:"transparent"},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},box:{custom:{shadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"}},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},line:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:{minRem:.5,maxRem:.75},hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},card:{color:"inherit",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},pillDefault:{color:"var(--color-grey-700)",background:"var(--color-grey-200)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--font-weight-bold)",separatorColor:"var(--line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:{minRem:.75,maxRem:1},borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5}},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--line-color)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--card-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:{minRem:.5,maxRem:.75}},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesTrigger:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceNumeral:{color:"var(--anchor-color)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.25,maxRem:.25},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--box-shadow)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:{minRem:.2,maxRem:.3}}},svgs:{predefinedQuestion:'<svg viewBox="0 0 24 24" ><path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',edit:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>',newConversation:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></g></svg>',voteUp:'<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',voteDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>',retry:'<svg viewBox="0 0 24 24"><path d="M5.5 18.928A9.5 9.5 0 0 1 17.061 3.956" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m18.5 9.498 0 -4.5 4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m5.5 14.498 0 4.5 -4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M18.5 5.071A9.5 9.5 0 0 1 6.883 20.006" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',message:'<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
2
2
  <circle cx="6" cy="23" r="1.75" fill="currentColor">
3
3
  <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
4
4
  </circle>
@@ -1 +1 @@
1
- import{h as d,a9 as m,u,au as i,o as h,av as b,F as g,aw as k,V as v,ax as x}from"./DUt8zN7X.js";import{s as y,p as c}from"./Blpq5ghW.js";function V(r=!1){const t=d,e=t.l.u;if(!e)return;let o=()=>k(t.s);if(r){let a=0,s={};const _=v(()=>{let l=!1;const f=t.s;for(const n in f)f[n]!==s[n]&&(s[n]=f[n],l=!0);return l&&a++,a});o=()=>g(_)}e.b.length&&m(()=>{p(t,o),i(e.b)}),u(()=>{const a=h(()=>e.m.map(b));return()=>{for(const s of a)typeof s=="function"&&s()}}),e.a.length&&u(()=>{p(t,o),i(e.a)})}function p(r,t){if(r.l.s)for(const e of r.l.s)g(e);t()}x();const $={get error(){return c.error},get status(){return c.status},get url(){return c.url}};y.updated.check;const j=$;export{V as i,j as p};
1
+ import{h as d,a9 as m,u,au as i,o as h,av as b,F as g,aw as k,V as v,ax as x}from"./DUt8zN7X.js";import{s as y,p as c}from"./qnNG2BJ8.js";function V(r=!1){const t=d,e=t.l.u;if(!e)return;let o=()=>k(t.s);if(r){let a=0,s={};const _=v(()=>{let l=!1;const f=t.s;for(const n in f)f[n]!==s[n]&&(s[n]=f[n],l=!0);return l&&a++,a});o=()=>g(_)}e.b.length&&m(()=>{p(t,o),i(e.b)}),u(()=>{const a=h(()=>e.m.map(b));return()=>{for(const s of a)typeof s=="function"&&s()}}),e.a.length&&u(()=>{p(t,o),i(e.a)})}function p(r,t){if(r.l.s)for(const e of r.l.s)g(e);t()}x();const $={get error(){return c.error},get status(){return c.status},get url(){return c.url}};y.updated.check;const j=$;export{V as i,j as p};
@@ -1 +1 @@
1
- import"./NZTpNUN0.js";import{p as m,E as y,d as f,v as r,F as S,G as d,c as h}from"./DUt8zN7X.js";import{p as n,s as _}from"./BiXZbQqO.js";import{E as T}from"./BMvVlUrl.js";import{O as k}from"./DpWDGuko.js";function C(c,e){m(e,!0);let o=n(e,"onclick",7),u=n(e,"buttonClass",7),l=n(e,"buttonStyle",7),s=n(e,"apiUrl",7),a=n(e,"forceTheme",7),i=n(e,"lang",7),b=d(()=>({onclick:o(),buttonClass:u(),buttonStyle:l(),apiUrl:s(),forceTheme:a(),lang:i()}));return T(c,{silent:!0,body:(g,p=y)=>{k(g,_({host:e.$$host,get onError(){return p()}},()=>S(b)))},$$slots:{body:!0}}),f({get onclick(){return o()},set onclick(t){o(t),r()},get buttonClass(){return u()},set buttonClass(t){u(t),r()},get buttonStyle(){return l()},set buttonStyle(t){l(t),r()},get apiUrl(){return s()},set apiUrl(t){s(t),r()},get forceTheme(){return a()},set forceTheme(t){a(t),r()},get lang(){return i()},set lang(t){i(t),r()}})}customElements.define("liipgpt-button",h(C,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0));export{C as LiipGPTButton};
1
+ import"./NZTpNUN0.js";import{p as m,E as y,d as f,v as r,F as S,G as d,c as h}from"./DUt8zN7X.js";import{p as n,s as _}from"./BiXZbQqO.js";import{E as T}from"./CQ3p7-DI.js";import{O as k}from"./CqH0QXRP.js";function C(c,e){m(e,!0);let o=n(e,"onclick",7),u=n(e,"buttonClass",7),l=n(e,"buttonStyle",7),s=n(e,"apiUrl",7),a=n(e,"forceTheme",7),i=n(e,"lang",7),b=d(()=>({onclick:o(),buttonClass:u(),buttonStyle:l(),apiUrl:s(),forceTheme:a(),lang:i()}));return T(c,{silent:!0,body:(g,p=y)=>{k(g,_({host:e.$$host,get onError(){return p()}},()=>S(b)))},$$slots:{body:!0}}),f({get onclick(){return o()},set onclick(t){o(t),r()},get buttonClass(){return u()},set buttonClass(t){u(t),r()},get buttonStyle(){return l()},set buttonStyle(t){l(t),r()},get apiUrl(){return s()},set apiUrl(t){s(t),r()},get forceTheme(){return a()},set forceTheme(t){a(t),r()},get lang(){return i()},set lang(t){i(t),r()}})}customElements.define("liipgpt-button",h(C,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0));export{C as LiipGPTButton};
@@ -1,4 +1,4 @@
1
- import"./NZTpNUN0.js";import{I as V,aN as Ze,Y as jt,F as i,L as k,aO as Te,G as B,p as Z,H as j,a as H,b as _,d as J,v,J as oe,f as L,g as C,E as de,r as E,c as $,aP as pe,u as ae,aQ as Yt,o as lt,X as ct,s as A,t as se,e as fe,aD as le,aL as Qt,M as ut,aR as Ue,aE as Xt,K as Gt}from"./DUt8zN7X.js";import{i as z,c as Se,b as Ee}from"./Dq6jck_i.js";import{G as dt,H as _e,J as Zt,K as Jt,L as $t,O as I,Q as ce,T as ye,U as ge,V as q,W as Fe,X as er,Y as Ye,Z as Oe,_ as tr,$ as rr,a0 as nr,a1 as ft,n as F,t as ue,a2 as ht,S as Ke,a3 as Ie,v as or,s as he,a4 as Je,h as Ae,z as sr,a as vt,e as xe,C as pt,b as ke,a5 as ir,M as ar,i as De,E as ze,a6 as lr,a7 as cr,a8 as gt,a9 as mt,aa as bt,ab as ur,P as dr,d as Qe,c as fr,I as Pe,o as yt,ac as hr,p as _t,ad as $e,ae as vr,w as pr,af as gr,N as mr,ag as br,r as yr,u as _r,f as wr}from"./Crb1ifvw.js";import{p,r as we,s as Ce}from"./BiXZbQqO.js";import{O as Sr}from"./DpWDGuko.js";class Er extends Map{#e=new Map;#t=V(0);#r=V(0);#s=Ze||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#n(e){return Ze===this.#s?V(e):jt(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0){var o=super.get(e);if(o!==void 0)r=this.#n(0),t.set(e,r);else return i(this.#t),!1}return i(r),!0}forEach(e,t){this.#o(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0){var o=super.get(e);if(o!==void 0)r=this.#n(0),t.set(e,r);else{i(this.#t);return}}return i(r),super.get(e)}set(e,t){var r=this.#e,o=r.get(e),s=super.get(e),l=super.set(e,t),a=this.#t;if(o===void 0)o=this.#n(0),r.set(e,o),k(this.#r,super.size),Te(a);else if(s!==t){Te(o);var u=a.reactions===null?null:new Set(a.reactions),b=u===null||!o.reactions?.every(h=>u.has(h));b&&Te(a)}return l}delete(e){var t=this.#e,r=t.get(e),o=super.delete(e);return r!==void 0&&(t.delete(e),k(this.#r,super.size),k(r,-1),Te(this.#t)),o}clear(){if(super.size!==0){super.clear();var e=this.#e;k(this.#r,0);for(var t of e.values())k(t,-1);Te(this.#t),e.clear()}}#o(){i(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#n(0);e.set(t,r)}}for([,r]of this.#e)i(r)}keys(){return i(this.#t),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return i(this.#r),super.size}}function Xe(n,e){return setTimeout(e,n)}const wt=typeof document<"u",et=Cr();function Cr(){return wt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ve(n){return n instanceof HTMLElement}function Fr(n){return n instanceof Element}function kr(n){return n instanceof HTMLInputElement&&"select"in n}function Nr(n,e){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function Tr(n){return{content:`data-${n}-content`,trigger:`data-${n}-trigger`,overlay:`data-${n}-overlay`,title:`data-${n}-title`,description:`data-${n}-description`,close:`data-${n}-close`,cancel:`data-${n}-cancel`,action:`data-${n}-action`}}class Pr{opts;#e=V(null);get triggerNode(){return i(this.#e)}set triggerNode(e){k(this.#e,e,!0)}#t=V(null);get contentNode(){return i(this.#t)}set contentNode(e){k(this.#t,e,!0)}#r=V(null);get descriptionNode(){return i(this.#r)}set descriptionNode(e){k(this.#r,e,!0)}#s=V(void 0);get contentId(){return i(this.#s)}set contentId(e){k(this.#s,e,!0)}#n=V(void 0);get titleId(){return i(this.#n)}set titleId(e){k(this.#n,e,!0)}#o=V(void 0);get triggerId(){return i(this.#o)}set triggerId(e){k(this.#o,e,!0)}#a=V(void 0);get descriptionId(){return i(this.#a)}set descriptionId(e){k(this.#a,e,!0)}#l=V(null);get cancelNode(){return i(this.#l)}set cancelNode(e){k(this.#l,e,!0)}#i=B(()=>Tr(this.opts.variant.current));get attrs(){return i(this.#i)}set attrs(e){k(this.#i,e)}constructor(e){this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}#c=B(()=>({"data-state":$t(this.opts.open.current)}));get sharedProps(){return i(this.#c)}set sharedProps(e){k(this.#c,e)}}class Or{opts;root;#e=B(()=>this.root.attrs[this.opts.variant.current]);constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),_e({...e,deps:()=>this.root.opts.open.current})}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===Zt||e.key===Jt)&&(e.preventDefault(),this.root.handleClose())}#t=B(()=>({id:this.opts.id.current,[i(this.#e)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}class xr{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,onRefChange:r=>{this.root.titleId=r?.id},deps:()=>this.root.opts.open.current})}#e=B(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps}));get props(){return i(this.#e)}set props(e){k(this.#e,e)}}class Dr{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current,onRefChange:r=>{this.root.descriptionNode=r,this.root.descriptionId=r?.id}})}#e=B(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps}));get props(){return i(this.#e)}set props(e){k(this.#e,e)}}class Ir{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current,onRefChange:r=>{this.root.contentNode=r,this.root.contentId=r?.id}})}#e=B(()=>({open:this.root.opts.open.current}));get snippetProps(){return i(this.#e)}set snippetProps(e){k(this.#e,e)}#t=B(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}class Ar{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current})}#e=B(()=>({open:this.root.opts.open.current}));get snippetProps(){return i(this.#e)}set snippetProps(e){k(this.#e,e)}#t=B(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}const Ne=new dt("Dialog.Root");function Lr(n){return Ne.set(new Pr(n))}function Mr(n){return new xr(n,Ne.get())}function Br(n){return new Ir(n,Ne.get())}function Rr(n){return new Ar(n,Ne.get())}function Kr(n){return new Dr(n,Ne.get())}function Hr(n){return new Or(n,Ne.get())}var qr=L("<div><!></div>");function St(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"ref",15,null),o=p(e,"child",7),s=p(e,"children",7),l=p(e,"level",7,2),a=we(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const u=Mr({id:I.with(()=>t()),level:I.with(()=>l()),ref:I.with(()=>r(),g=>r(g))}),b=B(()=>ge(a,u.props));var h=j(),w=H(h);{var f=g=>{var S=j(),P=H(S);oe(P,o,()=>({props:i(b)})),_(g,S)},y=g=>{var S=qr();ye(S,()=>({...i(b)}));var P=C(S);oe(P,()=>s()??de),E(S),_(g,S)};z(w,g=>{o()?g(f):g(y,!1)})}return _(n,h),J({get id(){return t()},set id(g=ce()){t(g),v()},get ref(){return r()},set ref(g=null){r(g),v()},get child(){return o()},set child(g){o(g),v()},get children(){return s()},set children(g){s(g),v()},get level(){return l()},set level(g=2){l(g),v()}})}$(St,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function Et(n,e,t,r){const o=Array.isArray(e)?e:[e];return o.forEach(s=>n.addEventListener(s,t,r)),()=>{o.forEach(s=>n.removeEventListener(s,t,r))}}class Ct{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const o=s=>{t(s)};return pe(e,this.eventName,o,r)}}function tt(n,e=500){let t=null;const r=(...o)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...o)},e)};return r.destroy=()=>{t!==null&&(clearTimeout(t),t=null)},r}function Ge(n,e){return n===e||n.contains(e)}function Ft(n){return n?.ownerDocument??document}function Ur(n,e){const{clientX:t,clientY:r}=n,o=e.getBoundingClientRect();return t<o.left||t>o.right||r<o.top||r>o.bottom}globalThis.bitsDismissableLayers??=new Map;class zr{opts;#e;#t;#r={pointerdown:!1};#s=!1;#n=!1;node=I(null);#o=void 0;#a;#l=V(null);get currNode(){return i(this.#l)}set currNode(e){k(this.#l,e,!0)}#i=q;constructor(e){this.opts=e,_e({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,ae(()=>{this.#o=Ft(this.currNode)});let t=q;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),t()};Fe([()=>this.opts.enabled.current,()=>this.currNode],([o,s])=>{if(!(!o||!s))return Xe(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#f())}),r}),er(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#i(),t()})}#c=e=>{e.defaultPrevented||this.currNode&&Ye(()=>{!this.currNode||this.#m(e.target)||e.target&&!this.#n&&this.#a.current?.(e)})};#f(){return Oe(pe(this.#o,"pointerdown",Oe(this.#v,this.#g),{capture:!0}),pe(this.#o,"pointerdown",Oe(this.#p,this.#u)),pe(this.#o,"focusin",this.#c))}#h=e=>{let t=e;t.defaultPrevented&&(t=rt(e)),this.#e.current(e)};#u=tt(e=>{if(!this.currNode){this.#i();return}const t=this.opts.isValidEvent.current(e,this.currNode)||Yr(e,this.currNode);if(!this.#s||this.#b()||!t){this.#i();return}let r=e;if(r.defaultPrevented&&(r=rt(r)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#i();return}e.pointerType==="touch"?(this.#i(),this.#i=Et(this.#o,"click",this.#h,{once:!0})):this.#e.current(r)},10);#v=e=>{this.#r[e.type]=!0};#p=e=>{this.#r[e.type]=!1};#g=()=>{this.node.current&&(this.#s=jr(this.node.current))};#m=e=>this.node.current?Ge(this.node.current,e):!1;#d=tt(()=>{for(const e in this.#r)this.#r[e]=!1;this.#s=!1},20);#b(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#n=!0};#_=()=>{this.#n=!1};props={onfocuscapture:this.#y,onblurcapture:this.#_}}function Vr(n){return new zr(n)}function Wr(n){return n.findLast(([e,{current:t}])=>t==="close"||t==="ignore")}function jr(n){const e=[...globalThis.bitsDismissableLayers],t=Wr(e);if(t)return t[0].node.current===n;const[r]=e[0];return r.node.current===n}function Yr(n,e){if("button"in n&&n.button>0)return!1;const t=n.target;return Fr(t)?Ft(t).documentElement.contains(t)&&!Ge(e,t)&&Ur(n,e):!1}function rt(n){const e=n.currentTarget,t=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let o=!1;return new Proxy(r,{get:(l,a)=>a==="currentTarget"?e:a==="target"?t:a==="preventDefault"?()=>{o=!0,typeof l.preventDefault=="function"&&l.preventDefault()}:a==="defaultPrevented"?o:a in l?l[a]:n[a]})}function kt(n,e){Z(e,!0);let t=p(e,"interactOutsideBehavior",7,"close"),r=p(e,"onInteractOutside",7,q),o=p(e,"onFocusOutside",7,q),s=p(e,"id",7),l=p(e,"children",7),a=p(e,"enabled",7),u=p(e,"isValidEvent",7,()=>!1);const b=Vr({id:I.with(()=>s()),interactOutsideBehavior:I.with(()=>t()),onInteractOutside:I.with(()=>r()),enabled:I.with(()=>a()),onFocusOutside:I.with(()=>o()),isValidEvent:I.with(()=>u())});var h=j(),w=H(h);return oe(w,()=>l()??de,()=>({props:b.props})),_(n,h),J({get interactOutsideBehavior(){return t()},set interactOutsideBehavior(f="close"){t(f),v()},get onInteractOutside(){return r()},set onInteractOutside(f=q){r(f),v()},get onFocusOutside(){return o()},set onFocusOutside(f=q){o(f),v()},get id(){return s()},set id(f){s(f),v()},get children(){return l()},set children(f){l(f),v()},get enabled(){return a()},set enabled(f){a(f),v()},get isValidEvent(){return u()},set isValidEvent(f=()=>!1){u(f),v()}})}$(kt,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0);globalThis.bitsEscapeLayers??=new Map;class Qr{opts;constructor(e){this.opts=e;let t=q;Fe(()=>e.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>pe(document,"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==tr||!Gr(this))return;const t=new KeyboardEvent(e.type,e);e.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(t)}}function Xr(n){return new Qr(n)}function Gr(n){const e=[...globalThis.bitsEscapeLayers],t=e.findLast(([o,{current:s}])=>s==="close"||s==="ignore");if(t)return t[0]===n;const[r]=e[0];return r===n}function Nt(n,e){Z(e,!0);let t=p(e,"escapeKeydownBehavior",7,"close"),r=p(e,"onEscapeKeydown",7,q),o=p(e,"children",7),s=p(e,"enabled",7);Xr({escapeKeydownBehavior:I.with(()=>t()),onEscapeKeydown:I.with(()=>r()),enabled:I.with(()=>s())});var l=j(),a=H(l);return oe(a,()=>o()??de),_(n,l),J({get escapeKeydownBehavior(){return t()},set escapeKeydownBehavior(u="close"){t(u),v()},get onEscapeKeydown(){return r()},set onEscapeKeydown(u=q){r(u),v()},get children(){return o()},set children(u){o(u),v()},get enabled(){return s()},set enabled(u){s(u),v()}})}$(Nt,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const me=I([]);function Zr(){return{add(n){const e=me.current[0];e&&n.id!==e.id&&e.pause(),me.current=nt(me.current,n),me.current.unshift(n)},remove(n){me.current=nt(me.current,n),me.current[0]?.resume()},get current(){return me.current}}}function Jr(){let n=V(!1),e=V(!1);return{id:ce(),get paused(){return i(n)},get isHandlingFocus(){return i(e)},set isHandlingFocus(t){k(e,t,!0)},pause(){k(n,!0)},resume(){k(n,!1)}}}function nt(n,e){return[...n].filter(t=>t.id!==e.id)}function $r(n){return n.filter(e=>e.tagName!=="A")}function be(n,{select:e=!1}={}){if(!(n&&n.focus)||document.activeElement===n)return;const t=document.activeElement;n.focus({preventScroll:!0}),n!==t&&kr(n)&&e&&n.select()}function en(n,{select:e=!1}={}){const t=document.activeElement;for(const r of n)if(be(r,{select:e}),document.activeElement!==t)return!0}function ot(n,e){for(const t of n)if(!Nr(t,e))return t}function Tt(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function tn(n){const e=Tt(n),t=ot(e,n),r=ot(e.reverse(),n);return[t,r]}/*!
1
+ import"./NZTpNUN0.js";import{I as V,aN as Ze,Y as jt,F as i,L as k,aO as Te,G as B,p as Z,H as j,a as H,b as _,d as J,v,J as oe,f as L,g as C,E as de,r as E,c as $,aP as pe,u as ae,aQ as Yt,o as lt,X as ct,s as A,t as se,e as fe,aD as le,aL as Qt,M as ut,aR as Ue,aE as Xt,K as Gt}from"./DUt8zN7X.js";import{i as z,c as Se,b as Ee}from"./Dq6jck_i.js";import{G as dt,H as _e,J as Zt,K as Jt,L as $t,O as I,Q as ce,T as ye,U as ge,V as q,W as Fe,X as er,Y as Ye,Z as Oe,_ as tr,$ as rr,a0 as nr,a1 as ft,n as F,t as ue,a2 as ht,S as Ke,a3 as Ie,v as or,s as he,a4 as Je,h as Ae,z as sr,a as vt,e as xe,C as pt,b as ke,a5 as ir,M as ar,i as De,E as ze,a6 as lr,a7 as cr,a8 as gt,a9 as mt,aa as bt,ab as ur,P as dr,d as Qe,c as fr,I as Pe,o as yt,ac as hr,p as _t,ad as $e,ae as vr,w as pr,af as gr,N as mr,ag as br,r as yr,u as _r,f as wr}from"./dR-jW0T5.js";import{p,r as we,s as Ce}from"./BiXZbQqO.js";import{O as Sr}from"./CqH0QXRP.js";class Er extends Map{#e=new Map;#t=V(0);#r=V(0);#s=Ze||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#n(e){return Ze===this.#s?V(e):jt(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0){var o=super.get(e);if(o!==void 0)r=this.#n(0),t.set(e,r);else return i(this.#t),!1}return i(r),!0}forEach(e,t){this.#o(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0){var o=super.get(e);if(o!==void 0)r=this.#n(0),t.set(e,r);else{i(this.#t);return}}return i(r),super.get(e)}set(e,t){var r=this.#e,o=r.get(e),s=super.get(e),l=super.set(e,t),a=this.#t;if(o===void 0)o=this.#n(0),r.set(e,o),k(this.#r,super.size),Te(a);else if(s!==t){Te(o);var u=a.reactions===null?null:new Set(a.reactions),b=u===null||!o.reactions?.every(h=>u.has(h));b&&Te(a)}return l}delete(e){var t=this.#e,r=t.get(e),o=super.delete(e);return r!==void 0&&(t.delete(e),k(this.#r,super.size),k(r,-1),Te(this.#t)),o}clear(){if(super.size!==0){super.clear();var e=this.#e;k(this.#r,0);for(var t of e.values())k(t,-1);Te(this.#t),e.clear()}}#o(){i(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#n(0);e.set(t,r)}}for([,r]of this.#e)i(r)}keys(){return i(this.#t),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return i(this.#r),super.size}}function Xe(n,e){return setTimeout(e,n)}const wt=typeof document<"u",et=Cr();function Cr(){return wt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ve(n){return n instanceof HTMLElement}function Fr(n){return n instanceof Element}function kr(n){return n instanceof HTMLInputElement&&"select"in n}function Nr(n,e){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function Tr(n){return{content:`data-${n}-content`,trigger:`data-${n}-trigger`,overlay:`data-${n}-overlay`,title:`data-${n}-title`,description:`data-${n}-description`,close:`data-${n}-close`,cancel:`data-${n}-cancel`,action:`data-${n}-action`}}class Pr{opts;#e=V(null);get triggerNode(){return i(this.#e)}set triggerNode(e){k(this.#e,e,!0)}#t=V(null);get contentNode(){return i(this.#t)}set contentNode(e){k(this.#t,e,!0)}#r=V(null);get descriptionNode(){return i(this.#r)}set descriptionNode(e){k(this.#r,e,!0)}#s=V(void 0);get contentId(){return i(this.#s)}set contentId(e){k(this.#s,e,!0)}#n=V(void 0);get titleId(){return i(this.#n)}set titleId(e){k(this.#n,e,!0)}#o=V(void 0);get triggerId(){return i(this.#o)}set triggerId(e){k(this.#o,e,!0)}#a=V(void 0);get descriptionId(){return i(this.#a)}set descriptionId(e){k(this.#a,e,!0)}#l=V(null);get cancelNode(){return i(this.#l)}set cancelNode(e){k(this.#l,e,!0)}#i=B(()=>Tr(this.opts.variant.current));get attrs(){return i(this.#i)}set attrs(e){k(this.#i,e)}constructor(e){this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}#c=B(()=>({"data-state":$t(this.opts.open.current)}));get sharedProps(){return i(this.#c)}set sharedProps(e){k(this.#c,e)}}class Or{opts;root;#e=B(()=>this.root.attrs[this.opts.variant.current]);constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),_e({...e,deps:()=>this.root.opts.open.current})}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===Zt||e.key===Jt)&&(e.preventDefault(),this.root.handleClose())}#t=B(()=>({id:this.opts.id.current,[i(this.#e)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}class xr{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,onRefChange:r=>{this.root.titleId=r?.id},deps:()=>this.root.opts.open.current})}#e=B(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps}));get props(){return i(this.#e)}set props(e){k(this.#e,e)}}class Dr{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current,onRefChange:r=>{this.root.descriptionNode=r,this.root.descriptionId=r?.id}})}#e=B(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps}));get props(){return i(this.#e)}set props(e){k(this.#e,e)}}class Ir{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current,onRefChange:r=>{this.root.contentNode=r,this.root.contentId=r?.id}})}#e=B(()=>({open:this.root.opts.open.current}));get snippetProps(){return i(this.#e)}set snippetProps(e){k(this.#e,e)}#t=B(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}class Ar{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current})}#e=B(()=>({open:this.root.opts.open.current}));get snippetProps(){return i(this.#e)}set snippetProps(e){k(this.#e,e)}#t=B(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}const Ne=new dt("Dialog.Root");function Lr(n){return Ne.set(new Pr(n))}function Mr(n){return new xr(n,Ne.get())}function Br(n){return new Ir(n,Ne.get())}function Rr(n){return new Ar(n,Ne.get())}function Kr(n){return new Dr(n,Ne.get())}function Hr(n){return new Or(n,Ne.get())}var qr=L("<div><!></div>");function St(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"ref",15,null),o=p(e,"child",7),s=p(e,"children",7),l=p(e,"level",7,2),a=we(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const u=Mr({id:I.with(()=>t()),level:I.with(()=>l()),ref:I.with(()=>r(),g=>r(g))}),b=B(()=>ge(a,u.props));var h=j(),w=H(h);{var f=g=>{var S=j(),P=H(S);oe(P,o,()=>({props:i(b)})),_(g,S)},y=g=>{var S=qr();ye(S,()=>({...i(b)}));var P=C(S);oe(P,()=>s()??de),E(S),_(g,S)};z(w,g=>{o()?g(f):g(y,!1)})}return _(n,h),J({get id(){return t()},set id(g=ce()){t(g),v()},get ref(){return r()},set ref(g=null){r(g),v()},get child(){return o()},set child(g){o(g),v()},get children(){return s()},set children(g){s(g),v()},get level(){return l()},set level(g=2){l(g),v()}})}$(St,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function Et(n,e,t,r){const o=Array.isArray(e)?e:[e];return o.forEach(s=>n.addEventListener(s,t,r)),()=>{o.forEach(s=>n.removeEventListener(s,t,r))}}class Ct{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const o=s=>{t(s)};return pe(e,this.eventName,o,r)}}function tt(n,e=500){let t=null;const r=(...o)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...o)},e)};return r.destroy=()=>{t!==null&&(clearTimeout(t),t=null)},r}function Ge(n,e){return n===e||n.contains(e)}function Ft(n){return n?.ownerDocument??document}function Ur(n,e){const{clientX:t,clientY:r}=n,o=e.getBoundingClientRect();return t<o.left||t>o.right||r<o.top||r>o.bottom}globalThis.bitsDismissableLayers??=new Map;class zr{opts;#e;#t;#r={pointerdown:!1};#s=!1;#n=!1;node=I(null);#o=void 0;#a;#l=V(null);get currNode(){return i(this.#l)}set currNode(e){k(this.#l,e,!0)}#i=q;constructor(e){this.opts=e,_e({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,ae(()=>{this.#o=Ft(this.currNode)});let t=q;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),t()};Fe([()=>this.opts.enabled.current,()=>this.currNode],([o,s])=>{if(!(!o||!s))return Xe(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#f())}),r}),er(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#i(),t()})}#c=e=>{e.defaultPrevented||this.currNode&&Ye(()=>{!this.currNode||this.#m(e.target)||e.target&&!this.#n&&this.#a.current?.(e)})};#f(){return Oe(pe(this.#o,"pointerdown",Oe(this.#v,this.#g),{capture:!0}),pe(this.#o,"pointerdown",Oe(this.#p,this.#u)),pe(this.#o,"focusin",this.#c))}#h=e=>{let t=e;t.defaultPrevented&&(t=rt(e)),this.#e.current(e)};#u=tt(e=>{if(!this.currNode){this.#i();return}const t=this.opts.isValidEvent.current(e,this.currNode)||Yr(e,this.currNode);if(!this.#s||this.#b()||!t){this.#i();return}let r=e;if(r.defaultPrevented&&(r=rt(r)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#i();return}e.pointerType==="touch"?(this.#i(),this.#i=Et(this.#o,"click",this.#h,{once:!0})):this.#e.current(r)},10);#v=e=>{this.#r[e.type]=!0};#p=e=>{this.#r[e.type]=!1};#g=()=>{this.node.current&&(this.#s=jr(this.node.current))};#m=e=>this.node.current?Ge(this.node.current,e):!1;#d=tt(()=>{for(const e in this.#r)this.#r[e]=!1;this.#s=!1},20);#b(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#n=!0};#_=()=>{this.#n=!1};props={onfocuscapture:this.#y,onblurcapture:this.#_}}function Vr(n){return new zr(n)}function Wr(n){return n.findLast(([e,{current:t}])=>t==="close"||t==="ignore")}function jr(n){const e=[...globalThis.bitsDismissableLayers],t=Wr(e);if(t)return t[0].node.current===n;const[r]=e[0];return r.node.current===n}function Yr(n,e){if("button"in n&&n.button>0)return!1;const t=n.target;return Fr(t)?Ft(t).documentElement.contains(t)&&!Ge(e,t)&&Ur(n,e):!1}function rt(n){const e=n.currentTarget,t=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let o=!1;return new Proxy(r,{get:(l,a)=>a==="currentTarget"?e:a==="target"?t:a==="preventDefault"?()=>{o=!0,typeof l.preventDefault=="function"&&l.preventDefault()}:a==="defaultPrevented"?o:a in l?l[a]:n[a]})}function kt(n,e){Z(e,!0);let t=p(e,"interactOutsideBehavior",7,"close"),r=p(e,"onInteractOutside",7,q),o=p(e,"onFocusOutside",7,q),s=p(e,"id",7),l=p(e,"children",7),a=p(e,"enabled",7),u=p(e,"isValidEvent",7,()=>!1);const b=Vr({id:I.with(()=>s()),interactOutsideBehavior:I.with(()=>t()),onInteractOutside:I.with(()=>r()),enabled:I.with(()=>a()),onFocusOutside:I.with(()=>o()),isValidEvent:I.with(()=>u())});var h=j(),w=H(h);return oe(w,()=>l()??de,()=>({props:b.props})),_(n,h),J({get interactOutsideBehavior(){return t()},set interactOutsideBehavior(f="close"){t(f),v()},get onInteractOutside(){return r()},set onInteractOutside(f=q){r(f),v()},get onFocusOutside(){return o()},set onFocusOutside(f=q){o(f),v()},get id(){return s()},set id(f){s(f),v()},get children(){return l()},set children(f){l(f),v()},get enabled(){return a()},set enabled(f){a(f),v()},get isValidEvent(){return u()},set isValidEvent(f=()=>!1){u(f),v()}})}$(kt,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0);globalThis.bitsEscapeLayers??=new Map;class Qr{opts;constructor(e){this.opts=e;let t=q;Fe(()=>e.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>pe(document,"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==tr||!Gr(this))return;const t=new KeyboardEvent(e.type,e);e.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(t)}}function Xr(n){return new Qr(n)}function Gr(n){const e=[...globalThis.bitsEscapeLayers],t=e.findLast(([o,{current:s}])=>s==="close"||s==="ignore");if(t)return t[0]===n;const[r]=e[0];return r===n}function Nt(n,e){Z(e,!0);let t=p(e,"escapeKeydownBehavior",7,"close"),r=p(e,"onEscapeKeydown",7,q),o=p(e,"children",7),s=p(e,"enabled",7);Xr({escapeKeydownBehavior:I.with(()=>t()),onEscapeKeydown:I.with(()=>r()),enabled:I.with(()=>s())});var l=j(),a=H(l);return oe(a,()=>o()??de),_(n,l),J({get escapeKeydownBehavior(){return t()},set escapeKeydownBehavior(u="close"){t(u),v()},get onEscapeKeydown(){return r()},set onEscapeKeydown(u=q){r(u),v()},get children(){return o()},set children(u){o(u),v()},get enabled(){return s()},set enabled(u){s(u),v()}})}$(Nt,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const me=I([]);function Zr(){return{add(n){const e=me.current[0];e&&n.id!==e.id&&e.pause(),me.current=nt(me.current,n),me.current.unshift(n)},remove(n){me.current=nt(me.current,n),me.current[0]?.resume()},get current(){return me.current}}}function Jr(){let n=V(!1),e=V(!1);return{id:ce(),get paused(){return i(n)},get isHandlingFocus(){return i(e)},set isHandlingFocus(t){k(e,t,!0)},pause(){k(n,!0)},resume(){k(n,!1)}}}function nt(n,e){return[...n].filter(t=>t.id!==e.id)}function $r(n){return n.filter(e=>e.tagName!=="A")}function be(n,{select:e=!1}={}){if(!(n&&n.focus)||document.activeElement===n)return;const t=document.activeElement;n.focus({preventScroll:!0}),n!==t&&kr(n)&&e&&n.select()}function en(n,{select:e=!1}={}){const t=document.activeElement;for(const r of n)if(be(r,{select:e}),document.activeElement!==t)return!0}function ot(n,e){for(const t of n)if(!Nr(t,e))return t}function Tt(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function tn(n){const e=Tt(n),t=ot(e,n),r=ot(e.reverse(),n);return[t,r]}/*!
2
2
  * tabbable 6.2.0
3
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
4
  */var rn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],nn=rn.join(","),Pt=typeof Element>"u",Be=Pt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Re=!Pt&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},on=function n(e,t){var r;t===void 0&&(t=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",l=s||t&&e&&n(e.parentNode);return l},sn=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},an=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ln=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||sn(e))&&!an(e)?0:e.tabIndex},Ot=function(e){return e.tagName==="INPUT"},cn=function(e){return Ot(e)&&e.type==="hidden"},un=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},dn=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},fn=function(e){if(!e.name)return!0;var t=e.form||Re(e),r=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=dn(o,e.form);return!s||s===e},hn=function(e){return Ot(e)&&e.type==="radio"},vn=function(e){return hn(e)&&!fn(e)},pn=function(e){var t,r=e&&Re(e),o=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var l,a,u;for(s=!!((l=o)!==null&&l!==void 0&&(a=l.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!s&&o;){var b,h,w;r=Re(o),o=(b=r)===null||b===void 0?void 0:b.host,s=!!((h=o)!==null&&h!==void 0&&(w=h.ownerDocument)!==null&&w!==void 0&&w.contains(o))}}return s},st=function(e){var t=e.getBoundingClientRect(),r=t.width,o=t.height;return r===0&&o===0},gn=function(e,t){var r=t.displayCheck,o=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Be.call(e,"details>summary:first-of-type"),l=s?e.parentElement:e;if(Be.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var u=e.parentElement,b=Re(e);if(u&&!u.shadowRoot&&o(u)===!0)return st(e);e.assignedSlot?e=e.assignedSlot:!u&&b!==e.ownerDocument?e=b.host:e=u}e=a}if(pn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return st(e);return!1},mn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var o=t.children.item(r);if(o.tagName==="LEGEND")return Be.call(t,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}t=t.parentElement}return!1},bn=function(e,t){return!(t.disabled||on(t)||cn(t)||gn(t,e)||un(t)||mn(t))},yn=function(e,t){return!(vn(t)||ln(t)<0||!bn(e,t))},_n=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Be.call(e,nn)===!1?!1:yn(t,e)};const wn=new Ct("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),Sn=new Ct("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),En=new dt("FocusScope");function Cn({id:n,loop:e,enabled:t,onOpenAutoFocus:r,onCloseAutoFocus:o,forceMount:s}){const l=Zr(),a=Jr(),u=I(null),b=En.getOr({ignoreCloseAutoFocus:!1});let h=null;_e({id:n,ref:u,deps:()=>t.current});function w(d){if(!(a.paused||!u.current||a.isHandlingFocus)){a.isHandlingFocus=!0;try{const c=d.target;if(!Ve(c))return;const m=u.current.contains(c);if(d.type==="focusin")if(m)h=c;else{if(b.ignoreCloseAutoFocus)return;be(h,{select:!0})}else d.type==="focusout"&&!m&&!b.ignoreCloseAutoFocus&&be(h,{select:!0})}finally{a.isHandlingFocus=!1}}}function f(d){if(!h||!u.current)return;let c=!1;for(const m of d){if(m.type==="childList"&&m.removedNodes.length>0)for(const N of m.removedNodes){if(N===h){c=!0;break}if(N.nodeType===Node.ELEMENT_NODE&&N.contains(h)){c=!0;break}}if(c)break}c&&u.current&&!u.current.contains(document.activeElement)&&be(u.current)}Fe([()=>u.current,()=>t.current],([d,c])=>{if(!d||!c)return;const m=Oe(pe(document,"focusin",w),pe(document,"focusout",w)),N=new MutationObserver(f);return N.observe(d,{childList:!0,subtree:!0,attributes:!1}),()=>{m(),N.disconnect()}}),Fe([()=>s.current,()=>u.current],([d,c])=>{if(d)return;const m=document.activeElement;return y(c,m),()=>{c&&g(m)}}),Fe([()=>s.current,()=>u.current,()=>t.current],([d,c])=>{if(!d)return;const m=document.activeElement;return y(c,m),()=>{c&&g(m)}});function y(d,c){if(d||(d=document.getElementById(n.current)),!d||!t.current)return;if(l.add(a),!d.contains(c)){const N=wn.createEvent();r.current(N),N.defaultPrevented||Ye(()=>{if(!d)return;en($r(Tt(d)),{select:!0})||be(d)})}}function g(d){const c=Sn.createEvent();o.current?.(c);const m=b.ignoreCloseAutoFocus;Xe(0,()=>{!c.defaultPrevented&&d&&!m&&be(_n(d)?d:document.body,{select:!0}),l.remove(a)})}function S(d){if(!t.current||!e.current&&!t.current||a.paused)return;const c=d.key===rr&&!d.ctrlKey&&!d.altKey&&!d.metaKey,m=document.activeElement;if(!(c&&m))return;const N=u.current;if(!N)return;const[R,O]=tn(N);R&&O?!d.shiftKey&&m===O?(d.preventDefault(),e.current&&be(R,{select:!0})):d.shiftKey&&m===R&&(d.preventDefault(),e.current&&be(O,{select:!0})):m===N&&d.preventDefault()}const P=B(()=>({id:n.current,tabindex:-1,onkeydown:S}));return{get props(){return i(P)}}}function xt(n,e){Z(e,!0);let t=p(e,"id",7),r=p(e,"trapFocus",7,!1),o=p(e,"loop",7,!1),s=p(e,"onCloseAutoFocus",7,q),l=p(e,"onOpenAutoFocus",7,q),a=p(e,"focusScope",7),u=p(e,"forceMount",7,!1);const b=Cn({enabled:I.with(()=>r()),loop:I.with(()=>o()),onCloseAutoFocus:I.with(()=>s()),onOpenAutoFocus:I.with(()=>l()),id:I.with(()=>t()),forceMount:I.with(()=>u())});var h=j(),w=H(h);return oe(w,()=>a()??de,()=>({props:b.props})),_(n,h),J({get id(){return t()},set id(f){t(f),v()},get trapFocus(){return r()},set trapFocus(f=!1){r(f),v()},get loop(){return o()},set loop(f=!1){o(f),v()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(f=q){s(f),v()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(f=q){l(f),v()},get focusScope(){return a()},set focusScope(f){a(f),v()},get forceMount(){return u()},set forceMount(f=!1){u(f),v()}})}$(xt,{id:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},forceMount:{}},[],[],!0);globalThis.bitsTextSelectionLayers??=new Map;class Fn{opts;#e=q;#t=I(null);constructor(e){this.opts=e,_e({id:e.id,ref:this.#t,deps:()=>this.opts.enabled.current});let t=q;Fe(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#r()),()=>{t(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#r(){return Oe(pe(document,"pointerdown",this.#s),pe(document,"pointerup",nr(this.#n,this.opts.onPointerUp.current)))}#s=e=>{const t=this.#t.current,r=e.target;!Ve(t)||!Ve(r)||!this.opts.enabled.current||!Tn(this)||!Ge(t,r)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=Nn(t)))};#n=()=>{this.#e(),this.#e=q}}function kn(n){return new Fn(n)}const it=n=>n.style.userSelect||n.style.webkitUserSelect;function Nn(n){const e=document.body,t=it(e),r=it(n);return Le(e,"none"),Le(n,"text"),()=>{Le(e,t),Le(n,r)}}function Le(n,e){n.style.userSelect=e,n.style.webkitUserSelect=e}function Tn(n){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const t=e.at(-1);return t?t[0]===n:!1}function Dt(n,e){Z(e,!0);let t=p(e,"preventOverflowTextSelection",7,!0),r=p(e,"onPointerDown",7,q),o=p(e,"onPointerUp",7,q),s=p(e,"id",7),l=p(e,"children",7),a=p(e,"enabled",7);kn({id:I.with(()=>s()),onPointerDown:I.with(()=>r()),onPointerUp:I.with(()=>o()),enabled:I.with(()=>a()&&t())});var u=j(),b=H(u);return oe(b,()=>l()??de),_(n,u),J({get preventOverflowTextSelection(){return t()},set preventOverflowTextSelection(h=!0){t(h),v()},get onPointerDown(){return r()},set onPointerDown(h=q){r(h),v()},get onPointerUp(){return o()},set onPointerUp(h=q){o(h),v()},get id(){return s()},set id(h){s(h),v()},get children(){return l()},set children(h){l(h),v()},get enabled(){return a()},set enabled(h){a(h),v()}})}$(Dt,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{}},[],[],!0);function Pn(n){let e=0,t=V(void 0),r;function o(){e-=1,r&&e<=0&&(r(),k(t,void 0),r=void 0)}return(...s)=>(e+=1,i(t)===void 0&&(r=Yt(()=>{k(t,n(...s),!0)})),ae(()=>()=>{o()}),i(t))}const On=Pn(()=>{const n=new Er,e=B(()=>{for(const s of n.values())if(s)return!0;return!1});let t=V(null),r=null;function o(){wt&&(document.body.setAttribute("style",i(t)??""),document.body.style.removeProperty("--scrollbar-width"),et&&r?.())}return ae(()=>{const s=i(e);return lt(()=>{if(!s)return;k(t,document.body.getAttribute("style"),!0);const l=getComputedStyle(document.body),a=window.innerWidth-document.documentElement.clientWidth,b={padding:Number.parseInt(l.paddingRight??"0",10)+a,margin:Number.parseInt(l.marginRight??"0",10)};a>0&&(document.body.style.paddingRight=`${b.padding}px`,document.body.style.marginRight=`${b.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`),document.body.style.overflow="hidden"),et&&(r=Et(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),Ye(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),ae(()=>()=>{r?.()}),{get map(){return n},resetBodyStyle:o}});function xn(n,e=()=>null){const t=ce(),r=On();if(!r)return;const o=B(e);r.map.set(t,n??!1);const s=I.with(()=>r.map.get(t)??!1,l=>r.map.set(t,l));return ae(()=>()=>{r.map.delete(t),!Dn(r.map)&&(i(o)===null?requestAnimationFrame(()=>r.resetBodyStyle()):Xe(i(o),()=>r.resetBodyStyle()))}),s}function Dn(n){for(const[e,t]of n)if(t)return!0;return!1}function We(n,e){Z(e,!0);let t=p(e,"preventScroll",7,!0),r=p(e,"restoreScrollDelay",7,null);return xn(t(),()=>r()),J({get preventScroll(){return t()},set preventScroll(o=!0){t(o),v()},get restoreScrollDelay(){return r()},set restoreScrollDelay(o=null){r(o),v()}})}$(We,{preventScroll:{},restoreScrollDelay:{}},[],[],!0);function In({forceMount:n,present:e,trapFocus:t,open:r}){return n?r&&t:e&&t&&r}var An=L("<div><!></div>");function It(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"forceMount",7,!1),o=p(e,"child",7),s=p(e,"children",7),l=p(e,"ref",15,null),a=we(e,["$$slots","$$events","$$legacy","$$host","id","forceMount","child","children","ref"]);const u=Rr({id:I.with(()=>t()),ref:I.with(()=>l(),w=>l(w))}),b=B(()=>ge(a,u.props)),h=B(()=>u.root.opts.open.current||r());return ft(n,{get id(){return t()},get present(){return i(h)},presence:f=>{var y=j(),g=H(y);{var S=d=>{var c=j(),m=H(c),N=ct(()=>({props:ge(i(b)),...u.snippetProps}));oe(m,o,()=>i(N)),_(d,c)},P=d=>{var c=An();ye(c,N=>({...N}),[()=>ge(i(b))]);var m=C(c);oe(m,()=>s()??de,()=>u.snippetProps),E(c),_(d,c)};z(g,d=>{o()?d(S):d(P,!1)})}_(f,y)},$$slots:{presence:!0}}),J({get id(){return t()},set id(w=ce()){t(w),v()},get forceMount(){return r()},set forceMount(w=!1){r(w),v()},get child(){return o()},set child(w){o(w),v()},get children(){return s()},set children(w){s(w),v()},get ref(){return l()},set ref(w=null){l(w),v()}})}$(It,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],!0);var Ln=L("<div><!></div>");function At(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"children",7),o=p(e,"child",7),s=p(e,"ref",15,null),l=we(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref"]);const a=Kr({id:I.with(()=>t()),ref:I.with(()=>s(),y=>s(y))}),u=B(()=>ge(l,a.props));var b=j(),h=H(b);{var w=y=>{var g=j(),S=H(g);oe(S,o,()=>({props:i(u)})),_(y,g)},f=y=>{var g=Ln();ye(g,()=>({...i(u)}));var S=C(g);oe(S,()=>r()??de),E(g),_(y,g)};z(h,y=>{o()?y(w):y(f,!1)})}return _(n,b),J({get id(){return t()},set id(y=ce()){t(y),v()},get children(){return r()},set children(y){r(y),v()},get child(){return o()},set child(y){o(y),v()},get ref(){return s()},set ref(y=null){s(y),v()}})}$(At,{id:{},children:{},child:{},ref:{}},[],[],!0);function Lt(n,e){Z(e,!0);let t=p(e,"open",15,!1),r=p(e,"onOpenChange",7,q),o=p(e,"children",7);Lr({variant:I.with(()=>"dialog"),open:I.with(()=>t(),a=>{t(a),r()(a)})});var s=j(),l=H(s);return oe(l,()=>o()??de),_(n,s),J({get open(){return t()},set open(a=!1){t(a),v()},get onOpenChange(){return r()},set onOpenChange(a=q){r(a),v()},get children(){return o()},set children(a){o(a),v()}})}$(Lt,{open:{},onOpenChange:{},children:{}},[],[],!0);var Mn=L("<button><!></button>");function je(n,e){Z(e,!0);let t=p(e,"children",7),r=p(e,"child",7),o=p(e,"id",23,ce),s=p(e,"ref",15,null),l=p(e,"disabled",7,!1),a=we(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","disabled"]);const u=Hr({variant:I.with(()=>"close"),id:I.with(()=>o()),ref:I.with(()=>s(),g=>s(g)),disabled:I.with(()=>!!l())}),b=B(()=>ge(a,u.props));var h=j(),w=H(h);{var f=g=>{var S=j(),P=H(S);oe(P,r,()=>({props:i(b)})),_(g,S)},y=g=>{var S=Mn();ye(S,()=>({...i(b)}));var P=C(S);oe(P,()=>t()??de),E(S),_(g,S)};z(w,g=>{r()?g(f):g(y,!1)})}return _(n,h),J({get children(){return t()},set children(g){t(g),v()},get child(){return r()},set child(g){r(g),v()},get id(){return o()},set id(g=ce()){o(g),v()},get ref(){return s()},set ref(g=null){s(g),v()},get disabled(){return l()},set disabled(g=!1){l(g),v()}})}$(je,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],!0);var Bn=L("<!> <!>",1),Rn=L("<!> <div><!></div>",1);function Mt(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"children",7),o=p(e,"child",7),s=p(e,"ref",15,null),l=p(e,"forceMount",7,!1),a=p(e,"onCloseAutoFocus",7,q),u=p(e,"onOpenAutoFocus",7,q),b=p(e,"onEscapeKeydown",7,q),h=p(e,"onInteractOutside",7,q),w=p(e,"trapFocus",7,!0),f=p(e,"preventScroll",7,!0),y=p(e,"restoreScrollDelay",7,null),g=we(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const S=Br({id:I.with(()=>t()),ref:I.with(()=>s(),c=>s(c))}),P=B(()=>ge(g,S.props)),d=B(()=>S.root.opts.open.current||l());return ft(n,Ce(()=>i(P),{get forceMount(){return l()},get present(){return i(d)},presence:m=>{const N=B(()=>In({forceMount:l(),present:S.root.opts.open.current,trapFocus:w(),open:S.root.opts.open.current}));xt(m,{loop:!0,get trapFocus(){return i(N)},get onOpenAutoFocus(){return u()},get id(){return t()},onCloseAutoFocus:O=>{a()(O),!O.defaultPrevented&&S.root.triggerNode?.focus()},focusScope:(O,T)=>{let K=()=>T?.().props;Nt(O,Ce(()=>i(P),{get enabled(){return S.root.opts.open.current},onEscapeKeydown:M=>{b()(M),!M.defaultPrevented&&S.root.handleClose()},children:(M,W)=>{kt(M,Ce(()=>i(P),{get enabled(){return S.root.opts.open.current},onInteractOutside:ee=>{h()(ee),!ee.defaultPrevented&&S.root.handleClose()},children:(ee,Y)=>{Dt(ee,Ce(()=>i(P),{get enabled(){return S.root.opts.open.current},children:(D,Q)=>{var G=j(),U=H(G);{var X=re=>{var ie=Bn(),x=H(ie);{var ne=qe=>{We(qe,{get preventScroll(){return f()},get restoreScrollDelay(){return y()}})};z(x,qe=>{S.root.opts.open.current&&qe(ne)})}var ve=A(x,2),He=ct(()=>({props:ge(i(P),K()),...S.snippetProps}));oe(ve,o,()=>i(He)),_(re,ie)},te=re=>{var ie=Rn(),x=H(ie);We(x,{get preventScroll(){return f()}});var ne=A(x,2);ye(ne,He=>({...He}),[()=>ge(i(P),K())]);var ve=C(ne);oe(ve,()=>r()??de),E(ne),_(re,ie)};z(U,re=>{o()?re(X):re(te,!1)})}_(D,G)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})},$$slots:{presence:!0}})),J({get id(){return t()},set id(c=ce()){t(c),v()},get children(){return r()},set children(c){r(c),v()},get child(){return o()},set child(c){o(c),v()},get ref(){return s()},set ref(c=null){s(c),v()},get forceMount(){return l()},set forceMount(c=!1){l(c),v()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(c=q){a(c),v()},get onOpenAutoFocus(){return u()},set onOpenAutoFocus(c=q){u(c),v()},get onEscapeKeydown(){return b()},set onEscapeKeydown(c=q){b(c),v()},get onInteractOutside(){return h()},set onInteractOutside(c=q){h(c),v()},get trapFocus(){return w()},set trapFocus(c=!0){w(c),v()},get preventScroll(){return f()},set preventScroll(c=!0){f(c),v()},get restoreScrollDelay(){return y()},set restoreScrollDelay(c=null){y(c),v()}})}$(Mt,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],!0);var Kn=L("<div></div>"),Hn=L('<span class="sr-only">Close</span> <!>',1),qn=L('<div><div class="dialog-header"><!> <!></div> <!></div>'),Un=L("<!> <!>",1);function Bt(n,e){Z(e,!0);let t=p(e,"open",7),r=p(e,"content",7),o=p(e,"title",7),s=p(e,"onClose",7);const l={duration:Number(F.theme.components.dialog.custom?.transitionDuration)||200,delay:Number(F.theme.components.dialog.custom?.transitionDelay)||0,y:Number(F.theme.components.dialog.custom?.transitionY)||10},a=h=>{h||s()()};var u=j(),b=H(u);return Se(b,()=>Lt,(h,w)=>{w(h,{get open(){return t()},onOpenChange:a,children:(f,y)=>{var g=Un(),S=H(g);Se(S,()=>je,(d,c)=>{c(d,{class:"dialog-overlay-wrapper",children:(m,N)=>{var R=j(),O=H(R);{const T=(K,M)=>{let W=()=>M?.().props,ee=()=>M?.().open;var Y=j(),D=H(Y);{var Q=G=>{var U=Kn();ye(U,()=>({...W(),class:"dialog-overlay"})),ue(3,U,()=>ht,()=>l),_(G,U)};z(D,G=>{ee()&&G(Q)})}_(K,Y)};Se(O,()=>It,(K,M)=>{M(K,{forceMount:!0,child:T,$$slots:{child:!0}})})}_(m,R)},$$slots:{default:!0}})});var P=A(S,2);{const d=(c,m)=>{let N=()=>m?.().props,R=()=>m?.().open;var O=j(),T=H(O);{var K=M=>{var W=qn();ye(W,()=>({...N(),class:"dialog-content"}));var ee=C(W),Y=C(ee);Se(Y,()=>St,(G,U)=>{U(G,{class:"dialog-title",children:(X,te)=>{var re=j(),ie=H(re);oe(ie,()=>o()??de),_(X,re)},$$slots:{default:!0}})});var D=A(Y,2);Se(D,()=>je,(G,U)=>{U(G,{class:"dialog-close",children:(X,te)=>{var re=Hn(),ie=A(H(re),2);Ke(ie,{name:"dismiss"}),_(X,re)},$$slots:{default:!0}})}),E(ee);var Q=A(ee,2);Se(Q,()=>At,(G,U)=>{U(G,{class:"dialog-description",children:(X,te)=>{var re=j(),ie=H(re);oe(ie,r),_(X,re)},$$slots:{default:!0}})}),E(W),ue(3,W,()=>Ie,()=>l),_(M,W)};z(T,M=>{R()&&M(K)})}_(c,O)};Se(P,()=>Mt,(c,m)=>{m(c,{forceMount:!0,child:d,$$slots:{child:!0}})})}_(f,g)},$$slots:{default:!0}})}),_(n,u),J({get open(){return t()},set open(h){t(h),v()},get content(){return r()},set content(h){r(h),v()},get title(){return o()},set title(h){o(h),v()},get onClose(){return s()},set onClose(h){s(h),v()}})}$(Bt,{open:{},content:{},title:{},onClose:{}},[],[],!0);var zn=L('<form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"/></div> <button type="submit" class="btn btn--primary"> </button></form>');function Rt(n,e){Z(e,!0);let t=B(()=>F.t),r=p(e,"logic",7),o=V(""),s=V(""),l=V(void 0),a=V(void 0),u=B(()=>i(l)!==void 0||i(a)!==void 0||i(o)!=="");const b=B(()=>!!r().data.feedbackOpenedId||r().data.feedbackOpenedConversation);return Bt(n,{get open(){return i(b)},get onClose(){return r().closeFeedback},title:f=>{var y=j(),g=H(y);Ae(g,()=>i(t).feedbackFormTitle),_(f,y)},content:f=>{var y=zn(),g=C(y);or(g,{get classificationConfig(){return r().data.chatConfig.classification},get impact(){return i(l)},set impact(M){k(l,M,!0)},get quality(){return i(a)},set quality(M){k(a,M,!0)}});var S=A(g,2),P=C(S),d=C(P,!0);E(P);var c=A(P,2);Qt(c),E(S);var m=A(S,2),N=C(m),R=C(N,!0);E(N);var O=A(N,2);sr(O),E(m);var T=A(m,2),K=C(T,!0);E(T),E(y),se(()=>{fe(d,i(t).feedbackFormMessage),he(c,"placeholder",i(t).feedbackFormMessagePlaceholder),fe(R,i(t).feedbackFormEmail),he(O,"placeholder",i(t).feedbackFormEmailPlaceholder),T.disabled=!i(u),fe(K,i(t).send)}),le("submit",y,async M=>{M.preventDefault(),r().data.chatConfig.classification?await r().submitFeedback({email:i(s),message:i(o),classification:{impact:i(l),quality:i(a)}}):await r().submitFeedback({email:i(s),message:i(o)}),k(l,void 0),k(a,void 0),k(o,""),r().closeFeedback()}),Je(c,()=>i(o),M=>k(o,M)),Je(O,()=>i(s),M=>k(s,M)),_(f,y)},$$slots:{title:!0,content:!0}}),J({get logic(){return r()},set logic(h){r(h),v()}})}$(Rt,{logic:{}},[],[],!0);let Me;function Vn(n,e,t,r,o){Me&&cancelAnimationFrame(Me);const s=n instanceof Window?window.scrollY:n[r],l=performance.now();function a(u){const b=u-l,h=Math.min(b/t,1),w=o(h),f=s+(e-s)*w;n instanceof Window?window.scrollTo({top:f,behavior:"instant"}):n[r]=f,h<1?Me=requestAnimationFrame(a):n.dispatchEvent(new CustomEvent("scrollcomplete"))}Me=requestAnimationFrame(a)}var Wn=()=>F.openConverstionFeedback(),jn=L('<button class="chat-page__give-feedback btn btn--primary"> </button>'),Yn=L('<div class="chat-page__footer-text"><!></div>'),Qn=L('<section class="chat-page"><!> <div class="chat-page__body"><div class="chat-page__messages"><!> <div class="chat-page__buttons"><!></div></div></div> <div><div class="chat-page__footer-content"><button><span class="sr-only"> </span> <!></button> <!> <!></div></div></section>');const Xn={hash:"svelte-19wcq0c",code:":host {--chat-footer-height: 0px;}"};function Kt(n,e){Z(e,!0),vt(n,Xn);let t=B(()=>F.t),r=p(e,"history",7),o=p(e,"onSubmit",7),s=V(!1),l=V(!1),a,u,b,h=V(0);const w=90,f=()=>{k(h,b.offsetHeight,!0),a.style.setProperty("--chat-footer-height",`${i(h)}px`)};ae(()=>{const x=new ResizeObserver(f);return x.observe(b),()=>x.disconnect()});const y=()=>{Vn(a,a.scrollHeight-a.clientHeight,1e3,"scrollTop",ir)},g=()=>{if(!a)return;const x=a.scrollHeight-a.scrollTop-a.clientHeight<w;k(l,!x)},S=()=>{g()},P=x=>{if(x.altKey&&x.code==="KeyR"){x.preventDefault();const ne=F.data.history.findLast(ve=>ve.type==="user")?.message;F.goto({name:"start-page",prefill:ne})}},d=x=>{u.offsetHeight>a.offsetHeight&&(u.style.minHeight=`calc(${u.offsetHeight}px + 40cqh)`,requestAnimationFrame(()=>{y()})),o()(x)};ae(()=>{k(s,!0)});var c=Qn();le("resize",Ue,S),le("keypress",Ue,P);var m=C(c);Rt(m,{get logic(){return F}});var N=A(m,2),R=C(N),O=C(R);xe(O,17,r,De,(x,ne)=>{ar(x,{get message(){return i(ne)},onmessageupdate:g,get logic(){return F}})});var T=A(O,2),K=C(T);{var M=x=>{var ne=jn();ne.__click=[Wn];var ve=C(ne,!0);E(ne),se(()=>fe(ve,i(t).giveFeedback)),_(x,ne)};z(K,x=>{F.data.chatConfig.showOverallFeedbackButton&&x(M)})}E(T),E(R),Ee(R,x=>u=x,()=>u),E(N),Ee(N,x=>a=x,()=>a);var W=A(N,2);let ee;var Y=C(W),D=C(Y);D.__click=y;let Q;var G=C(D),U=C(G,!0);E(G);var X=A(G,2);Ke(X,{name:"chevronDown"}),E(D);var te=A(D,2);pt(te,{onSubmit:d,class:"chat-page__chat-input"});var re=A(te,2);{var ie=x=>{var ne=Yn(),ve=C(ne);Ae(ve,()=>i(t).chatFooterText),E(ne),_(x,ne)};z(re,x=>{i(t).chatFooterText!==void 0&&x(ie)})}return E(Y),E(W),Ee(W,x=>b=x,()=>b),E(c),se((x,ne)=>{ee=ke(W,1,"chat-page__footer container",null,ee,x),Q=ke(D,1,"chat-page__scroll-to-bottom btn btn--secondary",null,Q,ne),fe(U,i(t).scrollToBottom)},[()=>({mounted:i(s)}),()=>({"chat-page__scroll-to-bottom--hidden":!i(l)})]),le("scroll",N,g),_(n,c),J({get history(){return r()},set history(x){r(x),v()},get onSubmit(){return o()},set onSubmit(x){o(x),v()}})}ut(["click"]);$(Kt,{history:{},onSubmit:{}},[],[],!0);var Gn=(n,e)=>(n.stopPropagation(),k(e,!i(e))),Zn=L('<div class="context-box__content text-container"><!></div>'),Jn=L('<div><button class="btn btn--secondary btn--header"><span class="sr-only"> </span> <!></button> <!></div>');function Ht(n,e){Z(e,!0);let t=B(()=>F.t),r=V(!1),o,s=V(void 0),l=p(e,"logic",7);const a={duration:Number(l().theme.components.referenceNumberContent.custom?.transitionDuration)||200,delay:Number(l().theme.components.referenceNumberContent.custom?.transitionDelay)||0,y:Number(l().theme.components.referenceNumberContent.custom?.transitionY)||10},u=async()=>{if(!o||!i(s))return;const{x:c,y:m}=await gt(o,i(s),{placement:"bottom-end",middleware:[mt(8),bt({padding:8})]});Object.assign(i(s).style,{left:`${c}px`,top:`${m}px`})};ae(()=>{i(r)&&u()});var b=Jn();let h;var w=C(b);w.__click=[Gn,r];var f=C(w),y=C(f,!0);E(f);var g=A(f,2);const S=B(()=>i(r)?"menuClose":"info");Ke(g,{get name(){return i(S)}}),E(w),Ee(w,c=>o=c,()=>o),ze(w,c=>lr?.(c)),ze(w,(c,m)=>cr?.(c,m),()=>({text:i(t).openInfo,position:"bottom-right",delay:0}));var P=A(w,2);{var d=c=>{var m=Zn(),N=C(m);Ae(N,()=>i(t).aboutThisChat),E(m),Ee(m,R=>k(s,R),()=>i(s)),ue(3,m,()=>Ie,()=>a),_(c,m)};z(P,c=>{i(r)&&c(d)})}return E(b),se(c=>{h=ke(b,1,"context-box context-box--info",null,h,c),he(w,"aria-label",i(r)?i(t).close:i(t).openInfo),fe(y,i(r)?i(t).close:i(t).openInfo)},[()=>({open:i(r)})]),le("clickoutside",w,()=>k(r,!1)),_(n,b),J({get logic(){return l()},set logic(c){l(c),v()}})}ut(["click"]);$(Ht,{logic:{}},[],[],!0);var $n=L('<div><!> <h1 class="introduction__title"><!></h1></div>');function qt(n,e){Z(e,!0);let t=B(()=>F.t),r=p(e,"class",7);var o=$n(),s=C(o);Ke(s,{name:"avatar",class:"introduction__avatar"});var l=A(s,2),a=C(l);return Ae(a,()=>i(t).introductionTitle),E(l),E(o),se(()=>ke(o,1,`introduction ${r()??""}`)),_(n,o),J({get class(){return r()},set class(u){r(u),v()}})}$(qt,{class:{}},[],[],!0);var eo=L("<div></div>");function Ut(n,e){Z(e,!0);let t=p(e,"class",7),r=we(e,["$$slots","$$events","$$legacy","$$host","class"]);var o=eo();return ye(o,s=>({class:`predefined-questions ${t()??""}`,...r,[ur]:s}),[()=>({"predefined-questions--pii-padding":F.data.questionHasPii})]),xe(o,21,()=>F.data.predefinedQuestions,De,(s,l)=>{dr(s,{get predefinedQuestion(){return i(l)},get onSubmit(){return F.onStartConversation}})}),E(o),_(n,o),J({get class(){return t()},set class(s){t(s),v()}})}$(Ut,{class:{}},[],[],!0);var to=L('<div class="introduction-disclaimer text-container fly-in" style="--fly-in-id: 3;"><!></div>'),ro=L("<section><!> <!> <!> <!></section>");function zt(n,e){Z(e,!0);let t=B(()=>F.t),r=V(!1);ae(()=>{k(r,!0)});var o=ro();let s;var l=C(o);qt(l,{class:"start-page__introduction fly-in"});var a=A(l,2);pt(a,{get onSubmit(){return F.onStartConversation},class:"start-page__chat-input fly-in",style:"--fly-in-id: 1;",isStartPage:!0});var u=A(a,2);{var b=f=>{Ut(f,{class:"start-page__predefined-questions fly-in",style:"--fly-in-id: 2;"})};z(u,f=>{F.data.predefinedQuestions&&F.data.predefinedQuestions.length&&f(b)})}var h=A(u,2);{var w=f=>{var y=to(),g=C(y);Ae(g,()=>i(t).introductionDisclaimer),E(y),_(f,y)};z(h,f=>{i(t).introductionDisclaimer&&f(w)})}E(o),se(f=>s=ke(o,1,"start-page container",null,s,f),[()=>({mounted:i(r)})]),_(n,o),J()}$(zt,{},[],[],!0);function at(n,{delay:e=0,duration:t=200,easing:r=l=>l,baseScale:o=0,transformOrigin:s="bottom right"}={}){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return{delay:0,duration:0,css:()=>`opacity: 1; transform: scale(1); transform-origin: ${s};`};const a=getComputedStyle(n),u=+a.opacity,b=a.transform.match(/scale\(([0-9.]+)\)/),h=b?+b[1]:1,w=1-o;return{delay:e,duration:t,css:f=>{const y=r(f),g=y*h*w+o;return`opacity: ${y*u}; transform: scale(${g}); transform-origin: ${s};`}}}var no=L('<div class="loader-container svelte-jdm8uf"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>');const oo={hash:"svelte-jdm8uf",code:".loader-container.svelte-jdm8uf {display:flex;z-index:var(--z-index-loader);position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}"};function Vt(n,e){Z(e,!0),vt(n,oo);let t=p(e,"color",7),r=p(e,"background",7);var o=no(),s=C(o);return E(o),se(()=>{Qe(o,r()?`background: ${r()};`:""),he(s,"fill",t()??"rgba(127, 127, 127, 0.3)")}),_(n,o),J({get color(){return t()},set color(l){t(l),v()},get background(){return r()},set background(l){r(l),v()}})}$(Vt,{color:{},background:{}},[],[],!0);var so=L('<div class="flyout__content"><!></div>'),io=L('<div><div class="flyout__body"><!></div></div>'),ao=L('<!> <div class="chat-app__main"><div class="chat-app__loader-container"><!></div></div>',1);function Wt(n,e){Z(e,!0);let t=p(e,"children",7),r=p(e,"loaderColor",7),o=p(e,"loaderBackground",7),s=p(e,"flyout",7),l=p(e,"flyoutClass",7),a=p(e,"flyoutStyle",7),u=p(e,"onCloseChat",7),b=p(e,"onError",7),h=we(e,["$$slots","$$events","$$legacy","$$host","children","loaderColor","loaderBackground","flyout","flyoutClass","flyoutStyle","onCloseChat","onError"]),w;const f=d=>{ae(()=>{const c=m=>{w=m};return d.addEventListener("click",c),()=>{d.removeEventListener("click",c),w=void 0}})};var y=j();le("click",Ue,d=>{d!==w&&s()&&u()()});var g=H(y);{var S=d=>{var c=j(),m=H(c);{var N=O=>{},R=O=>{var T=io(),K=C(T),M=C(K);{var W=Y=>{var D=so(),Q=C(D);oe(Q,t),E(D),ue(1,D,()=>at,()=>({delay:0,duration:500,easing:$e,baseScale:.3})),ue(2,D,()=>at,()=>({delay:0,duration:300,easing:$e,baseScale:.7})),_(Y,D)},ee=Y=>{Sr(Y,Ce({get onError(){return b()},onclick:D=>{D.stopPropagation(),F.openFlyout()},buttonClass:"flyout__open-button"},()=>h))};z(M,Y=>{F.data.flyoutIsOpen?Y(W):Y(ee,!1)})}E(K),ze(K,Y=>f?.(Y)),E(T),se(()=>{Qe(T,a()),ke(T,1,fr(["flyout",l()]))}),_(O,T)};z(m,O=>{F.initialized?O(R,!1):O(N)})}_(d,c)},P=d=>{var c=j(),m=H(c);{var N=O=>{var T=ao(),K=H(T);Pe(K,{id:"app-css",get css(){return yt}});var M=A(K,2),W=C(M),ee=C(W);hr(ee,e,"loader",{},Y=>{Vt(Y,{get background(){return o()},get color(){return r()}})}),E(W),E(M),ue(2,W,()=>_t,()=>({duration:200,delay:300})),_(O,T)},R=O=>{var T=j(),K=H(T);oe(K,t),_(O,T)};z(m,O=>{F.initialized?O(R,!1):O(N)})}_(d,c)};z(g,d=>{s()?d(S):d(P,!1)})}return _(n,y),J({get children(){return t()},set children(d){t(d),v()},get loaderColor(){return r()},set loaderColor(d){r(d),v()},get loaderBackground(){return o()},set loaderBackground(d){o(d),v()},get flyout(){return s()},set flyout(d){s(d),v()},get flyoutClass(){return l()},set flyoutClass(d){l(d),v()},get flyoutStyle(){return a()},set flyoutStyle(d){a(d),v()},get onCloseChat(){return u()},set onCloseChat(d){u(d),v()},get onError(){return b()},set onError(d){b(d),v()}})}$(Wt,{children:{},loaderColor:{},loaderBackground:{},flyout:{},flyoutClass:{},flyoutStyle:{},onCloseChat:{},onError:{}},["loader"],[],!0);var lo=L('<strong class="reference-number__content-title"> </strong>'),co=L('<div class="line-clamp line-clamp--12"> </div>'),uo=L('<div class="reference-number__domain transition-colors"><span class="truncate"> </span></div>'),fo=L('<div class="reference-number__content-wrapper" role="tooltip"><a class="reference-number__content transition-colors no-link-styling" target="_blank" rel="noopener noreferrer"><!> <!> <!></a></div>'),ho=L('<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>');function vo(n,e){Z(e,!0);let t=B(()=>F.t),r=p(e,"usedNumber",7),o=p(e,"source",7),s=V(!1),l,a,u=V(void 0);const b=o();let h=B(()=>b.display.card.title),w=B(()=>b.display.card.description),f=B(()=>b.display.card.badge);const y={duration:Number(F.theme.components.referenceNumberContent.custom?.transitionDuration)||200,delay:Number(F.theme.components.referenceNumberContent.custom?.transitionDelay)||0,y:Number(F.theme.components.referenceNumberContent.custom?.transitionY)||10},g=async()=>{if(!a||!i(u))return;const{x:T,y:K}=await gt(a,i(u),{placement:"top",middleware:[mt(8),vr(),bt({padding:8})]});Object.assign(i(u).style,{left:`${T}px`,top:`${K}px`})},S=()=>{l&&(clearTimeout(l),l=void 0)},P=()=>{S(),l=setTimeout(()=>{k(s,!1)},100)},d=()=>{S(),k(s,!0)};ae(()=>{i(s)&&g()});var c=ho(),m=C(c),N=C(m,!0);E(m),Ee(m,T=>a=T,()=>a);var R=A(m,2);{var O=T=>{var K=fo(),M=C(K),W=C(M);{var ee=U=>{var X=lo(),te=C(X,!0);E(X),se(()=>fe(te,i(h))),_(U,X)};z(W,U=>{i(h)&&U(ee)})}var Y=A(W,2);{var D=U=>{var X=co(),te=C(X,!0);E(X),se(()=>fe(te,i(w))),_(U,X)};z(Y,U=>{i(w)&&U(D)})}var Q=A(Y,2);{var G=U=>{var X=uo(),te=C(X),re=C(te,!0);E(te),E(X),se(()=>fe(re,i(f))),_(U,X)};z(Q,U=>{b.url&&U(G)})}E(M),E(K),Ee(K,U=>k(u,U),()=>i(u)),se(()=>he(M,"href",b.url)),le("mouseenter",K,d),le("mouseleave",K,P),ue(3,K,()=>Ie,()=>y),_(T,K)};z(R,T=>{i(s)&&T(O)})}return E(c),se(()=>{he(m,"href",b.url),he(m,"aria-label",`${i(t).referenceLink??""}: ${i(h)??""}`),fe(N,r())}),le("mouseenter",m,d),le("mouseleave",m,P),le("focus",m,()=>k(s,!0)),le("blur",m,()=>k(s,!1)),_(n,c),J({get usedNumber(){return r()},set usedNumber(T){r(T),v()},get source(){return o()},set source(T){o(T),v()}})}customElements.define("liipgpt-reference-number",$(vo,{source:{attribute:"data-source",type:"Object"},refNumber:{attribute:"data-all-index",type:"String"},usedNumber:{attribute:"data-used-index",type:"String"}},[],[],!1));var po=L('<link rel="stylesheet"/>'),go=L('<link rel="stylesheet"/>'),mo=L("<!> <!> <!>",1),bo=L('<link rel="stylesheet"/>'),yo=L("<!> <!> <!> <!>",1),_o=L("<div><!></div>"),wo=L('<div class="chat-app__page-transition"><!></div>'),So=L('<div class="chat-app__container"><div class="chat-app__main"><div class="chat-app__header"><div class="chat-app__header-container"><!> <!> <!> <!></div></div> <div class="chat-app__body"><!></div> <!></div> <div class="chat-app__aside">References</div></div>'),Eo=L('<main class="chat-app"><!> <!></main>');function Co(n,e){Z(e,!0);let t=p(e,"host",7),r=p(e,"onError",7),o=we(e,["$$slots","$$events","$$legacy","$$host","host","onError"]);ae(()=>{const f={forceTheme:e.forceTheme,apiUrl:e.apiUrl,apiKey:e.apiKey,speechRecognitionApiKey:e.speechRecognitionApiKey,lang:e.lang,features:e.features,loaderBackground:e.loaderBackground,loaderColor:e.loaderColor,flyout:e.flyout,flyoutStyle:e.flyoutStyle,flyoutClass:e.flyoutClass};lt(()=>F.init(f).catch(y=>r()(y)))});let s=B(()=>F.data.route.name);const l=()=>{F.closeFlyout(),t().dispatchEvent(new CustomEvent("closechat"))};ae(()=>{F.initialized&&F.data?.chatConfig&&t().dispatchEvent(new CustomEvent("configloaded",{detail:F.data.chatConfig}))});var a=Eo();Xt(f=>{var y=j(),g=H(y);{var S=P=>{var d=mo(),c=H(d);xe(c,17,()=>F.themeBase.fontURLs??[],De,(R,O)=>{var T=po();se(()=>he(T,"href",i(O))),_(R,T)});var m=A(c,2);xe(m,17,()=>F.data.additionalStylesheets,De,(R,O)=>{var T=go();se(()=>he(T,"href",i(O))),_(R,T)});var N=A(m,2);Pe(N,{id:"font-css",get css(){return F.themeBase.fontCSS}}),_(P,d)};z(g,P=>{F.initialized&&P(S)})}_(f,y)});let u;var b=C(a);{var h=f=>{var y=yo(),g=H(y);const S=B(()=>wr(F.theme));Pe(g,{id:"theme-css",get css(){return i(S)}});var P=A(g,2);Pe(P,{id:"app-css",get css(){return yt}});var d=A(P,2);Pe(d,{id:"custom-css",get css(){return F.themeBase.customCSS}});var c=A(d,2);xe(c,17,()=>F.data.additionalStylesheets,De,(m,N)=>{var R=bo();se(()=>he(R,"href",i(N))),_(m,R)}),_(f,y)};z(b,f=>{F.initialized&&f(h)})}var w=A(b,2);return Wt(w,Ce({onCloseChat:l,get onError(){return r()}},()=>o,{children:(f,y)=>{var g=So(),S=C(g),P=C(S),d=C(P),c=C(d);{var m=D=>{var Q=_o(),G=C(Q);mr(G,{}),E(Q),ue(1,Q,()=>Ie,()=>({duration:300,y:30})),ue(2,Q,()=>Ie,()=>({y:15,duration:150,easing:br})),_(D,Q)};z(c,D=>{i(s)!=="start-page"&&D(m)})}var N=A(c,2);{var R=D=>{yr(D,{get chatLogic(){return F}})};z(N,D=>{F.data.chatConfig.showContextMenu&&D(R)})}var O=A(N,2);{var T=D=>{Ht(D,{get logic(){return F}})};z(O,D=>{F.data.chatConfig.showContextInfo&&D(T)})}var K=A(O,2);{var M=D=>{_r(D,{onclick:l})};z(K,D=>{(F.data.chatConfig.showCloseChatButton||F.data.props.flyout)&&D(M)})}E(d),E(P);var W=A(P,2),ee=C(W);pr(ee,()=>i(s),D=>{var Q=wo(),G=C(Q);{var U=te=>{zt(te,{})},X=(te,re)=>{{var ie=x=>{Kt(x,{get history(){return F.data.history},get onSubmit(){return F.onSubmit}})};z(te,x=>{i(s)==="chat-page"&&x(ie)},re)}};z(G,te=>{i(s)==="start-page"?te(U):te(X,!1)})}E(Q),ue(1,Q,()=>ht,()=>({duration:300,delay:250})),ue(2,Q,()=>_t,()=>({duration:150})),_(D,Q)}),E(W);var Y=A(W,2);gr(Y,{position:"top-center"}),E(S),Gt(2),E(g),_(f,g)},$$slots:{default:!0}})),E(a),se(f=>u=Qe(a,"",u,f),[()=>({"color-scheme":F.colorScheme})]),_(n,a),J({get host(){return t()},set host(f){t(f),v()},get onError(){return r()},set onError(f){r(f),v()}})}$(Co,{host:{},onError:{}},[],[],!0);export{Co as C};