utxo22-web/_app/chunks/Event-9f9a623c.js

4 řádky
14 KiB
JavaScript

import{S as Ae,i as ze,s as Be,e as m,k as S,t as F,c as g,a as b,d,m as L,h as M,b as _,g as C,F as u,j as J,E as x,q as $,w as ee,x as te,y as le,o as B,B as ie,n as R,p as W,G as ae,J as Se,H as ce,l as ue}from"./index-f961f29d.js";import{A as Le,S as Te,L as je}from"./Avatar-ae188221.js";import{b as Oe,a as re}from"./stores-2b13be7a.js";function qe(s,e){if(!e)return 0;if(s.duration)return s.duration;const i=e.spec.events.filter(r=>r.parent===s.id);if(i.length>0){let r=i.reduce((t,n)=>t+(n.duration?n.duration:0),0);return r+=5*(i.length-1),r}}function de(s,e){e.update(i=>{const r=i.favoriteEvents;let t=null;return r.includes(s)?t=Object.assign({},i,{favoriteEvents:r.filter(n=>n!==s)}):(r.push(s),t=Object.assign(i,{favoriteEvents:r})),t})}function Ce(s){let e,i,r,t,n,l=s[1].title+"",a,o,f;return{c(){e=m("div"),i=m("div"),t=S(),n=m("div"),a=F(l),this.h()},l(v){e=g(v,"DIV",{class:!0});var c=b(e);i=g(c,"DIV",{class:!0}),b(i).forEach(d),t=L(c),n=g(c,"DIV",{class:!0});var h=b(n);a=M(h,l),h.forEach(d),c.forEach(d),this.h()},h(){_(i,"class",r="w-1 rounded-l-sm "+s[1].style),_(n,"class",o=(s[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase"),_(e,"class",f="flex "+(s[0]==="big"?"h-6 text-sm":"h-5 text-xs"))},m(v,c){C(v,e,c),u(e,i),u(e,t),u(e,n),u(n,a)},p(v,[c]){c&2&&r!==(r="w-1 rounded-l-sm "+v[1].style)&&_(i,"class",r),c&2&&l!==(l=v[1].title+"")&&J(a,l),c&1&&o!==(o=(v[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase")&&_(n,"class",o),c&1&&f!==(f="flex "+(v[0]==="big"?"h-6 text-sm":"h-5 text-xs"))&&_(e,"class",f)},i:x,o:x,d(v){v&&d(e)}}}function Fe(s,e,i){let r,{event:t={}}=e,{size:n=null}=e;const l={panel:{title:"Panelov\xE1 debata",style:"bg-custom-red text-white"},talk:{title:"P\u0159edn\xE1\u0161ka",style:"bg-custom-green text-white"},workshop:{title:"Workshop",style:"bg-custom-blue text-white"},other:{title:"Ostatn\xED",style:"bg-custom-yellow"},lightning:{title:"Lightning talk",style:"bg-pink-400"}};return s.$$set=a=>{"event"in a&&i(2,t=a.event),"size"in a&&i(0,n=a.size)},s.$$.update=()=>{s.$$.dirty&4&&i(1,r=l[t.type])},[n,r,t]}class Me extends Ae{constructor(e){super();ze(this,e,Fe,Ce,Be,{event:2,size:0})}}function he(s,e,i){const r=s.slice();return r[12]=e[i],r}function _e(s,e,i){const r=s.slice();return r[15]=e[i],r}function ve(s,e,i){const r=s.slice();return r[18]=e[i],r}function pe(s,e,i){const r=s.slice();return r[15]=e[i],r}function me(s){let e,i,r=s[5](s[0].speakers),t=[];for(let l=0;l<r.length;l+=1)t[l]=ge(pe(s,r,l));const n=l=>B(t[l],1,1,()=>{t[l]=null});return{c(){e=m("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=g(l,"DIV",{class:!0});var a=b(e);for(let o=0;o<t.length;o+=1)t[o].l(a);a.forEach(d),this.h()},h(){_(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(l,a){C(l,e,a);for(let o=0;o<t.length;o+=1)t[o].m(e,null);i=!0},p(l,a){if(a&33){r=l[5](l[0].speakers);let o;for(o=0;o<r.length;o+=1){const f=pe(l,r,o);t[o]?(t[o].p(f,a),$(t[o],1)):(t[o]=ge(f),t[o].c(),$(t[o],1),t[o].m(e,null))}for(R(),o=r.length;o<t.length;o+=1)n(o);W()}},i(l){if(!i){for(let a=0;a<r.length;a+=1)$(t[a]);i=!0}},o(l){t=t.filter(Boolean);for(let a=0;a<t.length;a+=1)B(t[a]);i=!1},d(l){l&&d(e),ae(t,l)}}}function ge(s){let e,i,r,t,n,l=s[15].name+"",a,o,f,v;return i=new Le({props:{speaker:s[15],size:"extra-small"}}),{c(){e=m("div"),ee(i.$$.fragment),r=S(),t=m("div"),n=m("a"),a=F(l),f=S(),this.h()},l(c){e=g(c,"DIV",{class:!0});var h=b(e);te(i.$$.fragment,h),r=L(h),t=g(h,"DIV",{class:!0});var k=b(t);n=g(k,"A",{href:!0});var D=b(n);a=M(D,l),D.forEach(d),k.forEach(d),f=L(h),h.forEach(d),this.h()},h(){_(n,"href",o="/lide?id="+s[15].id),_(t,"class","m-auto"),_(e,"class","flex gap-1.5")},m(c,h){C(c,e,h),le(i,e,null),u(e,r),u(e,t),u(t,n),u(n,a),u(e,f),v=!0},p(c,h){const k={};h&1&&(k.speaker=c[15]),i.$set(k),(!v||h&1)&&l!==(l=c[15].name+"")&&J(a,l),(!v||h&1&&o!==(o="/lide?id="+c[15].id))&&_(n,"href",o)},i(c){v||($(i.$$.fragment,c),v=!0)},o(c){B(i.$$.fragment,c),v=!1},d(c){c&&d(e),ie(i)}}}function be(s){let e,i,r;return{c(){e=m("div"),i=F(s[2]),r=F("m"),this.h()},l(t){e=g(t,"DIV",{class:!0});var n=b(e);i=M(n,s[2]),r=M(n,"m"),n.forEach(d),this.h()},h(){_(e,"class","text-xs my-auto")},m(t,n){C(t,e,n),u(e,i),u(e,r)},p(t,n){n&4&&J(i,t[2])},d(t){t&&d(e)}}}function ke(s){let e,i,r=s[6](s[0].track)+"",t,n;return{c(){e=m("div"),i=m("a"),t=F(r),this.h()},l(l){e=g(l,"DIV",{class:!0});var a=b(e);i=g(a,"A",{href:!0});var o=b(i);t=M(o,r),o.forEach(d),a.forEach(d),this.h()},h(){_(i,"href",n="/program?track="+s[0].track),_(e,"class","text-sm my-auto")},m(l,a){C(l,e,a),u(e,i),u(i,t)},p(l,a){a&1&&r!==(r=l[6](l[0].track)+"")&&J(t,r),a&1&&n!==(n="/program?track="+l[0].track)&&_(i,"href",n)},d(l){l&&d(e)}}}function Ee(s){let e,i=s[0].tags,r=[];for(let t=0;t<i.length;t+=1)r[t]=De(ve(s,i,t));return{c(){e=m("div");for(let t=0;t<r.length;t+=1)r[t].c();this.h()},l(t){e=g(t,"DIV",{class:!0});var n=b(e);for(let l=0;l<r.length;l+=1)r[l].l(n);n.forEach(d),this.h()},h(){_(e,"class","flex text-xs gap-1 my-auto text-blue-web/60")},m(t,n){C(t,e,n);for(let l=0;l<r.length;l+=1)r[l].m(e,null)},p(t,n){if(n&1){i=t[0].tags;let l;for(l=0;l<i.length;l+=1){const a=ve(t,i,l);r[l]?r[l].p(a,n):(r[l]=De(a),r[l].c(),r[l].m(e,null))}for(;l<r.length;l+=1)r[l].d(1);r.length=i.length}},d(t){t&&d(e),ae(r,t)}}}function De(s){let e,i,r,t=s[18]+"",n,l;return{c(){e=m("div"),i=m("a"),r=F("#"),n=F(t),this.h()},l(a){e=g(a,"DIV",{});var o=b(e);i=g(o,"A",{href:!0});var f=b(i);r=M(f,"#"),n=M(f,t),f.forEach(d),o.forEach(d),this.h()},h(){_(i,"href",l="/program?tag="+s[18])},m(a,o){C(a,e,o),u(e,i),u(i,r),u(i,n)},p(a,o){o&1&&t!==(t=a[18]+"")&&J(n,t),o&1&&l!==(l="/program?tag="+a[18])&&_(i,"href",l)},d(a){a&&d(e)}}}function we(s){let e,i,r,t;i=new Te({props:{source:s[1].md,renderers:s[4]}});let n=s[1].stripped&&Ie(s);return{c(){e=m("div"),ee(i.$$.fragment),r=S(),n&&n.c(),this.h()},l(l){e=g(l,"DIV",{class:!0});var a=b(e);te(i.$$.fragment,a),r=L(a),n&&n.l(a),a.forEach(d),this.h()},h(){_(e,"class","mt-2")},m(l,a){C(l,e,a),le(i,e,null),u(e,r),n&&n.m(e,null),t=!0},p(l,a){const o={};a&2&&(o.source=l[1].md),i.$set(o),l[1].stripped?n?n.p(l,a):(n=Ie(l),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i(l){t||($(i.$$.fragment,l),t=!0)},o(l){B(i.$$.fragment,l),t=!1},d(l){l&&d(e),ie(i),n&&n.d()}}}function Ie(s){let e,i,r,t,n,l;return{c(){e=m("div"),i=F("("),r=m("a"),t=F("Zobrazit cel\xFD popis"),l=F(")"),this.h()},l(a){e=g(a,"DIV",{class:!0});var o=b(e);i=M(o,"("),r=g(o,"A",{href:!0});var f=b(r);t=M(f,"Zobrazit cel\xFD popis"),f.forEach(d),l=M(o,")"),o.forEach(d),this.h()},h(){_(r,"href",n="/udalosti?id="+s[0].id),_(e,"class","text-sm text-blue-web/60")},m(a,o){C(a,e,o),u(e,i),u(e,r),u(r,t),u(e,l)},p(a,o){o&1&&n!==(n="/udalosti?id="+a[0].id)&&_(r,"href",n)},d(a){a&&d(e)}}}function Ve(s){let e,i,r,t=s[7](s[0]),n=[];for(let a=0;a<t.length;a+=1)n[a]=ye(he(s,t,a));const l=a=>B(n[a],1,1,()=>{n[a]=null});return{c(){e=m("div"),i=m("div");for(let a=0;a<n.length;a+=1)n[a].c();this.h()},l(a){e=g(a,"DIV",{class:!0});var o=b(e);i=g(o,"DIV",{class:!0,cellpadding:!0});var f=b(i);for(let v=0;v<n.length;v+=1)n[v].l(f);f.forEach(d),o.forEach(d),this.h()},h(){_(i,"class","flex flex-wrap gap-2"),_(i,"cellpadding","5"),_(e,"class","mt-4 w-auto mb-2")},m(a,o){C(a,e,o),u(e,i);for(let f=0;f<n.length;f+=1)n[f].m(i,null);r=!0},p(a,o){if(o&169){t=a[7](a[0]);let f;for(f=0;f<t.length;f+=1){const v=he(a,t,f);n[f]?(n[f].p(v,o),$(n[f],1)):(n[f]=ye(v),n[f].c(),$(n[f],1),n[f].m(i,null))}for(R(),f=t.length;f<n.length;f+=1)l(f);W()}},i(a){if(!r){for(let o=0;o<t.length;o+=1)$(n[o]);r=!0}},o(a){n=n.filter(Boolean);for(let o=0;o<n.length;o+=1)B(n[o]);r=!1},d(a){a&&d(e),ae(n,a)}}}function Pe(s){let e,i,r=s[5](s[12].speakers),t=[];for(let l=0;l<r.length;l+=1)t[l]=$e(_e(s,r,l));const n=l=>B(t[l],1,1,()=>{t[l]=null});return{c(){for(let l=0;l<t.length;l+=1)t[l].c();e=ue()},l(l){for(let a=0;a<t.length;a+=1)t[a].l(l);e=ue()},m(l,a){for(let o=0;o<t.length;o+=1)t[o].m(l,a);C(l,e,a),i=!0},p(l,a){if(a&161){r=l[5](l[12].speakers);let o;for(o=0;o<r.length;o+=1){const f=_e(l,r,o);t[o]?(t[o].p(f,a),$(t[o],1)):(t[o]=$e(f),t[o].c(),$(t[o],1),t[o].m(e.parentNode,e))}for(R(),o=r.length;o<t.length;o+=1)n(o);W()}},i(l){if(!i){for(let a=0;a<r.length;a+=1)$(t[a]);i=!0}},o(l){t=t.filter(Boolean);for(let a=0;a<t.length;a+=1)B(t[a]);i=!1},d(l){ae(t,l),l&&d(e)}}}function Ze(s){let e,i;return{c(){e=m("div"),i=F("TBA")},l(r){e=g(r,"DIV",{});var t=b(e);i=M(t,"TBA"),t.forEach(d)},m(r,t){C(r,e,t),u(e,i)},p:x,i:x,o:x,d(r){r&&d(e)}}}function $e(s){let e,i,r,t,n,l=s[15].name+"",a,o,f,v;return i=new Le({props:{speaker:s[15],size:"micro"}}),{c(){e=m("div"),ee(i.$$.fragment),r=S(),t=m("div"),n=m("a"),a=F(l),f=S(),this.h()},l(c){e=g(c,"DIV",{class:!0});var h=b(e);te(i.$$.fragment,h),r=L(h),t=g(h,"DIV",{});var k=b(t);n=g(k,"A",{href:!0});var D=b(n);a=M(D,l),D.forEach(d),k.forEach(d),f=L(h),h.forEach(d),this.h()},h(){_(n,"href",o="/lide?id="+s[15].id),_(e,"class","flex gap-1")},m(c,h){C(c,e,h),le(i,e,null),u(e,r),u(e,t),u(t,n),u(n,a),u(e,f),v=!0},p(c,h){const k={};h&1&&(k.speaker=c[15]),i.$set(k),(!v||h&1)&&l!==(l=c[15].name+"")&&J(a,l),(!v||h&1&&o!==(o="/lide?id="+c[15].id))&&_(n,"href",o)},i(c){v||($(i.$$.fragment,c),v=!0)},o(c){B(i.$$.fragment,c),v=!1},d(c){c&&d(e),ie(i)}}}function ye(s){let e,i,r,t=s[12].name+"",n,l,a,o,f,v,c,h,k,D,w,I,G,N;function K(){return s[11](s[12])}const Q=[Ze,Pe],P=[];function U(T,V){return T[12].speakers.length===0?0:1}return h=U(s),k=P[h]=Q[h](s),{c(){e=m("div"),i=m("div"),r=m("a"),n=F(t),a=S(),o=m("i"),v=S(),c=m("div"),k.c(),D=S(),this.h()},l(T){e=g(T,"DIV",{class:!0});var V=b(e);i=g(V,"DIV",{class:!0});var Z=b(i);r=g(Z,"A",{href:!0});var X=b(r);n=M(X,t),X.forEach(d),a=L(Z),o=g(Z,"I",{class:!0}),b(o).forEach(d),Z.forEach(d),v=L(V),c=g(V,"DIV",{class:!0});var y=b(c);k.l(y),y.forEach(d),D=L(V),V.forEach(d),this.h()},h(){_(r,"href",l="/udalosti?id="+s[12].id),_(o,"class",f="fa-star "+(s[3].favoriteEvents.includes(s[12].id)?"fa-solid":"fa-regular")+" cursor-pointer"),_(i,"class","font-bold"),_(c,"class","mt-1"),_(e,"class",w="border rounded py-1.5 px-2.5 text-sm transition-all "+(s[3].favoriteEvents.includes(s[12].id)?"bg-yellow-100":"bg-gray-100"))},m(T,V){C(T,e,V),u(e,i),u(i,r),u(r,n),u(i,a),u(i,o),u(e,v),u(e,c),P[h].m(c,null),u(e,D),I=!0,G||(N=Se(o,"click",K),G=!0)},p(T,V){s=T,(!I||V&1)&&t!==(t=s[12].name+"")&&J(n,t),(!I||V&1&&l!==(l="/udalosti?id="+s[12].id))&&_(r,"href",l),(!I||V&9&&f!==(f="fa-star "+(s[3].favoriteEvents.includes(s[12].id)?"fa-solid":"fa-regular")+" cursor-pointer"))&&_(o,"class",f);let Z=h;h=U(s),h===Z?P[h].p(s,V):(R(),B(P[Z],1,1,()=>{P[Z]=null}),W(),k=P[h],k?k.p(s,V):(k=P[h]=Q[h](s),k.c()),$(k,1),k.m(c,null)),(!I||V&9&&w!==(w="border rounded py-1.5 px-2.5 text-sm transition-all "+(s[3].favoriteEvents.includes(s[12].id)?"bg-yellow-100":"bg-gray-100")))&&_(e,"class",w)},i(T){I||($(k),I=!0)},o(T){B(k),I=!1},d(T){T&&d(e),P[h].d(),G=!1,N()}}}function Ge(s){let e,i,r,t,n,l,a,o=s[0].name+"",f,v,c,h,k,D,w,I,G,N,K,Q,P,U=s[7](s[0]).length>0,T,V,Z,X,y=s[0].speakers&&s[0].speakers.length>0&&me(s);I=new Me({props:{event:s[0]}});let j=s[2]&&be(s),O=s[0].track&&ke(s),q=s[0].tags&&Ee(s),A=s[0].description&&we(s),z=U&&Ve(s);return{c(){e=m("div"),i=m("div"),r=m("i"),n=S(),l=m("div"),a=m("a"),f=F(o),c=S(),y&&y.c(),h=S(),k=m("div"),D=m("div"),w=m("div"),ee(I.$$.fragment),G=S(),j&&j.c(),N=S(),O&&O.c(),K=S(),q&&q.c(),Q=S(),A&&A.c(),P=S(),z&&z.c(),this.h()},l(p){e=g(p,"DIV",{class:!0});var E=b(e);i=g(E,"DIV",{class:!0});var Y=b(i);r=g(Y,"I",{class:!0}),b(r).forEach(d),Y.forEach(d),n=L(E),l=g(E,"DIV",{class:!0});var se=b(l);a=g(se,"A",{href:!0});var ne=b(a);f=M(ne,o),ne.forEach(d),se.forEach(d),c=L(E),y&&y.l(E),h=L(E),k=g(E,"DIV",{class:!0});var oe=b(k);D=g(oe,"DIV",{class:!0});var H=b(D);w=g(H,"DIV",{});var fe=b(w);te(I.$$.fragment,fe),fe.forEach(d),G=L(H),j&&j.l(H),N=L(H),O&&O.l(H),K=L(H),q&&q.l(H),H.forEach(d),oe.forEach(d),Q=L(E),A&&A.l(E),P=L(E),z&&z.l(E),E.forEach(d),this.h()},h(){_(r,"class",t="fa-star "+(s[3].favoriteEvents.includes(s[0].id)?"fa-solid":"fa-regular")+" cursor-pointer"),_(i,"class","float-right"),_(a,"href",v="/udalosti?id="+s[0].id),_(l,"class","text-lg font-semibold"),_(D,"class","text-sm flex flex-wrap gap-3 flex-1"),_(k,"class",""),_(e,"class",T="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(s[3].favoriteEvents.includes(s[0].id)?"bg-yellow-100":""))},m(p,E){C(p,e,E),u(e,i),u(i,r),u(e,n),u(e,l),u(l,a),u(a,f),u(e,c),y&&y.m(e,null),u(e,h),u(e,k),u(k,D),u(D,w),le(I,w,null),u(D,G),j&&j.m(D,null),u(D,N),O&&O.m(D,null),u(D,K),q&&q.m(D,null),u(e,Q),A&&A.m(e,null),u(e,P),z&&z.m(e,null),V=!0,Z||(X=Se(r,"click",s[10]),Z=!0)},p(p,[E]){(!V||E&9&&t!==(t="fa-star "+(p[3].favoriteEvents.includes(p[0].id)?"fa-solid":"fa-regular")+" cursor-pointer"))&&_(r,"class",t),(!V||E&1)&&o!==(o=p[0].name+"")&&J(f,o),(!V||E&1&&v!==(v="/udalosti?id="+p[0].id))&&_(a,"href",v),p[0].speakers&&p[0].speakers.length>0?y?(y.p(p,E),E&1&&$(y,1)):(y=me(p),y.c(),$(y,1),y.m(e,h)):y&&(R(),B(y,1,1,()=>{y=null}),W());const Y={};E&1&&(Y.event=p[0]),I.$set(Y),p[2]?j?j.p(p,E):(j=be(p),j.c(),j.m(D,N)):j&&(j.d(1),j=null),p[0].track?O?O.p(p,E):(O=ke(p),O.c(),O.m(D,K)):O&&(O.d(1),O=null),p[0].tags?q?q.p(p,E):(q=Ee(p),q.c(),q.m(D,null)):q&&(q.d(1),q=null),p[0].description?A?(A.p(p,E),E&1&&$(A,1)):(A=we(p),A.c(),$(A,1),A.m(e,P)):A&&(R(),B(A,1,1,()=>{A=null}),W()),E&1&&(U=p[7](p[0]).length>0),U?z?(z.p(p,E),E&1&&$(z,1)):(z=Ve(p),z.c(),$(z,1),z.m(e,null)):z&&(R(),B(z,1,1,()=>{z=null}),W()),(!V||E&9&&T!==(T="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(p[3].favoriteEvents.includes(p[0].id)?"bg-yellow-100":"")))&&_(e,"class",T)},i(p){V||($(y),$(I.$$.fragment,p),$(A),$(z),V=!0)},o(p){B(y),B(I.$$.fragment,p),B(A),B(z),V=!1},d(p){p&&d(e),y&&y.d(),ie(I),j&&j.d(),O&&O.d(),q&&q.d(),A&&A.d(),z&&z.d(),Z=!1,X()}}}function He(s){if(!s.description)return{};const e=s.description.split(`
`),i=e.length>1;return{md:e[0],stripped:i}}function Je(s,e,i){let r,t,n,l,a;ce(s,Oe,w=>i(9,l=w)),ce(s,re,w=>i(3,a=w));let{event:o}=e;const f={link:je};function v(w){if(!!w)return w.map(I=>l.spec.speakers.find(G=>G.id===I))}function c(w){const I=l.spec.tracks.find(G=>G.id===w);return I.shortname||I.name}function h(w){return l.spec.events.filter(I=>I.parent===w.id)}const k=()=>de(r.id,re),D=w=>de(w.id,re);return s.$$set=w=>{"event"in w&&i(8,o=w.event)},s.$$.update=()=>{s.$$.dirty&256&&i(0,r=o),s.$$.dirty&513&&i(2,t=qe(r,l)),s.$$.dirty&1&&i(1,n=He(r))},[r,n,t,a,f,v,c,h,o,l,k,D]}class Ke extends Ae{constructor(e){super();ze(this,e,Je,Ge,Be,{event:8})}}export{Me as E,Ke as a,de as b,qe as c};