utxo22-web/_app/pages/program.svelte-37ebcc7f.js

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

import{S as ut,i as dt,s as ht,e as w,t as P,k as R,c as E,a as y,h as N,d as u,m as Y,b as _,g as F,J as n,N as Ee,j as te,K as ie,Y as _t,n as se,o as G,p as ae,q as j,L as we,v as pt,T as mt,a4 as Ie,E as ue,l as re,w as it,x as nt,y as ft,B as ct,a5 as bt}from"../chunks/index-9987666b.js";import{g as vt}from"../chunks/navigation-0e6511d1.js";import{p as Ve}from"../chunks/stores-94e0f320.js";import{f as le}from"../chunks/utils-93c6c1d6.js";import{b as $e,s as ce}from"../chunks/stores-af76d038.js";import{p as gt}from"../chunks/periods-4b79a8e5.js";import{L as kt,S as wt}from"../chunks/Link-57e97f60.js";import{S as Et}from"../chunks/SvelteTooltip-7041813f.js";import{c as Dt,l as me}from"../chunks/index-ab555ab5.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-14ac584d.js";import"../chunks/index-4049ca3c.js";const{Boolean:de}=bt;function Se(a,e,t){const l=a.slice();return l[17]=e[t],l}function Ae(a,e,t){const l=a.slice();return l[20]=e[t],l}function He(a,e,t){const l=a.slice();return l[23]=e[t],l}function Pe(a,e,t){const l=a.slice();return l[26]=e[t][0],l[27]=e[t][1],l}function Ne(a,e,t){const l=a.slice();return l[30]=e[t],l}function ze(a,e,t){const l=a.slice();return l[33]=e[t],l}function Be(a,e,t){const l=a.slice();return l[23]=e[t],l}function Me(a,e,t){const l=a.slice();return l[38]=e[t],l}function je(a,e,t){const l=a.slice();return l[17]=e[t],l}function Le(a){let e,t,l,r,c,s,i,o,f,V,I,$,D,O,Z,C,v,z,T=a[6](a[0]),m=[];for(let d=0;d<T.length;d+=1)m[d]=Oe(je(a,T,d));let g=st(a[0]),p=[];for(let d=0;d<g.length;d+=1)p[d]=Ze(Me(a,g,d));return{c(){e=w("div"),t=w("div"),l=w("div"),r=P("Den"),c=R();for(let d=0;d<m.length;d+=1)m[d].c();s=R(),i=w("div"),o=w("div"),f=w("div"),V=P("S\xE1l"),I=R();for(let d=0;d<p.length;d+=1)p[d].c();$=R(),D=w("div"),O=w("label"),Z=w("input"),C=P(" Zobrazit popisy"),this.h()},l(d){e=E(d,"DIV",{class:!0});var S=y(e);t=E(S,"DIV",{class:!0});var h=y(t);l=E(h,"DIV",{class:!0});var U=y(l);r=N(U,"Den"),U.forEach(u),c=Y(h);for(let J=0;J<m.length;J+=1)m[J].l(h);h.forEach(u),S.forEach(u),s=Y(d),i=E(d,"DIV",{class:!0});var X=y(i);o=E(X,"DIV",{class:!0});var Q=y(o);f=E(Q,"DIV",{class:!0});var B=y(f);V=N(B,"S\xE1l"),B.forEach(u),I=Y(Q);for(let J=0;J<p.length;J+=1)p[J].l(Q);Q.forEach(u),X.forEach(u),$=Y(d),D=E(d,"DIV",{class:!0});var K=y(D);O=E(K,"LABEL",{});var x=y(O);Z=E(x,"INPUT",{type:!0}),C=N(x," Zobrazit popisy"),x.forEach(u),K.forEach(u),this.h()},h(){_(l,"class","font-semibold uppercase my-auto mx-3"),_(t,"class","flex gap-1 flex-wrap"),_(e,"class","mb-4"),_(f,"class","font-semibold uppercase my-auto mx-3"),_(o,"class","flex gap-1 flex-wrap"),_(i,"class","mb-4"),_(Z,"type","checkbox"),_(D,"class","mb-4")},m(d,S){F(d,e,S),n(e,t),n(t,l),n(l,r),n(t,c);for(let h=0;h<m.length;h+=1)m[h].m(t,null);F(d,s,S),F(d,i,S),n(i,o),n(o,f),n(f,V),n(o,I);for(let h=0;h<p.length;h+=1)p[h].m(o,null);F(d,$,S),F(d,D,S),n(D,O),n(O,Z),Z.checked=a[2].showDescriptions,n(O,C),v||(z=Ee(Z,"change",a[9]),v=!0)},p(d,S){if(S[0]&69){T=d[6](d[0]);let h;for(h=0;h<T.length;h+=1){const U=je(d,T,h);m[h]?m[h].p(U,S):(m[h]=Oe(U),m[h].c(),m[h].m(t,null))}for(;h<m.length;h+=1)m[h].d(1);m.length=T.length}if(S[0]&5){g=st(d[0]);let h;for(h=0;h<g.length;h+=1){const U=Me(d,g,h);p[h]?p[h].p(U,S):(p[h]=Ze(U),p[h].c(),p[h].m(o,null))}for(;h<p.length;h+=1)p[h].d(1);p.length=g.length}S[0]&4&&(Z.checked=d[2].showDescriptions)},d(d){d&&u(e),ie(m,d),d&&u(s),d&&u(i),ie(p,d),d&&u($),d&&u(D),v=!1,z()}}}function Oe(a){let e,t=a[17].name+"",l,r,c,s;function i(){return a[7](a[17])}return{c(){e=w("button"),l=P(t),this.h()},l(o){e=E(o,"BUTTON",{class:!0});var f=y(e);l=N(f,t),f.forEach(u),this.h()},h(){_(e,"class",r=(a[2].time===a[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font-semibold py-1 px-2 sm:py-2 sm:px-4 rounded-full")},m(o,f){F(o,e,f),n(e,l),c||(s=Ee(e,"click",i),c=!0)},p(o,f){a=o,f[0]&1&&t!==(t=a[17].name+"")&&te(l,t),f[0]&5&&r!==(r=(a[2].time===a[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font
`),V=w("a"),I=P("sobota"),$=P(`,
`),D=w("a"),O=P("sobota (party)"),Z=P(`,
`),C=w("a"),v=P("ned\u011Ble"),z=R(),T=w("div"),h&&h.c(),m=R(),g=w("section"),d.c(),this.h()},l(B){_t('[data-svelte="svelte-124umcn"]',document.head).forEach(u),e=Y(B),t=E(B,"SECTION",{class:!0});var x=y(t);l=E(x,"H1",{class:!0});var J=y(l);r=N(J,"Program"),J.forEach(u),c=Y(x),s=E(x,"DIV",{class:!0});var M=y(s);i=E(M,"A",{href:!0,class:!0});var q=y(i);o=N(q,"Seznam v\u0161ech ud\xE1lost\xED"),q.forEach(u),f=N(M,`, PDF:
`),V=E(M,"A",{href:!0,target:!0,class:!0});var k=y(V);I=N(k,"sobota"),k.forEach(u),$=N(M,`,
`),D=E(M,"A",{href:!0,target:!0,class:!0});var W=y(D);O=N(W,"sobota (party)"),W.forEach(u),Z=N(M,`,
`),C=E(M,"A",{href:!0,target:!0,class:!0});var ee=y(C);v=N(ee,"ned\u011Ble"),ee.forEach(u),M.forEach(u),z=Y(x),T=E(x,"DIV",{});var L=y(T);h&&h.l(L),L.forEach(u),x.forEach(u),m=Y(B),g=E(B,"SECTION",{class:!0});var ne=y(g);d.l(ne),ne.forEach(u),this.h()},h(){document.title="Program | UTXO.22",_(l,"class","uppercase text-2xl font-bold mb-2"),_(i,"href","/seznam-udalosti"),_(i,"class","svelte-8shy9x"),_(V,"href","https://pub.utxo.cz/22/pdf/sobota.pdf"),_(V,"target","_blank"),_(V,"class","svelte-8shy9x"),_(D,"href","https://pub.utxo.cz/22/pdf/sobota-party.pdf"),_(D,"target","_blank"),_(D,"class","svelte-8shy9x"),_(C,"href","https://pub.utxo.cz/22/pdf/nedele.pdf"),_(C,"target","_blank"),_(C,"class","svelte-8shy9x"),_(s,"class","mb-4 utxo-program-head svelte-8shy9x"),_(t,"class","relative mx-auto pt-6 sm:pt-10 pb-6 px-6 max-w-6xl text-blue-web print:hidden"),_(g,"class","relative mx-auto pb-6 sm:pb-10 px-0 text-blue-web")},m(B,K){F(B,e,K),F(B,t,K),n(t,l),n(l,r),n(t,c),n(t,s),n(s,i),n(i,o),n(s,f),n(s,V),n(V,I),n(s,$),n(s,D),n(D,O),n(s,Z),n(s,C),n(C,v),n(t,z),n(t,T),h&&h.m(T,null),F(B,m,K),F(B,g,K),X[p].m(g,null),S=!0},p(B,K){B[0]?h?h.p(B,K):(h=Le(B),h.c(),h.m(T,null)):h&&(h.d(1),h=null);let x=p;p=Q(B),p===x?X[p].p(B,K):(se(),G(X[x],1,1,()=>{X[x]=null}),ae(),d=X[p],d?d.p(B,K):(d=X[p]=U[p](B),d.c()),j(d,1),d.m(g,null))},i(B){S||(j(d),S=!0)},o(B){G(d),S=!1},d(B){B&&u(e),B&&u(t),h&&h.d(),B&&u(m),B&&u(g),X[p].d()}}}const Yt=!0;function et(a,e){return e.speakers.map(t=>{const l=a.spec.speakers.find(r=>r.id===t);return l.name+(l.nickname?` (${l.nickname})`:"")}).join(", ")}function tt(a,e){return e.type==="lightning-series"?a.spec.events.filter(t=>t.parent===e.id).map(t=>`<span class="font-semibold"><a href="/udalosti?id=${t.id}">${t.name}</a></span> - ${et(a,t)||"TBD"}`).join("<br>"):et(a,e)}function lt(a,e,t){return"border border-blue-web/50"}function Pt(a,e){const t=new Date(a.start),l=new Date(a.end),r=new Date(e.start),c=new Date(e.end);return t.getTime()<c.getTime()&&l.getTime()>r.getTime()}function be(a,e,t,l){return e.filter(r=>Boolean(l.filter(c=>c.stage===r.id).find(c=>Pt(t.period,c.period))))}function st(a){return[{id:"all",name:"V\u0161echny s\xE1ly"},...a.spec.stages]}function at(a){if(!a.description)return{};const e=a.description.split(`
`),t=e.length>1;return{md:e[0],stripped:t}}function rt(a,e){const t=a.spec.events.find(l=>l.id===e);if(!t)return console.log(`Event not found: ${e}`),null;switch(t.type){case"panel":t.color="bg-orange-400/20 hover:bg-orange-400/40";break;case"talk":t.color="bg-custom-green/20 hover:bg-custom-green/40";break;case"workshop":t.color="bg-custom-blue/20 hover:bg-custom-blue/40";break;case"campfire":t.color="bg-purple-400/20 hover:bg-purple-400/40";break;case"lightning-series":t.color="bg-yellow-400/20 hover:bg-yellow-400/40";break;default:t.color="bg-rose-400/20 hover:bg-rose-400/40"}return t}const ot=a=>`#${a}`;function Nt(a,e,t){let l,r,c,s;we(a,Ve,v=>t(13,r=v)),we(a,$e,v=>t(0,c=v)),we(a,ce,v=>t(2,s=v));const i={link:kt},o={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let f=[];f.push(Ve.subscribe(()=>{ce.update(v=>{for(const z of Object.keys(o)){const T=o[z],m=r.url.searchParams.get(z);T.type==="boolean"?m!==void 0&&(v[T.key]=Boolean(m)):v[T.key]=m||"all"}return v})})),pt(async()=>{const v=$e.subscribe(T=>{I(T),T.spec.stages});f.push(v);const z=ce.subscribe(T=>{const m=[];m.push(["time",T.time==="all"?void 0:T.time]),m.push(["stage",T.stage==="all"?void 0:T.stage]),m.push(["desc",T.showDescriptions===null||T.showDescriptions===!1||T.showDescriptions===void 0?void 0:!0]);let g="?";if(m.length>0){for(const p of m)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]);g=`?${r.url.searchParams.toString()}`}return vt(g),!1});f.push(z)}),mt(()=>{for(const v of f)v()});function V(v,z,T,m=null){let g=z.start;const p=z.end,d=[],S={};for(;Dt(g,p)===-1;){const h={};for(const U of T.spec.stages){if(S[U.id]>0){h[U.id]=null,S[U.id]--;continue}if(m&&m.stage!==U.id&&m.stage!=="all")continue;let X=v.find(Q=>new Date(Q.period.start).getTime()===new Date(g).getTime()&&Q.stage===U.id);if(h[U.id]=X,X){const Q=Math.floor((new Date(X.period.end).getTime()-new Date(X.period.start).getTime())/6e4/30);X.span=Q,Q>1&&(S[U.id]=Q-1)}}d.push({title:le(g,"HH:mm"),stages:h}),g=new Date(g.getTime()+30*60*1e3)}return d}function I(v,z=!1){let T=v.scheduleTimes.map((m,g)=>{const p=gt(v,m);switch(p.id=String(g),g){case 0:p.code="sobota";break;case 1:p.code="sobota-party";break;case 2:p.code="nedele";break}return p});return z&&(T=T.filter(m=>m.id===z||z==="all")),T}function $(v){return[{id:"all",name:"V\u0161echny dny"},...I(v)]}const D=v=>Ie(ce,s.time=v.id,s),O=v=>Ie(ce,s.stage=v.id,s);function Z(){s.showDescriptions=this.checked,ce.set(s)}const C=(v,z)=>z.id===v.track;return a.$$.update=()=>{a.$$.dirty[0]&1&&t(1,l=c?c.spec.schedule:null)},[c,l,s,i,V,I,$,D,O,Z,C]}class Jt extends ut{constructor(e){super();dt(this,e,Nt,Ht,ht,{},null,[-1,-1])}}export{Jt as default,Yt as prerender};