29337dd38d73cc7975a62559db425481.json
93.4 KB
{"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clamp = clamp;\nexports.canUseDOM = exports.slidesOnLeft = exports.slidesOnRight = exports.siblingDirection = exports.getTotalSlides = exports.getPostClones = exports.getPreClones = exports.getTrackLeft = exports.getTrackAnimateCSS = exports.getTrackCSS = exports.checkSpecKeys = exports.getSlideCount = exports.checkNavigable = exports.getNavigableIndexes = exports.swipeEnd = exports.swipeMove = exports.swipeStart = exports.keyHandler = exports.changeSlide = exports.slideHandler = exports.initializedState = exports.extractObject = exports.canGoNext = exports.getSwipeDirection = exports.getHeight = exports.getWidth = exports.lazySlidesOnRight = exports.lazySlidesOnLeft = exports.lazyEndIndex = exports.lazyStartIndex = exports.getRequiredLazySlides = exports.getOnDemandLazySlides = void 0;\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction clamp(number, lowerBound, upperBound) {\n return Math.max(lowerBound, Math.min(number, upperBound));\n}\n\nvar getOnDemandLazySlides = function getOnDemandLazySlides(spec) {\n var onDemandSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {\n onDemandSlides.push(slideIndex);\n }\n }\n\n return onDemandSlides;\n}; // return list of slides that need to be present\n\n\nexports.getOnDemandLazySlides = getOnDemandLazySlides;\n\nvar getRequiredLazySlides = function getRequiredLazySlides(spec) {\n var requiredSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n requiredSlides.push(slideIndex);\n }\n\n return requiredSlides;\n}; // startIndex that needs to be present\n\n\nexports.getRequiredLazySlides = getRequiredLazySlides;\n\nvar lazyStartIndex = function lazyStartIndex(spec) {\n return spec.currentSlide - lazySlidesOnLeft(spec);\n};\n\nexports.lazyStartIndex = lazyStartIndex;\n\nvar lazyEndIndex = function lazyEndIndex(spec) {\n return spec.currentSlide + lazySlidesOnRight(spec);\n};\n\nexports.lazyEndIndex = lazyEndIndex;\n\nvar lazySlidesOnLeft = function lazySlidesOnLeft(spec) {\n return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;\n};\n\nexports.lazySlidesOnLeft = lazySlidesOnLeft;\n\nvar lazySlidesOnRight = function lazySlidesOnRight(spec) {\n return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;\n}; // get width of an element\n\n\nexports.lazySlidesOnRight = lazySlidesOnRight;\n\nvar getWidth = function getWidth(elem) {\n return elem && elem.offsetWidth || 0;\n};\n\nexports.getWidth = getWidth;\n\nvar getHeight = function getHeight(elem) {\n return elem && elem.offsetHeight || 0;\n};\n\nexports.getHeight = getHeight;\n\nvar getSwipeDirection = function getSwipeDirection(touchObject) {\n var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var xDist, yDist, r, swipeAngle;\n xDist = touchObject.startX - touchObject.curX;\n yDist = touchObject.startY - touchObject.curY;\n r = Math.atan2(yDist, xDist);\n swipeAngle = Math.round(r * 180 / Math.PI);\n\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n\n if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {\n return \"left\";\n }\n\n if (swipeAngle >= 135 && swipeAngle <= 225) {\n return \"right\";\n }\n\n if (verticalSwiping === true) {\n if (swipeAngle >= 35 && swipeAngle <= 135) {\n return \"up\";\n } else {\n return \"down\";\n }\n }\n\n return \"vertical\";\n}; // whether or not we can go next\n\n\nexports.getSwipeDirection = getSwipeDirection;\n\nvar canGoNext = function canGoNext(spec) {\n var canGo = true;\n\n if (!spec.infinite) {\n if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {\n canGo = false;\n } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {\n canGo = false;\n }\n }\n\n return canGo;\n}; // given an object and a list of keys, return new object with given keys\n\n\nexports.canGoNext = canGoNext;\n\nvar extractObject = function extractObject(spec, keys) {\n var newObject = {};\n keys.forEach(function (key) {\n return newObject[key] = spec[key];\n });\n return newObject;\n}; // get initialized state\n\n\nexports.extractObject = extractObject;\n\nvar initializedState = function initializedState(spec) {\n // spec also contains listRef, trackRef\n var slideCount = _react[\"default\"].Children.count(spec.children);\n\n var listNode = spec.listRef;\n var listWidth = Math.ceil(getWidth(listNode));\n var trackNode = spec.trackRef && spec.trackRef.node;\n var trackWidth = Math.ceil(getWidth(trackNode));\n var slideWidth;\n\n if (!spec.vertical) {\n var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;\n\n if (typeof spec.centerPadding === \"string\" && spec.centerPadding.slice(-1) === \"%\") {\n centerPaddingAdj *= listWidth / 100;\n }\n\n slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);\n } else {\n slideWidth = listWidth;\n }\n\n var slideHeight = listNode && getHeight(listNode.querySelector('[data-index=\"0\"]'));\n var listHeight = slideHeight * spec.slidesToShow;\n var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;\n\n if (spec.rtl && spec.currentSlide === undefined) {\n currentSlide = slideCount - 1 - spec.initialSlide;\n }\n\n var lazyLoadedList = spec.lazyLoadedList || [];\n var slidesToLoad = getOnDemandLazySlides((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n currentSlide: currentSlide,\n lazyLoadedList: lazyLoadedList\n }));\n lazyLoadedList.concat(slidesToLoad);\n var state = {\n slideCount: slideCount,\n slideWidth: slideWidth,\n listWidth: listWidth,\n trackWidth: trackWidth,\n currentSlide: currentSlide,\n slideHeight: slideHeight,\n listHeight: listHeight,\n lazyLoadedList: lazyLoadedList\n };\n\n if (spec.autoplaying === null && spec.autoplay) {\n state[\"autoplaying\"] = \"playing\";\n }\n\n return state;\n};\n\nexports.initializedState = initializedState;\n\nvar slideHandler = function slideHandler(spec) {\n var waitForAnimate = spec.waitForAnimate,\n animating = spec.animating,\n fade = spec.fade,\n infinite = spec.infinite,\n index = spec.index,\n slideCount = spec.slideCount,\n lazyLoadedList = spec.lazyLoadedList,\n lazyLoad = spec.lazyLoad,\n currentSlide = spec.currentSlide,\n centerMode = spec.centerMode,\n slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n useCSS = spec.useCSS;\n if (waitForAnimate && animating) return {};\n var animationSlide = index,\n finalSlide,\n animationLeft,\n finalLeft;\n var state = {},\n nextState = {};\n var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);\n\n if (fade) {\n if (!infinite && (index < 0 || index >= slideCount)) return {};\n\n if (index < 0) {\n animationSlide = index + slideCount;\n } else if (index >= slideCount) {\n animationSlide = index - slideCount;\n }\n\n if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {\n lazyLoadedList.push(animationSlide);\n }\n\n state = {\n animating: true,\n currentSlide: animationSlide,\n lazyLoadedList: lazyLoadedList,\n targetSlide: animationSlide\n };\n nextState = {\n animating: false,\n targetSlide: animationSlide\n };\n } else {\n finalSlide = animationSlide;\n\n if (animationSlide < 0) {\n finalSlide = animationSlide + slideCount;\n if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;\n } else if (!canGoNext(spec) && animationSlide > currentSlide) {\n animationSlide = finalSlide = currentSlide;\n } else if (centerMode && animationSlide >= slideCount) {\n animationSlide = infinite ? slideCount : slideCount - 1;\n finalSlide = infinite ? 0 : slideCount - 1;\n } else if (animationSlide >= slideCount) {\n finalSlide = animationSlide - slideCount;\n if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;\n }\n\n if (!infinite && animationSlide + slidesToShow >= slideCount) {\n finalSlide = slideCount - slidesToShow;\n }\n\n animationLeft = getTrackLeft((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n slideIndex: animationSlide\n }));\n finalLeft = getTrackLeft((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n slideIndex: finalSlide\n }));\n\n if (!infinite) {\n if (animationLeft === finalLeft) animationSlide = finalSlide;\n animationLeft = finalLeft;\n }\n\n lazyLoad && lazyLoadedList.concat(getOnDemandLazySlides((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n currentSlide: animationSlide\n })));\n\n if (!useCSS) {\n state = {\n currentSlide: finalSlide,\n trackStyle: getTrackCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: finalLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n } else {\n state = {\n animating: true,\n currentSlide: finalSlide,\n trackStyle: getTrackAnimateCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: animationLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n nextState = {\n animating: false,\n currentSlide: finalSlide,\n trackStyle: getTrackCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: finalLeft\n })),\n swipeLeft: null,\n targetSlide: targetSlide\n };\n }\n }\n\n return {\n state: state,\n nextState: nextState\n };\n};\n\nexports.slideHandler = slideHandler;\n\nvar changeSlide = function changeSlide(spec, options) {\n var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;\n var slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n slideCount = spec.slideCount,\n currentSlide = spec.currentSlide,\n previousTargetSlide = spec.targetSlide,\n lazyLoad = spec.lazyLoad,\n infinite = spec.infinite;\n unevenOffset = slideCount % slidesToScroll !== 0;\n indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;\n\n if (options.message === \"previous\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;\n targetSlide = currentSlide - slideOffset;\n\n if (lazyLoad && !infinite) {\n previousInt = currentSlide - slideOffset;\n targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;\n }\n\n if (!infinite) {\n targetSlide = previousTargetSlide - slidesToScroll;\n }\n } else if (options.message === \"next\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;\n targetSlide = currentSlide + slideOffset;\n\n if (lazyLoad && !infinite) {\n targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;\n }\n\n if (!infinite) {\n targetSlide = previousTargetSlide + slidesToScroll;\n }\n } else if (options.message === \"dots\") {\n // Click on dots\n targetSlide = options.index * options.slidesToScroll;\n } else if (options.message === \"children\") {\n // Click on the slides\n targetSlide = options.index;\n\n if (infinite) {\n var direction = siblingDirection((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n targetSlide: targetSlide\n }));\n\n if (targetSlide > options.currentSlide && direction === \"left\") {\n targetSlide = targetSlide - slideCount;\n } else if (targetSlide < options.currentSlide && direction === \"right\") {\n targetSlide = targetSlide + slideCount;\n }\n }\n } else if (options.message === \"index\") {\n targetSlide = Number(options.index);\n }\n\n return targetSlide;\n};\n\nexports.changeSlide = changeSlide;\n\nvar keyHandler = function keyHandler(e, accessibility, rtl) {\n if (e.target.tagName.match(\"TEXTAREA|INPUT|SELECT\") || !accessibility) return \"\";\n if (e.keyCode === 37) return rtl ? \"next\" : \"previous\";\n if (e.keyCode === 39) return rtl ? \"previous\" : \"next\";\n return \"\";\n};\n\nexports.keyHandler = keyHandler;\n\nvar swipeStart = function swipeStart(e, swipe, draggable) {\n e.target.tagName === \"IMG\" && e.preventDefault();\n if (!swipe || !draggable && e.type.indexOf(\"mouse\") !== -1) return \"\";\n return {\n dragging: true,\n touchObject: {\n startX: e.touches ? e.touches[0].pageX : e.clientX,\n startY: e.touches ? e.touches[0].pageY : e.clientY,\n curX: e.touches ? e.touches[0].pageX : e.clientX,\n curY: e.touches ? e.touches[0].pageY : e.clientY\n }\n };\n};\n\nexports.swipeStart = swipeStart;\n\nvar swipeMove = function swipeMove(e, spec) {\n // spec also contains, trackRef and slideIndex\n var scrolling = spec.scrolling,\n animating = spec.animating,\n vertical = spec.vertical,\n swipeToSlide = spec.swipeToSlide,\n verticalSwiping = spec.verticalSwiping,\n rtl = spec.rtl,\n currentSlide = spec.currentSlide,\n edgeFriction = spec.edgeFriction,\n edgeDragged = spec.edgeDragged,\n onEdge = spec.onEdge,\n swiped = spec.swiped,\n swiping = spec.swiping,\n slideCount = spec.slideCount,\n slidesToScroll = spec.slidesToScroll,\n infinite = spec.infinite,\n touchObject = spec.touchObject,\n swipeEvent = spec.swipeEvent,\n listHeight = spec.listHeight,\n listWidth = spec.listWidth;\n if (scrolling) return;\n if (animating) return e.preventDefault();\n if (vertical && swipeToSlide && verticalSwiping) e.preventDefault();\n var swipeLeft,\n state = {};\n var curLeft = getTrackLeft(spec);\n touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;\n touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;\n touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));\n var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));\n\n if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {\n return {\n scrolling: true\n };\n }\n\n if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;\n var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);\n if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;\n var dotCount = Math.ceil(slideCount / slidesToScroll);\n var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);\n var touchSwipeLength = touchObject.swipeLength;\n\n if (!infinite) {\n if (currentSlide === 0 && swipeDirection === \"right\" || currentSlide + 1 >= dotCount && swipeDirection === \"left\" || !canGoNext(spec) && swipeDirection === \"left\") {\n touchSwipeLength = touchObject.swipeLength * edgeFriction;\n\n if (edgeDragged === false && onEdge) {\n onEdge(swipeDirection);\n state[\"edgeDragged\"] = true;\n }\n }\n }\n\n if (!swiped && swipeEvent) {\n swipeEvent(swipeDirection);\n state[\"swiped\"] = true;\n }\n\n if (!vertical) {\n if (!rtl) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n } else {\n swipeLeft = curLeft - touchSwipeLength * positionOffset;\n }\n } else {\n swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;\n }\n\n if (verticalSwiping) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n }\n\n state = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), {}, {\n touchObject: touchObject,\n swipeLeft: swipeLeft,\n trackStyle: getTrackCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: swipeLeft\n }))\n });\n\n if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {\n return state;\n }\n\n if (touchObject.swipeLength > 10) {\n state[\"swiping\"] = true;\n e.preventDefault();\n }\n\n return state;\n};\n\nexports.swipeMove = swipeMove;\n\nvar swipeEnd = function swipeEnd(e, spec) {\n var dragging = spec.dragging,\n swipe = spec.swipe,\n touchObject = spec.touchObject,\n listWidth = spec.listWidth,\n touchThreshold = spec.touchThreshold,\n verticalSwiping = spec.verticalSwiping,\n listHeight = spec.listHeight,\n swipeToSlide = spec.swipeToSlide,\n scrolling = spec.scrolling,\n onSwipe = spec.onSwipe,\n targetSlide = spec.targetSlide,\n currentSlide = spec.currentSlide,\n infinite = spec.infinite;\n\n if (!dragging) {\n if (swipe) e.preventDefault();\n return {};\n }\n\n var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;\n var swipeDirection = getSwipeDirection(touchObject, verticalSwiping); // reset the state of touch related state variables.\n\n var state = {\n dragging: false,\n edgeDragged: false,\n scrolling: false,\n swiping: false,\n swiped: false,\n swipeLeft: null,\n touchObject: {}\n };\n\n if (scrolling) {\n return state;\n }\n\n if (!touchObject.swipeLength) {\n return state;\n }\n\n if (touchObject.swipeLength > minSwipe) {\n e.preventDefault();\n\n if (onSwipe) {\n onSwipe(swipeDirection);\n }\n\n var slideCount, newSlide;\n var activeSlide = infinite ? currentSlide : targetSlide;\n\n switch (swipeDirection) {\n case \"left\":\n case \"up\":\n newSlide = activeSlide + getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 0;\n break;\n\n case \"right\":\n case \"down\":\n newSlide = activeSlide - getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 1;\n break;\n\n default:\n slideCount = activeSlide;\n }\n\n state[\"triggerSlideHandler\"] = slideCount;\n } else {\n // Adjust the track back to it's original position.\n var currentLeft = getTrackLeft(spec);\n state[\"trackStyle\"] = getTrackAnimateCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: currentLeft\n }));\n }\n\n return state;\n};\n\nexports.swipeEnd = swipeEnd;\n\nvar getNavigableIndexes = function getNavigableIndexes(spec) {\n var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;\n var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;\n var counter = spec.infinite ? spec.slidesToShow * -1 : 0;\n var indexes = [];\n\n while (breakpoint < max) {\n indexes.push(breakpoint);\n breakpoint = counter + spec.slidesToScroll;\n counter += Math.min(spec.slidesToScroll, spec.slidesToShow);\n }\n\n return indexes;\n};\n\nexports.getNavigableIndexes = getNavigableIndexes;\n\nvar checkNavigable = function checkNavigable(spec, index) {\n var navigables = getNavigableIndexes(spec);\n var prevNavigable = 0;\n\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n\n prevNavigable = navigables[n];\n }\n }\n\n return index;\n};\n\nexports.checkNavigable = checkNavigable;\n\nvar getSlideCount = function getSlideCount(spec) {\n var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;\n\n if (spec.swipeToSlide) {\n var swipedSlide;\n var slickList = spec.listRef;\n var slides = slickList.querySelectorAll(\".slick-slide\");\n Array.from(slides).every(function (slide) {\n if (!spec.vertical) {\n if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n } else {\n if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n }\n\n return true;\n });\n\n if (!swipedSlide) {\n return 0;\n }\n\n var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;\n var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;\n return slidesTraversed;\n } else {\n return spec.slidesToScroll;\n }\n};\n\nexports.getSlideCount = getSlideCount;\n\nvar checkSpecKeys = function checkSpecKeys(spec, keysArray) {\n return (// eslint-disable-next-line no-prototype-builtins\n keysArray.reduce(function (value, key) {\n return value && spec.hasOwnProperty(key);\n }, true) ? null : console.error(\"Keys Missing:\", spec)\n );\n};\n\nexports.checkSpecKeys = checkSpecKeys;\n\nvar getTrackCSS = function getTrackCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\"]);\n var trackWidth, trackHeight;\n var trackChildren = spec.slideCount + 2 * spec.slidesToShow;\n\n if (!spec.vertical) {\n trackWidth = getTotalSlides(spec) * spec.slideWidth;\n } else {\n trackHeight = trackChildren * spec.slideHeight;\n }\n\n var style = {\n opacity: 1,\n transition: \"\",\n WebkitTransition: \"\"\n };\n\n if (spec.useTransform) {\n var WebkitTransform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var transform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var msTransform = !spec.vertical ? \"translateX(\" + spec.left + \"px)\" : \"translateY(\" + spec.left + \"px)\";\n style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, style), {}, {\n WebkitTransform: WebkitTransform,\n transform: transform,\n msTransform: msTransform\n });\n } else {\n if (spec.vertical) {\n style[\"top\"] = spec.left;\n } else {\n style[\"left\"] = spec.left;\n }\n }\n\n if (spec.fade) style = {\n opacity: 1\n };\n if (trackWidth) style.width = trackWidth;\n if (trackHeight) style.height = trackHeight; // Fallback for IE8\n\n if (window && !window.addEventListener && window.attachEvent) {\n if (!spec.vertical) {\n style.marginLeft = spec.left + \"px\";\n } else {\n style.marginTop = spec.left + \"px\";\n }\n }\n\n return style;\n};\n\nexports.getTrackCSS = getTrackCSS;\n\nvar getTrackAnimateCSS = function getTrackAnimateCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\", \"speed\", \"cssEase\"]);\n var style = getTrackCSS(spec); // useCSS is true by default so it can be undefined\n\n if (spec.useTransform) {\n style.WebkitTransition = \"-webkit-transform \" + spec.speed + \"ms \" + spec.cssEase;\n style.transition = \"transform \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n if (spec.vertical) {\n style.transition = \"top \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n style.transition = \"left \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n\n return style;\n};\n\nexports.getTrackAnimateCSS = getTrackAnimateCSS;\n\nvar getTrackLeft = function getTrackLeft(spec) {\n if (spec.unslick) {\n return 0;\n }\n\n checkSpecKeys(spec, [\"slideIndex\", \"trackRef\", \"infinite\", \"centerMode\", \"slideCount\", \"slidesToShow\", \"slidesToScroll\", \"slideWidth\", \"listWidth\", \"variableWidth\", \"slideHeight\"]);\n var slideIndex = spec.slideIndex,\n trackRef = spec.trackRef,\n infinite = spec.infinite,\n centerMode = spec.centerMode,\n slideCount = spec.slideCount,\n slidesToShow = spec.slidesToShow,\n slidesToScroll = spec.slidesToScroll,\n slideWidth = spec.slideWidth,\n listWidth = spec.listWidth,\n variableWidth = spec.variableWidth,\n slideHeight = spec.slideHeight,\n fade = spec.fade,\n vertical = spec.vertical;\n var slideOffset = 0;\n var targetLeft;\n var targetSlide;\n var verticalOffset = 0;\n\n if (fade || spec.slideCount === 1) {\n return 0;\n }\n\n var slidesToOffset = 0;\n\n if (infinite) {\n slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area\n // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children\n\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);\n } // shift current slide to center of the frame\n\n\n if (centerMode) {\n slidesToOffset += parseInt(slidesToShow / 2);\n }\n } else {\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = slidesToShow - slideCount % slidesToScroll;\n }\n\n if (centerMode) {\n slidesToOffset = parseInt(slidesToShow / 2);\n }\n }\n\n slideOffset = slidesToOffset * slideWidth;\n verticalOffset = slidesToOffset * slideHeight;\n\n if (!vertical) {\n targetLeft = slideIndex * slideWidth * -1 + slideOffset;\n } else {\n targetLeft = slideIndex * slideHeight * -1 + verticalOffset;\n }\n\n if (variableWidth === true) {\n var targetSlideIndex;\n var trackElem = trackRef && trackRef.node;\n targetSlideIndex = slideIndex + getPreClones(spec);\n targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];\n targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;\n\n if (centerMode === true) {\n targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;\n targetSlide = trackElem && trackElem.children[targetSlideIndex];\n targetLeft = 0;\n\n for (var slide = 0; slide < targetSlideIndex; slide++) {\n targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;\n }\n\n targetLeft -= parseInt(spec.centerPadding);\n targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;\n }\n }\n\n return targetLeft;\n};\n\nexports.getTrackLeft = getTrackLeft;\n\nvar getPreClones = function getPreClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n\n if (spec.variableWidth) {\n return spec.slideCount;\n }\n\n return spec.slidesToShow + (spec.centerMode ? 1 : 0);\n};\n\nexports.getPreClones = getPreClones;\n\nvar getPostClones = function getPostClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n\n return spec.slideCount;\n};\n\nexports.getPostClones = getPostClones;\n\nvar getTotalSlides = function getTotalSlides(spec) {\n return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);\n};\n\nexports.getTotalSlides = getTotalSlides;\n\nvar siblingDirection = function siblingDirection(spec) {\n if (spec.targetSlide > spec.currentSlide) {\n if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {\n return \"left\";\n }\n\n return \"right\";\n } else {\n if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {\n return \"right\";\n }\n\n return \"left\";\n }\n};\n\nexports.siblingDirection = siblingDirection;\n\nvar slidesOnRight = function slidesOnRight(_ref) {\n var slidesToShow = _ref.slidesToShow,\n centerMode = _ref.centerMode,\n rtl = _ref.rtl,\n centerPadding = _ref.centerPadding; // returns no of slides on the right of active slide\n\n if (centerMode) {\n var right = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) right += 1;\n if (rtl && slidesToShow % 2 === 0) right += 1;\n return right;\n }\n\n if (rtl) {\n return 0;\n }\n\n return slidesToShow - 1;\n};\n\nexports.slidesOnRight = slidesOnRight;\n\nvar slidesOnLeft = function slidesOnLeft(_ref2) {\n var slidesToShow = _ref2.slidesToShow,\n centerMode = _ref2.centerMode,\n rtl = _ref2.rtl,\n centerPadding = _ref2.centerPadding; // returns no of slides on the left of active slide\n\n if (centerMode) {\n var left = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) left += 1;\n if (!rtl && slidesToShow % 2 === 0) left += 1;\n return left;\n }\n\n if (rtl) {\n return slidesToShow - 1;\n }\n\n return 0;\n};\n\nexports.slidesOnLeft = slidesOnLeft;\n\nvar canUseDOM = function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n};\n\nexports.canUseDOM = canUseDOM;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ant-design/react-slick/lib/utils/innerSliderUtils.js"],"names":["_interopRequireDefault","require","Object","defineProperty","exports","value","clamp","canUseDOM","slidesOnLeft","slidesOnRight","siblingDirection","getTotalSlides","getPostClones","getPreClones","getTrackLeft","getTrackAnimateCSS","getTrackCSS","checkSpecKeys","getSlideCount","checkNavigable","getNavigableIndexes","swipeEnd","swipeMove","swipeStart","keyHandler","changeSlide","slideHandler","initializedState","extractObject","canGoNext","getSwipeDirection","getHeight","getWidth","lazySlidesOnRight","lazySlidesOnLeft","lazyEndIndex","lazyStartIndex","getRequiredLazySlides","getOnDemandLazySlides","_objectSpread2","_react","number","lowerBound","upperBound","Math","max","min","spec","onDemandSlides","startIndex","endIndex","slideIndex","lazyLoadedList","indexOf","push","requiredSlides","currentSlide","centerMode","floor","slidesToShow","parseInt","centerPadding","elem","offsetWidth","offsetHeight","touchObject","verticalSwiping","arguments","length","undefined","xDist","yDist","r","swipeAngle","startX","curX","startY","curY","atan2","round","PI","abs","canGo","infinite","slideCount","keys","newObject","forEach","key","Children","count","children","listNode","listRef","listWidth","ceil","trackNode","trackRef","node","trackWidth","slideWidth","vertical","centerPaddingAdj","slice","slideHeight","querySelector","listHeight","initialSlide","rtl","slidesToLoad","concat","state","autoplaying","autoplay","waitForAnimate","animating","fade","index","lazyLoad","slidesToScroll","useCSS","animationSlide","finalSlide","animationLeft","finalLeft","nextState","targetSlide","trackStyle","left","swipeLeft","options","indexOffset","previousInt","slideOffset","unevenOffset","previousTargetSlide","message","direction","Number","e","accessibility","target","tagName","match","keyCode","swipe","draggable","preventDefault","type","dragging","touches","pageX","clientX","pageY","clientY","scrolling","swipeToSlide","edgeFriction","edgeDragged","onEdge","swiped","swiping","swipeEvent","curLeft","swipeLength","sqrt","pow","verticalSwipeLength","positionOffset","dotCount","swipeDirection","touchSwipeLength","touchThreshold","onSwipe","minSwipe","newSlide","activeSlide","currentLeft","breakpoint","counter","indexes","navigables","prevNavigable","n","centerOffset","swipedSlide","slickList","slides","querySelectorAll","Array","from","every","slide","offsetLeft","offsetTop","currentIndex","slidesTraversed","dataset","keysArray","reduce","hasOwnProperty","console","error","trackHeight","trackChildren","style","opacity","transition","WebkitTransition","useTransform","WebkitTransform","transform","msTransform","width","height","window","addEventListener","attachEvent","marginLeft","marginTop","speed","cssEase","unslick","variableWidth","targetLeft","verticalOffset","slidesToOffset","targetSlideIndex","trackElem","childNodes","_ref","right","_ref2","document","createElement"],"mappings":"AAAA;;AAEA,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,8CAAD,CAApC;;AAEAC,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAC3CC,EAAAA,KAAK,EAAE;AADoC,CAA7C;AAGAD,OAAO,CAACE,KAAR,GAAgBA,KAAhB;AACAF,OAAO,CAACG,SAAR,GAAoBH,OAAO,CAACI,YAAR,GAAuBJ,OAAO,CAACK,aAAR,GAAwBL,OAAO,CAACM,gBAAR,GAA2BN,OAAO,CAACO,cAA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AAAA,MAEImD,GAAG,GAAG4H,KAAK,CAAC5H,GAFhB;AAAA,MAGI/C,aAAa,GAAG2K,KAAK,CAAC3K,aAH1B,CAD8C,CAM9C;;AACA,MAAIJ,UAAJ,EAAgB;AACd,QAAIuE,IAAI,GAAG,CAACrE,YAAY,GAAG,CAAhB,IAAqB,CAArB,GAAyB,CAApC;AACA,QAAIC,QAAQ,CAACC,aAAD,CAAR,GAA0B,CAA9B,EAAiCmE,IAAI,IAAI,CAAR;AACjC,QAAI,CAACpB,GAAD,IAAQjD,YAAY,GAAG,CAAf,KAAqB,CAAjC,EAAoCqE,IAAI,IAAI,CAAR;AACpC,WAAOA,IAAP;AACD;;AAED,MAAIpB,GAAJ,EAAS;AACP,WAAOjD,YAAY,GAAG,CAAtB;AACD;;AAED,SAAO,CAAP;AACD,CAnBD;;AAqBAvD,OAAO,CAACI,YAAR,GAAuBA,YAAvB;;AAEA,IAAID,SAAS,GAAG,SAASA,SAAT,GAAqB;AACnC,SAAO,CAAC,EAAE,OAAOgN,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,CAACkB,QAAxC,IAAoDlB,MAAM,CAACkB,QAAP,CAAgBC,aAAtE,CAAR;AACD,CAFD;;AAIAtO,OAAO,CAACG,SAAR,GAAoBA,SAApB","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clamp = clamp;\nexports.canUseDOM = exports.slidesOnLeft = exports.slidesOnRight = exports.siblingDirection = exports.getTotalSlides = exports.getPostClones = exports.getPreClones = exports.getTrackLeft = exports.getTrackAnimateCSS = exports.getTrackCSS = exports.checkSpecKeys = exports.getSlideCount = exports.checkNavigable = exports.getNavigableIndexes = exports.swipeEnd = exports.swipeMove = exports.swipeStart = exports.keyHandler = exports.changeSlide = exports.slideHandler = exports.initializedState = exports.extractObject = exports.canGoNext = exports.getSwipeDirection = exports.getHeight = exports.getWidth = exports.lazySlidesOnRight = exports.lazySlidesOnLeft = exports.lazyEndIndex = exports.lazyStartIndex = exports.getRequiredLazySlides = exports.getOnDemandLazySlides = void 0;\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction clamp(number, lowerBound, upperBound) {\n return Math.max(lowerBound, Math.min(number, upperBound));\n}\n\nvar getOnDemandLazySlides = function getOnDemandLazySlides(spec) {\n var onDemandSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {\n onDemandSlides.push(slideIndex);\n }\n }\n\n return onDemandSlides;\n}; // return list of slides that need to be present\n\n\nexports.getOnDemandLazySlides = getOnDemandLazySlides;\n\nvar getRequiredLazySlides = function getRequiredLazySlides(spec) {\n var requiredSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n requiredSlides.push(slideIndex);\n }\n\n return requiredSlides;\n}; // startIndex that needs to be present\n\n\nexports.getRequiredLazySlides = getRequiredLazySlides;\n\nvar lazyStartIndex = function lazyStartIndex(spec) {\n return spec.currentSlide - lazySlidesOnLeft(spec);\n};\n\nexports.lazyStartIndex = lazyStartIndex;\n\nvar lazyEndIndex = function lazyEndIndex(spec) {\n return spec.currentSlide + lazySlidesOnRight(spec);\n};\n\nexports.lazyEndIndex = lazyEndIndex;\n\nvar lazySlidesOnLeft = function lazySlidesOnLeft(spec) {\n return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;\n};\n\nexports.lazySlidesOnLeft = lazySlidesOnLeft;\n\nvar lazySlidesOnRight = function lazySlidesOnRight(spec) {\n return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;\n}; // get width of an element\n\n\nexports.lazySlidesOnRight = lazySlidesOnRight;\n\nvar getWidth = function getWidth(elem) {\n return elem && elem.offsetWidth || 0;\n};\n\nexports.getWidth = getWidth;\n\nvar getHeight = function getHeight(elem) {\n return elem && elem.offsetHeight || 0;\n};\n\nexports.getHeight = getHeight;\n\nvar getSwipeDirection = function getSwipeDirection(touchObject) {\n var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var xDist, yDist, r, swipeAngle;\n xDist = touchObject.startX - touchObject.curX;\n yDist = touchObject.startY - touchObject.curY;\n r = Math.atan2(yDist, xDist);\n swipeAngle = Math.round(r * 180 / Math.PI);\n\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n\n if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {\n return \"left\";\n }\n\n if (swipeAngle >= 135 && swipeAngle <= 225) {\n return \"right\";\n }\n\n if (verticalSwiping === true) {\n if (swipeAngle >= 35 && swipeAngle <= 135) {\n return \"up\";\n } else {\n return \"down\";\n }\n }\n\n return \"vertical\";\n}; // whether or not we can go next\n\n\nexports.getSwipeDirection = getSwipeDirection;\n\nvar canGoNext = function canGoNext(spec) {\n var canGo = true;\n\n if (!spec.infinite) {\n if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {\n canGo = false;\n } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {\n canGo = false;\n }\n }\n\n return canGo;\n}; // given an object and a list of keys, return new object with given keys\n\n\nexports.canGoNext = canGoNext;\n\nvar extractObject = function extractObject(spec, keys) {\n var newObject = {};\n keys.forEach(function (key) {\n return newObject[key] = spec[key];\n });\n return newObject;\n}; // get initialized state\n\n\nexports.extractObject = extractObject;\n\nvar initializedState = function initializedState(spec) {\n // spec also contains listRef, trackRef\n var slideCount = _react[\"default\"].Children.count(spec.children);\n\n var listNode = spec.listRef;\n var listWidth = Math.ceil(getWidth(listNode));\n var trackNode = spec.trackRef && spec.trackRef.node;\n var trackWidth = Math.ceil(getWidth(trackNode));\n var slideWidth;\n\n if (!spec.vertical) {\n var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;\n\n if (typeof spec.centerPadding === \"string\" && spec.centerPadding.slice(-1) === \"%\") {\n centerPaddingAdj *= listWidth / 100;\n }\n\n slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);\n } else {\n slideWidth = listWidth;\n }\n\n var slideHeight = listNode && getHeight(listNode.querySelector('[data-index=\"0\"]'));\n var listHeight = slideHeight * spec.slidesToShow;\n var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;\n\n if (spec.rtl && spec.currentSlide === undefined) {\n currentSlide = slideCount - 1 - spec.initialSlide;\n }\n\n var lazyLoadedList = spec.lazyLoadedList || [];\n var slidesToLoad = getOnDemandLazySlides((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n currentSlide: currentSlide,\n lazyLoadedList: lazyLoadedList\n }));\n lazyLoadedList.concat(slidesToLoad);\n var state = {\n slideCount: slideCount,\n slideWidth: slideWidth,\n listWidth: listWidth,\n trackWidth: trackWidth,\n currentSlide: currentSlide,\n slideHeight: slideHeight,\n listHeight: listHeight,\n lazyLoadedList: lazyLoadedList\n };\n\n if (spec.autoplaying === null && spec.autoplay) {\n state[\"autoplaying\"] = \"playing\";\n }\n\n return state;\n};\n\nexports.initializedState = initializedState;\n\nvar slideHandler = function slideHandler(spec) {\n var waitForAnimate = spec.waitForAnimate,\n animating = spec.animating,\n fade = spec.fade,\n infinite = spec.infinite,\n index = spec.index,\n slideCount = spec.slideCount,\n lazyLoadedList = spec.lazyLoadedList,\n lazyLoad = spec.lazyLoad,\n currentSlide = spec.currentSlide,\n centerMode = spec.centerMode,\n slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n useCSS = spec.useCSS;\n if (waitForAnimate && animating) return {};\n var animationSlide = index,\n finalSlide,\n animationLeft,\n finalLeft;\n var state = {},\n nextState = {};\n var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);\n\n if (fade) {\n if (!infinite && (index < 0 || index >= slideCount)) return {};\n\n if (index < 0) {\n animationSlide = index + slideCount;\n } else if (index >= slideCount) {\n animationSlide = index - slideCount;\n }\n\n if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {\n lazyLoadedList.push(animationSlide);\n }\n\n state = {\n animating: true,\n currentSlide: animationSlide,\n lazyLoadedList: lazyLoadedList,\n targetSlide: animationSlide\n };\n nextState = {\n animating: false,\n targetSlide: animationSlide\n };\n } else {\n finalSlide = animationSlide;\n\n if (animationSlide < 0) {\n finalSlide = animationSlide + slideCount;\n if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;\n } else if (!canGoNext(spec) && animationSlide > currentSlide) {\n animationSlide = finalSlide = currentSlide;\n } else if (centerMode && animationSlide >= slideCount) {\n animationSlide = infinite ? slideCount : slideCount - 1;\n finalSlide = infinite ? 0 : slideCount - 1;\n } else if (animationSlide >= slideCount) {\n finalSlide = animationSlide - slideCount;\n if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;\n }\n\n if (!infinite && animationSlide + slidesToShow >= slideCount) {\n finalSlide = slideCount - slidesToShow;\n }\n\n animationLeft = getTrackLeft((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n slideIndex: animationSlide\n }));\n finalLeft = getTrackLeft((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n slideIndex: finalSlide\n }));\n\n if (!infinite) {\n if (animationLeft === finalLeft) animationSlide = finalSlide;\n animationLeft = finalLeft;\n }\n\n lazyLoad && lazyLoadedList.concat(getOnDemandLazySlides((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n currentSlide: animationSlide\n })));\n\n if (!useCSS) {\n state = {\n currentSlide: finalSlide,\n trackStyle: getTrackCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: finalLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n } else {\n state = {\n animating: true,\n currentSlide: finalSlide,\n trackStyle: getTrackAnimateCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: animationLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n nextState = {\n animating: false,\n currentSlide: finalSlide,\n trackStyle: getTrackCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: finalLeft\n })),\n swipeLeft: null,\n targetSlide: targetSlide\n };\n }\n }\n\n return {\n state: state,\n nextState: nextState\n };\n};\n\nexports.slideHandler = slideHandler;\n\nvar changeSlide = function changeSlide(spec, options) {\n var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;\n var slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n slideCount = spec.slideCount,\n currentSlide = spec.currentSlide,\n previousTargetSlide = spec.targetSlide,\n lazyLoad = spec.lazyLoad,\n infinite = spec.infinite;\n unevenOffset = slideCount % slidesToScroll !== 0;\n indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;\n\n if (options.message === \"previous\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;\n targetSlide = currentSlide - slideOffset;\n\n if (lazyLoad && !infinite) {\n previousInt = currentSlide - slideOffset;\n targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;\n }\n\n if (!infinite) {\n targetSlide = previousTargetSlide - slidesToScroll;\n }\n } else if (options.message === \"next\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;\n targetSlide = currentSlide + slideOffset;\n\n if (lazyLoad && !infinite) {\n targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;\n }\n\n if (!infinite) {\n targetSlide = previousTargetSlide + slidesToScroll;\n }\n } else if (options.message === \"dots\") {\n // Click on dots\n targetSlide = options.index * options.slidesToScroll;\n } else if (options.message === \"children\") {\n // Click on the slides\n targetSlide = options.index;\n\n if (infinite) {\n var direction = siblingDirection((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n targetSlide: targetSlide\n }));\n\n if (targetSlide > options.currentSlide && direction === \"left\") {\n targetSlide = targetSlide - slideCount;\n } else if (targetSlide < options.currentSlide && direction === \"right\") {\n targetSlide = targetSlide + slideCount;\n }\n }\n } else if (options.message === \"index\") {\n targetSlide = Number(options.index);\n }\n\n return targetSlide;\n};\n\nexports.changeSlide = changeSlide;\n\nvar keyHandler = function keyHandler(e, accessibility, rtl) {\n if (e.target.tagName.match(\"TEXTAREA|INPUT|SELECT\") || !accessibility) return \"\";\n if (e.keyCode === 37) return rtl ? \"next\" : \"previous\";\n if (e.keyCode === 39) return rtl ? \"previous\" : \"next\";\n return \"\";\n};\n\nexports.keyHandler = keyHandler;\n\nvar swipeStart = function swipeStart(e, swipe, draggable) {\n e.target.tagName === \"IMG\" && e.preventDefault();\n if (!swipe || !draggable && e.type.indexOf(\"mouse\") !== -1) return \"\";\n return {\n dragging: true,\n touchObject: {\n startX: e.touches ? e.touches[0].pageX : e.clientX,\n startY: e.touches ? e.touches[0].pageY : e.clientY,\n curX: e.touches ? e.touches[0].pageX : e.clientX,\n curY: e.touches ? e.touches[0].pageY : e.clientY\n }\n };\n};\n\nexports.swipeStart = swipeStart;\n\nvar swipeMove = function swipeMove(e, spec) {\n // spec also contains, trackRef and slideIndex\n var scrolling = spec.scrolling,\n animating = spec.animating,\n vertical = spec.vertical,\n swipeToSlide = spec.swipeToSlide,\n verticalSwiping = spec.verticalSwiping,\n rtl = spec.rtl,\n currentSlide = spec.currentSlide,\n edgeFriction = spec.edgeFriction,\n edgeDragged = spec.edgeDragged,\n onEdge = spec.onEdge,\n swiped = spec.swiped,\n swiping = spec.swiping,\n slideCount = spec.slideCount,\n slidesToScroll = spec.slidesToScroll,\n infinite = spec.infinite,\n touchObject = spec.touchObject,\n swipeEvent = spec.swipeEvent,\n listHeight = spec.listHeight,\n listWidth = spec.listWidth;\n if (scrolling) return;\n if (animating) return e.preventDefault();\n if (vertical && swipeToSlide && verticalSwiping) e.preventDefault();\n var swipeLeft,\n state = {};\n var curLeft = getTrackLeft(spec);\n touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;\n touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;\n touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));\n var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));\n\n if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {\n return {\n scrolling: true\n };\n }\n\n if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;\n var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);\n if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;\n var dotCount = Math.ceil(slideCount / slidesToScroll);\n var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);\n var touchSwipeLength = touchObject.swipeLength;\n\n if (!infinite) {\n if (currentSlide === 0 && swipeDirection === \"right\" || currentSlide + 1 >= dotCount && swipeDirection === \"left\" || !canGoNext(spec) && swipeDirection === \"left\") {\n touchSwipeLength = touchObject.swipeLength * edgeFriction;\n\n if (edgeDragged === false && onEdge) {\n onEdge(swipeDirection);\n state[\"edgeDragged\"] = true;\n }\n }\n }\n\n if (!swiped && swipeEvent) {\n swipeEvent(swipeDirection);\n state[\"swiped\"] = true;\n }\n\n if (!vertical) {\n if (!rtl) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n } else {\n swipeLeft = curLeft - touchSwipeLength * positionOffset;\n }\n } else {\n swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;\n }\n\n if (verticalSwiping) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n }\n\n state = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, state), {}, {\n touchObject: touchObject,\n swipeLeft: swipeLeft,\n trackStyle: getTrackCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: swipeLeft\n }))\n });\n\n if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {\n return state;\n }\n\n if (touchObject.swipeLength > 10) {\n state[\"swiping\"] = true;\n e.preventDefault();\n }\n\n return state;\n};\n\nexports.swipeMove = swipeMove;\n\nvar swipeEnd = function swipeEnd(e, spec) {\n var dragging = spec.dragging,\n swipe = spec.swipe,\n touchObject = spec.touchObject,\n listWidth = spec.listWidth,\n touchThreshold = spec.touchThreshold,\n verticalSwiping = spec.verticalSwiping,\n listHeight = spec.listHeight,\n swipeToSlide = spec.swipeToSlide,\n scrolling = spec.scrolling,\n onSwipe = spec.onSwipe,\n targetSlide = spec.targetSlide,\n currentSlide = spec.currentSlide,\n infinite = spec.infinite;\n\n if (!dragging) {\n if (swipe) e.preventDefault();\n return {};\n }\n\n var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;\n var swipeDirection = getSwipeDirection(touchObject, verticalSwiping); // reset the state of touch related state variables.\n\n var state = {\n dragging: false,\n edgeDragged: false,\n scrolling: false,\n swiping: false,\n swiped: false,\n swipeLeft: null,\n touchObject: {}\n };\n\n if (scrolling) {\n return state;\n }\n\n if (!touchObject.swipeLength) {\n return state;\n }\n\n if (touchObject.swipeLength > minSwipe) {\n e.preventDefault();\n\n if (onSwipe) {\n onSwipe(swipeDirection);\n }\n\n var slideCount, newSlide;\n var activeSlide = infinite ? currentSlide : targetSlide;\n\n switch (swipeDirection) {\n case \"left\":\n case \"up\":\n newSlide = activeSlide + getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 0;\n break;\n\n case \"right\":\n case \"down\":\n newSlide = activeSlide - getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 1;\n break;\n\n default:\n slideCount = activeSlide;\n }\n\n state[\"triggerSlideHandler\"] = slideCount;\n } else {\n // Adjust the track back to it's original position.\n var currentLeft = getTrackLeft(spec);\n state[\"trackStyle\"] = getTrackAnimateCSS((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n left: currentLeft\n }));\n }\n\n return state;\n};\n\nexports.swipeEnd = swipeEnd;\n\nvar getNavigableIndexes = function getNavigableIndexes(spec) {\n var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;\n var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;\n var counter = spec.infinite ? spec.slidesToShow * -1 : 0;\n var indexes = [];\n\n while (breakpoint < max) {\n indexes.push(breakpoint);\n breakpoint = counter + spec.slidesToScroll;\n counter += Math.min(spec.slidesToScroll, spec.slidesToShow);\n }\n\n return indexes;\n};\n\nexports.getNavigableIndexes = getNavigableIndexes;\n\nvar checkNavigable = function checkNavigable(spec, index) {\n var navigables = getNavigableIndexes(spec);\n var prevNavigable = 0;\n\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n\n prevNavigable = navigables[n];\n }\n }\n\n return index;\n};\n\nexports.checkNavigable = checkNavigable;\n\nvar getSlideCount = function getSlideCount(spec) {\n var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;\n\n if (spec.swipeToSlide) {\n var swipedSlide;\n var slickList = spec.listRef;\n var slides = slickList.querySelectorAll(\".slick-slide\");\n Array.from(slides).every(function (slide) {\n if (!spec.vertical) {\n if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n } else {\n if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n }\n\n return true;\n });\n\n if (!swipedSlide) {\n return 0;\n }\n\n var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;\n var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;\n return slidesTraversed;\n } else {\n return spec.slidesToScroll;\n }\n};\n\nexports.getSlideCount = getSlideCount;\n\nvar checkSpecKeys = function checkSpecKeys(spec, keysArray) {\n return (// eslint-disable-next-line no-prototype-builtins\n keysArray.reduce(function (value, key) {\n return value && spec.hasOwnProperty(key);\n }, true) ? null : console.error(\"Keys Missing:\", spec)\n );\n};\n\nexports.checkSpecKeys = checkSpecKeys;\n\nvar getTrackCSS = function getTrackCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\"]);\n var trackWidth, trackHeight;\n var trackChildren = spec.slideCount + 2 * spec.slidesToShow;\n\n if (!spec.vertical) {\n trackWidth = getTotalSlides(spec) * spec.slideWidth;\n } else {\n trackHeight = trackChildren * spec.slideHeight;\n }\n\n var style = {\n opacity: 1,\n transition: \"\",\n WebkitTransition: \"\"\n };\n\n if (spec.useTransform) {\n var WebkitTransform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var transform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var msTransform = !spec.vertical ? \"translateX(\" + spec.left + \"px)\" : \"translateY(\" + spec.left + \"px)\";\n style = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, style), {}, {\n WebkitTransform: WebkitTransform,\n transform: transform,\n msTransform: msTransform\n });\n } else {\n if (spec.vertical) {\n style[\"top\"] = spec.left;\n } else {\n style[\"left\"] = spec.left;\n }\n }\n\n if (spec.fade) style = {\n opacity: 1\n };\n if (trackWidth) style.width = trackWidth;\n if (trackHeight) style.height = trackHeight; // Fallback for IE8\n\n if (window && !window.addEventListener && window.attachEvent) {\n if (!spec.vertical) {\n style.marginLeft = spec.left + \"px\";\n } else {\n style.marginTop = spec.left + \"px\";\n }\n }\n\n return style;\n};\n\nexports.getTrackCSS = getTrackCSS;\n\nvar getTrackAnimateCSS = function getTrackAnimateCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\", \"speed\", \"cssEase\"]);\n var style = getTrackCSS(spec); // useCSS is true by default so it can be undefined\n\n if (spec.useTransform) {\n style.WebkitTransition = \"-webkit-transform \" + spec.speed + \"ms \" + spec.cssEase;\n style.transition = \"transform \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n if (spec.vertical) {\n style.transition = \"top \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n style.transition = \"left \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n\n return style;\n};\n\nexports.getTrackAnimateCSS = getTrackAnimateCSS;\n\nvar getTrackLeft = function getTrackLeft(spec) {\n if (spec.unslick) {\n return 0;\n }\n\n checkSpecKeys(spec, [\"slideIndex\", \"trackRef\", \"infinite\", \"centerMode\", \"slideCount\", \"slidesToShow\", \"slidesToScroll\", \"slideWidth\", \"listWidth\", \"variableWidth\", \"slideHeight\"]);\n var slideIndex = spec.slideIndex,\n trackRef = spec.trackRef,\n infinite = spec.infinite,\n centerMode = spec.centerMode,\n slideCount = spec.slideCount,\n slidesToShow = spec.slidesToShow,\n slidesToScroll = spec.slidesToScroll,\n slideWidth = spec.slideWidth,\n listWidth = spec.listWidth,\n variableWidth = spec.variableWidth,\n slideHeight = spec.slideHeight,\n fade = spec.fade,\n vertical = spec.vertical;\n var slideOffset = 0;\n var targetLeft;\n var targetSlide;\n var verticalOffset = 0;\n\n if (fade || spec.slideCount === 1) {\n return 0;\n }\n\n var slidesToOffset = 0;\n\n if (infinite) {\n slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area\n // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children\n\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);\n } // shift current slide to center of the frame\n\n\n if (centerMode) {\n slidesToOffset += parseInt(slidesToShow / 2);\n }\n } else {\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = slidesToShow - slideCount % slidesToScroll;\n }\n\n if (centerMode) {\n slidesToOffset = parseInt(slidesToShow / 2);\n }\n }\n\n slideOffset = slidesToOffset * slideWidth;\n verticalOffset = slidesToOffset * slideHeight;\n\n if (!vertical) {\n targetLeft = slideIndex * slideWidth * -1 + slideOffset;\n } else {\n targetLeft = slideIndex * slideHeight * -1 + verticalOffset;\n }\n\n if (variableWidth === true) {\n var targetSlideIndex;\n var trackElem = trackRef && trackRef.node;\n targetSlideIndex = slideIndex + getPreClones(spec);\n targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];\n targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;\n\n if (centerMode === true) {\n targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;\n targetSlide = trackElem && trackElem.children[targetSlideIndex];\n targetLeft = 0;\n\n for (var slide = 0; slide < targetSlideIndex; slide++) {\n targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;\n }\n\n targetLeft -= parseInt(spec.centerPadding);\n targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;\n }\n }\n\n return targetLeft;\n};\n\nexports.getTrackLeft = getTrackLeft;\n\nvar getPreClones = function getPreClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n\n if (spec.variableWidth) {\n return spec.slideCount;\n }\n\n return spec.slidesToShow + (spec.centerMode ? 1 : 0);\n};\n\nexports.getPreClones = getPreClones;\n\nvar getPostClones = function getPostClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n\n return spec.slideCount;\n};\n\nexports.getPostClones = getPostClones;\n\nvar getTotalSlides = function getTotalSlides(spec) {\n return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);\n};\n\nexports.getTotalSlides = getTotalSlides;\n\nvar siblingDirection = function siblingDirection(spec) {\n if (spec.targetSlide > spec.currentSlide) {\n if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {\n return \"left\";\n }\n\n return \"right\";\n } else {\n if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {\n return \"right\";\n }\n\n return \"left\";\n }\n};\n\nexports.siblingDirection = siblingDirection;\n\nvar slidesOnRight = function slidesOnRight(_ref) {\n var slidesToShow = _ref.slidesToShow,\n centerMode = _ref.centerMode,\n rtl = _ref.rtl,\n centerPadding = _ref.centerPadding;\n\n // returns no of slides on the right of active slide\n if (centerMode) {\n var right = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) right += 1;\n if (rtl && slidesToShow % 2 === 0) right += 1;\n return right;\n }\n\n if (rtl) {\n return 0;\n }\n\n return slidesToShow - 1;\n};\n\nexports.slidesOnRight = slidesOnRight;\n\nvar slidesOnLeft = function slidesOnLeft(_ref2) {\n var slidesToShow = _ref2.slidesToShow,\n centerMode = _ref2.centerMode,\n rtl = _ref2.rtl,\n centerPadding = _ref2.centerPadding;\n\n // returns no of slides on the left of active slide\n if (centerMode) {\n var left = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) left += 1;\n if (!rtl && slidesToShow % 2 === 0) left += 1;\n return left;\n }\n\n if (rtl) {\n return slidesToShow - 1;\n }\n\n return 0;\n};\n\nexports.slidesOnLeft = slidesOnLeft;\n\nvar canUseDOM = function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n};\n\nexports.canUseDOM = canUseDOM;"]},"metadata":{},"sourceType":"script"}