!function t(n,r,e){function i(o,a){if(!r[o]){if(!n[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(u)return u(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=r[o]={exports:{}};n[o][0].call(f.exports,function(t){var r=n[o][1][t];return i(r?r:t)},f,f.exports,t,n,r,e)}return r[o].exports}for(var u="function"==typeof require&&require,o=0;oi;i++)a[i]=e[i].fn;return a},i.prototype.emit=function(t,n,r,e,i,o){var a=u?u+t:t;if(!this._events||!this._events[a])return!1;var c,f,s=this._events[a],l=arguments.length;if("function"==typeof s.fn){switch(s.once&&this.removeListener(t,s.fn,void 0,!0),l){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,n),!0;case 3:return s.fn.call(s.context,n,r),!0;case 4:return s.fn.call(s.context,n,r,e),!0;case 5:return s.fn.call(s.context,n,r,e,i),!0;case 6:return s.fn.call(s.context,n,r,e,i,o),!0}for(f=1,c=new Array(l-1);l>f;f++)c[f-1]=arguments[f];s.fn.apply(s.context,c)}else{var p,h=s.length;for(f=0;h>f;f++)switch(s[f].once&&this.removeListener(t,s[f].fn,void 0,!0),l){case 1:s[f].fn.call(s[f].context);break;case 2:s[f].fn.call(s[f].context,n);break;case 3:s[f].fn.call(s[f].context,n,r);break;default:if(!c)for(p=1,c=new Array(l-1);l>p;p++)c[p-1]=arguments[p];s[f].fn.apply(s[f].context,c)}}return!0},i.prototype.on=function(t,n,r){var i=new e(n,r||this),o=u?u+t:t;return this._events||(this._events=u?{}:Object.create(null)),this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):this._events[o]=i,this},i.prototype.once=function(t,n,r){var i=new e(n,r||this,!0),o=u?u+t:t;return this._events||(this._events=u?{}:Object.create(null)),this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):this._events[o]=i,this},i.prototype.removeListener=function(t,n,r,e){var i=u?u+t:t;if(!this._events||!this._events[i])return this;var o=this._events[i],a=[];if(n)if(o.fn)(o.fn!==n||e&&!o.once||r&&o.context!==r)&&a.push(o);else for(var c=0,f=o.length;f>c;c++)(o[c].fn!==n||e&&!o[c].once||r&&o[c].context!==r)&&a.push(o[c]);return a.length?this._events[i]=1===a.length?a[0]:a:delete this._events[i],this},i.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[u?u+t:t]:this._events=u?{}:Object.create(null),this):this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prototype.setMaxListeners=function(){return this},i.prefixed=u,"undefined"!=typeof n&&(n.exports=i)},{}],2:[function(t,n,r){n.exports="function"==typeof Object.create?function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],3:[function(t,n,r){(function(t){(function(){function e(t,n){if(t!==n){var r=null===t,e=t===j,i=t===t,u=null===n,o=n===j,a=n===n;if(t>n&&!u||!i||r&&!o&&a||e&&a)return 1;if(n>t&&!r||!a||u&&!e&&i||o&&i)return-1}return 0}function i(t,n,r){for(var e=t.length,i=r?e:-1;r?i--:++i-1;);return r}function f(t,n){for(var r=t.length;r--&&n.indexOf(t.charAt(r))>-1;);return r}function s(t,n){return e(t.criteria,n.criteria)||t.index-n.index}function l(t,n,r){for(var i=-1,u=t.criteria,o=n.criteria,a=u.length,c=r.length;++i=c)return f;var s=r[i];return f*("asc"===s||s===!0?1:-1)}}return t.index-n.index}function p(t){return Pt[t]}function h(t){return Kt[t]}function v(t,n,r){return n?t=Yt[t]:r&&(t=Jt[t]),"\\"+t}function _(t){return"\\"+Jt[t]}function g(t,n,r){for(var e=t.length,i=n+(r?0:-1);r?i--:++i=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function m(t,n){for(var r=-1,e=t.length,i=-1,u=[];++rn,i=r?t.length:0,u=Hr(0,i,this.__views__),o=u.start,a=u.end,c=a-o,f=e?a:o-1,s=this.__iteratees__,l=s.length,p=0,h=ko(c,this.__takeCount__);if(!r||q>i||i==c&&h==c)return er(e&&r?t.reverse():t,this.__actions__);var v=[];t:for(;c--&&h>p;){f+=n;for(var _=-1,g=t[f];++_=q?_r(n):null,f=n.length;c&&(o=Gt,a=!1,n=c);t:for(;++ir&&(r=-r>i?0:i+r),e=e===j||e>i?i:+e||0,0>e&&(e+=i),i=r>e?0:e>>>0,r>>>=0;i>r;)t[r++]=n;return t}function Sn(t,n){var r=[];return Fo(t,function(t,e,i){n(t,e,i)&&r.push(t)}),r}function In(t,n,r,e){var i;return r(t,function(t,r,u){return n(t,r,u)?(i=e?r:t,!1):void 0}),i}function Tn(t,n,r,e){e||(e=[]);for(var i=-1,u=t.length;++ie;)t=t[n[e++]];return e&&e==i?t:j}}function Fn(t,n,r,e,i,u){return t===n?!0:null==t||null==n||!Ui(t)&&!y(n)?t!==t&&n!==n:Wn(t,n,Fn,r,e,i,u)}function Wn(t,n,r,e,i,u,o){var a=Ia(t),c=Ia(n),f=H,s=H;a||(f=ro.call(t),f==K?f=Q:f!=Q&&(a=Mi(t))),c||(s=ro.call(n),s==K?s=Q:s!=Q&&(c=Mi(n)));var l=f==Q,p=s==Q,h=f==s;if(h&&!a&&!l)return Dr(t,n,f);if(!i){var v=l&&to.call(t,"__wrapped__"),_=p&&to.call(n,"__wrapped__");if(v||_)return r(v?t.value():t,_?n.value():n,e,i,u,o)}if(!h)return!1;u||(u=[]),o||(o=[]);for(var g=u.length;g--;)if(u[g]==t)return o[g]==n;u.push(t),o.push(n);var y=(a?Nr:qr)(t,n,r,e,i,u,o);return u.pop(),o.pop(),y}function Nn(t,n,r){var e=n.length,i=e,u=!r;if(null==t)return!i;for(t=le(t);e--;){var o=n[e];if(u&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++en&&(n=-n>i?0:i+n),r=r===j||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var u=qu(i);++e=q,c=a?_r():null,f=[];c?(e=Gt,o=!1):(a=!1,c=n?[]:f);t:for(;++r=i){for(;i>e;){var u=e+i>>>1,o=t[u];(r?n>=o:n>o)&&null!==o?e=u+1:i=u}return i}return ur(t,n,Ou,r)}function ur(t,n,r,e){n=r(n);for(var i=0,u=t?t.length:0,o=n!==n,a=null===n,c=n===j;u>i;){var f=yo((i+u)/2),s=r(t[f]),l=s!==j,p=s===s;if(o)var h=p||e;else h=a?p&&l&&(e||null!=s):c?p&&(e||l):null==s?!1:e?n>=s:n>s;h?i=f+1:u=f}return ko(u,To)}function or(t,n,r){if("function"!=typeof t)return Ou;if(n===j)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 3:return function(r,e,i){return t.call(n,r,e,i)};case 4:return function(r,e,i,u){return t.call(n,r,e,i,u)};case 5:return function(r,e,i,u,o){return t.call(n,r,e,i,u,o)}}return function(){return t.apply(n,arguments)}}function ar(t){var n=new uo(t.byteLength),r=new ho(n);return r.set(new ho(t)),n}function cr(t,n,r){for(var e=r.length,i=-1,u=xo(t.length-e,0),o=-1,a=n.length,c=qu(a+u);++o2?r[i-2]:j,o=i>2?r[2]:j,a=i>1?r[i-1]:j;for("function"==typeof u?(u=or(u,a,5),i-=2):(u="function"==typeof a?a:j,i-=u?1:0),o&&Qr(r[0],r[1],o)&&(u=3>i?j:u,i=1);++e-1?r[o]:j}return In(r,e,t)}}function xr(t){return function(n,r,e){return n&&n.length?(r=Br(r,e,3),i(n,r,t)):-1}}function kr(t){return function(n,r,e){return r=Br(r,e,3),In(n,r,t,!0)}}function Ar(t){return function(){for(var n,r=arguments.length,e=t?r:-1,i=0,u=qu(r);t?e--:++e=q)return n.plant(e).value();for(var i=0,o=r?u[i].apply(this,t):e;++id){var A=a?tn(a):j,E=xo(f-d,0),I=v?k:j,T=v?j:k,R=v?b:j,U=v?j:b;n|=v?C:$,n&=~(v?$:C),_||(n&=~(O|S));var L=[t,n,r,R,I,U,T,A,c,E],F=Cr.apply(j,L);return ne(t)&&Mo(F,L),F.placeholder=x,F}}var W=p?r:this,N=h?W[t]:t;return a&&(b=ce(b,a)),l&&c=n||!wo(n))return"";var i=n-e;return r=null==r?" ":r+"",gu(r,_o(i/r.length)).slice(0,i)}function Ur(t,n,r,e){function i(){for(var n=-1,a=arguments.length,c=-1,f=e.length,s=qu(f+a);++cc))return!1;for(;++a-1&&t%1==0&&n>t}function Qr(t,n,r){if(!Ui(r))return!1;var e=typeof n;if("number"==e?Gr(r)&&Xr(n,r.length):"string"==e&&n in r){var i=r[n];return t===t?t===i:i!==i}return!1}function te(t,n){var r=typeof t;if("string"==r&&jt.test(t)||"number"==r)return!0;if(Ia(t))return!1;var e=!At.test(t);return e||null!=n&&t in le(n)}function ne(t){var r=zr(t);if(!(r in G.prototype))return!1;var e=n[r];if(t===e)return!0;var i=Bo(e);return!!i&&t===i[0]}function re(t){return"number"==typeof t&&t>-1&&t%1==0&&Co>=t}function ee(t){return t===t&&!Ui(t)}function ie(t,n){var r=t[1],e=n[1],i=r|e,u=U>i,o=e==U&&r==T||e==U&&r==L&&t[7].length<=n[8]||e==(U|L)&&r==T;if(!u&&!o)return t;e&O&&(t[2]=n[2],i|=r&O?0:I);var a=n[3];if(a){var c=t[3];t[3]=c?cr(c,a,n[4]):tn(a),t[4]=c?m(t[3],P):tn(n[4])}return a=n[5],a&&(c=t[5],t[5]=c?fr(c,a,n[6]):tn(a),t[6]=c?m(t[5],P):tn(n[6])),a=n[7],a&&(t[7]=tn(a)),e&U&&(t[8]=null==t[8]?n[8]:ko(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function ue(t,n){return t===j?n:Ta(t,n,ue)}function oe(t,n){t=le(t);for(var r=-1,e=n.length,i={};++re;)o[++u]=Jn(t,e,e+=n);return o}function _e(t){for(var n=-1,r=t?t.length:0,e=-1,i=[];++nn?0:n)):[]}function ye(t,n,r){var e=t?t.length:0;return e?((r?Qr(t,n,r):null==n)&&(n=1),n=e-(+n||0),Jn(t,0,0>n?0:n)):[]}function de(t,n,r){return t&&t.length?rr(t,Br(n,r,3),!0,!0):[]}function me(t,n,r){return t&&t.length?rr(t,Br(n,r,3),!0):[]}function we(t,n,r,e){var i=t?t.length:0;return i?(r&&"number"!=typeof r&&Qr(t,n,r)&&(r=0,e=i),On(t,n,r,e)):[]}function be(t){return t?t[0]:j}function xe(t,n,r){var e=t?t.length:0;return r&&Qr(t,n,r)&&(n=!1),e?Tn(t,n):[]}function ke(t){var n=t?t.length:0;return n?Tn(t,!0):[]}function Ae(t,n,r){var e=t?t.length:0;if(!e)return-1;if("number"==typeof r)r=0>r?xo(e+r,0):r;else if(r){var i=ir(t,n);return e>i&&(n===n?n===t[i]:t[i]!==t[i])?i:-1}return u(t,n,r||0)}function je(t){return ye(t,1)}function Ee(t){var n=t?t.length:0;return n?t[n-1]:j}function Oe(t,n,r){var e=t?t.length:0;if(!e)return-1;var i=e;if("number"==typeof r)i=(0>r?xo(e+r,0):ko(r||0,e-1))+1;else if(r){i=ir(t,n,!0)-1;var u=t[i];return(n===n?n===u:u!==u)?i:-1}if(n!==n)return g(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1}function Se(){var t=arguments,n=t[0];if(!n||!n.length)return n;for(var r=0,e=Mr(),i=t.length;++r-1;)po.call(n,u,1);return n}function Ie(t,n,r){var e=[];if(!t||!t.length)return e;var i=-1,u=[],o=t.length;for(n=Br(n,r,3);++in?0:n)):[]}function $e(t,n,r){var e=t?t.length:0;return e?((r?Qr(t,n,r):null==n)&&(n=1),n=e-(+n||0),Jn(t,0>n?0:n)):[]}function Ue(t,n,r){return t&&t.length?rr(t,Br(n,r,3),!1,!0):[]}function Le(t,n,r){return t&&t.length?rr(t,Br(n,r,3)):[]}function Fe(t,n,r,e){var i=t?t.length:0;if(!i)return[];null!=n&&"boolean"!=typeof n&&(e=r,r=Qr(t,n,e)?j:n,n=!1);var o=Br();return(null!=r||o!==bn)&&(r=o(r,e,3)),n&&Mr()==u?w(t,r):tr(t,r)}function We(t){if(!t||!t.length)return[];var n=-1,r=0;t=cn(t,function(t){return Gr(t)?(r=xo(t.length,r),!0):void 0});for(var e=qu(r);++nr?xo(i+r,0):r||0,"string"==typeof t||!Ia(t)&&zi(t)?i>=r&&t.indexOf(n,r)>-1:!!i&&Mr(t,n,r)>-1}function ti(t,n,r){var e=Ia(t)?fn:Dn;return n=Br(n,r,3),e(t,n)}function ni(t,n){return ti(t,$u(n))}function ri(t,n,r){var e=Ia(t)?cn:Sn;return n=Br(n,r,3),e(t,function(t,r,e){return!n(t,r,e)})}function ei(t,n,r){if(r?Qr(t,n,r):null==n){t=se(t);var e=t.length;return e>0?t[Vn(0,e-1)]:j}var i=-1,u=Vi(t),e=u.length,o=e-1;for(n=ko(0>n?0:+n||0,e);++i0&&(r=n.apply(this,arguments)),1>=t&&(n=j),r}}function hi(t,n,r){function e(){h&&oo(h),f&&oo(f),_=0,f=h=v=j}function i(n,r){r&&oo(r),f=h=v=j,n&&(_=_a(),s=t.apply(p,c),h||f||(c=p=j))}function u(){var t=n-(_a()-l);0>=t||t>n?i(v,f):h=lo(u,t)}function o(){i(y,h)}function a(){if(c=arguments,l=_a(),p=this,v=y&&(h||!d),g===!1)var r=d&&!h;else{f||d||(_=l);var e=g-(l-_),i=0>=e||e>g;i?(f&&(f=oo(f)),_=l,s=t.apply(p,c)):f||(f=lo(o,e))}return i&&h?h=oo(h):h||n===g||(h=lo(u,n)),r&&(i=!0,s=t.apply(p,c)),!i||h||f||(c=p=j),s}var c,f,s,l,p,h,v,_=0,g=!1,y=!0;if("function"!=typeof t)throw new Ju(M);if(n=0>n?0:+n||0,r===!0){var d=!0;y=!1}else Ui(r)&&(d=!!r.leading,g="maxWait"in r&&xo(+r.maxWait||0,n),y="trailing"in r?!!r.trailing:y);return a.cancel=e,a}function vi(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new Ju(M);var r=function(){var e=arguments,i=n?n.apply(this,e):e[0],u=r.cache;if(u.has(i))return u.get(i);var o=t.apply(this,e);return r.cache=u.set(i,o),o};return r.cache=new vi.Cache,r}function _i(t){if("function"!=typeof t)throw new Ju(M);return function(){return!t.apply(this,arguments)}}function gi(t){return pi(2,t)}function yi(t,n){if("function"!=typeof t)throw new Ju(M);return n=xo(n===j?t.length-1:+n||0,0),function(){for(var r=arguments,e=-1,i=xo(r.length-n,0),u=qu(i);++en}function Ai(t,n){return t>=n}function ji(t){return y(t)&&Gr(t)&&to.call(t,"callee")&&!fo.call(t,"callee")}function Ei(t){return t===!0||t===!1||y(t)&&ro.call(t)==V}function Oi(t){return y(t)&&ro.call(t)==Y}function Si(t){return!!t&&1===t.nodeType&&y(t)&&!qi(t)}function Ii(t){return null==t?!0:Gr(t)&&(Ia(t)||zi(t)||ji(t)||y(t)&&$i(t.splice))?!t.length:!qa(t).length; }function Ti(t,n,r,e){r="function"==typeof r?or(r,e,3):j;var i=r?r(t,n):j;return i===j?Fn(t,n,r):!!i}function Ri(t){return y(t)&&"string"==typeof t.message&&ro.call(t)==J}function Ci(t){return"number"==typeof t&&wo(t)}function $i(t){return Ui(t)&&ro.call(t)==Z}function Ui(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Li(t,n,r,e){return r="function"==typeof r?or(r,e,3):j,Nn(t,Pr(n),r)}function Fi(t){return Di(t)&&t!=+t}function Wi(t){return null==t?!1:$i(t)?io.test(Qu.call(t)):y(t)&&Ut.test(t)}function Ni(t){return null===t}function Di(t){return"number"==typeof t||y(t)&&ro.call(t)==X}function qi(t){var n;if(!y(t)||ro.call(t)!=Q||ji(t)||!to.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var r;return Rn(t,function(t,n){r=n}),r===j||to.call(t,r)}function Bi(t){return Ui(t)&&ro.call(t)==tt}function zi(t){return"string"==typeof t||y(t)&&ro.call(t)==rt}function Mi(t){return y(t)&&re(t.length)&&!!zt[ro.call(t)]}function Pi(t){return t===j}function Ki(t,n){return n>t}function Hi(t,n){return n>=t}function Vi(t){var n=t?zo(t):0;return re(n)?n?tn(t):[]:uu(t)}function Yi(t){return wn(t,tu(t))}function Ji(t,n,r){var e=Lo(t);return r&&Qr(t,n,r)&&(n=j),n?dn(e,n):e}function Zi(t){return Un(t,tu(t))}function Gi(t,n,r){var e=null==t?j:Ln(t,pe(n),n+"");return e===j?r:e}function Xi(t,n){if(null==t)return!1;var r=to.call(t,n);if(!r&&!te(n)){if(n=pe(n),t=1==n.length?t:Ln(t,Jn(n,0,-1)),null==t)return!1;n=Ee(n),r=to.call(t,n)}return r||re(t.length)&&Xr(n,t.length)&&(Ia(t)||ji(t))}function Qi(t,n,r){r&&Qr(t,n,r)&&(n=j);for(var e=-1,i=qa(t),u=i.length,o={};++e0;++e=ko(n,r)&&tr?0:+r||0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r}function pu(t){return t=a(t),t&&wt.test(t)?t.replace(dt,h):t}function hu(t){return t=a(t),t&&St.test(t)?t.replace(Ot,v):t||"(?:)"}function vu(t,n,r){t=a(t),n=+n;var e=t.length;if(e>=n||!wo(n))return t;var i=(n-e)/2,u=yo(i),o=_o(i);return r=$r("",o,r),r.slice(0,u)+t+r}function _u(t,n,r){return(r?Qr(t,n,r):null==n)?n=0:n&&(n=+n),t=mu(t),jo(t,n||($t.test(t)?16:10))}function gu(t,n){var r="";if(t=a(t),n=+n,1>n||!t||!wo(n))return r;do n%2&&(r+=t),n=yo(n/2),t+=t;while(n);return r}function yu(t,n,r){return t=a(t),r=null==r?0:ko(0>r?0:+r||0,t.length),t.lastIndexOf(n,r)==r}function du(t,r,e){var i=n.templateSettings;e&&Qr(t,r,e)&&(r=e=j),t=a(t),r=yn(dn({},e||r),i,gn);var u,o,c=yn(dn({},r.imports),i.imports,gn),f=qa(c),s=nr(c,f),l=0,p=r.interpolate||Wt,h="__p += '",v=Vu((r.escape||Wt).source+"|"+p.source+"|"+(p===kt?Rt:Wt).source+"|"+(r.evaluate||Wt).source+"|$","g"),g="//# sourceURL="+("sourceURL"in r?r.sourceURL:"lodash.templateSources["+ ++Bt+"]")+"\n";t.replace(v,function(n,r,e,i,a,c){return e||(e=i),h+=t.slice(l,c).replace(Nt,_),r&&(u=!0,h+="' +\n__e("+r+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=c+n.length,n}),h+="';\n";var y=r.variable;y||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(vt,""):h).replace(_t,"$1").replace(gt,"$1;"),h="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var d=Ga(function(){return Mu(f,g+"return "+h).apply(j,s)});if(d.source=h,Ri(d))throw d;return d}function mu(t,n,r){var e=t;return(t=a(t))?(r?Qr(e,n,r):null==n)?t.slice(b(t),x(t)+1):(n+="",t.slice(c(t,n),f(t,n)+1)):t}function wu(t,n,r){var e=t;return t=a(t),t?t.slice((r?Qr(e,n,r):null==n)?b(t):c(t,n+"")):t}function bu(t,n,r){var e=t;return t=a(t),t?(r?Qr(e,n,r):null==n)?t.slice(0,x(t)+1):t.slice(0,f(t,n+"")+1):t}function xu(t,n,r){r&&Qr(t,n,r)&&(n=j);var e=F,i=W;if(null!=n)if(Ui(n)){var u="separator"in n?n.separator:u;e="length"in n?+n.length||0:e,i="omission"in n?a(n.omission):i}else e=+n||0;if(t=a(t),e>=t.length)return t;var o=e-i.length;if(1>o)return i;var c=t.slice(0,o);if(null==u)return c+i;if(Bi(u)){if(t.slice(o).search(u)){var f,s,l=t.slice(0,o);for(u.global||(u=Vu(u.source,(Ct.exec(u)||"")+"g")),u.lastIndex=0;f=u.exec(l);)s=f.index;c=c.slice(0,null==s?o:s)}}else if(t.indexOf(u,o)!=o){var p=c.lastIndexOf(u);p>-1&&(c=c.slice(0,p))}return c+i}function ku(t){return t=a(t),t&&mt.test(t)?t.replace(yt,k):t}function Au(t,n,r){return r&&Qr(t,n,r)&&(n=j),t=a(t),t.match(n||Dt)||[]}function ju(t,n,r){return r&&Qr(t,n,r)&&(n=j),y(t)?Su(t):bn(t,n)}function Eu(t){return function(){return t}}function Ou(t){return t}function Su(t){return qn(xn(t,!0))}function Iu(t,n){return Bn(t,xn(n,!0))}function Tu(t,n,r){if(null==r){var e=Ui(n),i=e?qa(n):j,u=i&&i.length?Un(n,i):j;(u?u.length:e)||(u=!1,r=n,n=t,t=this)}u||(u=Un(n,qa(n)));var o=!0,a=-1,c=$i(t),f=u.length;r===!1?o=!1:Ui(r)&&"chain"in r&&(o=r.chain);for(;++at||!wo(t))return[];var e=-1,i=qu(ko(t,Io));for(n=or(n,r,1);++ee?i[e]=n(e):n(e);return i}function Wu(t){var n=++no;return a(t)+n}function Nu(t,n){return(+t||0)+(+n||0)}function Du(t,n,r){return r&&Qr(t,n,r)&&(n=j),n=Br(n,r,3),1==n.length?vn(Ia(t)?t:se(t),n):Qn(t,n)}t=t?en.defaults(rn.Object(),t,en.pick(rn,qt)):rn;{var qu=t.Array,Bu=t.Date,zu=t.Error,Mu=t.Function,Pu=t.Math,Ku=t.Number,Hu=t.Object,Vu=t.RegExp,Yu=t.String,Ju=t.TypeError,Zu=qu.prototype,Gu=Hu.prototype,Xu=Yu.prototype,Qu=Mu.prototype.toString,to=Gu.hasOwnProperty,no=0,ro=Gu.toString,eo=rn._,io=Vu("^"+Qu.call(to).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uo=t.ArrayBuffer,oo=t.clearTimeout,ao=t.parseFloat,co=Pu.pow,fo=Gu.propertyIsEnumerable,so=Kr(t,"Set"),lo=t.setTimeout,po=Zu.splice,ho=t.Uint8Array,vo=Kr(t,"WeakMap"),_o=Pu.ceil,go=Kr(Hu,"create"),yo=Pu.floor,mo=Kr(qu,"isArray"),wo=t.isFinite,bo=Kr(Hu,"keys"),xo=Pu.max,ko=Pu.min,Ao=Kr(Bu,"now"),jo=t.parseInt,Eo=Pu.random,Oo=Ku.NEGATIVE_INFINITY,So=Ku.POSITIVE_INFINITY,Io=4294967295,To=Io-1,Ro=Io>>>1,Co=9007199254740991,$o=vo&&new vo,Uo={};n.support={}}n.templateSettings={escape:bt,evaluate:xt,interpolate:kt,variable:"",imports:{_:n}};var Lo=function(){function t(){}return function(n){if(Ui(n)){t.prototype=n;var r=new t;t.prototype=j}return r||{}}}(),Fo=pr(Cn),Wo=pr($n,!0),No=hr(),Do=hr(!0),qo=$o?function(t,n){return $o.set(t,n),t}:Ou,Bo=$o?function(t){return $o.get(t)}:Cu,zo=Pn("length"),Mo=function(){var t=0,n=0;return function(r,e){var i=_a(),u=D-(i-n);if(n=i,u>0){if(++t>=N)return r}else t=0;return qo(r,e)}}(),Po=yi(function(t,n){return y(t)&&Gr(t)?An(t,Tn(n,!1,!0)):[]}),Ko=xr(),Ho=xr(!0),Vo=yi(function(t){for(var n=t.length,r=n,e=qu(l),i=Mr(),o=i==u,a=[];r--;){var c=t[r]=Gr(c=t[r])?c:[];e[r]=o&&c.length>=120?_r(r&&c):null}var f=t[0],s=-1,l=f?f.length:0,p=e[0];t:for(;++s2?t[n-2]:j,e=n>1?t[n-1]:j;return n>2&&"function"==typeof r?n-=2:(r=n>1&&"function"==typeof e?(--n,e):j,e=j),t.length=n,Ne(t,r,e)}),na=yi(function(t){return t=Tn(t),this.thru(function(n){return Qt(Ia(n)?n:[le(n)],t)})}),ra=yi(function(t,n){return mn(t,Tn(n))}),ea=sr(function(t,n,r){to.call(t,r)?++t[r]:t[r]=1}),ia=br(Fo),ua=br(Wo,!0),oa=jr(nn,Fo),aa=jr(un,Wo),ca=sr(function(t,n,r){to.call(t,r)?t[r].push(n):t[r]=[n]}),fa=sr(function(t,n,r){t[r]=n}),sa=yi(function(t,n,r){var e=-1,i="function"==typeof n,u=te(n),o=Gr(t)?qu(t.length):[];return Fo(t,function(t){var a=i?n:u&&null!=t?t[n]:j;o[++e]=a?a.apply(t,r):Zr(t,n,r)}),o}),la=sr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),pa=Rr(ln,Fo),ha=Rr(pn,Wo),va=yi(function(t,n){if(null==t)return[];var r=n[2];return r&&Qr(n[0],n[1],r)&&(n.length=1),Xn(t,Tn(n),[])}),_a=Ao||function(){return(new Bu).getTime()},ga=yi(function(t,n,r){var e=O;if(r.length){var i=m(r,ga.placeholder);e|=C}return Wr(t,e,n,r,i)}),ya=yi(function(t,n){n=n.length?Tn(n):Zi(t);for(var r=-1,e=n.length;++r0||0>n)?new G(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==j&&(n=+n||0,r=0>n?r.dropRight(-n):r.take(n-t)),r)},G.prototype.takeRightWhile=function(t,n){return this.reverse().takeWhile(t,n).reverse()},G.prototype.toArray=function(){return this.take(So)},Cn(G.prototype,function(t,r){var e=/^(?:filter|map|reject)|While$/.test(r),i=/^(?:first|last)$/.test(r),u=n[i?"take"+("last"==r?"Right":""):r];u&&(n.prototype[r]=function(){var n=i?[1]:arguments,r=this.__chain__,o=this.__wrapped__,a=!!this.__actions__.length,c=o instanceof G,f=n[0],s=c||Ia(o);s&&e&&"function"==typeof f&&1!=f.length&&(c=s=!1);var l=function(t){return i&&r?u(t,1)[0]:u.apply(j,sn([t],n))},p={func:Me,args:[l],thisArg:j},h=c&&!a;if(i&&!r)return h?(o=o.clone(),o.__actions__.push(p),t.call(o)):u.call(j,this.value())[0];if(!i&&s){o=h?o:new G(this);var v=t.apply(o,n);return v.__actions__.push(p),new d(v,r)}return this.thru(l)})}),nn(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var r=(/^(?:replace|split)$/.test(t)?Xu:Zu)[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?r.apply(this.value(),t):this[e](function(n){return r.apply(n,t)})}}),Cn(G.prototype,function(t,r){var e=n[r];if(e){var i=e.name,u=Uo[i]||(Uo[i]=[]);u.push({name:r,func:e})}}),Uo[Cr(j,S).name]=[{name:"wrapper",func:j}],G.prototype.clone=nt,G.prototype.reverse=et,G.prototype.value=Pt,n.prototype.chain=Pe,n.prototype.commit=Ke,n.prototype.concat=na,n.prototype.plant=He,n.prototype.reverse=Ve,n.prototype.toString=Ye,n.prototype.run=n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=Je,n.prototype.collect=n.prototype.map,n.prototype.head=n.prototype.first,n.prototype.select=n.prototype.filter,n.prototype.tail=n.prototype.rest,n}var j,E="3.10.1",O=1,S=2,I=4,T=8,R=16,C=32,$=64,U=128,L=256,F=30,W="...",N=150,D=16,q=200,B=1,z=2,M="Expected a function",P="__lodash_placeholder__",K="[object Arguments]",H="[object Array]",V="[object Boolean]",Y="[object Date]",J="[object Error]",Z="[object Function]",G="[object Map]",X="[object Number]",Q="[object Object]",tt="[object RegExp]",nt="[object Set]",rt="[object String]",et="[object WeakMap]",it="[object ArrayBuffer]",ut="[object Float32Array]",ot="[object Float64Array]",at="[object Int8Array]",ct="[object Int16Array]",ft="[object Int32Array]",st="[object Uint8Array]",lt="[object Uint8ClampedArray]",pt="[object Uint16Array]",ht="[object Uint32Array]",vt=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,gt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yt=/&(?:amp|lt|gt|quot|#39|#96);/g,dt=/[&<>"'`]/g,mt=RegExp(yt.source),wt=RegExp(dt.source),bt=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,jt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Ot=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,St=RegExp(Ot.source),It=/[\u0300-\u036f\ufe20-\ufe23]/g,Tt=/\\(\\)?/g,Rt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ct=/\w*$/,$t=/^0[xX]/,Ut=/^\[object .+?Constructor\]$/,Lt=/^\d+$/,Ft=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Wt=/($^)/,Nt=/['\n\r\u2028\u2029\\]/g,Dt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",n="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+n+")|"+t+"?"+n+"|"+t+"+|[0-9]+","g")}(),qt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Bt=-1,zt={};zt[ut]=zt[ot]=zt[at]=zt[ct]=zt[ft]=zt[st]=zt[lt]=zt[pt]=zt[ht]=!0,zt[K]=zt[H]=zt[it]=zt[V]=zt[Y]=zt[J]=zt[Z]=zt[G]=zt[X]=zt[Q]=zt[tt]=zt[nt]=zt[rt]=zt[et]=!1;var Mt={};Mt[K]=Mt[H]=Mt[it]=Mt[V]=Mt[Y]=Mt[ut]=Mt[ot]=Mt[at]=Mt[ct]=Mt[ft]=Mt[X]=Mt[Q]=Mt[tt]=Mt[rt]=Mt[st]=Mt[lt]=Mt[pt]=Mt[ht]=!0,Mt[J]=Mt[Z]=Mt[G]=Mt[nt]=Mt[et]=!1;var Pt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Kt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ht={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Vt={"function":!0,object:!0},Yt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Jt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zt=Vt[typeof r]&&r&&!r.nodeType&&r,Gt=Vt[typeof n]&&n&&!n.nodeType&&n,Xt=Zt&&Gt&&"object"==typeof t&&t&&t.Object&&t,Qt=Vt[typeof self]&&self&&self.Object&&self,tn=Vt[typeof window]&&window&&window.Object&&window,nn=Gt&&Gt.exports===Zt&&Zt,rn=Xt||tn!==(this&&this.window)&&tn||Qt||this,en=A();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(rn._=en,define(function(){return en})):Zt&&Gt?nn?(Gt.exports=en)._=en:Zt._=en:rn._=en}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,n,r){"use strict";var e="undefined"!=typeof t;if("undefined"==typeof i){if(!e)throw new Error("nio.js requires lodash");var i=t("lodash")}n.exports={_:i,eventemitter3:t("eventemitter3"),inherits:t("inherits")}},{eventemitter3:1,inherits:2,lodash:3}],5:[function(t,n,r){"use strict";!function(){var r=t("./deps"),e=r._.assign({_:r._,Stream:t("./stream"),utils:t("./utils"),source:t("./sources")},t("./streams"));"undefined"!=typeof n&&n.exports&&(n.exports=e),"undefined"!=typeof window&&(window.nio=e)}()},{"./deps":4,"./sources":7,"./stream":9,"./streams":10,"./utils":11}],6:[function(t,n,r){function e(t,n,r){return this instanceof e?(this.dataTemplate=t,this.maxTimes=n,this.rate=r,this.numIterations=0,this.interval=!1,u.defaults(this,{dataTemplate:{},rate:100,maxTimes:1}),void a.call(this)):new e(t,n,r)}var i=t("../deps"),u=i._,o=i.inherits,a=t("../stream");o(e,a),e.prototype.oninit=function(){return this.interval=setInterval(this.generate.bind(this),this.rate),this},e.prototype.generate=function(){this.maxTimes>=0&&this.numIterations>=this.maxTimes?this.interval&&clearInterval(this.interval):this.push(this.getSignal(this.numIterations++))},e.prototype.getSignal=function(t){return u.isFunction(this.dataTemplate)?this.dataTemplate(t):this.dataTemplate},n.exports=e},{"../deps":4,"../stream":9}],7:[function(t,n,r){n.exports={socketio:t("./socketio"),generate:t("./generate")}},{"./generate":6,"./socketio":8}],8:[function(t,n,r){function e(t,n,r){return this instanceof e?(this.host=t,this.rooms=n,this.maxLookback=r,this.sock=null,void a.call(this)):new e(t,n,r)}var i=t("../deps"),u=i._,o=i.inherits,a=t("../stream"),c=t("../utils");o(e,a),e.prototype.oninit=function(){if(!window.io){var t=c.script(this.host+"/socket.io/socket.io.js");return t.onload=function(){this.oninit()}.bind(this),this}return this.connectToSocket()},e.prototype.connectToSocket=function(){var t=this.sock=io.connect(this.host,{"force new connection":!0});return t.on("connect",function(){u.each(this.rooms,function(n){"undefined"==typeof this.maxLookback?t.emit("ready",n):t.emit("ready",{room:n,fromTime:this.maxLookback})},this)}.bind(this)),t.on("connect_failed",function(t){console.error("connection failed"),console.error(t)}),t.on("error",function(t){console.error("connection error"),console.error(t)}),t.on("recvData",function(t){this.push(JSON.parse(t))}.bind(this)),this},e.prototype.onpause=function(){this.sock&&this.sock.disconnect(),this.sock=null},e.prototype.onresume=function(){return this.sock&&this.sock.connected?void console.error("Resumed a connected socket...call pause first"):void this.connectToSocket()},e.prototype.onwrite=function(t){this.sock&&this.sock.connected?this.sock.emit("pub",JSON.stringify(t)):console.error("Socket not connected or is paused")},n.exports=e},{"../deps":4,"../stream":9,"../utils":11}],9:[function(t,n,r){function e(t){return this instanceof e?(a.call(this),this.on("*",function(){var t=[].slice.call(arguments),n=t[0],r=this["on"+n];r&&r.apply(this,t.slice(1))}),u.isFunction(t)?this.onwrite=t:u.isPlainObject(t)&&u.assign(this,t),void this.emit("init")):new e(t)}var i=t("./deps"),u=i._,o=i.inherits,a=i.eventemitter3;o(e,a),e.prototype.emit=function(){var t=[].slice.call(arguments);a.prototype.emit.apply(this,t),t.unshift("*"),a.prototype.emit.apply(this,t)},e.prototype.push=function(t){return this.state===e.STATES.PAUSE?void this.broadcast("pauseddata",t):void(u.isUndefined(t)||u.isNull(t)||u.isEmpty(t)&&(u.isArray(t)||u.isPlainObject(t))||this.emit("data",t))},e.prototype.write=function(t){this.onwrite&&this.onwrite(t)},e.prototype.onwrite=function(t){this.push(t)},e.prototype.pipe=function(){if(u.isArray(arguments[0]))return this.pipe.apply(this,arguments[0]);var t=arguments[0];if(this.on("data",t.write.bind(t)),this.on("broadcast",t.broadcast.bind(t)),arguments.length>1){var n=[].slice.call(arguments,1);t.pipe.apply(t,n)}return t},e.prototype.broadcast=function(){var t=[].slice.call(arguments);return t.unshift("broadcast"),this.emit.apply(this,t),this},e.prototype.onbroadcast=function(){if(0===arguments.length)return console.warn("broadcast() called without any arguments"),this;var t=arguments[0].toUpperCase();t in e.STATES&&(this.state=e.STATES[t]),this.emit.apply(this,arguments)},e.prototype._broadcastOrEmit=function(t){return t===!1?this.emit.bind(this):this.broadcast.bind(this)},e.prototype.reset=function(t){return this._broadcastOrEmit(t)("reset"),this},e.STATES={DEFAULT:0,PAUSE:1,RESUME:2},e.prototype.state=e.STATES.DEFAULT,u.each(e.STATES,function(t,n){n=n.toLowerCase(),e.prototype[n]=function(r){return this.state=t,this._broadcastOrEmit(r)(n),this}}),n.exports=e},{"./deps":4}],10:[function(t,n,r){"use strict";function e(t){if(i.isUndefined(t))return function(t){return t};if(i.isString(t))return function(n){return n[t]};if(i.isFunction(t))return t;throw new Error("value must be a string or function")}var i=t("./deps")._,u=t("./stream");r.func=function(t){return u(function(n){var r=t.call(this,n);this.push(r)})},r.pass=function(t){return u(function(n){t&&t.call(this,i.clone(n)),this.push(n)})},r.filter=function(t){return u(function(n){t.call(this,n)&&this.push(n)})},r.is=function(t,n){return r.filter(function(r){var i=e(t);return i(r)==n})},r.has=function(t){return r.filter(function(n){return t in n})},r.get=function(t){var n=e(t);return r.func(n)},r.single=function(){return u(function(t){i.isArray(t)?i.each(t,this.push,this):this.push(t)})},r.defaults=function(t){return r.func(i.partialRight(i.defaults,t))},r.log=function(t){return r.pass(function(n){t?console.log(t,n):console.log(n)})}},{"./deps":4,"./stream":9}],11:[function(t,n,r){var e=t("./deps"),i=e._;r.linkify=function(t){return t=t.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,'$1'),t=t.replace(/(^|\s)@(\w+)/g,'$1@$2'),t=t.replace(/(^|\s)#(\w+)/g,'$1#$2')},r.truncate=function(t,n){return t.length>n?t.substring(0,n-3)+"...":t},r.cycle=function(t){i.isNumber(t)&&(t=i.range(1,t+1));var n=-1;return function(){n=n===t.length-1?0:n+1;var r=t[n];return i.isFunction(r)?r():r}},r.script=function(t){var n=document.createElement("script");return n.src=t,document.body.appendChild(n),n},r.argsOrArray=function(t){return function(){return i.isArray(arguments[0])?t.apply(t,arguments[0]):t.apply(t,arguments)}},r.utc=function(t){return t?i.isString(t)&&(t=new Date(t)):t=new Date,new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()))},r.windowSize=function(){var t=window,n=document.documentElement,r=document.getElementsByTagName("body")[0],e=t.innerWidth||n.clientWidth||r.clientWidth,i=t.innerHeight||n.clientHeight||r.clientHeight;return{width:e,height:i}},n.exports=r},{"./deps":4}]},{},[5]);