utxo22-web/_app/pages/program.svelte-57e54bb7.js

4 řádky
22 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as Ge,i as Qe,s as We,e as y,t as O,k as j,c as V,a as H,h as z,d as f,m as C,b as k,g as M,J as u,N as ue,j as Q,K as te,Y as xe,n as le,o as K,p as se,q as Z,L as fe,v as et,T as tt,a4 as pe,E as oe,l as x,w as lt,x as st,y as it,B as ot,a5 as rt}from"../chunks/index-9987666b.js";import{g as at}from"../chunks/navigation-0e6511d1.js";import{p as me}from"../chunks/stores-94e0f320.js";import{b as be,s as ie}from"../chunks/stores-af76d038.js";import{p as nt}from"../chunks/periods-d433e7f7.js";import{L as ct,S as ft}from"../chunks/Link-57e97f60.js";import{c as ut}from"../chunks/index-1cc1bdc7.js";import{f as ee}from"../chunks/index-14ac584d.js";import{l as ae}from"../chunks/index-c9b2ee0d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-4049ca3c.js";const{Boolean:re}=rt;function ve(i,t,e){const l=i.slice();return l[17]=t[e],l}function ge(i,t,e){const l=i.slice();return l[20]=t[e],l}function ke(i,t,e){const l=i.slice();return l[23]=t[e],l}function we(i,t,e){const l=i.slice();return l[26]=t[e][0],l[27]=t[e][1],l}function Ee(i,t,e){const l=i.slice();return l[30]=t[e],l}function De(i,t,e){const l=i.slice();return l[33]=t[e],l}function Te(i,t,e){const l=i.slice();return l[23]=t[e],l}function Ie(i,t,e){const l=i.slice();return l[38]=t[e],l}function ye(i,t,e){const l=i.slice();return l[17]=t[e],l}function Ve(i){let t,e,l,r,c,s,a,o,n,S,g,E,_,A,U,P,b,T,w=i[6](i[0]),d=[];for(let p=0;p<w.length;p+=1)d[p]=Se(ye(i,w,p));let B=Ye(i[0]),v=[];for(let p=0;p<B.length;p+=1)v[p]=He(Ie(i,B,p));return{c(){t=y("div"),e=y("div"),l=y("div"),r=O("Den"),c=j();for(let p=0;p<d.length;p+=1)d[p].c();s=j(),a=y("div"),o=y("div"),n=y("div"),S=O("S\xE1l"),g=j();for(let p=0;p<v.length;p+=1)v[p].c();E=j(),_=y("div"),A=y("label"),U=y("input"),P=O(" Zobrazit popisy"),this.h()},l(p){t=V(p,"DIV",{class:!0});var N=H(t);e=V(N,"DIV",{class:!0});var m=H(e);l=V(m,"DIV",{class:!0});var D=H(l);r=z(D,"Den"),D.forEach(f),c=C(m);for(let q=0;q<d.length;q+=1)d[q].l(m);m.forEach(f),N.forEach(f),s=C(p),a=V(p,"DIV",{class:!0});var X=H(a);o=V(X,"DIV",{class:!0});var h=H(o);n=V(h,"DIV",{class:!0});var L=H(n);S=z(L,"S\xE1l"),L.forEach(f),g=C(h);for(let q=0;q<v.length;q+=1)v[q].l(h);h.forEach(f),X.forEach(f),E=C(p),_=V(p,"DIV",{class:!0});var I=H(_);A=V(I,"LABEL",{});var F=H(A);U=V(F,"INPUT",{type:!0}),P=z(F," Zobrazit popisy"),F.forEach(f),I.forEach(f),this.h()},h(){k(l,"class","font-semibold uppercase my-auto mx-3"),k(e,"class","flex gap-1 flex-wrap"),k(t,"class","mb-4"),k(n,"class","font-semibold uppercase my-auto mx-3"),k(o,"class","flex gap-1 flex-wrap"),k(a,"class","mb-4"),k(U,"type","checkbox"),k(_,"class","mb-4")},m(p,N){M(p,t,N),u(t,e),u(e,l),u(l,r),u(e,c);for(let m=0;m<d.length;m+=1)d[m].m(e,null);M(p,s,N),M(p,a,N),u(a,o),u(o,n),u(n,S),u(o,g);for(let m=0;m<v.length;m+=1)v[m].m(o,null);M(p,E,N),M(p,_,N),u(_,A),u(A,U),U.checked=i[2].showDescriptions,u(A,P),b||(T=ue(U,"change",i[9]),b=!0)},p(p,N){if(N[0]&69){w=p[6](p[0]);let m;for(m=0;m<w.length;m+=1){const D=ye(p,w,m);d[m]?d[m].p(D,N):(d[m]=Se(D),d[m].c(),d[m].m(e,null))}for(;m<d.length;m+=1)d[m].d(1);d.length=w.length}if(N[0]&5){B=Ye(p[0]);let m;for(m=0;m<B.length;m+=1){const D=Ie(p,B,m);v[m]?v[m].p(D,N):(v[m]=He(D),v[m].c(),v[m].m(o,null))}for(;m<v.length;m+=1)v[m].d(1);v.length=B.length}N[0]&4&&(U.checked=p[2].showDescriptions)},d(p){p&&f(t),te(d,p),p&&f(s),p&&f(a),te(v,p),p&&f(E),p&&f(_),b=!1,T()}}}function Se(i){let t,e=i[17].name+"",l,r,c,s;function a(){return i[7](i[17])}return{c(){t=y("button"),l=O(e),this.h()},l(o){t=V(o,"BUTTON",{class:!0});var n=H(t);l=z(n,e),n.forEach(f),this.h()},h(){k(t,"class",r=(i[2].time===i[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font-bold py-2 px-4 rounded-full")},m(o,n){M(o,t,n),u(t,l),c||(s=ue(t,"click",a),c=!0)},p(o,n){i=o,n[0]&1&&e!==(e=i[17].name+"")&&Q(l,e),n[0]&5&&r!==(r=(i[2].time===i[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font-bold py-2 px-4 rounded-full")&&k(t,"class",r)},d(o){o&&f(t),c=!1,s()}}}fun
`),e=t.length>1;return{md:t[0],stripped:e}}function Ke(i,t){const e=i.spec.events.find(l=>l.id===t);if(!e)return console.log(`Event not found: ${t}`),null;switch(e.type){case"panel":e.color="bg-orange-400/20 hover:bg-orange-400/40";break;case"talk":e.color="bg-custom-green/20 hover:bg-custom-green/40";break;case"workshop":e.color="bg-custom-blue/20 hover:bg-custom-blue/40";break;case"campfire":e.color="bg-purple-400/20 hover:bg-purple-400/40";break;case"lightning-series":e.color="bg-yellow-400/20 hover:bg-yellow-400/40";break;default:e.color="bg-rose-400/20 hover:bg-rose-400/40"}return e}const Xe=i=>`#${i}`;function kt(i,t,e){let l,r,c,s;fe(i,me,b=>e(13,r=b)),fe(i,be,b=>e(0,c=b)),fe(i,ie,b=>e(2,s=b));const a={link:ct},o={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let n=[];n.push(me.subscribe(()=>{ie.update(b=>{for(const T of Object.keys(o)){const w=o[T],d=r.url.searchParams.get(T);w.type==="boolean"?d!==void 0&&(b[w.key]=Boolean(d)):b[w.key]=d||"all"}return b})})),et(async()=>{const b=be.subscribe(w=>{g(w),w.spec.stages});n.push(b);const T=ie.subscribe(w=>{const d=[];d.push(["time",w.time==="all"?void 0:w.time]),d.push(["stage",w.stage==="all"?void 0:w.stage]),d.push(["desc",w.showDescriptions===null||w.showDescriptions===!1||w.showDescriptions===void 0?void 0:!0]);let B="?";if(d.length>0){for(const v of d)v[1]===void 0&&r.url.searchParams.get(v[0])!==void 0?r.url.searchParams.delete(v[0]):r.url.searchParams.set(v[0],v[1]);B=`?${r.url.searchParams.toString()}`}return at(B),!1});n.push(T)}),tt(()=>{for(const b of n)b()});function S(b,T,w,d=null){let B=T.start;const v=T.end,p=[],N={};for(;ut(B,v)===-1;){const m={};for(const D of w.spec.stages){if(N[D.id]>0){m[D.id]=null,N[D.id]--;continue}if(d&&d.stage!==D.id&&d.stage!=="all")continue;let X=b.find(h=>new Date(h.period.start).getTime()===new Date(B).getTime()&&h.stage===D.id);if(m[D.id]=X,X){const h=Math.floor((new Date(X.period.end).getTime()-new Date(X.period.start).getTime())/6e4/30);X.span=h,h>1&&(N[D.id]=h-1)}}p.push({title:ee(B,"HH:mm"),stages:m}),B=new Date(B.getTime()+30*60*1e3)}return p}function g(b,T=!1){let w=b.scheduleTimes.map((d,B)=>{const v=nt(b,d);return v.id=String(B),v});return T&&(w=w.filter(d=>d.id===T||T==="all")),w}function E(b){return[{id:"all",name:"V\u0161echny dny"},...g(b)]}const _=b=>pe(ie,s.time=b.id,s),A=b=>pe(ie,s.stage=b.id,s);function U(){s.showDescriptions=this.checked,ie.set(s)}const P=(b,T)=>T.id===b.track;return i.$$.update=()=>{i.$$.dirty[0]&1&&e(1,l=c?c.spec.schedule:null)},[c,l,s,a,S,g,E,_,A,U,P]}class Bt extends Ge{constructor(t){super();Qe(this,t,kt,vt,We,{},null,[-1,-1])}}export{Bt as default,Pt as prerender};