@htmlbricks/hb-messages-box 0.65.23 → 0.66.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.
package/main.iife.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(_t){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const $n=1,bn=4,En=8,xn=16,Tn=2,pt="[",gt="[!",mt="]",be={},E=Symbol(),Sn="http://www.w3.org/1999/xhtml",Xe=!1;var An=Array.isArray,Nn=Array.prototype.indexOf,Rn=Array.from,Ce=Object.keys,ke=Object.defineProperty,se=Object.getOwnPropertyDescriptor,On=Object.getOwnPropertyDescriptors,Cn=Object.prototype,kn=Array.prototype,wt=Object.getPrototypeOf,yt=Object.isExtensible;function Pn(e){for(var t=0;t<e.length;t++)e[t]()}function $t(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const b=2,Qe=4,et=8,H=16,K=32,Z=64,Pe=128,F=512,S=1024,O=2048,V=4096,X=8192,W=16384,Le=32768,Me=65536,bt=1<<17,Et=1<<18,ie=1<<19,Ln=1<<20,le=32768,tt=1<<21,nt=1<<22,Q=1<<23,De=Symbol("$state"),xt=Symbol("legacy props"),Mn=Symbol(""),ve=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Dn=3,Ie=8;function In(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function jn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Fn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Bn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Yn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Un(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Hn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Vn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Wn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function zn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function rt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Gn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let m=!1;function _e(e){m=e}let y;function ee(e){if(e===null)throw rt(),be;return y=e}function Tt(){return ee(ne(y))}function st(e){if(m){if(ne(y)!==null)throw rt(),be;y=e}}function Jn(e=1){if(m){for(var t=e,n=y;t--;)n=ne(n);y=n}}function Kn(e=!0){for(var t=0,n=y;;){if(n.nodeType===Ie){var r=n.data;if(r===mt){if(t===0)return n;t-=1}else(r===pt||r===gt)&&(t+=1)}var s=ne(n);e&&n.remove(),n=s}}function St(e){return e===this.v}function Zn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function At(e){return!Zn(e,this.v)}let Xn=!1,k=null;function pe(e){k=e}function Nt(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,l:null}}function Rt(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)Wt(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,e??{}}function Ot(){return!0}let fe=[];function Ct(){var e=fe;fe=[],Pn(e)}function je(e){if(fe.length===0&&!Ee){var t=fe;queueMicrotask(()=>{t===fe&&Ct()})}fe.push(e)}function Qn(){for(;fe.length>0;)Ct()}function kt(e){var t=p;if(t===null)return _.f|=Q,e;if((t.f&Le)===0){if((t.f&Pe)===0)throw e;t.b.error(e)}else ge(e,t)}function ge(e,t){for(;t!==null;){if((t.f&Pe)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Fe=new Set;let $=null,P=null,L=[],qe=null,it=!1,Ee=!1;class q{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#o=0;#i=0;#a=null;#l=[];#s=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#i>0}process(t){L=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#n(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#r(n.effects),this.#r(n.render_effects),this.#r(n.block_effects)):($=null,Lt(n.render_effects),Lt(n.effects),this.#a?.resolve()),P=null}#n(t,n){t.f^=S;for(var r=t.first;r!==null;){var s=r.f,i=(s&(K|Z))!==0,l=i&&(s&S)!==0,f=l||(s&X)!==0||this.skipped_effects.has(r);if((r.f&Pe)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!f&&r.fn!==null){i?r.f^=S:(s&Qe)!==0?n.effects.push(r):Ae(r)&&((r.f&H)!==0&&n.block_effects.push(r),Ne(r));var o=r.first;if(o!==null){r=o;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#r(n.effects),this.#r(n.render_effects),this.#r(n.block_effects),n=n.parent),r=a.next,a=a.parent}}#r(t){for(const n of t)((n.f&O)!==0?this.#l:this.#s).push(n),this.#f(n.deps),R(n,S)}#f(t){if(t!==null)for(const n of t)(n.f&b)===0||(n.f&le)===0||(n.f^=le,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,t.v),P?.set(t,t.v))}activate(){$=this,this.apply()}deactivate(){$===this&&($=null,P=null)}flush(){if(this.activate(),L.length>0){if(Pt(),$!==null&&$!==this)return}else this.#o===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#i===0){for(const t of this.#t)t();this.#t.clear()}this.#o===0&&this.#c()}#c(){if(Fe.size>1){this.previous.clear();var t=P,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of Fe){if(i===this){n=!1;continue}const l=[];for(const[o,a]of this.current){if(i.current.has(o))if(n&&a!==i.current.get(o))i.current.set(o,a);else continue;l.push(o)}if(l.length===0)continue;const f=[...i.current.keys()].filter(o=>!this.current.has(o));if(f.length>0){var s=L;L=[];const o=new Set,a=new Map;for(const c of l)Mt(c,f,o,a);if(L.length>0){$=i,i.apply();for(const c of L)i.#n(c,r);i.deactivate()}L=s}}$=null,P=t}this.committed=!0,Fe.delete(this)}increment(t){this.#o+=1,t&&(this.#i+=1)}decrement(t){this.#o-=1,t&&(this.#i-=1),this.revive()}revive(){for(const t of this.#l)R(t,O),we(t);for(const t of this.#s)R(t,V),we(t);this.#l=[],this.#s=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=$t()).promise}static ensure(){if($===null){const t=$=new q;Fe.add($),Ee||q.enqueue(()=>{$===t&&t.flush()})}return $}static enqueue(t){je(t)}apply(){}}function me(e){var t=Ee;Ee=!0;try{for(var n;;){if(Qn(),L.length===0&&($?.flush(),L.length===0))return qe=null,n;Pt()}}finally{Ee=t}}function Pt(){var e=re;it=!0;var t=null;try{var n=0;for(Ge(!0);L.length>0;){var r=q.ensure();if(n++>1e3){var s,i;er()}r.process(L),te.clear()}}finally{it=!1,Ge(e),qe=null}}function er(){try{Bn()}catch(e){ge(e,qe)}}let z=null;function Lt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(W|X))===0&&Ae(r)&&(z=new Set,Ne(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Kt(r):r.fn=null),z?.size>0)){te.clear();for(const s of z){if((s.f&(W|X))!==0)continue;const i=[s];let l=s.parent;for(;l!==null;)z.has(l)&&(z.delete(l),i.push(l)),l=l.parent;for(let f=i.length-1;f>=0;f--){const o=i[f];(o.f&(W|X))===0&&Ne(o)}}z.clear()}}z=null}}function Mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&b)!==0?Mt(s,t,n,r):(i&(nt|H))!==0&&(i&O)===0&&Dt(s,t,r)&&(R(s,O),we(s))}}function Dt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&b)!==0&&Dt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function we(e){for(var t=qe=e;t.parent!==null;){t=t.parent;var n=t.f;if(it&&t===p&&(n&H)!==0&&(n&Et)===0)return;if((n&(Z|K))!==0){if((n&S)===0)return;t.f^=S}}L.push(t)}function tr(e){let t=0,n=xe(0),r;return()=>{Ve()&&(N(n),zt(()=>(t===0&&(r=fn(()=>e(()=>Te(n)))),t+=1,()=>{je(()=>{t-=1,t===0&&(r?.(),r=void 0,Te(n))})})))}}var nr=Me|ie|Pe;function rr(e,t,n){new sr(e,t,n)}class sr{parent;#t=!1;#e;#o=m?y:null;#i;#a;#l;#s=null;#n=null;#r=null;#f=null;#u=null;#c=0;#h=0;#v=!1;#d=null;#w=tr(()=>(this.#d=xe(this.#c),()=>{this.#d=null}));constructor(t,n,r){this.#e=t,this.#i=n,this.#a=r,this.parent=p.b,this.#t=!!this.#i.pending,this.#l=$r(()=>{if(p.b=this,m){const i=this.#o;Tt(),i.nodeType===Ie&&i.data===gt?this.#$():this.#y()}else{var s=this.#g();try{this.#s=ae(()=>r(s))}catch(i){this.error(i)}this.#h>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},nr),m&&(this.#e=y)}#y(){try{this.#s=ae(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#$(){const t=this.#i.pending;t&&(this.#n=ae(()=>t(this.#e)),q.enqueue(()=>{var n=this.#g();this.#s=this.#_(()=>(q.ensure(),ae(()=>this.#a(n)))),this.#h>0?this.#p():(ze(this.#n,()=>{this.#n=null}),this.#t=!1)}))}#g(){var t=this.#e;return this.#t&&(this.#u=Ue(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#i.pending}#_(t){var n=p,r=_,s=k;I(this.#l),x(this.#l),pe(this.#l.ctx);try{return t()}catch(i){return kt(i),null}finally{I(n),x(r),pe(s)}}#p(){const t=this.#i.pending;this.#s!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Tr(this.#s,this.#f)),this.#n===null&&(this.#n=ae(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#h+=t,this.#h===0&&(this.#t=!1,this.#n&&ze(this.#n,()=>{this.#n=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#d&&Ye(this.#d,this.#c)}get_effect_pending(){return this.#w(),N(this.#d)}error(t){var n=this.#i.onerror;let r=this.#i.failed;if(this.#v||!n&&!r)throw t;this.#s&&(B(this.#s),this.#s=null),this.#n&&(B(this.#n),this.#n=null),this.#r&&(B(this.#r),this.#r=null),m&&(ee(this.#o),Jn(),ee(Kn()));var s=!1,i=!1;const l=()=>{if(s){Gn();return}s=!0,i&&zn(),q.ensure(),this.#c=0,this.#r!==null&&ze(this.#r,()=>{this.#r=null}),this.#t=this.has_pending_snippet(),this.#s=this.#_(()=>(this.#v=!1,ae(()=>this.#a(this.#e)))),this.#h>0?this.#p():this.#t=!1};var f=_;try{x(null),i=!0,n?.(t,l),i=!1}catch(o){ge(o,this.#l&&this.#l.parent)}finally{x(f)}r&&je(()=>{this.#r=this.#_(()=>{q.ensure(),this.#v=!0;try{return ae(()=>{r(this.#e,()=>t,()=>l)})}catch(o){return ge(o,this.#l.parent),null}finally{this.#v=!1}})})}}function ir(e,t,n,r){const s=lt;if(n.length===0&&e.length===0){r(t.map(s));return}var i=$,l=p,f=lr();function o(){Promise.all(n.map(a=>fr(a))).then(a=>{f();try{r([...t.map(s),...a])}catch(c){(l.f&W)===0&&ge(c,l)}i?.deactivate(),Be()}).catch(a=>{ge(a,l)})}e.length>0?Promise.all(e).then(()=>{f();try{return o()}finally{i?.deactivate(),Be()}}):o()}function lr(){var e=p,t=_,n=k,r=$;return function(i=!0){I(e),x(t),pe(n),i&&r?.activate()}}function Be(){I(null),x(null),pe(null)}function lt(e){var t=b|O,n=_!==null&&(_.f&b)!==0?_:null;return p!==null&&(p.f|=ie),{ctx:k,deps:null,effects:null,equals:St,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??p,ac:null}}function fr(e,t){let n=p;n===null&&In();var r=n.b,s=void 0,i=xe(E),l=!_,f=new Map;return yr(()=>{var o=$t();s=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{a===$&&a.committed&&a.deactivate(),Be()})}catch(u){o.reject(u),Be()}var a=$;if(l){var c=!r.is_pending();r.update_pending_count(1),a.increment(c),f.get(a)?.reject(ve),f.delete(a),f.set(a,o)}const d=(u,h=void 0)=>{if(a.activate(),h)h!==ve&&(i.f|=Q,Ye(i,h));else{(i.f&Q)!==0&&(i.f^=Q),Ye(i,u);for(const[g,w]of f){if(f.delete(g),g===a)break;w.reject(ve)}}l&&(r.update_pending_count(-1),a.decrement(c))};o.promise.then(d,u=>d(null,u||"unknown"))}),Vt(()=>{for(const o of f.values())o.reject(ve)}),new Promise(o=>{function a(c){function d(){c===s?o(i):a(s)}c.then(d,d)}a(s)})}function or(e){const t=lt(e);return t.equals=At,t}function It(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function ar(e){for(var t=e.parent;t!==null;){if((t.f&b)===0)return(t.f&W)===0?t:null;t=t.parent}return null}function ft(e){var t,n=p;I(ar(e));try{e.f&=~le,It(e),t=rn(e)}finally{I(n)}return t}function jt(e){var t=ft(e);if(e.equals(t)||($?.is_fork||(e.v=t),e.wv=tn()),!ue)if(P!==null)Ve()&&P.set(e,t);else{var n=(e.f&F)===0?V:S;R(e,n)}}let ot=new Set;const te=new Map;let Ft=!1;function xe(e,t){var n={f:0,v:e,reactions:null,equals:St,rv:0,wv:0};return n}function M(e,t){const n=xe(e);return Sr(n),n}function ur(e,t=!1,n=!0){const r=xe(e);return t||(r.equals=At),r}function D(e,t,n=!1){_!==null&&(!U||(_.f&bt)!==0)&&Ot()&&(_.f&(b|H|nt|bt))!==0&&!G?.includes(e)&&Wn();let r=n?oe(t):t;return Ye(e,r)}function Ye(e,t){if(!e.equals(t)){var n=e.v;ue?te.set(e,t):te.set(e,n),e.v=t;var r=q.ensure();r.capture(e,n),(e.f&b)!==0&&((e.f&O)!==0&&ft(e),R(e,(e.f&F)!==0?S:V)),e.wv=tn(),qt(e,O),p!==null&&(p.f&S)!==0&&(p.f&(K|Z))===0&&(j===null?Ar([e]):j.push(e)),!r.is_fork&&ot.size>0&&!Ft&&cr()}return t}function cr(){Ft=!1;var e=re;Ge(!0);const t=Array.from(ot);try{for(const n of t)(n.f&S)!==0&&R(n,V),Ae(n)&&Ne(n)}finally{Ge(e)}ot.clear()}function Te(e){D(e,e.v+1)}function qt(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s],l=i.f,f=(l&O)===0;if(f&&R(i,t),(l&b)!==0){var o=i;P?.delete(o),(l&le)===0&&(l&F&&(i.f|=le),qt(o,V))}else f&&((l&H)!==0&&z!==null&&z.add(i),we(i))}}function oe(e){if(typeof e!="object"||e===null||De in e)return e;const t=wt(e);if(t!==Cn&&t!==kn)return e;var n=new Map,r=An(e),s=M(0),i=ce,l=f=>{if(ce===i)return f();var o=_,a=ce;x(null),en(i);var c=f();return x(o),en(a),c};return r&&n.set("length",M(e.length)),new Proxy(e,{defineProperty(f,o,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Hn();var c=n.get(o);return c===void 0?c=l(()=>{var d=M(a.value);return n.set(o,d),d}):D(c,a.value,!0),!0},deleteProperty(f,o){var a=n.get(o);if(a===void 0){if(o in f){const c=l(()=>M(E));n.set(o,c),Te(s)}}else D(a,E),Te(s);return!0},get(f,o,a){if(o===De)return e;var c=n.get(o),d=o in f;if(c===void 0&&(!d||se(f,o)?.writable)&&(c=l(()=>{var h=oe(d?f[o]:E),g=M(h);return g}),n.set(o,c)),c!==void 0){var u=N(c);return u===E?void 0:u}return Reflect.get(f,o,a)},getOwnPropertyDescriptor(f,o){var a=Reflect.getOwnPropertyDescriptor(f,o);if(a&&"value"in a){var c=n.get(o);c&&(a.value=N(c))}else if(a===void 0){var d=n.get(o),u=d?.v;if(d!==void 0&&u!==E)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return a},has(f,o){if(o===De)return!0;var a=n.get(o),c=a!==void 0&&a.v!==E||Reflect.has(f,o);if(a!==void 0||p!==null&&(!c||se(f,o)?.writable)){a===void 0&&(a=l(()=>{var u=c?oe(f[o]):E,h=M(u);return h}),n.set(o,a));var d=N(a);if(d===E)return!1}return c},set(f,o,a,c){var d=n.get(o),u=o in f;if(r&&o==="length")for(var h=a;h<d.v;h+=1){var g=n.get(h+"");g!==void 0?D(g,E):h in f&&(g=l(()=>M(E)),n.set(h+"",g))}if(d===void 0)(!u||se(f,o)?.writable)&&(d=l(()=>M(void 0)),D(d,oe(a)),n.set(o,d));else{u=d.v!==E;var w=l(()=>oe(a));D(d,w)}var T=Reflect.getOwnPropertyDescriptor(f,o);if(T?.set&&T.set.call(c,a),!u){if(r&&typeof o=="string"){var J=n.get("length"),v=Number(o);Number.isInteger(v)&&v>=J.v&&D(J,v+1)}Te(s)}return!0},ownKeys(f){N(s);var o=Reflect.ownKeys(f).filter(d=>{var u=n.get(d);return u===void 0||u.v!==E});for(var[a,c]of n)c.v!==E&&!(a in f)&&o.push(a);return o},setPrototypeOf(){Vn()}})}var Bt,Yt,Ut,Ht;function at(){if(Bt===void 0){Bt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=se(t,"firstChild").get,Ht=se(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 Ue(e=""){return document.createTextNode(e)}function He(e){return Ut.call(e)}function ne(e){return Ht.call(e)}function ut(e,t){if(!m)return He(e);var n=He(y);return n===null&&(n=y.appendChild(Ue())),ee(n),n}function hr(e,t=1,n=!1){let r=m?y:e;for(var s;t--;)s=r,r=ne(r);if(!m)return r;if(n&&r?.nodeType!==Dn){var i=Ue();return r===null?s?.after(i):r.before(i),ee(i),i}return ee(r),r}function dr(e){e.textContent=""}function ct(e){var t=_,n=p;x(null),I(null);try{return e()}finally{x(t),I(n)}}function vr(e){p===null&&(_===null&&qn(),Fn()),ue&&jn()}function _r(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Y(e,t,n){var r=p;r!==null&&(r.f&X)!==0&&(e|=X);var s={ctx:k,deps:null,nodes_start:null,nodes_end:null,f:e|O|F,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Ne(s),s.f|=Le}catch(f){throw B(s),f}else t!==null&&we(s);var i=s;if(n&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&ie)===0&&(i=i.first,(e&H)!==0&&(e&Me)!==0&&i!==null&&(i.f|=Me)),i!==null&&(i.parent=r,r!==null&&_r(i,r),_!==null&&(_.f&b)!==0&&(e&Z)===0)){var l=_;(l.effects??=[]).push(i)}return s}function Ve(){return _!==null&&!U}function Vt(e){const t=Y(et,null,!1);return R(t,S),t.teardown=e,t}function pr(e){vr();var t=p.f,n=!_&&(t&K)!==0&&(t&Le)===0;if(n){var r=k;(r.e??=[]).push(e)}else return Wt(e)}function Wt(e){return Y(Qe|Ln,e,!1)}function gr(e){q.ensure();const t=Y(Z|ie,e,!0);return()=>{B(t)}}function mr(e){q.ensure();const t=Y(Z|ie,e,!0);return(n={})=>new Promise(r=>{n.outro?ze(t,()=>{B(t),r(void 0)}):(B(t),r(void 0))})}function wr(e){return Y(Qe,e,!1)}function yr(e){return Y(nt|ie,e,!0)}function zt(e,t=0){return Y(et|t,e,!0)}function We(e,t=[],n=[],r=[]){ir(r,t,n,s=>{Y(et,()=>e(...s.map(N)),!0)})}function $r(e,t=0){var n=Y(H|t,e,!0);return n}function ae(e){return Y(K|ie,e,!0)}function Gt(e){var t=e.teardown;if(t!==null){const n=ue,r=_;Xt(!0),x(null);try{t.call(null)}finally{Xt(n),x(r)}}}function Jt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&ct(()=>{s.abort(ve)});var r=n.next;(n.f&Z)!==0?n.parent=null:B(n,t),n=r}}function br(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&K)===0&&B(t),t=n}}function B(e,t=!0){var n=!1;(t||(e.f&Et)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Er(e.nodes_start,e.nodes_end),n=!0),Jt(e,t&&!n),Je(e,0),R(e,W);var r=e.transitions;if(r!==null)for(const i of r)i.stop();Gt(e);var s=e.parent;s!==null&&s.first!==null&&Kt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Er(e,t){for(;e!==null;){var n=e===t?null:ne(e);e.remove(),e=n}}function Kt(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 ze(e,t,n=!0){var r=[];Zt(e,r,!0),xr(r,()=>{n&&B(e),t&&t()})}function xr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function Zt(e,t,n){if((e.f&X)===0){if(e.f^=X,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var s=r.next,i=(r.f&Me)!==0||(r.f&K)!==0&&(e.f&H)!==0;Zt(r,t,i?n:!1),r=s}}}function Tr(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:ne(n);t.append(n),n=s}}let re=!1;function Ge(e){re=e}let ue=!1;function Xt(e){ue=e}let _=null,U=!1;function x(e){_=e}let p=null;function I(e){p=e}let G=null;function Sr(e){_!==null&&(G===null?G=[e]:G.push(e))}let A=null,C=0,j=null;function Ar(e){j=e}let Qt=1,Se=0,ce=Se;function en(e){ce=e}function tn(){return++Qt}function Ae(e){var t=e.f;if((t&O)!==0)return!0;if(t&b&&(e.f&=~le),(t&V)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s];if(Ae(i)&&jt(i),i.wv>e.wv)return!0}(t&F)!==0&&P===null&&R(e,S)}return!1}function nn(e,t,n=!0){var r=e.reactions;if(r!==null&&!G?.includes(e))for(var s=0;s<r.length;s++){var i=r[s];(i.f&b)!==0?nn(i,t,!1):t===i&&(n?R(i,O):(i.f&S)!==0&&R(i,V),we(i))}}function rn(e){var t=A,n=C,r=j,s=_,i=G,l=k,f=U,o=ce,a=e.f;A=null,C=0,j=null,_=(a&(K|Z))===0?e:null,G=null,pe(e.ctx),U=!1,ce=++Se,e.ac!==null&&(ct(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=tt;var c=e.fn,d=c(),u=e.deps;if(A!==null){var h;if(Je(e,C),u!==null&&C>0)for(u.length=C+A.length,h=0;h<A.length;h++)u[C+h]=A[h];else e.deps=u=A;if(re&&Ve()&&(e.f&F)!==0)for(h=C;h<u.length;h++)(u[h].reactions??=[]).push(e)}else u!==null&&C<u.length&&(Je(e,C),u.length=C);if(Ot()&&j!==null&&!U&&u!==null&&(e.f&(b|V|O))===0)for(h=0;h<j.length;h++)nn(j[h],e);return s!==null&&s!==e&&(Se++,j!==null&&(r===null?r=j:r.push(...j))),(e.f&Q)!==0&&(e.f^=Q),d}catch(g){return kt(g)}finally{e.f^=tt,A=t,C=n,j=r,_=s,G=i,pe(l),U=f,ce=o}}function Nr(e,t){let n=t.reactions;if(n!==null){var r=Nn.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&b)!==0&&(A===null||!A.includes(t))&&(R(t,V),(t.f&F)!==0&&(t.f^=F,t.f&=~le),It(t),Je(t,0))}function Je(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Nr(e,n[r])}function Ne(e){var t=e.f;if((t&W)===0){R(e,S);var n=p,r=re;p=e,re=!0;try{(t&H)!==0?br(e):Jt(e),Gt(e);var s=rn(e);e.teardown=typeof s=="function"?s:null,e.wv=Qt;var i;Xe&&Xn&&(e.f&O)!==0&&e.deps}finally{re=r,p=n}}}function N(e){var t=e.f,n=(t&b)!==0;if(_!==null&&!U){var r=p!==null&&(p.f&W)!==0;if(!r&&!G?.includes(e)){var s=_.deps;if((_.f&tt)!==0)e.rv<Se&&(e.rv=Se,A===null&&s!==null&&s[C]===e?C++:A===null?A=[e]:A.includes(e)||A.push(e));else{(_.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[_]:i.includes(_)||i.push(_)}}}if(ue){if(te.has(e))return te.get(e);if(n){var l=e,f=l.v;return((l.f&S)===0&&l.reactions!==null||ln(l))&&(f=ft(l)),te.set(l,f),f}}else n&&!P?.has(e)&&(l=e,Ae(l)&&jt(l),re&&Ve()&&(l.f&F)===0&&sn(l));if(P?.has(e))return P.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function sn(e){if(e.deps!==null){e.f^=F;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&b)!==0&&(t.f&F)===0&&sn(t)}}function ln(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(te.has(t)||(t.f&b)!==0&&ln(t))return!0;return!1}function fn(e){var t=U;try{return U=!0,e()}finally{U=t}}const Rr=-7169;function R(e,t){e.f=e.f&Rr|t}const Or=new Set,on=new Set;function Cr(e,t,n,r={}){function s(i){if(r.capture||Re.call(t,i),!i.cancelBubble)return ct(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?je(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function kr(e,t,n,r,s){var i={capture:r,passive:s},l=Cr(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Vt(()=>{t.removeEventListener(e,l,i)})}let an=null;function Re(e){var t=this,n=t.ownerDocument,r=e.type,s=e.composedPath?.()||[],i=s[0]||e.target;an=e;var l=0,f=an===e&&e.__root;if(f){var o=s.indexOf(f);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var a=s.indexOf(t);if(a===-1)return;o<=a&&(l=o)}if(i=s[l]||e.target,i!==t){ke(e,"currentTarget",{configurable:!0,get(){return i||n}});var c=_,d=p;x(null),I(null);try{for(var u,h=[];i!==null;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var w=i["__"+r];w!=null&&(!i.disabled||e.target===i)&&w.call(i,e)}catch(T){u?h.push(T):u=T}if(e.cancelBubble||g===t||g===null)break;i=g}if(u){for(let T of h)queueMicrotask(()=>{throw T});throw u}}finally{e.__root=t,delete e.currentTarget,x(c),I(d)}}}function Pr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ht(e,t){var n=p;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function Lr(e,t){var n=(t&Tn)!==0,r,s=!e.startsWith("<!>");return()=>{if(m)return ht(y,null),y;r===void 0&&(r=Pr(s?e:"<!>"+e),r=He(r));var i=n||Yt?document.importNode(r,!0):r.cloneNode(!0);return ht(i,i),i}}function un(e,t){if(m){var n=p;((n.f&Le)===0||n.nodes_end===null)&&(n.nodes_end=y),Tt();return}e!==null&&e.before(t)}const Mr=["touchstart","touchmove"];function Dr(e){return Mr.includes(e)}function cn(e,t){return hn(e,t)}function Ir(e,t){at(),t.intro=t.intro??!1;const n=t.target,r=m,s=y;try{for(var i=He(n);i&&(i.nodeType!==Ie||i.data!==pt);)i=ne(i);if(!i)throw be;_e(!0),ee(i);const l=hn(e,{...t,anchor:i});return _e(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
- `).some(f=>f.startsWith("https://svelte.dev/e/")))throw l;return l!==be&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Yn(),at(),dr(n),_e(!1),cn(e,t)}finally{_e(r),ee(s)}}const ye=new Map;function hn(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:l=!0}){at();var f=new Set,o=d=>{for(var u=0;u<d.length;u++){var h=d[u];if(!f.has(h)){f.add(h);var g=Dr(h);t.addEventListener(h,Re,{passive:g});var w=ye.get(h);w===void 0?(document.addEventListener(h,Re,{passive:g}),ye.set(h,1)):ye.set(h,w+1)}}};o(Rn(Or)),on.add(o);var a=void 0,c=mr(()=>{var d=n??t.appendChild(Ue());return rr(d,{pending:()=>{}},u=>{if(i){Nt({});var h=k;h.c=i}if(s&&(r.$$events=s),m&&ht(u,null),a=e(u,r)||{},m&&(p.nodes_end=y,y===null||y.nodeType!==Ie||y.data!==mt))throw rt(),be;i&&Rt()}),()=>{for(var u of f){t.removeEventListener(u,Re);var h=ye.get(u);--h===0?(document.removeEventListener(u,Re),ye.delete(u)):ye.set(u,h)}on.delete(o),d!==n&&d.parentNode?.removeChild(d)}});return dt.set(a,c),a}let dt=new WeakMap;function jr(e,t){const n=dt.get(e);return n?(dt.delete(e),n(t)):Promise.resolve()}function Fr(e,t){wr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,r.appendChild(s)}})}function qr(e,t,n){var r=""+e;return r}function Br(e,t){return e==null?null:String(e)}function Yr(e,t,n,r,s,i){var l=e.__className;if(m||l!==n||l===void 0){var f=qr(n);(!m||f!==e.getAttribute("class"))&&(f==null?e.removeAttribute("class"):e.className=f),e.__className=n}return i}function dn(e,t,n,r){var s=e.__style;if(m||s!==t){var i=Br(t);(!m||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e.__style=t}return r}const Ur=Symbol("is custom element"),Hr=Symbol("is html");function Vr(e,t,n,r){var s=Wr(e);m&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[Mn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&vn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function he(e,t,n){var r=_,s=p;let i=m;m&&_e(!1),x(null),I(null);try{t!=="style"&&(vt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?vn(e).includes(t):n&&typeof n=="object")?e[t]=n:Vr(e,t,n==null?n:String(n))}finally{x(r),I(s),i&&_e(!0)}}function Wr(e){return e.__attributes??={[Ur]:e.nodeName.includes("-"),[Hr]:e.namespaceURI===Sn}}var vt=new Map;function vn(e){var t=e.getAttribute("is")||e.nodeName,n=vt.get(t);if(n)return n;vt.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=On(s);for(var l in r)r[l].set&&n.push(l);s=wt(s)}return n}let Ke=!1;function zr(e){var t=Ke;try{return Ke=!1,[e(),Ke]}finally{Ke=t}}function Oe(e,t,n,r){var s=(n&En)!==0,i=(n&xn)!==0,l=r,f=!0,o=()=>(f&&(f=!1,l=i?fn(r):r),l),a;if(s){var c=De in e||xt in e;a=se(e,t)?.set??(c&&t in e?v=>e[t]=v:void 0)}var d,u=!1;s?[d,u]=zr(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=o(),a&&(Un(),a(d)));var h;if(h=()=>{var v=e[t];return v===void 0?o():(f=!0,v)},(n&bn)===0)return h;if(a){var g=e.$$legacy;return(function(v,$e){return arguments.length>0?((!$e||g||u)&&a($e?h():v),v):h()})}var w=!1,T=((n&$n)!==0?lt:or)(()=>(w=!1,h()));s&&N(T);var J=p;return(function(v,$e){if(arguments.length>0){const yn=$e?N(T):s?oe(v):v;return D(T,yn),w=!0,l!==void 0&&(l=yn),v}return ue&&w||(J.f&W)!==0?T.v:N(T)})}function Gr(e){return new Jr(e)}class Jr{#t;#e;constructor(t){var n=new Map,r=(i,l)=>{var f=ur(l,!1,!1);return n.set(i,f),f};const s=new Proxy({...t.props||{},$$events:{}},{get(i,l){return N(n.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===xt?!0:(N(n.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,f){return D(n.get(l)??r(l,f),f),Reflect.set(i,l,f)}});this.#e=(t.hydrate?Ir:cn)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&me(),this.#t=s.$$events;for(const i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||ke(this,i,{get(){return this.#e[i]},set(l){this.#e[i]=l},enumerable:!0});this.#e.$set=i=>{Object.assign(s,i)},this.#e.$destroy=()=>{jr(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...s)=>n.call(this,...s);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(s=>s!==r)}}$destroy(){this.#e.$destroy()}}let _n;typeof HTMLElement=="function"&&(_n=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return s=>{const i=document.createElement("slot");r!=="default"&&(i.name=r),un(s,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Kr(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=Ze(s,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Gr({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=gr(()=>{zt(()=>{this.$$r=!0;for(const r of Ce(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const s=Ze(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1})});for(const r in this.$$l)for(const s of this.$$l[r]){const i=this.$$c.$on(r,s);this.$$l_u.set(s,i)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ze(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ce(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ze(e,t,n,r){const s=n[e]?.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Kr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Zr(e,t,n,r,s,i){let l=class extends _n{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Ce(t).map(f=>(t[f].attribute||f).toLowerCase())}};return Ce(t).forEach(f=>{ke(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(o){o=Ze(f,o,t),this.$$d[f]=o;var a=this.$$c;if(a){var c=se(a,f)?.get;c?a[f]=o:a.$set({[f]:o})}}})}),r.forEach(f=>{ke(l.prototype,f,{get(){return this.$$c?.[f]}})}),e.element=l,l}const pn={version:"0.65.23"};var de={},gn;function Xr(){if(gn)return de;gn=1,Object.defineProperty(de,"__esModule",{value:!0}),de.LanguageTranslator=void 0,de.getChildStyleToPass=e,de.addComponent=t;function e(r,s){var i,l,f="";try{if(r&&s?.length&&(!((i=Object.keys(r))===null||i===void 0)&&i.length)&&(!((l=s?.filter(function(u){return Object.keys(r).includes(u.name)}))===null||l===void 0)&&l.length))for(var o=function(u){var h=s?.filter(function(g){return g.name===u&&g.defaultValue!==r[u]});h&&(f+="".concat(u,":").concat(r[u],";"))},a=0,c=Object.keys(r);a<c.length;a++){var d=c[a];o(d)}}catch(u){console.error("error getting child style to pass",u)}finally{return f}}function t(r){var s,i=((s=r?.repoName.split("/"))===null||s===void 0?void 0:s[1])||r?.repoName;if(!i)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(i+"-script"))try{var f=document.createElement("script");if(f.id=i+"-script",f.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)f.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var o=i.split("-")[0];f.src="http://localhost:6006/webcomponents/".concat(i.replace(o+"-",""),"/").concat(l)}document.head.appendChild(f)}catch(a){console.warn(a)}}var n=(function(){function r(s){if(this.lang="",!s?.dictionary)throw new Error("no dictionary provided");this.dictionary=s.dictionary,this.setLang(s?.lang)}return r.prototype.setLang=function(s){s||(s=r.getDefaultLang()),this.lang=s},r.prototype.translateWord=function(s,i){return r.getDictionaryWord(s,this.dictionary,i||this.lang)},r.prototype.translateDate=function(s,i,l){return r.formatDate(s,i,l||this.lang)},r.getDefaultLang=function(){var s,i,l,f="en";return navigator?.languages&&(!((l=(i=(s=navigator.languages[0])===null||s===void 0?void 0:s.split("-")[0])===null||i===void 0?void 0:i.toLowerCase())===null||l===void 0)&&l.length)&&(f=navigator.languages[0].split("-")[0].toLowerCase()),f},r.getDictionaryWord=function(s,i,l){var f;if(!s)throw new Error("no wordKey provided");if(!i)throw new Error("no dictionary provided");if(l&&(!((f=i[l])===null||f===void 0)&&f[s]))return i[l][s];var o="",a=r.getDefaultLang();if(!l||a!==l){var c=i?.[a];c?.[s]&&(o=c[s])}return o},r.formatDate=function(s,i,l){if(!s)throw new Error("no date provided");if(typeof s.getMonth!="function")throw new Error("wrong date format");var f=new Intl.DateTimeFormat(l||r.getDefaultLang(),i);return f.format(s)},r})();return de.LanguageTranslator=n,de}var mn=Xr(),Qr=Lr('<div id="compocontainer" class="svelte-11p6sry"><div id="list" class="svelte-11p6sry"><hb-messages-list></hb-messages-list></div> <div id="prompt" class="svelte-11p6sry"><hb-messages-send></hb-messages-send></div></div>',2);const es={hash:"svelte-11p6sry",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
- @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host {font-family:"Roboto", sans-serif;display:block;overflow:hidden;height:fit-content;min-height:100px;}#compocontainer.svelte-11p6sry {display:grid;grid-template-areas:"messages" "prompt";overflow:hidden;grid-template-rows:1fr 180px;height:100%;min-height:200px;}#list.svelte-11p6sry {overflow-y:auto;grid-area:messages;min-height:0;height:100%;}#list.svelte-11p6sry hb-messages-list:where(.svelte-11p6sry) {height:100%;display:block;}#prompt.svelte-11p6sry {grid-area:prompt;width:90%;max-width:1600px;margin:0 auto;}.msglist.svelte-11p6sry {width:90%;max-width:1400px;margin:0 auto;}`};function wn(e,t){Nt(t,!0),Fr(e,es);function n(v,$e){t.$$host.dispatchEvent(new CustomEvent(v,{detail:$e}))}let r=Oe(t,"id",7,""),s=Oe(t,"messages",7),i=Oe(t,"authors",7),l=Oe(t,"options",7),f=Oe(t,"message",23,()=>({text:""})),o=M(""),a=M("");oe({});let c=M("");pr(()=>{if(typeof f()=="string")try{f(JSON.parse(f())),D(c,f()?.text?f().text:"",!0)}catch(v){console.error("error parsing message",v)}});function d(v){if(!v?.file&&!v?.text)return console.warn("no message to received",v);n("sendMessage",v),D(c,v.text,!0),D(c,"")}mn.addComponent({repoName:"@htmlbricks/hb-messages-list",version:pn.version}),mn.addComponent({repoName:"@htmlbricks/hb-messages-send",version:pn.version});var u={get id(){return r()},set id(v=""){r(v),me()},get messages(){return s()},set messages(v){s(v),me()},get authors(){return i()},set authors(v){i(v),me()},get options(){return l()},set options(v){l(v),me()},get message(){return f()},set message(v={text:""}){f(v),me()}},h=Qr(),g=ut(h),w=ut(g);he(w,"id","message-list"),We(()=>he(w,"messages",s())),We(()=>he(w,"authors",i())),We(()=>he(w,"options",l())),dn(w,N(o)),Yr(w,1,"msglist svelte-11p6sry"),he(w,"part","msglist"),st(g);var T=hr(g,2),J=ut(T);return We(()=>he(J,"text",N(c))),he(J,"part","msgsend"),dn(J,N(a)),st(T),st(h),kr("sendMessage",J,v=>d(v.detail)),un(e,h),Rt(u)}customElements.define("hb-messages-box",Zr(wn,{id:{},messages:{},authors:{},options:{},message:{}},[],[],!0)),_t.Component=wn,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})})(this["messages-box"]=this["messages-box"]||{});
1
+ (function(_t){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const yn=1,$n=4,bn=8,En=16,xn=2,pt="[",gt="[!",mt="]",$e={},E=Symbol(),Tn="http://www.w3.org/1999/xhtml",Xe=!1;var Nn=Array.isArray,An=Array.prototype.indexOf,Sn=Array.from,Oe=Object.keys,Ce=Object.defineProperty,re=Object.getOwnPropertyDescriptor,Rn=Object.getOwnPropertyDescriptors,On=Object.prototype,Cn=Array.prototype,wt=Object.getPrototypeOf,yt=Object.isExtensible;function kn(e){for(var t=0;t<e.length;t++)e[t]()}function $t(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const $=2,Qe=4,et=8,U=16,J=32,K=64,ke=128,j=512,T=1024,R=2048,H=4096,Z=8192,V=16384,Pe=32768,Le=65536,bt=1<<17,Et=1<<18,ie=1<<19,Pn=1<<20,se=32768,tt=1<<21,nt=1<<22,X=1<<23,Me=Symbol("$state"),xt=Symbol("legacy props"),Ln=Symbol(""),he=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Mn=3,De=8;function Dn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function In(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 Fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function qn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Yn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Un(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Vn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Wn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function rt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function zn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let m=!1;function de(e){m=e}let w;function Q(e){if(e===null)throw rt(),$e;return w=e}function Tt(){return Q(te(w))}function it(e){if(m){if(te(w)!==null)throw rt(),$e;w=e}}function Gn(e=1){if(m){for(var t=e,n=w;t--;)n=te(n);w=n}}function Jn(e=!0){for(var t=0,n=w;;){if(n.nodeType===De){var r=n.data;if(r===mt){if(t===0)return n;t-=1}else(r===pt||r===gt)&&(t+=1)}var i=te(n);e&&n.remove(),n=i}}function Nt(e){return e===this.v}function Kn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function At(e){return!Kn(e,this.v)}let Zn=!1,k=null;function ve(e){k=e}function St(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,l:null}}function Rt(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)Wt(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,e??{}}function Ot(){return!0}let le=[];function Ct(){var e=le;le=[],kn(e)}function Ie(e){if(le.length===0&&!be){var t=le;queueMicrotask(()=>{t===le&&Ct()})}le.push(e)}function Xn(){for(;le.length>0;)Ct()}function kt(e){var t=p;if(t===null)return _.f|=X,e;if((t.f&Pe)===0){if((t.f&ke)===0)throw e;t.b.error(e)}else _e(e,t)}function _e(e,t){for(;t!==null;){if((t.f&ke)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const je=new Set;let y=null,P=null,L=[],Fe=null,st=!1,be=!1;class F{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#o=0;#s=0;#a=null;#l=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){L=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#n(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#r(n.effects),this.#r(n.render_effects),this.#r(n.block_effects)):(y=null,Lt(n.render_effects),Lt(n.effects),this.#a?.resolve()),P=null}#n(t,n){t.f^=T;for(var r=t.first;r!==null;){var i=r.f,s=(i&(J|K))!==0,l=s&&(i&T)!==0,f=l||(i&Z)!==0||this.skipped_effects.has(r);if((r.f&ke)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!f&&r.fn!==null){s?r.f^=T:(i&Qe)!==0?n.effects.push(r):Ne(r)&&((r.f&U)!==0&&n.block_effects.push(r),Ae(r));var o=r.first;if(o!==null){r=o;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#r(n.effects),this.#r(n.render_effects),this.#r(n.block_effects),n=n.parent),r=a.next,a=a.parent}}#r(t){for(const n of t)((n.f&R)!==0?this.#l:this.#i).push(n),this.#f(n.deps),A(n,T)}#f(t){if(t!==null)for(const n of t)(n.f&$)===0||(n.f&se)===0||(n.f^=se,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&X)===0&&(this.current.set(t,t.v),P?.set(t,t.v))}activate(){y=this,this.apply()}deactivate(){y===this&&(y=null,P=null)}flush(){if(this.activate(),L.length>0){if(Pt(),y!==null&&y!==this)return}else this.#o===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#s===0){for(const t of this.#t)t();this.#t.clear()}this.#o===0&&this.#c()}#c(){if(je.size>1){this.previous.clear();var t=P,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of je){if(s===this){n=!1;continue}const l=[];for(const[o,a]of this.current){if(s.current.has(o))if(n&&a!==s.current.get(o))s.current.set(o,a);else continue;l.push(o)}if(l.length===0)continue;const f=[...s.current.keys()].filter(o=>!this.current.has(o));if(f.length>0){var i=L;L=[];const o=new Set,a=new Map;for(const h of l)Mt(h,f,o,a);if(L.length>0){y=s,s.apply();for(const h of L)s.#n(h,r);s.deactivate()}L=i}}y=null,P=t}this.committed=!0,je.delete(this)}increment(t){this.#o+=1,t&&(this.#s+=1)}decrement(t){this.#o-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#l)A(t,R),ge(t);for(const t of this.#i)A(t,H),ge(t);this.#l=[],this.#i=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=$t()).promise}static ensure(){if(y===null){const t=y=new F;je.add(y),be||F.enqueue(()=>{y===t&&t.flush()})}return y}static enqueue(t){Ie(t)}apply(){}}function pe(e){var t=be;be=!0;try{for(var n;;){if(Xn(),L.length===0&&(y?.flush(),L.length===0))return Fe=null,n;Pt()}}finally{be=t}}function Pt(){var e=ne;st=!0;var t=null;try{var n=0;for(ze(!0);L.length>0;){var r=F.ensure();if(n++>1e3){var i,s;Qn()}r.process(L),ee.clear()}}finally{st=!1,ze(e),Fe=null}}function Qn(){try{qn()}catch(e){_e(e,Fe)}}let W=null;function Lt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|Z))===0&&Ne(r)&&(W=new Set,Ae(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Kt(r):r.fn=null),W?.size>0)){ee.clear();for(const i of W){if((i.f&(V|Z))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)W.has(l)&&(W.delete(l),s.push(l)),l=l.parent;for(let f=s.length-1;f>=0;f--){const o=s[f];(o.f&(V|Z))===0&&Ae(o)}}W.clear()}}W=null}}function Mt(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&$)!==0?Mt(i,t,n,r):(s&(nt|U))!==0&&(s&R)===0&&Dt(i,t,r)&&(A(i,R),ge(i))}}function Dt(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(t.includes(i))return!0;if((i.f&$)!==0&&Dt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function ge(e){for(var t=Fe=e;t.parent!==null;){t=t.parent;var n=t.f;if(st&&t===p&&(n&U)!==0&&(n&Et)===0)return;if((n&(K|J))!==0){if((n&T)===0)return;t.f^=T}}L.push(t)}function er(e){let t=0,n=Ee(0),r;return()=>{He()&&(C(n),zt(()=>(t===0&&(r=fn(()=>e(()=>xe(n)))),t+=1,()=>{Ie(()=>{t-=1,t===0&&(r?.(),r=void 0,xe(n))})})))}}var tr=Le|ie|ke;function nr(e,t,n){new rr(e,t,n)}class rr{parent;#t=!1;#e;#o=m?w:null;#s;#a;#l;#i=null;#n=null;#r=null;#f=null;#u=null;#c=0;#h=0;#v=!1;#d=null;#w=er(()=>(this.#d=Ee(this.#c),()=>{this.#d=null}));constructor(t,n,r){this.#e=t,this.#s=n,this.#a=r,this.parent=p.b,this.#t=!!this.#s.pending,this.#l=yr(()=>{if(p.b=this,m){const s=this.#o;Tt(),s.nodeType===De&&s.data===gt?this.#$():this.#y()}else{var i=this.#g();try{this.#i=fe(()=>r(i))}catch(s){this.error(s)}this.#h>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},tr),m&&(this.#e=w)}#y(){try{this.#i=fe(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#$(){const t=this.#s.pending;t&&(this.#n=fe(()=>t(this.#e)),F.enqueue(()=>{var n=this.#g();this.#i=this.#_(()=>(F.ensure(),fe(()=>this.#a(n)))),this.#h>0?this.#p():(We(this.#n,()=>{this.#n=null}),this.#t=!1)}))}#g(){var t=this.#e;return this.#t&&(this.#u=Ye(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#s.pending}#_(t){var n=p,r=_,i=k;D(this.#l),x(this.#l),ve(this.#l.ctx);try{return t()}catch(s){return kt(s),null}finally{D(n),x(r),ve(i)}}#p(){const t=this.#s.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),xr(this.#i,this.#f)),this.#n===null&&(this.#n=fe(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#h+=t,this.#h===0&&(this.#t=!1,this.#n&&We(this.#n,()=>{this.#n=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#d&&Be(this.#d,this.#c)}get_effect_pending(){return this.#w(),C(this.#d)}error(t){var n=this.#s.onerror;let r=this.#s.failed;if(this.#v||!n&&!r)throw t;this.#i&&(q(this.#i),this.#i=null),this.#n&&(q(this.#n),this.#n=null),this.#r&&(q(this.#r),this.#r=null),m&&(Q(this.#o),Gn(),Q(Jn()));var i=!1,s=!1;const l=()=>{if(i){zn();return}i=!0,s&&Wn(),F.ensure(),this.#c=0,this.#r!==null&&We(this.#r,()=>{this.#r=null}),this.#t=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,fe(()=>this.#a(this.#e)))),this.#h>0?this.#p():this.#t=!1};var f=_;try{x(null),s=!0,n?.(t,l),s=!1}catch(o){_e(o,this.#l&&this.#l.parent)}finally{x(f)}r&&Ie(()=>{this.#r=this.#_(()=>{F.ensure(),this.#v=!0;try{return fe(()=>{r(this.#e,()=>t,()=>l)})}catch(o){return _e(o,this.#l.parent),null}finally{this.#v=!1}})})}}function ir(e,t,n,r){const i=lt;if(n.length===0&&e.length===0){r(t.map(i));return}var s=y,l=p,f=sr();function o(){Promise.all(n.map(a=>lr(a))).then(a=>{f();try{r([...t.map(i),...a])}catch(h){(l.f&V)===0&&_e(h,l)}s?.deactivate(),qe()}).catch(a=>{_e(a,l)})}e.length>0?Promise.all(e).then(()=>{f();try{return o()}finally{s?.deactivate(),qe()}}):o()}function sr(){var e=p,t=_,n=k,r=y;return function(s=!0){D(e),x(t),ve(n),s&&r?.activate()}}function qe(){D(null),x(null),ve(null)}function lt(e){var t=$|R,n=_!==null&&(_.f&$)!==0?_:null;return p!==null&&(p.f|=ie),{ctx:k,deps:null,effects:null,equals:Nt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??p,ac:null}}function lr(e,t){let n=p;n===null&&Dn();var r=n.b,i=void 0,s=Ee(E),l=!_,f=new Map;return wr(()=>{var o=$t();i=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{a===y&&a.committed&&a.deactivate(),qe()})}catch(u){o.reject(u),qe()}var a=y;if(l){var h=!r.is_pending();r.update_pending_count(1),a.increment(h),f.get(a)?.reject(he),f.delete(a),f.set(a,o)}const d=(u,c=void 0)=>{if(a.activate(),c)c!==he&&(s.f|=X,Be(s,c));else{(s.f&X)!==0&&(s.f^=X),Be(s,u);for(const[g,b]of f){if(f.delete(g),g===a)break;b.reject(he)}}l&&(r.update_pending_count(-1),a.decrement(h))};o.promise.then(d,u=>d(null,u||"unknown"))}),Vt(()=>{for(const o of f.values())o.reject(he)}),new Promise(o=>{function a(h){function d(){h===i?o(s):a(i)}h.then(d,d)}a(i)})}function fr(e){const t=lt(e);return t.equals=At,t}function It(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)q(t[n])}}function or(e){for(var t=e.parent;t!==null;){if((t.f&$)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function ft(e){var t,n=p;D(or(e));try{e.f&=~se,It(e),t=rn(e)}finally{D(n)}return t}function jt(e){var t=ft(e);if(e.equals(t)||(y?.is_fork||(e.v=t),e.wv=tn()),!oe)if(P!==null)He()&&P.set(e,t);else{var n=(e.f&j)===0?H:T;A(e,n)}}let ot=new Set;const ee=new Map;let Ft=!1;function Ee(e,t){var n={f:0,v:e,reactions:null,equals:Nt,rv:0,wv:0};return n}function z(e,t){const n=Ee(e);return Tr(n),n}function ar(e,t=!1,n=!0){const r=Ee(e);return t||(r.equals=At),r}function M(e,t,n=!1){_!==null&&(!Y||(_.f&bt)!==0)&&Ot()&&(_.f&($|U|nt|bt))!==0&&!G?.includes(e)&&Vn();let r=n?me(t):t;return Be(e,r)}function Be(e,t){if(!e.equals(t)){var n=e.v;oe?ee.set(e,t):ee.set(e,n),e.v=t;var r=F.ensure();r.capture(e,n),(e.f&$)!==0&&((e.f&R)!==0&&ft(e),A(e,(e.f&j)!==0?T:H)),e.wv=tn(),qt(e,R),p!==null&&(p.f&T)!==0&&(p.f&(J|K))===0&&(I===null?Nr([e]):I.push(e)),!r.is_fork&&ot.size>0&&!Ft&&ur()}return t}function ur(){Ft=!1;var e=ne;ze(!0);const t=Array.from(ot);try{for(const n of t)(n.f&T)!==0&&A(n,H),Ne(n)&&Ae(n)}finally{ze(e)}ot.clear()}function xe(e){M(e,e.v+1)}function qt(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],l=s.f,f=(l&R)===0;if(f&&A(s,t),(l&$)!==0){var o=s;P?.delete(o),(l&se)===0&&(l&j&&(s.f|=se),qt(o,H))}else f&&((l&U)!==0&&W!==null&&W.add(s),ge(s))}}function me(e){if(typeof e!="object"||e===null||Me in e)return e;const t=wt(e);if(t!==On&&t!==Cn)return e;var n=new Map,r=Nn(e),i=z(0),s=ae,l=f=>{if(ae===s)return f();var o=_,a=ae;x(null),en(s);var h=f();return x(o),en(a),h};return r&&n.set("length",z(e.length)),new Proxy(e,{defineProperty(f,o,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Un();var h=n.get(o);return h===void 0?h=l(()=>{var d=z(a.value);return n.set(o,d),d}):M(h,a.value,!0),!0},deleteProperty(f,o){var a=n.get(o);if(a===void 0){if(o in f){const h=l(()=>z(E));n.set(o,h),xe(i)}}else M(a,E),xe(i);return!0},get(f,o,a){if(o===Me)return e;var h=n.get(o),d=o in f;if(h===void 0&&(!d||re(f,o)?.writable)&&(h=l(()=>{var c=me(d?f[o]:E),g=z(c);return g}),n.set(o,h)),h!==void 0){var u=C(h);return u===E?void 0:u}return Reflect.get(f,o,a)},getOwnPropertyDescriptor(f,o){var a=Reflect.getOwnPropertyDescriptor(f,o);if(a&&"value"in a){var h=n.get(o);h&&(a.value=C(h))}else if(a===void 0){var d=n.get(o),u=d?.v;if(d!==void 0&&u!==E)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return a},has(f,o){if(o===Me)return!0;var a=n.get(o),h=a!==void 0&&a.v!==E||Reflect.has(f,o);if(a!==void 0||p!==null&&(!h||re(f,o)?.writable)){a===void 0&&(a=l(()=>{var u=h?me(f[o]):E,c=z(u);return c}),n.set(o,a));var d=C(a);if(d===E)return!1}return h},set(f,o,a,h){var d=n.get(o),u=o in f;if(r&&o==="length")for(var c=a;c<d.v;c+=1){var g=n.get(c+"");g!==void 0?M(g,E):c in f&&(g=l(()=>z(E)),n.set(c+"",g))}if(d===void 0)(!u||re(f,o)?.writable)&&(d=l(()=>z(void 0)),M(d,me(a)),n.set(o,d));else{u=d.v!==E;var b=l(()=>me(a));M(d,b)}var v=Reflect.getOwnPropertyDescriptor(f,o);if(v?.set&&v.set.call(h,a),!u){if(r&&typeof o=="string"){var ye=n.get("length"),S=Number(o);Number.isInteger(S)&&S>=ye.v&&M(ye,S+1)}xe(i)}return!0},ownKeys(f){C(i);var o=Reflect.ownKeys(f).filter(d=>{var u=n.get(d);return u===void 0||u.v!==E});for(var[a,h]of n)h.v!==E&&!(a in f)&&o.push(a);return o},setPrototypeOf(){Hn()}})}var Bt,Yt,Ut,Ht;function at(){if(Bt===void 0){Bt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=re(t,"firstChild").get,Ht=re(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 Ue(e){return Ut.call(e)}function te(e){return Ht.call(e)}function ut(e,t){if(!m)return Ue(e);var n=Ue(w);return n===null&&(n=w.appendChild(Ye())),Q(n),n}function cr(e,t=1,n=!1){let r=m?w:e;for(var i;t--;)i=r,r=te(r);if(!m)return r;if(n&&r?.nodeType!==Mn){var s=Ye();return r===null?i?.after(s):r.before(s),Q(s),s}return Q(r),r}function hr(e){e.textContent=""}function ct(e){var t=_,n=p;x(null),D(null);try{return e()}finally{x(t),D(n)}}function dr(e){p===null&&(_===null&&Fn(),jn()),oe&&In()}function vr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function B(e,t,n){var r=p;r!==null&&(r.f&Z)!==0&&(e|=Z);var i={ctx:k,deps:null,nodes_start:null,nodes_end:null,f:e|R|j,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Ae(i),i.f|=Pe}catch(f){throw q(i),f}else t!==null&&ge(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&ie)===0&&(s=s.first,(e&U)!==0&&(e&Le)!==0&&s!==null&&(s.f|=Le)),s!==null&&(s.parent=r,r!==null&&vr(s,r),_!==null&&(_.f&$)!==0&&(e&K)===0)){var l=_;(l.effects??=[]).push(s)}return i}function He(){return _!==null&&!Y}function Vt(e){const t=B(et,null,!1);return A(t,T),t.teardown=e,t}function _r(e){dr();var t=p.f,n=!_&&(t&J)!==0&&(t&Pe)===0;if(n){var r=k;(r.e??=[]).push(e)}else return Wt(e)}function Wt(e){return B(Qe|Pn,e,!1)}function pr(e){F.ensure();const t=B(K|ie,e,!0);return()=>{q(t)}}function gr(e){F.ensure();const t=B(K|ie,e,!0);return(n={})=>new Promise(r=>{n.outro?We(t,()=>{q(t),r(void 0)}):(q(t),r(void 0))})}function mr(e){return B(Qe,e,!1)}function wr(e){return B(nt|ie,e,!0)}function zt(e,t=0){return B(et|t,e,!0)}function Ve(e,t=[],n=[],r=[]){ir(r,t,n,i=>{B(et,()=>e(...i.map(C)),!0)})}function yr(e,t=0){var n=B(U|t,e,!0);return n}function fe(e){return B(J|ie,e,!0)}function Gt(e){var t=e.teardown;if(t!==null){const n=oe,r=_;Xt(!0),x(null);try{t.call(null)}finally{Xt(n),x(r)}}}function Jt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&ct(()=>{i.abort(he)});var r=n.next;(n.f&K)!==0?n.parent=null:q(n,t),n=r}}function $r(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&J)===0&&q(t),t=n}}function q(e,t=!0){var n=!1;(t||(e.f&Et)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(br(e.nodes_start,e.nodes_end),n=!0),Jt(e,t&&!n),Ge(e,0),A(e,V);var r=e.transitions;if(r!==null)for(const s of r)s.stop();Gt(e);var i=e.parent;i!==null&&i.first!==null&&Kt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function br(e,t){for(;e!==null;){var n=e===t?null:te(e);e.remove(),e=n}}function Kt(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 We(e,t,n=!0){var r=[];Zt(e,r,!0),Er(r,()=>{n&&q(e),t&&t()})}function Er(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Zt(e,t,n){if((e.f&Z)===0){if(e.f^=Z,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var i=r.next,s=(r.f&Le)!==0||(r.f&J)!==0&&(e.f&U)!==0;Zt(r,t,s?n:!1),r=i}}}function xr(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:te(n);t.append(n),n=i}}let ne=!1;function ze(e){ne=e}let oe=!1;function Xt(e){oe=e}let _=null,Y=!1;function x(e){_=e}let p=null;function D(e){p=e}let G=null;function Tr(e){_!==null&&(G===null?G=[e]:G.push(e))}let N=null,O=0,I=null;function Nr(e){I=e}let Qt=1,Te=0,ae=Te;function en(e){ae=e}function tn(){return++Qt}function Ne(e){var t=e.f;if((t&R)!==0)return!0;if(t&$&&(e.f&=~se),(t&H)!==0){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i];if(Ne(s)&&jt(s),s.wv>e.wv)return!0}(t&j)!==0&&P===null&&A(e,T)}return!1}function nn(e,t,n=!0){var r=e.reactions;if(r!==null&&!G?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];(s.f&$)!==0?nn(s,t,!1):t===s&&(n?A(s,R):(s.f&T)!==0&&A(s,H),ge(s))}}function rn(e){var t=N,n=O,r=I,i=_,s=G,l=k,f=Y,o=ae,a=e.f;N=null,O=0,I=null,_=(a&(J|K))===0?e:null,G=null,ve(e.ctx),Y=!1,ae=++Te,e.ac!==null&&(ct(()=>{e.ac.abort(he)}),e.ac=null);try{e.f|=tt;var h=e.fn,d=h(),u=e.deps;if(N!==null){var c;if(Ge(e,O),u!==null&&O>0)for(u.length=O+N.length,c=0;c<N.length;c++)u[O+c]=N[c];else e.deps=u=N;if(ne&&He()&&(e.f&j)!==0)for(c=O;c<u.length;c++)(u[c].reactions??=[]).push(e)}else u!==null&&O<u.length&&(Ge(e,O),u.length=O);if(Ot()&&I!==null&&!Y&&u!==null&&(e.f&($|H|R))===0)for(c=0;c<I.length;c++)nn(I[c],e);return i!==null&&i!==e&&(Te++,I!==null&&(r===null?r=I:r.push(...I))),(e.f&X)!==0&&(e.f^=X),d}catch(g){return kt(g)}finally{e.f^=tt,N=t,O=n,I=r,_=i,G=s,ve(l),Y=f,ae=o}}function Ar(e,t){let n=t.reactions;if(n!==null){var r=An.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(t.f&$)!==0&&(N===null||!N.includes(t))&&(A(t,H),(t.f&j)!==0&&(t.f^=j,t.f&=~se),It(t),Ge(t,0))}function Ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ar(e,n[r])}function Ae(e){var t=e.f;if((t&V)===0){A(e,T);var n=p,r=ne;p=e,ne=!0;try{(t&U)!==0?$r(e):Jt(e),Gt(e);var i=rn(e);e.teardown=typeof i=="function"?i:null,e.wv=Qt;var s;Xe&&Zn&&(e.f&R)!==0&&e.deps}finally{ne=r,p=n}}}function C(e){var t=e.f,n=(t&$)!==0;if(_!==null&&!Y){var r=p!==null&&(p.f&V)!==0;if(!r&&!G?.includes(e)){var i=_.deps;if((_.f&tt)!==0)e.rv<Te&&(e.rv=Te,N===null&&i!==null&&i[O]===e?O++:N===null?N=[e]:N.includes(e)||N.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:s.includes(_)||s.push(_)}}}if(oe){if(ee.has(e))return ee.get(e);if(n){var l=e,f=l.v;return((l.f&T)===0&&l.reactions!==null||ln(l))&&(f=ft(l)),ee.set(l,f),f}}else n&&!P?.has(e)&&(l=e,Ne(l)&&jt(l),ne&&He()&&(l.f&j)===0&&sn(l));if(P?.has(e))return P.get(e);if((e.f&X)!==0)throw e.v;return e.v}function sn(e){if(e.deps!==null){e.f^=j;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&$)!==0&&(t.f&j)===0&&sn(t)}}function ln(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ee.has(t)||(t.f&$)!==0&&ln(t))return!0;return!1}function fn(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}const Sr=-7169;function A(e,t){e.f=e.f&Sr|t}const Rr=new Set,on=new Set;function Or(e,t,n,r={}){function i(s){if(r.capture||Se.call(t,s),!s.cancelBubble)return ct(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ie(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Cr(e,t,n,r,i){var s={capture:r,passive:i},l=Or(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Vt(()=>{t.removeEventListener(e,l,s)})}let an=null;function Se(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;an=e;var l=0,f=an===e&&e.__root;if(f){var o=i.indexOf(f);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var a=i.indexOf(t);if(a===-1)return;o<=a&&(l=o)}if(s=i[l]||e.target,s!==t){Ce(e,"currentTarget",{configurable:!0,get(){return s||n}});var h=_,d=p;x(null),D(null);try{for(var u,c=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+r];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(v){u?c.push(v):u=v}if(e.cancelBubble||g===t||g===null)break;s=g}if(u){for(let v of c)queueMicrotask(()=>{throw v});throw u}}finally{e.__root=t,delete e.currentTarget,x(h),D(d)}}}function kr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ht(e,t){var n=p;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function Pr(e,t){var n=(t&xn)!==0,r,i=!e.startsWith("<!>");return()=>{if(m)return ht(w,null),w;r===void 0&&(r=kr(i?e:"<!>"+e),r=Ue(r));var s=n||Yt?document.importNode(r,!0):r.cloneNode(!0);return ht(s,s),s}}function un(e,t){if(m){var n=p;((n.f&Pe)===0||n.nodes_end===null)&&(n.nodes_end=w),Tt();return}e!==null&&e.before(t)}const Lr=["touchstart","touchmove"];function Mr(e){return Lr.includes(e)}function cn(e,t){return hn(e,t)}function Dr(e,t){at(),t.intro=t.intro??!1;const n=t.target,r=m,i=w;try{for(var s=Ue(n);s&&(s.nodeType!==De||s.data!==pt);)s=te(s);if(!s)throw $e;de(!0),Q(s);const l=hn(e,{...t,anchor:s});return de(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
+ `).some(f=>f.startsWith("https://svelte.dev/e/")))throw l;return l!==$e&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Bn(),at(),hr(n),de(!1),cn(e,t)}finally{de(r),Q(i)}}const we=new Map;function hn(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0}){at();var f=new Set,o=d=>{for(var u=0;u<d.length;u++){var c=d[u];if(!f.has(c)){f.add(c);var g=Mr(c);t.addEventListener(c,Se,{passive:g});var b=we.get(c);b===void 0?(document.addEventListener(c,Se,{passive:g}),we.set(c,1)):we.set(c,b+1)}}};o(Sn(Rr)),on.add(o);var a=void 0,h=gr(()=>{var d=n??t.appendChild(Ye());return nr(d,{pending:()=>{}},u=>{if(s){St({});var c=k;c.c=s}if(i&&(r.$$events=i),m&&ht(u,null),a=e(u,r)||{},m&&(p.nodes_end=w,w===null||w.nodeType!==De||w.data!==mt))throw rt(),$e;s&&Rt()}),()=>{for(var u of f){t.removeEventListener(u,Se);var c=we.get(u);--c===0?(document.removeEventListener(u,Se),we.delete(u)):we.set(u,c)}on.delete(o),d!==n&&d.parentNode?.removeChild(d)}});return dt.set(a,h),a}let dt=new WeakMap;function Ir(e,t){const n=dt.get(e);return n?(dt.delete(e),n(t)):Promise.resolve()}function jr(e,t){mr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Fr(e,t,n){var r=""+e;return r}function qr(e,t,n,r,i,s){var l=e.__className;if(m||l!==n||l===void 0){var f=Fr(n);(!m||f!==e.getAttribute("class"))&&(f==null?e.removeAttribute("class"):e.className=f),e.__className=n}return s}const Br=Symbol("is custom element"),Yr=Symbol("is html");function Ur(e,t,n,r){var i=Hr(e);m&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ln]=n),n==null?e.removeAttribute(t):typeof n!="string"&&dn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ue(e,t,n){var r=_,i=p;let s=m;m&&de(!1),x(null),D(null);try{t!=="style"&&(vt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?dn(e).includes(t):n&&typeof n=="object")?e[t]=n:Ur(e,t,n==null?n:String(n))}finally{x(r),D(i),s&&de(!0)}}function Hr(e){return e.__attributes??={[Br]:e.nodeName.includes("-"),[Yr]:e.namespaceURI===Tn}}var vt=new Map;function dn(e){var t=e.getAttribute("is")||e.nodeName,n=vt.get(t);if(n)return n;vt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Rn(i);for(var l in r)r[l].set&&n.push(l);i=wt(i)}return n}let Je=!1;function Vr(e){var t=Je;try{return Je=!1,[e(),Je]}finally{Je=t}}function Re(e,t,n,r){var i=(n&bn)!==0,s=(n&En)!==0,l=r,f=!0,o=()=>(f&&(f=!1,l=s?fn(r):r),l),a;if(i){var h=Me in e||xt in e;a=re(e,t)?.set??(h&&t in e?S=>e[t]=S:void 0)}var d,u=!1;i?[d,u]=Vr(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=o(),a&&(Yn(),a(d)));var c;if(c=()=>{var S=e[t];return S===void 0?o():(f=!0,S)},(n&$n)===0)return c;if(a){var g=e.$$legacy;return(function(S,Ze){return arguments.length>0?((!Ze||g||u)&&a(Ze?c():S),S):c()})}var b=!1,v=((n&yn)!==0?lt:fr)(()=>(b=!1,c()));i&&C(v);var ye=p;return(function(S,Ze){if(arguments.length>0){const wn=Ze?C(v):i?me(S):S;return M(v,wn),b=!0,l!==void 0&&(l=wn),S}return oe&&b||(ye.f&V)!==0?v.v:C(v)})}function Wr(e){return new zr(e)}class zr{#t;#e;constructor(t){var n=new Map,r=(s,l)=>{var f=ar(l,!1,!1);return n.set(s,f),f};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return C(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===xt?!0:(C(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,f){return M(n.get(l)??r(l,f),f),Reflect.set(s,l,f)}});this.#e=(t.hydrate?Dr:cn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&pe(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||Ce(this,s,{get(){return this.#e[s]},set(l){this.#e[s]=l},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Ir(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...i)=>n.call(this,...i);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(i=>i!==r)}}$destroy(){this.#e.$destroy()}}let vn;typeof HTMLElement=="function"&&(vn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=document.createElement("slot");r!=="default"&&(s.name=r),un(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Gr(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Ke(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Wr({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=pr(()=>{zt(()=>{this.$$r=!0;for(const r of Oe(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Ke(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ke(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Oe(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ke(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Gr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Jr(e,t,n,r,i,s){let l=class extends vn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Oe(t).map(f=>(t[f].attribute||f).toLowerCase())}};return Oe(t).forEach(f=>{Ce(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(o){o=Ke(f,o,t),this.$$d[f]=o;var a=this.$$c;if(a){var h=re(a,f)?.get;h?a[f]=o:a.$set({[f]:o})}}})}),r.forEach(f=>{Ce(l.prototype,f,{get(){return this.$$c?.[f]}})}),e.element=l,l}const _n={version:"0.66.0"};var ce={},pn;function Kr(){if(pn)return ce;pn=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.LanguageTranslator=void 0,ce.getChildStyleToPass=e,ce.addComponent=t;function e(r,i){var s,l,f="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((l=i?.filter(function(u){return Object.keys(r).includes(u.name)}))===null||l===void 0)&&l.length))for(var o=function(u){var c=i?.filter(function(g){return g.name===u&&g.defaultValue!==r[u]});c&&(f+="".concat(u,":").concat(r[u],";"))},a=0,h=Object.keys(r);a<h.length;a++){var d=h[a];o(d)}}catch(u){console.error("error getting child style to pass",u)}finally{return f}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var f=document.createElement("script");if(f.id=s+"-script",f.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)f.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var o=s.split("-")[0];f.src="http://localhost:6006/webcomponents/".concat(s.replace(o+"-",""),"/").concat(l)}document.head.appendChild(f)}catch(a){console.warn(a)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,l){return r.formatDate(i,s,l||this.lang)},r.getDefaultLang=function(){var i,s,l,f="en";return navigator?.languages&&(!((l=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||l===void 0)&&l.length)&&(f=navigator.languages[0].split("-")[0].toLowerCase()),f},r.getDictionaryWord=function(i,s,l){var f;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(l&&(!((f=s[l])===null||f===void 0)&&f[i]))return s[l][i];var o="",a=r.getDefaultLang();if(!l||a!==l){var h=s?.[a];h?.[i]&&(o=h[i])}return o},r.formatDate=function(i,s,l){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var f=new Intl.DateTimeFormat(l||r.getDefaultLang(),s);return f.format(i)},r})();return ce.LanguageTranslator=n,ce}var gn=Kr(),Zr=Pr('<div id="compocontainer" class="svelte-11p6sry"><div id="list" class="svelte-11p6sry"><hb-messages-list></hb-messages-list></div> <div id="prompt" class="svelte-11p6sry"><hb-messages-send></hb-messages-send></div></div>',2);const Xr={hash:"svelte-11p6sry",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
+ @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host {font-family:"Roboto", sans-serif;display:block;overflow:hidden;height:fit-content;min-height:100px;}#compocontainer.svelte-11p6sry {display:grid;grid-template-areas:"messages" "prompt";overflow:hidden;grid-template-rows:1fr 180px;height:100%;min-height:200px;}#list.svelte-11p6sry {overflow-y:auto;grid-area:messages;min-height:0;height:100%;}#list.svelte-11p6sry hb-messages-list:where(.svelte-11p6sry) {height:100%;display:block;}#prompt.svelte-11p6sry {grid-area:prompt;width:90%;max-width:1600px;margin:0 auto;}.msglist.svelte-11p6sry {width:90%;max-width:1400px;margin:0 auto;}`};function mn(e,t){St(t,!0),jr(e,Xr);function n(v,ye){t.$$host.dispatchEvent(new CustomEvent(v,{detail:ye}))}let r=Re(t,"id",7,""),i=Re(t,"messages",7),s=Re(t,"authors",7),l=Re(t,"options",7),f=Re(t,"message",23,()=>({text:""})),o=z("");_r(()=>{if(typeof f()=="string")try{f(JSON.parse(f())),M(o,f()?.text?f().text:"",!0)}catch(v){console.error("error parsing message",v)}});function a(v){if(!v?.file&&!v?.text)return console.warn("no message to received",v);n("sendMessage",v),M(o,v.text,!0),M(o,"")}gn.addComponent({repoName:"@htmlbricks/hb-messages-list",version:_n.version}),gn.addComponent({repoName:"@htmlbricks/hb-messages-send",version:_n.version});var h={get id(){return r()},set id(v=""){r(v),pe()},get messages(){return i()},set messages(v){i(v),pe()},get authors(){return s()},set authors(v){s(v),pe()},get options(){return l()},set options(v){l(v),pe()},get message(){return f()},set message(v={text:""}){f(v),pe()}},d=Zr(),u=ut(d),c=ut(u);ue(c,"id","message-list"),Ve(()=>ue(c,"messages",i())),Ve(()=>ue(c,"authors",s())),Ve(()=>ue(c,"options",l())),qr(c,1,"msglist svelte-11p6sry"),ue(c,"part","msglist"),it(u);var g=cr(u,2),b=ut(g);return Ve(()=>ue(b,"text",C(o))),ue(b,"part","msgsend"),it(g),it(d),Cr("sendMessage",b,v=>a(v.detail)),un(e,d),Rt(h)}customElements.define("hb-messages-box",Jr(mn,{id:{},messages:{},authors:{},options:{},message:{}},[],[],!0)),_t.Component=mn,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})})(this["messages-box"]=this["messages-box"]||{});
4
4
  //# sourceMappingURL=main.iife.js.map