gancio/static/gancio-events.es.js

23 lines
37 KiB
JavaScript

(function(T){typeof define=="function"&&define.amd?define(T):T()})(function(){"use strict";var Fi=Object.defineProperty;var on=T=>{throw TypeError(T)};var qi=(T,E,L)=>E in T?Fi(T,E,{enumerable:!0,configurable:!0,writable:!0,value:L}):T[E]=L;var ie=(T,E,L)=>qi(T,typeof E!="symbol"?E+"":E,L),un=(T,E,L)=>E.has(T)||on("Cannot "+L);var B=(T,E,L)=>(un(T,E,"read from private field"),L?L.call(T):E.get(T)),rr=(T,E,L)=>E.has(T)?on("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(T):E.set(T,L),nr=(T,E,L,et)=>(un(T,E,"write to private field"),et?et.call(T,L):E.set(T,L),L);var $e,Z;const T="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(T);let E=!1,L=!1;function et(){E=!0}et();const At=1,St=2,ir=4,fn=8,cn=16,vn=1,dn=2,_n=8,hn=1,pn=2,lr="[",Nt="[!",Ct="]",Ge={},F=Symbol(),Ot=!1,Q=2,ar=4,tt=8,Rt=16,le=32,ke=64,rt=128,ae=256,nt=512,P=1024,ve=2048,Ae=4096,de=8192,it=16384,gn=32768,It=65536,mn=1<<17,bn=1<<19,sr=1<<20,Ie=Symbol("$state"),or=Symbol("legacy props"),Dt=Symbol("");var Lt=Array.isArray,$n=Array.prototype.indexOf,jt=Array.from,lt=Object.keys,at=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,wn=Object.prototype,yn=Array.prototype,Pt=Object.getPrototypeOf;function xn(e){return e()}function Mt(e){for(var t=0;t<e.length;t++)e[t]()}let st=!1,Ft=[];function fr(){st=!1;const e=Ft.slice();Ft=[],Mt(e)}function cr(e){st||(st=!0,queueMicrotask(fr)),Ft.push(e)}function En(){st&&fr()}function vr(e){return e===this.v}function Tn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function qt(e){return!Tn(e,this.v)}function kn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function An(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Cn(){throw new Error("https://svelte.dev/e/hydration_failed")}function On(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function In(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ln(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function K(e,t){var r={f:0,v:e,reactions:null,equals:vr,rv:0,wv:0};return r}function ot(e,t=!1){var n;const r=K(e);return t||(r.equals=qt),E&&C!==null&&C.l!==null&&((n=C.l).s??(n.s=[])).push(r),r}function dr(e,t=!1){return jn(ot(e,t))}function jn(e){return k!==null&&!_e&&k.f&Q&&(se===null?qn([e]):se.push(e)),e}function U(e,t){return k!==null&&!_e&&wt()&&k.f&(Q|Rt)&&(se===null||!se.includes(e))&&Ln(),Ht(e,t)}function Ht(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=wr(),_r(e,ve),wt()&&$!==null&&$.f&P&&!($.f&(le|ke))&&(he===null?Hn([e]):he.push(e))),t}function _r(e,t){var r=e.reactions;if(r!==null)for(var n=wt(),i=r.length,l=0;l<i;l++){var a=r[l],o=a.f;o&ve||!n&&a===$||(oe(a,t),o&(P|ae)&&(o&Q?_r(a,Ae):ht(a)))}}function Ke(e){var t=Q|ve,r=k!==null&&k.f&Q?k:null;return $===null||r!==null&&r.f&ae?t|=ae:$.f|=sr,{ctx:C,deps:null,effects:null,equals:vr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??$}}function De(e){const t=Ke(e);return t.equals=qt,t}function hr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}function Pn(e){for(var t=e.parent;t!==null;){if(!(t.f&Q))return t;t=t.parent}return null}function Mn(e){var t,r=$;we(Pn(e));try{hr(e),t=xr(e)}finally{we(r)}return t}function pr(e){var t=Mn(e),r=(Ce||e.f&ae)&&e.deps!==null?Ae:P;oe(e,r),e.equals(t)||(e.v=t,e.wv=wr())}const gr=0,Fn=1;let ut=!1,ft=gr,We=!1,Je=null,Le=!1,zt=!1;function mr(e){Le=e}function br(e){zt=e}let Ne=[],je=0,Hi=[],k=null,_e=!1;function Pe(e){k=e}let $=null;function we(e){$=e}let se=null;function qn(e){se=e}let q=null,Y=0,he=null;function Hn(e){he=e}let $r=1,ct=0,Ce=!1;function wr(){return++$r}function Me(e){var u;var t=e.f;if(t&ve)return!0;if(t&Ae){var r=e.deps,n=(t&ae)!==0;if(r!==null){var i,l,a=(t&nt)!==0,o=n&&$!==null&&!Ce,f=r.length;if(a||o){for(i=0;i<f;i++)l=r[i],(a||!((u=l==null?void 0:l.reactions)!=null&&u.includes(e)))&&(l.reactions??(l.reactions=[])).push(e);a&&(e.f^=nt)}for(i=0;i<f;i++)if(l=r[i],Me(l)&&pr(l),l.wv>e.wv)return!0}(!n||$!==null&&!Ce)&&oe(e,P)}return!1}function zn(e,t){for(var r=t;r!==null;){if(r.f&rt)try{r.fn(e);return}catch{r.f^=rt}r=r.parent}throw ut=!1,e}function Bn(e){return(e.f&it)===0&&(e.parent===null||(e.parent.f&rt)===0)}function vt(e,t,r,n){if(ut){if(r===null&&(ut=!1),Bn(t))throw e;return}r!==null&&(ut=!0);{zn(e,t);return}}function yr(e,t,r=0){var n=e.reactions;if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];l.f&Q?yr(l,t,r+1):t===l&&(r===0?oe(l,ve):l.f&P&&oe(l,Ae),ht(l))}}function xr(e){var d;var t=q,r=Y,n=he,i=k,l=Ce,a=se,o=C,f=_e,u=e.f;q=null,Y=0,he=null,k=u&(le|ke)?null:e,Ce=(u&ae)!==0&&(!Le||(i===null||f)&&e.parent!==null),se=null,zr(e.ctx),_e=!1,ct++;try{var c=(0,e.fn)(),v=e.deps;if(q!==null){var s;if(dt(e,Y),v!==null&&Y>0)for(v.length=Y+q.length,s=0;s<q.length;s++)v[Y+s]=q[s];else e.deps=v=q;if(!Ce)for(s=Y;s<v.length;s++)((d=v[s]).reactions??(d.reactions=[])).push(e)}else v!==null&&Y<v.length&&(dt(e,Y),v.length=Y);if(wt()&&he!==null&&!(e.f&(Q|Ae|ve)))for(s=0;s<he.length;s++)yr(he[s],e);return i!==null&&ct++,c}finally{q=t,Y=r,he=n,k=i,Ce=l,se=a,zr(o),_e=f}}function Un(e,t){let r=t.reactions;if(r!==null){var n=$n.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&Q&&(q===null||!q.includes(t))&&(oe(t,Ae),t.f&(ae|nt)||(t.f^=nt),hr(t),dt(t,0))}function dt(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Un(e,r[n])}function _t(e){var t=e.f;if(!(t&it)){oe(e,P);var r=$,n=C;$=e;try{t&Rt?Xn(e):Mr(e),Pr(e);var i=xr(e);e.teardown=typeof i=="function"?i:null,e.wv=$r;var l=e.deps,a;Ot&&L&&e.f&ve}catch(o){vt(o,e,r,n||e.ctx)}finally{$=r}}}function Er(){if(je>1e3){je=0;try{Nn()}catch(e){if(Je!==null)vt(e,Je,null);else throw e}}je++}function Tr(e){var t=e.length;if(t!==0){Er();var r=Le;Le=!0;try{for(var n=0;n<t;n++){var i=e[n];i.f&P||(i.f^=P);var l=[];kr(i,l),Yn(l)}}finally{Le=r}}}function Yn(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];if(!(n.f&(it|de)))try{Me(n)&&(_t(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Fr(n):n.fn=null))}catch(i){vt(i,n,null,n.ctx)}}}function Vn(){if(We=!1,je>1001)return;const e=Ne;Ne=[],Tr(e),We||(je=0,Je=null)}function ht(e){ft===gr&&(We||(We=!0,queueMicrotask(Vn))),Je=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(ke|le)){if(!(r&P))return;t.f^=P}}Ne.push(t)}function kr(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,l=(i&le)!==0,a=l&&(i&P)!==0,o=r.next;if(!a&&!(i&de))if(i&tt){if(l)r.f^=P;else{var f=k;try{k=r,Me(r)&&_t(r)}catch(s){vt(s,r,null,r.ctx)}finally{k=f}}var u=r.first;if(u!==null){r=u;continue}}else i&ar&&n.push(r);if(o===null){let s=r.parent;for(;s!==null;){if(e===s)break e;var c=s.next;if(c!==null){r=c;continue e}s=s.parent}}r=o}for(var v=0;v<n.length;v++)u=n[v],t.push(u),kr(u,t)}function H(e){var t=ft,r=Ne;try{Er();const i=[];ft=Fn,Ne=i,We=!1,Tr(r);var n=e==null?void 0:e();return En(),(Ne.length>0||i.length>0)&&H(),je=0,Je=null,n}finally{ft=t,Ne=r}}function p(e){var t=e.f,r=(t&Q)!==0;if(k!==null&&!_e){se!==null&&se.includes(e)&&Dn();var n=k.deps;e.rv<ct&&(e.rv=ct,q===null&&n!==null&&n[Y]===e?Y++:q===null?q=[e]:q.push(e))}else if(r&&e.deps===null&&e.effects===null){var i=e,l=i.parent;l!==null&&!(l.f&ae)&&(i.f^=ae)}return r&&(i=e,Me(i)&&pr(i)),e.v}function pt(e){var t=_e;try{return _e=!0,e()}finally{_e=t}}const Gn=-7169;function oe(e,t){e.f=e.f&Gn|t}function W(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ie in e)Bt(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Ie in r&&Bt(r)}}}function Bt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Bt(e[n],t)}catch{}const r=Pt(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=ur(r);for(let i in n){const l=n[i].get;if(l)try{l.call(e)}catch{}}}}}function Ut(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let I=!1;function pe(e){I=e}let N;function ee(e){if(e===null)throw Ut(),Ge;return N=e}function gt(){return ee(ye(N))}function D(e){if(I){if(ye(N)!==null)throw Ut(),Ge;N=e}}function Yt(){for(var e=0,t=N;;){if(t.nodeType===8){var r=t.data;if(r===Ct){if(e===0)return t;e-=1}else(r===lr||r===Nt)&&(e+=1)}var n=ye(t);t.remove(),t=n}}function Fe(e,t=null,r){if(typeof e!="object"||e===null||Ie in e)return e;const n=Pt(e);if(n!==wn&&n!==yn)return e;var i=new Map,l=Lt(e),a=K(0);l&&i.set("length",K(e.length));var o;return new Proxy(e,{defineProperty(f,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Rn();var v=i.get(u);return v===void 0?(v=K(c.value),i.set(u,v)):U(v,Fe(c.value,o)),!0},deleteProperty(f,u){var c=i.get(u);if(c===void 0)u in f&&i.set(u,K(F));else{if(l&&typeof u=="string"){var v=i.get("length"),s=Number(u);Number.isInteger(s)&&s<v.v&&U(v,s)}U(c,F),Ar(a)}return!0},get(f,u,c){var _;if(u===Ie)return e;var v=i.get(u),s=u in f;if(v===void 0&&(!s||(_=Se(f,u))!=null&&_.writable)&&(v=K(Fe(s?f[u]:F,o)),i.set(u,v)),v!==void 0){var d=p(v);return d===F?void 0:d}return Reflect.get(f,u,c)},getOwnPropertyDescriptor(f,u){var c=Reflect.getOwnPropertyDescriptor(f,u);if(c&&"value"in c){var v=i.get(u);v&&(c.value=p(v))}else if(c===void 0){var s=i.get(u),d=s==null?void 0:s.v;if(s!==void 0&&d!==F)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(f,u){var d;if(u===Ie)return!0;var c=i.get(u),v=c!==void 0&&c.v!==F||Reflect.has(f,u);if(c!==void 0||$!==null&&(!v||(d=Se(f,u))!=null&&d.writable)){c===void 0&&(c=K(v?Fe(f[u],o):F),i.set(u,c));var s=p(c);if(s===F)return!1}return v},set(f,u,c,v){var w;var s=i.get(u),d=u in f;if(l&&u==="length")for(var _=c;_<s.v;_+=1){var b=i.get(_+"");b!==void 0?U(b,F):_ in f&&(b=K(F),i.set(_+"",b))}s===void 0?(!d||(w=Se(f,u))!=null&&w.writable)&&(s=K(void 0),U(s,Fe(c,o)),i.set(u,s)):(d=s.v!==F,U(s,Fe(c,o)));var x=Reflect.getOwnPropertyDescriptor(f,u);if(x!=null&&x.set&&x.set.call(v,c),!d){if(l&&typeof u=="string"){var O=i.get("length"),R=Number(u);Number.isInteger(R)&&R>=O.v&&U(O,R+1)}Ar(a)}return!0},ownKeys(f){p(a);var u=Reflect.ownKeys(f).filter(s=>{var d=i.get(s);return d===void 0||d.v!==F});for(var[c,v]of i)v.v!==F&&!(c in f)&&u.push(c);return u},setPrototypeOf(){In()}})}function Ar(e,t=1){U(e,e.v+t)}var Sr,Nr,Cr;function Vt(){if(Sr===void 0){Sr=window;var e=Element.prototype,t=Node.prototype;Nr=Se(t,"firstChild").get,Cr=Se(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function qe(e=""){return document.createTextNode(e)}function Oe(e){return Nr.call(e)}function ye(e){return Cr.call(e)}function j(e,t){if(!I)return Oe(e);var r=Oe(N);if(r===null)r=N.appendChild(qe());else if(t&&r.nodeType!==3){var n=qe();return r==null||r.before(n),ee(n),n}return ee(r),r}function Or(e,t){if(!I){var r=Oe(e);return r instanceof Comment&&r.data===""?ye(r):r}return N}function te(e,t=1,r=!1){let n=I?N:e;for(var i;t--;)i=n,n=ye(n);if(!I)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var a=qe();return n===null?i==null||i.after(a):n.before(a),ee(a),a}return ee(n),n}function Rr(e){e.textContent=""}function Ir(e){$===null&&k===null&&Sn(),k!==null&&k.f&ae&&$===null&&An(),zt&&kn()}function Kn(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function He(e,t,r,n=!0){var i=(e&ke)!==0,l=$,a={ctx:C,deps:null,nodes_start:null,nodes_end:null,f:e|ve,first:null,fn:t,last:null,next:null,parent:i?null:l,prev:null,teardown:null,transitions:null,wv:0};if(r){var o=Le;try{mr(!0),_t(a),a.f|=gn}catch(c){throw ge(a),c}finally{mr(o)}}else t!==null&&ht(a);var f=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(sr|rt))===0;if(!f&&!i&&n&&(l!==null&&Kn(a,l),k!==null&&k.f&Q)){var u=k;(u.effects??(u.effects=[])).push(a)}return a}function Gt(e){Ir();var t=$!==null&&($.f&le)!==0&&C!==null&&!C.m;if(t){var r=C;(r.e??(r.e=[])).push({fn:e,effect:$,reaction:k})}else{var n=Dr(e);return n}}function Wn(e){return Ir(),mt(e)}function Jn(e){const t=He(ke,e,!0);return()=>{ge(t)}}function Zn(e){const t=He(ke,e,!0);return(r={})=>new Promise(n=>{r.outro?bt(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Dr(e){return He(ar,e,!1)}function Lr(e,t){var r=C,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=mt(()=>{e(),!n.ran&&(n.ran=!0,U(r.l.r2,!0),pt(t))})}function jr(){var e=C;mt(()=>{if(p(e.l.r2)){for(var t of e.l.r1){var r=t.effect;r.f&P&&oe(r,Ae),Me(r)&&_t(r),t.ran=!1}e.l.r2.v=!1}})}function mt(e){return He(tt,e,!0)}function ue(e,t=[],r=Ke){const n=t.map(r);return Kt(()=>e(...n.map(p)))}function Kt(e,t=0){return He(tt|Rt|t,e,!0)}function Ze(e,t=!0){return He(tt|le,e,!0,t)}function Pr(e){var t=e.teardown;if(t!==null){const r=zt,n=k;br(!0),Pe(null);try{t.call(null)}finally{br(r),Pe(n)}}}function Mr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var n=r.next;ge(r,t),r=n}}function Xn(e){for(var t=e.first;t!==null;){var r=t.next;t.f&le||ge(t),t=r}}function ge(e,t=!0){var r=!1;if((t||e.f&bn)&&e.nodes_start!==null){for(var n=e.nodes_start,i=e.nodes_end;n!==null;){var l=n===i?null:ye(n);n.remove(),n=l}r=!0}Mr(e,t&&!r),dt(e,0),oe(e,it);var a=e.transitions;if(a!==null)for(const f of a)f.stop();Pr(e);var o=e.parent;o!==null&&o.first!==null&&Fr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Fr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function bt(e,t){var r=[];Wt(e,r,!0),qr(r,()=>{ge(e),t&&t()})}function qr(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Wt(e,t,r){if(!(e.f&de)){if(e.f^=de,e.transitions!==null)for(const a of e.transitions)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var i=n.next,l=(n.f&It)!==0||(n.f&le)!==0;Wt(n,t,l?r:!1),n=i}}}function $t(e){Hr(e,!0)}function Hr(e,t){if(e.f&de){e.f^=de,e.f&P||(e.f^=P),Me(e)&&(oe(e,ve),ht(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&It)!==0||(r.f&le)!==0;Hr(r,i?t:!1),r=n}if(e.transitions!==null)for(const l of e.transitions)(l.is_global||t)&&l.in()}}function Qn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let C=null;function zr(e){C=e}function Jt(e,t=!1,r){C={p:C,c:null,e:null,m:!1,s:e,x:null,l:null},E&&!t&&(C.l={s:null,u:null,r1:[],r2:K(!1)})}function Zt(e){const t=C;if(t!==null){e!==void 0&&(t.x=e);const a=t.e;if(a!==null){var r=$,n=k;t.e=null;try{for(var i=0;i<a.length;i++){var l=a[i];we(l.effect),Pe(l.reaction),Dr(l.fn)}}finally{we(r),Pe(n)}}C=t.p,t.m=!0}return e||{}}function wt(){return!E||C!==null&&C.l===null}const ei=["touchstart","touchmove"];function ti(e){return ei.includes(e)}const ri=new Set,Br=new Set;function yt(e){var R;var t=this,r=t.ownerDocument,n=e.type,i=((R=e.composedPath)==null?void 0:R.call(e))||[],l=i[0]||e.target,a=0,o=e.__root;if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;f<=u&&(a=f)}if(l=i[a]||e.target,l!==t){at(e,"currentTarget",{configurable:!0,get(){return l||r}});var c=k,v=$;Pe(null),we(null);try{for(var s,d=[];l!==null;){var _=l.assignedSlot||l.parentNode||l.host||null;try{var b=l["__"+n];if(b!==void 0&&!l.disabled)if(Lt(b)){var[x,...O]=b;x.apply(l,[e,...O])}else b.call(l,e)}catch(w){s?d.push(w):s=w}if(e.cancelBubble||_===t||_===null)break;l=_}if(s){for(let w of d)queueMicrotask(()=>{throw w});throw s}}finally{e.__root=t,delete e.currentTarget,Pe(c),we(v)}}}function ni(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function ze(e,t){var r=$;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function V(e,t){var r=(t&hn)!==0,n=(t&pn)!==0,i,l=!e.startsWith("<!>");return()=>{if(I)return ze(N,null),N;i===void 0&&(i=ni(l?e:"<!>"+e),r||(i=Oe(i)));var a=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Oe(a),f=a.lastChild;ze(o,f)}else ze(a,a);return a}}function ii(){if(I)return ze(N,null),N;var e=document.createDocumentFragment(),t=document.createComment(""),r=qe();return e.append(t,r),ze(t,r),e}function M(e,t){if(I){$.nodes_end=N,gt();return}e!==null&&e.before(t)}function me(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Ur(e,t){return Yr(e,t)}function li(e,t){Vt(),t.intro=t.intro??!1;const r=t.target,n=I,i=N;try{for(var l=Oe(r);l&&(l.nodeType!==8||l.data!==lr);)l=ye(l);if(!l)throw Ge;pe(!0),ee(l),gt();const a=Yr(e,{...t,anchor:l});if(N===null||N.nodeType!==8||N.data!==Ct)throw Ut(),Ge;return pe(!1),a}catch(a){if(a===Ge)return t.recover===!1&&Cn(),Vt(),Rr(r),pe(!1),Ur(e,t);throw a}finally{pe(n),ee(i)}}const Be=new Map;function Yr(e,{target:t,anchor:r,props:n={},events:i,context:l,intro:a=!0}){Vt();var o=new Set,f=v=>{for(var s=0;s<v.length;s++){var d=v[s];if(!o.has(d)){o.add(d);var _=ti(d);t.addEventListener(d,yt,{passive:_});var b=Be.get(d);b===void 0?(document.addEventListener(d,yt,{passive:_}),Be.set(d,1)):Be.set(d,b+1)}}};f(jt(ri)),Br.add(f);var u=void 0,c=Zn(()=>{var v=r??t.appendChild(qe());return Ze(()=>{if(l){Jt({});var s=C;s.c=l}i&&(n.$$events=i),I&&ze(v,null),u=e(v,n)||{},I&&($.nodes_end=N),l&&Zt()}),()=>{var _;for(var s of o){t.removeEventListener(s,yt);var d=Be.get(s);--d===0?(document.removeEventListener(s,yt),Be.delete(s)):Be.set(s,d)}Br.delete(f),v!==r&&((_=v.parentNode)==null||_.removeChild(v))}});return Xt.set(u,c),u}let Xt=new WeakMap;function ai(e,t){const r=Xt.get(e);return r?(Xt.delete(e),r(t)):Promise.resolve()}function be(e,t,r=!1){I&&gt();var n=e,i=null,l=null,a=F,o=r?It:0,f=!1;const u=(v,s=!0)=>{f=!0,c(s,v)},c=(v,s)=>{if(a===(a=v))return;let d=!1;if(I){const _=n.data===Nt;!!a===_&&(n=Yt(),ee(n),pe(!1),d=!0)}a?(i?$t(i):s&&(i=Ze(()=>s(n))),l&&bt(l,()=>{l=null})):(l?$t(l):s&&(l=Ze(()=>s(n))),i&&bt(i,()=>{i=null})),d&&pe(!0)};Kt(()=>{f=!1,t(u),f||c(null,null)},o),I&&(n=N)}function Vr(e,t){return t}function si(e,t,r,n){for(var i=[],l=t.length,a=0;a<l;a++)Wt(t[a].e,i,!0);var o=l>0&&i.length===0&&r!==null;if(o){var f=r.parentNode;Rr(f),f.append(r),n.clear(),xe(e,t[0].prev,t[l-1].next)}qr(i,()=>{for(var u=0;u<l;u++){var c=t[u];o||(n.delete(c.k),xe(e,c.prev,c.next)),ge(c.e,!o)}})}function Gr(e,t,r,n,i,l=null){var a=e,o={items:new Map,first:null},f=(t&ir)!==0;if(f){var u=e;a=I?ee(Oe(u)):u.appendChild(qe())}I&&gt();var c=null,v=!1,s=De(()=>{var d=r();return Lt(d)?d:d==null?[]:jt(d)});Kt(()=>{var d=p(s),_=d.length;if(v&&_===0)return;v=_===0;let b=!1;if(I){var x=a.data===Nt;x!==(_===0)&&(a=Yt(),ee(a),pe(!1),b=!0)}if(I){for(var O=null,R,w=0;w<_;w++){if(N.nodeType===8&&N.data===Ct){a=N,b=!0,pe(!1);break}var g=d[w],h=n(g,w);R=Kr(N,o,O,null,g,h,w,i,t,r),o.items.set(h,R),O=R}_>0&&ee(Yt())}I||oi(d,o,a,i,t,n,r),l!==null&&(_===0?c?$t(c):c=Ze(()=>l(a)):c!==null&&bt(c,()=>{c=null})),b&&pe(!0),p(s)}),I&&(a=N)}function oi(e,t,r,n,i,l,a){var Ue,Re,Ye,kt;var o=(i&fn)!==0,f=(i&(At|St))!==0,u=e.length,c=t.items,v=t.first,s=v,d,_=null,b,x=[],O=[],R,w,g,h;if(o)for(h=0;h<u;h+=1)R=e[h],w=l(R,h),g=c.get(w),g!==void 0&&((Ue=g.a)==null||Ue.measure(),(b??(b=new Set)).add(g));for(h=0;h<u;h+=1){if(R=e[h],w=l(R,h),g=c.get(w),g===void 0){var A=s?s.e.nodes_start:r;_=Kr(A,t,_,_===null?t.first:_.next,R,w,h,n,i,a),c.set(w,_),x=[],O=[],s=_.next;continue}if(f&&ui(g,R,h,i),g.e.f&de&&($t(g.e),o&&((Re=g.a)==null||Re.unfix(),(b??(b=new Set)).delete(g))),g!==s){if(d!==void 0&&d.has(g)){if(x.length<O.length){var m=O[0],y;_=m.prev;var fe=x[0],re=x[x.length-1];for(y=0;y<x.length;y+=1)Wr(x[y],m,r);for(y=0;y<O.length;y+=1)d.delete(O[y]);xe(t,fe.prev,re.next),xe(t,_,fe),xe(t,re,m),s=m,_=re,h-=1,x=[],O=[]}else d.delete(g),Wr(g,s,r),xe(t,g.prev,g.next),xe(t,g,_===null?t.first:_.next),xe(t,_,g),_=g;continue}for(x=[],O=[];s!==null&&s.k!==w;)s.e.f&de||(d??(d=new Set)).add(s),O.push(s),s=s.next;if(s===null)continue;g=s}x.push(g),_=g,s=g.next}if(s!==null||d!==void 0){for(var S=d===void 0?[]:jt(d);s!==null;)s.e.f&de||S.push(s),s=s.next;var X=S.length;if(X>0){var Ee=i&ir&&u===0?r:null;if(o){for(h=0;h<X;h+=1)(Ye=S[h].a)==null||Ye.measure();for(h=0;h<X;h+=1)(kt=S[h].a)==null||kt.fix()}si(t,S,Ee,c)}}o&&cr(()=>{var Ve;if(b!==void 0)for(g of b)(Ve=g.a)==null||Ve.apply()}),$.first=t.first&&t.first.e,$.last=_&&_.e}function ui(e,t,r,n){n&At&&Ht(e.v,t),n&St?Ht(e.i,r):e.i=r}function Kr(e,t,r,n,i,l,a,o,f,u){var c=(f&At)!==0,v=(f&cn)===0,s=c?v?ot(i):K(i):i,d=f&St?K(a):a,_={i:d,v:s,k:l,a:null,e:null,prev:r,next:n};try{return _.e=Ze(()=>o(e,s,d,u),I),_.e.prev=r&&r.e,_.e.next=n&&n.e,r===null?t.first=_:(r.next=_,r.e.next=_.e),n!==null&&(n.prev=_,n.e.prev=_.e),_}finally{}}function Wr(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,l=e.e.nodes_start;l!==n;){var a=ye(l);i.before(l),l=a}}function xe(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function Jr(e,t){cr(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function z(e,t,r,n){var i=e.__attributes??(e.__attributes={});I&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Dt]=r),r==null?e.removeAttribute(t):typeof r!="string"&&fi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var Zr=new Map;function fi(e){var t=Zr.get(e.nodeName);if(t)return t;Zr.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=ur(n);for(var l in r)r[l].set&&t.push(l);n=Pt(n)}return t}function Xr(e){if(!I&&e.loading==="lazy"){var t=e.src;e[Dt]=null,e.loading="eager",e.removeAttribute("src"),requestAnimationFrame(()=>{e[Dt]!=="eager"&&(e.loading="lazy"),e.src=t})}}function xt(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function Qr(e=!1){const t=C,r=t.l.u;if(!r)return;let n=()=>W(t.s);if(e){let i=0,l={};const a=Ke(()=>{let o=!1;const f=t.s;for(const u in f)f[u]!==l[u]&&(l[u]=f[u],o=!0);return o&&i++,i});n=()=>p(a)}r.b.length&&Wn(()=>{en(t,n),Mt(r.b)}),Gt(()=>{const i=pt(()=>r.m.map(xn));return()=>{for(const l of i)typeof l=="function"&&l()}}),r.a.length&&Gt(()=>{en(t,n),Mt(r.a)})}function en(e,t){if(e.l.s)for(const r of e.l.s)p(r);t()}function tn(e){C===null&&Qn(),E&&C.l!==null?ci(C).m.push(e):Gt(()=>{const t=pt(e);if(typeof t=="function")return t})}function ci(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}let Et=!1;function vi(e){var t=Et;try{return Et=!1,[e(),Et]}finally{Et=t}}function rn(e){for(var t=$,r=$;t!==null&&!(t.f&(le|ke));)t=t.parent;try{return we(t),e()}finally{we(r)}}function J(e,t,r,n){var A;var i=(r&vn)!==0,l=!E||(r&dn)!==0,a=(r&_n)!==0,o=!1,f;[f,o]=vi(()=>e[t]);var u=Ie in e||or in e,c=(((A=Se(e,t))==null?void 0:A.set)??(u&&t in e&&(m=>e[t]=m)))||void 0,v=n,s=!0,d=!1,_=()=>(d=!0,s&&(s=!1,v=n),v);f===void 0&&n!==void 0&&(c&&l&&On(),f=_(),c&&c(f));var b;if(l)b=()=>{var m=e[t];return m===void 0?_():(s=!0,d=!1,m)};else{var x=rn(()=>(i?Ke:De)(()=>e[t]));x.f|=mn,b=()=>{var m=p(x);return m!==void 0&&(v=void 0),m===void 0?v:m}}if(c){var O=e.$$legacy;return function(m,y){return arguments.length>0?((!l||!y||O||o)&&c(y?b():m),m):b()}}var R=!1,w=!1,g=ot(f),h=rn(()=>Ke(()=>{var m=b(),y=p(g);return R?(R=!1,w=!0,y):(w=!1,g.v=m)}));return h.equals=qt,function(m,y){if(arguments.length>0){const fe=y?p(h):l&&a?Fe(m):m;return h.equals(fe)||(R=!0,U(g,fe),d&&v!==void 0&&(v=fe),pt(()=>p(h))),m}return p(h)}}function di(e){return new _i(e)}class _i{constructor(t){rr(this,$e);rr(this,Z);var l;var r=new Map,n=(a,o)=>{var f=ot(o);return r.set(a,f),f};const i=new Proxy({...t.props||{},$$events:{}},{get(a,o){return p(r.get(o)??n(o,Reflect.get(a,o)))},has(a,o){return o===or?!0:(p(r.get(o)??n(o,Reflect.get(a,o))),Reflect.has(a,o))},set(a,o,f){return U(r.get(o)??n(o,f),f),Reflect.set(a,o,f)}});nr(this,Z,(t.hydrate?li:Ur)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((l=t==null?void 0:t.props)!=null&&l.$$host)||t.sync===!1)&&H(),nr(this,$e,i.$$events);for(const a of Object.keys(B(this,Z)))a==="$set"||a==="$destroy"||a==="$on"||at(this,a,{get(){return B(this,Z)[a]},set(o){B(this,Z)[a]=o},enumerable:!0});B(this,Z).$set=a=>{Object.assign(i,a)},B(this,Z).$destroy=()=>{ai(B(this,Z))}}$set(t){B(this,Z).$set(t)}$on(t,r){B(this,$e)[t]=B(this,$e)[t]||[];const n=(...i)=>r.call(this,...i);return B(this,$e)[t].push(n),()=>{B(this,$e)[t]=B(this,$e)[t].filter(i=>i!==n)}}$destroy(){B(this,Z).$destroy()}}$e=new WeakMap,Z=new WeakMap;let nn;typeof HTMLElement=="function"&&(nn=class extends HTMLElement{constructor(t,r,n){super();ie(this,"$$ctor");ie(this,"$$s");ie(this,"$$c");ie(this,"$$cn",!1);ie(this,"$$d",{});ie(this,"$$r",!1);ie(this,"$$p_d",{});ie(this,"$$l",{});ie(this,"$$l_u",new Map);ie(this,"$$me");this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return l=>{const a=document.createElement("slot");i!=="default"&&(a.name=i),M(l,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=hi(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const l=this.$$g_p(i.name);l in this.$$d||(this.$$d[l]=Tt(l,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=di({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Jn(()=>{mt(()=>{var i;this.$$r=!0;for(const l of lt(this.$$c)){if(!((i=this.$$p_d[l])!=null&&i.reflect))continue;this.$$d[l]=this.$$c[l];const a=Tt(l,this.$$d[l],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,a)}this.$$r=!1})});for(const i in this.$$l)for(const l of this.$$l[i]){const a=this.$$c.$on(i,l);this.$$l_u.set(l,a)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Tt(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return lt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Tt(e,t,r,n){var l;const i=(l=r[e])==null?void 0:l.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="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 hi(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ln(e,t,r,n,i,l){let a=class extends nn{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return lt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return lt(t).forEach(o=>{at(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){var v;f=Tt(o,f,t),this.$$d[o]=f;var u=this.$$c;if(u){var c=(v=Se(u,o))==null?void 0:v.get;c?u[o]=f:u.$set({[o]:f})}}})}),n.forEach(o=>{at(a.prototype,o,{get(){var f;return(f=this.$$c)==null?void 0:f[o]}})}),e.element=a,a}function Qt(e,t="long",r=!1){const n=t==="long"?{weekday:"long",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",...r&&{timeZoneName:"short"}}:{hour:"2-digit",minute:"2-digit"};return new Date(e*1e3).toLocaleString(void 0,n)}function an(e){const t=e.ap_id||e.place.name==="online";return e.multidate?Qt(e.start_datetime,"long",t)+" - "+Qt(e.end_datetime,"long",t):Qt(e.start_datetime,"long",t)}var pi=V('<link rel="stylesheet">'),gi=V('<a target="_blank" id="header" class="svelte-1ap5437"><div class="content svelte-1ap5437"><div class="title svelte-1ap5437"> </div> <img id="logo" alt="logo" class="svelte-1ap5437"></div></a>'),mi=V('<img loading="lazy" class="svelte-1ap5437">'),bi=V('<img style="aspect-ratio=1.7778;" loading="lazy" class="svelte-1ap5437">'),$i=V('<div class="img svelte-1ap5437"><!></div>'),wi=V('<span class="subtitle svelte-1ap5437"> </span>'),yi=V('<span class="tag svelte-1ap5437"> </span>'),xi=V('<div class="tags svelte-1ap5437"></div>'),Ei=V('<a class="event svelte-1ap5437" target="_blank"><!> <div class="content svelte-1ap5437"><div class="subtitle svelte-1ap5437"> </div> <div class="title svelte-1ap5437"> </div> <span class="place svelte-1ap5437"> <!></span> <!></div></a>'),Ti=V('<div id="gancioEvents" class="svelte-1ap5437"><!> <!></div>'),ki=V("<!> <!>",1);const Ai={hash:"svelte-1ap5437",code:`#gancioEvents.svelte-1ap5437 {font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';overflow-x:hidden;width:100%;box-sizing:content-box;margin:0 auto;font-size:1rem;text-align:left;}.nosidebar.svelte-1ap5437 {max-width:1200px;}#header.svelte-1ap5437 {padding:1.2rem 1rem;background-color:var(--bg-odd-color);}.sidebar.svelte-1ap5437 {max-width:500px;box-shadow:rgba(60, 64, 67, 0.4) 0px 1px 2px 0px,
rgba(60, 64, 67, 0.25) 0px 1px 3px 1px;border-radius:5px;font-size:1rem;}.event.svelte-1ap5437 .img:where(.svelte-1ap5437) {width:100%;max-width:450px;max-height:250px;aspect-ratio:1.7778;flex:1 0 auto;
/* height: 100%; */}
@media screen and (max-width: 800px) {.event.svelte-1ap5437 {flex-wrap:wrap;}.event.svelte-1ap5437 .img:where(.svelte-1ap5437) {max-width:100%;}
}.event.svelte-1ap5437 img:where(.svelte-1ap5437) {object-fit:cover;border-radius:15px;width:100%;height:100%;box-shadow:rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;}.nosidebar.svelte-1ap5437 .event:where(.svelte-1ap5437) {margin-bottom:2rem;}.nosidebar.svelte-1ap5437 .content:where(.svelte-1ap5437) {margin-left:1rem;margin-top:5px;text-align:left;}.tags.svelte-1ap5437 {margin-top:2px;}#logo.svelte-1ap5437 {position:absolute;top:10px;right:10px;height:40px;}a.svelte-1ap5437 {text-decoration:none;color:var(--text-color);display:flex;padding:8px 20px;margin:0;line-height:1.275rem;font-weight:400;font-size:0.875rem;position:relative;transition:background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1),
padding 0.3s;box-sizing:content-box;}a.svelte-1ap5437:hover .title:where(.svelte-1ap5437),
a.svelte-1ap5437:focus .title:where(.svelte-1ap5437),
a.svelte-1ap5437:active .title:where(.svelte-1ap5437) {text-decoration:underline;}.dark.svelte-1ap5437 {--bg-odd-color: #161616;--bg-even-color: #222;--bg-hover-color: #333;--text-color: white;--title-color: white;--line-color: rgba(120, 120, 120, 0.2);}.light.svelte-1ap5437 {--bg-odd-color: #f5f5f5;--bg-even-color: #fafafa;--bg-hover-color: #eee;--text-color: #222;--title-color: black;--line-color: rgba(220, 220, 220, 0.9);}.sidebar.svelte-1ap5437 a:where(.svelte-1ap5437) {background-color:var(--bg-even-color);border-bottom:1px solid var(--line-color);}.sidebar.svelte-1ap5437 a:where(.svelte-1ap5437):hover,
.sidebar.svelte-1ap5437 a:where(.svelte-1ap5437):focus,
.sidebar.svelte-1ap5437 a:where(.svelte-1ap5437):active {background-color:var(--bg-hover-color);padding-left:15px;padding-right:25px;}.place.svelte-1ap5437 {font-weight:400;font-size:1.2rem;line-height:1.4rem;color:orangered;}.title.svelte-1ap5437 {color:var(--title-color);font-weight:bold;font-size:1.3rem;line-height:1.1em;}.nosidebar.svelte-1ap5437 .title:where(.svelte-1ap5437) {font-size:1.9em;line-height:1.1em;}.subtitle.svelte-1ap5437 {font-size:1rem;line-height:1.1em;color:var(--title-color);opacity:0.9;}.tag.svelte-1ap5437 {margin-right:10px;display:inline-block;}`};function Si(e,t){Jt(t,!1),Jr(e,Ai);let r=J(t,"baseurl",12,""),n=J(t,"title",12,""),i=J(t,"maxlength",12,!1),l=J(t,"collection",12,""),a=J(t,"tags",12,""),o=J(t,"places",12,""),f=J(t,"theme",12,"light"),u=J(t,"show_recurrent",12,!1),c=J(t,"sidebar",12,"true"),v=J(t,"external_style",12,""),s=!1,d=dr([]);function _(h){if(!s)return;const A=[];i()&&A.push(`max=${i()}`);let m="/api/events";l()?m=`/feed/json/collection/${l()}`:(a()&&A.push(`tags=${a()}`),o()&&A.push(`places=${o()}`)),A.push(`show_recurrent=${u()?"true":"false"}`),fetch(`${r()}${m}?${A.join("&")}`).then(y=>y.json()).then(y=>{U(d,y.events||y)}).catch(y=>{console.error("Error loading Gancio API -> ",y)})}function b(h){if(h.media&&h.media[0].focalpoint){const A=h.media[0].focalpoint;return`${(A[0]+1)*50}% ${(A[1]+1)*50}%`}return"center center"}tn(()=>{s=!0,_()}),Lr(()=>(W(i()),W(n()),W(o()),W(a()),W(f()),W(u()),W(c()),W(r()),W(l())),()=>{_(i()&&n()&&o()&&a()&&f()&&u()&&c()&&r()&&l())}),jr(),Qr();var x=ki(),O=Or(x);{var R=h=>{var A=pi();ue(()=>z(A,"href",v())),M(h,A)};be(O,h=>{v()&&h(R)})}var w=te(O,2);{var g=h=>{var A=Ti(),m=j(A);{var y=re=>{var S=gi(),X=j(S),Ee=j(X),Ue=j(Ee,!0);D(Ee);var Re=te(Ee,2);D(X),D(S),ue(()=>{z(S,"href",r()),me(Ue,n()),z(Re,"src",`${r()??""}/logo.png`)}),M(re,S)};be(m,re=>{n()&&c()==="true"&&re(y)})}var fe=te(m,2);Gr(fe,1,()=>p(d),Vr,(re,S)=>{var X=Ei(),Ee=j(X);{var Ue=G=>{var ne=$i(),Xe=j(ne);{var tr=Te=>{var ce=mi();ue(Mi=>{z(ce,"style",`object-position: ${Mi??""}; aspect-ratio=1.7778;`),z(ce,"alt",p(S).media[0].name),z(ce,"src",r()+"/media/thumb/"+p(S).media[0].url)},[()=>b(p(S))],De),Xr(ce),M(Te,ce)},Qe=Te=>{var ce=bi();ue(()=>{z(ce,"alt",p(S).title),z(ce,"src",r()+"/fallbackimage.png")}),Xr(ce),M(Te,ce)};be(Xe,Te=>{p(S).media.length?Te(tr):Te(Qe,!1)})}D(ne),M(G,ne)};be(Ee,G=>{c()!=="true"&&G(Ue)})}var Re=te(Ee,2),Ye=j(Re),kt=j(Ye,!0);D(Ye);var Ve=te(Ye,2),Ii=j(Ve,!0);D(Ve);var er=te(Ve,2),sn=j(er),Di=te(sn);{var Li=G=>{var ne=wi(),Xe=j(ne,!0);D(ne),ue(()=>me(Xe,p(S).place.address)),M(G,ne)};be(Di,G=>{p(S).place.name!=="online"&&G(Li)})}D(er);var ji=te(er,2);{var Pi=G=>{var ne=xi();Gr(ne,5,()=>p(S).tags,Vr,(Xe,tr)=>{var Qe=yi(),Te=j(Qe);D(Qe),ue(()=>me(Te,`#${p(tr)??""}`)),M(Xe,Qe)}),D(ne),M(G,ne)};be(ji,G=>{p(S).tags.length&&G(Pi)})}D(Re),D(X),ue(G=>{z(X,"href",`${r()??""}/event/${(p(S).slug||p(S).id)??""}`),z(X,"title",p(S).title),me(kt,G),me(Ii,p(S).title),me(sn,`@${p(S).place.name??""} `)},[()=>an(p(S))],De),M(re,X)}),D(A),ue(()=>{xt(A,"dark",f()==="dark"),xt(A,"light",f()==="light"),xt(A,"sidebar",c()==="true"),xt(A,"nosidebar",c()!=="true")}),M(h,A)};be(w,h=>{p(d).length&&h(g)})}return M(e,x),Zt({get baseurl(){return r()},set baseurl(h){r(h),H()},get title(){return n()},set title(h){n(h),H()},get maxlength(){return i()},set maxlength(h){i(h),H()},get collection(){return l()},set collection(h){l(h),H()},get tags(){return a()},set tags(h){a(h),H()},get places(){return o()},set places(h){o(h),H()},get theme(){return f()},set theme(h){f(h),H()},get show_recurrent(){return u()},set show_recurrent(h){u(h),H()},get sidebar(){return c()},set sidebar(h){c(h),H()},get external_style(){return v()},set external_style(h){v(h),H()}})}customElements.define("gancio-events",ln(Si,{baseurl:{},title:{},maxlength:{},collection:{},tags:{},places:{},theme:{},show_recurrent:{},sidebar:{},external_style:{}},[],[],!0));var Ni=V('<img class="svelte-rjo5bi">'),Ci=V('<a class="card svelte-rjo5bi" target="_blank"><!> <div class="container svelte-rjo5bi"><strong> </strong> <div> </div> <div class="place svelte-rjo5bi"> </div></div></a>');const Oi={hash:"svelte-rjo5bi",code:`.card.svelte-rjo5bi {display:block;font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS',
sans-serif;box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);transition:0.3s;border-radius:5px; /* 5px rounded corners */max-width:500px;text-decoration:none;color:white;background-color:#1e1e1e;overflow:hidden;}
/* Add rounded corners to the top left and the top right corner of the image */img.svelte-rjo5bi {border-radius:5px 5px 0 0;max-height:250px;min-height:160px;width:100%;object-fit:cover;object-position:top;}.card.svelte-rjo5bi:hover .container:where(.svelte-rjo5bi) {padding-left:20px;}
/* On mouse-over, add a deeper shadow */.card.svelte-rjo5bi:hover {box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2);}
/* Add some padding inside the card container */.container.svelte-rjo5bi {transition:padding-left 0.2s;padding:16px;}.place.svelte-rjo5bi {font-weight:600;color:#ff6e40;}`};function Ri(e,t){Jt(t,!1),Jr(e,Oi);let r=J(t,"baseurl",12,"https://demo.gancio.org"),n=J(t,"id",12),i=!1,l=dr();function a(s,d){i&&fetch(`${d}/api/event/detail/${s}`).then(_=>_.json()).then(_=>U(l,_))}tn(()=>{i=!0,a(n(),r())});function o(s){return`${r()}/media/thumb/${s.media[0].url}`}function f(s){if(s.media[0].focalpoint){const d=s.media[0].focalpoint;return`${(d[0]+1)*50}% ${(d[1]+1)*50}%`}return"center center"}Lr(()=>(W(n()),W(r())),()=>{a(n(),r())}),jr(),Qr();var u=ii(),c=Or(u);{var v=s=>{var d=Ci(),_=j(d);{var b=m=>{var y=Ni();ue((fe,re)=>{z(y,"src",fe),z(y,"alt",p(l).media[0].name),z(y,"style",`object-position: ${re??""}; aspect-ratio=1.7778;`)},[()=>o(p(l)),()=>f(p(l))],De),M(m,y)};be(_,m=>{p(l).media.length&&m(b)})}var x=te(_,2),O=j(x),R=j(O,!0);D(O);var w=te(O,2),g=j(w,!0);D(w);var h=te(w,2),A=j(h);D(h),D(x),D(d),ue(m=>{z(d,"href",`${r()??""}/event/${(p(l).slug||p(l).id)??""}`),me(R,p(l).title),me(g,m),me(A,`@${p(l).place.name??""}`)},[()=>an(p(l))],De),M(s,d)};be(c,s=>{p(l)&&s(v)})}return M(e,u),Zt({get baseurl(){return r()},set baseurl(s){r(s),H()},get id(){return n()},set id(s){n(s),H()}})}customElements.define("gancio-event",ln(Ri,{baseurl:{},id:{}},[],[],!0))});