@htmlbricks/hb-messages-box 0.65.23 → 0.66.1

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