58.b3ae08e1.chunk.js 33.5 KB
Newer Older
xuzhenghua committed
1 2 3
/*! For license information please see 58.b3ae08e1.chunk.js.LICENSE.txt */
(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[58],{1121:function(t,e,n){"use strict";n(48),n(1122)},1122:function(t,e,n){},1123:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=p(n(33)),r=p(n(9)),o=p(n(11)),s=p(n(13)),a=p(n(12)),l=p(n(14)),u=p(n(17)),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(0)),h=p(n(1139));function p(t){return t&&t.__esModule?t:{default:t}}var d=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(n[i[r]]=t[i[r]])}return n},f=function(t){function e(t){(0,o.default)(this,e);var n=(0,a.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.onChange=function(t){n.setState({selectedIndex:t},(function(){n.props.afterChange&&n.props.afterChange(t)}))},n.state={selectedIndex:n.props.selectedIndex},n}return(0,l.default)(e,t),(0,s.default)(e,[{key:"render",value:function(){var t=this.props,e=t.infinite,n=t.selectedIndex,o=t.beforeChange,s=(t.afterChange,t.dots),a=d(t,["infinite","selectedIndex","beforeChange","afterChange","dots"]),l=a.prefixCls,p=a.dotActiveStyle,f=a.dotStyle,g=a.className,v=a.vertical,y=(0,r.default)({},a,{wrapAround:e,slideIndex:n,beforeSlide:o}),S=[];s&&(S=[{component:function(t){for(var e=t.slideCount,n=t.slidesToScroll,r=t.currentSlide,o=[],s=0;s<e;s+=n)o.push(s);var a=o.map((function(t){var e=(0,u.default)(l+"-wrap-dot",(0,i.default)({},l+"-wrap-dot-active",t===r)),n=t===r?p:f;return c.createElement("div",{className:e,key:t},c.createElement("span",{style:n}))}));return c.createElement("div",{className:l+"-wrap"},a)},position:"BottomCenter"}]);var m=(0,u.default)(l,g,(0,i.default)({},l+"-vertical",v));return c.createElement(h.default,(0,r.default)({},y,{className:m,decorators:S,afterSlide:this.onChange}))}}]),e}(c.Component);e.default=f,f.defaultProps={prefixCls:"am-carousel",dots:!0,arrows:!1,autoplay:!1,infinite:!1,cellAlign:"center",selectedIndex:0,dotStyle:{},dotActiveStyle:{}},t.exports=e.default},1124:function(t,e,n){var i;!function(){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(i=function(){return o}.call(e,n,e,t))||(t.exports=i)}()},1126:function(t,e,n){"use strict";var i={linear:function(t,e,n,i){return(n-e)*t/i+e},easeInQuad:function(t,e,n,i){return(n-e)*(t/=i)*t+e},easeOutQuad:function(t,e,n,i){return-(n-e)*(t/=i)*(t-2)+e},easeInOutQuad:function(t,e,n,i){var r=n-e;return(t/=i/2)<1?r/2*t*t+e:-r/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,n,i){return(n-e)*(t/=i)*t*t+e},easeOutCubic:function(t,e,n,i){return(n-e)*((t=t/i-1)*t*t+1)+e},easeInOutCubic:function(t,e,n,i){var r=n-e;return(t/=i/2)<1?r/2*t*t*t+e:r/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,n,i){return(n-e)*(t/=i)*t*t*t+e},easeOutQuart:function(t,e,n,i){return-(n-e)*((t=t/i-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,n,i){var r=n-e;return(t/=i/2)<1?r/2*t*t*t*t+e:-r/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,n,i){return(n-e)*(t/=i)*t*t*t*t+e},easeOutQuint:function(t,e,n,i){return(n-e)*((t=t/i-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,n,i){var r=n-e;return(t/=i/2)<1?r/2*t*t*t*t*t+e:r/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,n,i){var r=n-e;return-r*Math.cos(t/i*(Math.PI/2))+r+e},easeOutSine:function(t,e,n,i){return(n-e)*Math.sin(t/i*(Math.PI/2))+e},easeInOutSine:function(t,e,n,i){return-(n-e)/2*(Math.cos(Math.PI*t/i)-1)+e},easeInExpo:function(t,e,n,i){return 0==t?e:(n-e)*Math.pow(2,10*(t/i-1))+e},easeOutExpo:function(t,e,n,i){var r=n-e;return t==i?e+r:r*(1-Math.pow(2,-10*t/i))+e},easeInOutExpo:function(t,e,n,i){var r=n-e;return 0===t?e:t===i?e+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+e:r/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(t,e,n,i){return-(n-e)*(Math.sqrt(1-(t/=i)*t)-1)+e},easeOutCirc:function(t,e,n,i){return(n-e)*Math.sqrt(1-(t=t/i-1)*t)+e},easeInOutCirc:function(t,e,n,i){var r=n-e;return(t/=i/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+e:r/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(t,e,n,i){var r,o,s,a=n-e;return s=1.70158,0===t?e:1===(t/=i)?e+a:((o=0)||(o=.3*i),(r=a)<Math.abs(a)?(r=a,s=o/4):s=o/(2*Math.PI)*Math.asin(a/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t*i-s)*(2*Math.PI)/o)+e)},easeOutElastic:function(t,e,n,i){var r,o,s,a=n-e;return s=1.70158,0===t?e:1===(t/=i)?e+a:((o=0)||(o=.3*i),(r=a)<Math.abs(a)?(r=a,s=o/4):s=o/(2*Math.PI)*Math.asin(a/r),r*Math.pow(2,-10*t)*Math.sin((t*i-s)*(2*Math.PI)/o)+a+e)},easeInOutElastic:function(t,e,n,i){var r,o,s,a=n-e;return s=1.70158,0===t?e:2===(t/=i/2)?e+a:((o=0)||(o=i*(.3*1.5)),(r=a)<Math.abs(a)?(r=a,s=o/4):s=o/(2*Math.PI)*Math.asin(a/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t*i-s)*(2*Math.PI)/o)*-.5+e:r*Math.pow(2,-10*(t-=1))*Math.sin((t*i-s)*(2*Math.PI)/o)*.5+a+e)},easeInBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),(n-e)*(t/=i)*t*((r+1)*t-r)+e},easeOutBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),(n-e)*((t=t/i-1)*t*((r+1)*t+r)+1)+e},easeInOutBack:function(t,e,n,i,r){var o=n-e;return void 0===r&&(r=1.70158),(t/=i/2)<1?o/2*(t*t*((1+(r*=1.525))*t-r))+e:o/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:function(t,e,n,r){var o=n-e;return o-i.easeOutBounce(r-t,0,o,r)+e},easeOutBounce:function(t,e,n,i){var r=n-e;return(t/=i)<1/2.75?r*(7.5625*t*t)+e:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+e:r*(7.5625*(t-=2.625/2.75)*t+.984375)+e},easeInOutBounce:function(t,e,n,r){var o=n-e;return t<r/2?.5*i.easeInBounce(2*t,0,o,r)+e:.5*i.easeOutBounce(2*t-r,0,o,r)+.5*o+e}};t.exports=i},1139:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return C}));var i=n(9),r=n.n(i),o=n(11),s=n.n(o),a=n(13),l=n.n(a),u=n(12),c=n.n(u),h=n(14),p=n.n(h),d=n(0),f=n.n(d),g=[{component:function(t){function e(){s()(this,e);var t=c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.handleClick=function(e){e.preventDefault(),t.props.previousSlide()},t}return p()(e,t),l()(e,[{key:"render",value:function(){return f.a.createElement("button",{style:this.getButtonStyles(0===this.props.currentSlide&&!this.props.wrapAround),onClick:this.handleClick},"PREV")}},{key:"getButtonStyles",value:function(t){return{border:0,background:"rgba(0,0,0,0.4)",color:"white",padding:10,outline:0,opacity:t?.3:1,cursor:"pointer"}}}]),e}(f.a.Component),position:"CenterLeft"},{component:function(t){function e(){s()(this,e);var t=c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.handleClick=function(e){e.preventDefault(),t.props.nextSlide&&t.props.nextSlide()},t}return p()(e,t),l()(e,[{key:"render",value:function(){return f.a.createElement("button",{style:this.getButtonStyles(this.props.currentSlide+this.props.slidesToScroll>=this.props.slideCount&&!this.props.wrapAround),onClick:this.handleClick},"NEXT")}},{key:"getButtonStyles",value:function(t){return{border:0,background:"rgba(0,0,0,0.4)",color:"white",padding:10,outline:0,opacity:t?.3:1,cursor:"pointer"}}}]),e}(f.a.Component),position:"CenterRight"},{component:function(t){function e(){return s()(this,e),c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p()(e,t),l()(e,[{key:"render",value:function(){var t=this,e=this.getIndexes(this.props.slideCount,this.props.slidesToScroll);return f.a.createElement("ul",{style:this.getListStyles()},e.map((function(e){return f.a.createElement("li",{style:t.getListItemStyles(),key:e},f.a.createElement("button",{style:t.getButtonStyles(t.props.currentSlide===e),onClick:t.props.goToSlide&&t.props.goToSlide.bind(null,e)},"\u2022"))})))}},{key:"getIndexes",value:function(t,e){for(var n=[],i=0;i<t;i+=e)n.push(i);return n}},{key:"getListStyles",value:function(){return{position:"relative",margin:0,top:-10,padding:0}}},{key:"getListItemStyles",value:function(){return{listStyleType:"none",display:"inline-block"}}},{key:"getButtonStyles",value:function(t){return{border:0,background:"transparent",color:"black",cursor:"pointer",padding:10,outline:0,fontSize:24,opacity:t?1:.5}}}]),e}(f.a.Component),position:"BottomCenter"}],v=n(1124),y=n.n(v),S=n(210),m=n.n(S);var b={ADDITIVE:"ADDITIVE",DESTRUCTIVE:"DESTRUCTIVE"},w=function(t,e,n){null!==t&&"undefined"!==typeof t&&(t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n)},O=function(t,e,n){null!==t&&"undefined"!==typeof t&&(t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null)},T=function(t){function e(t){s()(this,e);var n=c()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._rafCb=function(){var t=n.state;if(0!==t.tweenQueue.length){for(var e=Date.now(),i=[],r=0;r<t.tweenQueue.length;r++){var o=t.tweenQueue[r],s=o.initTime,a=o.config;e-s<a.duration?i.push(o):a.onEnd&&a.onEnd()}-1!==n._rafID&&(n.setState({tweenQueue:i}),n._rafID=m()(n._rafCb))}},n.handleClick=function(t){!0===n.clickSafe&&(t.preventDefault(),t.stopPropagation(),t.nativeEvent&&t.nativeEvent.stopPropagation())},n.autoplayIterator=function(){if(n.props.wrapAround)return n.nextSlide();n.state.currentSlide!==n.state.slideCount-n.state.slidesToShow?n.nextSlide():n.stopAutoplay()},n.goToSlide=function(t){var e=n.props,i=e.beforeSlide,r=e.afterSlide;if(t>=f.a.Children.count(n.props.children)||t<0){if(!n.props.wrapAround)return;if(t>=f.a.Children.count(n.props.children))return i(n.state.currentSlide,0),n.setState({currentSlide:0},(function(){n.animateSlide(null,null,n.getTargetLeft(null,t),(function(){n.animateSlide(null,.01),r(0),n.resetAutoplay(),n.setExternalData()}))}));var o=f.a.Children.count(n.props.children)-n.state.slidesToScroll;return i(n.state.currentSlide,o),n.setState({currentSlide:o},(function(){n.animateSlide(null,null,n.getTargetLeft(null,t),(function(){n.animateSlide(null,.01),r(o),n.resetAutoplay(),n.setExternalData()}))}))}i(n.state.currentSlide,t),n.setState({currentSlide:t},(function(){n.animateSlide(),n.props.afterSlide(t),n.resetAutoplay(),n.setExternalData()}))},n.nextSlide=function(){var t=f.a.Children.count(n.props.children),e=n.props.slidesToShow;if("auto"===n.props.slidesToScroll&&(e=n.state.slidesToScroll),!(n.state.currentSlide>=t-e)||n.props.wrapAround)if(n.props.wrapAround)n.goToSlide(n.state.currentSlide+n.state.slidesToScroll);else{if(1!==n.props.slideWidth)return n.goToSlide(n.state.currentSlide+n.state.slidesToScroll);n.goToSlide(Math.min(n.state.currentSlide+n.state.slidesToScroll,t-e))}},n.previousSlide=function(){n.state.currentSlide<=0&&!n.props.wrapAround||(n.props.wrapAround?n.goToSlide(n.state.currentSlide-n.state.slidesToScroll):n.goToSlide(Math.max(0,n.state.currentSlide-n.state.slidesToScroll)))},n.onResize=function(){n.setDimensions()},n.onReadyStateChange=function(){n.setDimensions()},n.state={currentSlide:n.props.slideIndex,dragging:!1,frameWidth:0,left:0,slideCount:0,slidesToScroll:n.props.slidesToScroll,slideWidth:0,top:0,tweenQueue:[]},n.touchObject={},n.clickSafe=!0,n}return p()(e,t),l()(e,[{key:"componentWillMount",value:function(){this.setInitialDimensions()}},{key:"componentDidMount",value:function(){this.setDimensions(),this.bindEvents(),this.setExternalData(),this.props.autoplay&&this.startAutoplay()}},{key:"componentWillReceiveProps",value:function(t){this.setState({slideCount:t.children.length}),this.setDimensions(t),this.props.slideIndex!==t.slideIndex&&t.slideIndex!==this.state.currentSlide&&this.goToSlide(t.slideIndex),this.props.autoplay!==t.autoplay&&(t.autoplay?this.startAutoplay():this.stopAutoplay())}},{key:"componentWillUnmount",value:function(){this.unbindEvents(),this.stopAutoplay(),m.a.cancel(this._rafID),this._rafID=-1}},{key:"tweenState",value:function(t,e){var n=this,i=e.easing,r=e.duration,o=e.delay,s=e.beginValue,a=e.endValue,l=e.onEnd,u=e.stackBehavior;this.setState((function(e){var c=e,h=void 0,p=void 0;if("string"===typeof t)h=t,p=t;else{for(var d=0;d<t.length-1;d++)c=c[t[d]];h=t[t.length-1],p=t.join("|")}var f={easing:i,duration:null==r?300:r,delay:null==o?0:o,beginValue:null==s?c[h]:s,endValue:a,onEnd:l,stackBehavior:u||"ADDITIVE"},g=e.tweenQueue;return f.stackBehavior===b.DESTRUCTIVE&&(g=e.tweenQueue.filter((function(t){return t.pathHash!==p}))),g.push({pathHash:p,config:f,initTime:Date.now()+f.delay}),c[h]=f.endValue,1===g.length&&(n._rafID=m()(n._rafCb)),{tweenQueue:g}}))}},{key:"getTweeningValue",value:function(t){var e=this.state,n=void 0,i=void 0;if("string"===typeof t)n=e[t],i=t;else{n=e;for(var r=0;r<t.length;r++)n=n[t[r]];i=t.join("|")}for(var o=Date.now(),s=0;s<e.tweenQueue.length;s++){var a=e.tweenQueue[s],l=a.pathHash,u=a.initTime,c=a.config;if(l===i){var h=o-u>c.duration?c.duration:Math.max(0,o-u);n+=(0===c.duration?c.endValue:c.easing(h,c.beginValue,c.endValue,c.duration))-c.endValue}}return n}},{key:"render",value:function(){var t=this,e=f.a.Children.count(this.props.children)>1?this.formatChildren(this.props.children):this.props.children;return f.a.createElement("div",{className:["slider",this.props.className||""].join(" "),ref:"slider",style:r()({},this.getSliderStyles(),this.props.style)},f.a.createElement("div",r()({className:"slider-frame",ref:"frame",style:this.getFrameStyles()},this.getTouchEvents(),this.getMouseEvents(),{onClick:this.handleClick}),f.a.createElement("ul",{className:"slider-list",ref:"list",style:this.getListStyles()},e)),this.props.decorators?this.props.decorators.map((function(e,n){return f.a.createElement("div",{style:r()({},t.getDecoratorStyles(e.position),e.style||{}),className:"slider-decorator-"+n,key:n},f.a.createElement(e.component,{currentSlide:t.state.currentSlide,slideCount:t.state.slideCount,frameWidth:t.state.frameWidth,slideWidth:t.state.slideWidth,slidesToScroll:t.state.slidesToScroll,cellSpacing:t.props.cellSpacing,slidesToShow:t.props.slidesToShow,wrapAround:t.props.wrapAround,nextSlide:t.nextSlide,previousSlide:t.previousSlide,goToSlide:t.goToSlide}))})):null,f.a.createElement("style",{type:"text/css",dangerouslySetInnerHTML:{__html:this.getStyleTagStyles()}}))}},{key:"getTouchEvents",value:function(){var t=this;return!1===this.props.swiping?null:{onTouchStart:function(e){t.touchObject={startX:e.touches[0].pageX,startY:e.touches[0].pageY},t.handleMouseOver()},onTouchMove:function(e){var n=t.swipeDirection(t.touchObject.startX,e.touches[0].pageX,t.touchObject.startY,e.touches[0].pageY);0!==n&&e.preventDefault();var i=t.props.vertical?Math.round(Math.sqrt(Math.pow(e.touches[0].pageY-t.touchObject.startY,2))):Math.round(Math.sqrt(Math.pow(e.touches[0].pageX-t.touchObject.startX,2)));t.touchObject={startX:t.touchObject.startX,startY:t.touchObject.startY,endX:e.touches[0].pageX,endY:e.touches[0].pageY,length:i,direction:n},t.setState({left:t.props.vertical?0:t.getTargetLeft(t.touchObject.length*t.touchObject.direction),top:t.props.vertical?t.getTargetLeft(t.touchObject.length*t.touchObject.direction):0})},onTouchEnd:function(e){t.handleSwipe(e),t.handleMouseOut()},onTouchCancel:function(e){t.handleSwipe(e)}}}},{key:"getMouseEvents",value:function(){var t=this;return!1===this.props.dragging?null:{onMouseOver:function(){t.handleMouseOver()},onMouseOut:function(){t.handleMouseOut()},onMouseDown:function(e){t.touchObject={startX:e.clientX,startY:e.clientY},t.setState({dragging:!0})},onMouseMove:function(e){if(t.state.dragging){var n=t.swipeDirection(t.touchObject.startX,e.clientX,t.touchObject.startY,e.clientY);0!==n&&e.preventDefault();var i=t.props.vertical?Math.round(Math.sqrt(Math.pow(e.clientY-t.touchObject.startY,2))):Math.round(Math.sqrt(Math.pow(e.clientX-t.touchObject.startX,2)));t.touchObject={startX:t.touchObject.startX,startY:t.touchObject.startY,endX:e.clientX,endY:e.clientY,length:i,direction:n},t.setState({left:t.props.vertical?0:t.getTargetLeft(t.touchObject.length*t.touchObject.direction),top:t.props.vertical?t.getTargetLeft(t.touchObject.length*t.touchObject.direction):0})}},onMouseUp:function(e){t.state.dragging&&t.handleSwipe(e)},onMouseLeave:function(e){t.state.dragging&&t.handleSwipe(e)}}}},{key:"handleMouseOver",value:function(){this.props.autoplay&&(this.autoplayPaused=!0,this.stopAutoplay())}},{key:"handleMouseOut",value:function(){this.props.autoplay&&this.autoplayPaused&&(this.startAutoplay(),this.autoplayPaused=null)}},{key:"handleSwipe",value:function(t){"undefined"!==typeof this.touchObject.length&&this.touchObject.length>44?this.clickSafe=!0:this.clickSafe=!1;var e=this.props,n=e.slidesToShow,i=e.slidesToScroll,r=e.swipeSpeed;"auto"===i&&(n=this.state.slidesToScroll),f.a.Children.count(this.props.children)>1&&this.touchObject.length>this.state.slideWidth/n/r?1===this.touchObject.direction?this.state.currentSlide>=f.a.Children.count(this.props.children)-n&&!this.props.wrapAround?this.animateSlide(this.props.edgeEasing):this.nextSlide():-1===this.touchObject.direction&&(this.state.currentSlide<=0&&!this.props.wrapAround?this.animateSlide(this.props.edgeEasing):this.previousSlide()):this.goToSlide(this.state.currentSlide),this.touchObject={},this.setState({dragging:!1})}},{key:"swipeDirection",value:function(t,e,n,i){var r=t-e,o=n-i,s=Math.atan2(o,r),a=Math.round(180*s/Math.PI);return a<0&&(a=360-Math.abs(a)),a<=45&&a>=0||a<=360&&a>=315?1:a>=135&&a<=225?-1:!0===this.props.vertical?a>=35&&a<=135?1:-1:0}},{key:"startAutoplay",value:function(){f.a.Children.count(this.props.children)<=1||(this.autoplayID=setInterval(this.autoplayIterator,this.props.autoplayInterval))}},{key:"resetAutoplay",value:function(){this.props.resetAutoplay&&this.props.autoplay&&!this.autoplayPaused&&(this.stopAutoplay(),this.startAutoplay())}},{key:"stopAutoplay",value:function(){this.autoplayID&&clearInterval(this.autoplayID)}},{key:"animateSlide",value:function(t,e,n,i){this.tweenState(this.props.vertical?"top":"left",{easing:t||this.props.easing,duration:e||this.props.speed,endValue:n||this.getTargetLeft(),delay:null,beginValue:null,onEnd:i||null,stackBehavior:b})}},{key:"getTargetLeft",value:function(t,e){var n=void 0,i=e||this.state.currentSlide,r=this.props.cellSpacing;switch(this.props.cellAlign){case"left":n=0,n-=r*i;break;case"center":n=(this.state.frameWidth-this.state.slideWidth)/2,n-=r*i;break;case"right":n=this.state.frameWidth-this.state.slideWidth,n-=r*i}var o=this.state.slideWidth*i;return this.state.currentSlide>0&&i+this.state.slidesToScroll>=this.state.slideCount&&1!==this.props.slideWidth&&!this.props.wrapAround&&"auto"===this.props.slidesToScroll&&(o=this.state.slideWidth*this.state.slideCount-this.state.frameWidth,n=0,n-=r*(this.state.slideCount-1)),-1*(o-(n-=t||0))}},{key:"bindEvents",value:function(){y.a.canUseDOM&&(w(window,"resize",this.onResize),w(document,"readystatechange",this.onReadyStateChange))}},{key:"unbindEvents",value:function(){y.a.canUseDOM&&(O(window,"resize",this.onResize),O(document,"readystatechange",this.onReadyStateChange))}},{key:"formatChildren",value:function(t){var e=this,n=this.props.vertical?this.getTweeningValue("top"):this.getTweeningValue("left");return f.a.Children.map(t,(function(t,i){return f.a.createElement("li",{className:"slider-slide",style:e.getSlideStyles(i,n),key:i},t)}))}},{key:"setInitialDimensions",value:function(){var t=this,e=this.props,n=e.vertical,i=e.initialSlideHeight,r=e.initialSlideWidth,o=e.slidesToShow,s=e.cellSpacing,a=e.children,l=n?i||0:r||0,u=i?i*o:0,c=u+s*(o-1);this.setState({slideHeight:u,frameWidth:n?c:"100%",slideCount:f.a.Children.count(a),slideWidth:l},(function(){t.setLeft(),t.setExternalData()}))}},{key:"setDimensions",value:function(t){var e,n,i=this,r=void 0,o=void 0,s=(t=t||this.props).slidesToScroll,a=this.refs.frame,l=a.childNodes[0].childNodes[0];l?(l.style.height="auto",r=this.props.vertical?l.offsetHeight*t.slidesToShow:l.offsetHeight):r=100,o="number"!==typeof t.slideWidth?parseInt(t.slideWidth,10):t.vertical?r/t.slidesToShow*t.slideWidth:a.offsetWidth/t.slidesToShow*t.slideWidth,t.vertical||(o-=t.cellSpacing*((100-100/t.slidesToShow)/100)),n=r+t.cellSpacing*(t.slidesToShow-1),e=t.vertical?n:a.offsetWidth,"auto"===t.slidesToScroll&&(s=Math.floor(e/(o+t.cellSpacing))),this.setState({slideHeight:r,frameWidth:e,slideWidth:o,slidesToScroll:s,left:t.vertical?0:this.getTargetLeft(),top:t.vertical?this.getTargetLeft():0},(function(){i.setLeft()}))}},{key:"setLeft",value:function(){this.setState({left:this.props.vertical?0:this.getTargetLeft(),top:this.props.vertical?this.getTargetLeft():0})}},{key:"setExternalData",value:function(){this.props.data&&this.props.data()}},{key:"getListStyles",value:function(){var t=this.state.slideWidth*f.a.Children.count(this.props.children),e=this.props.cellSpacing,n=e*f.a.Children.count(this.props.children),i="translate3d("+this.getTweeningValue("left")+"px, "+this.getTweeningValue("top")+"px, 0)";return{transform:i,WebkitTransform:i,msTransform:"translate("+this.getTweeningValue("left")+"px, "+this.getTweeningValue("top")+"px)",position:"relative",display:"block",margin:this.props.vertical?e/2*-1+"px 0px":"0px "+e/2*-1+"px",padding:0,height:this.props.vertical?t+n:this.state.slideHeight,width:this.props.vertical?"auto":t+n,cursor:!0===this.state.dragging?"pointer":"inherit",boxSizing:"border-box",MozBoxSizing:"border-box"}}},{key:"getFrameStyles",value:function(){return{position:"relative",display:"block",overflow:this.props.frameOverflow,height:this.props.vertical?this.state.frameWidth||"initial":"auto",margin:this.props.framePadding,padding:0,transform:"translate3d(0, 0, 0)",WebkitTransform:"translate3d(0, 0, 0)",msTransform:"translate(0, 0)",boxSizing:"border-box",MozBoxSizing:"border-box"}}},{key:"getSlideStyles",value:function(t,e){var n=this.getSlideTargetPosition(t,e),i=this.props.cellSpacing;return{position:"absolute",left:this.props.vertical?0:n,top:this.props.vertical?n:0,display:this.props.vertical?"block":"inline-block",listStyleType:"none",verticalAlign:"top",width:this.props.vertical?"100%":this.state.slideWidth,height:"auto",boxSizing:"border-box",MozBoxSizing:"border-box",marginLeft:this.props.vertical?"auto":i/2,marginRight:this.props.vertical?"auto":i/2,marginTop:this.props.vertical?i/2:"auto",marginBottom:this.props.vertical?i/2:"auto"}}},{key:"getSlideTargetPosition",value:function(t,e){var n=this.state.frameWidth/this.state.slideWidth,i=(this.state.slideWidth+this.props.cellSpacing)*t,r=(this.state.slideWidth+this.props.cellSpacing)*n*-1;if(this.props.wrapAround){var o=Math.ceil(e/this.state.slideWidth);if(this.state.slideCount-o<=t)return(this.state.slideWidth+this.props.cellSpacing)*(this.state.slideCount-t)*-1;var s=Math.ceil((Math.abs(e)-Math.abs(r))/this.state.slideWidth);if(1!==this.state.slideWidth&&(s=Math.ceil((Math.abs(e)-this.state.slideWidth)/this.state.slideWidth)),t<=s-1)return(this.state.slideWidth+this.props.cellSpacing)*(this.state.slideCount+t)}return i}},{key:"getSliderStyles",value:function(){return{position:"relative",display:"block",width:this.props.width,height:"auto",boxSizing:"border-box",MozBoxSizing:"border-box",visibility:this.state.slideWidth?"visible":"hidden"}}},{key:"getStyleTagStyles",value:function(){return".slider-slide > img {width: 100%; display: block;}"}},{key:"getDecoratorStyles",value:function(t){switch(t){case"TopLeft":return{position:"absolute",top:0,left:0};case"TopCenter":return{position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",WebkitTransform:"translateX(-50%)",msTransform:"translateX(-50%)"};case"TopRight":return{position:"absolute",top:0,right:0};case"CenterLeft":return{position:"absolute",top:"50%",left:0,transform:"translateY(-50%)",WebkitTransform:"translateY(-50%)",msTransform:"translateY(-50%)"};case"CenterCenter":return{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",WebkitTransform:"translate(-50%, -50%)",msTransform:"translate(-50%, -50%)"};case"CenterRight":return{position:"absolute",top:"50%",right:0,transform:"translateY(-50%)",WebkitTransform:"translateY(-50%)",msTransform:"translateY(-50%)"};case"BottomLeft":return{position:"absolute",bottom:0,left:0};case"BottomCenter":return{position:"absolute",bottom:0,width:"100%",textAlign:"center"};case"BottomRight":return{position:"absolute",bottom:0,right:0};default:return{position:"absolute",top:0,left:0}}}}]),e}(f.a.Component);T.defaultProps={afterSlide:function(){},autoplay:!1,resetAutoplay:!0,swipeSpeed:12,autoplayInterval:3e3,beforeSlide:function(){},cellAlign:"left",cellSpacing:0,data:function(){},decorators:g,dragging:!0,easing:function(t,e,n,i){return(n-e)*Math.sqrt(1-(t=t/i-1)*t)+e},edgeEasing:function(t,e,n,i){return(n-e)*t/i+e},framePadding:"0px",frameOverflow:"hidden",slideIndex:0,slidesToScroll:1,slidesToShow:1,slideWidth:1,speed:500,swiping:!0,vertical:!1,width:"100%",wrapAround:!1,style:{}};var C=T},448:function(t,e,n){"use strict";var i=n(466).CopyToClipboard;i.CopyToClipboard=i,t.exports=i},449:function(t,e,n){!function(e,n){var i={version:"2.11.2",areas:{},apis:{},inherit:function(t,e){for(var n in t)e.hasOwnProperty(n)||Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e},stringify:function(t){return void 0===t||"function"===typeof t?t+"":JSON.stringify(t)},parse:function(t,e){try{return JSON.parse(t,e||i.revive)}catch(n){return t}},fn:function(t,e){for(var n in i.storeAPI[t]=e,i.apis)i.apis[n][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,n){t.setItem(e,n)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,n){var r=i.inherit(i.storeAPI,(function(t,e,n){return 0===arguments.length?r.getAll():"function"===typeof e?r.transact(t,e,n):void 0!==e?r.set(t,e,n):"string"===typeof t||"number"===typeof t?r.get(t):"function"===typeof t?r.each(t):t?r.setAll(t,e):r.clear()}));r._id=t;try{e.setItem("_-bad-_","wolf"),r._area=e,e.removeItem("_-bad-_")}catch(o){}return r._area||(r._area=i.storage("fake")),r._ns=n||"",i.areas[t]||(i.areas[t]=r._area),i.apis[r._ns+r._id]||(i.apis[r._ns+r._id]=r),r},storeAPI:{area:function(t,e){var n=this[t];return n&&n.area||(n=i.Store(t,e,this._ns),this[t]||(this[t]=n)),n},namespace:function(t,e){if(!t)return this._ns?this._ns.substring(0,this._ns.length-1):"";var n=t,r=this[n];if((!r||!r.namespace)&&(r=i.Store(this._id,this._area,this._ns+n+"."),this[n]||(this[n]=r),!e))for(var o in i.areas)r.area(o,i.areas[o]);return r},isFake:function(){return"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var n=0,r=i.length(this._area);n<r;n++){var o=this._out(i.key(this._area,n));if(void 0!==o&&!1===t.call(this,o,this.get(o),e))break;r>i.length(this._area)&&(r--,n--)}return e||this},keys:function(t){return this.each((function(t,e,n){n.push(t)}),t||[])},get:function(t,e){var n,r=i.get(this._area,this._in(t));return"function"===typeof e&&(n=e,e=null),null!==r?i.parse(r,n):null!=e?e:r},getAll:function(t){return this.each((function(t,e,n){n[t]=e}),t||{})},transact:function(t,e,n){var i=this.get(t,n),r=e(i);return this.set(t,void 0===r?i:r),this},set:function(t,e,n){var r=this.get(t);return null!=r&&!1===n?e:i.set(this._area,this._in(t),i.stringify(e),n)||r},setAll:function(t,e){var n,i;for(var r in t)i=t[r],this.set(r,i,e)!==i&&(n=!0);return n},add:function(t,e){var n=this.get(t);if(n instanceof Array)e=n.concat(e);else if(null!==n){var r=typeof n;if(r===typeof e&&"object"===r){for(var o in e)n[o]=e[o];e=n}else e=n+e}return i.set(this._area,this._in(t),i.stringify(e)),e},remove:function(t,e){var n=this.get(t,e);return i.remove(this._area,this._in(t)),n},clear:function(){return this._ns?this.each((function(t){i.remove(this._area,this._in(t))}),1):i.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in i.areas)i.areas.hasOwnProperty(e)&&(this._area=i.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!==typeof t&&(t=i.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):void 0:t}},storage:function(t){return i.inherit(i.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var n in this.items)if(this.has(n)&&t===e++)return n},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},r=i.Store("local",function(){try{return localStorage}catch(t){}}());r.local=r,r._=i,r.area("session",function(){try{return sessionStorage}catch(t){}}()),r.area("page",i.storage("page")),"function"===typeof n&&void 0!==n.amd?n("store2",[],(function(){return r})):t.exports?t.exports=r:(e.store&&(i.conflict=e.store),e.store=r)}(this,this&&this.define)},466:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyToClipboard=void 0;var i=o(n(0)),r=o(n(467));function o(t){return t&&t.__esModule?t:{default:t}}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 a(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 l(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 h(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?d(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=function(t){function e(){var t,n;u(this,e);for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return g(d(n=h(this,(t=p(e)).call.apply(t,[this].concat(s)))),"onClick",(function(t){var e=n.props,o=e.text,s=e.onCopy,a=e.children,l=e.options,u=i.default.Children.only(a),c=(0,r.default)(o,l);s&&s(o,c),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(t)})),n}var n,o,s;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&&f(t,e)}(e,t),n=e,(o=[{key:"render",value:function(){var t=this.props,e=(t.text,t.onCopy,t.options,t.children),n=l(t,["text","onCopy","options","children"]),r=i.default.Children.only(e);return i.default.cloneElement(r,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},n,{onClick:this.onClick}))}}])&&c(n.prototype,o),s&&c(n,s),e}(i.default.PureComponent);e.CopyToClipboard=v,g(v,"defaultProps",{onCopy:void 0,options:void 0})},467:function(t,e,n){"use strict";var i=n(468);t.exports=function(t,e){var n,r,o,s,a,l,u=!1;e||(e={}),n=e.debug||!1;try{if(o=i(),s=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=t,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(n){n.stopPropagation(),e.format&&(n.preventDefault(),n.clipboardData.clearData(),n.clipboardData.setData(e.format,t))})),document.body.appendChild(l),s.selectNodeContents(l),a.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),u=!0}catch(c){n&&console.error("unable to copy using clipboardData: ",c),n&&console.error("falling back to prompt"),r=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,t)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(s):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return u}},468:function(t,e){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],i=0;i<t.rangeCount;i++)n.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||n.forEach((function(e){t.addRange(e)})),e&&e.focus()}}}}]);
//# sourceMappingURL=58.b3ae08e1.chunk.js.map