import { N as h, T as g, t as L, a as k, b as P, c as y, d as w, e as I, } from "./_loading_20241106.js"; import { S as m, A as M, P as p, g as T, t as b, a as A, } from "./_getEventInfo_20241106.js"; m.use([M, p, h]); const C = () => { const n = window.matchMedia("(max-width: 767px)").matches, t = { pc: [tlm_housePlayerPc01, tlm_housePlayerPc02, tlm_housePlayerPc03], sp: [tlm_housePlayerSp01, tlm_housePlayerSp02, tlm_housePlayerSp03], }, a = document.querySelectorAll(".js-tlm_houseMovieItem"), c = document.querySelector(".tlm_house__movie"), S = document.querySelectorAll(".js-tlm_houseMovieItemPC"), d = document.querySelectorAll(".js-tlm_houseMovieItemSP"), _ = document.querySelectorAll(".js-houseSliderDecoration"), r = document.querySelectorAll(".js-tlm_houseSPAnchorItem"); n ? S.forEach((e) => e.remove()) : d.forEach((e) => e.remove()); const u = new m(".js-tlm_houseSliderThumbnail", { speed: 300, grabCursor: !0, slidesPerView: "auto", breakpoints: { 768: { threshold: 9999 } }, }), E = new m(".tlm_house__sliderMain", { modules: [g, h, p], speed: 300, thumbs: { swiper: u }, navigation: { nextEl: ".tlm_house__sliderMainControllerNext", prevEl: ".tlm_house__sliderMainControllerPrev", }, pagination: { el: ".tlm_house__sliderMainControllerPagination", clickable: !0, }, on: { init: function (e) { e.navigation && e.navigation.destroy(), v(e.realIndex), i(e.realIndex); }, slideChangeTransitionStart: function (e) { f(), i(e.realIndex), (window.location.hash = `house${e.realIndex + 1}`); }, slideChangeTransitionEnd: function (e) { v(e.realIndex); }, }, }); function v(e) { _[e].classList.add("is-active"), a[e].classList.add("is-active"), r[e].classList.add("is-active"); } function f() { _.forEach((e) => e.classList.remove("is-active")), a.forEach((e) => e.classList.remove("is-active")), r.forEach((e) => e.classList.remove("is-active")); } function i(e) { const l = window.innerWidth <= 767; try { const s = l ? t.sp[e] : t.pc[e]; s != null && s.accessor && ((l ? t.sp : t.pc).forEach((o, j) => { o != null && o.accessor && o.accessor.pause(); }), s.accessor.setCurrentTime(0), s.accessor.play()); } catch (s) { console.error("Error playing video:", s); } } n ? (t.sp[0].accessor.addEventListener("landing", () => { i(0); }), t.sp[0].accessor.addEventListener("playing", () => { T.to(d[0], { opacity: 1, duration: 0.5 }); })) : (t.pc[0].accessor.addEventListener("landing", () => { i(0); }), t.pc[0].accessor.addEventListener("playing", () => { c.classList.add("is-active"); })), r.forEach((e, l) => { e.addEventListener("click", (s) => { const o = l; window.location.hash = `house${o + 1}`; }); }), window.addEventListener( "hashchange", function () { if (!location.hash.includes("house")) return; const e = Number(location.hash.slice(1).replace("house", "")) - 1; u.slideTo(e), E.slideTo(e); }, !1 ); }, x = async () => { const n = document.querySelector("#js-eventTargetSizuoka"); if (!n) return; const t = await A("sizuoka"); if (!t || t.length === 0) return; const a = t[0].kikan.d_s === t[0].kikan.d_e ? t[0].kikan.d_s : `${t[0].kikan.d_s} 〜 ${t[0].kikan.d_e}`, c = `

${a}

${t[0].e_title}

このイベントの詳細はこちら

`; n.insertAdjacentHTML("beforeend", c); }; document.addEventListener("DOMContentLoaded", () => { L(() => { k("sizuoka"), b(!0), C(), P(), y(), w(), I(), x(); }); });