utxo22-web/_app/chunks/Event-ea7c2ae0.js

2 řádky
10 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as ve,i as _e,s as pe,e as m,k as z,t as F,c as g,a as b,d,m as B,h as L,b as v,g as C,F as u,E as G,q as $,w as W,x as J,y as Q,o as j,B as U,n as X,p as Y,G as Z,j as be,K as me,H as re,l as se}from"./index-e45cd9d1.js";import{A as ge}from"./Avatar-f71fd69a.js";import{a as ie,b as ke}from"./stores-adaa4006.js";function Ee(s){let e,a,i,t,o=s[1].title+"",n,l,r;return{c(){e=m("div"),a=m("div"),i=z(),t=m("div"),n=F(o),this.h()},l(c){e=g(c,"DIV",{class:!0});var h=b(e);a=g(h,"DIV",{class:!0}),b(a).forEach(d),i=B(h),t=g(h,"DIV",{class:!0});var _=b(t);n=L(_,o),_.forEach(d),h.forEach(d),this.h()},h(){v(a,"class","w-1 rounded-l-sm "+s[1].style),v(t,"class",l=(s[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase"),v(e,"class",r="flex "+(s[0]==="big"?"h-6 text-sm":"h-5 text-xs"))},m(c,h){C(c,e,h),u(e,a),u(e,i),u(e,t),u(t,n)},p(c,[h]){h&1&&l!==(l=(c[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase")&&v(t,"class",l),h&1&&r!==(r="flex "+(c[0]==="big"?"h-6 text-sm":"h-5 text-xs"))&&v(e,"class",r)},i:G,o:G,d(c){c&&d(e)}}}function ye(s,e,a){let{event:i={}}=e,{size:t=null}=e;const n={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"}}[i.type];return s.$$set=l=>{"event"in l&&a(2,i=l.event),"size"in l&&a(0,t=l.size)},[t,n,i]}class De extends ve{constructor(e){super();_e(this,e,ye,Ee,pe,{event:2,size:0})}}function Ie(s,e){if(!e)return 0;if(s.duration)return s.duration;const a=e.spec.events.filter(i=>i.parent===s.id);if(a.length>0){let i=a.reduce((t,o)=>t+(o.duration?o.duration:0),0);return i+=5*(a.length-1),i}}function ne(s,e,a){const i=s.slice();return i[9]=e[a],i}function oe(s,e,a){const i=s.slice();return i[12]=e[a],i}function ce(s,e,a){const i=s.slice();return i[12]=e[a],i}function we(s){let e,a,i=s[3](s[2].speakers),t=[];for(let n=0;n<i.length;n+=1)t[n]=fe(ce(s,i,n));const o=n=>j(t[n],1,1,()=>{t[n]=null});return{c(){e=m("div");for(let n=0;n<t.length;n+=1)t[n].c();this.h()},l(n){e=g(n,"DIV",{class:!0});var l=b(e);for(let r=0;r<t.length;r+=1)t[r].l(l);l.forEach(d),this.h()},h(){v(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(n,l){C(n,e,l);for(let r=0;r<t.length;r+=1)t[r].m(e,null);a=!0},p(n,l){if(l&12){i=n[3](n[2].speakers);let r;for(r=0;r<i.length;r+=1){const c=ce(n,i,r);t[r]?(t[r].p(c,l),$(t[r],1)):(t[r]=fe(c),t[r].c(),$(t[r],1),t[r].m(e,null))}for(X(),r=i.length;r<t.length;r+=1)o(r);Y()}},i(n){if(!a){for(let l=0;l<i.length;l+=1)$(t[l]);a=!0}},o(n){t=t.filter(Boolean);for(let l=0;l<t.length;l+=1)j(t[l]);a=!1},d(n){n&&d(e),Z(t,n)}}}function fe(s){let e,a,i,t,o,n=s[12].name+"",l,r,c,h;return a=new ge({props:{speaker:s[12],size:"extra-small"}}),{c(){e=m("div"),W(a.$$.fragment),i=z(),t=m("div"),o=m("a"),l=F(n),c=z(),this.h()},l(_){e=g(_,"DIV",{class:!0});var f=b(e);J(a.$$.fragment,f),i=B(f),t=g(f,"DIV",{class:!0});var p=b(t);o=g(p,"A",{href:!0});var k=b(o);l=L(k,n),k.forEach(d),p.forEach(d),c=B(f),f.forEach(d),this.h()},h(){v(o,"href",r="/lide?id="+s[12].id),v(t,"class","m-auto"),v(e,"class","flex gap-1.5")},m(_,f){C(_,e,f),Q(a,e,null),u(e,i),u(e,t),u(t,o),u(o,l),u(e,c),h=!0},p:G,i(_){h||($(a.$$.fragment,_),h=!0)},o(_){j(a.$$.fragment,_),h=!1},d(_){_&&d(e),U(a)}}}function ue(s){let e,a,i;return{c(){e=m("div"),a=F(s[0]),i=F("m"),this.h()},l(t){e=g(t,"DIV",{class:!0});var o=b(e);a=L(o,s[0]),i=L(o,"m"),o.forEach(d),this.h()},h(){v(e,"class","text-xs my-auto")},m(t,o){C(t,e,o),u(e,a),u(e,i)},p(t,o){o&1&&be(a,t[0])},d(t){t&&d(e)}}}function Ve(s){let e,a,i,t=s[5](s[2]),o=[];for(let l=0;l<t.length;l+=1)o[l]=he(ne(s,t,l));const n=l=>j(o[l],1,1,()=>{o[l]=null});return{c(){e=m("div"),a=m("div");for(let l=0;l<o.length;l+=1)o[l].c();this.h()},l(l){e=g(l,"DIV",{class:!0});var r=b(e);a=g(r,"DIV",{class:!0,cellpadding:!0});var c=b(a);for(let h=0;h<o.length;h+=1)o[h].l(c);c.forEach(d),r.forEach(d),this.h()},h(){v(a,"class","flex flex