1var nxMain = (function () { 2 "use strict"; 3 class jt { 4 constructor(e, t = {}) { 5 (this.entry = e), 6 (this.opts = t), 7 (this.changePage = null), 8 (this.changePageSearch = null); 9 } 10 disableAjax(e) { 11 if ( 12 (e.matches("a") && e.classList.contains("no-ajax")) || 13 (e.parentNode && e.parentNode.classList.contains("no-ajax")) 14 ) 15 return !0; 16 } 17 validateLink(e) { 18 const t = e.getAttribute("href"); 19 return !( 20 t == "#" || 21 t == "#!" || 22 t == "!#" || 23 t.includes("#respond") || 24 t == "#url" || 25 t.startsWith("javascript") || 26 e.target === "_blank" || 27 new URL(t).origin !== window.location.origin || 28 t.includes("wp-admin") 29 ); 30 } 31 resolvePage(e, t) { 32 const i = new DOMParser().parseFromString(e, "text/html"), 33 r = i.querySelector(t); 34 return { 35 meta: { title: i.title, bodyClass: i.body.getAttribute("class") ?? "" }, 36 htmlPlain: e, 37 body: i.body, 38 document: i, 39 page: r, 40 isElementorPage: i.body.classList.contains("elementor-page"), 41 isHomePage: i.body.classList.contains("home"), 42 isPostPage: i.body.classList.contains("single"), 43 isPagePage: i.body.classList.contains("single-page"), 44 isTemplatePage: i.body.classList.contains("page-template"), 45 isSearchPage: i.body.classList.contains("search"), 46 }; 47 } 48 async getPage(e) { 49 let t = await fetch(e); 50 return (t = await t.text()), this.resolvePage(t, this.entry); 51 } 52 delteInstanceElementor() { 53 for (const e in window) 54 if (e.toLowerCase().includes("elementor")) { 55 const t = Object.getOwnPropertyDescriptor(window, e); 56 if (t && t.configurable) 57 try { 58 delete window[e]; 59 } catch {} 60 } 61 } 62 makerScript(e) { 63 if (!e) return; 64 const t = document.createElement("script"); 65 return ( 66 e.hasAttribute("id") && (t.id = e.id), 67 e.innerHTML != "" && (t.innerHTML = e.innerHTML), 68 e.hasAttribute("src") && (t.src = e.src), 69 e.hasAttribute("async") && (t.async = e.async), 70 e.hasAttribute("defer") && (t.defer = e.defer), 71 e.hasAttribute("type") && (t.type = e.type), 72 t 73 ); 74 } 75 elementorScriptsCompatibility(e) { 76 const t = document.body, 77 i = Array.from(t.children).filter( 78 (n) => 79 n.tagName === "SCRIPT" && 80 !n.innerHTML.includes("lazyloadRunObserver") 81 ), 82 r = Array.from(e.children).filter( 83 (n) => 84 n.tagName === "SCRIPT" && 85 !n.innerHTML.includes("lazyloadRunObserver") 86 ); 87 this.delteInstanceElementor(), 88 [...i].forEach((n) => { 89 (n.id.includes("elementor") || 90 n.src.includes("plugins/elementor") || 91 n.innerHTML.includes("elementor")) && 92 n.remove(); 93 }), 94 [...r].forEach((n) => { 95 (n.id.includes("elementor") || 96 n.src.includes("plugins/elementor") || 97 n.innerHTML.includes("elementor")) && 98 t.appendChild(this.makerScript(n)); 99 }); 100 } 101 elementorStylesCompatibility(e) { 102 const t = document.head, 103 i = Array.from(t.children).filter( 104 (n) => n.tagName === "STYLE" || n.tagName === "LINK" 105 ), 106 r = Array.from(e.children).filter( 107 (n) => n.tagName === "STYLE" || n.tagName === "LINK" 108 ); 109 [...i].forEach((n) => { 110 (n.innerHTML.includes("elementor") || 111 (n.hasAttribute("href") && n.href.includes("plugins/elementor")) || 112 (n.hasAttribute("id") && n.id.includes("elementor"))) && 113 n.remove(); 114 }), 115 [...r].forEach((n) => { 116 (n.innerHTML.includes("elementor") || 117 (n.hasAttribute("href") && n.href.includes("plugins/elementor")) || 118 (n.hasAttribute("id") && n.id.includes("elementor"))) && 119 document.head.appendChild(n); 120 }); 121 } 122 nexoRadioCompatibility(e) { 123 const t = document.body, 124 i = Array.from(t.children).filter((n) => n.tagName === "SCRIPT"), 125 r = Array.from(e.children).filter((n) => n.tagName === "SCRIPT");
126 [...i].forEach((n) => { 127 n.id.includes("nxradio-widget") && n.remove(); 128 }), 129 [...r].forEach((n) => { 130 n.id.includes("nxradio-widget") && t.appendChild(this.makerScript(n)); 131 }); 132 } 133 updatePage(e, t, i, r = !1) { 134 const n = t.page; 135 (document.title = t.meta.title), 136 (document.body.className = t.meta.bodyClass), 137 window.location.pathname !== i && 138 history.pushState({}, t.meta.title, i), 139 r 140 ? r && 141 ((this.opts.keepPosition ?? []).some((a) => r.classList.contains(a)) 142 ? window.scrollTo(window.scrollX, window.scrollY) 143 : window.scrollTo(0, 0)) 144 : window.scrollTo(0, 0), 145 this.opts.documentHeadRefresh && 146 this.opts.documentHeadRefresh == !0 && 147 this.elementorStylesCompatibility(t.document.head), 148 this.opts.refreshElementorScripts && 149 this.opts.refreshElementorScripts == !0 && 150 this.elementorScriptsCompatibility(t.body), 151 this.nexoRadioCompatibility(t.body), 152 (e.innerHTML = ""), 153 e.replaceChildren(...n.children); 154 } 155 onChangePage(e) { 156 this.changePage = e; 157 } 158 onChangePageSearch(e) { 159 this.changePageSearch = e; 160 } 161 start() { 162 const e = document.querySelector(this.entry); 163 e && 164 (e.addEventListener("click", async (t) => { 165 const i = t.target; 166 if (!this.disableAjax(i) && i.matches("a") && this.validateLink(i)) { 167 t.preventDefault(); 168 const r = t.target, 169 n = r.href, 170 o = new URL(n).pathname; 171 document.body.classList.add("ajaxify-loading"); 172 const a = await this.getPage(n); 173 this.updatePage(e, a, o, r), 174 this.changePage && this.changePage(a.meta, a); 175 } 176 }), 177 window.addEventListener("popstate", async (t) => { 178 const i = t.currentTarget.location.href, 179 r = new URL(i), 180 n = r.pathname; 181 if (r.hash) return; 182 document.body.classList.add("ajaxify-loading"); 183 const o = await this.getPage(i); 184 this.updatePage(e, o, n), 185 this.changePage && this.changePage(o.meta, o); 186 }), 187 document.addEventListener("keydown", async (t) => { 188 if ( 189 t.key === "Enter" && 190 t.target.tagName === "INPUT" && 191 t.target.closest("form") 192 ) { 193 t.preventDefault(); 194 const i = t.target.value; 195 document.body.classList.add("ajaxify-loading"); 196 const r = window.location.origin + "?s=" + i, 197 n = new URL(window.location.origin).pathname, 198 o = await this.getPage(r); 199 this.updatePage(e, o, n + "?s=" + i), 200 this.changePageSearch && this.changePageSearch(o.meta, o), 201 this.changePage && this.changePage(o.meta, o); 202 } 203 })); 204 } 205 hotChange(e) { 206 const t = document.querySelector(this.entry); 207 Array.isArray(e) && 208 e.forEach((i) => { 209 const r = document.querySelector(i); 210 if (!r || !t) return; 211 [...r.querySelectorAll("a")].forEach((o) => { 212 o.addEventListener("click", async (a) => { 213 if (!this.disableAjax(a.target) && this.validateLink(o)) { 214 a.preventDefault(), a.stopPropagation(); 215 const l = o.href, 216 u = new URL(l).pathname; 217 document.body.classList.add("ajaxify-loading"); 218 const d = await this.getPage(l); 219 if (d.page == null) { 220 console.warn("Entry point not founded!"); 221 return; 222 } 223 this.updatePage(t, d, u, o), 224 this.changePage && this.changePage(d.meta, d); 225 } 226 }); 227 }); 228 }); 229 } 230 } 231 function Ze(s) { 232 return ( 233 s !== null && 234 typeof s == "object" && 235 "constructor" in s && 236 s.constructor === Object 237 ); 238 } 239 function Me(s, e) { 240 s === void 0 && (s = {}), 241 e === void 0 && (e = {}), 242 Object.keys(e).forEach((t) => { 243 typeof s[t] > "u" 244 ? (s[t] = e[t]) 245 : Ze(e[t]) && 246 Ze(s[t]) && 247 Object.keys(e[t]).length > 0 && 248 Me(s[t], e[t]); 249 }); 250 } 251 const et = { 252 body: {}, 253 addEventListener() {}, 254 removeEventListener() {}, 255 activeElement: { blur() {}, nodeName: "" }, 256 querySelector() { 257 return null; 258 }, 259 querySelectorAll() { 260 return []; 261 }, 262 getElementById() { 263 return null; 264 }, 265 createEvent() { 266 return { initEvent() {} }; 267 }, 268 createElement() { 269 return { 270 children: [], 271 childNodes: [], 272 style: {}, 273 setAttribute() {}, 274 getElementsByTagName() { 275 return []; 276 }, 277 }; 278 }, 279 createElementNS() { 280 return {}; 281 }, 282 importNode() { 283 return null; 284 }, 285 location: { 286 hash: "", 287 host: "", 288 hostname: "", 289 href: "", 290 origin: "", 291 pathname: "", 292 protocol: "", 293 search: "", 294 }, 295 }; 296 function ee() { 297 const s = typeof document < "u" ? document : {}; 298 return Me(s, et), s; 299 } 300 const Wt = { 301 document: et, 302 navigator: { userAgent: "" }, 303 location: { 304 hash: "", 305 host: "", 306 hostname: "", 307 href: "", 308 origin: "", 309 pathname: "", 310 protocol: "", 311 search: "", 312 }, 313 history: { replaceState() {}, pushState() {}, go() {}, back() {} }, 314 CustomEvent: function () { 315 return this; 316 }, 317 addEventListener() {}, 318 removeEventListener() {}, 319 getComputedStyle() { 320 return { 321 getPropertyValue() { 322 return ""; 323 }, 324 }; 325 }, 326 Image() {}, 327 Date() {}, 328 screen: {}, 329 setTimeout() {}, 330 clearTimeout() {}, 331 matchMedia() { 332 return {}; 333 }, 334 requestAnimationFrame(s) { 335 return typeof setTimeout > "u" ? (s(), null) : setTimeout(s, 0); 336 }, 337 cancelAnimationFrame(s) { 338 typeof setTimeout > "u" || clearTimeout(s); 339 }, 340 }; 341 function X() { 342 const s = typeof window < "u" ? window : {}; 343 return Me(s, Wt), s; 344 } 345 function Ut(s) { 346 return ( 347 s === void 0 && (s = ""), 348 s 349 .trim() 350 .split(" ") 351 .filter((e) => !!e.trim()) 352 ); 353 } 354 function Yt(s) { 355 const e = s;
356 Object.keys(e).forEach((t) => { 357 try { 358 e[t] = null; 359 } catch {} 360 try { 361 delete e[t]; 362 } catch {} 363 }); 364 } 365 function Ae(s, e) { 366 return e === void 0 && (e = 0), setTimeout(s, e); 367 } 368 function ge() { 369 return Date.now(); 370 } 371 function Xt(s) { 372 const e = X(); 373 let t; 374 return ( 375 e.getComputedStyle && (t = e.getComputedStyle(s, null)), 376 !t && s.currentStyle && (t = s.currentStyle), 377 t || (t = s.style), 378 t 379 ); 380 } 381 function Kt(s, e) { 382 e === void 0 && (e = "x"); 383 const t = X(); 384 let i, r, n; 385 const o = Xt(s); 386 return ( 387 t.WebKitCSSMatrix 388 ? ((r = o.transform || o.webkitTransform), 389 r.split(",").length > 6 && 390 (r = r 391 .split(", ") 392 .map((a) => a.replace(",", ".")) 393 .join(", ")), 394 (n = new t.WebKitCSSMatrix(r === "none" ? "" : r))) 395 : ((n = 396 o.MozTransform || 397 o.OTransform || 398 o.MsTransform || 399 o.msTransform || 400 o.transform || 401 o 402 .getPropertyValue("transform") 403 .replace("translate(", "matrix(1, 0, 0, 1,")), 404 (i = n.toString().split(","))), 405 e === "x" && 406 (t.WebKitCSSMatrix 407 ? (r = n.m41) 408 : i.length === 16 409 ? (r = parseFloat(i[12])) 410 : (r = parseFloat(i[4]))), 411 e === "y" && 412 (t.WebKitCSSMatrix 413 ? (r = n.m42) 414 : i.length === 16 415 ? (r = parseFloat(i[13])) 416 : (r = parseFloat(i[5]))), 417 r || 0 418 ); 419 } 420 function pe(s) { 421 return ( 422 typeof s == "object" && 423 s !== null && 424 s.constructor && 425 Object.prototype.toString.call(s).slice(8, -1) === "Object" 426 ); 427 } 428 function Qt(s) { 429 return typeof window < "u" && typeof window.HTMLElement < "u" 430 ? s instanceof HTMLElement 431 : s && (s.nodeType === 1 || s.nodeType === 11); 432 } 433 function K() { 434 const s = Object(arguments.length <= 0 ? void 0 : arguments[0]), 435 e = ["__proto__", "constructor", "prototype"]; 436 for (let t = 1; t < arguments.length; t += 1) { 437 const i = t < 0 || arguments.length <= t ? void 0 : arguments[t]; 438 if (i != null && !Qt(i)) { 439 const r = Object.keys(Object(i)).filter((n) => e.indexOf(n) < 0); 440 for (let n = 0, o = r.length; n < o; n += 1) { 441 const a = r[n], 442 l = Object.getOwnPropertyDescriptor(i, a); 443 l !== void 0 && 444 l.enumerable && 445 (pe(s[a]) && pe(i[a]) 446 ? i[a].__swiper__ 447 ? (s[a] = i[a]) 448 : K(s[a], i[a]) 449 : !pe(s[a]) && pe(i[a]) 450 ? ((s[a] = {}), i[a].__swiper__ ? (s[a] = i[a]) : K(s[a], i[a])) 451 : (s[a] = i[a])); 452 } 453 } 454 } 455 return s; 456 } 457 function ve(s, e, t) { 458 s.style.setProperty(e, t); 459 } 460 function tt(s) { 461 let { swiper: e, targetPosition: t, side: i } = s; 462 const r = X(), 463 n = -e.translate; 464 let o = null, 465 a; 466 const l = e.params.speed; 467 (e.wrapperEl.style.scrollSnapType = "none"), 468 r.cancelAnimationFrame(e.cssModeFrameID); 469 const u = t > n ? "next" : "prev", 470 d = (m, h) => (u === "next" && m >= h) || (u === "prev" && m <= h), 471 p = () => { 472 (a = new Date().getTime()), o === null && (o = a); 473 const m = Math.max(Math.min((a - o) / l, 1), 0), 474 h = 0.5 - Math.cos(m * Math.PI) / 2; 475 let g = n + h * (t - n); 476 if ((d(g, t) && (g = t), e.wrapperEl.scrollTo({ [i]: g }), d(g, t))) { 477 (e.wrapperEl.style.overflow = "hidden"), 478 (e.wrapperEl.style.scrollSnapType = ""), 479 setTimeout(() => { 480 (e.wrapperEl.style.overflow = ""), 481 e.wrapperEl.scrollTo({ [i]: g }); 482 }), 483 r.cancelAnimationFrame(e.cssModeFrameID); 484 return; 485 } 486 e.cssModeFrameID = r.requestAnimationFrame(p); 487 }; 488 p(); 489 } 490 function st(s) { 491 return ( 492 s.querySelector(".swiper-slide-transform") || 493 (s.shadowRoot && s.shadowRoot.querySelector(".swiper-slide-transform")) || 494 s 495 ); 496 } 497 function Q(s, e) { 498 e === void 0 && (e = ""); 499 const t = [...s.children]; 500 return ( 501 s instanceof HTMLSlotElement && t.push(...s.assignedElements()), 502 e ? t.filter((i) => i.matches(e)) : t 503 ); 504 } 505 function Jt(s, e) { 506 const t = e.contains(s); 507 return !t && e instanceof HTMLSlotElement 508 ? [...e.assignedElements()].includes(s) 509 : t; 510 } 511 function ye(s) { 512 try { 513 console.warn(s); 514 return; 515 } catch {} 516 } 517 function we(s, e) { 518 e === void 0 && (e = []); 519 const t = document.createElement(s); 520 return t.classList.add(...(Array.isArray(e) ? e : Ut(e))), t; 521 } 522 function Zt(s, e) { 523 const t = []; 524 for (; s.previousElementSibling; ) { 525 const i = s.previousElementSibling; 526 e ? i.matches(e) && t.push(i) : t.push(i), (s = i); 527 } 528 return t; 529 } 530 function es(s, e) { 531 const t = []; 532 for (; s.nextElementSibling; ) { 533 const i = s.nextElementSibling; 534 e ? i.matches(e) && t.push(i) : t.push(i), (s = i); 535 } 536 return t; 537 } 538 function re(s, e) { 539 return X().getComputedStyle(s, null).getPropertyValue(e); 540 } 541 function Se(s) { 542 let e = s, 543 t; 544 if (e) { 545 for (t = 0; (e = e.previousSibling) !== null; ) 546 e.nodeType === 1 && (t += 1); 547 return t; 548 } 549 } 550 function it(s, e) { 551 const t = []; 552 let i = s.parentElement; 553 for (; i; ) 554 e ? i.matches(e) && t.push(i) : t.push(i), (i = i.parentElement); 555 return t; 556 } 557 function ts(s, e) { 558 function t(i) { 559 i.target === s && 560 (e.call(s, i), s.removeEventListener("transitionend", t)); 561 } 562 e && s.addEventListener("transitionend", t); 563 } 564 function Ie(s, e, t) { 565 const i = X(); 566 return ( 567 s[e === "width" ? "offsetWidth" : "offsetHeight"] + 568 parseFloat( 569 i 570 .getComputedStyle(s, null) 571 .getPropertyValue(e === "width" ? "margin-right" : "margin-top") 572 ) + 573 parseFloat( 574 i 575 .getComputedStyle(s, null) 576 .getPropertyValue(e === "width" ? "margin-left" : "margin-bottom") 577 ) 578 ); 579 } 580 function j(s) { 581 return (Array.isArray(s) ? s : [s]).filter((e) => !!e); 582 } 583 let ke; 584 function ss() { 585 const s = X(), 586 e = ee(); 587 return { 588 smoothScroll: 589 e.documentElement && 590 e.documentElement.style && 591 "scrollBehavior" in e.documentElement.style, 592 touch: !!( 593 "ontouchstart" in s || 594 (s.DocumentTouch && e instanceof s.DocumentTouch) 595 ), 596 }; 597 } 598 function nt() { 599 return ke || (ke = ss()), ke;
600 } 601 let Oe; 602 function is(s) { 603 let { userAgent: e } = s === void 0 ? {} : s; 604 const t = nt(), 605 i = X(), 606 r = i.navigator.platform, 607 n = e || i.navigator.userAgent, 608 o = { ios: !1, android: !1 }, 609 a = i.screen.width, 610 l = i.screen.height, 611 u = n.match(/(Android);?[\s\/]+([\d.]+)?/); 612 let d = n.match(/(iPad).*OS\s([\d_]+)/); 613 const p = n.match(/(iPod)(.*OS\s([\d_]+))?/), 614 m = !d && n.match(/(iPhone\sOS|iOS)\s([\d_]+)/), 615 h = r === "Win32"; 616 let g = r === "MacIntel"; 617 const w = [ 618 "1024x1366", 619 "1366x1024", 620 "834x1194", 621 "1194x834", 622 "834x1112", 623 "1112x834", 624 "768x1024", 625 "1024x768", 626 "820x1180", 627 "1180x820", 628 "810x1080", 629 "1080x810", 630 ]; 631 return ( 632 !d && 633 g && 634 t.touch && 635 w.indexOf(`${a}x${l}`) >= 0 && 636 ((d = n.match(/(Version)\/([\d.]+)/)), 637 d || (d = [0, 1, "13_0_0"]), 638 (g = !1)), 639 u && !h && ((o.os = "android"), (o.android = !0)), 640 (d || m || p) && ((o.os = "ios"), (o.ios = !0)), 641 o 642 ); 643 } 644 function rt(s) { 645 return s === void 0 && (s = {}), Oe || (Oe = is(s)), Oe; 646 } 647 let $e; 648 function ns() { 649 const s = X(), 650 e = rt(); 651 let t = !1; 652 function i() { 653 const a = s.navigator.userAgent.toLowerCase(); 654 return ( 655 a.indexOf("safari") >= 0 && 656 a.indexOf("chrome") < 0 && 657 a.indexOf("android") < 0 658 ); 659 } 660 if (i()) { 661 const a = String(s.navigator.userAgent); 662 if (a.includes("Version/")) { 663 const [l, u] = a 664 .split("Version/")[1] 665 .split(" ")[0] 666 .split(".") 667 .map((d) => Number(d)); 668 t = l < 16 || (l === 16 && u < 2); 669 } 670 } 671 const r = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test( 672 s.navigator.userAgent 673 ), 674 n = i(), 675 o = n || (r && e.ios); 676 return { 677 isSafari: t || n, 678 needPerspectiveFix: t, 679 need3dFix: o, 680 isWebView: r, 681 }; 682 } 683 function rs() { 684 return $e || ($e = ns()), $e; 685 } 686 function as(s) { 687 let { swiper: e, on: t, emit: i } = s; 688 const r = X(); 689 let n = null, 690 o = null; 691 const a = () => { 692 !e || e.destroyed || !e.initialized || (i("beforeResize"), i("resize")); 693 }, 694 l = () => { 695 !e || 696 e.destroyed || 697 !e.initialized || 698 ((n = new ResizeObserver((p) => { 699 o = r.requestAnimationFrame(() => { 700 const { width: m, height: h } = e; 701 let g = m, 702 w = h; 703 p.forEach((b) => { 704 let { contentBoxSize: S, contentRect: c, target: f } = b; 705 (f && f !== e.el) || 706 ((g = c ? c.width : (S[0] || S).inlineSize), 707 (w = c ? c.height : (S[0] || S).blockSize)); 708 }), 709 (g !== m || w !== h) && a(); 710 }); 711 })), 712 n.observe(e.el)); 713 }, 714 u = () => { 715 o && r.cancelAnimationFrame(o), 716 n && n.unobserve && e.el && (n.unobserve(e.el), (n = null)); 717 }, 718 d = () => { 719 !e || e.destroyed || !e.initialized || i("orientationchange"); 720 }; 721 t("init", () => { 722 if (e.params.resizeObserver && typeof r.ResizeObserver < "u") { 723 l(); 724 return; 725 } 726 r.addEventListener("resize", a), 727 r.addEventListener("orientationchange", d); 728 }), 729 t("destroy", () => { 730 u(), 731 r.removeEventListener("resize", a), 732 r.removeEventListener("orientationchange", d); 733 }); 734 } 735 function os(s) { 736 let { swiper: e, extendParams: t, on: i, emit: r } = s; 737 const n = [], 738 o = X(), 739 a = function (d, p) { 740 p === void 0 && (p = {}); 741 const m = o.MutationObserver || o.WebkitMutationObserver, 742 h = new m((g) => { 743 if (e.__preventObserver__) return; 744 if (g.length === 1) { 745 r("observerUpdate", g[0]); 746 return; 747 } 748 const w = function () { 749 r("observerUpdate", g[0]); 750 }; 751 o.requestAnimationFrame 752 ? o.requestAnimationFrame(w) 753 : o.setTimeout(w, 0); 754 }); 755 h.observe(d, { 756 attributes: typeof p.attributes > "u" ? !0 : p.attributes, 757 childList: 758 e.isElement || (typeof p.childList > "u" ? !0 : p).childList, 759 characterData: typeof p.characterData > "u" ? !0 : p.characterData, 760 }), 761 n.push(h); 762 }, 763 l = () => { 764 if (e.params.observer) { 765 if (e.params.observeParents) { 766 const d = it(e.hostEl); 767 for (let p = 0; p < d.length; p += 1) a(d[p]); 768 } 769 a(e.hostEl, { childList: e.params.observeSlideChildren }), 770 a(e.wrapperEl, { attributes: !1 }); 771 } 772 }, 773 u = () => {
774 n.forEach((d) => { 775 d.disconnect(); 776 }), 777 n.splice(0, n.length); 778 }; 779 t({ observer: !1, observeParents: !1, observeSlideChildren: !1 }), 780 i("init", l), 781 i("destroy", u); 782 } 783 var ls = { 784 on(s, e, t) { 785 const i = this; 786 if (!i.eventsListeners || i.destroyed || typeof e != "function") return i; 787 const r = t ? "unshift" : "push"; 788 return ( 789 s.split(" ").forEach((n) => { 790 i.eventsListeners[n] || (i.eventsListeners[n] = []), 791 i.eventsListeners[n][r](e); 792 }), 793 i 794 ); 795 }, 796 once(s, e, t) { 797 const i = this; 798 if (!i.eventsListeners || i.destroyed || typeof e != "function") return i; 799 function r() { 800 i.off(s, r), r.__emitterProxy && delete r.__emitterProxy; 801 for (var n = arguments.length, o = new Array(n), a = 0; a < n; a++) 802 o[a] = arguments[a]; 803 e.apply(i, o); 804 } 805 return (r.__emitterProxy = e), i.on(s, r, t); 806 }, 807 onAny(s, e) { 808 const t = this; 809 if (!t.eventsListeners || t.destroyed || typeof s != "function") return t; 810 const i = e ? "unshift" : "push"; 811 return ( 812 t.eventsAnyListeners.indexOf(s) < 0 && t.eventsAnyListeners[i](s), t 813 ); 814 }, 815 offAny(s) { 816 const e = this; 817 if (!e.eventsListeners || e.destroyed || !e.eventsAnyListeners) return e; 818 const t = e.eventsAnyListeners.indexOf(s); 819 return t >= 0 && e.eventsAnyListeners.splice(t, 1), e; 820 }, 821 off(s, e) { 822 const t = this; 823 return ( 824 !t.eventsListeners || 825 t.destroyed || 826 !t.eventsListeners || 827 s.split(" ").forEach((i) => { 828 typeof e > "u" 829 ? (t.eventsListeners[i] = []) 830 : t.eventsListeners[i] &&
831 t.eventsListeners[i].forEach((r, n) => { 832 (r === e || (r.__emitterProxy && r.__emitterProxy === e)) && 833 t.eventsListeners[i].splice(n, 1); 834 }); 835 }), 836 t 837 ); 838 }, 839 emit() { 840 const s = this; 841 if (!s.eventsListeners || s.destroyed || !s.eventsListeners) return s; 842 let e, t, i; 843 for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++) 844 n[o] = arguments[o]; 845 return ( 846 typeof n[0] == "string" || Array.isArray(n[0]) 847 ? ((e = n[0]), (t = n.slice(1, n.length)), (i = s)) 848 : ((e = n[0].events), (t = n[0].data), (i = n[0].context || s)), 849 t.unshift(i), 850 (Array.isArray(e) ? e : e.split(" ")).forEach((l) => { 851 s.eventsAnyListeners && 852 s.eventsAnyListeners.length && 853 s.eventsAnyListeners.forEach((u) => { 854 u.apply(i, [l, ...t]); 855 }), 856 s.eventsListeners && 857 s.eventsListeners[l] && 858 s.eventsListeners[l].forEach((u) => { 859 u.apply(i, t); 860 }); 861 }), 862 s 863 ); 864 }, 865 }; 866 function ds() { 867 const s = this; 868 let e, t; 869 const i = s.el; 870 typeof s.params.width < "u" && s.params.width !== null 871 ? (e = s.params.width) 872 : (e = i.clientWidth), 873 typeof s.params.height < "u" && s.params.height !== null 874 ? (t = s.params.height) 875 : (t = i.clientHeight), 876 !((e === 0 && s.isHorizontal()) || (t === 0 && s.isVertical())) && 877 ((e = 878 e - 879 parseInt(re(i, "padding-left") || 0, 10) - 880 parseInt(re(i, "padding-right") || 0, 10)), 881 (t = 882 t - 883 parseInt(re(i, "padding-top") || 0, 10) - 884 parseInt(re(i, "padding-bottom") || 0, 10)), 885 Number.isNaN(e) && (e = 0), 886 Number.isNaN(t) && (t = 0), 887 Object.assign(s, { 888 width: e, 889 height: t, 890 size: s.isHorizontal() ? e : t, 891 })); 892 } 893 function cs() { 894 const s = this; 895 function e(T, L) { 896 return parseFloat(T.getPropertyValue(s.getDirectionLabel(L)) || 0); 897 } 898 const t = s.params, 899 { wrapperEl: i, slidesEl: r, size: n, rtlTranslate: o, wrongRTL: a } = s, 900 l = s.virtual && t.virtual.enabled, 901 u = l ? s.virtual.slides.length : s.slides.length, 902 d = Q(r, `.${s.params.slideClass}, swiper-slide`), 903 p = l ? s.virtual.slides.length : d.length; 904 let m = []; 905 const h = [], 906 g = []; 907 let w = t.slidesOffsetBefore; 908 typeof w == "function" && (w = t.slidesOffsetBefore.call(s)); 909 let b = t.slidesOffsetAfter; 910 typeof b == "function" && (b = t.slidesOffsetAfter.call(s)); 911 const S = s.snapGrid.length, 912 c = s.slidesGrid.length; 913 let f = t.spaceBetween, 914 v = -w, 915 y = 0, 916 E = 0; 917 if (typeof n > "u") return; 918 typeof f == "string" && f.indexOf("%") >= 0 919 ? (f = (parseFloat(f.replace("%", "")) / 100) * n) 920 : typeof f == "string" && (f = parseFloat(f)), 921 (s.virtualSize = -f), 922 d.forEach((T) => { 923 o ? (T.style.marginLeft = "") : (T.style.marginRight = ""), 924 (T.style.marginBottom = ""), 925 (T.style.marginTop = ""); 926 }), 927 t.centeredSlides && 928 t.cssMode && 929 (ve(i, "--swiper-centered-offset-before", ""), 930 ve(i, "--swiper-centered-offset-after", "")); 931 const H = t.grid && t.grid.rows > 1 && s.grid; 932 H ? s.grid.initSlides(d) : s.grid && s.grid.unsetSlides(); 933 let I; 934 const D = 935 t.slidesPerView === "auto" && 936 t.breakpoints && 937 Object.keys(t.breakpoints).filter( 938 (T) => typeof t.breakpoints[T].slidesPerView < "u" 939 ).length > 0; 940 for (let T = 0; T < p; T += 1) { 941 I = 0; 942 let L; 943 if ( 944 (d[T] && (L = d[T]), 945 H && s.grid.updateSlide(T, L, d), 946 !(d[T] && re(L, "display") === "none")) 947 ) { 948 if (t.slidesPerView === "auto") { 949 D && (d[T].style[s.getDirectionLabel("width")] = ""); 950 const k = getComputedStyle(L), 951 C = L.style.transform, 952 $ = L.style.webkitTransform; 953 if ( 954 (C && (L.style.transform = "none"), 955 $ && (L.style.webkitTransform = "none"), 956 t.roundLengths) 957 ) 958 I = s.isHorizontal() ? Ie(L, "width") : Ie(L, "height"); 959 else { 960 const B = e(k, "width"), 961 R = e(k, "padding-left"), 962 te = e(k, "padding-right"), 963 V = e(k, "margin-left"), 964 U = e(k, "margin-right"), 965 O = k.getPropertyValue("box-sizing"); 966 if (O && O === "border-box") I = B + V + U; 967 else {
968 const { clientWidth: se, offsetWidth: ne } = L; 969 I = B + R + te + V + U + (ne - se); 970 } 971 } 972 C && (L.style.transform = C), 973 $ && (L.style.webkitTransform = $), 974 t.roundLengths && (I = Math.floor(I)); 975 } else 976 (I = (n - (t.slidesPerView - 1) * f) / t.slidesPerView), 977 t.roundLengths && (I = Math.floor(I)), 978 d[T] && (d[T].style[s.getDirectionLabel("width")] = `${I}px`); 979 d[T] && (d[T].swiperSlideSize = I), 980 g.push(I), 981 t.centeredSlides 982 ? ((v = v + I / 2 + y / 2 + f), 983 y === 0 && T !== 0 && (v = v - n / 2 - f), 984 T === 0 && (v = v - n / 2 - f), 985 Math.abs(v) < 0.001 && (v = 0), 986 t.roundLengths && (v = Math.floor(v)), 987 E % t.slidesPerGroup === 0 && m.push(v), 988 h.push(v)) 989 : (t.roundLengths && (v = Math.floor(v)), 990 (E - Math.min(s.params.slidesPerGroupSkip, E)) % 991 s.params.slidesPerGroup === 992 0 && m.push(v), 993 h.push(v), 994 (v = v + I + f)), 995 (s.virtualSize += I + f), 996 (y = I), 997 (E += 1); 998 } 999 } 1000 if ( 1001 ((s.virtualSize = Math.max(s.virtualSize, n) + b), 1002 o && 1003 a && 1004 (t.effect === "slide" || t.effect === "coverflow") && 1005 (i.style.width = `${s.virtualSize + f}px`), 1006 t.setWrapperSize && 1007 (i.style[s.getDirectionLabel("width")] = `${s.virtualSize + f}px`), 1008 H && s.grid.updateWrapperSize(I, m), 1009 !t.centeredSlides) 1010 ) { 1011 const T = []; 1012 for (let L = 0; L < m.length; L += 1) { 1013 let k = m[L]; 1014 t.roundLengths && (k = Math.floor(k)), 1015 m[L] <= s.virtualSize - n && T.push(k); 1016 } 1017 (m = T), 1018 Math.floor(s.virtualSize - n) - Math.floor(m[m.length - 1]) > 1 && 1019 m.push(s.virtualSize - n); 1020 } 1021 if (l && t.loop) { 1022 const T = g[0] + f; 1023 if (t.slidesPerGroup > 1) { 1024 const L = Math.ceil( 1025 (s.virtual.slidesBefore + s.virtual.slidesAfter) / t.slidesPerGroup 1026 ), 1027 k = T * t.slidesPerGroup; 1028 for (let C = 0; C < L; C += 1) m.push(m[m.length - 1] + k); 1029 } 1030 for ( 1031 let L = 0; 1032 L < s.virtual.slidesBefore + s.virtual.slidesAfter; 1033 L += 1 1034 ) 1035 t.slidesPerGroup === 1 && m.push(m[m.length - 1] + T), 1036 h.push(h[h.length - 1] + T), 1037 (s.virtualSize += T); 1038 } 1039 if ((m.length === 0 && (m = [0]), f !== 0)) { 1040 const T = 1041 s.isHorizontal() && o 1042 ? "marginLeft" 1043 : s.getDirectionLabel("marginRight"); 1044 d.filter((L, k) => 1045 !t.cssMode || t.loop ? !0 : k !== d.length - 1 1046 ).forEach((L) => { 1047 L.style[T] = `${f}px`; 1048 }); 1049 } 1050 if (t.centeredSlides && t.centeredSlidesBounds) { 1051 let T = 0; 1052 g.forEach((k) => { 1053 T += k + (f || 0); 1054 }), 1055 (T -= f); 1056 const L = T > n ? T - n : 0; 1057 m = m.map((k) => (k <= 0 ? -w : k > L ? L + b : k)); 1058 } 1059 if (t.centerInsufficientSlides) { 1060 let T = 0; 1061 g.forEach((k) => { 1062 T += k + (f || 0); 1063 }), 1064 (T -= f); 1065 const L = (t.slidesOffsetBefore || 0) + (t.slidesOffsetAfter || 0); 1066 if (T + L < n) { 1067 const k = (n - T - L) / 2; 1068 m.forEach((C, $) => { 1069 m[$] = C - k; 1070 }), 1071 h.forEach((C, $) => { 1072 h[$] = C + k; 1073 }); 1074 } 1075 } 1076 if ( 1077 (Object.assign(s, { 1078 slides: d, 1079 snapGrid: m, 1080 slidesGrid: h, 1081 slidesSizesGrid: g, 1082 }), 1083 t.centeredSlides && t.cssMode && !t.centeredSlidesBounds) 1084 ) { 1085 ve(i, "--swiper-centered-offset-before", `${-m[0]}px`), 1086 ve( 1087 i, 1088 "--swiper-centered-offset-after", 1089 `${s.size / 2 - g[g.length - 1] / 2}px` 1090 ); 1091 const T = -s.snapGrid[0], 1092 L = -s.slidesGrid[0]; 1093 (s.snapGrid = s.snapGrid.map((k) => k + T)), 1094 (s.slidesGrid = s.slidesGrid.map((k) => k + L)); 1095 } 1096 if ( 1097 (p !== u && s.emit("slidesLengthChange"), 1098 m.length !== S && 1099 (s.params.watchOverflow && s.checkOverflow(), 1100 s.emit("snapGridLengthChange")), 1101 h.length !== c && s.emit("slidesGridLengthChange"), 1102 t.watchSlidesProgress && s.updateSlidesOffset(), 1103 s.emit("slidesUpdated"), 1104 !l && !t.cssMode && (t.effect === "slide" || t.effect === "fade")) 1105 ) { 1106 const T = `${t.containerModifierClass}backface-hidden`, 1107 L = s.el.classList.contains(T); 1108 p <= t.maxBackfaceHiddenSlides 1109 ? L || s.el.classList.add(T) 1110 : L && s.el.classList.remove(T); 1111 } 1112 } 1113 function us(s) { 1114 const e = this, 1115 t = [], 1116 i = e.virtual && e.params.virtual.enabled; 1117 let r = 0, 1118 n; 1119 typeof s == "number" 1120 ? e.setTransition(s) 1121 : s === !0 && e.setTransition(e.params.speed); 1122 const o = (a) => (i ? e.slides[e.getSlideIndexByData(a)] : e.slides[a]); 1123 if (e.params.slidesPerView !== "auto" && e.params.slidesPerView > 1) 1124 if (e.params.centeredSlides)
1125 (e.visibleSlides || []).forEach((a) => { 1126 t.push(a); 1127 }); 1128 else 1129 for (n = 0; n < Math.ceil(e.params.slidesPerView); n += 1) { 1130 const a = e.activeIndex + n; 1131 if (a > e.slides.length && !i) break; 1132 t.push(o(a)); 1133 } 1134 else t.push(o(e.activeIndex)); 1135 for (n = 0; n < t.length; n += 1) 1136 if (typeof t[n] < "u") { 1137 const a = t[n].offsetHeight; 1138 r = a > r ? a : r; 1139 } 1140 (r || r === 0) && (e.wrapperEl.style.height = `${r}px`); 1141 } 1142 function fs() { 1143 const s = this, 1144 e = s.slides, 1145 t = s.isElement 1146 ? s.isHorizontal() 1147 ? s.wrapperEl.offsetLeft 1148 : s.wrapperEl.offsetTop 1149 : 0; 1150 for (let i = 0; i < e.length; i += 1) 1151 e[i].swiperSlideOffset = 1152 (s.isHorizontal() ? e[i].offsetLeft : e[i].offsetTop) - 1153 t - 1154 s.cssOverflowAdjustment(); 1155 } 1156 const at = (s, e, t) => { 1157 e && !s.classList.contains(t) 1158 ? s.classList.add(t) 1159 : !e && s.classList.contains(t) && s.classList.remove(t); 1160 }; 1161 function ps(s) { 1162 s === void 0 && (s = (this && this.translate) || 0); 1163 const e = this, 1164 t = e.params, 1165 { slides: i, rtlTranslate: r, snapGrid: n } = e; 1166 if (i.length === 0) return; 1167 typeof i[0].swiperSlideOffset > "u" && e.updateSlidesOffset(); 1168 let o = -s; 1169 r && (o = s), (e.visibleSlidesIndexes = []), (e.visibleSlides = []); 1170 let a = t.spaceBetween; 1171 typeof a == "string" && a.indexOf("%") >= 0 1172 ? (a = (parseFloat(a.replace("%", "")) / 100) * e.size) 1173 : typeof a == "string" && (a = parseFloat(a)); 1174 for (let l = 0; l < i.length; l += 1) { 1175 const u = i[l]; 1176 let d = u.swiperSlideOffset; 1177 t.cssMode && t.centeredSlides && (d -= i[0].swiperSlideOffset); 1178 const p = 1179 (o + (t.centeredSlides ? e.minTranslate() : 0) - d) / 1180 (u.swiperSlideSize + a), 1181 m = 1182 (o - n[0] + (t.centeredSlides ? e.minTranslate() : 0) - d) / 1183 (u.swiperSlideSize + a), 1184 h = -(o - d), 1185 g = h + e.slidesSizesGrid[l], 1186 w = h >= 0 && h <= e.size - e.slidesSizesGrid[l], 1187 b = 1188 (h >= 0 && h < e.size - 1) || 1189 (g > 1 && g <= e.size) || 1190 (h <= 0 && g >= e.size); 1191 b && (e.visibleSlides.push(u), e.visibleSlidesIndexes.push(l)), 1192 at(u, b, t.slideVisibleClass), 1193 at(u, w, t.slideFullyVisibleClass), 1194 (u.progress = r ? -p : p), 1195 (u.originalProgress = r ? -m : m); 1196 } 1197 } 1198 function ms(s) { 1199 const e = this; 1200 if (typeof s > "u") { 1201 const d = e.rtlTranslate ? -1 : 1; 1202 s = (e && e.translate && e.translate * d) || 0; 1203 } 1204 const t = e.params, 1205 i = e.maxTranslate() - e.minTranslate(); 1206 let { progress: r, isBeginning: n, isEnd: o, progressLoop: a } = e; 1207 const l = n, 1208 u = o; 1209 if (i === 0) (r = 0), (n = !0), (o = !0); 1210 else { 1211 r = (s - e.minTranslate()) / i; 1212 const d = Math.abs(s - e.minTranslate()) < 1, 1213 p = Math.abs(s - e.maxTranslate()) < 1; 1214 (n = d || r <= 0), (o = p || r >= 1), d && (r = 0), p && (r = 1); 1215 } 1216 if (t.loop) { 1217 const d = e.getSlideIndexByData(0), 1218 p = e.getSlideIndexByData(e.slides.length - 1), 1219 m = e.slidesGrid[d], 1220 h = e.slidesGrid[p], 1221 g = e.slidesGrid[e.slidesGrid.length - 1], 1222 w = Math.abs(s); 1223 w >= m ? (a = (w - m) / g) : (a = (w + g - h) / g), a > 1 && (a -= 1); 1224 } 1225 Object.assign(e, { 1226 progress: r, 1227 progressLoop: a, 1228 isBeginning: n, 1229 isEnd: o, 1230 }), 1231 (t.watchSlidesProgress || (t.centeredSlides && t.autoHeight)) && 1232 e.updateSlidesProgress(s), 1233 n && !l && e.emit("reachBeginning toEdge"), 1234 o && !u && e.emit("reachEnd toEdge"), 1235 ((l && !n) || (u && !o)) && e.emit("fromEdge"), 1236 e.emit("progress", r); 1237 } 1238 const ze = (s, e, t) => { 1239 e && !s.classList.contains(t) 1240 ? s.classList.add(t) 1241 : !e && s.classList.contains(t) && s.classList.remove(t); 1242 }; 1243 function hs() { 1244 const s = this, 1245 { slides: e, params: t, slidesEl: i, activeIndex: r } = s, 1246 n = s.virtual && t.virtual.enabled, 1247 o = s.grid && t.grid && t.grid.rows > 1, 1248 a = (p) => Q(i, `.${t.slideClass}${p}, swiper-slide${p}`)[0]; 1249 let l, u, d; 1250 if (n) 1251 if (t.loop) { 1252 let p = r - s.virtual.slidesBefore; 1253 p < 0 && (p = s.virtual.slides.length + p), 1254 p >= s.virtual.slides.length && (p -= s.virtual.slides.length), 1255 (l = a(`[data-swiper-slide-index="${p}"]`)); 1256 } else l = a(`[data-swiper-slide-index="${r}"]`); 1257 else 1258 o 1259 ? ((l = e.filter((p) => p.column === r)[0]), 1260 (d = e.filter((p) => p.column === r + 1)[0]), 1261 (u = e.filter((p) => p.column === r - 1)[0])) 1262 : (l = e[r]); 1263 l && 1264 (o || 1265 ((d = es(l, `.${t.slideClass}, swiper-slide`)[0]), 1266 t.loop && !d && (d = e[0]), 1267 (u = Zt(l, `.${t.slideClass}, swiper-slide`)[0]), 1268 t.loop && !u === 0 && (u = e[e.length - 1]))), 1269 e.forEach((p) => { 1270 ze(p, p === l, t.slideActiveClass), 1271 ze(p, p === d, t.slideNextClass), 1272 ze(p, p === u, t.slidePrevClass); 1273 }), 1274 s.emitSlidesClasses(); 1275 } 1276 const be = (s, e) => { 1277 if (!s || s.destroyed || !s.params) return; 1278 const t = () => 1279 s.isElement ? "swiper-slide" : `.${s.params.slideClass}`, 1280 i = e.closest(t()); 1281 if (i) { 1282 let r = i.querySelector(`.${s.params.lazyPreloaderClass}`); 1283 !r && 1284 s.isElement && 1285 (i.shadowRoot 1286 ? (r = i.shadowRoot.querySelector( 1287 `.${s.params.lazyPreloaderClass}` 1288 )) 1289 : requestAnimationFrame(() => { 1290 i.shadowRoot && 1291 ((r = i.shadowRoot.querySelector( 1292 `.${s.params.lazyPreloaderClass}` 1293 )), 1294 r && r.remove()); 1295 })), 1296 r && r.remove(); 1297 } 1298 }, 1299 De = (s, e) => { 1300 if (!s.slides[e]) return; 1301 const t = s.slides[e].querySelector('[loading="lazy"]'); 1302 t && t.removeAttribute("loading"); 1303 }, 1304 qe = (s) => { 1305 if (!s || s.destroyed || !s.params) return; 1306 let e = s.params.lazyPreloadPrevNext; 1307 const t = s.slides.length; 1308 if (!t || !e || e < 0) return; 1309 e = Math.min(e, t); 1310 const i = 1311 s.params.slidesPerView === "auto" 1312 ? s.slidesPerViewDynamic()
1313 : Math.ceil(s.params.slidesPerView), 1314 r = s.activeIndex; 1315 if (s.params.grid && s.params.grid.rows > 1) { 1316 const o = r, 1317 a = [o - e]; 1318 a.push(...Array.from({ length: e }).map((l, u) => o + i + u)), 1319 s.slides.forEach((l, u) => { 1320 a.includes(l.column) && De(s, u); 1321 }); 1322 return; 1323 } 1324 const n = r + i - 1; 1325 if (s.params.rewind || s.params.loop) 1326 for (let o = r - e; o <= n + e; o += 1) { 1327 const a = ((o % t) + t) % t; 1328 (a < r || a > n) && De(s, a); 1329 } 1330 else 1331 for (let o = Math.max(r - e, 0); o <= Math.min(n + e, t - 1); o += 1) 1332 o !== r && (o > n || o < r) && De(s, o); 1333 }; 1334 function gs(s) { 1335 const { slidesGrid: e, params: t } = s, 1336 i = s.rtlTranslate ? s.translate : -s.translate; 1337 let r; 1338 for (let n = 0; n < e.length; n += 1) 1339 typeof e[n + 1] < "u" 1340 ? i >= e[n] && i < e[n + 1] - (e[n + 1] - e[n]) / 2 1341 ? (r = n) 1342 : i >= e[n] && i < e[n + 1] && (r = n + 1) 1343 : i >= e[n] && (r = n); 1344 return t.normalizeSlideIndex && (r < 0 || typeof r > "u") && (r = 0), r; 1345 } 1346 function vs(s) { 1347 const e = this, 1348 t = e.rtlTranslate ? e.translate : -e.translate, 1349 { 1350 snapGrid: i, 1351 params: r, 1352 activeIndex: n, 1353 realIndex: o, 1354 snapIndex: a, 1355 } = e; 1356 let l = s, 1357 u; 1358 const d = (h) => { 1359 let g = h - e.virtual.slidesBefore; 1360 return ( 1361 g < 0 && (g = e.virtual.slides.length + g), 1362 g >= e.virtual.slides.length && (g -= e.virtual.slides.length), 1363 g 1364 ); 1365 }; 1366 if ((typeof l > "u" && (l = gs(e)), i.indexOf(t) >= 0)) u = i.indexOf(t); 1367 else { 1368 const h = Math.min(r.slidesPerGroupSkip, l); 1369 u = h + Math.floor((l - h) / r.slidesPerGroup); 1370 } 1371 if ((u >= i.length && (u = i.length - 1), l === n && !e.params.loop)) { 1372 u !== a && ((e.snapIndex = u), e.emit("snapIndexChange")); 1373 return; 1374 } 1375 if (l === n && e.params.loop && e.virtual && e.params.virtual.enabled) { 1376 e.realIndex = d(l); 1377 return; 1378 } 1379 const p = e.grid && r.grid && r.grid.rows > 1; 1380 let m; 1381 if (e.virtual && r.virtual.enabled && r.loop) m = d(l); 1382 else if (p) { 1383 const h = e.slides.filter((w) => w.column === l)[0]; 1384 let g = parseInt(h.getAttribute("data-swiper-slide-index"), 10); 1385 Number.isNaN(g) && (g = Math.max(e.slides.indexOf(h), 0)), 1386 (m = Math.floor(g / r.grid.rows)); 1387 } else if (e.slides[l]) { 1388 const h = e.slides[l].getAttribute("data-swiper-slide-index"); 1389 h ? (m = parseInt(h, 10)) : (m = l); 1390 } else m = l; 1391 Object.assign(e, { 1392 previousSnapIndex: a, 1393 snapIndex: u, 1394 previousRealIndex: o, 1395 realIndex: m, 1396 previousIndex: n, 1397 activeIndex: l, 1398 }), 1399 e.initialized && qe(e), 1400 e.emit("activeIndexChange"), 1401 e.emit("snapIndexChange"), 1402 (e.initialized || e.params.runCallbacksOnInit) && 1403 (o !== m && e.emit("realIndexChange"), e.emit("slideChange")); 1404 } 1405 function ys(s, e) { 1406 const t = this, 1407 i = t.params; 1408 let r = s.closest(`.${i.slideClass}, swiper-slide`); 1409 !r && 1410 t.isElement && 1411 e && 1412 e.length > 1 && 1413 e.includes(s) &&
1414 [...e.slice(e.indexOf(s) + 1, e.length)].forEach((a) => { 1415 !r && 1416 a.matches && 1417 a.matches(`.${i.slideClass}, swiper-slide`) && 1418 (r = a); 1419 }); 1420 let n = !1, 1421 o; 1422 if (r) { 1423 for (let a = 0; a < t.slides.length; a += 1) 1424 if (t.slides[a] === r) { 1425 (n = !0), (o = a); 1426 break; 1427 } 1428 } 1429 if (r && n) 1430 (t.clickedSlide = r), 1431 t.virtual && t.params.virtual.enabled 1432 ? (t.clickedIndex = parseInt( 1433 r.getAttribute("data-swiper-slide-index"), 1434 10 1435 )) 1436 : (t.clickedIndex = o); 1437 else { 1438 (t.clickedSlide = void 0), (t.clickedIndex = void 0); 1439 return; 1440 } 1441 i.slideToClickedSlide && 1442 t.clickedIndex !== void 0 && 1443 t.clickedIndex !== t.activeIndex && 1444 t.slideToClickedSlide(); 1445 } 1446 var ws = { 1447 updateSize: ds, 1448 updateSlides: cs, 1449 updateAutoHeight: us, 1450 updateSlidesOffset: fs, 1451 updateSlidesProgress: ps, 1452 updateProgress: ms, 1453 updateSlidesClasses: hs, 1454 updateActiveIndex: vs, 1455 updateClickedSlide: ys, 1456 }; 1457 function Ss(s) { 1458 s === void 0 && (s = this.isHorizontal() ? "x" : "y"); 1459 const e = this, 1460 { params: t, rtlTranslate: i, translate: r, wrapperEl: n } = e; 1461 if (t.virtualTranslate) return i ? -r : r; 1462 if (t.cssMode) return r; 1463 let o = Kt(n, s); 1464 return (o += e.cssOverflowAdjustment()), i && (o = -o), o || 0; 1465 } 1466 function bs(s, e) { 1467 const t = this, 1468 { rtlTranslate: i, params: r, wrapperEl: n, progress: o } = t; 1469 let a = 0, 1470 l = 0; 1471 const u = 0; 1472 t.isHorizontal() ? (a = i ? -s : s) : (l = s), 1473 r.roundLengths && ((a = Math.floor(a)), (l = Math.floor(l))), 1474 (t.previousTranslate = t.translate), 1475 (t.translate = t.isHorizontal() ? a : l), 1476 r.cssMode 1477 ? (n[t.isHorizontal() ? "scrollLeft" : "scrollTop"] = t.isHorizontal() 1478 ? -a 1479 : -l) 1480 : r.virtualTranslate || 1481 (t.isHorizontal() 1482 ? (a -= t.cssOverflowAdjustment()) 1483 : (l -= t.cssOverflowAdjustment()), 1484 (n.style.transform = `translate3d(${a}px, ${l}px, ${u}px)`)); 1485 let d; 1486 const p = t.maxTranslate() - t.minTranslate(); 1487 p === 0 ? (d = 0) : (d = (s - t.minTranslate()) / p), 1488 d !== o && t.updateProgress(s), 1489 t.emit("setTranslate", t.translate, e); 1490 } 1491 function Ts() { 1492 return -this.snapGrid[0]; 1493 } 1494 function xs() { 1495 return -this.snapGrid[this.snapGrid.length - 1]; 1496 } 1497 function Es(s, e, t, i, r) { 1498 s === void 0 && (s = 0), 1499 e === void 0 && (e = this.params.speed), 1500 t === void 0 && (t = !0), 1501 i === void 0 && (i = !0); 1502 const n = this, 1503 { params: o, wrapperEl: a } = n; 1504 if (n.animating && o.preventInteractionOnTransition) return !1; 1505 const l = n.minTranslate(), 1506 u = n.maxTranslate(); 1507 let d; 1508 if ( 1509 (i && s > l ? (d = l) : i && s < u ? (d = u) : (d = s), 1510 n.updateProgress(d), 1511 o.cssMode) 1512 ) { 1513 const p = n.isHorizontal(); 1514 if (e === 0) a[p ? "scrollLeft" : "scrollTop"] = -d; 1515 else { 1516 if (!n.support.smoothScroll) 1517 return ( 1518 tt({ swiper: n, targetPosition: -d, side: p ? "left" : "top" }), !0 1519 ); 1520 a.scrollTo({ [p ? "left" : "top"]: -d, behavior: "smooth" }); 1521 } 1522 return !0; 1523 } 1524 return ( 1525 e === 0 1526 ? (n.setTransition(0), 1527 n.setTranslate(d), 1528 t && (n.emit("beforeTransitionStart", e, r), n.emit("transitionEnd"))) 1529 : (n.setTransition(e), 1530 n.setTranslate(d), 1531 t && 1532 (n.emit("beforeTransitionStart", e, r), n.emit("transitionStart")), 1533 n.animating || 1534 ((n.animating = !0), 1535 n.onTranslateToWrapperTransitionEnd || 1536 (n.onTranslateToWrapperTransitionEnd = function (m) { 1537 !n || 1538 n.destroyed || 1539 (m.target === this && 1540 (n.wrapperEl.removeEventListener( 1541 "transitionend", 1542 n.onTranslateToWrapperTransitionEnd 1543 ), 1544 (n.onTranslateToWrapperTransitionEnd = null),
1545 delete n.onTranslateToWrapperTransitionEnd, 1546 (n.animating = !1), 1547 t && n.emit("transitionEnd"))); 1548 }), 1549 n.wrapperEl.addEventListener( 1550 "transitionend", 1551 n.onTranslateToWrapperTransitionEnd 1552 ))), 1553 !0 1554 ); 1555 } 1556 var Ls = { 1557 getTranslate: Ss, 1558 setTranslate: bs, 1559 minTranslate: Ts, 1560 maxTranslate: xs, 1561 translateTo: Es, 1562 }; 1563 function Cs(s, e) { 1564 const t = this; 1565 t.params.cssMode || 1566 ((t.wrapperEl.style.transitionDuration = `${s}ms`), 1567 (t.wrapperEl.style.transitionDelay = s === 0 ? "0ms" : "")), 1568 t.emit("setTransition", s, e); 1569 } 1570 function ot(s) { 1571 let { swiper: e, runCallbacks: t, direction: i, step: r } = s; 1572 const { activeIndex: n, previousIndex: o } = e; 1573 let a = i; 1574 if ( 1575 (a || (n > o ? (a = "next") : n < o ? (a = "prev") : (a = "reset")), 1576 e.emit(`transition${r}`), 1577 t && n !== o) 1578 ) { 1579 if (a === "reset") { 1580 e.emit(`slideResetTransition${r}`); 1581 return; 1582 } 1583 e.emit(`slideChangeTransition${r}`), 1584 a === "next" 1585 ? e.emit(`slideNextTransition${r}`) 1586 : e.emit(`slidePrevTransition${r}`); 1587 } 1588 } 1589 function Ps(s, e) { 1590 s === void 0 && (s = !0); 1591 const t = this, 1592 { params: i } = t; 1593 i.cssMode || 1594 (i.autoHeight && t.updateAutoHeight(), 1595 ot({ swiper: t, runCallbacks: s, direction: e, step: "Start" })); 1596 } 1597 function Ms(s, e) { 1598 s === void 0 && (s = !0); 1599 const t = this, 1600 { params: i } = t; 1601 (t.animating = !1), 1602 !i.cssMode && 1603 (t.setTransition(0), 1604 ot({ swiper: t, runCallbacks: s, direction: e, step: "End" })); 1605 } 1606 var As = { setTransition: Cs, transitionStart: Ps, transitionEnd: Ms }; 1607 function Is(s, e, t, i, r) { 1608 s === void 0 && (s = 0), 1609 t === void 0 && (t = !0), 1610 typeof s == "string" && (s = parseInt(s, 10)); 1611 const n = this; 1612 let o = s; 1613 o < 0 && (o = 0); 1614 const { 1615 params: a, 1616 snapGrid: l, 1617 slidesGrid: u, 1618 previousIndex: d, 1619 activeIndex: p, 1620 rtlTranslate: m, 1621 wrapperEl: h, 1622 enabled: g, 1623 } = n; 1624 if ( 1625 (!g && !i && !r) || 1626 n.destroyed || 1627 (n.animating && a.preventInteractionOnTransition) 1628 ) 1629 return !1; 1630 typeof e > "u" && (e = n.params.speed); 1631 const w = Math.min(n.params.slidesPerGroupSkip, o); 1632 let b = w + Math.floor((o - w) / n.params.slidesPerGroup); 1633 b >= l.length && (b = l.length - 1); 1634 const S = -l[b]; 1635 if (a.normalizeSlideIndex) 1636 for (let y = 0; y < u.length; y += 1) { 1637 const E = -Math.floor(S * 100), 1638 H = Math.floor(u[y] * 100), 1639 I = Math.floor(u[y + 1] * 100); 1640 typeof u[y + 1] < "u" 1641 ? E >= H && E < I - (I - H) / 2 1642 ? (o = y) 1643 : E >= H && E < I && (o = y + 1) 1644 : E >
1644= H && (o = y); 1645 } 1646 if ( 1647 n.initialized && 1648 o !== p && 1649 ((!n.allowSlideNext && 1650 (m 1651 ? S > n.translate && S > n.minTranslate() 1652 : S < n.translate && S < n.minTranslate())) || 1653 (!n.allowSlidePrev && 1654 S > n.translate && 1655 S > n.maxTranslate() && 1656 (p || 0) !== o)) 1657 ) 1658 return !1; 1659 o !== (d || 0) && t && n.emit("beforeSlideChangeStart"), 1660 n.updateProgress(S); 1661 let c; 1662 o > p ? (c = "next") : o < p ? (c = "prev") : (c = "reset"); 1663 const f = n.virtual && n.params.virtual.enabled; 1664 if (!(f && r) && ((m && -S === n.translate) || (!m && S === n.translate))) 1665 return ( 1666 n.updateActiveIndex(o), 1667 a.autoHeight && n.updateAutoHeight(), 1668 n.updateSlidesClasses(), 1669 a.effect !== "slide" && n.setTranslate(S), 1670 c !== "reset" && (n.transitionStart(t, c), n.transitionEnd(t, c)), 1671 !1 1672 ); 1673 if (a.cssMode) { 1674 const y = n.isHorizontal(), 1675 E = m ? S : -S; 1676 if (e === 0) 1677 f && 1678 ((n.wrapperEl.style.scrollSnapType = "none"), 1679 (n._immediateVirtual = !0)), 1680 f && !n._cssModeVirtualInitialSet && n.params.initialSlide > 0 1681 ? ((n._cssModeVirtualInitialSet = !0), 1682 requestAnimationFrame(() => { 1683 h[y ? "scrollLeft" : "scrollTop"] = E; 1684 })) 1685 : (h[y ? "scrollLeft" : "scrollTop"] = E), 1686 f && 1687 requestAnimationFrame(() => { 1688 (n.wrapperEl.style.scrollSnapType = ""), 1689 (n._immediateVirtual = !1); 1690 }); 1691 else { 1692 if (!n.support.smoothScroll) 1693 return ( 1694 tt({ swiper: n, targetPosition: E, side: y ? "left" : "top" }), !0 1695 ); 1696 h.scrollTo({ [y ? "left" : "top"]: E, behavior: "smooth" }); 1697 } 1698 return !0; 1699 } 1700 return ( 1701 n.setTransition(e), 1702 n.setTranslate(S), 1703 n.updateActiveIndex(o), 1704 n.updateSlidesClasses(), 1705 n.emit("beforeTransitionStart", e, i), 1706 n.transitionStart(t, c), 1707 e === 0 1708 ? n.transitionEnd(t, c) 1709 : n.animating || 1710 ((n.animating = !0), 1711 n.onSlideToWrapperTransitionEnd || 1712 (n.onSlideToWrapperTransitionEnd = function (E) { 1713 !n || 1714 n.destroyed || 1715 (E.target === this && 1716 (n.wrapperEl.removeEventListener( 1717 "transitionend", 1718 n.onSlideToWrapperTransitionEnd 1719 ), 1720 (n.onSlideToWrapperTransitionEnd = null), 1721 delete n.onSlideToWrapperTransitionEnd, 1722 n.transitionEnd(t, c))); 1723 }), 1724 n.wrapperEl.addEventListener( 1725 "transitionend", 1726 n.onSlideToWrapperTransitionEnd 1727 )), 1728 !0 1729 ); 1730 } 1731 function ks(s, e, t, i) { 1732 s === void 0 && (s = 0), 1733 t === void 0 && (t = !0), 1734 typeof s == "string" && (s = parseInt(s, 10)); 1735 const r = this; 1736 if (r.destroyed) return; 1737 typeof e > "u" && (e = r.params.speed); 1738 const n = r.grid && r.params.grid && r.params.grid.rows > 1; 1739 let o = s; 1740 if (r.params.loop) 1741 if (r.virtual && r.params.virtual.enabled) o = o + r.virtual.slidesBefore; 1742 else { 1743 let a; 1744 if (n) { 1745 const m = o * r.params.grid.rows; 1746 a = r.slides.filter( 1747 (h) => h.getAttribute("data-swiper-slide-index") * 1 === m 1748 )[0].column; 1749 } else a = r.getSlideIndexByData(o); 1750 const l = n 1751 ? Math.ceil(r.slides.length / r.params.grid.rows) 1752 : r.slides.length, 1753 { centeredSlides: u } = r.params; 1754 let d = r.params.slidesPerView; 1755 d === "auto" 1756 ? (d = r.slidesPerViewDynamic()) 1757 : ((d = Math.ceil(parseFloat(r.params.slidesPerView, 10))), 1758 u && d % 2 === 0 && (d = d + 1)); 1759 let p = l - a < d; 1760 if ( 1761 (u && (p = p || a < Math.ceil(d / 2)), 1762 i && u && r.params.slidesPerView !== "auto" && !n && (p = !1), 1763 p) 1764 ) { 1765 const m = u 1766 ? a < r.activeIndex 1767 ? "prev" 1768 : "next" 1769 : a - r.activeIndex - 1 < r.params.slidesPerView 1770 ? "next" 1771 : "prev"; 1772 r.loopFix({ 1773 direction: m, 1774 slideTo: !0, 1775 activeSlideIndex: m === "next" ? a + 1 : a - l + 1, 1776 slideRealIndex: m === "next" ? r.realIndex : void 0, 1777 }); 1778 } 1779 if (n) { 1780 const m = o * r.params.grid.rows; 1781 o = r.slides.filter( 1782 (h) => h.getAttribute("data-swiper-slide-index") * 1 === m 1783 )[0].column; 1784 } else o = r.getSlideIndexByData(o); 1785 } 1786 return ( 1787 requestAnimationFrame(() => { 1788 r.slideTo(o, e, t, i); 1789 }), 1790 r 1791 ); 1792 } 1793 function Os(s, e, t) { 1794 e === void 0 && (e = !0); 1795 const i = this, 1796 { enabled: r, params: n, animating: o } = i; 1797 if (!r || i.destroyed) return i; 1798 typeof s > "u" && (s = i.params.speed); 1799 let a = n.slidesPerGroup; 1800 n.slidesPerView === "auto" && 1801 n.slidesPerGroup === 1 && 1802 n.slidesPerGroupAuto && 1803 (a = Math.max(i.slidesPerViewDynamic("current", !0), 1)); 1804 const l = i.activeIndex < n.slidesPerGroupSkip ? 1 : a, 1805 u = i.virtual && n.virtual.enabled; 1806 if (n.loop) { 1807 if (o && !u && n.loopPreventsSliding) return !1; 1808 if (
1809 (i.loopFix({ direction: "next" }), 1810 (i._clientLeft = i.wrapperEl.clientLeft), 1811 i.activeIndex === i.slides.length - 1 && n.cssMode) 1812 ) 1813 return ( 1814 requestAnimationFrame(() => { 1815 i.slideTo(i.activeIndex + l, s, e, t); 1816 }), 1817 !0 1818 ); 1819 } 1820 return n.rewind && i.isEnd 1821 ? i.slideTo(0, s, e, t) 1822 : i.slideTo(i.activeIndex + l, s, e, t); 1823 } 1824 function $s(s, e, t) { 1825 e === void 0 && (e = !0); 1826 const i = this, 1827 { 1828 params: r, 1829 snapGrid: n, 1830 slidesGrid: o, 1831 rtlTranslate: a, 1832 enabled: l, 1833 animating: u, 1834 } = i; 1835 if (!l || i.destroyed) return i; 1836 typeof s > "u" && (s = i.params.speed); 1837 const d = i.virtual && r.virtual.enabled; 1838 if (r.loop) { 1839 if (u && !d && r.loopPreventsSliding) return !1; 1840 i.loopFix({ direction: "prev" }), 1841 (i._clientLeft = i.wrapperEl.clientLeft); 1842 } 1843 const p = a ? i.translate : -i.translate; 1844 function m(S) { 1845 return S < 0 ? -Math.floor(Math.abs(S)) : Math.floor(S); 1846 } 1847 const h = m(p), 1848 g = n.map((S) => m(S)); 1849 let w = n[g.indexOf(h) - 1]; 1850 if (typeof w > "u" && r.cssMode) { 1851 let S; 1852 n.forEach((c, f) => { 1853 h >= c && (S = f); 1854 }), 1855 typeof S < "u" && (w = n[S > 0 ? S - 1 : S]); 1856 } 1857 let b = 0; 1858 if ( 1859 (typeof w < "u" && 1860 ((b = o.indexOf(w)), 1861 b < 0 && (b = i.activeIndex - 1), 1862 r.slidesPerView === "auto" && 1863 r.slidesPerGroup === 1 && 1864 r.slidesPerGroupAuto && 1865 ((b = b - i.slidesPerViewDynamic("previous", !0) + 1), 1866 (b = Math.max(b, 0)))), 1867 r.rewind && i.isBeginning) 1868 ) { 1869 const S = 1870 i.params.virtual && i.params.virtual.enabled && i.virtual 1871 ? i.virtual.slides.length - 1 1872 : i.slides.length - 1; 1873 return i.slideTo(S, s, e, t); 1874 } else if (r.loop && i.activeIndex === 0 && r.cssMode) 1875 return ( 1876 requestAnimationFrame(() => { 1877 i.slideTo(b, s, e, t); 1878 }), 1879 !0 1880 ); 1881 return i.slideTo(b, s, e, t); 1882 } 1883 function zs(s, e, t) { 1884 e === void 0 && (e = !0); 1885 const i = this; 1886 if (!i.destroyed) 1887 return ( 1888 typeof s > "u" && (s = i.params.speed), 1889 i.slideTo(i.activeIndex, s, e, t) 1890 ); 1891 } 1892 function Ds(s, e, t, i) { 1893 e === void 0 && (e = !0), i === void 0 && (i = 0.5); 1894 const r = this; 1895 if (r.destroyed) return; 1896 typeof s > "u" && (s = r.params.speed); 1897 let n = r.activeIndex; 1898 const o = Math.min(r.params.slidesPerGroupSkip, n), 1899 a = o + Math.floor((n - o) / r.params.slidesPerGroup), 1900 l = r.rtlTranslate ? r.translate : -r.translate; 1901 if (l >= r.snapGrid[a]) { 1902 const u = r.snapGrid[a], 1903 d = r.snapGrid[a + 1]; 1904 l - u > (d - u) * i && (n += r.params.slidesPerGroup); 1905 } else { 1906 const u = r.snapGrid[a - 1], 1907 d = r.snapGrid[a]; 1908 l - u <= (d - u) * i && (n -= r.params.slidesPerGroup); 1909 } 1910 return ( 1911 (n = Math.max(n, 0)), 1912 (n = Math.min(n, r.slidesGrid.length - 1)), 1913 r.slideTo(n, s, e, t) 1914 ); 1915 } 1916 function qs() { 1917 const s = this; 1918 if (s.destroyed) return; 1919 const { params: e, slidesEl: t } = s, 1920 i = 1921 e.slidesPerView === "auto" ? s.slidesPerViewDynamic() : e.slidesPerView; 1922 let r = s.clickedIndex, 1923 n; 1924 const o = s.isElement ? "swiper-slide" : `.${e.slideClass}`; 1925 if (e.loop) { 1926 if (s.animating) return; 1927 (n = parseInt( 1928 s.clickedSlide.getAttribute("data-swiper-slide-index"), 1929 10 1930 )), 1931 e.centeredSlides 1932 ? r < s.loopedSlides - i / 2 || 1933 r > s.slides.length - s.loopedSlides + i / 2 1934 ? (s.loopFix(), 1935 (r = s.getSlideIndex( 1936 Q(t, `${o}[data-swiper-slide-index="${n}"]`)[0] 1937 )), 1938 Ae(() => { 1939 s.slideTo(r); 1940 })) 1941 : s.slideTo(r) 1942 : r > s.slides.length - i 1943 ? (s.loopFix(), 1944 (r = s.getSlideIndex( 1945 Q(t, `${o}[data-swiper-slide-index="${n}"]`)[0] 1946 )), 1947 Ae(() => { 1948 s.slideTo(r); 1949 })) 1950 : s.slideTo(r); 1951 } else s.slideTo(r); 1952 } 1953 var Hs = { 1954 slideTo: Is, 1955 slideToLoop: ks, 1956 slideNext: Os, 1957 slidePrev: $s, 1958 slideReset: zs, 1959 slideToClosest: Ds, 1960 slideToClickedSlide: qs, 1961 }; 1962 function Bs(s) { 1963 const e = this, 1964 { params: t, slidesEl: i } = e; 1965 if (!t.loop || (e.virtual && e.params.virtual.enabled)) return; 1966 const r = () => { 1967 Q(i, `.${t.slideClass}, swiper-slide`).forEach((p, m) => { 1968 p.setAttribute("data-swiper-slide-index", m); 1969 }); 1970 }, 1971 n = e.grid && t.grid && t.grid.rows > 1, 1972 o = t.slidesPerGroup * (n ? t.grid.rows : 1), 1973 a = e.slides.length % o !== 0, 1974 l = n && e.slides.length % t.grid.rows !== 0, 1975 u = (d) => { 1976 for (let p = 0; p < d; p += 1) { 1977 const m = e.isElement 1978 ? we("swiper-slide", [t.slideBlankClass]) 1979 : we("div", [t.slideClass, t.slideBlankClass]); 1980 e.slidesEl.append(m); 1981 } 1982 }; 1983 if (a) { 1984 if (t.loopAddBlankSlides) { 1985 const d = o - (e.slides.length % o); 1986 u(d), e.recalcSlides(), e.updateSlides(); 1987 } else 1988 ye( 1989 "Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may
1989not function properly. You need to add more slides (or make duplicates, or empty slides)" 1990 ); 1991 r(); 1992 } else if (l) { 1993 if (t.loopAddBlankSlides) { 1994 const d = t.grid.rows - (e.slides.length % t.grid.rows); 1995 u(d), e.recalcSlides(), e.updateSlides(); 1996 } else 1997 ye( 1998 "Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)" 1999 ); 2000 r(); 2001 } else r(); 2002 e.loopFix({ 2003 slideRealIndex: s, 2004 direction: t.centeredSlides ? void 0 : "next", 2005 }); 2006 } 2007 function _s(s) { 2008 let { 2009 slideRealIndex: e, 2010 slideTo: t = !0, 2011 direction: i, 2012 setTranslate: r, 2013 activeSlideIndex: n, 2014 byController: o, 2015 byMousewheel: a, 2016 } = s === void 0 ? {} : s; 2017 const l = this; 2018 if (!l.params.loop) return; 2019 l.emit("beforeLoopFix"); 2020 const { 2021 slides: u, 2022 allowSlidePrev: d, 2023 allowSlideNext: p, 2024 slidesEl: m, 2025 params: h, 2026 } = l, 2027 { centeredSlides: g } = h; 2028 if ( 2029 ((l.allowSlidePrev = !0), 2030 (l.allowSlideNext = !0), 2031 l.virtual && h.virtual.enabled) 2032 ) { 2033 t && 2034 (!h.centeredSlides && l.snapIndex === 0 2035 ? l.slideTo(l.virtual.slides.length, 0, !1, !0) 2036 : h.centeredSlides && l.snapIndex < h.slidesPerView 2037 ? l.slideTo(l.virtual.slides.length + l.snapIndex, 0, !1, !0) 2038 : l.snapIndex === l.snapGrid.length - 1 && 2039 l.slideTo(l.virtual.slidesBefore, 0, !1, !0)), 2040 (l.allowSlidePrev = d), 2041 (l.allowSlideNext = p), 2042 l.emit("loopFix"); 2043 return; 2044 } 2045 let w = h.slidesPerView; 2046 w === "auto" 2047 ? (w = l.slidesPerViewDynamic()) 2048 : ((w = Math.ceil(parseFloat(h.slidesPerView, 10))), 2049 g && w % 2 === 0 && (w = w + 1)); 2050 const b = h.slidesPerGroupAuto ? w : h.slidesPerGroup; 2051 let S = b; 2052 S % b !== 0 && (S += b - (S % b)), 2053 (S += h.loopAdditionalSlides), 2054 (l.loopedSlides = S); 2055 const c = l.grid && h.grid && h.grid.rows > 1; 2056 u.length < w + S 2057 ? ye( 2058 "Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters" 2059 ) 2060 : c && 2061 h.grid.fill === "row" && 2062 ye( 2063 "Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`" 2064 ); 2065 const f = [], 2066 v = []; 2067 let y = l.activeIndex; 2068 typeof n > "u" 2069 ? (n = l.getSlideIndex( 2070 u.filter((C) => C.classList.contains(h.slideActiveClass))[0] 2071 )) 2072 : (y = n); 2073 const E = i === "next" || !i, 2074 H = i === "prev" || !i; 2075 let I = 0, 2076 D = 0; 2077 const T = c ? Math.ceil(u.length / h.grid.rows) : u.length, 2078 k = (c ? u[n].column : n) + (g && typeof r > "u" ? -w / 2 + 0.5 : 0); 2079 if (k < S) { 2080 I = Math.max(S - k, b); 2081 for (let C = 0; C < S - k; C += 1) { 2082 const $ = C - Math.floor(C / T) * T; 2083 if (c) { 2084 const B = T - $ - 1; 2085 for (let R = u.length - 1; R >= 0; R -= 1) 2086 u[R].column === B && f.push(R); 2087 } else f.push(T - $ - 1); 2088 } 2089 } else if (k + w > T - S) { 2090 D = Math.max(k - (T - S * 2), b); 2091 for (let C = 0; C < D; C += 1) { 2092 const $ = C - Math.floor(C / T) * T; 2093 c 2094 ? u.forEach((B, R) => { 2095 B.column === $ && v.push(R); 2096 }) 2097 : v.push($); 2098 } 2099 } 2100 if ( 2101 ((l.__preventObserver__ = !0), 2102 requestAnimationFrame(() => { 2103 l.__preventObserver__ = !1; 2104 }), 2105 H && 2106 f.forEach((C) => { 2107 (u[C].swiperLoopMoveDOM = !0), 2108 m.prepend(u[C]), 2109 (u[C].swiperLoopMoveDOM = !1); 2110 }), 2111 E && 2112 v.forEach((C) => { 2113 (u[C].swiperLoopMoveDOM = !0), 2114 m.append(u[C]), 2115 (u[C].swiperLoopMoveDOM = !1); 2116 }), 2117 l.recalcSlides(), 2118 h.slidesPerView === "auto" 2119 ? l.updateSlides() 2120 : c && 2121 ((f.length > 0 && H) || (v.length > 0 && E)) &&
2122 l.slides.forEach((C, $) => { 2123 l.grid.updateSlide($, C, l.slides); 2124 }), 2125 h.watchSlidesProgress && l.updateSlidesOffset(), 2126 t) 2127 ) { 2128 if (f.length > 0 && H) { 2129 if (typeof e > "u") { 2130 const C = l.slidesGrid[y], 2131 B = l.slidesGrid[y + I] - C; 2132 a 2133 ? l.setTranslate(l.translate - B) 2134 : (l.slideTo(y + Math.ceil(I), 0, !1, !0), 2135 r && 2136 ((l.touchEventsData.startTranslate = 2137 l.touchEventsData.startTranslate - B), 2138 (l.touchEventsData.currentTranslate = 2139 l.touchEventsData.currentTranslate - B))); 2140 } else if (r) { 2141 const C = c ? f.length / h.grid.rows : f.length; 2142 l.slideTo(l.activeIndex + C, 0, !1, !0), 2143 (l.touchEventsData.currentTranslate = l.translate); 2144 } 2145 } else if (v.length > 0 && E) 2146 if (typeof e > "u") { 2147 const C = l.slidesGrid[y], 2148 B = l.slidesGrid[y - D] - C; 2149 a 2150 ? l.setTranslate(l.translate - B) 2151 : (l.slideTo(y - D, 0, !1, !0), 2152 r && 2153 ((l.touchEventsData.startTranslate = 2154 l.touchEventsData.startTranslate - B), 2155 (l.touchEventsData.currentTranslate = 2156 l.touchEventsData.currentTranslate - B))); 2157 } else { 2158 const C = c ? v.length / h.grid.rows : v.length; 2159 l.slideTo(l.activeIndex - C, 0, !1, !0); 2160 } 2161 } 2162 if ( 2163 ((l.allowSlidePrev = d), 2164 (l.allowSlideNext = p), 2165 l.controller && l.controller.control && !o) 2166 ) { 2167 const C = { 2168 slideRealIndex: e, 2169 direction: i, 2170 setTranslate: r, 2171 activeSlideIndex: n, 2172 byController: !0, 2173 }; 2174 Array.isArray(l.controller.control) 2175 ? l.controller.control.forEach(($) => { 2176 !$.destroyed && 2177 $.params.loop && 2178 $.loopFix({ 2179 ...C, 2180 slideTo: $.params.slidesPerView === h.slidesPerView ? t : !1, 2181 }); 2182 }) 2183 : l.controller.control instanceof l.constructor && 2184 l.controller.control.params.loop && 2185 l.controller.control.loopFix({ 2186 ...C, 2187 slideTo: 2188 l.controller.control.params.slidesPerView === h.slidesPerView 2189 ? t 2190 : !1, 2191 }); 2192 } 2193 l.emit("loopFix"); 2194 } 2195 function Vs() { 2196 const s = this, 2197 { params: e, slidesEl: t } = s; 2198 if (!e.loop || (s.virtual && s.params.virtual.enabled)) return; 2199 s.recalcSlides(); 2200 const i = []; 2201 s.slides.forEach((r) => { 2202 const n = 2203 typeof r.swiperSlideIndex > "u" 2204 ? r.getAttribute("data-swiper-slide-index") * 1 2205 : r.swiperSlideIndex; 2206 i[n] = r; 2207 }), 2208 s.slides.forEach((r) => { 2209 r.removeAttribute("data-swiper-slide-index"); 2210 }), 2211 i.forEach((r) => { 2212 t.append(r); 2213 }), 2214 s.recalcSlides(), 2215 s.slideTo(s.realIndex, 0); 2216 } 2217 var Ns = { loopCreate: Bs, loopFix: _s, loopDestroy: Vs }; 2218 function Gs(s) { 2219 const e = this; 2220 if ( 2221 !e.params.simulateTouch || 2222 (e.params.watchOverflow && e.isLocked) || 2223 e.params.cssMode 2224 ) 2225 return; 2226 const t = e.params.touchEventsTarget === "container" ? e.el : e.wrapperEl; 2227 e.isElement && (e.__preventObserver__ = !0), 2228 (t.style.cursor = "move"), 2229 (t.style.cursor = s ? "grabbing" : "grab"), 2230 e.isElement && 2231 requestAnimationFrame(() => { 2232 e.__preventObserver__ = !1; 2233 }); 2234 } 2235 function Fs() { 2236 const s = this; 2237 (s.params.watchOverflow && s.isLocked) || 2238 s.params.cssMode || 2239 (s.isElement && (s.__preventObserver__ = !0), 2240 (s[ 2241 s.params.touchEventsTarget === "container" ? "el" : "wrapperEl" 2242 ].style.cursor = ""), 2243 s.isElement && 2244 requestAnimationFrame(() => { 2245 s.__preventObserver__ = !1; 2246 })); 2247 } 2248 var Rs = { setGrabCursor: Gs, unsetGrabCursor: Fs }; 2249 function js(s, e) { 2250 e === void 0 && (e = this); 2251 function t(i) { 2252 if (!i || i === ee() || i === X()) return null; 2253 i.assignedSlot && (i = i.assignedSlot); 2254 const r = i.closest(s); 2255 return !r && !i.getRootNode ? null : r || t(i.getRootNode().host); 2256 } 2257 return t(e); 2258 } 2259 function lt(s, e, t) { 2260 const i = X(), 2261 { params: r } = s, 2262 n = r.edgeSwipeDetection, 2263 o = r.edgeSwipeThreshold; 2264 return n && (t <= o || t >= i.innerWidth - o) 2265 ? n === "prevent" 2266 ? (e.preventDefault(), !0) 2267 : !1 2268 : !0; 2269 } 2270 function Ws(s) { 2271 const e = this,
2272 t = ee(); 2273 let i = s; 2274 i.originalEvent && (i = i.originalEvent); 2275 const r = e.touchEventsData; 2276 if (i.type === "pointerdown") { 2277 if (r.pointerId !== null && r.pointerId !== i.pointerId) return; 2278 r.pointerId = i.pointerId; 2279 } else 2280 i.type === "touchstart" && 2281 i.targetTouches.length === 1 && 2282 (r.touchId = i.targetTouches[0].identifier); 2283 if (i.type === "touchstart") { 2284 lt(e, i, i.targetTouches[0].pageX); 2285 return; 2286 } 2287 const { params: n, touches: o, enabled: a } = e; 2288 if ( 2289 !a || 2290 (!n.simulateTouch && i.pointerType === "mouse") || 2291 (e.animating && n.preventInteractionOnTransition) 2292 ) 2293 return; 2294 !e.animating && n.cssMode && n.loop && e.loopFix(); 2295 let l = i.target; 2296 if ( 2297 (n.touchEventsTarget === "wrapper" && !Jt(l, e.wrapperEl)) || 2298 ("which" in i && i.which === 3) || 2299 ("button" in i && i.button > 0) || 2300 (r.isTouched && r.isMoved) 2301 ) 2302 return; 2303 const u = !!n.noSwipingClass && n.noSwipingClass !== "", 2304 d = i.composedPath ? i.composedPath() : i.path; 2305 u && i.target && i.target.shadowRoot && d && (l = d[0]); 2306 const p = n.noSwipingSelector 2307 ? n.noSwipingSelector 2308 : `.${n.noSwipingClass}`, 2309 m = !!(i.target && i.target.shadowRoot); 2310 if (n.noSwiping && (m ? js(p, l) : l.closest(p))) { 2311 e.allowClick = !0; 2312 return; 2313 } 2314 if (n.swipeHandler && !l.closest(n.swipeHandler)) return; 2315 (o.currentX = i.pageX), (o.currentY = i.pageY); 2316 const h = o.currentX, 2317 g = o.currentY; 2318 if (!lt(e, i, h)) return; 2319 Object.assign(r, { 2320 isTouched: !0, 2321 isMoved: !1, 2322 allowTouchCallbacks: !0, 2323 isScrolling: void 0, 2324 startMoving: void 0, 2325 }), 2326 (o.startX = h), 2327 (o.startY = g), 2328 (r.touchStartTime = ge()), 2329 (e.allowClick = !0), 2330 e.updateSize(), 2331 (e.swipeDirection = void 0), 2332 n.threshold > 0 && (r.allowThresholdMove = !1); 2333 let w = !0; 2334 l.matches(r.focusableElements) && 2335 ((w = !1), l.nodeName === "SELECT" && (r.isTouched = !1)), 2336 t.activeElement && 2337 t.activeElement.matches(r.focusableElements) && 2338 t.activeElement !== l && 2339 (i.pointerType === "mouse" || 2340 (i.pointerType !== "mouse" && !l.matches(r.focusableElements))) && 2341 t.activeElement.blur(); 2342 const b = w && e.allowTouchMove && n.touchStartPreventDefault; 2343 (n.touchStartForcePreventDefault || b) && 2344 !l.isContentEditable && 2345 i.preventDefault(), 2346 n.freeMode && 2347 n.freeMode.enabled && 2348 e.freeMode && 2349 e.animating && 2350 !n.cssMode && 2351 e.freeMode.onTouchStart(), 2352 e.emit("touchStart", i); 2353 } 2354 function Us(s) { 2355 const e = ee(), 2356 t = this, 2357 i = t.touchEventsData, 2358 { params: r, touches: n, rtlTranslate: o, enabled: a } = t; 2359 if (!a || (!r.simulateTouch && s.pointerType === "mouse")) return; 2360 let l = s; 2361 if ( 2362 (l.originalEvent && (l = l.originalEvent), 2363 l.type === "pointermove" && 2364 (i.touchId !== null || l.pointerId !== i.pointerId)) 2365 ) 2366 return; 2367 let u; 2368 if (l.type === "touchmove") { 2369 if ( 2370 ((u = [...l.changedTouches].filter( 2371 (E) => E.identifier === i.touchId 2372 )[0]), 2373 !u || u.identifier !== i.touchId) 2374 ) 2375 return; 2376 } else u = l; 2377 if (!i.isTouched) { 2378 i.startMoving && i.isScrolling && t.emit("touchMoveOpposite", l); 2379 return; 2380 } 2381 const d = u.pageX, 2382 p = u.pageY; 2383 if (l.preventedByNestedSwiper) { 2384 (n.startX = d), (n.startY = p); 2385 return; 2386 } 2387 if (!t.allowTouchMove) { 2388 l.target.matches(i.focusableElements) || (t.allowClick = !1), 2389 i.isTouched && 2390 (Object.assign(n, { startX: d, startY: p, currentX: d, currentY: p }), 2391 (i.touchStartTime = ge())); 2392 return; 2393 } 2394 if (r.touchReleaseOnEdges && !r.loop) { 2395 if (t.isVertical()) { 2396 if ( 2397 (p < n.startY && t.translate <= t.maxTranslate()) || 2398 (p > n.startY && t.translate >= t.minTranslate()) 2399 ) { 2400 (i.isTouched = !1), (i.isMoved = !1); 2401 return; 2402 } 2403 } else if ( 2404 (d < n.startX && t.translate <= t.maxTranslate()) || 2405 (d > n.startX && t.translate >= t.minTranslate()) 2406 ) 2407 return; 2408 } 2409 if ( 2410 (e.activeElement && 2411 e.activeElement.matches(i.focusableElements) && 2412 e.activeElement !== l.target && 2413 l.pointerType !== "mouse" && 2414 e.activeElement.blur(), 2415 e.activeElement && 2416 l.target === e.activeElement && 2417 l.target.matches(i.focusableElements)) 2418 ) { 2419 (i.isMoved = !0), (t.allowClick = !1); 2420 return; 2421 } 2422 i.allowTouchCallbacks && t.emit("touchMove", l),
2423 (n.previousX = n.currentX), 2424 (n.previousY = n.currentY), 2425 (n.currentX = d), 2426 (n.currentY = p); 2427 const m = n.currentX - n.startX, 2428 h = n.currentY - n.startY; 2429 if (t.params.threshold && Math.sqrt(m ** 2 + h ** 2) < t.params.threshold) 2430 return; 2431 if (typeof i.isScrolling > "u") { 2432 let E; 2433 (t.isHorizontal() && n.currentY === n.startY) || 2434 (t.isVertical() && n.currentX === n.startX) 2435 ? (i.isScrolling = !1) 2436 : m * m + h * h >= 25 && 2437 ((E = (Math.atan2(Math.abs(h), Math.abs(m)) * 180) / Math.PI), 2438 (i.isScrolling = t.isHorizontal() 2439 ? E > r.touchAngle 2440 : 90 - E > r.touchAngle)); 2441 } 2442 if ( 2443 (i.isScrolling && t.emit("touchMoveOpposite", l), 2444 typeof i.startMoving > "u" && 2445 (n.currentX !== n.startX || n.currentY !== n.startY) && 2446 (i.startMoving = !0), 2447 i.isScrolling || 2448 (l.type === "touchmove" && i.preventTouchMoveFromPointerMove)) 2449 ) { 2450 i.isTouched = !1; 2451 return; 2452 } 2453 if (!i.startMoving) return; 2454 (t.allowClick = !1), 2455 !r.cssMode && l.cancelable && l.preventDefault(), 2456 r.touchMoveStopPropagation && !r.nested && l.stopPropagation(); 2457 let g = t.isHorizontal() ? m : h, 2458 w = t.isHorizontal() 2459 ? n.currentX - n.previousX 2460 : n.currentY - n.previousY; 2461 r.oneWayMovement && 2462 ((g = Math.abs(g) * (o ? 1 : -1)), (w = Math.abs(w) * (o ? 1 : -1))), 2463 (n.diff = g), 2464 (g *= r.touchRatio), 2465 o && ((g = -g), (w = -w)); 2466 const b = t.touchesDirection; 2467 (t.swipeDirection = g > 0 ? "prev" : "next"), 2468 (t.touchesDirection = w > 0 ? "prev" : "next"); 2469 const S = t.params.loop && !r.cssMode, 2470 c = 2471 (t.touchesDirection === "next" && t.allowSlideNext) || 2472 (t.touchesDirection === "prev" && t.allowSlidePrev); 2473 if (!i.isMoved) { 2474 if ( 2475 (S && c && t.loopFix({ direction: t.swipeDirection }), 2476 (i.startTranslate = t.getTranslate()), 2477 t.setTransition(0), 2478 t.animating) 2479 ) { 2480 const E = new window.CustomEvent("transitionend", { 2481 bubbles: !0, 2482 cancelable: !0, 2483 detail: { bySwiperTouchMove: !0 }, 2484 }); 2485 t.wrapperEl.dispatchEvent(E); 2486 } 2487 (i.allowMomentumBounce = !1), 2488 r.grabCursor && 2489 (t.allowSlideNext === !0 || t.allowSlidePrev === !0) && 2490 t.setGrabCursor(!0), 2491 t.emit("sliderFirstMove", l); 2492 } 2493 let f; 2494 if ( 2495 (new Date().getTime(), 2496 i.isMoved && 2497 i.allowThresholdMove && 2498 b !== t.touchesDirection && 2499 S && 2500 c && 2501 Math.abs(g) >= 1) 2502 ) { 2503 Object.assign(n, { 2504 startX: d, 2505 startY: p, 2506 currentX: d, 2507 currentY: p, 2508 startTranslate: i.currentTranslate, 2509 }), 2510 (i.loopSwapReset = !0), 2511 (i.startTranslate = i.currentTranslate); 2512 return; 2513 } 2514 t.emit("sliderMove", l), 2515 (i.isMoved = !0), 2516 (i.currentTranslate = g + i.startTranslate); 2517 let v = !0, 2518 y = r.resistanceRatio; 2519 if ( 2520 (r.touchReleaseOnEdges && (y = 0), 2521 g > 0 2522 ? (S && 2523 c && 2524 !f && 2525 i.allowThresholdMove && 2526 i.currentTranslate > 2527 (r.centeredSlides 2528 ? t.minTranslate() - 2529 t.slidesSizesGrid[t.activeIndex + 1] - 2530 (r.slidesPerView !== "auto" && 2531 t.slides.length - r.slidesPerView >= 2 2532 ? t.slidesSizesGrid[t.activeIndex + 1] + 2533 t.params.spaceBetween 2534 : 0) - 2535 t.params.spaceBetween 2536 : t.minTranslate()) && 2537 t.loopFix({ 2538 direction: "prev", 2539 setTranslate: !0, 2540 activeSlideIndex: 0, 2541 }), 2542 i.currentTranslate > t.minTranslate() && 2543 ((v = !1), 2544 r.resistance && 2545 (i.currentTranslate = 2546 t.minTranslate() - 2547 1 + 2548 (-t.minTranslate() + i.startTranslate + g) ** y))) 2549 : g < 0 && 2550 (S && 2551 c && 2552 !f && 2553 i.allowThresholdMove && 2554 i.currentTranslate < 2555 (r.centeredSlides 2556 ? t.maxTranslate() + 2557 t.slidesSizesGrid[t.slidesSizesGrid.length - 1] + 2558 t.params.spaceBetween + 2559 (r.slidesPerView !== "auto" && 2560 t.slides.length - r.slidesPerView >= 2 2561 ? t.slidesSizesGrid[t.slidesSizesGrid.length - 1] + 2562 t.params.spaceBetween 2563 : 0) 2564 : t.maxTranslate()) && 2565 t.loopFix({
2566 direction: "next", 2567 setTranslate: !0, 2568 activeSlideIndex: 2569 t.slides.length - 2570 (r.slidesPerView === "auto" 2571 ? t.slidesPerViewDynamic() 2572 : Math.ceil(parseFloat(r.slidesPerView, 10))), 2573 }), 2574 i.currentTranslate < t.maxTranslate() && 2575 ((v = !1), 2576 r.resistance && 2577 (i.currentTranslate = 2578 t.maxTranslate() + 2579 1 - 2580 (t.maxTranslate() - i.startTranslate - g) ** y))), 2581 v && (l.preventedByNestedSwiper = !0), 2582 !t.allowSlideNext && 2583 t.swipeDirection === "next" && 2584 i.currentTranslate < i.startTranslate && 2585 (i.currentTranslate = i.startTranslate), 2586 !t.allowSlidePrev && 2587 t.swipeDirection === "prev" && 2588 i.currentTranslate > i.startTranslate && 2589 (i.currentTranslate = i.startTranslate), 2590 !t.allowSlidePrev && 2591 !t.allowSlideNext && 2592 (i.currentTranslate = i.startTranslate), 2593 r.threshold > 0) 2594 ) 2595 if (Math.abs(g) > r.threshold || i.allowThresholdMove) { 2596 if (!i.allowThresholdMove) { 2597 (i.allowThresholdMove = !0), 2598 (n.startX = n.currentX), 2599 (n.startY = n.currentY), 2600 (i.currentTranslate = i.startTranslate), 2601 (n.diff = t.isHorizontal() 2602 ? n.currentX - n.startX 2603 : n.currentY - n.startY); 2604 return; 2605 } 2606 } else { 2607 i.currentTranslate = i.startTranslate; 2608 return; 2609 } 2610 !r.followFinger || 2611 r.cssMode || 2612 (((r.freeMode && r.freeMode.enabled && t.freeMode) || 2613 r.watchSlidesProgress) && 2614 (t.updateActiveIndex(), t.updateSlidesClasses()), 2615 r.freeMode && 2616 r.freeMode.enabled && 2617 t.freeMode && 2618 t.freeMode.onTouchMove(), 2619 t.updateProgress(i.currentTranslate), 2620 t.setTranslate(i.currentTranslate)); 2621 } 2622 function Ys(s) { 2623 const e = this, 2624 t = e.touchEventsData; 2625 let i = s; 2626 i.originalEvent && (i = i.originalEvent); 2627 let r; 2628 if (i.type === "touchend" || i.type === "touchcancel") { 2629 if ( 2630 ((r = [...i.changedTouches].filter( 2631 (y) => y.identifier === t.touchId 2632 )[0]), 2633 !r || r.identifier !== t.touchId) 2634 ) 2635 return; 2636 } else { 2637 if (t.touchId !== null || i.pointerId !== t.pointerId) return; 2638 r = i; 2639 } 2640 if ( 2641 ["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes( 2642 i.type 2643 ) && 2644 !( 2645 ["pointercancel", "contextmenu"].includes(i.type) && 2646 (e.browser.isSafari || e.browser.isWebView) 2647 ) 2648 ) 2649 return; 2650 (t.pointerId = null), (t.touchId = null); 2651 const { 2652 params: o, 2653 touches: a, 2654 rtlTranslate: l, 2655 slidesGrid: u, 2656 enabled: d, 2657 } = e; 2658 if (!d || (!o.simulateTouch && i.pointerType === "mouse")) return; 2659 if ( 2660 (t.allowTouchCallbacks && e.emit("touchEnd", i), 2661 (t.allowTouchCallbacks = !1), 2662 !t.isTouched) 2663 ) { 2664 t.isMoved && o.grabCursor && e.setGrabCursor(!1), 2665 (t.isMoved = !1), 2666 (t.startMoving = !1); 2667 return; 2668 } 2669 o.grabCursor && 2670 t.isMoved && 2671 t.isTouched && 2672 (e.allowSlideNext === !0 || e.allowSlidePrev === !0) && 2673 e.setGrabCursor(!1); 2674 const p = ge(), 2675 m = p - t.touchStartTime; 2676 if (e.allowClick) { 2677 const y = i.path || (i.composedPath && i.composedPath()); 2678 e.updateClickedSlide((y && y[0]) || i.target, y), 2679 e.emit("tap click", i), 2680 m < 300 && 2681 p - t.lastClickTime < 300 && 2682 e.emit("doubleTap doubleClick", i); 2683 } 2684 if ( 2685 ((t.lastClickTime = ge()), 2686 Ae(() => { 2687 e.destroyed || (e.allowClick = !0); 2688 }), 2689 !t.isTouched || 2690 !t.isMoved || 2691 !e.swipeDirection || 2692 (a.diff === 0 && !t.loopSwapReset) || 2693 (t.currentTranslate === t.startTranslate && !t.loopSwapReset)) 2694 ) { 2695 (t.isTouched = !1), (t.isMoved = !1), (t.startMoving = !1); 2696 return; 2697 } 2698 (t.isTouched = !1), (t.isMoved = !1), (t.startMoving = !1); 2699 let h; 2700 if ( 2701 (o.followFinger 2702 ? (h = l ? e.translate : -e.translate) 2703 : (h = -t.currentTranslate), 2704 o.cssMode) 2705 ) 2706 return; 2707 if (o.freeMode && o.freeMode.enabled) { 2708 e.freeMode.onTouchEnd({ currentPos: h }); 2709 return; 2710 } 2711 const g = h >= -e.maxTranslate() && !e.params.loop; 2712 let w = 0, 2713 b = e.slidesSizesGrid[0]; 2714 for ( 2715 let y = 0; 2716 y < u.length; 2717 y += y < o.slidesPerGroupSkip ? 1 : o.slidesPerGroup 2718 ) { 2719 const E = y < o.slidesPerGroupSkip - 1 ? 1 : o.slidesPerGroup; 2720 typeof u[y + E] < "u" 2721 ? (g || (h >= u[y] && h < u[y + E])) && ((w = y), (b = u[y + E] - u[y])) 2722 : (g || h >= u[y]) && 2723 ((w = y), (b = u[u.length - 1] - u[u.length - 2])); 2724 } 2725 let S = null, 2726 c = null; 2727 o.rewind && 2728 (e.isBeginning 2729 ? (c = 2730 o.virtual && o.virtual.enabled && e.virtual 2731 ? e.virtual.slides.length - 1 2732 : e.slides.length - 1) 2733 : e.isEnd && (S = 0)); 2734 const f = (h - u[w]) / b, 2735 v = w < o.slidesPerGroupSkip - 1 ? 1 : o.slidesPerGroup; 2736 if (m > o.longSwipesMs) { 2737 if (!o.longSwipes) { 2738 e.slideTo(e.activeIndex); 2739 return; 2740 } 2741 e.swipeDirection === "next" && 2742 (f >= o.longSwipesRatio 2743 ? e.slideTo(o.rewind && e.isEnd ? S : w + v) 2744 : e.slideTo(w)), 2745 e.swipeDirection === "prev" && 2746 (f > 1 - o.longSwipesRatio 2747 ? e.slideTo(w + v) 2748 : c !== null && f < 0 && Math.abs(f) > o.longSwipesRatio 2749 ? e.slideTo(c) 2750 : e.slideTo(w)); 2751 } else { 2752 if (!o.shortSwipes) { 2753 e.slideTo(e.activeIndex); 2754 return; 2755 } 2756 e.navigation && 2757 (i.target === e.navigation.nextEl || i.target === e.navigation.prevEl) 2758 ? i.target === e.navigation.nextEl 2759 ? e.slideTo(w + v) 2760 : e.slideTo(w) 2761 : (e.swipeDirection === "next" && e.slideTo(S !== null ? S : w + v), 2762 e.swipeDirection === "prev" && e.slideTo(c !== null ? c : w)); 2763 } 2764 } 2765 function dt() { 2766 const s = this, 2767 { params: e, el: t } = s; 2768 if (t && t.offsetWidth === 0) return; 2769 e.breakpoints && s.setBreakpoint(); 2770 const { allowSlideNext: i, allowSlidePrev: r, snapGrid: n } = s, 2771 o = s.virtual && s.params.virtual.enabled; 2772 (s.allowSlideNext = !0), 2773 (s.allowSlidePrev = !0), 2774 s.updateSize(), 2775 s.updateSlides(), 2776 s.updateSlidesClasses(); 2777 const a = o && e.loop; 2778 (e.slidesPerView === "auto" || e.slidesPerView > 1) && 2779 s.isEnd && 2780 !s.isBeginning && 2781 !s.params.centeredSlides && 2782 !a 2783 ? s.slideTo(s.slides.length - 1, 0, !1, !0) 2784 : s.params.loop && !o 2785 ? s.slideToLoop(s.realIndex, 0, !1, !0) 2786 : s.slideTo(s.activeIndex, 0, !1, !0), 2787 s.autoplay && 2788 s.autoplay.running && 2789 s.autoplay.paused && 2790 (clearTimeout(s.autoplay.resizeTimeout), 2791 (s.autoplay.resizeTimeout = setTimeout(() => { 2792 s.autoplay && 2793 s.autoplay.running && 2794 s.autoplay.paused && 2795 s.autoplay.resume(); 2796 }, 500))), 2797 (s.allowSlidePrev = r), 2798 (s.allowSlideNext = i), 2799 s.params.watchOverflow && n !== s.snapGrid && s.checkOverflow(); 2800 } 2801 function Xs(s) { 2802 const e = this; 2803 e.enabled && 2804 (e.allowClick || 2805 (e.params.preventClicks && s.preventDefault(), 2806 e.params.preventClicksPropagation && 2807 e.animating && 2808 (s.stopPropagation(), s.stopImmediatePropagation()))); 2809 } 2810 function Ks() { 2811 const s = this, 2812 { wrapperEl: e, rtlTranslate: t, enabled: i } = s; 2813 if (!i) return; 2814 (s.previousTranslate = s.translate), 2815 s.isHorizontal() 2816 ? (s.translate = -e.scrollLeft) 2817 : (s.translate = -e.scrollTop), 2818 s.translate === 0 && (s.translate = 0), 2819 s.updateActiveIndex(), 2820 s.updateSlidesClasses(); 2821 let r; 2822 const n = s.maxTranslate() - s.minTranslate(); 2823 n === 0 ? (r = 0) : (r = (s.translate - s.minTranslate()) / n), 2824 r !== s.progress && s.updateProgress(t ? -s.translate : s.translate), 2825 s.emit("setTranslate", s.translate, !1); 2826 } 2827 function Qs(s) { 2828 const e = this; 2829 be(e, s.target), 2830 !( 2831 e.params.cssMode || 2832 (e.params.slidesPerView !== "auto" && !e.params.autoHeight)
2833 ) && e.update(); 2834 } 2835 function Js() { 2836 const s = this; 2837 s.documentTouchHandlerProceeded || 2838 ((s.documentTouchHandlerProceeded = !0), 2839 s.params.touchReleaseOnEdges && (s.el.style.touchAction = "auto")); 2840 } 2841 const ct = (s, e) => { 2842 const t = ee(), 2843 { params: i, el: r, wrapperEl: n, device: o } = s, 2844 a = !!i.nested, 2845 l = e === "on" ? "addEventListener" : "removeEventListener", 2846 u = e; 2847 !r || 2848 typeof r == "string" || 2849 (t[l]("touchstart", s.onDocumentTouchStart, { passive: !1, capture: a }), 2850 r[l]("touchstart", s.onTouchStart, { passive: !1 }), 2851 r[l]("pointerdown", s.onTouchStart, { passive: !1 }), 2852 t[l]("touchmove", s.onTouchMove, { passive: !1, capture: a }), 2853 t[l]("pointermove", s.onTouchMove, { passive: !1, capture: a }), 2854 t[l]("touchend", s.onTouchEnd, { passive: !0 }), 2855 t[l]("pointerup", s.onTouchEnd, { passive: !0 }), 2856 t[l]("pointercancel", s.onTouchEnd, { passive: !0 }), 2857 t[l]("touchcancel", s.onTouchEnd, { passive: !0 }), 2858 t[l]("pointerout", s.onTouchEnd, { passive: !0 }), 2859 t[l]("pointerleave", s.onTouchEnd, { passive: !0 }), 2860 t[l]("contextmenu", s.onTouchEnd, { passive: !0 }), 2861 (i.preventClicks || i.preventClicksPropagation) && 2862 r[l]("click", s.onClick, !0), 2863 i.cssMode && n[l]("scroll", s.onScroll), 2864 i.updateOnWindowResize 2865 ? s[u]( 2866 o.ios || o.android 2867 ? "resize orientationchange observerUpdate" 2868 : "resize observerUpdate", 2869 dt, 2870 !0 2871 ) 2872 : s[u]("observerUpdate", dt, !0), 2873 r[l]("load", s.onLoad, { capture: !0 })); 2874 }; 2875 function Zs() { 2876 const s = this, 2877 { params: e } = s; 2878 (s.onTouchStart = Ws.bind(s)), 2879 (s.onTouchMove = Us.bind(s)), 2880 (s.onTouchEnd = Ys.bind(s)), 2881 (s.onDocumentTouchStart = Js.bind(s)), 2882 e.cssMode && (s.onScroll = Ks.bind(s)), 2883 (s.onClick = Xs.bind(s)), 2884 (s.onLoad = Qs.bind(s)), 2885 ct(s, "on"); 2886 } 2887 function ei() { 2888 ct(this, "off"); 2889 } 2890 var ti = { attachEvents: Zs, detachEvents: ei }; 2891 const ut = (s, e) => s.grid && e.grid && e.grid.rows > 1; 2892 function si() { 2893 const s = this, 2894 { realIndex: e, initialized: t, params: i, el: r } = s, 2895 n = i.breakpoints; 2896 if (!n || (n && Object.keys(n).length === 0)) return; 2897 const o = s.getBreakpoint(n, s.params.breakpointsBase, s.el); 2898 if (!o || s.currentBreakpoint === o) return; 2899 const l = (o in n ? n[o] : void 0) || s.originalParams, 2900 u = ut(s, i), 2901 d = ut(s, l), 2902 p = s.params.grabCursor, 2903 m = l.grabCursor, 2904 h = i.enabled; 2905 u && !d 2906 ? (r.classList.remove( 2907 `${i.containerModifierClass}grid`, 2908 `${i.containerModifierClass}grid-column` 2909 ), 2910 s.emitContainerClasses()) 2911 : !u && 2912 d && 2913 (r.classList.add(`${i.containerModifierClass}grid`), 2914 ((l.grid.fill && l.grid.fill === "column") || 2915 (!l.grid.fill && i.grid.fill === "column")) && 2916 r.classList.add(`${i.containerModifierClass}grid-column`), 2917 s.emitContainerClasses()), 2918 p && !m ? s.unsetGrabCursor() : !p && m && s.setGrabCursor(), 2919 ["navigation", "pagination", "scrollbar"].forEach((f) => { 2920 if (typeof l[f] > "u") return; 2921 const v = i[f] && i[f].enabled, 2922 y = l[f] && l[f].enabled; 2923 v && !y && s[f].disable(), !v && y && s[f].enable(); 2924 }); 2925 const g = l.direction && l.direction !== i.direction, 2926 w = i.loop && (l.slidesPerView !== i.slidesPerView || g), 2927 b = i.loop; 2928 g && t && s.changeDirection(), K(s.params, l); 2929 const S = s.params.enabled, 2930 c = s.params.loop; 2931 Object.assign(s, { 2932 allowTouchMove: s.params.allowTouchMove, 2933 allowSlideNext: s.params.allowSlideNext, 2934 allowSlidePrev: s.params.allowSlidePrev, 2935 }), 2936 h && !S ? s.disable() : !h && S && s.enable(), 2937 (s.currentBreakpoint = o), 2938 s.emit("_beforeBreakpoint", l), 2939 t && 2940 (w 2941 ? (s.loopDestroy(), s.loopCreate(e), s.updateSlides()) 2942 : !b && c 2943 ? (s.loopCreate(e), s.updateSlides()) 2944 : b && !c && s.loopDestroy()), 2945 s.emit("breakpoint", l); 2946 } 2947 function ii(s, e, t) { 2948 if ((e === void 0 && (e = "window"), !s || (e === "container" && !t))) 2949 return; 2950 let i = !1; 2951 const r = X(),
vendor: 2,214 bytes, lines 2952-3022
2952 n = e === "window" ? r.innerHeight : t.clientHeight, 2953 o = Object.keys(s).map((a) => { 2954 if (typeof a == "string" && a.indexOf("@") === 0) { 2955 const l = parseFloat(a.substr(1)); 2956 return { value: n * l, point: a }; 2957 } 2958 return { value: a, point: a }; 2959 }); 2960 o.sort((a, l) => parseInt(a.value, 10) - parseInt(l.value, 10)); 2961 for (let a = 0; a < o.length; a += 1) { 2962 const { point: l, value: u } = o[a]; 2963 e === "window" 2964 ? r.matchMedia(`(min-width: ${u}px)`).matches && (i = l) 2965 : u <= t.clientWidth && (i = l); 2966 } 2967 return i || "max"; 2968 } 2969 var ni = { setBreakpoint: si, getBreakpoint: ii }; 2970 function ri(s, e) { 2971 const t = []; 2972 return ( 2973 s.forEach((i) => { 2974 typeof i == "object" 2975 ? Object.keys(i).forEach((r) => { 2976 i[r] && t.push(e + r); 2977 }) 2978 : typeof i == "string" && t.push(e + i); 2979 }), 2980 t 2981 ); 2982 } 2983 function ai() { 2984 const s = this, 2985 { classNames: e, params: t, rtl: i, el: r, device: n } = s, 2986 o = ri( 2987 [ 2988 "initialized", 2989 t.direction, 2990 { "free-mode": s.params.freeMode && t.freeMode.enabled }, 2991 { autoheight: t.autoHeight }, 2992 { rtl: i }, 2993 { grid: t.grid && t.grid.rows > 1 }, 2994 { 2995 "grid-column": 2996 t.grid && t.grid.rows > 1 && t.grid.fill === "column", 2997 }, 2998 { android: n.android }, 2999 { ios: n.ios }, 3000 { "css-mode": t.cssMode }, 3001 { centered: t.cssMode && t.centeredSlides }, 3002 { "watch-progress": t.watchSlidesProgress }, 3003 ], 3004 t.containerModifierClass 3005 ); 3006 e.push(...o), r.classList.add(...e), s.emitContainerClasses(); 3007 } 3008 function oi() { 3009 const s = this, 3010 { el: e, classNames: t } = s; 3011 !e || 3012 typeof e == "string" || 3013 (e.classList.remove(...t), s.emitContainerClasses()); 3014 } 3015 var li = { addClasses: ai, removeClasses: oi }; 3016 function di() { 3017 const s = this, 3018 { isLocked: e, params: t } = s, 3019 { slidesOffsetBefore: i } = t; 3020 if (i) { 3021 const r = s.slides.length - 1, 3022 n = s.slidesGrid[r] + s.slidesSizesGrid[r] + i * 2;
3023 s.isLocked = s.size > n; 3024 } else s.isLocked = s.snapGrid.length === 1; 3025 t.allowSlideNext === !0 && (s.allowSlideNext = !s.isLocked), 3026 t.allowSlidePrev === !0 && (s.allowSlidePrev = !s.isLocked), 3027 e && e !== s.isLocked && (s.isEnd = !1), 3028 e !== s.isLocked && s.emit(s.isLocked ? "lock" : "unlock"); 3029 } 3030 var ci = { checkOverflow: di }, 3031 ft = { 3032 init: !0, 3033 direction: "horizontal", 3034 oneWayMovement: !1, 3035 swiperElementNodeName: "SWIPER-CONTAINER", 3036 touchEventsTarget: "wrapper", 3037 initialSlide: 0, 3038 speed: 300, 3039 cssMode: !1, 3040 updateOnWindowResize: !0, 3041 resizeObserver: !0, 3042 nested: !1, 3043 createElements: !1, 3044 eventsPrefix: "swiper", 3045 enabled: !0, 3046 focusableElements: 3047 "input, select, option, textarea, button, video, label", 3048 width: null, 3049 height: null, 3050 preventInteractionOnTransition: !1, 3051 userAgent: null, 3052 url: null, 3053 edgeSwipeDetection: !1, 3054 edgeSwipeThreshold: 20, 3055 autoHeight: !1, 3056 setWrapperSize: !1, 3057 virtualTranslate: !1, 3058 effect: "slide", 3059 breakpoints: void 0, 3060 breakpointsBase: "window", 3061 spaceBetween: 0, 3062 slidesPerView: 1, 3063 slidesPerGroup: 1, 3064 slidesPerGroupSkip: 0, 3065 slidesPerGroupAuto: !1, 3066 centeredSlides: !1, 3067 centeredSlidesBounds: !1, 3068 slidesOffsetBefore: 0, 3069 slidesOffsetAfter: 0, 3070 normalizeSlideIndex: !0, 3071 centerInsufficientSlides: !1, 3072 watchOverflow: !0, 3073 roundLengths: !1, 3074 touchRatio: 1, 3075 touchAngle: 45, 3076 simulateTouch: !0, 3077 shortSwipes: !0, 3078 longSwipes: !0, 3079 longSwipesRatio: 0.5, 3080 longSwipesMs: 300, 3081 followFinger: !0, 3082 allowTouchMove: !0, 3083 threshold: 5, 3084 touchMoveStopPropagation: !1, 3085 touchStartPreventDefault: !0, 3086 touchStartForcePreventDefault: !1, 3087 touchReleaseOnEdges: !1, 3088 uniqueNavElements: !0, 3089 resistance: !0, 3090 resistanceRatio: 0.85, 3091 watchSlidesProgress: !1, 3092 grabCursor: !1, 3093 preventClicks: !0, 3094 preventClicksPropagation: !0, 3095 slideToClickedSlide: !1, 3096 loop: !1, 3097 loopAddBlankSlides: !0, 3098 loopAdditionalSlides: 0, 3099 loopPreventsSliding: !0, 3100 rewind: !1, 3101 allowSlidePrev: !0, 3102 allowSlideNext: !0, 3103 swipeHandler: null, 3104 noSwiping: !0, 3105 noSwipingClass: "swiper-no-swiping", 3106 noSwipingSelector: null, 3107 passiveListeners: !0, 3108 maxBackfaceHiddenSlides: 10, 3109 containerModifierClass: "swiper-", 3110 slideClass: "swiper-slide", 3111 slideBlankClass: "swiper-slide-blank", 3112 slideActiveClass: "swiper-slide-active", 3113 slideVisibleClass: "swiper-slide-visible", 3114 slideFullyVisibleClass: "swiper-slide-fully-visible", 3115 slideNextClass: "swiper-slide-next", 3116 slidePrevClass: "swiper-slide-prev", 3117 wrapperClass: "swiper-wrapper", 3118 lazyPreloaderClass: "swiper-lazy-preloader", 3119 lazyPreloadPrevNext: 0, 3120 runCallbacksOnInit: !0, 3121 _emitClasses: !1, 3122 }; 3123 function ui(s, e) { 3124 return function (i) { 3125 i === void 0 && (i = {}); 3126 const r = Object.keys(i)[0], 3127 n = i[r]; 3128 if (typeof n != "object" || n === null) { 3129 K(e, i); 3130 return; 3131 } 3132 if ( 3133 (s[r] === !0 && (s[r] = { enabled: !0 }), 3134 r === "navigation" && 3135 s[r] && 3136 s[r].enabled && 3137 !s[r].prevEl && 3138 !s[r].nextEl && 3139 (s[r].auto = !0), 3140 ["pagination", "scrollbar"].indexOf(r) >= 0 && 3141 s[r] && 3142 s[r].enabled && 3143 !s[r].el && 3144 (s[r].auto = !0), 3145 !(r in s && "enabled" in n)) 3146 ) { 3147 K(e, i); 3148 return; 3149 } 3150 typeof s[r] == "object" && !("enabled" in s[r]) && (s[r].enabled = !0), 3151 s[r] || (s[r] = { enabled: !1 }), 3152 K(e, i); 3153 }; 3154 } 3155 const He = { 3156 eventsEmitter: ls, 3157 update: ws, 3158 translate: Ls, 3159 transition: As, 3160 slide: Hs, 3161 loop: Ns, 3162 grabCursor: Rs, 3163 events: ti, 3164 breakpoints: ni, 3165 checkOverflow: ci, 3166 classes: li, 3167 }, 3168 Be = {}; 3169 class Y { 3170 constructor() { 3171 let e, t; 3172 for (var i = arguments.length, r = new Array(i), n = 0; n < i; n++) 3173 r[n] = arguments[n]; 3174 r.length === 1 && 3175 r[0].constructor && 3176 Object.prototype.toString.call(r[0]).slice(8, -1) === "Object" 3177 ? (t = r[0]) 3178 : ([e, t] = r), 3179 t || (t = {}), 3180 (t = K({}, t)), 3181 e && !t.el && (t.el = e); 3182 const o = ee(); 3183 if ( 3184 t.el && 3185 typeof t.el == "string" && 3186 o.querySelectorAll(t.el).length > 1 3187 ) { 3188 const d = []; 3189 return ( 3190 o.querySelectorAll(t.el).forEach((p) => { 3191 const m = K({}, t, { el: p }); 3192 d.push(new Y(m)); 3193 }), 3194 d 3195 ); 3196 } 3197 const a = this; 3198 (a.__swiper__ = !0), 3199 (a.support = nt()), 3200 (a.device = rt({ userAgent: t.userAgent })), 3201 (a.browser = rs()), 3202 (a.eventsListeners = {}), 3203 (a.eventsAnyListeners = []), 3204 (a.modules = [...a.__modules__]), 3205 t.modules && Array.isArray(t.modules) && a.modules.push(...t.modules); 3206 const l = {};
3207 a.modules.forEach((d) => { 3208 d({ 3209 params: t, 3210 swiper: a, 3211 extendParams: ui(t, l), 3212 on: a.on.bind(a), 3213 once: a.once.bind(a), 3214 off: a.off.bind(a), 3215 emit: a.emit.bind(a), 3216 }); 3217 }); 3218 const u = K({}, ft, l); 3219 return ( 3220 (a.params = K({}, u, Be, t)), 3221 (a.originalParams = K({}, a.params)), 3222 (a.passedParams = K({}, t)), 3223 a.params && 3224 a.params.on && 3225 Object.keys(a.params.on).forEach((d) => { 3226 a.on(d, a.params.on[d]); 3227 }), 3228 a.params && a.params.onAny && a.onAny(a.params.onAny), 3229 Object.assign(a, { 3230 enabled: a.params.enabled, 3231 el: e, 3232 classNames: [], 3233 slides: [], 3234 slidesGrid: [], 3235 snapGrid: [], 3236 slidesSizesGrid: [], 3237 isHorizontal() { 3238 return a.params.direction === "horizontal"; 3239 }, 3240 isVertical() { 3241 return a.params.direction === "vertical"; 3242 }, 3243 activeIndex: 0, 3244 realIndex: 0, 3245 isBeginning: !0, 3246 isEnd: !1, 3247 translate: 0, 3248 previousTranslate: 0, 3249 progress: 0, 3250 velocity: 0, 3251 animating: !1, 3252 cssOverflowAdjustment() { 3253 return Math.trunc(this.translate / 8388608) * 8388608; 3254 }, 3255 allowSlideNext: a.params.allowSlideNext, 3256 allowSlidePrev: a.params.allowSlidePrev, 3257 touchEventsData: { 3258 isTouched: void 0, 3259 isMoved: void 0, 3260 allowTouchCallbacks: void 0, 3261 touchStartTime: void 0, 3262 isScrolling: void 0, 3263 currentTranslate: void 0, 3264 startTranslate: void 0, 3265 allowThresholdMove: void 0, 3266 focusableElements: a.params.focusableElements, 3267 lastClickTime: 0, 3268 clickTimeout: void 0, 3269 velocities: [], 3270 allowMomentumBounce: void 0, 3271 startMoving: void 0, 3272 pointerId: null, 3273 touchId: null, 3274 }, 3275 allowClick: !0, 3276 allowTouchMove: a.params.allowTouchMove, 3277 touches: { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }, 3278 imagesToLoad: [], 3279 imagesLoaded: 0, 3280 }), 3281 a.emit("_swiper"), 3282 a.params.init && a.init(), 3283 a 3284 ); 3285 } 3286 getDirectionLabel(e) { 3287 return this.isHorizontal() 3288 ? e 3289 : { 3290 width: "height", 3291 "margin-top": "margin-left", 3292 "margin-bottom ": "margin-right", 3293 "margin-left": "margin-top", 3294 "margin-right": "margin-bottom", 3295 "padding-left": "padding-top", 3296 "padding-right": "padding-bottom", 3297 marginRight: "marginBottom", 3298 }[e]; 3299 } 3300 getSlideIndex(e) { 3301 const { slidesEl: t, params: i } = this, 3302 r = Q(t, `.${i.slideClass}, swiper-slide`), 3303 n = Se(r[0]); 3304 return Se(e) - n; 3305 } 3306 getSlideIndexByData(e) { 3307 return this.getSlideIndex( 3308 this.slides.filter( 3309 (t) => t.getAttribute("data-swiper-slide-index") * 1 === e 3310 )[0] 3311 ); 3312 } 3313 recalcSlides() { 3314 const e = this, 3315 { slidesEl: t, params: i } = e; 3316 e.slides = Q(t, `.${i.slideClass}, swiper-slide`); 3317 } 3318 enable() { 3319 const e = this; 3320 e.enabled || 3321 ((e.enabled = !0), 3322 e.params.grabCursor && e.setGrabCursor(), 3323 e.emit("enable")); 3324 } 3325 disable() { 3326 const e = this; 3327 e.enabled && 3328 ((e.enabled = !1), 3329 e.params.grabCursor && e.unsetGrabCursor(), 3330 e.emit("disable")); 3331 } 3332 setProgress(e, t) { 3333 const i = this; 3334 e = Math.min(Math.max(e, 0), 1); 3335 const r = i.minTranslate(), 3336 o = (i.maxTranslate() - r) * e + r; 3337 i.translateTo(o, typeof t > "u" ? 0 : t), 3338 i.updateActiveIndex(), 3339 i.updateSlidesClasses(); 3340 } 3341 emitContainerClasses() { 3342 const e = this; 3343 if (!e.params._emitClasses || !e.el) return; 3344 const t = e.el.className 3345 .split(" ") 3346 .filter( 3347 (i) => 3348 i.indexOf("swiper") === 0 || 3349 i.indexOf(e.params.containerModifierClass) === 0 3350 ); 3351 e.emit("_containerClasses", t.join(" ")); 3352 } 3353 getSlideClasses(e) { 3354 const t = this; 3355 return t.destroyed 3356 ? "" 3357 : e.className 3358 .split(" ") 3359 .filter( 3360 (i) => 3361 i.indexOf("swiper-slide") === 0 || 3362 i.indexOf(t.params.slideClass) === 0 3363 ) 3364 .join(" "); 3365 } 3366 emitSlidesClasses() { 3367 const e = this; 3368 if (!e.params._emitClasses || !e.el) return; 3369 const t = [];
3370 e.slides.forEach((i) => { 3371 const r = e.getSlideClasses(i); 3372 t.push({ slideEl: i, classNames: r }), e.emit("_slideClass", i, r); 3373 }), 3374 e.emit("_slideClasses", t); 3375 } 3376 slidesPerViewDynamic(e, t) { 3377 e === void 0 && (e = "current"), t === void 0 && (t = !1); 3378 const i = this, 3379 { 3380 params: r, 3381 slides: n, 3382 slidesGrid: o, 3383 slidesSizesGrid: a, 3384 size: l, 3385 activeIndex: u, 3386 } = i; 3387 let d = 1; 3388 if (typeof r.slidesPerView == "number") return r.slidesPerView; 3389 if (r.centeredSlides) { 3390 let p = n[u] ? Math.ceil(n[u].swiperSlideSize) : 0, 3391 m; 3392 for (let h = u + 1; h < n.length; h += 1) 3393 n[h] && 3394 !m && 3395 ((p += Math.ceil(n[h].swiperSlideSize)), 3396 (d += 1), 3397 p > l && (m = !0)); 3398 for (let h = u - 1; h >= 0; h -= 1) 3399 n[h] && 3400 !m && 3401 ((p += n[h].swiperSlideSize), (d += 1), p > l && (m = !0)); 3402 } else if (e === "current") 3403 for (let p = u + 1; p < n.length; p += 1) 3404 (t ? o[p] + a[p] - o[u] < l : o[p] - o[u] < l) && (d += 1); 3405 else for (let p = u - 1; p >= 0; p -= 1) o[u] - o[p] < l && (d += 1); 3406 return d; 3407 } 3408 update() { 3409 const e = this; 3410 if (!e || e.destroyed) return; 3411 const { snapGrid: t, params: i } = e; 3412 i.breakpoints && e.setBreakpoint(), 3413 [...e.el.querySelectorAll('[loading="lazy"]')].forEach((o) => { 3414 o.complete && be(e, o); 3415 }), 3416 e.updateSize(), 3417 e.updateSlides(), 3418 e.updateProgress(), 3419 e.updateSlidesClasses(); 3420 function r() { 3421 const o = e.rtlTranslate ? e.translate * -1 : e.translate, 3422 a = Math.min(Math.max(o, e.maxTranslate()), e.minTranslate()); 3423 e.setTranslate(a), e.updateActiveIndex(), e.updateSlidesClasses(); 3424 } 3425 let n; 3426 if (i.freeMode && i.freeMode.enabled && !i.cssMode) 3427 r(), i.autoHeight && e.updateAutoHeight(); 3428 else { 3429 if ( 3430 (i.slidesPerView === "auto" || i.slidesPerView > 1) && 3431 e.isEnd && 3432 !i.centeredSlides 3433 ) { 3434 const o = 3435 e.virtual && i.virtual.enabled ? e.virtual.slides : e.slides; 3436 n = e.slideTo(o.length - 1, 0, !1, !0); 3437 } else n = e.slideTo(e.activeIndex, 0, !1, !0); 3438 n || r(); 3439 } 3440 i.watchOverflow && t !== e.snapGrid && e.checkOverflow(), 3441 e.emit("update"); 3442 } 3443 changeDirection(e, t) { 3444 t === void 0 && (t = !0); 3445 const i = this, 3446 r = i.params.direction; 3447 return ( 3448 e || (e = r === "horizontal" ? "vertical" : "horizontal"), 3449 e === r || 3450 (e !== "horizontal" && e !== "vertical") || 3451 (i.el.classList.remove(`${i.params.containerModifierClass}${r}`), 3452 i.el.classList.add(`${i.params.containerModifierClass}${e}`), 3453 i.emitContainerClasses(), 3454 (i.params.direction = e), 3455 i.slides.forEach((n) => { 3456 e === "vertical" ? (n.style.width = "") : (n.style.height = ""); 3457 }), 3458 i.emit("changeDirection"), 3459 t && i.update()), 3460 i 3461 ); 3462 } 3463 changeLanguageDirection(e) { 3464 const t = this; 3465 (t.rtl && e === "rtl") || 3466 (!t.rtl && e === "ltr") || 3467 ((t.rtl = e === "rtl"), 3468 (t.rtlTranslate = t.params.direction === "horizontal" && t.rtl), 3469 t.rtl 3470 ? (t.el.classList.add(`${t.params.containerModifierClass}rtl`), 3471 (t.el.dir = "rtl")) 3472 : (t.el.classList.remove(`${t.params.containerModifierClass}rtl`), 3473 (t.el.dir = "ltr")), 3474 t.update()); 3475 } 3476 mount(e) { 3477 const t = this; 3478 if (t.mounted) return !0; 3479 let i = e || t.params.el; 3480 if ((typeof i == "string" && (i = document.querySelector(i)), !i)) 3481 return !1; 3482 (i.swiper = t), 3483 i.parentNode && 3484 i.parentNode.host && 3485 i.parentNode.host.nodeName === 3486 t.params.swiperElementNodeName.toUpperCase() && 3487 (t.isElement = !0); 3488 const r = () => 3489 `.${(t.params.wrapperClass || "").trim().split(" ").join(".")}`; 3490 let o = 3491 i && i.shadowRoot && i.shadowRoot.querySelector 3492 ? i.shadowRoot.querySelector(r()) 3493 : Q(i, r())[0]; 3494 return ( 3495 !o && 3496 t.params.createElements && 3497 ((o = we("div", t.params.wrapperClass)), 3498 i.append(o), 3499 Q(i, `.${t.params.slideClass}`).forEach((a) => { 3500 o.append(a); 3501 })), 3502 Object.assign(t, { 3503 el: i, 3504 wrapperEl: o, 3505 slidesEl: 3506 t.isElement && !i.parentNode.host.slideSlots 3507 ? i.parentNode.host 3508 : o, 3509 hostEl: t.isElement ? i.parentNode.host : i, 3510 mounted: !0, 3511 rtl: i.dir.toLowerCase() === "rtl" || re(i, "direction") === "rtl", 3512 rtlTranslate: 3513 t.params.direction === "horizontal" && 3514 (i.dir.toLowerCase() === "rtl" || re(i, "direction") === "rtl"), 3515 wrongRTL: re(o, "display") === "-webkit-box", 3516 }), 3517 !0 3518 ); 3519 } 3520 init(e) { 3521 const t = this; 3522 if (t.initialized || t.mount(e) === !1) return t; 3523 t.emit("beforeInit"), 3524 t.params.breakpoints && t.setBreakpoint(), 3525 t.addClasses(), 3526 t.updateSize(), 3527 t.updateSlides(), 3528 t.params.watchOverflow && t.checkOverflow(),
3529 t.params.grabCursor && t.enabled && t.setGrabCursor(), 3530 t.params.loop && t.virtual && t.params.virtual.enabled 3531 ? t.slideTo( 3532 t.params.initialSlide + t.virtual.slidesBefore, 3533 0, 3534 t.params.runCallbacksOnInit, 3535 !1, 3536 !0 3537 ) 3538 : t.slideTo( 3539 t.params.initialSlide, 3540 0, 3541 t.params.runCallbacksOnInit, 3542 !1, 3543 !0 3544 ), 3545 t.params.loop && t.loopCreate(), 3546 t.attachEvents(); 3547 const r = [...t.el.querySelectorAll('[loading="lazy"]')]; 3548 return ( 3549 t.isElement && r.push(...t.hostEl.querySelectorAll('[loading="lazy"]')), 3550 r.forEach((n) => { 3551 n.complete 3552 ? be(t, n) 3553 : n.addEventListener("load", (o) => { 3554 be(t, o.target); 3555 }); 3556 }), 3557 qe(t), 3558 (t.initialized = !0), 3559 qe(t), 3560 t.emit("init"), 3561 t.emit("afterInit"), 3562 t 3563 ); 3564 } 3565 destroy(e, t) { 3566 e === void 0 && (e = !0), t === void 0 && (t = !0); 3567 const i = this, 3568 { params: r, el: n, wrapperEl: o, slides: a } = i; 3569 return ( 3570 typeof i.params > "u" || 3571 i.destroyed || 3572 (i.emit("beforeDestroy"), 3573 (i.initialized = !1), 3574 i.detachEvents(), 3575 r.loop && i.loopDestroy(), 3576 t && 3577 (i.removeClasses(), 3578 n && typeof n != "string" && n.removeAttribute("style"), 3579 o && o.removeAttribute("style"), 3580 a && 3581 a.length && 3582 a.forEach((l) => { 3583 l.classList.remove( 3584 r.slideVisibleClass, 3585 r.slideFullyVisibleClass, 3586 r.slideActiveClass, 3587 r.slideNextClass, 3588 r.slidePrevClass 3589 ), 3590 l.removeAttribute("style"), 3591 l.removeAttribute("data-swiper-slide-index"); 3592 })), 3593 i.emit("destroy"), 3594 Object.keys(i.eventsListeners).forEach((l) => { 3595 i.off(l); 3596 }), 3597 e !== !1 && 3598 (i.el && typeof i.el != "string" && (i.el.swiper = null), Yt(i)), 3599 (i.destroyed = !0)), 3600 null 3601 ); 3602 } 3603 static extendDefaults(e) { 3604 K(Be, e); 3605 } 3606 static get extendedDefaults() { 3607 return Be; 3608 } 3609 static get defaults() { 3610 return ft; 3611 } 3612 static installModule(e) { 3613 Y.prototype.__modules__ || (Y.prototype.__modules__ = []); 3614 const t = Y.prototype.__modules__; 3615 typeof e == "function" && t.indexOf(e) < 0 && t.push(e); 3616 } 3617 static use(e) { 3618 return Array.isArray(e) 3619 ? (e.forEach((t) => Y.installModule(t)), Y) 3620 : (Y.installModule(e), Y); 3621 } 3622 } 3623 Object.keys(He).forEach((s) => { 3624 Object.keys(He[s]).forEach((e) => { 3625 Y.prototype[e] = He[s][e]; 3626 }); 3627 }), 3628 Y.use([as, os]); 3629 function pt(s, e, t, i) { 3630 return ( 3631 s.params.createElements &&
3632 Object.keys(i).forEach((r) => { 3633 if (!t[r] && t.auto === !0) { 3634 let n = Q(s.el, `.${i[r]}`)[0]; 3635 n || ((n = we("div", i[r])), (n.className = i[r]), s.el.append(n)), 3636 (t[r] = n), 3637 (e[r] = n); 3638 } 3639 }), 3640 t 3641 ); 3642 } 3643 function mt(s) { 3644 let { swiper: e, extendParams: t, on: i, emit: r } = s; 3645 t({ 3646 navigation: { 3647 nextEl: null, 3648 prevEl: null, 3649 hideOnClick: !1, 3650 disabledClass: "swiper-button-disabled", 3651 hiddenClass: "swiper-button-hidden", 3652 lockClass: "swiper-button-lock", 3653 navigationDisabledClass: "swiper-navigation-disabled", 3654 }, 3655 }), 3656 (e.navigation = { nextEl: null, prevEl: null }); 3657 function n(g) { 3658 let w; 3659 return g && 3660 typeof g == "string" && 3661 e.isElement && 3662 ((w = e.el.querySelector(g) || e.hostEl.querySelector(g)), w) 3663 ? w 3664 : (g && 3665 (typeof g == "string" && (w = [...document.querySelectorAll(g)]), 3666 e.params.uniqueNavElements && 3667 typeof g == "string" && 3668 w && 3669 w.length > 1 && 3670 e.el.querySelectorAll(g).length === 1 3671 ? (w = e.el.querySelector(g)) 3672 : w && w.length === 1 && (w = w[0])), 3673 g && !w ? g : w); 3674 } 3675 function o(g, w) { 3676 const b = e.params.navigation; 3677 (g = j(g)), 3678 g.forEach((S) => { 3679 S && 3680 (S.classList[w ? "add" : "remove"](...b.disabledClass.split(" ")), 3681 S.tagName === "BUTTON" && (S.disabled = w), 3682 e.params.watchOverflow && 3683 e.enabled && 3684 S.classList[e.isLocked ? "add" : "remove"](b.lockClass)); 3685 }); 3686 } 3687 function a() { 3688 const { nextEl: g, prevEl: w } = e.navigation; 3689 if (e.params.loop) { 3690 o(w, !1), o(g, !1); 3691 return; 3692 } 3693 o(w, e.isBeginning && !e.params.rewind), 3694 o(g, e.isEnd && !e.params.rewind); 3695 } 3696 function l(g) { 3697 g.preventDefault(), 3698 !(e.isBeginning && !e.params.loop && !e.params.rewind) && 3699 (e.slidePrev(), r("navigationPrev")); 3700 } 3701 function u(g) { 3702 g.preventDefault(), 3703 !(e.isEnd && !e.params.loop && !e.params.rewind) && 3704 (e.slideNext(), r("navigationNext")); 3705 } 3706 function d() { 3707 const g = e.params.navigation; 3708 if ( 3709 ((e.params.navigation = pt( 3710 e, 3711 e.originalParams.navigation, 3712 e.params.navigation, 3713 { nextEl: "swiper-button-next", prevEl: "swiper-button-prev" } 3714 )), 3715 !(g.nextEl || g.prevEl)) 3716 ) 3717 return; 3718 let w = n(g.nextEl), 3719 b = n(g.prevEl); 3720 Object.assign(e.navigation, { nextEl: w, prevEl: b }), 3721 (w = j(w)), 3722 (b = j(b)); 3723 const S = (c, f) => { 3724 c && c.addEventListener("click", f === "next" ? u : l), 3725 !e.enabled && c && c.classList.add(...g.lockClass.split(" ")); 3726 }; 3727 w.forEach((c) => S(c, "next")), b.forEach((c) => S(c, "prev")); 3728 } 3729 function p() { 3730 let { nextEl: g, prevEl: w } = e.navigation; 3731 (g = j(g)), (w = j(w)); 3732 const b = (S, c) => { 3733 S.removeEventListener("click", c === "next" ? u : l), 3734 S.classList.remove(...e.params.navigation.disabledClass.split(" ")); 3735 }; 3736 g.forEach((S) => b(S, "next")), w.forEach((S) => b(S, "prev")); 3737 } 3738 i("init", () => { 3739 e.params.navigation.enabled === !1 ? h() : (d(), a()); 3740 }), 3741 i("toEdge fromEdge lock unlock", () => { 3742 a(); 3743 }), 3744 i("destroy", () => { 3745 p(); 3746 }), 3747 i("enable disable", () => { 3748 let { nextEl: g, prevEl: w } = e.navigation; 3749 if (((g = j(g)), (w = j(w)), e.enabled)) { 3750 a(); 3751 return; 3752 } 3753 [...g, ...w] 3754 .filter((b) => !!b) 3755 .forEach((b) => b.classList.add(e.params.navigation.lockClass)); 3756 }), 3757 i("click", (g, w) => { 3758 let { nextEl: b, prevEl: S } = e.navigation; 3759 (b = j(b)), (S = j(S)); 3760 const c = w.target; 3761 let f = S.includes(c) || b.includes(c); 3762 if (e.isElement && !f) { 3763 const v = w.path || (w.composedPath && w.composedPath()); 3764 v && (f = v.find((y) => b.includes(y) || S.includes(y))); 3765 } 3766 if (e.params.navigation.hideOnClick && !f) { 3767 if ( 3768 e.pagination && 3769 e.params.pagination && 3770 e.params.pagination.clickable && 3771 (e.pagination.el === c || e.pagination.el.contains(c)) 3772 ) 3773 return; 3774 let v; 3775 b.length 3776 ? (v = b[0].classList.contains(e.params.navigation.hiddenClass)) 3777 : S.length && 3778 (v = S[0].classList.contains(e.params.navigation.hiddenClass)), 3779 r(v === !0 ? "navigationShow" : "navigationHide"), 3780 [...b, ...S] 3781 .filter((y) => !!y) 3782 .forEach((y) => 3783 y.classList.toggle(e.params.navigation.hiddenClass) 3784 ); 3785 } 3786 }); 3787 const m = () => { 3788 e.el.classList.remove( 3789 ...e.params.navigation.navigationDisabledClass.split(" ") 3790 ), 3791 d(), 3792 a(); 3793 }, 3794 h = () => { 3795 e.el.classList.add( 3796 ...e.params.navigation.navigationDisabledClass.split(" ") 3797 ), 3798 p(); 3799 };
3800 Object.assign(e.navigation, { 3801 enable: m, 3802 disable: h, 3803 update: a, 3804 init: d, 3805 destroy: p, 3806 }); 3807 } 3808 function me(s) { 3809 return ( 3810 s === void 0 && (s = ""), 3811 `.${s 3812 .trim() 3813 .replace(/([\.:!+\/])/g, "\\$1") 3814 .replace(/ /g, ".")}` 3815 ); 3816 } 3817 function fi(s) { 3818 let { swiper: e, extendParams: t, on: i, emit: r } = s; 3819 const n = "swiper-pagination"; 3820 t({ 3821 pagination: { 3822 el: null, 3823 bulletElement: "span", 3824 clickable: !1, 3825 hideOnClick: !1, 3826 renderBullet: null, 3827 renderProgressbar: null, 3828 renderFraction: null, 3829 renderCustom: null, 3830 progressbarOpposite: !1, 3831 type: "bullets", 3832 dynamicBullets: !1, 3833 dynamicMainBullets: 1, 3834 formatFractionCurrent: (c) => c, 3835 formatFractionTotal: (c) => c, 3836 bulletClass: `${n}-bullet`, 3837 bulletActiveClass: `${n}-bullet-active`, 3838 modifierClass: `${n}-`, 3839 currentClass: `${n}-current`, 3840 totalClass: `${n}-total`, 3841 hiddenClass: `${n}-hidden`, 3842 progressbarFillClass: `${n}-progressbar-fill`, 3843 progressbarOppositeClass: `${n}-progressbar-opposite`, 3844 clickableClass: `${n}-clickable`, 3845 lockClass: `${n}-lock`, 3846 horizontalClass: `${n}-horizontal`, 3847 verticalClass: `${n}-vertical`, 3848 paginationDisabledClass: `${n}-disabled`, 3849 }, 3850 }), 3851 (e.pagination = { el: null, bullets: [] }); 3852 let o, 3853 a = 0; 3854 function l() { 3855 return ( 3856 !e.params.pagination.el || 3857 !e.pagination.el || 3858 (Array.isArray(e.pagination.el) && e.pagination.el.length === 0) 3859 ); 3860 } 3861 function u(c, f) { 3862 const { bulletActiveClass: v } = e.params.pagination; 3863 c && 3864 ((c = c[`${f === "prev" ? "previous" : "next"}ElementSibling`]), 3865 c && 3866 (c.classList.add(`${v}-${f}`), 3867 (c = c[`${f === "prev" ? "previous" : "next"}ElementSibling`]), 3868 c && c.classList.add(`${v}-${f}-${f}`))); 3869 } 3870 function d(c, f, v) { 3871 if (((c = c % v), (f = f % v), f === c + 1)) return "next"; 3872 if (f === c - 1) return "previous"; 3873 } 3874 function p(c) { 3875 const f = c.target.closest(me(e.params.pagination.bulletClass)); 3876 if (!f) return; 3877 c.preventDefault(); 3878 const v = Se(f) * e.params.slidesPerGroup; 3879 if (e.params.loop) { 3880 if (e.realIndex === v) return; 3881 const y = d(e.realIndex, v, e.slides.length); 3882 y === "next" 3883 ? e.slideNext() 3884 : y === "previous" 3885 ? e.slidePrev() 3886 : e.slideToLoop(v); 3887 } else e.slideTo(v); 3888 } 3889 function m() { 3890 const c = e.rtl, 3891 f = e.params.pagination; 3892 if (l()) return; 3893 let v = e.pagination.el; 3894 v = j(v); 3895 let y, E; 3896 const H = 3897 e.virtual && e.params.virtual.enabled 3898 ? e.virtual.slides.length 3899 : e.slides.length, 3900 I = e.params.loop 3901 ? Math.ceil(H / e.params.slidesPerGroup) 3902 : e.snapGrid.length; 3903 if ( 3904 (e.params.loop 3905 ? ((E = e.previousRealIndex || 0), 3906 (y = 3907 e.params.slidesPerGroup > 1 3908 ? Math.floor(e.realIndex / e.params.slidesPerGroup) 3909 : e.realIndex)) 3910 : typeof e.snapIndex < "u" 3911 ? ((y = e.snapIndex), (E = e.previousSnapIndex)) 3912 : ((E = e.previousIndex || 0), (y = e.activeIndex || 0)), 3913 f.type === "bullets" && 3914 e.pagination.bullets && 3915 e.pagination.bullets.length > 0) 3916 ) { 3917 const D = e.pagination.bullets; 3918 let T, L, k; 3919 if ( 3920 (f.dynamicBullets && 3921 ((o = Ie(D[0], e.isHorizontal() ? "width" : "height")), 3922 v.forEach((C) => { 3923 C.style[e.isHorizontal() ? "width" : "height"] = `${ 3924 o * (f.dynamicMainBullets + 4) 3925 }px`; 3926 }), 3927 f.dynamicMainBullets > 1 && 3928 E !== void 0 && 3929 ((a += y - (E || 0)), 3930 a > f.dynamicMainBullets - 1 3931 ? (a = f.dynamicMainBullets - 1) 3932 : a < 0 && (a = 0)), 3933 (T = Math.max(y - a, 0)), 3934 (L = T + (Math.min(D.length, f.dynamicMainBullets) - 1)), 3935 (k = (L + T) / 2)), 3936 D.forEach((C) => { 3937 const $ = [ 3938 ...[ 3939 "", 3940 "-next", 3941 "-next-next", 3942 "-prev", 3943 "-prev-prev", 3944 "-main", 3945 ].map((B) => `${f.bulletActiveClass}${B}`), 3946 ] 3947 .map((B) => 3948 typeof B == "string" && B.includes(" ") ? B.split(" ") : B 3949 ) 3950 .flat(); 3951 C.classList.remove(...$); 3952 }), 3953 v.length > 1) 3954 ) 3955 D.forEach((C) => { 3956 const $ = Se(C); 3957 $ === y 3958 ? C.classList.add(...f.bulletActiveClass.split(" ")) 3959 : e.isElement && C.setAttribute("part", "bullet"), 3960 f.dynamicBullets && 3961 ($ >= T && 3962 $ <= L && 3963 C.classList.add(...`${f.bulletActiveClass}-main`.split(" ")), 3964 $ === T && u(C, "prev"), 3965 $ === L && u(C, "next")); 3966 }); 3967 else { 3968 const C = D[y]; 3969 if ( 3970 (C && C.classList.add(...f.bulletActiveClass.split(" ")), 3971 e.isElement && 3972 D.forEach(($, B) => { 3973 $.setAttribute("part", B === y ? "bullet-active" : "bullet"); 3974 }), 3975 f.dynamicBullets) 3976 ) { 3977 const $ = D[T], 3978 B = D[L]; 3979 for (let R = T; R <= L; R += 1) 3980 D[R] && 3981 D[R].classList.add(...`${f.bulletActiveClass}-main`.split(" ")); 3982 u($, "prev"), u(B, "next"); 3983 } 3984 } 3985 if (f.dynamicBullets) { 3986 const C = Math.min(D.length, f.dynamicMainBullets + 4), 3987 $ = (o * C - o) / 2 - k * o, 3988 B = c ? "right" : "left"; 3989 D.forEach((R) => { 3990 R.style[e.isHorizontal() ? B : "top"] = `${$}px`; 3991 }); 3992 } 3993 } 3994 v.forEach((D, T) => { 3995 if ( 3996 (f.type === "fraction" &&
3997 (D.querySelectorAll(me(f.currentClass)).forEach((L) => { 3998 L.textContent = f.formatFractionCurrent(y + 1); 3999 }), 4000 D.querySelectorAll(me(f.totalClass)).forEach((L) => { 4001 L.textContent = f.formatFractionTotal(I); 4002 })), 4003 f.type === "progressbar") 4004 ) { 4005 let L; 4006 f.progressbarOpposite 4007 ? (L = e.isHorizontal() ? "vertical" : "horizontal") 4008 : (L = e.isHorizontal() ? "horizontal" : "vertical"); 4009 const k = (y + 1) / I; 4010 let C = 1, 4011 $ = 1; 4012 L === "horizontal" ? (C = k) : ($ = k), 4013 D.querySelectorAll(me(f.progressbarFillClass)).forEach((B) => { 4014 (B.style.transform = `translate3d(0,0,0) scaleX(${C}) scaleY(${$})`), 4015 (B.style.transitionDuration = `${e.params.speed}ms`); 4016 }); 4017 } 4018 f.type === "custom" && f.renderCustom 4019 ? ((D.innerHTML = f.renderCustom(e, y + 1, I)), 4020 T === 0 && r("paginationRender", D)) 4021 : (T === 0 && r("paginationRender", D), r("paginationUpdate", D)), 4022 e.params.watchOverflow && 4023 e.enabled && 4024 D.classList[e.isLocked ? "add" : "remove"](f.lockClass); 4025 }); 4026 } 4027 function h() { 4028 const c = e.params.pagination; 4029 if (l()) return; 4030 const f = 4031 e.virtual && e.params.virtual.enabled 4032 ? e.virtual.slides.length 4033 : e.grid && e.params.grid.rows > 1 4034 ? e.slides.length / Math.ceil(e.params.grid.rows) 4035 : e.slides.length; 4036 let v = e.pagination.el; 4037 v = j(v); 4038 let y = ""; 4039 if (c.type === "bullets") { 4040 let E = e.params.loop 4041 ? Math.ceil(f / e.params.slidesPerGroup) 4042 : e.snapGrid.length; 4043 e.params.freeMode && e.params.freeMode.enabled && E > f && (E = f); 4044 for (let H = 0; H < E; H += 1) 4045 c.renderBullet 4046 ? (y += c.renderBullet.call(e, H, c.bulletClass)) 4047 : (y += `<${c.bulletElement} ${ 4048 e.isElement ? 'part="bullet"' : "" 4049 } class="${c.bulletClass}"></${c.bulletElement}>`); 4050 } 4051 c.type === "fraction" && 4052 (c.renderFraction 4053 ? (y = c.renderFraction.call(e, c.currentClass, c.totalClass)) 4054 : (y = `<span class="${c.currentClass}"></span> / <span class="${c.totalClass}"></span>`)), 4055 c.type === "progressbar" && 4056 (c.renderProgressbar 4057 ? (y = c.renderProgressbar.call(e, c.progressbarFillClass)) 4058 : (y = `<span class="${c.progressbarFillClass}"></span>`)), 4059 (e.pagination.bullets = []), 4060 v.forEach((E) => { 4061 c.type !== "custom" && (E.innerHTML = y || ""), 4062 c.type === "bullets" && 4063 e.pagination.bullets.push( 4064 ...E.querySelectorAll(me(c.bulletClass)) 4065 ); 4066 }), 4067 c.type !== "custom" && r("paginationRender", v[0]); 4068 } 4069 function g() { 4070 e.params.pagination = pt( 4071 e, 4072 e.originalParams.pagination, 4073 e.params.pagination, 4074 { el: "swiper-pagination" } 4075 ); 4076 const c = e.params.pagination; 4077 if (!c.el) return; 4078 let f; 4079 typeof c.el == "string" && e.isElement && (f = e.el.querySelector(c.el)), 4080 !f && 4081 typeof c.el == "string" && 4082 (f = [...document.querySelectorAll(c.el)]), 4083 f || (f = c.el), 4084 !(!f || f.length === 0) && 4085 (e.params.uniqueNavElements && 4086 typeof c.el == "string" && 4087 Array.isArray(f) && 4088 f.length > 1 && 4089 ((f = [...e.el.querySelectorAll(c.el)]), 4090 f.length > 1 && 4091 (f = f.filter((v) => it(v, ".swiper")[0] === e.el)[0])), 4092 Array.isArray(f) && f.length === 1 && (f = f[0]), 4093 Object.assign(e.pagination, { el: f }), 4094 (f = j(f)), 4095 f.forEach((v) => { 4096 c.type === "bullets" && 4097 c.clickable && 4098 v.classList.add(...(c.clickableClass || "").split(" ")), 4099 v.classList.add(c.modifierClass + c.type), 4100 v.classList.add( 4101 e.isHorizontal() ? c.horizontalClass : c.verticalClass 4102 ), 4103 c.type === "bullets" && 4104 c.dynamicBullets && 4105 (v.classList.add(`${c.modifierClass}${c.type}-dynamic`), 4106 (a = 0), 4107 c.dynamicMainBullets < 1 && (c.dynamicMainBullets = 1)), 4108 c.type === "progressbar" && 4109 c.progressbarOpposite && 4110 v.classList.add(c.progressbarOppositeClass), 4111 c.clickable && v.addEventListener("click", p), 4112 e.enabled || v.classList.add(c.lockClass); 4113 })); 4114 } 4115 function w() { 4116 const c = e.params.pagination; 4117 if (l()) return; 4118 let f = e.pagination.el; 4119 f && 4120 ((f = j(f)), 4121 f.forEach((v) => { 4122 v.classList.remove(c.hiddenClass), 4123 v.classList.remove(c.modifierClass + c.type), 4124 v.classList.remove( 4125 e.isHorizontal() ? c.horizontalClass : c.verticalClass 4126 ), 4127 c.clickable && 4128 (v.classList.remove(...(c.clickableClass || "").split(" ")), 4129 v.removeEventListener("click", p)); 4130 })), 4131 e.pagination.bullets &&
4132 e.pagination.bullets.forEach((v) => 4133 v.classList.remove(...c.bulletActiveClass.split(" ")) 4134 ); 4135 } 4136 i("changeDirection", () => { 4137 if (!e.pagination || !e.pagination.el) return; 4138 const c = e.params.pagination; 4139 let { el: f } = e.pagination; 4140 (f = j(f)), 4141 f.forEach((v) => { 4142 v.classList.remove(c.horizontalClass, c.verticalClass), 4143 v.classList.add( 4144 e.isHorizontal() ? c.horizontalClass : c.verticalClass 4145 ); 4146 }); 4147 }), 4148 i("init", () => { 4149 e.params.pagination.enabled === !1 ? S() : (g(), h(), m()); 4150 }), 4151 i("activeIndexChange", () => { 4152 typeof e.snapIndex > "u" && m(); 4153 }), 4154 i("snapIndexChange", () => { 4155 m(); 4156 }), 4157 i("snapGridLengthChange", () => { 4158 h(), m(); 4159 }), 4160 i("destroy", () => { 4161 w(); 4162 }), 4163 i("enable disable", () => { 4164 let { el: c } = e.pagination; 4165 c && 4166 ((c = j(c)), 4167 c.forEach((f) => 4168 f.classList[e.enabled ? "remove" : "add"]( 4169 e.params.pagination.lockClass 4170 ) 4171 )); 4172 }), 4173 i("lock unlock", () => { 4174 m(); 4175 }), 4176 i("click", (c, f) => { 4177 const v = f.target, 4178 y = j(e.pagination.el); 4179 if ( 4180 e.params.pagination.el && 4181 e.params.pagination.hideOnClick && 4182 y && 4183 y.length > 0 && 4184 !v.classList.contains(e.params.pagination.bulletClass) 4185 ) { 4186 if ( 4187 e.navigation && 4188 ((e.navigation.nextEl && v === e.navigation.nextEl) || 4189 (e.navigation.prevEl && v === e.navigation.prevEl)) 4190 ) 4191 return; 4192 const E = y[0].classList.contains(e.params.pagination.hiddenClass); 4193 r(E === !0 ? "paginationShow" : "paginationHide"), 4194 y.forEach((H) => 4195 H.classList.toggle(e.params.pagination.hiddenClass) 4196 ); 4197 } 4198 }); 4199 const b = () => { 4200 e.el.classList.remove(e.params.pagination.paginationDisabledClass); 4201 let { el: c } = e.pagination; 4202 c && 4203 ((c = j(c)), 4204 c.forEach((f) => 4205 f.classList.remove(e.params.pagination.paginationDisabledClass) 4206 )), 4207 g(), 4208 h(), 4209 m(); 4210 }, 4211 S = () => { 4212 e.el.classList.add(e.params.pagination.paginationDisabledClass); 4213 let { el: c } = e.pagination; 4214 c && 4215 ((c = j(c)), 4216 c.forEach((f) => 4217 f.classList.add(e.params.pagination.paginationDisabledClass) 4218 )), 4219 w(); 4220 }; 4221 Object.assign(e.pagination, { 4222 enable: b, 4223 disable: S, 4224 render: h, 4225 update: m, 4226 init: g, 4227 destroy: w, 4228 }); 4229 } 4230 function pi(s) { 4231 let { swiper: e, extendParams: t, on: i, emit: r, params: n } = s; 4232 (e.autoplay = { running: !1, paused: !1, timeLeft: 0 }), 4233 t({ 4234 autoplay: { 4235 enabled: !1, 4236 delay: 3e3, 4237 waitForTransition: !0, 4238 disableOnInteraction: !1, 4239 stopOnLastSlide: !1, 4240 reverseDirection: !1, 4241 pauseOnMouseEnter: !1, 4242 }, 4243 }); 4244 let o, 4245 a, 4246 l = n && n.autoplay ? n.autoplay.delay : 3e3, 4247 u = n && n.autoplay ? n.autoplay.delay : 3e3, 4248 d, 4249 p = new Date().getTime(), 4250 m, 4251 h, 4252 g, 4253 w, 4254 b, 4255 S, 4256 c; 4257 function f(V) { 4258 !e || 4259 e.destroyed || 4260 !e.wrapperEl || 4261 (V.target === e.wrapperEl && 4262 (e.wrapperEl.removeEventListener("transitionend", f), 4263 !(c || (V.detail && V.detail.bySwiperTouchMove)) && T())); 4264 } 4265 const v = () => { 4266 if (e.destroyed || !e.autoplay.running) return; 4267 e.autoplay.paused ? (m = !0) : m && ((u = d), (m = !1));
4268 const V = e.autoplay.paused ? d : p + u - new Date().getTime(); 4269 (e.autoplay.timeLeft = V), 4270 r("autoplayTimeLeft", V, V / l), 4271 (a = requestAnimationFrame(() => { 4272 v(); 4273 })); 4274 }, 4275 y = () => { 4276 let V; 4277 return ( 4278 e.virtual && e.params.virtual.enabled 4279 ? (V = e.slides.filter((O) => 4280 O.classList.contains("swiper-slide-active") 4281 )[0]) 4282 : (V = e.slides[e.activeIndex]), 4283 V ? parseInt(V.getAttribute("data-swiper-autoplay"), 10) : void 0 4284 ); 4285 }, 4286 E = (V) => { 4287 if (e.destroyed || !e.autoplay.running) return; 4288 cancelAnimationFrame(a), v(); 4289 let U = typeof V > "u" ? e.params.autoplay.delay : V; 4290 (l = e.params.autoplay.delay), (u = e.params.autoplay.delay); 4291 const O = y(); 4292 !Number.isNaN(O) && 4293 O > 0 && 4294 typeof V > "u" && 4295 ((U = O), (l = O), (u = O)), 4296 (d = U); 4297 const se = e.params.speed, 4298 ne = () => { 4299 !e || 4300 e.destroyed || 4301 (e.params.autoplay.reverseDirection 4302 ? !e.isBeginning || e.params.loop || e.params.rewind 4303 ? (e.slidePrev(se, !0, !0), r("autoplay")) 4304 : e.params.autoplay.stopOnLastSlide || 4305 (e.slideTo(e.slides.length - 1, se, !0, !0), r("autoplay")) 4306 : !e.isEnd || e.params.loop || e.params.rewind 4307 ? (e.slideNext(se, !0, !0), r("autoplay")) 4308 : e.params.autoplay.stopOnLastSlide || 4309 (e.slideTo(0, se, !0, !0), r("autoplay")), 4310 e.params.cssMode && 4311 ((p = new Date().getTime()), 4312 requestAnimationFrame(() => { 4313 E(); 4314 }))); 4315 }; 4316 return ( 4317 U > 0 4318 ? (clearTimeout(o), 4319 (o = setTimeout(() => { 4320 ne(); 4321 }, U))) 4322 : requestAnimationFrame(() => { 4323 ne(); 4324 }), 4325 U 4326 ); 4327 }, 4328 H = () => { 4329 (p = new Date().getTime()), 4330 (e.autoplay.running = !0), 4331 E(), 4332 r("autoplayStart"); 4333 }, 4334 I = () => { 4335 (e.autoplay.running = !1), 4336 clearTimeout(o), 4337 cancelAnimationFrame(a), 4338 r("autoplayStop"); 4339 }, 4340 D = (V, U) => { 4341 if (e.destroyed || !e.autoplay.running) return; 4342 clearTimeout(o), V || (S = !0); 4343 const O = () => { 4344 r("autoplayPause"), 4345 e.params.autoplay.waitForTransition 4346 ? e.wrapperEl.addEventListener("transitionend", f) 4347 : T(); 4348 }; 4349 if (((e.autoplay.paused = !0), U)) { 4350 b && (d = e.params.autoplay.delay), (b = !1), O(); 4351 return; 4352 } 4353 (d = (d || e.params.autoplay.delay) - (new Date().getTime() - p)), 4354 !(e.isEnd && d < 0 && !e.params.loop) && (d < 0 && (d = 0), O()); 4355 }, 4356 T = () => { 4357 (e.isEnd && d < 0 && !e.params.loop) || 4358 e.destroyed || 4359 !e.autoplay.running || 4360 ((p = new Date().getTime()), 4361 S ? ((S = !1), E(d)) : E(), 4362 (e.autoplay.paused = !1), 4363 r("autoplayResume")); 4364 }, 4365 L = () => { 4366 if (e.destroyed || !e.autoplay.running) return; 4367 const V = ee(); 4368 V.visibilityState === "hidden" && ((S = !0), D(!0)), 4369 V.visibilityState === "visible" && T(); 4370 }, 4371 k = (V) => { 4372 V.pointerType === "mouse" && 4373 ((S = !0), (c = !0), !(e.animating || e.autoplay.paused) && D(!0)); 4374 }, 4375 C = (V) => { 4376 V.pointerType === "mouse" && ((c = !1), e.autoplay.paused && T()); 4377 }, 4378 $ = () => { 4379 e.params.autoplay.pauseOnMouseEnter && 4380 (e.el.addEventListener("pointerenter", k), 4381 e.el.addEventListener("pointerleave", C)); 4382 }, 4383 B = () => { 4384 e.el && 4385 typeof e.el != "string" && 4386 (e.el.removeEventListener("pointerenter", k), 4387 e.el.removeEventListener("pointerleave", C)); 4388 }, 4389 R = () => { 4390 ee().addEventListener("visibilitychange", L); 4391 }, 4392 te = () => { 4393 ee().removeEventListener("visibilitychange", L); 4394 }; 4395 i("init", () => { 4396 e.params.autoplay.enabled && ($(), R(), H()); 4397 }), 4398 i("destroy", () => { 4399 B(), te(), e.autoplay.running && I(); 4400 }), 4401 i("_freeModeStaticRelease", () => { 4402 (g || S) && T(); 4403 }), 4404 i("_freeModeNoMomentumRelease", () => { 4405 e.params.autoplay.disableOnInteraction ? I() : D(!0, !0); 4406 }),
4407 i("beforeTransitionStart", (V, U, O) => { 4408 e.destroyed || 4409 !e.autoplay.running || 4410 (O || !e.params.autoplay.disableOnInteraction ? D(!0, !0) : I()); 4411 }), 4412 i("sliderFirstMove", () => { 4413 if (!(e.destroyed || !e.autoplay.running)) { 4414 if (e.params.autoplay.disableOnInteraction) { 4415 I(); 4416 return; 4417 } 4418 (h = !0), 4419 (g = !1), 4420 (S = !1), 4421 (w = setTimeout(() => { 4422 (S = !0), (g = !0), D(!0); 4423 }, 200)); 4424 } 4425 }), 4426 i("touchEnd", () => { 4427 if (!(e.destroyed || !e.autoplay.running || !h)) { 4428 if ( 4429 (clearTimeout(w), 4430 clearTimeout(o), 4431 e.params.autoplay.disableOnInteraction) 4432 ) { 4433 (g = !1), (h = !1); 4434 return; 4435 } 4436 g && e.params.cssMode && T(), (g = !1), (h = !1); 4437 } 4438 }), 4439 i("slideChange", () => { 4440 e.destroyed || !e.autoplay.running || (b = !0); 4441 }), 4442 Object.assign(e.autoplay, { start: H, stop: I, pause: D, resume: T }); 4443 } 4444 function mi(s) { 4445 let { swiper: e, extendParams: t, on: i } = s; 4446 t({ 4447 thumbs: { 4448 swiper: null, 4449 multipleActiveThumbs: !0, 4450 autoScrollOffset: 0, 4451 slideThumbActiveClass: "swiper-slide-thumb-active", 4452 thumbsContainerClass: "swiper-thumbs", 4453 }, 4454 }); 4455 let r = !1, 4456 n = !1; 4457 e.thumbs = { swiper: null }; 4458 function o() { 4459 const u = e.thumbs.swiper; 4460 if (!u || u.destroyed) return; 4461 const d = u.clickedIndex, 4462 p = u.clickedSlide; 4463 if ( 4464 (p && p.classList.contains(e.params.thumbs.slideThumbActiveClass)) || 4465 typeof d > "u" || 4466 d === null 4467 ) 4468 return; 4469 let m; 4470 u.params.loop 4471 ? (m = parseInt( 4472 u.clickedSlide.getAttribute("data-swiper-slide-index"), 4473 10 4474 )) 4475 : (m = d), 4476 e.params.loop ? e.slideToLoop(m) : e.slideTo(m); 4477 } 4478 function a() { 4479 const { thumbs: u } = e.params; 4480 if (r) return !1; 4481 r = !0; 4482 const d = e.constructor; 4483 if (u.swiper instanceof d) 4484 (e.thumbs.swiper = u.swiper), 4485 Object.assign(e.thumbs.swiper.originalParams, { 4486 watchSlidesProgress: !0, 4487 slideToClickedSlide: !1, 4488 }), 4489 Object.assign(e.thumbs.swiper.params, { 4490 watchSlidesProgress: !0, 4491 slideToClickedSlide: !1, 4492 }), 4493 e.thumbs.swiper.update(); 4494 else if (pe(u.swiper)) { 4495 const p = Object.assign({}, u.swiper); 4496 Object.assign(p, { watchSlidesProgress: !0, slideToClickedSlide: !1 }), 4497 (e.thumbs.swiper = new d(p)), 4498 (n = !0); 4499 } 4500 return ( 4501 e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass), 4502 e.thumbs.swiper.on("tap", o), 4503 !0 4504 ); 4505 } 4506 function l(u) { 4507 const d = e.thumbs.swiper; 4508 if (!d || d.destroyed) return; 4509 const p = 4510 d.params.slidesPerView === "auto" 4511 ? d.slidesPerViewDynamic() 4512 : d.params.slidesPerView; 4513 let m = 1; 4514 const h = e.params.thumbs.slideThumbActiveClass; 4515 if ( 4516 (e.params.slidesPerView > 1 && 4517 !e.params.centeredSlides && 4518 (m = e.params.slidesPerView), 4519 e.params.thumbs.multipleActiveThumbs || (m = 1), 4520 (m = Math.floor(m)), 4521 d.slides.forEach((b) => b.classList.remove(h)), 4522 d.params.loop || (d.params.virtual && d.params.virtual.enabled)) 4523 ) 4524 for (let b = 0; b < m; b += 1) 4525 Q( 4526 d.slidesEl, 4527 `[data-swiper-slide-index="${e.realIndex + b}"]` 4528 ).forEach((S) => { 4529 S.classList.add(h); 4530 }); 4531 else 4532 for (let b = 0; b < m; b += 1) 4533 d.slides[e.realIndex + b] && 4534 d.slides[e.realIndex + b].classList.add(h); 4535 const g = e.params.thumbs.autoScrollOffset, 4536 w = g && !d.params.loop; 4537 if (e.realIndex !== d.realIndex || w) { 4538 const b = d.activeIndex; 4539 let S, c; 4540 if (d.params.loop) { 4541 const f = d.slides.filter( 4542 (v) => 4543 v.getAttribute("data-swiper-slide-index") === `${e.realIndex}` 4544 )[0]; 4545 (S = d.slides.indexOf(f)), 4546 (c = e.activeIndex > e.previousIndex ? "next" : "prev"); 4547 } else (S = e.realIndex), (c = S > e.previousIndex ? "next" : "prev");
4548 w && (S += c === "next" ? g : -1 * g), 4549 d.visibleSlidesIndexes && 4550 d.visibleSlidesIndexes.indexOf(S) < 0 && 4551 (d.params.centeredSlides 4552 ? S > b 4553 ? (S = S - Math.floor(p / 2) + 1) 4554 : (S = S + Math.floor(p / 2) - 1) 4555 : S > b && d.params.slidesPerGroup, 4556 d.slideTo(S, u ? 0 : void 0)); 4557 } 4558 } 4559 i("beforeInit", () => { 4560 const { thumbs: u } = e.params; 4561 if (!(!u || !u.swiper)) 4562 if (typeof u.swiper == "string" || u.swiper instanceof HTMLElement) { 4563 const d = ee(), 4564 p = () => { 4565 const h = 4566 typeof u.swiper == "string" 4567 ? d.querySelector(u.swiper) 4568 : u.swiper; 4569 if (h && h.swiper) (u.swiper = h.swiper), a(), l(!0); 4570 else if (h) { 4571 const g = `${e.params.eventsPrefix}init`, 4572 w = (b) => { 4573 (u.swiper = b.detail[0]), 4574 h.removeEventListener(g, w), 4575 a(), 4576 l(!0), 4577 u.swiper.update(), 4578 e.update(); 4579 }; 4580 h.addEventListener(g, w); 4581 } 4582 return h; 4583 }, 4584 m = () => { 4585 if (e.destroyed) return; 4586 p() || requestAnimationFrame(m); 4587 }; 4588 requestAnimationFrame(m); 4589 } else a(), l(!0); 4590 }), 4591 i("slideChange update resize observerUpdate", () => { 4592 l(); 4593 }), 4594 i("setTransition", (u, d) => { 4595 const p = e.thumbs.swiper; 4596 !p || p.destroyed || p.setTransition(d); 4597 }), 4598 i("beforeDestroy", () => { 4599 const u = e.thumbs.swiper; 4600 !u || u.destroyed || (n && u.destroy()); 4601 }), 4602 Object.assign(e.thumbs, { init: a, update: l }); 4603 } 4604 function hi(s) { 4605 const { 4606 effect: e, 4607 swiper: t, 4608 on: i, 4609 setTranslate: r, 4610 setTransition: n, 4611 overwriteParams: o, 4612 perspective: a, 4613 recreateShadows: l, 4614 getEffectParams: u, 4615 } = s; 4616 i("beforeInit", () => { 4617 if (t.params.effect !== e) return; 4618 t.classNames.push(`${t.params.containerModifierClass}${e}`), 4619 a && a() && t.classNames.push(`${t.params.containerModifierClass}3d`); 4620 const p = o ? o() : {}; 4621 Object.assign(t.params, p), Object.assign(t.originalParams, p); 4622 }), 4623 i("setTranslate", () => { 4624 t.params.effect === e && r(); 4625 }), 4626 i("setTransition", (p, m) => { 4627 t.params.effect === e && n(m); 4628 }), 4629 i("transitionEnd", () => { 4630 if (t.params.effect === e && l) { 4631 if (!u || !u().slideShadows) return; 4632 t.slides.forEach((p) => { 4633 p.querySelectorAll( 4634 ".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left" 4635 ).forEach((m) => m.remove()); 4636 }), 4637 l(); 4638 } 4639 }); 4640 let d; 4641 i("virtualUpdate", () => { 4642 t.params.effect === e && 4643 (t.slides.length || (d = !0), 4644 requestAnimationFrame(() => { 4645 d && t.slides && t.slides.length && (r(), (d = !1)); 4646 })); 4647 }); 4648 } 4649 function gi(s, e) { 4650 const t = st(e); 4651 return ( 4652 t !== e && 4653 ((t.style.backfaceVisibility = "hidden"), 4654 (t.style["-webkit-backface-visibility"] = "hidden")), 4655 t 4656 ); 4657 } 4658 function vi(s) { 4659 let { swiper: e, duration: t, transformElements: i, allSlides: r } = s; 4660 const { activeIndex: n } = e, 4661 o = (a) => 4662 a.parentElement 4663 ? a.parentElement 4664 : e.slides.filter( 4665 (u) => u.shadowRoot && u.shadowRoot === a.parentNode 4666 )[0]; 4667 if (e.params.virtualTranslate && t !== 0) { 4668 let a = !1, 4669 l; 4670 r 4671 ? (l = i) 4672 : (l = i.filter((u) => { 4673 const d = u.classList.contains("swiper-slide-transform") ? o(u) : u; 4674 return e.getSlideIndex(d) === n; 4675 })), 4676 l.forEach((u) => { 4677 ts(u, () => { 4678 if (a || !e || e.destroyed) return; 4679 (a = !0), (e.animating = !1); 4680 const d = new window.CustomEvent("transitionend", { 4681 bubbles: !0, 4682 cancelable: !0, 4683 });
4684 e.wrapperEl.dispatchEvent(d); 4685 }); 4686 }); 4687 } 4688 } 4689 function yi(s) { 4690 let { swiper: e, extendParams: t, on: i } = s; 4691 t({ fadeEffect: { crossFade: !1 } }), 4692 hi({ 4693 effect: "fade", 4694 swiper: e, 4695 on: i, 4696 setTranslate: () => { 4697 const { slides: o } = e, 4698 a = e.params.fadeEffect; 4699 for (let l = 0; l < o.length; l += 1) { 4700 const u = e.slides[l]; 4701 let p = -u.swiperSlideOffset; 4702 e.params.virtualTranslate || (p -= e.translate); 4703 let m = 0; 4704 e.isHorizontal() || ((m = p), (p = 0)); 4705 const h = e.params.fadeEffect.crossFade 4706 ? Math.max(1 - Math.abs(u.progress), 0) 4707 : 1 + Math.min(Math.max(u.progress, -1), 0), 4708 g = gi(a, u); 4709 (g.style.opacity = h), 4710 (g.style.transform = `translate3d(${p}px, ${m}px, 0px)`); 4711 } 4712 }, 4713 setTransition: (o) => { 4714 const a = e.slides.map((l) => st(l)); 4715 a.forEach((l) => { 4716 l.style.transitionDuration = `${o}ms`; 4717 }), 4718 vi({ swiper: e, duration: o, transformElements: a, allSlides: !0 }); 4719 }, 4720 overwriteParams: () => ({ 4721 slidesPerView: 1, 4722 slidesPerGroup: 1, 4723 watchSlidesProgress: !0, 4724 spaceBetween: 0, 4725 virtualTranslate: !e.params.cssMode, 4726 }), 4727 }); 4728 } 4729 function ht(s = document) { 4730 const e = s.querySelectorAll(".elty-slider"); 4731 e.length != 0 && 4732 [...e].forEach((t) => { 4733 if (t) { 4734 const i = t.querySelector(".elty-slider-pagination"), 4735 r = t.parentNode.querySelector(".elty-slider-navigation"), 4736 n = { autoplay: { delay: 5e3 }, modules: [pi] }; 4737 if ( 4738 (i && 4739 (n.modules.push(fi), (n.pagination = { el: i, clickable: !0 })), 4740 r && 4741 (n.modules.push(mt), 4742 (n.navigation = { 4743 nextEl: r.querySelector(".elty-slider-next"), 4744 prevEl: r.querySelector(".elty-slider-prev"), 4745 })), 4746 t.classList.contains("elty-slider-section-2") && 4747 ((n.slidesPerView = 2), 4748 (n.spaceBetween = 16), 4749 (n.breakpoints = { 4750 576: { slidesPerView: 3 }, 4751 1024: { slidesPerView: 4 }, 4752 })), 4753 t.classList.contains("elty-hero-slider")) 4754 ) { 4755 (n.effect = "fade"), 4756 (n.fadeEffect = { crossFade: !0 }), 4757 (n.speed = 1e3), 4758 n.modules.push(yi); 4759 const o = t.parentNode.querySelector(".elty-hero-thumbs"); 4760 if (o) { 4761 const a = new Y(o, { 4762 direction: "vertical", 4763 speed: 1e3, 4764 slidesPerView: "auto", 4765 centeredSlides: !1, 4766 spaceBetween: 10, 4767 watchSlidesVisibility: !0, 4768 watchSlidesProgress: !0, 4769 }); 4770 n.modules.push(mi), (n.thumbs = { swiper: a }); 4771 } 4772 } 4773 if ( 4774 (t.classList.contains("elty-slider-section-5") && 4775 ((n.slidesPerView = 2), 4776 (n.spaceBetween = 16), 4777 (n.breakpoints = { 4778 576: { slidesPerView: 3 }, 4779 1024: { slidesPerView: 3 }, 4780 })), 4781 t.classList.contains("elty-slider-section-6") && 4782 (delete n.autoplay, 4783 (n.loop = !1), 4784 (n.slidesPerView = 1.75), 4785 (n.spaceBetween = 16), 4786 (n.breakpoints = { 4787 480: { slidesPerView: 2.5 }, 4788 1024: { slidesPerView: 4.5 }, 4789 })), 4790 t.classList.contains("nxradio-multiradio-slider")) 4791 ) { 4792 const o = t.classList.contains("is-auto-columns"); 4793 (n.slidesPerView = o ? t.dataset.xs : 2), 4794 (n.spaceBetween = 24), 4795 (n.breakpoints = { 4796 768: { slidesPerView: o ? t.dataset.md : 3 }, 4797 1024: { slidesPerView: o ? t.dataset.lg : 5 }, 4798 }); 4799 } 4800 t.classList.contains("nxradio-locutor-slider") && 4801 ((n.slidesPerView = t.dataset.xs ? t.dataset.xs : 2), 4802 (n.spaceBetween = 24), 4803 (n.breakpoints = { 4804 768: { slidesPerView: t.dataset.md ? t.dataset.md : 3 }, 4805 1024: { slidesPerView: t.dataset.lg ? t.dataset.lg : 5 }, 4806 })), 4807 new Y(t, n); 4808 } 4809 }); 4810 } 4811 function gt() { 4812 const s = document.querySelector(".post-share"), 4813 e = document.querySelector(".post"); 4814 if (!s || !e) return; 4815 const t = s.querySelectorAll("a"), 4816 i = s.offsetTop, 4817 r = 600, 4818 n = 400, 4819 o = window.innerWidth / 2 - r / 2, 4820 a = window.innerHeight / 2 - n / 2; 4821 [...t].forEach((u) => { 4822 u.addEventListener("click", function (d) { 4823 d.preventDefault(), 4824 window.open( 4825 u.href, 4826 "Compartir entrada", 4827 `width=${r},height=${n},top=${a},left=${o},scrollbars=yes` 4828 ); 4829 }); 4830 }); 4831 function l() { 4832 const u = e.getBoundingClientRect().top, 4833 d = window.scrollY || window.pageYOffset; 4834 u <= 0 4835 ? (s.style.top = d - e.offsetTop + i + 84 + "px") 4836 : (s.style.top = i + "px"); 4837 } 4838 l(), 4839 window.addEventListener("scroll", () => { 4840 l(); 4841 }); 4842 } 4843 function wi(s) { 4844 const e = document.createElement("video"); 4845 return ( 4846 e.setAttribute("controls", ""), 4847 e.setAttribute("disablePictureInPicture", ""), 4848 e.setAttribute("controlsList", "nodownload noplaybackrate nofullscreen"), 4849 e.setAttribute("src", s), 4850 e 4851 ); 4852 } 4853 function vt() { 4854 const s = document.querySelectorAll(".reels-item"); 4855 if (s.length == 0) return; 4856 const e = document.querySelector(".reels-modal"), 4857 t = document.querySelector(".reels-modal .swiper"), 4858 i = e.querySelectorAll(".reels-video"), 4859 r = e.querySelector(".reels-modal__action .nav"), 4860 n = e.querySelector(".close"); 4861 function o(u) { 4862 const d = u.getAttribute("data-url-video"), 4863 p = u.querySelector("video"); 4864 if (!p) { 4865 const m = wi(d); 4866 u.appendChild(m), m.play(); 4867 } 4868 p && p.play(); 4869 } 4870 function a() { 4871 const u = this.activeIndex, 4872 d = this.slides[u]; 4873 if (!d) return; 4874 const p = d.querySelector(".reels-video");
4875 this.slides.forEach((m) => { 4876 const h = m.querySelector("video"); 4877 h && (h.pause(), (h.currentTime = 0)); 4878 }), 4879 o(p); 4880 } 4881 const l = new Y(t, { 4882 modules: [mt], 4883 direction: "vertical", 4884 spaceBetween: 32, 4885 on: { slideChange: a }, 4886 navigation: { 4887 prevEl: r.querySelector(".prev"), 4888 nextEl: r.querySelector(".next"), 4889 }, 4890 }); 4891 [...s].forEach((u, d) => { 4892 u.addEventListener("click", function () { 4893 const p = d; 4894 e.classList.add("open"), l.slideTo(p); 4895 const m = i[p]; 4896 o(m); 4897 }); 4898 }), 4899 n.addEventListener("click", function () { 4900 e.classList.remove("open"), 4901 [...i].forEach((u) => { 4902 const d = u.querySelector("video"); 4903 d && (d.pause(), (d.currentTime = 0)); 4904 }); 4905 }); 4906 } 4907 function yt(s) { 4908 const e = document.createElement("iframe"); 4909 return ( 4910 (e.src = `https://www.youtube.com/embed/${s}`), 4911 e.setAttribute("allowfullscreen", "1"), 4912 (e.className = "ytube-embed"), 4913 e 4914 ); 4915 } 4916 function wt() { 4917 const s = document.querySelectorAll("#ytlistmini"); 4918 s.length != 0 && 4919 [...s].forEach((e) => { 4920 e.addEventListener("click", function (t) { 4921 const i = t.target; 4922 if (i.matches("button")) { 4923 const r = i.closest(".ytlistmini-item"); 4924 if (r.classList.contains("is-active")) return; 4925 const n = r.parentNode.querySelectorAll(".ytlistmini-item"), 4926 o = r.querySelector(".ytlistmini-iframe"), 4927 a = r.getAttribute("data-youtube-id"); 4928 [...n].forEach((l) => l.classList.remove("is-active")), 4929 r.classList.add("is-active"), 4930 (o.innerHTML = ""), 4931 o.appendChild(yt(a)); 4932 } 4933 }); 4934 }); 4935 } 4936 function St() { 4937 const s = document.querySelectorAll("#ytlistlarge"); 4938 s && 4939 [...s].forEach((e) => { 4940 e.addEventListener("click", function (t) { 4941 const i = t.target; 4942 if (i.matches("button")) { 4943 const r = i.closest(".ytlistlarge-item"); 4944 if (r.classList.contains("is-active")) return; 4945 const n = r.parentNode.querySelectorAll(".ytlistlarge-item"), 4946 o = r.querySelector(".ytlistlarge-iframe"), 4947 a = r.getAttribute("data-youtube-id"); 4948 [...n].forEach((l) => l.classList.remove("is-active")), 4949 r.classList.add("is-active"), 4950 (o.innerHTML = ""), 4951 o.appendChild(yt(a)); 4952 } 4953 }); 4954 }); 4955 } 4956 function bt() { 4957 const s = document.querySelector(".schedule"); 4958 if (!s) return; 4959 const e = document.querySelectorAll(".schedule-header button"); 4960 if (e.length == 0) return; 4961 const t = s.querySelector(".schedule-list__wrapper"), 4962 i = s.querySelector(".schedule-list"), 4963 r = s.querySelector(".schedule-item-template"), 4964 n = s.querySelector(".schedule-info-template"); 4965 [...e].forEach((o) => { 4966 o.addEventListener("click", async function () { 4967 const a = s.getAttribute("data-endpoint"), 4968 l = o.getAttribute("data-day"), 4969 u = s.getAttribute("data-current-day"); 4970 [...e].forEach((p) => p.classList.remove("is-active")), 4971 o.classList.add("is-active"); 4972 let d = await fetch(`${a}/${l}`); 4973 (d = await d.json()), 4974 d.items.length > 0 4975 ? ((t.innerHTML = ""), 4976 i.querySelector(".schedule-info") && 4977 i.querySelector(".schedule-info").remove(), 4978 d.items.forEach((p) => { 4979 let m = r.innerHTML; 4980 (m = m.replace(/{title}/g, p.title)), 4981 (m = m.replace(/{description}/g, p.description)), 4982 (m = m.replace(/{image}/g, p.image)), 4983 (m = m.replace(/{inicio}/g, p.inicio)), 4984 (m = m.replace(/{url}/g, p.url)), 4985 (m = m.replace( 4986 /{onAir}/g, 4987 p.onAir && d.day == u ? "is-current" : "" 4988 )), 4989 t.insertAdjacentHTML("beforeend", m); 4990 })) 4991 : ((t.innerHTML = ""), 4992 i.querySelector(".schedule-info") && 4993 i.querySelector(".schedule-info").remove(), 4994 i.insertAdjacentHTML("beforeend", n.innerHTML)); 4995 }); 4996 }); 4997 } 4998 function Tt() { 4999 const s = document.querySelectorAll(".nexo-tops-item .nexo-tops-votes"); 5000 s.length != 0 &&
5001 [...s].forEach((e) => { 5002 [...e.querySelectorAll("button")].forEach((i) => { 5003 i.addEventListener("click", async (r) => { 5004 r.stopPropagation(); 5005 const n = i.getAttribute("data-pid"), 5006 o = i.getAttribute("data-type"), 5007 a = i.querySelector("i"), 5008 l = i.parentNode.querySelector(".total-votes"), 5009 u = `${nxradioApiSettings.root}nexoradio/v1/vote/${n}/${o}`, 5010 d = a.className; 5011 a.className = "fas fa-spinner fa-spin-pulse"; 5012 let p = await fetch(u); 5013 (p = await p.json()), 5014 (a.classList = d), 5015 p.status == !0 && 5016 (i.parentNode.classList.add("disabled"), 5017 (l.innerHTML = p.votes)); 5018 }); 5019 }); 5020 }); 5021 } 5022 function Si() { 5023 const s = new jt("#ajaxify", { 5024 documentHeadRefresh: !0, 5025 refreshElementorScripts: !0, 5026 keepPosition: ["comment-reply-link"], 5027 }); 5028 s.start(); 5029 function e() { 5030 const t = document.querySelector(".offcanvas"); 5031 if (t) { 5032 const i = document.querySelector(".offcanvas-overlay"); 5033 t.classList.remove("on"), 5034 i.classList.remove("on"), 5035 (document.body.style.overflow = null); 5036 } 5037 } 5038 s.onChangePage(function (t, i) { 5039 (i.isPostPage || i.isTemplatePage) && gt(), 5040 (i.isHomePage || i.isTemplatePage) && (ht(), vt(), bt(), Tt()), 5041 wt(), 5042 St(), 5043 e(), 5044 i.isPostPage && 5045 window.setTimeout(() => { 5046 typeof window.instgrm < "u" && window.instgrm.Embeds.process(), 5047 window.twttr && window.twttr.widgets.load(); 5048 }, 1200); 5049 }), 5050 s.hotChange([".hder", ".hder-top", "#ajaxify-offcanvas"]), 5051 s.onChangePageSearch(function () { 5052 const t = document.querySelector(".elty-search-box"); 5053 t && (t.remove(), (document.body.style.overflow = null)); 5054 }); 5055 } 5056 function bi() { 5057 const s = document.querySelector(".newsletter"); 5058 if (!s) return; 5059 const e = Array.from(s.querySelectorAll("li")); 5060 let t = 0, 5061 i; 5062 function r() { 5063 i = setInterval(function () { 5064 (t = t + 1), 5065 t >= e.length && (t = 0), 5066 e.forEach((o) => o.classList.remove("is-active")), 5067 e[t].classList.add("is-active"); 5068 }, 3e3); 5069 } 5070 function n() { 5071 clearInterval(i); 5072 } 5073 r(), 5074 s.addEventListener("mouseenter", n), 5075 s.addEventListener("mouseleave", r); 5076 } 5077 function Ti(s) { 5078 const e = document.createElement("div"), 5079 t = document.createElement("form"), 5080 i = document.createElement("input"), 5081 r = document.createElement("i"); 5082 return ( 5083 e.classList.add("elty-search-box"), 5084 t.classList.add("elty-search-box__form"), 5085 (t.action = s), 5086 (t.method = "GET"), 5087 (i.type = "text"), 5088 (i.placeholder = "Buscar entrada"), 5089 (i.name = "s"), 5090 (r.className = "fa-solid fa-magnifying-glass"), 5091 t.appendChild(r), 5092 t.appendChild(i), 5093 e.appendChild(t), 5094 e.addEventListener("click", function (n) { 5095 n.target.matches(".elty-search-box") && 5096 (e.remove(), (document.body.style.overflow = null)); 5097 }), 5098 document.addEventListener("keydown", function (n) { 5099 (n.key == "Escape" || n.key === "Esc") && 5100 (e.remove(), (document.body.style.overflow = null)); 5101 }), 5102 e 5103 ); 5104 } 5105 function xi() { 5106 const s = document.querySelector(".btn-search"); 5107 if (!s) return; 5108 const e = document.body, 5109 t = Ti(s.getAttribute("data-home")), 5110 i = t.querySelector("input"); 5111 s.addEventListener("click", function () { 5112 e.appendChild(t), (e.style.overflow = "hidden"), i.focus(); 5113 }); 5114 } 5115 function Ei() { 5116 const s = document.querySelector(".btn-menu"); 5117 if (!s) return; 5118 const e = document.body, 5119 t = document.querySelector(".offcanvas"), 5120 i = document.querySelector(".offcanvas-overlay"), 5121 r = document.querySelector(".offcanvas-close"); 5122 s.addEventListener("click", function (n) { 5123 n.stopPropagation(), 5124 t.classList.add("on"), 5125 i.classList.add("on"), 5126 (e.style.overflow = "hidden"); 5127 }), 5128 i.addEventListener("click", function () { 5129 t.classList.remove("on"), 5130 i.classList.remove("on"), 5131 (e.style.overflow = null); 5132 }), 5133 r.addEventListener("click", function () { 5134 t.classList.remove("on"), 5135 i.classList.remove("on"), 5136 (e.style.overflow = null); 5137 }), 5138 document.addEventListener("keydown", function (n) { 5139 (n.key == "Escape" || n.key === "Esc") && 5140 (t.classList.remove("on"), 5141 i.classList.remove("on"), 5142 (e.style.overflow = null)); 5143 }); 5144 } 5145 function Li() { 5146 const s = document.querySelectorAll(".menu"); 5147 s &&
5148 [...s].forEach((e) => { 5149 [...e.querySelectorAll("ul li")].map((i) => { 5150 const r = i.querySelector("a"); 5151 if (r.parentNode.querySelector(".sub-menu")) { 5152 const a = document.createElement("span"); 5153 a.classList.add("has-child-ico"), 5154 (a.innerHTML = '<i class="fas fa-angle-down"></i>'), 5155 r.classList.add("has-child"), 5156 r.appendChild(a); 5157 } 5158 }); 5159 }); 5160 } 5161 function Ci(s) { 5162 const e = window.getComputedStyle(s); 5163 if (e.height === "0px") { 5164 s.style.height = "auto"; 5165 const t = s.offsetHeight + "px"; 5166 (s.style.height = "0px"), 5167 setTimeout(() => { 5168 s.style.height = t; 5169 }, 10); 5170 } else 5171 (s.style.height = e.height), 5172 setTimeout(() => { 5173 s.style.height = "0px"; 5174 }, 10); 5175 s.addEventListener( 5176 "transitionend", 5177 () => { 5178 s.style.height !== "0px" && (s.style.height = "auto"); 5179 }, 5180 { once: !0 } 5181 ); 5182 } 5183 function Pi() { 5184 const s = document.querySelectorAll(".offcanvas-menu a"); 5185 s.length !== 0 && 5186 [...s].forEach((e) => { 5187 e.addEventListener("click", function (t) { 5188 const i = t.target, 5189 r = i.closest("li").querySelector(".sub-menu"); 5190 i.matches("span") && (t.preventDefault(), r && Ci(r)); 5191 }); 5192 }); 5193 } 5194 function Mi(s, e) { 5195 if (!s) return; 5196 const t = document.getElementById(s.dataset.outside); 5197 if (!t) return; 5198 function i() { 5199 if ( 5200 (s.classList.toggle(e), t.classList.toggle(e), s.classList.contains(e)) 5201 ) { 5202 document.addEventListener("click", r); 5203 return; 5204 } 5205 document.removeEventListener("click", r); 5206 } 5207 s.addEventListener("click", i); 5208 function r(o) { 5209 !t.contains(o.target) && 5210 !s.contains(o.target) && 5211 (i(), document.removeEventListener("click", r)); 5212 } 5213 const n = t.querySelector("[data-close]"); 5214 n && 5215 n.addEventListener("click", () => { 5216 s.classList.remove(e), 5217 t.classList.remove(e), 5218 document.removeEventListener("click", r); 5219 }); 5220 } 5221 function Ai(s, e) {
5222 s.forEach((t) => { 5223 Mi(t, e); 5224 }); 5225 } 5226 function xt(s, e) { 5227 const t = document.querySelector("html"), 5228 i = document.querySelector("meta[name=theme-color]"); 5229 s.complete 5230 ? (t.setAttribute("style", `--accent: rgb(${e.getColor(s)})`), 5231 i.setAttribute("content", `rgb(${e.getColor(s)})`)) 5232 : s.addEventListener("load", function () { 5233 t.setAttribute("style", `--accent: rgb(${e.getColor(s)})`), 5234 i.setAttribute("content", `rgb(${e.getColor(s)})`); 5235 }); 5236 } 5237 function Et(s) { 5238 return new Promise((e, t) => { 5239 const i = document.createElement("img"); 5240 (i.crossOrigin = "Anonymous"), 5241 (i.src = `https://images.weserv.nl/?url=${s}`), 5242 (i.onload = () => e(i)), 5243 (i.onerror = t); 5244 }); 5245 } 5246 function _e(s, e) { 5247 if (!s || !e) return; 5248 const t = s.querySelector(".player-picture img:first-child"), 5249 i = s.querySelector(".player-bg"), 5250 r = s.querySelector(".station-name"), 5251 n = s.querySelector(".stream-name"), 5252 o = s.querySelector(".stream-description"), 5253 a = s.querySelector(".station-tv"), 5254 l = s.querySelector(".station-picture img"); 5255 if (t) { 5256 const u = new ColorThief(); 5257 Et(e.picture).then((d) => { 5258 xt(d, u); 5259 }), 5260 (t.src = e.picture); 5261 } 5262 i && (i.src = e.background), 5263 r && (r.textContent = e.name), 5264 n && (n.textContent = e.name), 5265 o && (o.textContent = e.description), 5266 a && a.classList.remove("none"), 5267 l && (l.src = e.picture); 5268 } 5269 function Ii(s) { 5270 const e = document.createElement("canvas"); 5271 return ( 5272 e.setAttribute("id", "visualizerCanvas"), 5273 e.setAttribute("class", "visualizer-item"), 5274 s.appendChild(e), 5275 (e.width = s.clientWidth), 5276 (e.height = s.clientHeight), 5277 e 5278 ); 5279 } 5280 function Lt(s, e) { 5281 (s.width = e.clientWidth), (s.height = e.clientHeight); 5282 } 5283 function ki(s, e) { 5284 if (!s || !e) return; 5285 const t = { 5286 fftSize: e.dataset.fftSize || 2048, 5287 numBars: e.dataset.bars || 40, 5288 maxHeight: 80, 5289 }, 5290 i = new AudioContext(), 5291 r = i.createMediaElementSource(s), 5292 n = i.createAnalyser(); 5293 r.connect(n), r.connect(i.destination); 5294 const o = new Uint8Array(n.frequencyBinCount), 5295 a = Ii(e), 5296 l = a.getContext("2d"), 5297 u = () => { 5298 Lt(a, e), 5299 n.getByteFrequencyData(o), 5300 t.fftSize && (n.fftSize = t.fftSize), 5301 l.clearRect(0, 0, a.width, a.height); 5302 for (let d = 0; d < t.numBars; d++) { 5303 const p = Math.floor((d + 10) * (d < t.numBars / 2 ? 2 : 1)), 5304 m = o[p], 5305 h = Math.max(4, (m / 255) * t.maxHeight), 5306 g = a.width / t.numBars, 5307 w = d * g, 5308 b = a.height - h; 5309 (l.fillStyle = "white"), l.fillRect(w, b, g - 2, h); 5310 } 5311 requestAnimationFrame(u); 5312 }; 5313 u(), 5314 window.addEventListener("resize", () => { 5315 Lt(a, e); 5316 }); 5317 } 5318 function Oi(s) { 5319 return new Date(s * 1e3); 5320 } 5321 function $i(s) { 5322 const e = (o) => (Date.now() - o) / 1e3, 5323 t = { day: 86400, hour: 3600, minute: 60, second: 1 }, 5324 i = (o) => { 5325 for (const [a, l] of Object.entries(t)) 5326 if (o >= l || a === "second") 5327 return { value: Math.floor(o / l) * -1, unit: a }; 5328 }, 5329 r = (o) => { 5330 const a = new Intl.RelativeTimeFormat(), 5331 l = e(o), 5332 { value: u, unit: d } = i(l); 5333 return a.format(u, d); 5334 }, 5335 n = new Date(s); 5336 return r(n); 5337 } 5338 function zi(s, e) { 5339 return (s * 100) / e; 5340 } 5341 function Ct(s) { 5342 const e = Math.floor(s / 60), 5343 t = s % 60; 5344 return `${e}:${t.toFixed(0) < 10 ? "0" : ""}${t.toFixed(0)}`; 5345 } 5346 function Di() { 5347 const s = document.querySelectorAll("[data-outside]"),
5348 e = "is-active", 5349 t = "1637b78dc3b129e6843ed674489a92d0", 5350 i = {}, 5351 r = { 5352 play: '<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>', 5353 pause: 5354 '<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /><path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /></svg>', 5355 stop: '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M6 5H18C18.5523 5 19 5.44772 19 6V18C19 18.5523 18.5523 19 18 19H6C5.44772 19 5 18.5523 5 18V6C5 5.44772 5.44772 5 6 5Z"/></svg>', 5356 }, 5357 n = 5358 "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P//PxcACQYDCF0ysWYAAAAASUVORK5CYII=", 5359 o = async (c) => { 5360 const v = await ( 5361 await fetch(`https://radioapi.lat/search?query=${c}`) 5362 ).json(); 5363 return v.results.length === 0 5364 ? ( 5365 await ( 5366 await fetch( 5367 `https://itunes.apple.com/search?term=${c}&entity=song&limit=1` 5368 ) 5369 ).json() 5370 ).results[0] 5371 : v.results; 5372 }, 5373 a = async (c) => { 5374 const f = `${c.artist} ${c.title}`, 5375 v = `${f}`; 5376 if (i[v]) return i[v]; 5377 const y = await o(encodeURIComponent(f)), 5378 E = { ...c, ...y }; 5379 if (y.artworkUrl100) { 5380 const H = (I) => y.artworkUrl100.replace("100x100bb", `${I}x${I}bb`); 5381 (E.artworkUrl100 = H("100")), 5382 (E.artworkUrl500 = H("500")), 5383 (E.artworkUrl1000 = H("1000")), 5384 (E.artworkUrl2000 = H("2000")); 5385 } else 5386 (E.artworkUrl100 = y.artwork || n), 5387 (E.artworkUrl500 = y.artwork || n), 5388 (E.artworkUrl1000 = y.artwork || n), 5389 (E.artworkUrl2000 = y.artwork || n); 5390 return (i[v] = E), E; 5391 }; 5392 function l(c, f) { 5393 return { 5394 artist: c.artist, 5395 title: c.title, 5396 playedAt: c.playedAt, 5397 duration: c.duration, 5398 elapsed: c.elapsed, 5399 remaining: c.remaining, 5400 artwork: f.picture || n, 5401 artworkUrl100: f.picture || n, 5402 artworkUrl500: f.picture || n, 5403 artworkUrl1000: f.picture || n, 5404 artworkUrl2000: f.picture || n, 5405 }; 5406 } 5407 const u = async (c, f) => { 5408 try { 5409 // Primer intento: Vagalume API 5410 const y = await ( 5411 await fetch( 5412 `https://api.vagalume.com.br/search.php?apikey=${t}&art=${encodeURIComponent( 5413 c 5414 )}&mus=${encodeURIComponent(f)}` 5415 ) 5416 ).json(); 5417 5418 if (y.type === "exact" || y.type === "aprox") { 5419 return y.mus[0].text; 5420 } else { 5421 console.log("Vagalume no encontró la letra. Intentando con Lyrics.ovh..."); 5422 } 5423 } catch (error) { 5424 console.error("Error en Vagalume API:", error); 5425 } 5426 5427 try { 5428 // Segundo intento: Lyrics.ovh API 5429 const response = await fetch( 5430 `https://api.lyrics.ovh/v1/${encodeURIComponent(c)}/${encodeURIComponent(f)}` 5431 ); 5432 if (!response.ok) throw new Error("Lyrics.ovh API no respondió"); 5433 const data = await response.json(); 5434 return data.lyrics || "Letra no disponible"; 5435 } catch (error) { 5436 console.error("Error en Lyrics.ovh API:", error); 5437 return "Letra no disponible"; 5438 } 5439 }; 5440 5441 function d(c) { 5442 const f = document.createElement("div"); 5443 return (f.innerHTML = c.trim()), f.firstChild; 5444 } 5445 function p(c) { 5446 return c.replace(/^\d+\.\)\s/, "").replace(/<br>$/, ""); 5447 } 5448 function m(c) { 5449 let f, 5450 v, 5451 y = !1, 5452 E = !1, 5453 H = !1, 5454 I = !1; 5455 return (c.song_history || c.history || c.songHistory || []).map( 5456 (L) => ( 5457 c.song_history 5458 ? ((f = L.song.artist), 5459 (v = L.song.title), 5460 (y = L.played_at), 5461 (E = L.duration), 5462 (H = L.elapsed), 5463 (I = L.remaining)) 5464 : c.history 5465 ? ((f = p(L.split(" - ")[0] || L)), (v = p(L.split(" - ")[1] || L))) 5466 : c.songHistory && ((f = L.artist), (v = L.title || L.song)), 5467 { 5468 artist: f, 5469 title: v, 5470 playedAt: y, 5471 duration: E, 5472 elapsed: H, 5473 remaining: I, 5474 } 5475 ) 5476 ); 5477 } 5478 function h(c) { 5479 let f, 5480 v, 5481 y = !1, 5482 E = !1, 5483 H = !1, 5484 I = !1; 5485 return ( 5486 c.songtitle 5487 ? ((f = c.songtitle.split(" - ")[1]), 5488 (v = c.songtitle.split(" - ")[0])) 5489 : c.now_playing 5490 ? ((f = c.now_playing.song.title), 5491 (v = c.now_playing.song.artist), 5492 (y = c.now_playing.played_at), 5493 (E = c.now_playing.duration), 5494 (H = c.now_playing.elapsed), 5495 (I = c.now_playing.remaining)) 5496 : c.artist && c.title 5497 ? ((f = c.title), (v = c.artist)) 5498 : c.currenttrack_title 5499 ? ((f = c.currenttrack_title), (v = c.currenttrack_artist)) 5500 : c.title && c.djusername 5501 ? ((f = c.title.split(" - ")[1]), (v = c.title.split(" - ")[0])) 5502 : ((f = c.currentSong), (v = c.currentArtist)), 5503 { 5504 title: f, 5505 artist: v, 5506 playedAt: y, 5507 duration: E, 5508 elapsed: H, 5509 remaining: I, 5510 } 5511 ); 5512 } 5513 function g(c) { 5514 return new Promise((f, v) => { 5515 const y = new Image(); 5516 (y.onload = () => f(y)), (y.onerror = v), (y.src = c); 5517 }); 5518 } 5519 function w(c, f) { 5520 const v = document.createElement("img"), 5521 y = c.clientHeight; 5522 (v.src = f), (v.width = y), (v.height = y), c.appendChild(v); 5523 const E = c.querySelector("img:first-child"); 5524 (E.style.marginLeft = `-${y}px`), 5525 E.addEventListener( 5526 "transitionend", 5527 () => { 5528 c.querySelectorAll("img:not(:last-child)").forEach((I) => 5529 I.remove() 5530 ); 5531 }, 5532 { once: !0 } 5533 ); 5534 } 5535 function b(c, f) { 5536 (c.style.opacity = 0), 5537 c.addEventListener("transitionend", () => { 5538 (c.src = f), 5539 (c.style.opacity = 1), 5540 c.addEventListener( 5541 "transitionend", 5542 () => { 5543 c.removeAttribute("style"); 5544 }, 5545 { once: !0 } 5546 ); 5547 }); 5548 } 5549 function S() { 5550 if (window.stream_active) return; 5551 (window.stream_active = !0), Ai(s, e); 5552 function c(x, P = null) { 5553 P && (x.src = P), 5554 U || (ki(x, V), (U = !0)), 5555 x.load(), 5556 x.play(), 5557 (te.innerHTML = r.pause), 5558 te.classList.add("is-active"); 5559 } 5560 function f(x) { 5561 x.pause(), (te.innerHTML = r.play), te.classList.remove("is-active"); 5562 } 5563 const v = document.querySelector(".player-volume"), 5564 y = document.querySelector(".player-range-fill"), 5565 E = document.querySelector(".player-range-wrapper"), 5566 H = document.querySelector(".player-range-thumb"); 5567 let I;
5568 try { 5569 I = localStorage.getItem("volume") || 100; 5570 } catch (x) { 5571 (I = 100), 5572 console.log("Error al obtener el volumen del localStorage:", x); 5573 } 5574 let D, 5575 T, 5576 L = {}, 5577 k = !1, 5578 C; 5579 function $(x) { 5580 y.style.height = `${x}%`; 5581 } 5582 function B(x) { 5583 const P = E.offsetHeight - H.offsetHeight, 5584 M = (x / 100) * P; 5585 H.style.bottom = `${M}px`; 5586 } 5587 function R(x, P) { 5588 (v.value = P), 5589 $(P), 5590 B(P), 5591 (x.volume = P / 100), 5592 localStorage?.setItem("volume", P); 5593 } 5594 const te = document.querySelector(".player-button-play"), 5595 V = document.querySelector(".visualizer"); 5596 let U = !1; 5597 const O = new Audio(); 5598 (O.crossOrigin = "anonymous"), 5599 te !== null && 5600 te.addEventListener("click", async () => { 5601 O.paused ? c(O) : f(O); 5602 }), 5603 v !== null && 5604 (R(O, I), 5605 v.addEventListener("input", (x) => { 5606 R(O, x.target.value); 5607 }), 5608 H.addEventListener("mousedown", () => { 5609 document.addEventListener("mousemove", se); 5610 })); 5611 function se(x) { 5612 const P = v.getBoundingClientRect(); 5613 let A = ((x.clientY - P.top) / v.offsetWidth) * 100; 5614 (A = 100 - A), (A = Math.max(0, Math.min(100, A))); 5615 const q = Math.round((v.max - v.min) * (A / 100)) + parseInt(v.min); 5616 R(O, q); 5617 } 5618 document.addEventListener("mouseup", () => { 5619 document.removeEventListener("mousemove", se); 5620 }), 5621 window.addEventListener("resize", () => { 5622 const x = v.value; 5623 $(x), B(x); 5624 }); 5625 const ne = document.getElementById("app-super"), 5626 Re = document.getElementById("super-player"), 5627 Te = document.getElementById("player-expand"), 5628 Pt = document.getElementById("player-down-up"), 5629 ae = document.querySelector(".player-button-tv"); 5630 Pt && 5631 Pt.addEventListener("click", () => { 5632 Re.classList.contains("is-hidden") 5633 ? Re.classList.remove("is-hidden") 5634 : Re.classList.toggle("is-hidden"); 5635 }), 5636 Te && 5637 Te.addEventListener("click", () => { 5638 ne.classList.contains("is-expanded") 5639 ? ((document.body.style.overflow = "auto"), 5640 Te.classList.remove("is-open"), 5641 ne.classList.remove("is-expanded")) 5642 : ((document.body.style.overflow = "hidden"), 5643 Te.classList.add("is-open"), 5644 ne.classList.add("is-expanded")); 5645 }); 5646 const Vi = document.querySelector(".song-now"), 5647 je = document.getElementById("lyrics"), 5648 xe = document.getElementById("historyp"), 5649 Mt = `<div class="historyp-item flex items-center g-0.75"> 5650 <div class="historyp-image flex-none"> 5651 <img src="{{art}}" width="80" height="80"> 5652 </div> 5653 <div class="historyp-body truncate-line"> 5654 <span class="historyp-name color-title fw-500">{{song}}</span> 5655 <span class="historyp-time color-text" data-time-ago="{{timeAgo}}">{{artist}}</span> 5656 </div> 5657</div>`; 5658 let he, 5659 We = "", 5660 Ee; 5661 const Ni = window?.streams?.timeRefresh || 1e4; 5662 function At(x, P) { 5663 const M = zi(P, x); 5664 ne.style.setProperty("--song-progress", `${2 + M}%`); 5665 const A = document.querySelector(".song-elapsed"), 5666 q = document.querySelector(".song-duration"); 5667 A && (A.textContent = Ct(P)), q && (q.textContent = Ct(x)); 5668 } 5669 function Ue(x) { 5670 const { 5671 title: P, 5672 artist: M, 5673 album: A, 5674 artworkUrl100: q, 5675 artworkUrl500: _, 5676 } = x; 5677 "mediaSession" in navigator && 5678 ((navigator.mediaSession.metadata = new MediaMetadata({ 5679 title: P, 5680 artist: M, 5681 album: A, 5682 artwork: [ 5683 { src: q, sizes: "128x128", type: "image/png" }, 5684 { src: _, sizes: "256x256", type: "image/png" }, 5685 { src: _, sizes: "512x512", type: "image/png" }, 5686 ], 5687 })), 5688 navigator.mediaSession.setActionHandler("play", () => { 5689 c(O); 5690 }), 5691 navigator.mediaSession.setActionHandler("pause", () => { 5692 f(O); 5693 })); 5694 } 5695 const It = document.getElementById("modal-body-video"); 5696 function Gi(x) { 5697 const P = document.createElement("video"); 5698 (P.id = "player"), 5699 P.classList.add("video-js", "video-js-stream"), 5700 (It.innerHTML = ""), 5701 It.appendChild(P), 5702 (he = videojs(P, { 5703 sources: [{ src: x.tv_url, type: "application/x-mpegURL" }], 5704 controls: !0, 5705 autoplay: !0, 5706 })); 5707 } 5708 function Ye(x, P) { 5709 const M = document.getElementById("modal-tv"), 5710 A = M.querySelector("[data-close]"); 5711 x && 5712 (x.onclick = () => { 5713 if (x.classList.contains("is-active")) { 5714 c(O), 5715 M.classList.remove("is-active"), 5716 x.classList.remove("is-active"), 5717 he && he.dispose(); 5718 return; 5719 } 5720 f(O), 5721 M.classList.add("is-active"), 5722 x.classList.add("is-active"), 5723 Gi(P); 5724 }), 5725 A && 5726 (A.onclick = () => { 5727 he && (he.dispose(), c(O)), 5728 M.classList.remove("is-active"), 5729 x.classList.remove("is-active"); 5730 }); 5731 } 5732 function Fi() { 5733 const x = document.querySelector(".player-custom-play"); 5734 x && 5735 x.addEventListener("click", (P) => { 5736 P.preventDefault(), O.paused && c(O); 5737 }); 5738 } 5739 function kt(x) { 5740 const P = x.querySelector(".song-title"); 5741 if (P.scrollWidth > x.offsetWidth) { 5742 P.classList.add("is-scrolling"); 5743 const M = P.scrollWidth - x.offsetWidth, 5744 A = 5e3 + M * 100; 5745 P.setAttribute( 5746 "style", 5747 `--text-scroll-duration: ${A}ms; --text-scroll: -${M}px` 5748 ); 5749 return; 5750 } 5751 P.classList.remove("is-scrolling"), P.removeAttribute("style"); 5752 } 5753 function Ri(x, P) { 5754 const { pod_titulo: M, pod_desc: A, pod_url: q, pod_imagen: _ } = x; 5755 return { 5756 mp3: q, 5757 title: M, 5758 artist: A, 5759 artworkUrl100: `${P}${_}`, 5760 artworkUrl500: `${P}${_}`, 5761 artworkUrl1000: `${P}${_}`, 5762 }; 5763 } 5764 function Ot() { 5765 At(O.duration, O.currentTime); 5766 } 5767 function ji(x, P) { 5768 if (k && C === x) { 5769 (x.innerHTML = r.play), 5770 (O.src = D.stream_url), 5771 Xe(L), 5772 Ue(L), 5773 c(O), 5774 (k = !1), 5775 O.removeEventListener("timeupdate", Ot), 5776 x.parentNode.classList.remove("is-playing"); 5777 return; 5778 } 5779 document.querySelectorAll(".nexo-tops-button").forEach((A) => { 5780 (A.innerHTML = r.play), C?.parentNode.classList.remove("is-playing"); 5781 }), 5782 (x.innerHTML = r.stop), 5783 (C = x), 5784 x.parentNode.classList.add("is-playing"), 5785 Xe(P), 5786 Ue(P), 5787 (O.src = P.mp3), 5788 O.addEventListener("timeupdate", Ot), 5789 c(O), 5790 (k = !0); 5791 } 5792 function Xe(x) { 5793 const { 5794 title: P, 5795 artist: M, 5796 artworkUrl100: A, 5797 artworkUrl500: q, 5798 artworkUrl1000: _, 5799 } = x, 5800 z = Vi, 5801 N = document.querySelectorAll(".song-name"), 5802 F = document.querySelectorAll(".song-artist"), 5803 W = document.querySelector(".social-facebook"), 5804 J = document.querySelector(".social-twitter"), 5805 G = document.querySelector(".social-whatsapp"), 5806 Z = window.location.origin; 5807 (W.href = `https://www.facebook.com/sharer/sharer.php?u=${Z}`), 5808 (J.href = `https://twitter.com/intent/tweet?text=${We}`),
5809 (G.href = `https://api.whatsapp.com/send?text=${We}`), 5810 N.forEach((ce) => { 5811 ce.textContent = P; 5812 }), 5813 F.forEach((ce) => { 5814 ce.textContent = M; 5815 }); 5816 const ie = z.querySelector(".player-title-fix"); 5817 kt(ie), 5818 Ee && Ee.disconnect(), 5819 (Ee = new ResizeObserver(() => { 5820 kt(ie); 5821 })), 5822 Ee.observe(ie); 5823 const ue = z.querySelector(".player-artwork"), 5824 fe = _ || q || A, 5825 Pe = document.querySelector(".player-modal-image"), 5826 Gt = document.querySelector(".player-left"); 5827 Gt.style.removeProperty("--artwork"), 5828 Gt.style.setProperty("--artwork", `url(${fe})`), 5829 Pe && (Pe.src = fe), 5830 ue && 5831 g(fe) 5832 .then(() => w(ue, fe)) 5833 .catch(() => { 5834 console.error("Error al cargar arte de la canci\xF3n"); 5835 }); 5836 const Ft = document.querySelector(".player-bg"); 5837 if (Ft) { 5838 const ce = _ || q || A, 5839 Rt = document.createElement("img"); 5840 Rt.src = ce; 5841 const dn = new ColorThief(); 5842 Et(Rt.src).then((cn) => { 5843 xt(cn, dn); 5844 }), 5845 g(ce) 5846 .then(() => b(Ft, ce)) 5847 .catch(() => { 5848 console.error("Error al cargar la portada de la canci\xF3n"); 5849 }); 5850 } 5851 } 5852 function Wi(x) { 5853 x.paused && c(x); 5854 } 5855 function Ui(x, P) { 5856 if ( 5857 !xe || 5858 ((xe.innerHTML = Mt.replace("{{art}}", n) 5859 .replace("{{song}}", "Cargando historial...") 5860 .replace("{{artist}}", "Artista") 5861 .replace("{{timeAgo}}", "time-none")), 5862 !x) 5863 ) 5864 return; 5865 const M = x.map(async (A) => { 5866 const { artist: q, title: _, playedAt: z, elapsed: N } = A, 5867 F = await a({ title: _, artist: q }), 5868 W = Mt.replace("{{art}}", F.artworkUrl100 ?? (P.artwork || n)) 5869 .replace("{{song}}", F.title) 5870 .replace("{{artist}}", F.artist) 5871 .replace("{{timeAgo}}", "time-none"); 5872 return N 5873 ? W.replace("time-none", "Ahora") 5874 : z 5875 ? W.replace("time-none", $i(Oi(z))) 5876 : W; 5877 }); 5878 Promise.all(M) 5879 .then((A) => { 5880 const q = document.createDocumentFragment(); 5881 A.forEach((_) => { 5882 q.appendChild(d(_)); 5883 }), 5884 (xe.innerHTML = ""), 5885 xe.appendChild(q); 5886 }) 5887 .catch((A) => { 5888 console.error("Error:", A); 5889 }); 5890 } 5891 function Yi(x, P) { 5892 je && 5893 u(x, P) 5894 .then((M) => { 5895 const A = document.createElement("p"); 5896 (A.innerHTML = M.replace(/\n/g, "<br>")), 5897 (je.innerHTML = ""), 5898 je.appendChild(A); 5899 }) 5900 .catch((M) => { 5901 console.error("Error:", M); 5902 }); 5903 } 5904 function Xi(x, P = !1) { 5905 const M = x, 5906 A = { attributes: !1, childList: !0, subtree: !1 }, 5907 q = (z) => { 5908 for (const N of z) 5909 if (P && typeof P == "function") { 5910 P(N); 5911 break; 5912 } 5913 }; 5914 new MutationObserver(q).observe(M, A); 5915 } 5916 function Ke(x) { 5917 window.mixxFunctions.dataTops = x; 5918 const P = document.getElementById("player-tops"); 5919 P && 5920 P.addEventListener("click", function (M) { 5921 const A = M.target,
5922 q = A.closest(".nexo-tops-item"), 5923 _ = A.closest(".nexo-tops-head"), 5924 z = A.closest(".nexo-tops-button"); 5925 if ((_ && _.classList.toggle("is-active"), z)) { 5926 const N = Ri(JSON.parse(q.getAttribute("data-item")), le); 5927 ji(z, N); 5928 } 5929 }); 5930 } 5931 function Qe(x) { 5932 window.mixxFunctions.dataTops = x; 5933 const P = document.getElementById("player-video-tops"); 5934 if (!P) return; 5935 const M = P.querySelector(".nexo-vid-tops-list"), 5936 A = P.querySelector(".nexo-vid-tops-video"); 5937 if (!P) return; 5938 let q, _; 5939 function z(N, F, W = !1) { 5940 const J = document.createElement("video"); 5941 _ && W && (_.pause(), _.dispose()), 5942 (J.id = "player"), 5943 (J.poster = F), 5944 J.classList.add("video-js", "video-js-stream"), 5945 (A.innerHTML = ""), 5946 A.appendChild(J); 5947 const G = videojs(J, { sources: [{ src: N }], controls: !0 }); 5948 (_ = G), 5949 G.ready(() => { 5950 W && 5951 setTimeout(() => { 5952 G.play() 5953 ?.then(() => { 5954 console.log("Reproduciendo video"), de && f(O); 5955 }) 5956 .catch(() => { 5957 console.error("Error al reproducir video"); 5958 }); 5959 }, 500), 5960 G.on("play", () => { 5961 de && f(O); 5962 }), 5963 G.on("pause", () => { 5964 de && Wi(O); 5965 }); 5966 }); 5967 } 5968 fetch(x) 5969 .then((N) => N.json()) 5970 .then((N) => { 5971 const F = `<div class="nexo-vid-tops-item"> 5972 <button class="nexo-vid-tops"> 5973 <div class="nexo-vid-tops-image-container"> 5974 <span>{{number}}</span> 5975 <img src="{{img}}" alt="imagen" class="nexo-vid-tops-image" width="140"> 5976 </div> 5977 <div class="nexo-vid-tops-data"> 5978 <div class="nexo-vid-tops-title">{{title}}</div> 5979 <span class="nexo-vid-tops-artist">{{description}}</span> 5980 </div> 5981 </button> 5982 </div>`, 5983 W = document.createDocumentFragment(); 5984 N.forEach((G, Z) => { 5985 const ie = `${le}${G.photo}`, 5986 ue = `${le}${G.video}`; 5987 Z === 0 && z(ue, ie); 5988 const fe = F.replace("{{number}}", Z + 1) 5989 .replace("{{img}}", ie) 5990 .replace(/{{title}}/g, G.nombre) 5991 .replace(/{{description}}/g, G.descripcion), 5992 Pe = d(fe); 5993 W.appendChild(Pe); 5994 }), 5995 (M.innerHTML = ""), 5996 M.appendChild(W), 5997 document.querySelectorAll(".nexo-vid-tops").forEach((G, Z) => { 5998 Z === 0 && (G.classList.add("is-active"), (q = G)), 5999 G.addEventListener("click", () => { 6000 if (q === G) return; 6001 q && q.classList.remove("is-active"), 6002 G.classList.add("is-active"), 6003 (q = G); 6004 const ie = `${le}${N[Z].video}`, 6005 ue = `${le}${N[Z].photo}`; 6006 z(ie, ue, !0); 6007 }); 6008 }); 6009 }) 6010 .catch((N) => { 6011 console.error("Error:", N); 6012 }); 6013 } 6014 window.mixxFunctions = { loadTops: Ke, loadVideoTops: Qe }; 6015 let $t, 6016 Je, 6017 Le = []; 6018 const oe = window.streams || {}, 6019 de = document.getElementById("app-player"), 6020 Ki = document.querySelector(".player-wrapper"), 6021 zt = oe.lyrics || !1, 6022 Qi = oe.program || !1, 6023 Ji = oe.expand || !1, 6024 Zi = oe.share_buttons || !1, 6025 le = oe.base_url || "", 6026 Dt = oe.url_server || "api/", 6027 qt = oe.id_user || "", 6028 Ce = oe.isMultiradio || !1, 6029 en = "nexoradio", 6030 tn = Ce ? "multiradio" : "radio", 6031 sn = `${nxradioApiSettings.root}${en}/${tn}`, 6032 Ht = `${le}${Dt}podcast-app/${qt}`, 6033 Bt = `${le}${Dt}top-app/videos/${qt}`, 6034 nn = document.querySelector(".player-button-lyrics"), 6035 rn = document.querySelector(".player-button-program"), 6036 an = document.querySelector(".player-button-expand"), 6037 _t = document.querySelector(".player-button-prev"), 6038 Vt = document.querySelector(".player-button-next"), 6039 on = document.querySelector(".player-button-share"); 6040 function ln() { 6041 zt && nn.classList.add("is-loaded"), 6042 Qi && rn.classList.add("is-loaded"), 6043 Ji && an.classList.add("is-loaded"), 6044 Ce && (_t.classList.add("is-loaded"), Vt.classList.add("is-loaded")), 6045 Zi && on.classList.add("is-loaded"), 6046 Ki.addEventListener( 6047 "touchmove", 6048 function (x) { 6049 x.preventDefault(); 6050 }, 6051 { passive: !1 } 6052 ); 6053 } 6054 if ( 6055 (window.addEventListener("DOMContentLoaded", () => { 6056 Qe(Bt); 6057 }), 6058 !de) 6059 ) 6060 return; 6061 ln(), 6062 fetch(sn) 6063 .then((x) => x.json()) 6064 .then((x) => { 6065 if (Ce) { 6066 const M = x.map((A) => ({ 6067 name: A.multiradio_nombre, 6068 description: A.multiradio_descripcion,
6069 stream_url: A.multiradio_url, 6070 api: A.multiradio_api, 6071 picture: `${le}${A.multiradio_imagen}`, 6072 background: n, 6073 tv_url: A.multiradio_tvstream, 6074 id: A.id, 6075 })); 6076 (Le = M), 6077 _e(de, M[0]), 6078 (O.src = M[0].stream_url), 6079 M[0].tv_url && M[0].tv_url.includes("m3u8") 6080 ? Ye(ae, M[0]) 6081 : ae.classList.remove("is-loaded"); 6082 } else { 6083 const M = { 6084 name: x.radio_nombre, 6085 stream_url: x.radio_url, 6086 tv_url: x.radio_video, 6087 picture: `${x.radio_fondo}`, 6088 background: `${x.radio_splash}`, 6089 api: x.radio_menu_nicio, 6090 }; 6091 (D = M), 6092 _e(de, M), 6093 (O.src = M.stream_url), 6094 M.tv_url && M.tv_url.includes("m3u8") 6095 ? (ae.classList.add("is-loaded"), Ye(ae, M)) 6096 : ae.classList.remove("is-loaded"); 6097 } 6098 function P(M, A = !1) { 6099 (D = M), 6100 Je && clearTimeout(Je), 6101 M.api != "null" && 6102 fetch(M.api) 6103 .then((q) => q.json()) 6104 .then(async (q) => { 6105 if (k) return; 6106 q.now_playing && 6107 !k && 6108 At(q.now_playing.duration, q.now_playing.elapsed); 6109 const _ = h(q); 6110 if ($t !== _.title) { 6111 $t = _.title; 6112 const z = l(_, M), 6113 N = m(q), 6114 F = await a(z); 6115 L = F; 6116 const W = [{ ...F }, ...N]; 6117 (We = `Estoy escuchando ${F.title} de ${F.artist} en ${window.location.origin}`), 6118 Xe(F), 6119 Ue(F), 6120 Ui(q.now_playing ? W : N, z), 6121 zt && Yi(F.artist, F.title); 6122 } 6123 }) 6124 .catch((q) => console.log(q)), 6125 (Je = setTimeout(() => { 6126 P(M); 6127 }, Ni)); 6128 } 6129 if ((Ce ? P(Le[0], !0) : P(D), Le.length > 1)) { 6130 document 6131 .querySelector(".player-stations") 6132 .classList.add("is-loaded"); 6133 const A = document.getElementById("stations"); 6134 if (!A) return; 6135 A.classList.add("is-visible"), 6136 Le.forEach((z, N) => { 6137 const F = document.createElement("button"); 6138 F.dataset.id = z.id; 6139 const W = document.createElement("img"), 6140 J = document.createElement("span"); 6141 (W.src = z.picture), 6142 (W.alt = z.name), 6143 W.classList.add("station-image", "flex-none"), 6144 (J.textContent = z.name), 6145 F.classList.add( 6146 "station-button", 6147 "flex", 6148 "items-center", 6149 "g-0.5" 6150 ), 6151 F.appendChild(W), 6152 F.appendChild(J), 6153 N === 0 && (F.classList.add("is-current"), (T = F)), 6154 F.addEventListener("click", () => { 6155 D !== z && 6156 (T && 6157 (T.classList.remove("is-current"), 6158 [ 6159 ...document.querySelectorAll(".mtradio-item"), 6160 ].forEach((G) => { 6161 G.classList.remove("is-playing"); 6162 }), 6163 [ 6164 ...document.querySelectorAll(".mtradio-item"), 6165 ].forEach((G) => { 6166 z.id == G.getAttribute("data-id") && 6167 G.classList.add("is-playing"); 6168 }), 6169 fetch( 6170 `${nxradioApiSettings.root}nexoradio/v1/count_click/${z.id}` 6171 ) 6172 .then((G) => G.json()) 6173 .then((G) => { 6174 const Z = document.querySelectorAll( 6175 '.played span[data-id="' + z.id + '"]' 6176 ); 6177 Z.length > 0 && 6178 G.status &&
6179 [...Z].forEach((ie) => { 6180 ie.innerHTML = G.total_played; 6181 }); 6182 })), 6183 (T = F), 6184 T.classList.add("is-current"), 6185 P(z, !0), 6186 _e(de, z), 6187 (D = z), 6188 z.tv_url && z.tv_url.includes("m3u8") 6189 ? (ae.classList.add("is-loaded"), Ye(ae, z)) 6190 : ae.classList.remove("is-loaded"), 6191 (O.src = z.stream_url), 6192 c(O)); 6193 }), 6194 A.appendChild(F); 6195 }); 6196 const q = Vt, 6197 _ = _t; 6198 q.addEventListener("click", () => { 6199 const z = T.nextElementSibling; 6200 if ((z && z.click(), !z && T)) { 6201 const N = document.querySelector(".station-button"); 6202 N && N.click(); 6203 } 6204 }), 6205 _.addEventListener("click", () => { 6206 const z = T.previousElementSibling; 6207 if ((z && z.click(), !z && T)) { 6208 const N = document.querySelector( 6209 ".station-button:last-child" 6210 ); 6211 N && N.click(); 6212 } 6213 }); 6214 } 6215 }) 6216 .catch((x) => { 6217 console.error("Error:", x); 6218 }); 6219 function Nt(x, P, M) { 6220 const A = document.querySelectorAll(".mtradio-item"), 6221 q = document.querySelector("#stations"); 6222 A.length != 0 && 6223 [...A].forEach((_) => { 6224 _.addEventListener("click", function () { 6225 _.classList.contains("is-playing") 6226 ? (M(x), _.classList.remove("is-playing")) 6227 : (_.classList.add("is-playing"), P(x)), 6228 [...q.children].forEach((z) => { 6229 const N = _.dataset; 6230 z.dataset.id == N.id && z.click(); 6231 }); 6232 }); 6233 }); 6234 } 6235 window.addEventListener("DOMContentLoaded", () => { 6236 Fi(), 6237 Ke(Ht), 6238 Nt(O, c, f), 6239 Xi(document.querySelector("#ajaxify"), function (x) { 6240 Ke(Ht), Qe(Bt), Nt(O, c, f); 6241 }); 6242 }); 6243 } 6244 S(), 6245 typeof jQuery < "u" && 6246 jQuery(document).on("ajaxComplete", function () { 6247 window.mixxFunctions.loadTops(window.mixxFunctions.dataTops), 6248 window.mixxFunctions.loadVideoTops( 6249 window.mixxFunctions.dataTopsVid 6250 ); 6251 }); 6252 } 6253 function Ve() { 6254 let s; 6255 const e = nxradioApiSettings; 6256 if (e.server_time) s = new Date(e.server_time.replace(" ", "T")); 6257 else if (e.timezone.startsWith("UTC")) { 6258 const r = new Date(e.utc_time.replace(" ", "T") + "Z"), 6259 n = parseFloat(e.timezone_offset); 6260 s = new Date(r.getTime() + n * 60 * 60 * 1e3); 6261 } else 6262 s = new Date( 6263 new Date().toLocaleString(e.locale, { timeZone: e.timezone }) 6264 ); 6265 const t = s.getHours().toString().padStart(2, "0"), 6266 i = s.getMinutes().toString().padStart(2, "0"); 6267 return `${t}:${i}`; 6268 } 6269 function Ne() { 6270 const s = [ 6271 "sunday", 6272 "monday", 6273 "tuesday", 6274 "wednesday", 6275 "thursday", 6276 "friday", 6277 "saturday", 6278 ], 6279 e = new Date().getDay(); 6280 return s[e]; 6281 } 6282 function Ge(s, e) { 6283 return parseInt(s) * 3600 + parseInt(e) * 60; 6284 } 6285 function Fe(s, e) { 6286 const [t, i] = e.split(":").map(Number), 6287 r = Ge(t, i), 6288 n = s.find((o) => { 6289 const [a, l] = o.inicio.split(":").map(Number), 6290 [u, d] = o.final.split(":").map(Number), 6291 p = Ge(a, l), 6292 m = Ge(u, d); 6293 return p <= m ? r >= p && r <= m : r >= p || r <= m; 6294 }); 6295 return typeof n > "u" ? !1 : n; 6296 } 6297 async function qi() { 6298 const s = document.querySelector("#show-banner"); 6299 if (!s) return; 6300 const e = s.querySelector(".show-title"); 6301 e.innerHTML; 6302 const t = s.querySelector(".profile-pic"), 6303 i = s.querySelector(".show-description"), 6304 r = s.querySelector(".show-time"), 6305 n = s.getAttribute("data-namespace"), 6306 o = `${nxradioApiSettings.root}${n}/schedule/${Ne()}`; 6307 let a = await fetch(o); 6308 a = await a.json(); 6309 let l = "", 6310 u = Ne(); 6311 if (a.items.length == 0) return; 6312 let d = Fe(a.items, Ve()); 6313 d && 6314 ((l = d.title), 6315 (t.innerHTML = `<img src="${d.image}" alt="Host">`), 6316 (e.innerHTML = d.title), 6317 i && (i.innerHTML = d.description), 6318 (r.innerHTML = "HORA: " + d.inicio)), 6319 setInterval(async function () { 6320 const p = Ne(); 6321 if (p !== u) { 6322 u = p; 6323 let m = await fetch(`${nxradioApiSettings.root}${n}/schedule/${u}`); 6324 if (((m = await m.json()), m.items.length == 0)) return; 6325 (d = Fe(m.items, Ve())), 6326 d 6327 ? ((l = d.title), 6328 (t.innerHTML = `<img src="${d.image}" alt="Host">`), 6329 (e.innerHTML = d.title), 6330 i && (i.innerHTML = d.description), 6331 (r.innerHTML = "HORA: " + d.inicio)) 6332 : ((t.innerHTML = `<img src="${t.getAttribute( 6333 "data-src" 6334 )}" alt="Host">`), 6335 i && (i.innerHTML = "No disponible"), 6336 (r.innerHTML = "HORA: 00:00")); 6337 } else (d = Fe(a.items, Ve())), d == !1 ? ((l = ""), (t.innerHTML = `<img src="${t.getAttribute("data-src")}" alt="Host">`), i && (i.innerHTML = "No disponible"), (r.innerHTML = "HORA: 00:00")) : d.title != l && ((l = d.title ?? ""), (t.innerHTML = `<img src="${d.image}" alt="Host">`), (e.innerHTML = d.title), i && (i.innerHTML = d.description), (r.innerHTML = "HORA: " + d.inicio)); 6338 }, 1e3); 6339 } 6340 function Hi() { 6341 document.body.classList.contains("elementor-editor-active"); 6342 } 6343 function Bi() { 6344 const s = document.querySelector(".hder-type2"); 6345 if (!s) return; 6346 const e = s.querySelector(".hder"), 6347 t = s.querySelector(".hder-top"), 6348 i = s.querySelector(".hder-shadow"); 6349 function r() { 6350 const n = window.scrollY, 6351 o = e.getBoundingClientRect(), 6352 a = t.getBoundingClientRect(), 6353 l = o.height, 6354 u = a.bottom; 6355 n > u + 0 6356 ? (s.classList.add("on-sticky"), 6357 e.classList.add("is-sticky"), 6358 (i.style.height = l + "px")) 6359 : (s.classList.remove("on-sticky"), 6360 e.classList.remove("is-sticky"), 6361 (i.style.height = null)); 6362 } 6363 window.addEventListener("scroll", r), r(); 6364 } 6365 var _i = (() => { 6366 document.addEventListener("DOMContentLoaded", function () { 6367 bi(), 6368 Si(), 6369 gt(), 6370 xi(), 6371 Ei(), 6372 Li(), 6373 Pi(), 6374 ht(), 6375 vt(), 6376 wt(), 6377 St(), 6378 bt(), 6379 Di(), 6380 qi(), 6381 Tt(), 6382 Hi(), 6383 Bi(); 6384 }); 6385 })(); 6386 return _i; 6387})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.