vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3
vendor: 98,545 bytes, lines 4-3269
4/***/ "./node_modules/alpinejs/dist/module.esm.js": 5/*!**************************************************!*\ 6 !*** ./node_modules/alpinejs/dist/module.esm.js ***! 7 \**************************************************/ 8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 10"use strict"; 11__webpack_require__.r(__webpack_exports__); 12/* harmony export */ __webpack_require__.d(__webpack_exports__, { 13/* harmony export */ "default": () => (/* binding */ module_default) 14/* harmony export */ }); 15// packages/alpinejs/src/scheduler.js 16var flushPending = false; 17var flushing = false; 18var queue = []; 19var lastFlushedIndex = -1; 20function scheduler(callback) { 21 queueJob(callback); 22} 23function queueJob(job) { 24 if (!queue.includes(job)) 25 queue.push(job); 26 queueFlush(); 27} 28function dequeueJob(job) { 29 let index = queue.indexOf(job); 30 if (index !== -1 && index > lastFlushedIndex) 31 queue.splice(index, 1); 32} 33function queueFlush() { 34 if (!flushing && !flushPending) { 35 flushPending = true; 36 queueMicrotask(flushJobs); 37 } 38} 39function flushJobs() { 40 flushPending = false; 41 flushing = true; 42 for (let i = 0; i < queue.length; i++) { 43 queue[i](); 44 lastFlushedIndex = i; 45 } 46 queue.length = 0; 47 lastFlushedIndex = -1; 48 flushing = false; 49} 50 51// packages/alpinejs/src/reactivity.js 52var reactive; 53var effect; 54var release; 55var raw; 56var shouldSchedule = true; 57function disableEffectScheduling(callback) { 58 shouldSchedule = false; 59 callback(); 60 shouldSchedule = true; 61} 62function setReactivityEngine(engine) { 63 reactive = engine.reactive; 64 release = engine.release; 65 effect = (callback) => engine.effect(callback, { scheduler: (task) => { 66 if (shouldSchedule) { 67 scheduler(task); 68 } else { 69 task(); 70 } 71 } }); 72 raw = engine.raw; 73} 74function overrideEffect(override) { 75 effect = override; 76} 77function elementBoundEffect(el) { 78 let cleanup2 = () => { 79 }; 80 let wrappedEffect = (callback) => { 81 let effectReference = effect(callback); 82 if (!el._x_effects) { 83 el._x_effects = /* @__PURE__ */ new Set(); 84 el._x_runEffects = () => { 85 el._x_effects.forEach((i) => i()); 86 }; 87 } 88 el._x_effects.add(effectReference); 89 cleanup2 = () => { 90 if (effectReference === void 0) 91 return; 92 el._x_effects.delete(effectReference); 93 release(effectReference); 94 }; 95 return effectReference; 96 }; 97 return [wrappedEffect, () => { 98 cleanup2(); 99 }]; 100} 101 102// packages/alpinejs/src/utils/dispatch.js 103function dispatch(el, name, detail = {}) { 104 el.dispatchEvent( 105 new CustomEvent(name, { 106 detail, 107 bubbles: true, 108 // Allows events to pass the shadow DOM barrier. 109 composed: true, 110 cancelable: true 111 }) 112 ); 113} 114 115// packages/alpinejs/src/utils/walk.js 116function walk(el, callback) { 117 if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) { 118 Array.from(el.children).forEach((el2) => walk(el2, callback)); 119 return; 120 } 121 let skip = false; 122 callback(el, () => skip = true); 123 if (skip) 124 return; 125 let node = el.firstElementChild; 126 while (node) { 127 walk(node, callback, false); 128 node = node.nextElementSibling; 129 } 130} 131 132// packages/alpinejs/src/utils/warn.js 133function warn(message, ...args) { 134 console.warn(`Alpine Warning: ${message}`, ...args); 135} 136 137// packages/alpinejs/src/lifecycle.js 138var started = false; 139function start() { 140 if (started) 141 warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."); 142 started = true; 143 if (!document.body) 144 warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"); 145 dispatch(document, "alpine:init"); 146 dispatch(document, "alpine:initializing"); 147 startObservingMutations(); 148 onElAdded((el) => initTree(el, walk)); 149 onElRemoved((el) => destroyTree(el)); 150 onAttributesAdded((el, attrs) => { 151 directives(el, attrs).forEach((handle) => handle()); 152 }); 153 let outNestedComponents = (el) => !closestRoot(el.parentElement, true); 154 Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => { 155 initTree(el); 156 }); 157 dispatch(document, "alpine:initialized"); 158} 159var rootSelectorCallbacks = []; 160var initSelectorCallbacks = []; 161function rootSelectors() { 162 return rootSelectorCallbacks.map((fn) => fn()); 163} 164function allSelectors() { 165 return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn) => fn()); 166} 167function addRootSelector(selectorCallback) { 168 rootSelectorCallbacks.push(selectorCallback); 169} 170function addInitSelector(selectorCallback) { 171 initSelectorCallbacks.push(selectorCallback); 172} 173function closestRoot(el, includeInitSelectors = false) { 174 return findClosest(el, (element) => { 175 const selectors = includeInitSelectors ? allSelectors() : rootSelectors(); 176 if (selectors.some((selector) => element.matches(selector))) 177 return true; 178 }); 179} 180function findClosest(el, callback) { 181 if (!el) 182 return; 183 if (callback(el)) 184 return el; 185 if (el._x_teleportBack) 186 el = el._x_teleportBack; 187 if (!el.parentElement) 188 return; 189 return findClosest(el.parentElement, callback); 190} 191function isRoot(el) { 192 return rootSelectors().some((selector) => el.matches(selector)); 193} 194var initInterceptors = []; 195function interceptInit(callback) { 196 initInterceptors.push(callback); 197} 198function initTree(el, walker = walk, intercept = () => { 199}) { 200 deferHandlingDirectives(() => { 201 walker(el, (el2, skip) => { 202 intercept(el2, skip); 203 initInterceptors.forEach((i) => i(el2, skip)); 204 directives(el2, el2.attributes).forEach((handle) => handle()); 205 el2._x_ignore && skip(); 206 }); 207 }); 208} 209function destroyTree(root) { 210 walk(root, (el) => { 211 cleanupAttributes(el); 212 cleanupElement(el); 213 }); 214} 215 216// packages/alpinejs/src/mutation.js 217var onAttributeAddeds = []; 218var onElRemoveds = []; 219var onElAddeds = []; 220function onElAdded(callback) { 221 onElAddeds.push(callback); 222} 223function onElRemoved(el, callback) { 224 if (typeof callback === "function") { 225 if (!el._x_cleanups) 226 el._x_cleanups = []; 227 el._x_cleanups.push(callback); 228 } else { 229 callback = el; 230 onElRemoveds.push(callback); 231 } 232} 233function onAttributesAdded(callback) { 234 onAttributeAddeds.push(callback); 235} 236function onAttributeRemoved(el, name, callback) { 237 if (!el._x_attributeCleanups) 238 el._x_attributeCleanups = {}; 239 if (!el._x_attributeCleanups[name]) 240 el._x_attributeCleanups[name] = []; 241 el._x_attributeCleanups[name].push(callback); 242} 243function cleanupAttributes(el, names) { 244 if (!el._x_attributeCleanups) 245 return; 246 Object.entries(el._x_attributeCleanups).forEach(([name, value]) => { 247 if (names === void 0 || names.includes(name)) { 248 value.forEach((i) => i()); 249 delete el._x_attributeCleanups[name]; 250 } 251 }); 252} 253function cleanupElement(el) { 254 if (el._x_cleanups) { 255 while (el._x_cleanups.length) 256 el._x_cleanups.pop()(); 257 } 258} 259var observer = new MutationObserver(onMutate); 260var currentlyObserving = false; 261function startObservingMutations() { 262 observer.observe(document, { subtree: true, childList: true, attributes: true, attributeOldValue: true }); 263 currentlyObserving = true; 264} 265function stopObservingMutations() { 266 flushObserver(); 267 observer.disconnect(); 268 currentlyObserving = false; 269} 270var recordQueue = []; 271var willProcessRecordQueue = false; 272function flushObserver() { 273 recordQueue = recordQueue.concat(observer.takeRecords()); 274 if (recordQueue.length && !willProcessRecordQueue) { 275 willProcessRecordQueue = true; 276 queueMicrotask(() => { 277 processRecordQueue(); 278 willProcessRecordQueue = false; 279 }); 280 } 281} 282function processRecordQueue() { 283 onMutate(recordQueue); 284 recordQueue.length = 0; 285} 286function mutateDom(callback) { 287 if (!currentlyObserving) 288 return callback(); 289 stopObservingMutations(); 290 let result = callback(); 291 startObservingMutations(); 292 return result; 293} 294var isCollecting = false; 295var deferredMutations = []; 296function deferMutations() { 297 isCollecting = true; 298} 299function flushAndStopDeferringMutations() { 300 isCollecting = false; 301 onMutate(deferredMutations); 302 deferredMutations = []; 303} 304function onMutate(mutations) { 305 if (isCollecting) { 306 deferredMutations = deferredMutations.concat(mutations); 307 return; 308 } 309 let addedNodes = []; 310 let removedNodes = []; 311 let addedAttributes = /* @__PURE__ */ new Map(); 312 let removedAttributes = /* @__PURE__ */ new Map(); 313 for (let i = 0; i < mutations.length; i++) { 314 if (mutations[i].target._x_ignoreMutationObserver) 315 continue; 316 if (mutations[i].type === "childList") { 317 mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node)); 318 mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node)); 319 } 320 if (mutations[i].type === "attributes") { 321 let el = mutations[i].target; 322 let name = mutations[i].attributeName; 323 let oldValue = mutations[i].oldValue; 324 let add2 = () => { 325 if (!addedAttributes.has(el)) 326 addedAttributes.set(el, []); 327 addedAttributes.get(el).push({ name, value: el.getAttribute(name) }); 328 }; 329 let remove = () => { 330 if (!removedAttributes.has(el)) 331 removedAttributes.set(el, []); 332 removedAttributes.get(el).push(name); 333 }; 334 if (el.hasAttribute(name) && oldValue === null) { 335 add2(); 336 } else if (el.hasAttribute(name)) { 337 remove(); 338 add2(); 339 } else { 340 remove(); 341 } 342 } 343 } 344 removedAttributes.forEach((attrs, el) => { 345 cleanupAttributes(el, attrs); 346 }); 347 addedAttributes.forEach((attrs, el) => { 348 onAttributeAddeds.forEach((i) => i(el, attrs)); 349 }); 350 for (let node of removedNodes) { 351 if (addedNodes.includes(node)) 352 continue; 353 onElRemoveds.forEach((i) => i(node)); 354 destroyTree(node); 355 } 356 addedNodes.forEach((node) => { 357 node._x_ignoreSelf = true; 358 node._x_ignore = true; 359 }); 360 for (let node of addedNodes) { 361 if (removedNodes.includes(node)) 362 continue; 363 if (!node.isConnected) 364 continue; 365 delete node._x_ignoreSelf; 366 delete node._x_ignore; 367 onElAddeds.forEach((i) => i(node)); 368 node._x_ignore = true; 369 node._x_ignoreSelf = true; 370 } 371 addedNodes.forEach((node) => { 372 delete node._x_ignoreSelf; 373 delete node._x_ignore; 374 }); 375 addedNodes = null; 376 removedNodes = null; 377 addedAttributes = null; 378 removedAttributes = null; 379} 380 381// packages/alpinejs/src/scope.js 382function scope(node) { 383 return mergeProxies(closestDataStack(node)); 384} 385function addScopeToNode(node, data2, referenceNode) { 386 node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)]; 387 return () => { 388 node._x_dataStack = node._x_dataStack.filter((i) => i !== data2); 389 }; 390} 391function closestDataStack(node) { 392 if (node._x_dataStack) 393 return node._x_dataStack; 394 if (typeof ShadowRoot === "function" && node instanceof ShadowRoot) { 395 return closestDataStack(node.host); 396 } 397 if (!node.parentNode) { 398 return []; 399 } 400 return closestDataStack(node.parentNode); 401} 402function mergeProxies(objects) { 403 return new Proxy({ objects }, mergeProxyTrap); 404} 405var mergeProxyTrap = { 406 ownKeys({ objects }) { 407 return Array.from( 408 new Set(objects.flatMap((i) => Object.keys(i))) 409 ); 410 }, 411 has({ objects }, name) { 412 if (name == Symbol.unscopables) 413 return false; 414 return objects.some( 415 (obj) => Object.prototype.hasOwnProperty.call(obj, name) 416 ); 417 }, 418 get({ objects }, name, thisProxy) { 419 if (name == "toJSON") 420 return collapseProxies; 421 return Reflect.get( 422 objects.find( 423 (obj) => Object.prototype.hasOwnProperty.call(obj, name) 424 ) || {}, 425 name, 426 thisProxy 427 ); 428 }, 429 set({ objects }, name, value) { 430 return Reflect.set( 431 objects.find( 432 (obj) => Object.prototype.hasOwnProperty.call(obj, name) 433 ) || objects[objects.length - 1], 434 name, 435 value 436 ); 437 } 438}; 439function collapseProxies() { 440 let keys = Reflect.ownKeys(this); 441 return keys.reduce((acc, key) => { 442 acc[key] = Reflect.get(this, key); 443 return acc; 444 }, {}); 445} 446 447// packages/alpinejs/src/interceptor.js 448function initInterceptors2(data2) { 449 let isObject2 = (val) => typeof val === "object" && !Array.isArray(val) && val !== null; 450 let recurse = (obj, basePath = "") => { 451 Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => { 452 if (enumerable === false || value === void 0) 453 return; 454 let path = basePath === "" ? key : `${basePath}.${key}`; 455 if (typeof value === "object" && value !== null && value._x_interceptor) { 456 obj[key] = value.initialize(data2, path, key); 457 } else { 458 if (isObject2(value) && value !== obj && !(value instanceof Element)) { 459 recurse(value, path); 460 } 461 } 462 }); 463 }; 464 return recurse(data2); 465} 466function interceptor(callback, mutateObj = () => { 467}) { 468 let obj = { 469 initialValue: void 0, 470 _x_interceptor: true, 471 initialize(data2, path, key) { 472 return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key); 473 } 474 }; 475 mutateObj(obj); 476 return (initialValue) => { 477 if (typeof initialValue === "object" && initialValue !== null && initialValue._x_interceptor) { 478 let initialize = obj.initialize.bind(obj); 479 obj.initialize = (data2, path, key) => { 480 let innerValue = initialValue.initialize(data2, path, key); 481 obj.initialValue = innerValue; 482 return initialize(data2, path, key); 483 }; 484 } else { 485 obj.initialValue = initialValue; 486 } 487 return obj; 488 }; 489} 490function get(obj, path) { 491 return path.split(".").reduce((carry, segment) => carry[segment], obj); 492} 493function set(obj, path, value) { 494 if (typeof path === "string") 495 path = path.split("."); 496 if (path.length === 1) 497 obj[path[0]] = value; 498 else if (path.length === 0) 499 throw error; 500 else { 501 if (obj[path[0]]) 502 return set(obj[path[0]], path.slice(1), value); 503 else { 504 obj[path[0]] = {}; 505 return set(obj[path[0]], path.slice(1), value); 506 } 507 } 508} 509 510// packages/alpinejs/src/magics.js 511var magics = {}; 512function magic(name, callback) { 513 magics[name] = callback; 514} 515function injectMagics(obj, el) { 516 Object.entries(magics).forEach(([name, callback]) => { 517 let memoizedUtilities = null; 518 function getUtilities() { 519 if (memoizedUtilities) { 520 return memoizedUtilities; 521 } else { 522 let [utilities, cleanup2] = getElementBoundUtilities(el); 523 memoizedUtilities = { interceptor, ...utilities }; 524 onElRemoved(el, cleanup2); 525 return memoizedUtilities; 526 } 527 } 528 Object.defineProperty(obj, `$${name}`, { 529 get() { 530 return callback(el, getUtilities()); 531 }, 532 enumerable: false 533 }); 534 }); 535 return obj; 536} 537 538// packages/alpinejs/src/utils/error.js 539function tryCatch(el, expression, callback, ...args) { 540 try { 541 return callback(...args); 542 } catch (e) { 543 handleError(e, el, expression); 544 } 545} 546function handleError(error2, el, expression = void 0) { 547 Object.assign(error2, { el, expression }); 548 console.warn(`Alpine Expression Error: ${error2.message} 549 550${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); 551 setTimeout(() => { 552 throw error2; 553 }, 0); 554} 555 556// packages/alpinejs/src/evaluator.js 557var shouldAutoEvaluateFunctions = true; 558function dontAutoEvaluateFunctions(callback) { 559 let cache = shouldAutoEvaluateFunctions; 560 shouldAutoEvaluateFunctions = false; 561 let result = callback(); 562 shouldAutoEvaluateFunctions = cache; 563 return result; 564} 565function evaluate(el, expression, extras = {}) { 566 let result; 567 evaluateLater(el, expression)((value) => result = value, extras); 568 return result; 569} 570function evaluateLater(...args) { 571 return theEvaluatorFunction(...args); 572} 573var theEvaluatorFunction = normalEvaluator; 574function setEvaluator(newEvaluator) { 575 theEvaluatorFunction = newEvaluator; 576} 577function normalEvaluator(el, expression) { 578 let overriddenMagics = {}; 579 injectMagics(overriddenMagics, el); 580 let dataStack = [overriddenMagics, ...closestDataStack(el)]; 581 let evaluator = typeof expression === "function" ? generateEvaluatorFromFunction(dataStack, expression) : generateEvaluatorFromString(dataStack, expression, el); 582 return tryCatch.bind(null, el, expression, evaluator); 583} 584function generateEvaluatorFromFunction(dataStack, func) { 585 return (receiver = () => { 586 }, { scope: scope2 = {}, params = [] } = {}) => { 587 let result = func.apply(mergeProxies([scope2, ...dataStack]), params); 588 runIfTypeOfFunction(receiver, result); 589 }; 590} 591var evaluatorMemo = {}; 592function generateFunctionFromString(expression, el) { 593 if (evaluatorMemo[expression]) { 594 return evaluatorMemo[expression]; 595 } 596 let AsyncFunction = Object.getPrototypeOf(async function() { 597 }).constructor; 598 let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression.trim()) || /^(let|const)\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression; 599 const safeAsyncFunction = () => { 600 try { 601 let func2 = new AsyncFunction( 602 ["__self", "scope"], 603 `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;` 604 ); 605 Object.defineProperty(func2, "name", { 606 value: `[Alpine] ${expression}` 607 }); 608 return func2; 609 } catch (error2) { 610 handleError(error2, el, expression); 611 return Promise.resolve(); 612 } 613 }; 614 let func = safeAsyncFunction(); 615 evaluatorMemo[expression] = func; 616 return func; 617} 618function generateEvaluatorFromString(dataStack, expression, el) { 619 let func = generateFunctionFromString(expression, el); 620 return (receiver = () => { 621 }, { scope: scope2 = {}, params = [] } = {}) => { 622 func.result = void 0; 623 func.finished = false; 624 let completeScope = mergeProxies([scope2, ...dataStack]); 625 if (typeof func === "function") { 626 let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression)); 627 if (func.finished) { 628 runIfTypeOfFunction(receiver, func.result, completeScope, params, el); 629 func.result = void 0; 630 } else { 631 promise.then((result) => { 632 runIfTypeOfFunction(receiver, result, completeScope, params, el); 633 }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0); 634 } 635 } 636 }; 637} 638function runIfTypeOfFunction(receiver, value, scope2, params, el) { 639 if (shouldAutoEvaluateFunctions && typeof value === "function") { 640 let result = value.apply(scope2, params); 641 if (result instanceof Promise) { 642 result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value)); 643 } else { 644 receiver(result); 645 } 646 } else if (typeof value === "object" && value instanceof Promise) { 647 value.then((i) => receiver(i)); 648 } else { 649 receiver(value); 650 } 651} 652 653// packages/alpinejs/src/directives.js 654var prefixAsString = "x-"; 655function prefix(subject = "") { 656 return prefixAsString + subject; 657} 658function setPrefix(newPrefix) { 659 prefixAsString = newPrefix; 660} 661var directiveHandlers = {}; 662function directive(name, callback) { 663 directiveHandlers[name] = callback; 664 return { 665 before(directive2) { 666 if (!directiveHandlers[directive2]) { 667 console.warn( 668 "Cannot find directive `${directive}`. `${name}` will use the default order of execution" 669 ); 670 return; 671 } 672 const pos = directiveOrder.indexOf(directive2); 673 directiveOrder.splice(pos >= 0 ? pos : directiveOrder.indexOf("DEFAULT"), 0, name); 674 } 675 }; 676} 677function directives(el, attributes, originalAttributeOverride) { 678 attributes = Array.from(attributes); 679 if (el._x_virtualDirectives) { 680 let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({ name, value })); 681 let staticAttributes = attributesOnly(vAttributes); 682 vAttributes = vAttributes.map((attribute) => { 683 if (staticAttributes.find((attr) => attr.name === attribute.name)) { 684 return { 685 name: `x-bind:${attribute.name}`, 686 value: `"${attribute.value}"` 687 }; 688 } 689 return attribute; 690 }); 691 attributes = attributes.concat(vAttributes); 692 } 693 let transformedAttributeMap = {}; 694 let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority); 695 return directives2.map((directive2) => { 696 return getDirectiveHandler(el, directive2); 697 }); 698} 699function attributesOnly(attributes) { 700 return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr)); 701} 702var isDeferringHandlers = false; 703var directiveHandlerStacks = /* @__PURE__ */ new Map(); 704var currentHandlerStackKey = Symbol(); 705function deferHandlingDirectives(callback) { 706 isDeferringHandlers = true; 707 let key = Symbol(); 708 currentHandlerStackKey = key; 709 directiveHandlerStacks.set(key, []); 710 let flushHandlers = () => { 711 while (directiveHandlerStacks.get(key).length) 712 directiveHandlerStacks.get(key).shift()(); 713 directiveHandlerStacks.delete(key); 714 }; 715 let stopDeferring = () => { 716 isDeferringHandlers = false; 717 flushHandlers(); 718 }; 719 callback(flushHandlers); 720 stopDeferring(); 721} 722function getElementBoundUtilities(el) { 723 let cleanups = []; 724 let cleanup2 = (callback) => cleanups.push(callback); 725 let [effect3, cleanupEffect] = elementBoundEffect(el); 726 cleanups.push(cleanupEffect); 727 let utilities = { 728 Alpine: alpine_default, 729 effect: effect3, 730 cleanup: cleanup2, 731 evaluateLater: evaluateLater.bind(evaluateLater, el), 732 evaluate: evaluate.bind(evaluate, el) 733 }; 734 let doCleanup = () => cleanups.forEach((i) => i()); 735 return [utilities, doCleanup]; 736} 737function getDirectiveHandler(el, directive2) { 738 let noop = () => { 739 }; 740 let handler4 = directiveHandlers[directive2.type] || noop; 741 let [utilities, cleanup2] = getElementBoundUtilities(el); 742 onAttributeRemoved(el, directive2.original, cleanup2); 743 let fullHandler = () => { 744 if (el._x_ignore || el._x_ignoreSelf) 745 return; 746 handler4.inline && handler4.inline(el, directive2, utilities); 747 handler4 = handler4.bind(handler4, el, directive2, utilities); 748 isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler4) : handler4(); 749 }; 750 fullHandler.runCleanups = cleanup2; 751 return fullHandler; 752} 753var startingWith = (subject, replacement) => ({ name, value }) => { 754 if (name.startsWith(subject)) 755 name = name.replace(subject, replacement); 756 return { name, value }; 757}; 758var into = (i) => i; 759function toTransformedAttributes(callback = () => { 760}) { 761 return ({ name, value }) => { 762 let { name: newName, value: newValue } = attributeTransformers.reduce((carry, transform) => { 763 return transform(carry); 764 }, { name, value }); 765 if (newName !== name) 766 callback(newName, name); 767 return { name: newName, value: newValue }; 768 }; 769} 770var attributeTransformers = []; 771function mapAttributes(callback) { 772 attributeTransformers.push(callback); 773} 774function outNonAlpineAttributes({ name }) { 775 return alpineAttributeRegex().test(name); 776} 777var alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\b`); 778function toParsedDirectives(transformedAttributeMap, originalAttributeOverride) { 779 return ({ name, value }) => { 780 let typeMatch = name.match(alpineAttributeRegex()); 781 let valueMatch = name.match(/:([a-zA-Z0-9\-:]+)/); 782 let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || []; 783 let original = originalAttributeOverride || transformedAttributeMap[name] || name; 784 return { 785 type: typeMatch ? typeMatch[1] : null, 786 value: valueMatch ? valueMatch[1] : null, 787 modifiers: modifiers.map((i) => i.replace(".", "")), 788 expression: value, 789 original 790 }; 791 }; 792} 793var DEFAULT = "DEFAULT"; 794var directiveOrder = [ 795 "ignore", 796 "ref", 797 "data", 798 "id", 799 "bind", 800 "init", 801 "for", 802 "model", 803 "modelable", 804 "transition", 805 "show", 806 "if", 807 DEFAULT, 808 "teleport" 809]; 810function byPriority(a, b) { 811 let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type; 812 let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type; 813 return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB); 814} 815 816// packages/alpinejs/src/nextTick.js 817var tickStack = []; 818var isHolding = false; 819function nextTick(callback = () => { 820}) { 821 queueMicrotask(() => { 822 isHolding || setTimeout(() => { 823 releaseNextTicks(); 824 }); 825 }); 826 return new Promise((res) => { 827 tickStack.push(() => { 828 callback(); 829 res(); 830 }); 831 }); 832} 833function releaseNextTicks() { 834 isHolding = false; 835 while (tickStack.length) 836 tickStack.shift()(); 837} 838function holdNextTicks() { 839 isHolding = true; 840} 841 842// packages/alpinejs/src/utils/classes.js 843function setClasses(el, value) { 844 if (Array.isArray(value)) { 845 return setClassesFromString(el, value.join(" ")); 846 } else if (typeof value === "object" && value !== null) { 847 return setClassesFromObject(el, value); 848 } else if (typeof value === "function") { 849 return setClasses(el, value()); 850 } 851 return setClassesFromString(el, value); 852} 853function setClassesFromString(el, classString) { 854 let split = (classString2) => classString2.split(" ").filter(Boolean); 855 let missingClasses = (classString2) => classString2.split(" ").filter((i) => !el.classList.contains(i)).filter(Boolean); 856 let addClassesAndReturnUndo = (classes) => { 857 el.classList.add(...classes); 858 return () => { 859 el.classList.remove(...classes); 860 }; 861 }; 862 classString = classString === true ? classString = "" : classString || ""; 863 return addClassesAndReturnUndo(missingClasses(classString)); 864} 865function setClassesFromObject(el, classObject) { 866 let split = (classString) => classString.split(" ").filter(Boolean); 867 let forAdd = Object.entries(classObject).flatMap(([classString, bool]) => bool ? split(classString) : false).filter(Boolean); 868 let forRemove = Object.entries(classObject).flatMap(([classString, bool]) => !bool ? split(classString) : false).filter(Boolean); 869 let added = []; 870 let removed = []; 871 forRemove.forEach((i) => { 872 if (el.classList.contains(i)) { 873 el.classList.remove(i); 874 removed.push(i); 875 } 876 }); 877 forAdd.forEach((i) => { 878 if (!el.classList.contains(i)) { 879 el.classList.add(i); 880 added.push(i); 881 } 882 }); 883 return () => { 884 removed.forEach((i) => el.classList.add(i)); 885 added.forEach((i) => el.classList.remove(i)); 886 }; 887} 888 889// packages/alpinejs/src/utils/styles.js 890function setStyles(el, value) { 891 if (typeof value === "object" && value !== null) { 892 return setStylesFromObject(el, value); 893 } 894 return setStylesFromString(el, value); 895} 896function setStylesFromObject(el, value) { 897 let previousStyles = {}; 898 Object.entries(value).forEach(([key, value2]) => { 899 previousStyles[key] = el.style[key]; 900 if (!key.startsWith("--")) { 901 key = kebabCase(key); 902 } 903 el.style.setProperty(key, value2); 904 }); 905 setTimeout(() => { 906 if (el.style.length === 0) { 907 el.removeAttribute("style"); 908 } 909 }); 910 return () => { 911 setStyles(el, previousStyles); 912 }; 913} 914function setStylesFromString(el, value) { 915 let cache = el.getAttribute("style", value); 916 el.setAttribute("style", value); 917 return () => { 918 el.setAttribute("style", cache || ""); 919 }; 920} 921function kebabCase(subject) { 922 return subject.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); 923} 924 925// packages/alpinejs/src/utils/once.js 926function once(callback, fallback = () => { 927}) { 928 let called = false; 929 return function() { 930 if (!called) { 931 called = true; 932 callback.apply(this, arguments); 933 } else { 934 fallback.apply(this, arguments); 935 } 936 }; 937} 938 939// packages/alpinejs/src/directives/x-transition.js 940directive("transition", (el, { value, modifiers, expression }, { evaluate: evaluate2 }) => { 941 if (typeof expression === "function") 942 expression = evaluate2(expression); 943 if (expression === false) 944 return; 945 if (!expression || typeof expression === "boolean") { 946 registerTransitionsFromHelper(el, modifiers, value); 947 } else { 948 registerTransitionsFromClassString(el, expression, value); 949 } 950}); 951function registerTransitionsFromClassString(el, classString, stage) { 952 registerTransitionObject(el, setClasses, ""); 953 let directiveStorageMap = { 954 "enter": (classes) => { 955 el._x_transition.enter.during = classes; 956 }, 957 "enter-start": (classes) => { 958 el._x_transition.enter.start = classes; 959 }, 960 "enter-end": (classes) => { 961 el._x_transition.enter.end = classes; 962 }, 963 "leave": (classes) => { 964 el._x_transition.leave.during = classes; 965 }, 966 "leave-start": (classes) => { 967 el._x_transition.leave.start = classes; 968 }, 969 "leave-end": (classes) => { 970 el._x_transition.leave.end = classes; 971 } 972 }; 973 directiveStorageMap[stage](classString); 974} 975function registerTransitionsFromHelper(el, modifiers, stage) { 976 registerTransitionObject(el, setStyles); 977 let doesntSpecify = !modifiers.includes("in") && !modifiers.includes("out") && !stage; 978 let transitioningIn = doesntSpecify || modifiers.includes("in") || ["enter"].includes(stage); 979 let transitioningOut = doesntSpecify || modifiers.includes("out") || ["leave"].includes(stage); 980 if (modifiers.includes("in") && !doesntSpecify) { 981 modifiers = modifiers.filter((i, index) => index < modifiers.indexOf("out")); 982 } 983 if (modifiers.includes("out") && !doesntSpecify) { 984 modifiers = modifiers.filter((i, index) => index > modifiers.indexOf("out")); 985 } 986 let wantsAll = !modifiers.includes("opacity") && !modifiers.includes("scale"); 987 let wantsOpacity = wantsAll || modifiers.includes("opacity"); 988 let wantsScale = wantsAll || modifiers.includes("scale"); 989 let opacityValue = wantsOpacity ? 0 : 1; 990 let scaleValue = wantsScale ? modifierValue(modifiers, "scale", 95) / 100 : 1; 991 let delay = modifierValue(modifiers, "delay", 0) / 1e3; 992 let origin = modifierValue(modifiers, "origin", "center"); 993 let property = "opacity, transform"; 994 let durationIn = modifierValue(modifiers, "duration", 150) / 1e3; 995 let durationOut = modifierValue(modifiers, "duration", 75) / 1e3; 996 let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`; 997 if (transitioningIn) { 998 el._x_transition.enter.during = { 999 transformOrigin: origin, 1000 transitionDelay: `${delay}s`, 1001 transitionProperty: property, 1002 transitionDuration: `${durationIn}s`, 1003 transitionTimingFunction: easing 1004 }; 1005 el._x_transition.enter.start = { 1006 opacity: opacityValue, 1007 transform: `scale(${scaleValue})` 1008 }; 1009 el._x_transition.enter.end = { 1010 opacity: 1, 1011 transform: `scale(1)` 1012 }; 1013 } 1014 if (transitioningOut) { 1015 el._x_transition.leave.during = { 1016 transformOrigin: origin, 1017 transitionDelay: `${delay}s`, 1018 transitionProperty: property, 1019 transitionDuration: `${durationOut}s`, 1020 transitionTimingFunction: easing 1021 }; 1022 el._x_transition.leave.start = { 1023 opacity: 1, 1024 transform: `scale(1)` 1025 }; 1026 el._x_transition.leave.end = { 1027 opacity: opacityValue, 1028 transform: `scale(${scaleValue})` 1029 }; 1030 } 1031} 1032function registerTransitionObject(el, setFunction, defaultValue = {}) { 1033 if (!el._x_transition) 1034 el._x_transition = { 1035 enter: { during: defaultValue, start: defaultValue, end: defaultValue }, 1036 leave: { during: defaultValue, start: defaultValue, end: defaultValue }, 1037 in(before = () => { 1038 }, after = () => { 1039 }) { 1040 transition(el, setFunction, { 1041 during: this.enter.during, 1042 start: this.enter.start, 1043 end: this.enter.end 1044 }, before, after); 1045 }, 1046 out(before = () => { 1047 }, after = () => { 1048 }) { 1049 transition(el, setFunction, { 1050 during: this.leave.during, 1051 start: this.leave.start, 1052 end: this.leave.end 1053 }, before, after); 1054 } 1055 }; 1056} 1057window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) { 1058 const nextTick2 = document.visibilityState === "visible" ? requestAnimationFrame : setTimeout; 1059 let clickAwayCompatibleShow = () => nextTick2(show); 1060 if (value) { 1061 if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) { 1062 el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow(); 1063 } else { 1064 el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow(); 1065 } 1066 return; 1067 } 1068 el._x_hidePromise = el._x_transition ? new Promise((resolve, reject) => { 1069 el._x_transition.out(() => { 1070 }, () => resolve(hide)); 1071 el._x_transitioning.beforeCancel(() => reject({ isFromCancelledTransition: true })); 1072 }) : Promise.resolve(hide); 1073 queueMicrotask(() => { 1074 let closest = closestHide(el); 1075 if (closest) { 1076 if (!closest._x_hideChildren) 1077 closest._x_hideChildren = []; 1078 closest._x_hideChildren.push(el); 1079 } else { 1080 nextTick2(() => { 1081 let hideAfterChildren = (el2) => { 1082 let carry = Promise.all([ 1083 el2._x_hidePromise, 1084 ...(el2._x_hideChildren || []).map(hideAfterChildren) 1085 ]).then(([i]) => i()); 1086 delete el2._x_hidePromise; 1087 delete el2._x_hideChildren; 1088 return carry; 1089 }; 1090 hideAfterChildren(el).catch((e) => { 1091 if (!e.isFromCancelledTransition) 1092 throw e; 1093 }); 1094 }); 1095 } 1096 }); 1097}; 1098function closestHide(el) { 1099 let parent = el.parentNode; 1100 if (!parent) 1101 return; 1102 return parent._x_hidePromise ? parent : closestHide(parent); 1103} 1104function transition(el, setFunction, { during, start: start2, end } = {}, before = () => { 1105}, after = () => { 1106}) { 1107 if (el._x_transitioning) 1108 el._x_transitioning.cancel(); 1109 if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) { 1110 before(); 1111 after(); 1112 return; 1113 } 1114 let undoStart, undoDuring, undoEnd; 1115 performTransition(el, { 1116 start() { 1117 undoStart = setFunction(el, start2); 1118 }, 1119 during() { 1120 undoDuring = setFunction(el, during); 1121 }, 1122 before, 1123 end() { 1124 undoStart(); 1125 undoEnd = setFunction(el, end); 1126 }, 1127 after, 1128 cleanup() { 1129 undoDuring(); 1130 undoEnd(); 1131 } 1132 }); 1133} 1134function performTransition(el, stages) { 1135 let interrupted, reachedBefore, reachedEnd; 1136 let finish = once(() => { 1137 mutateDom(() => { 1138 interrupted = true; 1139 if (!reachedBefore) 1140 stages.before(); 1141 if (!reachedEnd) { 1142 stages.end(); 1143 releaseNextTicks(); 1144 } 1145 stages.after(); 1146 if (el.isConnected) 1147 stages.cleanup(); 1148 delete el._x_transitioning; 1149 }); 1150 }); 1151 el._x_transitioning = { 1152 beforeCancels: [], 1153 beforeCancel(callback) { 1154 this.beforeCancels.push(callback); 1155 }, 1156 cancel: once(function() { 1157 while (this.beforeCancels.length) { 1158 this.beforeCancels.shift()(); 1159 } 1160 ; 1161 finish(); 1162 }), 1163 finish 1164 }; 1165 mutateDom(() => { 1166 stages.start(); 1167 stages.during(); 1168 }); 1169 holdNextTicks(); 1170 requestAnimationFrame(() => { 1171 if (interrupted) 1172 return; 1173 let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, "").replace("s", "")) * 1e3; 1174 let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, "").replace("s", "")) * 1e3; 1175 if (duration === 0) 1176 duration = Number(getComputedStyle(el).animationDuration.replace("s", "")) * 1e3; 1177 mutateDom(() => { 1178 stages.before(); 1179 }); 1180 reachedBefore = true; 1181 requestAnimationFrame(() => { 1182 if (interrupted) 1183 return; 1184 mutateDom(() => { 1185 stages.end(); 1186 }); 1187 releaseNextTicks(); 1188 setTimeout(el._x_transitioning.finish, duration + delay); 1189 reachedEnd = true; 1190 }); 1191 }); 1192} 1193function modifierValue(modifiers, key, fallback) { 1194 if (modifiers.indexOf(key) === -1) 1195 return fallback; 1196 const rawValue = modifiers[modifiers.indexOf(key) + 1]; 1197 if (!rawValue) 1198 return fallback; 1199 if (key === "scale") { 1200 if (isNaN(rawValue)) 1201 return fallback; 1202 } 1203 if (key === "duration" || key === "delay") { 1204 let match = rawValue.match(/([0-9]+)ms/); 1205 if (match) 1206 return match[1]; 1207 } 1208 if (key === "origin") { 1209 if (["top", "right", "left", "center", "bottom"].includes(modifiers[modifiers.indexOf(key) + 2])) { 1210 return [rawValue, modifiers[modifiers.indexOf(key) + 2]].join(" "); 1211 } 1212 } 1213 return rawValue; 1214} 1215 1216// packages/alpinejs/src/clone.js 1217var isCloning = false; 1218function skipDuringClone(callback, fallback = () => { 1219}) { 1220 return (...args) => isCloning ? fallback(...args) : callback(...args); 1221} 1222function onlyDuringClone(callback) { 1223 return (...args) => isCloning && callback(...args); 1224} 1225function cloneNode(from, to) { 1226 if (from._x_dataStack) { 1227 to._x_dataStack = from._x_dataStack; 1228 to.setAttribute("data-has-alpine-state", true); 1229 } 1230 isCloning = true; 1231 dontRegisterReactiveSideEffects(() => { 1232 initTree(to, (el, callback) => { 1233 callback(el, () => { 1234 }); 1235 }); 1236 }); 1237 isCloning = false; 1238} 1239var isCloningLegacy = false; 1240function clone(oldEl, newEl) { 1241 if (!newEl._x_dataStack) 1242 newEl._x_dataStack = oldEl._x_dataStack; 1243 isCloning = true; 1244 isCloningLegacy = true; 1245 dontRegisterReactiveSideEffects(() => { 1246 cloneTree(newEl); 1247 }); 1248 isCloning = false; 1249 isCloningLegacy = false; 1250} 1251function cloneTree(el) { 1252 let hasRunThroughFirstEl = false; 1253 let shallowWalker = (el2, callback) => { 1254 walk(el2, (el3, skip) => { 1255 if (hasRunThroughFirstEl && isRoot(el3)) 1256 return skip(); 1257 hasRunThroughFirstEl = true; 1258 callback(el3, skip); 1259 }); 1260 }; 1261 initTree(el, shallowWalker); 1262} 1263function dontRegisterReactiveSideEffects(callback) { 1264 let cache = effect; 1265 overrideEffect((callback2, el) => { 1266 let storedEffect = cache(callback2); 1267 release(storedEffect); 1268 return () => { 1269 }; 1270 }); 1271 callback(); 1272 overrideEffect(cache); 1273} 1274function shouldSkipRegisteringDataDuringClone(el) { 1275 if (!isCloning) 1276 return false; 1277 if (isCloningLegacy) 1278 return true; 1279 return el.hasAttribute("data-has-alpine-state"); 1280} 1281 1282// packages/alpinejs/src/utils/bind.js 1283function bind(el, name, value, modifiers = []) { 1284 if (!el._x_bindings) 1285 el._x_bindings = reactive({}); 1286 el._x_bindings[name] = value; 1287 name = modifiers.includes("camel") ? camelCase(name) : name; 1288 switch (name) { 1289 case "value": 1290 bindInputValue(el, value); 1291 break; 1292 case "style": 1293 bindStyles(el, value); 1294 break; 1295 case "class": 1296 bindClasses(el, value); 1297 break; 1298 case "selected": 1299 case "checked": 1300 bindAttributeAndProperty(el, name, value); 1301 break; 1302 default: 1303 bindAttribute(el, name, value); 1304 break; 1305 } 1306} 1307function bindInputValue(el, value) { 1308 if (el.type === "radio") { 1309 if (el.attributes.value === void 0) { 1310 el.value = value; 1311 } 1312 if (window.fromModel) { 1313 el.checked = checkedAttrLooseCompare(el.value, value); 1314 } 1315 } else if (el.type === "checkbox") { 1316 if (Number.isInteger(value)) { 1317 el.value = value; 1318 } else if (!Array.isArray(value) && typeof value !== "boolean" && ![null, void 0].includes(value)) { 1319 el.value = String(value); 1320 } else { 1321 if (Array.isArray(value)) { 1322 el.checked = value.some((val) => checkedAttrLooseCompare(val, el.value)); 1323 } else { 1324 el.checked = !!value; 1325 } 1326 } 1327 } else if (el.tagName === "SELECT") { 1328 updateSelect(el, value); 1329 } else { 1330 if (el.value === value) 1331 return; 1332 el.value = value === void 0 ? "" : value; 1333 } 1334} 1335function bindClasses(el, value) { 1336 if (el._x_undoAddedClasses) 1337 el._x_undoAddedClasses(); 1338 el._x_undoAddedClasses = setClasses(el, value); 1339} 1340function bindStyles(el, value) { 1341 if (el._x_undoAddedStyles) 1342 el._x_undoAddedStyles(); 1343 el._x_undoAddedStyles = setStyles(el, value); 1344} 1345function bindAttributeAndProperty(el, name, value) { 1346 bindAttribute(el, name, value); 1347 setPropertyIfChanged(el, name, value); 1348} 1349function bindAttribute(el, name, value) { 1350 if ([null, void 0, false].includes(value) && attributeShouldntBePreservedIfFalsy(name)) { 1351 el.removeAttribute(name); 1352 } else { 1353 if (isBooleanAttr(name)) 1354 value = name; 1355 setIfChanged(el, name, value); 1356 } 1357} 1358function setIfChanged(el, attrName, value) { 1359 if (el.getAttribute(attrName) != value) { 1360 el.setAttribute(attrName, value); 1361 } 1362} 1363function setPropertyIfChanged(el, propName, value) { 1364 if (el[propName] !== value) { 1365 el[propName] = value; 1366 } 1367} 1368function updateSelect(el, value) { 1369 const arrayWrappedValue = [].concat(value).map((value2) => { 1370 return value2 + ""; 1371 }); 1372 Array.from(el.options).forEach((option) => { 1373 option.selected = arrayWrappedValue.includes(option.value); 1374 }); 1375} 1376function camelCase(subject) { 1377 return subject.toLowerCase().replace(/-(\w)/g, (match, char) => char.toUpperCase()); 1378} 1379function checkedAttrLooseCompare(valueA, valueB) { 1380 return valueA == valueB; 1381} 1382function isBooleanAttr(attrName) { 1383 const booleanAttributes = [ 1384 "disabled", 1385 "checked", 1386 "required", 1387 "readonly", 1388 "hidden", 1389 "open", 1390 "selected", 1391 "autofocus", 1392 "itemscope", 1393 "multiple", 1394 "novalidate", 1395 "allowfullscreen", 1396 "allowpaymentrequest", 1397 "formnovalidate", 1398 "autoplay", 1399 "controls", 1400 "loop", 1401 "muted", 1402 "playsinline", 1403 "default", 1404 "ismap", 1405 "reversed", 1406 "async", 1407 "defer", 1408 "nomodule" 1409 ]; 1410 return booleanAttributes.includes(attrName); 1411} 1412function attributeShouldntBePreservedIfFalsy(name) { 1413 return !["aria-pressed", "aria-checked", "aria-expanded", "aria-selected"].includes(name); 1414} 1415function getBinding(el, name, fallback) { 1416 if (el._x_bindings && el._x_bindings[name] !== void 0) 1417 return el._x_bindings[name]; 1418 return getAttributeBinding(el, name, fallback); 1419} 1420function extractProp(el, name, fallback, extract = true) { 1421 if (el._x_bindings && el._x_bindings[name] !== void 0) 1422 return el._x_bindings[name]; 1423 if (el._x_inlineBindings && el._x_inlineBindings[name] !== void 0) { 1424 let binding = el._x_inlineBindings[name]; 1425 binding.extract = extract; 1426 return dontAutoEvaluateFunctions(() => { 1427 return evaluate(el, binding.expression); 1428 }); 1429 } 1430 return getAttributeBinding(el, name, fallback); 1431} 1432function getAttributeBinding(el, name, fallback) { 1433 let attr = el.getAttribute(name); 1434 if (attr === null) 1435 return typeof fallback === "function" ? fallback() : fallback; 1436 if (attr === "") 1437 return true; 1438 if (isBooleanAttr(name)) { 1439 return !![name, "true"].includes(attr); 1440 } 1441 return attr; 1442} 1443 1444// packages/alpinejs/src/utils/debounce.js 1445function debounce(func, wait) { 1446 var timeout; 1447 return function() { 1448 var context = this, args = arguments; 1449 var later = function() { 1450 timeout = null; 1451 func.apply(context, args); 1452 }; 1453 clearTimeout(timeout); 1454 timeout = setTimeout(later, wait); 1455 }; 1456} 1457 1458// packages/alpinejs/src/utils/throttle.js 1459function throttle(func, limit) { 1460 let inThrottle; 1461 return function() { 1462 let context = this, args = arguments; 1463 if (!inThrottle) { 1464 func.apply(context, args); 1465 inThrottle = true; 1466 setTimeout(() => inThrottle = false, limit); 1467 } 1468 }; 1469} 1470 1471// packages/alpinejs/src/entangle.js 1472function entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) { 1473 let firstRun = true; 1474 let outerHash, innerHash, outerHashLatest, innerHashLatest; 1475 let reference = effect(() => { 1476 let outer, inner; 1477 if (firstRun) { 1478 outer = outerGet(); 1479 innerSet(JSON.parse(JSON.stringify(outer))); 1480 inner = innerGet(); 1481 firstRun = false; 1482 } else { 1483 outer = outerGet(); 1484 inner = innerGet(); 1485 outerHashLatest = JSON.stringify(outer); 1486 innerHashLatest = JSON.stringify(inner); 1487 if (outerHashLatest !== outerHash) { 1488 inner = innerGet(); 1489 innerSet(outer); 1490 inner = outer; 1491 } else { 1492 outerSet(JSON.parse(innerHashLatest ?? null)); 1493 outer = inner; 1494 } 1495 } 1496 outerHash = JSON.stringify(outer); 1497 innerHash = JSON.stringify(inner); 1498 }); 1499 return () => { 1500 release(reference); 1501 }; 1502} 1503 1504// packages/alpinejs/src/plugin.js 1505function plugin(callback) { 1506 let callbacks = Array.isArray(callback) ? callback : [callback]; 1507 callbacks.forEach((i) => i(alpine_default)); 1508} 1509 1510// packages/alpinejs/src/store.js 1511var stores = {}; 1512var isReactive = false; 1513function store(name, value) { 1514 if (!isReactive) { 1515 stores = reactive(stores); 1516 isReactive = true; 1517 } 1518 if (value === void 0) { 1519 return stores[name]; 1520 } 1521 stores[name] = value; 1522 if (typeof value === "object" && value !== null && value.hasOwnProperty("init") && typeof value.init === "function") { 1523 stores[name].init(); 1524 } 1525 initInterceptors2(stores[name]); 1526} 1527function getStores() { 1528 return stores; 1529} 1530 1531// packages/alpinejs/src/binds.js 1532var binds = {}; 1533function bind2(name, bindings) { 1534 let getBindings = typeof bindings !== "function" ? () => bindings : bindings; 1535 if (name instanceof Element) { 1536 return applyBindingsObject(name, getBindings()); 1537 } else { 1538 binds[name] = getBindings; 1539 } 1540 return () => { 1541 }; 1542} 1543function injectBindingProviders(obj) { 1544 Object.entries(binds).forEach(([name, callback]) => { 1545 Object.defineProperty(obj, name, { 1546 get() { 1547 return (...args) => { 1548 return callback(...args); 1549 }; 1550 } 1551 }); 1552 }); 1553 return obj; 1554} 1555function applyBindingsObject(el, obj, original) { 1556 let cleanupRunners = []; 1557 while (cleanupRunners.length) 1558 cleanupRunners.pop()(); 1559 let attributes = Object.entries(obj).map(([name, value]) => ({ name, value })); 1560 let staticAttributes = attributesOnly(attributes); 1561 attributes = attributes.map((attribute) => { 1562 if (staticAttributes.find((attr) => attr.name === attribute.name)) { 1563 return { 1564 name: `x-bind:${attribute.name}`, 1565 value: `"${attribute.value}"` 1566 }; 1567 } 1568 return attribute; 1569 }); 1570 directives(el, attributes, original).map((handle) => { 1571 cleanupRunners.push(handle.runCleanups); 1572 handle(); 1573 }); 1574 return () => { 1575 while (cleanupRunners.length) 1576 cleanupRunners.pop()(); 1577 }; 1578} 1579 1580// packages/alpinejs/src/datas.js 1581var datas = {}; 1582function data(name, callback) { 1583 datas[name] = callback; 1584} 1585function injectDataProviders(obj, context) { 1586 Object.entries(datas).forEach(([name, callback]) => { 1587 Object.defineProperty(obj, name, { 1588 get() { 1589 return (...args) => { 1590 return callback.bind(context)(...args); 1591 }; 1592 }, 1593 enumerable: false 1594 }); 1595 }); 1596 return obj; 1597} 1598 1599// packages/alpinejs/src/alpine.js 1600var Alpine = { 1601 get reactive() { 1602 return reactive; 1603 }, 1604 get release() { 1605 return release; 1606 }, 1607 get effect() { 1608 return effect; 1609 }, 1610 get raw() { 1611 return raw; 1612 }, 1613 version: "3.13.1", 1614 flushAndStopDeferringMutations, 1615 dontAutoEvaluateFunctions, 1616 disableEffectScheduling, 1617 startObservingMutations, 1618 stopObservingMutations, 1619 setReactivityEngine, 1620 onAttributeRemoved, 1621 onAttributesAdded, 1622 closestDataStack, 1623 skipDuringClone, 1624 onlyDuringClone, 1625 addRootSelector, 1626 addInitSelector, 1627 addScopeToNode, 1628 deferMutations, 1629 mapAttributes, 1630 evaluateLater, 1631 interceptInit, 1632 setEvaluator, 1633 mergeProxies, 1634 extractProp, 1635 findClosest, 1636 onElRemoved, 1637 closestRoot, 1638 destroyTree, 1639 interceptor, 1640 // INTERNAL: not public API and is subject to change without major release. 1641 transition, 1642 // INTERNAL 1643 setStyles, 1644 // INTERNAL 1645 mutateDom, 1646 directive, 1647 entangle, 1648 throttle, 1649 debounce, 1650 evaluate, 1651 initTree, 1652 nextTick, 1653 prefixed: prefix, 1654 prefix: setPrefix, 1655 plugin, 1656 magic, 1657 store, 1658 start, 1659 clone, 1660 // INTERNAL 1661 cloneNode, 1662 // INTERNAL 1663 bound: getBinding, 1664 $data: scope, 1665 walk, 1666 data, 1667 bind: bind2 1668}; 1669var alpine_default = Alpine; 1670 1671// node_modules/@vue/shared/dist/shared.esm-bundler.js 1672function makeMap(str, expectsLowerCase) { 1673 const map = /* @__PURE__ */ Object.create(null); 1674 const list = str.split(","); 1675 for (let i = 0; i < list.length; i++) { 1676 map[list[i]] = true; 1677 } 1678 return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; 1679} 1680var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; 1681var isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`); 1682var EMPTY_OBJ = true ? Object.freeze({}) : 0; 1683var EMPTY_ARR = true ? Object.freeze([]) : 0; 1684var hasOwnProperty = Object.prototype.hasOwnProperty; 1685var hasOwn = (val, key) => hasOwnProperty.call(val, key); 1686var isArray = Array.isArray; 1687var isMap = (val) => toTypeString(val) === "[object Map]"; 1688var isString = (val) => typeof val === "string"; 1689var isSymbol = (val) => typeof val === "symbol"; 1690var isObject = (val) => val !== null && typeof val === "object"; 1691var objectToString = Object.prototype.toString; 1692var toTypeString = (value) => objectToString.call(value); 1693var toRawType = (value) => { 1694 return toTypeString(value).slice(8, -1); 1695}; 1696var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; 1697var cacheStringFunction = (fn) => { 1698 const cache = /* @__PURE__ */ Object.create(null); 1699 return (str) => { 1700 const hit = cache[str]; 1701 return hit || (cache[str] = fn(str)); 1702 }; 1703}; 1704var camelizeRE = /-(\w)/g; 1705var camelize = cacheStringFunction((str) => { 1706 return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); 1707}); 1708var hyphenateRE = /\B([A-Z])/g; 1709var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); 1710var capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); 1711var toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); 1712var hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); 1713 1714// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js 1715var targetMap = /* @__PURE__ */ new WeakMap(); 1716var effectStack = []; 1717var activeEffect; 1718var ITERATE_KEY = Symbol( true ? "iterate" : 0); 1719var MAP_KEY_ITERATE_KEY = Symbol( true ? "Map key iterate" : 0); 1720function isEffect(fn) { 1721 return fn && fn._isEffect === true; 1722} 1723function effect2(fn, options = EMPTY_OBJ) { 1724 if (isEffect(fn)) { 1725 fn = fn.raw; 1726 } 1727 const effect3 = createReactiveEffect(fn, options); 1728 if (!options.lazy) { 1729 effect3(); 1730 } 1731 return effect3; 1732} 1733function stop(effect3) { 1734 if (effect3.active) { 1735 cleanup(effect3); 1736 if (effect3.options.onStop) { 1737 effect3.options.onStop(); 1738 } 1739 effect3.active = false; 1740 } 1741} 1742var uid = 0; 1743function createReactiveEffect(fn, options) { 1744 const effect3 = function reactiveEffect() { 1745 if (!effect3.active) { 1746 return fn(); 1747 } 1748 if (!effectStack.includes(effect3)) { 1749 cleanup(effect3); 1750 try { 1751 enableTracking(); 1752 effectStack.push(effect3); 1753 activeEffect = effect3; 1754 return fn(); 1755 } finally { 1756 effectStack.pop(); 1757 resetTracking(); 1758 activeEffect = effectStack[effectStack.length - 1]; 1759 } 1760 } 1761 }; 1762 effect3.id = uid++; 1763 effect3.allowRecurse = !!options.allowRecurse; 1764 effect3._isEffect = true; 1765 effect3.active = true; 1766 effect3.raw = fn; 1767 effect3.deps = []; 1768 effect3.options = options; 1769 return effect3; 1770} 1771function cleanup(effect3) { 1772 const { deps } = effect3; 1773 if (deps.length) { 1774 for (let i = 0; i < deps.length; i++) { 1775 deps[i].delete(effect3); 1776 } 1777 deps.length = 0; 1778 } 1779} 1780var shouldTrack = true; 1781var trackStack = []; 1782function pauseTracking() { 1783 trackStack.push(shouldTrack); 1784 shouldTrack = false; 1785} 1786function enableTracking() { 1787 trackStack.push(shouldTrack); 1788 shouldTrack = true; 1789} 1790function resetTracking() { 1791 const last = trackStack.pop(); 1792 shouldTrack = last === void 0 ? true : last; 1793} 1794function track(target, type, key) { 1795 if (!shouldTrack || activeEffect === void 0) { 1796 return; 1797 } 1798 let depsMap = targetMap.get(target); 1799 if (!depsMap) { 1800 targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); 1801 } 1802 let dep = depsMap.get(key); 1803 if (!dep) { 1804 depsMap.set(key, dep = /* @__PURE__ */ new Set()); 1805 } 1806 if (!dep.has(activeEffect)) { 1807 dep.add(activeEffect); 1808 activeEffect.deps.push(dep); 1809 if (activeEffect.options.onTrack) { 1810 activeEffect.options.onTrack({ 1811 effect: activeEffect, 1812 target, 1813 type, 1814 key 1815 }); 1816 } 1817 } 1818} 1819function trigger(target, type, key, newValue, oldValue, oldTarget) { 1820 const depsMap = targetMap.get(target); 1821 if (!depsMap) { 1822 return; 1823 } 1824 const effects = /* @__PURE__ */ new Set(); 1825 const add2 = (effectsToAdd) => { 1826 if (effectsToAdd) { 1827 effectsToAdd.forEach((effect3) => { 1828 if (effect3 !== activeEffect || effect3.allowRecurse) { 1829 effects.add(effect3); 1830 } 1831 }); 1832 } 1833 }; 1834 if (type === "clear") { 1835 depsMap.forEach(add2); 1836 } else if (key === "length" && isArray(target)) { 1837 depsMap.forEach((dep, key2) => { 1838 if (key2 === "length" || key2 >= newValue) { 1839 add2(dep); 1840 } 1841 }); 1842 } else { 1843 if (key !== void 0) { 1844 add2(depsMap.get(key)); 1845 } 1846 switch (type) { 1847 case "add": 1848 if (!isArray(target)) { 1849 add2(depsMap.get(ITERATE_KEY)); 1850 if (isMap(target)) { 1851 add2(depsMap.get(MAP_KEY_ITERATE_KEY)); 1852 } 1853 } else if (isIntegerKey(key)) { 1854 add2(depsMap.get("length")); 1855 } 1856 break; 1857 case "delete": 1858 if (!isArray(target)) { 1859 add2(depsMap.get(ITERATE_KEY)); 1860 if (isMap(target)) { 1861 add2(depsMap.get(MAP_KEY_ITERATE_KEY)); 1862 } 1863 } 1864 break; 1865 case "set": 1866 if (isMap(target)) { 1867 add2(depsMap.get(ITERATE_KEY)); 1868 } 1869 break; 1870 } 1871 } 1872 const run = (effect3) => { 1873 if (effect3.options.onTrigger) { 1874 effect3.options.onTrigger({ 1875 effect: effect3, 1876 target, 1877 key, 1878 type, 1879 newValue, 1880 oldValue, 1881 oldTarget 1882 }); 1883 } 1884 if (effect3.options.scheduler) { 1885 effect3.options.scheduler(effect3); 1886 } else { 1887 effect3(); 1888 } 1889 }; 1890 effects.forEach(run); 1891} 1892var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); 1893var builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol)); 1894var get2 = /* @__PURE__ */ createGetter(); 1895var readonlyGet = /* @__PURE__ */ createGetter(true); 1896var arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); 1897function createArrayInstrumentations() { 1898 const instrumentations = {}; 1899 ["includes", "indexOf", "lastIndexOf"].forEach((key) => { 1900 instrumentations[key] = function(...args) { 1901 const arr = toRaw(this); 1902 for (let i = 0, l = this.length; i < l; i++) { 1903 track(arr, "get", i + ""); 1904 } 1905 const res = arr[key](...args); 1906 if (res === -1 || res === false) { 1907 return arr[key](...args.map(toRaw)); 1908 } else { 1909 return res; 1910 } 1911 }; 1912 }); 1913 ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { 1914 instrumentations[key] = function(...args) { 1915 pauseTracking(); 1916 const res = toRaw(this)[key].apply(this, args); 1917 resetTracking(); 1918 return res; 1919 }; 1920 }); 1921 return instrumentations; 1922} 1923function createGetter(isReadonly = false, shallow = false) { 1924 return function get3(target, key, receiver) { 1925 if (key === "__v_isReactive") { 1926 return !isReadonly; 1927 } else if (key === "__v_isReadonly") { 1928 return isReadonly; 1929 } else if (key === "__v_raw" && receiver === (isReadonly ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { 1930 return target; 1931 } 1932 const targetIsArray = isArray(target); 1933 if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { 1934 return Reflect.get(arrayInstrumentations, key, receiver); 1935 } 1936 const res = Reflect.get(target, key, receiver); 1937 if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { 1938 return res; 1939 } 1940 if (!isReadonly) { 1941 track(target, "get", key); 1942 } 1943 if (shallow) { 1944 return res; 1945 } 1946 if (isRef(res)) { 1947 const shouldUnwrap = !targetIsArray || !isIntegerKey(key); 1948 return shouldUnwrap ? res.value : res; 1949 } 1950 if (isObject(res)) { 1951 return isReadonly ? readonly(res) : reactive2(res); 1952 } 1953 return res; 1954 }; 1955} 1956var set2 = /* @__PURE__ */ createSetter(); 1957function createSetter(shallow = false) { 1958 return function set3(target, key, value, receiver) { 1959 let oldValue = target[key]; 1960 if (!shallow) { 1961 value = toRaw(value); 1962 oldValue = toRaw(oldValue); 1963 if (!isArray(target) && isRef(oldValue) && !isRef(value)) { 1964 oldValue.value = value; 1965 return true; 1966 } 1967 } 1968 const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); 1969 const result = Reflect.set(target, key, value, receiver); 1970 if (target === toRaw(receiver)) { 1971 if (!hadKey) { 1972 trigger(target, "add", key, value); 1973 } else if (hasChanged(value, oldValue)) { 1974 trigger(target, "set", key, value, oldValue); 1975 } 1976 } 1977 return result; 1978 }; 1979} 1980function deleteProperty(target, key) { 1981 const hadKey = hasOwn(target, key); 1982 const oldValue = target[key]; 1983 const result = Reflect.deleteProperty(target, key); 1984 if (result && hadKey) { 1985 trigger(target, "delete", key, void 0, oldValue); 1986 } 1987 return result; 1988} 1989function has(target, key) { 1990 const result = Reflect.has(target, key); 1991 if (!isSymbol(key) || !builtInSymbols.has(key)) { 1992 track(target, "has", key); 1993 } 1994 return result; 1995} 1996function ownKeys(target) { 1997 track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); 1998 return Reflect.ownKeys(target); 1999} 2000var mutableHandlers = { 2001 get: get2, 2002 set: set2, 2003 deleteProperty, 2004 has, 2005 ownKeys 2006}; 2007var readonlyHandlers = { 2008 get: readonlyGet, 2009 set(target, key) { 2010 if (true) { 2011 console.warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); 2012 } 2013 return true; 2014 }, 2015 deleteProperty(target, key) { 2016 if (true) { 2017 console.warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); 2018 } 2019 return true; 2020 } 2021}; 2022var toReactive = (value) => isObject(value) ? reactive2(value) : value; 2023var toReadonly = (value) => isObject(value) ? readonly(value) : value; 2024var toShallow = (value) => value; 2025var getProto = (v) => Reflect.getPrototypeOf(v); 2026function get$1(target, key, isReadonly = false, isShallow = false) { 2027 target = target[ 2028 "__v_raw" 2029 /* RAW */ 2030 ]; 2031 const rawTarget = toRaw(target); 2032 const rawKey = toRaw(key); 2033 if (key !== rawKey) { 2034 !isReadonly && track(rawTarget, "get", key); 2035 } 2036 !isReadonly && track(rawTarget, "get", rawKey); 2037 const { has: has2 } = getProto(rawTarget); 2038 const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; 2039 if (has2.call(rawTarget, key)) { 2040 return wrap(target.get(key)); 2041 } else if (has2.call(rawTarget, rawKey)) { 2042 return wrap(target.get(rawKey)); 2043 } else if (target !== rawTarget) { 2044 target.get(key); 2045 } 2046} 2047function has$1(key, isReadonly = false) { 2048 const target = this[ 2049 "__v_raw" 2050 /* RAW */ 2051 ]; 2052 const rawTarget = toRaw(target); 2053 const rawKey = toRaw(key); 2054 if (key !== rawKey) { 2055 !isReadonly && track(rawTarget, "has", key); 2056 } 2057 !isReadonly && track(rawTarget, "has", rawKey); 2058 return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); 2059} 2060function size(target, isReadonly = false) { 2061 target = target[ 2062 "__v_raw" 2063 /* RAW */ 2064 ]; 2065 !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); 2066 return Reflect.get(target, "size", target); 2067} 2068function add(value) { 2069 value = toRaw(value); 2070 const target = toRaw(this); 2071 const proto = getProto(target); 2072 const hadKey = proto.has.call(target, value); 2073 if (!hadKey) { 2074 target.add(value); 2075 trigger(target, "add", value, value); 2076 } 2077 return this; 2078} 2079function set$1(key, value) { 2080 value = toRaw(value); 2081 const target = toRaw(this); 2082 const { has: has2, get: get3 } = getProto(target); 2083 let hadKey = has2.call(target, key); 2084 if (!hadKey) { 2085 key = toRaw(key); 2086 hadKey = has2.call(target, key); 2087 } else if (true) { 2088 checkIdentityKeys(target, has2, key); 2089 } 2090 const oldValue = get3.call(target, key); 2091 target.set(key, value); 2092 if (!hadKey) { 2093 trigger(target, "add", key, value); 2094 } else if (hasChanged(value, oldValue)) { 2095 trigger(target, "set", key, value, oldValue); 2096 } 2097 return this; 2098} 2099function deleteEntry(key) { 2100 const target = toRaw(this); 2101 const { has: has2, get: get3 } = getProto(target); 2102 let hadKey = has2.call(target, key); 2103 if (!hadKey) { 2104 key = toRaw(key); 2105 hadKey = has2.call(target, key); 2106 } else if (true) { 2107 checkIdentityKeys(target, has2, key); 2108 } 2109 const oldValue = get3 ? get3.call(target, key) : void 0; 2110 const result = target.delete(key); 2111 if (hadKey) { 2112 trigger(target, "delete", key, void 0, oldValue); 2113 } 2114 return result; 2115} 2116function clear() { 2117 const target = toRaw(this); 2118 const hadItems = target.size !== 0; 2119 const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : 0; 2120 const result = target.clear(); 2121 if (hadItems) { 2122 trigger(target, "clear", void 0, void 0, oldTarget); 2123 } 2124 return result; 2125} 2126function createForEach(isReadonly, isShallow) { 2127 return function forEach(callback, thisArg) { 2128 const observed = this; 2129 const target = observed[ 2130 "__v_raw" 2131 /* RAW */ 2132 ]; 2133 const rawTarget = toRaw(target); 2134 const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; 2135 !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); 2136 return target.forEach((value, key) => { 2137 return callback.call(thisArg, wrap(value), wrap(key), observed); 2138 }); 2139 }; 2140} 2141function createIterableMethod(method, isReadonly, isShallow) { 2142 return function(...args) { 2143 const target = this[ 2144 "__v_raw" 2145 /* RAW */ 2146 ]; 2147 const rawTarget = toRaw(target); 2148 const targetIsMap = isMap(rawTarget); 2149 const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; 2150 const isKeyOnly = method === "keys" && targetIsMap; 2151 const innerIterator = target[method](...args); 2152 const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; 2153 !isReadonly && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); 2154 return { 2155 // iterator protocol 2156 next() { 2157 const { value, done } = innerIterator.next(); 2158 return done ? { value, done } : { 2159 value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), 2160 done 2161 }; 2162 }, 2163 // iterable protocol 2164 [Symbol.iterator]() { 2165 return this; 2166 } 2167 }; 2168 }; 2169} 2170function createReadonlyMethod(type) { 2171 return function(...args) { 2172 if (true) { 2173 const key = args[0] ? `on key "${args[0]}" ` : ``; 2174 console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); 2175 } 2176 return type === "delete" ? false : this; 2177 }; 2178} 2179function createInstrumentations() { 2180 const mutableInstrumentations2 = { 2181 get(key) { 2182 return get$1(this, key); 2183 }, 2184 get size() { 2185 return size(this); 2186 }, 2187 has: has$1, 2188 add, 2189 set: set$1, 2190 delete: deleteEntry, 2191 clear, 2192 forEach: createForEach(false, false) 2193 }; 2194 const shallowInstrumentations2 = { 2195 get(key) { 2196 return get$1(this, key, false, true); 2197 }, 2198 get size() { 2199 return size(this); 2200 }, 2201 has: has$1, 2202 add, 2203 set: set$1, 2204 delete: deleteEntry, 2205 clear, 2206 forEach: createForEach(false, true) 2207 }; 2208 const readonlyInstrumentations2 = { 2209 get(key) { 2210 return get$1(this, key, true); 2211 }, 2212 get size() { 2213 return size(this, true); 2214 }, 2215 has(key) { 2216 return has$1.call(this, key, true); 2217 }, 2218 add: createReadonlyMethod( 2219 "add" 2220 /* ADD */ 2221 ), 2222 set: createReadonlyMethod( 2223 "set" 2224 /* SET */ 2225 ), 2226 delete: createReadonlyMethod( 2227 "delete" 2228 /* DELETE */ 2229 ), 2230 clear: createReadonlyMethod( 2231 "clear" 2232 /* CLEAR */ 2233 ), 2234 forEach: createForEach(true, false) 2235 }; 2236 const shallowReadonlyInstrumentations2 = { 2237 get(key) { 2238 return get$1(this, key, true, true); 2239 }, 2240 get size() { 2241 return size(this, true); 2242 }, 2243 has(key) { 2244 return has$1.call(this, key, true); 2245 }, 2246 add: createReadonlyMethod( 2247 "add" 2248 /* ADD */ 2249 ), 2250 set: createReadonlyMethod( 2251 "set" 2252 /* SET */ 2253 ), 2254 delete: createReadonlyMethod( 2255 "delete" 2256 /* DELETE */ 2257 ), 2258 clear: createReadonlyMethod( 2259 "clear" 2260 /* CLEAR */ 2261 ), 2262 forEach: createForEach(true, true) 2263 }; 2264 const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; 2265 iteratorMethods.forEach((method) => { 2266 mutableInstrumentations2[method] = createIterableMethod(method, false, false); 2267 readonlyInstrumentations2[method] = createIterableMethod(method, true, false); 2268 shallowInstrumentations2[method] = createIterableMethod(method, false, true); 2269 shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); 2270 }); 2271 return [ 2272 mutableInstrumentations2, 2273 readonlyInstrumentations2, 2274 shallowInstrumentations2, 2275 shallowReadonlyInstrumentations2 2276 ]; 2277} 2278var [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); 2279function createInstrumentationGetter(isReadonly, shallow) { 2280 const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; 2281 return (target, key, receiver) => { 2282 if (key === "__v_isReactive") { 2283 return !isReadonly; 2284 } else if (key === "__v_isReadonly") { 2285 return isReadonly; 2286 } else if (key === "__v_raw") { 2287 return target; 2288 } 2289 return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver); 2290 }; 2291} 2292var mutableCollectionHandlers = { 2293 get: /* @__PURE__ */ createInstrumentationGetter(false, false) 2294}; 2295var readonlyCollectionHandlers = { 2296 get: /* @__PURE__ */ createInstrumentationGetter(true, false) 2297}; 2298function checkIdentityKeys(target, has2, key) { 2299 const rawKey = toRaw(key); 2300 if (rawKey !== key && has2.call(target, rawKey)) { 2301 const type = toRawType(target); 2302 console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`); 2303 } 2304} 2305var reactiveMap = /* @__PURE__ */ new WeakMap(); 2306var shallowReactiveMap = /* @__PURE__ */ new WeakMap(); 2307var readonlyMap = /* @__PURE__ */ new WeakMap(); 2308var shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); 2309function targetTypeMap(rawType) { 2310 switch (rawType) { 2311 case "Object": 2312 case "Array": 2313 return 1; 2314 case "Map": 2315 case "Set": 2316 case "WeakMap": 2317 case "WeakSet": 2318 return 2; 2319 default: 2320 return 0; 2321 } 2322} 2323function getTargetType(value) { 2324 return value[ 2325 "__v_skip" 2326 /* SKIP */ 2327 ] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); 2328} 2329function reactive2(target) { 2330 if (target && target[ 2331 "__v_isReadonly" 2332 /* IS_READONLY */ 2333 ]) { 2334 return target; 2335 } 2336 return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); 2337} 2338function readonly(target) { 2339 return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); 2340} 2341function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { 2342 if (!isObject(target)) { 2343 if (true) { 2344 console.warn(`value cannot be made reactive: ${String(target)}`); 2345 } 2346 return target; 2347 } 2348 if (target[ 2349 "__v_raw" 2350 /* RAW */ 2351 ] && !(isReadonly && target[ 2352 "__v_isReactive" 2353 /* IS_REACTIVE */ 2354 ])) { 2355 return target; 2356 } 2357 const existingProxy = proxyMap.get(target); 2358 if (existingProxy) { 2359 return existingProxy; 2360 } 2361 const targetType = getTargetType(target); 2362 if (targetType === 0) { 2363 return target; 2364 } 2365 const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers); 2366 proxyMap.set(target, proxy); 2367 return proxy; 2368} 2369function toRaw(observed) { 2370 return observed && toRaw(observed[ 2371 "__v_raw" 2372 /* RAW */ 2373 ]) || observed; 2374} 2375function isRef(r) { 2376 return Boolean(r && r.__v_isRef === true); 2377} 2378 2379// packages/alpinejs/src/magics/$nextTick.js 2380magic("nextTick", () => nextTick); 2381 2382// packages/alpinejs/src/magics/$dispatch.js 2383magic("dispatch", (el) => dispatch.bind(dispatch, el)); 2384 2385// packages/alpinejs/src/magics/$watch.js 2386magic("watch", (el, { evaluateLater: evaluateLater2, effect: effect3 }) => (key, callback) => { 2387 let evaluate2 = evaluateLater2(key); 2388 let firstTime = true; 2389 let oldValue; 2390 let effectReference = effect3(() => evaluate2((value) => { 2391 JSON.stringify(value); 2392 if (!firstTime) { 2393 queueMicrotask(() => { 2394 callback(value, oldValue); 2395 oldValue = value; 2396 }); 2397 } else { 2398 oldValue = value; 2399 } 2400 firstTime = false; 2401 })); 2402 el._x_effects.delete(effectReference); 2403}); 2404 2405// packages/alpinejs/src/magics/$store.js 2406magic("store", getStores); 2407 2408// packages/alpinejs/src/magics/$data.js 2409magic("data", (el) => scope(el)); 2410 2411// packages/alpinejs/src/magics/$root.js 2412magic("root", (el) => closestRoot(el)); 2413 2414// packages/alpinejs/src/magics/$refs.js 2415magic("refs", (el) => { 2416 if (el._x_refs_proxy) 2417 return el._x_refs_proxy; 2418 el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el)); 2419 return el._x_refs_proxy; 2420}); 2421function getArrayOfRefObject(el) { 2422 let refObjects = []; 2423 let currentEl = el; 2424 while (currentEl) { 2425 if (currentEl._x_refs) 2426 refObjects.push(currentEl._x_refs); 2427 currentEl = currentEl.parentNode; 2428 } 2429 return refObjects; 2430} 2431 2432// packages/alpinejs/src/ids.js 2433var globalIdMemo = {}; 2434function findAndIncrementId(name) { 2435 if (!globalIdMemo[name]) 2436 globalIdMemo[name] = 0; 2437 return ++globalIdMemo[name]; 2438} 2439function closestIdRoot(el, name) { 2440 return findClosest(el, (element) => { 2441 if (element._x_ids && element._x_ids[name]) 2442 return true; 2443 }); 2444} 2445function setIdRoot(el, name) { 2446 if (!el._x_ids) 2447 el._x_ids = {}; 2448 if (!el._x_ids[name]) 2449 el._x_ids[name] = findAndIncrementId(name); 2450} 2451 2452// packages/alpinejs/src/magics/$id.js 2453magic("id", (el) => (name, key = null) => { 2454 let root = closestIdRoot(el, name); 2455 let id = root ? root._x_ids[name] : findAndIncrementId(name); 2456 return key ? `${name}-${id}-${key}` : `${name}-${id}`; 2457}); 2458 2459// packages/alpinejs/src/magics/$el.js 2460magic("el", (el) => el); 2461 2462// packages/alpinejs/src/magics/index.js 2463warnMissingPluginMagic("Focus", "focus", "focus"); 2464warnMissingPluginMagic("Persist", "persist", "persist"); 2465function warnMissingPluginMagic(name, magicName, slug) { 2466 magic(magicName, (el) => warn(`You can't use [$${magicName}] without first installing the "${name}" plugin here: https://alpinejs.dev/plugins/${slug}`, el)); 2467} 2468 2469// packages/alpinejs/src/directives/x-modelable.js 2470directive("modelable", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2, cleanup: cleanup2 }) => { 2471 let func = evaluateLater2(expression); 2472 let innerGet = () => { 2473 let result; 2474 func((i) => result = i); 2475 return result; 2476 }; 2477 let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`); 2478 let innerSet = (val) => evaluateInnerSet(() => { 2479 }, { scope: { "__placeholder": val } }); 2480 let initialValue = innerGet(); 2481 innerSet(initialValue); 2482 queueMicrotask(() => { 2483 if (!el._x_model) 2484 return; 2485 el._x_removeModelListeners["default"](); 2486 let outerGet = el._x_model.get; 2487 let outerSet = el._x_model.set; 2488 let releaseEntanglement = entangle( 2489 { 2490 get() { 2491 return outerGet(); 2492 }, 2493 set(value) { 2494 outerSet(value); 2495 } 2496 }, 2497 { 2498 get() { 2499 return innerGet(); 2500 }, 2501 set(value) { 2502 innerSet(value); 2503 } 2504 } 2505 ); 2506 cleanup2(releaseEntanglement); 2507 }); 2508}); 2509 2510// packages/alpinejs/src/directives/x-teleport.js 2511directive("teleport", (el, { modifiers, expression }, { cleanup: cleanup2 }) => { 2512 if (el.tagName.toLowerCase() !== "template") 2513 warn("x-teleport can only be used on a <template> tag", el); 2514 let target = getTarget(expression); 2515 let clone2 = el.content.cloneNode(true).firstElementChild; 2516 el._x_teleport = clone2; 2517 clone2._x_teleportBack = el; 2518 el.setAttribute("data-teleport-template", true); 2519 clone2.setAttribute("data-teleport-target", true); 2520 if (el._x_forwardEvents) { 2521 el._x_forwardEvents.forEach((eventName) => { 2522 clone2.addEventListener(eventName, (e) => { 2523 e.stopPropagation(); 2524 el.dispatchEvent(new e.constructor(e.type, e)); 2525 }); 2526 }); 2527 } 2528 addScopeToNode(clone2, {}, el); 2529 let placeInDom = (clone3, target2, modifiers2) => { 2530 if (modifiers2.includes("prepend")) { 2531 target2.parentNode.insertBefore(clone3, target2); 2532 } else if (modifiers2.includes("append")) { 2533 target2.parentNode.insertBefore(clone3, target2.nextSibling); 2534 } else { 2535 target2.appendChild(clone3); 2536 } 2537 }; 2538 mutateDom(() => { 2539 placeInDom(clone2, target, modifiers); 2540 initTree(clone2); 2541 clone2._x_ignore = true; 2542 }); 2543 el._x_teleportPutBack = () => { 2544 let target2 = getTarget(expression); 2545 mutateDom(() => { 2546 placeInDom(el._x_teleport, target2, modifiers); 2547 }); 2548 }; 2549 cleanup2(() => clone2.remove()); 2550}); 2551var teleportContainerDuringClone = document.createElement("div"); 2552function getTarget(expression) { 2553 let target = skipDuringClone(() => { 2554 return document.querySelector(expression); 2555 }, () => { 2556 return teleportContainerDuringClone; 2557 })(); 2558 if (!target) 2559 warn(`Cannot find x-teleport element for selector: "${expression}"`); 2560 return target; 2561} 2562 2563// packages/alpinejs/src/directives/x-ignore.js 2564var handler = () => { 2565}; 2566handler.inline = (el, { modifiers }, { cleanup: cleanup2 }) => { 2567 modifiers.includes("self") ? el._x_ignoreSelf = true : el._x_ignore = true; 2568 cleanup2(() => { 2569 modifiers.includes("self") ? delete el._x_ignoreSelf : delete el._x_ignore; 2570 }); 2571}; 2572directive("ignore", handler); 2573 2574// packages/alpinejs/src/directives/x-effect.js 2575directive("effect", (el, { expression }, { effect: effect3 }) => effect3(evaluateLater(el, expression))); 2576 2577// packages/alpinejs/src/utils/on.js 2578function on(el, event, modifiers, callback) { 2579 let listenerTarget = el; 2580 let handler4 = (e) => callback(e); 2581 let options = {}; 2582 let wrapHandler = (callback2, wrapper) => (e) => wrapper(callback2, e); 2583 if (modifiers.includes("dot")) 2584 event = dotSyntax(event); 2585 if (modifiers.includes("camel")) 2586 event = camelCase2(event); 2587 if (modifiers.includes("passive")) 2588 options.passive = true; 2589 if (modifiers.includes("capture")) 2590 options.capture = true; 2591 if (modifiers.includes("window")) 2592 listenerTarget = window; 2593 if (modifiers.includes("document")) 2594 listenerTarget = document; 2595 if (modifiers.includes("debounce")) { 2596 let nextModifier = modifiers[modifiers.indexOf("debounce") + 1] || "invalid-wait"; 2597 let wait = isNumeric(nextModifier.split("ms")[0]) ? Number(nextModifier.split("ms")[0]) : 250; 2598 handler4 = debounce(handler4, wait); 2599 } 2600 if (modifiers.includes("throttle")) { 2601 let nextModifier = modifiers[modifiers.indexOf("throttle") + 1] || "invalid-wait"; 2602 let wait = isNumeric(nextModifier.split("ms")[0]) ? Number(nextModifier.split("ms")[0]) : 250; 2603 handler4 = throttle(handler4, wait); 2604 } 2605 if (modifiers.includes("prevent")) 2606 handler4 = wrapHandler(handler4, (next, e) => { 2607 e.preventDefault(); 2608 next(e); 2609 }); 2610 if (modifiers.includes("stop")) 2611 handler4 = wrapHandler(handler4, (next, e) => { 2612 e.stopPropagation(); 2613 next(e); 2614 }); 2615 if (modifiers.includes("self")) 2616 handler4 = wrapHandler(handler4, (next, e) => { 2617 e.target === el && next(e); 2618 }); 2619 if (modifiers.includes("away") || modifiers.includes("outside")) { 2620 listenerTarget = document; 2621 handler4 = wrapHandler(handler4, (next, e) => { 2622 if (el.contains(e.target)) 2623 return; 2624 if (e.target.isConnected === false) 2625 return; 2626 if (el.offsetWidth < 1 && el.offsetHeight < 1) 2627 return; 2628 if (el._x_isShown === false) 2629 return; 2630 next(e); 2631 }); 2632 } 2633 if (modifiers.includes("once")) { 2634 handler4 = wrapHandler(handler4, (next, e) => { 2635 next(e); 2636 listenerTarget.removeEventListener(event, handler4, options); 2637 }); 2638 } 2639 handler4 = wrapHandler(handler4, (next, e) => { 2640 if (isKeyEvent(event)) { 2641 if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) { 2642 return; 2643 } 2644 } 2645 next(e); 2646 }); 2647 listenerTarget.addEventListener(event, handler4, options); 2648 return () => { 2649 listenerTarget.removeEventListener(event, handler4, options); 2650 }; 2651} 2652function dotSyntax(subject) { 2653 return subject.replace(/-/g, "."); 2654} 2655function camelCase2(subject) { 2656 return subject.toLowerCase().replace(/-(\w)/g, (match, char) => char.toUpperCase()); 2657} 2658function isNumeric(subject) { 2659 return !Array.isArray(subject) && !isNaN(subject); 2660} 2661function kebabCase2(subject) { 2662 if ([" ", "_"].includes( 2663 subject 2664 )) 2665 return subject; 2666 return subject.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[_\s]/, "-").toLowerCase(); 2667} 2668function isKeyEvent(event) { 2669 return ["keydown", "keyup"].includes(event); 2670} 2671function isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) { 2672 let keyModifiers = modifiers.filter((i) => { 2673 return !["window", "document", "prevent", "stop", "once", "capture"].includes(i); 2674 }); 2675 if (keyModifiers.includes("debounce")) { 2676 let debounceIndex = keyModifiers.indexOf("debounce"); 2677 keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || "invalid-wait").split("ms")[0]) ? 2 : 1); 2678 } 2679 if (keyModifiers.includes("throttle")) { 2680 let debounceIndex = keyModifiers.indexOf("throttle"); 2681 keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || "invalid-wait").split("ms")[0]) ? 2 : 1); 2682 } 2683 if (keyModifiers.length === 0) 2684 return false; 2685 if (keyModifiers.length === 1 && keyToModifiers(e.key).includes(keyModifiers[0])) 2686 return false; 2687 const systemKeyModifiers = ["ctrl", "shift", "alt", "meta", "cmd", "super"]; 2688 const selectedSystemKeyModifiers = systemKeyModifiers.filter((modifier) => keyModifiers.includes(modifier)); 2689 keyModifiers = keyModifiers.filter((i) => !selectedSystemKeyModifiers.includes(i)); 2690 if (selectedSystemKeyModifiers.length > 0) { 2691 const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier) => { 2692 if (modifier === "cmd" || modifier === "super") 2693 modifier = "meta"; 2694 return e[`${modifier}Key`]; 2695 }); 2696 if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) { 2697 if (keyToModifiers(e.key).includes(keyModifiers[0])) 2698 return false; 2699 } 2700 } 2701 return true; 2702} 2703function keyToModifiers(key) { 2704 if (!key) 2705 return []; 2706 key = kebabCase2(key); 2707 let modifierToKeyMap = { 2708 "ctrl": "control", 2709 "slash": "/", 2710 "space": " ", 2711 "spacebar": " ", 2712 "cmd": "meta", 2713 "esc": "escape", 2714 "up": "arrow-up", 2715 "down": "arrow-down", 2716 "left": "arrow-left", 2717 "right": "arrow-right", 2718 "period": ".", 2719 "equal": "=", 2720 "minus": "-", 2721 "underscore": "_" 2722 }; 2723 modifierToKeyMap[key] = key; 2724 return Object.keys(modifierToKeyMap).map((modifier) => { 2725 if (modifierToKeyMap[modifier] === key) 2726 return modifier; 2727 }).filter((modifier) => modifier); 2728} 2729 2730// packages/alpinejs/src/directives/x-model.js 2731directive("model", (el, { modifiers, expression }, { effect: effect3, cleanup: cleanup2 }) => { 2732 let scopeTarget = el; 2733 if (modifiers.includes("parent")) { 2734 scopeTarget = el.parentNode; 2735 } 2736 let evaluateGet = evaluateLater(scopeTarget, expression); 2737 let evaluateSet; 2738 if (typeof expression === "string") { 2739 evaluateSet = evaluateLater(scopeTarget, `${expression} = __placeholder`); 2740 } else if (typeof expression === "function" && typeof expression() === "string") { 2741 evaluateSet = evaluateLater(scopeTarget, `${expression()} = __placeholder`); 2742 } else { 2743 evaluateSet = () => { 2744 }; 2745 } 2746 let getValue = () => { 2747 let result; 2748 evaluateGet((value) => result = value); 2749 return isGetterSetter(result) ? result.get() : result; 2750 }; 2751 let setValue = (value) => { 2752 let result; 2753 evaluateGet((value2) => result = value2); 2754 if (isGetterSetter(result)) { 2755 result.set(value); 2756 } else { 2757 evaluateSet(() => { 2758 }, { 2759 scope: { "__placeholder": value } 2760 }); 2761 } 2762 }; 2763 if (typeof expression === "string" && el.type === "radio") { 2764 mutateDom(() => { 2765 if (!el.hasAttribute("name")) 2766 el.setAttribute("name", expression); 2767 }); 2768 } 2769 var event = el.tagName.toLowerCase() === "select" || ["checkbox", "radio"].includes(el.type) || modifiers.includes("lazy") ? "change" : "input"; 2770 let removeListener = isCloning ? () => { 2771 } : on(el, event, modifiers, (e) => { 2772 setValue(getInputValue(el, modifiers, e, getValue())); 2773 }); 2774 if (modifiers.includes("fill")) { 2775 if ([null, ""].includes(getValue()) || el.type === "checkbox" && Array.isArray(getValue())) { 2776 el.dispatchEvent(new Event(event, {})); 2777 } 2778 } 2779 if (!el._x_removeModelListeners) 2780 el._x_removeModelListeners = {}; 2781 el._x_removeModelListeners["default"] = removeListener; 2782 cleanup2(() => el._x_removeModelListeners["default"]()); 2783 if (el.form) { 2784 let removeResetListener = on(el.form, "reset", [], (e) => { 2785 nextTick(() => el._x_model && el._x_model.set(el.value)); 2786 }); 2787 cleanup2(() => removeResetListener()); 2788 } 2789 el._x_model = { 2790 get() { 2791 return getValue(); 2792 }, 2793 set(value) { 2794 setValue(value); 2795 } 2796 }; 2797 el._x_forceModelUpdate = (value) => { 2798 if (value === void 0 && typeof expression === "string" && expression.match(/\./)) 2799 value = ""; 2800 window.fromModel = true; 2801 mutateDom(() => bind(el, "value", value)); 2802 delete window.fromModel; 2803 }; 2804 effect3(() => { 2805 let value = getValue(); 2806 if (modifiers.includes("unintrusive") && document.activeElement.isSameNode(el)) 2807 return; 2808 el._x_forceModelUpdate(value); 2809 }); 2810}); 2811function getInputValue(el, modifiers, event, currentValue) { 2812 return mutateDom(() => { 2813 if (event instanceof CustomEvent && event.detail !== void 0) 2814 return event.detail !== null && event.detail !== void 0 ? event.detail : event.target.value; 2815 else if (el.type === "checkbox") { 2816 if (Array.isArray(currentValue)) { 2817 let newValue = modifiers.includes("number") ? safeParseNumber(event.target.value) : event.target.value; 2818 return event.target.checked ? currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue)); 2819 } else { 2820 return event.target.checked; 2821 } 2822 } else if (el.tagName.toLowerCase() === "select" && el.multiple) { 2823 return modifiers.includes("number") ? Array.from(event.target.selectedOptions).map((option) => { 2824 let rawValue = option.value || option.text; 2825 return safeParseNumber(rawValue); 2826 }) : Array.from(event.target.selectedOptions).map((option) => { 2827 return option.value || option.text; 2828 }); 2829 } else { 2830 let rawValue = event.target.value; 2831 return modifiers.includes("number") ? safeParseNumber(rawValue) : modifiers.includes("trim") ? rawValue.trim() : rawValue; 2832 } 2833 }); 2834} 2835function safeParseNumber(rawValue) { 2836 let number = rawValue ? parseFloat(rawValue) : null; 2837 return isNumeric2(number) ? number : rawValue; 2838} 2839function checkedAttrLooseCompare2(valueA, valueB) { 2840 return valueA == valueB; 2841} 2842function isNumeric2(subject) { 2843 return !Array.isArray(subject) && !isNaN(subject); 2844} 2845function isGetterSetter(value) { 2846 return value !== null && typeof value === "object" && typeof value.get === "function" && typeof value.set === "function"; 2847} 2848 2849// packages/alpinejs/src/directives/x-cloak.js 2850directive("cloak", (el) => queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix("cloak"))))); 2851 2852// packages/alpinejs/src/directives/x-init.js 2853addInitSelector(() => `[${prefix("init")}]`); 2854directive("init", skipDuringClone((el, { expression }, { evaluate: evaluate2 }) => { 2855 if (typeof expression === "string") { 2856 return !!expression.trim() && evaluate2(expression, {}, false); 2857 } 2858 return evaluate2(expression, {}, false); 2859})); 2860 2861// packages/alpinejs/src/directives/x-text.js 2862directive("text", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => { 2863 let evaluate2 = evaluateLater2(expression); 2864 effect3(() => { 2865 evaluate2((value) => { 2866 mutateDom(() => { 2867 el.textContent = value; 2868 }); 2869 }); 2870 }); 2871}); 2872 2873// packages/alpinejs/src/directives/x-html.js 2874directive("html", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => { 2875 let evaluate2 = evaluateLater2(expression); 2876 effect3(() => { 2877 evaluate2((value) => { 2878 mutateDom(() => { 2879 el.innerHTML = value; 2880 el._x_ignoreSelf = true; 2881 initTree(el); 2882 delete el._x_ignoreSelf; 2883 }); 2884 }); 2885 }); 2886}); 2887 2888// packages/alpinejs/src/directives/x-bind.js 2889mapAttributes(startingWith(":", into(prefix("bind:")))); 2890var handler2 = (el, { value, modifiers, expression, original }, { effect: effect3 }) => { 2891 if (!value) { 2892 let bindingProviders = {}; 2893 injectBindingProviders(bindingProviders); 2894 let getBindings = evaluateLater(el, expression); 2895 getBindings((bindings) => { 2896 applyBindingsObject(el, bindings, original); 2897 }, { scope: bindingProviders }); 2898 return; 2899 } 2900 if (value === "key") 2901 return storeKeyForXFor(el, expression); 2902 if (el._x_inlineBindings && el._x_inlineBindings[value] && el._x_inlineBindings[value].extract) { 2903 return; 2904 } 2905 let evaluate2 = evaluateLater(el, expression); 2906 effect3(() => evaluate2((result) => { 2907 if (result === void 0 && typeof expression === "string" && expression.match(/\./)) { 2908 result = ""; 2909 } 2910 mutateDom(() => bind(el, value, result, modifiers)); 2911 })); 2912}; 2913handler2.inline = (el, { value, modifiers, expression }) => { 2914 if (!value) 2915 return; 2916 if (!el._x_inlineBindings) 2917 el._x_inlineBindings = {}; 2918 el._x_inlineBindings[value] = { expression, extract: false }; 2919}; 2920directive("bind", handler2); 2921function storeKeyForXFor(el, expression) { 2922 el._x_keyExpression = expression; 2923} 2924 2925// packages/alpinejs/src/directives/x-data.js 2926addRootSelector(() => `[${prefix("data")}]`); 2927directive("data", (el, { expression }, { cleanup: cleanup2 }) => { 2928 if (shouldSkipRegisteringDataDuringClone(el)) 2929 return; 2930 expression = expression === "" ? "{}" : expression; 2931 let magicContext = {}; 2932 injectMagics(magicContext, el); 2933 let dataProviderContext = {}; 2934 injectDataProviders(dataProviderContext, magicContext); 2935 let data2 = evaluate(el, expression, { scope: dataProviderContext }); 2936 if (data2 === void 0 || data2 === true) 2937 data2 = {}; 2938 injectMagics(data2, el); 2939 let reactiveData = reactive(data2); 2940 initInterceptors2(reactiveData); 2941 let undo = addScopeToNode(el, reactiveData); 2942 reactiveData["init"] && evaluate(el, reactiveData["init"]); 2943 cleanup2(() => { 2944 reactiveData["destroy"] && evaluate(el, reactiveData["destroy"]); 2945 undo(); 2946 }); 2947}); 2948 2949// packages/alpinejs/src/directives/x-show.js 2950directive("show", (el, { modifiers, expression }, { effect: effect3 }) => { 2951 let evaluate2 = evaluateLater(el, expression); 2952 if (!el._x_doHide) 2953 el._x_doHide = () => { 2954 mutateDom(() => { 2955 el.style.setProperty("display", "none", modifiers.includes("important") ? "important" : void 0); 2956 }); 2957 }; 2958 if (!el._x_doShow) 2959 el._x_doShow = () => { 2960 mutateDom(() => { 2961 if (el.style.length === 1 && el.style.display === "none") { 2962 el.removeAttribute("style"); 2963 } else { 2964 el.style.removeProperty("display"); 2965 } 2966 }); 2967 }; 2968 let hide = () => { 2969 el._x_doHide(); 2970 el._x_isShown = false; 2971 }; 2972 let show = () => { 2973 el._x_doShow(); 2974 el._x_isShown = true; 2975 }; 2976 let clickAwayCompatibleShow = () => setTimeout(show); 2977 let toggle = once( 2978 (value) => value ? show() : hide(), 2979 (value) => { 2980 if (typeof el._x_toggleAndCascadeWithTransitions === "function") { 2981 el._x_toggleAndCascadeWithTransitions(el, value, show, hide); 2982 } else { 2983 value ? clickAwayCompatibleShow() : hide(); 2984 } 2985 } 2986 ); 2987 let oldValue; 2988 let firstTime = true; 2989 effect3(() => evaluate2((value) => { 2990 if (!firstTime && value === oldValue) 2991 return; 2992 if (modifiers.includes("immediate")) 2993 value ? clickAwayCompatibleShow() : hide(); 2994 toggle(value); 2995 oldValue = value; 2996 firstTime = false; 2997 })); 2998}); 2999 3000// packages/alpinejs/src/directives/x-for.js 3001directive("for", (el, { expression }, { effect: effect3, cleanup: cleanup2 }) => { 3002 let iteratorNames = parseForExpression(expression); 3003 let evaluateItems = evaluateLater(el, iteratorNames.items); 3004 let evaluateKey = evaluateLater( 3005 el, 3006 // the x-bind:key expression is stored for our use instead of evaluated. 3007 el._x_keyExpression || "index" 3008 ); 3009 el._x_prevKeys = []; 3010 el._x_lookup = {}; 3011 effect3(() => loop(el, iteratorNames, evaluateItems, evaluateKey)); 3012 cleanup2(() => { 3013 Object.values(el._x_lookup).forEach((el2) => el2.remove()); 3014 delete el._x_prevKeys; 3015 delete el._x_lookup; 3016 }); 3017}); 3018function loop(el, iteratorNames, evaluateItems, evaluateKey) { 3019 let isObject2 = (i) => typeof i === "object" && !Array.isArray(i); 3020 let templateEl = el; 3021 evaluateItems((items) => { 3022 if (isNumeric3(items) && items >= 0) { 3023 items = Array.from(Array(items).keys(), (i) => i + 1); 3024 } 3025 if (items === void 0) 3026 items = []; 3027 let lookup = el._x_lookup; 3028 let prevKeys = el._x_prevKeys; 3029 let scopes = []; 3030 let keys = []; 3031 if (isObject2(items)) { 3032 items = Object.entries(items).map(([key, value]) => { 3033 let scope2 = getIterationScopeVariables(iteratorNames, value, key, items); 3034 evaluateKey((value2) => keys.push(value2), { scope: { index: key, ...scope2 } }); 3035 scopes.push(scope2); 3036 }); 3037 } else { 3038 for (let i = 0; i < items.length; i++) { 3039 let scope2 = getIterationScopeVariables(iteratorNames, items[i], i, items); 3040 evaluateKey((value) => keys.push(value), { scope: { index: i, ...scope2 } }); 3041 scopes.push(scope2); 3042 } 3043 } 3044 let adds = []; 3045 let moves = []; 3046 let removes = []; 3047 let sames = []; 3048 for (let i = 0; i < prevKeys.length; i++) { 3049 let key = prevKeys[i]; 3050 if (keys.indexOf(key) === -1) 3051 removes.push(key); 3052 } 3053 prevKeys = prevKeys.filter((key) => !removes.includes(key)); 3054 let lastKey = "template"; 3055 for (let i = 0; i < keys.length; i++) { 3056 let key = keys[i]; 3057 let prevIndex = prevKeys.indexOf(key); 3058 if (prevIndex === -1) { 3059 prevKeys.splice(i, 0, key); 3060 adds.push([lastKey, i]); 3061 } else if (prevIndex !== i) { 3062 let keyInSpot = prevKeys.splice(i, 1)[0]; 3063 let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0]; 3064 prevKeys.splice(i, 0, keyForSpot); 3065 prevKeys.splice(prevIndex, 0, keyInSpot); 3066 moves.push([keyInSpot, keyForSpot]); 3067 } else { 3068 sames.push(key); 3069 } 3070 lastKey = key; 3071 } 3072 for (let i = 0; i < removes.length; i++) { 3073 let key = removes[i]; 3074 if (!!lookup[key]._x_effects) { 3075 lookup[key]._x_effects.forEach(dequeueJob); 3076 } 3077 lookup[key].remove(); 3078 lookup[key] = null; 3079 delete lookup[key]; 3080 } 3081 for (let i = 0; i < moves.length; i++) { 3082 let [keyInSpot, keyForSpot] = moves[i]; 3083 let elInSpot = lookup[keyInSpot]; 3084 let elForSpot = lookup[keyForSpot]; 3085 let marker = document.createElement("div"); 3086 mutateDom(() => { 3087 if (!elForSpot) 3088 warn(`x-for ":key" is undefined or invalid`, templateEl); 3089 elForSpot.after(marker); 3090 elInSpot.after(elForSpot); 3091 elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl); 3092 marker.before(elInSpot); 3093 elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl); 3094 marker.remove(); 3095 }); 3096 elForSpot._x_refreshXForScope(scopes[keys.indexOf(keyForSpot)]); 3097 } 3098 for (let i = 0; i < adds.length; i++) { 3099 let [lastKey2, index] = adds[i]; 3100 let lastEl = lastKey2 === "template" ? templateEl : lookup[lastKey2]; 3101 if (lastEl._x_currentIfEl) 3102 lastEl = lastEl._x_currentIfEl; 3103 let scope2 = scopes[index]; 3104 let key = keys[index]; 3105 let clone2 = document.importNode(templateEl.content, true).firstElementChild; 3106 let reactiveScope = reactive(scope2); 3107 addScopeToNode(clone2, reactiveScope, templateEl); 3108 clone2._x_refreshXForScope = (newScope) => { 3109 Object.entries(newScope).forEach(([key2, value]) => { 3110 reactiveScope[key2] = value; 3111 }); 3112 }; 3113 mutateDom(() => { 3114 lastEl.after(clone2); 3115 initTree(clone2); 3116 }); 3117 if (typeof key === "object") { 3118 warn("x-for key cannot be an object, it must be a string or an integer", templateEl); 3119 } 3120 lookup[key] = clone2; 3121 } 3122 for (let i = 0; i < sames.length; i++) { 3123 lookup[sames[i]]._x_refreshXForScope(scopes[keys.indexOf(sames[i])]); 3124 } 3125 templateEl._x_prevKeys = keys; 3126 }); 3127} 3128function parseForExpression(expression) { 3129 let forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; 3130 let stripParensRE = /^\s*\(|\)\s*$/g; 3131 let forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; 3132 let inMatch = expression.match(forAliasRE); 3133 if (!inMatch) 3134 return; 3135 let res = {}; 3136 res.items = inMatch[2].trim(); 3137 let item = inMatch[1].replace(stripParensRE, "").trim(); 3138 let iteratorMatch = item.match(forIteratorRE); 3139 if (iteratorMatch) { 3140 res.item = item.replace(forIteratorRE, "").trim(); 3141 res.index = iteratorMatch[1].trim(); 3142 if (iteratorMatch[2]) { 3143 res.collection = iteratorMatch[2].trim(); 3144 } 3145 } else { 3146 res.item = item; 3147 } 3148 return res; 3149} 3150function getIterationScopeVariables(iteratorNames, item, index, items) { 3151 let scopeVariables = {}; 3152 if (/^\[.*\]$/.test(iteratorNames.item) && Array.isArray(item)) { 3153 let names = iteratorNames.item.replace("[", "").replace("]", "").split(",").map((i) => i.trim()); 3154 names.forEach((name, i) => { 3155 scopeVariables[name] = item[i]; 3156 }); 3157 } else if (/^\{.*\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === "object") { 3158 let names = iteratorNames.item.replace("{", "").replace("}", "").split(",").map((i) => i.trim()); 3159 names.forEach((name) => { 3160 scopeVariables[name] = item[name]; 3161 }); 3162 } else { 3163 scopeVariables[iteratorNames.item] = item; 3164 } 3165 if (iteratorNames.index) 3166 scopeVariables[iteratorNames.index] = index; 3167 if (iteratorNames.collection) 3168 scopeVariables[iteratorNames.collection] = items; 3169 return scopeVariables; 3170} 3171function isNumeric3(subject) { 3172 return !Array.isArray(subject) && !isNaN(subject); 3173} 3174 3175// packages/alpinejs/src/directives/x-ref.js 3176function handler3() { 3177} 3178handler3.inline = (el, { expression }, { cleanup: cleanup2 }) => { 3179 let root = closestRoot(el); 3180 if (!root._x_refs) 3181 root._x_refs = {}; 3182 root._x_refs[expression] = el; 3183 cleanup2(() => delete root._x_refs[expression]); 3184}; 3185directive("ref", handler3); 3186 3187// packages/alpinejs/src/directives/x-if.js 3188directive("if", (el, { expression }, { effect: effect3, cleanup: cleanup2 }) => { 3189 if (el.tagName.toLowerCase() !== "template") 3190 warn("x-if can only be used on a <template> tag", el); 3191 let evaluate2 = evaluateLater(el, expression); 3192 let show = () => { 3193 if (el._x_currentIfEl) 3194 return el._x_currentIfEl; 3195 let clone2 = el.content.cloneNode(true).firstElementChild; 3196 addScopeToNode(clone2, {}, el); 3197 mutateDom(() => { 3198 el.after(clone2); 3199 initTree(clone2); 3200 }); 3201 el._x_currentIfEl = clone2; 3202 el._x_undoIf = () => { 3203 walk(clone2, (node) => { 3204 if (!!node._x_effects) { 3205 node._x_effects.forEach(dequeueJob); 3206 } 3207 }); 3208 clone2.remove(); 3209 delete el._x_currentIfEl; 3210 }; 3211 return clone2; 3212 }; 3213 let hide = () => { 3214 if (!el._x_undoIf) 3215 return; 3216 el._x_undoIf(); 3217 delete el._x_undoIf; 3218 }; 3219 effect3(() => evaluate2((value) => { 3220 value ? show() : hide(); 3221 })); 3222 cleanup2(() => el._x_undoIf && el._x_undoIf()); 3223}); 3224 3225// packages/alpinejs/src/directives/x-id.js 3226directive("id", (el, { expression }, { evaluate: evaluate2 }) => { 3227 let names = evaluate2(expression); 3228 names.forEach((name) => setIdRoot(el, name)); 3229}); 3230 3231// packages/alpinejs/src/directives/x-on.js 3232mapAttributes(startingWith("@", into(prefix("on:")))); 3233directive("on", skipDuringClone((el, { value, modifiers, expression }, { cleanup: cleanup2 }) => { 3234 let evaluate2 = expression ? evaluateLater(el, expression) : () => { 3235 }; 3236 if (el.tagName.toLowerCase() === "template") { 3237 if (!el._x_forwardEvents) 3238 el._x_forwardEvents = []; 3239 if (!el._x_forwardEvents.includes(value)) 3240 el._x_forwardEvents.push(value); 3241 } 3242 let removeListener = on(el, value, modifiers, (e) => { 3243 evaluate2(() => { 3244 }, { scope: { "$event": e }, params: [e] }); 3245 }); 3246 cleanup2(() => removeListener()); 3247})); 3248 3249// packages/alpinejs/src/directives/index.js 3250warnMissingPluginDirective("Collapse", "collapse", "collapse"); 3251warnMissingPluginDirective("Intersect", "intersect", "intersect"); 3252warnMissingPluginDirective("Focus", "trap", "focus"); 3253warnMissingPluginDirective("Mask", "mask", "mask"); 3254function warnMissingPluginDirective(name, directiveName, slug) { 3255 directive(directiveName, (el) => warn(`You can't use [x-${directiveName}] without first installing the "${name}" plugin here: https://alpinejs.dev/plugins/${slug}`, el)); 3256} 3257 3258// packages/alpinejs/src/index.js 3259alpine_default.setEvaluator(normalEvaluator); 3260alpine_default.setReactivityEngine({ reactive: reactive2, effect: effect2, release: stop, raw: toRaw }); 3261var src_default = alpine_default; 3262 3263// packages/alpinejs/builds/module.js 3264var module_default = src_default; 3265 3266 3267 3268/***/ }), 3269
3270/***/ "./src/js/app.js": 3271/*!***********************!*\ 3272 !*** ./src/js/app.js ***! 3273 \***********************/ 3274/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3275 3276"use strict"; 3277__webpack_require__.r(__webpack_exports__); 3278/* harmony import */ var alpinejs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! alpinejs */ "./node_modules/alpinejs/dist/module.esm.js"); 3279/* harmony import */ var _component_videoPopup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./component/videoPopup.js */ "./src/js/component/videoPopup.js"); 3280/* harmony import */ var _component_videoPopup_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_component_videoPopup_js__WEBPACK_IMPORTED_MODULE_1__); 3281/* harmony import */ var _component_longtext_wrapper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./component/longtext-wrapper.js */ "./src/js/component/longtext-wrapper.js"); 3282/* harmony import */ var _component_longtext_wrapper_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_component_longtext_wrapper_js__WEBPACK_IMPORTED_MODULE_2__); 3283/* harmony import */ var _component_modalServices_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./component/modalServices.js */ "./src/js/component/modalServices.js"); 3284/* harmony import */ var _component_modalServices_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_component_modalServices_js__WEBPACK_IMPORTED_MODULE_3__); 3285/* harmony import */ var _component_longtext_collection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./component/longtext-collection.js */ "./src/js/component/longtext-collection.js"); 3286/* harmony import */ var _component_longtext_collection_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_component_longtext_collection_js__WEBPACK_IMPORTED_MODULE_4__); 3287/* harmony import */ var _component_init_longtext_featuretext_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component/init-longtext-featuretext.js */ "./src/js/component/init-longtext-featuretext.js"); 3288/* harmony import */ var _component_facetsobserver_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./component/facetsobserver.js */ "./src/js/component/facetsobserver.js"); 3289/* harmony import */ var _component_facetsobserver_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_component_facetsobserver_js__WEBPACK_IMPORTED_MODULE_6__); 3290/* harmony import */ var _component_related_blog_grid_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./component/related-blog-grid.js */ "./src/js/component/related-blog-grid.js"); 3291/* harmony import */ var _component_related_blog_grid_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_component_related_blog_grid_js__WEBPACK_IMPORTED_MODULE_7__); 3292/* harmony import */ var _component_activate_menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./component/activate-menu */ "./src/js/component/activate-menu.js"); 3293/* harmony import */ var _component_datepicker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./component/datepicker */ "./src/js/component/datepicker.js"); 3294/* harmony import */ var _component_redirect_product_cta__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./component/redirect-product-cta */ "./src/js/component/redirect-product-cta.js"); 3295/* harmony import */ var _component_init_review_slider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./component/init-review-slider */ "./src/js/component/init-review-slider.js"); 3296/* harmony import */ var _component_init_product_info_slideshow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./component/init-product-info-slideshow */ "./src/js/component/init-product-info-slideshow.js"); 3297/* harmony import */ var _component_init_multicolumn_with_icons_slider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./component/init-multicolumn-with-icons-slider */ "./src/js/component/init-multicolumn-with-icons-slider.js"); 3298/* harmony import */ var _component_init_multicolumn_with_icons_popup_actions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./component/init-multicolumn-with-icons-popup-actions */ "./src/js/component/init-multicolumn-with-icons-popup-actions.js"); 3299/* harmony import */ var _component_init_product_gallery_slider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./component/init-product-gallery-slider */ "./src/js/component/init-product-gallery-slider.js"); 3300/* harmony import */ var _component_init_additional_info_video__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./component/init-additional-info-video */ "./src/js/component/init-additional-info-video.js"); 3301/* harmony import */ var _component_init_slide_swiper__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./component/init-slide-swiper */ "./src/js/component/init-slide-swiper.js"); 3302/* harmony import */ var _component_text_content_slide__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./component/text-content-slide */ "./src/js/component/text-content-slide.js"); 3303/* harmony import */ var _component_init_related_products__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./component/init-related-products */ "./src/js/component/init-related-products.js"); 3304/* harmony import */ var _component_init_page_additional_info__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./component/init-page-additional-info */ "./src/js/component/init-page-additional-info.js"); 3305/* harmony import */ var _component_init_add_coupon__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./component/init-add-coupon */ "./src/js/component/init-add-coupon.js"); 3306/* harmony import */ var _component_init_product_media_gallery__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./component/init-product-media-gallery */ "./src/js/component/init-product-media-gallery.js"); 3307/* harmony import */ var _component_init_localization_popup__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./component/init-localization-popup */ "./src/js/component/init-localization-popup.js"); 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332window.Alpine = alpinejs__WEBPACK_IMPORTED_MODULE_0__["default"]; 3333alpinejs__WEBPACK_IMPORTED_MODULE_0__["default"].start(); 3334(0,_component_init_longtext_featuretext_js__WEBPACK_IMPORTED_MODULE_5__.initLongtextFeaturetext)(); 3335(0,_component_activate_menu__WEBPACK_IMPORTED_MODULE_8__.activateMenu)('ul#menu-footer-mobile'); 3336(0,_component_datepicker__WEBPACK_IMPORTED_MODULE_9__.initDatepicker)('#RegisterForm-note-birthday'); 3337(0,_component_redirect_product_cta__WEBPACK_IMPORTED_MODULE_10__.redirectProductCta)('body.product-cta .main-product-cta'); 3338(0,_component_init_review_slider__WEBPACK_IMPORTED_MODULE_11__.initReviewSlider)(); 3339(0,_component_init_product_info_slideshow__WEBPACK_IMPORTED_MODULE_12__.initProductInfoSlideshow)(); 3340(0,_component_init_multicolumn_with_icons_slider__WEBPACK_IMPORTED_MODULE_13__.initMulticolumnWithIconsSlider)(); 3341(0,_component_init_multicolumn_with_icons_popup_actions__WEBPACK_IMPORTED_MODULE_14__.initMulticolumnWithIconsPopupActions)(); 3342(0,_component_init_product_gallery_slider__WEBPACK_IMPORTED_MODULE_15__.initProductGallerySlider)(); 3343(0,_component_init_additional_info_video__WEBPACK_IMPORTED_MODULE_16__.initAdditionalInfoVideo)(); 3344(0,_component_init_slide_swiper__WEBPACK_IMPORTED_MODULE_17__.initSlideSwiper)(); 3345(0,_component_text_content_slide__WEBPACK_IMPORTED_MODULE_18__.textContentSlide)(); 3346(0,_component_init_related_products__WEBPACK_IMPORTED_MODULE_19__.initRelatedProducts)(); 3347(0,_component_init_page_additional_info__WEBPACK_IMPORTED_MODULE_20__.initPageAdditionalInfo)(); 3348(0,_component_init_add_coupon__WEBPACK_IMPORTED_MODULE_21__.initAddCoupon)(); 3349(0,_component_init_product_media_gallery__WEBPACK_IMPORTED_MODULE_22__.productMediaGallery)(); 3350(0,_component_init_localization_popup__WEBPACK_IMPORTED_MODULE_23__.initLocalizationPopup)(); 3351 3352/***/ }), 3353
3354/***/ "./src/js/component/activate-menu.js": 3355/*!*******************************************!*\ 3356 !*** ./src/js/component/activate-menu.js ***! 3357 \*******************************************/ 3358/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3359 3360"use strict"; 3361__webpack_require__.r(__webpack_exports__); 3362/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3363/* harmony export */ activateMenu: () => (/* binding */ activateMenu) 3364/* harmony export */ }); 3365/** 3366 * Function to activate menu actions 3367 * @param selector 3368 */ 3369var activateMenu = function activateMenu(selector) { 3370 var menu = document.querySelector(selector); 3371 if (menu) { 3372 var menuItems = menu.querySelectorAll('li.main-level'); 3373 for (var i = 0; i < menuItems.length; i++) { 3374 menuItems[i].addEventListener('click', function () { 3375 var estatus = this.getAttribute('open'); 3376 menuItems.forEach(function (elem) { 3377 elem.classList.remove('active'); 3378 elem.removeAttribute('open'); 3379 }); 3380 if (estatus) { 3381 this.classList.remove('active'); 3382 this.removeAttribute('open'); 3383 } else { 3384 this.classList.toggle('active'); 3385 this.setAttribute('open', true); 3386 } 3387 }); 3388 } 3389 } 3390}; 3391 3392/***/ }), 3393
3394/***/ "./src/js/component/datepicker.js": 3395/*!****************************************!*\ 3396 !*** ./src/js/component/datepicker.js ***! 3397 \****************************************/ 3398/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3399 3400"use strict"; 3401__webpack_require__.r(__webpack_exports__); 3402/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3403/* harmony export */ initDatepicker: () => (/* binding */ initDatepicker) 3404/* harmony export */ }); 3405/* harmony import */ var flatpickr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatpickr */ "./node_modules/flatpickr/dist/esm/index.js"); 3406/* harmony import */ var flatpickr_dist_l10n_it__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flatpickr/dist/l10n/it */ "./node_modules/flatpickr/dist/l10n/it.js"); 3407/* harmony import */ var flatpickr_dist_l10n_it__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flatpickr_dist_l10n_it__WEBPACK_IMPORTED_MODULE_1__); 3408 3409 3410var initDatepicker = function initDatepicker(selector) { 3411 (0,flatpickr__WEBPACK_IMPORTED_MODULE_0__["default"])(selector, { 3412 locale: flatpickr_dist_l10n_it__WEBPACK_IMPORTED_MODULE_1__.Italian, 3413 dateFormat: "d/m/Y", 3414 disableMobile: true 3415 }); 3416}; 3417 3418/***/ }), 3419
3420/***/ "./src/js/component/facetsobserver.js": 3421/*!********************************************!*\ 3422 !*** ./src/js/component/facetsobserver.js ***! 3423 \********************************************/ 3424/***/ (() => { 3425 3426document.addEventListener('DOMContentLoaded', function () { 3427 function hideActiveFacetsButtonWrapper() { 3428 var facetsMobileFiltersWrapper = document.querySelector('.facets-mobile-filters-wrapper'); 3429 if (facetsMobileFiltersWrapper) { 3430 var activeFacetsButtonWrapper = document.querySelector('facet-remove.facet-remove-mobile'); 3431 if (activeFacetsButtonWrapper) { 3432 activeFacetsButtonWrapper.style.display = 'none'; 3433 activeFacetsButtonWrapper.classList.add('hidden'); 3434 } 3435 } 3436 } 3437 3438 // Configurar un MutationObserver para observar cambios en el DOM 3439 var observer = new MutationObserver(function () { 3440 // Verificar si hay elementos facet-remove después de cada mutación 3441 var facetRemoveElements = document.querySelectorAll('.facets-mobile-filters-wrapper facet-remove:not(.active-facets__button-wrapper)'); 3442 if (facetRemoveElements.length === 0) { 3443 hideActiveFacetsButtonWrapper(); 3444 } 3445 }); 3446 3447 // Definir las opciones de observación para el MutationObserver 3448 var observerConfig = { 3449 childList: true, 3450 subtree: true 3451 }; 3452 3453 // Comenzar a observar cambios en el DOM 3454 observer.observe(document.body, observerConfig); 3455}); 3456 3457/***/ }), 3458
3459/***/ "./src/js/component/init-add-coupon.js": 3460/*!*********************************************!*\ 3461 !*** ./src/js/component/init-add-coupon.js ***! 3462 \*********************************************/ 3463/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3464 3465"use strict"; 3466__webpack_require__.r(__webpack_exports__); 3467/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3468/* harmony export */ initAddCoupon: () => (/* binding */ initAddCoupon) 3469/* harmony export */ }); 3470function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } 3471function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 3472function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } 3473/** 3474 * Function to send coupon code to Shopify services 3475 * @param couponCode 3476 * @param cart 3477 */ 3478var sendCoupon = function sendCoupon(couponCode, cart) { 3479 showSpinner(true); 3480 fetch("/discount/".concat(couponCode)).then(function () { 3481 // After the discount code has been applied, force the cart to update so the discount is visible 3482 return fetch('/cart/update.js', { 3483 method: 'POST', 3484 headers: { 3485 'Content-Type': 'application/json' 3486 }, 3487 body: JSON.stringify({ 3488 updates: {}, 3489 sections: cart.getSectionsToRender().map(function (section) { 3490 return section.id; 3491 }), 3492 sections_url: window.location.pathname 3493 }) 3494 }).then(function (response) { 3495 return response.json(); 3496 }).then(function (response) { 3497 showSpinner(false); 3498 if (response.total_discount > 0) { 3499 if (cart) { 3500 cart.renderContents(response); 3501 } else { 3502 window.location = window.routes.cart_url; 3503 } 3504 } else { 3505 showError(); 3506 setTimeout(function () { 3507 return cart && cart.renderContents(response); 3508 }, 2500); 3509 } 3510 }); 3511 })["catch"](function (error) { 3512 console.error('Error:', error); 3513 }); 3514}; 3515 3516/** 3517 * Function to show/hide spinner 3518 * @param enable 3519 */ 3520var showSpinner = function showSpinner(enable) { 3521 var spinner = document.querySelector('#Details-CartDrawerCoupon .coupon-button--loading-overlay'); 3522 if (enable) { 3523 spinner.classList.remove('hidden'); 3524 } else { 3525 spinner.classList.add('hidden'); 3526 } 3527}; 3528 3529/** 3530 * Function to show error 3531 */ 3532var showError = function showError() { 3533 var errorEl = document.querySelector('#Details-CartDrawerCoupon .coupon__error'); 3534 if (errorEl) { 3535 errorEl.classList.remove('hidden'); 3536 } 3537}; 3538 3539/** 3540 * Cart element observer 3541 * @param cart 3542 */ 3543var observerCart = function observerCart(cart) { 3544 var observer = new MutationObserver(function (mutationsList, observer) { 3545 var _iterator = _createForOfIteratorHelper(mutationsList), 3546 _step; 3547 try { 3548 for (_iterator.s();
3548 !(_step = _iterator.n()).done;) { 3549 var mutation = _step.value; 3550 if (mutation.type === 'attributes' && mutation.attributeName === 'class') { 3551 var couponInput = document.querySelector('#CartDrawer-CouponInput'); 3552 var couponButton = document.querySelector('#CartDrawer-CouponAdd'); 3553 var _cart = document.querySelector('cart-notification') || document.querySelector('cart-drawer'); 3554 if (couponInput && couponButton && _cart) { 3555 listenButton(couponInput, couponButton, _cart); 3556 } 3557 } 3558 } 3559 } catch (err) { 3560 _iterator.e(err); 3561 } finally { 3562 _iterator.f(); 3563 } 3564 }); 3565 observer.observe(cart, { 3566 attributes: true 3567 }); 3568}; 3569 3570/** 3571 * coupon add button listener 3572 * @param input 3573 * @param button 3574 * @param cart 3575 */ 3576var listenButton = function listenButton(input, button, cart) { 3577 button.addEventListener('click', function () { 3578 sendCoupon(input.value, cart); 3579 }); 3580}; 3581 3582/** 3583 * Init coupon add component 3584 */ 3585var initAddCoupon = function initAddCoupon() { 3586 var couponInput = document.querySelector('#CartDrawer-CouponInput'); 3587 var couponButton = document.querySelector('#CartDrawer-CouponAdd'); 3588 var cart = document.querySelector('cart-notification') || document.querySelector('cart-drawer'); 3589 if (couponInput && couponButton && cart) { 3590 listenButton(couponInput, couponButton, cart); 3591 3592 /* observe cart */ 3593 observerCart(cart); 3594 } 3595}; 3596 3597/***/ }), 3598
3599/***/ "./src/js/component/init-additional-info-video.js": 3600/*!********************************************************!*\ 3601 !*** ./src/js/component/init-additional-info-video.js ***! 3602 \********************************************************/ 3603/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3604 3605"use strict"; 3606__webpack_require__.r(__webpack_exports__); 3607/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3608/* harmony export */ initAdditionalInfoVideo: () => (/* binding */ initAdditionalInfoVideo) 3609/* harmony export */ }); 3610var initAdditionalInfoVideo = function initAdditionalInfoVideo() { 3611 var videos = document.querySelectorAll('.product-additional-info .video-section__media'); 3612 if (videos.length > 0) { 3613 videos.forEach(function (videoEl) { 3614 var videoId = videoEl.getAttribute('data-media-id'); 3615 var videoPopup = videoEl.querySelector('#video-popup-' + videoId); 3616 var videoButton = videoEl.querySelector('.video-section__poster'); 3617 if (videoButton && videoPopup) { 3618 videoButton.addEventListener('click', function () { 3619 videoPopup.openPopup(); 3620 }); 3621 } 3622 }); 3623 } 3624}; 3625 3626/***/ }), 3627
3628/***/ "./src/js/component/init-localization-popup.js": 3629/*!*****************************************************!*\ 3630 !*** ./src/js/component/init-localization-popup.js ***! 3631 \*****************************************************/ 3632/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3633 3634"use strict"; 3635__webpack_require__.r(__webpack_exports__); 3636/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3637/* harmony export */ initLocalizationPopup: () => (/* binding */ initLocalizationPopup) 3638/* harmony export */ }); 3639function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } 3640function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 3641function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 3642function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 3643function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } 3644function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 3645function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } 3646var SHOPIFY_LOCALIZATION_COOKIE = 'localization'; 3647var TEN_LOCALIZATION_MARKET_SELECTED_COOKIE = 'ten_changecountry_popup_selected'; 3648var TEN_COUNTRY_URL_PARAMETER = 's'; 3649 3650/** 3651 * Function to get cookie value by cookie name 3652 * @param name 3653 * @returns {null|string} 3654 */ 3655var getCookieValue = function getCookieValue(name) { 3656 var cookieString = document.cookie; 3657 var cookies = cookieString.split('; '); 3658 var _iterator = _createForOfIteratorHelper(cookies), 3659 _step; 3660 try { 3661 for (_iterator.s(); !(_step = _iterator.n()).done;) { 3662 var cookie = _step.value; 3663 var _cookie$split = cookie.split('='), 3664 _cookie$split2 = _slicedToArray(_cookie$split, 2), 3665 cKey = _cookie$split2[0], 3666 cValue = _cookie$split2[1]; 3667 if (cKey === name) { 3668 return decodeURIComponent(cValue); 3669 } 3670 } 3671 } catch (err) { 3672 _iterator.e(err); 3673 } finally { 3674 _iterator.f(); 3675 } 3676 return null; 3677}; 3678 3679/** 3680 * Function to set cookie value 3681 * @param name 3682 * @param value 3683 */ 3684var setCookieValue = function setCookieValue(name, value) { 3685 var expiresData = new Date(); 3686 3687 /* set expiration to 30 days */ 3688 expiresData.setTime(expiresData.getTime() + 30 * 24 * 60 * 60 * 1000); 3689 document.cookie = "".concat(name, "=").concat(encodeURIComponent(value), "; expires=").concat(expiresData.toUTCString(), "; path=/"); 3690}; 3691 3692/**
3693 * Function to get an URL parameter by name 3694 * @param key 3695 * @returns {string} 3696 */ 3697var getParameter = function getParameter(key) { 3698 var urlParams = new URLSearchParams(window.location.search); 3699 return urlParams.get(key); 3700}; 3701 3702/** 3703 * Function to get root URL 3704 * @returns {string} 3705 */ 3706var getRootUrl = function getRootUrl() { 3707 return window.location.origin; 3708}; 3709 3710/** 3711 * Function to get markets data from property 3712 * @param popup 3713 */ 3714var getMarketsData = function getMarketsData(popup) { 3715 var marketsRawData = popup.dataset.markets; 3716 var outputData = {}; 3717 if (marketsRawData && typeof marketsRawData !== 'undefined') { 3718 var marketsList = marketsRawData.split(','); 3719 if (marketsList.length > 0) { 3720 marketsList.forEach(function (marketData) { 3721 var marketDataList = marketData.split('::'); 3722 if (marketDataList.length > 1) { 3723 var mCountry = marketDataList[2]; 3724 var mName = marketDataList[0]; 3725 var mRootPath = typeof marketDataList[4] !== 'undefined' && marketDataList[4] !== '' ? marketDataList[4] : null; 3726 var mTarget = typeof marketDataList[5] !== 'undefined' && marketDataList[5] !== '' ? marketDataList[5] : null; 3727 outputData[mCountry] = { 3728 iso_code: mCountry, 3729 name: mName, 3730 root_path: mRootPath, 3731 target_url: mTarget 3732 }; 3733 } 3734 }); 3735 } 3736 } 3737 return outputData; 3738}; 3739var handlePopupEvents = function handlePopupEvents(popup, storeSelector) { 3740 var closePopupLink = popup.querySelector('a.link-close-popup-country'); 3741 var stayPopupLink = popup.querySelector('a.link-stay-popup-country'); 3742 if (closePopupLink && stayPopupLink) { 3743 closePopupLink.addEventListener('click', function (e) { 3744 e.preventDefault();
3745 dismissPopup(popup); 3746 }); 3747 stayPopupLink.addEventListener('click', function (e) { 3748 e.preventDefault(); 3749 dismissPopup(popup); 3750 }); 3751 storeSelector.addEventListener('click', function (e) { 3752 e.preventDefault(); 3753 setCookieValue(TEN_LOCALIZATION_MARKET_SELECTED_COOKIE, e.currentTarget.dataset.country); 3754 location.href = e.currentTarget.href; 3755 }); 3756 document.addEventListener('keydown', function (e) { 3757 if (e.key === 'Escape') { 3758 closePopup(popup); 3759 } 3760 }); 3761 } 3762}; 3763 3764/** 3765 * Function to dismiss popup 3766 * @param popup 3767 */ 3768var dismissPopup = function dismissPopup(popup) { 3769 setCookieValue(TEN_LOCALIZATION_MARKET_SELECTED_COOKIE, window.Shopify.country); 3770 closePopup(popup); 3771 document.location.reload(); 3772}; 3773 3774/** 3775 * Function to open popup 3776 * @param popup 3777 */ 3778var openPopup = function openPopup(popup) { 3779 popup.classList.remove('hidden'); 3780 popup.setAttribute('aria-hidden', 'false'); 3781 document.body.classList.add('body-fixed'); 3782}; 3783 3784/** 3785 * Function to close popup 3786 * @param popup 3787 */ 3788var closePopup = function closePopup(popup) { 3789 popup.classList.add('hidden'); 3790 popup.setAttribute('aria-hidden', 'true'); 3791 document.body.classList.remove('body-fixed'); 3792}; 3793 3794/** 3795 * Function to set popup info 3796 * @param isoCode 3797 * @param countryName 3798 * @param defaultMarketUrl 3799 * @param defaultMarketCountryIso 3800 * @param marketsData 3801 * @param storeSelector 3802 * @param currentCountry 3803 */ 3804var setPopupInfo = function setPopupInfo(isoCode, countryName, defaultMarketUrl, defaultMarketCountryIso, marketsData, storeSelector, currentCountry) { 3805 currentCountry.innerHTML = countryName; 3806 storeSelector.querySelector('span').innerHTML = countryName; 3807 var targetUrl = getRootUrl(); 3808 var targetCountry = window.Shopify.country; 3809 var marketFound = false; 3810 for (var mCountryCode in marketsData) { 3811 if (marketsData.hasOwnProperty(mCountryCode)) { 3812 var marketData = marketsData[mCountryCode]; 3813 if (marketData.iso_code === isoCode) { 3814 /* set link target url */ 3815 if (!marketData.target_url) { 3816 targetUrl += marketData.root_path; 3817 } else { 3818 targetUrl = marketData.target_url; 3819 } 3820 targetCountry = isoCode; 3821 marketFound = true; 3822 break; 3823 } 3824 } 3825 } 3826 if (!marketFound && typeof defaultMarketUrl === 'string' && defaultMarketUrl !== '') { 3827 targetUrl = defaultMarketUrl; 3828 if (typeof defaultMarketCountryIso === 'string' && defaultMarketCountryIso !== '') { 3829 targetCountry = defaultMarketCountryIso; 3830 } 3831 } 3832 storeSelector.setAttribute('href', targetUrl); 3833 storeSelector.setAttribute('data-country', targetCountry); 3834}; 3835 3836/** 3837 * Localization form init service 3838 */ 3839var initLocalizationPopup = function initLocalizationPopup() { 3840 var localizationPopupEl = document.querySelector('#shopify-section-change-country_popup'); 3841 var localizationFormEl = document.querySelector('#js-country-form'); 3842 var countryCodeEl = document.querySelector('#js-country-code'); 3843 var storeUrlSelectorEl = document.querySelector('#popup-link-goto'); 3844 var currentCountryEl = document.querySelector('#js_current_country'); 3845 if (localizationPopupEl && localizationFormEl && countryCodeEl && storeUrlSelectorEl && currentCountryEl) { 3846 var checkShopifyInterval = setInterval(function () { 3847 if (window.Shopify && window.Shopify.routes) { 3848 clearInterval(checkShopifyInterval); 3849 var countryIsoCode = getParameter(TEN_COUNTRY_URL_PARAMETER); 3850 var cookieValue = getCookieValue(SHOPIFY_LOCALIZATION_COOKIE); 3851 var marketsData = getMarketsData(localizationPopupEl); 3852 var defaultMarketUrl = localizationPopupEl.dataset.defaultMarketUrl; 3853 var defaultMarketCountryIso = localizationPopupEl.dataset.defaultMarketCountry; 3854 if (Object.keys(marketsData).length > 0) { 3855 if (countryIsoCode && cookieValue !== countryIsoCode) { 3856 if (Object.keys(marketsData).indexOf(countryIsoCode) === -1 || marketsData[countryIsoCode].target_url === null) { 3857 /* use the classic form */ 3858 countryCodeEl.value = countryIsoCode; 3859 localizationFormEl.submit(); 3860 } else { 3861 /* go to the target url */ 3862 document.location.href = marketsData[countryIsoCode].target_url !== null ? marketsData[countryIsoCode].target_url : '/'; 3863 } 3864 } else { 3865 var rootURL = getRootUrl(); 3866 var marketSelectedCookie = getCookieValue(TEN_LOCALIZATION_MARKET_SELECTED_COOKIE); 3867 if (!marketSelectedCookie || marketSelectedCookie !== cookieValue) { 3868 /* get context suggestions */ 3869 var suggestionUrl = rootURL + '/browsing_context_suggestions.json?country[enabled]=true&country[exclude]=' + window.Shopify.country + '&language[enabled]=true&language[exclude]=' + window.Shopify.locale; 3870 fetch(suggestionUrl).then(function (res) { 3871 return res.json(); 3872 }).then(function (r) { 3873 var iso = r.detected_values.country.handle; 3874 var countryName = r.detected_values.country.name; 3875 setPopupInfo(iso, countryName, defaultMarketUrl, defaultMarketCountryIso, marketsData, storeUrlSelectorEl, currentCountryEl); 3876 if (r.suggestions && r.suggestions.length > 0) { 3877 var firstSuggestion = r.suggestions[0]; 3878 if (firstSuggestion.parts && firstSuggestion.parts.country) { 3879 openPopup(localizationPopupEl); 3880 } 3881 } else if (iso !== window.Shopify.country) { 3882 openPopup(localizationPopupEl); 3883 } 3884 }); 3885 } 3886 } 3887 } 3888 handlePopupEvents(localizationPopupEl, storeUrlSelectorEl); 3889 } 3890 }, 1000); 3891 } 3892}; 3893 3894/***/ }), 3895
3896/***/ "./src/js/component/init-longtext-featuretext.js": 3897/*!*******************************************************!*\ 3898 !*** ./src/js/component/init-longtext-featuretext.js ***! 3899 \*******************************************************/ 3900/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3901 3902"use strict"; 3903__webpack_require__.r(__webpack_exports__); 3904/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3905/* harmony export */ initLongtextFeaturetext: () => (/* binding */ initLongtextFeaturetext) 3906/* harmony export */ }); 3907// NOTE: commented because we're now setting the visibility of the button 3908// on the length of the text to show, with an inline style attribute. 3909 3910/** 3911 * toggle button visibiliy 3912 * @param container 3913 * @param toggleButton 3914 * @param maxHeight 3915 */ 3916// const toggleButtonVisibility = (container, toggleButton, maxHeight) => { 3917// if (container instanceof Element) { 3918// if ( 3919// container.scrollHeight > 3920// maxHeight * parseFloat(getComputedStyle(container).fontSize) 3921// ) { 3922// toggleButton.style.display = 'block'; 3923// } else { 3924// toggleButton.style.display = 'none'; 3925// } 3926// } 3927// } 3928 3929/** 3930 * init long text function 3931 */ 3932var initLongtextFeaturetext = function initLongtextFeaturetext() { 3933 var wrapper = document.querySelector('#features_description_content'); 3934 if (wrapper) { 3935 var container = wrapper.querySelector('.content'); 3936 var toggleButton = wrapper.querySelector('#toggleButton'); 3937 var maxHeight = wrapper.dataset.maxheight; 3938 var readMore = toggleButton.dataset.readmore; 3939 var readLess = toggleButton.dataset.readless; 3940 if (container instanceof Element) { 3941 // Add event listener to Read more button 3942 toggleButton.addEventListener('click', function () { 3943 if (container.classList.contains('expanded')) { 3944 container.classList.remove('expanded'); 3945 toggleButton.textContent = readMore; 3946 container.style.height = maxHeight + 'rem'; 3947 } else { 3948 container.classList.add('expanded'); 3949 toggleButton.textContent = readLess; 3950 container.style.height = 'auto'; 3951 } 3952 }); 3953 } 3954 } 3955}; 3956 3957/***/ }), 3958
3959/***/ "./src/js/component/init-multicolumn-with-icons-popup-actions.js": 3960/*!***********************************************************************!*\ 3961 !*** ./src/js/component/init-multicolumn-with-icons-popup-actions.js ***! 3962 \***********************************************************************/ 3963/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3964 3965"use strict"; 3966__webpack_require__.r(__webpack_exports__); 3967/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3968/* harmony export */ initMulticolumnWithIconsPopupActions: () => (/* binding */ initMulticolumnWithIconsPopupActions) 3969/* harmony export */ }); 3970/** 3971 * Init Popup Actions 3972 */ 3973var initMulticolumnWithIconsPopupActions = function initMulticolumnWithIconsPopupActions() { 3974 var mcEl = document.querySelector('#multicolumn-with-icons-slider-swiper'); 3975 var openPopup = function openPopup(linkEl) { 3976 var popupId = '#Modal-' + linkEl.target.getAttribute('data-popup'); 3977 var popupEl = document.querySelector(popupId); 3978 if (popupEl) { 3979 var popupTargetUrl = popupEl.getAttribute('data-target'); 3980 var popupTargetSel = popupEl.getAttribute('data-target-sel'); 3981 var loaderEl = popupEl.querySelector('.custom-loader'); 3982 var textTargetEl = popupEl.querySelector('.modal-content__target'); 3983 loaderEl.classList.remove('hidden'); 3984 textTargetEl.classList.add('hidden'); 3985 fetch(popupTargetUrl).then(function (response) { 3986 return response.text(); 3987 }).then(function (html) { 3988 var tmpEl = document.createElement('div'); 3989 tmpEl.innerHTML = html; 3990 var targetContent = tmpEl.querySelector(popupTargetSel); 3991 if (targetContent) { 3992 textTargetEl.innerHTML = targetContent.innerHTML; 3993 textTargetEl.classList.remove('hidden'); 3994 loaderEl.classList.add('hidden'); 3995 } 3996 }); 3997 } 3998 }; 3999 if (mcEl) { 4000 /* get all list with popup */ 4001 var popupLinks = mcEl.querySelectorAll('.swiper-slide .link_popup'); 4002 if (popupLinks && popupLinks.length > 0) { 4003 popupLinks.forEach(function (link) { 4004 link.addEventListener('click', openPopup); 4005 }); 4006 } 4007 } 4008}; 4009 4010/***/ }), 4011
4012/***/ "./src/js/component/init-multicolumn-with-icons-slider.js": 4013/*!****************************************************************!*\ 4014 !*** ./src/js/component/init-multicolumn-with-icons-slider.js ***! 4015 \****************************************************************/ 4016/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4017 4018"use strict"; 4019__webpack_require__.r(__webpack_exports__); 4020/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4021/* harmony export */ initMulticolumnWithIconsSlider: () => (/* binding */ initMulticolumnWithIconsSlider) 4022/* harmony export */ }); 4023/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4024/* harmony import */ var swiper_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/modules */ "./node_modules/swiper/modules/index.mjs"); 4025/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4026/* harmony import */ var swiper_css_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! swiper/css/navigation */ "./node_modules/swiper/modules/navigation.css"); 4027/* harmony import */ var swiper_css_pagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! swiper/css/pagination */ "./node_modules/swiper/modules/pagination.css"); 4028 4029 4030 4031 4032 4033 4034/** 4035 * Function to init Multicolumn slider 4036 * @returns Swiper | null 4037 */ 4038var initMulticolumnWithIconsSlider = function initMulticolumnWithIconsSlider() { 4039 var sliderSel = '#multicolumn-with-icons-slider-swiper'; 4040 var sliderEl = document.querySelector(sliderSel); 4041 if (sliderEl) { 4042 var _sliderEl$getAttribut; 4043 var blockSize = (_sliderEl$getAttribut = sliderEl.getAttribute('data-slides-per-view')) !== null && _sliderEl$getAttribut !== void 0 ? _sliderEl$getAttribut : 4; 4044 return new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](sliderSel, { 4045 modules: [swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Navigation, swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Pagination], 4046 slidesPerView: 2, 4047 spaceBetween: 10, 4048 pagination: { 4049 el: ".swiper-pagination", 4050 clickable: true 4051 }, 4052 breakpoints: { 4053 1025: { 4054 dots: false, 4055 slidesPerView: blockSize, 4056 spaceBetween: 30 4057 } 4058 } 4059 }); 4060 } 4061 return null; 4062}; 4063 4064/***/ }), 4065
4066/***/ "./src/js/component/init-page-additional-info.js": 4067/*!*******************************************************!*\ 4068 !*** ./src/js/component/init-page-additional-info.js ***! 4069 \*******************************************************/ 4070/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4071 4072"use strict"; 4073__webpack_require__.r(__webpack_exports__); 4074/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4075/* harmony export */ initPageAdditionalInfo: () => (/* binding */ initPageAdditionalInfo) 4076/* harmony export */ }); 4077/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4078/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4079 4080 4081 4082/** 4083 * Init Product Info Slideshow 4084 * @returns {Swiper} 4085 */ 4086var initPageAdditionalInfo = function initPageAdditionalInfo() { 4087 var sliderSel = '#page_additional_slide'; 4088 var sliderEl = document.querySelector(sliderSel); 4089 if (sliderEl) { 4090 var perView = sliderEl.dataset.perview ? parseInt(sliderEl.dataset.perview) : 3; 4091 var swiperPageAdditional = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](sliderSel, { 4092 slidesPerView: 'auto', 4093 spaceBetween: 5, 4094 loop: false, 4095 pagination: false, 4096 navigation: false, 4097 breakpoints: { 4098 1025: { 4099 slidesPerView: perView, 4100 spaceBetween: 10, 4101 pagination: false, 4102 navigation: false, 4103 centerInsufficientSlides: true 4104 } 4105 }, 4106 on: { 4107 init: function init() { 4108 sliderEl.querySelector('.swiper-wrapper.hidden').classList.remove('hidden'); 4109 } 4110 } 4111 }); 4112 swiperPageAdditional.update(); 4113 return swiperPageAdditional; 4114 } 4115 return null; 4116}; 4117 4118/***/ }), 4119
4120/***/ "./src/js/component/init-product-gallery-slider.js": 4121/*!*********************************************************!*\ 4122 !*** ./src/js/component/init-product-gallery-slider.js ***! 4123 \*********************************************************/ 4124/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4125 4126"use strict"; 4127__webpack_require__.r(__webpack_exports__); 4128/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4129/* harmony export */ initProductGallerySlider: () => (/* binding */ initProductGallerySlider) 4130/* harmony export */ }); 4131/* harmony import */ var swiper_bundle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper/bundle */ "./node_modules/swiper/swiper-bundle.mjs"); 4132/* harmony import */ var swiper_css_bundle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css/bundle */ "./node_modules/swiper/swiper-bundle.css"); 4133 4134 4135 4136/** 4137 * Function to init Product Gallery slider 4138 * @returns Swiper | null 4139 */ 4140var initProductGallerySlider = function initProductGallerySlider() { 4141 var sliderSel = '#ProductModalContent'; 4142 var sliderEl = document.querySelector(sliderSel); 4143 var sliderThumbSel = '#ProductModalContentThumb'; 4144 // const sliderThumb = document.querySelector(sliderThumbSel); 4145 4146 if (sliderEl) { 4147 var zoomPlus = document.querySelector('.zoom-controls .zoom-in'); 4148 var zoomMinus = document.querySelector('.zoom-controls .zoom-out'); 4149 var swiperProductGallery = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__["default"](sliderSel, { 4150 slidesPerView: 1, 4151 spaceBetween: 5, 4152 mousewheel: false, 4153 thumbs: { 4154 swiper: sliderThumbSel 4155 }, 4156 pagination: { 4157 el: '.swiper-pagination', 4158 type: 'bullets', 4159 clickable: true 4160 }, 4161 breakpoints: { 4162 1025: { 4163 enabled: true, 4164 slidesPerView: 1, 4165 spaceBetween: 10, 4166 pagination: false 4167 } 4168 }, 4169 zoom: { 4170 maxRatio: 2, 4171 minRatio: 1, 4172 toggle: true 4173 } 4174 }); 4175 if (zoomPlus) { 4176 zoomPlus.addEventListener('click', function (e) { 4177 e.preventDefault(); 4178 swiperProductGallery.zoom["in"](2); 4179 }); 4180 } 4181 if (zoomMinus) { 4182 zoomMinus.addEventListener('click', function (e) { 4183 e.preventDefault(); 4184 swiperProductGallery.zoom.out(1); 4185 }); 4186 } 4187 sliderEl.addEventListener('wheel', function (event) { 4188 if (event.deltaY < 0) { 4189 swiperProductGallery.zoom["in"](2); 4190 } else { 4191 swiperProductGallery.zoom.out(1); 4192 } 4193 }); 4194 var swiperThumb = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__["default"](sliderThumbSel, { 4195 spaceBetween: "auto", 4196 slidesPerView: 12, 4197 slidesPerGroup: 1, 4198 freeMode: true, 4199 watchSlidesProgress: true, 4200 loop: true, 4201 // centeredSlides: true, 4202 // centerInsufficientSlides: true, 4203 // centeredSlidesBounds: true, 4204 mousewheel: true, 4205 navigation: { 4206 nextEl: '.swiper-thumb-next', 4207 prevEl: '.swiper-thumb-prev' 4208 } 4209 }); 4210 return swiperProductGallery && swiperThumb; 4211 } 4212 return null; 4213}; 4214 4215/***/ }), 4216
4217/***/ "./src/js/component/init-product-info-slideshow.js": 4218/*!*********************************************************!*\ 4219 !*** ./src/js/component/init-product-info-slideshow.js ***! 4220 \*********************************************************/ 4221/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4222 4223"use strict"; 4224__webpack_require__.r(__webpack_exports__); 4225/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4226/* harmony export */ initProductInfoSlideshow: () => (/* binding */ initProductInfoSlideshow) 4227/* harmony export */ }); 4228/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4229/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4230/* harmony import */ var swiper_css_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! swiper/css/navigation */ "./node_modules/swiper/modules/navigation.css"); 4231/* harmony import */ var swiper_css_pagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! swiper/css/pagination */ "./node_modules/swiper/modules/pagination.css"); 4232 4233 4234 4235 4236 4237/** 4238 * Init Product Info Slideshow 4239 * @returns {Swiper} 4240 */ 4241var initProductInfoSlideshow = function initProductInfoSlideshow() { 4242 var sliderSel = '#meta-slideshow_slide'; 4243 var sliderEl = document.querySelector(sliderSel); 4244 if (sliderEl) { 4245 var swiperMetaSlideShow = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](sliderSel, { 4246 slidesPerView: 'auto', 4247 spaceBetween: 10, 4248 loop: false, 4249 pagination: { 4250 el: '.meta-slideshow-pagination', 4251 type: 'fraction' 4252 }, 4253 navigation: { 4254 nextEl: '.slidenext', 4255 prevEl: '.slideprev' 4256 }, 4257 breakpoints: { 4258 1025: { 4259 slidesPerView: 3, 4260 spaceBetween: 10, 4261 // pagination: false, 4262 // navigation: false, 4263 centerInsufficientSlides: true 4264 } 4265 }, 4266 on: { 4267 init: function init() { 4268 sliderEl.querySelector('.swiper-wrapper.hidden').classList.remove('hidden'); 4269 } 4270 } 4271 }); 4272 return swiperMetaSlideShow; 4273 } 4274 return null; 4275}; 4276 4277/***/ }), 4278
4279/***/ "./src/js/component/init-product-media-gallery.js": 4280/*!********************************************************!*\ 4281 !*** ./src/js/component/init-product-media-gallery.js ***! 4282 \********************************************************/ 4283/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4284 4285"use strict"; 4286__webpack_require__.r(__webpack_exports__); 4287/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4288/* harmony export */ productMediaGallery: () => (/* binding */ productMediaGallery) 4289/* harmony export */ }); 4290/* harmony import */ var swiper_bundle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper/bundle */ "./node_modules/swiper/swiper-bundle.mjs"); 4291/* harmony import */ var swiper_css_bundle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css/bundle */ "./node_modules/swiper/swiper-bundle.css"); 4292 4293 4294var productMediaGallery = function productMediaGallery() { 4295 var galleryContainer = document.querySelector('#ProductMediaGallery'); 4296 if (galleryContainer) { 4297 var slideMain = galleryContainer.querySelector('.SwiperMain'); 4298 var slideThumb = galleryContainer.querySelector('.SwiperThumb'); 4299 var swiperThumb = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__["default"](slideThumb, { 4300 spaceBetween: 10, 4301 slidesPerView: 'auto', 4302 slidesPerGroup: 6, 4303 freeMode: true, 4304 watchSlidesProgress: true, 4305 mousewheel: true, 4306 // autoHeight: true, 4307 // centerInsufficientSlides: true, 4308 // centeredSlides: true, 4309 // centeredSlidesBounds: true, 4310 // slideClass: 'swiper-slide', 4311 direction: 'vertical', 4312 navigation: { 4313 nextEl: '.swiper-thumb-next', 4314 prevEl: '.swiper-thumb-prev' 4315 } 4316 }); 4317 var swiperMain = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__["default"](slideMain, { 4318 slidesPerView: 'auto', 4319 spaceBetween: 0, 4320 thumbs: { 4321 swiper: swiperThumb 4322 }, 4323 navigation: { 4324 nextEl: '.swiper-main-next', 4325 prevEl: '.swiper-main-prev' 4326 }, 4327 pagination: { 4328 el: '.swiper-main-paginate', 4329 type: 'fraction' 4330 }, 4331 breakpoints: { 4332 1025: { 4333 slidesPerView: 1, 4334 spaceBetween: 10 4335 } 4336 } 4337 // on: { 4338 // afterInit: function () { 4339 // resizeGallery(slideMain); 4340 // }, 4341 // resize: function () { 4342 // resizeGallery(slideMain); 4343 // }, 4344 // }, 4345 }); 4346 4347 return swiperMain && swiperThumb; 4348 } 4349 return null; 4350}; 4351function resizeGallery(slideMain) { 4352 var mainHeight = slideMain.querySelector('.product-media-container').offsetHeight; 4353 document.querySelector('.wrapperThumb').style.height = mainHeight + 'px'; 4354 document.querySelector('.wrapperThumb .SwiperThumb').style.height = 'calc(' + mainHeight + 'px + 0rem)'; 4355 document.querySelector('.gallery-grid').style.height = 'calc(' + mainHeight + 'px + 0rem)'; 4356} 4357 4358/***/ }), 4359
4360/***/ "./src/js/component/init-related-products.js": 4361/*!***************************************************!*\ 4362 !*** ./src/js/component/init-related-products.js ***! 4363 \***************************************************/ 4364/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4365 4366"use strict"; 4367__webpack_require__.r(__webpack_exports__); 4368/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4369/* harmony export */ initRelatedProducts: () => (/* binding */ initRelatedProducts) 4370/* harmony export */ }); 4371/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4372/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4373 4374 4375 4376/** 4377 * Init Product Info Slideshow 4378 * @returns {Swiper} 4379 */ 4380var initRelatedProducts = function initRelatedProducts() { 4381 var productRecommendations = document.querySelector('product-recommendations.related-products'); 4382 if (productRecommendations === null) return; 4383 var observer = new MutationObserver(function () { 4384 var sliderSel = '#related-products-grid'; 4385 if (sliderSel === null) return; 4386 var swiperRelatedProducts = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](sliderSel, { 4387 slidesPerView: 'auto', 4388 spaceBetween: 5, 4389 loop: false, 4390 breakpoints: { 4391 1025: { 4392 slidesPerView: 4, 4393 spaceBetween: 10, 4394 centerInsufficientSlides: true 4395 } 4396 }, 4397 on: { 4398 init: function init() { 4399 observer.disconnect(); 4400 } 4401 } 4402 }); 4403 return swiperRelatedProducts; 4404 }); 4405 observer.observe(productRecommendations, { 4406 childList: true, 4407 subtree: true 4408 }); 4409}; 4410 4411/***/ }), 4412
4413/***/ "./src/js/component/init-review-slider.js": 4414/*!************************************************!*\ 4415 !*** ./src/js/component/init-review-slider.js ***! 4416 \************************************************/ 4417/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4418 4419"use strict"; 4420__webpack_require__.r(__webpack_exports__); 4421/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4422/* harmony export */ initReviewSlider: () => (/* binding */ initReviewSlider) 4423/* harmony export */ }); 4424/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4425/* harmony import */ var swiper_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/modules */ "./node_modules/swiper/modules/index.mjs"); 4426/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4427/* harmony import */ var swiper_css_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! swiper/css/navigation */ "./node_modules/swiper/modules/navigation.css"); 4428/* harmony import */ var swiper_css_pagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! swiper/css/pagination */ "./node_modules/swiper/modules/pagination.css"); 4429 4430 4431 4432 4433 4434 4435/** 4436 * Init Review Slider 4437 * @returns {Swiper} 4438 */ 4439var initReviewSlider = function initReviewSlider() { 4440 var reviewsElem = document.querySelector('#reviews-slider-swiper'); 4441 if (reviewsElem) { 4442 return new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](reviewsElem, { 4443 modules: [swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Navigation, swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Pagination], 4444 slidesPerView: 1, 4445 spaceBetween: 0, 4446 loop: false, 4447 navigation: { 4448 nextEl: '.reviews-swiper-button-next', 4449 prevEl: '.reviews-swiper-button-prev' 4450 }, 4451 pagination: { 4452 el: '.reviews-swiper-pagination', 4453 type: 'fraction' 4454 }, 4455 breakpoints: { 4456 1025: { 4457 slidesPerView: 4, 4458 spaceBetween: 30, 4459 navigation: false, 4460 pagination: false 4461 } 4462 }, 4463 on: { 4464 init: function init() { 4465 reviewsElem.classList.remove('hidden'); 4466 } 4467 } 4468 }); 4469 } 4470}; 4471 4472/***/ }), 4473
4474/***/ "./src/js/component/init-slide-swiper.js": 4475/*!***********************************************!*\ 4476 !*** ./src/js/component/init-slide-swiper.js ***! 4477 \***********************************************/ 4478/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4479 4480"use strict"; 4481__webpack_require__.r(__webpack_exports__); 4482/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4483/* harmony export */ initSlideSwiper: () => (/* binding */ initSlideSwiper) 4484/* harmony export */ }); 4485/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4486/* harmony import */ var swiper_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/modules */ "./node_modules/swiper/modules/index.mjs"); 4487/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4488/* harmony import */ var swiper_css_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! swiper/css/navigation */ "./node_modules/swiper/modules/navigation.css"); 4489/* harmony import */ var swiper_css_pagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! swiper/css/pagination */ "./node_modules/swiper/modules/pagination.css"); 4490 4491 4492 4493 4494 4495 4496/** 4497 * Function to init Slide swiper 4498 * @returns Swiper | null 4499 */ 4500var initSlideSwiper = function initSlideSwiper() { 4501 var sliderEl = document.querySelectorAll('[id^="slide-swiper-"]'); 4502 if (sliderEl) { 4503 sliderEl.forEach(function (el) { 4504 var sliderSel = el.querySelector('.slide-swiper-container'); 4505 var sliderPagination = el.querySelector('.slide-swiper-pagination'); 4506 var navigation = sliderSel.dataset.navigation === 'true' ? true : false; 4507 var pagination = sliderSel.dataset.pagination === 'true' ? true : false; 4508 var autoheight = sliderSel.dataset.autoheight === 'true' ? true : false; 4509 var slidesCount = sliderSel.dataset.count ? parseInt(sliderSel.dataset.count) : 1; 4510 var autoPlay = sliderSel.dataset.autoplay ? parseInt(sliderSel.dataset.autoplay) : 0; 4511 var Speed = sliderSel.dataset.speed ? parseInt(sliderSel.dataset.speed) : 600; 4512 var Loop = sliderSel.dataset.loop === 'true' ? true : false; 4513 if (slidesCount <= 1) { 4514 Loop = false; 4515 } 4516 if (sliderSel) { 4517 var swiperOptions = { 4518 modules: [], 4519 slidesPerView: 1, 4520 lazy: true, 4521 loop: Loop, 4522 autoHeight: autoheight, 4523 spaceBetween: 0, 4524 speed: Speed, 4525 mousewheel: { 4526 forceToAxis: true, 4527 eventsTarged: sliderSel 4528 }, 4529 on: { 4530 init: function init() { 4531 var slides = sliderSel.querySelectorAll('.slide-hide'); 4532 slides.forEach(function (slide) { 4533 slide.classList.remove('slide-hide'); 4534 }); 4535 } 4536 } 4537 }; 4538 if (autoPlay > 0 && slidesCount > 1) { 4539 var autoPlayDelay = autoPlay * 1000; 4540 swiperOptions.autoplay = { 4541 delay: autoPlayDelay, 4542 disableOnInteraction: false 4543 }; 4544 } 4545 if (navigation == true && slidesCount > 1) { 4546 swiperOptions.modules.push(swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Navigation); 4547 swiperOptions.navigation = { 4548 nextEl: '.slide-swiper-next', 4549 prevEl: '.slide-swiper-prev' 4550 }; 4551 } 4552 if (pagination == true && slidesCount > 1) { 4553 swiperOptions.modules.push(swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Pagination); 4554 swiperOptions.pagination = { 4555 el: sliderPagination, 4556 clickable: true 4557 }; 4558 } 4559 var slideSwiper = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](sliderSel, swiperOptions); 4560 return slideSwiper; 4561 } 4562 }); 4563 } 4564 return null; 4565}; 4566 4567/***/ }), 4568
4569/***/ "./src/js/component/longtext-collection.js": 4570/*!*************************************************!*\ 4571 !*** ./src/js/component/longtext-collection.js ***! 4572 \*************************************************/ 4573/***/ (() => { 4574 4575var textWrapper = document.querySelector('.main-page-content-text-mobile'); 4576if (textWrapper != null) { 4577 var text = textWrapper.innerHTML; 4578 var firstParagraphEnd = text.indexOf('</p>') + 4; 4579 var longText = firstParagraphEnd < 0 ? 100 : firstParagraphEnd; 4580 var text1 = text.substring(0, longText); 4581 var text2 = text.substring(longText); 4582 var readmore = textWrapper.dataset.readmore; 4583 var readless = textWrapper.dataset.readless; 4584 console.log(longText); 4585 var btnReadmore = document.createElement('button'); 4586 btnReadmore.classList.add('button-readmore', 'bellissima-button', 'bellissima-button-link-underline', 'text-bellissima-greymedium'); 4587 btnReadmore.textContent = readmore; 4588 var readMoreDiv = document.createElement('div'); 4589 readMoreDiv.classList.add('block', 'lg:hidden'); 4590 readMoreDiv.appendChild(btnReadmore); 4591 textWrapper.innerHTML = "<span class=\"text1 inline\">".concat(text1, "<span class=\"ellipsis inline\">...</span></span><span class=\"text2 hidden\">").concat(text2, "</span>"); 4592 textWrapper.appendChild(readMoreDiv); 4593 btnReadmore.addEventListener('click', function () { 4594 var text2Element = textWrapper.querySelector('.text2'); 4595 var ellipsisElement = textWrapper.querySelector('.ellipsis'); 4596 if (text2Element.classList.contains('hidden')) { 4597 btnReadmore.textContent = readless; 4598 ellipsisElement.style.display = 'none'; 4599 text2Element.classList.remove('hidden'); 4600 } else { 4601 btnReadmore.textContent = readmore; 4602 ellipsisElement.style.display = 'inline'; 4603 text2Element.classList.add('hidden'); 4604 } 4605 }); 4606} 4607 4608/***/ }), 4609
4610/***/ "./src/js/component/longtext-wrapper.js": 4611/*!**********************************************!*\ 4612 !*** ./src/js/component/longtext-wrapper.js ***! 4613 \**********************************************/ 4614/***/ (() => { 4615 4616var textWrapper = document.querySelector('.longtext-wrapper'); 4617if (textWrapper != null) { 4618 var textWrapperMobile = textWrapper.querySelector('.collection-banner-content-text-mobile'); 4619 var longText = textWrapper.dataset.longtext; 4620 var text = textWrapper.querySelector('.collection-banner-content-text').innerHTML; 4621 var boxLink = textWrapper.querySelector('.link_readmore'); 4622 if (text.length >= longText) { 4623 var text1 = text.substring(0, longText); 4624 var text2 = text.substring(longText); 4625 var btnReadmore = textWrapper.querySelector('button.button-readmore'); 4626 boxLink.style.display == 'block'; 4627 boxLink.classList.remove('hidden'); 4628 var newText = "".concat(text1, "<span class=\"ellipsis\">...</span> <div class=\"text2 hidden\">").concat(text2, "</div>"); 4629 textWrapperMobile.innerHTML = newText; 4630 btnReadmore.addEventListener('click', function (el) { 4631 el.preventDefault(); 4632 textWrapperMobile.querySelector('span.ellipsis').classList.toggle('hidden'); 4633 textWrapperMobile.querySelector('div.text2').classList.toggle('hidden'); 4634 btnReadmore.classList.toggle('hidden'); 4635 }); 4636 } 4637} 4638 4639/***/ }), 4640
4641/***/ "./src/js/component/modalServices.js": 4642/*!*******************************************!*\ 4643 !*** ./src/js/component/modalServices.js ***! 4644 \*******************************************/ 4645/***/ (() => { 4646 4647/* 4648 * Modal services. 4649 */ 4650window.onload = function () { 4651 function openModal(popupId) { 4652 var modal = document.getElementById(popupId); 4653 modal.classList.remove('hidden'); 4654 modal.classList.add('flex'); 4655 document.body.classList.add('overflow-hidden'); 4656 } 4657 4658 // Función para cerrar el modal 4659 function closeModal(popupId) { 4660 var modal = document.getElementById(popupId); 4661 modal.classList.remove('flex'); 4662 modal.classList.add('hidden'); 4663 document.body.classList.remove('overflow-hidden'); 4664 } 4665 document.querySelectorAll('button.close-modal').forEach(function (element) { 4666 element.addEventListener('click', function (e) { 4667 e.preventDefault(); 4668 var popup = this.dataset.popup; 4669 closeModal('Modal-' + popup); 4670 }); 4671 }); 4672 document.querySelectorAll('.link_popup').forEach(function (element) { 4673 element.addEventListener('click', function (e) { 4674 e.preventDefault(); 4675 var popup = this.dataset.popup; 4676 openModal('Modal-' + popup); 4677 }); 4678 }); 4679 document.querySelectorAll('.bg-opacity-50').forEach(function (modal) { 4680 modal.addEventListener('click', function (e) { 4681 if (e.target === this) { 4682 var popupId = this.id; 4683 closeModal(popupId); 4684 } 4685 }); 4686 }); 4687 document.addEventListener('keydown', function (e) { 4688 if (e.key === 'Escape') { 4689 document.querySelectorAll('.bg-opacity-50.flex').forEach(function (modal) { 4690 var popupId = modal.id; 4691 closeModal(popupId); 4692 }); 4693 } 4694 }); 4695}; 4696 4697/***/ }), 4698
4699/***/ "./src/js/component/redirect-product-cta.js": 4700/*!**************************************************!*\ 4701 !*** ./src/js/component/redirect-product-cta.js ***! 4702 \**************************************************/ 4703/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4704 4705"use strict"; 4706__webpack_require__.r(__webpack_exports__); 4707/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4708/* harmony export */ redirectProductCta: () => (/* binding */ redirectProductCta) 4709/* harmony export */ }); 4710var redirectProductCta = function redirectProductCta(target) { 4711 var targetEl = document.querySelector(target); 4712 if (targetEl) { 4713 var targetUrl = targetEl.getAttribute('data-target'); 4714 if (targetUrl) { 4715 setTimeout(function () { 4716 document.location.href = targetUrl; 4717 }, 3000); 4718 } 4719 } 4720}; 4721 4722/***/ }), 4723
4724/***/ "./src/js/component/related-blog-grid.js": 4725/*!***********************************************!*\ 4726 !*** ./src/js/component/related-blog-grid.js ***! 4727 \***********************************************/ 4728/***/ (() => { 4729 4730document.addEventListener("DOMContentLoaded", function () { 4731 var wrapper = document.querySelector("#related-blog-grid"); 4732 if (wrapper != null) { 4733 var url = wrapper.dataset.url; 4734 var container = wrapper.querySelector('ul.blog-slider-grid'); 4735 // const thisId = wrapper.dataset.id 4736 4737 var request = new XMLHttpRequest(); 4738 request.open('GET', url, true); 4739 request.onload = function () { 4740 if (request.status === 200) { 4741 var html = request.responseText; 4742 var parser = new DOMParser(); 4743 var doc = parser.parseFromString(html, 'text/html'); 4744 var articles = doc.querySelectorAll('.blog-articles__article'); 4745 if (articles.length > 0) { 4746 articles.forEach(function (article, index) { 4747 /* 4748 * Set container count 4749 */ 4750 container.dataset.count = articles.length; 4751 4752 /* 4753 * Add the filter to skip the current article, need uncomment the line 9 too 4754 */ 4755 // const articleId = article.querySelector('.article-card-wrapper').dataset.id 4756 // if ( articleId == thisId ) return 4757 4758 var imageMain = article.querySelector('.article-card__image img').getAttribute('src'); 4759 var imageSrc = imageMain.split('?')[0]; 4760 var cardHeading = article.querySelector('h3.card__heading a'); 4761 var articleText = cardHeading.textContent; 4762 var articleURL = cardHeading.getAttribute('href'); 4763 var resumeText = article.querySelector('.article-card__excerpt').textContent; 4764 var dateText = article.querySelector('.card__information-article-date time').textContent; 4765 var dateTime = article.querySelector('.card__information-article-date time').getAttribute('datetime'); 4766 var clase = index === 0 ? 'lg:col-span-6' : 'lg:col-span-3'; 4767 // BETA: clase = ( articles.length == 1 ) && 'lg:col-span-12' 4768 4769 var slideHTML = "\n <li class=\"blog__post article slider__slide slider__slide--full-width ".concat(clase, "\">\n <div class=\"article-card-wrapper card-wrapper\">\n <div class=\"card article-card card--standard card--media\" style=\"--ratio-percent: 66.66666666666666%;\">\n <div class=\"card__inner ratio\" style=\"--ratio-percent: 66.66666666666666%;\">\n <div class=\"article-card__image-wrapper card__media\">\n <div class=\"article-card__image media\"> \n <img src=\"").concat(imageSrc, "\" sizes=\"(min-width: 1800px) 850px, (min-width: 750px) calc((100vw - 130px) / 2), calc((100vw - 50px) / 2)\" alt=\"").concat(cardHeading, "\" class=\"motion-reduce relative\" loading=\"lazy\" width=\"1280\" height=\"783\">\n </div>\n </div>\n </div>\n <div class=\"card__content\">\n <div class=\"card__information\"><h3 class=\"card__heading\">\n <a href=\"").concat(articleURL, "\">\n ").concat(articleText, "\n </a>\n </h3><p class=\"article-card__excerpt rte-width\">").concat(resumeText, "</p>\n <span class=\"card__information-article-date\">\n <time datetime=\"").concat(dateTime, "\">").concat(dateText, "</time></span>\n </div>\n </div>\n </div>\n </div>\n </li>"); 4770 container.innerHTML += slideHTML; 4771 }); 4772 wrapper.classList.remove('hidden'); 4773 } else { 4774 console.log('Not found related articles'); 4775 } 4776 } else { 4777 console.error('Error getting articles via HTTP:', request.status); 4778 } 4779 }; 4780 request.send(); 4781 } 4782}); 4783 4784/***/ }), 4785
4786/***/ "./src/js/component/text-content-slide.js": 4787/*!************************************************!*\ 4788 !*** ./src/js/component/text-content-slide.js ***! 4789 \************************************************/ 4790/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4791 4792"use strict"; 4793__webpack_require__.r(__webpack_exports__); 4794/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4795/* harmony export */ textContentSlide: () => (/* binding */ textContentSlide) 4796/* harmony export */ }); 4797/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.mjs"); 4798/* harmony import */ var swiper_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/modules */ "./node_modules/swiper/modules/index.mjs"); 4799/* harmony import */ var swiper_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! swiper/css */ "./node_modules/swiper/swiper.css"); 4800/* harmony import */ var swiper_css_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! swiper/css/navigation */ "./node_modules/swiper/modules/navigation.css"); 4801/* harmony import */ var swiper_css_pagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! swiper/css/pagination */ "./node_modules/swiper/modules/pagination.css"); 4802 4803 4804 4805 4806 4807/** 4808 * Init Product Info Slideshow 4809 * @returns {Swiper} 4810 */ 4811var textContentSlide = function textContentSlide() { 4812 var textEl = document.querySelector('.section--content-with-slider__wrapper-slider'); 4813 var textSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"](textEl, { 4814 modules: [swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Navigation, swiper_modules__WEBPACK_IMPORTED_MODULE_1__.Pagination], 4815 slidesPerView: 1.8, 4816 spaceBetween: 0, 4817 breakpoints: { 4818 1025: { 4819 slidesPerView: 4, 4820 spaceBetween: 0, 4821 enabled: false 4822 }, 4823 768: { 4824 slidesPerView: 3, 4825 spaceBetween: 0 4826 } 4827 }, 4828 on: { 4829 init: function init() { 4830 textEl.classList.remove('hidden'); 4831 } 4832 } 4833 }); 4834 return textSlider; 4835}; 4836 4837/***/ }), 4838
vendor: 4,950 bytes, lines 4839-4859
4839/***/ "./src/js/component/videoPopup.js": 4840/*!****************************************!*\ 4841 !*** ./src/js/component/videoPopup.js ***! 4842 \****************************************/ 4843/***/ (() => { 4844 4845function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4846function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4847function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } 4848function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4849function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } 4850function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } 4851function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } 4852function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } 4853function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } 4854function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 4855function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } 4856function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } 4857function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } 4858function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } 4859function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4860function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 4861var VideoPopup = /*#__PURE__*/function (_HTMLElement) { 4862 _inherits(VideoPopup, _HTMLElement); 4863 var _super = _createSuper(VideoPopup); 4864 function VideoPopup() { 4865 var _this; 4866 _classCallCheck(this, VideoPopup); 4867 _this = _super.call(this); 4868 _this.attachShadow({ 4869 mode: 'open' 4870 }); 4871 _this.shadowRoot.innerHTML = "\n <style>\n :host {\n display: inline-block;\n cursor: pointer;\n }\n img {\n max-width: 100%;\n height: auto;\n }\n </style>\n "; 4872 _this.closePopupOnEsc = _this.closePopupOnEsc.bind(_assertThisInitialized(_this)); 4873 return _this; 4874 } 4875 _createClass(VideoPopup, [{ 4876 key: "connectedCallback", 4877 value: function connectedCallback() { 4878 this.addEventListener('click', this.openPopup.bind(this)); 4879 this.modalOverlay = null; 4880 this.videoContent = null; 4881 } 4882 }, { 4883 key: "openPopup", 4884 value: function openPopup() { 4885 if (!this.modalOverlay) { 4886 this.createModal(); 4887 document.addEventListener('keydown', this.closePopupOnEsc); 4888 } 4889 this.modalOverlay.style.display = 'block'; 4890 document.body.style.overflow = 'hidden'; 4891 var iframe = this.videoContent.querySelector('iframe'); 4892 var player = iframe.dataset.player; 4893 this.playVideo(player); 4894 } 4895 }, { 4896 key: "createModal", 4897 value: function createModal() { 4898 var _this2 = this; 4899 this.modalOverlay = document.createElement('div'); 4900 this.modalOverlay.className = 'modal-overlay'; 4901 var modalContent = document.createElement('div'); 4902 modalContent.className = 'modal-content'; 4903 var closeButton = document.createElement('button'); 4904 closeButton.className = 'close-button'; 4905 var closeIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); 4906 closeIcon.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); 4907 closeIcon.setAttribute('width', '24'); 4908 closeIcon.setAttribute('height', '24'); 4909 closeIcon.setAttribute('viewBox', '0 0 24 24'); 4910 var closePath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); 4911 closePath.setAttribute('d', 'M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59 5.59-5.59z'); 4912 closePath.style.fill = '#333'; 4913 closeIcon.appendChild(closePath); 4914 closeButton.appendChild(closeIcon); 4915 closeButton.addEventListener('click', function () { 4916 _this2.closePopup(); 4917 }); 4918 this.videoContent = this.querySelector('.video-content').cloneNode(true); 4919 modalContent.appendChild(this.videoContent); 4920 modalContent.appendChild(closeButton); 4921 this.modalOverlay.appendChild(modalContent); 4922 document.body.appendChild(this.modalOverlay); 4923 } 4924 }, { 4925 key: "closePopup", 4926 value: function closePopup() { 4927 this.modalOverlay.style.display = 'none'; 4928 document.body.style.overflow = 'auto'; // Restablecer el scroll del cuerpo 4929 this.pauseVideo(); 4930 } 4931 }, { 4932 key: "closePopupOnEsc", 4933 value: function closePopupOnEsc(event) { 4934 if (event.key === 'Escape') { 4935 this.closePopup(); 4936 } 4937 } 4938 }, { 4939 key: "playVideo", 4940 value: function playVideo(player) { 4941 if (player === 'youtube') { 4942 this.playYoutubeVideo(); 4943 } else if (player === 'vimeo') { 4944 this.playVimeoVideo(); 4945 } else if (player === 'video') { 4946 this.playHtmlVideo(); 4947 } else if (player === 'model') { 4948 this.playModel(); 4949 } 4950 } 4951 }, { 4952 key: "playYoutubeVideo", 4953 value: function playYoutubeVideo() { 4954 var iframe = this.videoContent.querySelector('iframe'); 4955 4956 // eslint-disable-next-line no-undef 4957 if (typeof YT !== 'undefined' && YT.Player) { 4958 // eslint-disable-next-line no-undef 4959 this.youtubePlayer = new YT.Player(iframe, { 4960 events: { 4961 onReady: function onReady(event) { 4962 event.target.playVideo(); 4963 } 4964 } 4965 }); 4966 } 4967 } 4968 }, { 4969 key: "pauseVideo", 4970 value: function pauseVideo() { 4971 document.querySelectorAll('.js-youtube').forEach(function (video) { 4972 video.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*'); 4973 }); 4974 document.querySelectorAll('.js-vimeo').forEach(function (video) { 4975 video.contentWindow.postMessage('{"method":"pause"}', '*'); 4976 }); 4977 document.querySelectorAll('video').forEach(function (video) { 4978 return video.pause(); 4979 }); 4980 document.querySelectorAll('product-model').forEach(function (model) { 4981 if (model.modelViewerUI) model.modelViewerUI.pause(); 4982 }); 4983 } 4984 }]); 4985 return VideoPopup; 4986}( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); 4987customElements.define('video-popup', VideoPopup); 4988 4989/***/ }), 4990 4991/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/modules/navigation.css": 4992/*!**************************************************************************************************************************************************************************************************************!*\ 4993 !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/modules/navigation.css ***! 4994 \**************************************************************************************************************************************************************************************************************/ 4995/***/ ((module, __webpack_exports__, __webpack_require__) => { 4996 4997"use strict"; 4998__webpack_require__.r(__webpack_exports__); 4999/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5000/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5001/* harmony export */ }); 5002/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 5003/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 5004// Imports 5005 5006var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 5007// Module
5008___CSS_LOADER_EXPORT___.push([module.id, ":root {\n --swiper-navigation-size: 44px;\n /*\n --swiper-navigation-top-offset: 50%;\n --swiper-navigation-sides-offset: 10px;\n --swiper-navigation-color: var(--swiper-theme-color);\n */\n}\n.swiper-button-prev,\n.swiper-button-next {\n position: absolute;\n top: var(--swiper-navigation-top-offset, 50%);\n width: calc(var(--swiper-navigation-size) / 44 * 27);\n height: var(--swiper-navigation-size);\n margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n z-index: 10;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n}\n.swiper-button-prev.swiper-button-disabled,\n.swiper-button-next.swiper-button-disabled {\n opacity: 0.35;\n cursor: auto;\n pointer-events: none;\n}\n.swiper-button-prev.swiper-button-hidden,\n.swiper-button-next.swiper-button-hidden {\n opacity: 0;\n cursor: auto;\n pointer-events: none;\n}\n.swiper-navigation-disabled .swiper-button-prev,\n.swiper-navigation-disabled .swiper-button-next {\n display: none !important;\n}\n.swiper-button-prev svg,\n.swiper-button-next svg {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n transform-origin: center;\n}\n.swiper-rtl .swiper-button-prev svg,\n.swiper-rtl .swiper-button-next svg {\n transform: rotate(180deg);\n}\n.swiper-button-prev,\n.swiper-rtl .swiper-button-next {\n left: var(--swiper-navigation-sides-offset, 10px);\n right: auto;\n}\n.swiper-button-next,\n.swiper-rtl .swiper-button-prev {\n right: var(--swiper-navigation-sides-offset, 10px);\n left: auto;\n}\n.swiper-button-lock {\n display: none;\n}\n/* Navigation font start */\n.swiper-button-prev:after,\n.swiper-button-next:after {\n font-family: swiper-icons;\n font-size: var(--swiper-navigation-size);\n text-transform: none !important;\n letter-spacing: 0;\n font-variant: initial;\n line-height: 1;\n}\n.swiper-button-prev:after,\n.swiper-rtl .swiper-button-next:after {\n
5008content: 'prev';\n}\n.swiper-button-next,\n.swiper-rtl .swiper-button-prev {\n right: var(--swiper-navigation-sides-offset, 10px);\n left: auto;\n}\n.swiper-button-next:after,\n.swiper-rtl .swiper-button-prev:after {\n content: 'next';\n}\n/* Navigation font end */\n", ""]); 5009// Exports 5010/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); 5011 5012 5013/***/ }), 5014 5015/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/modules/pagination.css": 5016/*!**************************************************************************************************************************************************************************************************************!*\ 5017 !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/modules/pagination.css ***! 5018 \**************************************************************************************************************************************************************************************************************/ 5019/***/ ((module, __webpack_exports__, __webpack_require__) => { 5020 5021"use strict"; 5022__webpack_require__.r(__webpack_exports__); 5023/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5024/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5025/* harmony export */ }); 5026/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 5027/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 5028// Imports 5029 5030var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 5031// Module 5032___CSS_LOADER_EXPORT___.push([module.id, ":root {\n /*\n --swiper-pagination-color: var(--swiper-theme-color);\n --swiper-pagination-left: auto;\n --swiper-pagination-right: 8px;\n --swiper-pagination-bottom: 8px;\n --swiper-pagination-top: auto;\n --swiper-pagination-fraction-color: inherit;\n --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);\n --swiper-pagination-progressbar-size: 4px;\n --swiper-pagination-bullet-size: 8px;\n --swiper-pagination-bullet-width: 8px;\n --swiper-pagination-bullet-height: 8px;\n --swiper-pagination-bullet-border-radius: 50%;\n --swiper-pagination-bullet-inactive-color: #000;\n --swiper-pagination-bullet-inactive-opacity: 0.2;\n --swiper-pagination-bullet-opacity: 1;\n --swiper-pagination-bullet-horizontal-gap: 4px;\n --swiper-pagination-bullet-vertical-gap: 6px;\n */\n}\n.swiper-pagination {\n position: absolute;\n text-align: center;\n transition: 300ms opacity;\n transform: translate3d(0, 0, 0);\n z-index: 10;\n}\n.swiper-pagination.swiper-pagination-hidden {\n opacity: 0;\n}\n.swiper-pagination-disabled > .swiper-pagination,\n.swiper-pagination.swiper-pagination-disabled {\n display: none !important;\n}\n/* Common Styles */\n.swiper-pagination-fraction,\n.swiper-pagination-custom,\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-bullets.swiper-pagination-horizontal {\n bottom: var(--swiper-pagination-bottom, 8px);\n top: var(--swiper-pagination-top, auto);\n left: 0;\n width: 100%;\n}\n/* Bullets */\n.swiper-pagination-bullets-dynamic {\n overflow: hidden;\n font-size: 0;\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transform: scale(0.33);\n position: relative;\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {\n transform: scale(1);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {\n transform: scale(1);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {\n transform: scale(0.66);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {\n transform: scale(0.33);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {\n transform: scale(0.66);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {\n transform: scale(0.33);\n}\n.swiper-pagination-bullet {\n width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n display: inline-block;\n border-radius: var(--swiper-pagination-bullet-border-radius, 50%);\n background: var(--swiper-pagination-bullet-inactive-color, #000);\n opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n}\nbutton.swiper-pagination-bullet {\n border: none;\n margin: 0;\n padding: 0;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.swiper-pagination-clickable .swiper-pagination-bullet {\n cursor: pointer;\n}\n.swiper-pagination-bullet:only-child {\n display: none !important;\n}\n.swiper-pagination-bullet-active {\n opacity: var(--swiper-pagination-bullet-opacity, 1);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n.swiper-vertical > .swiper-pagination-bullets,\n.swiper-pagination-vertical.swiper-pagination-bullets {\n right: var(--swiper-pagination-right, 8px);\n left: var(--swiper-pagination-left, auto);\n top: 50%;\n transform: translate3d(0px, -50%, 0);\n}\n.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,\n.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n display: block;\n}\n.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n}\n.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n display: inline-block;\n transition: 200ms transform,\n 200ms top;\n}\n.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,\n.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n}\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n}\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 200ms transform,\n 200ms left;\n}\n.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 200ms transform,\n 200ms right;\n}\n/* Fraction */\n.swiper-pagination-fraction {\n color: var(--swiper-pagination-fraction-color, inherit);\n}\n/* Progress */\n.swiper-pagination-progressbar {\n background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n}\n.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: scale(0);\n transform-origin: left top;\n}\n.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n transform-origin: right top;\n}\n.swiper-horizontal > .swiper-pagination-progressbar,\n.swiper-pagination-progressbar.swiper-pagination-horizontal,\n.swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {\n width: 100%;\n height: var(--swiper-pagination-progressbar-size, 4px);\n left: 0;\n top: 0;\n}\n.swiper-vertical > .swiper-pagination-progressbar,\n.swiper-pagination-progressbar.swiper-pagination-vertical,\n.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {\n width: var(--swiper-pagination-progressbar-size, 4px);\n height: 100%;\n left: 0;\n top: 0;\n}\n.swiper-pagination-lock {\n display: none;\n}\n", ""]); 5033// Exports 5034/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_
5034LOADER_EXPORT___); 5035 5036 5037/***/ }), 5038 5039/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/swiper-bundle.css": 5040/*!*********************************************************************************************************************************************************************************************************!*\ 5041 !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/swiper-bundle.css ***! 5042 \*********************************************************************************************************************************************************************************************************/ 5043/***/ ((module, __webpack_exports__, __webpack_require__) => { 5044 5045"use strict"; 5046__webpack_require__.r(__webpack_exports__); 5047/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5048/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5049/* harmony export */ }); 5050/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 5051/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 5052// Imports 5053 5054var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 5055// Module 5056___CSS_LOADER_EXPORT___.push([module.id, "/**\n * Swiper 11.0.5\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2023 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: November 22, 2023\n */\n\n/* FONT_START */\n@font-face {\n font-family: 'swiper-icons';\n src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');\n font-weight: 400;\n font-style: normal;\n}\n/* FONT_END */\n:root {\n --swiper-theme-color: #007aff;\n /*\n --swiper-preloader-color: var(--swiper-theme-color);\n --swiper-wrapper-transition-timing-function: initial;\n */\n}
5056\n:host {\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n z-index: 1;\n}\n.swiper {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n /* Fix of Webkit flickering */\n z-index: 1;\n display: block;\n}\n.swiper-vertical > .swiper-wrapper {\n flex-direction: column;\n}\n.swiper-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n}\n.swiper-android .swiper-slide,\n.swiper-ios .swiper-slide,\n.swiper-wrapper {\n transform: translate3d(0px, 0, 0);\n}\n.swiper-horizontal {\n touch-action: pan-y;\n}\n.swiper-vertical {\n touch-action: pan-x;\n}\n.swiper-slide {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n}\n.swiper-slide-invisible-blank {\n visibility: hidden;\n}\n/* Auto Height */\n.swiper-autoheight,\n.swiper-autoheight .swiper-slide {\n height: auto;\n}\n.swiper-autoheight .swiper-wrapper {\n align-items: flex-start;\n transition-property: transform, height;\n}\n.swiper-backface-hidden .swiper-slide {\n transform: translateZ(0);\n backface-visibility: hidden;\n}\n/* 3D Effects */\n.swiper-3d.swiper-css-mode .swiper-wrapper {\n perspective: 1200px;\n}\n.swiper-3d .swiper-wrapper {\n transform-style: preserve-3d;\n}\n.swiper-3d {\n perspective: 1200px;\n}\n.swiper-3d .swiper-slide,\n.swiper-3d .swiper-cube-shadow {\n transform-style: preserve-3d;\n}\n/* CSS Mode */\n.swiper-css-mode > .swiper-wrapper {\n overflow: auto;\n scrollbar-width: none;\n /* For Firefox */\n -ms-overflow-style: none;\n /* For Internet Explorer and Edge */\n}\n.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {\n display: none;\n}\n.swiper-css-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: start start;\n}\n.swiper-css-mode.swiper-horizontal > .swiper-wrapper {\n scroll-snap-type: x mandatory;\n}\n.swiper-css-mode.swiper-vertical > .swiper-wrapper {\n scroll-snap-type: y mandatory;\n}\n.swiper-css-mode.swiper-free-mode > .swiper-wrapper {\n scroll-snap-type: none;\n}\n.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: none;\n}\n.swiper-css-mode.swiper-centered > .swiper-wrapper::before {\n content: '';\n flex-shrink: 0;\n order: 9999;\n}\n.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: center center;\n scroll-snap-stop: always;\n}\n.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-centered-offset-before);\n}\n.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {\n height: 100%;\n min-height: 1px;\n width: var(--swiper-centered-offset-after);\n}\n.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-centered-offset-before);\n}\n.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {\n width: 100%;\n min-width: 1px;\n height: var(--swiper-centered-offset-after);\n}\n/* Slide styles start */\n/* 3D Shadows */\n.swiper-3d .swiper-slide-shadow,\n.swiper-3d .swiper-slide-shadow-left,\n.swiper-3d .swiper-slide-shadow-right,\n.swiper-3d .swiper-slide-shadow-top,\n.swiper-3d .swiper-slide-shadow-bottom,\n.swiper-3d .swiper-slide-shadow,\n.swiper-3d .swiper-slide-shadow-left,\n.swiper-3d .swiper-slide-shadow-right,\n.swiper-3d .swiper-slide-shadow-top,\n.swiper-3d .swiper-slide-shadow-bottom {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 10;\n}\n.swiper-3d .swiper-slide-shadow {\n background: rgba(0, 0, 0, 0.15);\n}\n.swiper-3d .swiper-slide-shadow-left {\n background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-right {\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-top {\n background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-bottom {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-lazy-preloader {\n width: 42px;\n height: 42px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -21px;\n margin-top: -21px;\n z-index: 10;\n transform-origin: 50%;\n box-sizing: border-box;\n border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n border-radius: 50%;\n border-top-color: transparent;\n}\n.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,\n.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {\n animation: swiper-preloader-spin 1s infinite linear;\n}\n.swiper-lazy-preloader-white {\n --swiper-preloader-color: #fff;\n}\n.swiper-lazy-preloader-black {\n --swiper-preloader-color: #000;\n}\n@keyframes swiper-preloader-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n/* Slide styles end */\n.swiper-virtual .swiper-slide {\n -webkit-backface-visibility: hidden;\n transform: translateZ(0);\n}
5056\n.swiper-virtual.swiper-css-mode .swiper-wrapper::after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n}\n.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after {\n height: 1px;\n width: var(--swiper-virtual-size);\n}\n.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after {\n width: 1px;\n height: var(--swiper-virtual-size);\n}\n:root {\n --swiper-navigation-size: 44px;\n /*\n --swiper-navigation-top-offset: 50%;\n --swiper-navigation-sides-offset: 10px;\n --swiper-navigation-color: var(--swiper-theme-color);\n */\n}\n.swiper-button-prev,\n.swiper-button-next {\n position: absolute;\n top: var(--swiper-navigation-top-offset, 50%);\n width: calc(var(--swiper-navigation-size) / 44 * 27);\n height: var(--swiper-navigation-size);\n margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n z-index: 10;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n}\n.swiper-button-prev.swiper-button-disabled,\n.swiper-button-next.swiper-button-disabled {\n opacity: 0.35;\n cursor: auto;\n pointer-events: none;\n}\n.swiper-button-prev.swiper-button-hidden,\n.swiper-button-next.swiper-button-hidden {\n opacity: 0;\n cursor: auto;\n pointer-events: none;\n}\n.swiper-navigation-disabled .swiper-button-prev,\n.swiper-navigation-disabled .swiper-button-next {\n display: none !important;\n}\n.swiper-button-prev svg,\n.swiper-button-next svg {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n transform-origin: center;\n}\n.swiper-rtl .swiper-button-prev svg,\n.swiper-rtl .swiper-button-next svg {\n transform: rotate(180deg);\n}\n.swiper-button-prev,\n.swiper-rtl .swiper-button-next {\n left: var(--swiper-navigation-sides-offset, 10px);\n right: auto;\n}\n.swiper-button-next,\n.swiper-rtl .swiper-button-prev {\n right: var(--swiper-navigation-sides-offset, 10px);\n left: auto;\n}\n.swiper-button-lock {\n display: none;\n}\n/* Navigation font start */\n.swiper-button-prev:after,\n.swiper-button-next:after {\n font-family: swiper-icons;\n font-size: var(--swiper-navigation-size);\n text-transform: none !important;\n letter-spacing: 0;\n font-variant: initial;\n line-height: 1;\n}\n.swiper-button-prev:after,\n.swiper-rtl .swiper-button-next:after {\n
5056content: 'prev';\n}\n.swiper-button-next,\n.swiper-rtl .swiper-button-prev {\n right: var(--swiper-navigation-sides-offset, 10px);\n left: auto;\n}\n.swiper-button-next:after,\n.swiper-rtl .swiper-button-prev:after {\n content: 'next';\n}\n/* Navigation font end */\n:root {\n /*\n --swiper-pagination-color: var(--swiper-theme-color);\n --swiper-pagination-left: auto;\n --swiper-pagination-right: 8px;\n --swiper-pagination-bottom: 8px;\n --swiper-pagination-top: auto;\n --swiper-pagination-fraction-color: inherit;\n --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);\n --swiper-pagination-progressbar-size: 4px;\n --swiper-pagination-bullet-size: 8px;\n --swiper-pagination-bullet-width: 8px;\n --swiper-pagination-bullet-height: 8px;\n --swiper-pagination-bullet-border-radius: 50%;\n --swiper-pagination-bullet-inactive-color: #000;\n --swiper-pagination-bullet-inactive-opacity: 0.2;\n --swiper-pagination-bullet-opacity: 1;\n --swiper-pagination-bullet-horizontal-gap: 4px;\n --swiper-pagination-bullet-vertical-gap: 6px;\n */\n}\n.swiper-pagination {\n position: absolute;\n text-align: center;\n transition: 300ms opacity;\n transform: translate3d(0, 0, 0);\n z-index: 10;\n}\n.swiper-pagination.swiper-pagination-hidden {\n opacity: 0;\n}\n.swiper-pagination-disabled > .swiper-pagination,\n.swiper-pagination.swiper-pagination-disabled {\n display: none !important;\n}\n/* Common Styles */\n.swiper-pagination-fraction,\n.swiper-pagination-custom,\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-bullets.swiper-pagination-horizontal {\n bottom: var(--swiper-pagination-bottom, 8px);\n top: var(--swiper-pagination-top, auto);\n left: 0;\n width: 100%;\n}\n/* Bullets */\n.swiper-pagination-bullets-dynamic {\n overflow: hidden;\n font-size: 0;\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transform: scale(0.33);\n position: relative;\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {\n transform: scale(1);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {\n transform: scale(1);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {\n transform: scale(0.66);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {\n transform: scale(0.33);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {\n transform: scale(0.66);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {\n transform: scale(0.33);\n}\n.swiper-pagination-bullet {\n width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n display: inline-block;\n border-radius: var(--swiper-pagination-bullet-border-radius, 50%);\n background: var(--swiper-pagination-bullet-inactive-color, #000);\n opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n}\nbutton.swiper-pagination-bullet {\n border: none;\n margin: 0;\n padding: 0;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.swiper-pagination-clickable .swiper-pagination-bullet {\n cursor: pointer;\n}\n.swiper-pagination-bullet:only-child {\n display: none !important;\n}\n.swiper-pagination-bullet-active {\n opacity: var(--swiper-pagination-bullet-opacity, 1);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n.swiper-vertical > .swiper-pagination-bullets,\n.swiper-pagination-vertical.swiper-pagination-bullets {\n right: var(--swiper-pagination-right, 8px);\n left: var(--swiper-pagination-left, auto);\n top: 50%;\n transform: translate3d(0px, -50%, 0);\n}\n.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,\n.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n display: block;\n}\n.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n}\n.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n display: inline-block;\n transition: 200ms transform,\n 200ms top;\n}\n.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,\n.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n}\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n}\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 200ms transform,\n 200ms left;\n}\n.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 200ms transform,\n 200ms right;\n}\n/* Fraction */\n.swiper-pagination-fraction {\n color: var(--swiper-pagination-fraction-color, inherit);\n}\n/* Progress */\n.swiper-pagination-progressbar {\n background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n}\n.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: scale(0);\n transform-origin: left top;\n}\n.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n transform-origin: right top;\n}\n.swiper-horizontal > .swiper-pagination-progressbar,\n.swiper-pagination-progressbar.swiper-pagination-horizontal,\n.swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {\n width: 100%;\n height: var(--swiper-pagination-progressbar-size, 4px);\n left: 0;\n top: 0;\n}\n.swiper-vertical > .swiper-pagination-progressbar,\n.swiper-pagination-progressbar.swiper-pagination-vertical,\n.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {\n width: var(--swiper-pagination-progressbar-size, 4px);\n height: 100%;\n left: 0;\n top: 0;\n}\n.swiper-pagination-lock {\n display: none;\n}\n:root {\n /*\n --swiper-scrollbar-border-radius: 10px;\n --swiper-scrollbar-top: auto;\n --swiper-scrollbar-bottom: 4px;\n --swiper-scrollbar-left: auto;\n --swiper-scrollbar-right: 4px;\n --swiper-scrollbar-sides-offset: 1%;\n --swiper-scrollbar-bg-color: rgba(0, 0, 0, 0.1);
5056\n --swiper-scrollbar-drag-bg-color: rgba(0, 0, 0, 0.5);\n --swiper-scrollbar-size: 4px;\n */\n}\n.swiper-scrollbar {\n border-radius: var(--swiper-scrollbar-border-radius, 10px);\n position: relative;\n touch-action: none;\n background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, 0.1));\n}\n.swiper-scrollbar-disabled > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-disabled {\n display: none !important;\n}\n.swiper-horizontal > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-horizontal {\n position: absolute;\n left: var(--swiper-scrollbar-sides-offset, 1%);\n bottom: var(--swiper-scrollbar-bottom, 4px);\n top: var(--swiper-scrollbar-top, auto);\n z-index: 50;\n height: var(--swiper-scrollbar-size, 4px);\n width: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n}\n.swiper-vertical > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-vertical {\n position: absolute;\n left: var(--swiper-scrollbar-left, auto);\n right: var(--swiper-scrollbar-right, 4px);\n top: var(--swiper-scrollbar-sides-offset, 1%);\n z-index: 50;\n width: var(--swiper-scrollbar-size, 4px);\n height: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n}\n.swiper-scrollbar-drag {\n height: 100%;\n width: 100%;\n position: relative;\n background: var(--swiper-scrollbar-drag-bg-color, rgba(0, 0, 0, 0.5));\n border-radius: var(--swiper-scrollbar-border-radius, 10px);\n left: 0;\n top: 0;\n}\n.swiper-scrollbar-cursor-drag {\n cursor: move;\n}\n.swiper-scrollbar-lock {\n display: none;\n}\n/* Zoom container styles start */\n.swiper-zoom-container {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n.swiper-zoom-container > img,\n.swiper-zoom-container > svg,\n.swiper-zoom-container > canvas {\n max-width: 100%;\n max-height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n/* Zoom container styles end */\n.swiper-slide-zoomed {\n cursor: move;\n touch-action: none;\n}\n/* a11y */\n.swiper .swiper-notification {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n opacity: 0;\n z-index: -1000;\n}\n.swiper-free-mode > .swiper-wrapper {\n transition-timing-function: ease-out;\n margin: 0 auto;\n}\n.swiper-grid > .swiper-wrapper {\n flex-wrap: wrap;\n}\n.swiper-grid-column > .swiper-wrapper {\n flex-wrap: wrap;\n flex-direction: column;\n}\n.swiper-fade.swiper-free-mode .swiper-slide {\n transition-timing-function: ease-out;\n}\n.swiper-fade .swiper-slide {\n pointer-events: none;\n transition-property: opacity;\n}\n.swiper-fade .swiper-slide .swiper-slide {\n pointer-events: none;\n}\n.swiper-fade .swiper-slide-active {\n pointer-events: auto;\n}\n.swiper-fade .swiper-slide-active .swiper-slide-active {\n pointer-events: auto;\n}\n.swiper-cube {\n overflow: visible;\n}\n.swiper-cube .swiper-slide {\n pointer-events: none;\n backface-visibility: hidden;\n z-index: 1;\n visibility: hidden;\n transform-origin: 0 0;\n width: 100%;\n height: 100%;\n}\n.swiper-cube .swiper-slide .swiper-slide {\n pointer-events: none;\n}\n.swiper-cube.swiper-rtl .swiper-slide {\n transform-origin: 100% 0;\n}\n.swiper-cube .swiper-slide-active,\n.swiper-cube .swiper-slide-active .swiper-slide-active {\n pointer-events: auto;\n}\n.swiper-cube .swiper-slide-active,\n.swiper-cube .swiper-slide-next,\n.swiper-cube .swiper-slide-prev {\n pointer-events: auto;\n visibility: visible;\n}\n.swiper-cube .swiper-cube-shadow {\n position: absolute;\n left: 0;\n bottom: 0px;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n z-index: 0;\n}\n.swiper-cube .swiper-cube-shadow:before {\n content: '';\n background: #000;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n filter: blur(50px);\n}\n.swiper-cube .swiper-slide-next + .swiper-slide {\n pointer-events: auto;\n visibility: visible;\n}\n/* Cube slide shadows start */\n.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top,\n.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom,\n.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left,\n.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right {\n z-index: 0;\n backface-visibility: hidden;\n}\n/* Cube slide shadows end */\n.swiper-flip {\n overflow: visible;\n}\n.swiper-flip .swiper-slide {\n pointer-events: none;\n backface-visibility: hidden;\n z-index: 1;\n}\n.swiper-flip .swiper-slide .swiper-slide {\n pointer-events: none;\n}\n.swiper-flip .swiper-slide-active,\n.swiper-flip .swiper-slide-active .swiper-slide-active {\n pointer-events: auto;\n}\n/* Flip slide shadows start */\n.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top,\n.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom,\n.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left,\n.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right {\n z-index: 0;\n backface-visibility: hidden;\n}\n/* Flip slide shadows end */\n.swiper-creative .swiper-slide {\n backface-visibility: hidden;\n overflow: hidden;\n transition-property: transform, opacity, height;\n}\n.swiper-cards {\n overflow: visible;\n}\n.swiper-cards .swiper-slide {\n transform-origin: center bottom;\n backface-visibility: hidden;\n overflow: hidden;\n}\n", ""]); 5057// Exports 5058/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_
5058LOADER_EXPORT___); 5059 5060 5061/***/ }), 5062 5063/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/swiper.css": 5064/*!**************************************************************************************************************************************************************************************************!*\ 5065 !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/swiper.css ***! 5066 \**************************************************************************************************************************************************************************************************/ 5067/***/ ((module, __webpack_exports__, __webpack_require__) => { 5068 5069"use strict"; 5070__webpack_require__.r(__webpack_exports__); 5071/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5072/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5073/* harmony export */ }); 5074/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 5075/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 5076// Imports 5077 5078var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 5079// Module 5080___CSS_LOADER_EXPORT___.push([module.id, "/**\n * Swiper 11.0.5\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2023 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: November 22, 2023\n */\n\n/* FONT_START */\n@font-face {\n font-family: 'swiper-icons';\n src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');\n font-weight: 400;\n font-style: normal;\n}\n/* FONT_END */\n:root {\n --swiper-theme-color: #007aff;\n /*\n --swiper-preloader-color: var(--swiper-theme-color);\n --swiper-wrapper-transition-timing-function: initial;\n */\n}
5080\n:host {\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n z-index: 1;\n}\n.swiper {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n /* Fix of Webkit flickering */\n z-index: 1;\n display: block;\n}\n.swiper-vertical > .swiper-wrapper {\n flex-direction: column;\n}\n.swiper-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n}\n.swiper-android .swiper-slide,\n.swiper-ios .swiper-slide,\n.swiper-wrapper {\n transform: translate3d(0px, 0, 0);\n}\n.swiper-horizontal {\n touch-action: pan-y;\n}\n.swiper-vertical {\n touch-action: pan-x;\n}\n.swiper-slide {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n}\n.swiper-slide-invisible-blank {\n visibility: hidden;\n}\n/* Auto Height */\n.swiper-autoheight,\n.swiper-autoheight .swiper-slide {\n height: auto;\n}\n.swiper-autoheight .swiper-wrapper {\n align-items: flex-start;\n transition-property: transform, height;\n}\n.swiper-backface-hidden .swiper-slide {\n transform: translateZ(0);\n backface-visibility: hidden;\n}\n/* 3D Effects */\n.swiper-3d.swiper-css-mode .swiper-wrapper {\n perspective: 1200px;\n}\n.swiper-3d .swiper-wrapper {\n transform-style: preserve-3d;\n}\n.swiper-3d {\n perspective: 1200px;\n}\n.swiper-3d .swiper-slide,\n.swiper-3d .swiper-cube-shadow {\n transform-style: preserve-3d;\n}\n/* CSS Mode */\n.swiper-css-mode > .swiper-wrapper {\n overflow: auto;\n scrollbar-width: none;\n /* For Firefox */\n -ms-overflow-style: none;\n /* For Internet Explorer and Edge */\n}\n.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {\n display: none;\n}\n.swiper-css-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: start start;\n}\n.swiper-css-mode.swiper-horizontal > .swiper-wrapper {\n scroll-snap-type: x mandatory;\n}\n.swiper-css-mode.swiper-vertical > .swiper-wrapper {\n scroll-snap-type: y mandatory;\n}\n.swiper-css-mode.swiper-free-mode > .swiper-wrapper {\n scroll-snap-type: none;\n}\n.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: none;\n}\n.swiper-css-mode.swiper-centered > .swiper-wrapper::before {\n content: '';\n flex-shrink: 0;\n order: 9999;\n}\n.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: center center;\n scroll-snap-stop: always;\n}\n.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-centered-offset-before);\n}\n.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {\n height: 100%;\n min-height: 1px;\n width: var(--swiper-centered-offset-after);\n}\n.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-centered-offset-before);\n}\n.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {\n width: 100%;\n min-width: 1px;\n height: var(--swiper-centered-offset-after);\n}\n/* Slide styles start */\n/* 3D Shadows */\n.swiper-3d .swiper-slide-shadow,\n.swiper-3d .swiper-slide-shadow-left,\n.swiper-3d .swiper-slide-shadow-right,\n.swiper-3d .swiper-slide-shadow-top,\n.swiper-3d .swiper-slide-shadow-bottom,\n.swiper-3d .swiper-slide-shadow,\n.swiper-3d .swiper-slide-shadow-left,\n.swiper-3d .swiper-slide-shadow-right,\n.swiper-3d .swiper-slide-shadow-top,\n.swiper-3d .swiper-slide-shadow-bottom {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 10;\n}\n.swiper-3d .swiper-slide-shadow {\n background: rgba(0, 0, 0, 0.15);\n}\n.swiper-3d .swiper-slide-shadow-left {\n background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-right {\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-top {\n background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-bottom {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-lazy-preloader {\n width: 42px;\n height: 42px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -21px;\n margin-top: -21px;\n z-index: 10;\n transform-origin: 50%;\n box-sizing: border-box;\n border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n border-radius: 50%;\n border-top-color: transparent;\n}\n.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,\n.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {\n animation: swiper-preloader-spin 1s infinite linear;\n}\n.swiper-lazy-preloader-white {\n --swiper-preloader-color: #fff;\n}\n.swiper-lazy-preloader-black {\n --swiper-preloader-color: #000;\n}\n@keyframes swiper-preloader-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n/* Slide styles end */\n", ""]); 5081// Exports 5082/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_
5082LOADER_EXPORT___); 5083 5084 5085/***/ }), 5086
vendor: 1,872 bytes, lines 5087-5162
5087/***/ "./node_modules/css-loader/dist/runtime/api.js": 5088/*!*****************************************************!*\ 5089 !*** ./node_modules/css-loader/dist/runtime/api.js ***! 5090 \*****************************************************/ 5091/***/ ((module) => { 5092 5093"use strict"; 5094 5095 5096/* 5097 MIT License http://www.opensource.org/licenses/mit-license.php 5098 Author Tobias Koppers @sokra 5099*/ 5100// css base code, injected by the css-loader 5101// eslint-disable-next-line func-names 5102module.exports = function (cssWithMappingToString) { 5103 var list = []; // return the list of modules as css string 5104 5105 list.toString = function toString() { 5106 return this.map(function (item) { 5107 var content = cssWithMappingToString(item); 5108 5109 if (item[2]) { 5110 return "@media ".concat(item[2], " {").concat(content, "}"); 5111 } 5112 5113 return content; 5114 }).join(""); 5115 }; // import a list of modules into the list 5116 // eslint-disable-next-line func-names 5117 5118 5119 list.i = function (modules, mediaQuery, dedupe) { 5120 if (typeof modules === "string") { 5121 // eslint-disable-next-line no-param-reassign 5122 modules = [[null, modules, ""]]; 5123 } 5124 5125 var alreadyImportedModules = {}; 5126 5127 if (dedupe) { 5128 for (var i = 0; i < this.length; i++) { 5129 // eslint-disable-next-line prefer-destructuring 5130 var id = this[i][0]; 5131 5132 if (id != null) { 5133 alreadyImportedModules[id] = true; 5134 } 5135 } 5136 } 5137 5138 for (var _i = 0; _i < modules.length; _i++) { 5139 var item = [].concat(modules[_i]); 5140 5141 if (dedupe && alreadyImportedModules[item[0]]) { 5142 // eslint-disable-next-line no-continue 5143 continue; 5144 } 5145 5146 if (mediaQuery) { 5147 if (!item[2]) { 5148 item[2] = mediaQuery; 5149 } else { 5150 item[2] = "".concat(mediaQuery, " and ").concat(item[2]); 5151 } 5152 } 5153 5154 list.push(item); 5155 } 5156 }; 5157 5158 return list; 5159}; 5160 5161/***/ }), 5162
vendor: 97,299 bytes, lines 5163-7231
5163/***/ "./node_modules/flatpickr/dist/esm/index.js": 5164/*!**************************************************!*\ 5165 !*** ./node_modules/flatpickr/dist/esm/index.js ***! 5166 \**************************************************/ 5167/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5168 5169"use strict"; 5170__webpack_require__.r(__webpack_exports__); 5171/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5172/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5173/* harmony export */ }); 5174/* harmony import */ var _types_options__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types/options */ "./node_modules/flatpickr/dist/esm/types/options.js"); 5175/* harmony import */ var _l10n_default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./l10n/default */ "./node_modules/flatpickr/dist/esm/l10n/default.js"); 5176/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/flatpickr/dist/esm/utils/index.js"); 5177/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/dom */ "./node_modules/flatpickr/dist/esm/utils/dom.js"); 5178/* harmony import */ var _utils_dates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/dates */ "./node_modules/flatpickr/dist/esm/utils/dates.js"); 5179/* harmony import */ var _utils_formatting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/formatting */ "./node_modules/flatpickr/dist/esm/utils/formatting.js"); 5180/* harmony import */ var _utils_polyfills__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/polyfills */ "./node_modules/flatpickr/dist/esm/utils/polyfills.js"); 5181/* harmony import */ var _utils_polyfills__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_polyfills__WEBPACK_IMPORTED_MODULE_6__); 5182var __assign = (undefined && undefined.__assign) || function () { 5183 __assign = Object.assign || function(t) { 5184 for (var s, i = 1, n = arguments.length; i < n; i++) { 5185 s = arguments[i]; 5186 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 5187 t[p] = s[p]; 5188 } 5189 return t; 5190 }; 5191 return __assign.apply(this, arguments); 5192}; 5193var __spreadArrays = (undefined && undefined.__spreadArrays) || function () { 5194 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; 5195 for (var r = Array(s), k = 0, i = 0; i < il; i++) 5196 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) 5197 r[k] = a[j]; 5198 return r; 5199}; 5200 5201 5202 5203 5204 5205 5206 5207var DEBOUNCED_CHANGE_MS = 300; 5208function FlatpickrInstance(element, instanceConfig) { 5209 var self = { 5210 config: __assign(__assign({}, _types_options__WEBPACK_IMPORTED_MODULE_0__.defaults), flatpickr.defaultConfig), 5211 l10n: _l10n_default__WEBPACK_IMPORTED_MODULE_1__["default"], 5212 }; 5213 self.parseDate = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.createDateParser)({ config: self.config, l10n: self.l10n }); 5214 self._handlers = []; 5215 self.pluginElements = []; 5216 self.loadedPlugins = []; 5217 self._bind = bind; 5218 self._setHoursFromDate = setHoursFromDate; 5219 self._positionCalendar = positionCalendar; 5220 self.changeMonth = changeMonth; 5221 self.changeYear = changeYear; 5222 self.clear = clear; 5223 self.close = close; 5224 self.onMouseOver = onMouseOver; 5225 self._createElement = _utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement; 5226 self.createDay = createDay; 5227 self.destroy = destroy; 5228 self.isEnabled = isEnabled; 5229 self.jumpToDate = jumpToDate; 5230 self.updateValue = updateValue; 5231 self.open = open; 5232 self.redraw = redraw; 5233 self.set = set; 5234 self.setDate = setDate; 5235 self.toggle = toggle; 5236 function setupHelperFunctions() { 5237 self.utils = { 5238 getDaysInMonth: function (month, yr) { 5239 if (month === void 0) { month = self.currentMonth; } 5240 if (yr === void 0) { yr = self.currentYear; } 5241 if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0)) 5242 return 29; 5243 return self.l10n.daysInMonth[month]; 5244 }, 5245 }; 5246 } 5247 function init() { 5248 self.element = self.input = element; 5249 self.isOpen = false; 5250 parseConfig(); 5251 setupLocale(); 5252 setupInputs(); 5253 setupDates(); 5254 setupHelperFunctions(); 5255 if (!self.isMobile) 5256 build(); 5257 bindEvents(); 5258 if (self.selectedDates.length || self.config.noCalendar) { 5259 if (self.config.enableTime) { 5260 setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined); 5261 } 5262 updateValue(false); 5263 } 5264 setCalendarWidth(); 5265 var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); 5266 if (!self.isMobile && isSafari) { 5267 positionCalendar(); 5268 } 5269 triggerEvent("onReady"); 5270 } 5271 function getClosestActiveElement() { 5272 var _a; 5273 return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode()) 5274 .activeElement || document.activeElement); 5275 } 5276 function bindToInstance(fn) { 5277 return fn.bind(self); 5278 } 5279 function setCalendarWidth() { 5280 var config = self.config; 5281 if (config.weekNumbers === false && config.showMonths === 1) { 5282 return; 5283 } 5284 else if (config.noCalendar !== true) { 5285 window.requestAnimationFrame(function () { 5286 if (self.calendarContainer !== undefined) { 5287 self.calendarContainer.style.visibility = "hidden"; 5288 self.calendarContainer.style.display = "block"; 5289 } 5290 if (self.daysContainer !== undefined) { 5291 var daysWidth = (self.days.offsetWidth + 1) * config.showMonths; 5292 self.daysContainer.style.width = daysWidth + "px"; 5293 self.calendarContainer.style.width = 5294 daysWidth + 5295 (self.weekWrapper !== undefined 5296 ? self.weekWrapper.offsetWidth 5297 : 0) + 5298 "px"; 5299 self.calendarContainer.style.removeProperty("visibility"); 5300 self.calendarContainer.style.removeProperty("display"); 5301 } 5302 }); 5303 } 5304 } 5305 function updateTime(e) { 5306 if (self.selectedDates.length === 0) { 5307 var defaultDate = self.config.minDate === undefined || 5308 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(new Date(), self.config.minDate) >= 0 5309 ? new Date() 5310 : new Date(self.config.minDate.getTime()); 5311 var defaults = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.getDefaultHours)(self.config); 5312 defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds()); 5313 self.selectedDates = [defaultDate]; 5314 self.latestSelectedDateObj = defaultDate; 5315 } 5316 if (e !== undefined && e.type !== "blur") { 5317 timeWrapper(e); 5318 } 5319 var prevValue = self._input.value; 5320 setHoursFromInputs(); 5321 updateValue(); 5322 if (self._input.value !== prevValue) { 5323 self._debouncedChange(); 5324 } 5325 } 5326 function ampm2military(hour, amPM) { 5327 return (hour % 12) + 12 * (0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(amPM === self.l10n.amPM[1]); 5328 } 5329 function military2ampm(hour) { 5330 switch (hour % 24) { 5331 case 0: 5332 case 12: 5333 return 12; 5334 default: 5335 return hour % 12; 5336 } 5337 } 5338 function setHoursFromInputs() { 5339 if (self.hourElement === undefined || self.minuteElement === undefined) 5340 return; 5341 var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined 5342 ? (parseInt(self.secondElement.value, 10) || 0) % 60 5343 : 0; 5344 if (self.amPM !== undefined) { 5345 hours = ampm2military(hours, self.amPM.textContent); 5346 } 5347 var limitMinHours = self.config.minTime !== undefined || 5348 (self.config.minDate && 5349 self.minDateHasTime && 5350 self.latestSelectedDateObj && 5351 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(self.latestSelectedDateObj, self.config.minDate, true) === 5352 0); 5353 var limitMaxHours = self.config.maxTime !== undefined || 5354 (self.config.maxDate && 5355 self.maxDateHasTime && 5356 self.latestSelectedDateObj && 5357 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(self.latestSelectedDateObj, self.config.maxDate, true) === 5358 0); 5359 if (self.config.maxTime !== undefined && 5360 self.config.minTime !== undefined && 5361 self.config.minTime > self.config.maxTime) { 5362 var minBound = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.calculateSecondsSinceMidnight)(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds()); 5363 var maxBound = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.calculateSecondsSinceMidnight)(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds()); 5364 var currentTime = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.calculateSecondsSinceMidnight)(hours, minutes, seconds); 5365 if (currentTime > maxBound && currentTime < minBound) { 5366 var result = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.parseSeconds)(minBound); 5367 hours = result[0]; 5368 minutes = result[1]; 5369 seconds = result[2]; 5370 } 5371 } 5372 else { 5373 if (limitMaxHours) { 5374 var maxTime = self.config.maxTime !== undefined 5375 ? self.config.maxTime 5376 : self.config.maxDate; 5377 hours = Math.min(hours, maxTime.getHours()); 5378 if (hours === maxTime.getHours()) 5379 minutes = Math.min(minutes, maxTime.getMinutes()); 5380 if (minutes === maxTime.getMinutes()) 5381 seconds = Math.min(seconds, maxTime.getSeconds()); 5382 } 5383 if (limitMinHours) { 5384 var minTime = self.config.minTime !== undefined 5385 ? self.config.minTime 5386 : self.config.minDate; 5387 hours = Math.max(hours, minTime.getHours()); 5388 if (hours === minTime.getHours() && minutes < minTime.getMinutes()) 5389 minutes = minTime.getMinutes(); 5390 if (minutes === minTime.getMinutes()) 5391 seconds = Math.max(seconds, minTime.getSeconds()); 5392 } 5393 } 5394 setHours(hours, minutes, seconds); 5395 } 5396 function setHoursFromDate(dateObj) { 5397 var date = dateObj || self.latestSelectedDateObj; 5398 if (date && date instanceof Date) { 5399 setHours(date.getHours(), date.getMinutes(), date.getSeconds()); 5400 } 5401 } 5402 function setHours(hours, minutes, seconds) { 5403 if (self.latestSelectedDateObj !== undefined) { 5404 self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0); 5405 } 5406 if (!self.hourElement || !self.minuteElement || self.isMobile) 5407 return; 5408 self.hourElement.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(!self.config.time_24hr 5409 ? ((12 + hours) % 12) + 12 * (0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(hours % 12 === 0) 5410 : hours); 5411 self.minuteElement.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(minutes); 5412 if (self.amPM !== undefined) 5413 self.amPM.textContent = self.l10n.amPM[(0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(hours >= 12)]; 5414 if (self.secondElement !== undefined) 5415 self.secondElement.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(seconds); 5416 } 5417 function onYearInput(event) { 5418 var eventTarget = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(event); 5419 var year = parseInt(eventTarget.value) + (event.delta || 0); 5420 if (year / 1000 > 1 || 5421 (event.key === "Enter" && !/[^\d]/.test(year.toString()))) { 5422 changeYear(year); 5423 } 5424 } 5425 function bind(element, event, handler, options) { 5426 if (event instanceof Array) 5427 return event.forEach(function (ev) { return bind(element, ev, handler, options); }); 5428 if (element instanceof Array) 5429 return element.forEach(function (el) { return bind(el, event, handler, options); }); 5430 element.addEventListener(event, handler, options); 5431 self._handlers.push({ 5432 remove: function () { return element.removeEventListener(event, handler, options); }, 5433 }); 5434 } 5435 function triggerChange() { 5436 triggerEvent("onChange"); 5437 } 5438 function bindEvents() { 5439 if (self.config.wrap) { 5440 ["open", "close", "toggle", "clear"].forEach(function (evt) { 5441 Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) { 5442 return bind(el, "click", self[evt]); 5443 }); 5444 }); 5445 } 5446 if (self.isMobile) { 5447 setupMobile(); 5448 return; 5449 } 5450 var debouncedResize = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.debounce)(onResize, 50); 5451 self._debouncedChange = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.debounce)(triggerChange, DEBOUNCED_CHANGE_MS); 5452 if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) 5453 bind(self.daysContainer, "mouseover", function (e) { 5454 if (self.config.mode === "range") 5455 onMouseOver((0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e)); 5456 }); 5457 bind(self._input, "keydown", onKeyDown); 5458 if (self.calendarContainer !== undefined) { 5459 bind(self.calendarContainer, "keydown", onKeyDown); 5460 } 5461 if (!self.config.inline && !self.config.static) 5462 bind(window, "resize", debouncedResize); 5463 if (window.ontouchstart !== undefined) 5464 bind(window.document, "touchstart", documentClick); 5465 else 5466 bind(window.document, "mousedown", documentClick); 5467 bind(window.document, "focus", documentClick, { capture: true }); 5468 if (self.config.clickOpens === true) { 5469 bind(self._input, "focus", self.open); 5470 bind(self._input, "click", self.open); 5471 } 5472 if (self.daysContainer !== undefined) { 5473 bind(self.monthNav, "click", onMonthNavClick); 5474 bind(self.monthNav, ["keyup", "increment"], onYearInput); 5475 bind(self.daysContainer, "click", selectDate); 5476 } 5477 if (self.timeContainer !== undefined && 5478 self.minuteElement !== undefined && 5479 self.hourElement !== undefined) { 5480 var selText = function (e) { 5481 return (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e).select(); 5482 }; 5483 bind(self.timeContainer, ["increment"], updateTime); 5484 bind(self.timeContainer, "blur", updateTime, { capture: true }); 5485 bind(self.timeContainer, "click", timeIncrement); 5486 bind([self.hourElement, self.minuteElement], ["focus", "click"], selText); 5487 if (self.secondElement !== undefined) 5488 bind(self.secondElement, "focus", function () { return self.secondElement && self.secondElement.select(); }); 5489 if (self.amPM !== undefined) { 5490 bind(self.amPM, "click", function (e) { 5491 updateTime(e); 5492 }); 5493 } 5494 } 5495 if (self.config.allowInput) { 5496 bind(self._input, "blur", onBlur); 5497 } 5498 } 5499 function jumpToDate(jumpDate, triggerChange) { 5500 var jumpTo = jumpDate !== undefined 5501 ? self.parseDate(jumpDate) 5502 : self.latestSelectedDateObj || 5503 (self.config.minDate && self.config.minDate > self.now 5504 ? self.config.minDate 5505 : self.config.maxDate && self.config.maxDate < self.now 5506 ? self.config.maxDate 5507 : self.now); 5508 var oldYear = self.currentYear; 5509 var oldMonth = self.currentMonth; 5510 try { 5511 if (jumpTo !== undefined) { 5512 self.currentYear = jumpTo.getFullYear(); 5513 self.currentMonth = jumpTo.getMonth(); 5514 } 5515 } 5516 catch (e) { 5517 e.message = "Invalid date supplied: " + jumpTo; 5518 self.config.errorHandler(e); 5519 } 5520 if (triggerChange && self.currentYear !== oldYear) { 5521 triggerEvent("onYearChange"); 5522 buildMonthSwitch(); 5523 } 5524 if (triggerChange && 5525 (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) { 5526 triggerEvent("onMonthChange"); 5527 } 5528 self.redraw(); 5529 } 5530 function timeIncrement(e) { 5531 var eventTarget = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 5532 if (~eventTarget.className.indexOf("arrow")) 5533 incrementNumInput(e, eventTarget.classList.contains("arrowUp") ? 1 : -1); 5534 } 5535 function incrementNumInput(e, delta, inputElem) { 5536 var target = e && (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 5537 var input = inputElem || 5538 (target && target.parentNode && target.parentNode.firstChild); 5539 var event = createEvent("increment"); 5540 event.delta = delta; 5541 input && input.dispatchEvent(event); 5542 } 5543 function build() { 5544 var fragment = window.document.createDocumentFragment(); 5545 self.calendarContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-calendar"); 5546 self.calendarContainer.tabIndex = -1; 5547 if (!self.config.noCalendar) { 5548 fragment.appendChild(buildMonthNav()); 5549 self.innerContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-innerContainer"); 5550 if (self.config.weekNumbers) { 5551 var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers; 5552 self.innerContainer.appendChild(weekWrapper); 5553 self.weekNumbers = weekNumbers; 5554 self.weekWrapper = weekWrapper; 5555 } 5556 self.rContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-rContainer"); 5557 self.rContainer.appendChild(buildWeekdays()); 5558 if (!self.daysContainer) { 5559 self.daysContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-days"); 5560 self.daysContainer.tabIndex = -1; 5561 } 5562 buildDays(); 5563 self.rContainer.appendChild(self.daysContainer); 5564 self.innerContainer.appendChild(self.rContainer); 5565 fragment.appendChild(self.innerContainer); 5566 } 5567 if (self.config.enableTime) { 5568 fragment.appendChild(buildTime()); 5569 } 5570 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "rangeMode", self.config.mode === "range"); 5571 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "animate", self.config.animate === true); 5572 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "multiMonth", self.config.showMonths > 1); 5573 self.calendarContainer.appendChild(fragment); 5574 var customAppend = self.config.appendTo !== undefined && 5575 self.config.appendTo.nodeType !== undefined; 5576 if (self.config.inline || self.config.static) { 5577 self.calendarContainer.classList.add(self.config.inline ? "inline" : "static"); 5578 if (self.config.inline) { 5579 if (!customAppend && self.element.parentNode) 5580 self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling); 5581 else if (self.config.appendTo !== undefined) 5582 self.config.appendTo.appendChild(self.calendarContainer); 5583 } 5584 if (self.config.static) { 5585 var wrapper = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-wrapper"); 5586 if (self.element.parentNode) 5587 self.element.parentNode.insertBefore(wrapper, self.element); 5588 wrapper.appendChild(self.element); 5589 if (self.altInput) 5590 wrapper.appendChild(self.altInput); 5591 wrapper.appendChild(self.calendarContainer); 5592 } 5593 } 5594 if (!self.config.static && !self.config.inline) 5595 (self.config.appendTo !== undefined 5596 ? self.config.appendTo 5597 : window.document.body).appendChild(self.calendarContainer); 5598 } 5599 function createDay(className, date, _dayNumber, i) { 5600 var dateIsEnabled = isEnabled(date, true), dayElement = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", className, date.getDate().toString()); 5601 dayElement.dateObj = date; 5602 dayElement.$i = i; 5603 dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat)); 5604 if (className.indexOf("hidden") === -1 && 5605 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(date, self.now) === 0) { 5606 self.todayDateElem = dayElement; 5607 dayElement.classList.add("today"); 5608 dayElement.setAttribute("aria-current", "date"); 5609 } 5610 if (dateIsEnabled) { 5611 dayElement.tabIndex = -1; 5612 if (isDateSelected(date)) { 5613 dayElement.classList.add("selected"); 5614 self.selectedDateElem = dayElement; 5615 if (self.config.mode === "range") { 5616 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(dayElement, "startRange", self.selectedDates[0] && 5617 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(date, self.selectedDates[0], true) === 0); 5618 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(dayElement, "endRange", self.selectedDates[1] && 5619 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(date, self.selectedDates[1], true) === 0); 5620 if (className === "nextMonthDay") 5621 dayElement.classList.add("inRange"); 5622 } 5623 } 5624 } 5625 else { 5626 dayElement.classList.add("flatpickr-disabled"); 5627 } 5628 if (self.config.mode === "range") { 5629 if (isDateInRange(date) && !isDateSelected(date)) 5630 dayElement.classList.add("inRange"); 5631 } 5632 if (self.weekNumbers && 5633 self.config.showMonths === 1 && 5634 className !== "prevMonthDay" && 5635 i % 7 === 6) { 5636 self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + self.config.getWeek(date) + "</span>"); 5637 } 5638 triggerEvent("onDayCreate", dayElement); 5639 return dayElement; 5640 } 5641 function focusOnDayElem(targetNode) { 5642 targetNode.focus(); 5643 if (self.config.mode === "range") 5644 onMouseOver(targetNode); 5645 } 5646 function getFirstAvailableDay(delta) { 5647 var startMonth = delta > 0 ? 0 : self.config.showMonths - 1; 5648 var endMonth = delta > 0 ? self.config.showMonths : -1; 5649 for (var m = startMonth; m != endMonth; m += delta) { 5650 var month = self.daysContainer.children[m]; 5651 var startIndex = delta > 0 ? 0 : month.children.length - 1; 5652 var endIndex = delta > 0 ? month.children.length : -1; 5653 for (var i = startIndex; i != endIndex; i += delta) { 5654 var c = month.children[i]; 5655 if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj)) 5656 return c; 5657 } 5658 } 5659 return undefined; 5660 } 5661 function getNextAvailableDay(current, delta) { 5662 var givenMonth = current.className.indexOf("Month") === -1 5663 ? current.dateObj.getMonth() 5664 : self.currentMonth; 5665 var endMonth = delta > 0 ? self.config.showMonths : -1; 5666 var loopDelta = delta > 0 ? 1 : -1; 5667 for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) { 5668 var month = self.daysContainer.children[m]; 5669 var startIndex = givenMonth - self.currentMonth === m 5670 ? current.$i + delta 5671 : delta < 0 5672 ? month.children.length - 1 5673 : 0; 5674 var numMonthDays = month.children.length; 5675 for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) { 5676 var c = month.children[i]; 5677 if (c.className.indexOf("hidden") === -1 && 5678 isEnabled(c.dateObj) && 5679 Math.abs(current.$i - i) >= Math.abs(delta)) 5680 return focusOnDayElem(c); 5681 } 5682 } 5683 self.changeMonth(loopDelta); 5684 focusOnDay(getFirstAvailableDay(loopDelta), 0); 5685 return undefined; 5686 } 5687 function focusOnDay(current, offset) { 5688 var activeElement = getClosestActiveElement(); 5689 var dayFocused = isInView(activeElement || document.body); 5690 var startElem = current !== undefined 5691 ? current 5692 : dayFocused 5693 ? activeElement 5694 : self.selectedDateElem !== undefined && isInView(self.selectedDateElem) 5695 ? self.selectedDateElem 5696 : self.todayDateElem !== undefined && isInView(self.todayDateElem) 5697 ? self.todayDateElem 5698 : getFirstAvailableDay(offset > 0 ? 1 : -1); 5699 if (startElem === undefined) { 5700 self._input.focus(); 5701 } 5702 else if (!dayFocused) { 5703 focusOnDayElem(startElem); 5704 } 5705 else { 5706 getNextAvailableDay(startElem, offset); 5707 } 5708 } 5709 function buildMonthDays(year, month) { 5710 var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7; 5711 var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year); 5712 var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? "prevMonthDay hidden" : "prevMonthDay", nextMonthDayClass = isMultiMonth ? "nextMonthDay hidden" : "nextMonthDay"; 5713 var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0; 5714 for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) { 5715 days.appendChild(createDay("flatpickr-day " + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex)); 5716 } 5717 for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) { 5718 days.appendChild(createDay("flatpickr-day", new Date(year, month, dayNumber), dayNumber, dayIndex)); 5719 } 5720 for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth && 5721 (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) { 5722 days.appendChild(createDay("flatpickr-day " + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex)); 5723 } 5724 var dayContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "dayContainer"); 5725 dayContainer.appendChild(days); 5726 return dayContainer; 5727 } 5728 function buildDays() { 5729 if (self.daysContainer === undefined) { 5730 return; 5731 } 5732 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.clearNode)(self.daysContainer); 5733 if (self.weekNumbers) 5734 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.clearNode)(self.weekNumbers); 5735 var frag = document.createDocumentFragment(); 5736 for (var i = 0; i < self.config.showMonths; i++) { 5737 var d = new Date(self.currentYear, self.currentMonth, 1); 5738 d.setMonth(self.currentMonth + i); 5739 frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth())); 5740 } 5741 self.daysContainer.appendChild(frag); 5742 self.days = self.daysContainer.firstChild; 5743 if (self.config.mode === "range" && self.selectedDates.length === 1) { 5744 onMouseOver(); 5745 } 5746 } 5747 function buildMonthSwitch() { 5748 if (self.config.showMonths > 1 || 5749 self.config.monthSelectorType !== "dropdown") 5750 return; 5751 var shouldBuildMonth = function (month) { 5752 if (self.config.minDate !== undefined && 5753 self.currentYear === self.config.minDate.getFullYear() && 5754 month < self.config.minDate.getMonth()) { 5755 return false; 5756 } 5757 return !(self.config.maxDate !== undefined && 5758 self.currentYear === self.config.maxDate.getFullYear() && 5759 month > self.config.maxDate.getMonth()); 5760 }; 5761 self.monthsDropdownContainer.tabIndex = -1; 5762 self.monthsDropdownContainer.innerHTML = ""; 5763 for (var i = 0; i < 12; i++) { 5764 if (!shouldBuildMonth(i)) 5765 continue; 5766 var month = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("option", "flatpickr-monthDropdown-month"); 5767 month.value = new Date(self.currentYear, i).getMonth().toString(); 5768 month.textContent = (0,_utils_formatting__WEBPACK_IMPORTED_MODULE_5__.monthToStr)(i, self.config.shorthandCurrentMonth, self.l10n); 5769 month.tabIndex = -1; 5770 if (self.currentMonth === i) { 5771 month.selected = true; 5772 } 5773 self.monthsDropdownContainer.appendChild(month); 5774 } 5775 } 5776 function buildMonth() { 5777 var container = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-month"); 5778 var monthNavFragment = window.document.createDocumentFragment(); 5779 var monthElement; 5780 if (self.config.showMonths > 1 || 5781 self.config.monthSelectorType === "static") { 5782 monthElement = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "cur-month"); 5783 } 5784 else { 5785 self.monthsDropdownContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("select", "flatpickr-monthDropdown-months"); 5786 self.monthsDropdownContainer.setAttribute("aria-label", self.l10n.monthAriaLabel); 5787 bind(self.monthsDropdownContainer, "change", function (e) { 5788 var target = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 5789 var selectedMonth = parseInt(target.value, 10); 5790 self.changeMonth(selectedMonth - self.currentMonth); 5791 triggerEvent("onMonthChange"); 5792 }); 5793 buildMonthSwitch(); 5794 monthElement = self.monthsDropdownContainer; 5795 } 5796 var yearInput = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createNumberInput)("cur-year", { tabindex: "-1" }); 5797 var yearElement = yearInput.getElementsByTagName("input")[0]; 5798 yearElement.setAttribute("aria-label", self.l10n.yearAriaLabel); 5799 if (self.config.minDate) { 5800 yearElement.setAttribute("min", self.config.minDate.getFullYear().toString()); 5801 } 5802 if (self.config.maxDate) { 5803 yearElement.setAttribute("max", self.config.maxDate.getFullYear().toString()); 5804 yearElement.disabled = 5805 !!self.config.minDate && 5806 self.config.minDate.getFullYear() === self.config.maxDate.getFullYear(); 5807 } 5808 var currentMonth = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-current-month"); 5809 currentMonth.appendChild(monthElement); 5810 currentMonth.appendChild(yearInput); 5811 monthNavFragment.appendChild(currentMonth); 5812 container.appendChild(monthNavFragment); 5813 return { 5814 container: container, 5815 yearElement: yearElement, 5816 monthElement: monthElement, 5817 }; 5818 } 5819 function buildMonths() { 5820 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.clearNode)(self.monthNav); 5821 self.monthNav.appendChild(self.prevMonthNav); 5822 if (self.config.showMonths) { 5823 self.yearElements = []; 5824 self.monthElements = []; 5825 } 5826 for (var m = self.config.showMonths; m--;) { 5827 var month = buildMonth(); 5828 self.yearElements.push(month.yearElement); 5829 self.monthElements.push(month.monthElement); 5830 self.monthNav.appendChild(month.container); 5831 } 5832 self.monthNav.appendChild(self.nextMonthNav); 5833 } 5834 function buildMonthNav() { 5835 self.monthNav = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-months"); 5836 self.yearElements = []; 5837 self.monthElements = []; 5838 self.prevMonthNav = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "flatpickr-prev-month"); 5839 self.prevMonthNav.innerHTML = self.config.prevArrow; 5840 self.nextMonthNav = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "flatpickr-next-month"); 5841 self.nextMonthNav.innerHTML = self.config.nextArrow; 5842 buildMonths(); 5843 Object.defineProperty(self, "_hidePrevMonthArrow", { 5844 get: function () { return self.__hidePrevMonthArrow; }, 5845 set: function (bool) { 5846 if (self.__hidePrevMonthArrow !== bool) { 5847 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.prevMonthNav, "flatpickr-disabled", bool); 5848 self.__hidePrevMonthArrow = bool; 5849 } 5850 }, 5851 }); 5852 Object.defineProperty(self, "_hideNextMonthArrow", { 5853 get: function () { return self.__hideNextMonthArrow; }, 5854 set: function (bool) { 5855 if (self.__hideNextMonthArrow !== bool) { 5856 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.nextMonthNav, "flatpickr-disabled", bool); 5857 self.__hideNextMonthArrow = bool; 5858 } 5859 }, 5860 }); 5861 self.currentYearElement = self.yearElements[0]; 5862 updateNavigationCurrentMonth(); 5863 return self.monthNav; 5864 } 5865 function buildTime() { 5866 self.calendarContainer.classList.add("hasTime"); 5867 if (self.config.noCalendar) 5868 self.calendarContainer.classList.add("noCalendar"); 5869 var defaults = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.getDefaultHours)(self.config); 5870 self.timeContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-time"); 5871 self.timeContainer.tabIndex = -1; 5872 var separator = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "flatpickr-time-separator", ":"); 5873 var hourInput = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createNumberInput)("flatpickr-hour", { 5874 "aria-label": self.l10n.hourAriaLabel, 5875 }); 5876 self.hourElement = hourInput.getElementsByTagName("input")[0]; 5877 var minuteInput = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createNumberInput)("flatpickr-minute", { 5878 "aria-label": self.l10n.minuteAriaLabel, 5879 }); 5880 self.minuteElement = minuteInput.getElementsByTagName("input")[0]; 5881 self.hourElement.tabIndex = self.minuteElement.tabIndex = -1; 5882 self.hourElement.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(self.latestSelectedDateObj 5883 ? self.latestSelectedDateObj.getHours() 5884 : self.config.time_24hr 5885 ? defaults.hours 5886 : military2ampm(defaults.hours)); 5887 self.minuteElement.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(self.latestSelectedDateObj 5888 ? self.latestSelectedDateObj.getMinutes() 5889 : defaults.minutes); 5890 self.hourElement.setAttribute("step", self.config.hourIncrement.toString()); 5891 self.minuteElement.setAttribute("step", self.config.minuteIncrement.toString()); 5892 self.hourElement.setAttribute("min", self.config.time_24hr ? "0" : "1"); 5893 self.hourElement.setAttribute("max", self.config.time_24hr ? "23" : "12"); 5894 self.hourElement.setAttribute("maxlength", "2"); 5895 self.minuteElement.setAttribute("min", "0"); 5896 self.minuteElement.setAttribute("max", "59"); 5897 self.minuteElement.setAttribute("maxlength", "2"); 5898 self.timeContainer.appendChild(hourInput); 5899 self.timeContainer.appendChild(separator); 5900 self.timeContainer.appendChild(minuteInput); 5901 if (self.config.time_24hr) 5902 self.timeContainer.classList.add("time24hr"); 5903 if (self.config.enableSeconds) { 5904 self.timeContainer.classList.add("hasSeconds"); 5905 var secondInput = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createNumberInput)("flatpickr-second"); 5906 self.secondElement = secondInput.getElementsByTagName("input")[0]; 5907 self.secondElement.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(self.latestSelectedDateObj 5908 ? self.latestSelectedDateObj.getSeconds() 5909 : defaults.seconds); 5910 self.secondElement.setAttribute("step", self.minuteElement.getAttribute("step")); 5911 self.secondElement.setAttribute("min", "0"); 5912 self.secondElement.setAttribute("max", "59"); 5913 self.secondElement.setAttribute("maxlength", "2"); 5914 self.timeContainer.appendChild((0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "flatpickr-time-separator", ":")); 5915 self.timeContainer.appendChild(secondInput); 5916 } 5917 if (!self.config.time_24hr) { 5918 self.amPM = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "flatpickr-am-pm", self.l10n.amPM[(0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)((self.latestSelectedDateObj 5919 ? self.hourElement.value 5920 : self.config.defaultHour) > 11)]); 5921 self.amPM.title = self.l10n.toggleTitle; 5922 self.amPM.tabIndex = -1; 5923 self.timeContainer.appendChild(self.amPM); 5924 } 5925 return self.timeContainer; 5926 } 5927 function buildWeekdays() { 5928 if (!self.weekdayContainer) 5929 self.weekdayContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-weekdays"); 5930 else 5931 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.clearNode)(self.weekdayContainer); 5932 for (var i = self.config.showMonths; i--;) { 5933 var container = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-weekdaycontainer"); 5934 self.weekdayContainer.appendChild(container); 5935 } 5936 updateWeekdays(); 5937 return self.weekdayContainer; 5938 } 5939 function updateWeekdays() { 5940 if (!self.weekdayContainer) { 5941 return; 5942 } 5943 var firstDayOfWeek = self.l10n.firstDayOfWeek; 5944 var weekdays = __spreadArrays(self.l10n.weekdays.shorthand); 5945 if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) { 5946 weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek)); 5947 } 5948 for (var i = self.config.showMonths; i--;) { 5949 self.weekdayContainer.children[i].innerHTML = "\n <span class='flatpickr-weekday'>\n " + weekdays.join("</span><span class='flatpickr-weekday'>") + "\n </span>\n "; 5950 } 5951 } 5952 function buildWeeks() { 5953 self.calendarContainer.classList.add("hasWeeks"); 5954 var weekWrapper = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-weekwrapper"); 5955 weekWrapper.appendChild((0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("span", "flatpickr-weekday", self.l10n.weekAbbreviation)); 5956 var weekNumbers = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", "flatpickr-weeks"); 5957 weekWrapper.appendChild(weekNumbers); 5958 return { 5959 weekWrapper: weekWrapper, 5960 weekNumbers: weekNumbers, 5961 }; 5962 } 5963 function changeMonth(value, isOffset) { 5964 if (isOffset === void 0) { isOffset = true; } 5965 var delta = isOffset ? value : value - self.currentMonth; 5966 if ((delta < 0 && self._hidePrevMonthArrow === true) || 5967 (delta > 0 && self._hideNextMonthArrow === true)) 5968 return; 5969 self.currentMonth += delta; 5970 if (self.currentMonth < 0 || self.currentMonth > 11) { 5971 self.currentYear += self.currentMonth > 11 ? 1 : -1; 5972 self.currentMonth = (self.currentMonth + 12) % 12; 5973 triggerEvent("onYearChange"); 5974 buildMonthSwitch(); 5975 } 5976 buildDays(); 5977 triggerEvent("onMonthChange"); 5978 updateNavigationCurrentMonth(); 5979 } 5980 function clear(triggerChangeEvent, toInitial) { 5981 if (triggerChangeEvent === void 0) { triggerChangeEvent = true; } 5982 if (toInitial === void 0) { toInitial = true; } 5983 self.input.value = ""; 5984 if (self.altInput !== undefined) 5985 self.altInput.value = ""; 5986 if (self.mobileInput !== undefined) 5987 self.mobileInput.value = ""; 5988 self.selectedDates = []; 5989 self.latestSelectedDateObj = undefined; 5990 if (toInitial === true) { 5991 self.currentYear = self._initialDate.getFullYear(); 5992 self.currentMonth = self._initialDate.getMonth(); 5993 } 5994 if (self.config.enableTime === true) { 5995 var _a = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.getDefaultHours)(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds; 5996 setHours(hours, minutes, seconds); 5997 } 5998 self.redraw(); 5999 if (triggerChangeEvent) 6000 triggerEvent("onChange"); 6001 } 6002 function close() { 6003 self.isOpen = false; 6004 if (!self.isMobile) { 6005 if (self.calendarContainer !== undefined) { 6006 self.calendarContainer.classList.remove("open"); 6007 } 6008 if (self._input !== undefined) { 6009 self._input.classList.remove("active"); 6010 } 6011 } 6012 triggerEvent("onClose"); 6013 } 6014 function destroy() { 6015 if (self.config !== undefined) 6016 triggerEvent("onDestroy"); 6017 for (var i = self._handlers.length; i--;) { 6018 self._handlers[i].remove(); 6019 } 6020 self._handlers = []; 6021 if (self.mobileInput) { 6022 if (self.mobileInput.parentNode) 6023 self.mobileInput.parentNode.removeChild(self.mobileInput); 6024 self.mobileInput = undefined; 6025 } 6026 else if (self.calendarContainer && self.calendarContainer.parentNode) { 6027 if (self.config.static && self.calendarContainer.parentNode) { 6028 var wrapper = self.calendarContainer.parentNode; 6029 wrapper.lastChild && wrapper.removeChild(wrapper.lastChild); 6030 if (wrapper.parentNode) { 6031 while (wrapper.firstChild) 6032 wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper); 6033 wrapper.parentNode.removeChild(wrapper); 6034 } 6035 } 6036 else 6037 self.calendarContainer.parentNode.removeChild(self.calendarContainer); 6038 } 6039 if (self.altInput) { 6040 self.input.type = "text"; 6041 if (self.altInput.parentNode) 6042 self.altInput.parentNode.removeChild(self.altInput); 6043 delete self.altInput; 6044 } 6045 if (self.input) { 6046 self.input.type = self.input._type; 6047 self.input.classList.remove("flatpickr-input"); 6048 self.input.removeAttribute("readonly"); 6049 } 6050 [ 6051 "_showTimeInput", 6052 "latestSelectedDateObj", 6053 "_hideNextMonthArrow", 6054 "_hidePrevMonthArrow", 6055 "__hideNextMonthArrow", 6056 "__hidePrevMonthArrow", 6057 "isMobile", 6058 "isOpen", 6059 "selectedDateElem", 6060 "minDateHasTime", 6061 "maxDateHasTime", 6062 "days", 6063 "daysContainer", 6064 "_input", 6065 "_positionElement", 6066 "innerContainer", 6067 "rContainer", 6068 "monthNav", 6069 "todayDateElem", 6070 "calendarContainer", 6071 "weekdayContainer", 6072 "prevMonthNav", 6073 "nextMonthNav", 6074 "monthsDropdownContainer", 6075 "currentMonthElement", 6076 "currentYearElement", 6077 "navigationCurrentMonth", 6078 "selectedDateElem", 6079 "config", 6080 ].forEach(function (k) { 6081 try { 6082 delete self[k]; 6083 } 6084 catch (_) { } 6085 }); 6086 } 6087 function isCalendarElem(elem) { 6088 return self.calendarContainer.contains(elem); 6089 } 6090 function documentClick(e) { 6091 if (self.isOpen && !self.config.inline) { 6092 var eventTarget_1 = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 6093 var isCalendarElement = isCalendarElem(eventTarget_1); 6094 var isInput = eventTarget_1 === self.input || 6095 eventTarget_1 === self.altInput || 6096 self.element.contains(eventTarget_1) || 6097 (e.path && 6098 e.path.indexOf && 6099 (~e.path.indexOf(self.input) || 6100 ~e.path.indexOf(self.altInput))); 6101 var lostFocus = !isInput && 6102 !isCalendarElement && 6103 !isCalendarElem(e.relatedTarget); 6104 var isIgnored = !self.config.ignoredFocusElements.some(function (elem) { 6105 return elem.contains(eventTarget_1); 6106 }); 6107 if (lostFocus && isIgnored) { 6108 if (self.config.allowInput) { 6109 self.setDate(self._input.value, false, self.config.altInput 6110 ? self.config.altFormat 6111 : self.config.dateFormat); 6112 } 6113 if (self.timeContainer !== undefined && 6114 self.minuteElement !== undefined && 6115 self.hourElement !== undefined && 6116 self.input.value !== "" && 6117 self.input.value !== undefined) { 6118 updateTime(); 6119 } 6120 self.close(); 6121 if (self.config && 6122 self.config.mode === "range" && 6123 self.selectedDates.length === 1) 6124 self.clear(false); 6125 } 6126 } 6127 } 6128 function changeYear(newYear) { 6129 if (!newYear || 6130 (self.config.minDate && newYear < self.config.minDate.getFullYear()) || 6131 (self.config.maxDate && newYear > self.config.maxDate.getFullYear())) 6132 return; 6133 var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum; 6134 self.currentYear = newYearNum || self.currentYear; 6135 if (self.config.maxDate && 6136 self.currentYear === self.config.maxDate.getFullYear()) { 6137 self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth); 6138 } 6139 else if (self.config.minDate && 6140 self.currentYear === self.config.minDate.getFullYear()) { 6141 self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth); 6142 } 6143 if (isNewYear) { 6144 self.redraw(); 6145 triggerEvent("onYearChange"); 6146 buildMonthSwitch(); 6147 } 6148 } 6149 function isEnabled(date, timeless) { 6150 var _a; 6151 if (timeless === void 0) { timeless = true; } 6152 var dateToCheck = self.parseDate(date, undefined, timeless); 6153 if ((self.config.minDate && 6154 dateToCheck && 6155 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) || 6156 (self.config.maxDate && 6157 dateToCheck && 6158 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0)) 6159 return false; 6160 if (!self.config.enable && self.config.disable.length === 0) 6161 return true; 6162 if (dateToCheck === undefined) 6163 return false; 6164 var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable; 6165 for (var i = 0, d = void 0; i < array.length; i++) { 6166 d = array[i]; 6167 if (typeof d === "function" && 6168 d(dateToCheck)) 6169 return bool; 6170 else if (d instanceof Date && 6171 dateToCheck !== undefined && 6172 d.getTime() === dateToCheck.getTime()) 6173 return bool; 6174 else if (typeof d === "string") { 6175 var parsed = self.parseDate(d, undefined, true); 6176 return parsed && parsed.getTime() === dateToCheck.getTime() 6177 ? bool 6178 : !bool; 6179 } 6180 else if (typeof d === "object" && 6181 dateToCheck !== undefined && 6182 d.from && 6183 d.to && 6184 dateToCheck.getTime() >= d.from.getTime() && 6185 dateToCheck.getTime() <= d.to.getTime()) 6186 return bool; 6187 } 6188 return !bool; 6189 } 6190 function isInView(elem) { 6191 if (self.daysContainer !== undefined) 6192 return (elem.className.indexOf("hidden") === -1 && 6193 elem.className.indexOf("flatpickr-disabled") === -1 && 6194 self.daysContainer.contains(elem)); 6195 return false; 6196 } 6197 function onBlur(e) { 6198 var isInput = e.target === self._input; 6199 var valueChanged = self._input.value.trimEnd() !== getDateStr(); 6200 if (isInput && 6201 valueChanged && 6202 !(e.relatedTarget && isCalendarElem(e.relatedTarget))) { 6203 self.setDate(self._input.value, true, e.target === self.altInput 6204 ? self.config.altFormat 6205 : self.config.dateFormat); 6206 } 6207 } 6208 function onKeyDown(e) { 6209 var eventTarget = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 6210 var isInput = self.config.wrap 6211 ? element.contains(eventTarget) 6212 : eventTarget === self._input; 6213 var allowInput = self.config.allowInput; 6214 var allowKeydown = self.isOpen && (!allowInput || !isInput); 6215 var allowInlineKeydown = self.config.inline && isInput && !allowInput; 6216 if (e.keyCode === 13 && isInput) { 6217 if (allowInput) { 6218 self.setDate(self._input.value, true, eventTarget === self.altInput 6219 ? self.config.altFormat 6220 : self.config.dateFormat); 6221 self.close(); 6222 return eventTarget.blur(); 6223 } 6224 else { 6225 self.open(); 6226 } 6227 } 6228 else if (isCalendarElem(eventTarget) || 6229 allowKeydown || 6230 allowInlineKeydown) { 6231 var isTimeObj = !!self.timeContainer && 6232 self.timeContainer.contains(eventTarget); 6233 switch (e.keyCode) { 6234 case 13: 6235 if (isTimeObj) { 6236 e.preventDefault(); 6237 updateTime(); 6238 focusAndClose(); 6239 } 6240 else 6241 selectDate(e); 6242 break; 6243 case 27: 6244 e.preventDefault(); 6245 focusAndClose(); 6246 break; 6247 case 8: 6248 case 46: 6249 if (isInput && !self.config.allowInput) { 6250 e.preventDefault(); 6251 self.clear(); 6252 } 6253 break; 6254 case 37: 6255 case 39: 6256 if (!isTimeObj && !isInput) { 6257 e.preventDefault(); 6258 var activeElement = getClosestActiveElement(); 6259 if (self.daysContainer !== undefined && 6260 (allowInput === false || 6261 (activeElement && isInView(activeElement)))) { 6262 var delta_1 = e.keyCode === 39 ? 1 : -1; 6263 if (!e.ctrlKey) 6264 focusOnDay(undefined, delta_1); 6265 else { 6266 e.stopPropagation(); 6267 changeMonth(delta_1); 6268 focusOnDay(getFirstAvailableDay(1), 0); 6269 } 6270 } 6271 } 6272 else if (self.hourElement) 6273 self.hourElement.focus(); 6274 break; 6275 case 38: 6276 case 40: 6277 e.preventDefault(); 6278 var delta = e.keyCode === 40 ? 1 : -1; 6279 if ((self.daysContainer && 6280 eventTarget.$i !== undefined) || 6281 eventTarget === self.input || 6282 eventTarget === self.altInput) { 6283 if (e.ctrlKey) { 6284 e.stopPropagation(); 6285 changeYear(self.currentYear - delta); 6286 focusOnDay(getFirstAvailableDay(1), 0); 6287 } 6288 else if (!isTimeObj) 6289 focusOnDay(undefined, delta * 7); 6290 } 6291 else if (eventTarget === self.currentYearElement) { 6292 changeYear(self.currentYear - delta); 6293 } 6294 else if (self.config.enableTime) { 6295 if (!isTimeObj && self.hourElement) 6296 self.hourElement.focus(); 6297 updateTime(e); 6298 self._debouncedChange(); 6299 } 6300 break; 6301 case 9: 6302 if (isTimeObj) { 6303 var elems = [ 6304 self.hourElement, 6305 self.minuteElement, 6306 self.secondElement, 6307 self.amPM, 6308 ] 6309 .concat(self.pluginElements) 6310 .filter(function (x) { return x; }); 6311 var i = elems.indexOf(eventTarget); 6312 if (i !== -1) { 6313 var target = elems[i + (e.shiftKey ? -1 : 1)]; 6314 e.preventDefault(); 6315 (target || self._input).focus(); 6316 } 6317 } 6318 else if (!self.config.noCalendar && 6319 self.daysContainer && 6320 self.daysContainer.contains(eventTarget) && 6321 e.shiftKey) { 6322 e.preventDefault(); 6323 self._input.focus(); 6324 } 6325 break; 6326 default: 6327 break; 6328 } 6329 } 6330 if (self.amPM !== undefined && eventTarget === self.amPM) { 6331 switch (e.key) { 6332 case self.l10n.amPM[0].charAt(0): 6333 case self.l10n.amPM[0].charAt(0).toLowerCase(): 6334 self.amPM.textContent = self.l10n.amPM[0]; 6335 setHoursFromInputs(); 6336 updateValue(); 6337 break; 6338 case self.l10n.amPM[1].charAt(0): 6339 case self.l10n.amPM[1].charAt(0).toLowerCase(): 6340 self.amPM.textContent = self.l10n.amPM[1]; 6341 setHoursFromInputs(); 6342 updateValue(); 6343 break; 6344 } 6345 } 6346 if (isInput || isCalendarElem(eventTarget)) { 6347 triggerEvent("onKeyDown", e); 6348 } 6349 } 6350 function onMouseOver(elem, cellClass) { 6351 if (cellClass === void 0) { cellClass = "flatpickr-day"; } 6352 if (self.selectedDates.length !== 1 || 6353 (elem && 6354 (!elem.classList.contains(cellClass) || 6355 elem.classList.contains("flatpickr-disabled")))) 6356 return; 6357 var hoverDate = elem 6358 ? elem.dateObj.getTime() 6359 : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime()); 6360 var containsDisabled = false; 6361 var minRange = 0, maxRange = 0; 6362 for (var t = rangeStartDate; t < rangeEndDate; t += _utils_dates__WEBPACK_IMPORTED_MODULE_4__.duration.DAY) { 6363 if (!isEnabled(new Date(t), true)) { 6364 containsDisabled = 6365 containsDisabled || (t > rangeStartDate && t < rangeEndDate); 6366 if (t < initialDate && (!minRange || t > minRange)) 6367 minRange = t; 6368 else if (t > initialDate && (!maxRange || t < maxRange)) 6369 maxRange = t; 6370 } 6371 } 6372 var hoverableCells = Array.from(self.rContainer.querySelectorAll("*:nth-child(-n+" + self.config.showMonths + ") > ." + cellClass)); 6373 hoverableCells.forEach(function (dayElem) { 6374 var date = dayElem.dateObj; 6375 var timestamp = date.getTime(); 6376 var outOfRange = (minRange > 0 && timestamp < minRange) || 6377 (maxRange > 0 && timestamp > maxRange); 6378 if (outOfRange) { 6379 dayElem.classList.add("notAllowed"); 6380 ["inRange", "startRange", "endRange"].forEach(function (c) { 6381 dayElem.classList.remove(c); 6382 }); 6383 return; 6384 } 6385 else if (containsDisabled && !outOfRange) 6386 return; 6387 ["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) { 6388 dayElem.classList.remove(c); 6389 }); 6390 if (elem !== undefined) { 6391 elem.classList.add(hoverDate <= self.selectedDates[0].getTime() 6392 ? "startRange" 6393 : "endRange"); 6394 if (initialDate < hoverDate && timestamp === initialDate) 6395 dayElem.classList.add("startRange"); 6396 else if (initialDate > hoverDate && timestamp === initialDate) 6397 dayElem.classList.add("endRange"); 6398 if (timestamp >= minRange && 6399 (maxRange === 0 || timestamp <= maxRange) && 6400 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.isBetween)(timestamp, initialDate, hoverDate)) 6401 dayElem.classList.add("inRange"); 6402 } 6403 }); 6404 } 6405 function onResize() { 6406 if (self.isOpen && !self.config.static && !self.config.inline) 6407 positionCalendar(); 6408 } 6409 function open(e, positionElement) { 6410 if (positionElement === void 0) { positionElement = self._positionElement; } 6411 if (self.isMobile === true) { 6412 if (e) { 6413 e.preventDefault(); 6414 var eventTarget = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 6415 if (eventTarget) { 6416 eventTarget.blur(); 6417 } 6418 } 6419 if (self.mobileInput !== undefined) { 6420 self.mobileInput.focus(); 6421 self.mobileInput.click(); 6422 } 6423 triggerEvent("onOpen"); 6424 return; 6425 } 6426 else if (self._input.disabled || self.config.inline) { 6427 return; 6428 } 6429 var wasOpen = self.isOpen; 6430 self.isOpen = true; 6431 if (!wasOpen) { 6432 self.calendarContainer.classList.add("open"); 6433 self._input.classList.add("active"); 6434 triggerEvent("onOpen"); 6435 positionCalendar(positionElement); 6436 } 6437 if (self.config.enableTime === true && self.config.noCalendar === true) { 6438 if (self.config.allowInput === false && 6439 (e === undefined || 6440 !self.timeContainer.contains(e.relatedTarget))) { 6441 setTimeout(function () { return self.hourElement.select(); }, 50); 6442 } 6443 } 6444 } 6445 function minMaxDateSetter(type) { 6446 return function (date) { 6447 var dateObj = (self.config["_" + type + "Date"] = self.parseDate(date, self.config.dateFormat)); 6448 var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"]; 6449 if (dateObj !== undefined) { 6450 self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] = 6451 dateObj.getHours() > 0 || 6452 dateObj.getMinutes() > 0 || 6453 dateObj.getSeconds() > 0; 6454 } 6455 if (self.selectedDates) { 6456 self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); }); 6457 if (!self.selectedDates.length && type === "min") 6458 setHoursFromDate(dateObj); 6459 updateValue(); 6460 } 6461 if (self.daysContainer) { 6462 redraw(); 6463 if (dateObj !== undefined) 6464 self.currentYearElement[type] = dateObj.getFullYear().toString(); 6465 else 6466 self.currentYearElement.removeAttribute(type); 6467 self.currentYearElement.disabled = 6468 !!inverseDateObj && 6469 dateObj !== undefined && 6470 inverseDateObj.getFullYear() === dateObj.getFullYear(); 6471 } 6472 }; 6473 } 6474 function parseConfig() { 6475 var boolOpts = [ 6476 "wrap", 6477 "weekNumbers", 6478 "allowInput", 6479 "allowInvalidPreload", 6480 "clickOpens", 6481 "time_24hr", 6482 "enableTime", 6483 "noCalendar", 6484 "altInput", 6485 "shorthandCurrentMonth", 6486 "inline", 6487 "static", 6488 "enableSeconds", 6489 "disableMobile", 6490 ]; 6491 var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig); 6492 var formats = {}; 6493 self.config.parseDate = userConfig.parseDate; 6494 self.config.formatDate = userConfig.formatDate; 6495 Object.defineProperty(self.config, "enable", { 6496 get: function () { return self.config._enable; }, 6497 set: function (dates) { 6498 self.config._enable = parseDateRules(dates); 6499 }, 6500 }); 6501 Object.defineProperty(self.config, "disable", { 6502 get: function () { return self.config._disable; }, 6503 set: function (dates) { 6504 self.config._disable = parseDateRules(dates); 6505 }, 6506 }); 6507 var timeMode = userConfig.mode === "time"; 6508 if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) { 6509 var defaultDateFormat = flatpickr.defaultConfig.dateFormat || _types_options__WEBPACK_IMPORTED_MODULE_0__.defaults.dateFormat; 6510 formats.dateFormat = 6511 userConfig.noCalendar || timeMode 6512 ? "H:i" + (userConfig.enableSeconds ? ":S" : "") 6513 : defaultDateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : ""); 6514 } 6515 if (userConfig.altInput && 6516 (userConfig.enableTime || timeMode) && 6517 !userConfig.altFormat) { 6518 var defaultAltFormat = flatpickr.defaultConfig.altFormat || _types_options__WEBPACK_IMPORTED_MODULE_0__.defaults.altFormat; 6519 formats.altFormat = 6520 userConfig.noCalendar || timeMode 6521 ? "h:i" + (userConfig.enableSeconds ? ":S K" : " K") 6522 : defaultAltFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K"); 6523 } 6524 Object.defineProperty(self.config, "minDate", { 6525 get: function () { return self.config._minDate; }, 6526 set: minMaxDateSetter("min"), 6527 }); 6528 Object.defineProperty(self.config, "maxDate", { 6529 get: function () { return self.config._maxDate; }, 6530 set: minMaxDateSetter("max"), 6531 }); 6532 var minMaxTimeSetter = function (type) { return function (val) { 6533 self.config[type === "min" ? "_minTime" : "_maxTime"] = self.parseDate(val, "H:i:S"); 6534 }; }; 6535 Object.defineProperty(self.config, "minTime", { 6536 get: function () { return self.config._minTime; }, 6537 set: minMaxTimeSetter("min"), 6538 }); 6539 Object.defineProperty(self.config, "maxTime", { 6540 get: function () { return self.config._maxTime; }, 6541 set: minMaxTimeSetter("max"), 6542 }); 6543 if (userConfig.mode === "time") { 6544 self.config.noCalendar = true; 6545 self.config.enableTime = true; 6546 } 6547 Object.assign(self.config, formats, userConfig); 6548 for (var i = 0; i < boolOpts.length; i++) 6549 self.config[boolOpts[i]] = 6550 self.config[boolOpts[i]] === true || 6551 self.config[boolOpts[i]] === "true"; 6552 _types_options__WEBPACK_IMPORTED_MODULE_0__.HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) { 6553 self.config[hook] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.arrayify)(self.config[hook] || []).map(bindToInstance); 6554 }); 6555 self.isMobile = 6556 !self.config.disableMobile && 6557 !self.config.inline && 6558 self.config.mode === "single" && 6559 !self.config.disable.length && 6560 !self.config.enable && 6561 !self.config.weekNumbers && 6562 /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 6563 for (var i = 0; i < self.config.plugins.length; i++) { 6564 var pluginConf = self.config.plugins[i](self) || {}; 6565 for (var key in pluginConf) { 6566 if (_types_options__WEBPACK_IMPORTED_MODULE_0__.HOOKS.indexOf(key) > -1) { 6567 self.config[key] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.arrayify)(pluginConf[key]) 6568 .map(bindToInstance) 6569 .concat(self.config[key]); 6570 } 6571 else if (typeof userConfig[key] === "undefined") 6572 self.config[key] = pluginConf[key]; 6573 } 6574 } 6575 if (!userConfig.altInputClass) { 6576 self.config.altInputClass = 6577 getInputElem().className + " " + self.config.altInputClass; 6578 } 6579 triggerEvent("onParseConfig"); 6580 } 6581 function getInputElem() { 6582 return self.config.wrap 6583 ? element.querySelector("[data-input]") 6584 : element; 6585 } 6586 function setupLocale() { 6587 if (typeof self.config.locale !== "object" && 6588 typeof flatpickr.l10ns[self.config.locale] === "undefined") 6589 self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale)); 6590 self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === "object" 6591 ? self.config.locale 6592 : self.config.locale !== "default" 6593 ? flatpickr.l10ns[self.config.locale] 6594 : undefined)); 6595 _utils_formatting__WEBPACK_IMPORTED_MODULE_5__.tokenRegex.D = "(" + self.l10n.weekdays.shorthand.join("|") + ")"; 6596 _utils_formatting__WEBPACK_IMPORTED_MODULE_5__.tokenRegex.l = "(" + self.l10n.weekdays.longhand.join("|") + ")"; 6597 _utils_formatting__WEBPACK_IMPORTED_MODULE_5__.tokenRegex.M = "(" + self.l10n.months.shorthand.join("|") + ")"; 6598 _utils_formatting__WEBPACK_IMPORTED_MODULE_5__.tokenRegex.F = "(" + self.l10n.months.longhand.join("|") + ")"; 6599 _utils_formatting__WEBPACK_IMPORTED_MODULE_5__.tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")"; 6600 var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {}))); 6601 if (userConfig.time_24hr === undefined && 6602 flatpickr.defaultConfig.time_24hr === undefined) { 6603 self.config.time_24hr = self.l10n.time_24hr; 6604 } 6605 self.formatDate = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.createDateFormatter)(self); 6606 self.parseDate = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.createDateParser)({ config: self.config, l10n: self.l10n }); 6607 } 6608 function positionCalendar(customPositionElement) { 6609 if (typeof self.config.position === "function") { 6610 return void self.config.position(self, customPositionElement); 6611 } 6612 if (self.calendarContainer === undefined) 6613 return; 6614 triggerEvent("onPreCalendarPosition"); 6615 var positionElement = customPositionElement || self._positionElement; 6616 var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(" "), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === "above" || 6617 (configPosVertical !== "below" && 6618 distanceFromBottom < calendarHeight && 6619 inputBounds.top > calendarHeight); 6620 var top = window.pageYOffset + 6621 inputBounds.top + 6622 (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2); 6623 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "arrowTop", !showOnTop); 6624 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "arrowBottom", showOnTop); 6625 if (self.config.inline) 6626 return; 6627 var left = window.pageXOffset + inputBounds.left; 6628 var isCenter = false; 6629 var isRight = false; 6630 if (configPosHorizontal === "center") { 6631 left -= (calendarWidth - inputBounds.width) / 2; 6632 isCenter = true; 6633 } 6634 else if (configPosHorizontal === "right") { 6635 left -= calendarWidth - inputBounds.width; 6636 isRight = true; 6637 } 6638 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "arrowLeft", !isCenter && !isRight); 6639 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "arrowCenter", isCenter); 6640 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "arrowRight", isRight); 6641 var right = window.document.body.offsetWidth - 6642 (window.pageXOffset + inputBounds.right); 6643 var rightMost = left + calendarWidth > window.document.body.offsetWidth; 6644 var centerMost = right + calendarWidth > window.document.body.offsetWidth; 6645 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "rightMost", rightMost); 6646 if (self.config.static) 6647 return; 6648 self.calendarContainer.style.top = top + "px"; 6649 if (!rightMost) { 6650 self.calendarContainer.style.left = left + "px"; 6651 self.calendarContainer.style.right = "auto"; 6652 } 6653 else if (!centerMost) { 6654 self.calendarContainer.style.left = "auto"; 6655 self.calendarContainer.style.right = right + "px"; 6656 } 6657 else { 6658 var doc = getDocumentStyleSheet(); 6659 if (doc === undefined) 6660 return; 6661 var bodyWidth = window.document.body.offsetWidth; 6662 var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2); 6663 var centerBefore = ".flatpickr-calendar.centerMost:before"; 6664 var centerAfter = ".flatpickr-calendar.centerMost:after"; 6665 var centerIndex = doc.cssRules.length; 6666 var centerStyle = "{left:" + inputBounds.left + "px;right:auto;}"; 6667 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "rightMost", false); 6668 (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.toggleClass)(self.calendarContainer, "centerMost", true); 6669 doc.insertRule(centerBefore + "," + centerAfter + centerStyle, centerIndex); 6670 self.calendarContainer.style.left = centerLeft + "px"; 6671 self.calendarContainer.style.right = "auto"; 6672 } 6673 } 6674 function getDocumentStyleSheet() { 6675 var editableSheet = null; 6676 for (var i = 0; i < document.styleSheets.length; i++) { 6677 var sheet = document.styleSheets[i]; 6678 if (!sheet.cssRules) 6679 continue; 6680 try { 6681 sheet.cssRules; 6682 } 6683 catch (err) { 6684 continue; 6685 } 6686 editableSheet = sheet; 6687 break; 6688 } 6689 return editableSheet != null ? editableSheet : createStyleSheet(); 6690 } 6691 function createStyleSheet() { 6692 var style = document.createElement("style"); 6693 document.head.appendChild(style); 6694 return style.sheet; 6695 } 6696 function redraw() { 6697 if (self.config.noCalendar || self.isMobile) 6698 return; 6699 buildMonthSwitch(); 6700 updateNavigationCurrentMonth(); 6701 buildDays(); 6702 } 6703 function focusAndClose() { 6704 self._input.focus(); 6705 if (window.navigator.userAgent.indexOf("MSIE") !== -1 || 6706 navigator.msMaxTouchPoints !== undefined) { 6707 setTimeout(self.close, 0); 6708 } 6709 else { 6710 self.close(); 6711 } 6712 } 6713 function selectDate(e) { 6714 e.preventDefault(); 6715 e.stopPropagation(); 6716 var isSelectable = function (day) { 6717 return day.classList && 6718 day.classList.contains("flatpickr-day") && 6719 !day.classList.contains("flatpickr-disabled") && 6720 !day.classList.contains("notAllowed"); 6721 }; 6722 var t = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.findParent)((0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e), isSelectable); 6723 if (t === undefined) 6724 return; 6725 var target = t; 6726 var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime())); 6727 var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth || 6728 selectedDate.getMonth() > 6729 self.currentMonth + self.config.showMonths - 1) && 6730 self.config.mode !== "range"; 6731 self.selectedDateElem = target; 6732 if (self.config.mode === "single") 6733 self.selectedDates = [selectedDate]; 6734 else if (self.config.mode === "multiple") { 6735 var selectedIndex = isDateSelected(selectedDate); 6736 if (selectedIndex) 6737 self.selectedDates.splice(parseInt(selectedIndex), 1); 6738 else 6739 self.selectedDates.push(selectedDate); 6740 } 6741 else if (self.config.mode === "range") { 6742 if (self.selectedDates.length === 2) { 6743 self.clear(false, false); 6744 } 6745 self.latestSelectedDateObj = selectedDate; 6746 self.selectedDates.push(selectedDate); 6747 if ((0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(selectedDate, self.selectedDates[0], true) !== 0) 6748 self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); }); 6749 } 6750 setHoursFromInputs(); 6751 if (shouldChangeMonth) { 6752 var isNewYear = self.currentYear !== selectedDate.getFullYear(); 6753 self.currentYear = selectedDate.getFullYear(); 6754 self.currentMonth = selectedDate.getMonth(); 6755 if (isNewYear) { 6756 triggerEvent("onYearChange"); 6757 buildMonthSwitch(); 6758 } 6759 triggerEvent("onMonthChange"); 6760 } 6761 updateNavigationCurrentMonth(); 6762 buildDays(); 6763 updateValue(); 6764 if (!shouldChangeMonth && 6765 self.config.mode !== "range" && 6766 self.config.showMonths === 1) 6767 focusOnDayElem(target); 6768 else if (self.selectedDateElem !== undefined && 6769 self.hourElement === undefined) { 6770 self.selectedDateElem && self.selectedDateElem.focus(); 6771 } 6772 if (self.hourElement !== undefined) 6773 self.hourElement !== undefined && self.hourElement.focus(); 6774 if (self.config.closeOnSelect) { 6775 var single = self.config.mode === "single" && !self.config.enableTime; 6776 var range = self.config.mode === "range" && 6777 self.selectedDates.length === 2 && 6778 !self.config.enableTime; 6779 if (single || range) { 6780 focusAndClose(); 6781 } 6782 } 6783 triggerChange(); 6784 } 6785 var CALLBACKS = { 6786 locale: [setupLocale, updateWeekdays], 6787 showMonths: [buildMonths, setCalendarWidth, buildWeekdays], 6788 minDate: [jumpToDate], 6789 maxDate: [jumpToDate], 6790 positionElement: [updatePositionElement], 6791 clickOpens: [ 6792 function () { 6793 if (self.config.clickOpens === true) { 6794 bind(self._input, "focus", self.open); 6795 bind(self._input, "click", self.open); 6796 } 6797 else { 6798 self._input.removeEventListener("focus", self.open); 6799 self._input.removeEventListener("click", self.open); 6800 } 6801 }, 6802 ], 6803 }; 6804 function set(option, value) { 6805 if (option !== null && typeof option === "object") { 6806 Object.assign(self.config, option); 6807 for (var key in option) { 6808 if (CALLBACKS[key] !== undefined) 6809 CALLBACKS[key].forEach(function (x) { return x(); }); 6810 } 6811 } 6812 else { 6813 self.config[option] = value; 6814 if (CALLBACKS[option] !== undefined) 6815 CALLBACKS[option].forEach(function (x) { return x(); }); 6816 else if (_types_options__WEBPACK_IMPORTED_MODULE_0__.HOOKS.indexOf(option) > -1) 6817 self.config[option] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.arrayify)(value); 6818 } 6819 self.redraw(); 6820 updateValue(true); 6821 } 6822 function setSelectedDate(inputDate, format) { 6823 var dates = []; 6824 if (inputDate instanceof Array) 6825 dates = inputDate.map(function (d) { return self.parseDate(d, format); }); 6826 else if (inputDate instanceof Date || typeof inputDate === "number") 6827 dates = [self.parseDate(inputDate, format)]; 6828 else if (typeof inputDate === "string") { 6829 switch (self.config.mode) { 6830 case "single": 6831 case "time": 6832 dates = [self.parseDate(inputDate, format)]; 6833 break; 6834 case "multiple": 6835 dates = inputDate 6836 .split(self.config.conjunction) 6837 .map(function (date) { return self.parseDate(date, format); }); 6838 break; 6839 case "range": 6840 dates = inputDate 6841 .split(self.l10n.rangeSeparator) 6842 .map(function (date) { return self.parseDate(date, format); }); 6843 break; 6844 default: 6845 break; 6846 } 6847 } 6848 else 6849 self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate))); 6850 self.selectedDates = (self.config.allowInvalidPreload 6851 ? dates 6852 : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); })); 6853 if (self.config.mode === "range") 6854 self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); }); 6855 } 6856 function setDate(date, triggerChange, format) { 6857 if (triggerChange === void 0) { triggerChange = false; } 6858 if (format === void 0) { format = self.config.dateFormat; } 6859 if ((date !== 0 && !date) || (date instanceof Array && date.length === 0)) 6860 return self.clear(triggerChange); 6861 setSelectedDate(date, format); 6862 self.latestSelectedDateObj = 6863 self.selectedDates[self.selectedDates.length - 1]; 6864 self.redraw(); 6865 jumpToDate(undefined, triggerChange); 6866 setHoursFromDate(); 6867 if (self.selectedDates.length === 0) { 6868 self.clear(false); 6869 } 6870 updateValue(triggerChange); 6871 if (triggerChange) 6872 triggerEvent("onChange"); 6873 } 6874 function parseDateRules(arr) { 6875 return arr 6876 .slice() 6877 .map(function (rule) { 6878 if (typeof rule === "string" || 6879 typeof rule === "number" || 6880 rule instanceof Date) { 6881 return self.parseDate(rule, undefined, true); 6882 } 6883 else if (rule && 6884 typeof rule === "object" && 6885 rule.from && 6886 rule.to) 6887 return { 6888 from: self.parseDate(rule.from, undefined), 6889 to: self.parseDate(rule.to, undefined), 6890 }; 6891 return rule; 6892 }) 6893 .filter(function (x) { return x; }); 6894 } 6895 function setupDates() { 6896 self.selectedDates = []; 6897 self.now = self.parseDate(self.config.now) || new Date(); 6898 var preloadedDate = self.config.defaultDate || 6899 ((self.input.nodeName === "INPUT" || 6900 self.input.nodeName === "TEXTAREA") && 6901 self.input.placeholder && 6902 self.input.value === self.input.placeholder 6903 ? null 6904 : self.input.value); 6905 if (preloadedDate) 6906 setSelectedDate(preloadedDate, self.config.dateFormat); 6907 self._initialDate = 6908 self.selectedDates.length > 0 6909 ? self.selectedDates[0] 6910 : self.config.minDate && 6911 self.config.minDate.getTime() > self.now.getTime() 6912 ? self.config.minDate 6913 : self.config.maxDate && 6914 self.config.maxDate.getTime() < self.now.getTime() 6915 ? self.config.maxDate 6916 : self.now; 6917 self.currentYear = self._initialDate.getFullYear(); 6918 self.currentMonth = self._initialDate.getMonth(); 6919 if (self.selectedDates.length > 0) 6920 self.latestSelectedDateObj = self.selectedDates[0]; 6921 if (self.config.minTime !== undefined) 6922 self.config.minTime = self.parseDate(self.config.minTime, "H:i"); 6923 if (self.config.maxTime !== undefined) 6924 self.config.maxTime = self.parseDate(self.config.maxTime, "H:i"); 6925 self.minDateHasTime = 6926 !!self.config.minDate && 6927 (self.config.minDate.getHours() > 0 || 6928 self.config.minDate.getMinutes() > 0 || 6929 self.config.minDate.getSeconds() > 0); 6930 self.maxDateHasTime = 6931 !!self.config.maxDate && 6932 (self.config.maxDate.getHours() > 0 || 6933 self.config.maxDate.getMinutes() > 0 || 6934 self.config.maxDate.getSeconds() > 0); 6935 } 6936 function setupInputs() { 6937 self.input = getInputElem(); 6938 if (!self.input) { 6939 self.config.errorHandler(new Error("Invalid input element specified")); 6940 return; 6941 } 6942 self.input._type = self.input.type; 6943 self.input.type = "text"; 6944 self.input.classList.add("flatpickr-input"); 6945 self._input = self.input; 6946 if (self.config.altInput) { 6947 self.altInput = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)(self.input.nodeName, self.config.altInputClass); 6948 self._input = self.altInput; 6949 self.altInput.placeholder = self.input.placeholder; 6950 self.altInput.disabled = self.input.disabled; 6951 self.altInput.required = self.input.required; 6952 self.altInput.tabIndex = self.input.tabIndex; 6953 self.altInput.type = "text"; 6954 self.input.setAttribute("type", "hidden"); 6955 if (!self.config.static && self.input.parentNode) 6956 self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling); 6957 } 6958 if (!self.config.allowInput) 6959 self._input.setAttribute("readonly", "readonly"); 6960 updatePositionElement(); 6961 } 6962 function updatePositionElement() { 6963 self._positionElement = self.config.positionElement || self._input; 6964 } 6965 function setupMobile() { 6966 var inputType = self.config.enableTime 6967 ? self.config.noCalendar 6968 ? "time" 6969 : "datetime-local" 6970 : "date"; 6971 self.mobileInput = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.createElement)("input", self.input.className + " flatpickr-mobile"); 6972 self.mobileInput.tabIndex = 1; 6973 self.mobileInput.type = inputType; 6974 self.mobileInput.disabled = self.input.disabled; 6975 self.mobileInput.required = self.input.required; 6976 self.mobileInput.placeholder = self.input.placeholder; 6977 self.mobileFormatStr = 6978 inputType === "datetime-local" 6979 ? "Y-m-d\\TH:i:S" 6980 : inputType === "date" 6981 ? "Y-m-d" 6982 : "H:i:S"; 6983 if (self.selectedDates.length > 0) { 6984 self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr); 6985 } 6986 if (self.config.minDate) 6987 self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d"); 6988 if (self.config.maxDate) 6989 self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d"); 6990 if (self.input.getAttribute("step")) 6991 self.mobileInput.step = String(self.input.getAttribute("step")); 6992 self.input.type = "hidden"; 6993 if (self.altInput !== undefined) 6994 self.altInput.type = "hidden"; 6995 try { 6996 if (self.input.parentNode) 6997 self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling); 6998 } 6999 catch (_a) { } 7000 bind(self.mobileInput, "change", function (e) { 7001 self.setDate((0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e).value, false, self.mobileFormatStr); 7002 triggerEvent("onChange"); 7003 triggerEvent("onClose"); 7004 }); 7005 } 7006 function toggle(e) { 7007 if (self.isOpen === true) 7008 return self.close(); 7009 self.open(e); 7010 } 7011 function triggerEvent(event, data) { 7012 if (self.config === undefined) 7013 return; 7014 var hooks = self.config[event]; 7015 if (hooks !== undefined && hooks.length > 0) { 7016 for (var i = 0; hooks[i] && i < hooks.length; i++) 7017 hooks[i](self.selectedDates, self.input.value, self, data); 7018 } 7019 if (event === "onChange") { 7020 self.input.dispatchEvent(createEvent("change")); 7021 self.input.dispatchEvent(createEvent("input")); 7022 } 7023 } 7024 function createEvent(name) { 7025 var e = document.createEvent("Event"); 7026 e.initEvent(name, true, true); 7027 return e; 7028 } 7029 function isDateSelected(date) { 7030 for (var i = 0; i < self.selectedDates.length; i++) { 7031 var selectedDate = self.selectedDates[i]; 7032 if (selectedDate instanceof Date && 7033 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(selectedDate, date) === 0) 7034 return "" + i; 7035 } 7036 return false; 7037 } 7038 function isDateInRange(date) { 7039 if (self.config.mode !== "range" || self.selectedDates.length < 2) 7040 return false; 7041 return ((0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(date, self.selectedDates[0]) >= 0 && 7042 (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates)(date, self.selectedDates[1]) <= 0); 7043 } 7044 function updateNavigationCurrentMonth() { 7045 if (self.config.noCalendar || self.isMobile || !self.monthNav) 7046 return; 7047 self.yearElements.forEach(function (yearElement, i) { 7048 var d = new Date(self.currentYear, self.currentMonth, 1); 7049 d.setMonth(self.currentMonth + i); 7050 if (self.config.showMonths > 1 || 7051 self.config.monthSelectorType === "static") { 7052 self.monthElements[i].textContent = 7053 (0,_utils_formatting__WEBPACK_IMPORTED_MODULE_5__.monthToStr)(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + " "; 7054 } 7055 else { 7056 self.monthsDropdownContainer.value = d.getMonth().toString(); 7057 } 7058 yearElement.value = d.getFullYear().toString(); 7059 }); 7060 self._hidePrevMonthArrow = 7061 self.config.minDate !== undefined && 7062 (self.currentYear === self.config.minDate.getFullYear() 7063 ? self.currentMonth <= self.config.minDate.getMonth() 7064 : self.currentYear < self.config.minDate.getFullYear()); 7065 self._hideNextMonthArrow = 7066 self.config.maxDate !== undefined && 7067 (self.currentYear === self.config.maxDate.getFullYear() 7068 ? self.currentMonth + 1 > self.config.maxDate.getMonth() 7069 : self.currentYear > self.config.maxDate.getFullYear()); 7070 } 7071 function getDateStr(specificFormat) { 7072 var format = specificFormat || 7073 (self.config.altInput ? self.config.altFormat : self.config.dateFormat); 7074 return self.selectedDates 7075 .map(function (dObj) { return self.formatDate(dObj, format); }) 7076 .filter(function (d, i, arr) { 7077 return self.config.mode !== "range" || 7078 self.config.enableTime || 7079 arr.indexOf(d) === i; 7080 }) 7081 .join(self.config.mode !== "range" 7082 ? self.config.conjunction 7083 : self.l10n.rangeSeparator); 7084 } 7085 function updateValue(triggerChange) { 7086 if (triggerChange === void 0) { triggerChange = true; } 7087 if (self.mobileInput !== undefined && self.mobileFormatStr) { 7088 self.mobileInput.value = 7089 self.latestSelectedDateObj !== undefined 7090 ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) 7091 : ""; 7092 } 7093 self.input.value = getDateStr(self.config.dateFormat); 7094 if (self.altInput !== undefined) { 7095 self.altInput.value = getDateStr(self.config.altFormat); 7096 } 7097 if (triggerChange !== false) 7098 triggerEvent("onValueUpdate"); 7099 } 7100 function onMonthNavClick(e) { 7101 var eventTarget = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e); 7102 var isPrevMonth = self.prevMonthNav.contains(eventTarget); 7103 var isNextMonth = self.nextMonthNav.contains(eventTarget); 7104 if (isPrevMonth || isNextMonth) { 7105 changeMonth(isPrevMonth ? -1 : 1); 7106 } 7107 else if (self.yearElements.indexOf(eventTarget) >= 0) { 7108 eventTarget.select(); 7109 } 7110 else if (eventTarget.classList.contains("arrowUp")) { 7111 self.changeYear(self.currentYear + 1); 7112 } 7113 else if (eventTarget.classList.contains("arrowDown")) { 7114 self.changeYear(self.currentYear - 1); 7115 } 7116 } 7117 function timeWrapper(e) { 7118 e.preventDefault(); 7119 var isKeyDown = e.type === "keydown", eventTarget = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getEventTarget)(e), input = eventTarget; 7120 if (self.amPM !== undefined && eventTarget === self.amPM) { 7121 self.amPM.textContent = 7122 self.l10n.amPM[(0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(self.amPM.textContent === self.l10n.amPM[0])]; 7123 } 7124 var min = parseFloat(input.getAttribute("min")), max = parseFloat(input.getAttribute("max")), step = parseFloat(input.getAttribute("step")), curValue = parseInt(input.value, 10), delta = e.delta || 7125 (isKeyDown ? (e.which === 38 ? 1 : -1) : 0); 7126 var newValue = curValue + step * delta; 7127 if (typeof input.value !== "undefined" && input.value.length === 2) { 7128 var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement; 7129 if (newValue < min) { 7130 newValue = 7131 max + 7132 newValue + 7133 (0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(!isHourElem) + 7134 ((0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(isHourElem) && (0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(!self.amPM)); 7135 if (isMinuteElem) 7136 incrementNumInput(undefined, -1, self.hourElement); 7137 } 7138 else if (newValue > max) { 7139 newValue = 7140 input === self.hourElement ? newValue - max - (0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(!self.amPM) : min; 7141 if (isMinuteElem) 7142 incrementNumInput(undefined, 1, self.hourElement); 7143 } 7144 if (self.amPM && 7145 isHourElem && 7146 (step === 1 7147 ? newValue + curValue === 23 7148 : Math.abs(newValue - curValue) > step)) { 7149 self.amPM.textContent = 7150 self.l10n.amPM[(0,_utils__WEBPACK_IMPORTED_MODULE_2__.int)(self.amPM.textContent === self.l10n.amPM[0])]; 7151 } 7152 input.value = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.pad)(newValue); 7153 } 7154 } 7155 init(); 7156 return self; 7157} 7158function _flatpickr(nodeList, config) { 7159 var nodes = Array.prototype.slice 7160 .call(nodeList) 7161 .filter(function (x) { return x instanceof HTMLElement; }); 7162 var instances = []; 7163 for (var i = 0; i < nodes.length; i++) { 7164 var node = nodes[i]; 7165 try { 7166 if (node.getAttribute("data-fp-omit") !== null) 7167 continue; 7168 if (node._flatpickr !== undefined) { 7169 node._flatpickr.destroy(); 7170 node._flatpickr = undefined; 7171 } 7172 node._flatpickr = FlatpickrInstance(node, config || {}); 7173 instances.push(node._flatpickr); 7174 } 7175 catch (e) { 7176 console.error(e); 7177 } 7178 } 7179 return instances.length === 1 ? instances[0] : instances; 7180} 7181if (typeof HTMLElement !== "undefined" && 7182 typeof HTMLCollection !== "undefined" && 7183 typeof NodeList !== "undefined") { 7184 HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) { 7185 return _flatpickr(this, config); 7186 }; 7187 HTMLElement.prototype.flatpickr = function (config) { 7188 return _flatpickr([this], config); 7189 }; 7190} 7191var flatpickr = function (selector, config) { 7192 if (typeof selector === "string") { 7193 return _flatpickr(window.document.querySelectorAll(selector), config); 7194 } 7195 else if (selector instanceof Node) { 7196 return _flatpickr([selector], config); 7197 } 7198 else { 7199 return _flatpickr(selector, config); 7200 } 7201}; 7202flatpickr.defaultConfig = {}; 7203flatpickr.l10ns = { 7204 en: __assign({}, _l10n_default__WEBPACK_IMPORTED_MODULE_1__["default"]), 7205 default: __assign({}, _l10n_default__WEBPACK_IMPORTED_MODULE_1__["default"]), 7206}; 7207flatpickr.localize = function (l10n) { 7208 flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n); 7209}; 7210flatpickr.setDefaults = function (config) { 7211 flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config); 7212}; 7213flatpickr.parseDate = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.createDateParser)({}); 7214flatpickr.formatDate = (0,_utils_dates__WEBPACK_IMPORTED_MODULE_4__.createDateFormatter)({}); 7215flatpickr.compareDates = _utils_dates__WEBPACK_IMPORTED_MODULE_4__.compareDates; 7216if (typeof jQuery !== "undefined" && typeof jQuery.fn !== "undefined") { 7217 jQuery.fn.flatpickr = function (config) { 7218 return _flatpickr(this, config); 7219 }; 7220} 7221Date.prototype.fp_incr = function (days) { 7222 return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days)); 7223}; 7224if (typeof window !== "undefined") { 7225 window.flatpickr = flatpickr; 7226} 7227/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatpickr); 7228 7229 7230/***/ }), 7231
vendor: 2,313 bytes, lines 7232-7319
7232/***/ "./node_modules/flatpickr/dist/esm/l10n/default.js": 7233/*!*********************************************************!*\ 7234 !*** ./node_modules/flatpickr/dist/esm/l10n/default.js ***! 7235 \*********************************************************/ 7236/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7237 7238"use strict"; 7239__webpack_require__.r(__webpack_exports__); 7240/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7241/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 7242/* harmony export */ english: () => (/* binding */ english) 7243/* harmony export */ }); 7244var english = { 7245 weekdays: { 7246 shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 7247 longhand: [ 7248 "Sunday", 7249 "Monday", 7250 "Tuesday", 7251 "Wednesday", 7252 "Thursday", 7253 "Friday", 7254 "Saturday", 7255 ], 7256 }, 7257 months: { 7258 shorthand: [ 7259 "Jan", 7260 "Feb", 7261 "Mar", 7262 "Apr", 7263 "May", 7264 "Jun", 7265 "Jul", 7266 "Aug", 7267 "Sep", 7268 "Oct", 7269 "Nov", 7270 "Dec", 7271 ], 7272 longhand: [ 7273 "January", 7274 "February", 7275 "March", 7276 "April", 7277 "May", 7278 "June", 7279 "July", 7280 "August", 7281 "September", 7282 "October", 7283 "November", 7284 "December", 7285 ], 7286 }, 7287 daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], 7288 firstDayOfWeek: 0, 7289 ordinal: function (nth) { 7290 var s = nth % 100; 7291 if (s > 3 && s < 21) 7292 return "th"; 7293 switch (s % 10) { 7294 case 1: 7295 return "st"; 7296 case 2: 7297 return "nd"; 7298 case 3: 7299 return "rd"; 7300 default: 7301 return "th"; 7302 } 7303 }, 7304 rangeSeparator: " to ", 7305 weekAbbreviation: "Wk", 7306 scrollTitle: "Scroll to increment", 7307 toggleTitle: "Click to toggle", 7308 amPM: ["AM", "PM"], 7309 yearAriaLabel: "Year", 7310 monthAriaLabel: "Month", 7311 hourAriaLabel: "Hour", 7312 minuteAriaLabel: "Minute", 7313 time_24hr: false, 7314}; 7315/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (english); 7316 7317 7318/***/ }), 7319
vendor: 3,166 bytes, lines 7320-7418
7320/***/ "./node_modules/flatpickr/dist/esm/types/options.js": 7321/*!**********************************************************!*\ 7322 !*** ./node_modules/flatpickr/dist/esm/types/options.js ***! 7323 \**********************************************************/ 7324/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7325 7326"use strict"; 7327__webpack_require__.r(__webpack_exports__); 7328/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7329/* harmony export */ HOOKS: () => (/* binding */ HOOKS), 7330/* harmony export */ defaults: () => (/* binding */ defaults) 7331/* harmony export */ }); 7332var HOOKS = [ 7333 "onChange", 7334 "onClose", 7335 "onDayCreate", 7336 "onDestroy", 7337 "onKeyDown", 7338 "onMonthChange", 7339 "onOpen", 7340 "onParseConfig", 7341 "onReady", 7342 "onValueUpdate", 7343 "onYearChange", 7344 "onPreCalendarPosition", 7345]; 7346var defaults = { 7347 _disable: [], 7348 allowInput: false, 7349 allowInvalidPreload: false, 7350 altFormat: "F j, Y", 7351 altInput: false, 7352 altInputClass: "form-control input", 7353 animate: typeof window === "object" && 7354 window.navigator.userAgent.indexOf("MSIE") === -1, 7355 ariaDateFormat: "F j, Y", 7356 autoFillDefaultTime: true, 7357 clickOpens: true, 7358 closeOnSelect: true, 7359 conjunction: ", ", 7360 dateFormat: "Y-m-d", 7361 defaultHour: 12, 7362 defaultMinute: 0, 7363 defaultSeconds: 0, 7364 disable: [], 7365 disableMobile: false, 7366 enableSeconds: false, 7367 enableTime: false, 7368 errorHandler: function (err) { 7369 return typeof console !== "undefined" && console.warn(err); 7370 }, 7371 getWeek: function (givenDate) { 7372 var date = new Date(givenDate.getTime()); 7373 date.setHours(0, 0, 0, 0); 7374 date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7)); 7375 var week1 = new Date(date.getFullYear(), 0, 4); 7376 return (1 + 7377 Math.round(((date.getTime() - week1.getTime()) / 86400000 - 7378 3 + 7379 ((week1.getDay() + 6) % 7)) / 7380 7)); 7381 }, 7382 hourIncrement: 1, 7383 ignoredFocusElements: [], 7384 inline: false, 7385 locale: "default", 7386 minuteIncrement: 5, 7387 mode: "single", 7388 monthSelectorType: "dropdown", 7389 nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>", 7390 noCalendar: false, 7391 now: new Date(), 7392 onChange: [], 7393 onClose: [], 7394 onDayCreate: [], 7395 onDestroy: [], 7396 onKeyDown: [], 7397 onMonthChange: [], 7398 onOpen: [], 7399 onParseConfig: [], 7400 onReady: [], 7401 onValueUpdate: [], 7402 onYearChange: [], 7403 onPreCalendarPosition: [], 7404 plugins: [], 7405 position: "auto", 7406 positionElement: undefined, 7407 prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>", 7408 shorthandCurrentMonth: false, 7409 showMonths: 1, 7410 static: false, 7411 time_24hr: false, 7412 weekNumbers: false, 7413 wrap: false, 7414}; 7415 7416 7417/***/ }), 7418
vendor: 7,922 bytes, lines 7419-7587
7419/***/ "./node_modules/flatpickr/dist/esm/utils/dates.js": 7420/*!********************************************************!*\ 7421 !*** ./node_modules/flatpickr/dist/esm/utils/dates.js ***! 7422 \********************************************************/ 7423/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7424 7425"use strict"; 7426__webpack_require__.r(__webpack_exports__); 7427/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7428/* harmony export */ calculateSecondsSinceMidnight: () => (/* binding */ calculateSecondsSinceMidnight), 7429/* harmony export */ compareDates: () => (/* binding */ compareDates), 7430/* harmony export */ compareTimes: () => (/* binding */ compareTimes), 7431/* harmony export */ createDateFormatter: () => (/* binding */ createDateFormatter), 7432/* harmony export */ createDateParser: () => (/* binding */ createDateParser), 7433/* harmony export */ duration: () => (/* binding */ duration), 7434/* harmony export */ getDefaultHours: () => (/* binding */ getDefaultHours), 7435/* harmony export */ isBetween: () => (/* binding */ isBetween), 7436/* harmony export */ parseSeconds: () => (/* binding */ parseSeconds) 7437/* harmony export */ }); 7438/* harmony import */ var _formatting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatting */ "./node_modules/flatpickr/dist/esm/utils/formatting.js"); 7439/* harmony import */ var _types_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/options */ "./node_modules/flatpickr/dist/esm/types/options.js"); 7440/* harmony import */ var _l10n_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../l10n/default */ "./node_modules/flatpickr/dist/esm/l10n/default.js"); 7441 7442 7443 7444var createDateFormatter = function (_a) { 7445 var _b = _a.config, config = _b === void 0 ? _types_options__WEBPACK_IMPORTED_MODULE_1__.defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? _l10n_default__WEBPACK_IMPORTED_MODULE_2__.english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d; 7446 return function (dateObj, frmt, overrideLocale) { 7447 var locale = overrideLocale || l10n; 7448 if (config.formatDate !== undefined && !isMobile) { 7449 return config.formatDate(dateObj, frmt, locale); 7450 } 7451 return frmt 7452 .split("") 7453 .map(function (c, i, arr) { 7454 return _formatting__WEBPACK_IMPORTED_MODULE_0__.formats[c] && arr[i - 1] !== "\\" 7455 ? _formatting__WEBPACK_IMPORTED_MODULE_0__.formats[c](dateObj, locale, config) 7456 : c !== "\\" 7457 ? c 7458 : ""; 7459 }) 7460 .join(""); 7461 }; 7462}; 7463var createDateParser = function (_a) { 7464 var _b = _a.config, config = _b === void 0 ? _types_options__WEBPACK_IMPORTED_MODULE_1__.defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? _l10n_default__WEBPACK_IMPORTED_MODULE_2__.english : _c; 7465 return function (date, givenFormat, timeless, customLocale) { 7466 if (date !== 0 && !date) 7467 return undefined; 7468 var locale = customLocale || l10n; 7469 var parsedDate; 7470 var dateOrig = date; 7471 if (date instanceof Date) 7472 parsedDate = new Date(date.getTime()); 7473 else if (typeof date !== "string" && 7474 date.toFixed !== undefined) 7475 parsedDate = new Date(date); 7476 else if (typeof date === "string") { 7477 var format = givenFormat || (config || _types_options__WEBPACK_IMPORTED_MODULE_1__.defaults).dateFormat; 7478 var datestr = String(date).trim(); 7479 if (datestr === "today") { 7480 parsedDate = new Date(); 7481 timeless = true; 7482 } 7483 else if (config && config.parseDate) { 7484 parsedDate = config.parseDate(date, format); 7485 } 7486 else if (/Z$/.test(datestr) || 7487 /GMT$/.test(datestr)) { 7488 parsedDate = new Date(date); 7489 } 7490 else { 7491 var matched = void 0, ops = []; 7492 for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) { 7493 var token = format[i]; 7494 var isBackSlash = token === "\\"; 7495 var escaped = format[i - 1] === "\\" || isBackSlash; 7496 if (_formatting__WEBPACK_IMPORTED_MODULE_0__.tokenRegex[token] && !escaped) { 7497 regexStr += _formatting__WEBPACK_IMPORTED_MODULE_0__.tokenRegex[token]; 7498 var match = new RegExp(regexStr).exec(date); 7499 if (match && (matched = true)) { 7500 ops[token !== "Y" ? "push" : "unshift"]({ 7501 fn: _formatting__WEBPACK_IMPORTED_MODULE_0__.revFormat[token], 7502 val: match[++matchIndex], 7503 }); 7504 } 7505 } 7506 else if (!isBackSlash) 7507 regexStr += "."; 7508 } 7509 parsedDate = 7510 !config || !config.noCalendar 7511 ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) 7512 : new Date(new Date().setHours(0, 0, 0, 0)); 7513 ops.forEach(function (_a) { 7514 var fn = _a.fn, val = _a.val; 7515 return (parsedDate = fn(parsedDate, val, locale) || parsedDate); 7516 }); 7517 parsedDate = matched ? parsedDate : undefined; 7518 } 7519 } 7520 if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) { 7521 config.errorHandler(new Error("Invalid date provided: " + dateOrig)); 7522 return undefined; 7523 } 7524 if (timeless === true) 7525 parsedDate.setHours(0, 0, 0, 0); 7526 return parsedDate; 7527 }; 7528}; 7529function compareDates(date1, date2, timeless) { 7530 if (timeless === void 0) { timeless = true; } 7531 if (timeless !== false) { 7532 return (new Date(date1.getTime()).setHours(0, 0, 0, 0) - 7533 new Date(date2.getTime()).setHours(0, 0, 0, 0)); 7534 } 7535 return date1.getTime() - date2.getTime(); 7536} 7537function compareTimes(date1, date2) { 7538 return (3600 * (date1.getHours() - date2.getHours()) + 7539 60 * (date1.getMinutes() - date2.getMinutes()) + 7540 date1.getSeconds() - 7541 date2.getSeconds()); 7542} 7543var isBetween = function (ts, ts1, ts2) { 7544 return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2); 7545}; 7546var calculateSecondsSinceMidnight = function (hours, minutes, seconds) { 7547 return hours * 3600 + minutes * 60 + seconds; 7548}; 7549var parseSeconds = function (secondsSinceMidnight) { 7550 var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60; 7551 return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60]; 7552}; 7553var duration = { 7554 DAY: 86400000, 7555}; 7556function getDefaultHours(config) { 7557 var hours = config.defaultHour; 7558 var minutes = config.defaultMinute; 7559 var seconds = config.defaultSeconds; 7560 if (config.minDate !== undefined) { 7561 var minHour = config.minDate.getHours(); 7562 var minMinutes = config.minDate.getMinutes(); 7563 var minSeconds = config.minDate.getSeconds(); 7564 if (hours < minHour) { 7565 hours = minHour; 7566 } 7567 if (hours === minHour && minutes < minMinutes) { 7568 minutes = minMinutes; 7569 } 7570 if (hours === minHour && minutes === minMinutes && seconds < minSeconds) 7571 seconds = config.minDate.getSeconds(); 7572 } 7573 if (config.maxDate !== undefined) { 7574 var maxHr = config.maxDate.getHours(); 7575 var maxMinutes = config.maxDate.getMinutes(); 7576 hours = Math.min(hours, maxHr); 7577 if (hours === maxHr) 7578 minutes = Math.min(maxMinutes, minutes); 7579 if (hours === maxHr && minutes === maxMinutes) 7580 seconds = config.maxDate.getSeconds(); 7581 } 7582 return { hours: hours, minutes: minutes, seconds: seconds }; 7583} 7584 7585 7586/***/ }), 7587
vendor: 2,596 bytes, lines 7588-7661
7588/***/ "./node_modules/flatpickr/dist/esm/utils/dom.js": 7589/*!******************************************************!*\ 7590 !*** ./node_modules/flatpickr/dist/esm/utils/dom.js ***! 7591 \******************************************************/ 7592/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7593 7594"use strict"; 7595__webpack_require__.r(__webpack_exports__); 7596/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7597/* harmony export */ clearNode: () => (/* binding */ clearNode), 7598/* harmony export */ createElement: () => (/* binding */ createElement), 7599/* harmony export */ createNumberInput: () => (/* binding */ createNumberInput), 7600/* harmony export */ findParent: () => (/* binding */ findParent), 7601/* harmony export */ getEventTarget: () => (/* binding */ getEventTarget), 7602/* harmony export */ toggleClass: () => (/* binding */ toggleClass) 7603/* harmony export */ }); 7604function toggleClass(elem, className, bool) { 7605 if (bool === true) 7606 return elem.classList.add(className); 7607 elem.classList.remove(className); 7608} 7609function createElement(tag, className, content) { 7610 var e = window.document.createElement(tag); 7611 className = className || ""; 7612 content = content || ""; 7613 e.className = className; 7614 if (content !== undefined) 7615 e.textContent = content; 7616 return e; 7617} 7618function clearNode(node) { 7619 while (node.firstChild) 7620 node.removeChild(node.firstChild); 7621} 7622function findParent(node, condition) { 7623 if (condition(node)) 7624 return node; 7625 else if (node.parentNode) 7626 return findParent(node.parentNode, condition); 7627 return undefined; 7628} 7629function createNumberInput(inputClassName, opts) { 7630 var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown"); 7631 if (navigator.userAgent.indexOf("MSIE 9.0") === -1) { 7632 numInput.type = "number"; 7633 } 7634 else { 7635 numInput.type = "text"; 7636 numInput.pattern = "\\d*"; 7637 } 7638 if (opts !== undefined) 7639 for (var key in opts) 7640 numInput.setAttribute(key, opts[key]); 7641 wrapper.appendChild(numInput); 7642 wrapper.appendChild(arrowUp); 7643 wrapper.appendChild(arrowDown); 7644 return wrapper; 7645} 7646function getEventTarget(event) { 7647 try { 7648 if (typeof event.composedPath === "function") { 7649 var path = event.composedPath(); 7650 return path[0]; 7651 } 7652 return event.target; 7653 } 7654 catch (error) { 7655 return event.target; 7656 } 7657} 7658 7659 7660/***/ }), 7661
vendor: 5,990 bytes, lines 7662-7814
7662/***/ "./node_modules/flatpickr/dist/esm/utils/formatting.js": 7663/*!*************************************************************!*\ 7664 !*** ./node_modules/flatpickr/dist/esm/utils/formatting.js ***! 7665 \*************************************************************/ 7666/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7667 7668"use strict"; 7669__webpack_require__.r(__webpack_exports__); 7670/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7671/* harmony export */ formats: () => (/* binding */ formats), 7672/* harmony export */ monthToStr: () => (/* binding */ monthToStr), 7673/* harmony export */ revFormat: () => (/* binding */ revFormat), 7674/* harmony export */ tokenRegex: () => (/* binding */ tokenRegex) 7675/* harmony export */ }); 7676/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./node_modules/flatpickr/dist/esm/utils/index.js"); 7677 7678var doNothing = function () { return undefined; }; 7679var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; }; 7680var revFormat = { 7681 D: doNothing, 7682 F: function (dateObj, monthName, locale) { 7683 dateObj.setMonth(locale.months.longhand.indexOf(monthName)); 7684 }, 7685 G: function (dateObj, hour) { 7686 dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour)); 7687 }, 7688 H: function (dateObj, hour) { 7689 dateObj.setHours(parseFloat(hour)); 7690 }, 7691 J: function (dateObj, day) { 7692 dateObj.setDate(parseFloat(day)); 7693 }, 7694 K: function (dateObj, amPM, locale) { 7695 dateObj.setHours((dateObj.getHours() % 12) + 7696 12 * (0,_utils__WEBPACK_IMPORTED_MODULE_0__.int)(new RegExp(locale.amPM[1], "i").test(amPM))); 7697 }, 7698 M: function (dateObj, shortMonth, locale) { 7699 dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth)); 7700 }, 7701 S: function (dateObj, seconds) { 7702 dateObj.setSeconds(parseFloat(seconds)); 7703 }, 7704 U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); }, 7705 W: function (dateObj, weekNum, locale) { 7706 var weekNumber = parseInt(weekNum); 7707 var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0); 7708 date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek); 7709 return date; 7710 }, 7711 Y: function (dateObj, year) { 7712 dateObj.setFullYear(parseFloat(year)); 7713 }, 7714 Z: function (_, ISODate) { return new Date(ISODate); }, 7715 d: function (dateObj, day) { 7716 dateObj.setDate(parseFloat(day)); 7717 }, 7718 h: function (dateObj, hour) { 7719 dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour)); 7720 }, 7721 i: function (dateObj, minutes) { 7722 dateObj.setMinutes(parseFloat(minutes)); 7723 }, 7724 j: function (dateObj, day) { 7725 dateObj.setDate(parseFloat(day)); 7726 }, 7727 l: doNothing, 7728 m: function (dateObj, month) { 7729 dateObj.setMonth(parseFloat(month) - 1); 7730 }, 7731 n: function (dateObj, month) { 7732 dateObj.setMonth(parseFloat(month) - 1); 7733 }, 7734 s: function (dateObj, seconds) { 7735 dateObj.setSeconds(parseFloat(seconds)); 7736 }, 7737 u: function (_, unixMillSeconds) { 7738 return new Date(parseFloat(unixMillSeconds)); 7739 }, 7740 w: doNothing, 7741 y: function (dateObj, year) { 7742 dateObj.setFullYear(2000 + parseFloat(year)); 7743 }, 7744}; 7745var tokenRegex = { 7746 D: "", 7747 F: "", 7748 G: "(\\d\\d|\\d)", 7749 H: "(\\d\\d|\\d)", 7750 J: "(\\d\\d|\\d)\\w+", 7751 K: "", 7752 M: "", 7753 S: "(\\d\\d|\\d)", 7754 U: "(.+)", 7755 W: "(\\d\\d|\\d)", 7756 Y: "(\\d{4})", 7757 Z: "(.+)", 7758 d: "(\\d\\d|\\d)", 7759 h: "(\\d\\d|\\d)", 7760 i: "(\\d\\d|\\d)", 7761 j: "(\\d\\d|\\d)", 7762 l: "", 7763 m: "(\\d\\d|\\d)", 7764 n: "(\\d\\d|\\d)", 7765 s: "(\\d\\d|\\d)", 7766 u: "(.+)", 7767 w: "(\\d\\d|\\d)", 7768 y: "(\\d{2})", 7769}; 7770var formats = { 7771 Z: function (date) { return date.toISOString(); }, 7772 D: function (date, locale, options) { 7773 return locale.weekdays.shorthand[formats.w(date, locale, options)]; 7774 }, 7775 F: function (date, locale, options) { 7776 return monthToStr(formats.n(date, locale, options) - 1, false, locale); 7777 }, 7778 G: function (date, locale, options) { 7779 return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(formats.h(date, locale, options)); 7780 }, 7781 H: function (date) { return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(date.getHours()); }, 7782 J: function (date, locale) { 7783 return locale.ordinal !== undefined 7784 ? date.getDate() + locale.ordinal(date.getDate()) 7785 : date.getDate(); 7786 }, 7787 K: function (date, locale) { return locale.amPM[(0,_utils__WEBPACK_IMPORTED_MODULE_0__.int)(date.getHours() > 11)]; }, 7788 M: function (date, locale) { 7789 return monthToStr(date.getMonth(), true, locale); 7790 }, 7791 S: function (date) { return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(date.getSeconds()); }, 7792 U: function (date) { return date.getTime() / 1000; }, 7793 W: function (date, _, options) { 7794 return options.getWeek(date); 7795 }, 7796 Y: function (date) { return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(date.getFullYear(), 4); }, 7797 d: function (date) { return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(date.getDate()); }, 7798 h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); }, 7799 i: function (date) { return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(date.getMinutes()); }, 7800 j: function (date) { return date.getDate(); }, 7801 l: function (date, locale) { 7802 return locale.weekdays.longhand[date.getDay()]; 7803 }, 7804 m: function (date) { return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.pad)(date.getMonth() + 1); }, 7805 n: function (date) { return date.getMonth() + 1; }, 7806 s: function (date) { return date.getSeconds(); }, 7807 u: function (date) { return date.getTime(); }, 7808 w: function (date) { return date.getDay(); }, 7809 y: function (date) { return String(date.getFullYear()).substring(2); }, 7810}; 7811 7812 7813/***/ }), 7814
vendor: 1,235 bytes, lines 7815-7849
7815/***/ "./node_modules/flatpickr/dist/esm/utils/index.js": 7816/*!********************************************************!*\ 7817 !*** ./node_modules/flatpickr/dist/esm/utils/index.js ***! 7818 \********************************************************/ 7819/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7820 7821"use strict"; 7822__webpack_require__.r(__webpack_exports__); 7823/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7824/* harmony export */ arrayify: () => (/* binding */ arrayify), 7825/* harmony export */ debounce: () => (/* binding */ debounce), 7826/* harmony export */ int: () => (/* binding */ int), 7827/* harmony export */ pad: () => (/* binding */ pad) 7828/* harmony export */ }); 7829var pad = function (number, length) { 7830 if (length === void 0) { length = 2; } 7831 return ("000" + number).slice(length * -1); 7832}; 7833var int = function (bool) { return (bool === true ? 1 : 0); }; 7834function debounce(fn, wait) { 7835 var t; 7836 return function () { 7837 var _this = this; 7838 var args = arguments; 7839 clearTimeout(t); 7840 t = setTimeout(function () { return fn.apply(_this, args); }, wait); 7841 }; 7842} 7843var arrayify = function (obj) { 7844 return obj instanceof Array ? obj : [obj]; 7845}; 7846 7847 7848/***/ }), 7849
vendor: 995 bytes, lines 7850-7882
7850/***/ "./node_modules/flatpickr/dist/esm/utils/polyfills.js": 7851/*!************************************************************!*\ 7852 !*** ./node_modules/flatpickr/dist/esm/utils/polyfills.js ***! 7853 \************************************************************/ 7854/***/ (() => { 7855 7856"use strict"; 7857 7858if (typeof Object.assign !== "function") { 7859 Object.assign = function (target) { 7860 var args = []; 7861 for (var _i = 1; _i < arguments.length; _i++) { 7862 args[_i - 1] = arguments[_i]; 7863 } 7864 if (!target) { 7865 throw TypeError("Cannot convert undefined or null to object"); 7866 } 7867 var _loop_1 = function (source) { 7868 if (source) { 7869 Object.keys(source).forEach(function (key) { return (target[key] = source[key]); }); 7870 } 7871 }; 7872 for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { 7873 var source = args_1[_a]; 7874 _loop_1(source); 7875 } 7876 return target; 7877 }; 7878} 7879 7880 7881/***/ }), 7882
vendor: 1,922 bytes, lines 7883-7962
7883/***/ "./node_modules/flatpickr/dist/l10n/it.js": 7884/*!************************************************!*\ 7885 !*** ./node_modules/flatpickr/dist/l10n/it.js ***! 7886 \************************************************/ 7887/***/ (function(__unused_webpack_module, exports) { 7888 7889(function (global, factory) { 7890 true ? factory(exports) : 7891 0; 7892}(this, (function (exports) { 'use strict'; 7893 7894 var fp = typeof window !== "undefined" && window.flatpickr !== undefined 7895 ? window.flatpickr 7896 : { 7897 l10ns: {}, 7898 }; 7899 var Italian = { 7900 weekdays: { 7901 shorthand: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], 7902 longhand: [ 7903 "Domenica", 7904 "Lunedì", 7905 "Martedì", 7906 "Mercoledì", 7907 "Giovedì", 7908 "Venerdì", 7909 "Sabato", 7910 ], 7911 }, 7912 months: { 7913 shorthand: [ 7914 "Gen", 7915 "Feb", 7916 "Mar", 7917 "Apr", 7918 "Mag", 7919 "Giu", 7920 "Lug", 7921 "Ago", 7922 "Set", 7923 "Ott", 7924 "Nov", 7925 "Dic", 7926 ], 7927 longhand: [ 7928 "Gennaio", 7929 "Febbraio", 7930 "Marzo", 7931 "Aprile", 7932 "Maggio", 7933 "Giugno", 7934 "Luglio", 7935 "Agosto", 7936 "Settembre", 7937 "Ottobre", 7938 "Novembre", 7939 "Dicembre", 7940 ], 7941 }, 7942 firstDayOfWeek: 1, 7943 ordinal: function () { return "°"; }, 7944 rangeSeparator: " al ", 7945 weekAbbreviation: "Se", 7946 scrollTitle: "Scrolla per aumentare", 7947 toggleTitle: "Clicca per cambiare", 7948 time_24hr: true, 7949 }; 7950 fp.l10ns.it = Italian; 7951 var it = fp.l10ns; 7952 7953 exports.Italian = Italian; 7954 exports.default = it; 7955 7956 Object.defineProperty(exports, '__esModule', { value: true }); 7957 7958}))); 7959 7960 7961/***/ }), 7962
7963/***/ "./src/scss/app.scss": 7964/*!***************************!*\ 7965 !*** ./src/scss/app.scss ***! 7966 \***************************/ 7967/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7968 7969"use strict"; 7970__webpack_require__.r(__webpack_exports__); 7971// extracted by mini-css-extract-plugin 7972 7973 7974/***/ }), 7975
vendor: 2,249 bytes, lines 7976-8005
7976/***/ "./node_modules/swiper/modules/navigation.css": 7977/*!****************************************************!*\ 7978 !*** ./node_modules/swiper/modules/navigation.css ***! 7979 \****************************************************/ 7980/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7981 7982"use strict"; 7983__webpack_require__.r(__webpack_exports__); 7984/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7985/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 7986/* harmony export */ }); 7987/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 7988/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 7989/* harmony import */ var _css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_navigation_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!../../postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./navigation.css */ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/modules/navigation.css"); 7990 7991 7992 7993var options = {}; 7994 7995options.insert = "head"; 7996options.singleton = false; 7997 7998var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_navigation_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); 7999 8000 8001 8002/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_navigation_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8003 8004/***/ }), 8005
vendor: 2,249 bytes, lines 8006-8035
8006/***/ "./node_modules/swiper/modules/pagination.css": 8007/*!****************************************************!*\ 8008 !*** ./node_modules/swiper/modules/pagination.css ***! 8009 \****************************************************/ 8010/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8011 8012"use strict"; 8013__webpack_require__.r(__webpack_exports__); 8014/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8015/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8016/* harmony export */ }); 8017/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8018/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8019/* harmony import */ var _css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_pagination_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!../../postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./pagination.css */ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/modules/pagination.css"); 8020 8021 8022 8023var options = {}; 8024 8025options.insert = "head"; 8026options.singleton = false; 8027 8028var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_pagination_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); 8029 8030 8031 8032/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_pagination_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8033 8034/***/ }), 8035
vendor: 2,227 bytes, lines 8036-8065
8036/***/ "./node_modules/swiper/swiper-bundle.css": 8037/*!***********************************************!*\ 8038 !*** ./node_modules/swiper/swiper-bundle.css ***! 8039 \***********************************************/ 8040/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8041 8042"use strict"; 8043__webpack_require__.r(__webpack_exports__); 8044/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8045/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8046/* harmony export */ }); 8047/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8048/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8049/* harmony import */ var _css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_swiper_bundle_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!../postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./swiper-bundle.css */ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/swiper-bundle.css"); 8050 8051 8052 8053var options = {}; 8054 8055options.insert = "head"; 8056options.singleton = false; 8057 8058var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_swiper_bundle_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); 8059 8060 8061 8062/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_swiper_bundle_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8063 8064/***/ }), 8065
vendor: 2,164 bytes, lines 8066-8095
8066/***/ "./node_modules/swiper/swiper.css": 8067/*!****************************************!*\ 8068 !*** ./node_modules/swiper/swiper.css ***! 8069 \****************************************/ 8070/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8071 8072"use strict"; 8073__webpack_require__.r(__webpack_exports__); 8074/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8075/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8076/* harmony export */ }); 8077/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8078/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8079/* harmony import */ var _css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_swiper_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!../postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./swiper.css */ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!./node_modules/swiper/swiper.css"); 8080 8081 8082 8083var options = {}; 8084 8085options.insert = "head"; 8086options.singleton = false; 8087 8088var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_swiper_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); 8089 8090 8091 8092/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_1_postcss_loader_dist_cjs_js_ruleSet_1_rules_6_oneOf_1_use_2_swiper_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8093 8094/***/ }), 8095
vendor: 7,200 bytes, lines 8096-8374
8096/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": 8097/*!****************************************************************************!*\ 8098 !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! 8099 \****************************************************************************/ 8100/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8101 8102"use strict"; 8103 8104 8105var isOldIE = function isOldIE() { 8106 var memo; 8107 return function memorize() { 8108 if (typeof memo === 'undefined') { 8109 // Test for IE <= 9 as proposed by Browserhacks 8110 // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 8111 // Tests for existence of standard globals is to allow style-loader 8112 // to operate correctly into non-standard environments 8113 // @see https://github.com/webpack-contrib/style-loader/issues/177 8114 memo = Boolean(window && document && document.all && !window.atob); 8115 } 8116 8117 return memo; 8118 }; 8119}(); 8120 8121var getTarget = function getTarget() { 8122 var memo = {}; 8123 return function memorize(target) { 8124 if (typeof memo[target] === 'undefined') { 8125 var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself 8126 8127 if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { 8128 try { 8129 // This will throw an exception if access to iframe is blocked 8130 // due to cross-origin restrictions 8131 styleTarget = styleTarget.contentDocument.head; 8132 } catch (e) { 8133 // istanbul ignore next 8134 styleTarget = null; 8135 } 8136 } 8137 8138 memo[target] = styleTarget; 8139 } 8140 8141 return memo[target]; 8142 }; 8143}(); 8144 8145var stylesInDom = []; 8146 8147function getIndexByIdentifier(identifier) { 8148 var result = -1; 8149 8150 for (var i = 0; i < stylesInDom.length; i++) { 8151 if (stylesInDom[i].identifier === identifier) { 8152 result = i; 8153 break; 8154 } 8155 } 8156 8157 return result; 8158} 8159 8160function modulesToDom(list, options) { 8161 var idCountMap = {}; 8162 var identifiers = []; 8163 8164 for (var i = 0; i < list.length; i++) { 8165 var item = list[i]; 8166 var id = options.base ? item[0] + options.base : item[0]; 8167 var count = idCountMap[id] || 0; 8168 var identifier = "".concat(id, " ").concat(count); 8169 idCountMap[id] = count + 1; 8170 var index = getIndexByIdentifier(identifier); 8171 var obj = { 8172 css: item[1], 8173 media: item[2], 8174 sourceMap: item[3] 8175 }; 8176 8177 if (index !== -1) { 8178 stylesInDom[index].references++; 8179 stylesInDom[index].updater(obj); 8180 } else { 8181 stylesInDom.push({ 8182 identifier: identifier, 8183 updater: addStyle(obj, options), 8184 references: 1 8185 }); 8186 } 8187 8188 identifiers.push(identifier); 8189 } 8190 8191 return identifiers; 8192} 8193 8194function insertStyleElement(options) { 8195 var style = document.createElement('style'); 8196 var attributes = options.attributes || {}; 8197 8198 if (typeof attributes.nonce === 'undefined') { 8199 var nonce = true ? __webpack_require__.nc : 0; 8200 8201 if (nonce) { 8202 attributes.nonce = nonce; 8203 } 8204 } 8205 8206 Object.keys(attributes).forEach(function (key) { 8207 style.setAttribute(key, attributes[key]); 8208 }); 8209 8210 if (typeof options.insert === 'function') { 8211 options.insert(style); 8212 } else { 8213 var target = getTarget(options.insert || 'head'); 8214 8215 if (!target) { 8216 throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); 8217 } 8218 8219 target.appendChild(style); 8220 } 8221 8222 return style; 8223} 8224 8225function removeStyleElement(style) { 8226 // istanbul ignore if 8227 if (style.parentNode === null) { 8228 return false; 8229 } 8230 8231 style.parentNode.removeChild(style); 8232} 8233/* istanbul ignore next */ 8234 8235 8236var replaceText = function replaceText() { 8237 var textStore = []; 8238 return function replace(index, replacement) { 8239 textStore[index] = replacement; 8240 return textStore.filter(Boolean).join('\n'); 8241 }; 8242}(); 8243 8244function applyToSingletonTag(style, index, remove, obj) { 8245 var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE 8246 8247 /* istanbul ignore if */ 8248 8249 if (style.styleSheet) { 8250 style.styleSheet.cssText = replaceText(index, css); 8251 } else { 8252 var cssNode = document.createTextNode(css); 8253 var childNodes = style.childNodes; 8254 8255 if (childNodes[index]) { 8256 style.removeChild(childNodes[index]); 8257 } 8258 8259 if (childNodes.length) { 8260 style.insertBefore(cssNode, childNodes[index]); 8261 } else { 8262 style.appendChild(cssNode); 8263 } 8264 } 8265} 8266 8267function applyToTag(style, options, obj) { 8268 var css = obj.css; 8269 var media = obj.media; 8270 var sourceMap = obj.sourceMap; 8271 8272 if (media) { 8273 style.setAttribute('media', media); 8274 } else { 8275 style.removeAttribute('media'); 8276 } 8277 8278 if (sourceMap && typeof btoa !== 'undefined') { 8279 css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); 8280 } // For old IE 8281 8282 /* istanbul ignore if */ 8283 8284 8285 if (style.styleSheet) { 8286 style.styleSheet.cssText = css; 8287 } else { 8288 while (style.firstChild) { 8289 style.removeChild(style.firstChild); 8290 } 8291 8292 style.appendChild(document.createTextNode(css)); 8293 } 8294} 8295 8296var singleton = null; 8297var singletonCounter = 0; 8298 8299function addStyle(obj, options) { 8300 var style; 8301 var update; 8302 var remove; 8303 8304 if (options.singleton) { 8305 var styleIndex = singletonCounter++; 8306 style = singleton || (singleton = insertStyleElement(options)); 8307 update = applyToSingletonTag.bind(null, style, styleIndex, false); 8308 remove = applyToSingletonTag.bind(null, style, styleIndex, true); 8309 } else { 8310 style = insertStyleElement(options); 8311 update = applyToTag.bind(null, style, options); 8312 8313 remove = function remove() { 8314 removeStyleElement(style); 8315 }; 8316 } 8317 8318 update(obj); 8319 return function updateStyle(newObj) { 8320 if (newObj) { 8321 if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { 8322 return; 8323 } 8324 8325 update(obj = newObj); 8326 } else { 8327 remove(); 8328 } 8329 }; 8330} 8331 8332module.exports = function (list, options) { 8333 options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> 8334 // tags it will allow on a page 8335 8336 if (!options.singleton && typeof options.singleton !== 'boolean') { 8337 options.singleton = isOldIE(); 8338 } 8339 8340 list = list || []; 8341 var lastIdentifiers = modulesToDom(list, options); 8342 return function update(newList) { 8343 newList = newList || []; 8344 8345 if (Object.prototype.toString.call(newList) !== '[object Array]') { 8346 return; 8347 } 8348 8349 for (var i = 0; i < lastIdentifiers.length; i++) { 8350 var identifier = lastIdentifiers[i]; 8351 var index = getIndexByIdentifier(identifier); 8352 stylesInDom[index].references--; 8353 } 8354 8355 var newLastIdentifiers = modulesToDom(newList, options); 8356 8357 for (var _i = 0; _i < lastIdentifiers.length; _i++) { 8358 var _identifier = lastIdentifiers[_i]; 8359 8360 var _index = getIndexByIdentifier(_identifier); 8361 8362 if (stylesInDom[_index].references === 0) { 8363 stylesInDom[_index].updater(); 8364 8365 stylesInDom.splice(_index, 1); 8366 } 8367 } 8368 8369 lastIdentifiers = newLastIdentifiers; 8370 }; 8371}; 8372 8373/***/ }), 8374
vendor: 11,829 bytes, lines 8375-8734
8375/***/ "./node_modules/swiper/modules/a11y.mjs": 8376/*!**********************************************!*\ 8377 !*** ./node_modules/swiper/modules/a11y.mjs ***! 8378 \**********************************************/ 8379/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 8380 8381"use strict"; 8382__webpack_require__.r(__webpack_exports__); 8383/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8384/* harmony export */ "default": () => (/* binding */ A11y) 8385/* harmony export */ }); 8386/* harmony import */ var _shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/classes-to-selector.mjs */ "./node_modules/swiper/shared/classes-to-selector.mjs"); 8387/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 8388 8389 8390 8391function A11y(_ref) { 8392 let { 8393 swiper, 8394 extendParams, 8395 on 8396 } = _ref; 8397 extendParams({ 8398 a11y: { 8399 enabled: true, 8400 notificationClass: 'swiper-notification', 8401 prevSlideMessage: 'Previous slide', 8402 nextSlideMessage: 'Next slide', 8403 firstSlideMessage: 'This is the first slide', 8404 lastSlideMessage: 'This is the last slide', 8405 paginationBulletMessage: 'Go to slide {{index}}', 8406 slideLabelMessage: '{{index}} / {{slidesLength}}', 8407 containerMessage: null, 8408 containerRoleDescriptionMessage: null, 8409 itemRoleDescriptionMessage: null, 8410 slideRole: 'group', 8411 id: null 8412 } 8413 }); 8414 swiper.a11y = { 8415 clicked: false 8416 }; 8417 let liveRegion = null; 8418 function notify(message) { 8419 const notification = liveRegion; 8420 if (notification.length === 0) return; 8421 notification.innerHTML = ''; 8422 notification.innerHTML = message; 8423 } 8424 const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e); 8425 function getRandomNumber(size) { 8426 if (size === void 0) { 8427 size = 16; 8428 } 8429 const randomChar = () => Math.round(16 * Math.random()).toString(16); 8430 return 'x'.repeat(size).replace(/x/g, randomChar); 8431 } 8432 function makeElFocusable(el) { 8433 el = makeElementsArray(el); 8434 el.forEach(subEl => { 8435 subEl.setAttribute('tabIndex', '0'); 8436 }); 8437 } 8438 function makeElNotFocusable(el) { 8439 el = makeElementsArray(el); 8440 el.forEach(subEl => { 8441 subEl.setAttribute('tabIndex', '-1'); 8442 }); 8443 } 8444 function addElRole(el, role) { 8445 el = makeElementsArray(el); 8446 el.forEach(subEl => { 8447 subEl.setAttribute('role', role); 8448 }); 8449 } 8450 function addElRoleDescription(el, description) { 8451 el = makeElementsArray(el); 8452 el.forEach(subEl => { 8453 subEl.setAttribute('aria-roledescription', description); 8454 }); 8455 } 8456 function addElControls(el, controls) { 8457 el = makeElementsArray(el); 8458 el.forEach(subEl => { 8459 subEl.setAttribute('aria-controls', controls); 8460 }); 8461 } 8462 function addElLabel(el, label) { 8463 el = makeElementsArray(el); 8464 el.forEach(subEl => { 8465 subEl.setAttribute('aria-label', label); 8466 }); 8467 } 8468 function addElId(el, id) { 8469 el = makeElementsArray(el); 8470 el.forEach(subEl => { 8471 subEl.setAttribute('id', id); 8472 }); 8473 } 8474 function addElLive(el, live) { 8475 el = makeElementsArray(el); 8476 el.forEach(subEl => { 8477 subEl.setAttribute('aria-live', live); 8478 }); 8479 } 8480 function disableEl(el) { 8481 el = makeElementsArray(el); 8482 el.forEach(subEl => { 8483 subEl.setAttribute('aria-disabled', true); 8484 }); 8485 } 8486 function enableEl(el) { 8487 el = makeElementsArray(el); 8488 el.forEach(subEl => { 8489 subEl.setAttribute('aria-disabled', false); 8490 }); 8491 } 8492 function onEnterOrSpaceKey(e) { 8493 if (e.keyCode !== 13 && e.keyCode !== 32) return; 8494 const params = swiper.params.a11y; 8495 const targetEl = e.target; 8496 if (swiper.pagination && swiper.pagination.el && (targetEl === swiper.pagination.el || swiper.pagination.el.contains(e.target))) { 8497 if (!e.target.matches((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(swiper.params.pagination.bulletClass))) return; 8498 } 8499 if (swiper.navigation && swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl) { 8500 if (!(swiper.isEnd && !swiper.params.loop)) { 8501 swiper.slideNext(); 8502 } 8503 if (swiper.isEnd) { 8504 notify(params.lastSlideMessage); 8505 } else { 8506 notify(params.nextSlideMessage); 8507 } 8508 } 8509 if (swiper.navigation && swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl) { 8510 if (!(swiper.isBeginning && !swiper.params.loop)) { 8511 swiper.slidePrev(); 8512 } 8513 if (swiper.isBeginning) { 8514 notify(params.firstSlideMessage); 8515 } else { 8516 notify(params.prevSlideMessage); 8517 } 8518 } 8519 if (swiper.pagination && targetEl.matches((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(swiper.params.pagination.bulletClass))) { 8520 targetEl.click(); 8521 } 8522 } 8523 function updateNavigation() { 8524 if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return; 8525 const { 8526 nextEl, 8527 prevEl 8528 } = swiper.navigation; 8529 if (prevEl) { 8530 if (swiper.isBeginning) { 8531 disableEl(prevEl); 8532 makeElNotFocusable(prevEl); 8533 } else { 8534 enableEl(prevEl); 8535 makeElFocusable(prevEl); 8536 } 8537 } 8538 if (nextEl) { 8539 if (swiper.isEnd) { 8540 disableEl(nextEl); 8541 makeElNotFocusable(nextEl); 8542 } else { 8543 enableEl(nextEl); 8544 makeElFocusable(nextEl); 8545 } 8546 } 8547 } 8548 function hasPagination() { 8549 return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length; 8550 } 8551 function hasClickablePagination() { 8552 return hasPagination() && swiper.params.pagination.clickable; 8553 } 8554 function updatePagination() { 8555 const params = swiper.params.a11y; 8556 if (!hasPagination()) return; 8557 swiper.pagination.bullets.forEach(bulletEl => { 8558 if (swiper.params.pagination.clickable) { 8559 makeElFocusable(bulletEl); 8560 if (!swiper.params.pagination.renderBullet) { 8561 addElRole(bulletEl, 'button'); 8562 addElLabel(bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.g)(bulletEl) + 1)); 8563 } 8564 } 8565 if (bulletEl.matches((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(swiper.params.pagination.bulletActiveClass))) { 8566 bulletEl.setAttribute('aria-current', 'true'); 8567 } else { 8568 bulletEl.removeAttribute('aria-current'); 8569 } 8570 }); 8571 } 8572 const initNavEl = (el, wrapperId, message) => { 8573 makeElFocusable(el); 8574 if (el.tagName !== 'BUTTON') { 8575 addElRole(el, 'button'); 8576 el.addEventListener('keydown', onEnterOrSpaceKey); 8577 } 8578 addElLabel(el, message); 8579 addElControls(el, wrapperId); 8580 }; 8581 const handlePointerDown = () => { 8582 swiper.a11y.clicked = true; 8583 }; 8584 const handlePointerUp = () => { 8585 requestAnimationFrame(() => { 8586 requestAnimationFrame(() => { 8587 if (!swiper.destroyed) { 8588 swiper.a11y.clicked = false; 8589 } 8590 }); 8591 }); 8592 }; 8593 const handleFocus = e => { 8594 if (swiper.a11y.clicked) return; 8595 const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`); 8596 if (!slideEl || !swiper.slides.includes(slideEl)) return; 8597 const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex; 8598 const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl); 8599 if (isActive || isVisible) return; 8600 if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return; 8601 if (swiper.isHorizontal()) { 8602 swiper.el.scrollLeft = 0; 8603 } else { 8604 swiper.el.scrollTop = 0; 8605 } 8606 swiper.slideTo(swiper.slides.indexOf(slideEl), 0); 8607 }; 8608 const initSlides = () => { 8609 const params = swiper.params.a11y; 8610 if (params.itemRoleDescriptionMessage) { 8611 addElRoleDescription(swiper.slides, params.itemRoleDescriptionMessage); 8612 } 8613 if (params.slideRole) { 8614 addElRole(swiper.slides, params.slideRole); 8615 } 8616 const slidesLength = swiper.slides.length; 8617 if (params.slideLabelMessage) { 8618 swiper.slides.forEach((slideEl, index) => { 8619 const slideIndex = swiper.params.loop ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : index; 8620 const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength); 8621 addElLabel(slideEl, ariaLabelMessage); 8622 }); 8623 } 8624 }; 8625 const init = () => { 8626 const params = swiper.params.a11y; 8627 swiper.el.append(liveRegion); 8628 8629 // Container 8630 const containerEl = swiper.el; 8631 if (params.containerRoleDescriptionMessage) { 8632 addElRoleDescription(containerEl, params.containerRoleDescriptionMessage); 8633 } 8634 if (params.containerMessage) { 8635 addElLabel(containerEl, params.containerMessage); 8636 } 8637 8638 // Wrapper 8639 const wrapperEl = swiper.wrapperEl; 8640 const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`; 8641 const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite'; 8642 addElId(wrapperEl, wrapperId); 8643 addElLive(wrapperEl, live); 8644 8645 // Slide 8646 initSlides(); 8647 8648 // Navigation 8649 let { 8650 nextEl, 8651 prevEl 8652 } = swiper.navigation ? swiper.navigation : {}; 8653 nextEl = makeElementsArray(nextEl); 8654 prevEl = makeElementsArray(prevEl); 8655 if (nextEl) { 8656 nextEl.forEach(el => initNavEl(el, wrapperId, params.nextSlideMessage)); 8657 } 8658 if (prevEl) { 8659 prevEl.forEach(el => initNavEl(el, wrapperId, params.prevSlideMessage)); 8660 } 8661 8662 // Pagination 8663 if (hasClickablePagination()) { 8664 const paginationEl = makeElementsArray(swiper.pagination.el); 8665 paginationEl.forEach(el => { 8666 el.addEventListener('keydown', onEnterOrSpaceKey); 8667 }); 8668 } 8669 8670 // Tab focus 8671 swiper.el.addEventListener('focus', handleFocus, true); 8672 swiper.el.addEventListener('pointerdown', handlePointerDown, true); 8673 swiper.el.addEventListener('pointerup', handlePointerUp, true); 8674 }; 8675 function destroy() { 8676 if (liveRegion) liveRegion.remove(); 8677 let { 8678 nextEl, 8679 prevEl 8680 } = swiper.navigation ? swiper.navigation : {}; 8681 nextEl = makeElementsArray(nextEl); 8682 prevEl = makeElementsArray(prevEl); 8683 if (nextEl) { 8684 nextEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey)); 8685 } 8686 if (prevEl) { 8687 prevEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey)); 8688 } 8689 8690 // Pagination 8691 if (hasClickablePagination()) { 8692 const paginationEl = makeElementsArray(swiper.pagination.el); 8693 paginationEl.forEach(el => { 8694 el.removeEventListener('keydown', onEnterOrSpaceKey); 8695 }); 8696 } 8697 8698 // Tab focus 8699 swiper.el.removeEventListener('focus', handleFocus, true); 8700 swiper.el.removeEventListener('pointerdown', handlePointerDown, true); 8701 swiper.el.removeEventListener('pointerup', handlePointerUp, true); 8702 } 8703 on('beforeInit', () => { 8704 liveRegion = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('span', swiper.params.a11y.notificationClass); 8705 liveRegion.setAttribute('aria-live', 'assertive'); 8706 liveRegion.setAttribute('aria-atomic', 'true'); 8707 }); 8708 on('afterInit', () => { 8709 if (!swiper.params.a11y.enabled) return; 8710 init(); 8711 }); 8712 on('slidesLengthChange snapGridLengthChange slidesGridLengthChange', () => { 8713 if (!swiper.params.a11y.enabled) return; 8714 initSlides(); 8715 }); 8716 on('fromEdge toEdge afterInit lock unlock', () => { 8717 if (!swiper.params.a11y.enabled) return; 8718 updateNavigation(); 8719 }); 8720 on('paginationUpdate', () => { 8721 if (!swiper.params.a11y.enabled) return; 8722 updatePagination(); 8723 }); 8724 on('destroy', () => { 8725 if (!swiper.params.a11y.enabled) return; 8726 destroy(); 8727 }); 8728} 8729 8730 8731 8732 8733/***/ }), 8734
vendor: 9,943 bytes, lines 8735-9052
8735/***/ "./node_modules/swiper/modules/autoplay.mjs": 8736/*!**************************************************!*\ 8737 !*** ./node_modules/swiper/modules/autoplay.mjs ***! 8738 \**************************************************/ 8739/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 8740 8741"use strict"; 8742__webpack_require__.r(__webpack_exports__); 8743/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8744/* harmony export */ "default": () => (/* binding */ Autoplay) 8745/* harmony export */ }); 8746/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 8747 8748 8749/* eslint no-underscore-dangle: "off" */ 8750/* eslint no-use-before-define: "off" */ 8751function Autoplay(_ref) { 8752 let { 8753 swiper, 8754 extendParams, 8755 on, 8756 emit, 8757 params 8758 } = _ref; 8759 swiper.autoplay = { 8760 running: false, 8761 paused: false, 8762 timeLeft: 0 8763 }; 8764 extendParams({ 8765 autoplay: { 8766 enabled: false, 8767 delay: 3000, 8768 waitForTransition: true, 8769 disableOnInteraction: false, 8770 stopOnLastSlide: false, 8771 reverseDirection: false, 8772 pauseOnMouseEnter: false 8773 } 8774 }); 8775 let timeout; 8776 let raf; 8777 let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3000; 8778 let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3000; 8779 let autoplayTimeLeft; 8780 let autoplayStartTime = new Date().getTime(); 8781 let wasPaused; 8782 let isTouched; 8783 let pausedByTouch; 8784 let touchStartTimeout; 8785 let slideChanged; 8786 let pausedByInteraction; 8787 let pausedByPointerEnter; 8788 function onTransitionEnd(e) { 8789 if (!swiper || swiper.destroyed || !swiper.wrapperEl) return; 8790 if (e.target !== swiper.wrapperEl) return; 8791 swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd); 8792 if (pausedByPointerEnter) { 8793 return; 8794 } 8795 resume(); 8796 } 8797 const calcTimeLeft = () => { 8798 if (swiper.destroyed || !swiper.autoplay.running) return; 8799 if (swiper.autoplay.paused) { 8800 wasPaused = true; 8801 } else if (wasPaused) { 8802 autoplayDelayCurrent = autoplayTimeLeft; 8803 wasPaused = false; 8804 } 8805 const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - new Date().getTime(); 8806 swiper.autoplay.timeLeft = timeLeft; 8807 emit('autoplayTimeLeft', timeLeft, timeLeft / autoplayDelayTotal); 8808 raf = requestAnimationFrame(() => { 8809 calcTimeLeft(); 8810 }); 8811 }; 8812 const getSlideDelay = () => { 8813 let activeSlideEl; 8814 if (swiper.virtual && swiper.params.virtual.enabled) { 8815 activeSlideEl = swiper.slides.filter(slideEl => slideEl.classList.contains('swiper-slide-active'))[0]; 8816 } else { 8817 activeSlideEl = swiper.slides[swiper.activeIndex]; 8818 } 8819 if (!activeSlideEl) return undefined; 8820 const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10); 8821 return currentSlideDelay; 8822 }; 8823 const run = delayForce => { 8824 if (swiper.destroyed || !swiper.autoplay.running) return; 8825 cancelAnimationFrame(raf); 8826 calcTimeLeft(); 8827 let delay = typeof delayForce === 'undefined' ? swiper.params.autoplay.delay : delayForce; 8828 autoplayDelayTotal = swiper.params.autoplay.delay; 8829 autoplayDelayCurrent = swiper.params.autoplay.delay; 8830 const currentSlideDelay = getSlideDelay(); 8831 if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0 && typeof delayForce === 'undefined') { 8832 delay = currentSlideDelay; 8833 autoplayDelayTotal = currentSlideDelay; 8834 autoplayDelayCurrent = currentSlideDelay; 8835 } 8836 autoplayTimeLeft = delay; 8837 const speed = swiper.params.speed; 8838 const proceed = () => { 8839 if (!swiper || swiper.destroyed) return; 8840 if (swiper.params.autoplay.reverseDirection) { 8841 if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) { 8842 swiper.slidePrev(speed, true, true); 8843 emit('autoplay'); 8844 } else if (!swiper.params.autoplay.stopOnLastSlide) { 8845 swiper.slideTo(swiper.slides.length - 1, speed, true, true); 8846 emit('autoplay'); 8847 } 8848 } else { 8849 if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) { 8850 swiper.slideNext(speed, true, true); 8851 emit('autoplay'); 8852 } else if (!swiper.params.autoplay.stopOnLastSlide) { 8853 swiper.slideTo(0, speed, true, true); 8854 emit('autoplay'); 8855 } 8856 } 8857 if (swiper.params.cssMode) { 8858 autoplayStartTime = new Date().getTime(); 8859 requestAnimationFrame(() => { 8860 run(); 8861 }); 8862 } 8863 }; 8864 if (delay > 0) { 8865 clearTimeout(timeout); 8866 timeout = setTimeout(() => { 8867 proceed(); 8868 }, delay); 8869 } else { 8870 requestAnimationFrame(() => { 8871 proceed(); 8872 }); 8873 } 8874 8875 // eslint-disable-next-line 8876 return delay; 8877 }; 8878 const start = () => { 8879 autoplayStartTime = new Date().getTime(); 8880 swiper.autoplay.running = true; 8881 run(); 8882 emit('autoplayStart'); 8883 }; 8884 const stop = () => { 8885 swiper.autoplay.running = false; 8886 clearTimeout(timeout); 8887 cancelAnimationFrame(raf); 8888 emit('autoplayStop'); 8889 }; 8890 const pause = (internal, reset) => { 8891 if (swiper.destroyed || !swiper.autoplay.running) return; 8892 clearTimeout(timeout); 8893 if (!internal) { 8894 pausedByInteraction = true; 8895 } 8896 const proceed = () => { 8897 emit('autoplayPause'); 8898 if (swiper.params.autoplay.waitForTransition) { 8899 swiper.wrapperEl.addEventListener('transitionend', onTransitionEnd); 8900 } else { 8901 resume(); 8902 } 8903 }; 8904 swiper.autoplay.paused = true; 8905 if (reset) { 8906 if (slideChanged) { 8907 autoplayTimeLeft = swiper.params.autoplay.delay; 8908 } 8909 slideChanged = false; 8910 proceed(); 8911 return; 8912 } 8913 const delay = autoplayTimeLeft || swiper.params.autoplay.delay; 8914 autoplayTimeLeft = delay - (new Date().getTime() - autoplayStartTime); 8915 if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return; 8916 if (autoplayTimeLeft < 0) autoplayTimeLeft = 0; 8917 proceed(); 8918 }; 8919 const resume = () => { 8920 if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return; 8921 autoplayStartTime = new Date().getTime(); 8922 if (pausedByInteraction) { 8923 pausedByInteraction = false; 8924 run(autoplayTimeLeft); 8925 } else { 8926 run(); 8927 } 8928 swiper.autoplay.paused = false; 8929 emit('autoplayResume'); 8930 }; 8931 const onVisibilityChange = () => { 8932 if (swiper.destroyed || !swiper.autoplay.running) return; 8933 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 8934 if (document.visibilityState === 'hidden') { 8935 pausedByInteraction = true; 8936 pause(true); 8937 } 8938 if (document.visibilityState === 'visible') { 8939 resume(); 8940 } 8941 }; 8942 const onPointerEnter = e => { 8943 if (e.pointerType !== 'mouse') return; 8944 pausedByInteraction = true; 8945 pausedByPointerEnter = true; 8946 if (swiper.animating || swiper.autoplay.paused) return; 8947 pause(true); 8948 }; 8949 const onPointerLeave = e => { 8950 if (e.pointerType !== 'mouse') return; 8951 pausedByPointerEnter = false; 8952 if (swiper.autoplay.paused) { 8953 resume(); 8954 } 8955 }; 8956 const attachMouseEvents = () => { 8957 if (swiper.params.autoplay.pauseOnMouseEnter) { 8958 swiper.el.addEventListener('pointerenter', onPointerEnter); 8959 swiper.el.addEventListener('pointerleave', onPointerLeave); 8960 } 8961 }; 8962 const detachMouseEvents = () => { 8963 swiper.el.removeEventListener('pointerenter', onPointerEnter); 8964 swiper.el.removeEventListener('pointerleave', onPointerLeave); 8965 }; 8966 const attachDocumentEvents = () => { 8967 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 8968 document.addEventListener('visibilitychange', onVisibilityChange); 8969 }; 8970 const detachDocumentEvents = () => { 8971 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 8972 document.removeEventListener('visibilitychange', onVisibilityChange); 8973 }; 8974 on('init', () => { 8975 if (swiper.params.autoplay.enabled) { 8976 attachMouseEvents(); 8977 attachDocumentEvents(); 8978 start(); 8979 } 8980 }); 8981 on('destroy', () => { 8982 detachMouseEvents(); 8983 detachDocumentEvents(); 8984 if (swiper.autoplay.running) { 8985 stop(); 8986 } 8987 }); 8988 on('_freeModeStaticRelease', () => { 8989 if (pausedByTouch || pausedByInteraction) { 8990 resume(); 8991 } 8992 }); 8993 on('_freeModeNoMomentumRelease', () => { 8994 if (!swiper.params.autoplay.disableOnInteraction) { 8995 pause(true, true); 8996 } else { 8997 stop(); 8998 } 8999 }); 9000 on('beforeTransitionStart', (_s, speed, internal) => { 9001 if (swiper.destroyed || !swiper.autoplay.running) return; 9002 if (internal || !swiper.params.autoplay.disableOnInteraction) { 9003 pause(true, true); 9004 } else { 9005 stop(); 9006 } 9007 }); 9008 on('sliderFirstMove', () => { 9009 if (swiper.destroyed || !swiper.autoplay.running) return; 9010 if (swiper.params.autoplay.disableOnInteraction) { 9011 stop(); 9012 return; 9013 } 9014 isTouched = true; 9015 pausedByTouch = false; 9016 pausedByInteraction = false; 9017 touchStartTimeout = setTimeout(() => { 9018 pausedByInteraction = true; 9019 pausedByTouch = true; 9020 pause(true); 9021 }, 200); 9022 }); 9023 on('touchEnd', () => { 9024 if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return; 9025 clearTimeout(touchStartTimeout); 9026 clearTimeout(timeout); 9027 if (swiper.params.autoplay.disableOnInteraction) { 9028 pausedByTouch = false; 9029 isTouched = false; 9030 return; 9031 } 9032 if (pausedByTouch && swiper.params.cssMode) resume(); 9033 pausedByTouch = false; 9034 isTouched = false; 9035 }); 9036 on('slideChange', () => { 9037 if (swiper.destroyed || !swiper.autoplay.running) return; 9038 slideChanged = true; 9039 }); 9040 Object.assign(swiper.autoplay, { 9041 start, 9042 stop, 9043 pause, 9044 resume 9045 }); 9046} 9047 9048 9049 9050 9051/***/ }), 9052
vendor: 7,181 bytes, lines 9053-9255
9053/***/ "./node_modules/swiper/modules/controller.mjs": 9054/*!****************************************************!*\ 9055 !*** ./node_modules/swiper/modules/controller.mjs ***! 9056 \****************************************************/ 9057/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9058 9059"use strict"; 9060__webpack_require__.r(__webpack_exports__); 9061/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9062/* harmony export */ "default": () => (/* binding */ Controller) 9063/* harmony export */ }); 9064/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9065 9066 9067/* eslint no-bitwise: ["error", { "allow": [">>"] }] */ 9068function Controller(_ref) { 9069 let { 9070 swiper, 9071 extendParams, 9072 on 9073 } = _ref; 9074 extendParams({ 9075 controller: { 9076 control: undefined, 9077 inverse: false, 9078 by: 'slide' // or 'container' 9079 } 9080 }); 9081 9082 swiper.controller = { 9083 control: undefined 9084 }; 9085 function LinearSpline(x, y) { 9086 const binarySearch = function search() { 9087 let maxIndex; 9088 let minIndex; 9089 let guess; 9090 return (array, val) => { 9091 minIndex = -1; 9092 maxIndex = array.length; 9093 while (maxIndex - minIndex > 1) { 9094 guess = maxIndex + minIndex >> 1; 9095 if (array[guess] <= val) { 9096 minIndex = guess; 9097 } else { 9098 maxIndex = guess; 9099 } 9100 } 9101 return maxIndex; 9102 }; 9103 }(); 9104 this.x = x; 9105 this.y = y; 9106 this.lastIndex = x.length - 1; 9107 // Given an x value (x2), return the expected y2 value: 9108 // (x1,y1) is the known point before given value, 9109 // (x3,y3) is the known point after given value. 9110 let i1; 9111 let i3; 9112 this.interpolate = function interpolate(x2) { 9113 if (!x2) return 0; 9114 9115 // Get the indexes of x1 and x3 (the array indexes before and after given x2): 9116 i3 = binarySearch(this.x, x2); 9117 i1 = i3 - 1; 9118 9119 // We have our indexes i1 & i3, so we can calculate already: 9120 // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 9121 return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; 9122 }; 9123 return this; 9124 } 9125 function getInterpolateFunction(c) { 9126 swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid); 9127 } 9128 function setTranslate(_t, byController) { 9129 const controlled = swiper.controller.control; 9130 let multiplier; 9131 let controlledTranslate; 9132 const Swiper = swiper.constructor; 9133 function setControlledTranslate(c) { 9134 if (c.destroyed) return; 9135 9136 // this will create an Interpolate function based on the snapGrids 9137 // x is the Grid of the scrolled scroller and y will be the controlled scroller 9138 // it makes sense to create this only once and recall it for the interpolation 9139 // the function does a lot of value caching for performance 9140 const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; 9141 if (swiper.params.controller.by === 'slide') { 9142 getInterpolateFunction(c); 9143 // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid 9144 // but it did not work out 9145 controlledTranslate = -swiper.controller.spline.interpolate(-translate); 9146 } 9147 if (!controlledTranslate || swiper.params.controller.by === 'container') { 9148 multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); 9149 if (Number.isNaN(multiplier) || !Number.isFinite(multiplier)) { 9150 multiplier = 1; 9151 } 9152 controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); 9153 } 9154 if (swiper.params.controller.inverse) { 9155 controlledTranslate = c.maxTranslate() - controlledTranslate; 9156 } 9157 c.updateProgress(controlledTranslate); 9158 c.setTranslate(controlledTranslate, swiper); 9159 c.updateActiveIndex(); 9160 c.updateSlidesClasses(); 9161 } 9162 if (Array.isArray(controlled)) { 9163 for (let i = 0; i < controlled.length; i += 1) { 9164 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 9165 setControlledTranslate(controlled[i]); 9166 } 9167 } 9168 } else if (controlled instanceof Swiper && byController !== controlled) { 9169 setControlledTranslate(controlled); 9170 } 9171 } 9172 function setTransition(duration, byController) { 9173 const Swiper = swiper.constructor; 9174 const controlled = swiper.controller.control; 9175 let i; 9176 function setControlledTransition(c) { 9177 if (c.destroyed) return; 9178 c.setTransition(duration, swiper); 9179 if (duration !== 0) { 9180 c.transitionStart(); 9181 if (c.params.autoHeight) { 9182 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.n)(() => { 9183 c.updateAutoHeight(); 9184 }); 9185 } 9186 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.j)(c.wrapperEl, () => { 9187 if (!controlled) return; 9188 c.transitionEnd(); 9189 }); 9190 } 9191 } 9192 if (Array.isArray(controlled)) { 9193 for (i = 0; i < controlled.length; i += 1) { 9194 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 9195 setControlledTransition(controlled[i]); 9196 } 9197 } 9198 } else if (controlled instanceof Swiper && byController !== controlled) { 9199 setControlledTransition(controlled); 9200 } 9201 } 9202 function removeSpline() { 9203 if (!swiper.controller.control) return; 9204 if (swiper.controller.spline) { 9205 swiper.controller.spline = undefined; 9206 delete swiper.controller.spline; 9207 } 9208 } 9209 on('beforeInit', () => { 9210 if (typeof window !== 'undefined' && ( 9211 // eslint-disable-line 9212 typeof swiper.params.controller.control === 'string' || swiper.params.controller.control instanceof HTMLElement)) { 9213 const controlElement = document.querySelector(swiper.params.controller.control); 9214 if (controlElement && controlElement.swiper) { 9215 swiper.controller.control = controlElement.swiper; 9216 } else if (controlElement) { 9217 const onControllerSwiper = e => { 9218 swiper.controller.control = e.detail[0]; 9219 swiper.update(); 9220 controlElement.removeEventListener('init', onControllerSwiper); 9221 }; 9222 controlElement.addEventListener('init', onControllerSwiper); 9223 } 9224 return; 9225 } 9226 swiper.controller.control = swiper.params.controller.control; 9227 }); 9228 on('update', () => { 9229 removeSpline(); 9230 }); 9231 on('resize', () => { 9232 removeSpline(); 9233 }); 9234 on('observerUpdate', () => { 9235 removeSpline(); 9236 }); 9237 on('setTranslate', (_s, translate, byController) => { 9238 if (!swiper.controller.control || swiper.controller.control.destroyed) return; 9239 swiper.controller.setTranslate(translate, byController); 9240 }); 9241 on('setTransition', (_s, duration, byController) => { 9242 if (!swiper.controller.control || swiper.controller.control.destroyed) return; 9243 swiper.controller.setTransition(duration, byController); 9244 }); 9245 Object.assign(swiper.controller, { 9246 setTranslate, 9247 setTransition 9248 }); 9249} 9250 9251 9252 9253 9254/***/ }), 9255
vendor: 5,910 bytes, lines 9256-9400
9256/***/ "./node_modules/swiper/modules/effect-cards.mjs": 9257/*!******************************************************!*\ 9258 !*** ./node_modules/swiper/modules/effect-cards.mjs ***! 9259 \******************************************************/ 9260/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9261 9262"use strict"; 9263__webpack_require__.r(__webpack_exports__); 9264/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9265/* harmony export */ "default": () => (/* binding */ EffectCards) 9266/* harmony export */ }); 9267/* harmony import */ var _shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/create-shadow.mjs */ "./node_modules/swiper/shared/create-shadow.mjs"); 9268/* harmony import */ var _shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/effect-init.mjs */ "./node_modules/swiper/shared/effect-init.mjs"); 9269/* harmony import */ var _shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/effect-target.mjs */ "./node_modules/swiper/shared/effect-target.mjs"); 9270/* harmony import */ var _shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/effect-virtual-transition-end.mjs */ "./node_modules/swiper/shared/effect-virtual-transition-end.mjs"); 9271/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9272 9273 9274 9275 9276 9277 9278function EffectCards(_ref) { 9279 let { 9280 swiper, 9281 extendParams, 9282 on 9283 } = _ref; 9284 extendParams({ 9285 cardsEffect: { 9286 slideShadows: true, 9287 rotate: true, 9288 perSlideRotate: 2, 9289 perSlideOffset: 8 9290 } 9291 }); 9292 const setTranslate = () => { 9293 const { 9294 slides, 9295 activeIndex, 9296 rtlTranslate: rtl 9297 } = swiper; 9298 const params = swiper.params.cardsEffect; 9299 const { 9300 startTranslate, 9301 isTouched 9302 } = swiper.touchEventsData; 9303 const currentTranslate = rtl ? -swiper.translate : swiper.translate; 9304 for (let i = 0; i < slides.length; i += 1) { 9305 const slideEl = slides[i]; 9306 const slideProgress = slideEl.progress; 9307 const progress = Math.min(Math.max(slideProgress, -4), 4); 9308 let offset = slideEl.swiperSlideOffset; 9309 if (swiper.params.centeredSlides && !swiper.params.cssMode) { 9310 swiper.wrapperEl.style.transform = `translateX(${swiper.minTranslate()}px)`; 9311 } 9312 if (swiper.params.centeredSlides && swiper.params.cssMode) { 9313 offset -= slides[0].swiperSlideOffset; 9314 } 9315 let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset; 9316 let tY = 0; 9317 const tZ = -100 * Math.abs(progress); 9318 let scale = 1; 9319 let rotate = -params.perSlideRotate * progress; 9320 let tXAdd = params.perSlideOffset - Math.abs(progress) * 0.75; 9321 const slideIndex = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.from + i : i; 9322 const isSwipeToNext = (slideIndex === activeIndex || slideIndex === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate; 9323 const isSwipeToPrev = (slideIndex === activeIndex || slideIndex === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate; 9324 if (isSwipeToNext || isSwipeToPrev) { 9325 const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5; 9326 rotate += -28 * progress * subProgress; 9327 scale += -0.5 * subProgress; 9328 tXAdd += 96 * subProgress; 9329 tY = `${-25 * subProgress * Math.abs(progress)}%`; 9330 } 9331 if (progress < 0) { 9332 // next 9333 tX = `calc(${tX}px ${rtl ? '-' : '+'} (${tXAdd * Math.abs(progress)}%))`; 9334 } else if (progress > 0) { 9335 // prev 9336 tX = `calc(${tX}px ${rtl ? '-' : '+'} (-${tXAdd * Math.abs(progress)}%))`; 9337 } else { 9338 tX = `${tX}px`; 9339 } 9340 if (!swiper.isHorizontal()) { 9341 const prevY = tY; 9342 tY = tX; 9343 tX = prevY; 9344 } 9345 const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`; 9346 9347 /* eslint-disable */ 9348 const transform = ` 9349 translate3d(${tX}, ${tY}, ${tZ}px) 9350 rotateZ(${params.rotate ? rtl ? -rotate : rotate : 0}deg) 9351 scale(${scaleString}) 9352 `; 9353 /* eslint-enable */ 9354 9355 if (params.slideShadows) { 9356 // Set shadows 9357 let shadowEl = slideEl.querySelector('.swiper-slide-shadow'); 9358 if (!shadowEl) { 9359 shadowEl = (0,_shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('cards', slideEl); 9360 } 9361 if (shadowEl) shadowEl.style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1); 9362 } 9363 slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; 9364 const targetEl = (0,_shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__.e)(params, slideEl); 9365 targetEl.style.transform = transform; 9366 } 9367 }; 9368 const setTransition = duration => { 9369 const transformElements = swiper.slides.map(slideEl => (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_4__.l)(slideEl)); 9370 transformElements.forEach(el => { 9371 el.style.transitionDuration = `${duration}ms`; 9372 el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => { 9373 shadowEl.style.transitionDuration = `${duration}ms`; 9374 }); 9375 }); 9376 (0,_shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_3__.e)({ 9377 swiper, 9378 duration, 9379 transformElements 9380 }); 9381 }; 9382 (0,_shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__.e)({ 9383 effect: 'cards', 9384 swiper, 9385 on, 9386 setTranslate, 9387 setTransition, 9388 perspective: () => true, 9389 overwriteParams: () => ({ 9390 watchSlidesProgress: true, 9391 virtualTranslate: !swiper.params.cssMode 9392 }) 9393 }); 9394} 9395 9396 9397 9398 9399/***/ }), 9400
vendor: 5,847 bytes, lines 9401-9530
9401/***/ "./node_modules/swiper/modules/effect-coverflow.mjs": 9402/*!**********************************************************!*\ 9403 !*** ./node_modules/swiper/modules/effect-coverflow.mjs ***! 9404 \**********************************************************/ 9405/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9406 9407"use strict"; 9408__webpack_require__.r(__webpack_exports__); 9409/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9410/* harmony export */ "default": () => (/* binding */ EffectCoverflow) 9411/* harmony export */ }); 9412/* harmony import */ var _shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/create-shadow.mjs */ "./node_modules/swiper/shared/create-shadow.mjs"); 9413/* harmony import */ var _shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/effect-init.mjs */ "./node_modules/swiper/shared/effect-init.mjs"); 9414/* harmony import */ var _shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/effect-target.mjs */ "./node_modules/swiper/shared/effect-target.mjs"); 9415/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9416 9417 9418 9419 9420 9421function EffectCoverflow(_ref) { 9422 let { 9423 swiper, 9424 extendParams, 9425 on 9426 } = _ref; 9427 extendParams({ 9428 coverflowEffect: { 9429 rotate: 50, 9430 stretch: 0, 9431 depth: 100, 9432 scale: 1, 9433 modifier: 1, 9434 slideShadows: true 9435 } 9436 }); 9437 const setTranslate = () => { 9438 const { 9439 width: swiperWidth, 9440 height: swiperHeight, 9441 slides, 9442 slidesSizesGrid 9443 } = swiper; 9444 const params = swiper.params.coverflowEffect; 9445 const isHorizontal = swiper.isHorizontal(); 9446 const transform = swiper.translate; 9447 const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; 9448 const rotate = isHorizontal ? params.rotate : -params.rotate; 9449 const translate = params.depth; 9450 // Each slide offset from center 9451 for (let i = 0, length = slides.length; i < length; i += 1) { 9452 const slideEl = slides[i]; 9453 const slideSize = slidesSizesGrid[i]; 9454 const slideOffset = slideEl.swiperSlideOffset; 9455 const centerOffset = (center - slideOffset - slideSize / 2) / slideSize; 9456 const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier; 9457 let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; 9458 let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; 9459 // var rotateZ = 0 9460 let translateZ = -translate * Math.abs(offsetMultiplier); 9461 let stretch = params.stretch; 9462 // Allow percentage to make a relative stretch for responsive sliders 9463 if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { 9464 stretch = parseFloat(params.stretch) / 100 * slideSize; 9465 } 9466 let translateY = isHorizontal ? 0 : stretch * offsetMultiplier; 9467 let translateX = isHorizontal ? stretch * offsetMultiplier : 0; 9468 let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); 9469 9470 // Fix for ultra small values 9471 if (Math.abs(translateX) < 0.001) translateX = 0; 9472 if (Math.abs(translateY) < 0.001) translateY = 0; 9473 if (Math.abs(translateZ) < 0.001) translateZ = 0; 9474 if (Math.abs(rotateY) < 0.001) rotateY = 0; 9475 if (Math.abs(rotateX) < 0.001) rotateX = 0; 9476 if (Math.abs(scale) < 0.001) scale = 0; 9477 if (swiper.browser && swiper.browser.isSafari) { 9478 if (Math.abs(rotateY) / 90 % 2 === 1) { 9479 rotateY += 0.001; 9480 } 9481 if (Math.abs(rotateX) / 90 % 2 === 1) { 9482 rotateX += 0.001; 9483 } 9484 } 9485 const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`; 9486 const targetEl = (0,_shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__.e)(params, slideEl); 9487 targetEl.style.transform = slideTransform; 9488 slideEl.style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; 9489 if (params.slideShadows) { 9490 // Set shadows 9491 let shadowBeforeEl = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top'); 9492 let shadowAfterEl = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom'); 9493 if (!shadowBeforeEl) { 9494 shadowBeforeEl = (0,_shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('coverflow', slideEl, isHorizontal ? 'left' : 'top'); 9495 } 9496 if (!shadowAfterEl) { 9497 shadowAfterEl = (0,_shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('coverflow', slideEl, isHorizontal ? 'right' : 'bottom'); 9498 } 9499 if (shadowBeforeEl) shadowBeforeEl.style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; 9500 if (shadowAfterEl) shadowAfterEl.style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; 9501 } 9502 } 9503 }; 9504 const setTransition = duration => { 9505 const transformElements = swiper.slides.map(slideEl => (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_3__.l)(slideEl)); 9506 transformElements.forEach(el => { 9507 el.style.transitionDuration = `${duration}ms`; 9508 el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => { 9509 shadowEl.style.transitionDuration = `${duration}ms`; 9510 }); 9511 }); 9512 }; 9513 (0,_shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__.e)({ 9514 effect: 'coverflow', 9515 swiper, 9516 on, 9517 setTranslate, 9518 setTransition, 9519 perspective: () => true, 9520 overwriteParams: () => ({ 9521 watchSlidesProgress: true 9522 }) 9523 }); 9524} 9525 9526 9527 9528 9529/***/ }), 9530
vendor: 6,469 bytes, lines 9531-9698
9531/***/ "./node_modules/swiper/modules/effect-creative.mjs": 9532/*!*********************************************************!*\ 9533 !*** ./node_modules/swiper/modules/effect-creative.mjs ***! 9534 \*********************************************************/ 9535/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9536 9537"use strict"; 9538__webpack_require__.r(__webpack_exports__); 9539/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9540/* harmony export */ "default": () => (/* binding */ EffectCreative) 9541/* harmony export */ }); 9542/* harmony import */ var _shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/create-shadow.mjs */ "./node_modules/swiper/shared/create-shadow.mjs"); 9543/* harmony import */ var _shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/effect-init.mjs */ "./node_modules/swiper/shared/effect-init.mjs"); 9544/* harmony import */ var _shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/effect-target.mjs */ "./node_modules/swiper/shared/effect-target.mjs"); 9545/* harmony import */ var _shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/effect-virtual-transition-end.mjs */ "./node_modules/swiper/shared/effect-virtual-transition-end.mjs"); 9546/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9547 9548 9549 9550 9551 9552 9553function EffectCreative(_ref) { 9554 let { 9555 swiper, 9556 extendParams, 9557 on 9558 } = _ref; 9559 extendParams({ 9560 creativeEffect: { 9561 limitProgress: 1, 9562 shadowPerProgress: false, 9563 progressMultiplier: 1, 9564 perspective: true, 9565 prev: { 9566 translate: [0, 0, 0], 9567 rotate: [0, 0, 0], 9568 opacity: 1, 9569 scale: 1 9570 }, 9571 next: { 9572 translate: [0, 0, 0], 9573 rotate: [0, 0, 0], 9574 opacity: 1, 9575 scale: 1 9576 } 9577 } 9578 }); 9579 const getTranslateValue = value => { 9580 if (typeof value === 'string') return value; 9581 return `${value}px`; 9582 }; 9583 const setTranslate = () => { 9584 const { 9585 slides, 9586 wrapperEl, 9587 slidesSizesGrid 9588 } = swiper; 9589 const params = swiper.params.creativeEffect; 9590 const { 9591 progressMultiplier: multiplier 9592 } = params; 9593 const isCenteredSlides = swiper.params.centeredSlides; 9594 if (isCenteredSlides) { 9595 const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0; 9596 wrapperEl.style.transform = `translateX(calc(50% - ${margin}px))`; 9597 } 9598 for (let i = 0; i < slides.length; i += 1) { 9599 const slideEl = slides[i]; 9600 const slideProgress = slideEl.progress; 9601 const progress = Math.min(Math.max(slideEl.progress, -params.limitProgress), params.limitProgress); 9602 let originalProgress = progress; 9603 if (!isCenteredSlides) { 9604 originalProgress = Math.min(Math.max(slideEl.originalProgress, -params.limitProgress), params.limitProgress); 9605 } 9606 const offset = slideEl.swiperSlideOffset; 9607 const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0]; 9608 const r = [0, 0, 0]; 9609 let custom = false; 9610 if (!swiper.isHorizontal()) { 9611 t[1] = t[0]; 9612 t[0] = 0; 9613 } 9614 let data = { 9615 translate: [0, 0, 0], 9616 rotate: [0, 0, 0], 9617 scale: 1, 9618 opacity: 1 9619 }; 9620 if (progress < 0) { 9621 data = params.next; 9622 custom = true; 9623 } else if (progress > 0) { 9624 data = params.prev; 9625 custom = true; 9626 } 9627 // set translate 9628 t.forEach((value, index) => { 9629 t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`; 9630 }); 9631 // set rotates 9632 r.forEach((value, index) => { 9633 let val = data.rotate[index] * Math.abs(progress * multiplier); 9634 if (swiper.browser && swiper.browser.isSafari && Math.abs(val) / 90 % 2 === 1) { 9635 val += 0.001; 9636 } 9637 r[index] = val; 9638 }); 9639 slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; 9640 const translateString = t.join(', '); 9641 const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`; 9642 const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`; 9643 const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier; 9644 const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; 9645 9646 // Set shadows 9647 if (custom && data.shadow || !custom) { 9648 let shadowEl = slideEl.querySelector('.swiper-slide-shadow'); 9649 if (!shadowEl && data.shadow) { 9650 shadowEl = (0,_shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('creative', slideEl); 9651 } 9652 if (shadowEl) { 9653 const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress; 9654 shadowEl.style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1); 9655 } 9656 } 9657 const targetEl = (0,_shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__.e)(params, slideEl); 9658 targetEl.style.transform = transform; 9659 targetEl.style.opacity = opacityString; 9660 if (data.origin) { 9661 targetEl.style.transformOrigin = data.origin; 9662 } 9663 } 9664 }; 9665 const setTransition = duration => { 9666 const transformElements = swiper.slides.map(slideEl => (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_4__.l)(slideEl)); 9667 transformElements.forEach(el => { 9668 el.style.transitionDuration = `${duration}ms`; 9669 el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => { 9670 shadowEl.style.transitionDuration = `${duration}ms`; 9671 }); 9672 }); 9673 (0,_shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_3__.e)({ 9674 swiper, 9675 duration, 9676 transformElements, 9677 allSlides: true 9678 }); 9679 }; 9680 (0,_shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__.e)({ 9681 effect: 'creative', 9682 swiper, 9683 on, 9684 setTranslate, 9685 setTransition, 9686 perspective: () => swiper.params.creativeEffect.perspective, 9687 overwriteParams: () => ({ 9688 watchSlidesProgress: true, 9689 virtualTranslate: !swiper.params.cssMode 9690 }) 9691 }); 9692} 9693 9694 9695 9696 9697/***/ }), 9698
vendor: 7,671 bytes, lines 9699-9891
9699/***/ "./node_modules/swiper/modules/effect-cube.mjs": 9700/*!*****************************************************!*\ 9701 !*** ./node_modules/swiper/modules/effect-cube.mjs ***! 9702 \*****************************************************/ 9703/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9704 9705"use strict"; 9706__webpack_require__.r(__webpack_exports__); 9707/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9708/* harmony export */ "default": () => (/* binding */ EffectCube) 9709/* harmony export */ }); 9710/* harmony import */ var _shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/effect-init.mjs */ "./node_modules/swiper/shared/effect-init.mjs"); 9711/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9712 9713 9714 9715function EffectCube(_ref) { 9716 let { 9717 swiper, 9718 extendParams, 9719 on 9720 } = _ref; 9721 extendParams({ 9722 cubeEffect: { 9723 slideShadows: true, 9724 shadow: true, 9725 shadowOffset: 20, 9726 shadowScale: 0.94 9727 } 9728 }); 9729 const createSlideShadows = (slideEl, progress, isHorizontal) => { 9730 let shadowBefore = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top'); 9731 let shadowAfter = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom'); 9732 if (!shadowBefore) { 9733 shadowBefore = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}`.split(' ')); 9734 slideEl.append(shadowBefore); 9735 } 9736 if (!shadowAfter) { 9737 shadowAfter = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}`.split(' ')); 9738 slideEl.append(shadowAfter); 9739 } 9740 if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0); 9741 if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0); 9742 }; 9743 const recreateShadows = () => { 9744 // create new ones 9745 const isHorizontal = swiper.isHorizontal(); 9746 swiper.slides.forEach(slideEl => { 9747 const progress = Math.max(Math.min(slideEl.progress, 1), -1); 9748 createSlideShadows(slideEl, progress, isHorizontal); 9749 }); 9750 }; 9751 const setTranslate = () => { 9752 const { 9753 el, 9754 wrapperEl, 9755 slides, 9756 width: swiperWidth, 9757 height: swiperHeight, 9758 rtlTranslate: rtl, 9759 size: swiperSize, 9760 browser 9761 } = swiper; 9762 const params = swiper.params.cubeEffect; 9763 const isHorizontal = swiper.isHorizontal(); 9764 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 9765 let wrapperRotate = 0; 9766 let cubeShadowEl; 9767 if (params.shadow) { 9768 if (isHorizontal) { 9769 cubeShadowEl = swiper.wrapperEl.querySelector('.swiper-cube-shadow'); 9770 if (!cubeShadowEl) { 9771 cubeShadowEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', 'swiper-cube-shadow'); 9772 swiper.wrapperEl.append(cubeShadowEl); 9773 } 9774 cubeShadowEl.style.height = `${swiperWidth}px`; 9775 } else { 9776 cubeShadowEl = el.querySelector('.swiper-cube-shadow'); 9777 if (!cubeShadowEl) { 9778 cubeShadowEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', 'swiper-cube-shadow'); 9779 el.append(cubeShadowEl); 9780 } 9781 } 9782 } 9783 for (let i = 0; i < slides.length; i += 1) { 9784 const slideEl = slides[i]; 9785 let slideIndex = i; 9786 if (isVirtual) { 9787 slideIndex = parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10); 9788 } 9789 let slideAngle = slideIndex * 90; 9790 let round = Math.floor(slideAngle / 360); 9791 if (rtl) { 9792 slideAngle = -slideAngle; 9793 round = Math.floor(-slideAngle / 360); 9794 } 9795 const progress = Math.max(Math.min(slideEl.progress, 1), -1); 9796 let tx = 0; 9797 let ty = 0; 9798 let tz = 0; 9799 if (slideIndex % 4 === 0) { 9800 tx = -round * 4 * swiperSize; 9801 tz = 0; 9802 } else if ((slideIndex - 1) % 4 === 0) { 9803 tx = 0; 9804 tz = -round * 4 * swiperSize; 9805 } else if ((slideIndex - 2) % 4 === 0) { 9806 tx = swiperSize + round * 4 * swiperSize; 9807 tz = swiperSize; 9808 } else if ((slideIndex - 3) % 4 === 0) { 9809 tx = -swiperSize; 9810 tz = 3 * swiperSize + swiperSize * 4 * round; 9811 } 9812 if (rtl) { 9813 tx = -tx; 9814 } 9815 if (!isHorizontal) { 9816 ty = tx; 9817 tx = 0; 9818 } 9819 const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; 9820 if (progress <= 1 && progress > -1) { 9821 wrapperRotate = slideIndex * 90 + progress * 90; 9822 if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; 9823 if (swiper.browser && swiper.browser.isSafari && Math.abs(wrapperRotate) / 90 % 2 === 1) { 9824 wrapperRotate += 0.001; 9825 } 9826 } 9827 slideEl.style.transform = transform; 9828 if (params.slideShadows) { 9829 createSlideShadows(slideEl, progress, isHorizontal); 9830 } 9831 } 9832 wrapperEl.style.transformOrigin = `50% 50% -${swiperSize / 2}px`; 9833 wrapperEl.style['-webkit-transform-origin'] = `50% 50% -${swiperSize / 2}px`; 9834 if (params.shadow) { 9835 if (isHorizontal) { 9836 cubeShadowEl.style.transform = `translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(89.99deg) rotateZ(0deg) scale(${params.shadowScale})`; 9837 } else { 9838 const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; 9839 const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); 9840 const scale1 = params.shadowScale; 9841 const scale2 = params.shadowScale / multiplier; 9842 const offset = params.shadowOffset; 9843 cubeShadowEl.style.transform = `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-89.99deg)`; 9844 } 9845 } 9846 const zFactor = (browser.isSafari || browser.isWebView) && browser.needPerspectiveFix ? -swiperSize / 2 : 0; 9847 wrapperEl.style.transform = `translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`; 9848 wrapperEl.style.setProperty('--swiper-cube-translate-z', `${zFactor}px`); 9849 }; 9850 const setTransition = duration => { 9851 const { 9852 el, 9853 slides 9854 } = swiper; 9855 slides.forEach(slideEl => { 9856 slideEl.style.transitionDuration = `${duration}ms`; 9857 slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(subEl => { 9858 subEl.style.transitionDuration = `${duration}ms`; 9859 }); 9860 }); 9861 if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { 9862 const shadowEl = el.querySelector('.swiper-cube-shadow'); 9863 if (shadowEl) shadowEl.style.transitionDuration = `${duration}ms`; 9864 } 9865 }; 9866 (0,_shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_0__.e)({ 9867 effect: 'cube', 9868 swiper, 9869 on, 9870 setTranslate, 9871 setTransition, 9872 recreateShadows, 9873 getEffectParams: () => swiper.params.cubeEffect, 9874 perspective: () => true, 9875 overwriteParams: () => ({ 9876 slidesPerView: 1, 9877 slidesPerGroup: 1, 9878 watchSlidesProgress: true, 9879 resistanceRatio: 0, 9880 spaceBetween: 0, 9881 centeredSlides: false, 9882 virtualTranslate: true 9883 }) 9884 }); 9885} 9886 9887 9888 9889 9890/***/ }), 9891
vendor: 3,083 bytes, lines 9892-9976
9892/***/ "./node_modules/swiper/modules/effect-fade.mjs": 9893/*!*****************************************************!*\ 9894 !*** ./node_modules/swiper/modules/effect-fade.mjs ***! 9895 \*****************************************************/ 9896/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9897 9898"use strict"; 9899__webpack_require__.r(__webpack_exports__); 9900/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9901/* harmony export */ "default": () => (/* binding */ EffectFade) 9902/* harmony export */ }); 9903/* harmony import */ var _shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/effect-init.mjs */ "./node_modules/swiper/shared/effect-init.mjs"); 9904/* harmony import */ var _shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/effect-target.mjs */ "./node_modules/swiper/shared/effect-target.mjs"); 9905/* harmony import */ var _shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/effect-virtual-transition-end.mjs */ "./node_modules/swiper/shared/effect-virtual-transition-end.mjs"); 9906/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9907 9908 9909 9910 9911 9912function EffectFade(_ref) { 9913 let { 9914 swiper, 9915 extendParams, 9916 on 9917 } = _ref; 9918 extendParams({ 9919 fadeEffect: { 9920 crossFade: false 9921 } 9922 }); 9923 const setTranslate = () => { 9924 const { 9925 slides 9926 } = swiper; 9927 const params = swiper.params.fadeEffect; 9928 for (let i = 0; i < slides.length; i += 1) { 9929 const slideEl = swiper.slides[i]; 9930 const offset = slideEl.swiperSlideOffset; 9931 let tx = -offset; 9932 if (!swiper.params.virtualTranslate) tx -= swiper.translate; 9933 let ty = 0; 9934 if (!swiper.isHorizontal()) { 9935 ty = tx; 9936 tx = 0; 9937 } 9938 const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(slideEl.progress), 0) : 1 + Math.min(Math.max(slideEl.progress, -1), 0); 9939 const targetEl = (0,_shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(params, slideEl); 9940 targetEl.style.opacity = slideOpacity; 9941 targetEl.style.transform = `translate3d(${tx}px, ${ty}px, 0px)`; 9942 } 9943 }; 9944 const setTransition = duration => { 9945 const transformElements = swiper.slides.map(slideEl => (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_3__.l)(slideEl)); 9946 transformElements.forEach(el => { 9947 el.style.transitionDuration = `${duration}ms`; 9948 }); 9949 (0,_shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_2__.e)({ 9950 swiper, 9951 duration, 9952 transformElements, 9953 allSlides: true 9954 }); 9955 }; 9956 (0,_shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_0__.e)({ 9957 effect: 'fade', 9958 swiper, 9959 on, 9960 setTranslate, 9961 setTransition, 9962 overwriteParams: () => ({ 9963 slidesPerView: 1, 9964 slidesPerGroup: 1, 9965 watchSlidesProgress: true, 9966 spaceBetween: 0, 9967 virtualTranslate: !swiper.params.cssMode 9968 }) 9969 }); 9970} 9971 9972 9973 9974 9975/***/ }), 9976
vendor: 5,445 bytes, lines 9977-10114
9977/***/ "./node_modules/swiper/modules/effect-flip.mjs": 9978/*!*****************************************************!*\ 9979 !*** ./node_modules/swiper/modules/effect-flip.mjs ***! 9980 \*****************************************************/ 9981/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 9982 9983"use strict"; 9984__webpack_require__.r(__webpack_exports__); 9985/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9986/* harmony export */ "default": () => (/* binding */ EffectFlip) 9987/* harmony export */ }); 9988/* harmony import */ var _shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/create-shadow.mjs */ "./node_modules/swiper/shared/create-shadow.mjs"); 9989/* harmony import */ var _shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/effect-init.mjs */ "./node_modules/swiper/shared/effect-init.mjs"); 9990/* harmony import */ var _shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/effect-target.mjs */ "./node_modules/swiper/shared/effect-target.mjs"); 9991/* harmony import */ var _shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/effect-virtual-transition-end.mjs */ "./node_modules/swiper/shared/effect-virtual-transition-end.mjs"); 9992/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 9993 9994 9995 9996 9997 9998 9999function EffectFlip(_ref) { 10000 let { 10001 swiper, 10002 extendParams, 10003 on 10004 } = _ref; 10005 extendParams({ 10006 flipEffect: { 10007 slideShadows: true, 10008 limitRotation: true 10009 } 10010 }); 10011 const createSlideShadows = (slideEl, progress) => { 10012 let shadowBefore = swiper.isHorizontal() ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top'); 10013 let shadowAfter = swiper.isHorizontal() ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom'); 10014 if (!shadowBefore) { 10015 shadowBefore = (0,_shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('flip', slideEl, swiper.isHorizontal() ? 'left' : 'top'); 10016 } 10017 if (!shadowAfter) { 10018 shadowAfter = (0,_shared_create_shadow_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('flip', slideEl, swiper.isHorizontal() ? 'right' : 'bottom'); 10019 } 10020 if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0); 10021 if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0); 10022 }; 10023 const recreateShadows = () => { 10024 // Set shadows 10025 swiper.params.flipEffect; 10026 swiper.slides.forEach(slideEl => { 10027 let progress = slideEl.progress; 10028 if (swiper.params.flipEffect.limitRotation) { 10029 progress = Math.max(Math.min(slideEl.progress, 1), -1); 10030 } 10031 createSlideShadows(slideEl, progress); 10032 }); 10033 }; 10034 const setTranslate = () => { 10035 const { 10036 slides, 10037 rtlTranslate: rtl 10038 } = swiper; 10039 const params = swiper.params.flipEffect; 10040 for (let i = 0; i < slides.length; i += 1) { 10041 const slideEl = slides[i]; 10042 let progress = slideEl.progress; 10043 if (swiper.params.flipEffect.limitRotation) { 10044 progress = Math.max(Math.min(slideEl.progress, 1), -1); 10045 } 10046 const offset = slideEl.swiperSlideOffset; 10047 const rotate = -180 * progress; 10048 let rotateY = rotate; 10049 let rotateX = 0; 10050 let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset; 10051 let ty = 0; 10052 if (!swiper.isHorizontal()) { 10053 ty = tx; 10054 tx = 0; 10055 rotateX = -rotateY; 10056 rotateY = 0; 10057 } else if (rtl) { 10058 rotateY = -rotateY; 10059 } 10060 if (swiper.browser && swiper.browser.isSafari) { 10061 if (Math.abs(rotateY) / 90 % 2 === 1) { 10062 rotateY += 0.001; 10063 } 10064 if (Math.abs(rotateX) / 90 % 2 === 1) { 10065 rotateX += 0.001; 10066 } 10067 } 10068 slideEl.style.zIndex = -Math.abs(Math.round(progress)) + slides.length; 10069 if (params.slideShadows) { 10070 createSlideShadows(slideEl, progress); 10071 } 10072 const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; 10073 const targetEl = (0,_shared_effect_target_mjs__WEBPACK_IMPORTED_MODULE_2__.e)(params, slideEl); 10074 targetEl.style.transform = transform; 10075 } 10076 }; 10077 const setTransition = duration => { 10078 const transformElements = swiper.slides.map(slideEl => (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_4__.l)(slideEl)); 10079 transformElements.forEach(el => { 10080 el.style.transitionDuration = `${duration}ms`; 10081 el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => { 10082 shadowEl.style.transitionDuration = `${duration}ms`; 10083 }); 10084 }); 10085 (0,_shared_effect_virtual_transition_end_mjs__WEBPACK_IMPORTED_MODULE_3__.e)({ 10086 swiper, 10087 duration, 10088 transformElements 10089 }); 10090 }; 10091 (0,_shared_effect_init_mjs__WEBPACK_IMPORTED_MODULE_1__.e)({ 10092 effect: 'flip', 10093 swiper, 10094 on, 10095 setTranslate, 10096 setTransition, 10097 recreateShadows, 10098 getEffectParams: () => swiper.params.flipEffect, 10099 perspective: () => true, 10100 overwriteParams: () => ({ 10101 slidesPerView: 1, 10102 slidesPerGroup: 1, 10103 watchSlidesProgress: true, 10104 spaceBetween: 0, 10105 virtualTranslate: !swiper.params.cssMode 10106 }) 10107 }); 10108} 10109 10110 10111 10112 10113/***/ }), 10114
vendor: 9,241 bytes, lines 10115-10367
10115/***/ "./node_modules/swiper/modules/free-mode.mjs": 10116/*!***************************************************!*\ 10117 !*** ./node_modules/swiper/modules/free-mode.mjs ***! 10118 \***************************************************/ 10119/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10120 10121"use strict"; 10122__webpack_require__.r(__webpack_exports__); 10123/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10124/* harmony export */ "default": () => (/* binding */ freeMode) 10125/* harmony export */ }); 10126/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 10127 10128 10129function freeMode(_ref) { 10130 let { 10131 swiper, 10132 extendParams, 10133 emit, 10134 once 10135 } = _ref; 10136 extendParams({ 10137 freeMode: { 10138 enabled: false, 10139 momentum: true, 10140 momentumRatio: 1, 10141 momentumBounce: true, 10142 momentumBounceRatio: 1, 10143 momentumVelocityRatio: 1, 10144 sticky: false, 10145 minimumVelocity: 0.02 10146 } 10147 }); 10148 function onTouchStart() { 10149 if (swiper.params.cssMode) return; 10150 const translate = swiper.getTranslate(); 10151 swiper.setTranslate(translate); 10152 swiper.setTransition(0); 10153 swiper.touchEventsData.velocities.length = 0; 10154 swiper.freeMode.onTouchEnd({ 10155 currentPos: swiper.rtl ? swiper.translate : -swiper.translate 10156 }); 10157 } 10158 function onTouchMove() { 10159 if (swiper.params.cssMode) return; 10160 const { 10161 touchEventsData: data, 10162 touches 10163 } = swiper; 10164 // Velocity 10165 if (data.velocities.length === 0) { 10166 data.velocities.push({ 10167 position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], 10168 time: data.touchStartTime 10169 }); 10170 } 10171 data.velocities.push({ 10172 position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], 10173 time: (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.d)() 10174 }); 10175 } 10176 function onTouchEnd(_ref2) { 10177 let { 10178 currentPos 10179 } = _ref2; 10180 if (swiper.params.cssMode) return; 10181 const { 10182 params, 10183 wrapperEl, 10184 rtlTranslate: rtl, 10185 snapGrid, 10186 touchEventsData: data 10187 } = swiper; 10188 // Time diff 10189 const touchEndTime = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.d)(); 10190 const timeDiff = touchEndTime - data.touchStartTime; 10191 if (currentPos < -swiper.minTranslate()) { 10192 swiper.slideTo(swiper.activeIndex); 10193 return; 10194 } 10195 if (currentPos > -swiper.maxTranslate()) { 10196 if (swiper.slides.length < snapGrid.length) { 10197 swiper.slideTo(snapGrid.length - 1); 10198 } else { 10199 swiper.slideTo(swiper.slides.length - 1); 10200 } 10201 return; 10202 } 10203 if (params.freeMode.momentum) { 10204 if (data.velocities.length > 1) { 10205 const lastMoveEvent = data.velocities.pop(); 10206 const velocityEvent = data.velocities.pop(); 10207 const distance = lastMoveEvent.position - velocityEvent.position; 10208 const time = lastMoveEvent.time - velocityEvent.time; 10209 swiper.velocity = distance / time; 10210 swiper.velocity /= 2; 10211 if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) { 10212 swiper.velocity = 0; 10213 } 10214 // this implies that the user stopped moving a finger then released. 10215 // There would be no events with distance zero, so the last event is stale. 10216 if (time > 150 || (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.d)() - lastMoveEvent.time > 300) { 10217 swiper.velocity = 0; 10218 } 10219 } else { 10220 swiper.velocity = 0; 10221 } 10222 swiper.velocity *= params.freeMode.momentumVelocityRatio; 10223 data.velocities.length = 0; 10224 let momentumDuration = 1000 * params.freeMode.momentumRatio; 10225 const momentumDistance = swiper.velocity * momentumDuration; 10226 let newPosition = swiper.translate + momentumDistance; 10227 if (rtl) newPosition = -newPosition; 10228 let doBounce = false; 10229 let afterBouncePosition; 10230 const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio; 10231 let needsLoopFix; 10232 if (newPosition < swiper.maxTranslate()) { 10233 if (params.freeMode.momentumBounce) { 10234 if (newPosition + swiper.maxTranslate() < -bounceAmount) { 10235 newPosition = swiper.maxTranslate() - bounceAmount; 10236 } 10237 afterBouncePosition = swiper.maxTranslate(); 10238 doBounce = true; 10239 data.allowMomentumBounce = true; 10240 } else { 10241 newPosition = swiper.maxTranslate(); 10242 } 10243 if (params.loop && params.centeredSlides) needsLoopFix = true; 10244 } else if (newPosition > swiper.minTranslate()) { 10245 if (params.freeMode.momentumBounce) { 10246 if (newPosition - swiper.minTranslate() > bounceAmount) { 10247 newPosition = swiper.minTranslate() + bounceAmount; 10248 } 10249 afterBouncePosition = swiper.minTranslate(); 10250 doBounce = true; 10251 data.allowMomentumBounce = true; 10252 } else { 10253 newPosition = swiper.minTranslate(); 10254 } 10255 if (params.loop && params.centeredSlides) needsLoopFix = true; 10256 } else if (params.freeMode.sticky) { 10257 let nextSlide; 10258 for (let j = 0; j < snapGrid.length; j += 1) { 10259 if (snapGrid[j] > -newPosition) { 10260 nextSlide = j; 10261 break; 10262 } 10263 } 10264 if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { 10265 newPosition = snapGrid[nextSlide]; 10266 } else { 10267 newPosition = snapGrid[nextSlide - 1]; 10268 } 10269 newPosition = -newPosition; 10270 } 10271 if (needsLoopFix) { 10272 once('transitionEnd', () => { 10273 swiper.loopFix(); 10274 }); 10275 } 10276 // Fix duration 10277 if (swiper.velocity !== 0) { 10278 if (rtl) { 10279 momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); 10280 } else { 10281 momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); 10282 } 10283 if (params.freeMode.sticky) { 10284 // If freeMode.sticky is active and the user ends a swipe with a slow-velocity 10285 // event, then durations can be 20+ seconds to slide one (or zero!) slides. 10286 // It's easy to see this when simulating touch with mouse events. To fix this, 10287 // limit single-slide swipes to the default slide duration. This also has the 10288 // nice side effect of matching slide speed if the user stopped moving before 10289 // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. 10290 // For faster swipes, also apply limits (albeit higher ones). 10291 const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); 10292 const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; 10293 if (moveDistance < currentSlideSize) { 10294 momentumDuration = params.speed; 10295 } else if (moveDistance < 2 * currentSlideSize) { 10296 momentumDuration = params.speed * 1.5; 10297 } else { 10298 momentumDuration = params.speed * 2.5; 10299 } 10300 } 10301 } else if (params.freeMode.sticky) { 10302 swiper.slideToClosest(); 10303 return; 10304 } 10305 if (params.freeMode.momentumBounce && doBounce) { 10306 swiper.updateProgress(afterBouncePosition); 10307 swiper.setTransition(momentumDuration); 10308 swiper.setTranslate(newPosition); 10309 swiper.transitionStart(true, swiper.swipeDirection); 10310 swiper.animating = true; 10311 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.j)(wrapperEl, () => { 10312 if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; 10313 emit('momentumBounce'); 10314 swiper.setTransition(params.speed); 10315 setTimeout(() => { 10316 swiper.setTranslate(afterBouncePosition); 10317 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.j)(wrapperEl, () => { 10318 if (!swiper || swiper.destroyed) return; 10319 swiper.transitionEnd(); 10320 }); 10321 }, 0); 10322 }); 10323 } else if (swiper.velocity) { 10324 emit('_freeModeNoMomentumRelease'); 10325 swiper.updateProgress(newPosition); 10326 swiper.setTransition(momentumDuration); 10327 swiper.setTranslate(newPosition); 10328 swiper.transitionStart(true, swiper.swipeDirection); 10329 if (!swiper.animating) { 10330 swiper.animating = true; 10331 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.j)(wrapperEl, () => { 10332 if (!swiper || swiper.destroyed) return; 10333 swiper.transitionEnd(); 10334 }); 10335 } 10336 } else { 10337 swiper.updateProgress(newPosition); 10338 } 10339 swiper.updateActiveIndex(); 10340 swiper.updateSlidesClasses(); 10341 } else if (params.freeMode.sticky) { 10342 swiper.slideToClosest(); 10343 return; 10344 } else if (params.freeMode) { 10345 emit('_freeModeNoMomentumRelease'); 10346 } 10347 if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) { 10348 emit('_freeModeStaticRelease'); 10349 swiper.updateProgress(); 10350 swiper.updateActiveIndex(); 10351 swiper.updateSlidesClasses(); 10352 } 10353 } 10354 Object.assign(swiper, { 10355 freeMode: { 10356 onTouchStart, 10357 onTouchMove, 10358 onTouchEnd 10359 } 10360 }); 10361} 10362 10363 10364 10365 10366/***/ }), 10367
vendor: 5,711 bytes, lines 10368-10537
10368/***/ "./node_modules/swiper/modules/grid.mjs": 10369/*!**********************************************!*\ 10370 !*** ./node_modules/swiper/modules/grid.mjs ***! 10371 \**********************************************/ 10372/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10373 10374"use strict"; 10375__webpack_require__.r(__webpack_exports__); 10376/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10377/* harmony export */ "default": () => (/* binding */ Grid) 10378/* harmony export */ }); 10379function Grid(_ref) { 10380 let { 10381 swiper, 10382 extendParams, 10383 on 10384 } = _ref; 10385 extendParams({ 10386 grid: { 10387 rows: 1, 10388 fill: 'column' 10389 } 10390 }); 10391 let slidesNumberEvenToRows; 10392 let slidesPerRow; 10393 let numFullColumns; 10394 let wasMultiRow; 10395 const getSpaceBetween = () => { 10396 let spaceBetween = swiper.params.spaceBetween; 10397 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 10398 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size; 10399 } else if (typeof spaceBetween === 'string') { 10400 spaceBetween = parseFloat(spaceBetween); 10401 } 10402 return spaceBetween; 10403 }; 10404 const initSlides = slides => { 10405 const { 10406 slidesPerView 10407 } = swiper.params; 10408 const { 10409 rows, 10410 fill 10411 } = swiper.params.grid; 10412 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : slides.length; 10413 numFullColumns = Math.floor(slidesLength / rows); 10414 if (Math.floor(slidesLength / rows) === slidesLength / rows) { 10415 slidesNumberEvenToRows = slidesLength; 10416 } else { 10417 slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows; 10418 } 10419 if (slidesPerView !== 'auto' && fill === 'row') { 10420 slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows); 10421 } 10422 slidesPerRow = slidesNumberEvenToRows / rows; 10423 }; 10424 const unsetSlides = () => { 10425 if (swiper.slides) { 10426 swiper.slides.forEach(slide => { 10427 if (slide.swiperSlideGridSet) { 10428 slide.style.height = ''; 10429 slide.style[swiper.getDirectionLabel('margin-top')] = ''; 10430 } 10431 }); 10432 } 10433 }; 10434 const updateSlide = (i, slide, slides) => { 10435 const { 10436 slidesPerGroup 10437 } = swiper.params; 10438 const spaceBetween = getSpaceBetween(); 10439 const { 10440 rows, 10441 fill 10442 } = swiper.params.grid; 10443 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : slides.length; 10444 // Set slides order 10445 let newSlideOrderIndex; 10446 let column; 10447 let row; 10448 if (fill === 'row' && slidesPerGroup > 1) { 10449 const groupIndex = Math.floor(i / (slidesPerGroup * rows)); 10450 const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex; 10451 const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup); 10452 row = Math.floor(slideIndexInGroup / columnsInGroup); 10453 column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup; 10454 newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows; 10455 slide.style.order = newSlideOrderIndex; 10456 } else if (fill === 'column') { 10457 column = Math.floor(i / rows); 10458 row = i - column * rows; 10459 if (column > numFullColumns || column === numFullColumns && row === rows - 1) { 10460 row += 1; 10461 if (row >= rows) { 10462 row = 0; 10463 column += 1; 10464 } 10465 } 10466 } else { 10467 row = Math.floor(i / slidesPerRow); 10468 column = i - row * slidesPerRow; 10469 } 10470 slide.row = row; 10471 slide.column = column; 10472 slide.style.height = `calc((100% - ${(rows - 1) * spaceBetween}px) / ${rows})`; 10473 slide.style[swiper.getDirectionLabel('margin-top')] = row !== 0 ? spaceBetween && `${spaceBetween}px` : ''; 10474 slide.swiperSlideGridSet = true; 10475 }; 10476 const updateWrapperSize = (slideSize, snapGrid) => { 10477 const { 10478 centeredSlides, 10479 roundLengths 10480 } = swiper.params; 10481 const spaceBetween = getSpaceBetween(); 10482 const { 10483 rows 10484 } = swiper.params.grid; 10485 swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows; 10486 swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween; 10487 if (!swiper.params.cssMode) { 10488 swiper.wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`; 10489 } 10490 if (centeredSlides) { 10491 const newSlidesGrid = []; 10492 for (let i = 0; i < snapGrid.length; i += 1) { 10493 let slidesGridItem = snapGrid[i]; 10494 if (roundLengths) slidesGridItem = Math.floor(slidesGridItem); 10495 if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); 10496 } 10497 snapGrid.splice(0, snapGrid.length); 10498 snapGrid.push(...newSlidesGrid); 10499 } 10500 }; 10501 const onInit = () => { 10502 wasMultiRow = swiper.params.grid && swiper.params.grid.rows > 1; 10503 }; 10504 const onUpdate = () => { 10505 const { 10506 params, 10507 el 10508 } = swiper; 10509 const isMultiRow = params.grid && params.grid.rows > 1; 10510 if (wasMultiRow && !isMultiRow) { 10511 el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`); 10512 numFullColumns = 1; 10513 swiper.emitContainerClasses(); 10514 } else if (!wasMultiRow && isMultiRow) { 10515 el.classList.add(`${params.containerModifierClass}grid`); 10516 if (params.grid.fill === 'column') { 10517 el.classList.add(`${params.containerModifierClass}grid-column`); 10518 } 10519 swiper.emitContainerClasses(); 10520 } 10521 wasMultiRow = isMultiRow; 10522 }; 10523 on('init', onInit); 10524 on('update', onUpdate); 10525 swiper.grid = { 10526 initSlides, 10527 unsetSlides, 10528 updateSlide, 10529 updateWrapperSize 10530 }; 10531} 10532 10533 10534 10535 10536/***/ }), 10537
vendor: 4,412 bytes, lines 10538-10647
10538/***/ "./node_modules/swiper/modules/hash-navigation.mjs": 10539/*!*********************************************************!*\ 10540 !*** ./node_modules/swiper/modules/hash-navigation.mjs ***! 10541 \*********************************************************/ 10542/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10543 10544"use strict"; 10545__webpack_require__.r(__webpack_exports__); 10546/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10547/* harmony export */ "default": () => (/* binding */ HashNavigation) 10548/* harmony export */ }); 10549/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 10550/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 10551 10552 10553 10554function HashNavigation(_ref) { 10555 let { 10556 swiper, 10557 extendParams, 10558 emit, 10559 on 10560 } = _ref; 10561 let initialized = false; 10562 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 10563 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 10564 extendParams({ 10565 hashNavigation: { 10566 enabled: false, 10567 replaceState: false, 10568 watchState: false, 10569 getSlideIndex(_s, hash) { 10570 if (swiper.virtual && swiper.params.virtual.enabled) { 10571 const slideWithHash = swiper.slides.filter(slideEl => slideEl.getAttribute('data-hash') === hash)[0]; 10572 if (!slideWithHash) return 0; 10573 const index = parseInt(slideWithHash.getAttribute('data-swiper-slide-index'), 10); 10574 return index; 10575 } 10576 return swiper.getSlideIndex((0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(swiper.slidesEl, `.${swiper.params.slideClass}[data-hash="${hash}"], swiper-slide[data-hash="${hash}"]`)[0]); 10577 } 10578 } 10579 }); 10580 const onHashChange = () => { 10581 emit('hashChange'); 10582 const newHash = document.location.hash.replace('#', ''); 10583 const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex]; 10584 const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') : ''; 10585 if (newHash !== activeSlideHash) { 10586 const newIndex = swiper.params.hashNavigation.getSlideIndex(swiper, newHash); 10587 if (typeof newIndex === 'undefined' || Number.isNaN(newIndex)) return; 10588 swiper.slideTo(newIndex); 10589 } 10590 }; 10591 const setHash = () => { 10592 if (!initialized || !swiper.params.hashNavigation.enabled) return; 10593 const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex]; 10594 const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') || activeSlideEl.getAttribute('data-history') : ''; 10595 if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) { 10596 window.history.replaceState(null, null, `#${activeSlideHash}` || ''); 10597 emit('hashSet'); 10598 } else { 10599 document.location.hash = activeSlideHash || ''; 10600 emit('hashSet'); 10601 } 10602 }; 10603 const init = () => { 10604 if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; 10605 initialized = true; 10606 const hash = document.location.hash.replace('#', ''); 10607 if (hash) { 10608 const speed = 0; 10609 const index = swiper.params.hashNavigation.getSlideIndex(swiper, hash); 10610 swiper.slideTo(index || 0, speed, swiper.params.runCallbacksOnInit, true); 10611 } 10612 if (swiper.params.hashNavigation.watchState) { 10613 window.addEventListener('hashchange', onHashChange); 10614 } 10615 }; 10616 const destroy = () => { 10617 if (swiper.params.hashNavigation.watchState) { 10618 window.removeEventListener('hashchange', onHashChange); 10619 } 10620 }; 10621 on('init', () => { 10622 if (swiper.params.hashNavigation.enabled) { 10623 init(); 10624 } 10625 }); 10626 on('destroy', () => { 10627 if (swiper.params.hashNavigation.enabled) { 10628 destroy(); 10629 } 10630 }); 10631 on('transitionEnd _freeModeNoMomentumRelease', () => { 10632 if (initialized) { 10633 setHash(); 10634 } 10635 }); 10636 on('slideChange', () => { 10637 if (initialized && swiper.params.cssMode) { 10638 setHash(); 10639 } 10640 }); 10641} 10642 10643 10644 10645 10646/***/ }), 10647
vendor: 5,002 bytes, lines 10648-10805
10648/***/ "./node_modules/swiper/modules/history.mjs": 10649/*!*************************************************!*\ 10650 !*** ./node_modules/swiper/modules/history.mjs ***! 10651 \*************************************************/ 10652/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10653 10654"use strict"; 10655__webpack_require__.r(__webpack_exports__); 10656/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10657/* harmony export */ "default": () => (/* binding */ History) 10658/* harmony export */ }); 10659/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 10660 10661 10662function History(_ref) { 10663 let { 10664 swiper, 10665 extendParams, 10666 on 10667 } = _ref; 10668 extendParams({ 10669 history: { 10670 enabled: false, 10671 root: '', 10672 replaceState: false, 10673 key: 'slides', 10674 keepQuery: false 10675 } 10676 }); 10677 let initialized = false; 10678 let paths = {}; 10679 const slugify = text => { 10680 return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); 10681 }; 10682 const getPathValues = urlOverride => { 10683 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 10684 let location; 10685 if (urlOverride) { 10686 location = new URL(urlOverride); 10687 } else { 10688 location = window.location; 10689 } 10690 const pathArray = location.pathname.slice(1).split('/').filter(part => part !== ''); 10691 const total = pathArray.length; 10692 const key = pathArray[total - 2]; 10693 const value = pathArray[total - 1]; 10694 return { 10695 key, 10696 value 10697 }; 10698 }; 10699 const setHistory = (key, index) => { 10700 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 10701 if (!initialized || !swiper.params.history.enabled) return; 10702 let location; 10703 if (swiper.params.url) { 10704 location = new URL(swiper.params.url); 10705 } else { 10706 location = window.location; 10707 } 10708 const slide = swiper.slides[index]; 10709 let value = slugify(slide.getAttribute('data-history')); 10710 if (swiper.params.history.root.length > 0) { 10711 let root = swiper.params.history.root; 10712 if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1); 10713 value = `${root}/${key ? `${key}/` : ''}${value}`; 10714 } else if (!location.pathname.includes(key)) { 10715 value = `${key ? `${key}/` : ''}${value}`; 10716 } 10717 if (swiper.params.history.keepQuery) { 10718 value += location.search; 10719 } 10720 const currentState = window.history.state; 10721 if (currentState && currentState.value === value) { 10722 return; 10723 } 10724 if (swiper.params.history.replaceState) { 10725 window.history.replaceState({ 10726 value 10727 }, null, value); 10728 } else { 10729 window.history.pushState({ 10730 value 10731 }, null, value); 10732 } 10733 }; 10734 const scrollToSlide = (speed, value, runCallbacks) => { 10735 if (value) { 10736 for (let i = 0, length = swiper.slides.length; i < length; i += 1) { 10737 const slide = swiper.slides[i]; 10738 const slideHistory = slugify(slide.getAttribute('data-history')); 10739 if (slideHistory === value) { 10740 const index = swiper.getSlideIndex(slide); 10741 swiper.slideTo(index, speed, runCallbacks); 10742 } 10743 } 10744 } else { 10745 swiper.slideTo(0, speed, runCallbacks); 10746 } 10747 }; 10748 const setHistoryPopState = () => { 10749 paths = getPathValues(swiper.params.url); 10750 scrollToSlide(swiper.params.speed, paths.value, false); 10751 }; 10752 const init = () => { 10753 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 10754 if (!swiper.params.history) return; 10755 if (!window.history || !window.history.pushState) { 10756 swiper.params.history.enabled = false; 10757 swiper.params.hashNavigation.enabled = true; 10758 return; 10759 } 10760 initialized = true; 10761 paths = getPathValues(swiper.params.url); 10762 if (!paths.key && !paths.value) { 10763 if (!swiper.params.history.replaceState) { 10764 window.addEventListener('popstate', setHistoryPopState); 10765 } 10766 return; 10767 } 10768 scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit); 10769 if (!swiper.params.history.replaceState) { 10770 window.addEventListener('popstate', setHistoryPopState); 10771 } 10772 }; 10773 const destroy = () => { 10774 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 10775 if (!swiper.params.history.replaceState) { 10776 window.removeEventListener('popstate', setHistoryPopState); 10777 } 10778 }; 10779 on('init', () => { 10780 if (swiper.params.history.enabled) { 10781 init(); 10782 } 10783 }); 10784 on('destroy', () => { 10785 if (swiper.params.history.enabled) { 10786 destroy(); 10787 } 10788 }); 10789 on('transitionEnd _freeModeNoMomentumRelease', () => { 10790 if (initialized) { 10791 setHistory(swiper.params.history.key, swiper.activeIndex); 10792 } 10793 }); 10794 on('slideChange', () => { 10795 if (initialized && swiper.params.cssMode) { 10796 setHistory(swiper.params.history.key, swiper.activeIndex); 10797 } 10798 }); 10799} 10800 10801 10802 10803 10804/***/ }), 10805
vendor: 6,991 bytes, lines 10806-10887
10806/***/ "./node_modules/swiper/modules/index.mjs": 10807/*!***********************************************!*\ 10808 !*** ./node_modules/swiper/modules/index.mjs ***! 10809 \***********************************************/ 10810/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10811 10812"use strict"; 10813__webpack_require__.r(__webpack_exports__); 10814/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10815/* harmony export */ A11y: () => (/* reexport safe */ _a11y_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]), 10816/* harmony export */ Autoplay: () => (/* reexport safe */ _autoplay_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]), 10817/* harmony export */ Controller: () => (/* reexport safe */ _controller_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]), 10818/* harmony export */ EffectCards: () => (/* reexport safe */ _effect_cards_mjs__WEBPACK_IMPORTED_MODULE_22__["default"]), 10819/* harmony export */ EffectCoverflow: () => (/* reexport safe */ _effect_coverflow_mjs__WEBPACK_IMPORTED_MODULE_20__["default"]), 10820/* harmony export */ EffectCreative: () => (/* reexport safe */ _effect_creative_mjs__WEBPACK_IMPORTED_MODULE_21__["default"]), 10821/* harmony export */ EffectCube: () => (/* reexport safe */ _effect_cube_mjs__WEBPACK_IMPORTED_MODULE_18__["default"]), 10822/* harmony export */ EffectFade: () => (/* reexport safe */ _effect_fade_mjs__WEBPACK_IMPORTED_MODULE_17__["default"]), 10823/* harmony export */ EffectFlip: () => (/* reexport safe */ _effect_flip_mjs__WEBPACK_IMPORTED_MODULE_19__["default"]), 10824/* harmony export */ FreeMode: () => (/* reexport safe */ _free_mode_mjs__WEBPACK_IMPORTED_MODULE_14__["default"]), 10825/* harmony export */ Grid: () => (/* reexport safe */ _grid_mjs__WEBPACK_IMPORTED_MODULE_15__["default"]), 10826/* harmony export */ HashNavigation: () => (/* reexport safe */ _hash_navigation_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]), 10827/* harmony export */ History: () => (/* reexport safe */ _history_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]), 10828/* harmony export */ Keyboard: () => (/* reexport safe */ _keyboard_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]), 10829/* harmony export */ Manipulation: () => (/* reexport safe */ _manipulation_mjs__WEBPACK_IMPORTED_MODULE_16__["default"]), 10830/* harmony export */ Mousewheel: () => (/* reexport safe */ _mousewheel_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]), 10831/* harmony export */ Navigation: () => (/* reexport safe */ _navigation_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]), 10832/* harmony export */ Pagination: () => (/* reexport safe */ _pagination_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]), 10833/* harmony export */ Parallax: () => (/* reexport safe */ _parallax_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]), 10834/* harmony export */ Scrollbar: () => (/* reexport safe */ _scrollbar_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]), 10835/* harmony export */ Thumbs: () => (/* reexport safe */ _thumbs_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]), 10836/* harmony export */ Virtual: () => (/* reexport safe */ _virtual_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]), 10837/* harmony export */ Zoom: () => (/* reexport safe */ _zoom_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]) 10838/* harmony export */ }); 10839/* harmony import */ var _virtual_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./virtual.mjs */ "./node_modules/swiper/modules/virtual.mjs"); 10840/* harmony import */ var _keyboard_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keyboard.mjs */ "./node_modules/swiper/modules/keyboard.mjs"); 10841/* harmony import */ var _mousewheel_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mousewheel.mjs */ "./node_modules/swiper/modules/mousewheel.mjs"); 10842/* harmony import */ var _navigation_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./navigation.mjs */ "./node_modules/swiper/modules/navigation.mjs"); 10843/* harmony import */ var _pagination_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pagination.mjs */ "./node_modules/swiper/modules/pagination.mjs"); 10844/* harmony import */ var _scrollbar_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scrollbar.mjs */ "./node_modules/swiper/modules/scrollbar.mjs"); 10845/* harmony import */ var _parallax_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parallax.mjs */ "./node_modules/swiper/modules/parallax.mjs"); 10846/* harmony import */ var _zoom_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./zoom.mjs */ "./node_modules/swiper/modules/zoom.mjs"); 10847/* harmony import */ var _controller_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./controller.mjs */ "./node_modules/swiper/modules/controller.mjs"); 10848/* harmony import */ var _a11y_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./a11y.mjs */ "./node_modules/swiper/modules/a11y.mjs"); 10849/* harmony import */ var _history_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./history.mjs */ "./node_modules/swiper/modules/history.mjs"); 10850/* harmony import */ var _hash_navigation_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hash-navigation.mjs */ "./node_modules/swiper/modules/hash-navigation.mjs"); 10851/* harmony import */ var _autoplay_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./autoplay.mjs */ "./node_modules/swiper/modules/autoplay.mjs"); 10852/* harmony import */ var _thumbs_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./thumbs.mjs */ "./node_modules/swiper/modules/thumbs.mjs"); 10853/* harmony import */ var _free_mode_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./free-mode.mjs */ "./node_modules/swiper/modules/free-mode.mjs"); 10854/* harmony import */ var _grid_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./grid.mjs */ "./node_modules/swiper/modules/grid.mjs"); 10855/* harmony import */ var _manipulation_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./manipulation.mjs */ "./node_modules/swiper/modules/manipulation.mjs"); 10856/* harmony import */ var _effect_fade_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./effect-fade.mjs */ "./node_modules/swiper/modules/effect-fade.mjs"); 10857/* harmony import */ var _effect_cube_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./effect-cube.mjs */ "./node_modules/swiper/modules/effect-cube.mjs"); 10858/* harmony import */ var _effect_flip_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./effect-flip.mjs */ "./node_modules/swiper/modules/effect-flip.mjs"); 10859/* harmony import */ var _effect_coverflow_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./effect-coverflow.mjs */ "./node_modules/swiper/modules/effect-coverflow.mjs"); 10860/* harmony import */ var _effect_creative_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./effect-creative.mjs */ "./node_modules/swiper/modules/effect-creative.mjs"); 10861/* harmony import */ var _effect_cards_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./effect-cards.mjs */ "./node_modules/swiper/modules/effect-cards.mjs"); 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886/***/ }), 10887
vendor: 5,273 bytes, lines 10888-11021
10888/***/ "./node_modules/swiper/modules/keyboard.mjs": 10889/*!**************************************************!*\ 10890 !*** ./node_modules/swiper/modules/keyboard.mjs ***! 10891 \**************************************************/ 10892/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10893 10894"use strict"; 10895__webpack_require__.r(__webpack_exports__); 10896/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10897/* harmony export */ "default": () => (/* binding */ Keyboard) 10898/* harmony export */ }); 10899/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 10900/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 10901 10902 10903 10904/* eslint-disable consistent-return */ 10905function Keyboard(_ref) { 10906 let { 10907 swiper, 10908 extendParams, 10909 on, 10910 emit 10911 } = _ref; 10912 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 10913 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 10914 swiper.keyboard = { 10915 enabled: false 10916 }; 10917 extendParams({ 10918 keyboard: { 10919 enabled: false, 10920 onlyInViewport: true, 10921 pageUpDown: true 10922 } 10923 }); 10924 function handle(event) { 10925 if (!swiper.enabled) return; 10926 const { 10927 rtlTranslate: rtl 10928 } = swiper; 10929 let e = event; 10930 if (e.originalEvent) e = e.originalEvent; // jquery fix 10931 const kc = e.keyCode || e.charCode; 10932 const pageUpDown = swiper.params.keyboard.pageUpDown; 10933 const isPageUp = pageUpDown && kc === 33; 10934 const isPageDown = pageUpDown && kc === 34; 10935 const isArrowLeft = kc === 37; 10936 const isArrowRight = kc === 39; 10937 const isArrowUp = kc === 38; 10938 const isArrowDown = kc === 40; 10939 // Directions locks 10940 if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { 10941 return false; 10942 } 10943 if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { 10944 return false; 10945 } 10946 if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { 10947 return undefined; 10948 } 10949 if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { 10950 return undefined; 10951 } 10952 if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { 10953 let inView = false; 10954 // Check that swiper should be inside of visible area of window 10955 if ((0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.a)(swiper.el, `.${swiper.params.slideClass}, swiper-slide`).length > 0 && (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.a)(swiper.el, `.${swiper.params.slideActiveClass}`).length === 0) { 10956 return undefined; 10957 } 10958 const el = swiper.el; 10959 const swiperWidth = el.clientWidth; 10960 const swiperHeight = el.clientHeight; 10961 const windowWidth = window.innerWidth; 10962 const windowHeight = window.innerHeight; 10963 const swiperOffset = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(el); 10964 if (rtl) swiperOffset.left -= el.scrollLeft; 10965 const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; 10966 for (let i = 0; i < swiperCoord.length; i += 1) { 10967 const point = swiperCoord[i]; 10968 if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { 10969 if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line 10970 inView = true; 10971 } 10972 } 10973 if (!inView) return undefined; 10974 } 10975 if (swiper.isHorizontal()) { 10976 if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { 10977 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 10978 } 10979 if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); 10980 if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); 10981 } else { 10982 if (isPageUp || isPageDown || isArrowUp || isArrowDown) { 10983 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 10984 } 10985 if (isPageDown || isArrowDown) swiper.slideNext(); 10986 if (isPageUp || isArrowUp) swiper.slidePrev(); 10987 } 10988 emit('keyPress', kc); 10989 return undefined; 10990 } 10991 function enable() { 10992 if (swiper.keyboard.enabled) return; 10993 document.addEventListener('keydown', handle); 10994 swiper.keyboard.enabled = true; 10995 } 10996 function disable() { 10997 if (!swiper.keyboard.enabled) return; 10998 document.removeEventListener('keydown', handle); 10999 swiper.keyboard.enabled = false; 11000 } 11001 on('init', () => { 11002 if (swiper.params.keyboard.enabled) { 11003 enable(); 11004 } 11005 }); 11006 on('destroy', () => { 11007 if (swiper.keyboard.enabled) { 11008 disable(); 11009 } 11010 }); 11011 Object.assign(swiper.keyboard, { 11012 enable, 11013 disable 11014 }); 11015} 11016 11017 11018 11019 11020/***/ }), 11021
vendor: 5,517 bytes, lines 11022-11227
11022/***/ "./node_modules/swiper/modules/manipulation.mjs": 11023/*!******************************************************!*\ 11024 !*** ./node_modules/swiper/modules/manipulation.mjs ***! 11025 \******************************************************/ 11026/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 11027 11028"use strict"; 11029__webpack_require__.r(__webpack_exports__); 11030/* harmony export */ __webpack_require__.d(__webpack_exports__, { 11031/* harmony export */ "default": () => (/* binding */ Manipulation) 11032/* harmony export */ }); 11033function appendSlide(slides) { 11034 const swiper = this; 11035 const { 11036 params, 11037 slidesEl 11038 } = swiper; 11039 if (params.loop) { 11040 swiper.loopDestroy(); 11041 } 11042 const appendElement = slideEl => { 11043 if (typeof slideEl === 'string') { 11044 const tempDOM = document.createElement('div'); 11045 tempDOM.innerHTML = slideEl; 11046 slidesEl.append(tempDOM.children[0]); 11047 tempDOM.innerHTML = ''; 11048 } else { 11049 slidesEl.append(slideEl); 11050 } 11051 }; 11052 if (typeof slides === 'object' && 'length' in slides) { 11053 for (let i = 0; i < slides.length; i += 1) { 11054 if (slides[i]) appendElement(slides[i]); 11055 } 11056 } else { 11057 appendElement(slides); 11058 } 11059 swiper.recalcSlides(); 11060 if (params.loop) { 11061 swiper.loopCreate(); 11062 } 11063 if (!params.observer || swiper.isElement) { 11064 swiper.update(); 11065 } 11066} 11067 11068function prependSlide(slides) { 11069 const swiper = this; 11070 const { 11071 params, 11072 activeIndex, 11073 slidesEl 11074 } = swiper; 11075 if (params.loop) { 11076 swiper.loopDestroy(); 11077 } 11078 let newActiveIndex = activeIndex + 1; 11079 const prependElement = slideEl => { 11080 if (typeof slideEl === 'string') { 11081 const tempDOM = document.createElement('div'); 11082 tempDOM.innerHTML = slideEl; 11083 slidesEl.prepend(tempDOM.children[0]); 11084 tempDOM.innerHTML = ''; 11085 } else { 11086 slidesEl.prepend(slideEl); 11087 } 11088 }; 11089 if (typeof slides === 'object' && 'length' in slides) { 11090 for (let i = 0; i < slides.length; i += 1) { 11091 if (slides[i]) prependElement(slides[i]); 11092 } 11093 newActiveIndex = activeIndex + slides.length; 11094 } else { 11095 prependElement(slides); 11096 } 11097 swiper.recalcSlides(); 11098 if (params.loop) { 11099 swiper.loopCreate(); 11100 } 11101 if (!params.observer || swiper.isElement) { 11102 swiper.update(); 11103 } 11104 swiper.slideTo(newActiveIndex, 0, false); 11105} 11106 11107function addSlide(index, slides) { 11108 const swiper = this; 11109 const { 11110 params, 11111 activeIndex, 11112 slidesEl 11113 } = swiper; 11114 let activeIndexBuffer = activeIndex; 11115 if (params.loop) { 11116 activeIndexBuffer -= swiper.loopedSlides; 11117 swiper.loopDestroy(); 11118 swiper.recalcSlides(); 11119 } 11120 const baseLength = swiper.slides.length; 11121 if (index <= 0) { 11122 swiper.prependSlide(slides); 11123 return; 11124 } 11125 if (index >= baseLength) { 11126 swiper.appendSlide(slides); 11127 return; 11128 } 11129 let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; 11130 const slidesBuffer = []; 11131 for (let i = baseLength - 1; i >= index; i -= 1) { 11132 const currentSlide = swiper.slides[i]; 11133 currentSlide.remove(); 11134 slidesBuffer.unshift(currentSlide); 11135 } 11136 if (typeof slides === 'object' && 'length' in slides) { 11137 for (let i = 0; i < slides.length; i += 1) { 11138 if (slides[i]) slidesEl.append(slides[i]); 11139 } 11140 newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; 11141 } else { 11142 slidesEl.append(slides); 11143 } 11144 for (let i = 0; i < slidesBuffer.length; i += 1) { 11145 slidesEl.append(slidesBuffer[i]); 11146 } 11147 swiper.recalcSlides(); 11148 if (params.loop) { 11149 swiper.loopCreate(); 11150 } 11151 if (!params.observer || swiper.isElement) { 11152 swiper.update(); 11153 } 11154 if (params.loop) { 11155 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 11156 } else { 11157 swiper.slideTo(newActiveIndex, 0, false); 11158 } 11159} 11160 11161function removeSlide(slidesIndexes) { 11162 const swiper = this; 11163 const { 11164 params, 11165 activeIndex 11166 } = swiper; 11167 let activeIndexBuffer = activeIndex; 11168 if (params.loop) { 11169 activeIndexBuffer -= swiper.loopedSlides; 11170 swiper.loopDestroy(); 11171 } 11172 let newActiveIndex = activeIndexBuffer; 11173 let indexToRemove; 11174 if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { 11175 for (let i = 0; i < slidesIndexes.length; i += 1) { 11176 indexToRemove = slidesIndexes[i]; 11177 if (swiper.slides[indexToRemove]) swiper.slides[indexToRemove].remove(); 11178 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 11179 } 11180 newActiveIndex = Math.max(newActiveIndex, 0); 11181 } else { 11182 indexToRemove = slidesIndexes; 11183 if (swiper.slides[indexToRemove]) swiper.slides[indexToRemove].remove(); 11184 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 11185 newActiveIndex = Math.max(newActiveIndex, 0); 11186 } 11187 swiper.recalcSlides(); 11188 if (params.loop) { 11189 swiper.loopCreate(); 11190 } 11191 if (!params.observer || swiper.isElement) { 11192 swiper.update(); 11193 } 11194 if (params.loop) { 11195 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 11196 } else { 11197 swiper.slideTo(newActiveIndex, 0, false); 11198 } 11199} 11200 11201function removeAllSlides() { 11202 const swiper = this; 11203 const slidesIndexes = []; 11204 for (let i = 0; i < swiper.slides.length; i += 1) { 11205 slidesIndexes.push(i); 11206 } 11207 swiper.removeSlide(slidesIndexes); 11208} 11209 11210function Manipulation(_ref) { 11211 let { 11212 swiper 11213 } = _ref; 11214 Object.assign(swiper, { 11215 appendSlide: appendSlide.bind(swiper), 11216 prependSlide: prependSlide.bind(swiper), 11217 addSlide: addSlide.bind(swiper), 11218 removeSlide: removeSlide.bind(swiper), 11219 removeAllSlides: removeAllSlides.bind(swiper) 11220 }); 11221} 11222 11223 11224 11225 11226/***/ }), 11227
vendor: 15,884 bytes, lines 11228-11637
11228/***/ "./node_modules/swiper/modules/mousewheel.mjs": 11229/*!****************************************************!*\ 11230 !*** ./node_modules/swiper/modules/mousewheel.mjs ***! 11231 \****************************************************/ 11232/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 11233 11234"use strict"; 11235__webpack_require__.r(__webpack_exports__); 11236/* harmony export */ __webpack_require__.d(__webpack_exports__, { 11237/* harmony export */ "default": () => (/* binding */ Mousewheel) 11238/* harmony export */ }); 11239/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 11240/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 11241 11242 11243 11244/* eslint-disable consistent-return */ 11245function Mousewheel(_ref) { 11246 let { 11247 swiper, 11248 extendParams, 11249 on, 11250 emit 11251 } = _ref; 11252 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 11253 extendParams({ 11254 mousewheel: { 11255 enabled: false, 11256 releaseOnEdges: false, 11257 invert: false, 11258 forceToAxis: false, 11259 sensitivity: 1, 11260 eventsTarget: 'container', 11261 thresholdDelta: null, 11262 thresholdTime: null, 11263 noMousewheelClass: 'swiper-no-mousewheel' 11264 } 11265 }); 11266 swiper.mousewheel = { 11267 enabled: false 11268 }; 11269 let timeout; 11270 let lastScrollTime = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(); 11271 let lastEventBeforeSnap; 11272 const recentWheelEvents = []; 11273 function normalize(e) { 11274 // Reasonable defaults 11275 const PIXEL_STEP = 10; 11276 const LINE_HEIGHT = 40; 11277 const PAGE_HEIGHT = 800; 11278 let sX = 0; 11279 let sY = 0; // spinX, spinY 11280 let pX = 0; 11281 let pY = 0; // pixelX, pixelY 11282 11283 // Legacy 11284 if ('detail' in e) { 11285 sY = e.detail; 11286 } 11287 if ('wheelDelta' in e) { 11288 sY = -e.wheelDelta / 120; 11289 } 11290 if ('wheelDeltaY' in e) { 11291 sY = -e.wheelDeltaY / 120; 11292 } 11293 if ('wheelDeltaX' in e) { 11294 sX = -e.wheelDeltaX / 120; 11295 } 11296 11297 // side scrolling on FF with DOMMouseScroll 11298 if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { 11299 sX = sY; 11300 sY = 0; 11301 } 11302 pX = sX * PIXEL_STEP; 11303 pY = sY * PIXEL_STEP; 11304 if ('deltaY' in e) { 11305 pY = e.deltaY; 11306 } 11307 if ('deltaX' in e) { 11308 pX = e.deltaX; 11309 } 11310 if (e.shiftKey && !pX) { 11311 // if user scrolls with shift he wants horizontal scroll 11312 pX = pY; 11313 pY = 0; 11314 } 11315 if ((pX || pY) && e.deltaMode) { 11316 if (e.deltaMode === 1) { 11317 // delta in LINE units 11318 pX *= LINE_HEIGHT; 11319 pY *= LINE_HEIGHT; 11320 } else { 11321 // delta in PAGE units 11322 pX *= PAGE_HEIGHT; 11323 pY *= PAGE_HEIGHT; 11324 } 11325 } 11326 11327 // Fall-back if spin cannot be determined 11328 if (pX && !sX) { 11329 sX = pX < 1 ? -1 : 1; 11330 } 11331 if (pY && !sY) { 11332 sY = pY < 1 ? -1 : 1; 11333 } 11334 return { 11335 spinX: sX, 11336 spinY: sY, 11337 pixelX: pX, 11338 pixelY: pY 11339 }; 11340 } 11341 function handleMouseEnter() { 11342 if (!swiper.enabled) return; 11343 swiper.mouseEntered = true; 11344 } 11345 function handleMouseLeave() { 11346 if (!swiper.enabled) return; 11347 swiper.mouseEntered = false; 11348 } 11349 function animateSlider(newEvent) { 11350 if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) { 11351 // Prevent if delta of wheel scroll delta is below configured threshold 11352 return false; 11353 } 11354 if (swiper.params.mousewheel.thresholdTime && (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)() - lastScrollTime < swiper.params.mousewheel.thresholdTime) { 11355 // Prevent if time between scrolls is below configured threshold 11356 return false; 11357 } 11358 11359 // If the movement is NOT big enough and 11360 // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): 11361 // Don't go any further (avoid insignificant scroll movement). 11362 if (newEvent.delta >= 6 && (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)() - lastScrollTime < 60) { 11363 // Return false as a default 11364 return true; 11365 } 11366 // If user is scrolling towards the end: 11367 // If the slider hasn't hit the latest slide or 11368 // if the slider is a loop and 11369 // if the slider isn't moving right now: 11370 // Go to next slide and 11371 // emit a scroll event. 11372 // Else (the user is scrolling towards the beginning) and 11373 // if the slider hasn't hit the first slide or 11374 // if the slider is a loop and 11375 // if the slider isn't moving right now: 11376 // Go to prev slide and 11377 // emit a scroll event. 11378 if (newEvent.direction < 0) { 11379 if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { 11380 swiper.slideNext(); 11381 emit('scroll', newEvent.raw); 11382 } 11383 } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { 11384 swiper.slidePrev(); 11385 emit('scroll', newEvent.raw); 11386 } 11387 // If you got here is because an animation has been triggered so store the current time 11388 lastScrollTime = new window.Date().getTime(); 11389 // Return false as a default 11390 return false; 11391 } 11392 function releaseScroll(newEvent) { 11393 const params = swiper.params.mousewheel; 11394 if (newEvent.direction < 0) { 11395 if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { 11396 // Return true to animate scroll on edges 11397 return true; 11398 } 11399 } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { 11400 // Return true to animate scroll on edges 11401 return true; 11402 } 11403 return false; 11404 } 11405 function handle(event) { 11406 let e = event; 11407 let disableParentSwiper = true; 11408 if (!swiper.enabled) return; 11409 11410 // Ignore event if the target or its parents have the swiper-no-mousewheel class 11411 if (event.target.closest(`.${swiper.params.mousewheel.noMousewheelClass}`)) return; 11412 const params = swiper.params.mousewheel; 11413 if (swiper.params.cssMode) { 11414 e.preventDefault(); 11415 } 11416 let targetEl = swiper.el; 11417 if (swiper.params.mousewheel.eventsTarget !== 'container') { 11418 targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget); 11419 } 11420 const targetElContainsTarget = targetEl && targetEl.contains(e.target); 11421 if (!swiper.mouseEntered && !targetElContainsTarget && !params.releaseOnEdges) return true; 11422 if (e.originalEvent) e = e.originalEvent; // jquery fix 11423 let delta = 0; 11424 const rtlFactor = swiper.rtlTranslate ? -1 : 1; 11425 const data = normalize(e); 11426 if (params.forceToAxis) { 11427 if (swiper.isHorizontal()) { 11428 if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; 11429 } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; 11430 } else { 11431 delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; 11432 } 11433 if (delta === 0) return true; 11434 if (params.invert) delta = -delta; 11435 11436 // Get the scroll positions 11437 let positions = swiper.getTranslate() + delta * params.sensitivity; 11438 if (positions >= swiper.minTranslate()) positions = swiper.minTranslate(); 11439 if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); 11440 11441 // When loop is true: 11442 // the disableParentSwiper will be true. 11443 // When loop is false: 11444 // if the scroll positions is not on edge, 11445 // then the disableParentSwiper will be true. 11446 // if the scroll on edge positions, 11447 // then the disableParentSwiper will be false. 11448 disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate()); 11449 if (disableParentSwiper && swiper.params.nested) e.stopPropagation(); 11450 if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) { 11451 // Register the new event in a variable which stores the relevant data 11452 const newEvent = { 11453 time: (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(), 11454 delta: Math.abs(delta), 11455 direction: Math.sign(delta), 11456 raw: event 11457 }; 11458 11459 // Keep the most recent events 11460 if (recentWheelEvents.length >= 2) { 11461 recentWheelEvents.shift(); // only store the last N events 11462 } 11463 11464 const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 11465 recentWheelEvents.push(newEvent); 11466 11467 // If there is at least one previous recorded event: 11468 // If direction has changed or 11469 // if the scroll is quicker than the previous one: 11470 // Animate the slider. 11471 // Else (this is the first time the wheel is moved): 11472 // Animate the slider. 11473 if (prevEvent) { 11474 if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { 11475 animateSlider(newEvent); 11476 } 11477 } else { 11478 animateSlider(newEvent); 11479 } 11480 11481 // If it's time to release the scroll: 11482 // Return now so you don't hit the preventDefault. 11483 if (releaseScroll(newEvent)) { 11484 return true; 11485 } 11486 } else { 11487 // Freemode or scrollContainer: 11488 11489 // If we recently snapped after a momentum scroll, then ignore wheel events 11490 // to give time for the deceleration to finish. Stop ignoring after 500 msecs 11491 // or if it's a new scroll (larger delta or inverse sign as last event before 11492 // an end-of-momentum snap). 11493 const newEvent = { 11494 time: (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(), 11495 delta: Math.abs(delta), 11496 direction: Math.sign(delta) 11497 }; 11498 const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction; 11499 if (!ignoreWheelEvents) { 11500 lastEventBeforeSnap = undefined; 11501 let position = swiper.getTranslate() + delta * params.sensitivity; 11502 const wasBeginning = swiper.isBeginning; 11503 const wasEnd = swiper.isEnd; 11504 if (position >= swiper.minTranslate()) position = swiper.minTranslate(); 11505 if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); 11506 swiper.setTransition(0); 11507 swiper.setTranslate(position); 11508 swiper.updateProgress(); 11509 swiper.updateActiveIndex(); 11510 swiper.updateSlidesClasses(); 11511 if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { 11512 swiper.updateSlidesClasses(); 11513 } 11514 if (swiper.params.loop) { 11515 swiper.loopFix({ 11516 direction: newEvent.direction < 0 ? 'next' : 'prev', 11517 byMousewheel: true 11518 }); 11519 } 11520 if (swiper.params.freeMode.sticky) { 11521 // When wheel scrolling starts with sticky (aka snap) enabled, then detect 11522 // the end of a momentum scroll by storing recent (N=15?) wheel events. 11523 // 1. do all N events have decreasing or same (absolute value) delta? 11524 // 2. did all N events arrive in the last M (M=500?) msecs? 11525 // 3. does the earliest event have an (absolute value) delta that's 11526 // at least P (P=1?) larger than the most recent event's delta? 11527 // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? 11528 // If 1-4 are "yes" then we're near the end of a momentum scroll deceleration. 11529 // Snap immediately and ignore remaining wheel events in this scroll. 11530 // See comment above for "remaining wheel events in this scroll" determination. 11531 // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. 11532 clearTimeout(timeout); 11533 timeout = undefined; 11534 if (recentWheelEvents.length >= 15) { 11535 recentWheelEvents.shift(); // only store the last N events 11536 } 11537 11538 const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 11539 const firstEvent = recentWheelEvents[0]; 11540 recentWheelEvents.push(newEvent); 11541 if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) { 11542 // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. 11543 recentWheelEvents.splice(0); 11544 } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) { 11545 // We're at the end of the deceleration of a momentum scroll, so there's no need 11546 // to wait for more events. Snap ASAP on the next tick. 11547 // Also, because there's some remaining momentum we'll bias the snap in the 11548 // direction of the ongoing scroll because it's better UX for the scroll to snap 11549 // in the same direction as the scroll instead of reversing to snap. Therefore, 11550 // if it's already scrolled more than 20% in the current direction, keep going. 11551 const snapToThreshold = delta > 0 ? 0.8 : 0.2; 11552 lastEventBeforeSnap = newEvent; 11553 recentWheelEvents.splice(0); 11554 timeout = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.n)(() => { 11555 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 11556 }, 0); // no delay; move on next tick 11557 } 11558 11559 if (!timeout) { 11560 // if we get here, then we haven't detected the end of a momentum scroll, so 11561 // we'll consider a scroll "complete" when there haven't been any wheel events 11562 // for 500ms. 11563 timeout = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.n)(() => { 11564 const snapToThreshold = 0.5; 11565 lastEventBeforeSnap = newEvent; 11566 recentWheelEvents.splice(0); 11567 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 11568 }, 500); 11569 } 11570 } 11571 11572 // Emit event 11573 if (!ignoreWheelEvents) emit('scroll', e); 11574 11575 // Stop autoplay 11576 if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); 11577 // Return page scroll on edge positions 11578 if (params.releaseOnEdges && (position === swiper.minTranslate() || position === swiper.maxTranslate())) { 11579 return true; 11580 } 11581 } 11582 } 11583 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 11584 return false; 11585 } 11586 function events(method) { 11587 let targetEl = swiper.el; 11588 if (swiper.params.mousewheel.eventsTarget !== 'container') { 11589 targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget); 11590 } 11591 targetEl[method]('mouseenter', handleMouseEnter); 11592 targetEl[method]('mouseleave', handleMouseLeave); 11593 targetEl[method]('wheel', handle); 11594 } 11595 function enable() { 11596 if (swiper.params.cssMode) { 11597 swiper.wrapperEl.removeEventListener('wheel', handle); 11598 return true; 11599 } 11600 if (swiper.mousewheel.enabled) return false; 11601 events('addEventListener'); 11602 swiper.mousewheel.enabled = true; 11603 return true; 11604 } 11605 function disable() { 11606 if (swiper.params.cssMode) { 11607 swiper.wrapperEl.addEventListener(event, handle); 11608 return true; 11609 } 11610 if (!swiper.mousewheel.enabled) return false; 11611 events('removeEventListener'); 11612 swiper.mousewheel.enabled = false; 11613 return true; 11614 } 11615 on('init', () => { 11616 if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { 11617 disable(); 11618 } 11619 if (swiper.params.mousewheel.enabled) enable(); 11620 }); 11621 on('destroy', () => { 11622 if (swiper.params.cssMode) { 11623 enable(); 11624 } 11625 if (swiper.mousewheel.enabled) disable(); 11626 }); 11627 Object.assign(swiper.mousewheel, { 11628 enable, 11629 disable 11630 }); 11631} 11632 11633 11634 11635 11636/***/ }), 11637
vendor: 6,636 bytes, lines 11638-11844
11638/***/ "./node_modules/swiper/modules/navigation.mjs": 11639/*!****************************************************!*\ 11640 !*** ./node_modules/swiper/modules/navigation.mjs ***! 11641 \****************************************************/ 11642/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 11643 11644"use strict"; 11645__webpack_require__.r(__webpack_exports__); 11646/* harmony export */ __webpack_require__.d(__webpack_exports__, { 11647/* harmony export */ "default": () => (/* binding */ Navigation) 11648/* harmony export */ }); 11649/* harmony import */ var _shared_create_element_if_not_defined_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/create-element-if-not-defined.mjs */ "./node_modules/swiper/shared/create-element-if-not-defined.mjs"); 11650 11651 11652function Navigation(_ref) { 11653 let { 11654 swiper, 11655 extendParams, 11656 on, 11657 emit 11658 } = _ref; 11659 extendParams({ 11660 navigation: { 11661 nextEl: null, 11662 prevEl: null, 11663 hideOnClick: false, 11664 disabledClass: 'swiper-button-disabled', 11665 hiddenClass: 'swiper-button-hidden', 11666 lockClass: 'swiper-button-lock', 11667 navigationDisabledClass: 'swiper-navigation-disabled' 11668 } 11669 }); 11670 swiper.navigation = { 11671 nextEl: null, 11672 prevEl: null 11673 }; 11674 const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e); 11675 function getEl(el) { 11676 let res; 11677 if (el && typeof el === 'string' && swiper.isElement) { 11678 res = swiper.el.querySelector(el); 11679 if (res) return res; 11680 } 11681 if (el) { 11682 if (typeof el === 'string') res = [...document.querySelectorAll(el)]; 11683 if (swiper.params.uniqueNavElements && typeof el === 'string' && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) { 11684 res = swiper.el.querySelector(el); 11685 } 11686 } 11687 if (el && !res) return el; 11688 // if (Array.isArray(res) && res.length === 1) res = res[0]; 11689 return res; 11690 } 11691 function toggleEl(el, disabled) { 11692 const params = swiper.params.navigation; 11693 el = makeElementsArray(el); 11694 el.forEach(subEl => { 11695 if (subEl) { 11696 subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' ')); 11697 if (subEl.tagName === 'BUTTON') subEl.disabled = disabled; 11698 if (swiper.params.watchOverflow && swiper.enabled) { 11699 subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass); 11700 } 11701 } 11702 }); 11703 } 11704 function update() { 11705 // Update Navigation Buttons 11706 const { 11707 nextEl, 11708 prevEl 11709 } = swiper.navigation; 11710 if (swiper.params.loop) { 11711 toggleEl(prevEl, false); 11712 toggleEl(nextEl, false); 11713 return; 11714 } 11715 toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind); 11716 toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind); 11717 } 11718 function onPrevClick(e) { 11719 e.preventDefault(); 11720 if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return; 11721 swiper.slidePrev(); 11722 emit('navigationPrev'); 11723 } 11724 function onNextClick(e) { 11725 e.preventDefault(); 11726 if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return; 11727 swiper.slideNext(); 11728 emit('navigationNext'); 11729 } 11730 function init() { 11731 const params = swiper.params.navigation; 11732 swiper.params.navigation = (0,_shared_create_element_if_not_defined_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(swiper, swiper.originalParams.navigation, swiper.params.navigation, { 11733 nextEl: 'swiper-button-next', 11734 prevEl: 'swiper-button-prev' 11735 }); 11736 if (!(params.nextEl || params.prevEl)) return; 11737 let nextEl = getEl(params.nextEl); 11738 let prevEl = getEl(params.prevEl); 11739 Object.assign(swiper.navigation, { 11740 nextEl, 11741 prevEl 11742 }); 11743 nextEl = makeElementsArray(nextEl); 11744 prevEl = makeElementsArray(prevEl); 11745 const initButton = (el, dir) => { 11746 if (el) { 11747 el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick); 11748 } 11749 if (!swiper.enabled && el) { 11750 el.classList.add(...params.lockClass.split(' ')); 11751 } 11752 }; 11753 nextEl.forEach(el => initButton(el, 'next')); 11754 prevEl.forEach(el => initButton(el, 'prev')); 11755 } 11756 function destroy() { 11757 let { 11758 nextEl, 11759 prevEl 11760 } = swiper.navigation; 11761 nextEl = makeElementsArray(nextEl); 11762 prevEl = makeElementsArray(prevEl); 11763 const destroyButton = (el, dir) => { 11764 el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick); 11765 el.classList.remove(...swiper.params.navigation.disabledClass.split(' ')); 11766 }; 11767 nextEl.forEach(el => destroyButton(el, 'next')); 11768 prevEl.forEach(el => destroyButton(el, 'prev')); 11769 } 11770 on('init', () => { 11771 if (swiper.params.navigation.enabled === false) { 11772 // eslint-disable-next-line 11773 disable(); 11774 } else { 11775 init(); 11776 update(); 11777 } 11778 }); 11779 on('toEdge fromEdge lock unlock', () => { 11780 update(); 11781 }); 11782 on('destroy', () => { 11783 destroy(); 11784 }); 11785 on('enable disable', () => { 11786 let { 11787 nextEl, 11788 prevEl 11789 } = swiper.navigation; 11790 nextEl = makeElementsArray(nextEl); 11791 prevEl = makeElementsArray(prevEl); 11792 if (swiper.enabled) { 11793 update(); 11794 return; 11795 } 11796 [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.add(swiper.params.navigation.lockClass)); 11797 }); 11798 on('click', (_s, e) => { 11799 let { 11800 nextEl, 11801 prevEl 11802 } = swiper.navigation; 11803 nextEl = makeElementsArray(nextEl); 11804 prevEl = makeElementsArray(prevEl); 11805 const targetEl = e.target; 11806 if (swiper.params.navigation.hideOnClick && !prevEl.includes(targetEl) && !nextEl.includes(targetEl)) { 11807 if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return; 11808 let isHidden; 11809 if (nextEl.length) { 11810 isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass); 11811 } else if (prevEl.length) { 11812 isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass); 11813 } 11814 if (isHidden === true) { 11815 emit('navigationShow'); 11816 } else { 11817 emit('navigationHide'); 11818 } 11819 [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.toggle(swiper.params.navigation.hiddenClass)); 11820 } 11821 }); 11822 const enable = () => { 11823 swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' ')); 11824 init(); 11825 update(); 11826 }; 11827 const disable = () => { 11828 swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' ')); 11829 destroy(); 11830 }; 11831 Object.assign(swiper.navigation, { 11832 enable, 11833 disable, 11834 update, 11835 init, 11836 destroy 11837 }); 11838} 11839 11840 11841 11842 11843/***/ }), 11844
vendor: 18,277 bytes, lines 11845-12306
11845/***/ "./node_modules/swiper/modules/pagination.mjs": 11846/*!****************************************************!*\ 11847 !*** ./node_modules/swiper/modules/pagination.mjs ***! 11848 \****************************************************/ 11849/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 11850 11851"use strict"; 11852__webpack_require__.r(__webpack_exports__); 11853/* harmony export */ __webpack_require__.d(__webpack_exports__, { 11854/* harmony export */ "default": () => (/* binding */ Pagination) 11855/* harmony export */ }); 11856/* harmony import */ var _shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/classes-to-selector.mjs */ "./node_modules/swiper/shared/classes-to-selector.mjs"); 11857/* harmony import */ var _shared_create_element_if_not_defined_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/create-element-if-not-defined.mjs */ "./node_modules/swiper/shared/create-element-if-not-defined.mjs"); 11858/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 11859 11860 11861 11862 11863function Pagination(_ref) { 11864 let { 11865 swiper, 11866 extendParams, 11867 on, 11868 emit 11869 } = _ref; 11870 const pfx = 'swiper-pagination'; 11871 extendParams({ 11872 pagination: { 11873 el: null, 11874 bulletElement: 'span', 11875 clickable: false, 11876 hideOnClick: false, 11877 renderBullet: null, 11878 renderProgressbar: null, 11879 renderFraction: null, 11880 renderCustom: null, 11881 progressbarOpposite: false, 11882 type: 'bullets', 11883 // 'bullets' or 'progressbar' or 'fraction' or 'custom' 11884 dynamicBullets: false, 11885 dynamicMainBullets: 1, 11886 formatFractionCurrent: number => number, 11887 formatFractionTotal: number => number, 11888 bulletClass: `${pfx}-bullet`, 11889 bulletActiveClass: `${pfx}-bullet-active`, 11890 modifierClass: `${pfx}-`, 11891 currentClass: `${pfx}-current`, 11892 totalClass: `${pfx}-total`, 11893 hiddenClass: `${pfx}-hidden`, 11894 progressbarFillClass: `${pfx}-progressbar-fill`, 11895 progressbarOppositeClass: `${pfx}-progressbar-opposite`, 11896 clickableClass: `${pfx}-clickable`, 11897 lockClass: `${pfx}-lock`, 11898 horizontalClass: `${pfx}-horizontal`, 11899 verticalClass: `${pfx}-vertical`, 11900 paginationDisabledClass: `${pfx}-disabled` 11901 } 11902 }); 11903 swiper.pagination = { 11904 el: null, 11905 bullets: [] 11906 }; 11907 let bulletSize; 11908 let dynamicBulletIndex = 0; 11909 const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e); 11910 function isPaginationDisabled() { 11911 return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0; 11912 } 11913 function setSideBullets(bulletEl, position) { 11914 const { 11915 bulletActiveClass 11916 } = swiper.params.pagination; 11917 if (!bulletEl) return; 11918 bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`]; 11919 if (bulletEl) { 11920 bulletEl.classList.add(`${bulletActiveClass}-${position}`); 11921 bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`]; 11922 if (bulletEl) { 11923 bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`); 11924 } 11925 } 11926 } 11927 function onBulletClick(e) { 11928 const bulletEl = e.target.closest((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(swiper.params.pagination.bulletClass)); 11929 if (!bulletEl) { 11930 return; 11931 } 11932 e.preventDefault(); 11933 const index = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.g)(bulletEl) * swiper.params.slidesPerGroup; 11934 if (swiper.params.loop) { 11935 if (swiper.realIndex === index) return; 11936 swiper.slideToLoop(index); 11937 } else { 11938 swiper.slideTo(index); 11939 } 11940 } 11941 function update() { 11942 // Render || Update Pagination bullets/items 11943 const rtl = swiper.rtl; 11944 const params = swiper.params.pagination; 11945 if (isPaginationDisabled()) return; 11946 let el = swiper.pagination.el; 11947 el = makeElementsArray(el); 11948 // Current/Total 11949 let current; 11950 let previousIndex; 11951 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 11952 const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 11953 if (swiper.params.loop) { 11954 previousIndex = swiper.previousRealIndex || 0; 11955 current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex; 11956 } else if (typeof swiper.snapIndex !== 'undefined') { 11957 current = swiper.snapIndex; 11958 previousIndex = swiper.previousSnapIndex; 11959 } else { 11960 previousIndex = swiper.previousIndex || 0; 11961 current = swiper.activeIndex || 0; 11962 } 11963 // Types 11964 if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { 11965 const bullets = swiper.pagination.bullets; 11966 let firstIndex; 11967 let lastIndex; 11968 let midIndex; 11969 if (params.dynamicBullets) { 11970 bulletSize = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.f)(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true); 11971 el.forEach(subEl => { 11972 subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`; 11973 }); 11974 if (params.dynamicMainBullets > 1 && previousIndex !== undefined) { 11975 dynamicBulletIndex += current - (previousIndex || 0); 11976 if (dynamicBulletIndex > params.dynamicMainBullets - 1) { 11977 dynamicBulletIndex = params.dynamicMainBullets - 1; 11978 } else if (dynamicBulletIndex < 0) { 11979 dynamicBulletIndex = 0; 11980 } 11981 } 11982 firstIndex = Math.max(current - dynamicBulletIndex, 0); 11983 lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); 11984 midIndex = (lastIndex + firstIndex) / 2; 11985 } 11986 bullets.forEach(bulletEl => { 11987 const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat(); 11988 bulletEl.classList.remove(...classesToRemove); 11989 }); 11990 if (el.length > 1) { 11991 bullets.forEach(bullet => { 11992 const bulletIndex = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.g)(bullet); 11993 if (bulletIndex === current) { 11994 bullet.classList.add(...params.bulletActiveClass.split(' ')); 11995 } else if (swiper.isElement) { 11996 bullet.setAttribute('part', 'bullet'); 11997 } 11998 if (params.dynamicBullets) { 11999 if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { 12000 bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' ')); 12001 } 12002 if (bulletIndex === firstIndex) { 12003 setSideBullets(bullet, 'prev'); 12004 } 12005 if (bulletIndex === lastIndex) { 12006 setSideBullets(bullet, 'next'); 12007 } 12008 } 12009 }); 12010 } else { 12011 const bullet = bullets[current]; 12012 if (bullet) { 12013 bullet.classList.add(...params.bulletActiveClass.split(' ')); 12014 } 12015 if (swiper.isElement) { 12016 bullets.forEach((bulletEl, bulletIndex) => { 12017 bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet'); 12018 }); 12019 } 12020 if (params.dynamicBullets) { 12021 const firstDisplayedBullet = bullets[firstIndex]; 12022 const lastDisplayedBullet = bullets[lastIndex]; 12023 for (let i = firstIndex; i <= lastIndex; i += 1) { 12024 if (bullets[i]) { 12025 bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' ')); 12026 } 12027 } 12028 setSideBullets(firstDisplayedBullet, 'prev'); 12029 setSideBullets(lastDisplayedBullet, 'next'); 12030 } 12031 } 12032 if (params.dynamicBullets) { 12033 const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); 12034 const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize; 12035 const offsetProp = rtl ? 'right' : 'left'; 12036 bullets.forEach(bullet => { 12037 bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`; 12038 }); 12039 } 12040 } 12041 el.forEach((subEl, subElIndex) => { 12042 if (params.type === 'fraction') { 12043 subEl.querySelectorAll((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(params.currentClass)).forEach(fractionEl => { 12044 fractionEl.textContent = params.formatFractionCurrent(current + 1); 12045 }); 12046 subEl.querySelectorAll((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(params.totalClass)).forEach(totalEl => { 12047 totalEl.textContent = params.formatFractionTotal(total); 12048 }); 12049 } 12050 if (params.type === 'progressbar') { 12051 let progressbarDirection; 12052 if (params.progressbarOpposite) { 12053 progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; 12054 } else { 12055 progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; 12056 } 12057 const scale = (current + 1) / total; 12058 let scaleX = 1; 12059 let scaleY = 1; 12060 if (progressbarDirection === 'horizontal') { 12061 scaleX = scale; 12062 } else { 12063 scaleY = scale; 12064 } 12065 subEl.querySelectorAll((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(params.progressbarFillClass)).forEach(progressEl => { 12066 progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`; 12067 progressEl.style.transitionDuration = `${swiper.params.speed}ms`; 12068 }); 12069 } 12070 if (params.type === 'custom' && params.renderCustom) { 12071 subEl.innerHTML = params.renderCustom(swiper, current + 1, total); 12072 if (subElIndex === 0) emit('paginationRender', subEl); 12073 } else { 12074 if (subElIndex === 0) emit('paginationRender', subEl); 12075 emit('paginationUpdate', subEl); 12076 } 12077 if (swiper.params.watchOverflow && swiper.enabled) { 12078 subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass); 12079 } 12080 }); 12081 } 12082 function render() { 12083 // Render Container 12084 const params = swiper.params.pagination; 12085 if (isPaginationDisabled()) return; 12086 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.grid && swiper.params.grid.rows > 1 ? swiper.slides.length / Math.ceil(swiper.params.grid.rows) : swiper.slides.length; 12087 let el = swiper.pagination.el; 12088 el = makeElementsArray(el); 12089 let paginationHTML = ''; 12090 if (params.type === 'bullets') { 12091 let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 12092 if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) { 12093 numberOfBullets = slidesLength; 12094 } 12095 for (let i = 0; i < numberOfBullets; i += 1) { 12096 if (params.renderBullet) { 12097 paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); 12098 } else { 12099 // prettier-ignore 12100 paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part="bullet"' : ''} class="${params.bulletClass}"></${params.bulletElement}>`; 12101 } 12102 } 12103 } 12104 if (params.type === 'fraction') { 12105 if (params.renderFraction) { 12106 paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); 12107 } else { 12108 paginationHTML = `<span class="${params.currentClass}"></span>` + ' / ' + `<span class="${params.totalClass}"></span>`; 12109 } 12110 } 12111 if (params.type === 'progressbar') { 12112 if (params.renderProgressbar) { 12113 paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); 12114 } else { 12115 paginationHTML = `<span class="${params.progressbarFillClass}"></span>`; 12116 } 12117 } 12118 swiper.pagination.bullets = []; 12119 el.forEach(subEl => { 12120 if (params.type !== 'custom') { 12121 subEl.innerHTML = paginationHTML || ''; 12122 } 12123 if (params.type === 'bullets') { 12124 swiper.pagination.bullets.push(...subEl.querySelectorAll((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_0__.c)(params.bulletClass))); 12125 } 12126 }); 12127 if (params.type !== 'custom') { 12128 emit('paginationRender', el[0]); 12129 } 12130 } 12131 function init() { 12132 swiper.params.pagination = (0,_shared_create_element_if_not_defined_mjs__WEBPACK_IMPORTED_MODULE_1__.c)(swiper, swiper.originalParams.pagination, swiper.params.pagination, { 12133 el: 'swiper-pagination' 12134 }); 12135 const params = swiper.params.pagination; 12136 if (!params.el) return; 12137 let el; 12138 if (typeof params.el === 'string' && swiper.isElement) { 12139 el = swiper.el.querySelector(params.el); 12140 } 12141 if (!el && typeof params.el === 'string') { 12142 el = [...document.querySelectorAll(params.el)]; 12143 } 12144 if (!el) { 12145 el = params.el; 12146 } 12147 if (!el || el.length === 0) return; 12148 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) { 12149 el = [...swiper.el.querySelectorAll(params.el)]; 12150 // check if it belongs to another nested Swiper 12151 if (el.length > 1) { 12152 el = el.filter(subEl => { 12153 if ((0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.a)(subEl, '.swiper')[0] !== swiper.el) return false; 12154 return true; 12155 })[0]; 12156 } 12157 } 12158 if (Array.isArray(el) && el.length === 1) el = el[0]; 12159 Object.assign(swiper.pagination, { 12160 el 12161 }); 12162 el = makeElementsArray(el); 12163 el.forEach(subEl => { 12164 if (params.type === 'bullets' && params.clickable) { 12165 subEl.classList.add(...(params.clickableClass || '').split(' ')); 12166 } 12167 subEl.classList.add(params.modifierClass + params.type); 12168 subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 12169 if (params.type === 'bullets' && params.dynamicBullets) { 12170 subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`); 12171 dynamicBulletIndex = 0; 12172 if (params.dynamicMainBullets < 1) { 12173 params.dynamicMainBullets = 1; 12174 } 12175 } 12176 if (params.type === 'progressbar' && params.progressbarOpposite) { 12177 subEl.classList.add(params.progressbarOppositeClass); 12178 } 12179 if (params.clickable) { 12180 subEl.addEventListener('click', onBulletClick); 12181 } 12182 if (!swiper.enabled) { 12183 subEl.classList.add(params.lockClass); 12184 } 12185 }); 12186 } 12187 function destroy() { 12188 const params = swiper.params.pagination; 12189 if (isPaginationDisabled()) return; 12190 let el = swiper.pagination.el; 12191 if (el) { 12192 el = makeElementsArray(el); 12193 el.forEach(subEl => { 12194 subEl.classList.remove(params.hiddenClass); 12195 subEl.classList.remove(params.modifierClass + params.type); 12196 subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 12197 if (params.clickable) { 12198 subEl.classList.remove(...(params.clickableClass || '').split(' ')); 12199 subEl.removeEventListener('click', onBulletClick); 12200 } 12201 }); 12202 } 12203 if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' '))); 12204 } 12205 on('changeDirection', () => { 12206 if (!swiper.pagination || !swiper.pagination.el) return; 12207 const params = swiper.params.pagination; 12208 let { 12209 el 12210 } = swiper.pagination; 12211 el = makeElementsArray(el); 12212 el.forEach(subEl => { 12213 subEl.classList.remove(params.horizontalClass, params.verticalClass); 12214 subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 12215 }); 12216 }); 12217 on('init', () => { 12218 if (swiper.params.pagination.enabled === false) { 12219 // eslint-disable-next-line 12220 disable(); 12221 } else { 12222 init(); 12223 render(); 12224 update(); 12225 } 12226 }); 12227 on('activeIndexChange', () => { 12228 if (typeof swiper.snapIndex === 'undefined') { 12229 update(); 12230 } 12231 }); 12232 on('snapIndexChange', () => { 12233 update(); 12234 }); 12235 on('snapGridLengthChange', () => { 12236 render(); 12237 update(); 12238 }); 12239 on('destroy', () => { 12240 destroy(); 12241 }); 12242 on('enable disable', () => { 12243 let { 12244 el 12245 } = swiper.pagination; 12246 if (el) { 12247 el = makeElementsArray(el); 12248 el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass)); 12249 } 12250 }); 12251 on('lock unlock', () => { 12252 update(); 12253 }); 12254 on('click', (_s, e) => { 12255 const targetEl = e.target; 12256 const el = makeElementsArray(swiper.pagination.el); 12257 if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) { 12258 if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return; 12259 const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass); 12260 if (isHidden === true) { 12261 emit('paginationShow'); 12262 } else { 12263 emit('paginationHide'); 12264 } 12265 el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass)); 12266 } 12267 }); 12268 const enable = () => { 12269 swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass); 12270 let { 12271 el 12272 } = swiper.pagination; 12273 if (el) { 12274 el = makeElementsArray(el); 12275 el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass)); 12276 } 12277 init(); 12278 render(); 12279 update(); 12280 }; 12281 const disable = () => { 12282 swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass); 12283 let { 12284 el 12285 } = swiper.pagination; 12286 if (el) { 12287 el = makeElementsArray(el); 12288 el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass)); 12289 } 12290 destroy(); 12291 }; 12292 Object.assign(swiper.pagination, { 12293 enable, 12294 disable, 12295 render, 12296 update, 12297 init, 12298 destroy 12299 }); 12300} 12301 12302 12303 12304 12305/***/ }), 12306
vendor: 4,698 bytes, lines 12307-12446
12307/***/ "./node_modules/swiper/modules/parallax.mjs": 12308/*!**************************************************!*\ 12309 !*** ./node_modules/swiper/modules/parallax.mjs ***! 12310 \**************************************************/ 12311/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 12312 12313"use strict"; 12314__webpack_require__.r(__webpack_exports__); 12315/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12316/* harmony export */ "default": () => (/* binding */ Parallax) 12317/* harmony export */ }); 12318/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 12319 12320 12321function Parallax(_ref) { 12322 let { 12323 swiper, 12324 extendParams, 12325 on 12326 } = _ref; 12327 extendParams({ 12328 parallax: { 12329 enabled: false 12330 } 12331 }); 12332 const elementsSelector = '[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]'; 12333 const setTransform = (el, progress) => { 12334 const { 12335 rtl 12336 } = swiper; 12337 const rtlFactor = rtl ? -1 : 1; 12338 const p = el.getAttribute('data-swiper-parallax') || '0'; 12339 let x = el.getAttribute('data-swiper-parallax-x'); 12340 let y = el.getAttribute('data-swiper-parallax-y'); 12341 const scale = el.getAttribute('data-swiper-parallax-scale'); 12342 const opacity = el.getAttribute('data-swiper-parallax-opacity'); 12343 const rotate = el.getAttribute('data-swiper-parallax-rotate'); 12344 if (x || y) { 12345 x = x || '0'; 12346 y = y || '0'; 12347 } else if (swiper.isHorizontal()) { 12348 x = p; 12349 y = '0'; 12350 } else { 12351 y = p; 12352 x = '0'; 12353 } 12354 if (x.indexOf('%') >= 0) { 12355 x = `${parseInt(x, 10) * progress * rtlFactor}%`; 12356 } else { 12357 x = `${x * progress * rtlFactor}px`; 12358 } 12359 if (y.indexOf('%') >= 0) { 12360 y = `${parseInt(y, 10) * progress}%`; 12361 } else { 12362 y = `${y * progress}px`; 12363 } 12364 if (typeof opacity !== 'undefined' && opacity !== null) { 12365 const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); 12366 el.style.opacity = currentOpacity; 12367 } 12368 let transform = `translate3d(${x}, ${y}, 0px)`; 12369 if (typeof scale !== 'undefined' && scale !== null) { 12370 const currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); 12371 transform += ` scale(${currentScale})`; 12372 } 12373 if (rotate && typeof rotate !== 'undefined' && rotate !== null) { 12374 const currentRotate = rotate * progress * -1; 12375 transform += ` rotate(${currentRotate}deg)`; 12376 } 12377 el.style.transform = transform; 12378 }; 12379 const setTranslate = () => { 12380 const { 12381 el, 12382 slides, 12383 progress, 12384 snapGrid, 12385 isElement 12386 } = swiper; 12387 const elements = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.e)(el, elementsSelector); 12388 if (swiper.isElement) { 12389 elements.push(...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.e)(swiper.hostEl, elementsSelector)); 12390 } 12391 elements.forEach(subEl => { 12392 setTransform(subEl, progress); 12393 }); 12394 slides.forEach((slideEl, slideIndex) => { 12395 let slideProgress = slideEl.progress; 12396 if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { 12397 slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); 12398 } 12399 slideProgress = Math.min(Math.max(slideProgress, -1), 1); 12400 slideEl.querySelectorAll(`${elementsSelector}, [data-swiper-parallax-rotate]`).forEach(subEl => { 12401 setTransform(subEl, slideProgress); 12402 }); 12403 }); 12404 }; 12405 const setTransition = function (duration) { 12406 if (duration === void 0) { 12407 duration = swiper.params.speed; 12408 } 12409 const { 12410 el, 12411 hostEl 12412 } = swiper; 12413 const elements = [...el.querySelectorAll(elementsSelector)]; 12414 if (swiper.isElement) { 12415 elements.push(...hostEl.querySelectorAll(elementsSelector)); 12416 } 12417 elements.forEach(parallaxEl => { 12418 let parallaxDuration = parseInt(parallaxEl.getAttribute('data-swiper-parallax-duration'), 10) || duration; 12419 if (duration === 0) parallaxDuration = 0; 12420 parallaxEl.style.transitionDuration = `${parallaxDuration}ms`; 12421 }); 12422 }; 12423 on('beforeInit', () => { 12424 if (!swiper.params.parallax.enabled) return; 12425 swiper.params.watchSlidesProgress = true; 12426 swiper.originalParams.watchSlidesProgress = true; 12427 }); 12428 on('init', () => { 12429 if (!swiper.params.parallax.enabled) return; 12430 setTranslate(); 12431 }); 12432 on('setTranslate', () => { 12433 if (!swiper.params.parallax.enabled) return; 12434 setTranslate(); 12435 }); 12436 on('setTransition', (_swiper, duration) => { 12437 if (!swiper.params.parallax.enabled) return; 12438 setTransition(duration); 12439 }); 12440} 12441 12442 12443 12444 12445/***/ }), 12446
vendor: 12,038 bytes, lines 12447-12819
12447/***/ "./node_modules/swiper/modules/scrollbar.mjs": 12448/*!***************************************************!*\ 12449 !*** ./node_modules/swiper/modules/scrollbar.mjs ***! 12450 \***************************************************/ 12451/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 12452 12453"use strict"; 12454__webpack_require__.r(__webpack_exports__); 12455/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12456/* harmony export */ "default": () => (/* binding */ Scrollbar) 12457/* harmony export */ }); 12458/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 12459/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 12460/* harmony import */ var _shared_create_element_if_not_defined_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/create-element-if-not-defined.mjs */ "./node_modules/swiper/shared/create-element-if-not-defined.mjs"); 12461/* harmony import */ var _shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/classes-to-selector.mjs */ "./node_modules/swiper/shared/classes-to-selector.mjs"); 12462 12463 12464 12465 12466 12467function Scrollbar(_ref) { 12468 let { 12469 swiper, 12470 extendParams, 12471 on, 12472 emit 12473 } = _ref; 12474 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 12475 let isTouched = false; 12476 let timeout = null; 12477 let dragTimeout = null; 12478 let dragStartPos; 12479 let dragSize; 12480 let trackSize; 12481 let divider; 12482 extendParams({ 12483 scrollbar: { 12484 el: null, 12485 dragSize: 'auto', 12486 hide: false, 12487 draggable: false, 12488 snapOnRelease: true, 12489 lockClass: 'swiper-scrollbar-lock', 12490 dragClass: 'swiper-scrollbar-drag', 12491 scrollbarDisabledClass: 'swiper-scrollbar-disabled', 12492 horizontalClass: `swiper-scrollbar-horizontal`, 12493 verticalClass: `swiper-scrollbar-vertical` 12494 } 12495 }); 12496 swiper.scrollbar = { 12497 el: null, 12498 dragEl: null 12499 }; 12500 function setTranslate() { 12501 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 12502 const { 12503 scrollbar, 12504 rtlTranslate: rtl 12505 } = swiper; 12506 const { 12507 dragEl, 12508 el 12509 } = scrollbar; 12510 const params = swiper.params.scrollbar; 12511 const progress = swiper.params.loop ? swiper.progressLoop : swiper.progress; 12512 let newSize = dragSize; 12513 let newPos = (trackSize - dragSize) * progress; 12514 if (rtl) { 12515 newPos = -newPos; 12516 if (newPos > 0) { 12517 newSize = dragSize - newPos; 12518 newPos = 0; 12519 } else if (-newPos + dragSize > trackSize) { 12520 newSize = trackSize + newPos; 12521 } 12522 } else if (newPos < 0) { 12523 newSize = dragSize + newPos; 12524 newPos = 0; 12525 } else if (newPos + dragSize > trackSize) { 12526 newSize = trackSize - newPos; 12527 } 12528 if (swiper.isHorizontal()) { 12529 dragEl.style.transform = `translate3d(${newPos}px, 0, 0)`; 12530 dragEl.style.width = `${newSize}px`; 12531 } else { 12532 dragEl.style.transform = `translate3d(0px, ${newPos}px, 0)`; 12533 dragEl.style.height = `${newSize}px`; 12534 } 12535 if (params.hide) { 12536 clearTimeout(timeout); 12537 el.style.opacity = 1; 12538 timeout = setTimeout(() => { 12539 el.style.opacity = 0; 12540 el.style.transitionDuration = '400ms'; 12541 }, 1000); 12542 } 12543 } 12544 function setTransition(duration) { 12545 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 12546 swiper.scrollbar.dragEl.style.transitionDuration = `${duration}ms`; 12547 } 12548 function updateSize() { 12549 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 12550 const { 12551 scrollbar 12552 } = swiper; 12553 const { 12554 dragEl, 12555 el 12556 } = scrollbar; 12557 dragEl.style.width = ''; 12558 dragEl.style.height = ''; 12559 trackSize = swiper.isHorizontal() ? el.offsetWidth : el.offsetHeight; 12560 divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0)); 12561 if (swiper.params.scrollbar.dragSize === 'auto') { 12562 dragSize = trackSize * divider; 12563 } else { 12564 dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); 12565 } 12566 if (swiper.isHorizontal()) { 12567 dragEl.style.width = `${dragSize}px`; 12568 } else { 12569 dragEl.style.height = `${dragSize}px`; 12570 } 12571 if (divider >= 1) { 12572 el.style.display = 'none'; 12573 } else { 12574 el.style.display = ''; 12575 } 12576 if (swiper.params.scrollbar.hide) { 12577 el.style.opacity = 0; 12578 } 12579 if (swiper.params.watchOverflow && swiper.enabled) { 12580 scrollbar.el.classList[swiper.isLocked ? 'add' : 'remove'](swiper.params.scrollbar.lockClass); 12581 } 12582 } 12583 function getPointerPosition(e) { 12584 return swiper.isHorizontal() ? e.clientX : e.clientY; 12585 } 12586 function setDragPosition(e) { 12587 const { 12588 scrollbar, 12589 rtlTranslate: rtl 12590 } = swiper; 12591 const { 12592 el 12593 } = scrollbar; 12594 let positionRatio; 12595 positionRatio = (getPointerPosition(e) - (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(el)[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); 12596 positionRatio = Math.max(Math.min(positionRatio, 1), 0); 12597 if (rtl) { 12598 positionRatio = 1 - positionRatio; 12599 } 12600 const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; 12601 swiper.updateProgress(position); 12602 swiper.setTranslate(position); 12603 swiper.updateActiveIndex(); 12604 swiper.updateSlidesClasses(); 12605 } 12606 function onDragStart(e) { 12607 const params = swiper.params.scrollbar; 12608 const { 12609 scrollbar, 12610 wrapperEl 12611 } = swiper; 12612 const { 12613 el, 12614 dragEl 12615 } = scrollbar; 12616 isTouched = true; 12617 dragStartPos = e.target === dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; 12618 e.preventDefault(); 12619 e.stopPropagation(); 12620 wrapperEl.style.transitionDuration = '100ms'; 12621 dragEl.style.transitionDuration = '100ms'; 12622 setDragPosition(e); 12623 clearTimeout(dragTimeout); 12624 el.style.transitionDuration = '0ms'; 12625 if (params.hide) { 12626 el.style.opacity = 1; 12627 } 12628 if (swiper.params.cssMode) { 12629 swiper.wrapperEl.style['scroll-snap-type'] = 'none'; 12630 } 12631 emit('scrollbarDragStart', e); 12632 } 12633 function onDragMove(e) { 12634 const { 12635 scrollbar, 12636 wrapperEl 12637 } = swiper; 12638 const { 12639 el, 12640 dragEl 12641 } = scrollbar; 12642 if (!isTouched) return; 12643 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 12644 setDragPosition(e); 12645 wrapperEl.style.transitionDuration = '0ms'; 12646 el.style.transitionDuration = '0ms'; 12647 dragEl.style.transitionDuration = '0ms'; 12648 emit('scrollbarDragMove', e); 12649 } 12650 function onDragEnd(e) { 12651 const params = swiper.params.scrollbar; 12652 const { 12653 scrollbar, 12654 wrapperEl 12655 } = swiper; 12656 const { 12657 el 12658 } = scrollbar; 12659 if (!isTouched) return; 12660 isTouched = false; 12661 if (swiper.params.cssMode) { 12662 swiper.wrapperEl.style['scroll-snap-type'] = ''; 12663 wrapperEl.style.transitionDuration = ''; 12664 } 12665 if (params.hide) { 12666 clearTimeout(dragTimeout); 12667 dragTimeout = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.n)(() => { 12668 el.style.opacity = 0; 12669 el.style.transitionDuration = '400ms'; 12670 }, 1000); 12671 } 12672 emit('scrollbarDragEnd', e); 12673 if (params.snapOnRelease) { 12674 swiper.slideToClosest(); 12675 } 12676 } 12677 function events(method) { 12678 const { 12679 scrollbar, 12680 params 12681 } = swiper; 12682 const el = scrollbar.el; 12683 if (!el) return; 12684 const target = el; 12685 const activeListener = params.passiveListeners ? { 12686 passive: false, 12687 capture: false 12688 } : false; 12689 const passiveListener = params.passiveListeners ? { 12690 passive: true, 12691 capture: false 12692 } : false; 12693 if (!target) return; 12694 const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; 12695 target[eventMethod]('pointerdown', onDragStart, activeListener); 12696 document[eventMethod]('pointermove', onDragMove, activeListener); 12697 document[eventMethod]('pointerup', onDragEnd, passiveListener); 12698 } 12699 function enableDraggable() { 12700 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 12701 events('on'); 12702 } 12703 function disableDraggable() { 12704 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 12705 events('off'); 12706 } 12707 function init() { 12708 const { 12709 scrollbar, 12710 el: swiperEl 12711 } = swiper; 12712 swiper.params.scrollbar = (0,_shared_create_element_if_not_defined_mjs__WEBPACK_IMPORTED_MODULE_2__.c)(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, { 12713 el: 'swiper-scrollbar' 12714 }); 12715 const params = swiper.params.scrollbar; 12716 if (!params.el) return; 12717 let el; 12718 if (typeof params.el === 'string' && swiper.isElement) { 12719 el = swiper.el.querySelector(params.el); 12720 } 12721 if (!el && typeof params.el === 'string') { 12722 el = document.querySelectorAll(params.el); 12723 if (!el.length) return; 12724 } else if (!el) { 12725 el = params.el; 12726 } 12727 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && el.length > 1 && swiperEl.querySelectorAll(params.el).length === 1) { 12728 el = swiperEl.querySelector(params.el); 12729 } 12730 if (el.length > 0) el = el[0]; 12731 el.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 12732 let dragEl; 12733 if (el) { 12734 dragEl = el.querySelector((0,_shared_classes_to_selector_mjs__WEBPACK_IMPORTED_MODULE_3__.c)(swiper.params.scrollbar.dragClass)); 12735 if (!dragEl) { 12736 dragEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', swiper.params.scrollbar.dragClass); 12737 el.append(dragEl); 12738 } 12739 } 12740 Object.assign(scrollbar, { 12741 el, 12742 dragEl 12743 }); 12744 if (params.draggable) { 12745 enableDraggable(); 12746 } 12747 if (el) { 12748 el.classList[swiper.enabled ? 'remove' : 'add'](...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.params.scrollbar.lockClass)); 12749 } 12750 } 12751 function destroy() { 12752 const params = swiper.params.scrollbar; 12753 const el = swiper.scrollbar.el; 12754 if (el) { 12755 el.classList.remove(...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass)); 12756 } 12757 disableDraggable(); 12758 } 12759 on('init', () => { 12760 if (swiper.params.scrollbar.enabled === false) { 12761 // eslint-disable-next-line 12762 disable(); 12763 } else { 12764 init(); 12765 updateSize(); 12766 setTranslate(); 12767 } 12768 }); 12769 on('update resize observerUpdate lock unlock', () => { 12770 updateSize(); 12771 }); 12772 on('setTranslate', () => { 12773 setTranslate(); 12774 }); 12775 on('setTransition', (_s, duration) => { 12776 setTransition(duration); 12777 }); 12778 on('enable disable', () => { 12779 const { 12780 el 12781 } = swiper.scrollbar; 12782 if (el) { 12783 el.classList[swiper.enabled ? 'remove' : 'add'](...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.params.scrollbar.lockClass)); 12784 } 12785 }); 12786 on('destroy', () => { 12787 destroy(); 12788 }); 12789 const enable = () => { 12790 swiper.el.classList.remove(...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.params.scrollbar.scrollbarDisabledClass)); 12791 if (swiper.scrollbar.el) { 12792 swiper.scrollbar.el.classList.remove(...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.params.scrollbar.scrollbarDisabledClass)); 12793 } 12794 init(); 12795 updateSize(); 12796 setTranslate(); 12797 }; 12798 const disable = () => { 12799 swiper.el.classList.add(...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.params.scrollbar.scrollbarDisabledClass)); 12800 if (swiper.scrollbar.el) { 12801 swiper.scrollbar.el.classList.add(...(0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.h)(swiper.params.scrollbar.scrollbarDisabledClass)); 12802 } 12803 destroy(); 12804 }; 12805 Object.assign(swiper.scrollbar, { 12806 enable, 12807 disable, 12808 updateSize, 12809 setTranslate, 12810 init, 12811 destroy 12812 }); 12813} 12814 12815 12816 12817 12818/***/ }), 12819
vendor: 8,025 bytes, lines 12820-13028
12820/***/ "./node_modules/swiper/modules/thumbs.mjs": 12821/*!************************************************!*\ 12822 !*** ./node_modules/swiper/modules/thumbs.mjs ***! 12823 \************************************************/ 12824/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 12825 12826"use strict"; 12827__webpack_require__.r(__webpack_exports__); 12828/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12829/* harmony export */ "default": () => (/* binding */ Thumb) 12830/* harmony export */ }); 12831/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 12832/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 12833 12834 12835 12836function Thumb(_ref) { 12837 let { 12838 swiper, 12839 extendParams, 12840 on 12841 } = _ref; 12842 extendParams({ 12843 thumbs: { 12844 swiper: null, 12845 multipleActiveThumbs: true, 12846 autoScrollOffset: 0, 12847 slideThumbActiveClass: 'swiper-slide-thumb-active', 12848 thumbsContainerClass: 'swiper-thumbs' 12849 } 12850 }); 12851 let initialized = false; 12852 let swiperCreated = false; 12853 swiper.thumbs = { 12854 swiper: null 12855 }; 12856 function onThumbClick() { 12857 const thumbsSwiper = swiper.thumbs.swiper; 12858 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 12859 const clickedIndex = thumbsSwiper.clickedIndex; 12860 const clickedSlide = thumbsSwiper.clickedSlide; 12861 if (clickedSlide && clickedSlide.classList.contains(swiper.params.thumbs.slideThumbActiveClass)) return; 12862 if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; 12863 let slideToIndex; 12864 if (thumbsSwiper.params.loop) { 12865 slideToIndex = parseInt(thumbsSwiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10); 12866 } else { 12867 slideToIndex = clickedIndex; 12868 } 12869 if (swiper.params.loop) { 12870 swiper.slideToLoop(slideToIndex); 12871 } else { 12872 swiper.slideTo(slideToIndex); 12873 } 12874 } 12875 function init() { 12876 const { 12877 thumbs: thumbsParams 12878 } = swiper.params; 12879 if (initialized) return false; 12880 initialized = true; 12881 const SwiperClass = swiper.constructor; 12882 if (thumbsParams.swiper instanceof SwiperClass) { 12883 swiper.thumbs.swiper = thumbsParams.swiper; 12884 Object.assign(swiper.thumbs.swiper.originalParams, { 12885 watchSlidesProgress: true, 12886 slideToClickedSlide: false 12887 }); 12888 Object.assign(swiper.thumbs.swiper.params, { 12889 watchSlidesProgress: true, 12890 slideToClickedSlide: false 12891 }); 12892 swiper.thumbs.swiper.update(); 12893 } else if ((0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.k)(thumbsParams.swiper)) { 12894 const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper); 12895 Object.assign(thumbsSwiperParams, { 12896 watchSlidesProgress: true, 12897 slideToClickedSlide: false 12898 }); 12899 swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams); 12900 swiperCreated = true; 12901 } 12902 swiper.thumbs.swiper.el.classList.add(swiper.params.thumbs.thumbsContainerClass); 12903 swiper.thumbs.swiper.on('tap', onThumbClick); 12904 return true; 12905 } 12906 function update(initial) { 12907 const thumbsSwiper = swiper.thumbs.swiper; 12908 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 12909 const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; 12910 12911 // Activate thumbs 12912 let thumbsToActivate = 1; 12913 const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; 12914 if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { 12915 thumbsToActivate = swiper.params.slidesPerView; 12916 } 12917 if (!swiper.params.thumbs.multipleActiveThumbs) { 12918 thumbsToActivate = 1; 12919 } 12920 thumbsToActivate = Math.floor(thumbsToActivate); 12921 thumbsSwiper.slides.forEach(slideEl => slideEl.classList.remove(thumbActiveClass)); 12922 if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { 12923 for (let i = 0; i < thumbsToActivate; i += 1) { 12924 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(thumbsSwiper.slidesEl, `[data-swiper-slide-index="${swiper.realIndex + i}"]`).forEach(slideEl => { 12925 slideEl.classList.add(thumbActiveClass); 12926 }); 12927 } 12928 } else { 12929 for (let i = 0; i < thumbsToActivate; i += 1) { 12930 if (thumbsSwiper.slides[swiper.realIndex + i]) { 12931 thumbsSwiper.slides[swiper.realIndex + i].classList.add(thumbActiveClass); 12932 } 12933 } 12934 } 12935 const autoScrollOffset = swiper.params.thumbs.autoScrollOffset; 12936 const useOffset = autoScrollOffset && !thumbsSwiper.params.loop; 12937 if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { 12938 const currentThumbsIndex = thumbsSwiper.activeIndex; 12939 let newThumbsIndex; 12940 let direction; 12941 if (thumbsSwiper.params.loop) { 12942 const newThumbsSlide = thumbsSwiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`)[0]; 12943 newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide); 12944 direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; 12945 } else { 12946 newThumbsIndex = swiper.realIndex; 12947 direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; 12948 } 12949 if (useOffset) { 12950 newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; 12951 } 12952 if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { 12953 if (thumbsSwiper.params.centeredSlides) { 12954 if (newThumbsIndex > currentThumbsIndex) { 12955 newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; 12956 } else { 12957 newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; 12958 } 12959 } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ; 12960 thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); 12961 } 12962 } 12963 } 12964 on('beforeInit', () => { 12965 const { 12966 thumbs 12967 } = swiper.params; 12968 if (!thumbs || !thumbs.swiper) return; 12969 if (typeof thumbs.swiper === 'string' || thumbs.swiper instanceof HTMLElement) { 12970 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 12971 const getThumbsElementAndInit = () => { 12972 const thumbsElement = typeof thumbs.swiper === 'string' ? document.querySelector(thumbs.swiper) : thumbs.swiper; 12973 if (thumbsElement && thumbsElement.swiper) { 12974 thumbs.swiper = thumbsElement.swiper; 12975 init(); 12976 update(true); 12977 } else if (thumbsElement) { 12978 const onThumbsSwiper = e => { 12979 thumbs.swiper = e.detail[0]; 12980 thumbsElement.removeEventListener('init', onThumbsSwiper); 12981 init(); 12982 update(true); 12983 thumbs.swiper.update(); 12984 swiper.update(); 12985 }; 12986 thumbsElement.addEventListener('init', onThumbsSwiper); 12987 } 12988 return thumbsElement; 12989 }; 12990 const watchForThumbsToAppear = () => { 12991 if (swiper.destroyed) return; 12992 const thumbsElement = getThumbsElementAndInit(); 12993 if (!thumbsElement) { 12994 requestAnimationFrame(watchForThumbsToAppear); 12995 } 12996 }; 12997 requestAnimationFrame(watchForThumbsToAppear); 12998 } else { 12999 init(); 13000 update(true); 13001 } 13002 }); 13003 on('slideChange update resize observerUpdate', () => { 13004 update(); 13005 }); 13006 on('setTransition', (_s, duration) => { 13007 const thumbsSwiper = swiper.thumbs.swiper; 13008 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 13009 thumbsSwiper.setTransition(duration); 13010 }); 13011 on('beforeDestroy', () => { 13012 const thumbsSwiper = swiper.thumbs.swiper; 13013 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 13014 if (swiperCreated) { 13015 thumbsSwiper.destroy(); 13016 } 13017 }); 13018 Object.assign(swiper.thumbs, { 13019 init, 13020 update 13021 }); 13022} 13023 13024 13025 13026 13027/***/ }), 13028
vendor: 12,287 bytes, lines 13029-13390
13029/***/ "./node_modules/swiper/modules/virtual.mjs": 13030/*!*************************************************!*\ 13031 !*** ./node_modules/swiper/modules/virtual.mjs ***! 13032 \*************************************************/ 13033/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 13034 13035"use strict"; 13036__webpack_require__.r(__webpack_exports__); 13037/* harmony export */ __webpack_require__.d(__webpack_exports__, { 13038/* harmony export */ "default": () => (/* binding */ Virtual) 13039/* harmony export */ }); 13040/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 13041/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 13042 13043 13044 13045function Virtual(_ref) { 13046 let { 13047 swiper, 13048 extendParams, 13049 on, 13050 emit 13051 } = _ref; 13052 extendParams({ 13053 virtual: { 13054 enabled: false, 13055 slides: [], 13056 cache: true, 13057 renderSlide: null, 13058 renderExternal: null, 13059 renderExternalUpdate: true, 13060 addSlidesBefore: 0, 13061 addSlidesAfter: 0 13062 } 13063 }); 13064 let cssModeTimeout; 13065 const document = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 13066 swiper.virtual = { 13067 cache: {}, 13068 from: undefined, 13069 to: undefined, 13070 slides: [], 13071 offset: 0, 13072 slidesGrid: [] 13073 }; 13074 const tempDOM = document.createElement('div'); 13075 function renderSlide(slide, index) { 13076 const params = swiper.params.virtual; 13077 if (params.cache && swiper.virtual.cache[index]) { 13078 return swiper.virtual.cache[index]; 13079 } 13080 // eslint-disable-next-line 13081 let slideEl; 13082 if (params.renderSlide) { 13083 slideEl = params.renderSlide.call(swiper, slide, index); 13084 if (typeof slideEl === 'string') { 13085 tempDOM.innerHTML = slideEl; 13086 slideEl = tempDOM.children[0]; 13087 } 13088 } else if (swiper.isElement) { 13089 slideEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('swiper-slide'); 13090 } else { 13091 slideEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', swiper.params.slideClass); 13092 } 13093 slideEl.setAttribute('data-swiper-slide-index', index); 13094 if (!params.renderSlide) { 13095 slideEl.innerHTML = slide; 13096 } 13097 if (params.cache) { 13098 swiper.virtual.cache[index] = slideEl; 13099 } 13100 return slideEl; 13101 } 13102 function update(force) { 13103 const { 13104 slidesPerView, 13105 slidesPerGroup, 13106 centeredSlides, 13107 loop: isLoop 13108 } = swiper.params; 13109 const { 13110 addSlidesBefore, 13111 addSlidesAfter 13112 } = swiper.params.virtual; 13113 const { 13114 from: previousFrom, 13115 to: previousTo, 13116 slides, 13117 slidesGrid: previousSlidesGrid, 13118 offset: previousOffset 13119 } = swiper.virtual; 13120 if (!swiper.params.cssMode) { 13121 swiper.updateActiveIndex(); 13122 } 13123 const activeIndex = swiper.activeIndex || 0; 13124 let offsetProp; 13125 if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; 13126 let slidesAfter; 13127 let slidesBefore; 13128 if (centeredSlides) { 13129 slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; 13130 slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; 13131 } else { 13132 slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter; 13133 slidesBefore = (isLoop ? slidesPerView : slidesPerGroup) + addSlidesBefore; 13134 } 13135 let from = activeIndex - slidesBefore; 13136 let to = activeIndex + slidesAfter; 13137 if (!isLoop) { 13138 from = Math.max(from, 0); 13139 to = Math.min(to, slides.length - 1); 13140 } 13141 let offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); 13142 if (isLoop && activeIndex >= slidesBefore) { 13143 from -= slidesBefore; 13144 if (!centeredSlides) offset += swiper.slidesGrid[0]; 13145 } else if (isLoop && activeIndex < slidesBefore) { 13146 from = -slidesBefore; 13147 if (centeredSlides) offset += swiper.slidesGrid[0]; 13148 } 13149 Object.assign(swiper.virtual, { 13150 from, 13151 to, 13152 offset, 13153 slidesGrid: swiper.slidesGrid, 13154 slidesBefore, 13155 slidesAfter 13156 }); 13157 function onRendered() { 13158 swiper.updateSlides(); 13159 swiper.updateProgress(); 13160 swiper.updateSlidesClasses(); 13161 emit('virtualUpdate'); 13162 } 13163 if (previousFrom === from && previousTo === to && !force) { 13164 if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { 13165 swiper.slides.forEach(slideEl => { 13166 slideEl.style[offsetProp] = `${offset - Math.abs(swiper.cssOverflowAdjustment())}px`; 13167 }); 13168 } 13169 swiper.updateProgress(); 13170 emit('virtualUpdate'); 13171 return; 13172 } 13173 if (swiper.params.virtual.renderExternal) { 13174 swiper.params.virtual.renderExternal.call(swiper, { 13175 offset, 13176 from, 13177 to, 13178 slides: function getSlides() { 13179 const slidesToRender = []; 13180 for (let i = from; i <= to; i += 1) { 13181 slidesToRender.push(slides[i]); 13182 } 13183 return slidesToRender; 13184 }() 13185 }); 13186 if (swiper.params.virtual.renderExternalUpdate) { 13187 onRendered(); 13188 } else { 13189 emit('virtualUpdate'); 13190 } 13191 return; 13192 } 13193 const prependIndexes = []; 13194 const appendIndexes = []; 13195 const getSlideIndex = index => { 13196 let slideIndex = index; 13197 if (index < 0) { 13198 slideIndex = slides.length + index; 13199 } else if (slideIndex >= slides.length) { 13200 // eslint-disable-next-line 13201 slideIndex = slideIndex - slides.length; 13202 } 13203 return slideIndex; 13204 }; 13205 if (force) { 13206 swiper.slides.filter(el => el.matches(`.${swiper.params.slideClass}, swiper-slide`)).forEach(slideEl => { 13207 slideEl.remove(); 13208 }); 13209 } else { 13210 for (let i = previousFrom; i <= previousTo; i += 1) { 13211 if (i < from || i > to) { 13212 const slideIndex = getSlideIndex(i); 13213 swiper.slides.filter(el => el.matches(`.${swiper.params.slideClass}[data-swiper-slide-index="${slideIndex}"], swiper-slide[data-swiper-slide-index="${slideIndex}"]`)).forEach(slideEl => { 13214 slideEl.remove(); 13215 }); 13216 } 13217 } 13218 } 13219 const loopFrom = isLoop ? -slides.length : 0; 13220 const loopTo = isLoop ? slides.length * 2 : slides.length; 13221 for (let i = loopFrom; i < loopTo; i += 1) { 13222 if (i >= from && i <= to) { 13223 const slideIndex = getSlideIndex(i); 13224 if (typeof previousTo === 'undefined' || force) { 13225 appendIndexes.push(slideIndex); 13226 } else { 13227 if (i > previousTo) appendIndexes.push(slideIndex); 13228 if (i < previousFrom) prependIndexes.push(slideIndex); 13229 } 13230 } 13231 } 13232 appendIndexes.forEach(index => { 13233 swiper.slidesEl.append(renderSlide(slides[index], index)); 13234 }); 13235 if (isLoop) { 13236 for (let i = prependIndexes.length - 1; i >= 0; i -= 1) { 13237 const index = prependIndexes[i]; 13238 swiper.slidesEl.prepend(renderSlide(slides[index], index)); 13239 } 13240 } else { 13241 prependIndexes.sort((a, b) => b - a); 13242 prependIndexes.forEach(index => { 13243 swiper.slidesEl.prepend(renderSlide(slides[index], index)); 13244 }); 13245 } 13246 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(swiper.slidesEl, '.swiper-slide, swiper-slide').forEach(slideEl => { 13247 slideEl.style[offsetProp] = `${offset - Math.abs(swiper.cssOverflowAdjustment())}px`; 13248 }); 13249 onRendered(); 13250 } 13251 function appendSlide(slides) { 13252 if (typeof slides === 'object' && 'length' in slides) { 13253 for (let i = 0; i < slides.length; i += 1) { 13254 if (slides[i]) swiper.virtual.slides.push(slides[i]); 13255 } 13256 } else { 13257 swiper.virtual.slides.push(slides); 13258 } 13259 update(true); 13260 } 13261 function prependSlide(slides) { 13262 const activeIndex = swiper.activeIndex; 13263 let newActiveIndex = activeIndex + 1; 13264 let numberOfNewSlides = 1; 13265 if (Array.isArray(slides)) { 13266 for (let i = 0; i < slides.length; i += 1) { 13267 if (slides[i]) swiper.virtual.slides.unshift(slides[i]); 13268 } 13269 newActiveIndex = activeIndex + slides.length; 13270 numberOfNewSlides = slides.length; 13271 } else { 13272 swiper.virtual.slides.unshift(slides); 13273 } 13274 if (swiper.params.virtual.cache) { 13275 const cache = swiper.virtual.cache; 13276 const newCache = {}; 13277 Object.keys(cache).forEach(cachedIndex => { 13278 const cachedEl = cache[cachedIndex]; 13279 const cachedElIndex = cachedEl.getAttribute('data-swiper-slide-index'); 13280 if (cachedElIndex) { 13281 cachedEl.setAttribute('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides); 13282 } 13283 newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = cachedEl; 13284 }); 13285 swiper.virtual.cache = newCache; 13286 } 13287 update(true); 13288 swiper.slideTo(newActiveIndex, 0); 13289 } 13290 function removeSlide(slidesIndexes) { 13291 if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; 13292 let activeIndex = swiper.activeIndex; 13293 if (Array.isArray(slidesIndexes)) { 13294 for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) { 13295 if (swiper.params.virtual.cache) { 13296 delete swiper.virtual.cache[slidesIndexes[i]]; 13297 // shift cache indexes 13298 Object.keys(swiper.virtual.cache).forEach(key => { 13299 if (key > slidesIndexes) { 13300 swiper.virtual.cache[key - 1] = swiper.virtual.cache[key]; 13301 swiper.virtual.cache[key - 1].setAttribute('data-swiper-slide-index', key - 1); 13302 delete swiper.virtual.cache[key]; 13303 } 13304 }); 13305 } 13306 swiper.virtual.slides.splice(slidesIndexes[i], 1); 13307 if (slidesIndexes[i] < activeIndex) activeIndex -= 1; 13308 activeIndex = Math.max(activeIndex, 0); 13309 } 13310 } else { 13311 if (swiper.params.virtual.cache) { 13312 delete swiper.virtual.cache[slidesIndexes]; 13313 // shift cache indexes 13314 Object.keys(swiper.virtual.cache).forEach(key => { 13315 if (key > slidesIndexes) { 13316 swiper.virtual.cache[key - 1] = swiper.virtual.cache[key]; 13317 swiper.virtual.cache[key - 1].setAttribute('data-swiper-slide-index', key - 1); 13318 delete swiper.virtual.cache[key]; 13319 } 13320 }); 13321 } 13322 swiper.virtual.slides.splice(slidesIndexes, 1); 13323 if (slidesIndexes < activeIndex) activeIndex -= 1; 13324 activeIndex = Math.max(activeIndex, 0); 13325 } 13326 update(true); 13327 swiper.slideTo(activeIndex, 0); 13328 } 13329 function removeAllSlides() { 13330 swiper.virtual.slides = []; 13331 if (swiper.params.virtual.cache) { 13332 swiper.virtual.cache = {}; 13333 } 13334 update(true); 13335 swiper.slideTo(0, 0); 13336 } 13337 on('beforeInit', () => { 13338 if (!swiper.params.virtual.enabled) return; 13339 let domSlidesAssigned; 13340 if (typeof swiper.passedParams.virtual.slides === 'undefined') { 13341 const slides = [...swiper.slidesEl.children].filter(el => el.matches(`.${swiper.params.slideClass}, swiper-slide`)); 13342 if (slides && slides.length) { 13343 swiper.virtual.slides = [...slides]; 13344 domSlidesAssigned = true; 13345 slides.forEach((slideEl, slideIndex) => { 13346 slideEl.setAttribute('data-swiper-slide-index', slideIndex); 13347 swiper.virtual.cache[slideIndex] = slideEl; 13348 slideEl.remove(); 13349 }); 13350 } 13351 } 13352 if (!domSlidesAssigned) { 13353 swiper.virtual.slides = swiper.params.virtual.slides; 13354 } 13355 swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); 13356 swiper.params.watchSlidesProgress = true; 13357 swiper.originalParams.watchSlidesProgress = true; 13358 update(); 13359 }); 13360 on('setTranslate', () => { 13361 if (!swiper.params.virtual.enabled) return; 13362 if (swiper.params.cssMode && !swiper._immediateVirtual) { 13363 clearTimeout(cssModeTimeout); 13364 cssModeTimeout = setTimeout(() => { 13365 update(); 13366 }, 100); 13367 } else { 13368 update(); 13369 } 13370 }); 13371 on('init update resize', () => { 13372 if (!swiper.params.virtual.enabled) return; 13373 if (swiper.params.cssMode) { 13374 (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.s)(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`); 13375 } 13376 }); 13377 Object.assign(swiper.virtual, { 13378 appendSlide, 13379 prependSlide, 13380 removeSlide, 13381 removeAllSlides, 13382 update 13383 }); 13384} 13385 13386 13387 13388 13389/***/ }), 13390
vendor: 22,561 bytes, lines 13391-13998
13391/***/ "./node_modules/swiper/modules/zoom.mjs": 13392/*!**********************************************!*\ 13393 !*** ./node_modules/swiper/modules/zoom.mjs ***! 13394 \**********************************************/ 13395/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 13396 13397"use strict"; 13398__webpack_require__.r(__webpack_exports__); 13399/* harmony export */ __webpack_require__.d(__webpack_exports__, { 13400/* harmony export */ "default": () => (/* binding */ Zoom) 13401/* harmony export */ }); 13402/* harmony import */ var _shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 13403/* harmony import */ var _shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 13404 13405 13406 13407function Zoom(_ref) { 13408 let { 13409 swiper, 13410 extendParams, 13411 on, 13412 emit 13413 } = _ref; 13414 const window = (0,_shared_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 13415 extendParams({ 13416 zoom: { 13417 enabled: false, 13418 maxRatio: 3, 13419 minRatio: 1, 13420 toggle: true, 13421 containerClass: 'swiper-zoom-container', 13422 zoomedSlideClass: 'swiper-slide-zoomed' 13423 } 13424 }); 13425 swiper.zoom = { 13426 enabled: false 13427 }; 13428 let currentScale = 1; 13429 let isScaling = false; 13430 let fakeGestureTouched; 13431 let fakeGestureMoved; 13432 const evCache = []; 13433 const gesture = { 13434 originX: 0, 13435 originY: 0, 13436 slideEl: undefined, 13437 slideWidth: undefined, 13438 slideHeight: undefined, 13439 imageEl: undefined, 13440 imageWrapEl: undefined, 13441 maxRatio: 3 13442 }; 13443 const image = { 13444 isTouched: undefined, 13445 isMoved: undefined, 13446 currentX: undefined, 13447 currentY: undefined, 13448 minX: undefined, 13449 minY: undefined, 13450 maxX: undefined, 13451 maxY: undefined, 13452 width: undefined, 13453 height: undefined, 13454 startX: undefined, 13455 startY: undefined, 13456 touchesStart: {}, 13457 touchesCurrent: {} 13458 }; 13459 const velocity = { 13460 x: undefined, 13461 y: undefined, 13462 prevPositionX: undefined, 13463 prevPositionY: undefined, 13464 prevTime: undefined 13465 }; 13466 let scale = 1; 13467 Object.defineProperty(swiper.zoom, 'scale', { 13468 get() { 13469 return scale; 13470 }, 13471 set(value) { 13472 if (scale !== value) { 13473 const imageEl = gesture.imageEl; 13474 const slideEl = gesture.slideEl; 13475 emit('zoomChange', value, imageEl, slideEl); 13476 } 13477 scale = value; 13478 } 13479 }); 13480 function getDistanceBetweenTouches() { 13481 if (evCache.length < 2) return 1; 13482 const x1 = evCache[0].pageX; 13483 const y1 = evCache[0].pageY; 13484 const x2 = evCache[1].pageX; 13485 const y2 = evCache[1].pageY; 13486 const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2); 13487 return distance; 13488 } 13489 function getScaleOrigin() { 13490 if (evCache.length < 2) return { 13491 x: null, 13492 y: null 13493 }; 13494 const box = gesture.imageEl.getBoundingClientRect(); 13495 return [(evCache[0].pageX + (evCache[1].pageX - evCache[0].pageX) / 2 - box.x - window.scrollX) / currentScale, (evCache[0].pageY + (evCache[1].pageY - evCache[0].pageY) / 2 - box.y - window.scrollY) / currentScale]; 13496 } 13497 function getSlideSelector() { 13498 return swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`; 13499 } 13500 function eventWithinSlide(e) { 13501 const slideSelector = getSlideSelector(); 13502 if (e.target.matches(slideSelector)) return true; 13503 if (swiper.slides.filter(slideEl => slideEl.contains(e.target)).length > 0) return true; 13504 return false; 13505 } 13506 function eventWithinZoomContainer(e) { 13507 const selector = `.${swiper.params.zoom.containerClass}`; 13508 if (e.target.matches(selector)) return true; 13509 if ([...swiper.hostEl.querySelectorAll(selector)].filter(containerEl => containerEl.contains(e.target)).length > 0) return true; 13510 return false; 13511 } 13512 13513 // Events 13514 function onGestureStart(e) { 13515 if (e.pointerType === 'mouse') { 13516 evCache.splice(0, evCache.length); 13517 } 13518 if (!eventWithinSlide(e)) return; 13519 const params = swiper.params.zoom; 13520 fakeGestureTouched = false; 13521 fakeGestureMoved = false; 13522 evCache.push(e); 13523 if (evCache.length < 2) { 13524 return; 13525 } 13526 fakeGestureTouched = true; 13527 gesture.scaleStart = getDistanceBetweenTouches(); 13528 if (!gesture.slideEl) { 13529 gesture.slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`); 13530 if (!gesture.slideEl) gesture.slideEl = swiper.slides[swiper.activeIndex]; 13531 let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`); 13532 if (imageEl) { 13533 imageEl = imageEl.querySelectorAll('picture, img, svg, canvas, .swiper-zoom-target')[0]; 13534 } 13535 gesture.imageEl = imageEl; 13536 if (imageEl) { 13537 gesture.imageWrapEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.a)(gesture.imageEl, `.${params.containerClass}`)[0]; 13538 } else { 13539 gesture.imageWrapEl = undefined; 13540 } 13541 if (!gesture.imageWrapEl) { 13542 gesture.imageEl = undefined; 13543 return; 13544 } 13545 gesture.maxRatio = gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio; 13546 } 13547 if (gesture.imageEl) { 13548 const [originX, originY] = getScaleOrigin(); 13549 gesture.originX = originX; 13550 gesture.originY = originY; 13551 gesture.imageEl.style.transitionDuration = '0ms'; 13552 } 13553 isScaling = true; 13554 } 13555 function onGestureChange(e) { 13556 if (!eventWithinSlide(e)) return; 13557 const params = swiper.params.zoom; 13558 const zoom = swiper.zoom; 13559 const pointerIndex = evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId); 13560 if (pointerIndex >= 0) evCache[pointerIndex] = e; 13561 if (evCache.length < 2) { 13562 return; 13563 } 13564 fakeGestureMoved = true; 13565 gesture.scaleMove = getDistanceBetweenTouches(); 13566 if (!gesture.imageEl) { 13567 return; 13568 } 13569 zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale; 13570 if (zoom.scale > gesture.maxRatio) { 13571 zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5; 13572 } 13573 if (zoom.scale < params.minRatio) { 13574 zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5; 13575 } 13576 gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`; 13577 } 13578 function onGestureEnd(e) { 13579 if (!eventWithinSlide(e)) return; 13580 if (e.pointerType === 'mouse' && e.type === 'pointerout') return; 13581 const params = swiper.params.zoom; 13582 const zoom = swiper.zoom; 13583 const pointerIndex = evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId); 13584 if (pointerIndex >= 0) evCache.splice(pointerIndex, 1); 13585 if (!fakeGestureTouched || !fakeGestureMoved) { 13586 return; 13587 } 13588 fakeGestureTouched = false; 13589 fakeGestureMoved = false; 13590 if (!gesture.imageEl) return; 13591 zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); 13592 gesture.imageEl.style.transitionDuration = `${swiper.params.speed}ms`; 13593 gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`; 13594 currentScale = zoom.scale; 13595 isScaling = false; 13596 if (zoom.scale > 1 && gesture.slideEl) { 13597 gesture.slideEl.classList.add(`${params.zoomedSlideClass}`); 13598 } else if (zoom.scale <= 1 && gesture.slideEl) { 13599 gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`); 13600 } 13601 if (zoom.scale === 1) { 13602 gesture.originX = 0; 13603 gesture.originY = 0; 13604 gesture.slideEl = undefined; 13605 } 13606 } 13607 function onTouchStart(e) { 13608 const device = swiper.device; 13609 if (!gesture.imageEl) return; 13610 if (image.isTouched) return; 13611 if (device.android && e.cancelable) e.preventDefault(); 13612 image.isTouched = true; 13613 const event = evCache.length > 0 ? evCache[0] : e; 13614 image.touchesStart.x = event.pageX; 13615 image.touchesStart.y = event.pageY; 13616 } 13617 function onTouchMove(e) { 13618 if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) return; 13619 const zoom = swiper.zoom; 13620 if (!gesture.imageEl) return; 13621 if (!image.isTouched || !gesture.slideEl) return; 13622 if (!image.isMoved) { 13623 image.width = gesture.imageEl.offsetWidth; 13624 image.height = gesture.imageEl.offsetHeight; 13625 image.startX = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.i)(gesture.imageWrapEl, 'x') || 0; 13626 image.startY = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.i)(gesture.imageWrapEl, 'y') || 0; 13627 gesture.slideWidth = gesture.slideEl.offsetWidth; 13628 gesture.slideHeight = gesture.slideEl.offsetHeight; 13629 gesture.imageWrapEl.style.transitionDuration = '0ms'; 13630 } 13631 // Define if we need image drag 13632 const scaledWidth = image.width * zoom.scale; 13633 const scaledHeight = image.height * zoom.scale; 13634 if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; 13635 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 13636 image.maxX = -image.minX; 13637 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 13638 image.maxY = -image.minY; 13639 image.touchesCurrent.x = evCache.length > 0 ? evCache[0].pageX : e.pageX; 13640 image.touchesCurrent.y = evCache.length > 0 ? evCache[0].pageY : e.pageY; 13641 const touchesDiff = Math.max(Math.abs(image.touchesCurrent.x - image.touchesStart.x), Math.abs(image.touchesCurrent.y - image.touchesStart.y)); 13642 if (touchesDiff > 5) { 13643 swiper.allowClick = false; 13644 } 13645 if (!image.isMoved && !isScaling) { 13646 if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { 13647 image.isTouched = false; 13648 return; 13649 } 13650 if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { 13651 image.isTouched = false; 13652 return; 13653 } 13654 } 13655 if (e.cancelable) { 13656 e.preventDefault(); 13657 } 13658 e.stopPropagation(); 13659 image.isMoved = true; 13660 const scaleRatio = (zoom.scale - currentScale) / (gesture.maxRatio - swiper.params.zoom.minRatio); 13661 const { 13662 originX, 13663 originY 13664 } = gesture; 13665 image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX + scaleRatio * (image.width - originX * 2); 13666 image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY + scaleRatio * (image.height - originY * 2); 13667 if (image.currentX < image.minX) { 13668 image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8; 13669 } 13670 if (image.currentX > image.maxX) { 13671 image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8; 13672 } 13673 if (image.currentY < image.minY) { 13674 image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8; 13675 } 13676 if (image.currentY > image.maxY) { 13677 image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8; 13678 } 13679 13680 // Velocity 13681 if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; 13682 if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; 13683 if (!velocity.prevTime) velocity.prevTime = Date.now(); 13684 velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; 13685 velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; 13686 if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; 13687 if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; 13688 velocity.prevPositionX = image.touchesCurrent.x; 13689 velocity.prevPositionY = image.touchesCurrent.y; 13690 velocity.prevTime = Date.now(); 13691 gesture.imageWrapEl.style.transform = `translate3d(${image.currentX}px, ${image.currentY}px,0)`; 13692 } 13693 function onTouchEnd() { 13694 const zoom = swiper.zoom; 13695 if (!gesture.imageEl) return; 13696 if (!image.isTouched || !image.isMoved) { 13697 image.isTouched = false; 13698 image.isMoved = false; 13699 return; 13700 } 13701 image.isTouched = false; 13702 image.isMoved = false; 13703 let momentumDurationX = 300; 13704 let momentumDurationY = 300; 13705 const momentumDistanceX = velocity.x * momentumDurationX; 13706 const newPositionX = image.currentX + momentumDistanceX; 13707 const momentumDistanceY = velocity.y * momentumDurationY; 13708 const newPositionY = image.currentY + momentumDistanceY; 13709 13710 // Fix duration 13711 if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); 13712 if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); 13713 const momentumDuration = Math.max(momentumDurationX, momentumDurationY); 13714 image.currentX = newPositionX; 13715 image.currentY = newPositionY; 13716 // Define if we need image drag 13717 const scaledWidth = image.width * zoom.scale; 13718 const scaledHeight = image.height * zoom.scale; 13719 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 13720 image.maxX = -image.minX; 13721 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 13722 image.maxY = -image.minY; 13723 image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); 13724 image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); 13725 gesture.imageWrapEl.style.transitionDuration = `${momentumDuration}ms`; 13726 gesture.imageWrapEl.style.transform = `translate3d(${image.currentX}px, ${image.currentY}px,0)`; 13727 } 13728 function onTransitionEnd() { 13729 const zoom = swiper.zoom; 13730 if (gesture.slideEl && swiper.activeIndex !== swiper.slides.indexOf(gesture.slideEl)) { 13731 if (gesture.imageEl) { 13732 gesture.imageEl.style.transform = 'translate3d(0,0,0) scale(1)'; 13733 } 13734 if (gesture.imageWrapEl) { 13735 gesture.imageWrapEl.style.transform = 'translate3d(0,0,0)'; 13736 } 13737 gesture.slideEl.classList.remove(`${swiper.params.zoom.zoomedSlideClass}`); 13738 zoom.scale = 1; 13739 currentScale = 1; 13740 gesture.slideEl = undefined; 13741 gesture.imageEl = undefined; 13742 gesture.imageWrapEl = undefined; 13743 gesture.originX = 0; 13744 gesture.originY = 0; 13745 } 13746 } 13747 function zoomIn(e) { 13748 const zoom = swiper.zoom; 13749 const params = swiper.params.zoom; 13750 if (!gesture.slideEl) { 13751 if (e && e.target) { 13752 gesture.slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`); 13753 } 13754 if (!gesture.slideEl) { 13755 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 13756 gesture.slideEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(swiper.slidesEl, `.${swiper.params.slideActiveClass}`)[0]; 13757 } else { 13758 gesture.slideEl = swiper.slides[swiper.activeIndex]; 13759 } 13760 } 13761 let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`); 13762 if (imageEl) { 13763 imageEl = imageEl.querySelectorAll('picture, img, svg, canvas, .swiper-zoom-target')[0]; 13764 } 13765 gesture.imageEl = imageEl; 13766 if (imageEl) { 13767 gesture.imageWrapEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.a)(gesture.imageEl, `.${params.containerClass}`)[0]; 13768 } else { 13769 gesture.imageWrapEl = undefined; 13770 } 13771 } 13772 if (!gesture.imageEl || !gesture.imageWrapEl) return; 13773 if (swiper.params.cssMode) { 13774 swiper.wrapperEl.style.overflow = 'hidden'; 13775 swiper.wrapperEl.style.touchAction = 'none'; 13776 } 13777 gesture.slideEl.classList.add(`${params.zoomedSlideClass}`); 13778 let touchX; 13779 let touchY; 13780 let offsetX; 13781 let offsetY; 13782 let diffX; 13783 let diffY; 13784 let translateX; 13785 let translateY; 13786 let imageWidth; 13787 let imageHeight; 13788 let scaledWidth; 13789 let scaledHeight; 13790 let translateMinX; 13791 let translateMinY; 13792 let translateMaxX; 13793 let translateMaxY; 13794 let slideWidth; 13795 let slideHeight; 13796 if (typeof image.touchesStart.x === 'undefined' && e) { 13797 touchX = e.pageX; 13798 touchY = e.pageY; 13799 } else { 13800 touchX = image.touchesStart.x; 13801 touchY = image.touchesStart.y; 13802 } 13803 const forceZoomRatio = typeof e === 'number' ? e : null; 13804 if (currentScale === 1 && forceZoomRatio) { 13805 touchX = undefined; 13806 touchY = undefined; 13807 } 13808 zoom.scale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio; 13809 currentScale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio; 13810 if (e && !(currentScale === 1 && forceZoomRatio)) { 13811 slideWidth = gesture.slideEl.offsetWidth; 13812 slideHeight = gesture.slideEl.offsetHeight; 13813 offsetX = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(gesture.slideEl).left + window.scrollX; 13814 offsetY = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(gesture.slideEl).top + window.scrollY; 13815 diffX = offsetX + slideWidth / 2 - touchX; 13816 diffY = offsetY + slideHeight / 2 - touchY; 13817 imageWidth = gesture.imageEl.offsetWidth; 13818 imageHeight = gesture.imageEl.offsetHeight; 13819 scaledWidth = imageWidth * zoom.scale; 13820 scaledHeight = imageHeight * zoom.scale; 13821 translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); 13822 translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); 13823 translateMaxX = -translateMinX; 13824 translateMaxY = -translateMinY; 13825 translateX = diffX * zoom.scale; 13826 translateY = diffY * zoom.scale; 13827 if (translateX < translateMinX) { 13828 translateX = translateMinX; 13829 } 13830 if (translateX > translateMaxX) { 13831 translateX = translateMaxX; 13832 } 13833 if (translateY < translateMinY) { 13834 translateY = translateMinY; 13835 } 13836 if (translateY > translateMaxY) { 13837 translateY = translateMaxY; 13838 } 13839 } else { 13840 translateX = 0; 13841 translateY = 0; 13842 } 13843 if (forceZoomRatio && zoom.scale === 1) { 13844 gesture.originX = 0; 13845 gesture.originY = 0; 13846 } 13847 gesture.imageWrapEl.style.transitionDuration = '300ms'; 13848 gesture.imageWrapEl.style.transform = `translate3d(${translateX}px, ${translateY}px,0)`; 13849 gesture.imageEl.style.transitionDuration = '300ms'; 13850 gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`; 13851 } 13852 function zoomOut() { 13853 const zoom = swiper.zoom; 13854 const params = swiper.params.zoom; 13855 if (!gesture.slideEl) { 13856 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 13857 gesture.slideEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(swiper.slidesEl, `.${swiper.params.slideActiveClass}`)[0]; 13858 } else { 13859 gesture.slideEl = swiper.slides[swiper.activeIndex]; 13860 } 13861 let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`); 13862 if (imageEl) { 13863 imageEl = imageEl.querySelectorAll('picture, img, svg, canvas, .swiper-zoom-target')[0]; 13864 } 13865 gesture.imageEl = imageEl; 13866 if (imageEl) { 13867 gesture.imageWrapEl = (0,_shared_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.a)(gesture.imageEl, `.${params.containerClass}`)[0]; 13868 } else { 13869 gesture.imageWrapEl = undefined; 13870 } 13871 } 13872 if (!gesture.imageEl || !gesture.imageWrapEl) return; 13873 if (swiper.params.cssMode) { 13874 swiper.wrapperEl.style.overflow = ''; 13875 swiper.wrapperEl.style.touchAction = ''; 13876 } 13877 zoom.scale = 1; 13878 currentScale = 1; 13879 gesture.imageWrapEl.style.transitionDuration = '300ms'; 13880 gesture.imageWrapEl.style.transform = 'translate3d(0,0,0)'; 13881 gesture.imageEl.style.transitionDuration = '300ms'; 13882 gesture.imageEl.style.transform = 'translate3d(0,0,0) scale(1)'; 13883 gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`); 13884 gesture.slideEl = undefined; 13885 gesture.originX = 0; 13886 gesture.originY = 0; 13887 } 13888 13889 // Toggle Zoom 13890 function zoomToggle(e) { 13891 const zoom = swiper.zoom; 13892 if (zoom.scale && zoom.scale !== 1) { 13893 // Zoom Out 13894 zoomOut(); 13895 } else { 13896 // Zoom In 13897 zoomIn(e); 13898 } 13899 } 13900 function getListeners() { 13901 const passiveListener = swiper.params.passiveListeners ? { 13902 passive: true, 13903 capture: false 13904 } : false; 13905 const activeListenerWithCapture = swiper.params.passiveListeners ? { 13906 passive: false, 13907 capture: true 13908 } : true; 13909 return { 13910 passiveListener, 13911 activeListenerWithCapture 13912 }; 13913 } 13914 13915 // Attach/Detach Events 13916 function enable() { 13917 const zoom = swiper.zoom; 13918 if (zoom.enabled) return; 13919 zoom.enabled = true; 13920 const { 13921 passiveListener, 13922 activeListenerWithCapture 13923 } = getListeners(); 13924 13925 // Scale image 13926 swiper.wrapperEl.addEventListener('pointerdown', onGestureStart, passiveListener); 13927 swiper.wrapperEl.addEventListener('pointermove', onGestureChange, activeListenerWithCapture); 13928 ['pointerup', 'pointercancel', 'pointerout'].forEach(eventName => { 13929 swiper.wrapperEl.addEventListener(eventName, onGestureEnd, passiveListener); 13930 }); 13931 13932 // Move image 13933 swiper.wrapperEl.addEventListener('pointermove', onTouchMove, activeListenerWithCapture); 13934 } 13935 function disable() { 13936 const zoom = swiper.zoom; 13937 if (!zoom.enabled) return; 13938 zoom.enabled = false; 13939 const { 13940 passiveListener, 13941 activeListenerWithCapture 13942 } = getListeners(); 13943 13944 // Scale image 13945 swiper.wrapperEl.removeEventListener('pointerdown', onGestureStart, passiveListener); 13946 swiper.wrapperEl.removeEventListener('pointermove', onGestureChange, activeListenerWithCapture); 13947 ['pointerup', 'pointercancel', 'pointerout'].forEach(eventName => { 13948 swiper.wrapperEl.removeEventListener(eventName, onGestureEnd, passiveListener); 13949 }); 13950 13951 // Move image 13952 swiper.wrapperEl.removeEventListener('pointermove', onTouchMove, activeListenerWithCapture); 13953 } 13954 on('init', () => { 13955 if (swiper.params.zoom.enabled) { 13956 enable(); 13957 } 13958 }); 13959 on('destroy', () => { 13960 disable(); 13961 }); 13962 on('touchStart', (_s, e) => { 13963 if (!swiper.zoom.enabled) return; 13964 onTouchStart(e); 13965 }); 13966 on('touchEnd', (_s, e) => { 13967 if (!swiper.zoom.enabled) return; 13968 onTouchEnd(); 13969 }); 13970 on('doubleTap', (_s, e) => { 13971 if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { 13972 zoomToggle(e); 13973 } 13974 }); 13975 on('transitionEnd', () => { 13976 if (swiper.zoom.enabled && swiper.params.zoom.enabled) { 13977 onTransitionEnd(); 13978 } 13979 }); 13980 on('slideChange', () => { 13981 if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { 13982 onTransitionEnd(); 13983 } 13984 }); 13985 Object.assign(swiper.zoom, { 13986 enable, 13987 disable, 13988 in: zoomIn, 13989 out: zoomOut, 13990 toggle: zoomToggle 13991 }); 13992} 13993 13994 13995 13996 13997/***/ }), 13998
vendor: 780 bytes, lines 13999-14022
13999/***/ "./node_modules/swiper/shared/classes-to-selector.mjs": 14000/*!************************************************************!*\ 14001 !*** ./node_modules/swiper/shared/classes-to-selector.mjs ***! 14002 \************************************************************/ 14003/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14004 14005"use strict"; 14006__webpack_require__.r(__webpack_exports__); 14007/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14008/* harmony export */ c: () => (/* binding */ classesToSelector) 14009/* harmony export */ }); 14010function classesToSelector(classes) { 14011 if (classes === void 0) { 14012 classes = ''; 14013 } 14014 return `.${classes.trim().replace(/([\.:!+\/])/g, '\\$1') // eslint-disable-line 14015 .replace(/ /g, '.')}`; 14016} 14017 14018 14019 14020 14021/***/ }), 14022
vendor: 1,419 bytes, lines 14023-14059
14023/***/ "./node_modules/swiper/shared/create-element-if-not-defined.mjs": 14024/*!**********************************************************************!*\ 14025 !*** ./node_modules/swiper/shared/create-element-if-not-defined.mjs ***! 14026 \**********************************************************************/ 14027/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14028 14029"use strict"; 14030__webpack_require__.r(__webpack_exports__); 14031/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14032/* harmony export */ c: () => (/* binding */ createElementIfNotDefined) 14033/* harmony export */ }); 14034/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 14035 14036 14037function createElementIfNotDefined(swiper, originalParams, params, checkProps) { 14038 if (swiper.params.createElements) { 14039 Object.keys(checkProps).forEach(key => { 14040 if (!params[key] && params.auto === true) { 14041 let element = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.e)(swiper.el, `.${checkProps[key]}`)[0]; 14042 if (!element) { 14043 element = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('div', checkProps[key]); 14044 element.className = checkProps[key]; 14045 swiper.el.append(element); 14046 } 14047 params[key] = element; 14048 originalParams[key] = element; 14049 } 14050 }); 14051 } 14052 return params; 14053} 14054 14055 14056 14057 14058/***/ }), 14059
vendor: 1,215 bytes, lines 14060-14089
14060/***/ "./node_modules/swiper/shared/create-shadow.mjs": 14061/*!******************************************************!*\ 14062 !*** ./node_modules/swiper/shared/create-shadow.mjs ***! 14063 \******************************************************/ 14064/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14065 14066"use strict"; 14067__webpack_require__.r(__webpack_exports__); 14068/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14069/* harmony export */ c: () => (/* binding */ createShadow) 14070/* harmony export */ }); 14071/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 14072 14073 14074function createShadow(suffix, slideEl, side) { 14075 const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}${suffix ? ` swiper-slide-shadow-${suffix}` : ''}`; 14076 const shadowContainer = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.l)(slideEl); 14077 let shadowEl = shadowContainer.querySelector(`.${shadowClass.split(' ').join('.')}`); 14078 if (!shadowEl) { 14079 shadowEl = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.c)('div', shadowClass.split(' ')); 14080 shadowContainer.append(shadowEl); 14081 } 14082 return shadowEl; 14083} 14084 14085 14086 14087 14088/***/ }), 14089
vendor: 2,338 bytes, lines 14090-14162
14090/***/ "./node_modules/swiper/shared/effect-init.mjs": 14091/*!****************************************************!*\ 14092 !*** ./node_modules/swiper/shared/effect-init.mjs ***! 14093 \****************************************************/ 14094/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14095 14096"use strict"; 14097__webpack_require__.r(__webpack_exports__); 14098/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14099/* harmony export */ e: () => (/* binding */ effectInit) 14100/* harmony export */ }); 14101function effectInit(params) { 14102 const { 14103 effect, 14104 swiper, 14105 on, 14106 setTranslate, 14107 setTransition, 14108 overwriteParams, 14109 perspective, 14110 recreateShadows, 14111 getEffectParams 14112 } = params; 14113 on('beforeInit', () => { 14114 if (swiper.params.effect !== effect) return; 14115 swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); 14116 if (perspective && perspective()) { 14117 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 14118 } 14119 const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; 14120 Object.assign(swiper.params, overwriteParamsResult); 14121 Object.assign(swiper.originalParams, overwriteParamsResult); 14122 }); 14123 on('setTranslate', () => { 14124 if (swiper.params.effect !== effect) return; 14125 setTranslate(); 14126 }); 14127 on('setTransition', (_s, duration) => { 14128 if (swiper.params.effect !== effect) return; 14129 setTransition(duration); 14130 }); 14131 on('transitionEnd', () => { 14132 if (swiper.params.effect !== effect) return; 14133 if (recreateShadows) { 14134 if (!getEffectParams || !getEffectParams().slideShadows) return; 14135 // remove shadows 14136 swiper.slides.forEach(slideEl => { 14137 slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => shadowEl.remove()); 14138 }); 14139 // create new one 14140 recreateShadows(); 14141 } 14142 }); 14143 let requireUpdateOnVirtual; 14144 on('virtualUpdate', () => { 14145 if (swiper.params.effect !== effect) return; 14146 if (!swiper.slides.length) { 14147 requireUpdateOnVirtual = true; 14148 } 14149 requestAnimationFrame(() => { 14150 if (requireUpdateOnVirtual && swiper.slides && swiper.slides.length) { 14151 setTranslate(); 14152 requireUpdateOnVirtual = false; 14153 } 14154 }); 14155 }); 14156} 14157 14158 14159 14160 14161/***/ }), 14162
vendor: 1,008 bytes, lines 14163-14190
14163/***/ "./node_modules/swiper/shared/effect-target.mjs": 14164/*!******************************************************!*\ 14165 !*** ./node_modules/swiper/shared/effect-target.mjs ***! 14166 \******************************************************/ 14167/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14168 14169"use strict"; 14170__webpack_require__.r(__webpack_exports__); 14171/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14172/* harmony export */ e: () => (/* binding */ effectTarget) 14173/* harmony export */ }); 14174/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 14175 14176 14177function effectTarget(effectParams, slideEl) { 14178 const transformEl = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.l)(slideEl); 14179 if (transformEl !== slideEl) { 14180 transformEl.style.backfaceVisibility = 'hidden'; 14181 transformEl.style['-webkit-backface-visibility'] = 'hidden'; 14182 } 14183 return transformEl; 14184} 14185 14186 14187 14188 14189/***/ }), 14190
vendor: 2,116 bytes, lines 14191-14254
14191/***/ "./node_modules/swiper/shared/effect-virtual-transition-end.mjs": 14192/*!**********************************************************************!*\ 14193 !*** ./node_modules/swiper/shared/effect-virtual-transition-end.mjs ***! 14194 \**********************************************************************/ 14195/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14196 14197"use strict"; 14198__webpack_require__.r(__webpack_exports__); 14199/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14200/* harmony export */ e: () => (/* binding */ effectVirtualTransitionEnd) 14201/* harmony export */ }); 14202/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 14203 14204 14205function effectVirtualTransitionEnd(_ref) { 14206 let { 14207 swiper, 14208 duration, 14209 transformElements, 14210 allSlides 14211 } = _ref; 14212 const { 14213 activeIndex 14214 } = swiper; 14215 const getSlide = el => { 14216 if (!el.parentElement) { 14217 // assume shadow root 14218 const slide = swiper.slides.filter(slideEl => slideEl.shadowRoot && slideEl.shadowRoot === el.parentNode)[0]; 14219 return slide; 14220 } 14221 return el.parentElement; 14222 }; 14223 if (swiper.params.virtualTranslate && duration !== 0) { 14224 let eventTriggered = false; 14225 let transitionEndTarget; 14226 if (allSlides) { 14227 transitionEndTarget = transformElements; 14228 } else { 14229 transitionEndTarget = transformElements.filter(transformEl => { 14230 const el = transformEl.classList.contains('swiper-slide-transform') ? getSlide(transformEl) : transformEl; 14231 return swiper.getSlideIndex(el) === activeIndex; 14232 }); 14233 } 14234 transitionEndTarget.forEach(el => { 14235 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.j)(el, () => { 14236 if (eventTriggered) return; 14237 if (!swiper || swiper.destroyed) return; 14238 eventTriggered = true; 14239 swiper.animating = false; 14240 const evt = new window.CustomEvent('transitionend', { 14241 bubbles: true, 14242 cancelable: true 14243 }); 14244 swiper.wrapperEl.dispatchEvent(evt); 14245 }); 14246 }); 14247 } 14248} 14249 14250 14251 14252 14253/***/ }), 14254
vendor: 3,334 bytes, lines 14255-14415
14255/***/ "./node_modules/swiper/shared/ssr-window.esm.mjs": 14256/*!*******************************************************!*\ 14257 !*** ./node_modules/swiper/shared/ssr-window.esm.mjs ***! 14258 \*******************************************************/ 14259/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14260 14261"use strict"; 14262__webpack_require__.r(__webpack_exports__); 14263/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14264/* harmony export */ a: () => (/* binding */ getWindow), 14265/* harmony export */ g: () => (/* binding */ getDocument) 14266/* harmony export */ }); 14267/** 14268 * SSR Window 4.0.2 14269 * Better handling for window object in SSR environment 14270 * https://github.com/nolimits4web/ssr-window 14271 * 14272 * Copyright 2021, Vladimir Kharlampidi 14273 * 14274 * Licensed under MIT 14275 * 14276 * Released on: December 13, 2021 14277 */ 14278/* eslint-disable no-param-reassign */ 14279function isObject(obj) { 14280 return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object; 14281} 14282function extend(target, src) { 14283 if (target === void 0) { 14284 target = {}; 14285 } 14286 if (src === void 0) { 14287 src = {}; 14288 } 14289 Object.keys(src).forEach(key => { 14290 if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) { 14291 extend(target[key], src[key]); 14292 } 14293 }); 14294} 14295const ssrDocument = { 14296 body: {}, 14297 addEventListener() {}, 14298 removeEventListener() {}, 14299 activeElement: { 14300 blur() {}, 14301 nodeName: '' 14302 }, 14303 querySelector() { 14304 return null; 14305 }, 14306 querySelectorAll() { 14307 return []; 14308 }, 14309 getElementById() { 14310 return null; 14311 }, 14312 createEvent() { 14313 return { 14314 initEvent() {} 14315 }; 14316 }, 14317 createElement() { 14318 return { 14319 children: [], 14320 childNodes: [], 14321 style: {}, 14322 setAttribute() {}, 14323 getElementsByTagName() { 14324 return []; 14325 } 14326 }; 14327 }, 14328 createElementNS() { 14329 return {}; 14330 }, 14331 importNode() { 14332 return null; 14333 }, 14334 location: { 14335 hash: '', 14336 host: '', 14337 hostname: '', 14338 href: '', 14339 origin: '', 14340 pathname: '', 14341 protocol: '', 14342 search: '' 14343 } 14344}; 14345function getDocument() { 14346 const doc = typeof document !== 'undefined' ? document : {}; 14347 extend(doc, ssrDocument); 14348 return doc; 14349} 14350const ssrWindow = { 14351 document: ssrDocument, 14352 navigator: { 14353 userAgent: '' 14354 }, 14355 location: { 14356 hash: '', 14357 host: '', 14358 hostname: '', 14359 href: '', 14360 origin: '', 14361 pathname: '', 14362 protocol: '', 14363 search: '' 14364 }, 14365 history: { 14366 replaceState() {}, 14367 pushState() {}, 14368 go() {}, 14369 back() {} 14370 }, 14371 CustomEvent: function CustomEvent() { 14372 return this; 14373 }, 14374 addEventListener() {}, 14375 removeEventListener() {}, 14376 getComputedStyle() { 14377 return { 14378 getPropertyValue() { 14379 return ''; 14380 } 14381 }; 14382 }, 14383 Image() {}, 14384 Date() {}, 14385 screen: {}, 14386 setTimeout() {}, 14387 clearTimeout() {}, 14388 matchMedia() { 14389 return {}; 14390 }, 14391 requestAnimationFrame(callback) { 14392 if (typeof setTimeout === 'undefined') { 14393 callback(); 14394 return null; 14395 } 14396 return setTimeout(callback, 0); 14397 }, 14398 cancelAnimationFrame(id) { 14399 if (typeof setTimeout === 'undefined') { 14400 return; 14401 } 14402 clearTimeout(id); 14403 } 14404}; 14405function getWindow() { 14406 const win = typeof window !== 'undefined' ? window : {}; 14407 extend(win, ssrWindow); 14408 return win; 14409} 14410 14411 14412 14413 14414/***/ }), 14415
vendor: 130,311 bytes, lines 14416-18313
14416/***/ "./node_modules/swiper/shared/swiper-core.mjs": 14417/*!****************************************************!*\ 14418 !*** ./node_modules/swiper/shared/swiper-core.mjs ***! 14419 \****************************************************/ 14420/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 14421 14422"use strict"; 14423__webpack_require__.r(__webpack_exports__); 14424/* harmony export */ __webpack_require__.d(__webpack_exports__, { 14425/* harmony export */ S: () => (/* binding */ Swiper), 14426/* harmony export */ d: () => (/* binding */ defaults) 14427/* harmony export */ }); 14428/* harmony import */ var _ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 14429/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.mjs */ "./node_modules/swiper/shared/utils.mjs"); 14430 14431 14432 14433let support; 14434function calcSupport() { 14435 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 14436 const document = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 14437 return { 14438 smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style, 14439 touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch) 14440 }; 14441} 14442function getSupport() { 14443 if (!support) { 14444 support = calcSupport(); 14445 } 14446 return support; 14447} 14448 14449let deviceCached; 14450function calcDevice(_temp) { 14451 let { 14452 userAgent 14453 } = _temp === void 0 ? {} : _temp; 14454 const support = getSupport(); 14455 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 14456 const platform = window.navigator.platform; 14457 const ua = userAgent || window.navigator.userAgent; 14458 const device = { 14459 ios: false, 14460 android: false 14461 }; 14462 const screenWidth = window.screen.width; 14463 const screenHeight = window.screen.height; 14464 const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line 14465 let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); 14466 const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 14467 const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 14468 const windows = platform === 'Win32'; 14469 let macos = platform === 'MacIntel'; 14470 14471 // iPadOs 13 fix 14472 const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810']; 14473 if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { 14474 ipad = ua.match(/(Version)\/([\d.]+)/); 14475 if (!ipad) ipad = [0, 1, '13_0_0']; 14476 macos = false; 14477 } 14478 14479 // Android 14480 if (android && !windows) { 14481 device.os = 'android'; 14482 device.android = true; 14483 } 14484 if (ipad || iphone || ipod) { 14485 device.os = 'ios'; 14486 device.ios = true; 14487 } 14488 14489 // Export object 14490 return device; 14491} 14492function getDevice(overrides) { 14493 if (overrides === void 0) { 14494 overrides = {}; 14495 } 14496 if (!deviceCached) { 14497 deviceCached = calcDevice(overrides); 14498 } 14499 return deviceCached; 14500} 14501 14502let browser; 14503function calcBrowser() { 14504 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 14505 let needPerspectiveFix = false; 14506 function isSafari() { 14507 const ua = window.navigator.userAgent.toLowerCase(); 14508 return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; 14509 } 14510 if (isSafari()) { 14511 const ua = String(window.navigator.userAgent); 14512 if (ua.includes('Version/')) { 14513 const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num)); 14514 needPerspectiveFix = major < 16 || major === 16 && minor < 2; 14515 } 14516 } 14517 return { 14518 isSafari: needPerspectiveFix || isSafari(), 14519 needPerspectiveFix, 14520 isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent) 14521 }; 14522} 14523function getBrowser() { 14524 if (!browser) { 14525 browser = calcBrowser(); 14526 } 14527 return browser; 14528} 14529 14530function Resize(_ref) { 14531 let { 14532 swiper, 14533 on, 14534 emit 14535 } = _ref; 14536 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 14537 let observer = null; 14538 let animationFrame = null; 14539 const resizeHandler = () => { 14540 if (!swiper || swiper.destroyed || !swiper.initialized) return; 14541 emit('beforeResize'); 14542 emit('resize'); 14543 }; 14544 const createObserver = () => { 14545 if (!swiper || swiper.destroyed || !swiper.initialized) return; 14546 observer = new ResizeObserver(entries => { 14547 animationFrame = window.requestAnimationFrame(() => { 14548 const { 14549 width, 14550 height 14551 } = swiper; 14552 let newWidth = width; 14553 let newHeight = height; 14554 entries.forEach(_ref2 => { 14555 let { 14556 contentBoxSize, 14557 contentRect, 14558 target 14559 } = _ref2; 14560 if (target && target !== swiper.el) return; 14561 newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; 14562 newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; 14563 }); 14564 if (newWidth !== width || newHeight !== height) { 14565 resizeHandler(); 14566 } 14567 }); 14568 }); 14569 observer.observe(swiper.el); 14570 }; 14571 const removeObserver = () => { 14572 if (animationFrame) { 14573 window.cancelAnimationFrame(animationFrame); 14574 } 14575 if (observer && observer.unobserve && swiper.el) { 14576 observer.unobserve(swiper.el); 14577 observer = null; 14578 } 14579 }; 14580 const orientationChangeHandler = () => { 14581 if (!swiper || swiper.destroyed || !swiper.initialized) return; 14582 emit('orientationchange'); 14583 }; 14584 on('init', () => { 14585 if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') { 14586 createObserver(); 14587 return; 14588 } 14589 window.addEventListener('resize', resizeHandler); 14590 window.addEventListener('orientationchange', orientationChangeHandler); 14591 }); 14592 on('destroy', () => { 14593 removeObserver(); 14594 window.removeEventListener('resize', resizeHandler); 14595 window.removeEventListener('orientationchange', orientationChangeHandler); 14596 }); 14597} 14598 14599function Observer(_ref) { 14600 let { 14601 swiper, 14602 extendParams, 14603 on, 14604 emit 14605 } = _ref; 14606 const observers = []; 14607 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 14608 const attach = function (target, options) { 14609 if (options === void 0) { 14610 options = {}; 14611 } 14612 const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; 14613 const observer = new ObserverFunc(mutations => { 14614 // The observerUpdate event should only be triggered 14615 // once despite the number of mutations. Additional 14616 // triggers are redundant and are very costly 14617 if (swiper.__preventObserver__) return; 14618 if (mutations.length === 1) { 14619 emit('observerUpdate', mutations[0]); 14620 return; 14621 } 14622 const observerUpdate = function observerUpdate() { 14623 emit('observerUpdate', mutations[0]); 14624 }; 14625 if (window.requestAnimationFrame) { 14626 window.requestAnimationFrame(observerUpdate); 14627 } else { 14628 window.setTimeout(observerUpdate, 0); 14629 } 14630 }); 14631 observer.observe(target, { 14632 attributes: typeof options.attributes === 'undefined' ? true : options.attributes, 14633 childList: typeof options.childList === 'undefined' ? true : options.childList, 14634 characterData: typeof options.characterData === 'undefined' ? true : options.characterData 14635 }); 14636 observers.push(observer); 14637 }; 14638 const init = () => { 14639 if (!swiper.params.observer) return; 14640 if (swiper.params.observeParents) { 14641 const containerParents = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.a)(swiper.hostEl); 14642 for (let i = 0; i < containerParents.length; i += 1) { 14643 attach(containerParents[i]); 14644 } 14645 } 14646 // Observe container 14647 attach(swiper.hostEl, { 14648 childList: swiper.params.observeSlideChildren 14649 }); 14650 14651 // Observe wrapper 14652 attach(swiper.wrapperEl, { 14653 attributes: false 14654 }); 14655 }; 14656 const destroy = () => { 14657 observers.forEach(observer => { 14658 observer.disconnect(); 14659 }); 14660 observers.splice(0, observers.length); 14661 }; 14662 extendParams({ 14663 observer: false, 14664 observeParents: false, 14665 observeSlideChildren: false 14666 }); 14667 on('init', init); 14668 on('destroy', destroy); 14669} 14670 14671/* eslint-disable no-underscore-dangle */ 14672 14673var eventsEmitter = { 14674 on(events, handler, priority) { 14675 const self = this; 14676 if (!self.eventsListeners || self.destroyed) return self; 14677 if (typeof handler !== 'function') return self; 14678 const method = priority ? 'unshift' : 'push'; 14679 events.split(' ').forEach(event => { 14680 if (!self.eventsListeners[event]) self.eventsListeners[event] = []; 14681 self.eventsListeners[event][method](handler); 14682 }); 14683 return self; 14684 }, 14685 once(events, handler, priority) { 14686 const self = this; 14687 if (!self.eventsListeners || self.destroyed) return self; 14688 if (typeof handler !== 'function') return self; 14689 function onceHandler() { 14690 self.off(events, onceHandler); 14691 if (onceHandler.__emitterProxy) { 14692 delete onceHandler.__emitterProxy; 14693 } 14694 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 14695 args[_key] = arguments[_key]; 14696 } 14697 handler.apply(self, args); 14698 } 14699 onceHandler.__emitterProxy = handler; 14700 return self.on(events, onceHandler, priority); 14701 }, 14702 onAny(handler, priority) { 14703 const self = this; 14704 if (!self.eventsListeners || self.destroyed) return self; 14705 if (typeof handler !== 'function') return self; 14706 const method = priority ? 'unshift' : 'push'; 14707 if (self.eventsAnyListeners.indexOf(handler) < 0) { 14708 self.eventsAnyListeners[method](handler); 14709 } 14710 return self; 14711 }, 14712 offAny(handler) { 14713 const self = this; 14714 if (!self.eventsListeners || self.destroyed) return self; 14715 if (!self.eventsAnyListeners) return self; 14716 const index = self.eventsAnyListeners.indexOf(handler); 14717 if (index >= 0) { 14718 self.eventsAnyListeners.splice(index, 1); 14719 } 14720 return self; 14721 }, 14722 off(events, handler) { 14723 const self = this; 14724 if (!self.eventsListeners || self.destroyed) return self; 14725 if (!self.eventsListeners) return self; 14726 events.split(' ').forEach(event => { 14727 if (typeof handler === 'undefined') { 14728 self.eventsListeners[event] = []; 14729 } else if (self.eventsListeners[event]) { 14730 self.eventsListeners[event].forEach((eventHandler, index) => { 14731 if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { 14732 self.eventsListeners[event].splice(index, 1); 14733 } 14734 }); 14735 } 14736 }); 14737 return self; 14738 }, 14739 emit() { 14740 const self = this; 14741 if (!self.eventsListeners || self.destroyed) return self; 14742 if (!self.eventsListeners) return self; 14743 let events; 14744 let data; 14745 let context; 14746 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 14747 args[_key2] = arguments[_key2]; 14748 } 14749 if (typeof args[0] === 'string' || Array.isArray(args[0])) { 14750 events = args[0]; 14751 data = args.slice(1, args.length); 14752 context = self; 14753 } else { 14754 events = args[0].events; 14755 data = args[0].data; 14756 context = args[0].context || self; 14757 } 14758 data.unshift(context); 14759 const eventsArray = Array.isArray(events) ? events : events.split(' '); 14760 eventsArray.forEach(event => { 14761 if (self.eventsAnyListeners && self.eventsAnyListeners.length) { 14762 self.eventsAnyListeners.forEach(eventHandler => { 14763 eventHandler.apply(context, [event, ...data]); 14764 }); 14765 } 14766 if (self.eventsListeners && self.eventsListeners[event]) { 14767 self.eventsListeners[event].forEach(eventHandler => { 14768 eventHandler.apply(context, data); 14769 }); 14770 } 14771 }); 14772 return self; 14773 } 14774}; 14775 14776function updateSize() { 14777 const swiper = this; 14778 let width; 14779 let height; 14780 const el = swiper.el; 14781 if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) { 14782 width = swiper.params.width; 14783 } else { 14784 width = el.clientWidth; 14785 } 14786 if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) { 14787 height = swiper.params.height; 14788 } else { 14789 height = el.clientHeight; 14790 } 14791 if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { 14792 return; 14793 } 14794 14795 // Subtract paddings 14796 width = width - parseInt((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(el, 'padding-left') || 0, 10) - parseInt((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(el, 'padding-right') || 0, 10); 14797 height = height - parseInt((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(el, 'padding-top') || 0, 10) - parseInt((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(el, 'padding-bottom') || 0, 10); 14798 if (Number.isNaN(width)) width = 0; 14799 if (Number.isNaN(height)) height = 0; 14800 Object.assign(swiper, { 14801 width, 14802 height, 14803 size: swiper.isHorizontal() ? width : height 14804 }); 14805} 14806 14807function updateSlides() { 14808 const swiper = this; 14809 function getDirectionPropertyValue(node, label) { 14810 return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0); 14811 } 14812 const params = swiper.params; 14813 const { 14814 wrapperEl, 14815 slidesEl, 14816 size: swiperSize, 14817 rtlTranslate: rtl, 14818 wrongRTL 14819 } = swiper; 14820 const isVirtual = swiper.virtual && params.virtual.enabled; 14821 const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 14822 const slides = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `.${swiper.params.slideClass}, swiper-slide`); 14823 const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 14824 let snapGrid = []; 14825 const slidesGrid = []; 14826 const slidesSizesGrid = []; 14827 let offsetBefore = params.slidesOffsetBefore; 14828 if (typeof offsetBefore === 'function') { 14829 offsetBefore = params.slidesOffsetBefore.call(swiper); 14830 } 14831 let offsetAfter = params.slidesOffsetAfter; 14832 if (typeof offsetAfter === 'function') { 14833 offsetAfter = params.slidesOffsetAfter.call(swiper); 14834 } 14835 const previousSnapGridLength = swiper.snapGrid.length; 14836 const previousSlidesGridLength = swiper.slidesGrid.length; 14837 let spaceBetween = params.spaceBetween; 14838 let slidePosition = -offsetBefore; 14839 let prevSlideSize = 0; 14840 let index = 0; 14841 if (typeof swiperSize === 'undefined') { 14842 return; 14843 } 14844 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 14845 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; 14846 } else if (typeof spaceBetween === 'string') { 14847 spaceBetween = parseFloat(spaceBetween); 14848 } 14849 swiper.virtualSize = -spaceBetween; 14850 14851 // reset margins 14852 slides.forEach(slideEl => { 14853 if (rtl) { 14854 slideEl.style.marginLeft = ''; 14855 } else { 14856 slideEl.style.marginRight = ''; 14857 } 14858 slideEl.style.marginBottom = ''; 14859 slideEl.style.marginTop = ''; 14860 }); 14861 14862 // reset cssMode offsets 14863 if (params.centeredSlides && params.cssMode) { 14864 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.s)(wrapperEl, '--swiper-centered-offset-before', ''); 14865 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.s)(wrapperEl, '--swiper-centered-offset-after', ''); 14866 } 14867 const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; 14868 if (gridEnabled) { 14869 swiper.grid.initSlides(slides); 14870 } else if (swiper.grid) { 14871 swiper.grid.unsetSlides(); 14872 } 14873 14874 // Calc slides 14875 let slideSize; 14876 const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => { 14877 return typeof params.breakpoints[key].slidesPerView !== 'undefined'; 14878 }).length > 0; 14879 for (let i = 0; i < slidesLength; i += 1) { 14880 slideSize = 0; 14881 let slide; 14882 if (slides[i]) slide = slides[i]; 14883 if (gridEnabled) { 14884 swiper.grid.updateSlide(i, slide, slides); 14885 } 14886 if (slides[i] && (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(slide, 'display') === 'none') continue; // eslint-disable-line 14887 14888 if (params.slidesPerView === 'auto') { 14889 if (shouldResetSlideSize) { 14890 slides[i].style[swiper.getDirectionLabel('width')] = ``; 14891 } 14892 const slideStyles = getComputedStyle(slide); 14893 const currentTransform = slide.style.transform; 14894 const currentWebKitTransform = slide.style.webkitTransform; 14895 if (currentTransform) { 14896 slide.style.transform = 'none'; 14897 } 14898 if (currentWebKitTransform) { 14899 slide.style.webkitTransform = 'none'; 14900 } 14901 if (params.roundLengths) { 14902 slideSize = swiper.isHorizontal() ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.f)(slide, 'width', true) : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.f)(slide, 'height', true); 14903 } else { 14904 // eslint-disable-next-line 14905 const width = getDirectionPropertyValue(slideStyles, 'width'); 14906 const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left'); 14907 const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right'); 14908 const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left'); 14909 const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right'); 14910 const boxSizing = slideStyles.getPropertyValue('box-sizing'); 14911 if (boxSizing && boxSizing === 'border-box') { 14912 slideSize = width + marginLeft + marginRight; 14913 } else { 14914 const { 14915 clientWidth, 14916 offsetWidth 14917 } = slide; 14918 slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); 14919 } 14920 } 14921 if (currentTransform) { 14922 slide.style.transform = currentTransform; 14923 } 14924 if (currentWebKitTransform) { 14925 slide.style.webkitTransform = currentWebKitTransform; 14926 } 14927 if (params.roundLengths) slideSize = Math.floor(slideSize); 14928 } else { 14929 slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; 14930 if (params.roundLengths) slideSize = Math.floor(slideSize); 14931 if (slides[i]) { 14932 slides[i].style[swiper.getDirectionLabel('width')] = `${slideSize}px`; 14933 } 14934 } 14935 if (slides[i]) { 14936 slides[i].swiperSlideSize = slideSize; 14937 } 14938 slidesSizesGrid.push(slideSize); 14939 if (params.centeredSlides) { 14940 slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; 14941 if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 14942 if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 14943 if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; 14944 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 14945 if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); 14946 slidesGrid.push(slidePosition); 14947 } else { 14948 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 14949 if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); 14950 slidesGrid.push(slidePosition); 14951 slidePosition = slidePosition + slideSize + spaceBetween; 14952 } 14953 swiper.virtualSize += slideSize + spaceBetween; 14954 prevSlideSize = slideSize; 14955 index += 1; 14956 } 14957 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 14958 if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { 14959 wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`; 14960 } 14961 if (params.setWrapperSize) { 14962 wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`; 14963 } 14964 if (gridEnabled) { 14965 swiper.grid.updateWrapperSize(slideSize, snapGrid); 14966 } 14967 14968 // Remove last grid elements depending on width 14969 if (!params.centeredSlides) { 14970 const newSlidesGrid = []; 14971 for (let i = 0; i < snapGrid.length; i += 1) { 14972 let slidesGridItem = snapGrid[i]; 14973 if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); 14974 if (snapGrid[i] <= swiper.virtualSize - swiperSize) { 14975 newSlidesGrid.push(slidesGridItem); 14976 } 14977 } 14978 snapGrid = newSlidesGrid; 14979 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 14980 snapGrid.push(swiper.virtualSize - swiperSize); 14981 } 14982 } 14983 if (isVirtual && params.loop) { 14984 const size = slidesSizesGrid[0] + spaceBetween; 14985 if (params.slidesPerGroup > 1) { 14986 const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup); 14987 const groupSize = size * params.slidesPerGroup; 14988 for (let i = 0; i < groups; i += 1) { 14989 snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize); 14990 } 14991 } 14992 for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) { 14993 if (params.slidesPerGroup === 1) { 14994 snapGrid.push(snapGrid[snapGrid.length - 1] + size); 14995 } 14996 slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size); 14997 swiper.virtualSize += size; 14998 } 14999 } 15000 if (snapGrid.length === 0) snapGrid = [0]; 15001 if (spaceBetween !== 0) { 15002 const key = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight'); 15003 slides.filter((_, slideIndex) => { 15004 if (!params.cssMode || params.loop) return true; 15005 if (slideIndex === slides.length - 1) { 15006 return false; 15007 } 15008 return true; 15009 }).forEach(slideEl => { 15010 slideEl.style[key] = `${spaceBetween}px`; 15011 }); 15012 } 15013 if (params.centeredSlides && params.centeredSlidesBounds) { 15014 let allSlidesSize = 0; 15015 slidesSizesGrid.forEach(slideSizeValue => { 15016 allSlidesSize += slideSizeValue + (spaceBetween || 0); 15017 }); 15018 allSlidesSize -= spaceBetween; 15019 const maxSnap = allSlidesSize - swiperSize; 15020 snapGrid = snapGrid.map(snap => { 15021 if (snap <= 0) return -offsetBefore; 15022 if (snap > maxSnap) return maxSnap + offsetAfter; 15023 return snap; 15024 }); 15025 } 15026 if (params.centerInsufficientSlides) { 15027 let allSlidesSize = 0; 15028 slidesSizesGrid.forEach(slideSizeValue => { 15029 allSlidesSize += slideSizeValue + (spaceBetween || 0); 15030 }); 15031 allSlidesSize -= spaceBetween; 15032 if (allSlidesSize < swiperSize) { 15033 const allSlidesOffset = (swiperSize - allSlidesSize) / 2; 15034 snapGrid.forEach((snap, snapIndex) => { 15035 snapGrid[snapIndex] = snap - allSlidesOffset; 15036 }); 15037 slidesGrid.forEach((snap, snapIndex) => { 15038 slidesGrid[snapIndex] = snap + allSlidesOffset; 15039 }); 15040 } 15041 } 15042 Object.assign(swiper, { 15043 slides, 15044 snapGrid, 15045 slidesGrid, 15046 slidesSizesGrid 15047 }); 15048 if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { 15049 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.s)(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`); 15050 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.s)(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); 15051 const addToSnapGrid = -swiper.snapGrid[0]; 15052 const addToSlidesGrid = -swiper.slidesGrid[0]; 15053 swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid); 15054 swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid); 15055 } 15056 if (slidesLength !== previousSlidesLength) { 15057 swiper.emit('slidesLengthChange'); 15058 } 15059 if (snapGrid.length !== previousSnapGridLength) { 15060 if (swiper.params.watchOverflow) swiper.checkOverflow(); 15061 swiper.emit('snapGridLengthChange'); 15062 } 15063 if (slidesGrid.length !== previousSlidesGridLength) { 15064 swiper.emit('slidesGridLengthChange'); 15065 } 15066 if (params.watchSlidesProgress) { 15067 swiper.updateSlidesOffset(); 15068 } 15069 swiper.emit('slidesUpdated'); 15070 if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) { 15071 const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`; 15072 const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass); 15073 if (slidesLength <= params.maxBackfaceHiddenSlides) { 15074 if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass); 15075 } else if (hasClassBackfaceClassAdded) { 15076 swiper.el.classList.remove(backFaceHiddenClass); 15077 } 15078 } 15079} 15080 15081function updateAutoHeight(speed) { 15082 const swiper = this; 15083 const activeSlides = []; 15084 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 15085 let newHeight = 0; 15086 let i; 15087 if (typeof speed === 'number') { 15088 swiper.setTransition(speed); 15089 } else if (speed === true) { 15090 swiper.setTransition(swiper.params.speed); 15091 } 15092 const getSlideByIndex = index => { 15093 if (isVirtual) { 15094 return swiper.slides[swiper.getSlideIndexByData(index)]; 15095 } 15096 return swiper.slides[index]; 15097 }; 15098 // Find slides currently in view 15099 if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { 15100 if (swiper.params.centeredSlides) { 15101 (swiper.visibleSlides || []).forEach(slide => { 15102 activeSlides.push(slide); 15103 }); 15104 } else { 15105 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 15106 const index = swiper.activeIndex + i; 15107 if (index > swiper.slides.length && !isVirtual) break; 15108 activeSlides.push(getSlideByIndex(index)); 15109 } 15110 } 15111 } else { 15112 activeSlides.push(getSlideByIndex(swiper.activeIndex)); 15113 } 15114 15115 // Find new height from highest slide in view 15116 for (i = 0; i < activeSlides.length; i += 1) { 15117 if (typeof activeSlides[i] !== 'undefined') { 15118 const height = activeSlides[i].offsetHeight; 15119 newHeight = height > newHeight ? height : newHeight; 15120 } 15121 } 15122 15123 // Update Height 15124 if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`; 15125} 15126 15127function updateSlidesOffset() { 15128 const swiper = this; 15129 const slides = swiper.slides; 15130 // eslint-disable-next-line 15131 const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0; 15132 for (let i = 0; i < slides.length; i += 1) { 15133 slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment(); 15134 } 15135} 15136 15137function updateSlidesProgress(translate) { 15138 if (translate === void 0) { 15139 translate = this && this.translate || 0; 15140 } 15141 const swiper = this; 15142 const params = swiper.params; 15143 const { 15144 slides, 15145 rtlTranslate: rtl, 15146 snapGrid 15147 } = swiper; 15148 if (slides.length === 0) return; 15149 if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); 15150 let offsetCenter = -translate; 15151 if (rtl) offsetCenter = translate; 15152 15153 // Visible Slides 15154 slides.forEach(slideEl => { 15155 slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass); 15156 }); 15157 swiper.visibleSlidesIndexes = []; 15158 swiper.visibleSlides = []; 15159 let spaceBetween = params.spaceBetween; 15160 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 15161 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size; 15162 } else if (typeof spaceBetween === 'string') { 15163 spaceBetween = parseFloat(spaceBetween); 15164 } 15165 for (let i = 0; i < slides.length; i += 1) { 15166 const slide = slides[i]; 15167 let slideOffset = slide.swiperSlideOffset; 15168 if (params.cssMode && params.centeredSlides) { 15169 slideOffset -= slides[0].swiperSlideOffset; 15170 } 15171 const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween); 15172 const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween); 15173 const slideBefore = -(offsetCenter - slideOffset); 15174 const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 15175 const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i]; 15176 const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; 15177 if (isVisible) { 15178 swiper.visibleSlides.push(slide); 15179 swiper.visibleSlidesIndexes.push(i); 15180 slides[i].classList.add(params.slideVisibleClass); 15181 } 15182 if (isFullyVisible) { 15183 slides[i].classList.add(params.slideFullyVisibleClass); 15184 } 15185 slide.progress = rtl ? -slideProgress : slideProgress; 15186 slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; 15187 } 15188} 15189 15190function updateProgress(translate) { 15191 const swiper = this; 15192 if (typeof translate === 'undefined') { 15193 const multiplier = swiper.rtlTranslate ? -1 : 1; 15194 // eslint-disable-next-line 15195 translate = swiper && swiper.translate && swiper.translate * multiplier || 0; 15196 } 15197 const params = swiper.params; 15198 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 15199 let { 15200 progress, 15201 isBeginning, 15202 isEnd, 15203 progressLoop 15204 } = swiper; 15205 const wasBeginning = isBeginning; 15206 const wasEnd = isEnd; 15207 if (translatesDiff === 0) { 15208 progress = 0; 15209 isBeginning = true; 15210 isEnd = true; 15211 } else { 15212 progress = (translate - swiper.minTranslate()) / translatesDiff; 15213 const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1; 15214 const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1; 15215 isBeginning = isBeginningRounded || progress <= 0; 15216 isEnd = isEndRounded || progress >= 1; 15217 if (isBeginningRounded) progress = 0; 15218 if (isEndRounded) progress = 1; 15219 } 15220 if (params.loop) { 15221 const firstSlideIndex = swiper.getSlideIndexByData(0); 15222 const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1); 15223 const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex]; 15224 const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex]; 15225 const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1]; 15226 const translateAbs = Math.abs(translate); 15227 if (translateAbs >= firstSlideTranslate) { 15228 progressLoop = (translateAbs - firstSlideTranslate) / translateMax; 15229 } else { 15230 progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax; 15231 } 15232 if (progressLoop > 1) progressLoop -= 1; 15233 } 15234 Object.assign(swiper, { 15235 progress, 15236 progressLoop, 15237 isBeginning, 15238 isEnd 15239 }); 15240 if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); 15241 if (isBeginning && !wasBeginning) { 15242 swiper.emit('reachBeginning toEdge'); 15243 } 15244 if (isEnd && !wasEnd) { 15245 swiper.emit('reachEnd toEdge'); 15246 } 15247 if (wasBeginning && !isBeginning || wasEnd && !isEnd) { 15248 swiper.emit('fromEdge'); 15249 } 15250 swiper.emit('progress', progress); 15251} 15252 15253function updateSlidesClasses() { 15254 const swiper = this; 15255 const { 15256 slides, 15257 params, 15258 slidesEl, 15259 activeIndex 15260 } = swiper; 15261 const isVirtual = swiper.virtual && params.virtual.enabled; 15262 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 15263 const getFilteredSlide = selector => { 15264 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0]; 15265 }; 15266 slides.forEach(slideEl => { 15267 slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass); 15268 }); 15269 let activeSlide; 15270 let prevSlide; 15271 let nextSlide; 15272 if (isVirtual) { 15273 if (params.loop) { 15274 let slideIndex = activeIndex - swiper.virtual.slidesBefore; 15275 if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex; 15276 if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length; 15277 activeSlide = getFilteredSlide(`[data-swiper-slide-index="${slideIndex}"]`); 15278 } else { 15279 activeSlide = getFilteredSlide(`[data-swiper-slide-index="${activeIndex}"]`); 15280 } 15281 } else { 15282 if (gridEnabled) { 15283 activeSlide = slides.filter(slideEl => slideEl.column === activeIndex)[0]; 15284 nextSlide = slides.filter(slideEl => slideEl.column === activeIndex + 1)[0]; 15285 prevSlide = slides.filter(slideEl => slideEl.column === activeIndex - 1)[0]; 15286 } else { 15287 activeSlide = slides[activeIndex]; 15288 } 15289 } 15290 if (activeSlide) { 15291 // Active classes 15292 activeSlide.classList.add(params.slideActiveClass); 15293 if (gridEnabled) { 15294 if (nextSlide) { 15295 nextSlide.classList.add(params.slideNextClass); 15296 } 15297 if (prevSlide) { 15298 prevSlide.classList.add(params.slidePrevClass); 15299 } 15300 } else { 15301 // Next Slide 15302 nextSlide = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.o)(activeSlide, `.${params.slideClass}, swiper-slide`)[0]; 15303 if (params.loop && !nextSlide) { 15304 nextSlide = slides[0]; 15305 } 15306 if (nextSlide) { 15307 nextSlide.classList.add(params.slideNextClass); 15308 } 15309 15310 // Prev Slide 15311 prevSlide = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.p)(activeSlide, `.${params.slideClass}, swiper-slide`)[0]; 15312 if (params.loop && !prevSlide === 0) { 15313 prevSlide = slides[slides.length - 1]; 15314 } 15315 if (prevSlide) { 15316 prevSlide.classList.add(params.slidePrevClass); 15317 } 15318 } 15319 } 15320 swiper.emitSlidesClasses(); 15321} 15322 15323const processLazyPreloader = (swiper, imageEl) => { 15324 if (!swiper || swiper.destroyed || !swiper.params) return; 15325 const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`; 15326 const slideEl = imageEl.closest(slideSelector()); 15327 if (slideEl) { 15328 let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`); 15329 if (!lazyEl && swiper.isElement) { 15330 if (slideEl.shadowRoot) { 15331 lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`); 15332 } else { 15333 // init later 15334 requestAnimationFrame(() => { 15335 if (slideEl.shadowRoot) { 15336 lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`); 15337 if (lazyEl) lazyEl.remove(); 15338 } 15339 }); 15340 } 15341 } 15342 if (lazyEl) lazyEl.remove(); 15343 } 15344}; 15345const unlazy = (swiper, index) => { 15346 if (!swiper.slides[index]) return; 15347 const imageEl = swiper.slides[index].querySelector('[loading="lazy"]'); 15348 if (imageEl) imageEl.removeAttribute('loading'); 15349}; 15350const preload = swiper => { 15351 if (!swiper || swiper.destroyed || !swiper.params) return; 15352 let amount = swiper.params.lazyPreloadPrevNext; 15353 const len = swiper.slides.length; 15354 if (!len || !amount || amount < 0) return; 15355 amount = Math.min(amount, len); 15356 const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView); 15357 const activeIndex = swiper.activeIndex; 15358 if (swiper.params.grid && swiper.params.grid.rows > 1) { 15359 const activeColumn = activeIndex; 15360 const preloadColumns = [activeColumn - amount]; 15361 preloadColumns.push(...Array.from({ 15362 length: amount 15363 }).map((_, i) => { 15364 return activeColumn + slidesPerView + i; 15365 })); 15366 swiper.slides.forEach((slideEl, i) => { 15367 if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i); 15368 }); 15369 return; 15370 } 15371 const slideIndexLastInView = activeIndex + slidesPerView - 1; 15372 if (swiper.params.rewind || swiper.params.loop) { 15373 for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) { 15374 const realIndex = (i % len + len) % len; 15375 if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex); 15376 } 15377 } else { 15378 for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) { 15379 if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) { 15380 unlazy(swiper, i); 15381 } 15382 } 15383 } 15384}; 15385 15386function getActiveIndexByTranslate(swiper) { 15387 const { 15388 slidesGrid, 15389 params 15390 } = swiper; 15391 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 15392 let activeIndex; 15393 for (let i = 0; i < slidesGrid.length; i += 1) { 15394 if (typeof slidesGrid[i + 1] !== 'undefined') { 15395 if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { 15396 activeIndex = i; 15397 } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { 15398 activeIndex = i + 1; 15399 } 15400 } else if (translate >= slidesGrid[i]) { 15401 activeIndex = i; 15402 } 15403 } 15404 // Normalize slideIndex 15405 if (params.normalizeSlideIndex) { 15406 if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; 15407 } 15408 return activeIndex; 15409} 15410function updateActiveIndex(newActiveIndex) { 15411 const swiper = this; 15412 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 15413 const { 15414 snapGrid, 15415 params, 15416 activeIndex: previousIndex, 15417 realIndex: previousRealIndex, 15418 snapIndex: previousSnapIndex 15419 } = swiper; 15420 let activeIndex = newActiveIndex; 15421 let snapIndex; 15422 const getVirtualRealIndex = aIndex => { 15423 let realIndex = aIndex - swiper.virtual.slidesBefore; 15424 if (realIndex < 0) { 15425 realIndex = swiper.virtual.slides.length + realIndex; 15426 } 15427 if (realIndex >= swiper.virtual.slides.length) { 15428 realIndex -= swiper.virtual.slides.length; 15429 } 15430 return realIndex; 15431 }; 15432 if (typeof activeIndex === 'undefined') { 15433 activeIndex = getActiveIndexByTranslate(swiper); 15434 } 15435 if (snapGrid.indexOf(translate) >= 0) { 15436 snapIndex = snapGrid.indexOf(translate); 15437 } else { 15438 const skip = Math.min(params.slidesPerGroupSkip, activeIndex); 15439 snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); 15440 } 15441 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 15442 if (activeIndex === previousIndex && !swiper.params.loop) { 15443 if (snapIndex !== previousSnapIndex) { 15444 swiper.snapIndex = snapIndex; 15445 swiper.emit('snapIndexChange'); 15446 } 15447 return; 15448 } 15449 if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) { 15450 swiper.realIndex = getVirtualRealIndex(activeIndex); 15451 return; 15452 } 15453 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 15454 15455 // Get real index 15456 let realIndex; 15457 if (swiper.virtual && params.virtual.enabled && params.loop) { 15458 realIndex = getVirtualRealIndex(activeIndex); 15459 } else if (gridEnabled) { 15460 const firstSlideInColumn = swiper.slides.filter(slideEl => slideEl.column === activeIndex)[0]; 15461 let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10); 15462 if (Number.isNaN(activeSlideIndex)) { 15463 activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0); 15464 } 15465 realIndex = Math.floor(activeSlideIndex / params.grid.rows); 15466 } else if (swiper.slides[activeIndex]) { 15467 const slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index'); 15468 if (slideIndex) { 15469 realIndex = parseInt(slideIndex, 10); 15470 } else { 15471 realIndex = activeIndex; 15472 } 15473 } else { 15474 realIndex = activeIndex; 15475 } 15476 Object.assign(swiper, { 15477 previousSnapIndex, 15478 snapIndex, 15479 previousRealIndex, 15480 realIndex, 15481 previousIndex, 15482 activeIndex 15483 }); 15484 if (swiper.initialized) { 15485 preload(swiper); 15486 } 15487 swiper.emit('activeIndexChange'); 15488 swiper.emit('snapIndexChange'); 15489 if (swiper.initialized || swiper.params.runCallbacksOnInit) { 15490 if (previousRealIndex !== realIndex) { 15491 swiper.emit('realIndexChange'); 15492 } 15493 swiper.emit('slideChange'); 15494 } 15495} 15496 15497function updateClickedSlide(el, path) { 15498 const swiper = this; 15499 const params = swiper.params; 15500 let slide = el.closest(`.${params.slideClass}, swiper-slide`); 15501 if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) { 15502 [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => { 15503 if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) { 15504 slide = pathEl; 15505 } 15506 }); 15507 } 15508 let slideFound = false; 15509 let slideIndex; 15510 if (slide) { 15511 for (let i = 0; i < swiper.slides.length; i += 1) { 15512 if (swiper.slides[i] === slide) { 15513 slideFound = true; 15514 slideIndex = i; 15515 break; 15516 } 15517 } 15518 } 15519 if (slide && slideFound) { 15520 swiper.clickedSlide = slide; 15521 if (swiper.virtual && swiper.params.virtual.enabled) { 15522 swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10); 15523 } else { 15524 swiper.clickedIndex = slideIndex; 15525 } 15526 } else { 15527 swiper.clickedSlide = undefined; 15528 swiper.clickedIndex = undefined; 15529 return; 15530 } 15531 if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { 15532 swiper.slideToClickedSlide(); 15533 } 15534} 15535 15536var update = { 15537 updateSize, 15538 updateSlides, 15539 updateAutoHeight, 15540 updateSlidesOffset, 15541 updateSlidesProgress, 15542 updateProgress, 15543 updateSlidesClasses, 15544 updateActiveIndex, 15545 updateClickedSlide 15546}; 15547 15548function getSwiperTranslate(axis) { 15549 if (axis === void 0) { 15550 axis = this.isHorizontal() ? 'x' : 'y'; 15551 } 15552 const swiper = this; 15553 const { 15554 params, 15555 rtlTranslate: rtl, 15556 translate, 15557 wrapperEl 15558 } = swiper; 15559 if (params.virtualTranslate) { 15560 return rtl ? -translate : translate; 15561 } 15562 if (params.cssMode) { 15563 return translate; 15564 } 15565 let currentTranslate = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.i)(wrapperEl, axis); 15566 currentTranslate += swiper.cssOverflowAdjustment(); 15567 if (rtl) currentTranslate = -currentTranslate; 15568 return currentTranslate || 0; 15569} 15570 15571function setTranslate(translate, byController) { 15572 const swiper = this; 15573 const { 15574 rtlTranslate: rtl, 15575 params, 15576 wrapperEl, 15577 progress 15578 } = swiper; 15579 let x = 0; 15580 let y = 0; 15581 const z = 0; 15582 if (swiper.isHorizontal()) { 15583 x = rtl ? -translate : translate; 15584 } else { 15585 y = translate; 15586 } 15587 if (params.roundLengths) { 15588 x = Math.floor(x); 15589 y = Math.floor(y); 15590 } 15591 swiper.previousTranslate = swiper.translate; 15592 swiper.translate = swiper.isHorizontal() ? x : y; 15593 if (params.cssMode) { 15594 wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; 15595 } else if (!params.virtualTranslate) { 15596 if (swiper.isHorizontal()) { 15597 x -= swiper.cssOverflowAdjustment(); 15598 } else { 15599 y -= swiper.cssOverflowAdjustment(); 15600 } 15601 wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`; 15602 } 15603 15604 // Check if we need to update progress 15605 let newProgress; 15606 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 15607 if (translatesDiff === 0) { 15608 newProgress = 0; 15609 } else { 15610 newProgress = (translate - swiper.minTranslate()) / translatesDiff; 15611 } 15612 if (newProgress !== progress) { 15613 swiper.updateProgress(translate); 15614 } 15615 swiper.emit('setTranslate', swiper.translate, byController); 15616} 15617 15618function minTranslate() { 15619 return -this.snapGrid[0]; 15620} 15621 15622function maxTranslate() { 15623 return -this.snapGrid[this.snapGrid.length - 1]; 15624} 15625 15626function translateTo(translate, speed, runCallbacks, translateBounds, internal) { 15627 if (translate === void 0) { 15628 translate = 0; 15629 } 15630 if (speed === void 0) { 15631 speed = this.params.speed; 15632 } 15633 if (runCallbacks === void 0) { 15634 runCallbacks = true; 15635 } 15636 if (translateBounds === void 0) { 15637 translateBounds = true; 15638 } 15639 const swiper = this; 15640 const { 15641 params, 15642 wrapperEl 15643 } = swiper; 15644 if (swiper.animating && params.preventInteractionOnTransition) { 15645 return false; 15646 } 15647 const minTranslate = swiper.minTranslate(); 15648 const maxTranslate = swiper.maxTranslate(); 15649 let newTranslate; 15650 if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; 15651 15652 // Update progress 15653 swiper.updateProgress(newTranslate); 15654 if (params.cssMode) { 15655 const isH = swiper.isHorizontal(); 15656 if (speed === 0) { 15657 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; 15658 } else { 15659 if (!swiper.support.smoothScroll) { 15660 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.q)({ 15661 swiper, 15662 targetPosition: -newTranslate, 15663 side: isH ? 'left' : 'top' 15664 }); 15665 return true; 15666 } 15667 wrapperEl.scrollTo({ 15668 [isH ? 'left' : 'top']: -newTranslate, 15669 behavior: 'smooth' 15670 }); 15671 } 15672 return true; 15673 } 15674 if (speed === 0) { 15675 swiper.setTransition(0); 15676 swiper.setTranslate(newTranslate); 15677 if (runCallbacks) { 15678 swiper.emit('beforeTransitionStart', speed, internal); 15679 swiper.emit('transitionEnd'); 15680 } 15681 } else { 15682 swiper.setTransition(speed); 15683 swiper.setTranslate(newTranslate); 15684 if (runCallbacks) { 15685 swiper.emit('beforeTransitionStart', speed, internal); 15686 swiper.emit('transitionStart'); 15687 } 15688 if (!swiper.animating) { 15689 swiper.animating = true; 15690 if (!swiper.onTranslateToWrapperTransitionEnd) { 15691 swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { 15692 if (!swiper || swiper.destroyed) return; 15693 if (e.target !== this) return; 15694 swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 15695 swiper.onTranslateToWrapperTransitionEnd = null; 15696 delete swiper.onTranslateToWrapperTransitionEnd; 15697 if (runCallbacks) { 15698 swiper.emit('transitionEnd'); 15699 } 15700 }; 15701 } 15702 swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 15703 } 15704 } 15705 return true; 15706} 15707 15708var translate = { 15709 getTranslate: getSwiperTranslate, 15710 setTranslate, 15711 minTranslate, 15712 maxTranslate, 15713 translateTo 15714}; 15715 15716function setTransition(duration, byController) { 15717 const swiper = this; 15718 if (!swiper.params.cssMode) { 15719 swiper.wrapperEl.style.transitionDuration = `${duration}ms`; 15720 swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : ''; 15721 } 15722 swiper.emit('setTransition', duration, byController); 15723} 15724 15725function transitionEmit(_ref) { 15726 let { 15727 swiper, 15728 runCallbacks, 15729 direction, 15730 step 15731 } = _ref; 15732 const { 15733 activeIndex, 15734 previousIndex 15735 } = swiper; 15736 let dir = direction; 15737 if (!dir) { 15738 if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; 15739 } 15740 swiper.emit(`transition${step}`); 15741 if (runCallbacks && activeIndex !== previousIndex) { 15742 if (dir === 'reset') { 15743 swiper.emit(`slideResetTransition${step}`); 15744 return; 15745 } 15746 swiper.emit(`slideChangeTransition${step}`); 15747 if (dir === 'next') { 15748 swiper.emit(`slideNextTransition${step}`); 15749 } else { 15750 swiper.emit(`slidePrevTransition${step}`); 15751 } 15752 } 15753} 15754 15755function transitionStart(runCallbacks, direction) { 15756 if (runCallbacks === void 0) { 15757 runCallbacks = true; 15758 } 15759 const swiper = this; 15760 const { 15761 params 15762 } = swiper; 15763 if (params.cssMode) return; 15764 if (params.autoHeight) { 15765 swiper.updateAutoHeight(); 15766 } 15767 transitionEmit({ 15768 swiper, 15769 runCallbacks, 15770 direction, 15771 step: 'Start' 15772 }); 15773} 15774 15775function transitionEnd(runCallbacks, direction) { 15776 if (runCallbacks === void 0) { 15777 runCallbacks = true; 15778 } 15779 const swiper = this; 15780 const { 15781 params 15782 } = swiper; 15783 swiper.animating = false; 15784 if (params.cssMode) return; 15785 swiper.setTransition(0); 15786 transitionEmit({ 15787 swiper, 15788 runCallbacks, 15789 direction, 15790 step: 'End' 15791 }); 15792} 15793 15794var transition = { 15795 setTransition, 15796 transitionStart, 15797 transitionEnd 15798}; 15799 15800function slideTo(index, speed, runCallbacks, internal, initial) { 15801 if (index === void 0) { 15802 index = 0; 15803 } 15804 if (speed === void 0) { 15805 speed = this.params.speed; 15806 } 15807 if (runCallbacks === void 0) { 15808 runCallbacks = true; 15809 } 15810 if (typeof index === 'string') { 15811 index = parseInt(index, 10); 15812 } 15813 const swiper = this; 15814 let slideIndex = index; 15815 if (slideIndex < 0) slideIndex = 0; 15816 const { 15817 params, 15818 snapGrid, 15819 slidesGrid, 15820 previousIndex, 15821 activeIndex, 15822 rtlTranslate: rtl, 15823 wrapperEl, 15824 enabled 15825 } = swiper; 15826 if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { 15827 return false; 15828 } 15829 const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); 15830 let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); 15831 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 15832 const translate = -snapGrid[snapIndex]; 15833 // Normalize slideIndex 15834 if (params.normalizeSlideIndex) { 15835 for (let i = 0; i < slidesGrid.length; i += 1) { 15836 const normalizedTranslate = -Math.floor(translate * 100); 15837 const normalizedGrid = Math.floor(slidesGrid[i] * 100); 15838 const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); 15839 if (typeof slidesGrid[i + 1] !== 'undefined') { 15840 if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { 15841 slideIndex = i; 15842 } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { 15843 slideIndex = i + 1; 15844 } 15845 } else if (normalizedTranslate >= normalizedGrid) { 15846 slideIndex = i; 15847 } 15848 } 15849 } 15850 // Directions locks 15851 if (swiper.initialized && slideIndex !== activeIndex) { 15852 if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) { 15853 return false; 15854 } 15855 if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { 15856 if ((activeIndex || 0) !== slideIndex) { 15857 return false; 15858 } 15859 } 15860 } 15861 if (slideIndex !== (previousIndex || 0) && runCallbacks) { 15862 swiper.emit('beforeSlideChangeStart'); 15863 } 15864 15865 // Update progress 15866 swiper.updateProgress(translate); 15867 let direction; 15868 if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; 15869 15870 // Update Index 15871 if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { 15872 swiper.updateActiveIndex(slideIndex); 15873 // Update Height 15874 if (params.autoHeight) { 15875 swiper.updateAutoHeight(); 15876 } 15877 swiper.updateSlidesClasses(); 15878 if (params.effect !== 'slide') { 15879 swiper.setTranslate(translate); 15880 } 15881 if (direction !== 'reset') { 15882 swiper.transitionStart(runCallbacks, direction); 15883 swiper.transitionEnd(runCallbacks, direction); 15884 } 15885 return false; 15886 } 15887 if (params.cssMode) { 15888 const isH = swiper.isHorizontal(); 15889 const t = rtl ? translate : -translate; 15890 if (speed === 0) { 15891 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 15892 if (isVirtual) { 15893 swiper.wrapperEl.style.scrollSnapType = 'none'; 15894 swiper._immediateVirtual = true; 15895 } 15896 if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) { 15897 swiper._cssModeVirtualInitialSet = true; 15898 requestAnimationFrame(() => { 15899 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 15900 }); 15901 } else { 15902 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 15903 } 15904 if (isVirtual) { 15905 requestAnimationFrame(() => { 15906 swiper.wrapperEl.style.scrollSnapType = ''; 15907 swiper._immediateVirtual = false; 15908 }); 15909 } 15910 } else { 15911 if (!swiper.support.smoothScroll) { 15912 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.q)({ 15913 swiper, 15914 targetPosition: t, 15915 side: isH ? 'left' : 'top' 15916 }); 15917 return true; 15918 } 15919 wrapperEl.scrollTo({ 15920 [isH ? 'left' : 'top']: t, 15921 behavior: 'smooth' 15922 }); 15923 } 15924 return true; 15925 } 15926 swiper.setTransition(speed); 15927 swiper.setTranslate(translate); 15928 swiper.updateActiveIndex(slideIndex); 15929 swiper.updateSlidesClasses(); 15930 swiper.emit('beforeTransitionStart', speed, internal); 15931 swiper.transitionStart(runCallbacks, direction); 15932 if (speed === 0) { 15933 swiper.transitionEnd(runCallbacks, direction); 15934 } else if (!swiper.animating) { 15935 swiper.animating = true; 15936 if (!swiper.onSlideToWrapperTransitionEnd) { 15937 swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { 15938 if (!swiper || swiper.destroyed) return; 15939 if (e.target !== this) return; 15940 swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 15941 swiper.onSlideToWrapperTransitionEnd = null; 15942 delete swiper.onSlideToWrapperTransitionEnd; 15943 swiper.transitionEnd(runCallbacks, direction); 15944 }; 15945 } 15946 swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 15947 } 15948 return true; 15949} 15950 15951function slideToLoop(index, speed, runCallbacks, internal) { 15952 if (index === void 0) { 15953 index = 0; 15954 } 15955 if (speed === void 0) { 15956 speed = this.params.speed; 15957 } 15958 if (runCallbacks === void 0) { 15959 runCallbacks = true; 15960 } 15961 if (typeof index === 'string') { 15962 const indexAsNumber = parseInt(index, 10); 15963 index = indexAsNumber; 15964 } 15965 const swiper = this; 15966 const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1; 15967 let newIndex = index; 15968 if (swiper.params.loop) { 15969 if (swiper.virtual && swiper.params.virtual.enabled) { 15970 // eslint-disable-next-line 15971 newIndex = newIndex + swiper.virtual.slidesBefore; 15972 } else { 15973 let targetSlideIndex; 15974 if (gridEnabled) { 15975 const slideIndex = newIndex * swiper.params.grid.rows; 15976 targetSlideIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column; 15977 } else { 15978 targetSlideIndex = swiper.getSlideIndexByData(newIndex); 15979 } 15980 const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length; 15981 const { 15982 centeredSlides 15983 } = swiper.params; 15984 let slidesPerView = swiper.params.slidesPerView; 15985 if (slidesPerView === 'auto') { 15986 slidesPerView = swiper.slidesPerViewDynamic(); 15987 } else { 15988 slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10)); 15989 if (centeredSlides && slidesPerView % 2 === 0) { 15990 slidesPerView = slidesPerView + 1; 15991 } 15992 } 15993 let needLoopFix = cols - targetSlideIndex < slidesPerView; 15994 if (centeredSlides) { 15995 needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2); 15996 } 15997 if (needLoopFix) { 15998 const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev'; 15999 swiper.loopFix({ 16000 direction, 16001 slideTo: true, 16002 activeSlideIndex: direction === 'next' ? targetSlideIndex + 1 : targetSlideIndex - cols + 1, 16003 slideRealIndex: direction === 'next' ? swiper.realIndex : undefined 16004 }); 16005 } 16006 if (gridEnabled) { 16007 const slideIndex = newIndex * swiper.params.grid.rows; 16008 newIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column; 16009 } else { 16010 newIndex = swiper.getSlideIndexByData(newIndex); 16011 } 16012 } 16013 } 16014 requestAnimationFrame(() => { 16015 swiper.slideTo(newIndex, speed, runCallbacks, internal); 16016 }); 16017 return swiper; 16018} 16019 16020/* eslint no-unused-vars: "off" */ 16021function slideNext(speed, runCallbacks, internal) { 16022 if (speed === void 0) { 16023 speed = this.params.speed; 16024 } 16025 if (runCallbacks === void 0) { 16026 runCallbacks = true; 16027 } 16028 const swiper = this; 16029 const { 16030 enabled, 16031 params, 16032 animating 16033 } = swiper; 16034 if (!enabled) return swiper; 16035 let perGroup = params.slidesPerGroup; 16036 if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 16037 perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1); 16038 } 16039 const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; 16040 const isVirtual = swiper.virtual && params.virtual.enabled; 16041 if (params.loop) { 16042 if (animating && !isVirtual && params.loopPreventsSliding) return false; 16043 swiper.loopFix({ 16044 direction: 'next' 16045 }); 16046 // eslint-disable-next-line 16047 swiper._clientLeft = swiper.wrapperEl.clientLeft; 16048 if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) { 16049 requestAnimationFrame(() => { 16050 swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 16051 }); 16052 return true; 16053 } 16054 } 16055 if (params.rewind && swiper.isEnd) { 16056 return swiper.slideTo(0, speed, runCallbacks, internal); 16057 } 16058 return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 16059} 16060 16061/* eslint no-unused-vars: "off" */ 16062function slidePrev(speed, runCallbacks, internal) { 16063 if (speed === void 0) { 16064 speed = this.params.speed; 16065 } 16066 if (runCallbacks === void 0) { 16067 runCallbacks = true; 16068 } 16069 const swiper = this; 16070 const { 16071 params, 16072 snapGrid, 16073 slidesGrid, 16074 rtlTranslate, 16075 enabled, 16076 animating 16077 } = swiper; 16078 if (!enabled) return swiper; 16079 const isVirtual = swiper.virtual && params.virtual.enabled; 16080 if (params.loop) { 16081 if (animating && !isVirtual && params.loopPreventsSliding) return false; 16082 swiper.loopFix({ 16083 direction: 'prev' 16084 }); 16085 // eslint-disable-next-line 16086 swiper._clientLeft = swiper.wrapperEl.clientLeft; 16087 } 16088 const translate = rtlTranslate ? swiper.translate : -swiper.translate; 16089 function normalize(val) { 16090 if (val < 0) return -Math.floor(Math.abs(val)); 16091 return Math.floor(val); 16092 } 16093 const normalizedTranslate = normalize(translate); 16094 const normalizedSnapGrid = snapGrid.map(val => normalize(val)); 16095 let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 16096 if (typeof prevSnap === 'undefined' && params.cssMode) { 16097 let prevSnapIndex; 16098 snapGrid.forEach((snap, snapIndex) => { 16099 if (normalizedTranslate >= snap) { 16100 // prevSnap = snap; 16101 prevSnapIndex = snapIndex; 16102 } 16103 }); 16104 if (typeof prevSnapIndex !== 'undefined') { 16105 prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; 16106 } 16107 } 16108 let prevIndex = 0; 16109 if (typeof prevSnap !== 'undefined') { 16110 prevIndex = slidesGrid.indexOf(prevSnap); 16111 if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; 16112 if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 16113 prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1; 16114 prevIndex = Math.max(prevIndex, 0); 16115 } 16116 } 16117 if (params.rewind && swiper.isBeginning) { 16118 const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 16119 return swiper.slideTo(lastIndex, speed, runCallbacks, internal); 16120 } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) { 16121 requestAnimationFrame(() => { 16122 swiper.slideTo(prevIndex, speed, runCallbacks, internal); 16123 }); 16124 return true; 16125 } 16126 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 16127} 16128 16129/* eslint no-unused-vars: "off" */ 16130function slideReset(speed, runCallbacks, internal) { 16131 if (speed === void 0) { 16132 speed = this.params.speed; 16133 } 16134 if (runCallbacks === void 0) { 16135 runCallbacks = true; 16136 } 16137 const swiper = this; 16138 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 16139} 16140 16141/* eslint no-unused-vars: "off" */ 16142function slideToClosest(speed, runCallbacks, internal, threshold) { 16143 if (speed === void 0) { 16144 speed = this.params.speed; 16145 } 16146 if (runCallbacks === void 0) { 16147 runCallbacks = true; 16148 } 16149 if (threshold === void 0) { 16150 threshold = 0.5; 16151 } 16152 const swiper = this; 16153 let index = swiper.activeIndex; 16154 const skip = Math.min(swiper.params.slidesPerGroupSkip, index); 16155 const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); 16156 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 16157 if (translate >= swiper.snapGrid[snapIndex]) { 16158 // The current translate is on or after the current snap index, so the choice 16159 // is between the current index and the one after it. 16160 const currentSnap = swiper.snapGrid[snapIndex]; 16161 const nextSnap = swiper.snapGrid[snapIndex + 1]; 16162 if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { 16163 index += swiper.params.slidesPerGroup; 16164 } 16165 } else { 16166 // The current translate is before the current snap index, so the choice 16167 // is between the current index and the one before it. 16168 const prevSnap = swiper.snapGrid[snapIndex - 1]; 16169 const currentSnap = swiper.snapGrid[snapIndex]; 16170 if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { 16171 index -= swiper.params.slidesPerGroup; 16172 } 16173 } 16174 index = Math.max(index, 0); 16175 index = Math.min(index, swiper.slidesGrid.length - 1); 16176 return swiper.slideTo(index, speed, runCallbacks, internal); 16177} 16178 16179function slideToClickedSlide() { 16180 const swiper = this; 16181 const { 16182 params, 16183 slidesEl 16184 } = swiper; 16185 const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; 16186 let slideToIndex = swiper.clickedIndex; 16187 let realIndex; 16188 const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`; 16189 if (params.loop) { 16190 if (swiper.animating) return; 16191 realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10); 16192 if (params.centeredSlides) { 16193 if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { 16194 swiper.loopFix(); 16195 slideToIndex = swiper.getSlideIndex((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]); 16196 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.n)(() => { 16197 swiper.slideTo(slideToIndex); 16198 }); 16199 } else { 16200 swiper.slideTo(slideToIndex); 16201 } 16202 } else if (slideToIndex > swiper.slides.length - slidesPerView) { 16203 swiper.loopFix(); 16204 slideToIndex = swiper.getSlideIndex((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]); 16205 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.n)(() => { 16206 swiper.slideTo(slideToIndex); 16207 }); 16208 } else { 16209 swiper.slideTo(slideToIndex); 16210 } 16211 } else { 16212 swiper.slideTo(slideToIndex); 16213 } 16214} 16215 16216var slide = { 16217 slideTo, 16218 slideToLoop, 16219 slideNext, 16220 slidePrev, 16221 slideReset, 16222 slideToClosest, 16223 slideToClickedSlide 16224}; 16225 16226function loopCreate(slideRealIndex) { 16227 const swiper = this; 16228 const { 16229 params, 16230 slidesEl 16231 } = swiper; 16232 if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return; 16233 const initSlides = () => { 16234 const slides = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `.${params.slideClass}, swiper-slide`); 16235 slides.forEach((el, index) => { 16236 el.setAttribute('data-swiper-slide-index', index); 16237 }); 16238 }; 16239 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 16240 const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1); 16241 const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0; 16242 const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0; 16243 const addBlankSlides = amountOfSlides => { 16244 for (let i = 0; i < amountOfSlides; i += 1) { 16245 const slideEl = swiper.isElement ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('swiper-slide', [params.slideBlankClass]) : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', [params.slideClass, params.slideBlankClass]); 16246 swiper.slidesEl.append(slideEl); 16247 } 16248 }; 16249 if (shouldFillGroup) { 16250 if (params.loopAddBlankSlides) { 16251 const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup; 16252 addBlankSlides(slidesToAdd); 16253 swiper.recalcSlides(); 16254 swiper.updateSlides(); 16255 } else { 16256 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.r)('Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)'); 16257 } 16258 initSlides(); 16259 } else if (shouldFillGrid) { 16260 if (params.loopAddBlankSlides) { 16261 const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows; 16262 addBlankSlides(slidesToAdd); 16263 swiper.recalcSlides(); 16264 swiper.updateSlides(); 16265 } else { 16266 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.r)('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)'); 16267 } 16268 initSlides(); 16269 } else { 16270 initSlides(); 16271 } 16272 swiper.loopFix({ 16273 slideRealIndex, 16274 direction: params.centeredSlides ? undefined : 'next' 16275 }); 16276} 16277 16278function loopFix(_temp) { 16279 let { 16280 slideRealIndex, 16281 slideTo = true, 16282 direction, 16283 setTranslate, 16284 activeSlideIndex, 16285 byController, 16286 byMousewheel 16287 } = _temp === void 0 ? {} : _temp; 16288 const swiper = this; 16289 if (!swiper.params.loop) return; 16290 swiper.emit('beforeLoopFix'); 16291 const { 16292 slides, 16293 allowSlidePrev, 16294 allowSlideNext, 16295 slidesEl, 16296 params 16297 } = swiper; 16298 const { 16299 centeredSlides 16300 } = params; 16301 swiper.allowSlidePrev = true; 16302 swiper.allowSlideNext = true; 16303 if (swiper.virtual && params.virtual.enabled) { 16304 if (slideTo) { 16305 if (!params.centeredSlides && swiper.snapIndex === 0) { 16306 swiper.slideTo(swiper.virtual.slides.length, 0, false, true); 16307 } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) { 16308 swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true); 16309 } else if (swiper.snapIndex === swiper.snapGrid.length - 1) { 16310 swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true); 16311 } 16312 } 16313 swiper.allowSlidePrev = allowSlidePrev; 16314 swiper.allowSlideNext = allowSlideNext; 16315 swiper.emit('loopFix'); 16316 return; 16317 } 16318 let slidesPerView = params.slidesPerView; 16319 if (slidesPerView === 'auto') { 16320 slidesPerView = swiper.slidesPerViewDynamic(); 16321 } else { 16322 slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10)); 16323 if (centeredSlides && slidesPerView % 2 === 0) { 16324 slidesPerView = slidesPerView + 1; 16325 } 16326 } 16327 const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup; 16328 let loopedSlides = slidesPerGroup; 16329 if (loopedSlides % slidesPerGroup !== 0) { 16330 loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup; 16331 } 16332 loopedSlides += params.loopAdditionalSlides; 16333 swiper.loopedSlides = loopedSlides; 16334 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 16335 if (slides.length < slidesPerView + loopedSlides) { 16336 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.r)('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'); 16337 } else if (gridEnabled && params.grid.fill === 'row') { 16338 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.r)('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`'); 16339 } 16340 const prependSlidesIndexes = []; 16341 const appendSlidesIndexes = []; 16342 let activeIndex = swiper.activeIndex; 16343 if (typeof activeSlideIndex === 'undefined') { 16344 activeSlideIndex = swiper.getSlideIndex(slides.filter(el => el.classList.contains(params.slideActiveClass))[0]); 16345 } else { 16346 activeIndex = activeSlideIndex; 16347 } 16348 const isNext = direction === 'next' || !direction; 16349 const isPrev = direction === 'prev' || !direction; 16350 let slidesPrepended = 0; 16351 let slidesAppended = 0; 16352 const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length; 16353 const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex; 16354 const activeColIndexWithShift = activeColIndex + (centeredSlides && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0); 16355 // prepend last slides before start 16356 if (activeColIndexWithShift < loopedSlides) { 16357 slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup); 16358 for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) { 16359 const index = i - Math.floor(i / cols) * cols; 16360 if (gridEnabled) { 16361 const colIndexToPrepend = cols - index - 1; 16362 for (let i = slides.length - 1; i >= 0; i -= 1) { 16363 if (slides[i].column === colIndexToPrepend) prependSlidesIndexes.push(i); 16364 } 16365 // slides.forEach((slide, slideIndex) => { 16366 // if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex); 16367 // }); 16368 } else { 16369 prependSlidesIndexes.push(cols - index - 1); 16370 } 16371 } 16372 } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) { 16373 slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup); 16374 for (let i = 0; i < slidesAppended; i += 1) { 16375 const index = i - Math.floor(i / cols) * cols; 16376 if (gridEnabled) { 16377 slides.forEach((slide, slideIndex) => { 16378 if (slide.column === index) appendSlidesIndexes.push(slideIndex); 16379 }); 16380 } else { 16381 appendSlidesIndexes.push(index); 16382 } 16383 } 16384 } 16385 swiper.__preventObserver__ = true; 16386 requestAnimationFrame(() => { 16387 swiper.__preventObserver__ = false; 16388 }); 16389 if (isPrev) { 16390 prependSlidesIndexes.forEach(index => { 16391 slides[index].swiperLoopMoveDOM = true; 16392 slidesEl.prepend(slides[index]); 16393 slides[index].swiperLoopMoveDOM = false; 16394 }); 16395 } 16396 if (isNext) { 16397 appendSlidesIndexes.forEach(index => { 16398 slides[index].swiperLoopMoveDOM = true; 16399 slidesEl.append(slides[index]); 16400 slides[index].swiperLoopMoveDOM = false; 16401 }); 16402 } 16403 swiper.recalcSlides(); 16404 if (params.slidesPerView === 'auto') { 16405 swiper.updateSlides(); 16406 } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) { 16407 swiper.slides.forEach((slide, slideIndex) => { 16408 swiper.grid.updateSlide(slideIndex, slide, swiper.slides); 16409 }); 16410 } 16411 if (params.watchSlidesProgress) { 16412 swiper.updateSlidesOffset(); 16413 } 16414 if (slideTo) { 16415 if (prependSlidesIndexes.length > 0 && isPrev) { 16416 if (typeof slideRealIndex === 'undefined') { 16417 const currentSlideTranslate = swiper.slidesGrid[activeIndex]; 16418 const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended]; 16419 const diff = newSlideTranslate - currentSlideTranslate; 16420 if (byMousewheel) { 16421 swiper.setTranslate(swiper.translate - diff); 16422 } else { 16423 swiper.slideTo(activeIndex + slidesPrepended, 0, false, true); 16424 if (setTranslate) { 16425 swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff; 16426 swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff; 16427 } 16428 } 16429 } else { 16430 if (setTranslate) { 16431 const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length; 16432 swiper.slideTo(swiper.activeIndex + shift, 0, false, true); 16433 swiper.touchEventsData.currentTranslate = swiper.translate; 16434 } 16435 } 16436 } else if (appendSlidesIndexes.length > 0 && isNext) { 16437 if (typeof slideRealIndex === 'undefined') { 16438 const currentSlideTranslate = swiper.slidesGrid[activeIndex]; 16439 const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended]; 16440 const diff = newSlideTranslate - currentSlideTranslate; 16441 if (byMousewheel) { 16442 swiper.setTranslate(swiper.translate - diff); 16443 } else { 16444 swiper.slideTo(activeIndex - slidesAppended, 0, false, true); 16445 if (setTranslate) { 16446 swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff; 16447 swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff; 16448 } 16449 } 16450 } else { 16451 const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length; 16452 swiper.slideTo(swiper.activeIndex - shift, 0, false, true); 16453 } 16454 } 16455 } 16456 swiper.allowSlidePrev = allowSlidePrev; 16457 swiper.allowSlideNext = allowSlideNext; 16458 if (swiper.controller && swiper.controller.control && !byController) { 16459 const loopParams = { 16460 slideRealIndex, 16461 direction, 16462 setTranslate, 16463 activeSlideIndex, 16464 byController: true 16465 }; 16466 if (Array.isArray(swiper.controller.control)) { 16467 swiper.controller.control.forEach(c => { 16468 if (!c.destroyed && c.params.loop) c.loopFix({ 16469 ...loopParams, 16470 slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false 16471 }); 16472 }); 16473 } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) { 16474 swiper.controller.control.loopFix({ 16475 ...loopParams, 16476 slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false 16477 }); 16478 } 16479 } 16480 swiper.emit('loopFix'); 16481} 16482 16483function loopDestroy() { 16484 const swiper = this; 16485 const { 16486 params, 16487 slidesEl 16488 } = swiper; 16489 if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return; 16490 swiper.recalcSlides(); 16491 const newSlidesOrder = []; 16492 swiper.slides.forEach(slideEl => { 16493 const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex; 16494 newSlidesOrder[index] = slideEl; 16495 }); 16496 swiper.slides.forEach(slideEl => { 16497 slideEl.removeAttribute('data-swiper-slide-index'); 16498 }); 16499 newSlidesOrder.forEach(slideEl => { 16500 slidesEl.append(slideEl); 16501 }); 16502 swiper.recalcSlides(); 16503 swiper.slideTo(swiper.realIndex, 0); 16504} 16505 16506var loop = { 16507 loopCreate, 16508 loopFix, 16509 loopDestroy 16510}; 16511 16512function setGrabCursor(moving) { 16513 const swiper = this; 16514 if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; 16515 const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl; 16516 if (swiper.isElement) { 16517 swiper.__preventObserver__ = true; 16518 } 16519 el.style.cursor = 'move'; 16520 el.style.cursor = moving ? 'grabbing' : 'grab'; 16521 if (swiper.isElement) { 16522 requestAnimationFrame(() => { 16523 swiper.__preventObserver__ = false; 16524 }); 16525 } 16526} 16527 16528function unsetGrabCursor() { 16529 const swiper = this; 16530 if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { 16531 return; 16532 } 16533 if (swiper.isElement) { 16534 swiper.__preventObserver__ = true; 16535 } 16536 swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = ''; 16537 if (swiper.isElement) { 16538 requestAnimationFrame(() => { 16539 swiper.__preventObserver__ = false; 16540 }); 16541 } 16542} 16543 16544var grabCursor = { 16545 setGrabCursor, 16546 unsetGrabCursor 16547}; 16548 16549// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd 16550function closestElement(selector, base) { 16551 if (base === void 0) { 16552 base = this; 16553 } 16554 function __closestFrom(el) { 16555 if (!el || el === (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)() || el === (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)()) return null; 16556 if (el.assignedSlot) el = el.assignedSlot; 16557 const found = el.closest(selector); 16558 if (!found && !el.getRootNode) { 16559 return null; 16560 } 16561 return found || __closestFrom(el.getRootNode().host); 16562 } 16563 return __closestFrom(base); 16564} 16565function preventEdgeSwipe(swiper, event, startX) { 16566 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 16567 const { 16568 params 16569 } = swiper; 16570 const edgeSwipeDetection = params.edgeSwipeDetection; 16571 const edgeSwipeThreshold = params.edgeSwipeThreshold; 16572 if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) { 16573 if (edgeSwipeDetection === 'prevent') { 16574 event.preventDefault(); 16575 return true; 16576 } 16577 return false; 16578 } 16579 return true; 16580} 16581function onTouchStart(event) { 16582 const swiper = this; 16583 const document = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 16584 let e = event; 16585 if (e.originalEvent) e = e.originalEvent; 16586 const data = swiper.touchEventsData; 16587 if (e.type === 'pointerdown') { 16588 if (data.pointerId !== null && data.pointerId !== e.pointerId) { 16589 return; 16590 } 16591 data.pointerId = e.pointerId; 16592 } else if (e.type === 'touchstart' && e.targetTouches.length === 1) { 16593 data.touchId = e.targetTouches[0].identifier; 16594 } 16595 if (e.type === 'touchstart') { 16596 // don't proceed touch event 16597 preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX); 16598 return; 16599 } 16600 const { 16601 params, 16602 touches, 16603 enabled 16604 } = swiper; 16605 if (!enabled) return; 16606 if (!params.simulateTouch && e.pointerType === 'mouse') return; 16607 if (swiper.animating && params.preventInteractionOnTransition) { 16608 return; 16609 } 16610 if (!swiper.animating && params.cssMode && params.loop) { 16611 swiper.loopFix(); 16612 } 16613 let targetEl = e.target; 16614 if (params.touchEventsTarget === 'wrapper') { 16615 if (!swiper.wrapperEl.contains(targetEl)) return; 16616 } 16617 if ('which' in e && e.which === 3) return; 16618 if ('button' in e && e.button > 0) return; 16619 if (data.isTouched && data.isMoved) return; 16620 16621 // change target el for shadow root component 16622 const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; 16623 // eslint-disable-next-line 16624 const eventPath = e.composedPath ? e.composedPath() : e.path; 16625 if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) { 16626 targetEl = eventPath[0]; 16627 } 16628 const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; 16629 const isTargetShadow = !!(e.target && e.target.shadowRoot); 16630 16631 // use closestElement for shadow root element to get the actual closest for nested shadow root element 16632 if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) { 16633 swiper.allowClick = true; 16634 return; 16635 } 16636 if (params.swipeHandler) { 16637 if (!targetEl.closest(params.swipeHandler)) return; 16638 } 16639 touches.currentX = e.pageX; 16640 touches.currentY = e.pageY; 16641 const startX = touches.currentX; 16642 const startY = touches.currentY; 16643 16644 // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore 16645 16646 if (!preventEdgeSwipe(swiper, e, startX)) { 16647 return; 16648 } 16649 Object.assign(data, { 16650 isTouched: true, 16651 isMoved: false, 16652 allowTouchCallbacks: true, 16653 isScrolling: undefined, 16654 startMoving: undefined 16655 }); 16656 touches.startX = startX; 16657 touches.startY = startY; 16658 data.touchStartTime = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(); 16659 swiper.allowClick = true; 16660 swiper.updateSize(); 16661 swiper.swipeDirection = undefined; 16662 if (params.threshold > 0) data.allowThresholdMove = false; 16663 let preventDefault = true; 16664 if (targetEl.matches(data.focusableElements)) { 16665 preventDefault = false; 16666 if (targetEl.nodeName === 'SELECT') { 16667 data.isTouched = false; 16668 } 16669 } 16670 if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) { 16671 document.activeElement.blur(); 16672 } 16673 const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; 16674 if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) { 16675 e.preventDefault(); 16676 } 16677 if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) { 16678 swiper.freeMode.onTouchStart(); 16679 } 16680 swiper.emit('touchStart', e); 16681} 16682 16683function onTouchMove(event) { 16684 const document = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 16685 const swiper = this; 16686 const data = swiper.touchEventsData; 16687 const { 16688 params, 16689 touches, 16690 rtlTranslate: rtl, 16691 enabled 16692 } = swiper; 16693 if (!enabled) return; 16694 if (!params.simulateTouch && event.pointerType === 'mouse') return; 16695 let e = event; 16696 if (e.originalEvent) e = e.originalEvent; 16697 if (e.type === 'pointermove') { 16698 if (data.touchId !== null) return; // return from pointer if we use touch 16699 const id = e.pointerId; 16700 if (id !== data.pointerId) return; 16701 } 16702 let targetTouch; 16703 if (e.type === 'touchmove') { 16704 targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0]; 16705 if (!targetTouch || targetTouch.identifier !== data.touchId) return; 16706 } else { 16707 targetTouch = e; 16708 } 16709 if (!data.isTouched) { 16710 if (data.startMoving && data.isScrolling) { 16711 swiper.emit('touchMoveOpposite', e); 16712 } 16713 return; 16714 } 16715 const pageX = targetTouch.pageX; 16716 const pageY = targetTouch.pageY; 16717 if (e.preventedByNestedSwiper) { 16718 touches.startX = pageX; 16719 touches.startY = pageY; 16720 return; 16721 } 16722 if (!swiper.allowTouchMove) { 16723 if (!e.target.matches(data.focusableElements)) { 16724 swiper.allowClick = false; 16725 } 16726 if (data.isTouched) { 16727 Object.assign(touches, { 16728 startX: pageX, 16729 startY: pageY, 16730 currentX: pageX, 16731 currentY: pageY 16732 }); 16733 data.touchStartTime = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(); 16734 } 16735 return; 16736 } 16737 if (params.touchReleaseOnEdges && !params.loop) { 16738 if (swiper.isVertical()) { 16739 // Vertical 16740 if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { 16741 data.isTouched = false; 16742 data.isMoved = false; 16743 return; 16744 } 16745 } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { 16746 return; 16747 } 16748 } 16749 if (document.activeElement) { 16750 if (e.target === document.activeElement && e.target.matches(data.focusableElements)) { 16751 data.isMoved = true; 16752 swiper.allowClick = false; 16753 return; 16754 } 16755 } 16756 if (data.allowTouchCallbacks) { 16757 swiper.emit('touchMove', e); 16758 } 16759 touches.previousX = touches.currentX; 16760 touches.previousY = touches.currentY; 16761 touches.currentX = pageX; 16762 touches.currentY = pageY; 16763 const diffX = touches.currentX - touches.startX; 16764 const diffY = touches.currentY - touches.startY; 16765 if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return; 16766 if (typeof data.isScrolling === 'undefined') { 16767 let touchAngle; 16768 if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { 16769 data.isScrolling = false; 16770 } else { 16771 // eslint-disable-next-line 16772 if (diffX * diffX + diffY * diffY >= 25) { 16773 touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; 16774 data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; 16775 } 16776 } 16777 } 16778 if (data.isScrolling) { 16779 swiper.emit('touchMoveOpposite', e); 16780 } 16781 if (typeof data.startMoving === 'undefined') { 16782 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 16783 data.startMoving = true; 16784 } 16785 } 16786 if (data.isScrolling) { 16787 data.isTouched = false; 16788 return; 16789 } 16790 if (!data.startMoving) { 16791 return; 16792 } 16793 swiper.allowClick = false; 16794 if (!params.cssMode && e.cancelable) { 16795 e.preventDefault(); 16796 } 16797 if (params.touchMoveStopPropagation && !params.nested) { 16798 e.stopPropagation(); 16799 } 16800 let diff = swiper.isHorizontal() ? diffX : diffY; 16801 let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY; 16802 if (params.oneWayMovement) { 16803 diff = Math.abs(diff) * (rtl ? 1 : -1); 16804 touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1); 16805 } 16806 touches.diff = diff; 16807 diff *= params.touchRatio; 16808 if (rtl) { 16809 diff = -diff; 16810 touchesDiff = -touchesDiff; 16811 } 16812 const prevTouchesDirection = swiper.touchesDirection; 16813 swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; 16814 swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next'; 16815 const isLoop = swiper.params.loop && !params.cssMode; 16816 const allowLoopFix = swiper.touchesDirection === 'next' && swiper.allowSlideNext || swiper.touchesDirection === 'prev' && swiper.allowSlidePrev; 16817 if (!data.isMoved) { 16818 if (isLoop && allowLoopFix) { 16819 swiper.loopFix({ 16820 direction: swiper.swipeDirection 16821 }); 16822 } 16823 data.startTranslate = swiper.getTranslate(); 16824 swiper.setTransition(0); 16825 if (swiper.animating) { 16826 const evt = new window.CustomEvent('transitionend', { 16827 bubbles: true, 16828 cancelable: true 16829 }); 16830 swiper.wrapperEl.dispatchEvent(evt); 16831 } 16832 data.allowMomentumBounce = false; 16833 // Grab Cursor 16834 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 16835 swiper.setGrabCursor(true); 16836 } 16837 swiper.emit('sliderFirstMove', e); 16838 } 16839 let loopFixed; 16840 new Date().getTime(); 16841 if (data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) { 16842 Object.assign(touches, { 16843 startX: pageX, 16844 startY: pageY, 16845 currentX: pageX, 16846 currentY: pageY, 16847 startTranslate: data.currentTranslate 16848 }); 16849 data.loopSwapReset = true; 16850 data.startTranslate = data.currentTranslate; 16851 return; 16852 } 16853 swiper.emit('sliderMove', e); 16854 data.isMoved = true; 16855 data.currentTranslate = diff + data.startTranslate; 16856 let disableParentSwiper = true; 16857 let resistanceRatio = params.resistanceRatio; 16858 if (params.touchReleaseOnEdges) { 16859 resistanceRatio = 0; 16860 } 16861 if (diff > 0) { 16862 if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] : swiper.minTranslate())) { 16863 swiper.loopFix({ 16864 direction: 'prev', 16865 setTranslate: true, 16866 activeSlideIndex: 0 16867 }); 16868 } 16869 if (data.currentTranslate > swiper.minTranslate()) { 16870 disableParentSwiper = false; 16871 if (params.resistance) { 16872 data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; 16873 } 16874 } 16875 } else if (diff < 0) { 16876 if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] : swiper.maxTranslate())) { 16877 swiper.loopFix({ 16878 direction: 'next', 16879 setTranslate: true, 16880 activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10))) 16881 }); 16882 } 16883 if (data.currentTranslate < swiper.maxTranslate()) { 16884 disableParentSwiper = false; 16885 if (params.resistance) { 16886 data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; 16887 } 16888 } 16889 } 16890 if (disableParentSwiper) { 16891 e.preventedByNestedSwiper = true; 16892 } 16893 16894 // Directions locks 16895 if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { 16896 data.currentTranslate = data.startTranslate; 16897 } 16898 if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { 16899 data.currentTranslate = data.startTranslate; 16900 } 16901 if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { 16902 data.currentTranslate = data.startTranslate; 16903 } 16904 16905 // Threshold 16906 if (params.threshold > 0) { 16907 if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { 16908 if (!data.allowThresholdMove) { 16909 data.allowThresholdMove = true; 16910 touches.startX = touches.currentX; 16911 touches.startY = touches.currentY; 16912 data.currentTranslate = data.startTranslate; 16913 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 16914 return; 16915 } 16916 } else { 16917 data.currentTranslate = data.startTranslate; 16918 return; 16919 } 16920 } 16921 if (!params.followFinger || params.cssMode) return; 16922 16923 // Update active index in free mode 16924 if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { 16925 swiper.updateActiveIndex(); 16926 swiper.updateSlidesClasses(); 16927 } 16928 if (params.freeMode && params.freeMode.enabled && swiper.freeMode) { 16929 swiper.freeMode.onTouchMove(); 16930 } 16931 // Update progress 16932 swiper.updateProgress(data.currentTranslate); 16933 // Update translate 16934 swiper.setTranslate(data.currentTranslate); 16935} 16936 16937function onTouchEnd(event) { 16938 const swiper = this; 16939 const data = swiper.touchEventsData; 16940 let e = event; 16941 if (e.originalEvent) e = e.originalEvent; 16942 let targetTouch; 16943 const isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel'; 16944 if (!isTouchEvent) { 16945 if (data.touchId !== null) return; // return from pointer if we use touch 16946 if (e.pointerId !== data.pointerId) return; 16947 targetTouch = e; 16948 } else { 16949 targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0]; 16950 if (!targetTouch || targetTouch.identifier !== data.touchId) return; 16951 } 16952 if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) { 16953 const proceed = ['pointercancel', 'contextmenu'].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView); 16954 if (!proceed) { 16955 return; 16956 } 16957 } 16958 data.pointerId = null; 16959 data.touchId = null; 16960 const { 16961 params, 16962 touches, 16963 rtlTranslate: rtl, 16964 slidesGrid, 16965 enabled 16966 } = swiper; 16967 if (!enabled) return; 16968 if (!params.simulateTouch && e.pointerType === 'mouse') return; 16969 if (data.allowTouchCallbacks) { 16970 swiper.emit('touchEnd', e); 16971 } 16972 data.allowTouchCallbacks = false; 16973 if (!data.isTouched) { 16974 if (data.isMoved && params.grabCursor) { 16975 swiper.setGrabCursor(false); 16976 } 16977 data.isMoved = false; 16978 data.startMoving = false; 16979 return; 16980 } 16981 16982 // Return Grab Cursor 16983 if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 16984 swiper.setGrabCursor(false); 16985 } 16986 16987 // Time diff 16988 const touchEndTime = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(); 16989 const timeDiff = touchEndTime - data.touchStartTime; 16990 16991 // Tap, doubleTap, Click 16992 if (swiper.allowClick) { 16993 const pathTree = e.path || e.composedPath && e.composedPath(); 16994 swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree); 16995 swiper.emit('tap click', e); 16996 if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { 16997 swiper.emit('doubleTap doubleClick', e); 16998 } 16999 } 17000 data.lastClickTime = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.d)(); 17001 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.n)(() => { 17002 if (!swiper.destroyed) swiper.allowClick = true; 17003 }); 17004 if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) { 17005 data.isTouched = false; 17006 data.isMoved = false; 17007 data.startMoving = false; 17008 return; 17009 } 17010 data.isTouched = false; 17011 data.isMoved = false; 17012 data.startMoving = false; 17013 let currentPos; 17014 if (params.followFinger) { 17015 currentPos = rtl ? swiper.translate : -swiper.translate; 17016 } else { 17017 currentPos = -data.currentTranslate; 17018 } 17019 if (params.cssMode) { 17020 return; 17021 } 17022 if (params.freeMode && params.freeMode.enabled) { 17023 swiper.freeMode.onTouchEnd({ 17024 currentPos 17025 }); 17026 return; 17027 } 17028 17029 // Find current slide 17030 const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop; 17031 let stopIndex = 0; 17032 let groupSize = swiper.slidesSizesGrid[0]; 17033 for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { 17034 const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 17035 if (typeof slidesGrid[i + increment] !== 'undefined') { 17036 if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) { 17037 stopIndex = i; 17038 groupSize = slidesGrid[i + increment] - slidesGrid[i]; 17039 } 17040 } else if (swipeToLast || currentPos >= slidesGrid[i]) { 17041 stopIndex = i; 17042 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 17043 } 17044 } 17045 let rewindFirstIndex = null; 17046 let rewindLastIndex = null; 17047 if (params.rewind) { 17048 if (swiper.isBeginning) { 17049 rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 17050 } else if (swiper.isEnd) { 17051 rewindFirstIndex = 0; 17052 } 17053 } 17054 // Find current slide size 17055 const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 17056 const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 17057 if (timeDiff > params.longSwipesMs) { 17058 // Long touches 17059 if (!params.longSwipes) { 17060 swiper.slideTo(swiper.activeIndex); 17061 return; 17062 } 17063 if (swiper.swipeDirection === 'next') { 17064 if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex); 17065 } 17066 if (swiper.swipeDirection === 'prev') { 17067 if (ratio > 1 - params.longSwipesRatio) { 17068 swiper.slideTo(stopIndex + increment); 17069 } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) { 17070 swiper.slideTo(rewindLastIndex); 17071 } else { 17072 swiper.slideTo(stopIndex); 17073 } 17074 } 17075 } else { 17076 // Short swipes 17077 if (!params.shortSwipes) { 17078 swiper.slideTo(swiper.activeIndex); 17079 return; 17080 } 17081 const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); 17082 if (!isNavButtonTarget) { 17083 if (swiper.swipeDirection === 'next') { 17084 swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment); 17085 } 17086 if (swiper.swipeDirection === 'prev') { 17087 swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex); 17088 } 17089 } else if (e.target === swiper.navigation.nextEl) { 17090 swiper.slideTo(stopIndex + increment); 17091 } else { 17092 swiper.slideTo(stopIndex); 17093 } 17094 } 17095} 17096 17097function onResize() { 17098 const swiper = this; 17099 const { 17100 params, 17101 el 17102 } = swiper; 17103 if (el && el.offsetWidth === 0) return; 17104 17105 // Breakpoints 17106 if (params.breakpoints) { 17107 swiper.setBreakpoint(); 17108 } 17109 17110 // Save locks 17111 const { 17112 allowSlideNext, 17113 allowSlidePrev, 17114 snapGrid 17115 } = swiper; 17116 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 17117 17118 // Disable locks on resize 17119 swiper.allowSlideNext = true; 17120 swiper.allowSlidePrev = true; 17121 swiper.updateSize(); 17122 swiper.updateSlides(); 17123 swiper.updateSlidesClasses(); 17124 const isVirtualLoop = isVirtual && params.loop; 17125 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) { 17126 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 17127 } else { 17128 if (swiper.params.loop && !isVirtual) { 17129 swiper.slideToLoop(swiper.realIndex, 0, false, true); 17130 } else { 17131 swiper.slideTo(swiper.activeIndex, 0, false, true); 17132 } 17133 } 17134 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 17135 clearTimeout(swiper.autoplay.resizeTimeout); 17136 swiper.autoplay.resizeTimeout = setTimeout(() => { 17137 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 17138 swiper.autoplay.resume(); 17139 } 17140 }, 500); 17141 } 17142 // Return locks after resize 17143 swiper.allowSlidePrev = allowSlidePrev; 17144 swiper.allowSlideNext = allowSlideNext; 17145 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 17146 swiper.checkOverflow(); 17147 } 17148} 17149 17150function onClick(e) { 17151 const swiper = this; 17152 if (!swiper.enabled) return; 17153 if (!swiper.allowClick) { 17154 if (swiper.params.preventClicks) e.preventDefault(); 17155 if (swiper.params.preventClicksPropagation && swiper.animating) { 17156 e.stopPropagation(); 17157 e.stopImmediatePropagation(); 17158 } 17159 } 17160} 17161 17162function onScroll() { 17163 const swiper = this; 17164 const { 17165 wrapperEl, 17166 rtlTranslate, 17167 enabled 17168 } = swiper; 17169 if (!enabled) return; 17170 swiper.previousTranslate = swiper.translate; 17171 if (swiper.isHorizontal()) { 17172 swiper.translate = -wrapperEl.scrollLeft; 17173 } else { 17174 swiper.translate = -wrapperEl.scrollTop; 17175 } 17176 // eslint-disable-next-line 17177 if (swiper.translate === 0) swiper.translate = 0; 17178 swiper.updateActiveIndex(); 17179 swiper.updateSlidesClasses(); 17180 let newProgress; 17181 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 17182 if (translatesDiff === 0) { 17183 newProgress = 0; 17184 } else { 17185 newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; 17186 } 17187 if (newProgress !== swiper.progress) { 17188 swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); 17189 } 17190 swiper.emit('setTranslate', swiper.translate, false); 17191} 17192 17193function onLoad(e) { 17194 const swiper = this; 17195 processLazyPreloader(swiper, e.target); 17196 if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) { 17197 return; 17198 } 17199 swiper.update(); 17200} 17201 17202function onDocumentTouchStart() { 17203 const swiper = this; 17204 if (swiper.documentTouchHandlerProceeded) return; 17205 swiper.documentTouchHandlerProceeded = true; 17206 if (swiper.params.touchReleaseOnEdges) { 17207 swiper.el.style.touchAction = 'auto'; 17208 } 17209} 17210 17211const events = (swiper, method) => { 17212 const document = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 17213 const { 17214 params, 17215 el, 17216 wrapperEl, 17217 device 17218 } = swiper; 17219 const capture = !!params.nested; 17220 const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; 17221 const swiperMethod = method; 17222 17223 // Touch Events 17224 document[domMethod]('touchstart', swiper.onDocumentTouchStart, { 17225 passive: false, 17226 capture 17227 }); 17228 el[domMethod]('touchstart', swiper.onTouchStart, { 17229 passive: false 17230 }); 17231 el[domMethod]('pointerdown', swiper.onTouchStart, { 17232 passive: false 17233 }); 17234 document[domMethod]('touchmove', swiper.onTouchMove, { 17235 passive: false, 17236 capture 17237 }); 17238 document[domMethod]('pointermove', swiper.onTouchMove, { 17239 passive: false, 17240 capture 17241 }); 17242 document[domMethod]('touchend', swiper.onTouchEnd, { 17243 passive: true 17244 }); 17245 document[domMethod]('pointerup', swiper.onTouchEnd, { 17246 passive: true 17247 }); 17248 document[domMethod]('pointercancel', swiper.onTouchEnd, { 17249 passive: true 17250 }); 17251 document[domMethod]('touchcancel', swiper.onTouchEnd, { 17252 passive: true 17253 }); 17254 document[domMethod]('pointerout', swiper.onTouchEnd, { 17255 passive: true 17256 }); 17257 document[domMethod]('pointerleave', swiper.onTouchEnd, { 17258 passive: true 17259 }); 17260 document[domMethod]('contextmenu', swiper.onTouchEnd, { 17261 passive: true 17262 }); 17263 17264 // Prevent Links Clicks 17265 if (params.preventClicks || params.preventClicksPropagation) { 17266 el[domMethod]('click', swiper.onClick, true); 17267 } 17268 if (params.cssMode) { 17269 wrapperEl[domMethod]('scroll', swiper.onScroll); 17270 } 17271 17272 // Resize handler 17273 if (params.updateOnWindowResize) { 17274 swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true); 17275 } else { 17276 swiper[swiperMethod]('observerUpdate', onResize, true); 17277 } 17278 17279 // Images loader 17280 el[domMethod]('load', swiper.onLoad, { 17281 capture: true 17282 }); 17283}; 17284function attachEvents() { 17285 const swiper = this; 17286 const { 17287 params 17288 } = swiper; 17289 swiper.onTouchStart = onTouchStart.bind(swiper); 17290 swiper.onTouchMove = onTouchMove.bind(swiper); 17291 swiper.onTouchEnd = onTouchEnd.bind(swiper); 17292 swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper); 17293 if (params.cssMode) { 17294 swiper.onScroll = onScroll.bind(swiper); 17295 } 17296 swiper.onClick = onClick.bind(swiper); 17297 swiper.onLoad = onLoad.bind(swiper); 17298 events(swiper, 'on'); 17299} 17300function detachEvents() { 17301 const swiper = this; 17302 events(swiper, 'off'); 17303} 17304var events$1 = { 17305 attachEvents, 17306 detachEvents 17307}; 17308 17309const isGridEnabled = (swiper, params) => { 17310 return swiper.grid && params.grid && params.grid.rows > 1; 17311}; 17312function setBreakpoint() { 17313 const swiper = this; 17314 const { 17315 realIndex, 17316 initialized, 17317 params, 17318 el 17319 } = swiper; 17320 const breakpoints = params.breakpoints; 17321 if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; 17322 17323 // Get breakpoint for window width and update parameters 17324 const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); 17325 if (!breakpoint || swiper.currentBreakpoint === breakpoint) return; 17326 const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; 17327 const breakpointParams = breakpointOnlyParams || swiper.originalParams; 17328 const wasMultiRow = isGridEnabled(swiper, params); 17329 const isMultiRow = isGridEnabled(swiper, breakpointParams); 17330 const wasEnabled = params.enabled; 17331 if (wasMultiRow && !isMultiRow) { 17332 el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`); 17333 swiper.emitContainerClasses(); 17334 } else if (!wasMultiRow && isMultiRow) { 17335 el.classList.add(`${params.containerModifierClass}grid`); 17336 if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') { 17337 el.classList.add(`${params.containerModifierClass}grid-column`); 17338 } 17339 swiper.emitContainerClasses(); 17340 } 17341 17342 // Toggle navigation, pagination, scrollbar 17343 ['navigation', 'pagination', 'scrollbar'].forEach(prop => { 17344 if (typeof breakpointParams[prop] === 'undefined') return; 17345 const wasModuleEnabled = params[prop] && params[prop].enabled; 17346 const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled; 17347 if (wasModuleEnabled && !isModuleEnabled) { 17348 swiper[prop].disable(); 17349 } 17350 if (!wasModuleEnabled && isModuleEnabled) { 17351 swiper[prop].enable(); 17352 } 17353 }); 17354 const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; 17355 const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); 17356 const wasLoop = params.loop; 17357 if (directionChanged && initialized) { 17358 swiper.changeDirection(); 17359 } 17360 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)(swiper.params, breakpointParams); 17361 const isEnabled = swiper.params.enabled; 17362 const hasLoop = swiper.params.loop; 17363 Object.assign(swiper, { 17364 allowTouchMove: swiper.params.allowTouchMove, 17365 allowSlideNext: swiper.params.allowSlideNext, 17366 allowSlidePrev: swiper.params.allowSlidePrev 17367 }); 17368 if (wasEnabled && !isEnabled) { 17369 swiper.disable(); 17370 } else if (!wasEnabled && isEnabled) { 17371 swiper.enable(); 17372 } 17373 swiper.currentBreakpoint = breakpoint; 17374 swiper.emit('_beforeBreakpoint', breakpointParams); 17375 if (initialized) { 17376 if (needsReLoop) { 17377 swiper.loopDestroy(); 17378 swiper.loopCreate(realIndex); 17379 swiper.updateSlides(); 17380 } else if (!wasLoop && hasLoop) { 17381 swiper.loopCreate(realIndex); 17382 swiper.updateSlides(); 17383 } else if (wasLoop && !hasLoop) { 17384 swiper.loopDestroy(); 17385 } 17386 } 17387 swiper.emit('breakpoint', breakpointParams); 17388} 17389 17390function getBreakpoint(breakpoints, base, containerEl) { 17391 if (base === void 0) { 17392 base = 'window'; 17393 } 17394 if (!breakpoints || base === 'container' && !containerEl) return undefined; 17395 let breakpoint = false; 17396 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 17397 const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight; 17398 const points = Object.keys(breakpoints).map(point => { 17399 if (typeof point === 'string' && point.indexOf('@') === 0) { 17400 const minRatio = parseFloat(point.substr(1)); 17401 const value = currentHeight * minRatio; 17402 return { 17403 value, 17404 point 17405 }; 17406 } 17407 return { 17408 value: point, 17409 point 17410 }; 17411 }); 17412 points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); 17413 for (let i = 0; i < points.length; i += 1) { 17414 const { 17415 point, 17416 value 17417 } = points[i]; 17418 if (base === 'window') { 17419 if (window.matchMedia(`(min-width: ${value}px)`).matches) { 17420 breakpoint = point; 17421 } 17422 } else if (value <= containerEl.clientWidth) { 17423 breakpoint = point; 17424 } 17425 } 17426 return breakpoint || 'max'; 17427} 17428 17429var breakpoints = { 17430 setBreakpoint, 17431 getBreakpoint 17432}; 17433 17434function prepareClasses(entries, prefix) { 17435 const resultClasses = []; 17436 entries.forEach(item => { 17437 if (typeof item === 'object') { 17438 Object.keys(item).forEach(classNames => { 17439 if (item[classNames]) { 17440 resultClasses.push(prefix + classNames); 17441 } 17442 }); 17443 } else if (typeof item === 'string') { 17444 resultClasses.push(prefix + item); 17445 } 17446 }); 17447 return resultClasses; 17448} 17449function addClasses() { 17450 const swiper = this; 17451 const { 17452 classNames, 17453 params, 17454 rtl, 17455 el, 17456 device 17457 } = swiper; 17458 // prettier-ignore 17459 const suffixes = prepareClasses(['initialized', params.direction, { 17460 'free-mode': swiper.params.freeMode && params.freeMode.enabled 17461 }, { 17462 'autoheight': params.autoHeight 17463 }, { 17464 'rtl': rtl 17465 }, { 17466 'grid': params.grid && params.grid.rows > 1 17467 }, { 17468 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' 17469 }, { 17470 'android': device.android 17471 }, { 17472 'ios': device.ios 17473 }, { 17474 'css-mode': params.cssMode 17475 }, { 17476 'centered': params.cssMode && params.centeredSlides 17477 }, { 17478 'watch-progress': params.watchSlidesProgress 17479 }], params.containerModifierClass); 17480 classNames.push(...suffixes); 17481 el.classList.add(...classNames); 17482 swiper.emitContainerClasses(); 17483} 17484 17485function removeClasses() { 17486 const swiper = this; 17487 const { 17488 el, 17489 classNames 17490 } = swiper; 17491 el.classList.remove(...classNames); 17492 swiper.emitContainerClasses(); 17493} 17494 17495var classes = { 17496 addClasses, 17497 removeClasses 17498}; 17499 17500function checkOverflow() { 17501 const swiper = this; 17502 const { 17503 isLocked: wasLocked, 17504 params 17505 } = swiper; 17506 const { 17507 slidesOffsetBefore 17508 } = params; 17509 if (slidesOffsetBefore) { 17510 const lastSlideIndex = swiper.slides.length - 1; 17511 const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; 17512 swiper.isLocked = swiper.size > lastSlideRightEdge; 17513 } else { 17514 swiper.isLocked = swiper.snapGrid.length === 1; 17515 } 17516 if (params.allowSlideNext === true) { 17517 swiper.allowSlideNext = !swiper.isLocked; 17518 } 17519 if (params.allowSlidePrev === true) { 17520 swiper.allowSlidePrev = !swiper.isLocked; 17521 } 17522 if (wasLocked && wasLocked !== swiper.isLocked) { 17523 swiper.isEnd = false; 17524 } 17525 if (wasLocked !== swiper.isLocked) { 17526 swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); 17527 } 17528} 17529var checkOverflow$1 = { 17530 checkOverflow 17531}; 17532 17533var defaults = { 17534 init: true, 17535 direction: 'horizontal', 17536 oneWayMovement: false, 17537 touchEventsTarget: 'wrapper', 17538 initialSlide: 0, 17539 speed: 300, 17540 cssMode: false, 17541 updateOnWindowResize: true, 17542 resizeObserver: true, 17543 nested: false, 17544 createElements: false, 17545 eventsPrefix: 'swiper', 17546 enabled: true, 17547 focusableElements: 'input, select, option, textarea, button, video, label', 17548 // Overrides 17549 width: null, 17550 height: null, 17551 // 17552 preventInteractionOnTransition: false, 17553 // ssr 17554 userAgent: null, 17555 url: null, 17556 // To support iOS's swipe-to-go-back gesture (when being used in-app). 17557 edgeSwipeDetection: false, 17558 edgeSwipeThreshold: 20, 17559 // Autoheight 17560 autoHeight: false, 17561 // Set wrapper width 17562 setWrapperSize: false, 17563 // Virtual Translate 17564 virtualTranslate: false, 17565 // Effects 17566 effect: 'slide', 17567 // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' 17568 17569 // Breakpoints 17570 breakpoints: undefined, 17571 breakpointsBase: 'window', 17572 // Slides grid 17573 spaceBetween: 0, 17574 slidesPerView: 1, 17575 slidesPerGroup: 1, 17576 slidesPerGroupSkip: 0, 17577 slidesPerGroupAuto: false, 17578 centeredSlides: false, 17579 centeredSlidesBounds: false, 17580 slidesOffsetBefore: 0, 17581 // in px 17582 slidesOffsetAfter: 0, 17583 // in px 17584 normalizeSlideIndex: true, 17585 centerInsufficientSlides: false, 17586 // Disable swiper and hide navigation when container not overflow 17587 watchOverflow: true, 17588 // Round length 17589 roundLengths: false, 17590 // Touches 17591 touchRatio: 1, 17592 touchAngle: 45, 17593 simulateTouch: true, 17594 shortSwipes: true, 17595 longSwipes: true, 17596 longSwipesRatio: 0.5, 17597 longSwipesMs: 300, 17598 followFinger: true, 17599 allowTouchMove: true, 17600 threshold: 5, 17601 touchMoveStopPropagation: false, 17602 touchStartPreventDefault: true, 17603 touchStartForcePreventDefault: false, 17604 touchReleaseOnEdges: false, 17605 // Unique Navigation Elements 17606 uniqueNavElements: true, 17607 // Resistance 17608 resistance: true, 17609 resistanceRatio: 0.85, 17610 // Progress 17611 watchSlidesProgress: false, 17612 // Cursor 17613 grabCursor: false, 17614 // Clicks 17615 preventClicks: true, 17616 preventClicksPropagation: true, 17617 slideToClickedSlide: false, 17618 // loop 17619 loop: false, 17620 loopAddBlankSlides: true, 17621 loopAdditionalSlides: 0, 17622 loopPreventsSliding: true, 17623 // rewind 17624 rewind: false, 17625 // Swiping/no swiping 17626 allowSlidePrev: true, 17627 allowSlideNext: true, 17628 swipeHandler: null, 17629 // '.swipe-handler', 17630 noSwiping: true, 17631 noSwipingClass: 'swiper-no-swiping', 17632 noSwipingSelector: null, 17633 // Passive Listeners 17634 passiveListeners: true, 17635 maxBackfaceHiddenSlides: 10, 17636 // NS 17637 containerModifierClass: 'swiper-', 17638 // NEW 17639 slideClass: 'swiper-slide', 17640 slideBlankClass: 'swiper-slide-blank', 17641 slideActiveClass: 'swiper-slide-active', 17642 slideVisibleClass: 'swiper-slide-visible', 17643 slideFullyVisibleClass: 'swiper-slide-fully-visible', 17644 slideNextClass: 'swiper-slide-next', 17645 slidePrevClass: 'swiper-slide-prev', 17646 wrapperClass: 'swiper-wrapper', 17647 lazyPreloaderClass: 'swiper-lazy-preloader', 17648 lazyPreloadPrevNext: 0, 17649 // Callbacks 17650 runCallbacksOnInit: true, 17651 // Internals 17652 _emitClasses: false 17653}; 17654 17655function moduleExtendParams(params, allModulesParams) { 17656 return function extendParams(obj) { 17657 if (obj === void 0) { 17658 obj = {}; 17659 } 17660 const moduleParamName = Object.keys(obj)[0]; 17661 const moduleParams = obj[moduleParamName]; 17662 if (typeof moduleParams !== 'object' || moduleParams === null) { 17663 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)(allModulesParams, obj); 17664 return; 17665 } 17666 if (params[moduleParamName] === true) { 17667 params[moduleParamName] = { 17668 enabled: true 17669 }; 17670 } 17671 if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) { 17672 params[moduleParamName].auto = true; 17673 } 17674 if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) { 17675 params[moduleParamName].auto = true; 17676 } 17677 if (!(moduleParamName in params && 'enabled' in moduleParams)) { 17678 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)(allModulesParams, obj); 17679 return; 17680 } 17681 if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) { 17682 params[moduleParamName].enabled = true; 17683 } 17684 if (!params[moduleParamName]) params[moduleParamName] = { 17685 enabled: false 17686 }; 17687 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)(allModulesParams, obj); 17688 }; 17689} 17690 17691/* eslint no-param-reassign: "off" */ 17692const prototypes = { 17693 eventsEmitter, 17694 update, 17695 translate, 17696 transition, 17697 slide, 17698 loop, 17699 grabCursor, 17700 events: events$1, 17701 breakpoints, 17702 checkOverflow: checkOverflow$1, 17703 classes 17704}; 17705const extendedDefaults = {}; 17706class Swiper { 17707 constructor() { 17708 let el; 17709 let params; 17710 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 17711 args[_key] = arguments[_key]; 17712 } 17713 if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') { 17714 params = args[0]; 17715 } else { 17716 [el, params] = args; 17717 } 17718 if (!params) params = {}; 17719 params = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)({}, params); 17720 if (el && !params.el) params.el = el; 17721 const document = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 17722 if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) { 17723 const swipers = []; 17724 document.querySelectorAll(params.el).forEach(containerEl => { 17725 const newParams = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)({}, params, { 17726 el: containerEl 17727 }); 17728 swipers.push(new Swiper(newParams)); 17729 }); 17730 // eslint-disable-next-line no-constructor-return 17731 return swipers; 17732 } 17733 17734 // Swiper Instance 17735 const swiper = this; 17736 swiper.__swiper__ = true; 17737 swiper.support = getSupport(); 17738 swiper.device = getDevice({ 17739 userAgent: params.userAgent 17740 }); 17741 swiper.browser = getBrowser(); 17742 swiper.eventsListeners = {}; 17743 swiper.eventsAnyListeners = []; 17744 swiper.modules = [...swiper.__modules__]; 17745 if (params.modules && Array.isArray(params.modules)) { 17746 swiper.modules.push(...params.modules); 17747 } 17748 const allModulesParams = {}; 17749 swiper.modules.forEach(mod => { 17750 mod({ 17751 params, 17752 swiper, 17753 extendParams: moduleExtendParams(params, allModulesParams), 17754 on: swiper.on.bind(swiper), 17755 once: swiper.once.bind(swiper), 17756 off: swiper.off.bind(swiper), 17757 emit: swiper.emit.bind(swiper) 17758 }); 17759 }); 17760 17761 // Extend defaults with modules params 17762 const swiperParams = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)({}, defaults, allModulesParams); 17763 17764 // Extend defaults with passed params 17765 swiper.params = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)({}, swiperParams, extendedDefaults, params); 17766 swiper.originalParams = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)({}, swiper.params); 17767 swiper.passedParams = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)({}, params); 17768 17769 // add event listeners 17770 if (swiper.params && swiper.params.on) { 17771 Object.keys(swiper.params.on).forEach(eventName => { 17772 swiper.on(eventName, swiper.params.on[eventName]); 17773 }); 17774 } 17775 if (swiper.params && swiper.params.onAny) { 17776 swiper.onAny(swiper.params.onAny); 17777 } 17778 17779 // Extend Swiper 17780 Object.assign(swiper, { 17781 enabled: swiper.params.enabled, 17782 el, 17783 // Classes 17784 classNames: [], 17785 // Slides 17786 slides: [], 17787 slidesGrid: [], 17788 snapGrid: [], 17789 slidesSizesGrid: [], 17790 // isDirection 17791 isHorizontal() { 17792 return swiper.params.direction === 'horizontal'; 17793 }, 17794 isVertical() { 17795 return swiper.params.direction === 'vertical'; 17796 }, 17797 // Indexes 17798 activeIndex: 0, 17799 realIndex: 0, 17800 // 17801 isBeginning: true, 17802 isEnd: false, 17803 // Props 17804 translate: 0, 17805 previousTranslate: 0, 17806 progress: 0, 17807 velocity: 0, 17808 animating: false, 17809 cssOverflowAdjustment() { 17810 // Returns 0 unless `translate` is > 2**23 17811 // Should be subtracted from css values to prevent overflow 17812 return Math.trunc(this.translate / 2 ** 23) * 2 ** 23; 17813 }, 17814 // Locks 17815 allowSlideNext: swiper.params.allowSlideNext, 17816 allowSlidePrev: swiper.params.allowSlidePrev, 17817 // Touch Events 17818 touchEventsData: { 17819 isTouched: undefined, 17820 isMoved: undefined, 17821 allowTouchCallbacks: undefined, 17822 touchStartTime: undefined, 17823 isScrolling: undefined, 17824 currentTranslate: undefined, 17825 startTranslate: undefined, 17826 allowThresholdMove: undefined, 17827 // Form elements to match 17828 focusableElements: swiper.params.focusableElements, 17829 // Last click time 17830 lastClickTime: 0, 17831 clickTimeout: undefined, 17832 // Velocities 17833 velocities: [], 17834 allowMomentumBounce: undefined, 17835 startMoving: undefined, 17836 pointerId: null, 17837 touchId: null 17838 }, 17839 // Clicks 17840 allowClick: true, 17841 // Touches 17842 allowTouchMove: swiper.params.allowTouchMove, 17843 touches: { 17844 startX: 0, 17845 startY: 0, 17846 currentX: 0, 17847 currentY: 0, 17848 diff: 0 17849 }, 17850 // Images 17851 imagesToLoad: [], 17852 imagesLoaded: 0 17853 }); 17854 swiper.emit('_swiper'); 17855 17856 // Init 17857 if (swiper.params.init) { 17858 swiper.init(); 17859 } 17860 17861 // Return app instance 17862 // eslint-disable-next-line no-constructor-return 17863 return swiper; 17864 } 17865 getDirectionLabel(property) { 17866 if (this.isHorizontal()) { 17867 return property; 17868 } 17869 // prettier-ignore 17870 return { 17871 'width': 'height', 17872 'margin-top': 'margin-left', 17873 'margin-bottom ': 'margin-right', 17874 'margin-left': 'margin-top', 17875 'margin-right': 'margin-bottom', 17876 'padding-left': 'padding-top', 17877 'padding-right': 'padding-bottom', 17878 'marginRight': 'marginBottom' 17879 }[property]; 17880 } 17881 getSlideIndex(slideEl) { 17882 const { 17883 slidesEl, 17884 params 17885 } = this; 17886 const slides = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `.${params.slideClass}, swiper-slide`); 17887 const firstSlideIndex = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.g)(slides[0]); 17888 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.g)(slideEl) - firstSlideIndex; 17889 } 17890 getSlideIndexByData(index) { 17891 return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]); 17892 } 17893 recalcSlides() { 17894 const swiper = this; 17895 const { 17896 slidesEl, 17897 params 17898 } = swiper; 17899 swiper.slides = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(slidesEl, `.${params.slideClass}, swiper-slide`); 17900 } 17901 enable() { 17902 const swiper = this; 17903 if (swiper.enabled) return; 17904 swiper.enabled = true; 17905 if (swiper.params.grabCursor) { 17906 swiper.setGrabCursor(); 17907 } 17908 swiper.emit('enable'); 17909 } 17910 disable() { 17911 const swiper = this; 17912 if (!swiper.enabled) return; 17913 swiper.enabled = false; 17914 if (swiper.params.grabCursor) { 17915 swiper.unsetGrabCursor(); 17916 } 17917 swiper.emit('disable'); 17918 } 17919 setProgress(progress, speed) { 17920 const swiper = this; 17921 progress = Math.min(Math.max(progress, 0), 1); 17922 const min = swiper.minTranslate(); 17923 const max = swiper.maxTranslate(); 17924 const current = (max - min) * progress + min; 17925 swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed); 17926 swiper.updateActiveIndex(); 17927 swiper.updateSlidesClasses(); 17928 } 17929 emitContainerClasses() { 17930 const swiper = this; 17931 if (!swiper.params._emitClasses || !swiper.el) return; 17932 const cls = swiper.el.className.split(' ').filter(className => { 17933 return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; 17934 }); 17935 swiper.emit('_containerClasses', cls.join(' ')); 17936 } 17937 getSlideClasses(slideEl) { 17938 const swiper = this; 17939 if (swiper.destroyed) return ''; 17940 return slideEl.className.split(' ').filter(className => { 17941 return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0; 17942 }).join(' '); 17943 } 17944 emitSlidesClasses() { 17945 const swiper = this; 17946 if (!swiper.params._emitClasses || !swiper.el) return; 17947 const updates = []; 17948 swiper.slides.forEach(slideEl => { 17949 const classNames = swiper.getSlideClasses(slideEl); 17950 updates.push({ 17951 slideEl, 17952 classNames 17953 }); 17954 swiper.emit('_slideClass', slideEl, classNames); 17955 }); 17956 swiper.emit('_slideClasses', updates); 17957 } 17958 slidesPerViewDynamic(view, exact) { 17959 if (view === void 0) { 17960 view = 'current'; 17961 } 17962 if (exact === void 0) { 17963 exact = false; 17964 } 17965 const swiper = this; 17966 const { 17967 params, 17968 slides, 17969 slidesGrid, 17970 slidesSizesGrid, 17971 size: swiperSize, 17972 activeIndex 17973 } = swiper; 17974 let spv = 1; 17975 if (typeof params.slidesPerView === 'number') return params.slidesPerView; 17976 if (params.centeredSlides) { 17977 let slideSize = slides[activeIndex] ? slides[activeIndex].swiperSlideSize : 0; 17978 let breakLoop; 17979 for (let i = activeIndex + 1; i < slides.length; i += 1) { 17980 if (slides[i] && !breakLoop) { 17981 slideSize += slides[i].swiperSlideSize; 17982 spv += 1; 17983 if (slideSize > swiperSize) breakLoop = true; 17984 } 17985 } 17986 for (let i = activeIndex - 1; i >= 0; i -= 1) { 17987 if (slides[i] && !breakLoop) { 17988 slideSize += slides[i].swiperSlideSize; 17989 spv += 1; 17990 if (slideSize > swiperSize) breakLoop = true; 17991 } 17992 } 17993 } else { 17994 // eslint-disable-next-line 17995 if (view === 'current') { 17996 for (let i = activeIndex + 1; i < slides.length; i += 1) { 17997 const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; 17998 if (slideInView) { 17999 spv += 1; 18000 } 18001 } 18002 } else { 18003 // previous 18004 for (let i = activeIndex - 1; i >= 0; i -= 1) { 18005 const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; 18006 if (slideInView) { 18007 spv += 1; 18008 } 18009 } 18010 } 18011 } 18012 return spv; 18013 } 18014 update() { 18015 const swiper = this; 18016 if (!swiper || swiper.destroyed) return; 18017 const { 18018 snapGrid, 18019 params 18020 } = swiper; 18021 // Breakpoints 18022 if (params.breakpoints) { 18023 swiper.setBreakpoint(); 18024 } 18025 [...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => { 18026 if (imageEl.complete) { 18027 processLazyPreloader(swiper, imageEl); 18028 } 18029 }); 18030 swiper.updateSize(); 18031 swiper.updateSlides(); 18032 swiper.updateProgress(); 18033 swiper.updateSlidesClasses(); 18034 function setTranslate() { 18035 const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 18036 const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 18037 swiper.setTranslate(newTranslate); 18038 swiper.updateActiveIndex(); 18039 swiper.updateSlidesClasses(); 18040 } 18041 let translated; 18042 if (params.freeMode && params.freeMode.enabled && !params.cssMode) { 18043 setTranslate(); 18044 if (params.autoHeight) { 18045 swiper.updateAutoHeight(); 18046 } 18047 } else { 18048 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) { 18049 const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides; 18050 translated = swiper.slideTo(slides.length - 1, 0, false, true); 18051 } else { 18052 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 18053 } 18054 if (!translated) { 18055 setTranslate(); 18056 } 18057 } 18058 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 18059 swiper.checkOverflow(); 18060 } 18061 swiper.emit('update'); 18062 } 18063 changeDirection(newDirection, needUpdate) { 18064 if (needUpdate === void 0) { 18065 needUpdate = true; 18066 } 18067 const swiper = this; 18068 const currentDirection = swiper.params.direction; 18069 if (!newDirection) { 18070 // eslint-disable-next-line 18071 newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; 18072 } 18073 if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { 18074 return swiper; 18075 } 18076 swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`); 18077 swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`); 18078 swiper.emitContainerClasses(); 18079 swiper.params.direction = newDirection; 18080 swiper.slides.forEach(slideEl => { 18081 if (newDirection === 'vertical') { 18082 slideEl.style.width = ''; 18083 } else { 18084 slideEl.style.height = ''; 18085 } 18086 }); 18087 swiper.emit('changeDirection'); 18088 if (needUpdate) swiper.update(); 18089 return swiper; 18090 } 18091 changeLanguageDirection(direction) { 18092 const swiper = this; 18093 if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return; 18094 swiper.rtl = direction === 'rtl'; 18095 swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl; 18096 if (swiper.rtl) { 18097 swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`); 18098 swiper.el.dir = 'rtl'; 18099 } else { 18100 swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`); 18101 swiper.el.dir = 'ltr'; 18102 } 18103 swiper.update(); 18104 } 18105 mount(element) { 18106 const swiper = this; 18107 if (swiper.mounted) return true; 18108 18109 // Find el 18110 let el = element || swiper.params.el; 18111 if (typeof el === 'string') { 18112 el = document.querySelector(el); 18113 } 18114 if (!el) { 18115 return false; 18116 } 18117 el.swiper = swiper; 18118 if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === 'SWIPER-CONTAINER') { 18119 swiper.isElement = true; 18120 } 18121 const getWrapperSelector = () => { 18122 return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`; 18123 }; 18124 const getWrapper = () => { 18125 if (el && el.shadowRoot && el.shadowRoot.querySelector) { 18126 const res = el.shadowRoot.querySelector(getWrapperSelector()); 18127 // Children needs to return slot items 18128 return res; 18129 } 18130 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(el, getWrapperSelector())[0]; 18131 }; 18132 // Find Wrapper 18133 let wrapperEl = getWrapper(); 18134 if (!wrapperEl && swiper.params.createElements) { 18135 wrapperEl = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.c)('div', swiper.params.wrapperClass); 18136 el.append(wrapperEl); 18137 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.e)(el, `.${swiper.params.slideClass}`).forEach(slideEl => { 18138 wrapperEl.append(slideEl); 18139 }); 18140 } 18141 Object.assign(swiper, { 18142 el, 18143 wrapperEl, 18144 slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl, 18145 hostEl: swiper.isElement ? el.parentNode.host : el, 18146 mounted: true, 18147 // RTL 18148 rtl: el.dir.toLowerCase() === 'rtl' || (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(el, 'direction') === 'rtl', 18149 rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(el, 'direction') === 'rtl'), 18150 wrongRTL: (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.m)(wrapperEl, 'display') === '-webkit-box' 18151 }); 18152 return true; 18153 } 18154 init(el) { 18155 const swiper = this; 18156 if (swiper.initialized) return swiper; 18157 const mounted = swiper.mount(el); 18158 if (mounted === false) return swiper; 18159 swiper.emit('beforeInit'); 18160 18161 // Set breakpoint 18162 if (swiper.params.breakpoints) { 18163 swiper.setBreakpoint(); 18164 } 18165 18166 // Add Classes 18167 swiper.addClasses(); 18168 18169 // Update size 18170 swiper.updateSize(); 18171 18172 // Update slides 18173 swiper.updateSlides(); 18174 if (swiper.params.watchOverflow) { 18175 swiper.checkOverflow(); 18176 } 18177 18178 // Set Grab Cursor 18179 if (swiper.params.grabCursor && swiper.enabled) { 18180 swiper.setGrabCursor(); 18181 } 18182 18183 // Slide To Initial Slide 18184 if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) { 18185 swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true); 18186 } else { 18187 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); 18188 } 18189 18190 // Create loop 18191 if (swiper.params.loop) { 18192 swiper.loopCreate(); 18193 } 18194 18195 // Attach events 18196 swiper.attachEvents(); 18197 const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')]; 18198 if (swiper.isElement) { 18199 lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]')); 18200 } 18201 lazyElements.forEach(imageEl => { 18202 if (imageEl.complete) { 18203 processLazyPreloader(swiper, imageEl); 18204 } else { 18205 imageEl.addEventListener('load', e => { 18206 processLazyPreloader(swiper, e.target); 18207 }); 18208 } 18209 }); 18210 preload(swiper); 18211 18212 // Init Flag 18213 swiper.initialized = true; 18214 preload(swiper); 18215 18216 // Emit 18217 swiper.emit('init'); 18218 swiper.emit('afterInit'); 18219 return swiper; 18220 } 18221 destroy(deleteInstance, cleanStyles) { 18222 if (deleteInstance === void 0) { 18223 deleteInstance = true; 18224 } 18225 if (cleanStyles === void 0) { 18226 cleanStyles = true; 18227 } 18228 const swiper = this; 18229 const { 18230 params, 18231 el, 18232 wrapperEl, 18233 slides 18234 } = swiper; 18235 if (typeof swiper.params === 'undefined' || swiper.destroyed) { 18236 return null; 18237 } 18238 swiper.emit('beforeDestroy'); 18239 18240 // Init Flag 18241 swiper.initialized = false; 18242 18243 // Detach events 18244 swiper.detachEvents(); 18245 18246 // Destroy loop 18247 if (params.loop) { 18248 swiper.loopDestroy(); 18249 } 18250 18251 // Cleanup styles 18252 if (cleanStyles) { 18253 swiper.removeClasses(); 18254 el.removeAttribute('style'); 18255 wrapperEl.removeAttribute('style'); 18256 if (slides && slides.length) { 18257 slides.forEach(slideEl => { 18258 slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass); 18259 slideEl.removeAttribute('style'); 18260 slideEl.removeAttribute('data-swiper-slide-index'); 18261 }); 18262 } 18263 } 18264 swiper.emit('destroy'); 18265 18266 // Detach emitter events 18267 Object.keys(swiper.eventsListeners).forEach(eventName => { 18268 swiper.off(eventName); 18269 }); 18270 if (deleteInstance !== false) { 18271 swiper.el.swiper = null; 18272 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.u)(swiper); 18273 } 18274 swiper.destroyed = true; 18275 return null; 18276 } 18277 static extendDefaults(newDefaults) { 18278 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.t)(extendedDefaults, newDefaults); 18279 } 18280 static get extendedDefaults() { 18281 return extendedDefaults; 18282 } 18283 static get defaults() { 18284 return defaults; 18285 } 18286 static installModule(mod) { 18287 if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = []; 18288 const modules = Swiper.prototype.__modules__; 18289 if (typeof mod === 'function' && modules.indexOf(mod) < 0) { 18290 modules.push(mod); 18291 } 18292 } 18293 static use(module) { 18294 if (Array.isArray(module)) { 18295 module.forEach(m => Swiper.installModule(m)); 18296 return Swiper; 18297 } 18298 Swiper.installModule(module); 18299 return Swiper; 18300 } 18301} 18302Object.keys(prototypes).forEach(prototypeGroup => { 18303 Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => { 18304 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 18305 }); 18306}); 18307Swiper.use([Resize, Observer]); 18308 18309 18310 18311 18312/***/ }), 18313
vendor: 11,471 bytes, lines 18314-18638
18314/***/ "./node_modules/swiper/shared/utils.mjs": 18315/*!**********************************************!*\ 18316 !*** ./node_modules/swiper/shared/utils.mjs ***! 18317 \**********************************************/ 18318/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 18319 18320"use strict"; 18321__webpack_require__.r(__webpack_exports__); 18322/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18323/* harmony export */ a: () => (/* binding */ elementParents), 18324/* harmony export */ b: () => (/* binding */ elementOffset), 18325/* harmony export */ c: () => (/* binding */ createElement), 18326/* harmony export */ d: () => (/* binding */ now), 18327/* harmony export */ e: () => (/* binding */ elementChildren), 18328/* harmony export */ f: () => (/* binding */ elementOuterSize), 18329/* harmony export */ g: () => (/* binding */ elementIndex), 18330/* harmony export */ h: () => (/* binding */ classesToTokens), 18331/* harmony export */ i: () => (/* binding */ getTranslate), 18332/* harmony export */ j: () => (/* binding */ elementTransitionEnd), 18333/* harmony export */ k: () => (/* binding */ isObject), 18334/* harmony export */ l: () => (/* binding */ getSlideTransformEl), 18335/* harmony export */ m: () => (/* binding */ elementStyle), 18336/* harmony export */ n: () => (/* binding */ nextTick), 18337/* harmony export */ o: () => (/* binding */ elementNextAll), 18338/* harmony export */ p: () => (/* binding */ elementPrevAll), 18339/* harmony export */ q: () => (/* binding */ animateCSSModeScroll), 18340/* harmony export */ r: () => (/* binding */ showWarning), 18341/* harmony export */ s: () => (/* binding */ setCSSProperty), 18342/* harmony export */ t: () => (/* binding */ extend), 18343/* harmony export */ u: () => (/* binding */ deleteProps) 18344/* harmony export */ }); 18345/* harmony import */ var _ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ssr-window.esm.mjs */ "./node_modules/swiper/shared/ssr-window.esm.mjs"); 18346 18347 18348function classesToTokens(classes) { 18349 if (classes === void 0) { 18350 classes = ''; 18351 } 18352 return classes.trim().split(' ').filter(c => !!c.trim()); 18353} 18354 18355function deleteProps(obj) { 18356 const object = obj; 18357 Object.keys(object).forEach(key => { 18358 try { 18359 object[key] = null; 18360 } catch (e) { 18361 // no getter for object 18362 } 18363 try { 18364 delete object[key]; 18365 } catch (e) { 18366 // something got wrong 18367 } 18368 }); 18369} 18370function nextTick(callback, delay) { 18371 if (delay === void 0) { 18372 delay = 0; 18373 } 18374 return setTimeout(callback, delay); 18375} 18376function now() { 18377 return Date.now(); 18378} 18379function getComputedStyle(el) { 18380 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 18381 let style; 18382 if (window.getComputedStyle) { 18383 style = window.getComputedStyle(el, null); 18384 } 18385 if (!style && el.currentStyle) { 18386 style = el.currentStyle; 18387 } 18388 if (!style) { 18389 style = el.style; 18390 } 18391 return style; 18392} 18393function getTranslate(el, axis) { 18394 if (axis === void 0) { 18395 axis = 'x'; 18396 } 18397 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 18398 let matrix; 18399 let curTransform; 18400 let transformMatrix; 18401 const curStyle = getComputedStyle(el); 18402 if (window.WebKitCSSMatrix) { 18403 curTransform = curStyle.transform || curStyle.webkitTransform; 18404 if (curTransform.split(',').length > 6) { 18405 curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); 18406 } 18407 // Some old versions of Webkit choke when 'none' is passed; pass 18408 // empty string instead in this case 18409 transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); 18410 } else { 18411 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); 18412 matrix = transformMatrix.toString().split(','); 18413 } 18414 if (axis === 'x') { 18415 // Latest Chrome and webkits Fix 18416 if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; 18417 // Crazy IE10 Matrix 18418 else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); 18419 // Normal Browsers 18420 else curTransform = parseFloat(matrix[4]); 18421 } 18422 if (axis === 'y') { 18423 // Latest Chrome and webkits Fix 18424 if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; 18425 // Crazy IE10 Matrix 18426 else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); 18427 // Normal Browsers 18428 else curTransform = parseFloat(matrix[5]); 18429 } 18430 return curTransform || 0; 18431} 18432function isObject(o) { 18433 return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object'; 18434} 18435function isNode(node) { 18436 // eslint-disable-next-line 18437 if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { 18438 return node instanceof HTMLElement; 18439 } 18440 return node && (node.nodeType === 1 || node.nodeType === 11); 18441} 18442function extend() { 18443 const to = Object(arguments.length <= 0 ? undefined : arguments[0]); 18444 const noExtend = ['__proto__', 'constructor', 'prototype']; 18445 for (let i = 1; i < arguments.length; i += 1) { 18446 const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i]; 18447 if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) { 18448 const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0); 18449 for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 18450 const nextKey = keysArray[nextIndex]; 18451 const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 18452 if (desc !== undefined && desc.enumerable) { 18453 if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) { 18454 if (nextSource[nextKey].__swiper__) { 18455 to[nextKey] = nextSource[nextKey]; 18456 } else { 18457 extend(to[nextKey], nextSource[nextKey]); 18458 } 18459 } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) { 18460 to[nextKey] = {}; 18461 if (nextSource[nextKey].__swiper__) { 18462 to[nextKey] = nextSource[nextKey]; 18463 } else { 18464 extend(to[nextKey], nextSource[nextKey]); 18465 } 18466 } else { 18467 to[nextKey] = nextSource[nextKey]; 18468 } 18469 } 18470 } 18471 } 18472 } 18473 return to; 18474} 18475function setCSSProperty(el, varName, varValue) { 18476 el.style.setProperty(varName, varValue); 18477} 18478function animateCSSModeScroll(_ref) { 18479 let { 18480 swiper, 18481 targetPosition, 18482 side 18483 } = _ref; 18484 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 18485 const startPosition = -swiper.translate; 18486 let startTime = null; 18487 let time; 18488 const duration = swiper.params.speed; 18489 swiper.wrapperEl.style.scrollSnapType = 'none'; 18490 window.cancelAnimationFrame(swiper.cssModeFrameID); 18491 const dir = targetPosition > startPosition ? 'next' : 'prev'; 18492 const isOutOfBound = (current, target) => { 18493 return dir === 'next' && current >= target || dir === 'prev' && current <= target; 18494 }; 18495 const animate = () => { 18496 time = new Date().getTime(); 18497 if (startTime === null) { 18498 startTime = time; 18499 } 18500 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 18501 const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; 18502 let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); 18503 if (isOutOfBound(currentPosition, targetPosition)) { 18504 currentPosition = targetPosition; 18505 } 18506 swiper.wrapperEl.scrollTo({ 18507 [side]: currentPosition 18508 }); 18509 if (isOutOfBound(currentPosition, targetPosition)) { 18510 swiper.wrapperEl.style.overflow = 'hidden'; 18511 swiper.wrapperEl.style.scrollSnapType = ''; 18512 setTimeout(() => { 18513 swiper.wrapperEl.style.overflow = ''; 18514 swiper.wrapperEl.scrollTo({ 18515 [side]: currentPosition 18516 }); 18517 }); 18518 window.cancelAnimationFrame(swiper.cssModeFrameID); 18519 return; 18520 } 18521 swiper.cssModeFrameID = window.requestAnimationFrame(animate); 18522 }; 18523 animate(); 18524} 18525function getSlideTransformEl(slideEl) { 18526 return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl; 18527} 18528function elementChildren(element, selector) { 18529 if (selector === void 0) { 18530 selector = ''; 18531 } 18532 return [...element.children].filter(el => el.matches(selector)); 18533} 18534function showWarning(text) { 18535 try { 18536 console.warn(text); 18537 return; 18538 } catch (err) { 18539 // err 18540 } 18541} 18542function createElement(tag, classes) { 18543 if (classes === void 0) { 18544 classes = []; 18545 } 18546 const el = document.createElement(tag); 18547 el.classList.add(...(Array.isArray(classes) ? classes : classesToTokens(classes))); 18548 return el; 18549} 18550function elementOffset(el) { 18551 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 18552 const document = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.g)(); 18553 const box = el.getBoundingClientRect(); 18554 const body = document.body; 18555 const clientTop = el.clientTop || body.clientTop || 0; 18556 const clientLeft = el.clientLeft || body.clientLeft || 0; 18557 const scrollTop = el === window ? window.scrollY : el.scrollTop; 18558 const scrollLeft = el === window ? window.scrollX : el.scrollLeft; 18559 return { 18560 top: box.top + scrollTop - clientTop, 18561 left: box.left + scrollLeft - clientLeft 18562 }; 18563} 18564function elementPrevAll(el, selector) { 18565 const prevEls = []; 18566 while (el.previousElementSibling) { 18567 const prev = el.previousElementSibling; // eslint-disable-line 18568 if (selector) { 18569 if (prev.matches(selector)) prevEls.push(prev); 18570 } else prevEls.push(prev); 18571 el = prev; 18572 } 18573 return prevEls; 18574} 18575function elementNextAll(el, selector) { 18576 const nextEls = []; 18577 while (el.nextElementSibling) { 18578 const next = el.nextElementSibling; // eslint-disable-line 18579 if (selector) { 18580 if (next.matches(selector)) nextEls.push(next); 18581 } else nextEls.push(next); 18582 el = next; 18583 } 18584 return nextEls; 18585} 18586function elementStyle(el, prop) { 18587 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 18588 return window.getComputedStyle(el, null).getPropertyValue(prop); 18589} 18590function elementIndex(el) { 18591 let child = el; 18592 let i; 18593 if (child) { 18594 i = 0; 18595 // eslint-disable-next-line 18596 while ((child = child.previousSibling) !== null) { 18597 if (child.nodeType === 1) i += 1; 18598 } 18599 return i; 18600 } 18601 return undefined; 18602} 18603function elementParents(el, selector) { 18604 const parents = []; // eslint-disable-line 18605 let parent = el.parentElement; // eslint-disable-line 18606 while (parent) { 18607 if (selector) { 18608 if (parent.matches(selector)) parents.push(parent); 18609 } else { 18610 parents.push(parent); 18611 } 18612 parent = parent.parentElement; 18613 } 18614 return parents; 18615} 18616function elementTransitionEnd(el, callback) { 18617 function fireCallBack(e) { 18618 if (e.target !== el) return; 18619 callback.call(el, e); 18620 el.removeEventListener('transitionend', fireCallBack); 18621 } 18622 if (callback) { 18623 el.addEventListener('transitionend', fireCallBack); 18624 } 18625} 18626function elementOuterSize(el, size, includeMargins) { 18627 const window = (0,_ssr_window_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.a)(); 18628 if (includeMargins) { 18629 return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom')); 18630 } 18631 return el.offsetWidth; 18632} 18633 18634 18635 18636 18637/***/ }), 18638
vendor: 6,897 bytes, lines 18639-18720
18639/***/ "./node_modules/swiper/swiper-bundle.mjs": 18640/*!***********************************************!*\ 18641 !*** ./node_modules/swiper/swiper-bundle.mjs ***! 18642 \***********************************************/ 18643/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 18644 18645"use strict"; 18646__webpack_require__.r(__webpack_exports__); 18647/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18648/* harmony export */ Swiper: () => (/* reexport safe */ _shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__.S), 18649/* harmony export */ "default": () => (/* reexport safe */ _shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__.S) 18650/* harmony export */ }); 18651/* harmony import */ var _shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shared/swiper-core.mjs */ "./node_modules/swiper/shared/swiper-core.mjs"); 18652/* harmony import */ var _modules_virtual_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/virtual.mjs */ "./node_modules/swiper/modules/virtual.mjs"); 18653/* harmony import */ var _modules_keyboard_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/keyboard.mjs */ "./node_modules/swiper/modules/keyboard.mjs"); 18654/* harmony import */ var _modules_mousewheel_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/mousewheel.mjs */ "./node_modules/swiper/modules/mousewheel.mjs"); 18655/* harmony import */ var _modules_navigation_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/navigation.mjs */ "./node_modules/swiper/modules/navigation.mjs"); 18656/* harmony import */ var _modules_pagination_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/pagination.mjs */ "./node_modules/swiper/modules/pagination.mjs"); 18657/* harmony import */ var _modules_scrollbar_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/scrollbar.mjs */ "./node_modules/swiper/modules/scrollbar.mjs"); 18658/* harmony import */ var _modules_parallax_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/parallax.mjs */ "./node_modules/swiper/modules/parallax.mjs"); 18659/* harmony import */ var _modules_zoom_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/zoom.mjs */ "./node_modules/swiper/modules/zoom.mjs"); 18660/* harmony import */ var _modules_controller_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/controller.mjs */ "./node_modules/swiper/modules/controller.mjs"); 18661/* harmony import */ var _modules_a11y_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/a11y.mjs */ "./node_modules/swiper/modules/a11y.mjs"); 18662/* harmony import */ var _modules_history_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/history.mjs */ "./node_modules/swiper/modules/history.mjs"); 18663/* harmony import */ var _modules_hash_navigation_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/hash-navigation.mjs */ "./node_modules/swiper/modules/hash-navigation.mjs"); 18664/* harmony import */ var _modules_autoplay_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/autoplay.mjs */ "./node_modules/swiper/modules/autoplay.mjs"); 18665/* harmony import */ var _modules_thumbs_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./modules/thumbs.mjs */ "./node_modules/swiper/modules/thumbs.mjs"); 18666/* harmony import */ var _modules_free_mode_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./modules/free-mode.mjs */ "./node_modules/swiper/modules/free-mode.mjs"); 18667/* harmony import */ var _modules_grid_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./modules/grid.mjs */ "./node_modules/swiper/modules/grid.mjs"); 18668/* harmony import */ var _modules_manipulation_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./modules/manipulation.mjs */ "./node_modules/swiper/modules/manipulation.mjs"); 18669/* harmony import */ var _modules_effect_fade_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./modules/effect-fade.mjs */ "./node_modules/swiper/modules/effect-fade.mjs"); 18670/* harmony import */ var _modules_effect_cube_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./modules/effect-cube.mjs */ "./node_modules/swiper/modules/effect-cube.mjs"); 18671/* harmony import */ var _modules_effect_flip_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./modules/effect-flip.mjs */ "./node_modules/swiper/modules/effect-flip.mjs"); 18672/* harmony import */ var _modules_effect_coverflow_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./modules/effect-coverflow.mjs */ "./node_modules/swiper/modules/effect-coverflow.mjs"); 18673/* harmony import */ var _modules_effect_creative_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./modules/effect-creative.mjs */ "./node_modules/swiper/modules/effect-creative.mjs"); 18674/* harmony import */ var _modules_effect_cards_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./modules/effect-cards.mjs */ "./node_modules/swiper/modules/effect-cards.mjs"); 18675/** 18676 * Swiper 11.0.5 18677 * Most modern mobile touch slider and framework with hardware accelerated transitions 18678 * https://swiperjs.com 18679 * 18680 * Copyright 2014-2023 Vladimir Kharlampidi 18681 * 18682 * Released under the MIT License 18683 * 18684 * Released on: November 22, 2023 18685 */ 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712// Swiper Class 18713const modules = [_modules_virtual_mjs__WEBPACK_IMPORTED_MODULE_1__["default"], _modules_keyboard_mjs__WEBPACK_IMPORTED_MODULE_2__["default"], _modules_mousewheel_mjs__WEBPACK_IMPORTED_MODULE_3__["default"], _modules_navigation_mjs__WEBPACK_IMPORTED_MODULE_4__["default"], _modules_pagination_mjs__WEBPACK_IMPORTED_MODULE_5__["default"], _modules_scrollbar_mjs__WEBPACK_IMPORTED_MODULE_6__["default"], _modules_parallax_mjs__WEBPACK_IMPORTED_MODULE_7__["default"], _modules_zoom_mjs__WEBPACK_IMPORTED_MODULE_8__["default"], _modules_controller_mjs__WEBPACK_IMPORTED_MODULE_9__["default"], _modules_a11y_mjs__WEBPACK_IMPORTED_MODULE_10__["default"], _modules_history_mjs__WEBPACK_IMPORTED_MODULE_11__["default"], _modules_hash_navigation_mjs__WEBPACK_IMPORTED_MODULE_12__["default"], _modules_autoplay_mjs__WEBPACK_IMPORTED_MODULE_13__["default"], _modules_thumbs_mjs__WEBPACK_IMPORTED_MODULE_14__["default"], _modules_free_mode_mjs__WEBPACK_IMPORTED_MODULE_15__["default"], _modules_grid_mjs__WEBPACK_IMPORTED_MODULE_16__["default"], _modules_manipulation_mjs__WEBPACK_IMPORTED_MODULE_17__["default"], _modules_effect_fade_mjs__WEBPACK_IMPORTED_MODULE_18__["default"], _modules_effect_cube_mjs__WEBPACK_IMPORTED_MODULE_19__["default"], _modules_effect_flip_mjs__WEBPACK_IMPORTED_MODULE_20__["default"], _modules_effect_coverflow_mjs__WEBPACK_IMPORTED_MODULE_21__["default"], _modules_effect_creative_mjs__WEBPACK_IMPORTED_MODULE_22__["default"], _modules_effect_cards_mjs__WEBPACK_IMPORTED_MODULE_23__["default"]]; 18714_shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__.S.use(modules); 18715 18716 18717 18718 18719/***/ }), 18720
vendor: 1,103 bytes, lines 18721-18749
18721/***/ "./node_modules/swiper/swiper.mjs": 18722/*!****************************************!*\ 18723 !*** ./node_modules/swiper/swiper.mjs ***! 18724 \****************************************/ 18725/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 18726 18727"use strict"; 18728__webpack_require__.r(__webpack_exports__); 18729/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18730/* harmony export */ Swiper: () => (/* reexport safe */ _shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__.S), 18731/* harmony export */ "default": () => (/* reexport safe */ _shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__.S) 18732/* harmony export */ }); 18733/* harmony import */ var _shared_swiper_core_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shared/swiper-core.mjs */ "./node_modules/swiper/shared/swiper-core.mjs"); 18734/** 18735 * Swiper 11.0.5 18736 * Most modern mobile touch slider and framework with hardware accelerated transitions 18737 * https://swiperjs.com 18738 * 18739 * Copyright 2014-2023 Vladimir Kharlampidi 18740 * 18741 * Released under the MIT License 18742 * 18743 * Released on: November 22, 2023 18744 */ 18745 18746 18747 18748 18749/***/ })
vendor: 7,087 bytes, lines 18749-18922
18749 18750 18751/******/ }); 18752/************************************************************************/ 18753/******/ // The module cache 18754/******/ var __webpack_module_cache__ = {}; 18755/******/ 18756/******/ // The require function 18757/******/ function __webpack_require__(moduleId) { 18758/******/ // Check if module is in cache 18759/******/ var cachedModule = __webpack_module_cache__[moduleId]; 18760/******/ if (cachedModule !== undefined) { 18761/******/ return cachedModule.exports; 18762/******/ } 18763/******/ // Create a new module (and put it into the cache) 18764/******/ var module = __webpack_module_cache__[moduleId] = { 18765/******/ id: moduleId, 18766/******/ // no module.loaded needed 18767/******/ exports: {} 18768/******/ }; 18769/******/ 18770/******/ // Execute the module function 18771/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); 18772/******/ 18773/******/ // Return the exports of the module 18774/******/ return module.exports; 18775/******/ } 18776/******/ 18777/******/ // expose the modules object (__webpack_modules__) 18778/******/ __webpack_require__.m = __webpack_modules__; 18779/******/ 18780/************************************************************************/ 18781/******/ /* webpack/runtime/chunk loaded */ 18782/******/ (() => { 18783/******/ var deferred = []; 18784/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { 18785/******/ if(chunkIds) { 18786/******/ priority = priority || 0; 18787/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; 18788/******/ deferred[i] = [chunkIds, fn, priority]; 18789/******/ return; 18790/******/ } 18791/******/ var notFulfilled = Infinity; 18792/******/ for (var i = 0; i < deferred.length; i++) { 18793/******/ var [chunkIds, fn, priority] = deferred[i]; 18794/******/ var fulfilled = true; 18795/******/ for (var j = 0; j < chunkIds.length; j++) { 18796/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { 18797/******/ chunkIds.splice(j--, 1); 18798/******/ } else { 18799/******/ fulfilled = false; 18800/******/ if(priority < notFulfilled) notFulfilled = priority; 18801/******/ } 18802/******/ } 18803/******/ if(fulfilled) { 18804/******/ deferred.splice(i--, 1) 18805/******/ var r = fn(); 18806/******/ if (r !== undefined) result = r; 18807/******/ } 18808/******/ } 18809/******/ return result; 18810/******/ }; 18811/******/ })(); 18812/******/ 18813/******/ /* webpack/runtime/compat get default export */ 18814/******/ (() => { 18815/******/ // getDefaultExport function for compatibility with non-harmony modules 18816/******/ __webpack_require__.n = (module) => { 18817/******/ var getter = module && module.__esModule ? 18818/******/ () => (module['default']) : 18819/******/ () => (module); 18820/******/ __webpack_require__.d(getter, { a: getter }); 18821/******/ return getter; 18822/******/ }; 18823/******/ })(); 18824/******/ 18825/******/ /* webpack/runtime/define property getters */ 18826/******/ (() => { 18827/******/ // define getter functions for harmony exports 18828/******/ __webpack_require__.d = (exports, definition) => { 18829/******/ for(var key in definition) { 18830/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 18831/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 18832/******/ } 18833/******/ } 18834/******/ }; 18835/******/ })(); 18836/******/ 18837/******/ /* webpack/runtime/hasOwnProperty shorthand */ 18838/******/ (() => { 18839/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 18840/******/ })(); 18841/******/ 18842/******/ /* webpack/runtime/make namespace object */ 18843/******/ (() => { 18844/******/ // define __esModule on exports 18845/******/ __webpack_require__.r = (exports) => { 18846/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 18847/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 18848/******/ } 18849/******/ Object.defineProperty(exports, '__esModule', { value: true }); 18850/******/ }; 18851/******/ })(); 18852/******/ 18853/******/ /* webpack/runtime/jsonp chunk loading */ 18854/******/ (() => { 18855/******/ // no baseURI 18856/******/ 18857/******/ // object to store loaded and loading chunks 18858/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 18859/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded 18860/******/ var installedChunks = { 18861/******/ "/src/output/app": 0, 18862/******/ "src/output/app": 0 18863/******/ }; 18864/******/ 18865/******/ // no chunk on demand loading 18866/******/ 18867/******/ // no prefetching 18868/******/ 18869/******/ // no preloaded 18870/******/ 18871/******/ // no HMR 18872/******/ 18873/******/ // no HMR manifest 18874/******/ 18875/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); 18876/******/ 18877/******/ // install a JSONP callback for chunk loading 18878/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { 18879/******/ var [chunkIds, moreModules, runtime] = data; 18880/******/ // add "moreModules" to the modules object, 18881/******/ // then flag all "chunkIds" as loaded and fire callback 18882/******/ var moduleId, chunkId, i = 0; 18883/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { 18884/******/ for(moduleId in moreModules) { 18885/******/ if(__webpack_require__.o(moreModules, moduleId)) { 18886/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; 18887/******/ } 18888/******/ } 18889/******/ if(runtime) var result = runtime(__webpack_require__); 18890/******/ } 18891/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); 18892/******/ for(;i < chunkIds.length; i++) { 18893/******/ chunkId = chunkIds[i]; 18894/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { 18895/******/ installedChunks[chunkId][0](); 18896/******/ } 18897/******/ installedChunks[chunkId] = 0; 18898/******/ } 18899/******/ return __webpack_require__.O(result); 18900/******/ } 18901/******/ 18902/******/ var chunkLoadingGlobal = self["webpackChunkshopify_docker_environment"] = self["webpackChunkshopify_docker_environment"] || []; 18903/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); 18904/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); 18905/******/ })(); 18906/******/ 18907/******/ /* webpack/runtime/nonce */ 18908/******/ (() => { 18909/******/ __webpack_require__.nc = undefined; 18910/******/ })(); 18911/******/ 18912/************************************************************************/ 18913/******/ 18914/******/ // startup 18915/******/ // Load entry module and return exports 18916/******/ // This entry module depends on other loaded chunks and execution need to be delayed 18917/******/ __webpack_require__.O(undefined, ["src/output/app"], () => (__webpack_require__("./src/js/app.js"))) 18918/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["src/output/app"], () => (__webpack_require__("./src/scss/app.scss"))) 18919/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); 18920/******/ 18921/******/ })() 18922;
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.