/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[49],{26:function(t,e,n){"use strict";function r(t,e,n,r,o,d,c,l){var h,f="function"==typeof t?t.options:t;if(e&&(f.render=e,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),d&&(f._scopeId="data-v-"+d),c?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},f._ssrRegister=h):o&&(h=l?function(){o.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:o),h)if(f.functional){f._injectStyles=h;var v=f.render;f.render=function(t,e){return h.call(e),v(t,e)}}else{var y=f.beforeCreate;f.beforeCreate=y?[].concat(y,h):[h]}return{exports:t,options:f}}n.d(e,"a",(function(){return r}))},453:function(t,e,n){"use strict";var r="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},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},d=function(){function t(t,e){for(var i=0;i0}}),!0;return!1}();var E="event",k="observer",A=function(){if(_)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t);function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}}();function j(t,e){if(t.length){var n=t.indexOf(e);return n>-1?t.splice(n,1):void 0}}function z(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var n=t.getAttribute("data-srcset"),r=[],o=t.parentNode.offsetWidth*e,d=void 0,c=void 0,l=void 0;(n=n.trim().split(",")).map((function(t){t=t.trim(),-1===(d=t.lastIndexOf(" "))?(c=t,l=999998):(c=t.substr(0,d),l=parseInt(t.substr(d+1,t.length-d-2),10)),r.push([l,c])})),r.sort((function(a,b){if(a[0]b[0])return-1;if(a[0]===b[0]){if(-1!==b[1].indexOf(".webp",b[1].length-5))return 1;if(-1!==a[1].indexOf(".webp",a[1].length-5))return-1}return 0}));for(var h="",f=void 0,i=0;i0&&void 0!==arguments[0]?arguments[0]:1;return _&&window.devicePixelRatio||t};function I(){if(!_)return!1;var t=!0,e=document;try{var n=e.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",e.body.appendChild(n),t=!n.offsetWidth,e.body.removeChild(n)}catch(e){t=!1}return t}var O=function(){if(_){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),S={on:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];O?t.addEventListener(e,n,{capture:r,passive:!0}):t.addEventListener(e,n,r)},off:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,n,r)}},C=function(t,e,n){var image=new Image;if(!t||!t.src){var r=new Error("image src is required");return n(r)}image.src=t.src,image.onload=function(){e({naturalHeight:image.naturalHeight,naturalWidth:image.naturalWidth,src:image.src})},image.onerror=function(t){n(t)}},style=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},x=function(t){return style(t,"overflow")+style(t,"overflow-y")+style(t,"overflow-x")};function H(){}var R=function(){function t(e){var n=e.max;o(this,t),this.options={max:n||100},this._caches=[]}return d(t,[{key:"has",value:function(t){return this._caches.indexOf(t)>-1}},{key:"add",value:function(t){this.has(t)||(this._caches.push(t),this._caches.length>this.options.max&&this.free())}},{key:"free",value:function(){this._caches.shift()}}]),t}(),Q=function(){function t(e){var n=e.el,r=e.src,d=e.error,c=e.loading,l=e.bindType,h=e.$parent,f=e.options,v=e.elRenderer,y=e.imageCache;o(this,t),this.el=n,this.src=r,this.error=d,this.loading=c,this.bindType=l,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=f,this.rect=null,this.$parent=h,this.elRenderer=v,this._imageCache=y,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return d(t,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(t){this.performanceData[t]=Date.now()}},{key:"update",value:function(t){var e=t.src,n=t.loading,r=t.error,o=this.src;this.src=e,this.loading=n,this.error=r,this.filter(),o!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.topthis.options.preLoadTop&&this.rect.left0}},{key:"filter",value:function(){var t=this;(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e})(this.options.filter).map((function(e){t.options.filter[e](t,t.options)}))}},{key:"renderLoading",value:function(t){var e=this;this.state.loading=!0,C({src:this.loading},(function(data){e.render("loading",!1),e.state.loading=!1,t()}),(function(){t(),e.state.loading=!1,e.options.silent||console.warn("VueLazyload log: load failed with loading image("+e.loading+")")}))}},{key:"load",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void e()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,e()):void this.renderLoading((function(){t.attempt++,t.options.adapter.beforeLoad&&t.options.adapter.beforeLoad(t,t.options),t.record("loadStart"),C({src:t.src},(function(data){t.naturalHeight=data.naturalHeight,t.naturalWidth=data.naturalWidth,t.state.loaded=!0,t.state.error=!1,t.record("loadEnd"),t.render("loaded",!1),t.state.rendered=!0,t._imageCache.add(t.src),e()}),(function(e){!t.options.silent&&console.error(e),t.state.error=!0,t.state.loaded=!1,t.render("error",!1)}))}))}},{key:"render",value:function(t,e){this.elRenderer(this,t,e)}},{key:"performance",value:function(){var t="loading",time=0;return this.state.loaded&&(t="loaded",time=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:time}}},{key:"$destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),t}(),W="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",B=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],D={rootMargin:"0px",threshold:0},V=function(t){return function(){function e(t){var n,r,d,c,l=t.preLoad,h=t.error,f=t.throttleWait,v=t.preLoadTop,y=t.dispatchEvent,m=t.loading,w=t.attempt,_=t.silent,L=void 0===_||_,A=t.scale,j=t.listenEvents,filter=(t.hasbind,t.filter),z=t.adapter,T=t.observer,O=t.observerOptions;o(this,e),this.version="1.3.3",this.mode=E,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:L,dispatchEvent:!!y,throttleWait:f||200,preLoad:l||1.3,preLoadTop:v||0,error:h||W,loading:m||W,attempt:w||3,scale:A||$(A),ListenEvents:j||B,hasbind:!1,supportWebp:I(),filter:filter||{},adapter:z||{},observer:!!T,observerOptions:O||D},this._initEvent(),this._imageCache=new R({max:200}),this.lazyLoadHandler=(n=this._lazyLoadHandler.bind(this),r=this.options.throttleWait,d=null,c=0,function(){if(!d){var t=Date.now()-c,e=this,o=arguments,l=function(){c=Date.now(),d=!1,n.apply(e,o)};t>=r?l():d=setTimeout(l,r)}}),this.setMode(this.options.observer?k:E)}return d(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this.options,t)}},{key:"performance",value:function(){var t=[];return this.ListenerQueue.map((function(e){t.push(e.performance())})),t}},{key:"addLazyBox",value:function(t){this.ListenerQueue.push(t),_&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}},{key:"add",value:function(e,n,r){var o=this;if(function(t,e){for(var n=!1,i=0,r=t.length;i0&&this.rect.left0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy:function(){return this.$destroy}}}},P=function(){function t(e){var n=e.lazy;o(this,t),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return d(t,[{key:"bind",value:function(t,e,n){var r=new F({el:t,binding:e,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(t,e,n){var r=T(this._queue,(function(e){return e.el===t}));r&&r.update({el:t,binding:e,vnode:n})}},{key:"unbind",value:function(t,e,n){var r=T(this._queue,(function(e){return e.el===t}));r&&(r.clear(),j(this._queue,r))}}]),t}(),M={selector:"img"},F=function(){function t(e){var n=e.el,r=e.binding,d=e.vnode,c=e.lazy;o(this,t),this.el=null,this.vnode=d,this.binding=r,this.options={},this.lazy=c,this._queue=[],this.update({el:n,binding:r})}return d(t,[{key:"update",value:function(t){var e=this,n=t.el,r=t.binding;this.el=n,this.options=w({},M,r.value),this.getImgs().forEach((function(t){e.lazy.add(t,w({},e.binding,{value:{src:"dataset"in t?t.dataset.src:t.getAttribute("data-src"),error:("dataset"in t?t.dataset.error:t.getAttribute("data-error"))||e.options.error,loading:("dataset"in t?t.dataset.loading:t.getAttribute("data-loading"))||e.options.loading}}),e.vnode)}))}},{key:"getImgs",value:function(){return function(t){for(var e=t.length,n=[],i=0;i0&&this.rect.left0},load:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H;if(this.state.attempt>this.options.attempt-1&&this.state.error)return t.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void n();var r=this.options.src;C({src:r},(function(t){var n=t.src;e.renderSrc=n,e.state.loaded=!0}),(function(t){e.state.attempt++,e.renderSrc=e.options.error,e.state.error=!0}))}}}},G={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=V(t),r=new n(e),o=new P({lazy:r}),d="2"===t.version.split(".")[0];t.prototype.$Lazyload=r,e.lazyComponent&&t.component("lazy-component",N(r)),e.lazyImage&&t.component("lazy-image",U(r)),d?(t.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),t.directive("lazy-container",{bind:o.bind.bind(o),componentUpdated:o.update.bind(o),unbind:o.unbind.bind(o)})):(t.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(t,e){w(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){r.remove(this.el)}}),t.directive("lazy-container",{update:function(t,e){o.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){o.unbind(this.el)}}))}};e.a=G}}]);