!function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var a in t)e.d(n,a,function(e){return t[e]}.bind(null,a));return n},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=133)}({128:function(t,e,i){"use strict";function n(t,e){void 0===e&&(e=document.body);var i=[];if(!e)return null;var n=e.querySelectorAll("img[data-render-type=gif]");if(n&&0!==n.length){for(var a,r,s=0,l=(t&&"video"===t.type&&(r=document.createElement("video")).canPlayType&&r.canPlayType("video/mp4")&&(!(Object(o.i)()&&!Object(o.d)())||"playsInline"in r)),p={download:!t||t.download,clickPlay:!!t&&t.clickPlay};a=n[s];){var u=l?new y(a,p):new h(a,p);i.push(u),s++}if("object"==typeof t&&"preloadNum"in t)for(var d=Math.min(t.preloadNum,i.length);d--;)i[d]&&i[d].play();return g=f(g,i),i}}i.d(e,"a",function(){return n});var a,o=i(23),r=function(t,e,i){return t.addEventListener?(t.addEventListener(e,i,!1),{remove:function(){t.removeEventListener(e,i,!1)}}):t.attachEvent?(t.attachEvent("on"+e,i),{remove:function(){t.detachEvent("on"+e,i)}}):void 0};!function(t){t.default="default",t.loading="loading",t.triggered="triggered",t.playing="playing",t.pause="pause",t.error="error",t.timeout="timeout"}(a||(a={}));var s,l={download:!0,prefetch:!0,clickPlay:!1,timeout:1e4},p=function(){function t(t,e){var i=this;return t?void(this.inited||t.getAttribute("data-inited")||(this.config=Object.assign({},l,e),this.elem=t,this.container=t.parentElement,this.previewURL=this.elem.src,this.playURL=this.getPlayURL(),this.config.clickPlay&&this.elem&&(this.elemClick=r(this.elem,"click",function(t){var e=i.status===a.playing,n=i.status===a.default,o=i.status===a.pause,r=i.status===a.error,s=i.status===a.loading;(n||o)&&t.stopPropagation(),e||r||s||i.playHandle(t,!0)})),this.init())):null}return t.prototype.init=function(){},t.prototype.getOriginURL=function(t){return(t||this.elem).getAttribute("data-original-url")},t.prototype.getPlayURL=function(t){return this.getOriginURL()},t.prototype.createDownloadButton=function(t){if(this.config.download){var e=document.createElement("a");e.className="image-gif-download",e.href=t||this.getOriginURL(),e.target="_blank",e.rel="norefer",e.innerHTML="GIF",this.container&&this.container.appendChild(e),this.downloadButton=e}},t.prototype.createPanel=function(){this.panel||(this.panel=document.createElement("div"),this.panel.className="image-gif-panel",this.panel.innerHTML='\n
\n GIF\n \n \n
\n ',this.container.appendChild(this.panel),this.playButton=this.panel.getElementsByClassName("image-gif-button-play")[0],this.reloadButton=this.panel.getElementsByClassName("image-gif-button-reload")[0],this.loadingIcon=this.panel.getElementsByClassName("image-gif-loading")[0],this.playButtonClick=r(this.playButton,"click",this.playHandle.bind(this)),this.reloadButtonClick=r(this.reloadButton,"click",this.reloadHandle.bind(this)),this.elem.setAttribute("data-inited","true"))},t.prototype.play=function(t){},t.prototype.playHandle=function(t,e){this.play(this.playURL),this.changeStatus(a.playing)},t.prototype.changeStatus=function(t){this.status=t,this.elem&&this.elem.setAttribute("data-status",t)},t.prototype.reloadHandle=function(t){this.changeStatus(a.loading),this.playButton.style.display="none",this.reloadButton.style.display="none",this.loadingIcon.style.display="block";var e="_r="+Math.random(),i=this.playURL.indexOf("?")>=0?this.playURL+"&"+e:this.playURL+"?"+e;this.playURL=i,this.play(this.playURL)},t.prototype.notFoundHandle=function(t){},t.prototype.pause=function(){},t.prototype.destroy=function(){},t.prototype.startTimeout=function(){var t=this,e=this.config.timeout,i=void 0===e?1e4:e;this.timer=setTimeout(function(){t.status===a.loading&&t.changeStatus(a.timeout)},i)},t.prototype.clearTimeout=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype._destory=function(){this.container&&(this.panel&&(this.container.removeChild(this.panel),this.panel=null),this.downloadButton&&(this.container.removeChild(this.downloadButton),this.downloadButton=null)),this.elem&&this.elem.setAttribute("data-inited",""),this.inited=!1,this.changeStatus(a.default)},t.prefetch=function(t){if(!t)return!1;var e=document.createElement("link");e.rel="prefecth",e.href=t;var i=document.getElementsByTagName("link")[0];i?i.parentNode.insertBefore(e,i):document.getElementsByTagName("head")[0].appendChild(e)},t}(),u=(s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.init=function(){this.createPanel(),this.playURL=this.getPlayURL(),this.imgLoad=r(this.elem,"load",this.loadedHandle.bind(this)),this.imgLoadErorr=r(this.elem,"error",this.notFoundHandle.bind(this)),this.config&&this.config.prefetch&&p.prefetch(this.getPlayURL()),this.elem&&(this.srcTemp=this.elem.getAttribute("src"))},e.prototype.loadedHandle=function(){return!!this.elem&&void(this.elem.src===this.playURL&&(this.playButtonClick.remove(),this.reloadButtonClick.remove(),this.imgLoad.remove(),this.imgLoadErorr.remove(),this.container.removeChild(this.panel),this.createDownloadButton(),this.changeStatus(a.playing)))},e.prototype.notFoundHandle=function(){return!!this.elem&&(this.elem.src=this.previewURL,this.playButton.style.display="none",this.reloadButton.style.display="block",this.loadingIcon.style.display="none",this.changeStatus(a.error),void 0)},e.prototype.play=function(t){return!!this.elem&&(this.elem.src=t||this.playURL,this.playButton.style.display="none",this.reloadButton.style.display="none",this.loadingIcon.style.display="block",void 0)},e.prototype.pause=function(){this.elem&&this.srcTemp&&this.elem.setAttribute("src",this.srcTemp),this.changeStatus(a.pause)},e.prototype.destroy=function(){this.pause(),this._destory()},e}(p),d=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=Object(o.b)(),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){var t=this;this.imageLoaded=!1,this.needPlay=!1,this.createPanel(),this.container.setAttribute("data-render-type","video"),this.elem&&(this.elem.complete?this._playAfterComplete():this.elem.addEventListener("load",function(){t._playAfterComplete()})),e.allInstances.push(this),this.startTimeout()},e.prototype._playAfterComplete=function(){this.imageLoaded=!0,this.needPlay&&(this.createPlayer(),this.bindPlayerEvents(),this.play())},e.prototype.playingHandle=function(){this.status!==a.playing&&(this.changeStatus(a.playing),this.playButton&&(this.playButton.style.display="none"),this.reloadButton&&(this.reloadButton.style.display="none"),this.loadingIcon&&(this.loadingIcon.style.display="none"),this.player&&(this.player.style.display="block"),this.playButtonClick.remove(),this.reloadButtonClick.remove(),this.container.removeChild(this.panel),this.panel=null,this.playerLoadStart.remove(),this.playerPlaying.remove(),this.playerReady.remove(),this.playerLoadedData.remove(),this.playerLoadedMetaData.remove(),this.changeStatus(a.playing),this.createDownloadButton(),this.clearTimeout())},e.prototype.changeStatus=function(t){this.status=t,this.elem&&this.elem.setAttribute("data-status",t),this.player&&this.player.setAttribute("data-status",t)},e.prototype.getPlayURL=function(t){var e=(t||this.elem).getAttribute("data-original-url");if(!e)return"";var i=e.split(".").pop();return e.replace(new RegExp("."+i+"$","gi"),".mp4")},e.prototype.createPlayer=function(){if(!this.imageLoaded)return!1;var t=document.createElement("video");this.container.appendChild(t),t.className="image-gif-player",t.muted=!0,t.controls=!1,t.loop=!c,t.preload="auto",t.autoplay=!0,t.poster=this.previewURL,t.crossOrigin="anonymous",t.playsinline=!0,t.style.display="none",t.setAttribute("playsinline","true"),t.setAttribute("webkit-playsinline","true"),t.setAttribute("type","video/mp4");try{var e=this.playURL;t.src=e}catch(e){console&&console.error("不支持该 player.src",t.src)}this.loadingIcon.style.display="block",this.playButton.style.display="none",this.player=t},e.prototype.bindPlayerEvents=function(){var t=this;this.playerLoadStart=r(this.player,"loadstart",function(e){t.changeStatus(a.loading)}),this.playerReady=r(this.player,"canplay",function(){t.canPlay=!0,t.status!==a.playing&&t.play()}),this.playerLoadedMetaData=r(this.player,"loadedmetadata",function(){t.canPlay=!0,t.status!==a.playing&&t.play()}),this.playerLoadedData=r(this.player,"loadeddata",function(){t.canPlay=!0}),c&&(this.playerTrickLoop=r(this.player,"ended",function(){t.player.currentTime=.01,t.player.play()})),this.playerPlaying=r(this.player,"playing",this.playingHandle.bind(this)),this.playerLoadError=r(this.player,"error",this.notFoundHandle.bind(this))},e.prototype.playHandle=function(t,e){t&&t.preventDefault(),t&&e&&t.stopPropagation(),this.canPlay=!0,this.play(this.playURL),this.changeStatus(a.loading)},e.prototype.play=function(t){return this.needPlay=!0,!!this.imageLoaded&&(this.player||(this.createPlayer(),this.bindPlayerEvents()),!!this.canPlay&&(t&&this.player&&(this.player.src=t),void(this.player&&(this.player.play(),this.changeStatus(a.triggered)))))},e.prototype.reloadHandle=function(t){t&&t.preventDefault(),t&&t.stopPropagation(),this.changeStatus(a.loading),this.playButton&&(this.playButton.style.display="none"),this.reloadButton&&(this.reloadButton.style.display="none"),this.loadingIcon&&(this.loadingIcon.style.display="block");var e=this.playURL;this.canPlay=!0,this.play(e)},e.prototype.notFoundHandle=function(t){return this.status!==a.playing&&(this.canPlay=!1,this.playButton&&(this.playButton.style.display="none"),this.reloadButton&&(this.reloadButton.style.display="block"),this.loadingIcon&&(this.loadingIcon.style.display="none"),this.player&&(this.player.style.display="none"),this.changeStatus(a.error),void 0)},e.prototype.pause=function(){this.player&&(this.player.pause(),this.changeStatus(a.pause))},e.prototype.destroy=function(){this.container&&this.player&&(this.container.removeChild(this.player),this.player=null),this._destory()},e.allInstances=[],e.ALL_PLAY=function(){e.allInstances&&e.allInstances.forEach(function(t){"playing"!==t.status&&(t.canPlay=!0,t.play())})},e}(p),f=function(){for(var t=0,e=0,i=arguments.length;e