{"version":3,"sources":["webpack:///../node_modules/embla-carousel/react.js"],"names":["Object","defineProperty","exports","value","react","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","Alignment","align","viewSize","predefined","start","center","n","end","measure","Number","Limit","min","max","Math","abs","reachedMin","reachedMax","reachedAny","constrain","removeOffset","ceil","Counter","loop","_a","loopEnd","counter","withinLimit","get","set","self","add","clone","EventStore","listeners","node","type","handler","options","addEventListener","push","removeEventListener","removeAll","filter","remove","Vector1D","vector","divide","readNumber","multiply","normalize","subtract","mathSign","deltaAbs","valueB","valueA","groupArray","array","size","groups","slice","arrayKeys","keys","map","arrayLast","lastIndex","removeClass","className","cl","classList","contains","addClass","DragHandler","axis","direction","rootNode","dragFree","dragTracker","location","animation","scrollTo","scrollBody","scrollTarget","index","events","skipSnaps","scrollAxis","scroll","crossAxis","cross","focusNodes","startScroll","startCross","dragStartPoint","activationEvents","interactionEvents","snapForceBoost","mouse","touch","freeForceBoost","baseSpeed","pointerIsDown","preventScroll","preventClick","isMouse","down","evt","button","name","isMoving","clearPreventClick","isNotFocusNode","nodeName","indexOf","preventDefault","pointerDown","useBaseMass","useSpeed","document","move","up","addInteractionEvents","readPoint","emit","cancelable","moveScroll","moveCross","diffScroll","diffCross","diff","pointerMove","applyTo","targetChanged","byDistance","rawForce","pointerUp","force","next","isEdge","baseForce","distance","byIndex","allowedForce","forceFactor","factorAbs","isVigorous","isBelowThreshold","speed","mass","useMass","click","addActivationEvents","clickAllowed","removeAllEvents","ScrollBody","baseMass","decimalPoints","pow","roundToTwoDecimals","round","velocity","acceleration","attraction","attractionDirection","seek","v","iStart","oStart","magnitude","applyForce","settle","hasSettled","update","useBaseSpeed","ScrollBounds","limit","disabled","friction","diffToTarget","toggleActive","active","ScrollContain","contentSize","snaps","snapsAligned","containScroll","scrollBounds","snapsBounded","snapsContained","startSnap","endSnap","lastIndexOf","findDuplicates","measureContained","ScrollLooper","pxToPercent","vectors","shouldLoop","loopDistance","forEach","ScrollProgress","scrollLength","ScrollSnap","alignment","containerRect","slideRects","slidesToScroll","groupedSnaps","alignments","startEdge","endEdge","rect","snap","g","rects","ScrollTarget","scrollSnaps","targetVector","minDistance","d1","d2","shortcut","t1","t2","t3","shortest","scrollSnap","diffToSnap","sort","findTargetSnap","targetSnapDistance","reachedBound","SlideLooper","slideSizesWithGaps","slidesInView","scrollLocation","slides","gap","ascItems","descItems","reverse","loopPoints","findLoopPoints","slidesInGap","concat","endPoints","removeSlideSizes","indexes","from","reduce","a","edge","isStartEdge","offset","slideBounds","findSlideBounds","initial","altered","point","b","getTarget","canLoop","every","clear","style","loopPoint","SlideFocus","eventStore","lastTabPressTime","registerTabPress","event","keyCode","Date","getTime","addFocusEvent","slide","scrollLeft","selectedIndex","floor","Translate","container","containerStyle","translate","transform","to","Engine","root","viewInPx","contentDirection","startIndex","inViewThreshold","getBoundingClientRect","sign","Direction","measureSize","width","height","Axis","totalPercent","sizesInPx","slideSizes","isLast","window","getComputedStyle","endGap","parseFloat","getPropertyValue","SlideSizes","_b","ScrollLimit","indexPrevious","slideIndexes","callback","animationFrame","ifAnimating","cb","requestAnimationFrame","proceed","stop","cancelAnimationFrame","Animation","engine","dragHandler","settled","scrollLooper","slideLooper","startLocation","indexCurrent","distanceDiff","indexDiff","targetIndex","ScrollTo","threshold","thresholds","s","check","list","slideBound","SlidesInView","coords","x","y","startDrag","diffDrag","lastDrag","pointValue","trackPoints","lastMoveTime","touches","c","nowTime","diffTime","currentPoint","trackPoint","p1","p2","DragTracker","scrollProgress","slideFocus","defaultOptions","draggable","draggableClass","draggingClass","selectedClass","EmblaCarousel","sliderRoot","userOptions","time","timeout","optionsPseudo","getListeners","e","off","on","EventEmitter","debouncedResize","activated","rootNodeSize","reActivate","clearTimeout","setTimeout","reInit","optionsBase","setupElements","Error","pseudoString","sliderContainer","querySelector","Array","children","content","JSON","parse","replace","error","activate","partialOptions","deActivate","offsetParent","toggleDraggingClass","toggleSelectedClass","inView","slidesNotInView","newOptions","selectedScrollSnap","jump","canScrollNext","canScrollPrev","containerNode","dangerouslyGetEngine","destroy","previousScrollSnap","scrollNext","scrollPrev","scrollSnapList","slideNodes","useEmblaCarousel","useState","embla","setEmbla","viewport","setViewport","storedOptions","useRef","activeOptions","useMemo","objectA","objectB","current","objectKey","useEffect","createElement","newEmbla_1","undefined"],"mappings":";0FAEAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IAEtD,IAAIC,EAAQ,EAAQ,GAEpB,SAASC,IAeP,OAdAA,EAAWL,OAAOM,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVX,OAAOa,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,GAGFF,EAASW,MAAMC,KAAMR,WAG9B,SAASS,EAAUC,EAAOC,GACxB,IAAIC,EAAa,CACfC,MAKF,WACE,OAAO,GALPC,OAQF,SAAgBC,GACd,OAAOC,EAAID,GAAK,GARhBC,IAAKA,GAWP,SAASA,EAAID,GACX,OAAOJ,EAAWI,EAepB,MAHW,CACTE,QANF,SAAiBF,GACf,MAAqB,iBAAVL,EAJJC,EAAWO,OAAOR,GAKlBE,EAAWF,GAAOK,KAmE7B,SAASI,EAAMC,EAAKC,GAClB,IAAIpB,EAASqB,KAAKC,IAAIH,EAAMC,GAE5B,SAASG,EAAWT,GAClB,OAAOA,EAAIK,EAGb,SAASK,EAAWV,GAClB,OAAOA,EAAIM,EAGb,SAASK,EAAWX,GAClB,OAAOS,EAAWT,IAAMU,EAAWV,GAuBrC,MAVW,CACTY,UAXF,SAAmBZ,GACjB,OAAKW,EAAWX,GACTS,EAAWT,GAAKK,EAAMC,EADFN,GAW3Bd,OAAQA,EACRoB,IAAKA,EACLD,IAAKA,EACLM,WAAYA,EACZD,WAAYA,EACZD,WAAYA,EACZI,aAbF,SA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Y,EAAW3Y,EAAG,GAEd4R,EAAKjU,EAAM8a,WACXG,EAAWhH,EAAG,GACdiH,EAAcjH,EAAG,GAEjBkH,EAAgBnb,EAAMob,OAAOjY,GAC7BkY,EAAgBrb,EAAMsb,SAAQ,WAxBpC,IAAyBC,EAASC,EA6B9B,OA7BqBD,EAyBAJ,EAAcM,QAzBLD,EAyBcrY,EAxBvCvD,OAAO+E,KAAK4W,GAASjb,SAAWV,OAAO+E,KAAK6W,GAASlb,QAAUV,OAAO+E,KAAK4W,GAASpK,OAAM,SAAUuK,GACzG,QAAK9b,OAAOa,UAAUC,eAAeC,KAAK6a,EAASE,IAI5CH,EAAQG,KAAeF,EAAQE,QAoBpCP,EAAcM,QAAUtY,GAGnBgY,EAAcM,UACpB,CAACN,EAAehY,IAYnB,OAXAnD,EAAM2b,WAAU,WACd,GAlC0B,oBAAXhI,QAA0BA,OAAOxL,UAAYwL,OAAOxL,SAASyT,eAkCzDX,EAAU,CAC3B,IAAIY,EAAapE,EAAcwD,EAAUI,GAEzC,OADAL,EAASa,GACF,WACL,OAAOA,EAAWtB,WAGpBS,OAASc,KAEV,CAACb,EAAUI,EAAeL,IACtB,CAACE,EAAaH","file":"assets/5.chunk.4cbd0cd46652dd393402.js","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar react = require('react');\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction Alignment(align, viewSize) {\n var predefined = {\n start: start,\n center: center,\n end: end\n };\n\n function start() {\n return 0;\n }\n\n function center(n) {\n return end(n) / 2;\n }\n\n function end(n) {\n return viewSize - n;\n }\n\n function percent() {\n return viewSize * Number(align);\n }\n\n function measure(n) {\n if (typeof align === 'number') return percent();\n return predefined[align](n);\n }\n\n var self = {\n measure: measure\n };\n return self;\n}\n\nfunction Animation(callback) {\n var animationFrame = 0;\n\n function ifAnimating(active, cb) {\n return function () {\n if (active === !!animationFrame) cb();\n };\n }\n\n function start() {\n animationFrame = window.requestAnimationFrame(callback);\n }\n\n function stop() {\n window.cancelAnimationFrame(animationFrame);\n animationFrame = 0;\n }\n\n var self = {\n proceed: ifAnimating(true, start),\n start: ifAnimating(false, start),\n stop: ifAnimating(true, stop)\n };\n return self;\n}\n\nfunction Axis(axis, contentDirection) {\n var scroll = axis === 'y' ? 'y' : 'x';\n var cross = axis === 'y' ? 'x' : 'y';\n var startEdge = getStartEdge();\n var endEdge = getEndEdge();\n\n function measureSize(rect) {\n var width = rect.width,\n height = rect.height;\n return scroll === 'x' ? width : height;\n }\n\n function getStartEdge() {\n if (scroll === 'y') return 'top';\n return contentDirection === 'rtl' ? 'right' : 'left';\n }\n\n function getEndEdge() {\n if (scroll === 'y') return 'bottom';\n return contentDirection === 'rtl' ? 'left' : 'right';\n }\n\n var self = {\n scroll: scroll,\n cross: cross,\n startEdge: startEdge,\n endEdge: endEdge,\n measureSize: measureSize\n };\n return self;\n}\n\nfunction Limit(min, max) {\n var length = Math.abs(min - max);\n\n function reachedMin(n) {\n return n < min;\n }\n\n function reachedMax(n) {\n return n > max;\n }\n\n function reachedAny(n) {\n return reachedMin(n) || reachedMax(n);\n }\n\n function constrain(n) {\n if (!reachedAny(n)) return n;\n return reachedMin(n) ? min : max;\n }\n\n function removeOffset(n) {\n if (!length) return n;\n return n - length * Math.ceil((n - max) / length);\n }\n\n var self = {\n constrain: constrain,\n length: length,\n max: max,\n min: min,\n reachedAny: reachedAny,\n reachedMax: reachedMax,\n reachedMin: reachedMin,\n removeOffset: removeOffset\n };\n return self;\n}\n\nfunction Counter(max, start, loop) {\n var _a = Limit(0, max),\n min = _a.min,\n constrain = _a.constrain;\n\n var loopEnd = max + 1;\n var counter = withinLimit(start);\n\n function withinLimit(n) {\n return !loop ? constrain(n) : Math.abs((loopEnd + n) % loopEnd);\n }\n\n function get() {\n return counter;\n }\n\n function set(n) {\n counter = withinLimit(n);\n return self;\n }\n\n function add(n) {\n return set(get() + n);\n }\n\n function clone() {\n return Counter(max, get(), loop);\n }\n\n var self = {\n add: add,\n clone: clone,\n get: get,\n set: set,\n min: min,\n max: max\n };\n return self;\n}\n\nfunction Direction(direction) {\n var sign = direction === 'rtl' ? -1 : 1;\n\n function applyTo(n) {\n return n * sign;\n }\n\n var self = {\n applyTo: applyTo\n };\n return self;\n}\n\nfunction EventStore() {\n var listeners = [];\n\n function add(node, type, handler, options) {\n if (options === void 0) {\n options = false;\n }\n\n node.addEventListener(type, handler, options);\n listeners.push(function () {\n return node.removeEventListener(type, handler, options);\n });\n return self;\n }\n\n function removeAll() {\n listeners = listeners.filter(function (remove) {\n return remove();\n });\n return self;\n }\n\n var self = {\n add: add,\n removeAll: removeAll\n };\n return self;\n}\n\nfunction Vector1D(value) {\n var vector = value;\n\n function get() {\n return vector;\n }\n\n function set(n) {\n vector = readNumber(n);\n return self;\n }\n\n function add(n) {\n vector += readNumber(n);\n return self;\n }\n\n function subtract(n) {\n vector -= readNumber(n);\n return self;\n }\n\n function multiply(n) {\n vector *= n;\n return self;\n }\n\n function divide(n) {\n vector /= n;\n return self;\n }\n\n function normalize() {\n if (vector !== 0) divide(vector);\n return self;\n }\n\n function readNumber(n) {\n return typeof n === 'number' ? n : n.get();\n }\n\n var self = {\n add: add,\n divide: divide,\n get: get,\n multiply: multiply,\n normalize: normalize,\n set: set,\n subtract: subtract\n };\n return self;\n}\n\nfunction map(value, iStart, iStop, oStart, oStop) {\n return oStart + (oStop - oStart) * ((value - iStart) / (iStop - iStart));\n}\nfunction mathSign(n) {\n return !n ? 0 : n / Math.abs(n);\n}\nfunction deltaAbs(valueB, valueA) {\n return Math.abs(valueB - valueA);\n}\nfunction factorAbs(valueB, valueA) {\n if (valueB === 0 || valueA === 0) return 0;\n if (Math.abs(valueB) <= Math.abs(valueA)) return 0;\n var diff = deltaAbs(Math.abs(valueB), Math.abs(valueA));\n return Math.abs(diff / valueB);\n}\nfunction roundToDecimals(decimalPoints) {\n var pow = Math.pow(10, decimalPoints);\n return function (n) {\n return Math.round(n * pow) / pow;\n };\n}\nfunction debounce(callback, time) {\n var timeout = 0;\n return function () {\n window.clearTimeout(timeout);\n timeout = window.setTimeout(callback, time) || 0;\n };\n}\nfunction groupArray(array, size) {\n var groups = [];\n\n for (var i = 0; i < array.length; i += size) {\n groups.push(array.slice(i, i + size));\n }\n\n return groups;\n}\nfunction arrayKeys(array) {\n return Object.keys(array).map(Number);\n}\nfunction arrayLast(array) {\n return array[lastIndex(array)];\n}\nfunction lastIndex(array) {\n return Math.max(0, array.length - 1);\n}\nfunction removeClass(node, className) {\n var cl = node.classList;\n if (className && cl.contains(className)) cl.remove(className);\n}\nfunction addClass(node, className) {\n var cl = node.classList;\n if (className && !cl.contains(className)) cl.add(className);\n}\n\nfunction DragHandler(axis, direction, rootNode, target, dragFree, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, events, loop, skipSnaps) {\n var scrollAxis = axis.scroll,\n crossAxis = axis.cross;\n var focusNodes = ['INPUT', 'SELECT', 'TEXTAREA'];\n var startScroll = Vector1D(0);\n var startCross = Vector1D(0);\n var dragStartPoint = Vector1D(0);\n var activationEvents = EventStore();\n var interactionEvents = EventStore();\n var snapForceBoost = {\n mouse: 2.5,\n touch: 3.5\n };\n var freeForceBoost = {\n mouse: 5,\n touch: 7\n };\n var baseSpeed = dragFree ? 5 : 16;\n var baseMass = 1;\n var dragThreshold = 20;\n var pointerIsDown = false;\n var preventScroll = false;\n var preventClick = false;\n var isMouse = false;\n\n function addActivationEvents() {\n var node = rootNode;\n activationEvents.add(node, 'touchmove', function () {\n return undefined;\n }).add(node, 'touchend', function () {\n return undefined;\n }).add(node, 'touchstart', down).add(node, 'mousedown', down).add(node, 'touchcancel', up).add(node, 'contextmenu', up).add(node, 'click', click);\n }\n\n function addInteractionEvents() {\n var node = !isMouse ? rootNode : document;\n interactionEvents.add(node, 'touchmove', move).add(node, 'touchend', up).add(node, 'mousemove', move).add(node, 'mouseup', up);\n }\n\n function removeAllEvents() {\n activationEvents.removeAll();\n interactionEvents.removeAll();\n }\n\n function isFocusNode(node) {\n var name = node.nodeName || '';\n return focusNodes.indexOf(name) > -1;\n }\n\n function forceBoost() {\n var boost = dragFree ? freeForceBoost : snapForceBoost;\n var type = isMouse ? 'mouse' : 'touch';\n return boost[type];\n }\n\n function allowedForce(force, targetChanged) {\n var next = index.clone().add(mathSign(force) * -1);\n var isEdge = next.get() === index.min || next.get() === index.max;\n var baseForce = scrollTarget.byDistance(force, !dragFree).distance;\n if (dragFree || Math.abs(force) < dragThreshold) return baseForce;\n if (!loop && isEdge) return baseForce * 0.6;\n if (skipSnaps && targetChanged) return baseForce * 0.5;\n return scrollTarget.byIndex(next.get(), 0).distance;\n }\n\n function down(evt) {\n isMouse = evt.type === 'mousedown';\n if (isMouse && evt.button !== 0) return;\n var isMoving = deltaAbs(target.get(), location.get()) >= 2;\n var clearPreventClick = isMouse || !isMoving;\n var isNotFocusNode = !isFocusNode(evt.target);\n var preventDefault = isMoving || isMouse && isNotFocusNode;\n pointerIsDown = true;\n dragTracker.pointerDown(evt);\n dragStartPoint.set(target);\n target.set(location);\n scrollBody.useBaseMass().useSpeed(80);\n addInteractionEvents();\n startScroll.set(dragTracker.readPoint(evt, scrollAxis));\n startCross.set(dragTracker.readPoint(evt, crossAxis));\n events.emit('pointerDown');\n if (clearPreventClick) preventClick = false;\n if (preventDefault) evt.preventDefault();\n }\n\n function move(evt) {\n if (!preventScroll && !isMouse) {\n if (!evt.cancelable) return up();\n var moveScroll = dragTracker.readPoint(evt, scrollAxis).get();\n var moveCross = dragTracker.readPoint(evt, crossAxis).get();\n var diffScroll = deltaAbs(moveScroll, startScroll.get());\n var diffCross = deltaAbs(moveCross, startCross.get());\n preventScroll = diffScroll > diffCross;\n if (!preventScroll && !preventClick) return up();\n }\n\n var diff = dragTracker.pointerMove(evt);\n if (!preventClick && diff) preventClick = true;\n animation.start();\n target.add(direction.applyTo(diff));\n evt.preventDefault();\n }\n\n function up() {\n var currentLocation = scrollTarget.byDistance(0, false);\n var targetChanged = currentLocation.index !== index.get();\n var rawForce = dragTracker.pointerUp() * forceBoost();\n var force = allowedForce(direction.applyTo(rawForce), targetChanged);\n var forceFactor = factorAbs(rawForce, force);\n var isMoving = deltaAbs(target.get(), dragStartPoint.get()) >= 0.5;\n var isVigorous = targetChanged && forceFactor > 0.75;\n var isBelowThreshold = Math.abs(rawForce) < dragThreshold;\n var speed = isVigorous ? 10 : baseSpeed;\n var mass = isVigorous ? baseMass + 2.5 * forceFactor : baseMass;\n if (isMoving && !isMouse) preventClick = true;\n preventScroll = false;\n pointerIsDown = false;\n interactionEvents.removeAll();\n scrollBody.useSpeed(isBelowThreshold ? 9 : speed).useMass(mass);\n scrollTo.distance(force, !dragFree);\n isMouse = false;\n events.emit('pointerUp');\n }\n\n function click(evt) {\n if (preventClick) evt.preventDefault();\n }\n\n function clickAllowed() {\n return !preventClick;\n }\n\n function pointerDown() {\n return pointerIsDown;\n }\n\n var self = {\n addActivationEvents: addActivationEvents,\n clickAllowed: clickAllowed,\n pointerDown: pointerDown,\n removeAllEvents: removeAllEvents\n };\n return self;\n}\n\nfunction DragTracker(axis, pxToPercent) {\n var scrollAxis = axis.scroll;\n var coords = {\n x: 'clientX',\n y: 'clientY'\n };\n var startDrag = Vector1D(0);\n var diffDrag = Vector1D(0);\n var lastDrag = Vector1D(0);\n var pointValue = Vector1D(0);\n var trackInterval = 10;\n var trackLength = 5;\n var trackTime = 100;\n var trackPoints = [];\n var lastMoveTime = new Date().getTime();\n var isMouse = false;\n\n function readPoint(evt, type) {\n isMouse = !evt.touches;\n var c = coords[type];\n var value = isMouse ? evt[c] : evt.touches[0][c];\n return pointValue.set(value);\n }\n\n function pointerDown(evt) {\n var point = readPoint(evt, scrollAxis);\n startDrag.set(point);\n lastDrag.set(point);\n return pxToPercent.measure(startDrag.get());\n }\n\n function pointerMove(evt) {\n var point = readPoint(evt, scrollAxis);\n var nowTime = new Date().getTime();\n var diffTime = nowTime - lastMoveTime;\n\n if (diffTime >= trackInterval) {\n if (diffTime >= trackTime) trackPoints = [];\n trackPoints.push(point.get());\n lastMoveTime = nowTime;\n }\n\n diffDrag.set(point).subtract(lastDrag);\n lastDrag.set(point);\n return pxToPercent.measure(diffDrag.get());\n }\n\n function pointerUp() {\n var nowTime = new Date().getTime();\n var diffTime = nowTime - lastMoveTime;\n var currentPoint = lastDrag.get();\n var force = trackPoints.slice(-trackLength).map(function (trackPoint) {\n return currentPoint - trackPoint;\n }).sort(function (p1, p2) {\n return Math.abs(p1) < Math.abs(p2) ? 1 : -1;\n })[0];\n lastDrag.set(diffTime > trackTime || !force ? 0 : force);\n trackPoints = [];\n return pxToPercent.measure(lastDrag.get());\n }\n\n var self = {\n pointerDown: pointerDown,\n pointerMove: pointerMove,\n pointerUp: pointerUp,\n readPoint: readPoint\n };\n return self;\n}\n\nfunction PxToPercent(viewInPx) {\n var totalPercent = 100;\n\n function measure(n) {\n if (viewInPx === 0) return 0;\n return n / viewInPx * totalPercent;\n }\n\n var self = {\n measure: measure,\n totalPercent: totalPercent\n };\n return self;\n}\n\nfunction ScrollBody(location, baseSpeed, baseMass) {\n var roundToTwoDecimals = roundToDecimals(2);\n var velocity = Vector1D(0);\n var acceleration = Vector1D(0);\n var attraction = Vector1D(0);\n var attractionDirection = 0;\n var speed = baseSpeed;\n var mass = baseMass;\n\n function update() {\n velocity.add(acceleration);\n location.add(velocity);\n acceleration.multiply(0);\n }\n\n function applyForce(v) {\n v.divide(mass);\n acceleration.add(v);\n }\n\n function seek(v) {\n attraction.set(v).subtract(location);\n var magnitude = map(attraction.get(), 0, 100, 0, speed);\n attractionDirection = mathSign(attraction.get());\n attraction.normalize().multiply(magnitude).subtract(velocity);\n applyForce(attraction);\n return self;\n }\n\n function settle(v) {\n var diff = v.get() - location.get();\n var hasSettled = !roundToTwoDecimals(diff);\n if (hasSettled) location.set(v);\n return hasSettled;\n }\n\n function direction() {\n return attractionDirection;\n }\n\n function useBaseSpeed() {\n return useSpeed(baseSpeed);\n }\n\n function useBaseMass() {\n return useMass(baseMass);\n }\n\n function useSpeed(n) {\n speed = n;\n return self;\n }\n\n function useMass(n) {\n mass = n;\n return self;\n }\n\n var self = {\n direction: direction,\n seek: seek,\n settle: settle,\n update: update,\n useBaseMass: useBaseMass,\n useBaseSpeed: useBaseSpeed,\n useMass: useMass,\n useSpeed: useSpeed\n };\n return self;\n}\n\nfunction ScrollBounds(limit, location, target, scrollBody) {\n var pullBackThreshold = 10;\n var disabled = false;\n\n function shouldConstrain() {\n if (disabled) return false;\n if (!limit.reachedAny(target.get())) return false;\n if (!limit.reachedAny(location.get())) return false;\n return true;\n }\n\n function constrain(pointerDown) {\n if (!shouldConstrain()) return;\n var friction = pointerDown ? 0.7 : 0.45;\n var diffToTarget = target.get() - location.get();\n target.subtract(diffToTarget * friction);\n\n if (!pointerDown && Math.abs(diffToTarget) < pullBackThreshold) {\n target.set(limit.constrain(target.get()));\n scrollBody.useSpeed(10).useMass(3);\n }\n }\n\n function toggleActive(active) {\n disabled = !active;\n }\n\n var self = {\n constrain: constrain,\n toggleActive: toggleActive\n };\n return self;\n}\n\nfunction ScrollContain(viewSize, contentSize, snaps, snapsAligned, containScroll) {\n var scrollBounds = Limit(-contentSize + viewSize, snaps[0]);\n var snapsBounded = snapsAligned.map(scrollBounds.constrain);\n var snapsContained = measureContained();\n\n function findDuplicates() {\n var startSnap = snapsBounded[0];\n var endSnap = arrayLast(snapsBounded);\n var min = snapsBounded.lastIndexOf(startSnap);\n var max = snapsBounded.indexOf(endSnap) + 1;\n return Limit(min, max);\n }\n\n function measureContained() {\n if (contentSize <= viewSize) return [scrollBounds.max];\n if (containScroll === 'keepSnaps') return snapsBounded;\n\n var _a = findDuplicates(),\n min = _a.min,\n max = _a.max;\n\n return snapsBounded.slice(min, max);\n }\n\n var self = {\n snapsContained: snapsContained\n };\n return self;\n}\n\nfunction ScrollLimit(contentSize, scrollSnaps, loop) {\n var limit = measureLimit();\n\n function measureLimit() {\n var startSnap = scrollSnaps[0];\n var endSnap = arrayLast(scrollSnaps);\n var min = loop ? startSnap - contentSize : endSnap;\n var max = startSnap;\n return Limit(min, max);\n }\n\n var self = {\n limit: limit\n };\n return self;\n}\n\nfunction ScrollLooper(contentSize, pxToPercent, limit, location, vectors) {\n var min = limit.min + pxToPercent.measure(0.1);\n var max = limit.max + pxToPercent.measure(0.1);\n\n var _a = Limit(min, max),\n reachedMin = _a.reachedMin,\n reachedMax = _a.reachedMax;\n\n function shouldLoop(direction) {\n if (direction === 1) return reachedMax(location.get());\n if (direction === -1) return reachedMin(location.get());\n return false;\n }\n\n function loop(direction) {\n if (!shouldLoop(direction)) return;\n var loopDistance = contentSize * (direction * -1);\n vectors.forEach(function (v) {\n return v.add(loopDistance);\n });\n }\n\n var self = {\n loop: loop\n };\n return self;\n}\n\nfunction ScrollProgress(limit) {\n var max = limit.max,\n scrollLength = limit.length;\n\n function get(n) {\n var currentLocation = n - max;\n return currentLocation / -scrollLength;\n }\n\n var self = {\n get: get\n };\n return self;\n}\n\nfunction ScrollSnap(axis, alignment, pxToPercent, containerRect, slideRects, slidesToScroll) {\n var startEdge = axis.startEdge,\n endEdge = axis.endEdge;\n var snaps = measureUnaligned();\n var snapsAligned = measureAligned();\n\n function measureSizes() {\n return groupArray(slideRects, slidesToScroll).map(function (rects) {\n return arrayLast(rects)[endEdge] - rects[0][startEdge];\n }).map(pxToPercent.measure).map(Math.abs);\n }\n\n function measureUnaligned() {\n return slideRects.map(function (rect) {\n return containerRect[startEdge] - rect[startEdge];\n }).map(pxToPercent.measure).map(function (snap) {\n return -Math.abs(snap);\n });\n }\n\n function measureAligned() {\n var groupedSnaps = groupArray(snaps, slidesToScroll).map(function (g) {\n return g[0];\n });\n var alignments = measureSizes().map(alignment.measure);\n return groupedSnaps.map(function (snap, index) {\n return snap + alignments[index];\n });\n }\n\n var self = {\n snaps: snaps,\n snapsAligned: snapsAligned\n };\n return self;\n}\n\nfunction ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {\n var reachedAny = limit.reachedAny,\n removeOffset = limit.removeOffset,\n constrain = limit.constrain;\n\n function minDistance(d1, d2) {\n return Math.abs(d1) < Math.abs(d2) ? d1 : d2;\n }\n\n function findTargetSnap(target) {\n var distance = loop ? removeOffset(target) : constrain(target);\n var ascDiffsToSnaps = scrollSnaps.map(function (scrollSnap) {\n return scrollSnap - distance;\n }).map(function (diffToSnap) {\n return shortcut(diffToSnap, 0);\n }).map(function (diff, i) {\n return {\n diff: diff,\n index: i\n };\n }).sort(function (d1, d2) {\n return Math.abs(d1.diff) - Math.abs(d2.diff);\n });\n var index = ascDiffsToSnaps[0].index;\n return {\n index: index,\n distance: distance\n };\n }\n\n function shortcut(target, direction) {\n var t1 = target;\n var t2 = target + contentSize;\n var t3 = target - contentSize;\n if (!loop) return t1;\n if (!direction) return minDistance(minDistance(t1, t2), t3);\n var shortest = minDistance(t1, direction === 1 ? t2 : t3);\n return Math.abs(shortest) * direction;\n }\n\n function byIndex(index, direction) {\n var diffToSnap = scrollSnaps[index] - targetVector.get();\n var distance = shortcut(diffToSnap, direction);\n return {\n index: index,\n distance: distance\n };\n }\n\n function byDistance(distance, snap) {\n var target = targetVector.get() + distance;\n\n var _a = findTargetSnap(target),\n index = _a.index,\n targetSnapDistance = _a.distance;\n\n var reachedBound = !loop && reachedAny(target);\n if (!snap || reachedBound) return {\n index: index,\n distance: distance\n };\n var diffToSnap = scrollSnaps[index] - targetSnapDistance;\n var snapDistance = distance + shortcut(diffToSnap, 0);\n return {\n index: index,\n distance: snapDistance\n };\n }\n\n var self = {\n byDistance: byDistance,\n byIndex: byIndex,\n shortcut: shortcut\n };\n return self;\n}\n\nfunction ScrollTo(animation, indexCurrent, indexPrevious, scrollTarget, targetVector, events) {\n function scrollTo(target) {\n var distanceDiff = target.distance;\n var indexDiff = target.index !== indexCurrent.get();\n\n if (distanceDiff) {\n animation.start();\n targetVector.add(distanceDiff);\n }\n\n if (indexDiff) {\n indexPrevious.set(indexCurrent.get());\n indexCurrent.set(target.index);\n events.emit('select');\n }\n }\n\n function distance(n, snap) {\n var target = scrollTarget.byDistance(n, snap);\n scrollTo(target);\n }\n\n function index(n, direction) {\n var targetIndex = indexCurrent.clone().set(n);\n var target = scrollTarget.byIndex(targetIndex.get(), direction);\n scrollTo(target);\n }\n\n var self = {\n distance: distance,\n index: index\n };\n return self;\n}\n\nfunction SlideLooper(axis, viewSize, contentSize, slideSizesWithGaps, scrollSnaps, slidesInView, scrollLocation, slides) {\n var ascItems = arrayKeys(slideSizesWithGaps);\n var descItems = arrayKeys(slideSizesWithGaps).reverse();\n var loopPoints = startPoints().concat(endPoints());\n\n function removeSlideSizes(indexes, from) {\n return indexes.reduce(function (a, i) {\n return a - slideSizesWithGaps[i];\n }, from);\n }\n\n function slidesInGap(indexes, gap) {\n return indexes.reduce(function (a, i) {\n var remainingGap = removeSlideSizes(a, gap);\n return remainingGap > 0 ? a.concat([i]) : a;\n }, []);\n }\n\n function findLoopPoints(indexes, edge) {\n var isStartEdge = edge === 'start';\n var offset = isStartEdge ? -contentSize : contentSize;\n var slideBounds = slidesInView.findSlideBounds(offset);\n return indexes.map(function (index) {\n var initial = isStartEdge ? 0 : -contentSize;\n var altered = isStartEdge ? contentSize : 0;\n var bounds = slideBounds.filter(function (b) {\n return b.index === index;\n })[0];\n var point = bounds[isStartEdge ? 'end' : 'start'];\n\n var getTarget = function getTarget() {\n return scrollLocation.get() > point ? initial : altered;\n };\n\n return {\n point: point,\n getTarget: getTarget,\n index: index,\n location: -1\n };\n });\n }\n\n function startPoints() {\n var gap = scrollSnaps[0] - 1;\n var indexes = slidesInGap(descItems, gap);\n return findLoopPoints(indexes, 'end');\n }\n\n function endPoints() {\n var gap = viewSize - scrollSnaps[0] - 1;\n var indexes = slidesInGap(ascItems, gap);\n return findLoopPoints(indexes, 'start');\n }\n\n function canLoop() {\n return loopPoints.every(function (_a) {\n var index = _a.index;\n var otherIndexes = ascItems.filter(function (i) {\n return i !== index;\n });\n return removeSlideSizes(otherIndexes, viewSize) <= 0;\n });\n }\n\n function loop() {\n loopPoints.forEach(function (loopPoint) {\n var getTarget = loopPoint.getTarget,\n location = loopPoint.location,\n index = loopPoint.index;\n var target = getTarget();\n\n if (target !== location) {\n slides[index].style[axis.startEdge] = target + \"%\";\n loopPoint.location = target;\n }\n });\n }\n\n function clear() {\n loopPoints.forEach(function (_a) {\n var index = _a.index;\n slides[index].style[axis.startEdge] = '';\n });\n }\n\n var self = {\n canLoop: canLoop,\n clear: clear,\n loop: loop,\n loopPoints: loopPoints\n };\n return self;\n}\n\nfunction SlideFocus(rootNode, scrollTo, slidesToScroll) {\n var eventStore = EventStore();\n var removeAllEvents = eventStore.removeAll;\n var lastTabPressTime = 0;\n\n function registerTabPress(event) {\n if (event.keyCode !== 9) return;\n lastTabPressTime = new Date().getTime();\n }\n\n function addFocusEvent(slide, index) {\n var focus = function focus() {\n var nowTime = new Date().getTime();\n var diffTime = nowTime - lastTabPressTime;\n if (diffTime > 10) return;\n rootNode.scrollLeft = 0;\n var selectedIndex = Math.floor(index / slidesToScroll);\n scrollTo.index(selectedIndex, 0);\n };\n\n eventStore.add(slide, 'focus', focus, true);\n }\n\n function addActivationEvents(slides) {\n eventStore.add(document, 'keydown', registerTabPress, false);\n slides.forEach(addFocusEvent);\n }\n\n var self = {\n addActivationEvents: addActivationEvents,\n removeAllEvents: removeAllEvents\n };\n return self;\n}\n\nfunction SlidesInView(viewSize, contentSize, slideSizes, snaps, loop, inViewThreshold) {\n var threshold = Math.min(Math.max(inViewThreshold, 0.01), 0.99);\n var offsets = loop ? [0, contentSize, -contentSize] : [0];\n var slideBounds = offsets.reduce(function (a, offset) {\n return a.concat(findSlideBounds(offset, threshold));\n }, []);\n\n function findSlideBounds(offset, threshold) {\n var thresholds = slideSizes.map(function (s) {\n return s * (threshold || 0);\n });\n return snaps.map(function (snap, index) {\n return {\n start: snap - slideSizes[index] + thresholds[index] + offset,\n end: snap + viewSize - thresholds[index] + offset,\n index: index\n };\n });\n }\n\n function check(location) {\n return slideBounds.reduce(function (list, slideBound) {\n var index = slideBound.index,\n start = slideBound.start,\n end = slideBound.end;\n var inList = list.indexOf(index) !== -1;\n var inView = start < location && end > location;\n return !inList && inView ? list.concat([index]) : list;\n }, []);\n }\n\n var self = {\n check: check,\n findSlideBounds: findSlideBounds\n };\n return self;\n}\n\nfunction SlideSizes(axis, pxToPercent, slides, slideRects, loop) {\n var measureSize = axis.measureSize,\n startEdge = axis.startEdge,\n endEdge = axis.endEdge;\n var sizesInPx = slideRects.map(measureSize);\n var slideSizes = sizesInPx.map(pxToPercent.measure);\n var slideSizesWithGaps = measureWithGaps();\n\n function measureWithGaps() {\n return slideRects.map(function (rect, index, rects) {\n var isLast = index === lastIndex(rects);\n var style = window.getComputedStyle(arrayLast(slides));\n var endGap = parseFloat(style.getPropertyValue(\"margin-\" + endEdge));\n if (isLast) return sizesInPx[index] + (loop ? endGap : 0);\n return rects[index + 1][startEdge] - rect[startEdge];\n }).map(pxToPercent.measure).map(Math.abs);\n }\n\n var self = {\n slideSizes: slideSizes,\n slideSizesWithGaps: slideSizesWithGaps\n };\n return self;\n}\n\nfunction Translate(axis, direction, container) {\n var containerStyle = container.style;\n var translate = axis.scroll === 'x' ? x : y;\n var disabled = false;\n\n function x(n) {\n return \"translate3d(\" + n + \"%,0px,0px)\";\n }\n\n function y(n) {\n return \"translate3d(0px,\" + n + \"%,0px)\";\n }\n\n function to(target) {\n if (disabled) return;\n containerStyle.transform = translate(direction.applyTo(target.get()));\n }\n\n function toggleActive(active) {\n disabled = !active;\n }\n\n function clear() {\n containerStyle.transform = '';\n }\n\n var self = {\n clear: clear,\n to: to,\n toggleActive: toggleActive\n };\n return self;\n}\n\nfunction Engine(root, container, slides, options, events) {\n // Options\n var align = options.align,\n scrollAxis = options.axis,\n contentDirection = options.direction,\n startIndex = options.startIndex,\n inViewThreshold = options.inViewThreshold,\n loop = options.loop,\n speed = options.speed,\n dragFree = options.dragFree,\n slidesToScroll = options.slidesToScroll,\n skipSnaps = options.skipSnaps,\n containScroll = options.containScroll; // Measurements\n\n var containerRect = container.getBoundingClientRect();\n var slideRects = slides.map(function (slide) {\n return slide.getBoundingClientRect();\n });\n var direction = Direction(contentDirection);\n var axis = Axis(scrollAxis, contentDirection);\n var pxToPercent = PxToPercent(axis.measureSize(containerRect));\n var viewSize = pxToPercent.totalPercent;\n var alignment = Alignment(align, viewSize);\n\n var _a = SlideSizes(axis, pxToPercent, slides, slideRects, loop),\n slideSizes = _a.slideSizes,\n slideSizesWithGaps = _a.slideSizesWithGaps;\n\n var _b = ScrollSnap(axis, alignment, pxToPercent, containerRect, slideRects, slidesToScroll),\n snaps = _b.snaps,\n snapsAligned = _b.snapsAligned;\n\n var contentSize = -arrayLast(snaps) + arrayLast(slideSizesWithGaps);\n var snapsContained = ScrollContain(viewSize, contentSize, snaps, snapsAligned, containScroll).snapsContained;\n var contain = !loop && containScroll !== '';\n var scrollSnaps = contain ? snapsContained : snapsAligned;\n var limit = ScrollLimit(contentSize, scrollSnaps, loop).limit; // Indexes\n\n var index = Counter(lastIndex(scrollSnaps), startIndex, loop);\n var indexPrevious = index.clone();\n var slideIndexes = arrayKeys(slides); // Draw\n\n var update = function update() {\n if (!loop) engine.scrollBounds.constrain(engine.dragHandler.pointerDown());\n engine.scrollBody.seek(target).update();\n var settled = engine.scrollBody.settle(target);\n\n if (settled && !engine.dragHandler.pointerDown()) {\n engine.animation.stop();\n events.emit('settle');\n }\n\n if (!settled) {\n events.emit('scroll');\n }\n\n if (loop) {\n engine.scrollLooper.loop(engine.scrollBody.direction());\n engine.slideLooper.loop();\n }\n\n engine.translate.to(location);\n engine.animation.proceed();\n }; // Shared\n\n\n var animation = Animation(update);\n var startLocation = scrollSnaps[index.get()];\n var location = Vector1D(startLocation);\n var target = Vector1D(startLocation);\n var scrollBody = ScrollBody(location, speed, 1);\n var scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);\n var scrollTo = ScrollTo(animation, index, indexPrevious, scrollTarget, target, events);\n var slidesInView = SlidesInView(viewSize, contentSize, slideSizes, snaps, loop, inViewThreshold); // DragHandler\n\n var dragHandler = DragHandler(axis, direction, root, target, dragFree, DragTracker(axis, pxToPercent), location, animation, scrollTo, scrollBody, scrollTarget, index, events, loop, skipSnaps); // Slider\n\n var engine = {\n animation: animation,\n axis: axis,\n direction: direction,\n dragHandler: dragHandler,\n pxToPercent: pxToPercent,\n index: index,\n indexPrevious: indexPrevious,\n limit: limit,\n location: location,\n options: options,\n scrollBody: scrollBody,\n scrollBounds: ScrollBounds(limit, location, target, scrollBody),\n scrollLooper: ScrollLooper(contentSize, pxToPercent, limit, location, [location, target]),\n scrollProgress: ScrollProgress(limit),\n scrollSnaps: scrollSnaps,\n scrollTarget: scrollTarget,\n scrollTo: scrollTo,\n slideFocus: SlideFocus(root, scrollTo, slidesToScroll),\n slideLooper: SlideLooper(axis, viewSize, contentSize, slideSizesWithGaps, scrollSnaps, slidesInView, location, slides),\n slidesInView: slidesInView,\n slideIndexes: slideIndexes,\n target: target,\n translate: Translate(axis, direction, container)\n };\n return engine;\n}\n\nfunction EventEmitter() {\n var listeners = {};\n\n function getListeners(evt) {\n var eventListeners = listeners[evt];\n return eventListeners || [];\n }\n\n function emit(evt) {\n getListeners(evt).forEach(function (e) {\n return e(evt);\n });\n return self;\n }\n\n function on(evt, cb) {\n listeners[evt] = getListeners(evt).concat([cb]);\n return self;\n }\n\n function off(evt, cb) {\n listeners[evt] = getListeners(evt).filter(function (e) {\n return e !== cb;\n });\n return self;\n }\n\n var self = {\n emit: emit,\n off: off,\n on: on\n };\n return self;\n}\n\nvar defaultOptions = {\n align: 'center',\n axis: 'x',\n containScroll: '',\n direction: 'ltr',\n dragFree: false,\n draggable: true,\n draggableClass: 'is-draggable',\n draggingClass: 'is-dragging',\n inViewThreshold: 0,\n loop: false,\n skipSnaps: true,\n selectedClass: 'is-selected',\n slidesToScroll: 1,\n speed: 10,\n startIndex: 0\n};\n\nfunction OptionsPseudo(node) {\n var pseudoString = getComputedStyle(node, ':before').content;\n\n function get() {\n try {\n return JSON.parse(pseudoString.slice(1, -1).replace(/\\\\/g, ''));\n } catch (error) {} // eslint-disable-line no-empty\n\n\n return {};\n }\n\n var self = {\n get: get\n };\n return self;\n}\n\nfunction EmblaCarousel(sliderRoot, userOptions) {\n var events = EventEmitter();\n var eventStore = EventStore();\n var debouncedResize = debounce(resize, 500);\n var reInit = reActivate;\n var on = events.on,\n off = events.off;\n var engine;\n var activated = false;\n\n var optionsBase = _extends({}, defaultOptions);\n\n var options = _extends({}, optionsBase);\n\n var optionsPseudo;\n var rootNodeSize = 0;\n var container;\n var slides;\n activate(userOptions);\n\n function setupElements() {\n if (!sliderRoot) throw new Error('Missing root node 😢');\n var sliderContainer = sliderRoot.querySelector('*');\n if (!sliderContainer) throw new Error('Missing container node 😢');\n container = sliderContainer;\n slides = Array.prototype.slice.call(container.children);\n optionsPseudo = OptionsPseudo(sliderRoot);\n }\n\n function activate(partialOptions) {\n setupElements();\n optionsBase = _extends({}, optionsBase, partialOptions);\n options = _extends({}, optionsBase, optionsPseudo.get());\n engine = Engine(sliderRoot, container, slides, options, events);\n eventStore.add(window, 'resize', debouncedResize);\n engine.translate.to(engine.location);\n rootNodeSize = engine.axis.measureSize(sliderRoot.getBoundingClientRect());\n\n if (options.loop) {\n if (!engine.slideLooper.canLoop()) {\n deActivate();\n return activate({\n loop: false\n });\n }\n\n engine.slideLooper.loop();\n }\n\n if (options.draggable && container.offsetParent && slides.length) {\n engine.dragHandler.addActivationEvents();\n\n if (options.draggableClass) {\n addClass(sliderRoot, options.draggableClass);\n }\n\n if (options.draggingClass) {\n events.on('pointerDown', toggleDraggingClass).on('pointerUp', toggleDraggingClass);\n }\n }\n\n if (slides.length) {\n engine.slideFocus.addActivationEvents(slides);\n }\n\n if (options.selectedClass) {\n toggleSelectedClass();\n events.on('select', toggleSelectedClass).on('pointerUp', toggleSelectedClass);\n }\n\n if (!activated) {\n setTimeout(function () {\n return events.emit('init');\n }, 0);\n activated = true;\n }\n }\n\n function toggleDraggingClass(evt) {\n var draggingClass = options.draggingClass;\n if (evt === 'pointerDown') addClass(sliderRoot, draggingClass);else removeClass(sliderRoot, draggingClass);\n }\n\n function toggleSelectedClass() {\n var selectedClass = options.selectedClass;\n var inView = slidesInView(true);\n var notInView = slidesNotInView(true);\n notInView.forEach(function (index) {\n return removeClass(slides[index], selectedClass);\n });\n inView.forEach(function (index) {\n return addClass(slides[index], selectedClass);\n });\n }\n\n function deActivate() {\n engine.dragHandler.removeAllEvents();\n engine.slideFocus.removeAllEvents();\n engine.animation.stop();\n eventStore.removeAll();\n engine.translate.clear();\n engine.slideLooper.clear();\n removeClass(sliderRoot, options.draggableClass);\n slides.forEach(function (slide) {\n return removeClass(slide, options.selectedClass);\n });\n events.off('select', toggleSelectedClass).off('pointerUp', toggleSelectedClass).off('pointerDown', toggleDraggingClass).off('pointerUp', toggleDraggingClass);\n }\n\n function reActivate(partialOptions) {\n if (!activated) return;\n var startIndex = selectedScrollSnap();\n\n var newOptions = _extends({\n startIndex: startIndex\n }, partialOptions);\n\n deActivate();\n activate(newOptions);\n events.emit('reInit');\n }\n\n function destroy() {\n if (!activated) return;\n deActivate();\n activated = false;\n events.emit('destroy');\n }\n\n function resize() {\n if (!activated) return;\n var size = engine.axis.measureSize(sliderRoot.getBoundingClientRect());\n if (rootNodeSize !== size) reActivate();\n events.emit('resize');\n }\n\n function slidesInView(target) {\n var location = engine[target ? 'target' : 'location'].get();\n var type = options.loop ? 'removeOffset' : 'constrain';\n return engine.slidesInView.check(engine.limit[type](location));\n }\n\n function slidesNotInView(target) {\n var inView = slidesInView(target);\n return engine.slideIndexes.filter(function (index) {\n return inView.indexOf(index) === -1;\n });\n }\n\n function scrollTo(index, jump, direction) {\n engine.scrollBody.useBaseMass().useSpeed(jump ? 100 : options.speed);\n if (activated) engine.scrollTo.index(index, direction || 0);\n }\n\n function scrollNext(jump) {\n var next = engine.index.clone().add(1);\n scrollTo(next.get(), jump === true, -1);\n }\n\n function scrollPrev(jump) {\n var prev = engine.index.clone().add(-1);\n scrollTo(prev.get(), jump === true, 1);\n }\n\n function canScrollNext() {\n var next = engine.index.clone().add(1);\n return next.get() !== selectedScrollSnap();\n }\n\n function canScrollPrev() {\n var prev = engine.index.clone().add(-1);\n return prev.get() !== selectedScrollSnap();\n }\n\n function scrollSnapList() {\n return engine.scrollSnaps.map(engine.scrollProgress.get);\n }\n\n function scrollProgress() {\n return engine.scrollProgress.get(engine.location.get());\n }\n\n function selectedScrollSnap() {\n return engine.index.get();\n }\n\n function previousScrollSnap() {\n return engine.indexPrevious.get();\n }\n\n function clickAllowed() {\n return engine.dragHandler.clickAllowed();\n }\n\n function dangerouslyGetEngine() {\n return engine;\n }\n\n function rootNode() {\n return sliderRoot;\n }\n\n function containerNode() {\n return container;\n }\n\n function slideNodes() {\n return slides;\n }\n\n var self = {\n canScrollNext: canScrollNext,\n canScrollPrev: canScrollPrev,\n clickAllowed: clickAllowed,\n containerNode: containerNode,\n dangerouslyGetEngine: dangerouslyGetEngine,\n destroy: destroy,\n off: off,\n on: on,\n previousScrollSnap: previousScrollSnap,\n reInit: reInit,\n rootNode: rootNode,\n scrollNext: scrollNext,\n scrollPrev: scrollPrev,\n scrollProgress: scrollProgress,\n scrollSnapList: scrollSnapList,\n scrollTo: scrollTo,\n selectedScrollSnap: selectedScrollSnap,\n slideNodes: slideNodes,\n slidesInView: slidesInView,\n slidesNotInView: slidesNotInView\n };\n return self;\n}\n\nfunction canUseDOM() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}\nfunction areEqualShallow(objectA, objectB) {\n return Object.keys(objectA).length === Object.keys(objectB).length && Object.keys(objectA).every(function (objectKey) {\n if (!Object.prototype.hasOwnProperty.call(objectB, objectKey)) {\n return false;\n }\n\n return objectA[objectKey] === objectB[objectKey];\n });\n}\n\nfunction useEmblaCarousel(options) {\n if (options === void 0) {\n options = {};\n }\n\n var _a = react.useState(),\n embla = _a[0],\n setEmbla = _a[1];\n\n var _b = react.useState(),\n viewport = _b[0],\n setViewport = _b[1];\n\n var storedOptions = react.useRef(options);\n var activeOptions = react.useMemo(function () {\n if (!areEqualShallow(storedOptions.current, options)) {\n storedOptions.current = options;\n }\n\n return storedOptions.current;\n }, [storedOptions, options]);\n react.useEffect(function () {\n if (canUseDOM() && viewport) {\n var newEmbla_1 = EmblaCarousel(viewport, activeOptions);\n setEmbla(newEmbla_1);\n return function () {\n return newEmbla_1.destroy();\n };\n } else {\n setEmbla(undefined);\n }\n }, [viewport, activeOptions, setEmbla]);\n return [setViewport, embla];\n}\n\nexports.useEmblaCarousel = useEmblaCarousel;\n//# sourceMappingURL=react.js.map\n"],"sourceRoot":""}