(window["webpackJsonp_name_"] = window["webpackJsonp_name_"] || []).push([[37,34,35,67],{
/***/ 171:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// Function from David Walsh: http://davidwalsh.name/css-animation-callback
function whichTransitionEvent() {
var t,
el = document.createElement('fakeelement');
var transitions = {
'transition': 'transitionend',
'OTransition': 'oTransitionEnd',
'MozTransition': 'transitionend',
'WebkitTransition': 'webkitTransitionEnd'
};
for (t in transitions) {
if (el.style[t] !== undefined) {
return transitions[t];
}
}
}
var transitionEvent = exports.transitionEvent = whichTransitionEvent();
/***/ }),
/***/ 175:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* Detecting CSS animation support
* @type {Boolean}
*/
var animation = false,
animationstring = 'animation',
keyframeprefix = '',
domPrefixes = 'Webkit Moz O ms Khtml'.split(' '),
pfx = '',
elm = document.createElement('div');
if (elm.style.animationName !== undefined) {
animation = true;
}
if (animation === false) {
for (var i = 0; i < domPrefixes.length; i++) {
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
pfx = domPrefixes[i];
animationstring = pfx + 'Animation';
keyframeprefix = '-' + pfx.toLowerCase() + '-';
animation = true;
break;
}
}
}
var animationSupport = exports.animationSupport = animation;
/***/ }),
/***/ 195:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _animationSupport = __webpack_require__(175);
var _transitionEvent = __webpack_require__(171);
__webpack_require__(420);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Slider = function () {
function Slider() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, Slider);
this.isInited = false;
this.isAnimating = false;
this._params = Object.assign({}, Slider.default, params);
if (!this.elem) {
return;
}
this.isMouseOver = false;
this.init();
}
_createClass(Slider, [{
key: 'init',
value: function init() {
var _this = this;
var slider = this.slider = this.elem;
if (!slider) {
return false;
}
slider.classList.add('wpw-slider');
var sliderItems = this.sliderItems = slider.children;
this.sliderItems = [];
this.dots = [];
this.currentItem = 0;
if (sliderItems.length <= 0) {
return false;
}
sliderItems[0].classList.add('active');
if (sliderItems.length <= 1) {
return false;
}
[].forEach.call(sliderItems, function (item) {
_this.sliderItems.push(item);
item.classList.add('wpw-slider-item');
});
this.currentItem = 0;
this.prevItem = 0;
this.createAnimateBox();
this.createDots();
this.mouseEvent();
this.onTouch();
this.changeSlide();
this.slider.classList.remove('wpw-slider__init');
this.isInited = true;
if (this.autoplay) {
if (this.isMouseOver) {
return false;
}
}
}
}, {
key: 'action',
value: function action(_action) {
switch (_action) {
// Slider event
case 'slider-prev-slide':
this.goPrev(true);
break;
case 'slider-next-slide':
this.goNext(true);
break;
}
}
}, {
key: 'createAnimateBox',
value: function createAnimateBox() {
var _this2 = this;
if (this.sliderItems.length <= 1) {
return false;
}
var box = this.animationBox = document.createElement('DIV');
box.classList.add('wpw-slider__animate-box');
var animate = function animate() {
if (box.classList.contains('wpw-slider__animate-box_animate')) {
if (box.classList.contains('wpw-slider__animate-box_direction_left')) {
_this2.animationBox.classList.remove('wpw-slider__animate-box_direction_left');
box.classList.add('wpw-slider__animate-box_direction_right');
} else {
_this2.animationBox.classList.remove('wpw-slider__animate-box_direction_right');
box.classList.add('wpw-slider__animate-box_direction_left');
}
_this2.changeSlide();
box.classList.remove('wpw-slider__animate-box_animate');
} else {
_this2.isAnimating = false;
_this2.animationBox.classList.remove('wpw-slider__animate-box_direction_left');
_this2.animationBox.classList.remove('wpw-slider__animate-box_direction_right');
}
};
box.addEventListener(_transitionEvent.transitionEvent, animate);
var arrowTemplateLeft = '';
var arrowTemplateRight = '';
//'';
this.fullPostNextSlide = document.createElement('SPAN');
this.fullPostNextSlide.className = 'slider-next-slide';
this.fullPostNextSlide.setAttribute('data-action', 'slider-next-slide');
this.fullPostNextSlide.setAttribute('data-index', this.index);
this.fullPostNextSlide.setAttribute('data-element', this.elemName);
this.fullPostNextSlide.innerHTML = arrowTemplateRight;
this.fullPostNextSlide.onclick = function (event) {
event.stopPropagation();
_this2.goNext(true);
};
this.fullPostPrevSlide = document.createElement('SPAN');
this.fullPostPrevSlide.className = 'slider-prev-slide';
this.fullPostPrevSlide.setAttribute('data-action', 'slider-prev-slide');
this.fullPostPrevSlide.setAttribute('data-index', this.index);
this.fullPostPrevSlide.setAttribute('data-element', this.elemName);
this.fullPostPrevSlide.innerHTML = arrowTemplateLeft;
this.fullPostPrevSlide.onclick = function (event) {
event.stopPropagation();
_this2.goPrev(true);
};
this.slider.appendChild(box);
this.slider.appendChild(this.fullPostNextSlide);
this.slider.appendChild(this.fullPostPrevSlide);
}
}, {
key: 'createDots',
value: function createDots() {
var _this3 = this;
var dots = document.createElement('DIV');
dots.className = 'slider-dots';
[].forEach.call(this.sliderItems, function (item, index) {
var dot = document.createElement('SPAN');
dot.className = 'slider-dots__item';
dots.appendChild(dot);
dot.onclick = function (event) {
event.stopPropagation();
_this3.goTo(true, index);
};
_this3.dots.push(dot);
});
this.slider.appendChild(dots);
}
}, {
key: 'goNext',
value: function goNext() {
var isClick = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (this.sliderItems.length <= 1) {
return false;
}
if (!isClick) {
if (this.isMouseOver) {
return false;
}
}
if (this.isAnimating) {
return false;
}
this.prevItem = this.currentItem;
this.currentItem++;
if (this.currentItem >= this.sliderItems.length) {
this.currentItem = 0;
}
if (!_animationSupport.animationSupport) {
this.changeSlide();
} else {
this.isAnimating = true;
this.animationBox.classList.add('wpw-slider__animate-box_direction_right');
this.animationBox.classList.add('wpw-slider__animate-box_animate');
}
}
}, {
key: 'goPrev',
value: function goPrev() {
var isClick = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (this.sliderItems.length <= 1) {
return false;
}
if (!isClick) {
if (this.isMouseOver) {
return false;
}
}
if (this.isAnimating) {
return false;
}
this.prevItem = this.currentItem;
this.currentItem--;
if (this.currentItem < 0) {
this.currentItem = this.sliderItems.length - 1;
}
if (!_animationSupport.animationSupport) {
this.changeSlide();
} else {
this.isAnimating = true;
this.animationBox.classList.add('wpw-slider__animate-box_direction_left');
this.animationBox.classList.add('wpw-slider__animate-box_animate');
}
}
}, {
key: 'goTo',
value: function goTo() {
var isClick = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var currentItem = arguments[1];
var go = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (this.sliderItems.length <= 1) {
return false;
}
if (!isClick) {
if (this.isMouseOver) {
return false;
}
}
if (!currentItem && currentItem !== 0) {
return false;
}
if (this.isAnimating) {
return false;
}
this.prevItem = this.currentItem;
this.currentItem = currentItem;
if (this.prevItem === this.currentItem) {
return false;
}
if (this.currentItem < 0) {
this.currentItem = this.sliderItems.length - 1;
}
if (this.currentItem >= this.sliderItems.length) {
this.currentItem = 0;
}
if (!_animationSupport.animationSupport) {
this.changeSlide();
} else {
if (go) {
this.changeSlide();
return false;
}
this.isAnimating = true;
//this.animationBox.classList.add( 'wpw-slider__animate-box_direction_left' );
//this.animationBox.classList.add( 'wpw-slider__animate-box_animate' );
if (this.prevItem < this.currentItem) {
this.animationBox.classList.add('wpw-slider__animate-box_direction_right');
this.animationBox.classList.add('wpw-slider__animate-box_animate');
} else if (this.prevItem > this.currentItem) {
this.animationBox.classList.add('wpw-slider__animate-box_direction_left');
this.animationBox.classList.add('wpw-slider__animate-box_animate');
}
}
}
}, {
key: 'changeSlide',
value: function changeSlide() {
this.sliderItems[this.prevItem] && this.sliderItems[this.prevItem].classList.remove('active');
this.sliderItems[this.currentItem] && this.sliderItems[this.currentItem].classList.add('active');
this.dots[this.prevItem] && this.dots[this.prevItem].classList.remove('slider-dots__item_active');
this.dots[this.currentItem] && this.dots[this.currentItem].classList.add('slider-dots__item_active');
}
}, {
key: 'mouseEvent',
value: function mouseEvent() {
var _this4 = this;
if (this.sliderItems.length <= 1) {
return false;
}
var slider = this.slider;
slider.onmouseenter = function () {
_this4.isMouseOver = true;
clearTimeout(_this4.setTimeout);
};
slider.onmouseleave = function () {
_this4.isMouseOver = false;
if (_this4.autoplay) {
setTimeout(function () {
_this4.goNext();
}, 2500);
}
};
//let isMouseDown = false,
// startX, endX, res;
//slider.addEventListener( 'mousedown', event => {
// event.preventDefault();
// if ( this.isAnimating ) {
// return false;
// }
// isMouseDown = true;
// startX = event.clientX;
//} );
//document.addEventListener( 'mousemove', event => {
// if ( !isMouseDown ) {
// return false;
// }
// endX = event.clientX;
// res = startX - endX;
// if ( res > 0 ) {
// this.animationBox.classList.remove( 'wpw-slider__animate-box_direction_left' );
// this.animationBox.classList.add( 'wpw-slider__animate-box_direction_right' );
// this.animationBox.classList.add( 'wpw-slider__animate-box_animate' );
// let scale = `0.${res < 10 ? '0' : ''}${parseInt( Math.abs( res ) / 10, 10 ) < 99 ?
// parseInt( Math.abs( res ) / 10, 10 ) : 99}`;
//
// this.animationBox.style.cssText = `
// transform: scale(${scale}, 1) translateZ(0);
// transition: transform .0s ease;
// `;
// } else if ( res < 0 ) {
// this.animationBox.classList.remove( 'wpw-slider__animate-box_direction_left' );
// this.animationBox.classList.add( 'wpw-slider__animate-box_direction_right' );
// this.animationBox.classList.add( 'wpw-slider__animate-box_animate' );
// }
//} );
//document.addEventListener( 'mouseup', event => {
// if ( !isMouseDown ) {
// return false;
// }
// isMouseDown = false;
// this.animationBox.style.cssText = '';
// if ( res > 0 ) {
// this.goNext( true );
// } else if ( res < 0 ) {
// this.goPrev( true );
// }
//} );
}
}, {
key: 'onTouch',
value: function onTouch() {
var _this5 = this;
if (this.sliderItems.length <= 1) {
return false;
}
var // showPrev = false,
// showNext = false,
startX = 0,
endX = 0,
translateX = 0;
// touch start
this.slider.addEventListener('touchstart', function (event) {
var touch = event.touches[0];
startX = touch.clientX;
});
// touch move
this.slider.addEventListener('touchmove', function (event) {
var touch = event.touches[0];
endX = touch.clientX;
translateX = startX - endX;
});
// touch end
this.slider.addEventListener('touchend', function () {
if (translateX < -20) {
_this5.goPrev(true);
}
if (translateX > 20) {
_this5.goNext(true);
}
translateX = 0;
});
}
}, {
key: 'elem',
get: function get() {
return this._params.elem;
}
}, {
key: 'elemName',
get: function get() {
return this._params.elemName;
}
}, {
key: 'autoplay',
get: function get() {
return this._params.autoplay;
}
}, {
key: 'index',
get: function get() {
return this._params.index;
}
}], [{
key: 'default',
get: function get() {
return {
elem: null,
elemName: null,
index: 0,
autoplay: false
};
}
}]);
return Slider;
}();
exports.default = Slider;
/***/ }),
/***/ 420:
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(439);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(167)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/***/ 439:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(168)(false);
// imports
// module
exports.push([module.i, ".project-slider,.wpw-slider{position:relative;display:block;width:100%;height:100vh;min-height:450px}@media (min-width:992px){.project-slider,.wpw-slider{height:calc(100vh - 70px)}}@media (min-width:1200px){.project-slider,.wpw-slider{height:calc(100vh - 120px)}}.post-article .project-slider,.post-article .wpw-slider{max-height:50vh}.wpw-parallax .project-slider,.wpw-parallax .wpw-slider{width:100%;height:100%}.project-slider .single-project-slider .project-slider-item iframe,.project-slider .single-project-slider .project-slider-item img,.project-slider .single-project-slider .wpw-slider-item iframe,.project-slider .single-project-slider .wpw-slider-item img,.wpw-slider .single-project-slider .project-slider-item iframe,.wpw-slider .single-project-slider .project-slider-item img,.wpw-slider .single-project-slider .wpw-slider-item iframe,.wpw-slider .single-project-slider .wpw-slider-item img{opacity:1}.project-slider-item,.wpw-slider-item{position:absolute;top:0;left:0;display:block;overflow:hidden;width:100%;height:100%;transform:scale(0)}.project-slider-item.active,.wpw-slider-item.active{transform:scale(1)}.project-slider-item h1,.wpw-slider-item h1{max-width:560px}.project-slider-item>iframe,.project-slider-item>img,.wpw-slider-item>iframe,.wpw-slider-item>img{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;object-fit:cover;font-family:\"object-fit: cover;\";transition:opacity .2s ease}.single-project-slider .project-slider-item>iframe,.single-project-slider .project-slider-item>img,.single-project-slider .wpw-slider-item>iframe,.single-project-slider .wpw-slider-item>img{opacity:1}.project-slider-content,.wpw-slider-content{position:absolute;z-index:1;bottom:10%;left:0;padding-right:30px;padding-left:30px}@media (min-width:992px){.project-slider-content,.wpw-slider-content{left:16.666%;padding-left:0}}.wpw-slider__animate-box{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;background-color:#fff;overflow:hidden;transform:scaleX(0) translateZ(0);transition:transform .3s ease;will-change:transform}.wpw-slider__animate-box_direction_left{transform-origin:left}.wpw-slider__animate-box_direction_right{transform-origin:right}.wpw-slider__animate-box_animate{transform:scale(1) translateZ(0)}.slider-animate-box .animate-box-left,.slider-animate-box .animate-box-right{position:absolute;width:100%;height:100%;transition:transform 0s}.slider-animate-box .animate-box-left{transform:translateX(-100%)}.slider-animate-box .animate-box-right{transform:translateX(100%)}.slider-animate-box.from-left{z-index:2}.slider-animate-box.from-left .animate-box-left{transition:transform .4s ease-out;transform:translateX(0)}.slider-animate-box.from-left-end .animate-box-left{transition:transform .4s ease-in .2s;transform:translateX(100%)}.slider-animate-box.from-right{z-index:2}.slider-animate-box.from-right .animate-box-right{transition:transform .4s ease-out;transform:translateX(0)}.slider-animate-box.from-right-end .animate-box-right{transition:transform .4s ease-in .2s;transform:translateX(-100%)}.slider-next-slide,.slider-prev-slide{position:absolute;z-index:1;top:50%;display:none;width:100px;height:60%;cursor:pointer;transition:opacity .4s ease;transform:translateY(-50%);opacity:0;background-color:rgba(0, 0, 0, .0001)}@media (min-width:992px){.slider-next-slide,.slider-prev-slide{display:block}}.wpw-slider:hover .slider-next-slide,.wpw-slider:hover .slider-prev-slide{opacity:1}.slider-next-slide .slider-icon,.slider-next-slide svg,.slider-prev-slide .slider-icon,.slider-prev-slide svg{position:absolute;top:50%;left:0;text-align:center;width:60px;height:60px;background-color:#fff;line-height:60px;font-size:24px;transform:translateY(-50%);transition:transform .3s ease,background-color .3s ease,color .3s ease}@media (min-width:992px){.slider-next-slide:hover .slider-icon,.slider-next-slide:hover svg,.slider-prev-slide:hover .slider-icon,.slider-prev-slide:hover svg{color:#ffab00}}.slider-prev-slide{left:0}.slider-next-slide{right:0;transform:translateY(-50%)}.slider-next-slide .slider-icon{left:auto;right:0}@media (min-width:992px){.wpw-burger-menu .main-scroll>.wpw-slider{margin-top:0}}@media (min-width:1200px){.wpw-burger-menu .main-scroll>.wpw-slider{margin-top:0}}.slider-dots{position:absolute;bottom:23px;left:0;right:0;width:100%;max-width:65%;margin:0 auto;text-align:center;line-height:0}@media (min-width:992px){.slider-dots{opacity:0;transition:opacity .2s ease}.wpw-slider:hover .slider-dots{opacity:1}}.slider-dots__item{position:relative;display:inline-block;width:8px;height:8px;border-radius:50%;cursor:pointer;overflow:hidden;margin:0 4px}.slider-dots__item>*{transition:opacity .2s ease}.loading-content>iframe,.loading-content>img{opacity:0}.preloader{position:absolute;top:50%;left:50%;z-index:3;width:75%;height:1px;transform:translate(-50%,50%);overflow:hidden}.preloader:before{animation:a 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.preloader:after,.preloader:before{content:\"\";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right}.preloader:after{animation:b 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes a{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:105%;right:-90%}}@keyframes b{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}", ""]);
// exports
/***/ })
}]);