@botfabrik/engine-webclient 4.110.5 → 4.111.0

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.
@@ -13,7 +13,7 @@
13
13
  <meta name="theme-color" content="#000000" />
14
14
  <meta name="google" content="notranslate" />
15
15
  <title>Bubble Chat Client</title>
16
- <script type="module" crossorigin src="./assets/index-DgDI_BZV.js"></script>
16
+ <script type="module" crossorigin src="./assets/index-C8v2FYqX.js"></script>
17
17
  <link rel="stylesheet" crossorigin href="./assets/index-Cl8fPqJ_.css">
18
18
  </head>
19
19
 
@@ -1,5 +1,5 @@
1
- (function(){"use strict";const Ye=!1;var Tn=Array.isArray,Sn=Array.prototype.indexOf,ce=Array.prototype.includes,On=Array.from,Cn=Object.defineProperty,de=Object.getOwnPropertyDescriptor,An=Object.getOwnPropertyDescriptors,Rn=Object.prototype,Nn=Array.prototype,bt=Object.getPrototypeOf,yt=Object.isExtensible;const Dn=()=>{};function In(e){for(var t=0;t<e.length;t++)e[t]()}function Et(){var e,t,n=new Promise((i,r)=>{e=i,t=r});return{promise:n,resolve:e,reject:t}}const k=2,he=4,ve=8,Ve=1<<24,J=16,B=32,re=64,Ke=128,I=512,x=1024,T=2048,z=4096,L=8192,V=16384,_e=32768,pe=65536,kt=1<<17,xt=1<<18,ie=1<<19,Ln=1<<20,se=65536,Xe=1<<21,Ze=1<<22,Q=1<<23,Ne=Symbol("$state"),Mn=Symbol("legacy props"),Pn=Symbol(""),oe=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Fn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Un(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function jn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Wn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Hn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Bn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Vn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Kn=1,Xn=4,Zn=8,Jn=16,Qn=1,$n=2,S=Symbol(),Tt="http://www.w3.org/1999/xhtml";function er(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function St(e){return e===this.v}function tr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function nr(e){return!tr(e,this.v)}let rr=!1,A=null;function ge(e){A=e}function De(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,l:null}}function Ie(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var i of n)Gt(i)}return t.i=!0,A=t.p,{}}function Ot(){return!0}let we=[];function ir(){var e=we;we=[],In(e)}function me(e){if(we.length===0){var t=we;queueMicrotask(()=>{t===we&&ir()})}we.push(e)}function Ct(e){var t=w;if(t===null)return _.f|=Q,e;if((t.f&_e)===0&&(t.f&he)===0)throw e;$(e,t)}function $(e,t){for(;t!==null;){if((t.f&Ke)!==0){if((t.f&_e)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const sr=-7169;function b(e,t){e.f=e.f&sr|t}function Je(e){(e.f&I)!==0||e.deps===null?b(e,x):b(e,z)}function At(e){if(e!==null)for(const t of e)(t.f&k)===0||(t.f&se)===0||(t.f^=se,At(t.deps))}function Rt(e,t,n){(e.f&T)!==0?t.add(e):(e.f&z)!==0&&n.add(e),At(e.deps),b(e,x)}const Le=new Set;let y=null,j=null,M=[],Qe=null,be=null,or=1;class ee{id=or++;current=new Map;previous=new Map;#e=new Set;#a=new Set;#t=0;#o=0;#n=null;#s=new Set;#r=new Set;#i=new Map;is_fork=!1;#l=!1;#u(){return this.is_fork||this.#o>0}skip_effect(t){this.#i.has(t)||this.#i.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#i.get(t);if(n){this.#i.delete(t);for(var i of n.d)b(i,T),G(i);for(i of n.m)b(i,z),G(i)}}process(t){M=[],this.apply();var n=be=[],i=[];for(const r of t)this.#f(r,n,i);if(be=null,this.#u()){this.#c(i),this.#c(n);for(const[r,s]of this.#i)Lt(r,s)}else{y=null;for(const r of this.#e)r(this);this.#e.clear(),this.#t===0&&this.#d(),Nt(i),Nt(n),this.#s.clear(),this.#r.clear(),this.#n?.resolve()}j=null}#f(t,n,i){t.f^=x;for(var r=t.first;r!==null;){var s=r.f,o=(s&(B|re))!==0,l=o&&(s&x)!==0,a=(s&L)!==0,f=l||this.#i.has(r);if(!f&&r.fn!==null){o?a||(r.f^=x):(s&he)!==0?n.push(r):(s&(ve|Ve))!==0&&a?i.push(r):Oe(r)&&(Ee(r),(s&J)!==0&&(this.#r.add(r),a&&b(r,T)));var c=r.first;if(c!==null){r=c;continue}}for(;r!==null;){var u=r.next;if(u!==null){r=u;break}r=r.parent}}}#c(t){for(var n=0;n<t.length;n+=1)Rt(t[n],this.#s,this.#r)}capture(t,n){n!==S&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,t.v),j?.set(t,t.v))}activate(){y=this,this.apply()}deactivate(){y===this&&(y=null,j=null)}flush(){if(M.length>0)y=this,ar();else if(this.#t===0&&!this.is_fork){for(const t of this.#e)t(this);this.#e.clear(),this.#d(),this.#n?.resolve()}this.deactivate()}discard(){for(const t of this.#a)t(this);this.#a.clear()}#d(){if(Le.size>1){this.previous.clear();var t=y,n=j,i=!0;for(const s of Le){if(s===this){i=!1;continue}const o=[];for(const[a,f]of this.current){if(s.current.has(a))if(i&&f!==s.current.get(a))s.current.set(a,f);else continue;o.push(a)}if(o.length===0)continue;const l=[...s.current.keys()].filter(a=>!this.current.has(a));if(l.length>0){var r=M;M=[];const a=new Set,f=new Map;for(const c of o)Dt(c,l,a,f);if(M.length>0){y=s,s.apply();for(const c of M)s.#f(c,[],[]);s.deactivate()}M=r}}y=t,j=n}this.#i.clear(),Le.delete(this)}increment(t){this.#t+=1,t&&(this.#o+=1)}decrement(t){this.#t-=1,t&&(this.#o-=1),!this.#l&&(this.#l=!0,me(()=>{this.#l=!1,this.#u()?M.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#s)this.#r.delete(t),b(t,T),G(t);for(const t of this.#r)b(t,z),G(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#a.add(t)}settled(){return(this.#n??=Et()).promise}static ensure(){if(y===null){const t=y=new ee;Le.add(y),me(()=>{y===t&&t.flush()})}return y}apply(){}}function ar(){var e=null;try{for(var t=0;M.length>0;){var n=ee.ensure();if(t++>1e3){var i,r;lr()}n.process(M),te.clear()}}finally{M=[],Qe=null,be=null}}function lr(){try{Hn()}catch(e){$(e,Qe)}}let K=null;function Nt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var i=e[n++];if((i.f&(V|L))===0&&Oe(i)&&(K=new Set,Ee(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&Vt(i),K?.size>0)){te.clear();for(const r of K){if((r.f&(V|L))!==0)continue;const s=[r];let o=r.parent;for(;o!==null;)K.has(o)&&(K.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(V|L))===0&&Ee(a)}}K.clear()}}K=null}}function Dt(e,t,n,i){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const r of e.reactions){const s=r.f;(s&k)!==0?Dt(r,t,n,i):(s&(Ze|J))!==0&&(s&T)===0&&It(r,t,i)&&(b(r,T),G(r))}}function It(e,t,n){const i=n.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const r of e.deps){if(ce.call(t,r))return!0;if((r.f&k)!==0&&It(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function G(e){var t=Qe=e,n=t.b;if(n?.is_pending&&(e.f&(he|ve|Ve))!==0&&(e.f&_e)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var i=t.f;if(be!==null&&t===w&&(e.f&ve)===0)return;if((i&(re|B))!==0){if((i&x)===0)return;t.f^=x}}M.push(t)}function Lt(e,t){if(!((e.f&B)!==0&&(e.f&x)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&z)!==0&&t.m.push(e),b(e,x);for(var n=e.first;n!==null;)Lt(n,t),n=n.next}}function fr(e){let t=0,n=Me(0),i;return()=>{it()&&(O(n),Ir(()=>(t===0&&(i=at(()=>e(()=>Te(n)))),t+=1,()=>{me(()=>{t-=1,t===0&&(i?.(),i=void 0,Te(n))})})))}}var ur=pe|ie;function cr(e,t,n,i){new dr(e,t,n,i)}class dr{parent;is_pending=!1;transform_error;#e;#a=null;#t;#o;#n;#s=null;#r=null;#i=null;#l=null;#u=0;#f=0;#c=!1;#d=new Set;#v=new Set;#h=null;#m=fr(()=>(this.#h=Me(this.#u),()=>{this.#h=null}));constructor(t,n,i,r){this.#e=t,this.#t=n,this.#o=s=>{var o=w;o.b=this,o.f|=Ke,i(s)},this.parent=w.b,this.transform_error=r??this.parent?.transform_error??(s=>s),this.#n=st(()=>{this.#g()},ur)}#b(){try{this.#s=Z(()=>this.#o(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#i=Z(()=>{n(this.#e,()=>t,()=>()=>{})}))}#E(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#r=Z(()=>t(this.#e)),me(()=>{var n=this.#l=document.createDocumentFragment(),i=ye();n.append(i),this.#s=this.#p(()=>(ee.ensure(),Z(()=>this.#o(i)))),this.#f===0&&(this.#e.before(n),this.#l=null,Se(this.#r,()=>{this.#r=null}),this.#_())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#u=0,this.#s=Z(()=>{this.#o(this.#e)}),this.#f>0){var t=this.#l=document.createDocumentFragment();Zt(this.#s,t);const n=this.#t.pending;this.#r=Z(()=>n(this.#e))}else this.#_()}catch(n){this.error(n)}}#_(){this.is_pending=!1;for(const t of this.#d)b(t,T),G(t);for(const t of this.#v)b(t,z),G(t);this.#d.clear(),this.#v.clear()}defer_effect(t){Rt(t,this.#d,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(t){var n=w,i=_,r=A;Y(this.#n),P(this.#n),ge(this.#n.ctx);try{return t()}catch(s){return Ct(s),null}finally{Y(n),P(i),ge(r)}}#w(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(t);return}this.#f+=t,this.#f===0&&(this.#_(),this.#r&&Se(this.#r,()=>{this.#r=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(t){this.#w(t),this.#u+=t,!(!this.#h||this.#c)&&(this.#c=!0,me(()=>{this.#c=!1,this.#h&&Pe(this.#h,this.#u)}))}get_effect_pending(){return this.#m(),O(this.#h)}error(t){var n=this.#t.onerror;let i=this.#t.failed;if(!n&&!i)throw t;this.#s&&(R(this.#s),this.#s=null),this.#r&&(R(this.#r),this.#r=null),this.#i&&(R(this.#i),this.#i=null);var r=!1,s=!1;const o=()=>{if(r){er();return}r=!0,s&&Vn(),this.#i!==null&&Se(this.#i,()=>{this.#i=null}),this.#p(()=>{ee.ensure(),this.#g()})},l=a=>{try{s=!0,n?.(a,o),s=!1}catch(f){$(f,this.#n&&this.#n.parent)}i&&(this.#i=this.#p(()=>{ee.ensure();try{return Z(()=>{var f=w;f.b=this,f.f|=Ke,i(this.#e,()=>a,()=>o)})}catch(f){return $(f,this.#n.parent),null}}))};me(()=>{var a;try{a=this.transform_error(t)}catch(f){$(f,this.#n&&this.#n.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,f=>$(f,this.#n&&this.#n.parent)):l(a)})}}function hr(e,t,n,i){const r=et;var s=e.filter(u=>!u.settled);if(n.length===0&&s.length===0){i(t.map(r));return}var o=w,l=vr(),a=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(u=>u.promise)):null;function f(u){l();try{i(u)}catch(d){(o.f&V)===0&&$(d,o)}$e()}if(n.length===0){a.then(()=>f(t.map(r)));return}function c(){l(),Promise.all(n.map(u=>pr(u))).then(u=>f([...t.map(r),...u])).catch(u=>$(u,o))}a?a.then(c):c()}function vr(){var e=w,t=_,n=A,i=y;return function(s=!0){Y(e),P(t),ge(n),s&&i?.activate()}}function $e(e=!0){Y(null),P(null),ge(null),e&&y?.deactivate()}function _r(){var e=w.b,t=y,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function et(e){var t=k|T,n=_!==null&&(_.f&k)!==0?_:null;return w!==null&&(w.f|=ie),{ctx:A,deps:null,effects:null,equals:St,f:t,fn:e,reactions:null,rv:0,v:S,wv:0,parent:n??w,ac:null}}function pr(e,t,n){w===null&&Un();var r=void 0,s=Me(S),o=!_,l=new Map;return Dr(()=>{var a=Et();r=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally($e)}catch(d){a.reject(d),$e()}var f=y;if(o){var c=_r();l.get(f)?.reject(oe),l.delete(f),l.set(f,a)}const u=(d,v=void 0)=>{if(f.activate(),v)v!==oe&&(s.f|=Q,Pe(s,v));else{(s.f&Q)!==0&&(s.f^=Q),Pe(s,d);for(const[h,p]of l){if(l.delete(h),h===f)break;p.reject(oe)}}c&&c()};a.promise.then(u,d=>u(null,d||"unknown"))}),Cr(()=>{for(const a of l.values())a.reject(oe)}),new Promise(a=>{function f(c){function u(){c===r?a(s):f(r)}c.then(u,u)}f(r)})}function gr(e){const t=et(e);return t.equals=nr,t}function wr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function mr(e){for(var t=e.parent;t!==null;){if((t.f&k)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function tt(e){var t,n=w;Y(mr(e));try{e.f&=~se,wr(e),t=nn(e)}finally{Y(n)}return t}function Mt(e){var t=tt(e);if(!e.equals(t)&&(e.wv=en(),(!y?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){b(e,x);return}ne||(j!==null?(it()||y?.is_fork)&&j.set(e,t):Je(e))}function br(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(oe),t.teardown=Dn,t.ac=null,Ce(t,0),ot(t))}function Pt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ee(t)}let nt=new Set;const te=new Map;let Ft=!1;function Me(e,t){var n={f:0,v:e,reactions:null,equals:St,rv:0,wv:0};return n}function W(e,t){const n=Me(e);return Fr(n),n}function H(e,t,n=!1){_!==null&&(!q||(_.f&kt)!==0)&&Ot()&&(_.f&(k|J|Ze|kt))!==0&&(F===null||!ce.call(F,e))&&Yn();let i=n?ae(t):t;return Pe(e,i)}function Pe(e,t){if(!e.equals(t)){var n=e.v;ne?te.set(e,t):te.set(e,n),e.v=t;var i=ee.ensure();if(i.capture(e,n),(e.f&k)!==0){const r=e;(e.f&T)!==0&&tt(r),Je(r)}e.wv=en(),Ut(e,T),w!==null&&(w.f&x)!==0&&(w.f&(B|re))===0&&(U===null?Ur([e]):U.push(e)),!i.is_fork&&nt.size>0&&!Ft&&yr()}return t}function yr(){Ft=!1;for(const e of nt)(e.f&x)!==0&&b(e,z),Oe(e)&&Ee(e);nt.clear()}function Te(e){H(e,e.v+1)}function Ut(e,t){var n=e.reactions;if(n!==null)for(var i=n.length,r=0;r<i;r++){var s=n[r],o=s.f,l=(o&T)===0;if(l&&b(s,t),(o&k)!==0){var a=s;j?.delete(a),(o&se)===0&&(o&I&&(s.f|=se),Ut(a,z))}else l&&((o&J)!==0&&K!==null&&K.add(s),G(s))}}function ae(e){if(typeof e!="object"||e===null||Ne in e)return e;const t=bt(e);if(t!==Rn&&t!==Nn)return e;var n=new Map,i=Tn(e),r=W(0),s=fe,o=l=>{if(fe===s)return l();var a=_,f=fe;P(null),$t(s);var c=l();return P(a),$t(f),c};return i&&n.set("length",W(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Bn();var c=n.get(a);return c===void 0?o(()=>{var u=W(f.value);return n.set(a,u),u}):H(c,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const c=o(()=>W(S));n.set(a,c),Te(r)}}else H(f,S),Te(r);return!0},get(l,a,f){if(a===Ne)return e;var c=n.get(a),u=a in l;if(c===void 0&&(!u||de(l,a)?.writable)&&(c=o(()=>{var v=ae(u?l[a]:S),h=W(v);return h}),n.set(a,c)),c!==void 0){var d=O(c);return d===S?void 0:d}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var c=n.get(a);c&&(f.value=O(c))}else if(f===void 0){var u=n.get(a),d=u?.v;if(u!==void 0&&d!==S)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(l,a){if(a===Ne)return!0;var f=n.get(a),c=f!==void 0&&f.v!==S||Reflect.has(l,a);if(f!==void 0||w!==null&&(!c||de(l,a)?.writable)){f===void 0&&(f=o(()=>{var d=c?ae(l[a]):S,v=W(d);return v}),n.set(a,f));var u=O(f);if(u===S)return!1}return c},set(l,a,f,c){var u=n.get(a),d=a in l;if(i&&a==="length")for(var v=f;v<u.v;v+=1){var h=n.get(v+"");h!==void 0?H(h,S):v in l&&(h=o(()=>W(S)),n.set(v+"",h))}if(u===void 0)(!d||de(l,a)?.writable)&&(u=o(()=>W(void 0)),H(u,ae(f)),n.set(a,u));else{d=u.v!==S;var p=o(()=>ae(f));H(u,p)}var m=Reflect.getOwnPropertyDescriptor(l,a);if(m?.set&&m.set.call(c,f),!d){if(i&&typeof a=="string"){var D=n.get("length"),g=Number(a);Number.isInteger(g)&&g>=D.v&&H(D,g+1)}Te(r)}return!0},ownKeys(l){O(r);var a=Reflect.ownKeys(l).filter(u=>{var d=n.get(u);return d===void 0||d.v!==S});for(var[f,c]of n)c.v!==S&&!(f in l)&&a.push(f);return a},setPrototypeOf(){Gn()}})}var zt,jt,Wt,Ht;function Er(){if(zt===void 0){zt=window,jt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Wt=de(t,"firstChild").get,Ht=de(t,"nextSibling").get,yt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),yt(n)&&(n.__t=void 0)}}function ye(e=""){return document.createTextNode(e)}function Fe(e){return Wt.call(e)}function Ue(e){return Ht.call(e)}function rt(e,t){return Fe(e)}function kr(e,t=!1){{var n=Fe(e);return n instanceof Comment&&n.data===""?Ue(n):n}}function xr(e,t=1,n=!1){let i=e;for(;t--;)i=Ue(i);return i}function Tr(){return!1}function qt(e,t,n){return document.createElementNS(Tt,e,void 0)}function Bt(e){var t=_,n=w;P(null),Y(null);try{return e()}finally{P(t),Y(n)}}function Sr(e){w===null&&(_===null&&Wn(),jn()),ne&&zn()}function Or(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function X(e,t){var n=w;n!==null&&(n.f&L)!==0&&(e|=L);var i={ctx:A,deps:null,nodes:null,f:e|T|I,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},r=i;if((e&he)!==0)be!==null?be.push(i):G(i);else if(t!==null){try{Ee(i)}catch(o){throw R(i),o}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&ie)===0&&(r=r.first,(e&J)!==0&&(e&pe)!==0&&r!==null&&(r.f|=pe))}if(r!==null&&(r.parent=n,n!==null&&Or(r,n),_!==null&&(_.f&k)!==0&&(e&re)===0)){var s=_;(s.effects??=[]).push(r)}return i}function it(){return _!==null&&!q}function Cr(e){const t=X(ve,null);return b(t,x),t.teardown=e,t}function Ar(e){Sr();var t=w.f,n=!_&&(t&B)!==0&&(t&_e)===0;if(n){var i=A;(i.e??=[]).push(e)}else return Gt(e)}function Gt(e){return X(he|Ln,e)}function Rr(e){ee.ensure();const t=X(re|ie,e);return(n={})=>new Promise(i=>{n.outro?Se(t,()=>{R(t),i(void 0)}):(R(t),i(void 0))})}function Nr(e){return X(he,e)}function Dr(e){return X(Ze|ie,e)}function Ir(e,t=0){return X(ve|t,e)}function ze(e,t=[],n=[],i=[]){hr(i,t,n,r=>{X(ve,()=>e(...r.map(O)))})}function st(e,t=0){var n=X(J|t,e);return n}function Z(e){return X(B|ie,e)}function Yt(e){var t=e.teardown;if(t!==null){const n=ne,i=_;Jt(!0),P(null);try{t.call(null)}finally{Jt(n),P(i)}}}function ot(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const r=n.ac;r!==null&&Bt(()=>{r.abort(oe)});var i=n.next;(n.f&re)!==0?n.parent=null:R(n,t),n=i}}function Lr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&B)===0&&R(t),t=n}}function R(e,t=!0){var n=!1;(t||(e.f&xt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Mr(e.nodes.start,e.nodes.end),n=!0),ot(e,t&&!n),Ce(e,0),b(e,V);var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)s.stop();Yt(e);var r=e.parent;r!==null&&r.first!==null&&Vt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Mr(e,t){for(;e!==null;){var n=e===t?null:Ue(e);e.remove(),e=n}}function Vt(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function Se(e,t,n=!0){var i=[];Kt(e,i,!0);var r=()=>{n&&R(e),t&&t()},s=i.length;if(s>0){var o=()=>--s||r();for(var l of i)l.out(o)}else r()}function Kt(e,t,n){if((e.f&L)===0){e.f^=L;var i=e.nodes&&e.nodes.t;if(i!==null)for(const l of i)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var s=r.next,o=(r.f&pe)!==0||(r.f&B)!==0&&(e.f&J)!==0;Kt(r,t,o?n:!1),r=s}}}function Pr(e){Xt(e,!0)}function Xt(e,t){if((e.f&L)!==0){e.f^=L;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&pe)!==0||(n.f&B)!==0;Xt(n,r?t:!1),n=i}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Zt(e,t){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end;n!==null;){var r=n===i?null:Ue(n);t.append(n),n=r}}let je=!1,ne=!1;function Jt(e){ne=e}let _=null,q=!1;function P(e){_=e}let w=null;function Y(e){w=e}let F=null;function Fr(e){_!==null&&(F===null?F=[e]:F.push(e))}let C=null,N=0,U=null;function Ur(e){U=e}let Qt=1,le=0,fe=le;function $t(e){fe=e}function en(){return++Qt}function Oe(e){var t=e.f;if((t&T)!==0)return!0;if(t&k&&(e.f&=~se),(t&z)!==0){for(var n=e.deps,i=n.length,r=0;r<i;r++){var s=n[r];if(Oe(s)&&Mt(s),s.wv>e.wv)return!0}(t&I)!==0&&j===null&&b(e,x)}return!1}function tn(e,t,n=!0){var i=e.reactions;if(i!==null&&!(F!==null&&ce.call(F,e)))for(var r=0;r<i.length;r++){var s=i[r];(s.f&k)!==0?tn(s,t,!1):t===s&&(n?b(s,T):(s.f&x)!==0&&b(s,z),G(s))}}function nn(e){var t=C,n=N,i=U,r=_,s=F,o=A,l=q,a=fe,f=e.f;C=null,N=0,U=null,_=(f&(B|re))===0?e:null,F=null,ge(e.ctx),q=!1,fe=++le,e.ac!==null&&(Bt(()=>{e.ac.abort(oe)}),e.ac=null);try{e.f|=Xe;var c=e.fn,u=c();e.f|=_e;var d=e.deps,v=y?.is_fork;if(C!==null){var h;if(v||Ce(e,N),d!==null&&N>0)for(d.length=N+C.length,h=0;h<C.length;h++)d[N+h]=C[h];else e.deps=d=C;if(it()&&(e.f&I)!==0)for(h=N;h<d.length;h++)(d[h].reactions??=[]).push(e)}else!v&&d!==null&&N<d.length&&(Ce(e,N),d.length=N);if(Ot()&&U!==null&&!q&&d!==null&&(e.f&(k|z|T))===0)for(h=0;h<U.length;h++)tn(U[h],e);if(r!==null&&r!==e){if(le++,r.deps!==null)for(let p=0;p<n;p+=1)r.deps[p].rv=le;if(t!==null)for(const p of t)p.rv=le;U!==null&&(i===null?i=U:i.push(...U))}return(e.f&Q)!==0&&(e.f^=Q),u}catch(p){return Ct(p)}finally{e.f^=Xe,C=t,N=n,U=i,_=r,F=s,ge(o),q=l,fe=a}}function zr(e,t){let n=t.reactions;if(n!==null){var i=Sn.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}if(n===null&&(t.f&k)!==0&&(C===null||!ce.call(C,t))){var s=t;(s.f&I)!==0&&(s.f^=I,s.f&=~se),Je(s),br(s),Ce(s,0)}}function Ce(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)zr(e,n[i])}function Ee(e){var t=e.f;if((t&V)===0){b(e,x);var n=w,i=je;w=e,je=!0;try{(t&(J|Ve))!==0?Lr(e):ot(e),Yt(e);var r=nn(e);e.teardown=typeof r=="function"?r:null,e.wv=Qt;var s;Ye&&rr&&(e.f&T)!==0&&e.deps}finally{je=i,w=n}}}function O(e){var t=e.f,n=(t&k)!==0;if(_!==null&&!q){var i=w!==null&&(w.f&V)!==0;if(!i&&(F===null||!ce.call(F,e))){var r=_.deps;if((_.f&Xe)!==0)e.rv<le&&(e.rv=le,C===null&&r!==null&&r[N]===e?N++:C===null?C=[e]:C.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:ce.call(s,_)||s.push(_)}}}if(ne&&te.has(e))return te.get(e);if(n){var o=e;if(ne){var l=o.v;return((o.f&x)===0&&o.reactions!==null||sn(o))&&(l=tt(o)),te.set(o,l),l}var a=(o.f&I)===0&&!q&&_!==null&&(je||(_.f&I)!==0),f=(o.f&_e)===0;Oe(o)&&(a&&(o.f|=I),Mt(o)),a&&!f&&(Pt(o),rn(o))}if(j?.has(e))return j.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function rn(e){if(e.f|=I,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&k)!==0&&(t.f&I)===0&&(Pt(t),rn(t))}function sn(e){if(e.v===S)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(te.has(t)||(t.f&k)!==0&&sn(t))return!0;return!1}function at(e){var t=q;try{return q=!0,e()}finally{q=t}}const jr=["touchstart","touchmove"];function Wr(e){return jr.includes(e)}const Ae=Symbol("events"),on=new Set,lt=new Set;function an(e,t,n){(t[Ae]??={})[e]=n}function Hr(e){for(var t=0;t<e.length;t++)on.add(e[t]);for(var n of lt)n(e)}let ln=null;function fn(e){var t=this,n=t.ownerDocument,i=e.type,r=e.composedPath?.()||[],s=r[0]||e.target;ln=e;var o=0,l=ln===e&&e[Ae];if(l){var a=r.indexOf(l);if(a!==-1&&(t===document||t===window)){e[Ae]=t;return}var f=r.indexOf(t);if(f===-1)return;a<=f&&(o=a)}if(s=r[o]||e.target,s!==t){Cn(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=_,u=w;P(null),Y(null);try{for(var d,v=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var p=s[Ae]?.[i];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(m){d?v.push(m):d=m}if(e.cancelBubble||h===t||h===null)break;s=h}if(d){for(let m of v)queueMicrotask(()=>{throw m});throw d}}finally{e[Ae]=t,delete e.currentTarget,P(c),Y(u)}}}const qr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Br(e){return qr?.createHTML(e)??e}function Gr(e){var t=qt("template");return t.innerHTML=Br(e.replaceAll("<!>","<!---->")),t.content}function ft(e,t){var n=w;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Re(e,t){var n=(t&Qn)!==0,i=(t&$n)!==0,r,s=!e.startsWith("<!>");return()=>{r===void 0&&(r=Gr(s?e:"<!>"+e),n||(r=Fe(r)));var o=i||jt?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=Fe(o),a=o.lastChild;ft(l,a)}else ft(o,o);return o}}function Yr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ye();return e.append(t,n),ft(t,n),e}function ke(e,t){e!==null&&e.before(t)}function Vr(e,t){return Kr(e,t)}const We=new Map;function Kr(e,{target:t,anchor:n,props:i={},events:r,context:s,intro:o=!0,transformError:l}){Er();var a=void 0,f=Rr(()=>{var c=n??t.appendChild(ye());cr(c,{pending:()=>{}},v=>{De({});var h=A;s&&(h.c=s),r&&(i.$$events=r),a=e(v,i)||{},Ie()},l);var u=new Set,d=v=>{for(var h=0;h<v.length;h++){var p=v[h];if(!u.has(p)){u.add(p);var m=Wr(p);for(const E of[t,document]){var D=We.get(E);D===void 0&&(D=new Map,We.set(E,D));var g=D.get(p);g===void 0?(E.addEventListener(p,fn,{passive:m}),D.set(p,1)):D.set(p,g+1)}}}};return d(On(on)),lt.add(d),()=>{for(var v of u)for(const m of[t,document]){var h=We.get(m),p=h.get(v);--p==0?(m.removeEventListener(v,fn),h.delete(v),h.size===0&&We.delete(m)):h.set(v,p)}lt.delete(d),c!==n&&c.parentNode?.removeChild(c)}});return Xr.set(a,f),a}let Xr=new WeakMap;class Zr{anchor;#e=new Map;#a=new Map;#t=new Map;#o=new Set;#n=!0;constructor(t,n=!0){this.anchor=t,this.#n=n}#s=t=>{if(this.#e.has(t)){var n=this.#e.get(t),i=this.#a.get(n);if(i)Pr(i),this.#o.delete(n);else{var r=this.#t.get(n);r&&(r.effect.f&L)===0&&(this.#a.set(n,r.effect),this.#t.delete(n),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),i=r.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#t.get(o);l&&(R(l.effect),this.#t.delete(o))}for(const[s,o]of this.#a){if(s===n||this.#o.has(s)||(o.f&L)!==0)continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();Zt(o,f),f.append(ye()),this.#t.set(s,{effect:o,fragment:f})}else R(o);this.#o.delete(s),this.#a.delete(s)};this.#n||!i?(this.#o.add(s),Se(o,l,!1)):l()}}};#r=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[i,r]of this.#t)n.includes(i)||(R(r.effect),this.#t.delete(i))};ensure(t,n){var i=y,r=Tr();if(n&&!this.#a.has(t)&&!this.#t.has(t))if(r){var s=document.createDocumentFragment(),o=ye();s.append(o),this.#t.set(t,{effect:Z(()=>n(o)),fragment:s})}else this.#a.set(t,Z(()=>n(this.anchor)));if(this.#e.set(i,t),r){for(const[l,a]of this.#a)l===t?i.unskip_effect(a):i.skip_effect(a);for(const[l,a]of this.#t)l===t?i.unskip_effect(a.effect):i.skip_effect(a.effect);i.oncommit(this.#s),i.ondiscard(this.#r)}else this.#s(i)}}function Jr(e,t,n=!1){var i=new Zr(e),r=n?pe:0;function s(o,l){i.ensure(o,l)}st(()=>{var o=!1;t((l,a=0)=>{o=!0,s(a,l)}),o||s(-1,null)},r)}function Qr(e,t){var n;n=document.head.appendChild(ye()),st(()=>t(n),xt|ie)}function ut(e,t){Nr(()=>{var n=e.getRootNode(),i=n.host?n:n.head??n.ownerDocument.head;if(!i.querySelector("#"+t.hash)){const r=qt("style");r.id=t.hash,r.textContent=t.code,i.appendChild(r)}})}const un=[...`
2
- \r\f \v\uFEFF`];function $r(e,t,n){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),n){for(var r of Object.keys(n))if(n[r])i=i?i+" "+r:r;else if(i.length)for(var s=r.length,o=0;(o=i.indexOf(r,o))>=0;){var l=o+s;(o===0||un.includes(i[o-1]))&&(l===i.length||un.includes(i[l]))?i=(o===0?"":i.substring(0,o))+i.substring(l+1):o=l}}return i===""?null:i}function cn(e,t,n,i,r,s){var o=e.__className;if(o!==n||o===void 0){var l=$r(n,i,s);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(s&&r!==s)for(var a in s){var f=!!s[a];(r==null||f!==!!r[a])&&e.classList.toggle(a,f)}return s}const ei=Symbol("is custom element"),ti=Symbol("is html");function xe(e,t,n,i){var r=ni(e);r[t]!==(r[t]=n)&&(t==="loading"&&(e[Pn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ri(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ni(e){return e.__attributes??={[ei]:e.nodeName.includes("-"),[ti]:e.namespaceURI===Tt}}var dn=new Map;function ri(e){var t=e.getAttribute("is")||e.nodeName,n=dn.get(t);if(n)return n;dn.set(t,n=[]);for(var i,r=e,s=Element.prototype;s!==r;){i=An(r);for(var o in i)i[o].set&&n.push(o);r=bt(r)}return n}let He=!1;function ii(e){var t=He;try{return He=!1,[e(),He]}finally{He=t}}function ct(e,t,n,i){var r=(n&Zn)!==0,s=(n&Jn)!==0,o=i,l=!0,a=()=>(l&&(l=!1,o=s?at(i):i),o),f;if(r){var c=Ne in e||Mn in e;f=de(e,t)?.set??(c&&t in e?g=>e[t]=g:void 0)}var u,d=!1;r?[u,d]=ii(()=>e[t]):u=e[t],u===void 0&&i!==void 0&&(u=a(),f&&(qn(),f(u)));var v;if(v=()=>{var g=e[t];return g===void 0?a():(l=!0,g)},(n&Xn)===0)return v;if(f){var h=e.$$legacy;return(function(g,E){return arguments.length>0?((!E||h||d)&&f(E?v():g),g):v()})}var p=!1,m=((n&Kn)!==0?et:gr)(()=>(p=!1,v()));r&&O(m);var D=w;return(function(g,E){if(arguments.length>0){const ue=E?O(m):r?ae(g):g;return H(m,ue),p=!0,o!==void 0&&(o=ue),g}return ne&&p||(D.f&V)!==0?m.v:O(m)})}function hn(e){A===null&&Fn(),Ar(()=>{const t=at(e);if(typeof t=="function")return t})}const si="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(si);var oi=Re('<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>'),ai=Re(`<p class="svelte-yhk8rr">Please make sure that the script tag has 'id="chatbot"' and the attribute
1
+ (function(){"use strict";const Cn=!1;var An=Array.isArray,Rn=Array.prototype.indexOf,ue=Array.prototype.includes,Nn=Array.from,Dn=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,In=Object.getOwnPropertyDescriptors,Ln=Object.prototype,Mn=Array.prototype,mt=Object.getPrototypeOf,bt=Object.isExtensible;const Pn=()=>{};function Fn(e){for(var t=0;t<e.length;t++)e[t]()}function yt(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const E=2,de=4,Ae=8,Et=1<<24,Z=16,G=32,ne=64,Ye=128,I=512,k=1024,T=2048,F=4096,q=8192,U=16384,re=32768,kt=1<<25,he=65536,xt=1<<17,Tt=1<<18,ie=1<<19,Un=1<<20,se=65536,Ve=1<<21,Ke=1<<22,J=1<<23,Re=Symbol("$state"),zn=Symbol("legacy props"),jn=Symbol(""),Y=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Wn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Hn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Gn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function qn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Bn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Yn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Vn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Jn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Qn=1,$n=4,er=8,tr=16,nr=1,rr=2,S=Symbol(),St="http://www.w3.org/1999/xhtml";function ir(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ot(e){return e===this.v}function sr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function or(e){return!sr(e,this.v)}let ar=!1,R=null;function ve(e){R=e}function Ne(e,t=!1,n){R={p:R,i:!1,c:null,e:null,s:e,x:null,r:p,l:null}}function De(e){var t=R,n=t.e;if(n!==null){t.e=null;for(var r of n)Kt(r)}return t.i=!0,R=t.p,{}}function Ct(){return!0}let _e=[];function lr(){var e=_e;_e=[],Fn(e)}function pe(e){if(_e.length===0){var t=_e;queueMicrotask(()=>{t===_e&&lr()})}_e.push(e)}function At(e){var t=p;if(t===null)return _.f|=J,e;if((t.f&re)===0&&(t.f&de)===0)throw e;Q(e,t)}function Q(e,t){for(;t!==null;){if((t.f&Ye)!==0){if((t.f&re)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const fr=-7169;function y(e,t){e.f=e.f&fr|t}function Xe(e){(e.f&I)!==0||e.deps===null?y(e,k):y(e,F)}function Rt(e){if(e!==null)for(const t of e)(t.f&E)===0||(t.f&se)===0||(t.f^=se,Rt(t.deps))}function Nt(e,t,n){(e.f&T)!==0?t.add(e):(e.f&F)!==0&&n.add(e),Rt(e.deps),y(e,k)}let Ie=!1;function ur(e){var t=Ie;try{return Ie=!1,[e(),Ie]}finally{Ie=t}}const Ee=new Set;let b=null,z=null,Ze=null,Je=!1,ge=null,Le=null;var Dt=0;let cr=1;class ${id=cr++;current=new Map;previous=new Map;#e=new Set;#l=new Set;#t=0;#a=0;#r=null;#n=[];#i=new Set;#s=new Set;#o=new Map;is_fork=!1;#f=!1;#u(){return this.is_fork||this.#a>0}skip_effect(t){this.#o.has(t)||this.#o.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#o.get(t);if(n){this.#o.delete(t);for(var r of n.d)y(r,T),this.schedule(r);for(r of n.m)y(r,F),this.schedule(r)}}#d(){Dt++>1e3&&dr();const t=this.#n;this.#n=[],this.apply();var n=ge=[],r=[],i=Le=[];for(const a of t)this.#h(a,n,r);if(b=null,i.length>0){var s=$.ensure();for(const a of i)s.schedule(a)}if(ge=null,Le=null,this.#u()){this.#v(r),this.#v(n);for(const[a,l]of this.#o)Pt(a,l)}else{this.#i.clear(),this.#s.clear();for(const a of this.#e)a(this);this.#e.clear(),It(r),It(n),this.#t===0&&this.#c(),this.#r?.resolve()}var o=b;if(this.#n.length>0){const a=o??=this;a.#n.push(...this.#n.filter(l=>!a.#n.includes(l)))}o!==null&&(Ee.add(o),o.#d())}#h(t,n,r){t.f^=k;for(var i=t.first;i!==null;){var s=i.f,o=(s&(G|ne))!==0,a=o&&(s&k)!==0,l=a||(s&q)!==0||this.#o.has(i);if(!l&&i.fn!==null){o?i.f^=k:(s&de)!==0?n.push(i):Te(i)&&((s&Z)!==0&&this.#s.add(i),me(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}}#v(t){for(var n=0;n<t.length;n+=1)Nt(t[n],this.#i,this.#s)}capture(t,n){n!==S&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&J)===0&&(this.current.set(t,t.v),z?.set(t,t.v))}activate(){b=this}deactivate(){b=null,z=null}flush(){try{if(Je=!0,b=this,!this.#u()){for(const t of this.#i)this.#s.delete(t),y(t,T),this.schedule(t);for(const t of this.#s)y(t,F),this.schedule(t)}this.#d()}finally{Dt=0,Ze=null,ge=null,Le=null,Je=!1,b=null,z=null,ee.clear()}}discard(){for(const t of this.#l)t(this);this.#l.clear()}#c(){if(Ee.size>1){this.previous.clear();var t=b,n=z,r=!0;for(const i of Ee){if(i===this){r=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(r&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){i.activate();const a=new Set,l=new Map;for(const f of s)Lt(f,o,a,l);if(i.#n.length>0){i.apply();for(const f of i.#n)i.#h(f,[],[])}i.deactivate()}}b=t,z=n}this.#o.clear(),Ee.delete(this)}increment(t){this.#t+=1,t&&(this.#a+=1)}decrement(t,n){this.#t-=1,t&&(this.#a-=1),!(this.#f||n)&&(this.#f=!0,pe(()=>{this.#f=!1,this.flush()}))}oncommit(t){this.#e.add(t)}ondiscard(t){this.#l.add(t)}settled(){return(this.#r??=yt()).promise}static ensure(){if(b===null){const t=b=new $;Je||(Ee.add(b),pe(()=>{b===t&&t.flush()}))}return b}apply(){}schedule(t){if(Ze=t,t.b?.is_pending&&(t.f&(de|Ae|Et))!==0&&(t.f&re)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(ge!==null&&n===p&&(_===null||(_.f&E)===0))return;if((r&(ne|G))!==0){if((r&k)===0)return;n.f^=k}}this.#n.push(n)}}function dr(){try{Yn()}catch(e){Q(e,Ze)}}let V=null;function It(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(U|q))===0&&Te(r)&&(V=new Set,me(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Zt(r),V?.size>0)){ee.clear();for(const i of V){if((i.f&(U|q))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)V.has(o)&&(V.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(U|q))===0&&me(l)}}V.clear()}}V=null}}function Lt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&E)!==0?Lt(i,t,n,r):(s&(Ke|Z))!==0&&(s&T)===0&&Mt(i,t,r)&&(y(i,T),Qe(i))}}function Mt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(ue.call(t,i))return!0;if((i.f&E)!==0&&Mt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Qe(e){b.schedule(e)}function Pt(e,t){if(!((e.f&G)!==0&&(e.f&k)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),y(e,k);for(var n=e.first;n!==null;)Pt(n,t),n=n.next}}function hr(e){let t=0,n=Pe(0),r;return()=>{rt()&&(O(n),Pr(()=>(t===0&&(r=ot(()=>e(()=>ke(n)))),t+=1,()=>{pe(()=>{t-=1,t===0&&(r?.(),r=void 0,ke(n))})})))}}var vr=he|ie;function _r(e,t,n,r){new pr(e,t,n,r)}class pr{parent;is_pending=!1;transform_error;#e;#l=null;#t;#a;#r;#n=null;#i=null;#s=null;#o=null;#f=0;#u=0;#d=!1;#h=new Set;#v=new Set;#c=null;#m=hr(()=>(this.#c=Pe(this.#f),()=>{this.#c=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#a=s=>{var o=p;o.b=this,o.f|=Ye,r(s)},this.parent=p.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#r=it(()=>{this.#g()},vr)}#b(){try{this.#n=X(()=>this.#a(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#s=X(()=>{n(this.#e,()=>t,()=>()=>{})}))}#E(){const t=this.#t.pending;if(t){this.is_pending=!0,this.#i=X(()=>t(this.#e));var n=b;pe(()=>{var r=this.#o=document.createDocumentFragment(),i=we();r.append(i),this.#n=this.#p(()=>X(()=>this.#a(i))),this.#u===0&&(this.#e.before(r),this.#o=null,xe(this.#i,()=>{this.#i=null}),this.#_(n))})}}#g(){var t=b;try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#f=0,this.#n=X(()=>{this.#a(this.#e)}),this.#u>0){var n=this.#o=document.createDocumentFragment();$t(this.#n,n);const r=this.#t.pending;this.#i=X(()=>r(this.#e))}else this.#_(t)}catch(r){this.error(r)}}#_(t){this.is_pending=!1;for(const n of this.#h)y(n,T),t.schedule(n);for(const n of this.#v)y(n,F),t.schedule(n);this.#h.clear(),this.#v.clear()}defer_effect(t){Nt(t,this.#h,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(t){var n=p,r=_,i=R;B(this.#r),L(this.#r),ve(this.#r.ctx);try{return $.ensure(),t()}catch(s){return At(s),null}finally{B(n),L(r),ve(i)}}#w(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(t,n);return}this.#u+=t,this.#u===0&&(this.#_(n),this.#i&&xe(this.#i,()=>{this.#i=null}),this.#o&&(this.#e.before(this.#o),this.#o=null))}update_pending_count(t,n){this.#w(t,n),this.#f+=t,!(!this.#c||this.#d)&&(this.#d=!0,pe(()=>{this.#d=!1,this.#c&&Fe(this.#c,this.#f)}))}get_effect_pending(){return this.#m(),O(this.#c)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#n&&(N(this.#n),this.#n=null),this.#i&&(N(this.#i),this.#i=null),this.#s&&(N(this.#s),this.#s=null);var i=!1,s=!1;const o=()=>{if(i){ir();return}i=!0,s&&Jn(),this.#s!==null&&xe(this.#s,()=>{this.#s=null}),this.#p(()=>{this.#g()})},a=l=>{try{s=!0,n?.(l,o),s=!1}catch(f){Q(f,this.#r&&this.#r.parent)}r&&(this.#s=this.#p(()=>{try{return X(()=>{var f=p;f.b=this,f.f|=Ye,r(this.#e,()=>l,()=>o)})}catch(f){return Q(f,this.#r.parent),null}}))};pe(()=>{var l;try{l=this.transform_error(t)}catch(f){Q(f,this.#r&&this.#r.parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,f=>Q(f,this.#r&&this.#r.parent)):a(l)})}}function gr(e,t,n,r){const i=$e;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=p,a=wr(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function f(c){a();try{r(c)}catch(v){(o.f&U)===0&&Q(v,o)}Me()}if(n.length===0){l.then(()=>f(t.map(i)));return}var u=Ft();function d(){Promise.all(n.map(c=>mr(c))).then(c=>f([...t.map(i),...c])).catch(c=>Q(c,o)).finally(()=>u())}l?l.then(()=>{a(),d(),Me()}):d()}function wr(){var e=p,t=_,n=R,r=b;return function(s=!0){B(e),L(t),ve(n),s&&(e.f&U)===0&&(r?.activate(),r?.apply())}}function Me(e=!0){B(null),L(null),ve(null),e&&b?.deactivate()}function Ft(){var e=p.b,t=b,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}function $e(e){var t=E|T,n=_!==null&&(_.f&E)!==0?_:null;return p!==null&&(p.f|=ie),{ctx:R,deps:null,effects:null,equals:Ot,f:t,fn:e,reactions:null,rv:0,v:S,wv:0,parent:n??p,ac:null}}function mr(e,t,n){let r=p;r===null&&Hn();var i=void 0,s=Pe(S),o=!_,a=new Map;return Mr(()=>{var l=p,f=yt();i=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(Me)}catch(v){f.reject(v),Me()}var u=b;if(o){if((l.f&re)!==0)var d=Ft();if(r.b.is_rendered())a.get(u)?.reject(Y),a.delete(u);else{for(const v of a.values())v.reject(Y);a.clear()}a.set(u,f)}const c=(v,h=void 0)=>{if(d){var g=h===Y;d(g)}if(!(h===Y||(l.f&U)!==0)){if(u.activate(),h)s.f|=J,Fe(s,h);else{(s.f&J)!==0&&(s.f^=J),Fe(s,v);for(const[m,C]of a){if(a.delete(m),m===u)break;C.reject(Y)}}u.deactivate()}};f.promise.then(c,v=>c(null,v||"unknown"))}),Nr(()=>{for(const l of a.values())l.reject(Y)}),new Promise(l=>{function f(u){function d(){u===i?l(s):f(i)}u.then(d,d)}f(i)})}function br(e){const t=$e(e);return t.equals=or,t}function yr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)N(t[n])}}function Er(e){for(var t=e.parent;t!==null;){if((t.f&E)===0)return(t.f&U)===0?t:null;t=t.parent}return null}function et(e){var t,n=p;B(Er(e));try{e.f&=~se,yr(e),t=on(e)}finally{B(n)}return t}function Ut(e){var t=et(e);if(!e.equals(t)&&(e.wv=rn(),(!b?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){y(e,k);return}te||(z!==null?(rt()||b?.is_fork)&&z.set(e,t):Xe(e))}function kr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Y),t.teardown=Pn,t.ac=null,Se(t,0),st(t))}function zt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&me(t)}let tt=new Set;const ee=new Map;let jt=!1;function Pe(e,t){var n={f:0,v:e,reactions:null,equals:Ot,rv:0,wv:0};return n}function j(e,t){const n=Pe(e);return jr(n),n}function W(e,t,n=!1){_!==null&&(!H||(_.f&xt)!==0)&&Ct()&&(_.f&(E|Z|Ke|xt))!==0&&(M===null||!ue.call(M,e))&&Zn();let r=n?oe(t):t;return Fe(e,r,Le)}function Fe(e,t,n=null){if(!e.equals(t)){var r=e.v;te?ee.set(e,t):ee.set(e,r),e.v=t;var i=$.ensure();if(i.capture(e,r),(e.f&E)!==0){const s=e;(e.f&T)!==0&&et(s),Xe(s)}e.wv=rn(),Wt(e,T,n),p!==null&&(p.f&k)!==0&&(p.f&(G|ne))===0&&(P===null?Wr([e]):P.push(e)),!i.is_fork&&tt.size>0&&!jt&&xr()}return t}function xr(){jt=!1;for(const e of tt)(e.f&k)!==0&&y(e,F),Te(e)&&me(e);tt.clear()}function ke(e){W(e,e.v+1)}function Wt(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var o=r[s],a=o.f,l=(a&T)===0;if(l&&y(o,t),(a&E)!==0){var f=o;z?.delete(f),(a&se)===0&&(a&I&&(o.f|=se),Wt(f,F,n))}else if(l){var u=o;(a&Z)!==0&&V!==null&&V.add(u),n!==null?n.push(u):Qe(u)}}}function oe(e){if(typeof e!="object"||e===null||Re in e)return e;const t=mt(e);if(t!==Ln&&t!==Mn)return e;var n=new Map,r=An(e),i=j(0),s=le,o=a=>{if(le===s)return a();var l=_,f=le;L(null),nn(s);var u=a();return L(l),nn(f),u};return r&&n.set("length",j(e.length)),new Proxy(e,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Kn();var u=n.get(l);return u===void 0?o(()=>{var d=j(f.value);return n.set(l,d),d}):W(u,f.value,!0),!0},deleteProperty(a,l){var f=n.get(l);if(f===void 0){if(l in a){const u=o(()=>j(S));n.set(l,u),ke(i)}}else W(f,S),ke(i);return!0},get(a,l,f){if(l===Re)return e;var u=n.get(l),d=l in a;if(u===void 0&&(!d||ce(a,l)?.writable)&&(u=o(()=>{var v=oe(d?a[l]:S),h=j(v);return h}),n.set(l,u)),u!==void 0){var c=O(u);return c===S?void 0:c}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var u=n.get(l);u&&(f.value=O(u))}else if(f===void 0){var d=n.get(l),c=d?.v;if(d!==void 0&&c!==S)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return f},has(a,l){if(l===Re)return!0;var f=n.get(l),u=f!==void 0&&f.v!==S||Reflect.has(a,l);if(f!==void 0||p!==null&&(!u||ce(a,l)?.writable)){f===void 0&&(f=o(()=>{var c=u?oe(a[l]):S,v=j(c);return v}),n.set(l,f));var d=O(f);if(d===S)return!1}return u},set(a,l,f,u){var d=n.get(l),c=l in a;if(r&&l==="length")for(var v=f;v<d.v;v+=1){var h=n.get(v+"");h!==void 0?W(h,S):v in a&&(h=o(()=>j(S)),n.set(v+"",h))}if(d===void 0)(!c||ce(a,l)?.writable)&&(d=o(()=>j(void 0)),W(d,oe(f)),n.set(l,d));else{c=d.v!==S;var g=o(()=>oe(f));W(d,g)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m?.set&&m.set.call(u,f),!c){if(r&&typeof l=="string"){var C=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=C.v&&W(C,w+1)}ke(i)}return!0},ownKeys(a){O(i);var l=Reflect.ownKeys(a).filter(d=>{var c=n.get(d);return c===void 0||c.v!==S});for(var[f,u]of n)u.v!==S&&!(f in a)&&l.push(f);return l},setPrototypeOf(){Xn()}})}var Ht,Gt,qt,Bt;function Tr(){if(Ht===void 0){Ht=window,Gt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;qt=ce(t,"firstChild").get,Bt=ce(t,"nextSibling").get,bt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),bt(n)&&(n.__t=void 0)}}function we(e=""){return document.createTextNode(e)}function Ue(e){return qt.call(e)}function ze(e){return Bt.call(e)}function nt(e,t){return Ue(e)}function Sr(e,t=!1){{var n=Ue(e);return n instanceof Comment&&n.data===""?ze(n):n}}function Or(e,t=1,n=!1){let r=e;for(;t--;)r=ze(r);return r}function Cr(){return!1}function Yt(e,t,n){return document.createElementNS(St,e,void 0)}function Vt(e){var t=_,n=p;L(null),B(null);try{return e()}finally{L(t),B(n)}}function Ar(e){p===null&&(_===null&&Bn(),qn()),te&&Gn()}function Rr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function K(e,t){var n=p;n!==null&&(n.f&q)!==0&&(e|=q);var r={ctx:R,deps:null,nodes:null,f:e|T|I,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&de)!==0)ge!==null?ge.push(r):$.ensure().schedule(r);else if(t!==null){try{me(r)}catch(o){throw N(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ie)===0&&(i=i.first,(e&Z)!==0&&(e&he)!==0&&i!==null&&(i.f|=he))}if(i!==null&&(i.parent=n,n!==null&&Rr(i,n),_!==null&&(_.f&E)!==0&&(e&ne)===0)){var s=_;(s.effects??=[]).push(i)}return r}function rt(){return _!==null&&!H}function Nr(e){const t=K(Ae,null);return y(t,k),t.teardown=e,t}function Dr(e){Ar();var t=p.f,n=!_&&(t&G)!==0&&(t&re)===0;if(n){var r=R;(r.e??=[]).push(e)}else return Kt(e)}function Kt(e){return K(de|Un,e)}function Ir(e){$.ensure();const t=K(ne|ie,e);return(n={})=>new Promise(r=>{n.outro?xe(t,()=>{N(t),r(void 0)}):(N(t),r(void 0))})}function Lr(e){return K(de,e)}function Mr(e){return K(Ke|ie,e)}function Pr(e,t=0){return K(Ae|t,e)}function je(e,t=[],n=[],r=[]){gr(r,t,n,i=>{K(Ae,()=>e(...i.map(O)))})}function it(e,t=0){var n=K(Z|t,e);return n}function X(e){return K(G|ie,e)}function Xt(e){var t=e.teardown;if(t!==null){const n=te,r=_;en(!0),L(null);try{t.call(null)}finally{en(n),L(r)}}}function st(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Vt(()=>{i.abort(Y)});var r=n.next;(n.f&ne)!==0?n.parent=null:N(n,t),n=r}}function Fr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&G)===0&&N(t),t=n}}function N(e,t=!0){var n=!1;(t||(e.f&Tt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ur(e.nodes.start,e.nodes.end),n=!0),y(e,kt),st(e,t&&!n),Se(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Xt(e),e.f^=kt,e.f|=U;var i=e.parent;i!==null&&i.first!==null&&Zt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ur(e,t){for(;e!==null;){var n=e===t?null:ze(e);e.remove(),e=n}}function Zt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function xe(e,t,n=!0){var r=[];Jt(e,r,!0);var i=()=>{n&&N(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function Jt(e,t,n){if((e.f&q)===0){e.f^=q;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&he)!==0||(i.f&G)!==0&&(e.f&Z)!==0;Jt(i,t,o?n:!1),i=s}}}function zr(e){Qt(e,!0)}function Qt(e,t){if((e.f&q)!==0){e.f^=q,(e.f&k)===0&&(y(e,T),$.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&he)!==0||(n.f&G)!==0;Qt(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function $t(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ze(n);t.append(n),n=i}}let We=!1,te=!1;function en(e){te=e}let _=null,H=!1;function L(e){_=e}let p=null;function B(e){p=e}let M=null;function jr(e){_!==null&&(M===null?M=[e]:M.push(e))}let A=null,D=0,P=null;function Wr(e){P=e}let tn=1,ae=0,le=ae;function nn(e){le=e}function rn(){return++tn}function Te(e){var t=e.f;if((t&T)!==0)return!0;if(t&E&&(e.f&=~se),(t&F)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Te(s)&&Ut(s),s.wv>e.wv)return!0}(t&I)!==0&&z===null&&y(e,k)}return!1}function sn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(M!==null&&ue.call(M,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&E)!==0?sn(s,t,!1):t===s&&(n?y(s,T):(s.f&k)!==0&&y(s,F),Qe(s))}}function on(e){var t=A,n=D,r=P,i=_,s=M,o=R,a=H,l=le,f=e.f;A=null,D=0,P=null,_=(f&(G|ne))===0?e:null,M=null,ve(e.ctx),H=!1,le=++ae,e.ac!==null&&(Vt(()=>{e.ac.abort(Y)}),e.ac=null);try{e.f|=Ve;var u=e.fn,d=u();e.f|=re;var c=e.deps,v=b?.is_fork;if(A!==null){var h;if(v||Se(e,D),c!==null&&D>0)for(c.length=D+A.length,h=0;h<A.length;h++)c[D+h]=A[h];else e.deps=c=A;if(rt()&&(e.f&I)!==0)for(h=D;h<c.length;h++)(c[h].reactions??=[]).push(e)}else!v&&c!==null&&D<c.length&&(Se(e,D),c.length=D);if(Ct()&&P!==null&&!H&&c!==null&&(e.f&(E|F|T))===0)for(h=0;h<P.length;h++)sn(P[h],e);if(i!==null&&i!==e){if(ae++,i.deps!==null)for(let g=0;g<n;g+=1)i.deps[g].rv=ae;if(t!==null)for(const g of t)g.rv=ae;P!==null&&(r===null?r=P:r.push(...P))}return(e.f&J)!==0&&(e.f^=J),d}catch(g){return At(g)}finally{e.f^=Ve,A=t,D=n,P=r,_=i,M=s,ve(o),H=a,le=l}}function Hr(e,t){let n=t.reactions;if(n!==null){var r=Rn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&E)!==0&&(A===null||!ue.call(A,t))){var s=t;(s.f&I)!==0&&(s.f^=I,s.f&=~se),Xe(s),kr(s),Se(s,0)}}function Se(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hr(e,n[r])}function me(e){var t=e.f;if((t&U)===0){y(e,k);var n=p,r=We;p=e,We=!0;try{(t&(Z|Et))!==0?Fr(e):st(e),Xt(e);var i=on(e);e.teardown=typeof i=="function"?i:null,e.wv=tn;var s;Cn&&ar&&(e.f&T)!==0&&e.deps}finally{We=r,p=n}}}function O(e){var t=e.f,n=(t&E)!==0;if(_!==null&&!H){var r=p!==null&&(p.f&U)!==0;if(!r&&(M===null||!ue.call(M,e))){var i=_.deps;if((_.f&Ve)!==0)e.rv<ae&&(e.rv=ae,A===null&&i!==null&&i[D]===e?D++:A===null?A=[e]:A.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:ue.call(s,_)||s.push(_)}}}if(te&&ee.has(e))return ee.get(e);if(n){var o=e;if(te){var a=o.v;return((o.f&k)===0&&o.reactions!==null||ln(o))&&(a=et(o)),ee.set(o,a),a}var l=(o.f&I)===0&&!H&&_!==null&&(We||(_.f&I)!==0),f=(o.f&re)===0;Te(o)&&(l&&(o.f|=I),Ut(o)),l&&!f&&(zt(o),an(o))}if(z?.has(e))return z.get(e);if((e.f&J)!==0)throw e.v;return e.v}function an(e){if(e.f|=I,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&E)!==0&&(t.f&I)===0&&(zt(t),an(t))}function ln(e){if(e.v===S)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ee.has(t)||(t.f&E)!==0&&ln(t))return!0;return!1}function ot(e){var t=H;try{return H=!0,e()}finally{H=t}}const Gr=["touchstart","touchmove"];function qr(e){return Gr.includes(e)}const Oe=Symbol("events"),fn=new Set,at=new Set;function un(e,t,n){(t[Oe]??={})[e]=n}function Br(e){for(var t=0;t<e.length;t++)fn.add(e[t]);for(var n of at)n(e)}let cn=null;function dn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;cn=e;var o=0,a=cn===e&&e[Oe];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[Oe]=t;return}var f=i.indexOf(t);if(f===-1)return;l<=f&&(o=l)}if(s=i[o]||e.target,s!==t){Dn(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=_,d=p;L(null),B(null);try{for(var c,v=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var g=s[Oe]?.[r];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){c?v.push(m):c=m}if(e.cancelBubble||h===t||h===null)break;s=h}if(c){for(let m of v)queueMicrotask(()=>{throw m});throw c}}finally{e[Oe]=t,delete e.currentTarget,L(u),B(d)}}}const Yr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Vr(e){return Yr?.createHTML(e)??e}function Kr(e){var t=Yt("template");return t.innerHTML=Vr(e.replaceAll("<!>","<!---->")),t.content}function lt(e,t){var n=p;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Ce(e,t){var n=(t&nr)!==0,r=(t&rr)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Kr(s?e:"<!>"+e),n||(i=Ue(i)));var o=r||Gt?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=Ue(o),l=o.lastChild;lt(a,l)}else lt(o,o);return o}}function Xr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=we();return e.append(t,n),lt(t,n),e}function be(e,t){e!==null&&e.before(t)}function Zr(e,t){return Jr(e,t)}const He=new Map;function Jr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){Tr();var l=void 0,f=Ir(()=>{var u=n??t.appendChild(we());_r(u,{pending:()=>{}},v=>{Ne({});var h=R;s&&(h.c=s),i&&(r.$$events=i),l=e(v,r)||{},De()},a);var d=new Set,c=v=>{for(var h=0;h<v.length;h++){var g=v[h];if(!d.has(g)){d.add(g);var m=qr(g);for(const x of[t,document]){var C=He.get(x);C===void 0&&(C=new Map,He.set(x,C));var w=C.get(g);w===void 0?(x.addEventListener(g,dn,{passive:m}),C.set(g,1)):C.set(g,w+1)}}}};return c(Nn(fn)),at.add(c),()=>{for(var v of d)for(const m of[t,document]){var h=He.get(m),g=h.get(v);--g==0?(m.removeEventListener(v,dn),h.delete(v),h.size===0&&He.delete(m)):h.set(v,g)}at.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Qr.set(l,f),l}let Qr=new WeakMap;class $r{anchor;#e=new Map;#l=new Map;#t=new Map;#a=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#n=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#l.get(n);if(r)zr(r),this.#a.delete(n);else{var i=this.#t.get(n);i&&(this.#l.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===t)break;const a=this.#t.get(o);a&&(N(a.effect),this.#t.delete(o))}for(const[s,o]of this.#l){if(s===n||this.#a.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();$t(o,f),f.append(we()),this.#t.set(s,{effect:o,fragment:f})}else N(o);this.#a.delete(s),this.#l.delete(s)};this.#r||!r?(this.#a.add(s),xe(o,a,!1)):a()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(N(i.effect),this.#t.delete(r))};ensure(t,n){var r=b,i=Cr();if(n&&!this.#l.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),o=we();s.append(o),this.#t.set(t,{effect:X(()=>n(o)),fragment:s})}else this.#l.set(t,X(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[a,l]of this.#l)a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of this.#t)a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#n),r.ondiscard(this.#i)}else this.#n(r)}}function ei(e,t,n=!1){var r=new $r(e),i=n?he:0;function s(o,a){r.ensure(o,a)}it(()=>{var o=!1;t((a,l=0)=>{o=!0,s(l,a)}),o||s(-1,null)},i)}function ti(e,t){var n;n=document.head.appendChild(we()),it(()=>t(n),Tt|ie)}function ft(e,t){Lr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=Yt("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const hn=[...`
2
+ \r\f \v\uFEFF`];function ni(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||hn.includes(r[o-1]))&&(a===r.length||hn.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function vn(e,t,n,r,i,s){var o=e.__className;if(o!==n||o===void 0){var a=ni(n,r,s);a==null?e.removeAttribute("class"):e.className=a,e.__className=n}else if(s&&i!==s)for(var l in s){var f=!!s[l];(i==null||f!==!!i[l])&&e.classList.toggle(l,f)}return s}const ri=Symbol("is custom element"),ii=Symbol("is html");function ye(e,t,n,r){var i=si(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[jn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&oi(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function si(e){return e.__attributes??={[ri]:e.nodeName.includes("-"),[ii]:e.namespaceURI===St}}var _n=new Map;function oi(e){var t=e.getAttribute("is")||e.nodeName,n=_n.get(t);if(n)return n;_n.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=In(i);for(var o in r)r[o].set&&n.push(o);i=mt(i)}return n}function ut(e,t,n,r){var i=(n&er)!==0,s=(n&tr)!==0,o=r,a=!0,l=()=>(a&&(a=!1,o=s?ot(r):r),o);let f;if(i){var u=Re in e||zn in e;f=ce(e,t)?.set??(u&&t in e?w=>e[t]=w:void 0)}var d,c=!1;i?[d,c]=ur(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=l(),f&&(Vn(),f(d)));var v;if(v=()=>{var w=e[t];return w===void 0?l():(a=!0,w)},(n&$n)===0)return v;if(f){var h=e.$$legacy;return(function(w,x){return arguments.length>0?((!x||h||c)&&f(x?v():w),w):v()})}var g=!1,m=((n&Qn)!==0?$e:br)(()=>(g=!1,v()));i&&O(m);var C=p;return(function(w,x){if(arguments.length>0){const fe=x?O(m):i?oe(w):w;return W(m,fe),g=!0,o!==void 0&&(o=fe),w}return te&&g||(C.f&U)!==0?m.v:O(m)})}function pn(e){R===null&&Wn(),Dr(()=>{const t=ot(e);if(typeof t=="function")return t})}const ai="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ai);var li=Ce('<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>'),fi=Ce(`<p class="svelte-yhk8rr">Please make sure that the script tag has 'id="chatbot"' and the attribute
3
3
  'data-server' with the full qualified URL to the chatbot-server.</p> <pre class="svelte-yhk8rr">
4
4
  <code class="svelte-yhk8rr">
5
5
  &lt;script
@@ -12,7 +12,7 @@
12
12
  <br class="svelte-yhk8rr"/>
13
13
  src="https://server.com/webclient/embed/bundle.js"&gt; &lt;/script&gt;
14
14
  </code>
15
- </pre>`,1);const li={hash:"svelte-yhk8rr",code:`.svelte-yhk8rr,
15
+ </pre>`,1);const ui={hash:"svelte-yhk8rr",code:`.svelte-yhk8rr,
16
16
  .svelte-yhk8rr:before,
17
17
  .svelte-yhk8rr:after {box-sizing:border-box;}.bot-border.svelte-yhk8rr {position:fixed;display:flex;flex-direction:column;top:0;bottom:env(safe-area-inset-bottom);height:100%;max-height:100vh;width:100%;border-width:0;border-radius:var(--window-border-radius, 8px);box-shadow:rgba(0, 0, 0, 0.24) 0px 16px 40px;background:transparent;opacity:1;transition:transform 200ms,
18
18
  opacity 100ms 100ms,
@@ -20,10 +20,10 @@
20
20
 
21
21
  @media screen and (min-width: 768px) {#chat-frame.svelte-yhk8rr {border-radius:var(--window-border-radius, 8px);}.bot-border.svelte-yhk8rr {height:var(--window-height, 46em);max-height:var(--window-max-height, calc(100vh - 2em));width:var(--window-width, 26em);top:var(--window-top, auto);right:var(--window-right, 1em);bottom:var(--window-bottom, 1em);left:var(--window-left, auto);border-radius:var(--window-border-radius, 8px);}.bot-border.closed.svelte-yhk8rr {transform:translateY(var(--window-height, 46em));opacity:0;}
22
22
  }p.svelte-yhk8rr,
23
- pre.svelte-yhk8rr {max-width:300px;}pre.svelte-yhk8rr {font-size:0.6em;line-height:0.5;}`};function fi(e,t){De(t,!0),ut(e,li),hn(()=>{document.getElementById("chat-frame")?.addEventListener("load",t.onLoad)});var n=Yr(),i=kr(n);{var r=o=>{var l=oi();let a;var f=rt(l);ze(c=>{a=cn(l,1,"bot-border svelte-yhk8rr",null,a,{closed:!t.open}),xe(l,"aria-hidden",t.open?"false":"true"),xe(f,"src",c)},[()=>`${t.server}${t.server.indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(t.referrer??"")}`]),ke(o,l)},s=o=>{var l=ai();ke(o,l)};Jr(i,o=>{t.server?o(r):o(s,-1)})}ke(e,n),Ie()}var ui=Re('<div class="chat-button-wrapper svelte-1xi58vz" tabindex="0" role="button" aria-label="Open chat window"><img class="chat-button svelte-1xi58vz" alt="Open chat window"/></div>');const ci={hash:"svelte-1xi58vz",code:`.svelte-1xi58vz,
23
+ pre.svelte-yhk8rr {max-width:300px;}pre.svelte-yhk8rr {font-size:0.6em;line-height:0.5;}`};function ci(e,t){Ne(t,!0),ft(e,ui),pn(()=>{document.getElementById("chat-frame")?.addEventListener("load",t.onLoad)});var n=Xr(),r=Sr(n);{var i=o=>{var a=li();let l;var f=nt(a);je(u=>{l=vn(a,1,"bot-border svelte-yhk8rr",null,l,{closed:!t.open}),ye(a,"aria-hidden",t.open?"false":"true"),ye(f,"src",u)},[()=>`${t.server}${t.server.indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(t.referrer??"")}`]),be(o,a)},s=o=>{var a=fi();be(o,a)};ei(r,o=>{t.server?o(i):o(s,-1)})}be(e,n),De()}var di=Ce('<div class="chat-button-wrapper svelte-1xi58vz" tabindex="0" role="button" aria-label="Open chat window"><img class="chat-button svelte-1xi58vz" alt="Open chat window"/></div>');const hi={hash:"svelte-1xi58vz",code:`.svelte-1xi58vz,
24
24
  .svelte-1xi58vz:before,
25
25
  .svelte-1xi58vz:after {box-sizing:border-box;}.chat-button-wrapper.svelte-1xi58vz {position:fixed;top:var(--fab-top-mobile, var(--fab-top, auto));right:var(--fab-right-mobile, var(--fab-right, 1.5em));bottom:var(--fab-bottom-mobile, var(--fab-bottom, 1.5em));left:var(--fab-left-mobile, var(--fab-left, auto));width:var(--fab-size-mobile, var(--fab-size, 5em));height:var(--fab-size-mobile, var(--fab-size, 5em));z-index:999;}
26
26
 
27
27
  @media screen and (min-width: 768px) {.chat-button-wrapper.svelte-1xi58vz {top:var(--fab-top, auto);right:var(--fab-right, 1.5em);bottom:var(--fab-bottom, 1.5em);left:var(--fab-left, auto);width:var(--fab-size, 6em);height:var(--fab-size, 6em);}
28
28
  }.chat-button.svelte-1xi58vz {display:block;height:100%;cursor:pointer;border-radius:50%;box-shadow:9px 9px 16px rgba(0, 0, 0, 0.25);transition:transform 100ms,
29
- box-shadow 100ms;}.chat-button.svelte-1xi58vz:hover {box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px);}`};function di(e,t){De(t,!0),ut(e,ci);function n(s){const o=s.key;(o==="ArrowDown"||o==="ArrowRight"||o==="Enter"||o===" "||o==="Space")&&(s.stopPropagation(),t.onToggle())}var i=ui(),r=rt(i);ze(()=>{xe(i,"aria-expanded",t.open?"true":"false"),xe(r,"src",`${t.assetsUrl}/fab.svg`)}),an("click",i,function(...s){t.onToggle?.apply(this,s)}),an("keydown",i,n),ke(e,i),Ie()}Hr(["click","keydown"]);let vn=!1;function hi(e){vn=e}function vi(){return vn}function qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}var _i={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function dt(e,t){function n(r,s,o){if(!(typeof document>"u")){o=qe({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var a in o)o[a]&&(l+="; "+a,o[a]!==!0&&(l+="="+o[a].split(";")[0]));return document.cookie=r+"="+e.write(s,r)+l}}function i(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],o={},l=0;l<s.length;l++){var a=s[l].split("="),f=a.slice(1).join("=");try{var c=decodeURIComponent(a[0]);if(o[c]=e.read(f,c),r===c)break}catch{}}return r?o[r]:o}}return Object.create({set:n,get:i,remove:function(r,s){n(r,"",qe({},s,{expires:-1}))},withAttributes:function(r){return dt(this.converter,qe({},this.attributes,r))},withConverter:function(r){return dt(qe({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var _n=dt(_i,{path:"/"});const pn="bubble-chat-window-state",gn=()=>{switch(_n.get(pn)){case"open":return!0;case"closed":return!1;default:return}},wn=e=>{const t=new Date(new Date().getTime()+288e5);_n.set(pn,e,{expires:t})},ht=[];let vt=gn();function _t(){vt=!0,wn("open"),ht.forEach(function(e){e.call(window,!0)})}function Be(){vt=!1,wn("closed"),ht.forEach(function(e){e.call(window,!1)})}function mn(){vt?Be():_t()}function pi(){pt({type:"RESTART_CHAT"})}function gi(e){pt({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function wi(e){pt({type:"TRIGGER_STORY",story:e})}function bn(){return document.getElementById("chat-frame")}function mi(){const e=bn();if(e?.src)try{return new URL(e.src).origin}catch{return null}return null}function pt(e){const t=bn(),n=mi();if(!n){console.warn("Cannot send message: chat iframe origin could not be determined");return}t?.contentWindow?.postMessage(e,n)}function yn(e,t){if(e==="ON_CHAT_WINDOW_STATE_CHANGE")ht.push(t);else throw new Error("Unsupported event "+e)}const bi=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:Be,enterGuestMessage:gi,isChatbotLoaded:vi,openChatWindow:_t,restartChat:pi,subscribe:yn,toggleChatWindow:mn,triggerStory:wi},Symbol.toStringTag,{value:"Module"})),yi=e=>{if(!e||typeof e!="object"||Array.isArray(e)){console.warn("Invalid tracking payload received:",e);return}"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},Ei=(e,t,n,i,r)=>{const s=()=>{const f=document.getElementById("chat-frame");if(f?.src)try{return new URL(f.src).origin}catch{return null}return null},o={CHAT_STARTED:"webclient.chat.started",CHAT_ENDED:"webclient.chat.ended",WINDOW_EXPAND:"webclient.window.expand",WINDOW_CLOSE:"webclient.window.close",CHANGE_URL:"webclient.change.url",GOOGLE_TAG_EVENT:"google.tag.event"},l=Object.values(o),a=f=>{if(!f.data?.type||!l.includes(f.data.type))return;const c=s();if(c&&f.origin!==c){console.warn("Rejected postMessage from untrusted origin:",f.origin);return}const u=f.data;switch(u.type){case o.CHAT_STARTED:e();break;case o.CHAT_ENDED:t();break;case o.WINDOW_EXPAND:n(u.devices,u.initial);break;case o.WINDOW_CLOSE:i();break;case o.CHANGE_URL:r(u.url);break;case o.GOOGLE_TAG_EVENT:yi(u.payload);break}};window.addEventListener("message",a,!1)},ki=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))});var xi=Re('<link rel="stylesheet"/>'),Ti=Re("<div><!> <!></div>");const Si={hash:"svelte-1n46o8q",code:".bubble-chat.svelte-1n46o8q {font-size:16px;visibility:hidden;opacity:0;}.bubble-chat.chatbot-ready.svelte-1n46o8q {visibility:visible;opacity:1;}"};function Oi(e,t){De(t,!0),ut(e,Si);let n=ct(t,"assetsUrl",19,()=>t.server?t.server.split("?")[0]:void 0),i=ct(t,"linkHandling",3,"default"),r=ct(t,"chatStarted",7,!1);const s="chatbot-style";let o=W(!1),l=W(!1),a=W(ae(gn()));yn("ON_CHAT_WINDOW_STATE_CHANGE",function(E){H(a,E,!0)});function f(){r(!0)}function c(){r(!1)}function u(g,E){const ue=window.innerWidth,wt=g==null||g==="all",mt=g==="desktop"&&ue>=768,Di=g==="mobile"&&ue<768,Ii=wt||mt||Di;(!E||O(a)!==!1)&&Ii&&_t()}function d(){Be()}function v(g){const E=window.innerWidth,ue=window.location.hostname,wt=new URL(g).hostname,mt=ue===wt;E<768&&Be(),i()==="new-tab"?window.open(g,"_blank"):i()==="existing-tab"||mt?document.location.href=g:window.open(g,"_blank")}function h(){H(l,!0)}Ei(f,c,u,d,v),hn(async()=>{H(o,await ki(s),!0)});var p=Ti();Qr("1n46o8q",g=>{var E=xi();xe(E,"id",s),ze(()=>xe(E,"href",`${n()}/custom.css`)),ke(g,E)});var m=rt(p);di(m,{get assetsUrl(){return n()},get open(){return O(a)},get onToggle(){return mn}});var D=xr(m,2);fi(D,{get server(){return t.server},get referrer(){return t.referrer},get open(){return O(a)},onLoad:h}),ze(()=>cn(p,1,`bubble-chat ${O(o)&&O(l)?"chatbot-ready":""}`,"svelte-1n46o8q")),ke(e,p),Ie()}const Ci=e=>e.replace(/\/embed\/bundle\.js/,""),Ai=e=>e.dataset?.server,Ri=e=>{if(e&&"src"in e&&typeof e.src=="string")return Ai(e)||Ci(e.src)},gt=document.querySelector("script#chatbot"),En=Ri(gt),Ni=gt?.getAttribute("link-handling")?gt.getAttribute("link-handling"):"default";window.chatbot=bi;const kn=()=>{console.log("Chatbot is loading from",En),Vr(Oi,{target:document.body,props:{server:En,referrer:window.location.href,linkHandling:Ni}}),hi(!0)},xn=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(kn,500):setTimeout(()=>{xn(e+1)},500)};xn();const Ge=document.getElementById("chatbot");Ge&&"src"in Ge&&typeof Ge.src=="string"&&Ge.src.indexOf("caller=bookmarklet")>0&&setTimeout(kn,500)})();
29
+ box-shadow 100ms;}.chat-button.svelte-1xi58vz:hover {box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px);}`};function vi(e,t){Ne(t,!0),ft(e,hi);function n(s){const o=s.key;(o==="ArrowDown"||o==="ArrowRight"||o==="Enter"||o===" "||o==="Space")&&(s.stopPropagation(),t.onToggle())}var r=di(),i=nt(r);je(()=>{ye(r,"aria-expanded",t.open?"true":"false"),ye(i,"src",`${t.assetsUrl}/fab.svg`)}),un("click",r,function(...s){t.onToggle?.apply(this,s)}),un("keydown",r,n),be(e,r),De()}Br(["click","keydown"]);let gn=!1;function _i(e){gn=e}function pi(){return gn}function Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gi={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ct(e,t){function n(i,s,o){if(!(typeof document>"u")){o=Ge({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a<s.length;a++){var l=s[a].split("="),f=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=e.read(f,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:n,get:r,remove:function(i,s){n(i,"",Ge({},s,{expires:-1}))},withAttributes:function(i){return ct(this.converter,Ge({},this.attributes,i))},withConverter:function(i){return ct(Ge({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var wn=ct(gi,{path:"/"});const mn="bubble-chat-window-state",bn=()=>{switch(wn.get(mn)){case"open":return!0;case"closed":return!1;default:return}},yn=e=>{const t=new Date(new Date().getTime()+288e5);wn.set(mn,e,{expires:t})},dt=[];let ht=bn();function vt(){ht=!0,yn("open"),dt.forEach(function(e){e.call(window,!0)})}function qe(){ht=!1,yn("closed"),dt.forEach(function(e){e.call(window,!1)})}function En(){ht?qe():vt()}function wi(){_t({type:"RESTART_CHAT"})}function mi(e){_t({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function bi(e){_t({type:"TRIGGER_STORY",story:e})}function kn(){return document.getElementById("chat-frame")}function yi(){const e=kn();if(e?.src)try{return new URL(e.src).origin}catch{return null}return null}function _t(e){const t=kn(),n=yi();if(!n){console.warn("Cannot send message: chat iframe origin could not be determined");return}t?.contentWindow?.postMessage(e,n)}function xn(e,t){if(e==="ON_CHAT_WINDOW_STATE_CHANGE")dt.push(t);else throw new Error("Unsupported event "+e)}const Ei=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:qe,enterGuestMessage:mi,isChatbotLoaded:pi,openChatWindow:vt,restartChat:wi,subscribe:xn,toggleChatWindow:En,triggerStory:bi},Symbol.toStringTag,{value:"Module"})),ki=e=>{if(!e||typeof e!="object"||Array.isArray(e)){console.warn("Invalid tracking payload received:",e);return}"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},xi=(e,t,n,r,i)=>{const s=()=>{const f=document.getElementById("chat-frame");if(f?.src)try{return new URL(f.src).origin}catch{return null}return null},o={CHAT_STARTED:"webclient.chat.started",CHAT_ENDED:"webclient.chat.ended",WINDOW_EXPAND:"webclient.window.expand",WINDOW_CLOSE:"webclient.window.close",CHANGE_URL:"webclient.change.url",GOOGLE_TAG_EVENT:"google.tag.event"},a=Object.values(o),l=f=>{if(!f.data?.type||!a.includes(f.data.type))return;const u=s();if(u&&f.origin!==u){console.warn("Rejected postMessage from untrusted origin:",f.origin);return}const d=f.data;switch(d.type){case o.CHAT_STARTED:e();break;case o.CHAT_ENDED:t();break;case o.WINDOW_EXPAND:n(d.devices,d.initial);break;case o.WINDOW_CLOSE:r();break;case o.CHANGE_URL:i(d.url);break;case o.GOOGLE_TAG_EVENT:ki(d.payload);break}};window.addEventListener("message",l,!1)},Ti=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))});var Si=Ce('<link rel="stylesheet"/>'),Oi=Ce("<div><!> <!></div>");const Ci={hash:"svelte-1n46o8q",code:".bubble-chat.svelte-1n46o8q {font-size:16px;visibility:hidden;opacity:0;}.bubble-chat.chatbot-ready.svelte-1n46o8q {visibility:visible;opacity:1;}"};function Ai(e,t){Ne(t,!0),ft(e,Ci);let n=ut(t,"assetsUrl",19,()=>t.server?t.server.split("?")[0]:void 0),r=ut(t,"linkHandling",3,"default"),i=ut(t,"chatStarted",7,!1);const s="chatbot-style";let o=j(!1),a=j(!1),l=j(oe(bn()));xn("ON_CHAT_WINDOW_STATE_CHANGE",function(x){W(l,x,!0)});function f(){i(!0)}function u(){i(!1)}function d(w,x){const fe=window.innerWidth,gt=w==null||w==="all",wt=w==="desktop"&&fe>=768,Li=w==="mobile"&&fe<768,Mi=gt||wt||Li;(!x||O(l)!==!1)&&Mi&&vt()}function c(){qe()}function v(w){const x=window.innerWidth,fe=window.location.hostname,gt=new URL(w).hostname,wt=fe===gt;x<768&&qe(),r()==="new-tab"?window.open(w,"_blank"):r()==="existing-tab"||wt?document.location.href=w:window.open(w,"_blank")}function h(){W(a,!0)}xi(f,u,d,c,v),pn(async()=>{W(o,await Ti(s),!0)});var g=Oi();ti("1n46o8q",w=>{var x=Si();ye(x,"id",s),je(()=>ye(x,"href",`${n()}/custom.css`)),be(w,x)});var m=nt(g);vi(m,{get assetsUrl(){return n()},get open(){return O(l)},get onToggle(){return En}});var C=Or(m,2);ci(C,{get server(){return t.server},get referrer(){return t.referrer},get open(){return O(l)},onLoad:h}),je(()=>vn(g,1,`bubble-chat ${O(o)&&O(a)?"chatbot-ready":""}`,"svelte-1n46o8q")),be(e,g),De()}const Ri=e=>e.replace(/\/embed\/bundle\.js/,""),Ni=e=>e.dataset?.server,Di=e=>{if(e&&"src"in e&&typeof e.src=="string")return Ni(e)||Ri(e.src)},pt=document.querySelector("script#chatbot"),Tn=Di(pt),Ii=pt?.getAttribute("link-handling")?pt.getAttribute("link-handling"):"default";window.chatbot=Ei;const Sn=()=>{console.log("Chatbot is loading from",Tn),Zr(Ai,{target:document.body,props:{server:Tn,referrer:window.location.href,linkHandling:Ii}}),_i(!0)},On=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(Sn,500):setTimeout(()=>{On(e+1)},500)};On();const Be=document.getElementById("chatbot");Be&&"src"in Be&&typeof Be.src=="string"&&Be.src.indexOf("caller=bookmarklet")>0&&setTimeout(Sn,500)})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.110.5",
3
+ "version": "4.111.0",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,9 +31,9 @@
31
31
  "dev:embed": "tsx --watch ./run-embed-local.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@botfabrik/engine-domain": "^4.110.2",
35
- "@botfabrik/engine-transcript-export": "^4.110.2",
36
- "@botfabrik/engine-utils": "^4.110.2",
34
+ "@botfabrik/engine-domain": "^4.111.0",
35
+ "@botfabrik/engine-transcript-export": "^4.111.0",
36
+ "@botfabrik/engine-utils": "^4.111.0",
37
37
  "@google-cloud/speech": "^7.3.0",
38
38
  "@node-saml/passport-saml": "^5.1.0",
39
39
  "@types/cors": "^2.8.19",
@@ -55,5 +55,5 @@
55
55
  "tsx": "^4.21.0",
56
56
  "typescript": "5.9.3"
57
57
  },
58
- "gitHead": "e6962d5a64e95c7ac16770af03aa1088b537b525"
58
+ "gitHead": "f43cd12588ebdc88de04eec9f172df48cc47bd2c"
59
59
  }