react-slideshow-image 3.4.6 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -37,30 +37,31 @@ import { Slide } from 'react-slideshow-image';
37
37
  import 'react-slideshow-image/dist/styles.css'
38
38
 
39
39
  const slideImages = [
40
- 'images/slide_2.jpg',
41
- 'images/slide_3.jpg',
42
- 'images/slide_4.jpg'
40
+ {
41
+ url: 'images/slide_2.jpg',
42
+ caption: 'Slide 1'
43
+ },
44
+ {
45
+ url: 'images/slide_3.jpg',
46
+ caption: 'Slide 2'
47
+ },
48
+ {
49
+ url: 'images/slide_4.jpg',
50
+ caption: 'Slide 3'
51
+ },
43
52
  ];
44
53
 
45
54
  const Slideshow = () => {
46
55
  return (
47
56
  <div className="slide-container">
48
57
  <Slide>
49
- <div className="each-slide">
50
- <div style={{'backgroundImage': `url(${slideImages[0]})`}}>
51
- <span>Slide 1</span>
52
- </div>
53
- </div>
54
- <div className="each-slide">
55
- <div style={{'backgroundImage': `url(${slideImages[1]})`}}>
56
- <span>Slide 2</span>
58
+ {slideImages.map((slideImage, index)=> (
59
+ <div className="each-slide" key={index}>
60
+ <div style={{'backgroundImage': `url(${slideImage.url})`}}>
61
+ <span>{slideImage.caption}</span>
62
+ </div>
57
63
  </div>
58
- </div>
59
- <div className="each-slide">
60
- <div style={{'backgroundImage': `url(${slideImages[2]})`}}>
61
- <span>Slide 3</span>
62
- </div>
63
- </div>
64
+ ))}
64
65
  </Slide>
65
66
  </div>
66
67
  )
@@ -75,33 +76,32 @@ import { Fade } from 'react-slideshow-image';
75
76
  import 'react-slideshow-image/dist/styles.css'
76
77
 
77
78
  const fadeImages = [
78
- 'images/slide_5.jpg',
79
- 'images/slide_6.jpg',
80
- 'images/slide_7.jpg'
79
+ {
80
+ url: 'images/slide_5.jpg',
81
+ caption: 'First Slide'
82
+ },
83
+ {
84
+ url: 'images/slide_6.jpg',
85
+ caption: 'Second Slide'
86
+ },
87
+ {
88
+ url: 'images/slide_7.jpg',
89
+ caption: 'Third Slide'
90
+ },
81
91
  ];
82
92
 
83
93
  const Slideshow = () => {
84
94
  return (
85
95
  <div className="slide-container">
86
96
  <Fade>
87
- <div className="each-fade">
88
- <div className="image-container">
89
- <img src={fadeImages[0]} />
90
- </div>
91
- <h2>First Slide</h2>
92
- </div>
93
- <div className="each-fade">
94
- <div className="image-container">
95
- <img src={fadeImages[1]} />
96
- </div>
97
- <h2>Second Slide</h2>
98
- </div>
99
- <div className="each-fade">
100
- <div className="image-container">
101
- <img src={fadeImages[2]} />
97
+ {fadeImages.map(fadeImage, index) => (
98
+ <div className="each-fade" key={index}>
99
+ <div className="image-container">
100
+ <img src={fadeImage.url} />
101
+ </div>
102
+ <h2>{fadeImage.caption}</h2>
102
103
  </div>
103
- <h2>Third Slide</h2>
104
- </div>
104
+ )}
105
105
  </Fade>
106
106
  </div>
107
107
  )
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["react-slideshow-image"]=e(require("react")):t["react-slideshow-image"]=e(t.React)}(this,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";(function(t){var n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map(function(t){return this._tweens[t]}.bind(this))},removeAll:function(){this._tweens={}},add:function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},remove:function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},update:function(t,e){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(t=void 0!==t?t:r.now();n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]];o&&!1===o.update(t)&&(o._isPlaying=!1,e||delete this._tweens[n[i]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var i,r=new n;r.Group=n,r._nextId=0,r.nextId=function(){return r._nextId++},"undefined"==typeof self&&void 0!==t&&t.hrtime?r.now=function(){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?r.now=self.performance.now.bind(self.performance):void 0!==Date.now?r.now=Date.now:r.now=function(){return(new Date).getTime()},r.Tween=function(t,e){this._object=t,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=r.Easing.Linear.None,this._interpolationFunction=r.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=e||r,this._id=r.nextId()},r.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},duration:function(t){return this._duration=t,this},start:function(t){for(var e in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==t?"string"==typeof t?r.now()+parseFloat(t):t:r.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[e]instanceof Array){if(0===this._valuesEnd[e].length)continue;this._valuesEnd[e]=[this._object[e]].concat(this._valuesEnd[e])}void 0!==this._object[e]&&(this._valuesStart[e]=this._object[e],this._valuesStart[e]instanceof Array==!1&&(this._valuesStart[e]*=1),this._valuesStartRepeat[e]=this._valuesStart[e]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop()},group:function(t){return this._group=t,this},delay:function(t){return this._delayTime=t,this},repeat:function(t){return this._repeat=t,this},repeatDelay:function(t){return this._repeatDelayTime=t,this},yoyo:function(t){return this._yoyo=t,this},easing:function(t){return this._easingFunction=t,this},interpolation:function(t){return this._interpolationFunction=t,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(t){return this._onStartCallback=t,this},onUpdate:function(t){return this._onUpdateCallback=t,this},onRepeat:function(t){return this._onRepeatCallback=t,this},onComplete:function(t){return this._onCompleteCallback=t,this},onStop:function(t){return this._onStopCallback=t,this},update:function(t){var e,n,i;if(t<this._startTime)return!0;for(e in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n,i=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[e]){var r=this._valuesStart[e]||0,o=this._valuesEnd[e];o instanceof Array?this._object[e]=this._interpolationFunction(o,i):("string"==typeof o&&(o="+"===o.charAt(0)||"-"===o.charAt(0)?r+parseFloat(o):parseFloat(o)),"number"==typeof o&&(this._object[e]=r+(o-r)*i))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[e]&&(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo){var a=this._valuesStartRepeat[e];this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=a}this._valuesStart[e]=this._valuesStartRepeat[e]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,u=this._chainedTweens.length;s<u;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}return!0}},r.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-r.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*r.Easing.Bounce.In(2*t):.5*r.Easing.Bounce.Out(2*t-1)+.5}}},r.Interpolation={Linear:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),a=r.Interpolation.Utils.Linear;return e<0?a(t[0],t[1],i):e>1?a(t[n],t[n-1],n-i):a(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,a=r.Interpolation.Utils.Bernstein,s=0;s<=i;s++)n+=o(1-e,i-s)*o(e,s)*t[s]*a(i,s);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),a=r.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),a(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):a(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=r.Interpolation.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(i=[1],function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}),CatmullRom:function(t,e,n,i,r){var o=.5*(n-t),a=.5*(i-e),s=r*r;return(2*e-2*n+o+a)*(r*s)+(-3*e+3*n-2*o-a)*s+o*r+e}}},e.a=r}).call(this,n(3))},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];t.call(e,r[1],r[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,i=!1,r=0;function a(){n&&(n=!1,t()),i&&u()}function s(){o(a)}function u(){var t=Date.now();if(n){if(t-r<2)return;i=!0}else n=!0,i=!1,setTimeout(s,e);r=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},h=m(0,0,0,0);function p(t){return parseFloat(t)||0}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+p(t["border-"+n+"-width"])}),0)}function f(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var i=l(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=t["padding-"+r];e[r]=p(o)}return e}(i),o=r.left+r.right,a=r.top+r.bottom,s=p(i.width),u=p(i.height);if("border-box"===i.boxSizing&&(Math.round(s+o)!==e&&(s-=d(i,"left","right")+o),Math.round(u+a)!==n&&(u-=d(i,"top","bottom")+a)),!function(t){return t===l(t).document.documentElement}(t)){var c=Math.round(s+o)-e,f=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(f)&&(u-=f)}return m(r.left,r.top,s,u)}var v="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function y(t){return i?v(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):f(t):h}function m(t,e,n,i){return{x:t,y:e,width:n,height:i}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=y(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),w=function(t,e){var n,i,r,o,a,s,u,l=(i=(n=e).x,r=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),c(u,{x:i,y:r,width:o,height:a,top:r,right:i+o,bottom:a+r,left:i}),u);c(this,{target:t,contentRect:l})},g=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new w(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,O=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),i=new g(e,n,this);_.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){O.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));var S=void 0!==r.ResizeObserver?r.ResizeObserver:O;e.a=S}).call(this,n(4))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var u,c=[],l=!1,h=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"Slide",(function(){return M})),n.d(e,"Fade",(function(){return D})),n.d(e,"Zoom",(function(){return q}));var i=n(0),r=n.n(i),o=n(1),a=n(2);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l={duration:5e3,transitionDuration:1e3,defaultIndex:0,infinite:!0,autoplay:!0,indicators:!1,arrows:!0,pauseOnHover:!0,scale:1,easing:"linear",canSwipe:!0},h=function(t){var e=t.children;return Array.isArray(e)||(e=[e]),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(n,!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},l,{},t,{children:e})},p={duration:"number",transitionDuration:"number",defaultIndex:"number",infinite:"boolean",indicators:["boolean","function"],autoplay:"boolean",arrows:"boolean",onChange:"function",pauseOnHover:"boolean",prevArrow:["object","function"],nextArrow:["object","function"],scale:"number",easing:"string",canSwipe:"boolean"},d=function(t){for(var e in t){var n=s(t[e]);p[e]&&(Array.isArray(p[e])&&!p[e].includes(n)?console.warn("".concat(e," must be of one of type ").concat(p[e].join(", "))):Array.isArray(p[e])||n===p[e]||console.warn("".concat(e," must be of type ").concat(p[e])))}};function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(n,!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b={linear:o.a.Easing.Linear.None,ease:o.a.Easing.Quadratic.InOut,"ease-in":o.a.Easing.Quadratic.In,"ease-out":o.a.Easing.Quadratic.Out,cubic:o.a.Easing.Cubic.InOut,"cubic-in":o.a.Easing.Cubic.In,"cubic-out":o.a.Easing.Cubic.Out},w=function(t){return b[t]||b.linear},g=function(t,e){var n=Object.keys(t);return Object.keys(e).reduce((function(t,i){return-1===n.indexOf(i)&&(t[i]=e[i]),t}),{})},_=function(t,e,n){var i=t.prevArrow,o=t.infinite,a=e<=0&&!o,s={"data-type":"prev","aria-label":"Previous Slide",disabled:a,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(a?"disabled":"")},s));var u="nav default-nav ".concat(a?"disabled":"");return r.a.createElement("button",f({className:u},s),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"})))},O=function(t,e,n){var i=t.nextArrow,o=t.infinite,a=e===t.children.length-1&&!o,s={"data-type":"next","aria-label":"Next Slide",disabled:a,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(a?"disabled":"")},s));var u="nav default-nav ".concat(a?"disabled":"");return r.a.createElement("button",f({className:u},s),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"})))},S=function(t,e,n){var i=t.children,o=t.indicators,a="boolean"!=typeof o;return r.a.createElement("ul",{className:"indicators"},i.map((function(t,i){var s={"data-key":i,"aria-label":"Go to slide ".concat(i+1),onClick:n};return a?function(t,e,n,i){return r.a.cloneElement(i,y({className:"".concat(i.props.className," ").concat(t===e?"active":""),key:e},n))}(e,i,s,o(i)):function(t,e,n){return r.a.createElement("li",{key:e},r.a.createElement("button",f({className:"each-slideshow-indicator ".concat(t===e?"active":"")},n)))}(e,i,s)})))};function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(){return(k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function x(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var M=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?C(t):e}(this,E(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.dragging=!1,n.imageContainer=null,n.wrapper=null,n.timeout=null,n.moveSlides=n.moveSlides.bind(C(n)),n.pauseSlides=n.pauseSlides.bind(C(n)),n.startSlides=n.startSlides.bind(C(n)),n.handleResize=n.handleResize.bind(C(n)),n.initResizeObserver=n.initResizeObserver.bind(C(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.goToSlide=n.goToSlide.bind(C(n)),n.tweenGroup=new o.a.Group,n.startSwipe=n.startSwipe.bind(C(n)),n.endSwipe=n.endSwipe.bind(C(n)),n.swipe=n.swipe.bind(C(n)),n.distanceSwiped=0,n}var n,s,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(e,t),n=e,(s=[{key:"componentDidMount",value:function(){var t=this;this.setWidth(),this.initResizeObserver(),d(this.props);var e=h(this.props),n=e.autoplay,i=e.duration;n&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new a.a((function(e){e&&t.handleResize()})),this.reactSlideshowWrapper.current&&this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(){h(this.props).canSwipe&&(this.dragging=!1,Math.abs(this.distanceSwiped)/this.width>.2?this.distanceSwiped<0?this.goNext():this.goBack():Math.abs(this.distanceSwiped)>0&&this.slideImages(this.state.index,300))}},{key:"swipe",value:function(t){if(h(this.props).canSwipe){var e=t.touches?t.touches[0].pageX:t.clientX;if(this.dragging){var n=this.width*(this.state.index+1);this.distanceSwiped=e-this.startingClientX,n-=this.distanceSwiped,this.imageContainer.style.transform="translate(-".concat(n,"px)")}}}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.allImages=this.wrapper&&Array.prototype.slice.call(this.wrapper.querySelectorAll(".images-wrap > div"),0)||[],this.width=this.wrapper&&this.wrapper.clientWidth||0;var t=this.width*(r.a.Children.count(this.props.children)+2);this.imageContainer&&(this.imageContainer.style.width="".concat(t,"px"),this.imageContainer.style.transform="translate(-".concat(this.width*(this.state.index+1),"px)")),this.applySlideStyle()}},{key:"componentDidUpdate",value:function(t){var e=this,n=h(this.props),i=n.autoplay,r=n.duration,o=n.children,a=h(t);i!==a.autoplay&&(i?this.timeout=setTimeout((function(){return e.goNext()}),r):clearTimeout(this.timeout)),o.length!=a.children.length&&(this.setWidth(),clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.goNext()}),r))}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applySlideStyle",value:function(){var t=this;this.allImages.forEach((function(e,n){e.style.width="".concat(t.width,"px")}))}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;this.dragging?this.endSwipe():n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"moveSlides",value:function(t){"next"===t.currentTarget.dataset.type?this.goNext():this.goBack()}},{key:"goToSlide",value:function(t){var e=t.currentTarget;this.goTo(parseInt(e.dataset.key))}},{key:"goTo",value:function(t){this.slideImages(t)}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.slideImages(t+1)}},{key:"goBack",value:function(){var t=this.state.index;(h(this.props).infinite||0!==t)&&this.slideImages(t-1)}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.children,i=e.indicators,o=e.arrows,a=g(p,this.props),s=this.state.index,u={transform:"translate(-".concat((s+1)*this.width,"px)")};return r.a.createElement("div",k({"aria-roledescription":"carousel"},a),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onMouseMove:this.swipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,onTouchMove:this.swipe,ref:this.reactSlideshowWrapper},o&&_(h(this.props),this.state.index,this.moveSlides),r.a.createElement("div",{className:"react-slideshow-wrapper slide",ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"images-wrap",style:u,ref:function(e){return t.imageContainer=e}},r.a.createElement("div",{"data-index":"-1","aria-roledescription":"slide","aria-hidden":"false"},n[n.length-1]),n.map((function(t,e){return r.a.createElement("div",{"data-index":e,key:e,className:e===s?"active":"","aria-roledescription":"slide","aria-hidden":e===s?"false":"true"},t)})),r.a.createElement("div",{"data-index":"-1","aria-roledescription":"slide","aria-hidden":"false"},n[0]))),o&&O(h(this.props),this.state.index,this.moveSlides)),i&&S(h(this.props),this.state.index,this.goToSlide))}},{key:"slideImages",value:function(t,e){var n=this,i=h(this.props),r=i.children,a=i.transitionDuration,s=i.autoplay,u=i.infinite,c=i.duration,l=i.onChange,p=i.easing;if(a=e||a,!this.tweenGroup.getAll().length){clearTimeout(this.timeout);var d={margin:-this.width*(this.state.index+1)+this.distanceSwiped},f=new o.a.Tween(d,this.tweenGroup).to({margin:-this.width*(t+1)},a).onUpdate((function(t){n.imageContainer&&(n.imageContainer.style.transform="translate(".concat(t.margin,"px)"))})).start();f.easing(w(p)),!function t(){n.willUnmount?n.tweenGroup.removeAll():(requestAnimationFrame(t),n.tweenGroup.update())}(),f.onComplete((function(){if(!n.willUnmount){n.distanceSwiped=0;var e=t;e<0?e=r.length-1:e>=r.length&&(e=0),"function"==typeof l&&l(n.state.index,e),n.setState({index:e},(function(){s&&(u||n.state.index<r.length)&&(clearTimeout(n.timeout),n.timeout=setTimeout((function(){return n.goNext()}),c))}))}}))}}}])&&x(n.prototype,s),u&&x(n,u),e}(i.Component);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function z(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W(t,e){return(W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var D=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?A(t):e}(this,P(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(A(n)),n.handleResize=n.handleResize.bind(A(n)),n.navigate=n.navigate.bind(A(n)),n.preFade=n.preFade.bind(A(n)),n.pauseSlides=n.pauseSlides.bind(A(n)),n.startSlides=n.startSlides.bind(A(n)),n.initResizeObserver=n.initResizeObserver.bind(A(n)),n.tweenGroup=new o.a.Group,n.reactSlideshowWrapper=Object(i.createRef)(),n.wrapper=Object(i.createRef)(),n}var n,s,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(e,t),n=e,(s=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new a.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=h(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.fadeImages(o+1)}),r))}},{key:"componentDidUpdate",value:function(t){var e=h(this.props),n=e.autoplay,i=e.children,r=h(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.wrapper.current&&(this.width=this.wrapper.current.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.fadeImages((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||0!==t)&&this.fadeImages(0===t?n.length-1:t-1)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"goTo",value:function(t){this.fadeImages(t)}},{key:"preFade",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.indicators,i=e.children,o=e.arrows,a=this.state.index,s=g(p,this.props);return r.a.createElement("div",R({"aria-roledescription":"carousel"},s),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,ref:this.reactSlideshowWrapper},o&&_(h(this.props),this.state.index,this.preFade),r.a.createElement("div",{className:"react-slideshow-fade-wrapper",ref:this.wrapper},r.a.createElement("div",{className:"react-slideshow-fade-images-wrap",ref:function(e){return t.divsContainer=e}},i.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),o&&O(h(this.props),this.state.index,this.preFade)),n&&S(h(this.props),this.state.index,this.navigate))}},{key:"fadeImages",value:function(t){var e=this,n=this.state.index,i=h(this.props),r=i.autoplay,a=i.children,s=i.infinite,u=i.duration,c=i.transitionDuration,l=i.onChange,p=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer.children[t]||(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var d=new o.a.Tween({opacity:0},this.tweenGroup).to({opacity:1},c).onUpdate((function(i){e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity})).start();d.easing(w(p)),d.onComplete((function(){e.willUnmount||(e.setState({index:t}),"function"==typeof l&&l(n,t),r&&(s||t<a.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.fadeImages((t+1)%a.length)}),u)))}))}}}])&&z(n.prototype,s),u&&z(n,u),e}(i.Component);function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(){return(U=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function F(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function G(t){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function L(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B(t,e){return(B=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var q=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?L(t):e}(this,G(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(L(n)),n.handleResize=n.handleResize.bind(L(n)),n.navigate=n.navigate.bind(L(n)),n.preZoom=n.preZoom.bind(L(n)),n.pauseSlides=n.pauseSlides.bind(L(n)),n.startSlides=n.startSlides.bind(L(n)),n.tweenGroup=new o.a.Group,n.initResizeObserver=n.initResizeObserver.bind(L(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n}var n,s,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&B(t,e)}(e,t),n=e,(s=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new a.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=h(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.zoomTo(o+1)}),r))}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"componentDidUpdate",value:function(t){var e=h(this.props),n=e.autoplay,i=e.children,r=h(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"setWidth",value:function(){this.wrapper&&(this.width=this.wrapper.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.zoomTo((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||0!==t)&&this.zoomTo(0===t?n.length-1:t-1)}},{key:"goTo",value:function(t){this.zoomTo(t)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"preZoom",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.indicators,i=e.arrows,o=e.children,a=this.state.index,s=g(p,this.props);return r.a.createElement("div",U({"aria-roledescription":"carousel"},s),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,ref:this.reactSlideshowWrapper},i&&_(h(this.props),this.state.index,this.preZoom),r.a.createElement("div",{className:"react-slideshow-zoom-wrapper",ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"zoom-wrapper",ref:function(e){return t.divsContainer=e}},o.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),i&&O(h(this.props),this.state.index,this.preZoom)),n&&S(h(this.props),this.state.index,this.navigate))}},{key:"zoomTo",value:function(t){var e=this,n=this.state.index,i=h(this.props),r=i.children,a=i.scale,s=i.autoplay,u=i.infinite,c=i.transitionDuration,l=i.duration,p=i.onChange,d=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer&&!this.divsContainer.children[t]&&(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var f=new o.a.Tween({opacity:0,scale:1},this.tweenGroup).to({opacity:1,scale:a},c).onUpdate((function(i){e.divsContainer&&(e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity,e.divsContainer.children[n].style.transform="scale(".concat(i.scale,")"))})).start();f.easing(w(d)),f.onComplete((function(){e.willUnmount||("function"==typeof p&&p(n,t),e.setState({index:t},(function(){e.divsContainer&&(e.divsContainer.children[n].style.transform="scale(1)")})),s&&(u||t<r.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.zoomTo((t+1)%r.length)}),l)))}))}}}])&&F(n.prototype,s),u&&F(n,u),e}(i.Component)}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["react-slideshow-image"]=e(require("react")):t["react-slideshow-image"]=e(t.React)}(this,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";(function(t){var n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map(function(t){return this._tweens[t]}.bind(this))},removeAll:function(){this._tweens={}},add:function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},remove:function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},update:function(t,e){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(t=void 0!==t?t:r.now();n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]];o&&!1===o.update(t)&&(o._isPlaying=!1,e||delete this._tweens[n[i]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var i,r=new n;r.Group=n,r._nextId=0,r.nextId=function(){return r._nextId++},"undefined"==typeof self&&void 0!==t&&t.hrtime?r.now=function(){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?r.now=self.performance.now.bind(self.performance):void 0!==Date.now?r.now=Date.now:r.now=function(){return(new Date).getTime()},r.Tween=function(t,e){this._object=t,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=r.Easing.Linear.None,this._interpolationFunction=r.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=e||r,this._id=r.nextId()},r.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},duration:function(t){return this._duration=t,this},start:function(t){for(var e in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==t?"string"==typeof t?r.now()+parseFloat(t):t:r.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[e]instanceof Array){if(0===this._valuesEnd[e].length)continue;this._valuesEnd[e]=[this._object[e]].concat(this._valuesEnd[e])}void 0!==this._object[e]&&(this._valuesStart[e]=this._object[e],this._valuesStart[e]instanceof Array==!1&&(this._valuesStart[e]*=1),this._valuesStartRepeat[e]=this._valuesStart[e]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop()},group:function(t){return this._group=t,this},delay:function(t){return this._delayTime=t,this},repeat:function(t){return this._repeat=t,this},repeatDelay:function(t){return this._repeatDelayTime=t,this},yoyo:function(t){return this._yoyo=t,this},easing:function(t){return this._easingFunction=t,this},interpolation:function(t){return this._interpolationFunction=t,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(t){return this._onStartCallback=t,this},onUpdate:function(t){return this._onUpdateCallback=t,this},onRepeat:function(t){return this._onRepeatCallback=t,this},onComplete:function(t){return this._onCompleteCallback=t,this},onStop:function(t){return this._onStopCallback=t,this},update:function(t){var e,n,i;if(t<this._startTime)return!0;for(e in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n,i=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[e]){var r=this._valuesStart[e]||0,o=this._valuesEnd[e];o instanceof Array?this._object[e]=this._interpolationFunction(o,i):("string"==typeof o&&(o="+"===o.charAt(0)||"-"===o.charAt(0)?r+parseFloat(o):parseFloat(o)),"number"==typeof o&&(this._object[e]=r+(o-r)*i))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[e]&&(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo){var s=this._valuesStartRepeat[e];this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=s}this._valuesStart[e]=this._valuesStartRepeat[e]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,u=this._chainedTweens.length;a<u;a++)this._chainedTweens[a].start(this._startTime+this._duration);return!1}return!0}},r.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-r.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*r.Easing.Bounce.In(2*t):.5*r.Easing.Bounce.Out(2*t-1)+.5}}},r.Interpolation={Linear:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),s=r.Interpolation.Utils.Linear;return e<0?s(t[0],t[1],i):e>1?s(t[n],t[n-1],n-i):s(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,s=r.Interpolation.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-e,i-a)*o(e,a)*t[a]*s(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),s=r.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),s(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=r.Interpolation.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(i=[1],function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}),CatmullRom:function(t,e,n,i,r){var o=.5*(n-t),s=.5*(i-e),a=r*r;return(2*e-2*n+o+s)*(r*a)+(-3*e+3*n-2*o-s)*a+o*r+e}}},e.a=r}).call(this,n(3))},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];t.call(e,r[1],r[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,i=!1,r=0;function s(){n&&(n=!1,t()),i&&u()}function a(){o(s)}function u(){var t=Date.now();if(n){if(t-r<2)return;i=!0}else n=!0,i=!1,setTimeout(a,e);r=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},h=m(0,0,0,0);function p(t){return parseFloat(t)||0}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+p(t["border-"+n+"-width"])}),0)}function f(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var i=l(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=t["padding-"+r];e[r]=p(o)}return e}(i),o=r.left+r.right,s=r.top+r.bottom,a=p(i.width),u=p(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==e&&(a-=d(i,"left","right")+o),Math.round(u+s)!==n&&(u-=d(i,"top","bottom")+s)),!function(t){return t===l(t).document.documentElement}(t)){var c=Math.round(a+o)-e,f=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(f)&&(u-=f)}return m(r.left,r.top,a,u)}var v="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function y(t){return i?v(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):f(t):h}function m(t,e,n,i){return{x:t,y:e,width:n,height:i}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=y(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),w=function(t,e){var n,i,r,o,s,a,u,l=(i=(n=e).x,r=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),c(u,{x:i,y:r,width:o,height:s,top:r,right:i+o,bottom:s+r,left:i}),u);c(this,{target:t,contentRect:l})},g=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new w(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,S=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),i=new g(e,n,this);_.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){S.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));var O=void 0!==r.ResizeObserver?r.ResizeObserver:S;e.a=O}).call(this,n(4))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,c=[],l=!1,h=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=a(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"Slide",(function(){return M})),n.d(e,"Fade",(function(){return D})),n.d(e,"Zoom",(function(){return X}));var i=n(0),r=n.n(i),o=n(1),s=n(2);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l={duration:5e3,transitionDuration:1e3,defaultIndex:0,infinite:!0,autoplay:!0,indicators:!1,arrows:!0,pauseOnHover:!0,scale:1,easing:"linear",canSwipe:!0,slidesToShow:1,slidesToScroll:1,cssClass:""},h=function(t){var e=r.a.Children.map(t.children,(function(t){return t}));return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(n,!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},l,{},t,{children:e})},p={duration:"number",transitionDuration:"number",defaultIndex:"number",infinite:"boolean",indicators:["boolean","function"],autoplay:"boolean",arrows:"boolean",onChange:"function",pauseOnHover:"boolean",prevArrow:["object","function"],nextArrow:["object","function"],scale:"number",easing:"string",canSwipe:"boolean",slidesToShow:"number",slidesToScroll:"number",cssClass:"string"},d=function(t){for(var e in t){var n=a(t[e]);p[e]&&(Array.isArray(p[e])&&!p[e].includes(n)?console.warn("".concat(e," must be of one of type ").concat(p[e].join(", "))):Array.isArray(p[e])||n===p[e]||console.warn("".concat(e," must be of type ").concat(p[e])))}};function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(n,!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b={linear:o.a.Easing.Linear.None,ease:o.a.Easing.Quadratic.InOut,"ease-in":o.a.Easing.Quadratic.In,"ease-out":o.a.Easing.Quadratic.Out,cubic:o.a.Easing.Cubic.InOut,"cubic-in":o.a.Easing.Cubic.In,"cubic-out":o.a.Easing.Cubic.Out},w=function(t){return b[t]||b.linear},g=function(t,e){var n=Object.keys(t);return Object.keys(e).reduce((function(t,i){return-1===n.indexOf(i)&&(t[i]=e[i]),t}),{})},_=function(t,e,n){var i=t.prevArrow,o=t.infinite,s=e<=0&&!o,a={"data-type":"prev","aria-label":"Previous Slide",disabled:s,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(s?"disabled":"")},a));var u="nav default-nav ".concat(s?"disabled":"");return r.a.createElement("button",f({className:u},a),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"})))},S=function(t,e,n){var i=t.nextArrow,o=t.infinite,s=t.children,a=t.slidesToScroll,u=e>=s.length-a&&!o,c={"data-type":"next","aria-label":"Next Slide",disabled:u,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(u?"disabled":"")},c));var l="nav default-nav ".concat(u?"disabled":"");return r.a.createElement("button",f({className:l},c),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"})))},O=function(t,e,n){var i=t.children,o=t.indicators,s=t.slidesToScroll,a="boolean"!=typeof o,u=Math.ceil(i.length/s);return r.a.createElement("ul",{className:"indicators"},Array.from({length:u},(function(t,i){var u={"data-key":i,"aria-label":"Go to slide ".concat(i+1),onClick:n},c=Math.floor((e+s-1)/s)===i;return a?function(t,e,n,i){return r.a.cloneElement(i,y({className:"".concat(i.props.className," ").concat(t?"active":""),key:e},n))}(c,i,u,o(i)):function(t,e,n){return r.a.createElement("li",{key:e},r.a.createElement("button",f({className:"each-slideshow-indicator ".concat(t?"active":"")},n)))}(c,i,u)})))};function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(){return(k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function x(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var M=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?C(t):e}(this,E(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.dragging=!1,n.imageContainer=null,n.wrapper=null,n.timeout=null,n.moveSlides=n.moveSlides.bind(C(n)),n.pauseSlides=n.pauseSlides.bind(C(n)),n.startSlides=n.startSlides.bind(C(n)),n.handleResize=n.handleResize.bind(C(n)),n.initResizeObserver=n.initResizeObserver.bind(C(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.goToSlide=n.goToSlide.bind(C(n)),n.tweenGroup=new o.a.Group,n.startSwipe=n.startSwipe.bind(C(n)),n.endSwipe=n.endSwipe.bind(C(n)),n.swipe=n.swipe.bind(C(n)),n.distanceSwiped=0,n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){var t=this;this.setWidth(),this.initResizeObserver(),d(this.props);var e=h(this.props),n=e.autoplay,i=e.duration;n&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.reactSlideshowWrapper.current&&this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(){h(this.props).canSwipe&&(this.dragging=!1,Math.abs(this.distanceSwiped)/this.width>.2?this.distanceSwiped<0?this.goNext():this.goBack():Math.abs(this.distanceSwiped)>0&&this.slideImages(this.state.index,300))}},{key:"swipe",value:function(t){var e=h(this.props),n=e.canSwipe,i=e.slidesToShow,r=e.children,o=e.infinite,s=e.slidesToScroll;if(n){var a=t.touches?t.touches[0].pageX:t.clientX;if(this.dragging){var u=this.width*(this.state.index+i),c=a-this.startingClientX;if(!o&&this.state.index===r.length-s&&c<0)return;if(!o&&0===this.state.index&&c>0)return;this.distanceSwiped=c,u-=this.distanceSwiped,this.imageContainer.style.transform="translate(-".concat(u,"px)")}}}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.allImages=this.wrapper&&Array.prototype.slice.call(this.wrapper.querySelectorAll(".images-wrap > div"),0)||[];var t=h(this.props).slidesToShow;this.width=(this.wrapper&&this.wrapper.clientWidth||0)/t;var e=r.a.Children.count(this.props.children),n=this.width*(e+2*t);this.imageContainer&&(this.imageContainer.style.width="".concat(n,"px"),this.imageContainer.style.transform="translate(-".concat(this.width*(this.state.index+t),"px)")),this.applySlideStyle()}},{key:"componentDidUpdate",value:function(t){var e=this,n=h(this.props),i=n.autoplay,r=n.duration,o=n.children,s=h(t);i!==s.autoplay&&(i?this.timeout=setTimeout((function(){return e.goNext()}),r):clearTimeout(this.timeout)),o.length!=s.children.length&&(this.setWidth(),clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.goNext()}),r))}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applySlideStyle",value:function(){var t=this;this.allImages.forEach((function(e,n){e.style.width="".concat(t.width,"px")}))}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;this.dragging?this.endSwipe():n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"moveSlides",value:function(t){"next"===t.currentTarget.dataset.type?this.goNext():this.goBack()}},{key:"goToSlide",value:function(t){var e=t.currentTarget,n=h(this.props).slidesToScroll;this.goTo(parseInt(e.dataset.key*n))}},{key:"goTo",value:function(t){this.slideImages(this.calculateIndex(t))}},{key:"calculateIndex",value:function(t){var e=h(this.props),n=e.children,i=e.slidesToScroll;return t<n.length&&t+i>n.length&&(n.length-i)%i?n.length-i:t}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children,i=e.infinite,r=e.slidesToScroll;if(i||t!==n.length-r){var o=this.calculateIndex(t+r);this.slideImages(o)}}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.infinite,i=e.slidesToScroll;if(n||0!==t){var r=t-i;r%i&&(r=Math.ceil(r/i)*i),this.slideImages(r)}}},{key:"isSlideActive",value:function(t){var e=h(this.props).slidesToShow;return t<this.state.index+e&&t>=this.state.index}},{key:"renderPreceedingSlides",value:function(t,e){return t.slice(-e).map((function(t,n){return r.a.createElement("div",{"data-index":n-e,"aria-roledescription":"slide","aria-hidden":"true",key:n-e},t)}))}},{key:"renderTrailingSlides",value:function(t,e){return t.slice(0,e).map((function(e,n){return r.a.createElement("div",{"data-index":t.length+n,"aria-roledescription":"slide","aria-hidden":"true",key:t.length+n},e)}))}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.children,i=e.indicators,o=e.arrows,s=e.cssClass,a=e.slidesToShow,u=g(p,this.props),c=this.state.index,l={transform:"translate(-".concat((c+a)*this.width,"px)")};return r.a.createElement("div",k({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onMouseMove:this.swipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,onTouchMove:this.swipe,ref:this.reactSlideshowWrapper},o&&_(h(this.props),this.state.index,this.moveSlides),r.a.createElement("div",{className:"react-slideshow-wrapper slide ".concat(s),ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"images-wrap",style:l,ref:function(e){return t.imageContainer=e}},this.renderPreceedingSlides(n,a),n.map((function(e,n){var i=t.isSlideActive(n);return r.a.createElement("div",{"data-index":n,key:n,className:i?"active":"","aria-roledescription":"slide","aria-hidden":i?"false":"true"},e)})),this.renderTrailingSlides(n,a))),o&&S(h(this.props),this.state.index,this.moveSlides)),i&&O(h(this.props),this.state.index,this.goToSlide))}},{key:"slideImages",value:function(t,e){var n=this,i=h(this.props),r=i.children,s=i.transitionDuration,a=i.autoplay,u=i.infinite,c=i.duration,l=i.onChange,p=i.easing,d=i.slidesToShow,f=i.slidesToScroll;if(s=e||s,!this.tweenGroup.getAll().length){clearTimeout(this.timeout);var v={margin:-this.width*(this.state.index+d)+this.distanceSwiped},y=new o.a.Tween(v,this.tweenGroup).to({margin:-this.width*(t+d)},s).onUpdate((function(t){n.imageContainer&&(n.imageContainer.style.transform="translate(".concat(t.margin,"px)"))})).start();y.easing(w(p)),!function t(){n.willUnmount?n.tweenGroup.removeAll():(requestAnimationFrame(t),n.tweenGroup.update())}(),y.onComplete((function(){if(!n.willUnmount){n.distanceSwiped=0;var e=t;e<0?e=r.length-f:e>=r.length&&(e=0),"function"==typeof l&&l(n.state.index,e),n.setState({index:e},(function(){a&&(u||n.state.index<r.length)&&(clearTimeout(n.timeout),n.timeout=setTimeout((function(){return n.goNext()}),c))}))}}))}}}])&&x(n.prototype,a),u&&x(n,u),e}(i.Component);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function z(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W(t,e){return(W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var D=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?A(t):e}(this,P(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(A(n)),n.handleResize=n.handleResize.bind(A(n)),n.navigate=n.navigate.bind(A(n)),n.preFade=n.preFade.bind(A(n)),n.pauseSlides=n.pauseSlides.bind(A(n)),n.startSlides=n.startSlides.bind(A(n)),n.initResizeObserver=n.initResizeObserver.bind(A(n)),n.tweenGroup=new o.a.Group,n.reactSlideshowWrapper=Object(i.createRef)(),n.wrapper=Object(i.createRef)(),n.startSwipe=n.startSwipe.bind(A(n)),n.endSwipe=n.endSwipe.bind(A(n)),n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=h(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.fadeImages(o+1)}),r))}},{key:"componentDidUpdate",value:function(t){var e=h(this.props),n=e.autoplay,i=e.children,r=h(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.wrapper.current&&(this.width=this.wrapper.current.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.fadeImages((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||0!==t)&&this.fadeImages(0===t?n.length-1:t-1)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"goTo",value:function(t){this.fadeImages(t)}},{key:"preFade",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(t){var e=(t.changedTouches?t.changedTouches[0].pageX:t.clientX)-this.startingClientX;h(this.props).canSwipe&&(this.dragging=!1,Math.abs(e)/this.width>.2&&(e<0?this.goNext():this.goBack()))}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.indicators,i=e.children,o=e.arrows,s=e.cssClass,a=this.state.index,u=g(p,this.props);return r.a.createElement("div",R({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,ref:this.reactSlideshowWrapper},o&&_(h(this.props),this.state.index,this.preFade),r.a.createElement("div",{className:"react-slideshow-fade-wrapper ".concat(s),ref:this.wrapper},r.a.createElement("div",{className:"react-slideshow-fade-images-wrap",ref:function(e){return t.divsContainer=e}},i.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),o&&S(h(this.props),this.state.index,this.preFade)),n&&O(h(this.props),this.state.index,this.navigate))}},{key:"fadeImages",value:function(t){var e=this,n=this.state.index,i=h(this.props),r=i.autoplay,s=i.children,a=i.infinite,u=i.duration,c=i.transitionDuration,l=i.onChange,p=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer.children[t]||(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var d=new o.a.Tween({opacity:0},this.tweenGroup).to({opacity:1},c).onUpdate((function(i){e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity})).start();d.easing(w(p)),d.onComplete((function(){e.willUnmount||(e.setState({index:t}),"function"==typeof l&&l(n,t),r&&(a||t<s.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.fadeImages((t+1)%s.length)}),u)))}))}}}])&&z(n.prototype,a),u&&z(n,u),e}(i.Component);function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(){return(U=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function F(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function G(t){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var X=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?B(t):e}(this,G(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(B(n)),n.handleResize=n.handleResize.bind(B(n)),n.navigate=n.navigate.bind(B(n)),n.preZoom=n.preZoom.bind(B(n)),n.pauseSlides=n.pauseSlides.bind(B(n)),n.startSlides=n.startSlides.bind(B(n)),n.tweenGroup=new o.a.Group,n.initResizeObserver=n.initResizeObserver.bind(B(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.startSwipe=n.startSwipe.bind(B(n)),n.endSwipe=n.endSwipe.bind(B(n)),n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=h(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.zoomTo(o+1)}),r))}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"componentDidUpdate",value:function(t){var e=h(this.props),n=e.autoplay,i=e.children,r=h(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"setWidth",value:function(){this.wrapper&&(this.width=this.wrapper.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.zoomTo((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||0!==t)&&this.zoomTo(0===t?n.length-1:t-1)}},{key:"goTo",value:function(t){this.zoomTo(t)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"preZoom",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(t){var e=(t.changedTouches?t.changedTouches[0].pageX:t.clientX)-this.startingClientX;h(this.props).canSwipe&&(this.dragging=!1,Math.abs(e)/this.width>.2&&(e<0?this.goNext():this.goBack()))}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.indicators,i=e.arrows,o=e.children,s=e.cssClass,a=this.state.index,u=g(p,this.props);return r.a.createElement("div",U({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,ref:this.reactSlideshowWrapper},i&&_(h(this.props),this.state.index,this.preZoom),r.a.createElement("div",{className:"react-slideshow-zoom-wrapper ".concat(s),ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"zoom-wrapper",ref:function(e){return t.divsContainer=e}},o.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),i&&S(h(this.props),this.state.index,this.preZoom)),n&&O(h(this.props),this.state.index,this.navigate))}},{key:"zoomTo",value:function(t){var e=this,n=this.state.index,i=h(this.props),r=i.children,s=i.scale,a=i.autoplay,u=i.infinite,c=i.transitionDuration,l=i.duration,p=i.onChange,d=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer&&!this.divsContainer.children[t]&&(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var f=new o.a.Tween({opacity:0,scale:1},this.tweenGroup).to({opacity:1,scale:s},c).onUpdate((function(i){e.divsContainer&&(e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity,e.divsContainer.children[n].style.transform="scale(".concat(i.scale,")"))})).start();f.easing(w(d)),f.onComplete((function(){e.willUnmount||("function"==typeof p&&p(n,t),e.setState({index:t},(function(){e.divsContainer&&(e.divsContainer.children[n].style.transform="scale(1)")})),a&&(u||t<r.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.zoomTo((t+1)%r.length)}),l)))}))}}}])&&F(n.prototype,a),u&&F(n,u),e}(i.Component)}])}));
2
2
  //# sourceMappingURL=react-slideshow-image.min.js.map