utxo22-web/_app/pages/program.svelte-92fb905a.js

14 řádky
29 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as vt,i as bt,s as gt,e as k,t as S,k as F,c as w,a as E,h as H,d,m as U,b as m,g as L,J as u,O as De,j as le,K as fe,Y as kt,n as re,o as Q,p as oe,q as N,L as Ee,v as wt,T as Et,a4 as $e,E as he,l as ce,w as ht,x as _t,y as pt,B as mt,a5 as Dt}from"../chunks/index-695b5929.js";import{g as yt}from"../chunks/navigation-0e6511d1.js";import{p as Se}from"../chunks/stores-67278648.js";import{f as se}from"../chunks/utils-1595b72e.js";import{b as He,s as de}from"../chunks/stores-726c7852.js";import{p as Tt}from"../chunks/periods-3c9faf13.js";import{L as It,S as Vt}from"../chunks/Link-9c9f68ae.js";import{S as At}from"../chunks/SvelteTooltip-3b97fc95.js";import{c as $t}from"../chunks/index-1cc1bdc7.js";import{l as Pe}from"../chunks/index-c9b2ee0d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-14ac584d.js";import"../chunks/index-57c7a2a5.js";const je={panel:{color:"bg-orange-400",colorLight:"bg-orange-400/20",colorDark:"bg-orange-400/40"},talk:{color:"bg-custom-green",colorLight:"bg-custom-green/20",colorDark:"bg-custom-green/40"},workshop:{color:"bg-custom-blue",colorLight:"bg-custom-blue/20",colorDark:"bg-custom-blue/40"},campfire:{color:"bg-purple-400",colorLight:"bg-purple-400/20",colorDark:"bg-purple-400/40"},"lightning-series":{color:"bg-yellow-400",colorLight:"bg-yellow-400/20",colorDark:"bg-yellow-400/40"},other:{color:"bg-rose-400",colorLight:"bg-rose-400/20",colorDark:"bg-rose-400/40"}};const{Boolean:_e}=Dt;function Le(s,e,t){const l=s.slice();return l[20]=e[t],l}function Ne(s,e,t){const l=s.slice();return l[23]=e[t],l}function ze(s,e,t){const l=s.slice();return l[26]=e[t],l}function Be(s,e,t){const l=s.slice();return l[29]=e[t][0],l[30]=e[t][1],l}function Me(s,e,t){const l=s.slice();return l[33]=e[t],l}function Oe(s,e,t){const l=s.slice();return l[36]=e[t],l}function Ce(s,e,t){const l=s.slice();return l[26]=e[t],l}function Fe(s,e,t){const l=s.slice();return l[41]=e[t],l}function Ue(s,e,t){const l=s.slice();return l[41]=e[t],l}function Ze(s,e,t){const l=s.slice();return l[20]=e[t],l}function qe(s){let e,t,l,a,i,r,n,o,h,f,T,y,j,K,Z,M,O,G,z=s[7](s[0]),v=[];for(let c=0;c<z.length;c+=1)v[c]=Re(Ze(s,z,c));let g=ct(s[0]),_=[];for(let c=0;c<g.length;c+=1)_[c]=Ye(Ue(s,g,c));return{c(){e=k("div"),t=k("div"),l=k("div"),a=S("Den"),i=F();for(let c=0;c<v.length;c+=1)v[c].c();r=F(),n=k("div"),o=k("div"),h=k("div"),f=S("S\xE1l"),T=F();for(let c=0;c<_.length;c+=1)_[c].c();y=F(),j=k("div"),K=k("label"),Z=k("input"),M=S(" Zobrazit popisy"),this.h()},l(c){e=w(c,"DIV",{class:!0});var I=E(e);t=w(I,"DIV",{class:!0});var p=E(t);l=w(p,"DIV",{class:!0});var J=E(l);a=H(J,"Den"),J.forEach(d),i=U(p);for(let q=0;q<v.length;q+=1)v[q].l(p);p.forEach(d),I.forEach(d),r=U(c),n=w(c,"DIV",{class:!0});var W=E(n);o=w(W,"DIV",{class:!0});var ee=E(o);h=w(ee,"DIV",{class:!0});var V=E(h);f=H(V,"S\xE1l"),V.forEach(d),T=U(ee);for(let q=0;q<_.length;q+=1)_[q].l(ee);ee.forEach(d),W.forEach(d),y=U(c),j=w(c,"DIV",{class:!0});var C=E(j);K=w(C,"LABEL",{});var A=E(K);Z=w(A,"INPUT",{type:!0}),M=H(A," Zobrazit popisy"),A.forEach(d),C.forEach(d),this.h()},h(){m(l,"class","font-semibold uppercase my-auto mx-3"),m(t,"class","flex gap-1 flex-wrap"),m(e,"class","mb-4"),m(h,"class","font-semibold uppercase my-auto mx-3"),m(o,"class","flex gap-1 flex-wrap"),m(n,"class","mb-4"),m(Z,"type","checkbox"),m(j,"class","mb-4")},m(c,I){L(c,e,I),u(e,t),u(t,l),u(l,a),u(t,i);for(let p=0;p<v.length;p+=1)v[p].m(t,null);L(c,r,I),L(c,n,I),u(n,o),u(o,h),u(h,f),u(o,T);for(let p=0;p<_.length;p+=1)_[p].m(o,null);L(c,y,I),L(c,j,I),u(j,K),u(K,Z),Z.checked=s[3].showDescriptions,u(K,M),O||(G=De(Z,"change",s[11]),O=!0)},p(c,I){if(I[0]&137){z=c[7](c[0]);let p;for(p=0;p<z.length;p+=1){const J=Ze(c,z,p);v[p]?v[p].p(J,I):(v[p]=Re(J),v[p].c(),v[p].m(t,null))}for(;p<v.length;p+=1)v[p].d(1);v.length=z.length}if(I[0]&9){g=ct(c[0]);let p;for(p=0;p<g.length;p+=1){const J=Ue(c,g,p);_[p]?_[p].p(J,I):(_[p]=Ye(J),_[p].c(),_[p].m(o,null))}for(;p<_.length;p+=1)_[p].d(1);_.length=g.length}I[0]&8&&(Z.checked=c[3].showDescriptions)},d(c){c&&d(e),fe(v,c),c&&d(r),c&&d(n),fe(_,c),c&&d(y),c&&d(j
V\u0161echny ud\xE1losti jsou v \u010De\u0161tin\u011B nebo sloven\u0161tin\u011B, pokud nen\xED uvedeno
jinak.`),this.h()},l(o){for(let f=0;f<r.length;f+=1)r[f].l(o);e=U(o),t=w(o,"DIV",{class:!0});var h=E(t);l=H(h,`V\u0161echny \u010Dasy jsou lok\xE1ln\xED - st\u0159edoevropsk\xE9 \u010Dasov\xE9 p\xE1smo CET (+02:00).
V\u0161echny ud\xE1losti jsou v \u010De\u0161tin\u011B nebo sloven\u0161tin\u011B, pokud nen\xED uvedeno
jinak.`),h.forEach(d),this.h()},h(){m(t,"class","print:hidden italic max-w-6xl mx-auto px-6 mb-4 print:max-w-full break-before-page flex gap-3")},m(o,h){for(let f=0;f<r.length;f+=1)r[f].m(o,h);L(o,e,h),L(o,t,h),u(t,l),a=!0},p(o,h){if(h[0]&383){i=o[6](o[0],o[3].time);let f;for(f=0;f<i.length;f+=1){const T=Le(o,i,f);r[f]?(r[f].p(T,h),N(r[f],1)):(r[f]=at(T),r[f].c(),N(r[f],1),r[f].m(e.parentNode,e))}for(re(),f=i.length;f<r.length;f+=1)n(f);oe()}},i(o){if(!a){for(let h=0;h<i.length;h+=1)N(r[h]);a=!0}},o(o){r=r.filter(_e);for(let h=0;h<r.length;h+=1)Q(r[h]);a=!1},d(o){fe(r,o),o&&d(e),o&&d(t)}}}function Pt(s){let e=se(new Date(s[20].date),"iiii d.M.y")+"",t;return{c(){t=S(e)},l(l){t=H(l,e)},m(l,a){L(l,t,a)},p(l,a){a[0]&9&&e!==(e=se(new Date(l[20].date),"iiii d.M.y")+"")&&le(t,e)},d(l){l&&d(t)}}}function jt(s){let e=s[20].name+"",t;return{c(){t=S(e)},l(l){t=H(l,e)},m(l,a){L(l,t,a)},p(l,a){a[0]&9&&e!==(e=l[20].name+"")&&le(t,e)},d(l){l&&d(t)}}}function Lt(s){let e=(s[41].shortname||s[41].name)+"",t;return{c(){t=S(e)},l(l){t=H(l,e)},m(l,a){L(l,t,a)},p(l,a){a[0]&2&&e!==(e=(l[41].shortname||l[41].name)+"")&&le(t,e)},d(l){l&&d(t)}}}function Nt(s){let e,t=(s[41].shortname||s[41].name)+"",l,a;return{c(){e=k("a"),l=S(t),this.h()},l(i){e=w(i,"A",{href:!0,target:!0});var r=E(e);l=H(r,t),r.forEach(d),this.h()},h(){m(e,"href",a=s[41].url),m(e,"target","_blank")},m(i,r){L(i,e,r),u(e,l)},p(i,r){r[0]&2&&t!==(t=(i[41].shortname||i[41].name)+"")&&le(l,t),r[0]&2&&a!==(a=i[41].url)&&m(e,"href",a)},d(i){i&&d(e)}}}function Je(s){let e,t,l,a,i,r;function n(f,T){return f[41].url?Nt:Lt}let o=n(s),h=o(s);return{c(){e=k("div"),t=k("div"),a=F(),i=k("div"),h.c(),r=F(),this.h()},l(f){e=w(f,"DIV",{class:!0});var T=E(e);t=w(T,"DIV",{class:!0}),E(t).forEach(d),a=U(T),i=w(T,"DIV",{class:!0});var y=E(i);h.l(y),y.forEach(d),r=U(T),T.forEach(d),this.h()},h(){m(t,"class",l="w-3 h-3 "+s[41].color+" my-auto rounded-sm shrink-0"),m(i,"class","text-sm print:text-lg my-auto whitespace-nowrap"),m(e,"class","flex gap-1 w-1/4 text-blue-web")},m(f,T){L(f,e,T),u(e,t),u(e,a),u(e,i),h.m(i,null),u(e,r)},p(f,T){T[0]&2&&l!==(l="w-3 h-3 "+f[41].color+" my-auto rounded-sm shrink-0")&&m(t,"class",l),o===(o=n(f))&&h?h.p(f,T):(h.d(1),h=o(f),h&&(h.c(),h.m(i,null)))},d(f){f&&d(e),h.d()}}}function Ke(s){let e,t,l,a=s[26].capacity.seat+"",i,r,n,o,h=s[26].capacity.stand+"",f,T,y,j,K,Z,M=s[26].name+"",O,G,z,v,g=s[26].livestream&&Xe(s);return{c(){e=k("th"),t=k("div"),g&&g.c(),l=F(),i=S(a),r=F(),n=k("i"),o=S(" + "),f=S(h),T=F(),y=k("i"),j=F(),K=k("div"),Z=k("a"),O=S(M),z=F(),this.h()},l(_){e=w(_,"TH",{class:!0});var c=E(e);t=w(c,"DIV",{class:!0});var I=E(t);g&&g.l(I),l=U(I),i=H(I,a),r=U(I),n=w(I,"I",{class:!0}),E(n).forEach(d),o=H(I," + "),f=H(I,h),T=U(I),y=w(I,"I",{class:!0}),E(y).forEach(d),I.forEach(d),j=U(c),K=w(c,"DIV",{});var p=E(K);Z=w(p,"A",{href:!0});var J=E(Z);O=H(J,M),J.forEach(d),p.forEach(d),z=U(c),c.forEach(d),this.h()},h(){m(n,"class","fa-solid fa-chair"),m(y,"class","fa-solid fa-person"),m(t,"class","text-xs font-normal text-blue-web/60 mb-2.5"),m(Z,"href",G="/program?stage="+s[26].id+"&time="+s[3].time),m(e,"class","text-md py-1.5 px-1 sticky top-0 bg-white align-bottom")},m(_,c){L(_,e,c),u(e,t),g&&g.m(t,null),u(t,l),u(t,i),u(t,r),u(t,n),u(t,o),u(t,f),u(t,T),u(t,y),u(e,j),u(e,K),u(K,Z),u(Z,O),u(e,z),v=!0},p(_,c){_[26].livestream?g?c[0]&13&&N(g,1):(g=Xe(_),g.c(),N(g,1),g.m(t,l)):g&&(re(),Q(g,1,1,()=>{g=null}),oe()),(!v||c[0]&13)&&a!==(a=_[26].capacity.seat+"")&&le(i,a),(!v||c[0]&13)&&h!==(h=_[26].capacity.stand+"")&&le(f,h),(!v||c[0]&13)&&M!==(M=_[26].name+"")&&le(O,M),(!v||c[0]&13&&G!==(G="/program?stage="+_[26].id+"&time="+_[3].time))&&m(Z,"href",G)},i(_){v||(N(g),v=!0)},o(_){Q(g),v=!1},d(_){_&&d(e),g&&g.d()}}}function Xe(s){let e,t;return e=new At({props:{tip:"S\xE1l je n\xE1hr\xE1van\xFD a livestreamovan\xFD.",bottom:"true",$$slots:{default:[zt]},$$scope:{ctx:s}}}),{c(){ht(e.$$.fragment)},l(l){_t(e.$$.fragment,l)},m(l,a){pt(e,l,a),t=!0},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){mt(e,l)}}}function zt(s){let e,t;return{c(){e=k("div"),t=k("
`),f=k("a"),T=S("sobota"),y=S(`,
`),j=k("a"),K=S("sobota (party)"),Z=S(`,
`),M=k("a"),O=S("ned\u011Ble"),G=F(),z=k("div"),p&&p.c(),v=F(),g=k("section"),c.c(),this.h()},l(V){kt('[data-svelte="svelte-124umcn"]',document.head).forEach(d),e=U(V),t=w(V,"SECTION",{class:!0});var A=E(t);l=w(A,"H1",{class:!0});var q=E(l);a=H(q,"Program"),q.forEach(d),i=U(A),r=w(A,"DIV",{class:!0});var B=E(r);n=w(B,"A",{href:!0,class:!0});var $=E(n);o=H($,"Seznam v\u0161ech ud\xE1lost\xED"),$.forEach(d),h=H(B,`, PDF:
`),f=w(B,"A",{href:!0,target:!0,class:!0});var X=E(f);T=H(X,"sobota"),X.forEach(d),y=H(B,`,
`),j=w(B,"A",{href:!0,target:!0,class:!0});var R=E(j);K=H(R,"sobota (party)"),R.forEach(d),Z=H(B,`,
`),M=w(B,"A",{href:!0,target:!0,class:!0});var te=E(M);O=H(te,"ned\u011Ble"),te.forEach(d),B.forEach(d),G=U(A),z=w(A,"DIV",{});var Y=E(z);p&&p.l(Y),Y.forEach(d),A.forEach(d),v=U(V),g=w(V,"SECTION",{class:!0});var ue=E(g);c.l(ue),ue.forEach(d),this.h()},h(){document.title="Program | UTXO.22",m(l,"class","uppercase text-2xl font-bold mb-2"),m(n,"href","/seznam-udalosti"),m(n,"class","svelte-8shy9x"),m(f,"href","https://pub.utxo.cz/22/pdf/sobota.pdf"),m(f,"target","_blank"),m(f,"class","svelte-8shy9x"),m(j,"href","https://pub.utxo.cz/22/pdf/sobota-party.pdf"),m(j,"target","_blank"),m(j,"class","svelte-8shy9x"),m(M,"href","https://pub.utxo.cz/22/pdf/nedele.pdf"),m(M,"target","_blank"),m(M,"class","svelte-8shy9x"),m(r,"class","mb-4 utxo-program-head svelte-8shy9x"),m(t,"class","relative mx-auto pt-6 sm:pt-10 pb-6 px-6 max-w-6xl text-blue-web print:hidden"),m(g,"class","relative mx-auto pb-6 sm:pb-10 px-0 text-blue-web")},m(V,C){L(V,e,C),L(V,t,C),u(t,l),u(l,a),u(t,i),u(t,r),u(r,n),u(n,o),u(r,h),u(r,f),u(f,T),u(r,y),u(r,j),u(j,K),u(r,Z),u(r,M),u(M,O),u(t,G),u(t,z),p&&p.m(z,null),L(V,v,C),L(V,g,C),W[_].m(g,null),I=!0},p(V,C){V[0]?p?p.p(V,C):(p=qe(V),p.c(),p.m(z,null)):p&&(p.d(1),p=null);let A=_;_=ee(V),_===A?W[_].p(V,C):(re(),Q(W[A],1,1,()=>{W[A]=null}),oe(),c=W[_],c?c.p(V,C):(c=W[_]=J[_](V),c.c()),N(c,1),c.m(g,null))},i(V){I||(N(c),I=!0)},o(V){Q(c),I=!1},d(V){V&&d(e),V&&d(t),p&&p.d(),V&&d(v),V&&d(g),W[_].d()}}}const tl=!0;function it(s,e){return e.speakers.map(t=>{const l=s.spec.speakers.find(a=>a.id===t);return l.name+(l.nickname?` (${l.nickname})`:"")}).join(", ")}function nt(s,e){return e.type==="lightning-series"?s.spec.events.filter(t=>t.parent===e.id).map(t=>`<span class="font-semibold"><a href="/udalosti?id=${t.id}">${t.name}</a></span> - ${it(s,t)||"TBD"}`).join("<br>"):it(s,e)}function ft(s,e,t){return"border border-blue-web/50"}function Ct(s,e){const t=new Date(s.start),l=new Date(s.end),a=new Date(e.start),i=new Date(e.end);return t.getTime()<i.getTime()&&l.getTime()>a.getTime()}function ge(s,e,t,l){return e.filter(a=>Boolean(l.filter(i=>i.stage===a.id).find(i=>Ct(t.period,i.period))))}function ct(s){return[{id:"all",name:"V\u0161echny s\xE1ly"},...s.spec.stages]}function ut(s){if(!s.description)return{};const e=s.description.split(`
`),t=e.length>1;return{md:e[0],stripped:t}}const dt=s=>`#${s}`;function Ft(s,e,t){let l,a,i,r,n;Ee(s,He,v=>t(0,i=v)),Ee(s,Se,v=>t(15,r=v)),Ee(s,de,v=>t(3,n=v));const o={link:It},h={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let f=[];f.push(Se.subscribe(()=>{de.update(v=>{for(const g of Object.keys(h)){const _=h[g],c=r.url.searchParams.get(g);_.type==="boolean"?c!==void 0&&(v[_.key]=Boolean(c)):v[_.key]=c||"all"}return v})})),wt(async()=>{const v=He.subscribe(_=>{y(_),_.spec.stages});f.push(v);const g=de.subscribe(_=>{const c=[];c.push(["time",_.time==="all"?void 0:_.time]),c.push(["stage",_.stage==="all"?void 0:_.stage]),c.push(["desc",_.showDescriptions===null||_.showDescriptions===!1||_.showDescriptions===void 0?void 0:!0]);let I="?";if(c.length>0){for(const p of c)p[1]===void 0&&r.url.searchParams.get(p[0])!==void 0?r.url.searchParams.delete(p[0]):r.url.searchParams.set(p[0],p[1]);I=`?${r.url.searchParams.toString()}`}return yt(I),!1});f.push(g)}),Et(()=>{for(const v of f)v()});function T(v,g,_,c=null){let I=g.start;const p=g.end,J=[],W={};for(;$t(I,p)===-1;){const ee={};for(const V of _.spec.stages){if(W[V.id]>0){ee[V.id]=null,W[V.id]--;continue}if(c&&c.stage!==V.id&&c.stage!=="all")continue;let C=v.find(A=>new Date(A.period.start).getTime()===new Date(I).getTime()&&A.stage===V.id);if(ee[V.id]=C,C){const A=Math.floor((new Date(C.period.end).getTime()-new Date(C.period.start).getTime())/6e4/30);C.span=A,A>1&&(W[V.id]=A-1)}}J.push({title:se(I,"HH:mm"),stages:ee}),I=new Date(I.getTime()+30*60*1e3)}return J}function y(v,g=!1){let _=v.scheduleTimes.map((c,I)=>{const p=Tt(v,c);switch(p.id=String(I),I){case 0:p.code="sobota";break;case 1:p.code="sobota-party";break;case 2:p.code="nedele";break}return p});return g&&(_=_.filter(c=>c.id===g||g==="all")),_}function j(v){return v.spec["event-types"].map(g=>Object.assign({},g,je[g.id])).filter(g=>!g.hidden)}function K(v){return[{id:"all",name:"V\u0161echny dny"},...y(v)]}function Z(v,g){const _=v.spec.events.find(I=>I.id===g);if(!_)return console.log(`Event not found: ${g}`),null;const c=je[_.type];return _.color=c.color?`${c.colorLight} hover:${c.colorDark}`:"",console.log(_.color),_}const M=v=>$e(de,n.time=v.id,n),O=v=>$e(de,n.stage=v.id,n);function G(){n.showDescriptions=this.checked,de.set(n)}const z=(v,g)=>g.id===v.track;return s.$$.update=()=>{s.$$.dirty[0]&1&&t(2,l=i?i.spec.schedule:null),s.$$.dirty[0]&1&&t(1,a=i&&i.spec?j(i):[])},[i,a,l,n,o,T,y,K,Z,M,O,G,z]}class ll extends vt{constructor(e){super();bt(this,e,Ft,Ot,gt,{},null,[-1,-1])}}export{ll as default,tl as prerender};