text: var Zepto=function(){function a(e){return null==e?""+e:B[F.call(e)]||"object"}function i(e){return"function"==a(e)}function r(e){return null!=e&&e==e.window}function c(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function s(e){return"object"==a(e)}function u(e){return s(e)&&!r(e)&&Object.getPrototypeOf(e)==Object.prototype}function l(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function n(e){return e in t?t[e]:t[e]=RegExp("(^|\\s)"+e+"(\\s|$)")}function o(e){return"children"in e?T.call(e.children):y.map(e.childNodes,function(e){return 1==e.nodeType?e:void 0})}function h(e,t){return null==t?y(e):y(e).filter(t)}function f(e,t,n,o){return i(t)?t.call(e,n,o):t}function d(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function p(e,t){var n=e.className,o=n&&n.baseVal!==m;return t===m?o?n.baseVal:n:void(o?n.baseVal=t:e.className=t)}function g(e){var t;try{return e?"true"==e||"false"!=e&&("null"==e?null:/^0/.test(e)||isNaN(t=Number(e))?/^[\[\{]/.test(e)?y.parseJSON(e):e:t):e}catch(t){return e}}var m,v,y,w,_,E,b=[],T=b.slice,I=b.filter,S=window.document,C={},t={},A={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},M=/^\s*<(\w+|!)[^>]*>/,O=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,x=/^(?:body|html)$/i,D=/([A-Z])/g,P="val css html text data width height offset".split(" "),e=S.createElement("table"),L=S.createElement("tr"),U={tr:S.createElement("tbody"),tbody:e,thead:e,tfoot:e,td:L,th:L,"*":S.createElement("div")},k=/complete|loaded|interactive/,R=/^[\w-]*$/,B={},F=B.toString,j={},$=S.createElement("div"),V={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},J=Array.isArray||function(e){return e instanceof Array};return j.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;if(o=e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector)return o.call(e,t);var n,o,i=!(o=e.parentNode);return i&&(o=$).appendChild(e),n=~j.qsa(o,t).indexOf(e),i&&$.removeChild(e),n},_=function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},E=function(n){return I.call(n,function(e,t){return n.indexOf(e)==t})},j.fragment=function(e,t,n){var o,i,r;return O.test(e)&&(o=y(S.createElement(RegExp.$1))),o||(e.replace&&(e=e.replace(N,"<$1></$2>")),t===m&&(t=M.test(e)&&RegExp.$1),t in U||(t="*"),(r=U[t]).innerHTML=""+e,o=y.each(T.call(r.childNodes),function(){r.removeChild(this)})),u(n)&&(i=y(o),y.each(n,function(e,t){-1<P.indexOf(e)?i[e](t):i.attr(e,t)})),o},j.Z=function(e,t){return(e=e||[]).__proto__=y.fn,e.selector=t||"",e},j.isZ=function(e){return e instanceof j.Z},j.init=function(e,t){var n,o;if(!e)return j.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&M.test(e))n=j.fragment(e,RegExp.$1,t),e=null;else{if(t!==m)return y(t).find(e);n=j.qsa(S,e)}else{if(i(e))return y(S).ready(e);if(j.isZ(e))return e;if(J(e))o=e,n=I.call(o,function(e){return null!=e});else if(s(e))n=[e],e=null;else if(M.test(e))n=j.fragment(e.trim(),RegExp.$1,t),e=null;else{if(t!==m)return y(t).find(e);n=j.qsa(S,e)}}return j.Z(n,e)},(y=function(e,t){return j.init(e,t)}).extend=function(t){var n,e=T.call(arguments,1);return"boolean"==typeof t&&(n=t,t=e.shift()),e.forEach(function(e){!function e(t,n,o){for(v in n)o&&(u(n[v])||J(n[v]))?(u(n[v])&&!u(t[v])&&(t[v]={}),J(n[v])&&!J(t[v])&&(t[v]=[]),e(t[v],n[v],o)):n[v]!==m&&(t[v]=n[v])}(t,e,n)}),t},j.qsa=function(e,t){var n,o="#"==t[0],i=!o&&"."==t[0],r=o||i?t.slice(1):t,s=R.test(r);return c(e)&&s&&o?(n=e.getElementById(r))?[n]:[]:1!==e.nodeType&&9!==e.nodeType?[]:T.call(s&&!o?i?e.getElementsByClassName(r):e.getElementsByTagName(t):e.querySelectorAll(t))},y.contains=function(e,t){return e!==t&&e.contains(t)},y.type=a,y.isFunction=i,y.isWindow=r,y.isArray=J,y.isPlainObject=u,y.isEmptyObject=function(e){for(var t in e)return!1;return!0},y.inArray=function(e,t,n){return b.indexOf.call(t,e,n)},y.camelCase=_,y.trim=function(e){return null==e?"":String.prototype.trim.call(e)},y.uuid=0,y.support={},y.expr={},y.map=function(e,t){var n,o,i=[];if("number"==typeof e.length)for(o=0;o<e.length;o++)null!=(n=t(e[o],o))&&i.push(n);else for(o in e)null!=(n=t(e[o],o))&&i.push(n);return 0<i.length?y.fn.concat.apply([],i):i},y.each=function(e,t){var n;if("number"==typeof e.length)for(n=0;n<e.length&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},y.grep=function(e,t){return I.call(e,t)},window.JSON&&(y.parseJSON=JSON.parse),y.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){B["[object "+t+"]"]=t.toLowerCase()}),y.fn={forEach:b.forEach,reduce:b.reduce,push:b.push,sort:b.sort,indexOf:b.indexOf,concat:b.concat,map:function(n){return y(y.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return y(T.apply(this,arguments))},ready:function(e){return k.test(S.readyState)&&S.body?e(y):S.addEventListener("DOMContentLoaded",function(){e(y)},!1),this},get:function(e){return e===m?T.call(this):this[0<=e?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(n){return b.every.call(this,function(e,t){return!1!==n.call(e,t,e)}),this},filter:function(t){return i(t)?this.not(this.not(t)):y(I.call(this,function(e){return j.matches(e,t)}))},add:function(e,t){return y(E(this.concat(y(e,t))))},is:function(e){return 0<this.length&&j.matches(this[0],e)},not:function(t){var n=[];if(i(t)&&t.call!==m)this.each(function(e){t.call(this,e)||n.push(this)});else{var o="string"==typeof t?this.filter(t):"number"==typeof t.length&&i(t.item)?T.call(t):y(t);this.forEach(function(e){o.indexOf(e)<0&&n.push(e)})}return y(n)},has:function(e){return this.filter(function(){return s(e)?y.contains(this,e):y(this).find(e).size()})},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!s(e)?e:y(e)},last:function(){var e=this[this.length-1];return e&&!s(e)?e:y(e)},find:function(e){var n=this;return"object"==typeof e?y(e).filter(function(){var t=this;return b.some.call(n,function(e){return y.contains(e,t)})}):1==this.length?y(j.qsa(this[0],e)):this.map(function(){return j.qsa(this,e)})},closest:function(e,t){var n=this[0],o=!1;for("object"==typeof e&&(o=y(e));n&&!(o?0<=o.indexOf(n):j.matches(n,e));)n=n!==t&&!c(n)&&n.parentNode;return y(n)},parents:function(e){for(var t=[],n=this;0<n.length;)n=y.map(n,function(e){return(e=e.parentNode)&&!c(e)&&t.indexOf(e)<0?(t.push(e),e):void 0});return h(t,e)},parent:function(e){return h(E(this.pluck("parentNode")),e)},children:function(e){return h(this.map(function(){return o(this)}),e)},contents:function(){return this.map(function(){return T.call(this.childNodes)})},siblings:function(e){return h(this.map(function(e,t){return I.call(o(t.parentNode),function(e){return e!==t})}),e)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return y.map(this,function(e){return e[t]})},show:function(){return this.each(function(){if("none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")){var e,t,n,o=this.style;e=this.nodeName,C[e]||(t=S.createElement(e),S.body.appendChild(t),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),C[e]=n),e=C[e],o.display=e}})},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=y(this);(t===m?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(e){return y(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return y(this.pluck("nextElementSibling")).filter(e||"*")},html:function(n){return 0===arguments.length?0<this.length?this[0].innerHTML:null:this.each(function(e){var t=this.innerHTML;y(this).empty().append(f(this,n,e,t))})},text:function(e){return 0===arguments.length?0<this.length?this[0].textContent:null:this.each(function(){this.textContent=e===m?"":""+e})},attr:function(t,n){var e;return"string"==typeof t&&n===m?0==this.length||1!==this[0].nodeType?m:"value"==t&&"INPUT"==this[0].nodeName?this.val():!(e=this[0].getAttribute(t))&&t in this[0]?this[0][t]:e:this.each(function(e){if(1===this.nodeType)if(s(t))for(v in t)d(this,v,t[v]);else d(this,t,f(this,n,e,this.getAttribute(t)))})},removeAttr:function(e){return this.each(function(){1===this.nodeType&&d(this,e)})},prop:function(t,n){return t=V[t]||t,n===m?this[0]&&this[0][t]:this.each(function(e){this[t]=f(this,n,e,this[t])})},data:function(e,t){var n=this.attr("data-"+e.replace(D,"-$1").toLowerCase(),t);return null!==n?g(n):m},val:function(t){return 0===arguments.length?this[0]&&(this[0].multiple?y(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(e){this.value=f(this,t,e,this.value)})},offset:function(o){if(o)return this.each(function(e){var t=y(this),n=(e=f(this,o,e,t.offset()),t.offsetParent().offset());e={top:e.top-n.top,left:e.left-n.left},"static"==t.css("position")&&(e.position="relative"),t.css(e)});if(0==this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,t){if(arguments.length<2){var n=this[0],o=getComputedStyle(n,"");if(!n)return;if("string"==typeof e)return n.style[_(e)]||o.getPropertyValue(e);if(J(e)){var i={};return y.each(J(e)?e:[e],function(e,t){i[t]=n.style[_(t)]||o.getPropertyValue(t)}),i}}var r="";if("string"==a(e))t||0===t?r=l(e)+":"+("number"!=typeof t||A[l(e)]?t:t+"px"):this.each(function(){this.style.removeProperty(l(e))});else for(v in e)e[v]||0===e[v]?r+=l(v)+":"+("number"!=typeof e[v]||A[l(v)]?e[v]:e[v]+"px")+";":this.each(function(){this.style.removeProperty(l(v))});return this.each(function(){this.style.cssText+=";"+r})},index:function(e){return e?this.indexOf(y(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&b.some.call(this,function(e){return this.test(p(e))},n(e))},addClass:function(n){return n?this.each(function(e){w=[];var t=p(this);f(this,n,e,t).split(/\s+/g).forEach(function(e){y(this).hasClass(e)||w.push(e)},this),w.length&&p(this,t+(t?" ":"")+w.join(" "))}):this},removeClass:function(t){return this.each(function(e){return t===m?p(this,""):(w=p(this),f(this,t,e,w).split(/\s+/g).forEach(function(e){w=w.replace(n(e)," ")}),void p(this,w.trim()))})},toggleClass:function(n,o){return n?this.each(function(e){var t=y(this);f(this,n,e,p(this)).split(/\s+/g).forEach(function(e){(o===m?!t.hasClass(e):o)?t.addClass(e):t.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return e===m?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return e===m?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),n=this.offset(),o=x.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(y(e).css("margin-top"))||0,n.left-=parseFloat(y(e).css("margin-left"))||0,o.top+=parseFloat(y(t[0]).css("border-top-width"))||0,o.left+=parseFloat(y(t[0]).css("border-left-width"))||0,{top:n.top-o.top,left:n.left-o.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||S.body;e&&!x.test(e.nodeName)&&"static"==y(e).css("position");)e=e.offsetParent;return e})}},y.fn.detach=y.fn.remove,["width","height"].forEach(function(o){var i=o.replace(/./,function(e){return e[0].toUpperCase()});y.fn[o]=function(t){var e,n=this[0];return t===m?r(n)?n["inner"+i]:c(n)?n.documentElement["scroll"+i]:(e=this.offset())&&e[o]:this.each(function(e){(n=y(this)).css(o,f(this,t,e,n[o]()))})}}),["after","prepend","before","append"].forEach(function(t,r){var s=r%2;y.fn[t]=function(){var t,n,o=y.map(arguments,function(e){return"object"==(t=a(e))||"array"==t||null==e?e:j.fragment(e)}),i=1<this.length;return o.length<1?this:this.each(function(e,t){n=s?t:t.parentNode,t=0==r?t.nextSibling:1==r?t.firstChild:2==r?t:null,o.forEach(function(e){if(i)e=e.cloneNode(!0);else if(!n)return y(e).remove();!function e(t,n){for(var o in n(t),t.childNodes)e(t.childNodes[o],n)}(n.insertBefore(e,t),function(e){null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src||window.eval.call(window,e.innerHTML)})})})},y.fn[s?t+"To":"insert"+(r?"Before":"After")]=function(e){return y(e)[t](this),this}}),j.Z.prototype=y.fn,j.uniq=E,j.deserializeValue=g,y.zepto=j,y}(),start_ev,end_ev,move_ev;function getType(e){var t;return("object"==(t=typeof e)?null==e?"null":Object.prototype.toString.call(e).slice(8,-1):t).toLowerCase()}function Swipe(n,s){var t=function(){},r=function(e){setTimeout(e||t,0)},a={addEventListener:!!window.addEventListener,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,transitions:function(e){var t=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var n in t)if(void 0!==e.style[t[n]])return!0;return!1}(document.createElement("swipe"))};if(n){var c,u,l,o,h=n.children[0];s=s||{};var f=parseInt(s.startSlide,10)||0,d=s.speed||300;s.continuous=void 0===s.continuous||s.continuous;var e,p,g=s.auto||0,m={},v={},y={handleEvent:function(e){switch(e.type){case"touchstart":this.start(e);break;case"touchmove":this.move(e);break;case"touchend":r(this.end(e));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":r(this.transitionEnd(e));break;case"resize":r(i)}s.stopPropagation&&e.stopPropagation()},start:function(e){var t=e.touches[0];m={x:t.pageX,y:t.pageY,time:+new Date},p=void 0,v={},h.addEventListener("touchmove",this,!1),h.addEventListener("touchend",this,!1)},move:function(e){if(!(1<e.touches.length||e.scale&&1!==e.scale)){s.disableScroll&&e.preventDefault();var t=e.touches[0];v={x:t.pageX-m.x,y:t.pageY-m.y},void 0===p&&(p=!!(p||Math.abs(v.x)<Math.abs(v.y))),p||(e.preventDefault(),S(),s.continuous?(T(_(f-1),v.x+u[_(f-1)],0),T(f,v.x+u[f],0),T(_(f+1),v.x+u[_(f+1)],0)):(v.x=v.x/(!f&&0<v.x||f==c.length-1&&v.x<0?Math.abs(v.x)/l+1:1),T(f-1,v.x+u[f-1],0),T(f,v.x+u[f],0),T(f+1,v.x+u[f+1],0)))}},end:function(e){var t=+new Date-m.time,n=Number(t)<250&&20<Math.abs(v.x)||Math.abs(v.x)>l/2,o=!f&&0<v.x||f==c.length-1&&v.x<0;s.continuous&&(o=!1);var i=v.x<0;p||(n&&!o?(i?(s.continuous?(b(_(f-1),-l,0),b(_(f+2),l,0)):b(f-1,-l,0),b(f,u[f]-l,d),b(_(f+1),u[_(f+1)]-l,d),f=_(f+1)):(s.continuous?(b(_(f+1),l,0),b(_(f-2),-l,0)):b(f+1,l,0),b(f,u[f]+l,d),b(_(f-1),u[_(f-1)]+l,d),f=_(f-1)),s.callback&&s.callback(f,c[f])):s.continuous?(b(_(f-1),-l,d),b(f,0,d),b(_(f+1),l,d)):(b(f-1,-l,d),b(f,0,d),b(f+1,l,d))),h.removeEventListener("touchmove",y,!1),h.removeEventListener("touchend",y,!1)},transitionEnd:function(e){parseInt(e.target.getAttribute("data-index"),10)==f&&(g&&I(),s.transitionEnd&&s.transitionEnd.call(e,f,c[f]))}};return i(),g&&I(),a.addEventListener?(a.touch&&h.addEventListener("touchstart",y,!1),a.transitions&&(h.addEventListener("webkitTransitionEnd",y,!1),h.addEventListener("msTransitionEnd",y,!1),h.addEventListener("oTransitionEnd",y,!1),h.addEventListener("otransitionend",y,!1),h.addEventListener("transitionend",y,!1)),window.addEventListener("resize",y,!1)):window.onresize=function(){i()},{setup:function(){i()},slide:function(e,t){S(),E(e,t)},prev:function(){S(),s.continuous?E(f-1):f&&E(f-1)},next:function(){S(),w()},stop:function(){S()},getPos:function(){return f},getNumSlides:function(){return o},kill:function(){S(),h.style.width="",h.style.left="";for(var e=c.length;e--;){var t=c[e];t.style.width="",t.style.left="",a.transitions&&T(e,0,0)}a.addEventListener?(h.removeEventListener("touchstart",y,!1),h.removeEventListener("webkitTransitionEnd",y,!1),h.removeEventListener("msTransitionEnd",y,!1),h.removeEventListener("oTransitionEnd",y,!1),h.removeEventListener("otransitionend",y,!1),h.removeEventListener("transitionend",y,!1),window.removeEventListener("resize",y,!1)):window.onresize=null}}}function i(){c=h.children,o=c.length,c.length<2&&(s.continuous=!1),a.transitions&&s.continuous&&c.length<3&&(h.appendChild(c[0].cloneNode(!0)),h.appendChild(h.children[1].cloneNode(!0)),c=h.children),u=new Array(c.length),l=n.getBoundingClientRect().width||n.offsetWidth,h.style.width=c.length*l+"px";for(var e=c.length;e--;){var t=c[e];t.style.width=l+"px",t.setAttribute("data-index",e),a.transitions&&(t.style.left=e*-l+"px",b(e,e<f?-l:f<e?l:0,0))}s.continuous&&a.transitions&&(b(_(f-1),-l,0),b(_(f+1),l,0)),a.transitions||(h.style.left=f*-l+"px"),n.style.visibility="visible"}function w(){s.continuous?E(f+1):f<c.length-1&&E(f+1)}function _(e){return(c.length+e%c.length)%c.length}function E(e,t){if(f!=e){if(a.transitions){var n=Math.abs(f-e)/(f-e);if(s.continuous){var o=n;(n=-u[_(e)]/l)!==o&&(e=-n*c.length+e)}for(var i=Math.abs(f-e)-1;i--;)b(_((f<e?e:f)-i-1),l*n,0);e=_(e),b(f,l*n,t||d),b(e,0,t||d),s.continuous&&b(_(e-n),-l*n,0)}else e=_(e),function(t,n,o){if(o)var i=+new Date,r=setInterval(function(){var e=+new Date-i;if(o<e)return h.style.left=n+"px",g&&I(),s.transitionEnd&&s.transitionEnd.call(event,f,c[f]),void clearInterval(r);h.style.left=(n-t)*(Math.floor(e/o*100)/100)+t+"px"},4);else h.style.left=n+"px"}(f*-l,e*-l,t||d);f=e,r(s.callback&&s.callback(f,c[f]))}}function b(e,t,n){T(e,t,n),u[e]=t}function T(e,t,n){var o=c[e],i=o&&o.style;i&&(i.webkitTransitionDuration=i.MozTransitionDuration=i.msTransitionDuration=i.OTransitionDuration=i.transitionDuration=n+"ms",i.webkitTransform="translate("+t+"px,0)translateZ(0)",i.msTransform=i.MozTransform=i.OTransform="translateX("+t+"px)")}function I(){e=setTimeout(w,g)}function S(){g=0,clearTimeout(e)}}window.Zepto=Zepto,Window.prototype.setInterval=function(code,delay,arguments){function _setTimeout(){"function"==typeof code?code():"string"==typeof code&&eval(code),setTimeout(_setTimeout,delay,arguments)}_setTimeout()},void 0===window.$&&(window.$=Zepto),function(l){function h(e){return e._zid||(e._zid=t++)}function s(e,t,n,o){if((t=f(t)).ns)var i=RegExp("(?:^| )"+t.ns.replace(" "," .* ?")+"(?: |$)");return(_[h(e)]||[]).filter(function(e){return!(!e||t.e&&e.e!=t.e||t.ns&&!i.test(e.ns)||n&&h(e.fn)!==h(n)||o&&e.sel!=o)})}function f(e){return{e:(e=(""+e).split("."))[0],ns:e.slice(1).sort().join(" ")}}function u(i,e,t,r,s,a,c){var n=h(i),u=_[n]||(_[n]=[]);e.split(/\s/).forEach(function(e){if("ready"==e)return l(document).ready(t);var n=f(e);n.fn=t,n.sel=s,n.e in T&&(t=function(e){var t=e.relatedTarget;return!t||t!==this&&!l.contains(this,t)?n.fn.apply(this,arguments):void 0});var o=(n.del=a)||t;n.proxy=function(e){if(!(e=p(e)).isImmediatePropagationStopped()){e.data=r;var t=o.apply(i,e._args==m?[e]:[e].concat(e._args));return!1===t&&(e.preventDefault(),e.stopPropagation()),t}},n.i=u.length,u.push(n),"addEventListener"in i&&i.addEventListener(T[n.e]||E&&b[n.e]||n.e,n.proxy,n.del&&!E&&n.e in b||!!c)})}function d(t,e,n,o,i){var r=h(t);(e||"").split(/\s/).forEach(function(e){s(t,e,n,o).forEach(function(e){delete _[r][e.i],"removeEventListener"in t&&t.removeEventListener(T[e.e]||E&&b[e.e]||e.e,e.proxy,e.del&&!E&&e.e in b||!!i)})})}function p(o,i){return(i||!o.isDefaultPrevented)&&(i||(i=o),l.each(e,function(e,t){var n=i[e];o[e]=function(){return this[t]=a,n&&n.apply(i,arguments)},o[t]=I}),(i.defaultPrevented!==m?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(o.isDefaultPrevented=a)),o}function g(e){var t,n={originalEvent:e};for(t in e)o.test(t)||e[t]===m||(n[t]=e[t]);return p(n,e)}var m,t=1,v=Array.prototype.slice,y=l.isFunction,w=function(e){return"string"==typeof e},_={},r={},E="onfocusin"in window,b={focus:"focusin",blur:"focusout"},T={mouseenter:"mouseover",mouseleave:"mouseout"};r.click=r.mousedown=r.mouseup=r.mousemove="MouseEvents",l.event={add:u,remove:d},l.proxy=function(e,t){if(y(e)){var n=function(){return e.apply(t,arguments)};return n._zid=h(e),n}if(w(t))return l.proxy(e[t],e);throw new TypeError("expected function")},l.fn.bind=function(e,t,n){return this.on(e,t,n)},l.fn.unbind=function(e,t){return this.off(e,t)},l.fn.one=function(e,t,n,o){return this.on(e,t,n,o,1)};var a=function(){return!0},I=function(){return!1},o=/^([A-Z]|returnValue$|layer[XY]$)/,e={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};l.fn.delegate=function(e,t,n){return this.on(t,e,n)},l.fn.undelegate=function(e,t,n){return this.off(t,e,n)},l.fn.live=function(e,t){return l(document.body).delegate(this.selector,e,t),this},l.fn.die=function(e,t){return l(document.body).undelegate(this.selector,e,t),this},l.fn.on=function(t,i,n,r,s){var a,c,o=this;return t&&!w(t)?(l.each(t,function(e,t){o.on(e,i,n,t,s)}),o):(w(i)||y(r)||!1===r||(r=n,n=i,i=m),(y(n)||!1===n)&&(r=n,n=m),!1===r&&(r=I),o.each(function(e,o){s&&(a=function(e){return d(o,e.type,r),r.apply(this,arguments)}),i&&(c=function(e){var t,n=l(e.target).closest(i,o).get(0);return n&&n!==o?(t=l.extend(g(e),{currentTarget:n,liveFired:o}),(a||r).apply(n,[t].concat(v.call(arguments,1)))):void 0}),u(o,t,r,n,i,c||a)}))},l.fn.off=function(e,n,t){var o=this;return e&&!w(e)?(l.each(e,function(e,t){o.off(e,n,t)}),o):(w(n)||y(t)||!1===t||(t=n,n=m),!1===t&&(t=I),o.each(function(){d(this,e,t,n)}))},l.fn.trigger=function(e,t){return(e=w(e)||l.isPlainObject(e)?l.Event(e):p(e))._args=t,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(e):l(this).triggerHandler(e,t)})},l.fn.triggerHandler=function(n,o){var i,r;return this.each(function(e,t){(i=g(w(n)?l.Event(n):n))._args=o,i.target=t,l.each(s(t,n.type||n),function(e,t){return r=t.proxy(i),!i.isImmediatePropagationStopped()&&void 0})}),r},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){l.fn[t]=function(e){return e?this.bind(t,e):this.trigger(t)}}),["focus","blur"].forEach(function(t){l.fn[t]=function(e){return e?this.bind(t,e):this.each(function(){try{this[t]()}catch(e){}}),this}}),l.Event=function(e,t){w(e)||(e=(t=e).type);var n=document.createEvent(r[e]||"Events"),o=!0;if(t)for(var i in t)"bubbles"==i?o=!!t[i]:n[i]=t[i];return n.initEvent(e,o,!0),p(n)}}(Zepto),function(og){function pg(e,t,n,o){return e.global?(e=t||Ag,n=og.Event(n),og(e).trigger(n,o),o=!n.isDefaultPrevented()):o=void 0,o}function qg(e,t){var n=t.context;return!1!==t.beforeSend.call(n,e,t)&&!1!==pg(t,n,"ajaxBeforeSend",[e,t])&&void pg(t,n,"ajaxSend",[e,t])}function rg(e,t,n,o){var i=n.context;n.success.call(i,e,"success",t),o&&o.resolveWith(i,[e,"success",t]),pg(n,i,"ajaxSuccess",[t,n,e]),tg("success",t,n)}function sg(e,t,n,o,i){var r=o.context;o.error.call(r,n,t,e),i&&i.rejectWith(r,[n,t,e]),pg(o,r,"ajaxError",[n,o,e||t]),tg(t,n,o)}function tg(e,t,n){var o=n.context;n.complete.call(o,t,e),pg(n,o,"ajaxComplete",[t,n]),n.global&&!--og.active&&pg(n,null,"ajaxStop")}function ug(){}function vg(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function wg(e,t,n,o){return og.isFunction(t)&&(o=n,n=t,t=void 0),og.isFunction(n)||(o=n,n=void 0),{url:e,data:t,success:n,dataType:o}}var xg,yg,zg=0,Ag=window.document,Bg=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Cg=/^(?:text|application)\/javascript/i,Dg=/^(?:text|application)\/xml/i,Eg="application/json",Fg="text/html",Gg=/^\s*$/;og.active=0,og.ajaxJSONP=function(n,o){if(!("type"in n))return og.ajax(n);var i,r,e=n.jsonpCallback,s=(og.isFunction(e)?e():e)||"jsonp"+ ++zg,a=Ag.createElement("script"),c=window[s],t=function(e){og(a).triggerHandler("error",e||"abort")},u={abort:t};return o&&o.promise(u),og(a).on("load error",function(e,t){clearTimeout(r),og(a).off().remove(),"error"!=e.type&&i?rg(i[0],u,n,o):sg(null,t||"error",u,n,o),window[s]=c,i&&og.isFunction(c)&&c(i[0]),c=i=void 0}),!1===qg(u,n)?t("abort"):(window[s]=function(){i=arguments},a.src=n.url.replace(/\?(.+)=\?/,"?$1="+s),Ag.head.appendChild(a),0<n.timeout&&(r=setTimeout(function(){t("timeout")},n.timeout))),u},og.ajaxSettings={type:"GET",beforeSend:ug,success:ug,error:ug,complete:ug,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:Eg,xml:"application/xml, text/xml",html:Fg,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},og.ajax=function(vh){var yh,zh,wh=og.extend({},vh||{}),xh=og.Deferred&&og.Deferred();for(xg in og.ajaxSettings)void 0===wh[xg]&&(wh[xg]=og.ajaxSettings[xg]);(yh=wh).global&&0==og.active++&&pg(yh,null,"ajaxStart"),wh.crossDomain||(wh.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(wh.url)&&RegExp.$2!=window.location.host),wh.url||(wh.url=window.location.toString()),(zh=wh).processData&&zh.data&&"string"!=og.type(zh.data)&&(zh.data=og.param(zh.data,zh.traditional)),!zh.data||zh.type&&"GET"!=zh.type.toUpperCase()||(zh.url=vg(zh.url,zh.data),zh.data=void 0),!1===wh.cache&&(wh.url=vg(wh.url,"_="+Date.now()));var Ah=wh.dataType;if(vh=/\?.+=\?/.test(wh.url),"jsonp"==Ah||vh)return vh||(wh.url=vg(wh.url,wh.jsonp?wh.jsonp+"=?":!1===wh.jsonp?"":"callback=?")),og.ajaxJSONP(wh,xh);vh=wh.accepts[Ah];var Bh,Ch={},Dh=function(e,t){Ch[e.toLowerCase()]=[e,t]},Eh=/^([\w-]+:)\/\//.test(wh.url)?RegExp.$1:window.location.protocol,Fh=wh.xhr(),Gh=Fh.setRequestHeader;if(xh&&xh.promise(Fh),wh.crossDomain||Dh("X-Requested-With","XMLHttpRequest"),Dh("Accept",vh||"*/*"),(vh=wh.mimeType||vh)&&(-1<vh.indexOf(",")&&(vh=vh.split(",",2)[0]),Fh.overrideMimeType&&Fh.overrideMimeType(vh)),(wh.contentType||!1!==wh.contentType&&wh.data&&"GET"!=wh.type.toUpperCase())&&Dh("Content-Type",wh.contentType||"application/x-www-form-urlencoded"),wh.headers)for(yg in wh.headers)Dh(yg,wh.headers[yg]);if(Fh.setRequestHeader=Dh,!(Fh.onreadystatechange=function(){if(4==Fh.readyState){Fh.onreadystatechange=ug,clearTimeout(Bh);var Jh,Kh=!1;if(200<=Fh.status&&Fh.status<300||304==Fh.status||0==Fh.status&&"file:"==Eh){Ah=Ah||((Lh=wh.mimeType||Fh.getResponseHeader("content-type"))&&(Lh=Lh.split(";",2)[0]),Lh&&(Lh==Fg?"html":Lh==Eg?"json":Cg.test(Lh)?"script":Dg.test(Lh)&&"xml")||"text"),Jh=Fh.responseText;try{"script"==Ah?eval(Jh):"xml"==Ah?Jh=Fh.responseXML:"json"==Ah&&(Jh=Gg.test(Jh)?null:og.parseJSON(Jh))}catch(e){Kh=e}Kh?sg(Kh,"parsererror",Fh,wh,xh):rg(Jh,Fh,wh,xh)}else sg(Fh.statusText||null,Fh.status?"error":"abort",Fh,wh,xh)}var Lh})===qg(Fh,wh))return Fh.abort(),sg(null,"abort",Fh,wh,xh),Fh;if(wh.xhrFields)for(yg in wh.xhrFields)Fh[yg]=wh.xhrFields[yg];for(yg in Fh.open(wh.type,wh.url,!("async"in wh)||wh.async,wh.username,wh.password),Ch)Gh.apply(Fh,Ch[yg]);return 0<wh.timeout&&(Bh=setTimeout(function(){Fh.onreadystatechange=ug,Fh.abort(),sg(null,"timeout",Fh,wh,xh)},wh.timeout)),Fh.send(wh.data?wh.data:null),Fh},og.get=function(){return og.ajax(wg.apply(null,arguments))},og.post=function(){var e=wg.apply(null,arguments);return e.type="POST",og.ajax(e)},og.getJSON=function(){var e=wg.apply(null,arguments);return e.dataType="json",og.ajax(e)},og.fn.load=function(e,t,n){if(!this.length)return this;var o,i=this,r=e.split(/\s/),s=(e=wg(e,t,n)).success;return 1<r.length&&(e.url=r[0],o=r[1]),e.success=function(e){i.html(o?og("<div>").html(e.replace(Bg,"")).find(o):e),s&&s.apply(i,arguments)},og.ajax(e),this};var Hg=encodeURIComponent;og.param=function(e,t){var n=[];return n.add=function(e,t){this.push(Hg(e)+"="+Hg(t))},function n(o,e,i,r){var s,a=og.isArray(e),c=og.isPlainObject(e);og.each(e,function(e,t){s=og.type(t),r&&(e=i?r:r+"["+(c||"object"==s||"array"==s?e:"")+"]"),!r&&a?o.add(t.name,t.value):"array"==s||!i&&"object"==s?n(o,t,i,e):o.add(e,t)})}(n,e,t),n.join("&").replace(/%20/g,"+")}}(Zepto),function(o){o.fn.serializeArray=function(){var t,n=[];return o([].slice.call(this.get(0).elements)).each(function(){var e=(t=o(this)).attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=e&&"reset"!=e&&"button"!=e&&("radio"!=e&&"checkbox"!=e||this.checked)&&n.push({name:t.attr("name"),value:t.val()})}),n},o.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},o.fn.submit=function(e){return e?this.bind("submit",e):this.length&&(e=o.Event("submit"),this.eq(0).trigger(e),e.isDefaultPrevented()||this.get(0).submit()),this}}(Zepto),function(n){"__proto__"in{}||n.extend(n.zepto,{Z:function(e,t){return e=e||[],n.extend(e,n.fn),e.selector=t||"",e.__Z=!0,e},isZ:function(e){return"array"===n.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(n){var t=getComputedStyle;window.getComputedStyle=function(e){try{return t(e)}catch(e){return null}}}}(Zepto),function(r){r.getScript=function(e,t,n){var o=document.createElement("script"),i=r(o);o.src=e,r("head").append(o),i.bind("load",t),i.bind("error",n)}}(Zepto),function(h,e){function f(e){return e.toLowerCase()}var n,d,p,g,m,v,y,w,o="",i=window.document.createElement("div"),_=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,E={};h.each({Webkit:"webkit",Moz:"",O:"o",ms:"MS"},function(e,t){if(void 0!==i.style[e+"TransitionProperty"])return o="-"+f(e)+"-",n=t,!1}),d=o+"transform",E[p=o+"transition-property"]=E[g=o+"transition-duration"]=E[m=o+"transition-timing-function"]=E[v=o+"animation-name"]=E[y=o+"animation-duration"]=E[w=o+"animation-timing-function"]="",h.fx={off:void 0===n&&void 0===i.style.transitionProperty,speeds:{_default:400,fast:200,slow:600},cssPrefix:o,transitionEnd:n?n+"TransitionEnd":f("TransitionEnd"),animationEnd:n?n+"AnimationEnd":f("AnimationEnd")},h.fn.animate=function(e,t,n,o){return h.isPlainObject(t)&&(n=t.easing,o=t.complete,t=t.duration),t&&(t=("number"==typeof t?t:h.fx.speeds[t]||h.fx.speeds._default)/1e3),this.anim(e,t,n,o)},h.fn.anim=function(e,t,n,o){var i,r,s,a={},c="",u=this,l=h.fx.transitionEnd;if(void 0===t&&(t=.4),h.fx.off&&(t=0),"string"==typeof e)a[v]=e,a[y]=t+"s",a[w]=n||"linear",l=h.fx.animationEnd;else{for(i in r=[],e)_.test(i)?c+=i+"("+e[i]+") ":(a[i]=e[i],r.push(f(i.replace(/([a-z])([A-Z])/,"$1-$2"))));c&&(a[d]=c,r.push(d)),0<t&&"object"==typeof e&&(a[p]=r.join(", "),a[g]=t+"s",a[m]=n||"linear")}return s=function(e){if(void 0!==e){if(e.target!==e.currentTarget)return;h(e.target).unbind(l,s)}h(this).css(E),o&&o.call(this)},0<t&&this.bind(l,s),this.size()&&this.get(0),this.css(a),t<=0&&setTimeout(function(){u.each(function(){s.call(this)})},0),this},i=null}(Zepto),"ontouchstart"in window?(start_ev="touchstart",end_ev="touchend",move_ev="touchmove"):(start_ev="mousedown",end_ev="mouseup",move_ev="mousemove"),$.fn.Touch=function(a,c){var e=move_ev,u=!1,l={};"function"==getType(a)&&(a.fun=a),this.each(function(){var r=$($(this).eq(0)),s=!1,t=0;r.on(e,function(e){s=!0,clearTimeout(t),t=setTimeout(function(){s=!1,$(".tapped").removeClass("tapped")},250)}),a.children?(r.on(start_ev,a.children,function(e){u&&(clearTimeout(T.isTouchEndTimer),T.isTouchEndTimer=setTimeout(function(){u=!1},799)),c&&c.prevent&&e.preventDefault(),c&&c.stop&&e.stopPropagation(),$(this).addClass("tapped");var t=this,n=$(this);c&&c.isLongPress&&(clearTimeout(T.longPressTimer),T.longPressTimer=setTimeout(function(){if(!u)return n.removeClass("tapped"),setTimeout(function(){a.fun.call(t,t)},0),c&&c.nopreventDefault||e.preventDefault(),0},800)),l.beginTime=(new Date).getTime();try{l.x=e.changedTouches[0].clientX,l.y=e.changedTouches[0].clientY}catch(e){}}),r.on(end_ev,a.children,function(e){if(u=!0,c&&c.isLongPress)return!1;l.endTime=(new Date).getTime();try{var t=Math.abs(l.x-e.changedTouches[0].clientX),n=Math.abs(l.y-e.changedTouches[0].clientY);s=!(n<16&&t<16)}catch(e){}var o=!1;if(l.beginTime&&l.endTime&&(o=800<l.endTime-l.beginTime),s&&"touchend"==end_ev||o)return s=!1,$(this).removeClass("tapped"),c&&c.nopreventDefault||e.preventDefault(),0;$(this).removeClass("tapped");var i=this;setTimeout(function(){a.fun.call(i,i)},0),c&&c.noStopPropagation||e.stopPropagation()})):(r.on(start_ev,function(e){u&&(clearTimeout(T.isTouchEndTimer),T.isTouchEndTimer=setTimeout(function(){u=!1},799)),c&&c.prevent&&e.preventDefault(),c&&c.stop&&e.stopPropagation(),$(this).addClass("tapped");var t=this,n=$(this);c&&c.isLongPress&&(clearTimeout(T.longPressTimer),T.longPressTimer=setTimeout(function(){if(!u)return n.removeClass("tapped"),setTimeout(function(){a.fun.call(t,t)},0),c&&c.nopreventDefault||e.preventDefault(),0},800)),l.beginTime=(new Date).getTime();try{l.x=e.changedTouches[0].clientX,l.y=e.changedTouches[0].clientY}catch(e){}}),r.on(end_ev,function(e){if(u=!0,c&&c.isLongPress)return!1;l.endTime=(new Date).getTime();try{var t=Math.abs(l.x-e.changedTouches[0].clientX),n=Math.abs(l.y-e.changedTouches[0].clientY);s=!(n<16&&t<16)}catch(e){}var o=!1;if(l.beginTime&&l.endTime&&(o=800<l.endTime-l.beginTime),s&&"touchend"==end_ev||o)return s=!1,$(this).removeClass("tapped"),c&&c.nopreventDefault||e.preventDefault(),0;if(c&&c.noRepeat){if(r.is("bt_disable")||r.t&&(new Date).getTime()-r.t<1e3)return;r.t=(new Date).getTime()}$(this).removeClass("tapped");var i=this;setTimeout(function(){a.fun.apply(i,[i,e])},0),c&&c.nopreventDefault||e.preventDefault()}))})},function(d,p){var n,g,m,v,y,w,_,E,b,T,o="",i=document.createElement("div"),I=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,S={};function e(e){return n?n+e:e.toLowerCase()}i.style.transform===p&&d.each({Webkit:"webkit",Moz:"",O:"o"},function(e,t){if(i.style[e+"TransitionProperty"]!==p)return o="-"+e.toLowerCase()+"-",n=t,!1}),g=o+"transform",S[m=o+"transition-property"]=S[v=o+"transition-duration"]=S[w=o+"transition-delay"]=S[y=o+"transition-timing-function"]=S[_=o+"animation-name"]=S[E=o+"animation-duration"]=S[T=o+"animation-delay"]=S[b=o+"animation-timing-function"]="",d.fx={off:n===p&&i.style.transitionProperty===p,speeds:{_default:400,fast:200,slow:600},cssPrefix:o,transitionEnd:e("TransitionEnd"),animationEnd:e("AnimationEnd")},d.fn.animate=function(e,t,n,o,i){return d.isFunction(t)&&(o=t,t=n=p),d.isFunction(n)&&(o=n,n=p),d.isPlainObject(t)&&(n=t.easing,o=t.complete,i=t.delay,t=t.duration),t&&(t=("number"==typeof t?t:d.fx.speeds[t]||d.fx.speeds._default)/1e3),i&&(i=parseFloat(i)/1e3),this.anim(e,t,n,o,i)},d.fn.anim=function(e,t,n,o,i){var r,s,a,c={},u="",l=this,h=d.fx.transitionEnd,f=!1;if(t===p&&(t=d.fx.speeds._default/1e3),i===p&&(i=0),d.fx.off&&(t=0),"string"==typeof e)c[_]=e,c[E]=t+"s",c[T]=i+"s",c[b]=n||"linear",h=d.fx.animationEnd;else{for(r in s=[],e)I.test(r)?u+=r+"("+e[r]+") ":(c[r]=e[r],s.push(r.replace(/([A-Z])/g,"-$1").toLowerCase()));u&&(c[g]=u,s.push(g)),0<t&&"object"==typeof e&&(c[m]=s.join(", "),c[v]=t+"s",c[w]=i+"s",c[y]=n||"linear")}return a=function(e){if(void 0!==e){if(e.target!==e.currentTarget)return;d(e.target).unbind(h,a)}else d(this).unbind(h,a);f=!0,d(this).css(S),o&&o.call(this)},0<t&&(this.bind(h,a),setTimeout(function(){f||a.call(l)},1e3*(t+i)+25)),this.size()&&this.get(0).clientLeft,this.css(c),t<=0&&setTimeout(function(){l.each(function(){a.call(this)})},0),this},i=null}(Zepto),function(i){"use strict";var n=window,r=document,s=!1,a=i(n),c=i(r),u=parseFloat(i("html").css("font-size"));i.fn.dropload=function(e){return new t(this,e)};var t=function(e,t){this.$element=e,this.upInsertDOM=!1,this.loading=!1,this.isLockUp=!1,this.isLockDown=!1,this.isData=!0,this._scrollTop=0,this._threshold=0,this.init(t)};function l(e){e.touches||(e.touches=e.originalEvent.touches)}var h=!(t.prototype.init=function(e){var t,o=this;o.opts=i.extend(!0,{},{scrollArea:o.$element,domUp:{domClass:"dropload-up",domRefresh:'<div class="dropload-load"><span class="loading"></span></div>',domUpdate:'<div class="dropload-load"><span class="loading"></span></div>',domLoad:'<div class="dropload-load"><span class="loading"></span></div>'},domDown:{domClass:"dropload-down",domRefresh:'<div class="dropload-refresh">上拉加载更多</div>',domLoad:'<div class="dropload-load"><span class="loading"></span>Refreshing</div>',domNoData:'<div class="dropload-noData">暂无数据</div>'},autoLoad:!0,distance:50,threshold:"",loadUpFn:"",loadDownFn:""},e),""!=o.opts.loadDownFn&&(o.$element.append('<div class="'+o.opts.domDown.domClass+'">'+o.opts.domDown.domRefresh+"</div>"),o.$domDown=i("."+o.opts.domDown.domClass)),o.$domDown&&""===o.opts.threshold?o._threshold=Math.floor(1*o.$domDown.height()/3):o._threshold=o.opts.threshold,o.opts.scrollArea==n?(o.$scrollArea=a,o._scrollContentHeight=c.height(),o._scrollWindowHeight=r.documentElement.clientHeight):(o.$scrollArea=o.opts.scrollArea,o._scrollContentHeight=o.$element[0].scrollHeight,o._scrollWindowHeight=o.$element.height()),""!=o.opts.loadDownFn&&(t=o).opts.autoLoad&&t._scrollContentHeight-t._threshold<=t._scrollWindowHeight&&f(t),a.on("resize",function(){o.opts.scrollArea==n?o._scrollWindowHeight=n.innerHeight:o._scrollWindowHeight=o.$element.height()}),o.$element.on("touchstart",function(e){var t,n;0<i(window).scrollTop()?s=!0:(s=!1,o.loading||(l(e),t=e,(n=o)._startY=t.touches[0].pageY,n.touchScrollTop=n.$scrollArea.scrollTop()))}),o.$element.on("touchmove",function(e){s||o.loading||(l(e),function(e,t){t._curY=e.touches[0].pageY,t._moveY=t._curY-t._startY,0<t._moveY?t.direction="down":t._moveY<0&&(t.direction="up");var n=Math.abs(t._moveY);""!=t.opts.loadUpFn&&t.touchScrollTop<=0&&"down"==t.direction&&!t.isLockUp&&(e.preventDefault(),"match-list"==t.$element.attr("id")||"myFollowContent"==t.$element.attr("id")?t.upInsertDOM||(i("#main").prepend('<div class="'+t.opts.domUp.domClass+'"></div>'),t.upInsertDOM=!0):t.upInsertDOM||(t.upInsertDOM=!0,t.$element.prepend('<div class="'+t.opts.domUp.domClass+'"></div>')),t.$domUp=i("."+t.opts.domUp.domClass),d(t.$domUp,0),n<=t.opts.distance?(t._offsetY=n,t.$domUp.html(t.opts.domUp.domRefresh)):n>t.opts.distance&&n<=2*t.opts.distance?(t._offsetY=t.opts.distance+.5*(n-t.opts.distance),t.$domUp.html(t.opts.domUp.domUpdate)):t._offsetY=t.opts.distance+.5*t.opts.distance+.2*(n-2*t.opts.distance),t._offsetY>=98/75*u&&t.$domUp.css({opacity:t._offsetY/1.5/(98/75*u)}),t.$domUp.css({height:t._offsetY}),console.log("---------me._curY"+t._curY+"头加内容:"+(1*i("#goodscontent").height()+1*i(".navbar").height())),!h&&0<i("#goodscontent").length&&0<i(".navbar").length&&t._curY>1*i("#goodscontent").height()+1*i(".navbar").height()&&(h=!0,setTimeout(function(){d(t.$domUp,300),n>t.opts.distance?(t.$domUp.css({height:t.$domUp.children().height()}),t.$domUp.html(t.opts.domUp.domLoad),t.loading=!0,t.opts.loadUpFn(t)):0<t.$domUp.length&&t.$domUp.css({height:"0"}).on("webkitTransitionEnd mozTransitionEnd transitionend",function(){t.upInsertDOM=!1,i(this).remove()}),t._moveY=0,t.$domUp.css({height:"1.17rem"}),h=!1},800)))}(e,o))}),o.$element.on("touchend",function(){var e,t;s||o.loading||(e=o,t=Math.abs(e._moveY),""!=e.opts.loadUpFn&&e.touchScrollTop<=0&&"down"==e.direction&&!e.isLockUp&&(d(e.$domUp,300),t>e.opts.distance?(e.$domUp.css({height:e.$domUp.children().height()}),e.$domUp.html(e.opts.domUp.domLoad),e.loading=!0,e.opts.loadUpFn(e)):0<e.$domUp.length&&e.$domUp.css({height:"0"}).on("webkitTransitionEnd mozTransitionEnd transitionend",function(){e.upInsertDOM=!1,i(this).remove()}),e._moveY=0,e.$domUp.css({height:"1.17rem"})))}),""!=o.opts.loadDownFn&&o.$scrollArea.on("scroll",function(){o._scrollTop=o.$scrollArea.scrollTop(),""!=o.opts.loadDownFn&&!o.loading&&!o.isLockDown&&o._scrollContentHeight-o._threshold<=o._scrollWindowHeight+o._scrollTop&&f(o)})});function f(e){e.direction="up",e.$domDown.html(e.opts.domDown.domLoad),e.loading=!0,e.opts.loadDownFn(e)}function d(e,t){e.css({"-webkit-transition":"all "+t+"ms",transition:"all "+t+"ms"})}t.prototype.lock=function(e){void 0===e?"up"==this.direction?this.isLockDown=!0:"down"==this.direction?this.isLockUp=!0:(this.isLockUp=!0,this.isLockDown=!0):"up"==e?this.isLockUp=!0:"down"==e&&(this.isLockDown=!0,this.direction="up")},t.prototype.unlock=function(){this.isLockUp=!1,this.isLockDown=!1,this.direction="up"},t.prototype.noData=function(e){void 0===e||1==e?this.isData=!1:0==e&&(this.isData=!0)},t.prototype.resetload=function(){var t=this;"down"==t.direction&&t.upInsertDOM&&0<t.$domUp.length?t.$domUp.css({height:"0"}).on("webkitTransitionEnd mozTransitionEnd transitionend",function(){var e;t.loading=!1,t.upInsertDOM=!1,i(this).remove(),(e=t).opts.scrollArea==n?e._scrollContentHeight=c.height():e._scrollContentHeight=e.$element[0].scrollHeight}):"up"==t.direction&&t.$domDown&&0<t.$domDown.length&&t.$domDown.css({height:"0"}).remove()}}(window.Zepto||window.jQuery),function(e,c){var i=e.document,t=e.navigator.userAgent,u=/iPhone|iPad|iPod/i.test(t),l=/Android/i.test(t),n=t.match(/(?:IOS|Android)[\/\s](\d+[._]\d+(?:[._]\d+)?)/i),o=t.match(/QAPP[\/\s](\d+[._]\d+[._]\d+)/),r=Object.prototype.hasOwnProperty,s=c.nativeApi=e.NativeApi||(e.NativeApi={}),a=[],h="param_",f="chunk_";function d(e,t){e=e.toString().split("."),t=t.toString().split(".");for(var n=0;n<e.length||n<t.length;n++){var o=parseInt(e[n],10),i=parseInt(t[n],10);if(window.isNaN(o)&&(o=0),window.isNaN(i)&&(i=0),o<i)return-1;if(i<o)return 1}return 0}n=n?(n[1]||"0.0.0").replace(/\_/g,"."):"0.0.0";var p={isAvailable:1===d(o=o?(o[1]||"0.0.0").replace(/\_/g,"."):"0.0.0","0"),compareVersion:function(e){return 1===d(o,e)},call:function(e,t,n,o,i,r){var s,a;if("number"==typeof arguments[arguments.length-1]&&(r=arguments[arguments.length-1]),"function"!=typeof o&&(o=null),"function"!=typeof i&&(i=null),c.promise&&(a=c.promise.defer()),s=0<r?setTimeout(function(){p.onFailure(s,{ret:"TIMEOUT"})},r):g.getSid(),g.registerCall(s,o,i,a),g.registerGC(s,r),g.callMethod(e,t,n,s),a)return a.promise},fireEvent:function(e,t,n){var o=i.createEvent("HTMLEvents");o.initEvent(e,!1,!0),o.result=g.parseData(t||g.getData(n)),i.dispatchEvent(o)},getParam:function(e){return g.getParam(e)},setData:function(e,t){g.setData(e,t)},onSuccess:function(e,t){console.log("onSuccess---sid:"+e+" data:"+t),g.onComplete(e,t,"success")},onFailure:function(e,t){console.log("onFailure---sid:"+e+" data:"+t),g.onComplete(e,t,"failure")}},g={params:{},chunks:{},calls:{},getSid:function(){return parseInt(65535*Math.random(),10)+1},buildParam:function(e){return e&&"object"==typeof e?JSON.stringify(e):e||""},getParam:function(e){return this.params[h+e]||""},setParam:function(e,t){this.params[h+e]=t},parseData:function(e){var t;if(console.log("parseData---"+e),e&&"string"==typeof e)try{t=JSON.parse(e)}catch(e){console.log("parseData error---"+e),t={ret:["WV_ERR::PARAM_PARSE_ERROR"]}}else t=e||{};return t},setData:function(){this.chunks[f+sid]=this.chunks[f+sid]||[],this.chunks[f+sid].push(chunk)},getData:function(e){return this.chunks[f+e]?this.chunks[f+e].join(""):""},registerCall:function(e,t,n,o){t&&(this.calls["suc_"+e]=t),n&&(this.calls["err_"+e]=n),o&&(this.calls["defer_"+e]=o)},unregisterCall:function(e){var t="suc_"+e,n="err_"+e,o="defer_"+e,i={};return this.calls[t]&&(i.success=this.calls[t],delete this.calls[t]),this.calls[n]&&(i.failure=this.calls[n],delete this.calls[n]),this.calls[o]&&(i.defer=this.calls[o],delete this.calls[o]),i},useIframe:function(e,t){var n="iframe_"+e,o=a.pop();o||((o=i.createElement("iframe")).setAttribute("frameborder","0"),o.style.cssText="width:0;height:0;border:0;display:none;"),o.setAttribute("id",n),o.setAttribute("src",t),o.parentNode||setTimeout(function(){i.body.appendChild(o)},5)},retrieveIframe:function(e){var t="iframe_"+e,n=i.querySelector("#"+t);3<=a.length?i.body.removeChild(n):a.push(n)},callMethod:function(e,t,n,o){n=g.buildParam(n),console.log("call---obj:"+e+" method:"+t+" sid:"+o+" params:"+n);var i="hybrid://"+e+":"+o+"/"+t+"?"+n;u?(this.setParam(o,n),this.useIframe(o,i)):l&&window.prompt(i,"wv_hybrid:")},registerGC:function(e,t){var n=this,o=Math.max(t||0,6e5),i=Math.max(t||0,6e4),r=Math.max(t||0,6e5);setTimeout(function(){n.unregisterCall(e)},o),u?setTimeout(function(){n.params[h+e]&&delete n.params[h+e]},i):l&&setTimeout(function(){n.chunks[f+e]&&delete n.chunks[f+e]},r)},onComplete:function(e,t,n){console.log("onComplete---sid:"+e+" data:"+t+" type:"+n),clearTimeout(e);var o=this.unregisterCall(e),i=o.success,r=o.failure,s=o.defer;t=t||this.getData(e);var a=(t=this.parseData(t)).ret;"string"==typeof a&&((t=t.value||t).ret||(t.ret=[a])),"success"===n?(i&&i(t),s&&s.resolve(t)):"failure"===n&&(r&&r(t),s&&s.reject(t)),u?(this.retrieveIframe(e),this.params[h+e]&&delete this.params[h+e]):l&&this.chunks[f+e]&&delete this.chunks[f+e]}};for(var m in p)r.call(s,m)||(s[m]=p[m])}(window,window.lib||(window.lib={})),function(e,t){var n,o,i=e.navigator.userAgent;(n=i.match(/QAPP[\/\s]([\d\.\_]+)/))&&(o=n[1]);var a=t.nativeApi,r=document,s=(/iPhone|iPad|iPod/i.test(i),/Android/i.test(i),o&&o.split("."),["SUCCESS","NO_HANDLER","PARAM_ERR","FAILED","NO_PERMISSION","TIMEOUT","CANCEL"]);function c(e){return"string"==typeof e}function u(e,t,n,o,i){var r=(e=e.split("."))[0],s=e[1];a&&a.call(r,s,t,n,o,i)}function l(t,n){return(t||n)&&function(e){e=n&&n(e)||e,t&&t(f(e))}}function h(t){return t&&function(e){t(function(e){var t=5,n=c(e)?e:e.code;if(e){var o=s.indexOf(n);t=0<o?o:t}return{errorCode:t,errorMessage:n,data:e}}(e))}}function f(e){return(e=e||{}).errorCode=0,e.errorMessage="",e}var d=e.API=t.API={aliPay:function(e,t){console.log("alipay---"+JSON.stringify(e)),u("IntentInterface.alipay",e,l(t),h(t))},weixinPay:function(e,t){console.log("weixinPay---"+JSON.stringify(e)),u("IntentInterface.weixinPay",e,l(t),h(t))},thirdShare:function(e,t){console.log("thirdShare---"+JSON.stringify(e)),u("IntentInterface.thirdShare",e,l(t),h(t))},thirdLogin:function(e,t){console.log("thirdLogin---"+JSON.stringify(e)),u("IntentInterface.thirdLogin",e,l(t),h(t))},notifyRenderFinish:function(e,t){console.log("notifyRenderingFinish---"+JSON.stringify(e)),u("IntentInterface.notifyRenderFinish",e,l(t),h(t))},clearCache:function(e,t){console.log("clearCache---"+JSON.stringify(e)),u("IntentInterface.clearCache",e,l(t),h(t))},goTabbar:function(e,t){console.log("goTabbar---"+JSON.stringify(e)),u("IntentInterface.goTabbar",e,l(t),h(t))},sendToken:function(e,t){console.log("sendToken---"+JSON.stringify(e)),u("IntentInterface.sendToken",e,l(t),h(t))},LocationInterface:function(e,t,n){console.log("LocationInterface---"+JSON.stringify(e)),u("IntentInterface.LocationInterface",e,l(t),h(n))},showNativeTip:function(e,t){console.log("showNativeTip---"+JSON.stringify(e)),u("IntentInterface.showNativeTip",e,l(t),h(t))},openLogin:function(e,t){console.log("openLogin---"+JSON.stringify(e)),u("IntentInterface.openLogin",e,l(t),h(t))},openBetInfoPage:function(e,t){console.log("openBetInfoPage---"+JSON.stringify(e)),u("IntentInterface.openBetInfoPage",e,l(t),h(t))},openBloggerPage:function(e,t){console.log("openBloggerPage---"+JSON.stringify(e)),u("IntentInterface.openBloggerPage",e,l(t),h(t))},openBuyDiamond:function(e,t){console.log("openBuyDiamond---"+JSON.stringify(e)),u("IntentInterface.openBuyDiamond",e,l(t),h(t))},openNoteDetail:function(e,t){console.log("openNoteDetail---"+JSON.stringify(e)),u("IntentInterface.openNoteDetail",e,l(t),h(t))},openInformationDetail:function(e,t){console.log("openInformationDetail---"+JSON.stringify(e)),u("IntentInterface.openInformationDetail",e,l(t),h(t))},openYetService:function(e,t){console.log("openYetService---"+JSON.stringify(e)),u("IntentInterface.openYetService",e,l(t),h(t))},openUserCenter:function(e,t){console.log("openUserCenter---"+JSON.stringify(e)),u("IntentInterface.openUserCenter",e,l(t),h(t))},openJiePan:function(e,t){e=c(e)?{url:e}:e,console.log("openJiePan---"+JSON.stringify(e)),u("IntentInterface.openJiePan",e,l(t),h(t))},openBindPhone:function(e,t){console.log("openBindPhone---"+JSON.stringify(e)),u("IntentInterface.openBindPhone",e,l(t),h(t))},openAddressSelect:function(e,t){console.log("openAddressSelect---"+JSON.stringify(e)),u("IntentInterface.openAddressSelect",e,l(t),h(t))},openBetDetail:function(e,t){console.log("openBetDetail---"+JSON.stringify(e)),u("IntentInterface.openBetDetail",e,l(t),h(t))},openBetRule:function(e,t){console.log("openBetRule---"+JSON.stringify(e)),u("IntentInterface.openBetRule",e,l(t),h(t))},openPlayGame:function(e,t){console.log("openPlayGame---"+JSON.stringify(e)),u("IntentInterface.openPlayGame",e,l(t),h(t))},openPayView:function(e,t){console.log("openPayView---"+JSON.stringify(e)),u("IntentInterface.openPayView",e,l(t),h(t))},sendBetMinSign:function(e,t){console.log("sendBetMinSign---"+JSON.stringify(e)),u("IntentInterface.sendBetMinSign",e,l(t),h(t))},openAnyView:function(e,t){console.log("openAnyView---"+JSON.stringify(e)),u("IntentInterface.openAnyView",e,l(t),h(t))},gotoJingCai:function(e,t){console.log("gotoJingCai---"+JSON.stringify(e)),u("IntentInterface.gotoJingCai",e,l(t),h(t))},getVerifyCode:function(e,t){u("webService.getVerifyCode",e=e||{},l(t),h(t))},callPay:function(e,t){u("webService.callPay",e=e||{},l(t),h(t))},showConfirm:function(e,t){console.log("showConfirm---"+JSON.stringify(e)),u("DialogInterface.showConfirm",e,l(t),h(t))},sendHttp:function(e,t){e=e||{},console.log("sendHttp---"+JSON.stringify(e)),u("HttpActionInteface.sendHttp",e,l(t),h(t))},getAppInfo:function(e,t){e=e||{},console.log("getAppInfo---"+JSON.stringify(e)),u("DeviceInfoInterface.getAppInfo",e,l(t),h(t))},eventListener:function(e,t){e=c(e)?{url:e}:e,console.log("regiest---"+JSON.stringify(e)),u("webService.eventListener",e,l(t),h(t))},openWindow:function(e,t){e=c(e)?{url:e}:e,console.log("openWindow---"+JSON.stringify(e)),u("webService.openWindow",e,l(t),h(t))},closeWindow:function(e,t){e=e||{},console.log("closeWindow---"+JSON.stringify(e)),u("webService.closeWindow",e,l(t),h(t))},setWebViewTitle:function(e,t){e=c(e)?{url:e}:e,console.log("setWebViewTitle---"+JSON.stringify(e)),u("webService.setWebViewTitle",e,l(t),h(t))},goGame:function(e,t){console.log("goGame---"+JSON.stringify(e)),u("IntentInterface.goGame",e,l(t),h(t))},openClubShare:function(e,t){console.log("openClubShare---"+JSON.stringify(e)),u("IntentInterface.openClubShare",e,l(t),h(t))},openRecommendIndex:function(e,t){console.log("openRecommendIndex---"+JSON.stringify(e)),u("IntentInterface.openRecommendIndex",e,l(t),h(t))},openApplySpecialist:function(e,t){console.log("openApplySpecialist---"+JSON.stringify(e)),u("IntentInterface.openApplySpecialist",e,l(t),h(t))},uploadImage:function(e,t){console.log("PhotoInterface---"+JSON.stringify(e)),u("PhotoInterface.uploadImage",e,l(t),h(t))},toast:function(e,t){var n=c(e)?e:e&&e.text;console.log("toast---"+n),u("DialogInterface.showToast",{msg:n},l(t),h(t))},showLoadding:function(e,t){console.log("showLoadding---"+JSON.stringify(e)),u("IntentInterface.showLoadding",e,l(t),h(t))},share:function(e,t){console.log("share---"+JSON.stringify(e)),u("IntentInterface.shareInfo",e,l(t),h(t))},openszrz:function(e,t){console.log("openszrz---"+JSON.stringify(e)),u("IntentInterface.openszrz",e,l(t),h(t))},geolocation:{getCurrentPosition:function(e,t){u("LocationInterface.getLocation",e=e||{},l(t),h(t))}},network:{getType:function(e){u("DeviceInfoInterface.getNetworkInfo","",l(e,function(e){var t=e.network||"",n={type:t,isWifi:!1,is2G:!1,is3G:!1,isOnline:!1};return/WIFI/i.test(t)?n.isWifi=n.isOnline=!0:/GPRS|EDGE|CDMA/i.test(t)?n.is2G=n.isOnline=!0:/UMTS|HSDPA|EVDO/i.test(t)&&(n.is3G=n.isOnline=!0),n.isE=n.isG=n.isH=!1,n.networkAvailable=null!=t&&""!=t,n}),h(e))}},photo:function(e,t){u("PhotoInterface.photo",e=e||{},l(t,function(e){e.photo=e.resourceUrl}),h(t))},showImage:function(e,t){u("PhotoInterface.showImage",e=e||{},l(t,function(e){e.photo=e.resourceUrl}),h(t))},mutiPhoto:function(e,t){u("PhotoInterface.mutiPhoto",e=e||{},l(t,function(e){e.photo=e.resourceUrl}),h(t))},contacts:{get:function(e,t){u("WVContacts.choose",null,l(t,function(e){var t=[{name:e.name,phoneNumber:e.phone,email:e.email}];return e.results=t,e}),h(t))}},showLoading:function(e,t){var n=r.getElementById("_Loading");if(n)n.style.display="block";else{var o=r.createElement("div");o.id="_Loading",o.style.cssText="position:absolute;width:100%;height:100%;left:0;top:0;background:url(http://a.tbcdn.cn/mw/base/styles/component/more/images/loading.gif) 50% 50% no-repeat;background-size:40px 16px;pointer-events:none;",(n=r.createDocumentFragment()).appendChild(o)}r.body.appendChild(n),t&&t(f(null))},hideLoading:function(e){var t=r.getElementById("_Loading");t&&(t.style.display="none"),e&&e(f(null))}},p=navigator.geolocation||(navigator.geolocation={});p.getCurrentPosition||(p.getCurrentPosition=d.geolocation.getCurrentPosition)}(window,window.lib||(window.lib={})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.lozad=t()}(this,function(){"use strict";var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=document.documentMode,u={rootMargin:"0px",threshold:0,load:function(e){if("picture"===e.nodeName.toLowerCase()){var t=document.createElement("img");i&&e.getAttribute("data-iesrc")&&(t.src=e.getAttribute("data-iesrc")),e.appendChild(t)}if(e.getAttribute("data-src")){var n=$(e),o=n.attr("data-src");(t=new Image).src=o,t.onload=void n.attr("src",o)}e.getAttribute("data-srcset")&&(e.srcset=e.getAttribute("data-srcset")),e.getAttribute("data-background-image")&&(e.style.backgroundImage="url("+e.getAttribute("data-background-image")+")")}};function l(e){var t=$(e).attr("data-src"),n=new Image;n.src=t,n.onload=void e.setAttribute("data-loaded",!0)}var h=function(e){return"true"===e.getAttribute("data-loaded")};return function(){var n,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".lozad",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=c({},u,e),i=t.rootMargin,r=t.threshold,s=t.load,a=void 0;return window.IntersectionObserver&&(a=new IntersectionObserver((n=s,function(e,t){e.forEach(function(e){0<e.intersectionRatio&&(t.unobserve(e.target),h(e.target)||(n(e.target),l(e.target)))})}),{rootMargin:i,threshold:r})),{observe:function(){for(var e,t=(e=o)instanceof Element?[e]:e instanceof NodeList?e:document.querySelectorAll(e),n=0;n<t.length;n++)h(t[n])||(a?a.observe(t[n]):(s(t[n]),l(t[n])))},triggerLoad:function(e){h(e)||(s(e),l(e))}}}}),(window.jQuery||window.Zepto)&&function(t){t.fn.Swipe=function(e){return this.each(function(){t(this).data("Swipe",new Swipe(t(this)[0],e))})}}(window.jQuery||window.Zepto),"undefined"==typeof Paho&&(Paho={}),Paho.MQTT=function(s){var g={CONNECT:1,CONNACK:2,PUBLISH:3,PUBACK:4,PUBREC:5,PUBREL:6,PUBCOMP:7,SUBSCRIBE:8,SUBACK:9,UNSUBSCRIBE:10,UNSUBACK:11,PINGREQ:12,PINGRESP:13,DISCONNECT:14},h=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n)){var o="Unknown property, "+n+". Valid properties are:";for(var n in t)t.hasOwnProperty(n)&&(o=o+" "+n);throw new Error(o)}if(typeof e[n]!==t[n])throw new Error(d(f.INVALID_TYPE,[typeof e[n],n]))}},n=function(e,t){return function(){return e.apply(t,arguments)}},f={OK:{code:0,text:"AMQJSC0000I OK."},CONNECT_TIMEOUT:{code:1,text:"AMQJSC0001E Connect timed out."},SUBSCRIBE_TIMEOUT:{code:2,text:"AMQJS0002E Subscribe timed out."},UNSUBSCRIBE_TIMEOUT:{code:3,text:"AMQJS0003E Unsubscribe timed out."},PING_TIMEOUT:{code:4,text:"AMQJS0004E Ping timed out."},INTERNAL_ERROR:{code:5,text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"},CONNACK_RETURNCODE:{code:6,text:"AMQJS0006E Bad Connack return code:{0} {1}."},SOCKET_ERROR:{code:7,text:"AMQJS0007E Socket error:{0}."},SOCKET_CLOSE:{code:8,text:"AMQJS0008I Socket closed."},MALFORMED_UTF:{code:9,text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},UNSUPPORTED:{code:10,text:"AMQJS0010E {0} is not supported by this browser."},INVALID_STATE:{code:11,text:"AMQJS0011E Invalid state {0}."},INVALID_TYPE:{code:12,text:"AMQJS0012E Invalid type {0} for {1}."},INVALID_ARGUMENT:{code:13,text:"AMQJS0013E Invalid argument {0} for {1}."},UNSUPPORTED_OPERATION:{code:14,text:"AMQJS0014E Unsupported operation."},INVALID_STORED_DATA:{code:15,text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},INVALID_MQTT_MESSAGE_TYPE:{code:16,text:"AMQJS0016E Invalid MQTT message type {0}."},MALFORMED_UNICODE:{code:17,text:"AMQJS0017E Malformed Unicode string:{0} {1}."}},l={0:"Connection Accepted",1:"Connection Refused: unacceptable protocol version",2:"Connection Refused: identifier rejected",3:"Connection Refused: server unavailable",4:"Connection Refused: bad user name or password",5:"Connection Refused: not authorized"},d=function(e,t){var n=e.text;if(t)for(var o,i,r=0;r<t.length;r++)if(o="{"+r+"}",0<(i=n.indexOf(o))){var s=n.substring(0,i),a=n.substring(i+o.length);n=s+t[r]+a}return n},p=[0,6,77,81,73,115,100,112,3],m=[0,4,77,81,84,84,4],v=function(e,t){for(var n in this.type=e,t)t.hasOwnProperty(n)&&(this[n]=t[n])};function a(e,t){var n=t,o=e[t],i=o>>4,r=o&=15;t+=1;var s,a=0,c=1;do{if(t==e.length)return[null,n];a+=(127&(s=e[t++]))*c,c*=128}while(0!=(128&s));var u=t+a;if(u>e.length)return[null,n];var l=new v(i);switch(i){case g.CONNACK:1&e[t++]&&(l.sessionPresent=!0),l.returnCode=e[t++];break;case g.PUBLISH:var h=r>>1&3,f=_(e,t),d=b(e,t+=2,f);t+=f,0<h&&(l.messageIdentifier=_(e,t),t+=2);var p=new Paho.MQTT.Message(e.subarray(t,u));1==(1&r)&&(p.retained=!0),8==(8&r)&&(p.duplicate=!0),p.qos=h,p.destinationName=d,l.payloadMessage=p;break;case g.PUBACK:case g.PUBREC:case g.PUBREL:case g.PUBCOMP:case g.UNSUBACK:l.messageIdentifier=_(e,t);break;case g.SUBACK:l.messageIdentifier=_(e,t),t+=2,l.returnCode=e.subarray(t,u)}return[l,u]}function y(e,t,n){return t[n++]=e>>8,t[n++]=e%256,n}function w(e,t,n,o){return c(e,n,o=y(t,n,o)),o+t}function _(e,t){return 256*e[t]+e[t+1]}function E(e){for(var t=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);2047<o?(55296<=o&&o<=56319&&(n++,t++),t+=3):127<o?t+=2:t++}return t}function c(e,t,n){for(var o=n,i=0;i<e.length;i++){var r=e.charCodeAt(i);if(55296<=r&&r<=56319){var s=e.charCodeAt(++i);if(isNaN(s))throw new Error(d(f.MALFORMED_UNICODE,[r,s]));r=s-56320+(r-55296<<10)+65536}r<=127?t[o++]=r:(r<=2047?t[o++]=r>>6&31|192:(r<=65535?t[o++]=r>>12&15|224:(t[o++]=r>>18&7|240,t[o++]=r>>12&63|128),t[o++]=r>>6&63|128),t[o++]=63&r|128)}return t}function b(e,t,n){for(var o,i="",r=t;r<t+n;){var s=e[r++];if(s<128)o=s;else{var a=e[r++]-128;if(a<0)throw new Error(d(f.MALFORMED_UTF,[s.toString(16),a.toString(16),""]));if(s<224)o=64*(s-192)+a;else{var c=e[r++]-128;if(c<0)throw new Error(d(f.MALFORMED_UTF,[s.toString(16),a.toString(16),c.toString(16)]));if(s<240)o=4096*(s-224)+64*a+c;else{var u=e[r++]-128;if(u<0)throw new Error(d(f.MALFORMED_UTF,[s.toString(16),a.toString(16),c.toString(16),u.toString(16)]));if(!(s<248))throw new Error(d(f.MALFORMED_UTF,[s.toString(16),a.toString(16),c.toString(16),u.toString(16)]));o=262144*(s-240)+4096*a+64*c+u}}}65535<o&&(o-=65536,i+=String.fromCharCode(55296+(o>>10)),o=56320+(1023&o)),i+=String.fromCharCode(o)}return i}v.prototype.encode=function(){var e=(15&this.type)<<4,t=0,n=new Array,o=0;switch(null!=this.messageIdentifier&&(t+=2),this.type){case g.CONNECT:switch(this.mqttVersion){case 3:t+=p.length+3;break;case 4:t+=m.length+3}if(t+=E(this.clientId)+2,null!=this.willMessage){t+=E(this.willMessage.destinationName)+2;var i=this.willMessage.payloadBytes;i instanceof Uint8Array||(i=new Uint8Array(s)),t+=i.byteLength+2}null!=this.userName&&(t+=E(this.userName)+2),null!=this.password&&(t+=E(this.password)+2);break;case g.SUBSCRIBE:e|=2;for(var r=0;r<this.topics.length;r++)n[r]=E(this.topics[r]),t+=n[r]+2;t+=this.requestedQos.length;break;case g.UNSUBSCRIBE:for(e|=2,r=0;r<this.topics.length;r++)n[r]=E(this.topics[r]),t+=n[r]+2;break;case g.PUBREL:e|=2;break;case g.PUBLISH:this.payloadMessage.duplicate&&(e|=8),e=e|=this.payloadMessage.qos<<1,this.payloadMessage.retained&&(e|=1),t+=(o=E(this.payloadMessage.destinationName))+2;var s=this.payloadMessage.payloadBytes;t+=s.byteLength,s instanceof ArrayBuffer?s=new Uint8Array(s):s instanceof Uint8Array||(s=new Uint8Array(s.buffer));break;case g.DISCONNECT:}var a=function(e){var t=new Array(1),n=0;do{var o=e%128;0<(e>>=7)&&(o|=128),t[n++]=o}while(0<e&&n<4);return t}(t),c=a.length+1,u=new ArrayBuffer(t+c),l=new Uint8Array(u);if(l[0]=e,l.set(a,1),this.type==g.PUBLISH)c=w(this.payloadMessage.destinationName,o,l,c);else if(this.type==g.CONNECT){switch(this.mqttVersion){case 3:l.set(p,c),c+=p.length;break;case 4:l.set(m,c),c+=m.length}var h=0;this.cleanSession&&(h=2),null!=this.willMessage&&(h|=4,h|=this.willMessage.qos<<3,this.willMessage.retained&&(h|=32)),null!=this.userName&&(h|=128),null!=this.password&&(h|=64),l[c++]=h,c=y(this.keepAliveInterval,l,c)}switch(null!=this.messageIdentifier&&(c=y(this.messageIdentifier,l,c)),this.type){case g.CONNECT:c=w(this.clientId,E(this.clientId),l,c),null!=this.willMessage&&(c=w(this.willMessage.destinationName,E(this.willMessage.destinationName),l,c),c=y(i.byteLength,l,c),l.set(i,c),c+=i.byteLength),null!=this.userName&&(c=w(this.userName,E(this.userName),l,c)),null!=this.password&&(c=w(this.password,E(this.password),l,c));break;case g.PUBLISH:l.set(s,c);break;case g.SUBSCRIBE:for(r=0;r<this.topics.length;r++)c=w(this.topics[r],n[r],l,c),l[c++]=this.requestedQos[r];break;case g.UNSUBSCRIBE:for(r=0;r<this.topics.length;r++)c=w(this.topics[r],n[r],l,c)}return u};var o=function(e,t,n){this._client=e,this._window=t,this._keepAliveInterval=1e3*n,this.isReset=!1;var o=new v(g.PINGREQ).encode(),i=function(e){return function(){return r.apply(e)}},r=function(){this.isReset?(this.isReset=!1,this._client._trace("Pinger.doPing","send PINGREQ"),this._client.socket.send(o),this.timeout=this._window.setTimeout(i(this),this._keepAliveInterval)):(this._client._trace("Pinger.doPing","Timed out"),this._client._disconnected(f.PING_TIMEOUT.code,d(f.PING_TIMEOUT)))};this.reset=function(){this.isReset=!0,this._window.clearTimeout(this.timeout),0<this._keepAliveInterval&&(this.timeout=setTimeout(i(this),this._keepAliveInterval))},this.cancel=function(){this._window.clearTimeout(this.timeout)}},i=function(e,t,n,o,i){var r,s,a;this._window=t,n||(n=30),this.timeout=setTimeout((r=o,s=e,a=i,function(){return r.apply(s,a)}),1e3*n),this.cancel=function(){this._window.clearTimeout(this.timeout)}},T=function(e,t,n,o,i){if(!("WebSocket"in s&&null!==s.WebSocket))throw new Error(d(f.UNSUPPORTED,["WebSocket"]));if(!("localStorage"in s&&null!==s.localStorage))throw new Error(d(f.UNSUPPORTED,["localStorage"]));if(!("ArrayBuffer"in s&&null!==s.ArrayBuffer))throw new Error(d(f.UNSUPPORTED,["ArrayBuffer"]));for(var r in this._trace("Paho.MQTT.Client",e,t,n,o,i),this.host=t,this.port=n,this.path=o,this.uri=e,this.clientId=i,this._localKey=t+":"+n+("/mqtt"!=o?":"+o:"")+":"+i+":",this._msg_queue=[],this._sentMessages={},this._receivedMessages={},this._notify_msg_sent={},this._message_identifier=1,this._sequence=0,localStorage)0!=r.indexOf("Sent:"+this._localKey)&&0!=r.indexOf("Received:"+this._localKey)||this.restore(r)};T.prototype.connected=!1,T.prototype.maxMessageIdentifier=65536,T.prototype._msg_queue=null,T.prototype.sendPinger=null,T.prototype.receivePinger=null,T.prototype.receiveBuffer=null,T.prototype._traceBuffer=null,T.prototype._MAX_TRACE_ENTRIES=100,T.prototype.connect=function(e){var t=this._traceMask(e,"password");if(this._trace("Client.connect",t,this.socket,this.connected),this.connected)throw new Error(d(f.INVALID_STATE,["already connected"]));if(this.socket)throw new Error(d(f.INVALID_STATE,["already connected"]));(this.connectOptions=e).uris?(this.hostIndex=0,this._doConnect(e.uris[0])):this._doConnect(this.uri)},T.prototype.subscribe=function(e,t){if(this._trace("Client.subscribe",e,t),!this.connected)throw new Error(d(f.INVALID_STATE,["not connected"]));var n=new v(g.SUBSCRIBE);n.topics=[e],null!=t.qos?n.requestedQos=[t.qos]:n.requestedQos=[0],t.onSuccess&&(n.onSuccess=function(e){t.onSuccess({invocationContext:t.invocationContext,grantedQos:e})}),t.onFailure&&(n.onFailure=function(e){t.onFailure({invocationContext:t.invocationContext,errorCode:e})}),t.timeout&&(n.timeOut=new i(this,window,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:f.SUBSCRIBE_TIMEOUT.code,errorMessage:d(f.SUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},T.prototype.unsubscribe=function(e,t){if(this._trace("Client.unsubscribe",e,t),!this.connected)throw new Error(d(f.INVALID_STATE,["not connected"]));var n=new v(g.UNSUBSCRIBE);n.topics=[e],t.onSuccess&&(n.callback=function(){t.onSuccess({invocationContext:t.invocationContext})}),t.timeout&&(n.timeOut=new i(this,window,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:f.UNSUBSCRIBE_TIMEOUT.code,errorMessage:d(f.UNSUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},T.prototype.send=function(e){if(this._trace("Client.send",e),!this.connected)throw new Error(d(f.INVALID_STATE,["not connected"]));wireMessage=new v(g.PUBLISH),0<(wireMessage.payloadMessage=e).qos?this._requires_ack(wireMessage):this.onMessageDelivered&&(this._notify_msg_sent[wireMessage]=this.onMessageDelivered(wireMessage.payloadMessage)),this._schedule_message(wireMessage)},T.prototype.disconnect=function(){if(this._trace("Client.disconnect"),!this.socket)throw new Error(d(f.INVALID_STATE,["not connecting or connected"]));wireMessage=new v(g.DISCONNECT),this._notify_msg_sent[wireMessage]=n(this._disconnected,this),this._schedule_message(wireMessage)},T.prototype.getTraceLog=function(){if(null!==this._traceBuffer){for(var e in this._trace("Client.getTraceLog",new Date),this._trace("Client.getTraceLog in flight messages",this._sentMessages.length),this._sentMessages)this._trace("_sentMessages ",e,this._sentMessages[e]);for(var e in this._receivedMessages)this._trace("_receivedMessages ",e,this._receivedMessages[e]);return this._traceBuffer}},T.prototype.startTrace=function(){null===this._traceBuffer&&(this._traceBuffer=[]),this._trace("Client.startTrace",new Date,"@VERSION@")},T.prototype.stopTrace=function(){delete this._traceBuffer},T.prototype._doConnect=function(e){if(this.connectOptions.useSSL){var t=e.split(":");t[0]="wss",e=t.join(":")}this.connected=!1,this.connectOptions.mqttVersion<4?this.socket=new WebSocket(e,["mqttv3.1"]):this.socket=new WebSocket(e,["mqtt"]),this.socket.binaryType="arraybuffer",this.socket.onopen=n(this._on_socket_open,this),this.socket.onmessage=n(this._on_socket_message,this),this.socket.onerror=n(this._on_socket_error,this),this.socket.onclose=n(this._on_socket_close,this),this.sendPinger=new o(this,window,this.connectOptions.keepAliveInterval),this.receivePinger=new o(this,window,this.connectOptions.keepAliveInterval),this._connectTimeout=new i(this,window,this.connectOptions.timeout,this._disconnected,[f.CONNECT_TIMEOUT.code,d(f.CONNECT_TIMEOUT)])},T.prototype._schedule_message=function(e){this._msg_queue.push(e),this.connected&&this._process_queue()},T.prototype.store=function(e,t){var n={type:t.type,messageIdentifier:t.messageIdentifier,version:1};switch(t.type){case g.PUBLISH:t.pubRecReceived&&(n.pubRecReceived=!0),n.payloadMessage={};for(var o="",i=t.payloadMessage.payloadBytes,r=0;r<i.length;r++)i[r]<=15?o=o+"0"+i[r].toString(16):o+=i[r].toString(16);n.payloadMessage.payloadHex=o,n.payloadMessage.qos=t.payloadMessage.qos,n.payloadMessage.destinationName=t.payloadMessage.destinationName,t.payloadMessage.duplicate&&(n.payloadMessage.duplicate=!0),t.payloadMessage.retained&&(n.payloadMessage.retained=!0),0==e.indexOf("Sent:")&&(void 0===t.sequence&&(t.sequence=++this._sequence),n.sequence=t.sequence);break;default:throw Error(d(f.INVALID_STORED_DATA,[key,n]))}localStorage.setItem(e+this._localKey+t.messageIdentifier,JSON.stringify(n))},T.prototype.restore=function(e){var t=localStorage.getItem(e),n=JSON.parse(t),o=new v(n.type,n);switch(n.type){case g.PUBLISH:for(var i=n.payloadMessage.payloadHex,r=new ArrayBuffer(i.length/2),s=new Uint8Array(r),a=0;2<=i.length;){var c=parseInt(i.substring(0,2),16);i=i.substring(2,i.length),s[a++]=c}var u=new Paho.MQTT.Message(s);u.qos=n.payloadMessage.qos,u.destinationName=n.payloadMessage.destinationName,n.payloadMessage.duplicate&&(u.duplicate=!0),n.payloadMessage.retained&&(u.retained=!0),o.payloadMessage=u;break;default:throw Error(d(f.INVALID_STORED_DATA,[e,t]))}0==e.indexOf("Sent:"+this._localKey)?(o.payloadMessage.duplicate=!0,this._sentMessages[o.messageIdentifier]=o):0==e.indexOf("Received:"+this._localKey)&&(this._receivedMessages[o.messageIdentifier]=o)},T.prototype._process_queue=function(){for(var e=null,t=this._msg_queue.reverse();e=t.pop();)this._socket_send(e),this._notify_msg_sent[e]&&(this._notify_msg_sent[e](),delete this._notify_msg_sent[e])},T.prototype._requires_ack=function(e){var t=Object.keys(this._sentMessages).length;if(t>this.maxMessageIdentifier)throw Error("Too many messages:"+t);for(;void 0!==this._sentMessages[this._message_identifier];)this._message_identifier++;e.messageIdentifier=this._message_identifier,(this._sentMessages[e.messageIdentifier]=e).type===g.PUBLISH&&this.store("Sent:",e),this._message_identifier===this.maxMessageIdentifier&&(this._message_identifier=1)},T.prototype._on_socket_open=function(){var e=new v(g.CONNECT,this.connectOptions);e.clientId=this.clientId,this._socket_send(e)},T.prototype._on_socket_message=function(e){this._trace("Client._on_socket_message",e.data),this.receivePinger.reset();for(var t=this._deframeMessages(e.data),n=0;n<t.length;n+=1)this._handleMessage(t[n])},T.prototype._deframeMessages=function(e){var t=new Uint8Array(e);if(this.receiveBuffer){var n=new Uint8Array(this.receiveBuffer.length+t.length);n.set(this.receiveBuffer),n.set(t,this.receiveBuffer.length),t=n,delete this.receiveBuffer}try{for(var o=0,i=[];o<t.length;){var r=a(t,o),s=r[0];if(o=r[1],null===s)break;i.push(s)}o<t.length&&(this.receiveBuffer=t.subarray(o))}catch(e){return void this._disconnected(f.INTERNAL_ERROR.code,d(f.INTERNAL_ERROR,[e.message,e.stack.toString()]))}return i},T.prototype._handleMessage=function(e){this._trace("Client._handleMessage",e);try{switch(e.type){case g.CONNACK:if(this._connectTimeout.cancel(),this.connectOptions.cleanSession){for(var t in this._sentMessages){var n=this._sentMessages[t];localStorage.removeItem("Sent:"+this._localKey+n.messageIdentifier)}for(var t in this._sentMessages={},this._receivedMessages){var o=this._receivedMessages[t];localStorage.removeItem("Received:"+this._localKey+o.messageIdentifier)}this._receivedMessages={}}if(0!==e.returnCode){this._disconnected(f.CONNACK_RETURNCODE.code,d(f.CONNACK_RETURNCODE,[e.returnCode,l[e.returnCode]]));break}this.connected=!0,this.connectOptions.uris&&(this.hostIndex=this.connectOptions.uris.length);var i=new Array;for(var r in this._sentMessages)this._sentMessages.hasOwnProperty(r)&&i.push(this._sentMessages[r]);for(var s=0,a=(i=i.sort(function(e,t){return e.sequence-t.sequence})).length;s<a;s++)if((n=i[s]).type==g.PUBLISH&&n.pubRecReceived){var c=new v(g.PUBREL,{messageIdentifier:n.messageIdentifier});this._schedule_message(c)}else this._schedule_message(n);this.connectOptions.onSuccess&&this.connectOptions.onSuccess({invocationContext:this.connectOptions.invocationContext}),this._process_queue();break;case g.PUBLISH:this._receivePublish(e);break;case g.PUBACK:(n=this._sentMessages[e.messageIdentifier])&&(delete this._sentMessages[e.messageIdentifier],localStorage.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(n.payloadMessage));break;case g.PUBREC:(n=this._sentMessages[e.messageIdentifier])&&(n.pubRecReceived=!0,c=new v(g.PUBREL,{messageIdentifier:e.messageIdentifier}),this.store("Sent:",n),this._schedule_message(c));break;case g.PUBREL:o=this._receivedMessages[e.messageIdentifier],localStorage.removeItem("Received:"+this._localKey+e.messageIdentifier),o&&(this._receiveMessage(o),delete this._receivedMessages[e.messageIdentifier]);var u=new v(g.PUBCOMP,{messageIdentifier:e.messageIdentifier});this._schedule_message(u);break;case g.PUBCOMP:n=this._sentMessages[e.messageIdentifier],delete this._sentMessages[e.messageIdentifier],localStorage.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(n.payloadMessage);break;case g.SUBACK:(n=this._sentMessages[e.messageIdentifier])&&(n.timeOut&&n.timeOut.cancel(),128===e.returnCode[0]?n.onFailure&&n.onFailure(e.returnCode):n.onSuccess&&n.onSuccess(e.returnCode),delete this._sentMessages[e.messageIdentifier]);break;case g.UNSUBACK:(n=this._sentMessages[e.messageIdentifier])&&(n.timeOut&&n.timeOut.cancel(),n.callback&&n.callback(),delete this._sentMessages[e.messageIdentifier]);break;case g.PINGRESP:this.sendPinger.reset();break;case g.DISCONNECT:this._disconnected(f.INVALID_MQTT_MESSAGE_TYPE.code,d(f.INVALID_MQTT_MESSAGE_TYPE,[e.type]));break;default:this._disconnected(f.INVALID_MQTT_MESSAGE_TYPE.code,d(f.INVALID_MQTT_MESSAGE_TYPE,[e.type]))}}catch(e){return void this._disconnected(f.INTERNAL_ERROR.code,d(f.INTERNAL_ERROR,[e.message,e.stack.toString()]))}},T.prototype._on_socket_error=function(e){this._disconnected(f.SOCKET_ERROR.code,d(f.SOCKET_ERROR,[e.data]))},T.prototype._on_socket_close=function(){this._disconnected(f.SOCKET_CLOSE.code,d(f.SOCKET_CLOSE))},T.prototype._socket_send=function(e){if(1==e.type){var t=this._traceMask(e,"password");this._trace("Client._socket_send",t)}else this._trace("Client._socket_send",e);this.socket.send(e.encode()),this.sendPinger.reset()},T.prototype._receivePublish=function(e){switch(e.payloadMessage.qos){case"undefined":case 0:this._receiveMessage(e);break;case 1:var t=new v(g.PUBACK,{messageIdentifier:e.messageIdentifier});this._schedule_message(t),this._receiveMessage(e);break;case 2:this._receivedMessages[e.messageIdentifier]=e,this.store("Received:",e);var n=new v(g.PUBREC,{messageIdentifier:e.messageIdentifier});this._schedule_message(n);break;default:throw Error("Invaild qos="+wireMmessage.payloadMessage.qos)}},T.prototype._receiveMessage=function(e){this.onMessageArrived&&this.onMessageArrived(e.payloadMessage)},T.prototype._disconnected=function(e,t){this._trace("Client._disconnected",e,t),this.sendPinger.cancel(),this.receivePinger.cancel(),this._connectTimeout&&this._connectTimeout.cancel(),this._msg_queue=[],this._notify_msg_sent={},this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,1===this.socket.readyState&&this.socket.close(),delete this.socket),this.connectOptions.uris&&this.hostIndex<this.connectOptions.uris.length-1?(this.hostIndex++,this._doConnect(this.connectOptions.uris[this.hostIndex])):(void 0===e&&(e=f.OK.code,t=d(f.OK)),this.connected?(this.connected=!1,this.onConnectionLost&&this.onConnectionLost({errorCode:e,errorMessage:t})):4===this.connectOptions.mqttVersion&&!1===this.connectOptions.mqttVersionExplicit?(this._trace("Failed to connect V4, dropping back to V3"),this.connectOptions.mqttVersion=3,this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri)):this.connectOptions.onFailure&&this.connectOptions.onFailure({invocationContext:this.connectOptions.invocationContext,errorCode:e,errorMessage:t}))},T.prototype._trace=function(){if(this.traceFunction){for(var e in arguments)void 0!==arguments[e]&&(arguments[e]=JSON.stringify(arguments[e]));var t=Array.prototype.slice.call(arguments).join("");this.traceFunction({severity:"Debug",message:t})}if(null!==this._traceBuffer){e=0;for(var n=arguments.length;e<n;e++)this._traceBuffer.length==this._MAX_TRACE_ENTRIES&&this._traceBuffer.shift(),0===e?this._traceBuffer.push(arguments[e]):void 0===arguments[e]?this._traceBuffer.push(arguments[e]):this._traceBuffer.push("  "+JSON.stringify(arguments[e]))}},T.prototype._traceMask=function(e,t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=o==t?"******":e[o]);return n};var e=function(e,t,s,n){var a;if("string"!=typeof e)throw new Error(d(f.INVALID_TYPE,[typeof e,"host"]));if(2==arguments.length){n=t;var o=(a=e).match(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/);if(!o)throw new Error(d(f.INVALID_ARGUMENT,[e,"host"]));e=o[4]||o[2],t=parseInt(o[7]),s=o[8]}else{if(3==arguments.length&&(n=s,s="/mqtt"),"number"!=typeof t||t<0)throw new Error(d(f.INVALID_TYPE,[typeof t,"port"]));if("string"!=typeof s)throw new Error(d(f.INVALID_TYPE,[typeof s,"path"]));var i=-1!=e.indexOf(":")&&"["!=e.slice(0,1)&&"]"!=e.slice(-1);a="ws://"+(i?"["+e+"]":e)+":"+t+s}for(var r=0,c=0;c<n.length;c++){var u=n.charCodeAt(c);55296<=u&&u<=56319&&c++,r++}if("string"!=typeof n||65535<r)throw new Error(d(f.INVALID_ARGUMENT,[n,"clientId"]));var l=new T(a,e,t,s,n);this._getHost=function(){return e},this._setHost=function(){throw new Error(d(f.UNSUPPORTED_OPERATION))},this._getPort=function(){return t},this._setPort=function(){throw new Error(d(f.UNSUPPORTED_OPERATION))},this._getPath=function(){return s},this._setPath=function(){throw new Error(d(f.UNSUPPORTED_OPERATION))},this._getURI=function(){return a},this._setURI=function(){throw new Error(d(f.UNSUPPORTED_OPERATION))},this._getClientId=function(){return l.clientId},this._setClientId=function(){throw new Error(d(f.UNSUPPORTED_OPERATION))},this._getOnConnectionLost=function(){return l.onConnectionLost},this._setOnConnectionLost=function(e){if("function"!=typeof e)throw new Error(d(f.INVALID_TYPE,[typeof e,"onConnectionLost"]));l.onConnectionLost=e},this._getOnMessageDelivered=function(){return l.onMessageDelivered},this._setOnMessageDelivered=function(e){if("function"!=typeof e)throw new Error(d(f.INVALID_TYPE,[typeof e,"onMessageDelivered"]));l.onMessageDelivered=e},this._getOnMessageArrived=function(){return l.onMessageArrived},this._setOnMessageArrived=function(e){if("function"!=typeof e)throw new Error(d(f.INVALID_TYPE,[typeof e,"onMessageArrived"]));l.onMessageArrived=e},this._getTrace=function(){return l.traceFunction},this._setTrace=function(e){if("function"!=typeof e)throw new Error(d(f.INVALID_TYPE,[typeof e,"onTrace"]));l.traceFunction=e},this.connect=function(e){if(h(e=e||{},{timeout:"number",userName:"string",password:"string",willMessage:"object",keepAliveInterval:"number",cleanSession:"boolean",useSSL:"boolean",invocationContext:"object",onSuccess:"function",onFailure:"function",hosts:"object",ports:"object",mqttVersion:"number"}),void 0===e.keepAliveInterval&&(e.keepAliveInterval=60),4<e.mqttVersion||e.mqttVersion<3)throw new Error(d(f.INVALID_ARGUMENT,[e.mqttVersion,"connectOptions.mqttVersion"]));if(void 0===e.mqttVersion?(e.mqttVersionExplicit=!1,e.mqttVersion=4):e.mqttVersionExplicit=!0,void 0===e.password&&void 0!==e.userName)throw new Error(d(f.INVALID_ARGUMENT,[e.password,"connectOptions.password"]));if(e.willMessage){if(!(e.willMessage instanceof I))throw new Error(d(f.INVALID_TYPE,[e.willMessage,"connectOptions.willMessage"]));if(e.willMessage.stringPayload,void 0===e.willMessage.destinationName)throw new Error(d(f.INVALID_TYPE,[typeof e.willMessage.destinationName,"connectOptions.willMessage.destinationName"]))}if(void 0===e.cleanSession&&(e.cleanSession=!0),e.hosts){if(!(e.hosts instanceof Array))throw new Error(d(f.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));if(e.hosts.length<1)throw new Error(d(f.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));for(var t=!1,n=0;n<e.hosts.length;n++){if("string"!=typeof e.hosts[n])throw new Error(d(f.INVALID_TYPE,[typeof e.hosts[n],"connectOptions.hosts["+n+"]"]));if(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/.test(e.hosts[n])){if(0==n)t=!0;else if(!t)throw new Error(d(f.INVALID_ARGUMENT,[e.hosts[n],"connectOptions.hosts["+n+"]"]))}else if(t)throw new Error(d(f.INVALID_ARGUMENT,[e.hosts[n],"connectOptions.hosts["+n+"]"]))}if(t)e.uris=e.hosts;else{if(!e.ports)throw new Error(d(f.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(!(e.ports instanceof Array))throw new Error(d(f.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(e.hosts.length!=e.ports.length)throw new Error(d(f.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));for(e.uris=[],n=0;n<e.hosts.length;n++){if("number"!=typeof e.ports[n]||e.ports[n]<0)throw new Error(d(f.INVALID_TYPE,[typeof e.ports[n],"connectOptions.ports["+n+"]"]));var o=e.hosts[n],i=e.ports[n],r=-1!=o.indexOf(":");a="ws://"+(r?"["+o+"]":o)+":"+i+s,e.uris.push(a)}}}l.connect(e)},this.subscribe=function(e,t){if(0==e.length)throw new Error("Invalid argument:"+e);if("string"!=typeof e)throw new Error("Invalid argument:"+e);if(console.log("订阅主题--------"+e),h(t=t||{},{qos:"number",invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("subscribeOptions.timeout specified with no onFailure callback.");if(void 0!==t.qos&&0!==t.qos&&1!==t.qos&&2!==t.qos)throw new Error(d(f.INVALID_ARGUMENT,[t.qos,"subscribeOptions.qos"]));l.subscribe(e,t)},this.unsubscribe=function(e,t){if("string"!=typeof e)throw new Error("Invalid argument:"+e);if(h(t=t||{},{invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("unsubscribeOptions.timeout specified with no onFailure callback.");console.log("取消订阅主题--------"+e),l.unsubscribe(e,t)},this.send=function(e,t,n,o){var i;if(0==arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof I)&&"string"!=typeof e)throw new Error("Invalid argument:"+typeof e);if(void 0===(i=e).destinationName)throw new Error(d(f.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));l.send(i)}else(i=new I(t)).destinationName=e,3<=arguments.length&&(i.qos=n),4<=arguments.length&&(i.retained=o),l.send(i)},this.disconnect=function(){l.disconnect()},this.getTraceLog=function(){return l.getTraceLog()},this.startTrace=function(){l.startTrace()},this.stopTrace=function(){l.stopTrace()},this.isConnected=function(){return l.connected}};e.prototype={get host(){return this._getHost()},set host(e){this._setHost(e)},get port(){return this._getPort()},set port(e){this._setPort(e)},get path(){return this._getPath()},set path(e){this._setPath(e)},get clientId(){return this._getClientId()},set clientId(e){this._setClientId(e)},get onConnectionLost(){return this._getOnConnectionLost()},set onConnectionLost(e){this._setOnConnectionLost(e)},get onMessageDelivered(){return this._getOnMessageDelivered()},set onMessageDelivered(e){this._setOnMessageDelivered(e)},get onMessageArrived(){return this._getOnMessageArrived()},set onMessageArrived(e){this._setOnMessageArrived(e)},get trace(){return this._getTrace()},set trace(e){this._setTrace(e)}};var I=function(e){var n;if(!("string"==typeof e||e instanceof ArrayBuffer||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array))throw d(f.INVALID_ARGUMENT,[e,"newPayload"]);n=e,this._getPayloadString=function(){return"string"==typeof n?n:b(n,0,n.length)},this._getPayloadBytes=function(){if("string"==typeof n){var e=new ArrayBuffer(E(n)),t=new Uint8Array(e);return c(n,t,0),t}return n};var t=void 0;this._getDestinationName=function(){return t},this._setDestinationName=function(e){if("string"!=typeof e)throw new Error(d(f.INVALID_ARGUMENT,[e,"newDestinationName"]));t=e};var o=0;this._getQos=function(){return o};var i=!(this._setQos=function(e){if(0!==e&&1!==e&&2!==e)throw new Error("Invalid argument:"+e);o=e});this._getRetained=function(){return i};var r=!(this._setRetained=function(e){if("boolean"!=typeof e)throw new Error(d(f.INVALID_ARGUMENT,[e,"newRetained"]));i=e});this._getDuplicate=function(){return r},this._setDuplicate=function(e){r=e}};return I.prototype={get payloadString(){return this._getPayloadString()},get payloadBytes(){return this._getPayloadBytes()},get destinationName(){return this._getDestinationName()},set destinationName(e){this._setDestinationName(e)},get qos(){return this._getQos()},set qos(e){this._setQos(e)},get retained(){return this._getRetained()},set retained(e){this._setRetained(e)},get duplicate(){return this._getDuplicate()},set duplicate(e){this._setDuplicate(e)}},{Client:e,Message:I}}(window);var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,n,o,i,r,s,a,c="",u=0;for(e=Base64._utf8_encode(e);u<e.length;)i=(t=e.charCodeAt(u++))>>2,r=(3&t)<<4|(n=e.charCodeAt(u++))>>4,s=(15&n)<<2|(o=e.charCodeAt(u++))>>6,a=63&o,isNaN(n)?s=a=64:isNaN(o)&&(a=64),c=c+this._keyStr.charAt(i)+this._keyStr.charAt(r)+this._keyStr.charAt(s)+this._keyStr.charAt(a);return c},decode:function(e){var t,n,o,i,r,s,a="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c<e.length;)t=this._keyStr.indexOf(e.charAt(c++))<<2|(i=this._keyStr.indexOf(e.charAt(c++)))>>4,n=(15&i)<<4|(r=this._keyStr.indexOf(e.charAt(c++)))>>2,o=(3&r)<<6|(s=this._keyStr.indexOf(e.charAt(c++))),a+=String.fromCharCode(t),64!=r&&(a+=String.fromCharCode(n)),64!=s&&(a+=String.fromCharCode(o));return Base64._utf8_decode(a)},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):(127<o&&o<2048?t+=String.fromCharCode(o>>6|192):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128)),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(e){for(var t="",n=0,o=c1=c2=0;n<e.length;)(o=e.charCodeAt(n))<128?(t+=String.fromCharCode(o),n++):191<o&&o<224?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((31&o)<<6|63&c2),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),n+=3);return t}};!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.clipboard=t():e.clipboard=t()}(this,function(){return function(n){function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var i={};return o.m=n,o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,n){"use strict";function i(e){var t=new v,n=function(n,e,o){f("listener called"),n.success=!0,e.forEach(function(e,t){o.clipboardData.setData(t,e),t===g&&o.clipboardData.getData(t)!=e&&(f("setting text/plain failed"),n.success=!1)}),o.preventDefault()}.bind(this,t,e);document.addEventListener("copy",n);try{document.execCommand("copy")}finally{document.removeEventListener("copy",n)}return t.success}function r(e,t){s(e);var n=i(t);return a(),n}function s(e){var t=document.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function a(){document.getSelection().removeAllRanges()}function c(){return"undefined"==typeof ClipboardEvent&&void 0!==window.clipboardData&&void 0!==window.clipboardData.setData}function u(){return new h(function(e,t){var n=window.clipboardData.getData("Text");""===n?t(new Error("Empty clipboard or could not read plain text from clipboard")):e(n)})}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),l=n(5),h="undefined"==typeof Promise?o.Promise:Promise,f=function(e){},d=!0,p=function(){(console.warn||console.log).call(arguments)}.bind(console,"[clipboard-polyfill]"),g="text/plain",m=function(){function e(){}return e.setDebugLog=function(e){f=e},e.suppressWarnings=function(){d=!1,l.suppressDTWarnings()},e.write=function(o){return d&&!o.getData(g)&&p("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call clipboard.suppressWarnings() to suppress this warning."),new h(function(e,t){if(c())!function(e){var t=o.getData(g);if(void 0!==t)return window.clipboardData.setData("Text",t);throw"No `text/plain` value was specified."}()?t(new Error("Copying failed, possibly because the user rejected it.")):e();else{if(i(o))return f("regular execCopy worked"),void e();if(-1<navigator.userAgent.indexOf("Edge"))return f('UA "Edge" => assuming success'),void e();if(r(document.body,o))return f("copyUsingTempSelection worked"),void e();if(function(e){var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important"),t.textContent="temporary element",document.body.appendChild(t);var n=r(t,e);return document.body.removeChild(t),n}(o))return f("copyUsingTempElem worked"),void e();var n=o.getData(g);if(void 0!==n&&function(e){f("copyTextUsingDOM");var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important");var n=t;t.attachShadow&&(f("Using shadow DOM."),n=t.attachShadow({mode:"open"}));var o=document.createElement("span");o.innerText=e,n.appendChild(o),document.body.appendChild(t),s(o);var i=document.execCommand("copy");return a(),document.body.removeChild(t),i}(n))return f("copyTextUsingDOM worked"),void e();t(new Error("Copy command failed."))}})},e.writeText=function(e){if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(e);var t=new l.DT;return t.setData(g,e),this.write(t)},e.read=function(){return new h(function(o,e){c()?u().then(function(e){return o((t=e,(n=new l.DT).setData(g,t),n));var t,n},e):e("Read is not supported in your browser.")})},e.readText=function(){return navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText():c()?u():new h(function(e,t){t("Read is not supported in your browser.")})},e.DT=l.DT,e}();t.default=m;var v=function(){this.success=!1};e.exports=m},function(e,t,q){(function(V,J){e.exports=function(){"use strict";function u(e){return"function"==typeof e}function t(){var e=setTimeout;return function(){return e(n,1)}}function n(){for(var e=0;e<I;e+=2)(0,P[e])(P[e+1]),P[e]=void 0,P[e+1]=void 0;I=0}function a(e,t){var n=arguments,o=this,i=new this.constructor(l);void 0===i[U]&&y(i);var r,s=o._state;return s?(r=n[s-1],A(function(){return v(s,i,r,o._result)})):g(o,i,e,t),i}function c(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(l);return f(t,e),t}function l(){}function s(e){try{return e.then}catch(e){return F.error=e,F}}function h(e,t,n){var s,o,i,r;t.constructor===e.constructor&&n===a&&t.constructor.resolve===c?(i=e,(r=t)._state===R?d(i,r._result):r._state===B?p(i,r._result):g(r,void 0,function(e){return f(i,e)},function(e){return p(i,e)})):n===F?(p(e,F.error),F.error=null):void 0===n?d(e,t):u(n)?(s=t,o=n,A(function(i){var r=!1,e=function(e,t,n,o){try{e.call(t,function(e){r||(r=!0,s!==e?f(i,e):d(i,e))},function(e){r||(r=!0,p(i,e))})}catch(e){return e}}(o,s,0,0,i._label);!r&&e&&(r=!0,p(i,e))},e)):d(e,t)}function f(e,t){var n;e===t?p(e,new TypeError("You cannot resolve a promise with itself")):(n=typeof t,null===t||"object"!==n&&"function"!==n?d(e,t):h(e,t,s(t)))}function o(e){e._onerror&&e._onerror(e._result),m(e)}function d(e,t){e._state===k&&(e._result=t,e._state=R,0!==e._subscribers.length&&A(m,e))}function p(e,t){e._state===k&&(e._state=B,e._result=t,A(o,e))}function g(e,t,n,o){var i=e._subscribers,r=i.length;e._onerror=null,i[r]=t,i[r+R]=n,i[r+B]=o,0===r&&e._state&&A(m,e)}function m(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var o=void 0,i=void 0,r=e._result,s=0;s<t.length;s+=3)o=t[s],i=t[s+n],o?v(n,o,i,r):i(r);e._subscribers.length=0}}function e(){this.error=null}function v(e,t,n,o){var i=u(n),r=void 0,s=void 0,a=void 0,c=void 0;if(i){if((r=function(e,t){try{return e(t)}catch(e){return j.error=e,j}}(n,o))===j?(c=!0,s=r.error,r.error=null):a=!0,t===r)return void p(t,new TypeError("A promises callback cannot return that same promise."))}else r=o,a=!0;t._state!==k||(i&&a?f(t,r):c?p(t,s):e===R?d(t,r):e===B&&p(t,r))}function y(e){e[U]=$++,e._state=void 0,e._result=void 0,e._subscribers=[]}function i(e,t){this._instanceConstructor=e,this.promise=new e(l),this.promise[U]||y(this.promise),T(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?d(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&d(this.promise,this._result))):p(this.promise,new Error("Array Methods must be provided an Array"))}function w(e){this[U]=$++,this._result=this._state=void 0,this._subscribers=[],l!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof w?function(t,e){try{e(function(e){f(t,e)},function(e){p(t,e)})}catch(e){p(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}var r,_,E,b,T=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},I=0,S=void 0,C=void 0,A=function(e,t){P[I]=e,P[I+1]=t,2===(I+=2)&&(C?C(n):L())},M="undefined"!=typeof window?window:void 0,O=M||{},N=O.MutationObserver||O.WebKitMutationObserver,x="undefined"==typeof self&&void 0!==V&&"[object process]"==={}.toString.call(V),D="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,P=new Array(1e3),L=void 0;L=x?function(){return V.nextTick(n)}:N?(_=0,E=new N(n),b=document.createTextNode(""),E.observe(b,{characterData:!0}),function(){b.data=_=++_%2}):D?((r=new MessageChannel).port1.onmessage=n,function(){return r.port2.postMessage(0)}):void 0===M?function(){try{var e=q(4);return void 0!==(S=e.runOnLoop||e.runOnContext)?function(){S(n)}:t()}catch(e){return t()}}():t();var U=Math.random().toString(36).substring(16),k=void 0,R=1,B=2,F=new e,j=new e,$=0;return i.prototype._enumerate=function(e){for(var t=0;this._state===k&&t<e.length;t++)this._eachEntry(e[t],t)},i.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,o=n.resolve;if(o===c){var i=s(t);if(i===a&&t._state!==k)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===w){var r=new n(l);h(r,t,i),this._willSettleAt(r,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(o(t),e)},i.prototype._settledAt=function(e,t,n){var o=this.promise;o._state===k&&(this._remaining--,e===B?p(o,n):this._result[t]=n),0===this._remaining&&d(o,this._result)},i.prototype._willSettleAt=function(e,t){var n=this;g(e,void 0,function(e){return n._settledAt(R,t,e)},function(e){return n._settledAt(B,t,e)})},w.all=function(e){return new i(this,e).promise},w.race=function(i){var r=this;return new r(T(i)?function(e,t){for(var n=i.length,o=0;o<n;o++)r.resolve(i[o]).then(e,t)}:function(e,t){return t(new TypeError("You must pass an array to race."))})},w.resolve=c,w.reject=function(e){var t=new this(l);return p(t,e),t},w._setScheduler=function(e){C=e},w._setAsap=function(e){A=e},w._asap=A,w.prototype={constructor:w,then:a,catch:function(e){return this.then(null,e)}},w.polyfill=function(){var e=void 0;if(void 0!==J)e=J;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=w},w.Promise=w}()}).call(t,q(2),q(3))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function r(){p&&f&&(p=!1,f.length?d=f.concat(d):g=-1,d.length&&s())}function s(){if(!p){var e=i(r);p=!0;for(var t=d.length;t;){for(f=d,d=[];++g<t;)f&&f[g].run();g=-1,t=d.length}f=null,p=!1,function(t){if(l===clearTimeout)return clearTimeout(t);if((l===o||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}(e)}}function a(e,t){this.fun=e,this.array=t}function c(){}var u,l,h=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{l="function"==typeof clearTimeout?clearTimeout:o}catch(e){l=o}}();var f,d=[],p=!1,g=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new a(e,t)),1!==d.length||p||i(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(xB,yB){var zB;zB=function(){return this}();try{zB=zB||Function("return this")()||eval("this")}catch(xB){"object"==typeof window&&(zB=window)}xB.exports=zB},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=["text/plain","text/html"],i=function(){(console.warn||console.log).call(arguments)}.bind(console,"[clipboard-polyfill]"),r=!0;t.suppressDTWarnings=function(){r=!1};var s=function(){function e(){this.m={}}return e.prototype.setData=function(e,t){r&&-1===o.indexOf(e)&&i("Unknown data type: "+e,"Call clipboard.suppressWarnings() to suppress this warning."),this.m[e]=t},e.prototype.getData=function(e){return this.m[e]},e.prototype.forEach=function(e){for(var t in this.m)e(this.m[t],t)},e}();t.DT=s}])});