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custom_components/components/testimonials/scripts/src/vendor/swiped-events.min.js","webpack://customtheme/./node_modules/@alexspirgel/children-loaded/src/index.js","webpack://customtheme/webpack/bootstrap","webpack://customtheme/../../modules/custom/esd_components/esd_custom_components/components/testimonials/scripts/src/global.js"],"sourcesContent":["/*!\n * swiped-events.js - v1.1.7\n * Pure JavaScript swipe events\n * https://github.com/john-doherty/swiped-events\n * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element\n * @author John Doherty \n * @license MIT\n */\n!function(t,e){\"use strict\";\"function\"!=typeof t.CustomEvent&&(t.CustomEvent=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent(\"CustomEvent\");return a.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),a},t.CustomEvent.prototype=t.Event.prototype),e.addEventListener(\"touchstart\",function(t){if(\"true\"===t.target.getAttribute(\"data-swipe-ignore\"))return;l=t.target,r=Date.now(),n=t.touches[0].clientX,a=t.touches[0].clientY,u=0,i=0},!1),e.addEventListener(\"touchmove\",function(t){if(!n||!a)return;var e=t.touches[0].clientX,r=t.touches[0].clientY;u=n-e,i=a-r},!1),e.addEventListener(\"touchend\",function(t){if(l!==t.target)return;var s=parseInt(o(l,\"data-swipe-threshold\",\"20\"),10),c=o(l,\"data-swipe-unit\",\"px\"),d=parseInt(o(l,\"data-swipe-timeout\",\"500\"),10),p=Date.now()-r,h=\"\",v=t.changedTouches||t.touches||[];\"vh\"===c&&(s=Math.round(s/100*e.documentElement.clientHeight));\"vw\"===c&&(s=Math.round(s/100*e.documentElement.clientWidth));Math.abs(u)>Math.abs(i)?Math.abs(u)>s&&p0?\"swiped-left\":\"swiped-right\"):Math.abs(i)>s&&p0?\"swiped-up\":\"swiped-down\");if(\"\"!==h){var b={dir:h.replace(/swiped-/,\"\"),touchType:(v[0]||{}).touchType||\"direct\",xStart:parseInt(n,10),xEnd:parseInt((v[0]||{}).clientX||-1,10),yStart:parseInt(a,10),yEnd:parseInt((v[0]||{}).clientY||-1,10)};l.dispatchEvent(new CustomEvent(\"swiped\",{bubbles:!0,cancelable:!0,detail:b})),l.dispatchEvent(new CustomEvent(h,{bubbles:!0,cancelable:!0,detail:b}))}n=null,a=null,r=null},!1);var n=null,a=null,u=null,i=null,r=null,l=null;function o(t,n,a){for(;t&&t!==e.documentElement;){var u=t.getAttribute(n);if(u)return u;t=t.parentNode}return a}}(window,document);","module.exports = (function () {\n\n\t// Initialize a weak map to hold promises.\n\tconst childrenLoadedPromises = new WeakMap();\n\n\t/**\n\t * Checks to see if children elements are loaded.\n\t * @param {object} element - Element to look for children within.\n\t * @return {boolean} Whether the children elements are loaded or not.\n\t */\n\n\tconst childrenLoadedSynchronous = (element) => {\n\n\t\t// Document ready states reference: https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState\n\t\tif (document.readyState === 'interactive' || document.readyState === 'complete') {\n\t\t\t// Children elements are assumed to be loaded.\n\t\t\treturn true;\n\t\t}\n\n\t\t// While the element exists.\n\t\twhile (element) {\n\t\t\t// If the next sibling element exists.\n\t\t\tif (element.nextSibling) {\n\t\t\t\t// The original passed element and its children have been loaded.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Set the element to the parent element.\n\t\t\telement = element.parentNode;\n\t\t}\n\n\t\t// If code execution gets here, it's assumed children elements are not loaded.\n\t\treturn false;\n\n\t};\n\n\t/**\n\t * An asynchronous wrapper for the childrenLoadedSynchronous function.\n\t * @param {object} element - Element to look for children within.\n\t * @param {boolean} [forceNewPromise=false] - Option to invalidate existing promises.\n\t * @return {*} True if children are loaded, otherwise a promise.\n\t */\n\n\tconst childrenLoaded = (element, forceNewPromise = false) => {\n\n\t\t// If children are loaded immediately.\n\t\tif (childrenLoadedSynchronous(element)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If an existing promise for the passed element does not exist yet or if a new promise is being forced.\n\t\telse if (!childrenLoadedPromises.get(element) || forceNewPromise) {\n\t\t\t// Create a new promise.\n\t\t\tconst childrenLoadedPromise = new Promise((resolve) => {\n\t\t\t\t// Create a new mutation observer.\n\t\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\t\t// When children are loaded.\n\t\t\t\t\tif (childrenLoadedSynchronous(element)) {\n\t\t\t\t\t\t// Disconnect the mutation observer.\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t// Resolve the promise.\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Watch for child element updates.\n\t\t\t\tobserver.observe(element, {\n\t\t\t\t\tchildList: true\n\t\t\t\t});\n\t\t\t});\n\t\t\t// Set the promise weak map entry for the passed element.\n\t\t\tchildrenLoadedPromises.set(element, childrenLoadedPromise);\n\t\t}\n\n\t\t// Return the promise for the passed element.\n\t\t// Multiple asynchronous calls of childrenLoaded for the same element should return the same promise.\n\t\treturn childrenLoadedPromises.get(element);\n\n\t};\n\n\t// Attach the synchronous function to the export for optional use.\n\tchildrenLoaded.synchronous = childrenLoadedSynchronous;\n\t// Add shorthand alias for synchronous.\n\tchildrenLoaded.sync = childrenLoaded.synchronous;\n\t// Return the asynchronous function as the export.\n\treturn childrenLoaded;\n\n})();","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const childrenLoaded = require('@alexspirgel/children-loaded');\nrequire('./vendor/swiped-events.min.js');\n\nclass ComponentTestimonials extends HTMLDivElement {\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tasync connectedCallback() {\n\t\tawait childrenLoaded(this);\n\t\tthis.initialize();\n\t}\n\n\tinitialize() {\n\n\t\tif (this.initialized) {\n\t\t\treturn;\n\t\t}\n\t\tthis.initialized = true;\n\n\t\tif (this.slideElements) {\n\t\t\tfor (let i = 0; i < this.slideElements.length; i++) {\n\t\t\t\tconst slideElement = this.slideElements[i];\n\t\t\t\tslideElement.setAttribute('data-slide-position', i + 1);\n\t\t\t}\n\t\t}\n\n\t\tif (this.previousSlideButtonElement) {\n\t\t\tthis.previousSlideButtonElement.addEventListener('click', this.previousSlide);\n\t\t}\n\t\tif (this.nextSlideButtonElement) {\n\t\t\tthis.nextSlideButtonElement.addEventListener('click', this.nextSlide);\n\t\t}\n\n\t\tif (this.slidesContainerElement) {\n\t\t\tthis.addEventListener('swiped', function(event) {\n\t\t\t\tif (event.detail.dir === 'left') {\n\t\t\t\t\tthis.nextSlide();\n\t\t\t\t}\n\t\t\t\tif (event.detail.dir === 'right') {\n\t\t\t\t\tthis.previousSlide();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tconsole.log(this);\n\n\t}\n\n\tget slidesContainerElement() {\n\t\treturn this.querySelector('.component-testimonials__testimonials');\n\t}\n\n\tget slideElements() {\n\t\treturn this.querySelectorAll('.component-testimonials__testimonial');\n\t}\n\n\tget previousSlideButtonElement() {\n\t\treturn this.querySelector('.component-testimonials__button-previous');\n\t}\n\n\tget nextSlideButtonElement() {\n\t\treturn this.querySelector('.component-testimonials__button-next');\n\t}\n\n\tget isSlider() {\n\t\tif (window.matchMedia('(max-width: 80rem)').matches) {\n\t\t\tif (this.slideElements.length > 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpreviousSlide = () => {\n\t\tif (this.isSlider) {\n\t\t\tfor (const slideElement of this.slideElements) {\n\t\t\t\tconst currentSlidePosition = parseInt(slideElement.getAttribute('data-slide-position'));\n\t\t\t\tslideElement.setAttribute('data-slide-direction', 'backward');\n\t\t\t\tif (currentSlidePosition >= this.slideElements.length) {\n\t\t\t\t\tslideElement.classList.add('transition-back-to-front');\n\t\t\t\t\tslideElement.setAttribute('data-slide-position', 1);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tslideElement.classList.remove('transition-back-to-front');\n\t\t\t\t\t}, 750);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tslideElement.setAttribute('data-slide-position', currentSlidePosition + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tnextSlide = () => {\n\t\tif (this.isSlider) {\n\t\t\tfor (const slideElement of this.slideElements) {\n\t\t\t\tconst currentSlidePosition = parseInt(slideElement.getAttribute('data-slide-position'));\n\t\t\t\tslideElement.setAttribute('data-slide-direction', 'forward');\n\t\t\t\tif (currentSlidePosition <= 1) {\n\t\t\t\t\tslideElement.classList.add('transition-front-to-back');\n\t\t\t\t\tslideElement.setAttribute('data-slide-position', this.slideElements.length);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tslideElement.classList.remove('transition-front-to-back');\n\t\t\t\t\t}, 750);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tslideElement.setAttribute('data-slide-position', currentSlidePosition - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}\n\ncustomElements.define('component-testimonials', ComponentTestimonials, {extends: 'div'});"],"names":["t","e","CustomEvent","n","bubbles","cancelable","detail","a","createEvent","initCustomEvent","prototype","Event","addEventListener","target","getAttribute","l","r","Date","now","touches","clientX","clientY","u","i","s","parseInt","o","c","d","p","h","v","changedTouches","Math","round","documentElement","clientHeight","clientWidth","abs","b","dir","replace","touchType","xStart","xEnd","yStart","yEnd","dispatchEvent","parentNode","window","document","module","exports","childrenLoadedPromises","WeakMap","childrenLoadedSynchronous","element","readyState","nextSibling","childrenLoaded","forceNewPromise","get","childrenLoadedPromise","Promise","resolve","observer","MutationObserver","disconnect","observe","childList","set","sync","synchronous","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","ComponentTestimonials","HTMLDivElement","constructor","super","connectedCallback","this","initialize","initialized","slideElements","length","setAttribute","previousSlideButtonElement","previousSlide","nextSlideButtonElement","nextSlide","slidesContainerElement","event","console","log","querySelector","querySelectorAll","isSlider","matchMedia","matches","slideElement","currentSlidePosition","classList","add","setTimeout","remove","customElements","define","extends"],"sourceRoot":""}