nimble-ui
Version:
1 lines • 36.6 kB
JavaScript
module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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="hkQx")}({"/Ot8":function(t,e,n){"use strict";var i,o,r,a,s={trident:(i=navigator.userAgent).indexOf("Trident")>-1,presto:i.indexOf("Presto")>-1,webKit:i.indexOf("AppleWebKit")>-1,gecko:i.indexOf("Gecko")>-1&&-1===i.indexOf("KHTML"),mobile:!!i.match(/AppleWebKit.*Mobile.*/),ios:!!i.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:i.indexOf("Android")>-1||i.indexOf("Adr")>-1,iPhone:i.indexOf("iPhone")>-1,iPad:i.indexOf("iPad")>-1,symbian:i.indexOf("SymbianOS")>-1,windowPhone:i.indexOf("Windows Phone")>-1,iPod:i.indexOf("iPod")>-1,weixin:/MicroMessenger/i.test(i),browserVersion:(i.match(/version\/(.+?)\s/i)||[])[1],appVersion:"",kernel:/tencenttraveler|qqbrowse/i.test(i)?"x5":"",qqnews:/qqnews/i.test(i),isMiniProgram:"miniprogram"===window.__wxjs_environment||/miniProgram/i.test(i)},u=(o=window.screen||{},a={mobile:!1,pc:!1,ios:(r=s).ios||r.iPhone||r.iPad||!1,weixin:r.weixin||!1,isWeixin:r.weixin||!1,iPad:r.iPad||!1,isApp:!1,appVersion:r.appVersion,browserVersion:r.browserVersion,isLightApp:!1,kernel:r.kernel,isIphoneX:r.iPhone&&812===o.height&&375===o.width,android:r.android,isQqnews:r.qqnews,isMiniProgram:r.isMiniProgram},r.mobile||r.ios||r.android||r.iPhone||r.iPad||r.symbian||r.windowPhone||r.iPod||a.isApp?a.mobile=!0:a.pc=!0,a);e.a=u},"0Zk/":function(t,e,n){"use strict";e.a=function(t,e){return Object(i.a)(t,e).replace(/^[a-z]/,function(t){return t.toUpperCase()})};var i=n("lXuC")},"3AwK":function(t,e,n){"use strict";function i(t,e){var n=e.value,i=n,o=function(t){var e={};t&&(t.poster?e.srcAttr="poster":(t.background||t.backgroundImage||t.bg)&&(e.srcAttr="background"));return e}(e.modifiers),r=(o&&o.srcAttr||"src")+"",a=/background/i.test(r);n instanceof Object&&(i=n.src),a?t.style.backgroundImage="url("+i+")":t[r]=i}Object.defineProperty(e,"__esModule",{value:!0});var o=n("p84V");e.default=Object(o.a)(function(){return{bind:i,inserted:i,update:i}},"lazy")},"4Lki":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i={viewWidth:"undefined"!=typeof window&&window.innerWidth||0,viewHeight:"undefined"!=typeof window&&window.innerHeight||0,preLoadTop:0,preLoad:1.3}},"4qRk":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e){var n=t.name||"",i=e.component(n);i||e.component(n,t)});return t}},"5fCB":function(t,e,n){"use strict";var i=n("E5mE"),o=n("eY/N");e.a=function t(){for(var e=!0,n=void 0,r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];if(a instanceof Array&&(n=a.slice(0,1)[0]),"boolean"==typeof n&&(e=n,a.splice(0,1),e||(n=a.splice(0,1)[0])),a&&a.length<1)return"boolean"==typeof n?a[1]:n;e&&(n=null);for(var u=0;u<a.length;u++){var c=a[u];if(c instanceof Object)if(e){for(var l in n&&n instanceof Object||(n=c instanceof Array?[]:{}),c)if(c.hasOwnProperty(l)){var f=c[l];if(d(f)){var p=d(n[l])&&n[l]||(f instanceof Array?[]:{});n[l]=t(p,f)}else void 0!==f?n[l]=f:void 0!==n[l]&&(n[l]=f)}}else n=n&&n instanceof Object?Object.assign(n,c):c}return n;function d(t){return t&&(Object(i.a)(t,"Array")||Object(o.a)(t))||!1}}},"6+6x":function(t,e,n){"use strict";var i="undefined"!=typeof window&&"IntersectionObserver"in window;e.a=i},"6D8K":function(t,e){},"9B2K":function(t,e,n){"use strict";e.a=function(t,e,n){t=((t||"")+"").replace(/\s+/g,"");var s=n||window,u=e?"on":"";if(u+t in s)return t;var c=u?t:Object(i.a)(t);c=c.replace(/(start$|end$|animation|frame$)/gi,function(t,e){return Object(i.a)(e)});for(var l=0;l<r.length;l++){var f=r[l],p=f+c,d=f+t;if(u+p in s)return r=[f],a[t]=p,p;if(u+d in s)return r=[f],a[t]=d,d}var v=Object(o.a)("transition-property",!0);v&&u+v+c in s&&(t=v+c);return e?t:""};var i=n("0Zk/"),o=n("shrL"),r=["Moz","moz","Webkit","webkit","O","o","MS","ms"],a={}},"B/FW":function(t,e){},E5mE:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;try{n=Object.prototype.toString.call(t)==="[object "+e+"]"}catch(t){}return n}},FNmr:function(t,e,n){"use strict";e.a=function(t,e){var n="";if(t&&e)if(e.name){var o="$s"+(n=Object(i.a)(e.name));t.prototype&&!t.prototype[o]&&function(t,e,n){if(t&&e&&n){t[n]=e;try{Object.defineProperty(t,n,{get:function(){var t=this;return e._getParent=function(){return t},e},enumerable:!1,configurable:!1})}catch(t){}}}(t.prototype,e,o)}else console.error("Mount is not defined for the image name");return n};var i=n("0Zk/")},Hxsb:function(t,e,n){"use strict";e.a=function(t,e){var n;e=e||{};var r={};r[t=(t||"")+""]=e.value||{};var a="my"+Object(o.a)(t);return{props:r,data:function(){var n={};return n[a]=Object(i.a)(e.myValueInit||this[t],[this[t]],this),n},watch:(n={},n[t]=function(t,n){var o=Object(i.a)(e.mValueChange,[t,n],this);!1!==o&&(this[a]=t)},n[a]=function(n,o){var r=Object(i.a)(e.myValueChange,[n,o],this);!1!==r&&this.$emit("update:"+t,n)},n)}};var i=n("ekq3"),o=n("WGR+")},ImqO:function(t,e,n){"use strict";var i=function(){var t=!1;if("undefined"==typeof window)return t;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",function(){},e)}catch(t){}return t}();e.a=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"add",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=r;"remove"!==o&&(r instanceof Object||!i||(a={capture:r,passive:!0}));e instanceof Array?e.forEach(function(t){s(t)}):s(e);function s(e){e&&t&&t[o+"EventListener"](e,n,a)}}},Lv3q:function(t,e,n){"use strict";n("B/FW");var i=n("VU/8")({methods:{_onClick:function(t){this.$emit("click",t)},_onTap:function(t){this.$emit("tap",t)},_onClickItem:function(t){this.$emit("clickItem",t)}}},null,!1,null,null,null);e.a=i.exports},LySh:function(t,e){},MEnT:function(t,e,n){"use strict";e.a=function(t){if("undefined"==typeof HTMLElement||!(t instanceof HTMLElement))return window;var e=t;for(;e&&e!==document.body&&e!==document.documentElement;){if(e!==t){if(e._isScroll)return e;if(!e.parentNode)break;if(!1!==e._isScroll){if(/(scroll|auto)/.test(o(e)))return e._isScroll=!0,e;e._isScroll=!1}}e=e.parentNode}return window};var i=n("fk+x");function o(t){return Object(i.a)(t,"overflow")+Object(i.a)(t,"overflow-y")+Object(i.a)(t,"overflow-x")}},N1Ww:function(t,e,n){"use strict";var i=n("rRBi"),o=n("ho/f"),r=n("caJ4"),a=n("3AwK"),s={extends:o.a,props:{imgUrl:{type:String},lazyOptions:{type:Object},isLazy:{type:Boolean,default:!0},aspect:{type:[String,Number]}},computed:{myLazyOptions:function(){var t=this,e=Object(i.a)(!1,{isWrap:!t.aspect},t.lazyOptions,{src:t.imgUrl});if(e&&e.loading){var n=e.loading;e.loading=function(i){try{n.call(e,i)}catch(t){}t.$emit("imgLoading",i)}}else e.loading=function(e){t.$emit("imgLoading",e)};return e}},beforeCreate:function(){Object(r.a)(this.constructor,a.default)}};var u=n("VU/8")(s,null,!1,function(t){n("zaQa")},null,null);e.a=u.exports},PDNl:function(t,e,n){"use strict";n.d(e,"a",function(){return a}),n.d(e,"b",function(){return i});var i,o=n("4Lki"),r=n("9B2K"),a=Object.assign({isShiftOut:!1,listenEvents:["scroll","wheel","mousewheel","resize",Object(r.a)("animationend",!0),Object(r.a)("transitionend",!0),"touchmove"],throttleWait:100,observerOptions:{threshold:0}},o.a);!function(t){t.UNOBSERVE="unobserve"}(i||(i={}))},PEFE:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n("4Lki");var o=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,o));r.defaultOption=i.a,r.content=null,r._lastRun=0;var a=r;return a.setDefaultOptions(o),a.content=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getRect=function(t){var e=this.content;if(e){var n=Date.now(),i=n-(this._lastRun||0);(t||!this._rect||i>100)&&(this._lastRun=n,this._rect=e&&e.getBoundingClientRect()||{})}return this._rect},e.prototype.checkInView=function(t){t&&this.setDefaultOptions(!1,t);var e=this.defaultOption||{},n=this.getRect(!!t),i=e.preLoad||0,o=i,r=e.viewHeight||1024,a=e.viewWidth||800,s=Math.max(0,Math.ceil(e.realHeight/2)||0),u=Math.max(0,Math.ceil(e.realWidth/2)||0),c=(n.top||0)-s,l=(n.bottom||0)+s,f=(n.left||0)-u,p=(n.right||0)+u,d=e&&e.displayScale||0;if("number"==typeof d&&Math.abs(d)>0){var v=(n.height||0)*d,h=(n.width||0)*d;c+=v,l-=v,f+=h,p-=h}return c>=0-r*i&&c<r*o&&l>e.preLoadTop&&f>=0-a*i&&f<a*o&&p>0},e}(n("qd2b").a)},PQHO:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("N1Ww"),o=n("d0AA"),r={extends:i.a,name:"NuImgb",components:{NuAspect:o.default},props:{aspect:{type:[String,Number]}}},a={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_imgb"},[t.imgUrl?n("nu-aspect",{staticClass:"nu_img-wrap",attrs:{aspect:t.aspect},on:{click:t._onClick,tap:t._onTap}},[t.isLazy?n("div",{directives:[{name:"lazy",rawName:"v-lazy.bg",value:t.myLazyOptions,expression:"myLazyOptions",modifiers:{bg:!0}}],staticClass:"nu_imgb-img"},[t._t("default")],2):n("div",{staticClass:"nu_imgb-img",style:{backgroundImage:"url("+t.imgUrl+")"}},[t._t("default")],2)]):t._e()],1)},staticRenderFns:[]};var s=n("VU/8")(r,a,!1,function(t){n("V1qo")},null,null).exports,u=n("4qRk");e.default=Object(u.a)(s)},V1qo:function(t,e){},"VU/8":function(t,e){t.exports=function(t,e,n,i,o,r){var a,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(a=t,s=t.default);var c,l="function"==typeof s?s.options:s;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o),r?(c=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=c):i&&(c=i),c){var f=l.functional,p=f?l.render:l.beforeCreate;f?(l._injectStyles=c,l.render=function(t,e){return c.call(e),p(t,e)}):l.beforeCreate=p?[].concat(p,c):[c]}return{esModule:a,exports:s,options:l}}},"WGR+":function(t,e,n){"use strict";var i=n("0Zk/");e.a=i.a},Wxd7:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={extends:n("ho/f").a,name:"NuIcon",props:{iconClass:{default:"nu_icon"},icon:{type:String}}},o={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"nus_icon",class:t.iconClass,on:{click:function(e){t._onClick(e)},tap:function(e){t._onTap(e)}}},[t._t("default",[t._v("\n "+t._s(t.icon)+"\n ")]),t._v(" "),t._t("hook_ext")],2)},staticRenderFns:[]};var r=n("VU/8")(i,o,!1,function(t){n("6D8K")},null,null).exports,a=n("4qRk");e.default=Object(a.a)(r)},XAAj:function(t,e,n){"use strict";e.a=function(t){var e=document.createEvent("undefined"!=typeof MouseEvent?"MouseEvents":"Event");return e.initEvent(t,!0,!1),e}},Z05q:function(t,e,n){"use strict";e.a=function(t,e,n){if(t&&(t.tagName||t===window||t===document)&&e&&"string"==typeof e){var r=Object(i.a)(e);r._constructed=!0,r=Object(o.a)(!1,r,n),t.dispatchEvent(r)}};var i=n("XAAj"),o=n("5fCB")},a6ow:function(t,e,n){"use strict";var i={extends:n("Lv3q").a},o=n("VU/8")(i,null,!1,null,null,null);e.a=o.exports},caJ4:function(t,e,n){"use strict";e.a=function(t,e,n){t.use(e,n)}},d0AA:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ho/f"),o="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},r={name:"NuAspect",extends:i.a,props:{aspect:{type:[Boolean,String,Number]},className:{type:String}},data:function(){return{isClass:!1}},computed:{myAspect:function(){var t=this.aspect;if(this.isClass=!1,!0===t||t+""=="1")t="nu_aspect",this.isClass=!0;else{t=((t||"")+"").replace("%","");var e=parseFloat(t,10);if(isNaN(e))this.isClass=!0;else switch(void 0===e?"undefined":o(e)){case"number":(t=Math.abs(t))>5?t+="%":t>0&&(t=100*t+"%")}}return t}}},a={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_aspect",class:[t.myAspect&&"nu_aspect-base",t.isClass&&t.myAspect,!t.myAspect&&t.className],style:t.myAspect&&!t.isClass&&{paddingTop:t.myAspect},on:{click:t._onClick,tap:t._onTap}},[t.myAspect?n("div",{staticClass:"nu_aspect-wrap",class:t.className},[n("div",{staticClass:"nu_aspect-cont"},[t._t("default")],2)]):[t._t("default")]],2)},staticRenderFns:[]};var s=n("VU/8")(r,a,!1,function(t){n("LySh")},null,null).exports,u=n("4qRk");e.default=Object(u.a)(s)},eETc:function(t,e,n){"use strict";var i,o={INIT:"init",UPDATE:"update"};!function(t){t.PUSH="pushListener",t.UPDATE="updateListener",t.REMOVE="removeListener",t.CLEAR="clearQueue"}(i||(i={}));var r=n("qd2b"),a=n("zagf");n.d(e,"b",function(){return s}),n.d(e,!1,function(){return o}),n.d(e,"a",function(){return i});var s=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return i.listenerQueue=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.addQueue=function(t){var e=Object(a.a)(t,[],t);return t&&(this.listenerQueue.push(e),this.$emit(i.PUSH,e)),{listener:t,isUpdata:!1}},e.prototype.updateQueue=function(t,e,n){var r=this.listenerQueue.find(function(e){return e&&e.content===t});if(r){var s=r.state;return Object(a.a)(r.update,[t,e],r),s!==o.INIT&&s!==o.UPDATE&&this.$emit(i.UPDATE,r),{listener:r,isUpdata:!0}}return this.addQueue(n)},e.prototype.clearQueue=function(){var t=this,e=!1,n=t.listenerQueue.filter(function(n,i){return n.isDel&&(e=!0,t.removeItem(i,n)),!n.isDel});e&&(t.listenerQueue=n,t.$emit(i.CLEAR,n))},e.prototype.removeItem=function(t,e){if(!e){var n=this.listenerQueue.splice(t,1);n&&n.length&&(e=n[0])}this.$emit(i.REMOVE,e),Object(a.a)(e&&e.destroyed,[],e)},e.prototype.getListener=function(t){var e=this.listenerQueue;if(t&&e&&e.length)for(var n=0;n<e.length;n++){var i=e[n];if(i&&i.content===t)return{listener:i,index:n}}},e}(r.a)},eWWI:function(t,e){},"eY/N":function(t,e,n){"use strict";e.a=function(t){if(!Object(i.a)(t,"Object"))return!1;var e=Object.getPrototypeOf(t);if(!e)return!0;var n=o.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o.toString.call(n)===o.toString.call(Object)};var i=n("E5mE"),o=Object.prototype.hasOwnProperty},ekq3:function(t,e,n){"use strict";var i=n("zagf");e.a=i.a},"fk+x":function(t,e,n){"use strict";e.a=function(t,e){return("undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e])||""}},hkQx:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n("qd2b"),r=n("6+6x"),a=n("PDNl"),s=n("/Ot8"),u=Object.assign({},a.a||{},{preLoad:1,device:s.a,videoAttr:{"x-webkit-airplay":!0,"x5-playsinline":"",playsinline:"","webkit-playsinline":"","x5-video-player-type":"","x5-video-player-fullscreen":!0}}),c=Object.assign({},u||{},{isShiftOut:!0,throttleWait:50,intersectionPattern:r.a}),l={INIT:"init",PLAY:"play",PAUSE:"pause",REFRESH:"refresh",DESTROYED:"destroyed",DISPLAY:"display",SHIFT_OUT:"shiftOut",IN_VIEW:"inView"};!function(t){t.STATUS="status"}(i||(i={}));var f=n("kVEp"),p=n("yhx/");var d=function(t){function e(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i));o.defaultOption=u,o.isDel=!1,o.state=l.INIT,o._$scroll=null,o.oldSrc=null;var r=o;return r.setDefaultOptions(i),r.content=n,r.videoEl=i&&i.videoEl,setTimeout(function(){r._init&&r._init(),r.setVideoAttr()},0),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.setVideoAttr=function(t){var e=this,n=e.getOptions(t||{}).videoAttr;setTimeout(function(){if(n)for(var t in n)if(n.hasOwnProperty(t)){var i=n[t];e.videoEl&&e.videoEl.setAttribute(t,i)}},50)},e.prototype.display=function(t,e){return e&&this._stateHandler(l.REFRESH),this._stateHandler(l.DISPLAY),this},e.prototype.shiftOut=function(){this._stateHandler(l.SHIFT_OUT)},e.prototype.viewDisplay=function(t,e){e&&this._stateHandler(l.REFRESH);var n=this.checkInView(t);return n?(this.display(),n):n},e.prototype.update=function(t,e){this.content=t||this.content,e&&e.videoEl&&this.videoEl!==e.videoEl&&(this.videoEl=e&&e.videoEl,this.setVideoAttr(e))},e.prototype.destroyed=function(){this._$scroll=null,this.oldSrc=null,this._stateHandler(l.DESTROYED),this.content=null,this._events={}},e.prototype._stateHandler=function(t,e){var n=this.defaultOption,o=Object.assign(e||{},{type:t,options:n,el:this.content,listener:this});this.$emit(i.STATUS,o)},e.prototype._init=function(){this._init=function(){},this._stateHandler(l.INIT)},e}(n("PEFE").a),v=n("zagf"),h=n("yY2C");var y=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return i.name="VideoPlay",i.defaultOption=c,i._videoLocked=!1,i._intersection=i._init(),i._displayList=[],i._upDisplay=null,i._isAutoplay=!0,i._playThrottle=Object(h.a)(function(t,e){var n=i;n._playListener&&n._playListener.videoEl===t&&t&&t.paused&&(n.refreshDisplay(),Object(v.a)(t.play,[],t),t&&!t.paused&&(n.$emit("play",{el:t}),Object(v.a)(e,[t])))},100,i),i.setDefaultOptions(n),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._autoPlay=function(t,e){},e.prototype._init=function(){var t=this,e=t.defaultOption,n=e&&e.device,i=void 0;return t.refreshDisplay=e.throttleWait&&Object(h.a)(function(){t.resetDisplayItem()},e.throttleWait,t)||t.resetDisplayItem,t._autoPlay=Object(h.a)(function(e,n){var i,o;e&&n&&n.isAutoplay&&t._isAutoplay&&(e.setAttribute("autoplay","autoplay"),i=e,(o=window.WeixinJSBridge)?o.invoke("getNetworkType",{},function(){var e=t.getItme(i)||{};!t._isAutoplay&&t._playListener&&t._playListener!==e.listener||t.play(i)},!1):document.addEventListener("WeixinJSBridgeReady",function(){t.play(i)},!1),t.play(e))},100,t),i=!e||!e.intersectionPattern||n&&"x5"===n.kernel?new p.a(e):new f.a(e),t._init=function(){return i},i},e.prototype.refreshDisplay=function(){},e.prototype.push=function(t,e){return this._queueHandler(t,e)},e.prototype.update=function(t,e){return this._queueHandler(t,e,!0)},e.prototype.remove=function(t){var e=this.getItme(t);e&&this._intersection.removeItem(e.index)},e.prototype.play=function(t){if(t){this._isAutoplay=!1;var e=this.getItme(t);e&&(this._playListener=e.listener),this.pause(t),this._playThrottle(t)}},e.prototype.pause=function(t){var e=this;e._intersection.listenerQueue.forEach(function(n){var i=n.videoEl;if(i){if(i===t)return!0;i.paused||(e.refreshDisplay(),e.$emit("pause",{el:i}),Object(v.a)(i.pause,[],i))}})},e.prototype.resetDisplayItem=function(){var t=this._playListener,e=this._displayList,n=!1,i=!1,o=this.defaultOption,r=o&&o.device;if(e&&e.length)for(var a=0;a<e.length;a++){if(e[a]===t){n=!0;break}}n?(i=null!==this._upDisplay,this._upDisplay=null):(i=this._upDisplay!==t,this._upDisplay=t||null),i&&(this._videoLocked=r&&r.android&&"x5"===r.kernel||!1,this.$emit("display",{el:this._upDisplay&&this._upDisplay.videoEl}))},e.prototype.getItme=function(t){var e=this._intersection.listenerQueue;if(t&&e&&e.length)for(var n=0;n<e.length;n++){var i=e[n];if(i&&i.videoEl===t)return{listener:i,index:n}}},e.prototype._queueHandler=function(t,e,n){var i=this,o=i.getOptions(e);o.resetAutoPlay&&(this._isAutoplay=!0);var r=function(){return i._initListener(t,o)},a=i._intersection;return n?a.updateQueue(t,o,r):a.addQueue(r)},e.prototype._initListener=function(t,e){var n=this,o=e&&e.videoEl;o&&(o.addEventListener("play",function(t){var e=n._playListener&&n._playListener.videoEl,i=t&&t.target;n.refreshDisplay(),i&&(n.$emit("play",{el:i}),i!==e&&n.play(i))}),o.addEventListener("pause",function(t){var e=n._playListener,i=e&&e.viewDisplay&&e.viewDisplay();if(!n._videoLocked||i){var o=n._playListener&&n._playListener.videoEl,r=t&&t.target;n.refreshDisplay(),r&&r===o&&(n._playListener=void 0,n.$emit("pause",{el:r}),n.pause())}else n._videoLocked=!1}));var r=new d(t,e);return r.$on(i.STATUS,function(t){n._setDisplayList(t)}),r},e.prototype._setDisplayList=function(t){var e=t&&t.type,n=t&&t.listener,o=this._displayList,r=t&&t.options;switch(e){case l.REFRESH:this._displayList=[];break;case l.DISPLAY:var a=!0;this._autoPlay(n&&n.videoEl,r);for(var s=0;s<o.length;s++){if(n===o[s]){a=!1;break}}a&&(this.$emit(l.IN_VIEW,Object.assign({},t,{type:l.IN_VIEW,el:n&&n.videoEl})),o.push(n));break;case l.SHIFT_OUT:for(var u=0;u<o.length;u++){o[u]===n&&(this.$emit(l.SHIFT_OUT,Object.assign({},t,{type:l.SHIFT_OUT,el:n&&n.videoEl})),o.splice(u,1))}}this.refreshDisplay(),this._playListener&&t&&t.listener===this._playListener&&this.$emit(i.STATUS,t)},e}(o.a),_=function(t){return y.instance(t)},b=n("ekq3"),m=n("Hxsb"),O=n("a6ow"),g=n("d0AA"),w=n("PQHO"),E=n("Wxd7"),j={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"nus_playbtn",on:{click:this.click}},[e("div",{staticClass:"nu_playicon"})])},staticRenderFns:[]};var A=n("VU/8")({name:"play-btn",methods:{click:function(t){t._contentType="playBtn",this.$emit("click",t)}}},j,!1,function(t){n("eWWI")},null,null).exports,L=_(),P={extends:O.a,name:"NuVideo",components:{NuAspect:g.default,NuImgb:w.default,NuIcon:E.default,PlayBtn:A},props:{videoAttr:{type:Object},isControls:{type:Boolean,default:!0},isAutoplay:{type:Boolean,default:!1},isLoop:{type:Boolean,default:!1},aspect:{default:"nu_video-cont"},imgUrl:{type:String},videoUrl:{type:String},isFloat:{type:Boolean,default:!1},isLazy:{default:!0},lazyOptions:{}},data:function(){return{isPlay:!1,isDisplay:!1,isActive:!1,isClass:!1}},computed:{myLazyOptions:function(){return Object.assign({cutter:"contain"},this.lazyOptions||{})},myAspect:function(){var t=this.aspect;if(!0===t)t="nu_video-aspect",this.isClass=!0;else{t=((t||"")+"").replace("%","");var e=parseFloat(t,10);isNaN(e)?this.isClass=!0:"number"==typeof e&&((t=Math.abs(t))>5?t+="%":t>0&&(t=100*t+"%"))}return t}},mixins:[Object(m.a)("isMuted",{type:Boolean,default:!1})],created:function(){var t=this;this._videoPlay=L,L.$on("play",function(e){var n=t.$refs.hook_video;e&&e.el===n&&(t.isPlay=!0,t.isActive=!0)}),L.$on("pause",function(e){var n=t.$refs.hook_video;e&&e.el===n&&(t.isPlay=!1)}),L.$on("display",function(e){var n=t.$refs.hook_video;e&&e.el===n?(t.$emit("display",e),t.isDisplay=!0):t.isDisplay=!1})},methods:{_videoInit:function(t){this.$emit("init",t)},_onImgLoading:function(t){this.$emit("imgLoading",t)},_onVolumeChange:function(t){this.$emit("volumechange",t);var e=t&&t.target;e&&(this.myIsMuted=e.muted)},_onPlay:function(t){this.$emit("play",t)},_onPause:function(t){this.$emit("pause",t)},_onClose:function(){this._pause()},_play:function(){var t=this.$refs.hook_video;this._videoPlay.play(t)},_pause:function(){this._videoPlay.pause()}},directives:{numbleVideo:{inserted:function(t,e){var n=Object.assign({},e&&e.value||{},{videoEl:t});n&&!n.videoAttr&&delete n.videoAttr,Object(b.a)(n.init,[{type:"inserted",video:t}]),L&&L.push(x(t),n)},update:function(t,e){var n=Object.assign({},e&&e.value||{},{videoEl:t});n&&!n.videoAttr&&delete n.videoAttr,Object(b.a)(n.init,[{type:"update",video:t}]),L&&L.update(x(t),n)},unbind:function(t,e){var n=Object.assign(e&&e.value||{});Object(b.a)(n.init,[{type:"unbind",video:null}]),L.remove(x(t),{videoEl:t})}}}};function x(t){for(var e=5,n=t;e>0&&n.parentNode;)e--,n=n.parentNode;if(e<=0)return n}var S={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"hook_wrap",staticClass:"nus_video",class:[t.isClass&&t.myAspect,t.isPlay&&"nu_video-play",t.isFloat&&t.isDisplay&&"nu_video-hide",(t.isActive||t.videoUrl&&!t.imgUrl)&&"nu_video-active"],style:t.myAspect&&!t.isClass&&{paddingTop:t.myAspect}},[n("div",{staticClass:"nu_contain"},[t._t("hook_img",[n("nu-imgb",{staticClass:"nu_video-pic",attrs:{aspect:t.myAspect,isLazy:t.isLazy,lazyOptions:t.myLazyOptions,imgUrl:t.imgUrl},on:{imgLoading:t._onImgLoading,click:t._play}},[t._t("default",[n("play-btn")])],2)]),t._v(" "),n("div",{staticClass:"nu_video-wrap"},[t.isFloat?n("nu-icon",{staticClass:"nu_video-close",attrs:{icon:""},on:{click:function(e){e.stopPropagation(),t._onClose(e)}}}):t._e(),t._v(" "),n("nu-aspect",{attrs:{aspect:t.myAspect}},[n("video",{directives:[{name:"numble-video",rawName:"v-numble-video",value:{isAutoplay:t.isAutoplay,videoAttr:t.videoAttr,init:t._videoInit},expression:"{isAutoplay: isAutoplay, videoAttr: videoAttr, init: _videoInit}"},{name:"lazy",rawName:"v-lazy",value:{src:t.videoUrl,onlyCut:!0},expression:"{src: videoUrl, onlyCut: true}"}],ref:"hook_video",staticClass:"nu_video",staticStyle:{"object-fit":"contain"},attrs:{controls:t.isControls,loop:t.isLoop,src:t.videoUrl},domProps:{muted:t.myIsMuted},on:{play:t._onPlay,pause:t._onPause,volumechange:t._onVolumeChange}}),t._v(" "),t._t("hook_videoCont")],2)],1)],2)])},staticRenderFns:[]};var C=n("VU/8")(P,S,!1,function(t){n("pdnt")},null,null).exports,k=n("4qRk");e.default=Object(k.a)(C)},"ho/f":function(t,e,n){"use strict";var i={extends:n("Lv3q").a},o=n("VU/8")(i,null,!1,null,null,null);e.a=o.exports},kVEp:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n("5fCB"),o=n("PDNl"),r=n("eETc"),a=n("zagf");var s=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));r.defaultOption=o.a,r._observer=null;var a=Object(i.a)({},o.a,n),s=function(t){return Math.max(0,Math.ceil(t*(a.preLoad-1||0)))},u=s(a.viewWidth),c=s(a.viewHeight);a.observerOptions=Object(i.a)({rootMargin:c+"px "+u+"px "+c+"px "+u+"px",threshold:0},a.observerOptions);var l=r;return l.setDefaultOptions(a),l._init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._init=function(){var t=this._initIntersectionObserver();this.$on(r.a.PUSH,function(e){t&&e.content&&t.observe(e.content),setTimeout(function(){Object(a.a)(e.viewDisplay,[null,!1],e)},50)}),this.$on(r.a.UPDATE,function(t){Object(a.a)(t.viewDisplay,[],t)}),this.$on(o.b.UNOBSERVE,function(e){e&&t&&t.unobserve(e)}),this.$on(r.a.REMOVE,function(e){e.content&&t&&t.unobserve(e.content)})},e.prototype._initIntersectionObserver=function(){var t=this,e=t.defaultOption,n=null;try{n=new IntersectionObserver(function(e){t._loadObserver(e)},e.observerOptions)}catch(t){n=null}return t._initIntersectionObserver=function(){return n},n},e.prototype._loadObserver=function(t){var e=this,n=e.defaultOption;t&&(t.forEach(function(t){(t.isIntersecting||t.intersectionRatio>0||n&&n.isShiftOut)&&e.listenerQueue.forEach(function(n){if(n.content===t.target){if(n.isDel)return e.$emit(o.b.UNOBSERVE,n.content);t.isIntersecting||t.intersectionRatio>0?Object(a.a)(n.display,[null],n):Object(a.a)(n.shiftOut,[null],n)}})}),e.clearQueue())},e}(r.b)},lXuC:function(t,e,n){"use strict";e.a=function(t,e){var n="("+(e||"_|-")+")";return t=(t=(t=(t+"").replace(new RegExp(n+"?(?:(?:[A-Z]{2,}[A-Z]"+n+"*$)|(?:[A-Z]{2,}(?=[A-Z])))","g"),function(t){return(((e||"")+"").split("|")[0]||"-")+(t=t.replace(new RegExp(n),"")).toLowerCase()})).replace(new RegExp("(?:^"+n+"?([a-z]))|(?:"+n+"$)","gi"),function(t,e,n){return(n||"").toLowerCase()})).replace(new RegExp(n+"([a-z])","gi"),function(t,e,n){return(n||"").toUpperCase()})}},p84V:function(t,e,n){"use strict";e.a=function(t,e){t&&!t.install&&(t.install=function(n,o){var r=n.directive(e);if(!r){var a=Object(i.a)(t,[o]);a&&n.directive(e,a.directive||a)}});return t};var i=n("ekq3")},pdnt:function(t,e){},qd2b:function(t,e,n){"use strict";var i=n("5fCB"),o=n("Z05q"),r=n("zagf");var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}return t.prototype.$dispatchEvent=function(t,e,n){return Object(o.a)(t,e,n)},t.prototype.$on=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push([e,n])},t.prototype.$once=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this,o=!1,r=function r(){i.$off(t,r),o||(o=!0,e.apply(n,arguments))};r.fn=e,i.$on(t,r)},t.prototype.$off=function(t,e){var n=this._events&&this._events[t];if(n)for(var i=n.length;i--;)(n[i][0]===e||n[i][0]&&n[i][0].fn===e)&&(n[i][0]=void 0)},t.prototype.$emit=function(t){var e=this._events&&this._events[t];if(e){for(var n=e.length,i=[].concat(e),o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];for(var u=0;u<n;u++){var c=i[u],l=c[0],f=c[1];Object(r.a)(l,a,f)}}},t}(),s=n("FNmr");n.d(e,"a",function(){return u});var u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return i.name="",i.defaultOption={},i.setDefaultOptions(!0,n),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.singleton=function(t){var e=this._singleton||this.instance(t);return this._singleton=e,e},e.instance=function(t){return new this(t)},e.install=function(t,e){var n=this.instance(e);return t&&t.use instanceof Function&&t.use(n,e),n},e.prototype.getParent=function(){return Object(r.a)(this._getParent||this._vue&&this._vue.prototype||null,[],this)},e.prototype.install=function(t,e){this._vue=this._vue||t;var n=Object(s.a)(t,this);return this.setDefaultOptions(e&&n&&e[n]||e),this},e.prototype.setDefaultOptions=function(t){var e=void 0,n=!0;"boolean"==typeof t?(n=t,e=arguments[1]||{}):e=t,e&&(this.defaultOption=Object(i.a)(n,this.defaultOption||{},e))},e.prototype.getOptions=function(){for(var t=[{},this.defaultOption||{}],e=!0,n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];return"boolean"==typeof o[0]&&(e=o[0],o.splice(0,1)),o&&o.length>0&&(t=t.concat(o)),i.a.apply(void 0,[e].concat(t))},e.prototype.preload=function(){var t=this;return new Promise(function(e,n){e(t)})},e}(a)},rRBi:function(t,e,n){"use strict";var i=n("5fCB");e.a=i.a},shrL:function(t,e,n){"use strict";e.a=function(t,e){if(t=Object(i.a)(((t||"")+"").replace(/\s+/g,"")),!e&&s[t])return s[t];if(!e&&t in r)return t;for(var n=Object(o.a)(t),u=0;u<a.length;u++){var c=a[u],l=c+n;if(l in r)return a=[c],s[t]=l,e?c:l}return e?"":t};var i=n("lXuC"),o=n("0Zk/"),r=document.createElement("div").style,a=["Moz","webkit","O","ms"],s={}},yY2C:function(t,e,n){"use strict";e.a=function(t,e,n,i){var o=null,r=0;return function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];if(o){if(i)return;clearTimeout(o),o=null}var c=Date.now()-r;function l(){r=Date.now(),o=!1,t.apply(n,s)}i&&c>=e?l():o=setTimeout(l,e)}}},"yhx/":function(t,e,n){"use strict";n.d(e,"a",function(){return c});var i=n("MEnT"),o=n("yY2C"),r=n("ImqO"),a=n("PDNl"),s=n("eETc"),u=n("zagf");var c=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));i.defaultOption=a.a,i.scrollList=[];var o=i;return o.setDefaultOptions(n),o._setViewSize(),o._init(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._init=function(){var t=this,e=t.defaultOption;t._listenerHandler=e.throttleWait&&Object(o.a)(t._loadHandler,e.throttleWait,t)||t._loadHandler,t._addScrollList(document.body,null),window.addEventListener("resize",function(){var e=t._setViewSize();e&&t._listenerHandler(e)}),window.addEventListener("orientationchange",function(){Object(o.a)(function(){var e=window.orientation;if(e>85&&e<95||e>175&&e<185){var n=t._setViewSize();n&&t._listenerHandler(n)}},200,window)}),t.$on(s.a.PUSH,function(e){e&&e.content&&(t._addScrollList(e.content,e),t._listenerHandler())}),t.$on(s.a.UPDATE,function(e){t._listenerHandler()}),t.$on(s.a.REMOVE,function(e){t._removeScrollList(e)})},e.prototype._setViewSize=function(){var t=this.defaultOption,e=window.innerWidth,n=window.innerHeight,i=void 0;return t.viewHeight!==n&&t.viewHeight<n&&n>10&&((i=i||{}).viewHeight=n),t.viewWidth!==e&&t.viewWidth<e&&e>10&&((i=i||{}).viewWidth=e),this.setDefaultOptions(!1,i),i},e.prototype._listenerHandler=function(){},e.prototype._eventListenerHandler=function(){},e.prototype._loadHandler=function(t){var e=!0,n=this.defaultOption;this.listenerQueue.forEach(function(i){var o=Object(u.a)(i.viewDisplay,[t,e],i),r=i;r&&"boolean"==typeof o&&n&&n.isShiftOut&&(!o&&r._isShowFlag_&&Object(u.a)(i.shiftOut,[null],i),r._isShowFlag_=o),e=!1}),this.clearQueue()},e.prototype._initListener=function(t,e){var n=this,i=n.defaultOption;n._eventListenerHandler=function(){n._listenerHandler()},Object(r.a)(t,i.listenEvents,n._eventListenerHandler,e?"add":"remove")},e.prototype._addScrollList=function(t,e){var n=Object(i.a)(t);if(n){var o=this.scrollList.find(function(t){return t.el===n});o?o.childrenCount+=1:(o={el:n,childrenCount:1},this.scrollList.push(o),this._initListener(n,!0)),e&&(e._$scroll=o)}},e.prototype._removeScrollList=function(t){var e=t._$scroll;if(e&&(e.childrenCount-=1,e.childrenCount<=0)){var n=e.el;this._initListener(n,!1),this.scrollList=this.scrollList.filter(function(t){return t.el!==n})}},e}(s.b)},zaQa:function(t,e){},zagf:function(t,e,n){"use strict";e.a=function(t,e,n){var i=t;t instanceof Function&&(i=t.apply(n,e));return i}}});