{"version":3,"sources":["webpack://fair-labour/./assets/project/general/js/_glide/defaults.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/log.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/unit.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/object.js","webpack://fair-labour/./assets/project/general/js/_glide/core/event/events-bus.js","webpack://fair-labour/./assets/project/general/js/_glide/core.js","webpack://fair-labour/./assets/project/general/js/_glide/core/index.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/time.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/wait.js","webpack://fair-labour/./assets/project/general/js/_glide/components/gaps.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/dom.js","webpack://fair-labour/./assets/project/general/js/_glide/components/html.js","webpack://fair-labour/./assets/project/general/js/_glide/components/clones.js","webpack://fair-labour/./assets/project/general/js/_glide/core/event/events-binder.js","webpack://fair-labour/./assets/project/general/js/_glide/components/direction.js","webpack://fair-labour/./assets/project/general/js/_glide/mutator/transformers/rtl.js","webpack://fair-labour/./assets/project/general/js/_glide/mutator/transformers/gap.js","webpack://fair-labour/./assets/project/general/js/_glide/mutator/transformers/grow.js","webpack://fair-labour/./assets/project/general/js/_glide/mutator/transformers/peeking.js","webpack://fair-labour/./assets/project/general/js/_glide/mutator/transformers/focusing.js","webpack://fair-labour/./assets/project/general/js/_glide/components/translate.js","webpack://fair-labour/./assets/project/general/js/_glide/utils/detect-passive-event.js","webpack://fair-labour/./assets/project/general/js/_glide/components/swipe.js","webpack://fair-labour/./assets/project/general/js/_glide/components/controls.js","webpack://fair-labour/./assets/project/general/js/_glide/components/keyboard.js","webpack://fair-labour/./assets/project/general/js/_glide/components/breakpoints.js","webpack://fair-labour/./assets/project/general/js/_glide/index.js","webpack://fair-labour/./assets/project/general/js/_glide/mutator/index.js","webpack://fair-labour/./assets/project/general/js/_glide/components/transition.js","webpack://fair-labour/./assets/project/general/js/_glide/components/peek.js","webpack://fair-labour/./assets/project/general/js/_glide/components/sizes.js","webpack://fair-labour/./assets/project/general/js/_glide/components/move.js","webpack://fair-labour/./assets/project/general/js/_glide/components/resize.js","webpack://fair-labour/./assets/project/general/js/_glide/components/build.js","webpack://fair-labour/./assets/project/general/js/_glide/components/run.js","webpack://fair-labour/./assets/project/general/js/_glide/components/images.js","webpack://fair-labour/./assets/project/general/js/_glide/components/anchors.js","webpack://fair-labour/./assets/project/general/js/_glide/components/autoplay.js","webpack://fair-labour/./assets/project/general/js/dc-expand-glide-slider.js","webpack://fair-labour/./assets/components/slider/js/slider.component.js","webpack://fair-labour/./assets/components/slider/index.js","webpack://fair-labour/./assets/config.js"],"names":["type","startAt","perView","focusAt","gap","autoplay","hoverpause","keyboard","bound","swipeThreshold","dragThreshold","perSwipe","touchRatio","touchAngle","animationDuration","rewind","rewindDuration","animationTimingFunc","waitForTransition","throttle","swipeAble","direction","peek","cloningRatio","breakpoints","classes","swipeable","dragging","ltr","rtl","slider","carousel","slide","clone","active","preActive","arrow","disabled","nav","warn","msg","console","error","concat","toInt","value","parseInt","isString","isObject","_typeof","isFunction","isUndefined","isArray","constructor","Array","define","obj","prop","definition","Object","defineProperty","mergeOptions","defaults","settings","options","_extends","hasOwnProperty","EventsBus","events","arguments","length","undefined","_classCallCheck","this","hop","key","event","handler","call","index","push","remove","i","on","context","emit","forEach","item","Glide","selector","_c","_t","_e","extensions","glide","components","name","mount","transformers","pattern","Run","make","distance","Transition","disable","Move","interval","get","_o","set","o","_i","_d","status","now","Date","getTime","func","wait","timeout","args","result","previous","later","leading","apply","throttled","at","remaining","clearTimeout","trailing","setTimeout","cancel","MARGIN_TYPE","siblings","node","parentNode","n","firstChild","matched","nextSibling","nodeType","exist","window","HTMLElement","TRACK_SELECTOR","Components","Events","Clones","items","isType","collect","slides","Html","_Glide$settings","cloneCount","Math","round","append","slice","reverse","prepend","r","max","floor","cloneNode","classList","add","unshift","_Components$Html","wrapper","half","width","Sizes","slideWidth","appendChild","insertBefore","style","removeChild","Gaps","EventsBinder","listeners","el","closure","capture","addEventListener","removeEventListener","VALID_DIRECTIONS","FLIPED_MOVEMENTS","modify","translate","Direction","is","reduce","val","grow","Peek","before","focusing","supportsPassive","opts","e","START_EVENTS","MOVE_EVENTS","END_EVENTS","MOUSE_EVENTS","ELEMENT_SELECTOR","Binder","compensateScroll","track","scrollLeft","Keyboard","bind","document","press","unbind","off","keyCode","resolve","root","contains","activeElement","findIndex","realTranslate","pos","getCurrentSlideWidth","rightPos","destroy","sortBreakpoints","points","keys","sort","k","COMPONENTS","querySelector","prototype","children","filter","_r","t","Translate","transform","TRANSFORMERS","Gap","Grow","Peeking","Focusing","Rtl","mutate","transformer","mutator","getStartIndex","isOffset","getTravelDistance","travelDistance","wrapperSize","movement","after","startWidth","compose","property","duration","transition","callback","enable","offset","token","split","join","addClass","removeClass","_v","indexOf","getBoundingClientRect","len","marginLeft","marginRight","_this","Resize","Build","typeClass","activeClass","sibling","preActiveClass","removeClasses","_Glide$settings$class","move","swipeDistance","calculate","isStart","isEnd","steps","viewSize","_index","getIndexBySwipeDistance","calculateForwardIndex","isBound","normalizeForwardIndex","view","ceil","calculateBackwardIndex","normalizeBackwardIndex","realPos","_m","step","substr","last","availableSize","sumWidth","_width","Swipe","swipeSin","swipeStartX","swipeStartY","passive","bindSwipeStart","start","swipe","touches","pageX","pageY","bindSwipeMove","bindSwipeEnd","subExSx","subEySy","powEX","abs","powEY","swipeHypotenuse","sqrt","swipeCathetus","asin","PI","stopPropagation","parseFloat","end","_Glide$settings2","threshold","swipeDeg","unbindSwipeMove","unbindSwipeEnd","_Glide$settings3","unbindSwipeStart","_this2","_this3","changedTouches","Images","dragstart","preventDefault","Anchors","detached","prevented","_a","querySelectorAll","click","detach","draggable","setAttribute","getAttribute","removeAttribute","attach","Controls","_n","parentElement","closest","control","_arrowControls","next","prev","addBindings","setActive","removeActive","controls","setArrowState","resetArrowState","disableArrow","_len","lists","_key","list","element","_len2","_key2","removeBindings","elements","currentTarget","Autoplay","setInterval","stop","time","clearInterval","Breakpoints","match","matchMedia","point","matches","_Core","_inherits","_super","_get","_getPrototypeOf","_objectSpread","Core","IS_SWIPING","DcExpandGlideSlider","_DcBaseComponent","props","_defineProperty","_assertThisInitialized","unsubscribeResize","deviceObserver","_calculate","glideOptions","onSliderInit","onSliderDestroy","_assertThisInitialize","isEnough","_checkEnough","go","_destroySlider","_initSlider","cards","refs","trackWrapper","sliderInit","card","DcBaseComponent","Slider","_DcExpandGlideSlider","_checking","_unsubscrbeChange","dcFactory","module","exports","viewports","mobile","tablet","desktop","containerMaxWidth"],"mappings":"+HAAA,G,0KAAA,CAUIA,KAAM,SAONC,QAAS,EAOTC,QAAS,EAWTC,QAAS,EAOTC,IAAK,GAOLC,UAAU,EAOVC,YAAY,EAOZC,UAAU,EAUVC,OAAO,EAOPC,eAAgB,GAOhBC,cAAe,IAWfC,SAAU,IAOVC,WAAY,GAOZC,WAAY,GAOZC,kBAAmB,IAOnBC,QAAQ,EAORC,eAAgB,IAOhBC,oBAAqB,oCAOrBC,mBAAmB,EAOnBC,SAAU,GAQVC,WAAW,EAWXC,UAAW,MAcXC,KAAM,EAONC,aAAc,EAWdC,YAAa,CAAC,EAQdC,QAAS,CACLC,UAAW,mBACXC,SAAU,kBACVN,UAAW,CACPO,IAAK,aACLC,IAAK,cAET7B,KAAM,CACF8B,OAAQ,gBACRC,SAAU,mBAEdC,MAAO,CACHC,MAAO,sBACPC,OAAQ,uBACRC,UAAW,2BAEfC,MAAO,CACHC,SAAU,eAEdC,IAAK,CACDJ,OAAQ,4BCnOb,SAASK,EAAKC,GACjBC,QAAQC,MAAM,iBAADC,OAAkBH,GACnC,C,sOCDO,SAASI,EAAMC,GAClB,OAAOC,SAASD,EACpB,CAmBO,SAASE,EAASF,GACrB,MAAwB,iBAAVA,CAClB,CAUO,SAASG,EAASH,GACrB,IAAI7C,EAAIiD,EAAUJ,GAElB,MAAgB,aAAT7C,GAAgC,WAATA,KAAuB6C,CACzD,CAkBO,SAASK,EAAWL,GACvB,MAAwB,mBAAV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OAAQ,IACRC,QAAS,KACT,eAAgB,KAChB,gBAAiB,MAErBC,kBAAmB,K","file":"slider.1d4820fe61a36b799bf3.js","sourcesContent":["export default {\n /**\n * Type of the movement.\n *\n * Available types:\n * `slider` - Rewinds slider to the start/end when it reaches the first or last slide.\n * `carousel` - Changes slides without starting over when it reaches the first or last slide.\n *\n * @type {String}\n */\n type: 'slider',\n\n /**\n * Start at specific slide number defined with zero-based index.\n *\n * @type {Number}\n */\n startAt: 0,\n\n /**\n * A number of slides visible on the single viewport.\n *\n * @type {Number}\n */\n perView: 1,\n\n /**\n * Focus currently active slide at a specified position in the track.\n *\n * Available inputs:\n * `center` - Current slide will be always focused at the center of a track.\n * `0,1,2,3...` - Current slide will be focused on the specified zero-based index.\n *\n * @type {String|Number}\n */\n focusAt: 0,\n\n /**\n * A size of the gap added between slides.\n *\n * @type {Number}\n */\n gap: 10,\n\n /**\n * Change slides after a specified interval. Use `false` for turning off autoplay.\n *\n * @type {Number|Boolean}\n */\n autoplay: false,\n\n /**\n * Stop autoplay on mouseover event.\n *\n * @type {Boolean}\n */\n hoverpause: true,\n\n /**\n * Allow for changing slides with left and right keyboard arrows.\n *\n * @type {Boolean}\n */\n keyboard: true,\n\n /**\n * Stop running `perView` number of slides from the end. Use this\n * option if you don't want to have an empty space after\n * a slider. Works only with `slider` type and a\n * non-centered `focusAt` setting.\n *\n * @type {Boolean}\n */\n bound: false,\n\n /**\n * Minimal swipe distance needed to change the slide. Use `false` for turning off a swiping.\n *\n * @type {Number|Boolean}\n */\n swipeThreshold: 80,\n\n /**\n * Minimal mouse drag distance needed to change the slide. Use `false` for turning off a dragging.\n *\n * @type {Number|Boolean}\n */\n dragThreshold: 120,\n\n /**\n * A number of slides moved on single swipe.\n *\n * Available types:\n * `` - Moves slider by one slide per swipe\n * `|` - Moves slider between views per swipe (number of slides defined in `perView` options)\n *\n * @type {String}\n */\n perSwipe: '|',\n\n /**\n * Moving distance ratio of the slides on a swiping and dragging.\n *\n * @type {Number}\n */\n touchRatio: 0.5,\n\n /**\n * Angle required to activate slides moving on swiping or dragging.\n *\n * @type {Number}\n */\n touchAngle: 45,\n\n /**\n * Duration of the animation in milliseconds.\n *\n * @type {Number}\n */\n animationDuration: 400,\n\n /**\n * Allows looping the `slider` type. Slider will rewind to the first/last slide when it's at the start/end.\n *\n * @type {Boolean}\n */\n rewind: true,\n\n /**\n * Duration of the rewinding animation of the `slider` type in milliseconds.\n *\n * @type {Number}\n */\n rewindDuration: 800,\n\n /**\n * Easing function for the animation.\n *\n * @type {String}\n */\n animationTimingFunc: 'cubic-bezier(.165, .840, .440, 1)',\n\n /**\n * Wait for the animation to finish until the next user input can be processed\n *\n * @type {boolean}\n */\n waitForTransition: true,\n\n /**\n * Throttle costly events at most once per every wait milliseconds.\n *\n * @type {Number}\n */\n throttle: 10,\n\n /**\n * Ability to change slides by swipe/drag.\n *\n * @type {boolean}\n */\n\n swipeAble: true,\n\n /**\n * Moving direction mode.\n *\n * Available inputs:\n * - 'ltr' - left to right movement,\n * - 'rtl' - right to left movement.\n *\n * @type {String}\n */\n direction: 'ltr',\n\n /**\n * The distance value of the next and previous viewports which\n * have to peek in the current view. Accepts number and\n * pixels as a string. Left and right peeking can be\n * set up separately with a directions object.\n *\n * For example:\n * `100` - Peek 100px on the both sides.\n * { before: 100, after: 50 }` - Peek 100px on the left side and 50px on the right side.\n *\n * @type {Number|String|Object}\n */\n peek: 0,\n\n /**\n * Defines how many clones of current viewport will be generated.\n *\n * @type {Number}\n */\n cloningRatio: 1,\n\n /**\n * Collection of options applied at specified media breakpoints.\n * For example: display two slides per view under 800px.\n * `{\n * '800px': {\n * perView: 2\n * }\n * }`\n */\n breakpoints: {},\n\n /**\n * Collection of internally used HTML classes.\n *\n * @todo Refactor `slider` and `carousel` properties to single `type: { slider: '', carousel: '' }` object\n * @type {Object}\n */\n classes: {\n swipeable: 'glide--swipeable',\n dragging: 'glide--dragging',\n direction: {\n ltr: 'glide--ltr',\n rtl: 'glide--rtl'\n },\n type: {\n slider: 'glide--slider',\n carousel: 'glide--carousel'\n },\n slide: {\n clone: 'glide__slide--clone',\n active: 'glide__slide--active',\n preActive: 'glide__slide--preActive'\n },\n arrow: {\n disabled: 'is-disabled'\n },\n nav: {\n active: 'glide__bullet--active'\n }\n }\n};\n","/**\n * Outputs warning message to the bowser console.\n *\n * @param {String} msg\n * @return {Void}\n */\nexport function warn(msg) {\n console.error(`[Glide warn]: ${msg}`);\n}\n","/**\n * Converts value entered as number\n * or string to integer value.\n *\n * @param {String} value\n * @returns {Number}\n */\nexport function toInt(value) {\n return parseInt(value);\n}\n\n/**\n * Converts value entered as number\n * or string to flat value.\n *\n * @param {String} value\n * @returns {Number}\n */\nexport function toFloat(value) {\n return parseFloat(value);\n}\n\n/**\n * Indicates whether the specified value is a string.\n *\n * @param {*} value\n * @return {Boolean}\n */\nexport function isString(value) {\n return typeof value === 'string';\n}\n\n/**\n * Indicates whether the specified value is an object.\n *\n * @param {*} value\n * @return {Boolean}\n *\n * @see https://github.com/jashkenas/underscore\n */\nexport function isObject(value) {\n let type = typeof value;\n\n return type === 'function' || type === 'object' && !!value; // eslint-disable-line no-mixed-operators\n}\n\n/**\n * Indicates whether the specified value is a number.\n *\n * @param {*} value\n * @return {Boolean}\n */\nexport function isNumber(value) {\n return typeof value === 'number';\n}\n\n/**\n * Indicates whether the specified value is a function.\n *\n * @param {*} value\n * @return {Boolean}\n */\nexport function isFunction(value) {\n return typeof value === 'function';\n}\n\n/**\n * Indicates whether the specified value is undefined.\n *\n * @param {*} value\n * @return {Boolean}\n */\nexport function isUndefined(value) {\n return typeof value === 'undefined';\n}\n\n/**\n * Indicates whether the specified value is an array.\n *\n * @param {*} value\n * @return {Boolean}\n */\nexport function isArray(value) {\n return value.constructor === Array;\n}\n","/**\n * Defines getter and setter property on the specified object.\n *\n * @param {Object} obj Object where property has to be defined.\n * @param {String} prop Name of the defined property.\n * @param {Object} definition Get and set definitions for the property.\n * @return {Void}\n */\nexport function define(obj, prop, definition) {\n Object.defineProperty(obj, prop, definition);\n}\n\n/**\n * Sorts aphabetically object keys.\n *\n * @param {Object} obj\n * @return {Object}\n */\nexport function sortKeys(obj) {\n return Object.keys(obj)\n .sort()\n .reduce((r, k) => {\n r[k] = obj[k];\n\n return (r[k], r\n );\n }, {});\n}\n\n/**\n * Merges passed settings object with default options.\n *\n * @param {Object} defaults\n * @param {Object} settings\n * @return {Object}\n */\nexport function mergeOptions(defaults, settings) {\n let options = Object.assign({}, defaults, settings);\n\n // `Object.assign` do not deeply merge objects, so we\n // have to do it manually for every nested object\n // in options. Although it does not look smart,\n // it's smaller and faster than some fancy\n // merging deep-merge algorithm script.\n if (settings.hasOwnProperty('classes')) {\n options.classes = Object.assign({}, defaults.classes, settings.classes);\n\n if (settings.classes.hasOwnProperty('direction')) {\n options.classes.direction = Object.assign({}, defaults.classes.direction, settings.classes.direction);\n }\n\n if (settings.classes.hasOwnProperty('type')) {\n options.classes.type = Object.assign({}, defaults.classes.type, settings.classes.type);\n }\n\n if (settings.classes.hasOwnProperty('slide')) {\n options.classes.slide = Object.assign({}, defaults.classes.slide, settings.classes.slide);\n }\n\n if (settings.classes.hasOwnProperty('arrow')) {\n options.classes.arrow = Object.assign({}, defaults.classes.arrow, settings.classes.arrow);\n }\n\n if (settings.classes.hasOwnProperty('nav')) {\n options.classes.nav = Object.assign({}, defaults.classes.nav, settings.classes.nav);\n }\n }\n\n if (settings.hasOwnProperty('breakpoints')) {\n options.breakpoints = Object.assign({}, defaults.breakpoints, settings.breakpoints);\n }\n\n return options;\n}\n","import { isArray } from '../../utils/unit';\n\nexport default class EventsBus {\n /**\n * Construct a EventBus instance.\n *\n * @param {Object} events\n */\n constructor(events = {}) {\n this.events = events;\n this.hop = events.hasOwnProperty;\n }\n\n /**\n * Adds listener to the specifed event.\n *\n * @param {String|Array} event\n * @param {Function} handler\n */\n on(event, handler) {\n if (isArray(event)) {\n for (let i = 0; i < event.length; i++) {\n this.on(event[i], handler);\n }\n\n return;\n }\n\n // Create the event's object if not yet created\n if (!this.hop.call(this.events, event)) {\n this.events[event] = [];\n }\n\n // Add the handler to queue\n var index = this.events[event].push(handler) - 1;\n\n // Provide handle back for removal of event\n return {\n remove() {\n delete this.events[event][index];\n }\n };\n }\n\n /**\n * Runs registered handlers for specified event.\n *\n * @param {String|Array} event\n * @param {Object=} context\n */\n emit(event, context) {\n if (isArray(event)) {\n for (let i = 0; i < event.length; i++) {\n this.emit(event[i], context);\n }\n\n return;\n }\n\n // If the event doesn't exist, or there's no handlers in queue, just leave\n if (!this.hop.call(this.events, event)) {\n return;\n }\n\n // Cycle through events queue, fire!\n this.events[event].forEach((item) => {\n item(context || {});\n });\n }\n}\n","import defaults from './defaults';\nimport { warn } from './utils/log';\nimport { mount } from './core/index';\nimport { mergeOptions } from './utils/object';\nimport { toInt, isObject, isArray } from './utils/unit';\n\nimport EventsBus from './core/event/events-bus';\n\nexport default class Glide {\n /**\n * Construct glide.\n *\n * @param {String|HTMLElement} selector\n * @param {Object} options\n */\n constructor(selector, options = {}) {\n this._c = {};\n this._t = [];\n this._e = new EventsBus();\n\n this.disabled = false;\n this.selector = selector;\n this.settings = mergeOptions(defaults, options);\n this.index = this.settings.startAt;\n }\n\n /**\n * Initializes glide.\n *\n * @param {Object} extensions Collection of extensions to initialize.\n * @return {Glide}\n */\n mount(extensions = {}) {\n this._e.emit('mount.before');\n\n if (isObject(extensions)) {\n this._c = mount(this, extensions, this._e);\n } else {\n warn('You need to provide a object on `mount()`');\n }\n\n this._e.emit('mount.after');\n\n return this;\n }\n\n /**\n * Collects an instance `translate` transformers.\n *\n * @param {Array} transformers Collection of transformers.\n * @return {Void}\n */\n mutate(transformers = []) {\n if (isArray(transformers)) {\n this._t = transformers;\n } else {\n warn('You need to provide a array on `mutate()`');\n }\n\n return this;\n }\n\n /**\n * Updates glide with specified settings.\n *\n * @param {Object} settings\n * @return {Glide}\n */\n update(settings = {}) {\n this.settings = mergeOptions(this.settings, settings);\n\n if (settings.hasOwnProperty('startAt')) {\n this.index = settings.startAt;\n }\n\n this._e.emit('update');\n\n return this;\n }\n\n /**\n * Change slide with specified pattern. A pattern must be in the special format:\n * `>` - Move one forward\n * `<` - Move one backward\n * `={i}` - Go to {i} zero-based slide (eq. '=1', will go to second slide)\n * `>>` - Rewinds to end (last slide)\n * `<<` - Rewinds to start (first slide)\n *\n * @param {String} pattern\n * @return {Glide}\n */\n go(pattern) {\n this._c.Run.make(pattern);\n\n return this;\n }\n\n /**\n * Move track by specified distance.\n *\n * @param {String} distance\n * @return {Glide}\n */\n move(distance) {\n this._c.Transition.disable();\n this._c.Move.make(distance);\n\n return this;\n }\n\n /**\n * Destroy instance and revert all changes done by this._c.\n *\n * @return {Glide}\n */\n destroy() {\n this._e.emit('destroy');\n\n return this;\n }\n\n /**\n * Start instance autoplaying.\n *\n * @param {Boolean|Number} interval Run autoplaying with passed interval regardless of `autoplay` settings\n * @return {Glide}\n */\n play(interval = false) {\n if (interval) {\n this.settings.autoplay = interval;\n }\n\n this._e.emit('play');\n\n return this;\n }\n\n /**\n * Stop instance autoplaying.\n *\n * @return {Glide}\n */\n pause() {\n this._e.emit('pause');\n\n return this;\n }\n\n /**\n * Sets glide into a idle status.\n *\n * @return {Glide}\n */\n disable() {\n this.disabled = true;\n\n return this;\n }\n\n /**\n * Sets glide into a active status.\n *\n * @return {Glide}\n */\n enable() {\n this.disabled = false;\n\n return this;\n }\n\n /**\n * Adds cuutom event listener with handler.\n *\n * @param {String|Array} event\n * @param {Function} handler\n * @return {Glide}\n */\n on(event, handler) {\n this._e.on(event, handler);\n\n return this;\n }\n\n /**\n * Checks if glide is a precised type.\n *\n * @param {String} name\n * @return {Boolean}\n */\n isType(name) {\n return this.settings.type === name;\n }\n\n /**\n * Gets value of the core options.\n *\n * @return {Object}\n */\n get settings() {\n return this._o;\n }\n\n /**\n * Sets value of the core options.\n *\n * @param {Object} o\n * @return {Void}\n */\n set settings(o) {\n if (isObject(o)) {\n this._o = o;\n } else {\n warn('Options must be an `object` instance.');\n }\n }\n\n /**\n * Gets current index of the slider.\n *\n * @return {Object}\n */\n get index() {\n return this._i;\n }\n\n /**\n * Sets current index a slider.\n *\n * @return {Object}\n */\n set index(i) {\n this._i = toInt(i);\n }\n\n /**\n * Gets type name of the slider.\n *\n * @return {String}\n */\n get type() {\n return this.settings.type;\n }\n\n /**\n * Gets value of the idle status.\n *\n * @return {Boolean}\n */\n get disabled() {\n return this._d;\n }\n\n /**\n * Sets value of the idle status.\n *\n * @return {Boolean}\n */\n set disabled(status) {\n this._d = !!status;\n }\n}\n","import { warn } from '../utils/log';\nimport { isFunction } from '../utils/unit';\n\n/**\n * Creates and initializes specified collection of extensions.\n * Each extension receives access to instance of glide and rest of components.\n *\n * @param {Object} glide\n * @param {Object} extensions\n *\n * @returns {Object}\n */\nexport function mount(glide, extensions, events) {\n let components = {};\n\n for (let name in extensions) {\n if (isFunction(extensions[name])) {\n components[name] = extensions[name](glide, components, events);\n } else {\n warn('Extension must be a function');\n }\n }\n\n for (let name in components) {\n if (isFunction(components[name].mount)) {\n components[name].mount();\n }\n }\n\n return components;\n}\n","/**\n * Returns a current time.\n *\n * @return {Number}\n */\nexport function now() {\n return new Date().getTime();\n}\n","import { now } from './time';\n\n/**\n * Returns a function, that, when invoked, will only be triggered\n * at most once during a given window of time.\n *\n * @param {Function} func\n * @param {Number} wait\n * @param {Object=} options\n * @return {Function}\n *\n * @see https://github.com/jashkenas/underscore\n */\nexport function throttle(func, wait, options) {\n let timeout,\n context,\n args,\n result;\n let previous = 0;\n if (!options) options = {};\n\n let later = function () {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n let throttled = function () {\n let at = now();\n if (!previous && options.leading === false) previous = at;\n let remaining = wait - (at - previous\n );\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = at;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n","import { toInt } from '../utils/unit';\nimport { define } from '../utils/object';\nimport { throttle } from '../utils/wait';\n\nconst MARGIN_TYPE = {\n ltr: ['marginLeft', 'marginRight'],\n rtl: ['marginRight', 'marginLeft'],\n};\n\nconst _Gaps = function (Glide, Components, Events) {\n const Gaps = {\n /**\n * Applies gaps between slides. First and last\n * slides do not receive it's edge margins.\n *\n * @param {HTMLCollection} slides\n * @return {Void}\n */\n apply(slides) {\n for (let i = 0, len = slides.length; i < len; i++) {\n const style = slides[i].style;\n const direction = Components.Direction.value;\n\n if (i !== 0) {\n style[MARGIN_TYPE[direction][0]] = `${this.value / 2}px`;\n } else {\n style[MARGIN_TYPE[direction][0]] = '';\n }\n\n if (i !== slides.length - 1) {\n style[MARGIN_TYPE[direction][1]] = `${this.value / 2}px`;\n } else {\n style[MARGIN_TYPE[direction][1]] = '';\n }\n }\n },\n\n /**\n * Removes gaps from the slides.\n *\n * @param {HTMLCollection} slides\n * @returns {Void}\n */\n remove(slides) {\n for (let i = 0, len = slides.length; i < len; i++) {\n let style = slides[i].style;\n\n style.marginLeft = '';\n style.marginRight = '';\n }\n },\n };\n\n define(Gaps, 'value', {\n /**\n * Gets value of the gap.\n *\n * @returns {Number}\n */\n get() {\n const gap = Glide.settings.gap;\n if (typeof gap === 'function') return gap();\n return toInt(gap);\n },\n });\n\n define(Gaps, 'grow', {\n /**\n * Gets additional dimentions value caused by gaps.\n * Used to increase width of the slides wrapper.\n *\n * @returns {Number}\n */\n get() {\n return Gaps.value * Components.Sizes.length;\n },\n });\n\n define(Gaps, 'reductor', {\n /**\n * Gets reduction value caused by gaps.\n * Used to subtract width of the slides.\n *\n * @returns {Number}\n */\n get() {\n let perView = Glide.settings.perView;\n\n return (Gaps.value * (perView - 1)) / perView;\n },\n });\n\n /**\n * Apply calculated gaps:\n * - after building, so slides (including clones) will receive proper margins\n * - on updating via API, to recalculate gaps with new options\n */\n Events.on(\n ['build.after', 'update', 'resize'],\n throttle(() => {\n Gaps.apply(Components.Html.wrapper.children);\n }, 30)\n );\n\n /**\n * Remove gaps:\n * - on destroying to bring markup to its inital state\n */\n Events.on('destroy', () => {\n Gaps.remove(Components.Html.wrapper.children);\n });\n\n return Gaps;\n};\n\nexport default _Gaps;\n","/**\n * Finds siblings nodes of the passed node.\n *\n * @param {Element} node\n * @return {Array}\n */\nexport function siblings(node) {\n if (node && node.parentNode) {\n let n = node.parentNode.firstChild;\n let matched = [];\n\n for (; n; n = n.nextSibling) {\n if (n.nodeType === 1 && n !== node) {\n matched.push(n);\n }\n }\n\n return matched;\n }\n\n return [];\n}\n\n/**\n * Checks if passed node exist and is a valid element.\n *\n * @param {Element} node\n * @return {Boolean}\n */\nexport function exist(node) {\n if (node && node instanceof window.HTMLElement) {\n return true;\n }\n\n return false;\n}\n","import { warn } from '../utils/log';\nimport { exist } from '../utils/dom';\nimport { define } from '../utils/object';\nimport { isString } from '../utils/unit';\n\nconst TRACK_SELECTOR = '[data-glide-el=\"track\"]';\n\nconst _Html = function (Glide, Components, Events) {\n const Html = {\n /**\n * Setup slider HTML nodes.\n *\n * @param {Glide} glide\n */\n mount() {\n this.root = Glide.selector;\n this.track = this.root.querySelector(TRACK_SELECTOR);\n this.slides = Array.prototype.slice.call(this.wrapper.children).filter((slide) => {\n return !slide.classList.contains(Glide.settings.classes.slide.clone);\n });\n },\n };\n\n define(Html, 'root', {\n /**\n * Gets node of the glide main element.\n *\n * @return {Object}\n */\n get() {\n return Html._r;\n },\n\n /**\n * Sets node of the glide main element.\n *\n * @return {Object}\n */\n set(r) {\n if (isString(r)) {\n r = document.querySelector(r);\n }\n\n if (exist(r)) {\n Html._r = r;\n } else {\n warn('Root element must be a existing Html node');\n }\n },\n });\n\n define(Html, 'track', {\n /**\n * Gets node of the glide track with slides.\n *\n * @return {Object}\n */\n get() {\n return Html._t;\n },\n\n /**\n * Sets node of the glide track with slides.\n *\n * @return {Object}\n */\n set(t) {\n if (exist(t)) {\n Html._t = t;\n } else {\n warn(`Could not find track element. Please use ${TRACK_SELECTOR} attribute.`);\n }\n },\n });\n\n define(Html, 'wrapper', {\n /**\n * Gets node of the slides wrapper.\n *\n * @return {Object}\n */\n get() {\n return Html.track.children[0];\n },\n });\n\n return Html;\n};\n\nexport default _Html;\n","import { define } from '../utils/object';\n\nconst _Clones = function (Glide, Components, Events) {\n const Clones = {\n /**\n * Create pattern map and collect slides to be cloned.\n */\n mount() {\n this.items = [];\n\n if (Glide.isType('carousel')) {\n this.items = this.collect();\n }\n },\n\n /**\n * Collect clones with pattern.\n *\n * @return {[]}\n */\n collect(items = []) {\n let { slides } = Components.Html;\n let { perView, classes, cloningRatio } = Glide.settings;\n\n if (slides.length !== 0) {\n const peekIncrementer = +!!Glide.settings.peek;\n const cloneCount = perView + peekIncrementer + Math.round(perView / 2);\n const append = slides.slice(0, cloneCount).reverse();\n const prepend = slides.slice(cloneCount * -1);\n\n for (\n let r = 0;\n r < Math.max(cloningRatio, Math.floor(perView / slides.length));\n r++\n ) {\n for (let i = 0; i < append.length; i++) {\n let clone = append[i].cloneNode(true);\n\n clone.classList.add(classes.slide.clone);\n\n items.push(clone);\n }\n\n for (let i = 0; i < prepend.length; i++) {\n let clone = prepend[i].cloneNode(true);\n\n clone.classList.add(classes.slide.clone);\n\n items.unshift(clone);\n }\n }\n }\n\n return items;\n },\n\n /**\n * Append cloned slides with generated pattern.\n *\n * @return {Void}\n */\n append() {\n let { items } = this;\n let { wrapper, slides } = Components.Html;\n\n const half = Math.floor(items.length / 2);\n const prepend = items.slice(0, half).reverse();\n const append = items.slice(half * -1).reverse();\n const width = `${Components.Sizes.slideWidth}px`;\n\n for (let i = 0; i < append.length; i++) {\n wrapper.appendChild(append[i]);\n }\n\n for (let i = 0; i < prepend.length; i++) {\n wrapper.insertBefore(prepend[i], slides[0]);\n }\n\n for (let i = 0; i < items.length; i++) {\n items[i].style.width = width;\n }\n },\n\n /**\n * Remove all cloned slides.\n *\n * @return {Void}\n */\n remove() {\n let { items } = this;\n\n for (let i = 0; i < items.length; i++) {\n Components.Html.wrapper.removeChild(items[i]);\n }\n },\n };\n\n define(Clones, 'grow', {\n /**\n * Gets additional dimentions value caused by clones.\n *\n * @return {Number}\n */\n get() {\n return (Components.Sizes.slideWidth + Components.Gaps.value) * Clones.items.length;\n },\n });\n\n /**\n * Append additional slide's clones:\n * - while glide's type is `carousel`\n */\n Events.on('update', () => {\n Clones.remove();\n Clones.mount();\n Clones.append();\n });\n\n /**\n * Append additional slide's clones:\n * - while glide's type is `carousel`\n */\n Events.on('build.before', () => {\n if (Glide.isType('carousel')) {\n Clones.append();\n }\n });\n\n /**\n * Remove clones HTMLElements:\n * - on destroying, to bring HTML to its initial state\n */\n Events.on('destroy', () => {\n Clones.remove();\n });\n\n return Clones;\n};\n\nexport default _Clones;\n","import { isString } from '../../utils/unit';\n\nexport default class EventsBinder {\n /**\n * Construct a EventsBinder instance.\n */\n constructor(listeners = {}) {\n this.listeners = listeners;\n }\n\n /**\n * Adds events listeners to arrows HTML elements.\n *\n * @param {String|Array} events\n * @param {Element|Window|Document} el\n * @param {Function} closure\n * @param {Boolean|Object} capture\n * @return {Void}\n */\n on(events, el, closure, capture = false) {\n if (isString(events)) {\n events = [events];\n }\n\n for (let i = 0; i < events.length; i++) {\n this.listeners[events[i]] = closure;\n\n el.addEventListener(events[i], this.listeners[events[i]], capture);\n }\n }\n\n /**\n * Removes event listeners from arrows HTML elements.\n *\n * @param {String|Array} events\n * @param {Element|Window|Document} el\n * @param {Boolean|Object} capture\n * @return {Void}\n */\n off(events, el, capture = false) {\n if (isString(events)) {\n events = [events];\n }\n\n for (let i = 0; i < events.length; i++) {\n el.removeEventListener(events[i], this.listeners[events[i]], capture);\n }\n }\n\n /**\n * Destroy collected listeners.\n *\n * @returns {Void}\n */\n destroy() {\n delete this.listeners;\n }\n}\n","import { warn } from '../utils/log';\nimport { define } from '../utils/object';\n\nconst VALID_DIRECTIONS = ['ltr', 'rtl'];\nconst FLIPED_MOVEMENTS = {\n '>': '<',\n '<': '>',\n '=': '=',\n};\n\nconst _Direction = function (Glide, Components, Events) {\n const Direction = {\n /**\n * Setups gap value based on settings.\n *\n * @return {Void}\n */\n mount() {\n this.value = Glide.settings.direction;\n },\n\n /**\n * Resolves pattern based on direction value\n *\n * @param {String} pattern\n * @returns {String}\n */\n resolve(pattern) {\n const token = pattern.slice(0, 1);\n\n if (this.is('rtl')) {\n return pattern.split(token).join(FLIPED_MOVEMENTS[token]);\n }\n\n return pattern;\n },\n\n /**\n * Checks value of direction mode.\n *\n * @param {String} direction\n * @returns {Boolean}\n */\n is(direction) {\n return this.value === direction;\n },\n\n /**\n * Applies direction class to the root HTML element.\n *\n * @return {Void}\n */\n addClass() {\n Components.Html.root.classList.add(Glide.settings.classes.direction[this.value]);\n },\n\n /**\n * Removes direction class from the root HTML element.\n *\n * @return {Void}\n */\n removeClass() {\n Components.Html.root.classList.remove(Glide.settings.classes.direction[this.value]);\n },\n };\n\n define(Direction, 'value', {\n /**\n * Gets value of the direction.\n *\n * @returns {Number}\n */\n get() {\n return Direction._v;\n },\n\n /**\n * Sets value of the direction.\n *\n * @param {String} value\n * @return {Void}\n */\n set(value) {\n if (VALID_DIRECTIONS.indexOf(value) > -1) {\n Direction._v = value;\n } else {\n warn('Direction value must be `ltr` or `rtl`');\n }\n },\n });\n\n /**\n * Clear direction class:\n * - on destroy to bring HTML to its initial state\n * - on update to remove class before reappling bellow\n */\n Events.on(['destroy', 'update'], () => {\n Direction.removeClass();\n });\n\n /**\n * Remount component:\n * - on update to reflect changes in direction value\n */\n Events.on('update', () => {\n Direction.mount();\n });\n\n /**\n * Apply direction class:\n * - before building to apply class for the first time\n * - on updating to reapply direction class that may changed\n */\n Events.on(['build.before', 'update'], () => {\n Direction.addClass();\n });\n\n return Direction;\n};\n\nexport default _Direction;\n","/**\n * Reflects value of glide movement.\n *\n * @param {Object} Glide\n * @param {Object} Components\n * @return {Object}\n */\nexport default function rtl(Glide, Components) {\n return {\n /**\n * Negates the passed translate if glide is in RTL option.\n *\n * @param {Number} translate\n * @return {Number}\n */\n modify(translate) {\n if (Components.Direction.is('rtl')) {\n return -translate;\n }\n\n return translate;\n },\n };\n}\n","/**\n * Updates glide movement with a `gap` settings.\n *\n * @param {Object} Glide\n * @param {Object} Components\n * @return {Object}\n */\nexport default function gap(Glide, Components) {\n return {\n /**\n * Modifies passed translate value with number in the `gap` settings.\n *\n * @param {Number} translate\n * @return {Number}\n */\n modify(translate) {\n const multiplier = Components.Html.slides.reduce(\n (val, slide, index) => (index < Glide.index ? val + Components.Gaps.value : val),\n 0\n );\n return translate + multiplier;\n },\n };\n}\n","/**\n * Updates glide movement with width of additional clones width.\n *\n * @param {Object} Glide\n * @param {Object} Components\n * @return {Object}\n */\nexport default function grow(Glide, Components) {\n return {\n /**\n * Adds to the passed translate width of the half of clones.\n *\n * @param {Number} translate\n * @return {Number}\n */\n modify(translate) {\n return translate + Components.Clones.grow / 2;\n },\n };\n}\n","import { isObject } from '../../utils/unit';\n\n/**\n * Updates glide movement with a `peek` settings.\n *\n * @param {Object} Glide\n * @param {Object} Components\n * @return {Object}\n */\nexport default function peek(Glide, Components) {\n return {\n /**\n * Modifies passed translate value with a `peek` setting.\n *\n * @param {Number} translate\n * @return {Number}\n */\n modify(translate) {\n if (Glide.settings.focusAt >= 0) {\n let peek = Components.Peek.value;\n\n if (isObject(peek)) {\n return translate - peek.before;\n }\n\n return translate - peek;\n }\n\n return translate;\n },\n };\n}\n","/**\n * Updates glide movement with a `focusAt` settings.\n *\n * @param {Object} Glide\n * @param {Object} Components\n * @return {Object}\n */\nexport default function focusing(Glide, Components) {\n return {\n /**\n * Modifies passed translate value with index in the `focusAt` setting.\n *\n * @param {Number} translate\n * @return {Number}\n */\n modify(translate) {\n const gap = Components.Gaps.value;\n const width = Components.Sizes.width;\n const focusAt = Glide.settings.focusAt;\n const slideWidth = Components.Sizes.slideWidth;\n\n if (focusAt === 'center') {\n return translate - (width / 2 - slideWidth / 2);\n }\n return translate - slideWidth * focusAt - gap * focusAt;\n },\n };\n}\n","import mutator from '../mutator/index';\n\nconst _Translate = function (Glide, Components, Events) {\n const Translate = {\n /**\n * Sets value of translate on HTML element.\n *\n * @param {Number} value\n * @return {Void}\n */\n set(value) {\n let transform = mutator(Glide, Components).mutate(value);\n\n Components.Html.wrapper.style.transform = `translate3d(${-1 * transform}px, 0px, 0px)`;\n },\n\n /**\n * Removes value of translate from HTML element.\n *\n * @return {Void}\n */\n remove() {\n Components.Html.wrapper.style.transform = '';\n },\n\n /**\n * @return {number}\n */\n getStartIndex() {\n const length = Components.Sizes.length;\n const index = Glide.index;\n const perView = Glide.settings.perView;\n\n if (Components.Run.isOffset('>') || Components.Run.isOffset('|>')) {\n return length + (index - perView);\n }\n\n // \"modulo length\" converts an index that equals length to zero\n return (index + perView) % length;\n },\n\n /**\n * @return {number}\n */\n getTravelDistance() {\n const travelDistance = Components.Sizes.wrapperSize;\n\n if (Components.Run.isOffset('>') || Components.Run.isOffset('|>')) {\n // reverse travel distance so that we don't have to change subtract operations\n return travelDistance * -1;\n }\n\n return travelDistance;\n },\n };\n\n /**\n * Set new translate value:\n * - on move to reflect index change\n * - on updating via API to reflect possible changes in options\n */\n Events.on('move', (context) => {\n if (!Glide.isType('carousel') || !Components.Run.isOffset()) {\n return Translate.set(context.movement);\n }\n\n Components.Transition.after(() => {\n Events.emit('translate.jump');\n let pos = 0;\n for (let i = 0; i < Glide.index; i++) {\n pos += Components.Sizes.getCurrentSlideWidth(i);\n }\n Translate.set(pos);\n });\n\n const startWidth = Components.Sizes.slideWidth * Components.Translate.getStartIndex();\n return Translate.set(startWidth - Components.Translate.getTravelDistance());\n });\n\n /**\n * Remove translate:\n * - on destroying to bring markup to its inital state\n */\n Events.on('destroy', () => {\n Translate.remove();\n });\n\n return Translate;\n};\n\nexport default _Translate;\n","/**\n * Test via a getter in the options object to see\n * if the passive property is accessed.\n *\n * @see https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n */\n\nlet supportsPassive = false;\n\ntry {\n let opts = Object.defineProperty({}, 'passive', {\n get() {\n supportsPassive = true;\n }\n });\n\n window.addEventListener('testPassive', null, opts);\n window.removeEventListener('testPassive', null, opts);\n} catch (e) {}\n\nexport default supportsPassive;\n","import { throttle } from '../utils/wait';\nimport { toInt, toFloat } from '../utils/unit';\nimport supportsPassive from '../utils/detect-passive-event';\n\nimport EventsBinder from '../core/event/events-binder';\n\nconst START_EVENTS = ['touchstart', 'mousedown'];\nconst MOVE_EVENTS = ['touchmove', 'mousemove'];\nconst END_EVENTS = ['touchend', 'touchcancel', 'mouseup', 'mouseleave'];\nconst MOUSE_EVENTS = ['mousedown', 'mousemove', 'mouseup', 'mouseleave'];\n\nconst _Swipe = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n let swipeSin = 0;\n let swipeStartX = 0;\n let swipeStartY = 0;\n let disabled = false;\n let capture = supportsPassive ? { passive: true } : false;\n\n const Swipe = {\n /**\n * Initializes swipe bindings.\n *\n * @return {Void}\n */\n mount() {\n if (Glide.settings.swipeAble) this.bindSwipeStart();\n },\n\n /**\n * Handler for `swipestart` event. Calculates entry points of the user's tap.\n *\n * @param {Object} event\n * @return {Void}\n */\n start(event) {\n if (!disabled && !Glide.disabled) {\n this.disable();\n\n let swipe = this.touches(event);\n\n swipeSin = null;\n swipeStartX = toInt(swipe.pageX);\n swipeStartY = toInt(swipe.pageY);\n\n this.bindSwipeMove();\n this.bindSwipeEnd();\n\n Events.emit('swipe.start');\n }\n },\n\n /**\n * Handler for `swipemove` event. Calculates user's tap angle and distance.\n *\n * @param {Object} event\n */\n move(event) {\n if (!Glide.disabled) {\n const { touchAngle, touchRatio, classes } = Glide.settings;\n\n let swipe = this.touches(event);\n\n let subExSx = toInt(swipe.pageX) - swipeStartX;\n let subEySy = toInt(swipe.pageY) - swipeStartY;\n let powEX = Math.abs(subExSx << 2);\n let powEY = Math.abs(subEySy << 2);\n let swipeHypotenuse = Math.sqrt(powEX + powEY);\n let swipeCathetus = Math.sqrt(powEY);\n\n swipeSin = Math.asin(swipeCathetus / swipeHypotenuse);\n\n if ((swipeSin * 180) / Math.PI < touchAngle) {\n event.stopPropagation();\n\n Components.Move.make(subExSx * toFloat(touchRatio));\n\n Components.Html.root.classList.add(classes.dragging);\n\n Events.emit('swipe.move');\n } else {\n return false;\n }\n }\n },\n\n /**\n * Handler for `swipeend` event. Finitializes user's tap and decides about glide move.\n *\n * @param {Object} event\n * @return {Void}\n */\n end(event) {\n if (!Glide.disabled) {\n const { perSwipe, touchAngle, classes, touchRatio } = Glide.settings;\n\n let swipe = this.touches(event);\n let threshold = this.threshold(event);\n\n let swipeDistance = swipe.pageX - swipeStartX;\n let swipeDeg = (swipeSin * 180) / Math.PI;\n\n this.enable();\n\n if (swipeDistance > threshold && swipeDeg < touchAngle) {\n Components.Run.make(\n Components.Direction.resolve(`${perSwipe}<`),\n swipeDistance * touchRatio\n );\n } else if (swipeDistance < -threshold && swipeDeg < touchAngle) {\n Components.Run.make(\n Components.Direction.resolve(`${perSwipe}>`),\n swipeDistance * touchRatio\n );\n } else {\n // While swipe don't reach distance apply previous transform.\n Components.Move.make();\n }\n\n Components.Html.root.classList.remove(classes.dragging);\n\n this.unbindSwipeMove();\n this.unbindSwipeEnd();\n\n Events.emit('swipe.end');\n }\n },\n\n /**\n * Binds swipe's starting event.\n *\n * @return {Void}\n */\n bindSwipeStart() {\n const { swipeThreshold, dragThreshold } = Glide.settings;\n\n if (swipeThreshold) {\n Binder.on(\n START_EVENTS[0],\n Components.Html.wrapper,\n (event) => {\n this.start(event);\n },\n capture\n );\n }\n\n if (dragThreshold) {\n Binder.on(\n START_EVENTS[1],\n Components.Html.wrapper,\n (event) => {\n this.start(event);\n },\n capture\n );\n }\n },\n\n /**\n * Unbinds swipe's starting event.\n *\n * @return {Void}\n */\n unbindSwipeStart() {\n Binder.off(START_EVENTS[0], Components.Html.wrapper, capture);\n Binder.off(START_EVENTS[1], Components.Html.wrapper, capture);\n },\n\n /**\n * Binds swipe's moving event.\n *\n * @return {Void}\n */\n bindSwipeMove() {\n Binder.on(\n MOVE_EVENTS,\n Components.Html.wrapper,\n throttle((event) => {\n this.move(event);\n }, Glide.settings.throttle),\n capture\n );\n },\n\n /**\n * Unbinds swipe's moving event.\n *\n * @return {Void}\n */\n unbindSwipeMove() {\n Binder.off(MOVE_EVENTS, Components.Html.wrapper, capture);\n },\n\n /**\n * Binds swipe's ending event.\n *\n * @return {Void}\n */\n bindSwipeEnd() {\n Binder.on(END_EVENTS, Components.Html.wrapper, (event) => {\n this.end(event);\n });\n },\n\n /**\n * Unbinds swipe's ending event.\n *\n * @return {Void}\n */\n unbindSwipeEnd() {\n Binder.off(END_EVENTS, Components.Html.wrapper);\n },\n\n /**\n * Normalizes event touches points accorting to different types.\n *\n * @param {Object} event\n */\n touches(event) {\n if (MOUSE_EVENTS.indexOf(event.type) > -1) {\n return event;\n }\n\n return event.touches[0] || event.changedTouches[0];\n },\n\n /**\n * Gets value of minimum swipe distance settings based on event type.\n *\n * @return {Number}\n */\n threshold(event) {\n let settings = Glide.settings;\n\n if (MOUSE_EVENTS.indexOf(event.type) > -1) {\n return settings.dragThreshold;\n }\n\n return settings.swipeThreshold;\n },\n\n /**\n * Enables swipe event.\n *\n * @return {self}\n */\n enable() {\n disabled = false;\n\n Components.Transition.enable();\n\n return this;\n },\n\n /**\n * Disables swipe event.\n *\n * @return {self}\n */\n disable() {\n disabled = true;\n\n Components.Transition.disable();\n\n return this;\n },\n };\n\n /**\n * Add component class:\n * - after initial building\n */\n Events.on('build.after', () => {\n Components.Html.root.classList.add(Glide.settings.classes.swipeable);\n });\n\n /**\n * Remove swiping bindings:\n * - on destroying, to remove added EventListeners\n */\n Events.on('destroy', () => {\n Swipe.unbindSwipeStart();\n Swipe.unbindSwipeMove();\n Swipe.unbindSwipeEnd();\n Binder.destroy();\n });\n\n return Swipe;\n};\n\nexport default _Swipe;\n","import { siblings } from '../utils/dom';\nimport { define } from '../utils/object';\nimport supportsPassive from '../utils/detect-passive-event';\n\nimport EventsBinder from '../core/event/events-binder';\n\nconst ELEMENT_SELECTOR = '[data-glide-el]';\nconst NAV_SELECTOR = '[data-glide-el=\"controls[nav]\"]';\nconst CONTROLS_SELECTOR = '[data-glide-el^=\"controls\"]';\nconst PREVIOUS_CONTROLS_SELECTOR = '[data-glide-dir*=\"<\"]';\nconst NEXT_CONTROLS_SELECTOR = '[data-glide-dir*=\">\"]';\n\nconst _Controls = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n const capture = supportsPassive ? { passive: true } : false;\n\n const Controls = {\n /**\n * Inits arrows. Binds events listeners\n * to the arrows HTML elements.\n *\n * @return {Void}\n */\n mount() {\n /**\n * Collection of navigation HTML elements.\n *\n * @private\n * @type {Array}\n */\n this._n = [];\n Components.Html.root.querySelectorAll(NAV_SELECTOR).forEach((nav) => {\n const el = nav.parentElement.closest(ELEMENT_SELECTOR);\n if (!el || !Components.Html.root.contains(el)) {\n this._n.push(nav);\n }\n });\n\n /**\n * Collection of controls HTML elements.\n *\n * @private\n * @type {Array}\n */\n this._c = [];\n Components.Html.root.querySelectorAll(CONTROLS_SELECTOR).forEach((control) => {\n const el = control.parentElement.closest(ELEMENT_SELECTOR);\n if (!el || !Components.Html.root.contains(el)) {\n this._c.push(control);\n }\n });\n\n /**\n * Collection of arrow control HTML elements.\n *\n * @private\n * @type {Object}\n */\n this._arrowControls = {\n previous: [],\n next: [],\n };\n\n this._c.forEach((control) => {\n control.querySelectorAll(PREVIOUS_CONTROLS_SELECTOR).forEach((prev) => {\n this._arrowControls.previous.push(prev);\n });\n control.querySelectorAll(NEXT_CONTROLS_SELECTOR).forEach((next) => {\n this._arrowControls.next.push(next);\n });\n });\n\n this.addBindings();\n },\n\n /**\n * Sets active class to current slide.\n *\n * @return {Void}\n */\n setActive() {\n for (let i = 0; i < this._n.length; i++) {\n this.addClass(this._n[i].children);\n }\n },\n\n /**\n * Removes active class to current slide.\n *\n * @return {Void}\n */\n removeActive() {\n for (let i = 0; i < this._n.length; i++) {\n this.removeClass(this._n[i].children);\n }\n },\n\n /**\n * Toggles active class on items inside navigation.\n *\n * @param {HTMLElement} controls\n * @return {Void}\n */\n addClass(controls) {\n const settings = Glide.settings;\n const item = controls[Glide.index];\n\n if (!item) {\n return;\n }\n\n if (item) {\n item.classList.add(settings.classes.nav.active);\n\n siblings(item).forEach((sibling) => {\n sibling.classList.remove(settings.classes.nav.active);\n });\n }\n },\n\n /**\n * Removes active class from active control.\n *\n * @param {HTMLElement} controls\n * @return {Void}\n */\n removeClass(controls) {\n const item = controls[Glide.index];\n\n if (item) {\n item.classList.remove(Glide.settings.classes.nav.active);\n }\n },\n\n /**\n * Calculates, removes or adds `Glide.settings.classes.disabledArrow` class on the control arrows\n */\n setArrowState() {\n if (Glide.settings.rewind) {\n return;\n }\n\n const next = Controls._arrowControls.next;\n const previous = Controls._arrowControls.previous;\n\n this.resetArrowState(next, previous);\n\n if (Glide.index <= 0) {\n this.disableArrow(previous);\n }\n\n if (Glide.index >= Components.Run.length) {\n this.disableArrow(next);\n }\n },\n\n /**\n * Removes `Glide.settings.classes.disabledArrow` from given NodeList elements\n *\n * @param {NodeList[]} lists\n */\n resetArrowState(...lists) {\n const settings = Glide.settings;\n lists.forEach((list) => {\n list.forEach((element) => {\n element.classList.remove(settings.classes.arrow.disabled);\n element.removeAttribute('disabled');\n });\n });\n },\n\n /**\n * Adds `Glide.settings.classes.disabledArrow` to given NodeList elements\n *\n * @param {NodeList[]} lists\n */\n disableArrow(...lists) {\n const settings = Glide.settings;\n\n lists.forEach((list) => {\n list.forEach((element) => {\n element.classList.add(settings.classes.arrow.disabled);\n element.setAttribute('disabled', '');\n });\n });\n },\n\n /**\n * Adds handles to the each group of controls.\n *\n * @return {Void}\n */\n addBindings() {\n for (let i = 0; i < this._c.length; i++) {\n this.bind(this._c[i].children);\n }\n },\n\n /**\n * Removes handles from the each group of controls.\n *\n * @return {Void}\n */\n removeBindings() {\n for (let i = 0; i < this._c.length; i++) {\n this.unbind(this._c[i].children);\n }\n },\n\n /**\n * Binds events to arrows HTML elements.\n *\n * @param {HTMLCollection} elements\n * @return {Void}\n */\n bind(elements) {\n for (let i = 0; i < elements.length; i++) {\n Binder.on('click', elements[i], this.click);\n }\n },\n\n /**\n * Unbinds events binded to the arrows HTML elements.\n *\n * @param {HTMLCollection} elements\n * @return {Void}\n */\n unbind(elements) {\n for (let i = 0; i < elements.length; i++) {\n Binder.off(['click', 'touchstart'], elements[i]);\n }\n },\n\n /**\n * Handles `click` event on the arrows HTML elements.\n * Moves slider in direction given via the\n * `data-glide-dir` attribute.\n *\n * @param {Object} event\n * @return {void}\n */\n click(event) {\n if (!supportsPassive && event.type === 'touchstart') {\n event.preventDefault();\n }\n\n const direction = event.currentTarget.getAttribute('data-glide-dir');\n\n Components.Run.make(Components.Direction.resolve(direction));\n },\n };\n\n define(Controls, 'items', {\n /**\n * Gets collection of the controls HTML elements.\n *\n * @return {HTMLElement[]}\n */\n get() {\n return Controls._c;\n },\n });\n\n /**\n * Swap active class of current navigation item:\n * - after mounting to set it to initial index\n * - after each move to the new index\n */\n Events.on(['mount.after', 'move.after'], () => {\n Controls.setActive();\n });\n\n /**\n * Add or remove disabled class of arrow elements\n */\n Events.on(['mount.after', 'run'], () => {\n Controls.setArrowState();\n });\n\n /**\n * Remove bindings and HTML Classes:\n * - on destroying, to bring markup to its initial state\n */\n Events.on('destroy', () => {\n Controls.removeBindings();\n Controls.removeActive();\n Binder.destroy();\n });\n\n return Controls;\n};\n\nexport default _Controls;\n","import EventsBinder from '../core/event/events-binder';\n\nconst _Keyboard = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n const compensateScroll = () => {\n /*\n * Yeah, we have \"overflow: hidden;\" on track element,\n * but if we try to change slides by pressing \"tab\",\n * scroll position is changed by native browser logic.\n * unfortunately we dont have the way to prevent only scroll effect,\n * so we will just redefine it's value to zero state;\n * */\n Components.Html.track.scrollLeft = 0;\n };\n\n const Keyboard = {\n /**\n * Binds keyboard events on component mount.\n *\n * @return {Void}\n */\n mount() {\n if (Glide.settings.keyboard) {\n this.bind();\n }\n },\n\n /**\n * Adds keyboard press events.\n *\n * @return {Void}\n */\n bind() {\n Binder.on('keyup', document, this.press);\n Binder.on('scroll', Components.Html.track, compensateScroll);\n },\n\n /**\n * Removes keyboard press events.\n *\n * @return {Void}\n */\n unbind() {\n Binder.off('keyup', document);\n Binder.off('scroll', Components.Html.track);\n },\n\n /**\n * Handles keyboard's arrows press and moving glide forward and backward.\n *\n * @param {Object} event\n * @return {Void}\n */\n press(event) {\n const { perSwipe } = Glide.settings;\n\n if (event.keyCode === 39) {\n Components.Run.make(Components.Direction.resolve(`${perSwipe}>`));\n }\n\n if (event.keyCode === 37) {\n Components.Run.make(Components.Direction.resolve(`${perSwipe}<`));\n }\n\n if (event.keyCode === 9 && Components.Html.root.contains(document.activeElement)) {\n const index = Components.Html.slides.findIndex((slide) =>\n slide.contains(document.activeElement)\n );\n if (index >= 0) {\n const realTranslate =\n (Components.Peek.value.before || Components.Peek.value) -\n Components.Move.translate;\n let pos = Components.Html.slides.reduce((val, slide, i) => {\n return i < index\n ? val + Components.Sizes.getCurrentSlideWidth(i) + Components.Gaps.value\n : val;\n }, 0);\n const rightPos = Components.Sizes.getCurrentSlideWidth(index) + pos;\n if (\n realTranslate + pos < 0 ||\n Components.Sizes.width - realTranslate < rightPos\n ) {\n Components.Run.make(`=${index}`);\n }\n }\n }\n },\n };\n\n /**\n * Remove bindings from keyboard:\n * - on destroying to remove added events\n * - on updating to remove events before remounting\n */\n Events.on(['destroy', 'update'], () => {\n Keyboard.unbind();\n });\n\n /**\n * Remount component\n * - on updating to reflect potential changes in settings\n */\n Events.on('update', () => {\n Keyboard.mount();\n });\n\n /**\n * Destroy binder:\n * - on destroying to remove listeners\n */\n Events.on('destroy', () => {\n Binder.destroy();\n });\n\n return Keyboard;\n};\n\nexport default _Keyboard;\n","import { warn } from '../utils/log';\nimport { throttle } from '../utils/wait';\nimport { isObject } from '../utils/unit';\nimport { sortKeys, mergeOptions } from '../utils/object';\n\nimport EventsBinder from '../core/event/events-binder';\n\n/**\n * Sorts keys of breakpoint object so they will be ordered from lower to bigger.\n *\n * @param {Object} points\n * @returns {Object}\n */\nfunction sortBreakpoints(points) {\n if (isObject(points)) {\n return sortKeys(points);\n } else {\n warn(`Breakpoints option must be an object`);\n }\n\n return {};\n}\n\nconst _Brakpoints = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n /**\n * Holds reference to settings.\n *\n * @type {Object}\n */\n let settings = Glide.settings;\n\n /**\n * Holds reference to breakpoints object in settings. Sorts breakpoints\n * from smaller to larger. It is required in order to proper\n * matching currently active breakpoint settings.\n *\n * @type {Object}\n */\n let points = sortBreakpoints(settings.breakpoints);\n\n /**\n * Cache initial settings before overwritting.\n *\n * @type {Object}\n */\n let defaults = Object.assign({}, settings);\n\n const Breakpoints = {\n /**\n * Matches settings for currectly matching media breakpoint.\n *\n * @param {Object} points\n * @returns {Object}\n */\n match(points) {\n if (typeof window.matchMedia !== 'undefined') {\n for (let point in points) {\n if (points.hasOwnProperty(point)) {\n if (window.matchMedia(`(max-width: ${point}px)`).matches) {\n return points[point];\n }\n }\n }\n }\n\n return defaults;\n },\n };\n\n /**\n * Overwrite instance settings with currently matching breakpoint settings.\n * This happens right after component initialization.\n */\n Object.assign(settings, Breakpoints.match(points));\n\n /**\n * Update glide with settings of matched brekpoint:\n * - window resize to update slider\n */\n Binder.on(\n 'resize',\n window,\n throttle(() => {\n Glide.settings = mergeOptions(settings, Breakpoints.match(points));\n }, Glide.settings.throttle)\n );\n\n /**\n * Resort and update default settings:\n * - on reinit via API, so breakpoint matching will be performed with options\n */\n Events.on('update', () => {\n points = sortBreakpoints(points);\n\n defaults = Object.assign({}, settings);\n });\n\n /**\n * Unbind resize listener:\n * - on destroying, to bring markup to its initial state\n */\n Events.on('destroy', () => {\n Binder.off('resize', window);\n });\n\n return Breakpoints;\n};\n\nexport default _Brakpoints;\n","import Core from './core';\n\n// Required components\nimport Run from './components/run';\nimport Gaps from './components/gaps';\nimport Html from './components/html';\nimport Peek from './components/peek';\nimport Move from './components/move';\nimport Sizes from './components/sizes';\nimport Build from './components/build';\nimport Clones from './components/clones';\nimport Resize from './components/resize';\nimport Direction from './components/direction';\nimport Translate from './components/translate';\nimport Transition from './components/transition';\n\n// Optional components\nimport Swipe from './components/swipe';\nimport Images from './components/images';\nimport Anchors from './components/anchors';\nimport Controls from './components/controls';\nimport Keyboard from './components/keyboard';\nimport Autoplay from './components/autoplay';\nimport Breakpoints from './components/breakpoints';\n\nconst COMPONENTS = {\n // Required\n Html,\n Translate,\n Transition,\n Direction,\n Peek,\n Sizes,\n Gaps,\n Move,\n Clones,\n Resize,\n Build,\n Run,\n\n // Optional\n Swipe,\n Images,\n Anchors,\n Controls,\n Keyboard,\n Autoplay,\n Breakpoints,\n};\n\nexport default class Glide extends Core {\n mount(extensions = {}) {\n return super.mount({ ...COMPONENTS, ...extensions });\n }\n}\n","import { warn } from '../utils/log';\nimport { isFunction } from '../utils/unit';\n\nimport Rtl from './transformers/rtl';\nimport Gap from './transformers/gap';\nimport Grow from './transformers/grow';\nimport Peeking from './transformers/peeking';\nimport Focusing from './transformers/focusing';\n\n/**\n * Applies diffrent transformers on translate value.\n *\n * @param {Object} Glide\n * @param {Object} Components\n * @return {Object}\n */\nexport default function rtl(Glide, Components, Events) {\n /**\n * Merge instance transformers with collection of default transformers.\n * It's important that the Rtl component be last on the list,\n * so it reflects all previous transformations.\n *\n * @type {Array}\n */\n let TRANSFORMERS = [Gap, Grow, Peeking, Focusing].concat(Glide._t, [Rtl]);\n\n return {\n /**\n * Piplines translate value with registered transformers.\n *\n * @param {Number} translate\n * @return {Number}\n */\n mutate(translate) {\n for (var i = 0; i < TRANSFORMERS.length; i++) {\n let transformer = TRANSFORMERS[i];\n\n if (isFunction(transformer) && isFunction(transformer().modify)) {\n translate = transformer(Glide, Components, Events).modify(translate);\n } else {\n warn(\n 'Transformer should be a function that returns an object with `modify()` method'\n );\n }\n }\n\n return translate;\n },\n };\n}\n","import { define } from '../utils/object';\n\nconst _Transition = function (Glide, Components, Events) {\n /**\n * Holds inactivity status of transition.\n * When true transition is not applied.\n *\n * @type {Boolean}\n */\n let disabled = false;\n\n const Transition = {\n /**\n * Composes string of the CSS transition.\n *\n * @param {String} property\n * @return {String}\n */\n compose(property) {\n let settings = Glide.settings;\n\n if (!disabled) {\n return `${property} ${this.duration}ms ${settings.animationTimingFunc}`;\n }\n\n return `${property} 0ms ${settings.animationTimingFunc}`;\n },\n\n /**\n * Sets value of transition on HTML element.\n *\n * @param {String=} property\n * @return {Void}\n */\n set(property = 'transform') {\n Components.Html.wrapper.style.transition = this.compose(property);\n },\n\n /**\n * Removes value of transition from HTML element.\n *\n * @return {Void}\n */\n remove() {\n Components.Html.wrapper.style.transition = '';\n },\n\n /**\n * Runs callback after animation.\n *\n * @param {Function} callback\n * @return {Void}\n */\n after(callback) {\n setTimeout(() => {\n callback();\n }, this.duration);\n },\n\n /**\n * Enable transition.\n *\n * @return {Void}\n */\n enable() {\n disabled = false;\n\n this.set();\n },\n\n /**\n * Disable transition.\n *\n * @return {Void}\n */\n disable() {\n disabled = true;\n\n this.set();\n },\n };\n\n define(Transition, 'duration', {\n /**\n * Gets duration of the transition based\n * on currently running animation type.\n *\n * @return {Number}\n */\n get() {\n let settings = Glide.settings;\n\n if (Glide.isType('slider') && Components.Run.offset) {\n return settings.rewindDuration;\n }\n\n return settings.animationDuration;\n },\n });\n\n /**\n * Set transition `style` value:\n * - on each moving, because it may be cleared by offset move\n */\n Events.on('move', () => {\n Transition.set();\n });\n\n /**\n * Disable transition:\n * - before initial build to avoid transitioning from `0` to `startAt` index\n * - while resizing window and recalculating dimentions\n * - on jumping from offset transition at start and end edges in `carousel` type\n */\n Events.on(['build.before', 'resize', 'translate.jump'], () => {\n Transition.disable();\n });\n\n /**\n * Enable transition:\n * - on each running, because it may be disabled by offset move\n */\n Events.on('run', () => {\n Transition.enable();\n });\n\n /**\n * Remove transition:\n * - on destroying to bring markup to its inital state\n */\n Events.on('destroy', () => {\n Transition.remove();\n });\n\n return Transition;\n};\n\nexport default _Transition;\n","import { define } from '../utils/object';\nimport { toInt, isObject } from '../utils/unit';\n\nconst _Peek = function (Glide, Components, Events) {\n const Peek = {\n /**\n * Setups how much to peek based on settings.\n *\n * @return {Void}\n */\n mount() {\n this.value = Glide.settings.peek;\n },\n };\n\n define(Peek, 'value', {\n /**\n * Gets value of the peek.\n *\n * @returns {Number|Object}\n */\n get() {\n return Peek._v;\n },\n\n /**\n * Sets value of the peek.\n *\n * @param {Number|Object} value\n * @return {Void}\n */\n set(value) {\n if (isObject(value)) {\n value.before = toInt(value.before);\n value.after = toInt(value.after);\n } else {\n value = toInt(value);\n }\n\n Peek._v = value;\n },\n });\n\n define(Peek, 'reductor', {\n /**\n * Gets reduction value caused by peek.\n *\n * @returns {Number}\n */\n get() {\n let value = Peek.value;\n let perView = Glide.settings.perView;\n\n if (isObject(value)) {\n return value.before / perView + value.after / perView;\n }\n\n return (value * 2) / perView;\n },\n });\n\n /**\n * Recalculate peeking sizes on:\n * - when resizing window to update to proper percents\n */\n Events.on(['resize', 'update'], () => {\n Peek.mount();\n });\n\n return Peek;\n};\n\nexport default _Peek;\n","import { define } from '../utils/object';\n\nconst _Sizes = function (Glide, Components, Events) {\n const Sizes = {\n getCurrentSlideWidth(slide) {\n /**\n * Method calculalates width of current slide\n *\n * @returns {number}\n */\n if (typeof slide === 'number') {\n slide = Components.Html.slides[slide];\n }\n\n return slide.getBoundingClientRect().width;\n },\n };\n\n define(Sizes, 'length', {\n /**\n * Gets count number of the slides.\n *\n * @return {Number}\n */\n get() {\n return Components.Html.slides.length;\n },\n });\n\n define(Sizes, 'width', {\n /**\n * Gets width value of the slider (visible area).\n *\n * @return {Number}\n */\n get() {\n return Components.Html.track.getBoundingClientRect().width;\n },\n });\n\n define(Sizes, 'wrapperSize', {\n /**\n * Gets size of the slides wrapper.\n *\n * @return {Number}\n */\n get() {\n const width = Components.Html.slides.reduce(\n (val, slide) => val + Sizes.getCurrentSlideWidth(slide),\n 0\n );\n return width + Components.Gaps.grow + Components.Clones.grow;\n },\n });\n\n define(Sizes, 'slideWidth', {\n /**\n * Gets width value of a single slide.\n *\n * @return {Number}\n */\n get() {\n const { width } = Sizes;\n const { perView } = Glide.settings;\n return (\n (width -\n (Components.Peek.value.before + Components.Peek.value.after ||\n Components.Peek.value * 2)) /\n perView\n );\n },\n });\n\n return Sizes;\n};\n\nexport default _Sizes;\n","import { define } from '../utils/object';\nimport { toInt, isUndefined } from '../utils/unit';\n\nconst _Move = function (Glide, Components, Events) {\n const Move = {\n /**\n * Constructs move component.\n *\n * @returns {Void}\n */\n mount() {\n this._o = 0;\n },\n\n /**\n * Calculates a movement value based on passed offset and currently active index.\n *\n * @param {Number} offset\n * @return {Void}\n */\n make(offset = 0) {\n this.offset = offset;\n\n Events.emit('move', {\n movement: this.value,\n });\n\n Components.Transition.after(() => {\n Events.emit('move.after', {\n movement: this.value,\n });\n });\n },\n };\n\n define(Move, 'offset', {\n /**\n * Gets an offset value used to modify current translate.\n *\n * @return {Object}\n */\n get() {\n return Move._o;\n },\n\n /**\n * Sets an offset value used to modify current translate.\n *\n * @return {Object}\n */\n set(value) {\n Move._o = !isUndefined(value) ? toInt(value) : 0;\n },\n });\n\n define(Move, 'translate', {\n /**\n * Gets a raw movement value.\n *\n * @return {Number}\n */\n get() {\n return Components.Html.slides.reduce(\n (val, slide, index) =>\n index < Glide.index ? val + Components.Sizes.getCurrentSlideWidth(slide) : val,\n 0\n );\n },\n });\n\n define(Move, 'value', {\n /**\n * Gets an actual movement value corrected by offset.\n *\n * @return {Number}\n */\n get() {\n let offset = this.offset;\n let translate = this.translate;\n\n if (Components.Direction.is('rtl')) {\n return translate + offset;\n }\n\n return translate - offset;\n },\n });\n\n /**\n * Make movement to proper slide on:\n * - before build, so glide will start at `startAt` index\n * - on each standard run to move to newly calculated index\n */\n Events.on(['build.before', 'run'], () => {\n Move.make();\n });\n\n return Move;\n};\n\nexport default _Move;\n","import { throttle } from '../utils/wait';\n\nimport EventsBinder from '../core/event/events-binder';\n\nconst _Resize = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n const Resize = {\n /**\n * Initializes window bindings.\n */\n mount() {\n this.bind();\n },\n\n /**\n * Binds `rezsize` listener to the window.\n * It's a costly event, so we are debouncing it.\n *\n * @return {Void}\n */\n bind() {\n Binder.on(\n 'resize',\n window,\n throttle(() => {\n Events.emit('resize');\n }, Glide.settings.throttle)\n );\n },\n\n /**\n * Unbinds listeners from the window.\n *\n * @return {Void}\n */\n unbind() {\n Binder.off('resize', window);\n },\n };\n\n /**\n * Remove bindings from window:\n * - on destroying, to remove added EventListener\n */\n Events.on('destroy', () => {\n Resize.unbind();\n Binder.destroy();\n });\n\n return Resize;\n};\n\nexport default _Resize;\n","import { siblings } from '../utils/dom';\n\nconst _Build = function (Glide, Components, Events) {\n const Build = {\n /**\n * Init glide building. Adds classes, sets\n * dimensions and setups initial state.\n *\n * @return {Void}\n */\n mount() {\n Events.emit('build.before');\n\n this.typeClass();\n this.activeClass();\n\n Events.emit('build.after');\n },\n\n /**\n * Adds `type` class to the glide element.\n *\n * @return {Void}\n */\n typeClass() {\n Components.Html.root.classList.add(Glide.settings.classes.type[Glide.settings.type]);\n },\n\n /**\n * Sets active class to current slide.\n *\n * @return {Void}\n */\n activeClass() {\n let classes = Glide.settings.classes;\n let slide = Components.Html.slides[Glide.index];\n\n if (slide) {\n slide.classList.add(classes.slide.active);\n\n siblings(slide).forEach((sibling) => {\n sibling.classList.remove(classes.slide.active);\n });\n }\n },\n\n /**\n * Sets preActive class to slide.\n *\n * @return {Void}\n */\n preActiveClass() {\n let classes = Glide.settings.classes;\n let slide = Components.Html.slides[Glide.index];\n\n if (slide) {\n slide.classList.add(classes.slide.preActive);\n\n siblings(slide).forEach((sibling) => {\n sibling.classList.remove(classes.slide.preActive);\n });\n }\n },\n\n /**\n * Removes HTML classes applied at building.\n *\n * @return {Void}\n */\n removeClasses() {\n const { type, slide } = Glide.settings.classes;\n\n Components.Html.root.classList.remove(type[Glide.settings.type]);\n\n Components.Html.slides.forEach((sibling) => {\n sibling.classList.remove(slide.active);\n });\n },\n };\n\n /**\n * Clear building classes:\n * - on destroying to bring HTML to its initial state\n * - on updating to remove classes before remounting component\n */\n Events.on(['destroy', 'update'], () => {\n Build.removeClasses();\n });\n\n /**\n * Remount component:\n * - on resizing of the window to calculate new dimentions\n * - on updating settings via API\n */\n Events.on(['resize', 'update'], () => {\n Build.mount();\n });\n\n /**\n * Swap preActive class of current slide:\n * - before each move to the new index\n */\n Events.on('move', () => {\n Build.preActiveClass();\n });\n\n /**\n * Swap active class of current slide:\n * - after each move to the new index\n */\n Events.on('move.after', () => {\n Build.activeClass();\n });\n\n return Build;\n};\n\nexport default _Build;\n","import { warn } from '../utils/log';\nimport { toInt } from '../utils/unit';\nimport { define } from '../utils/object';\n\nconst _Run = function (Glide, Components, Events) {\n const Run = {\n /**\n * Initializes autorunning of the glide.\n *\n * @return {Void}\n */\n mount() {\n this._o = false;\n },\n\n /**\n * Makes glides running based on the passed moving schema.\n *\n * @param {String} move\n */\n make(move, swipeDistance) {\n if (!Glide.disabled) {\n !Glide.settings.waitForTransition || Glide.disable();\n\n this.move = move;\n\n Events.emit('run.before', this.move);\n\n this.calculate(swipeDistance);\n\n Events.emit('run', this.move);\n\n Components.Transition.after(() => {\n if (this.isStart()) {\n Events.emit('run.start', this.move);\n }\n\n if (this.isEnd()) {\n Events.emit('run.end', this.move);\n }\n\n if (this.isOffset()) {\n this._o = false;\n\n Events.emit('run.offset', this.move);\n }\n\n Events.emit('run.after', this.move);\n\n Glide.enable();\n });\n }\n },\n\n /**\n * Calculates current index based on defined move.\n *\n * @return {Number|Undefined}\n */\n calculate(swipeDistance) {\n const { move, length } = this;\n const { steps, direction } = move;\n // By default assume that size of view is equal to one slide\n let viewSize = 1;\n // While direction is `=` we want jump to\n // a specified index described in steps.\n if (direction === '=') {\n Glide.index = steps;\n return;\n }\n\n // When pattern is equal to `>>` we want\n // fast forward to the last slide.\n if (direction === '>' && steps === '>') {\n Glide.index = length;\n return;\n }\n\n // When pattern is equal to `<<` we want\n // fast forward to the first slide.\n if (direction === '<' && steps === '<') {\n Glide.index = 0;\n\n return;\n }\n\n // pagination movement\n if (direction === '|') {\n viewSize = Glide.settings.perView || 1;\n }\n\n // we are moving forward\n if (direction === '>' || (direction === '|' && steps === '>')) {\n const index = calculateForwardIndex(viewSize, swipeDistance);\n if (index > length) this._o = true;\n\n Glide.index = normalizeForwardIndex(index, viewSize);\n\n return;\n }\n\n // we are moving backward\n if (direction === '<' || (direction === '|' && steps === '<')) {\n const index = calculateBackwardIndex(viewSize, swipeDistance);\n\n if (index < 0) this._o = true;\n\n Glide.index = normalizeBackwardIndex(index, viewSize);\n\n return;\n }\n\n warn(`Invalid direction pattern [${direction}${steps}] has been used`);\n },\n\n /**\n * Checks if we are on the first slide.\n *\n * @return {Boolean}\n */\n isStart() {\n return Glide.index <= 0;\n },\n\n /**\n * Checks if we are on the last slide.\n *\n * @return {Boolean}\n */\n isEnd() {\n return Glide.index >= this.length;\n },\n\n /**\n * Checks if we are making a offset run.\n *\n * @param {String} direction\n * @return {Boolean}\n */\n isOffset(direction = undefined) {\n if (!direction) return this._o;\n\n if (!this._o) return false;\n\n // did we view to the right?\n if (direction === '|>') {\n return this.move.direction === '|' && this.move.steps === '>';\n }\n\n // did we view to the left?\n if (direction === '|<') {\n return this.move.direction === '|' && this.move.steps === '<';\n }\n\n return this.move.direction === direction;\n },\n\n /**\n * Checks if bound mode is active\n *\n * @return {Boolean}\n */\n isBound() {\n return (\n Glide.isType('slider') &&\n Glide.settings.focusAt !== 'center' &&\n Glide.settings.bound\n );\n },\n };\n\n /**\n * Tries to take actual index by swipe distance\n * @param swipeDistance, realPos\n * @return {Number || null}\n */\n\n function getIndexBySwipeDistance(swipeDistance) {\n const realPos = Components.Move.translate - swipeDistance;\n if (realPos < 0) return 0;\n let pos = 0;\n for (let i = 0; i < Components.Html.slides.length; i++) {\n const slideWidth = Components.Sizes.getCurrentSlideWidth(i);\n if (realPos >= pos && realPos < pos + slideWidth) {\n if (realPos >= pos + slideWidth / 2) return i + 1;\n return i;\n }\n\n pos += slideWidth;\n }\n return null;\n }\n\n /**\n * Returns index value to move forward/to the right\n *\n * @param viewSize\n * @returns {Number}\n */\n\n function calculateForwardIndex(viewSize, swipeDistance) {\n const { index } = Glide;\n\n if (Glide.isType('carousel')) return index + viewSize;\n\n if (typeof swipeDistance !== 'undefined') {\n const _index = getIndexBySwipeDistance(swipeDistance);\n if (_index !== null) return _index;\n }\n\n return index + (viewSize - (index % viewSize));\n }\n\n /**\n * Normalizes the given forward index based on glide settings, preventing it to exceed certain boundaries\n *\n * @param index\n * @param length\n * @param viewSize\n * @returns {Number}\n */\n function normalizeForwardIndex(index, viewSize) {\n const { length } = Run;\n\n if (index <= length) return index;\n\n if (Glide.isType('carousel')) return index - (length + 1);\n\n if (Glide.settings.rewind) {\n // bound does funny things with the length, therefor we have to be certain\n // that we are on the last possible index value given by bound\n if (Run.isBound() && !Run.isEnd()) {\n return length;\n }\n\n return 0;\n }\n\n if (Run.isBound()) return length;\n\n return Math.floor(length / viewSize) * viewSize;\n }\n\n /**\n * Calculates index value to move backward/to the left\n *\n * @param viewSize\n * @returns {Number}\n */\n function calculateBackwardIndex(viewSize, swipeDistance) {\n const { index } = Glide;\n\n if (Glide.isType('carousel')) return index - viewSize;\n\n // ensure our back navigation results in the same index as a forward navigation\n // to experience a homogeneous paging\n const view = Math.ceil(index / viewSize);\n\n if (swipeDistance) {\n const _index = getIndexBySwipeDistance(swipeDistance);\n if (_index !== null) return _index;\n }\n\n return (view - 1) * viewSize;\n }\n\n /**\n * Normalizes the given backward index based on glide settings, preventing it to exceed certain boundaries\n *\n * @param index\n * @param length\n * @param viewSize\n * @returns {*}\n */\n function normalizeBackwardIndex(index, viewSize) {\n const { length } = Run;\n\n if (index >= 0) return index;\n\n if (Glide.isType('carousel')) return index + (length + 1);\n\n if (Glide.settings.rewind) {\n // bound does funny things with the length, therefor we have to be certain\n // that we are on first possible index value before we to rewind to the length given by bound\n if (Run.isBound() && Run.isStart()) {\n return length;\n }\n\n return Math.floor(length / viewSize) * viewSize;\n }\n\n return 0;\n }\n\n define(Run, 'move', {\n /**\n * Gets value of the move schema.\n *\n * @returns {Object}\n */\n get() {\n return this._m;\n },\n\n /**\n * Sets value of the move schema.\n *\n * @returns {Object}\n */\n set(value) {\n let step = value.substr(1);\n\n this._m = {\n direction: value.substr(0, 1),\n steps: step ? (toInt(step) ? toInt(step) : step) : 0,\n };\n },\n });\n\n define(Run, 'length', {\n /**\n * Gets value of the running distance based\n * on zero-indexing number of slides.\n *\n * @return {Number}\n */\n get() {\n let { length } = Components.Html.slides;\n // If the `bound` option is active, a maximum running distance should be\n // reduced by `perView` and `focusAt` settings. Running distance\n // should end before creating an empty space after instance.\n //\n // so, in fact this property is used for detect which slide can be latest in active sate\n const last = length - 1;\n if (this.isBound()) {\n const availableSize =\n Components.Sizes.width -\n (Components.Peek.value.before + Components.Peek.value.after ||\n Components.Peek.value * 2);\n let sumWidth = 0;\n for (let i = last; i >= 0; i--) {\n const _width = Components.Sizes.getCurrentSlideWidth(i);\n if (_width + sumWidth <= availableSize) {\n sumWidth += _width + Components.Gaps.value;\n } else {\n return i + 1;\n }\n }\n return 0;\n }\n\n return last;\n },\n });\n\n define(Run, 'offset', {\n /**\n * Gets status of the offsetting flag.\n *\n * @return {Boolean}\n */\n get() {\n return this._o;\n },\n });\n\n return Run;\n};\n\nexport default _Run;\n","import EventsBinder from '../core/event/events-binder';\n\nconst _Images = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n const Images = {\n /**\n * Binds listener to glide wrapper.\n *\n * @return {Void}\n */\n mount() {\n this.bind();\n },\n\n /**\n * Binds `dragstart` event on wrapper to prevent dragging images.\n *\n * @return {Void}\n */\n bind() {\n Binder.on('dragstart', Components.Html.wrapper, this.dragstart);\n },\n\n /**\n * Unbinds `dragstart` event on wrapper.\n *\n * @return {Void}\n */\n unbind() {\n Binder.off('dragstart', Components.Html.wrapper);\n },\n\n /**\n * Event handler. Prevents dragging.\n *\n * @return {Void}\n */\n dragstart(event) {\n event.preventDefault();\n },\n };\n\n /**\n * Remove bindings from images:\n * - on destroying, to remove added EventListeners\n */\n Events.on('destroy', () => {\n Images.unbind();\n Binder.destroy();\n });\n\n return Images;\n};\n\nexport default _Images;\n","import { define } from '../utils/object';\n\nimport EventsBinder from '../core/event/events-binder';\n\nconst _Anchors = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n /**\n * Holds detaching status of anchors.\n * Prevents detaching of already detached anchors.\n *\n * @private\n * @type {Boolean}\n */\n let detached = false;\n\n /**\n * Holds preventing status of anchors.\n * If `true` redirection after click will be disabled.\n *\n * @private\n * @type {Boolean}\n */\n let prevented = false;\n\n const Anchors = {\n /**\n * Setups a initial state of anchors component.\n *\n * @returns {Void}\n */\n mount() {\n /**\n * Holds collection of anchors elements.\n *\n * @private\n * @type {HTMLCollection}\n */\n this._a = Components.Html.wrapper.querySelectorAll('a');\n\n this.bind();\n },\n\n /**\n * Binds events to anchors inside a track.\n *\n * @return {Void}\n */\n bind() {\n Binder.on('click', Components.Html.wrapper, this.click);\n },\n\n /**\n * Unbinds events attached to anchors inside a track.\n *\n * @return {Void}\n */\n unbind() {\n Binder.off('click', Components.Html.wrapper);\n },\n\n /**\n * Handler for click event. Prevents clicks when glide is in `prevent` status.\n *\n * @param {Object} event\n * @return {Void}\n */\n click(event) {\n if (prevented) {\n event.stopPropagation();\n event.preventDefault();\n }\n },\n\n /**\n * Detaches anchors click event inside glide.\n *\n * @return {self}\n */\n detach() {\n prevented = true;\n\n if (!detached) {\n for (var i = 0; i < this.items.length; i++) {\n this.items[i].draggable = false;\n\n this.items[i].setAttribute('data-href', this.items[i].getAttribute('href'));\n\n this.items[i].removeAttribute('href');\n }\n\n detached = true;\n }\n\n return this;\n },\n\n /**\n * Attaches anchors click events inside glide.\n *\n * @return {self}\n */\n attach() {\n prevented = false;\n\n if (detached) {\n for (var i = 0; i < this.items.length; i++) {\n this.items[i].draggable = true;\n\n this.items[i].setAttribute('href', this.items[i].getAttribute('data-href'));\n }\n\n detached = false;\n }\n\n return this;\n },\n };\n\n define(Anchors, 'items', {\n /**\n * Gets collection of the arrows HTML elements.\n *\n * @return {HTMLElement[]}\n */\n get() {\n return Anchors._a;\n },\n });\n\n /**\n * Detach anchors inside slides:\n * - on swiping, so they won't redirect to its `href` attributes\n */\n Events.on('swipe.move', () => {\n Anchors.detach();\n });\n\n /**\n * Attach anchors inside slides:\n * - after swiping and transitions ends, so they can redirect after click again\n */\n Events.on('swipe.end', () => {\n Components.Transition.after(() => {\n Anchors.attach();\n });\n });\n\n /**\n * Unbind anchors inside slides:\n * - on destroying, to bring anchors to its initial state\n */\n Events.on('destroy', () => {\n Anchors.attach();\n Anchors.unbind();\n Binder.destroy();\n });\n\n return Anchors;\n};\n\nexport default _Anchors;\n","import { define } from '../utils/object';\nimport { toInt, isUndefined } from '../utils/unit';\n\nimport EventsBinder from '../core/event/events-binder';\n\nconst _Autoplay = function (Glide, Components, Events) {\n /**\n * Instance of the binder for DOM Events.\n *\n * @type {EventsBinder}\n */\n const Binder = new EventsBinder();\n\n const Autoplay = {\n /**\n * Initializes autoplaying and events.\n *\n * @return {Void}\n */\n mount() {\n this.start();\n\n if (Glide.settings.hoverpause) {\n this.bind();\n }\n },\n\n /**\n * Starts autoplaying in configured interval.\n *\n * @param {Boolean|Number} force Run autoplaying with passed interval regardless of `autoplay` settings\n * @return {Void}\n */\n start() {\n if (Glide.settings.autoplay) {\n if (isUndefined(this._i)) {\n this._i = setInterval(() => {\n this.stop();\n\n Components.Run.make('>');\n\n this.start();\n\n Events.emit('autoplay');\n }, this.time);\n }\n }\n },\n\n /**\n * Stops autorunning of the glide.\n *\n * @return {Void}\n */\n stop() {\n this._i = clearInterval(this._i);\n },\n\n /**\n * Stops autoplaying while mouse is over glide's area.\n *\n * @return {Void}\n */\n bind() {\n Binder.on('mouseenter', Components.Html.root, () => {\n this.stop();\n\n Events.emit('autoplay.enter');\n });\n\n Binder.on('mouseleave', Components.Html.root, () => {\n this.start();\n\n Events.emit('autoplay.leave');\n });\n },\n\n /**\n * Unbind mouseover events.\n *\n * @returns {Void}\n */\n unbind() {\n Binder.off(['mouseover', 'mouseout'], Components.Html.root);\n },\n };\n\n define(Autoplay, 'time', {\n /**\n * Gets time period value for the autoplay interval. Prioritizes\n * times in `data-glide-autoplay` attrubutes over options.\n *\n * @return {Number}\n */\n get() {\n let autoplay = Components.Html.slides[Glide.index].getAttribute('data-glide-autoplay');\n\n if (autoplay) {\n return toInt(autoplay);\n }\n\n return toInt(Glide.settings.autoplay);\n },\n });\n\n /**\n * Stop autoplaying and unbind events:\n * - on destroying, to clear defined interval\n * - on updating via API to reset interval that may changed\n */\n Events.on(['destroy', 'update'], () => {\n Autoplay.unbind();\n });\n\n /**\n * Stop autoplaying:\n * - before each run, to restart autoplaying\n * - on pausing via API\n * - on destroying, to clear defined interval\n * - while starting a swipe\n * - on updating via API to reset interval that may changed\n */\n Events.on(['run.before', 'pause', 'destroy', 'swipe.start', 'update'], () => {\n Autoplay.stop();\n });\n\n /**\n * Start autoplaying:\n * - after each run, to restart autoplaying\n * - on playing via API\n * - while ending a swipe\n */\n Events.on(['run.after', 'play', 'swipe.end'], () => {\n Autoplay.start();\n });\n\n /**\n * Remount autoplaying:\n * - on updating via API to reset interval that may changed\n */\n Events.on('update', () => {\n Autoplay.mount();\n });\n\n /**\n * Destroy a binder:\n * - on destroying glide instance to clearup listeners\n */\n Events.on('destroy', () => {\n Binder.destroy();\n });\n\n return Autoplay;\n};\n\nexport default _Autoplay;\n","import { DcBaseComponent } from '@deleteagency/dc';\nimport Glide from 'project/general/js/_glide';\nimport { deviceObserver } from 'project/general/js/device';\n\nconst IS_SWIPING = 'is-swiping';\n\nexport default class DcExpandGlideSlider extends DcBaseComponent {\n constructor(props) {\n super(props);\n\n this.cards = this.refs.cards || [];\n this.trackWrapper = this.refs.trackWrapper || this.element;\n this.glideOptions = {\n touchRatio: 1,\n bound: true,\n gap: 37,\n perView: 3.5,\n autoplay: 5000,\n };\n }\n\n onInit() {\n this.sliderInit();\n }\n\n onSliderInit = () => {};\n\n onSliderDestroy = () => {};\n\n sliderInit = () => {\n this.unsubscribeResize = deviceObserver.subscribeOnResize(this._calculate);\n this._calculate();\n };\n\n _initSlider = () => {\n this.element.classList.add('is-inited');\n this.slider = new Glide(this.element, this.glideOptions).mount();\n this.slider.on('swipe.move', () => this.element.classList.add(IS_SWIPING));\n this.slider.on('swipe.end', () =>\n setTimeout(() => this.element.classList.remove(IS_SWIPING), 30)\n );\n this.onSliderInit();\n };\n\n _destroySlider = () => {\n if (this.slider) {\n this.element.classList.remove('is-inited');\n this.slider.destroy();\n this.slider = null;\n this.onSliderDestroy();\n }\n };\n\n get _checkEnough() {\n const { cards, trackWrapper } = this;\n let { gap } = this.glideOptions;\n if (typeof gap === 'function') gap = gap();\n const result = cards.reduce(\n (val, card, index) =>\n val +\n card.getBoundingClientRect().width +\n (index < this.cards.length - 1 ? gap : 0),\n 0\n );\n return result > trackWrapper.getBoundingClientRect().width;\n }\n\n _calculate = () => {\n const { slider, element } = this;\n const isEnough = this._checkEnough;\n if (!isEnough && slider) {\n slider.go('=0');\n this._destroySlider();\n } else if (isEnough && !slider) {\n this._initSlider();\n }\n element.classList[isEnough ? 'remove' : 'add']('is-not-enough');\n };\n\n destroy = () => {\n if (this.unsubscribeResize) this.unsubscribeResize();\n this.unsubscribeResize = null;\n this._destroySlider();\n };\n\n onDestroy = () => {\n this.destroy();\n };\n}\n","import DcExpandGlideSlider from 'project/general/js/dc-expand-glide-slider';\nimport { deviceObserver } from 'project/general/js/device';\n\nexport default class Slider extends DcExpandGlideSlider {\n static getNamespace() {\n return 'slider';\n }\n\n static getRequiredRefs() {\n return ['cards'];\n }\n\n onInit() {\n this._checking();\n this._unsubscrbeChange = deviceObserver.subscribeOnChange(this._checking);\n }\n\n _checking = () => {\n if (deviceObserver.is('<', 'tablet')) {\n this.sliderInit();\n } else {\n this.destroy();\n }\n };\n\n onDestroy() {\n this._unsubscrbeChange();\n }\n}\n","import './scss/index.scss';\n\nimport { dcFactory } from '@deleteagency/dc';\nimport Slider from './js/slider.component';\n\ndcFactory.register(Slider);\n","module.exports = {\n viewports: {\n mobile: 375,\n 'mobile-wide': 580,\n tablet: 768,\n desktop: 1024,\n 'desktop-wide': 1280,\n 'desktop-ultra': 1440,\n },\n containerMaxWidth: 1160,\n};\n"],"sourceRoot":""}