{"version":3,"file":"ecommerce-gallery.min.js","sources":["../../../src/plugins/ecommerce-gallery/js/mdb/util/index.js","../../../src/plugins/ecommerce-gallery/js/mdb/dom/data.js","../../../src/plugins/ecommerce-gallery/js/mdb/dom/polyfill.js","../../../src/plugins/ecommerce-gallery/js/mdb/dom/event-handler.js","../../../src/plugins/ecommerce-gallery/js/mdb/dom/manipulator.js","../../../src/plugins/ecommerce-gallery/js/mdb/dom/selector-engine.js","../../../src/plugins/ecommerce-gallery/js/ecommerce-gallery.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend';\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = (obj) => {\n if (obj === null || obj === undefined) {\n return `${obj}`;\n }\n\n return {}.toString\n .call(obj)\n .match(/\\s([a-z]+)/i)[1]\n .toLowerCase();\n};\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = (prefix) => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n};\n\nconst getSelector = (element) => {\n let selector = element.getAttribute('data-mdb-target');\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href');\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n};\n\nconst getSelectorFromElement = (element) => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n};\n\nconst getElementFromSelector = (element) => {\n const selector = getSelector(element);\n\n return selector ? document.querySelector(selector) : null;\n};\n\nconst getTransitionDurationFromElement = (element) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) *\n MILLISECONDS_MULTIPLIER\n );\n};\n\nconst triggerTransitionEnd = (element) => {\n element.dispatchEvent(new Event(TRANSITION_END));\n};\n\nconst isElement = (obj) => (obj[0] || obj).nodeType;\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false;\n const durationPadding = 5;\n const emulatedDuration = duration + durationPadding;\n\n function listener() {\n called = true;\n element.removeEventListener(TRANSITION_END, listener);\n }\n\n element.addEventListener(TRANSITION_END, listener);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element);\n }\n }, emulatedDuration);\n};\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach((property) => {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = value && isElement(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n );\n }\n });\n};\n\nconst isVisible = (element) => {\n if (!element) {\n return false;\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element);\n const parentNodeStyle = getComputedStyle(element.parentNode);\n\n return (\n elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n );\n }\n\n return false;\n};\n\nconst findShadowRoot = (element) => {\n if (!document.documentElement.attachShadow) {\n return null;\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n};\n\nconst noop = () => function () {};\n\nconst reflow = (element) => element.offsetHeight;\n\nconst getjQuery = () => {\n const { jQuery } = window;\n\n if (jQuery && !document.body.hasAttribute('data-mdb-no-jquery')) {\n return jQuery;\n }\n\n return null;\n};\n\nconst onDOMContentLoaded = (callback) => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback);\n } else {\n callback();\n }\n};\n\nconst isRTL = document.documentElement.dir === 'rtl';\n\nconst array = (collection) => {\n return Array.from(collection);\n};\n\nconst element = (tag) => {\n return document.createElement(tag);\n};\n\nexport {\n getjQuery,\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n array,\n element,\n onDOMContentLoaded,\n isRTL,\n};\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {};\n let id = 1;\n return {\n set(element, key, data) {\n if (typeof element[key] === 'undefined') {\n element[key] = {\n key,\n id,\n };\n id++;\n }\n\n storeData[element[key].id] = data;\n },\n get(element, key) {\n if (!element || typeof element[key] === 'undefined') {\n return null;\n }\n\n const keyProperties = element[key];\n if (keyProperties.key === key) {\n return storeData[keyProperties.id];\n }\n\n return null;\n },\n delete(element, key) {\n if (typeof element[key] === 'undefined') {\n return;\n }\n\n const keyProperties = element[key];\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id];\n delete element[key];\n }\n },\n };\n})();\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data);\n },\n getData(instance, key) {\n return mapData.get(instance, key);\n },\n removeData(instance, key) {\n mapData.delete(instance, key);\n },\n};\n\nexport default Data;\n","/* istanbul ignore file */\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/polyfill.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getUID } from '../util/index';\n\nlet findElements = Element.prototype.querySelectorAll;\nlet findElement = Element.prototype.querySelector;\n\n// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached\nconst defaultPreventedPreservedOnDispatch = (() => {\n const e = new CustomEvent('Bootstrap', {\n cancelable: true,\n });\n\n const element = document.createElement('div');\n element.addEventListener('Bootstrap', () => null);\n\n e.preventDefault();\n element.dispatchEvent(e);\n return e.defaultPrevented;\n})();\n\nconst scopeSelectorRegex = /:scope\\b/;\nconst supportScopeQuery = (() => {\n const element = document.createElement('div');\n\n try {\n element.querySelectorAll(':scope *');\n } catch (_) {\n return false;\n }\n\n return true;\n})();\n\nif (!supportScopeQuery) {\n findElements = function (selector) {\n if (!scopeSelectorRegex.test(selector)) {\n return this.querySelectorAll(selector);\n }\n\n const hasId = Boolean(this.id);\n\n if (!hasId) {\n this.id = getUID('scope');\n }\n\n let nodeList = null;\n try {\n selector = selector.replace(scopeSelectorRegex, `#${this.id}`);\n nodeList = this.querySelectorAll(selector);\n } finally {\n if (!hasId) {\n this.removeAttribute('id');\n }\n }\n\n return nodeList;\n };\n\n findElement = function (selector) {\n if (!scopeSelectorRegex.test(selector)) {\n return this.querySelector(selector);\n }\n\n const matches = find.call(this, selector);\n\n if (typeof matches[0] !== 'undefined') {\n return matches[0];\n }\n\n return null;\n };\n}\n\nconst find = findElements;\nconst findOne = findElement;\n\nexport { find, findOne, defaultPreventedPreservedOnDispatch };\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defaultPreventedPreservedOnDispatch } from './polyfill';\nimport { getjQuery } from '../util/index';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst $ = getjQuery();\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\nconst stripNameRegex = /\\..*/;\nconst stripUidRegex = /::\\d+$/;\nconst eventRegistry = {}; // Events storage\nlet uidEvent = 1;\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout',\n};\nconst nativeEvents = [\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll',\n];\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++;\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element);\n\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n\n return eventRegistry[uid];\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--; '') {\n if (domElements[i] === target) {\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n }\n\n // To please ESLint\n return null;\n };\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events);\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string';\n const originalHandler = delegation ? delegationFn : handler;\n\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n let typeEvent = originalTypeEvent.replace(stripNameRegex, '');\n const custom = customEvents[typeEvent];\n\n if (custom) {\n typeEvent = custom;\n }\n\n const isNative = nativeEvents.indexOf(typeEvent) > -1;\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(\n originalTypeEvent,\n handler,\n delegationFn\n );\n const events = getEvent(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n\n return;\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = delegation\n ? bootstrapDelegationHandler(element, handler, delegationFn)\n : bootstrapHandler(element, handler);\n\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n\n element.addEventListener(typeEvent, fn, delegation);\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n Object.keys(storeElementEvent).forEach((handlerKey) => {\n if (handlerKey.indexOf(namespace) > -1) {\n const event = storeElementEvent[handlerKey];\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(\n originalTypeEvent,\n handler,\n delegationFn\n );\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getEvent(element);\n const isNamespace = originalTypeEvent.charAt(0) === '.';\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach((elementEvent) => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach((keyHandlers) => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {\n const event = storeElementEvent[keyHandlers];\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const typeEvent = event.replace(stripNameRegex, '');\n const inNamespace = event !== typeEvent;\n const isNative = nativeEvents.indexOf(typeEvent) > -1;\n\n let jQueryEvent;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n let evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true,\n });\n }\n\n // merge custom informations in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach((key) => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key];\n },\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n\n if (!defaultPreventedPreservedOnDispatch) {\n Object.defineProperty(evt, 'defaultPrevented', {\n get: () => true,\n });\n }\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n },\n};\n\nexport const EventHandlerMulti = {\n on(element, eventsName, handler, delegationFn) {\n const events = eventsName.split(' ');\n\n for (let i = 0; i < events.length; i++) {\n EventHandler.on(element, events[i], handler, delegationFn);\n }\n },\n off(element, originalTypeEvent, handler, delegationFn) {\n const events = originalTypeEvent.split(' ');\n\n for (let i = 0; i < events.length; i++) {\n EventHandler.off(element, events[i], handler, delegationFn);\n }\n },\n};\n\nexport default EventHandler;\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`);\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-mdb-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-mdb-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {\n ...element.dataset,\n };\n\n Object.keys(attributes)\n .filter((key) => key.startsWith('mdb'))\n .forEach((key) => {\n let pureKey = key.replace(/^mdb/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(attributes[key]);\n });\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-mdb-${normalizeDataKey(key)}`));\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect();\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft,\n };\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft,\n };\n },\n\n style(element, style) {\n Object.assign(element.style, style);\n },\n\n toggleClass(element, className) {\n if (!element) {\n return;\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className);\n } else {\n element.classList.add(className);\n }\n },\n\n addClass(element, className) {\n if (element.classList.contains(className)) return;\n element.classList.add(className);\n },\n\n addStyle(element, style) {\n Object.keys(style).forEach((property) => {\n element.style[property] = style[property];\n });\n },\n\n removeClass(element, className) {\n if (!element.classList.contains(className)) return;\n element.classList.remove(className);\n },\n\n hasClass(element, className) {\n return element.classList.contains(className);\n },\n};\n\nexport default Manipulator;\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { find as findFn, findOne } from './polyfill';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3;\n\nconst SelectorEngine = {\n closest(element, selector) {\n return element.closest(selector);\n },\n\n matches(element, selector) {\n return element.matches(selector);\n },\n\n find(selector, element = document.documentElement) {\n return [].concat(...findFn.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return findOne.call(element, selector);\n },\n\n children(element, selector) {\n const children = [].concat(...element.children);\n\n return children.filter((child) => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n\n let ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (this.matches(ancestor, selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (this.matches(next, selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n};\n\nexport default SelectorEngine;\n","import { element, typeCheckConfig, getUID, getjQuery, onDOMContentLoaded } from './mdb/util/index';\nimport Data from './mdb/dom/data';\nimport EventHandler from './mdb/dom/event-handler';\nimport Manipulator from './mdb/dom/manipulator';\nimport SelectorEngine from './mdb/dom/selector-engine';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'ecommerceGallery';\nconst DATA_KEY = 'mdb.ecommerceGallery';\nconst CLASSNAME_ECOMMERCE_GALLERY = '.ecommerce-gallery';\nconst CLASSNAME_ECOMMERCE_MAIN_IMG = '.ecommerce-gallery-main-img';\nconst CLASSNAME_LIGHTBOX = '.lightbox';\nconst CLASSNAME_MULTI_CAROUSEL = '.multi-carousel';\n\nconst LIGHTBOX_SELECTOR = '[data-mdb-lightbox-init] img:not(.lightbox-disabled)';\nconst THUMBNAILS_SELECTOR = 'img:not(.ecommerce-gallery-main-img):not(.ecommerce-disabled)';\n\nconst SELECTOR_DATA_INIT = '[data-mdb-ecommerce-gallery-init]';\n\n// const EVENT_CLICK_DATA_API_LIGHTBOX = 'click.mdb.lightbox.data-api';\n\nconst MULTI_CAROUSEL_SLID_EVENT = 'slid.mdb.multiCarousel';\nconst LIGHTBOX_SLID_EVENT = 'slid.mdb.lightbox';\n\nconst OPTIONS_TYPE = {\n activation: 'string',\n autoHeight: 'boolean',\n zoomEffect: '(string|boolean)',\n};\n\nconst DEFAULT_OPTIONS = {\n activation: 'click',\n autoHeight: false,\n zoomEffect: false,\n};\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass EcommerceGallery {\n constructor(element, options = {}) {\n this._element = element;\n this._options = options;\n\n this._activeImg = null;\n this._lightbox = null;\n this._toggleEvent = null;\n this._vertical = this._element.classList.contains('vertical');\n this._animating = false;\n\n if (this._element) {\n Data.setData(element, DATA_KEY, this);\n }\n }\n\n // Getters\n static get NAME() {\n return NAME;\n }\n\n get options() {\n const config = {\n ...DEFAULT_OPTIONS,\n ...Manipulator.getDataAttributes(this._element),\n ...this._options,\n };\n\n typeCheckConfig(NAME, config, OPTIONS_TYPE);\n\n return config;\n }\n\n get thumbnails() {\n const thumbnails = [];\n SelectorEngine.find(THUMBNAILS_SELECTOR, this._element).forEach((img) => {\n thumbnails.push(img);\n });\n\n return thumbnails;\n }\n\n get _multiCarousel() {\n return SelectorEngine.findOne(CLASSNAME_MULTI_CAROUSEL, this._element);\n }\n\n // Public\n init() {\n this._setGalleryData();\n this._addMdbId();\n if (this._lightbox) this._appendLightboxContent();\n this._addEvents();\n }\n\n dispose() {\n this._removeEvents();\n\n Data.removeData(this._element, DATA_KEY);\n this._element = null;\n }\n\n // Private\n _toggle(e) {\n if (this._animating || e.target.dataset.mdbId === this._activeImg.dataset.activeImg) {\n return;\n }\n\n this._animationStart();\n this._toggleThumbsClass(e);\n this._toggleMainImg(e);\n }\n\n _setGalleryData() {\n this._activeImg = SelectorEngine.findOne(CLASSNAME_ECOMMERCE_MAIN_IMG, this._element);\n Manipulator.addClass(this._activeImg, 'active');\n this._lightbox = SelectorEngine.findOne(CLASSNAME_LIGHTBOX, this._element);\n }\n\n _animationStart() {\n this._animating = true;\n setTimeout(() => {\n this._animating = false;\n }, 500);\n }\n\n _appendLightboxContent() {\n this._lightbox.innerHTML = '';\n this.thumbnails.forEach((img) => {\n const newImg = element('img');\n newImg.src = img.dataset.mdbImg;\n newImg.dataset.mdbId = img.dataset.mdbId;\n newImg.alt = img.alt;\n if (img.dataset.caption) {\n newImg.dataset.caption = img.dataset.caption;\n }\n if (this.options.autoHeight) {\n Manipulator.style(newImg, { height: 'auto' });\n }\n\n this._applyLigthboxImgClassList(newImg, img);\n this._lightbox.append(newImg);\n });\n }\n\n _addMdbId() {\n this.thumbnails.forEach((img) => {\n img.dataset.mdbId = getUID('ecommerce-gallery-');\n });\n }\n\n _addEvents() {\n this.thumbnails.forEach((img) => {\n this._toggleEvent = this._toggle.bind(this);\n EventHandler.on(img, this.options.activation, this._toggleEvent);\n });\n\n if (this._multiCarousel) {\n this._updateEventsHandler = this._updateEvents.bind(this);\n EventHandler.on(this._multiCarousel, MULTI_CAROUSEL_SLID_EVENT, this._updateEventsHandler);\n }\n\n if (this._lightbox) {\n this._onLightboxSlideHandler = this._onLightboxSlide.bind(this);\n EventHandler.on(this._lightbox, LIGHTBOX_SLID_EVENT, this._onLightboxSlideHandler);\n }\n\n if (this.options.zoomEffect) {\n SelectorEngine.find('img', this._lightbox).forEach((img) => {\n EventHandler.on(img, 'mousemove', this._onMainImgMousemove);\n EventHandler.on(img, 'mouseleave', this._onMainImgMouseleave);\n });\n }\n }\n\n _updateEvents(e) {\n const closestGallery = SelectorEngine.closest(e.target, CLASSNAME_ECOMMERCE_GALLERY);\n if (closestGallery !== this._element) return;\n\n this.thumbnails.forEach((img) => {\n this._toggleEvent = this._toggle.bind(this);\n EventHandler.on(img, this.options.activation, this._toggleEvent);\n });\n }\n\n _removeEvents() {\n this.thumbnails.forEach((img) => {\n EventHandler.off(img, this.options.activation, this._toggleEvent);\n });\n\n if (this._multiCarousel) {\n EventHandler.off(this._multiCarousel, MULTI_CAROUSEL_SLID_EVENT, this._updateEventsHandler);\n }\n\n if (this._lightbox) {\n EventHandler.off(this._lightbox, LIGHTBOX_SLID_EVENT, this._onLightboxSlideHandler);\n }\n\n if (this.options.zoomEffect) {\n SelectorEngine.find('img', this._lightbox).forEach((img) => {\n EventHandler.off(img, 'mousemove', this._onMainImgMousemove);\n });\n }\n }\n\n _onLightboxSlide() {\n const lightboxInstance = mdb.Lightbox.getInstance(this._lightbox);\n const activeImg = lightboxInstance.activeImg;\n const currentImg = lightboxInstance.currentImg;\n\n SelectorEngine.find('img', this._lightbox).forEach((img, key) => {\n Manipulator.removeClass(img, 'active');\n if (key === activeImg) Manipulator.addClass(img, 'active');\n });\n\n SelectorEngine.find(THUMBNAILS_SELECTOR, this._element).forEach((img) => {\n Manipulator.removeClass(img, 'active');\n if (currentImg.src === img.src || currentImg.src === img.dataset.mdbImg) {\n Manipulator.addClass(img, 'active');\n }\n });\n }\n\n _onMainImgMousemove(e) {\n this._activeImg = e.target;\n const x = -(e.offsetX - this._activeImg.width / 2) / 2;\n const y = -(e.offsetY - this._activeImg.height / 2) / 2;\n Manipulator.style(this._activeImg, { transform: `scale(4.5) translate(${x}px, ${y}px)` });\n }\n\n _onMainImgMouseleave() {\n Manipulator.style(this._activeImg, { transform: 'scale(1)' });\n }\n\n _applyLigthboxImgClassList(newImg, img) {\n this._activeImg.classList.forEach((className) => {\n if (className === 'active') return;\n Manipulator.addClass(newImg, className);\n });\n\n if (img.classList.contains('active')) {\n Manipulator.addClass(newImg, 'active');\n }\n }\n\n _toggleThumbsClass(e) {\n SelectorEngine.find(THUMBNAILS_SELECTOR, this._element).forEach((img) => {\n Manipulator.removeClass(img, 'active');\n });\n Manipulator.addClass(e.target, 'active');\n }\n\n _toggleMainImg(e) {\n SelectorEngine.find('img', this._lightbox).forEach((img) => {\n if (e.target.dataset.mdbId === img.dataset.mdbId) {\n this._activeImg = img;\n this._fadeIn(img);\n } else {\n this._fadeOut(img);\n }\n });\n }\n\n _fadeIn(img) {\n ['animation', 'fade-in', 'faster', 'active'].forEach((className) =>\n Manipulator.addClass(img, className)\n );\n setTimeout(() => {\n ['animation', 'fade-in', 'faster'].forEach((className) =>\n Manipulator.removeClass(img, className)\n );\n }, 500);\n }\n\n _fadeOut(img) {\n if (img.classList.contains('active')) {\n ['animating', 'animation', 'fade-out', 'faster'].forEach((className) =>\n Manipulator.addClass(img, className)\n );\n setTimeout(() => {\n ['animation', 'animating', 'fade-out', 'faster', 'active'].forEach((className) =>\n Manipulator.removeClass(img, className)\n );\n }, 500);\n }\n }\n\n static getInstance(element) {\n return Data.getData(element, DATA_KEY);\n }\n\n static jQueryInterface(config, options) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY);\n const _config = typeof config === 'object' && config;\n if (!data && /dispose/.test(config)) {\n return;\n }\n if (!data) {\n data = new EcommerceGallery(this, _config);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config](options);\n }\n });\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation - auto initialization\n * ------------------------------------------------------------------------\n */\n\nSelectorEngine.find(SELECTOR_DATA_INIT).forEach((el) => {\n new EcommerceGallery(el).init();\n});\n\nSelectorEngine.find(LIGHTBOX_SELECTOR).forEach((el) => {\n const lightboxInstance = mdb.Lightbox.getInstance(el);\n if (lightboxInstance) lightboxInstance.dispose();\n new mdb.Lightbox(el).init();\n});\n\n// EventHandler.on(document, EVENT_CLICK_DATA_API_LIGHTBOX, LIGHTBOX_SELECTOR, mdb.Lightbox.toggle());\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery();\n\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME];\n $.fn[NAME] = EcommerceGallery.jQueryInterface;\n $.fn[NAME].Constructor = EcommerceGallery;\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return EcommerceGallery.jQueryInterface;\n };\n }\n});\n\nexport default EcommerceGallery;\n"],"names":["getUID","prefix","Math","floor","random","document","getElementById","getjQuery","jQuery","window","body","hasAttribute","documentElement","dir","mapData","storeData","id","set","element","key","data","get","keyProperties","Data","setData","instance","getData","removeData","delete","findElements","Element","prototype","querySelectorAll","findElement","querySelector","defaultPreventedPreservedOnDispatch","e","CustomEvent","cancelable","createElement","addEventListener","preventDefault","dispatchEvent","defaultPrevented","scopeSelectorRegex","_","selector","test","this","hasId","Boolean","nodeList","replace","removeAttribute","matches","find","call","findOne","$","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","getUidEvent","uid","getEvent","findHandler","events","handler","delegationSelector","uidEventList","Object","keys","i","len","length","event","originalHandler","normalizeParams","originalTypeEvent","delegationFn","delegation","typeEvent","custom","indexOf","addHandler","oneOff","handlers","previousFn","fn","domElements","target","parentNode","EventHandler","off","type","apply","bootstrapDelegationHandler","bootstrapHandler","removeHandler","removeEventListener","on","one","inNamespace","isNamespace","charAt","forEach","elementEvent","namespace","storeElementEvent","handlerKey","removeNamespacedHandlers","slice","keyHandlers","trigger","args","isNative","jQueryEvent","bubbles","nativeDispatch","evt","Event","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","createEvent","initEvent","defineProperty","normalizeData","val","Number","toString","normalizeDataKey","chr","toLowerCase","Manipulator","setDataAttribute","value","setAttribute","removeDataAttribute","getDataAttributes","attributes","dataset","filter","startsWith","pureKey","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","style","assign","toggleClass","className","classList","contains","remove","add","addClass","addStyle","property","removeClass","hasClass","SelectorEngine","closest","concat","findFn","children","child","parents","ancestor","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling","NAME","DATA_KEY","THUMBNAILS_SELECTOR","MULTI_CAROUSEL_SLID_EVENT","LIGHTBOX_SLID_EVENT","OPTIONS_TYPE","activation","autoHeight","zoomEffect","DEFAULT_OPTIONS","EcommerceGallery","constructor","options","_element","_options","_activeImg","_lightbox","_toggleEvent","_vertical","_animating","config","componentName","configTypes","expectedTypes","valueType","obj","match","toType","RegExp","Error","toUpperCase","typeCheckConfig","thumbnails","img","_multiCarousel","init","_setGalleryData","_addMdbId","_appendLightboxContent","_addEvents","dispose","_removeEvents","_toggle","mdbId","activeImg","_animationStart","_toggleThumbsClass","_toggleMainImg","setTimeout","innerHTML","newImg","tag","src","mdbImg","alt","caption","height","_applyLigthboxImgClassList","append","bind","_updateEventsHandler","_updateEvents","_onLightboxSlideHandler","_onLightboxSlide","_onMainImgMousemove","_onMainImgMouseleave","lightboxInstance","mdb","Lightbox","getInstance","currentImg","x","offsetX","width","y","offsetY","transform","_fadeIn","_fadeOut","jQueryInterface","each","_config","TypeError","callback","el","JQUERY_NO_CONFLICT","Constructor","noConflict","readyState"],"mappings":"iPAOA,MAsBMA,EAAUC,IACX,GACDA,GAAUC,KAAKC,MAxBH,IAwBSD,KAAKE,gBACnBC,SAASC,eAAeL,IAE1B,OAAAA,CAAA,EA+IHM,EAAY,KACV,MAAAC,OAAEA,GAAWC,OAEnB,OAAID,IAAWH,SAASK,KAAKC,aAAa,sBACjCH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