UNPKG

448 kBJavaScriptView Raw
1var Blockv=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=171)}([function(t,e,n){var r=n(2),i=n(8),o=n(16),u=n(13),a=n(21),c=function(t,e,n){var s,l,f,h,p=t&c.F,d=t&c.G,v=t&c.S,y=t&c.P,m=t&c.B,b=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,g=d?i:i[e]||(i[e]={}),w=g.prototype||(g.prototype={});for(s in d&&(n=e),n)f=((l=!p&&b&&void 0!==b[s])?b:n)[s],h=m&&l?a(f,r):y&&"function"==typeof f?a(Function.call,f):f,b&&u(b,s,f,t&c.U),g[s]!=f&&o(g,s,h),y&&w[s]!=f&&(w[s]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.id=n,this.rev=null,this.data=r,this.cached=null}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(64)("wks"),i=n(38),o=n(2).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(23),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(t,e,n){(function(e){var r,i=n(63),o=n(175),u=n(177),a=Array.prototype.slice,c={};r=void 0!==e&&e.console?e.console:"undefined"!=typeof window&&window.console?window.console:{};for(var s=[[function(){},"log"],[function(){r.log.apply(r,arguments)},"info"],[function(){r.log.apply(r,arguments)},"warn"],[function(){r.warn.apply(r,arguments)},"error"],[function(t){c[t]=u()},"time"],[function(t){var e=c[t];if(!e)throw new Error("No such label: "+t);var n=u()-e;r.log(t+": "+n+"ms")},"timeEnd"],[function(){var t=new Error;t.name="Trace",t.message=i.format.apply(null,arguments),r.error(t.stack)},"trace"],[function(t){r.log(i.inspect(t)+"\n")},"dir"],[function(t){if(!t){var e=a.call(arguments,1);o.ok(!1,i.format.apply(null,e))}},"assert"]],l=0;l<s.length;l++){var f=s[l],h=f[0],p=f[1];r[p]||(r[p]=h)}t.exports=r}).call(this,n(19))},function(t,e,n){t.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(4),i=n(116),o=n(33),u=Object.defineProperty;e.f=n(10)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(29);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(2),i=n(16),o=n(15),u=n(38)("src"),a=n(181),c=(""+a).split("toString");n(8).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(s&&(o(n,u)||i(n,u,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||a.call(this)}))},function(t,e,n){var r=n(0),i=n(3),o=n(29),u=/"/g,a=function(t,e,n,r){var i=String(o(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(u,"&quot;")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(11),i=n(37);t.exports=n(10)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(56),i=n(29);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";(function(t){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}e.a=new(function(){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pending=[],this.timer=null,this.executePendingActions=this.executePendingActions.bind(this)}var r,i,o;return r=e,(i=[{key:"run",value:function(t){this.pending.push(t),this.timer||(this.timer=setTimeout(this.executePendingActions,0))}},{key:"executePendingActions",value:function(){this.timer=null;var e=this.pending;this.pending=[];var n=!0,r=!1,i=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done);n=!0){var a=o.value;try{a()}catch(e){t.error("Delayed action failed: ",e)}}}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}}}])&&n(r.prototype,i),o&&n(r,o),e}())}).call(this,n(9))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var r=n(22);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(57),i=n(37),o=n(17),u=n(33),a=n(15),c=n(116),s=Object.getOwnPropertyDescriptor;e.f=n(10)?s:function(t,e){if(t=o(t),e=u(e,!0),c)try{return s(t,e)}catch(t){}if(a(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(0),i=n(8),o=n(3);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],u={};u[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",u)}},function(t,e,n){var r=n(21),i=n(56),o=n(12),u=n(7),a=n(132);t.exports=function(t,e){var n=1==t,c=2==t,s=3==t,l=4==t,f=6==t,h=5==t||f,p=e||a;return function(e,a,d){for(var v,y,m=o(e),b=i(m),g=r(a,d,3),w=u(b.length),Z=0,k=n?p(e,w):c?p(e,0):void 0;w>Z;Z++)if((h||Z in b)&&(y=g(v=b[Z],Z,m),t))if(n)k[Z]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return Z;case 2:k.push(v)}else if(l)return!1;return f?-1:s||l?l:k}}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var c,s=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&p())}function p(){if(!l){var t=a(h);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new d(t,e)),1!==s.length||l||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";if(n(10)){var r=n(39),i=n(2),o=n(3),u=n(0),a=n(75),c=n(106),s=n(21),l=n(52),f=n(37),h=n(16),p=n(53),d=n(23),v=n(7),y=n(143),m=n(41),b=n(33),g=n(15),w=n(58),Z=n(5),k=n(12),S=n(98),x=n(42),R=n(44),I=n(43).f,_=n(100),V=n(38),W=n(6),T=n(26),X=n(65),G=n(59),E=n(102),M=n(50),j=n(68),P=n(51),N=n(101),B=n(134),U=n(11),L=n(24),C=U.f,Y=L.f,A=i.RangeError,O=i.TypeError,F=i.Uint8Array,J=Array.prototype,H=c.ArrayBuffer,D=c.DataView,K=T(0),z=T(2),Q=T(3),q=T(4),$=T(5),tt=T(6),et=X(!0),nt=X(!1),rt=E.values,it=E.keys,ot=E.entries,ut=J.lastIndexOf,at=J.reduce,ct=J.reduceRight,st=J.join,lt=J.sort,ft=J.slice,ht=J.toString,pt=J.toLocaleString,dt=W("iterator"),vt=W("toStringTag"),yt=V("typed_constructor"),mt=V("def_constructor"),bt=a.CONSTR,gt=a.TYPED,wt=a.VIEW,Zt=T(1,(function(t,e){return It(G(t,t[mt]),e)})),kt=o((function(){return 1===new F(new Uint16Array([1]).buffer)[0]})),St=!!F&&!!F.prototype.set&&o((function(){new F(1).set({})})),xt=function(t,e){var n=d(t);if(n<0||n%e)throw A("Wrong offset!");return n},Rt=function(t){if(Z(t)&&gt in t)return t;throw O(t+" is not a typed array!")},It=function(t,e){if(!(Z(t)&&yt in t))throw O("It is not a typed array constructor!");return new t(e)},_t=function(t,e){return Vt(G(t,t[mt]),e)},Vt=function(t,e){for(var n=0,r=e.length,i=It(t,r);r>n;)i[n]=e[n++];return i},Wt=function(t,e,n){C(t,e,{get:function(){return this._d[n]}})},Tt=function(t){var e,n,r,i,o,u,a=k(t),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=_(a);if(null!=h&&!S(h)){for(u=h.call(a),r=[],e=0;!(o=u.next()).done;e++)r.push(o.value);a=r}for(f&&c>2&&(l=s(l,arguments[2],2)),e=0,n=v(a.length),i=It(this,n);n>e;e++)i[e]=f?l(a[e],e):a[e];return i},Xt=function(){for(var t=0,e=arguments.length,n=It(this,e);e>t;)n[t]=arguments[t++];return n},Gt=!!F&&o((function(){pt.call(new F(1))})),Et=function(){return pt.apply(Gt?ft.call(Rt(this)):Rt(this),arguments)},Mt={copyWithin:function(t,e){return B.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Rt(this),arguments)},filter:function(t){return _t(this,z(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){K(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(Rt(this),arguments)},lastIndexOf:function(t){return ut.apply(Rt(this),arguments)},map:function(t){return Zt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Rt(this),arguments)},reduceRight:function(t){return ct.apply(Rt(this),arguments)},reverse:function(){for(var t,e=Rt(this).length,n=Math.floor(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this},some:function(t){return Q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return lt.call(Rt(this),t)},subarray:function(t,e){var n=Rt(this),r=n.length,i=m(t,r);return new(G(n,n[mt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?r:m(e,r))-i))}},jt=function(t,e){return _t(this,ft.call(Rt(this),t,e))},Pt=function(t){Rt(this);var e=xt(arguments[1],1),n=this.length,r=k(t),i=v(r.length),o=0;if(i+e>n)throw A("Wrong length!");for(;o<i;)this[e+o]=r[o++]},Nt={entries:function(){return ot.call(Rt(this))},keys:function(){return it.call(Rt(this))},values:function(){return rt.call(Rt(this))}},Bt=function(t,e){return Z(t)&&t[gt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ut=function(t,e){return Bt(t,e=b(e,!0))?f(2,t[e]):Y(t,e)},Lt=function(t,e,n){return!(Bt(t,e=b(e,!0))&&Z(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?C(t,e,n):(t[e]=n.value,t)};bt||(L.f=Ut,U.f=Lt),u(u.S+u.F*!bt,"Object",{getOwnPropertyDescriptor:Ut,defineProperty:Lt}),o((function(){ht.call({})}))&&(ht=pt=function(){return st.call(this)});var Ct=p({},Mt);p(Ct,Nt),h(Ct,dt,Nt.values),p(Ct,{slice:jt,set:Pt,constructor:function(){},toString:ht,toLocaleString:Et}),Wt(Ct,"buffer","b"),Wt(Ct,"byteOffset","o"),Wt(Ct,"byteLength","l"),Wt(Ct,"length","e"),C(Ct,vt,{get:function(){return this[gt]}}),t.exports=function(t,e,n,c){var s=t+((c=!!c)?"Clamped":"")+"Array",f="get"+t,p="set"+t,d=i[s],m=d||{},b=d&&R(d),g=!d||!a.ABV,k={},S=d&&d.prototype,_=function(t,n){C(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[f](n*e+r.o,kt)}(this,n)},set:function(t){return function(t,n,r){var i=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](n*e+i.o,r,kt)}(this,n,t)},enumerable:!0})};g?(d=n((function(t,n,r,i){l(t,d,s,"_d");var o,u,a,c,f=0,p=0;if(Z(n)){if(!(n instanceof H||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return gt in n?Vt(d,n):Tt.call(d,n);o=n,p=xt(r,e);var m=n.byteLength;if(void 0===i){if(m%e)throw A("Wrong length!");if((u=m-p)<0)throw A("Wrong length!")}else if((u=v(i)*e)+p>m)throw A("Wrong length!");a=u/e}else a=y(n),o=new H(u=a*e);for(h(t,"_d",{b:o,o:p,l:u,e:a,v:new D(o)});f<a;)_(t,f++)})),S=d.prototype=x(Ct),h(S,"constructor",d)):o((function(){d(1)}))&&o((function(){new d(-1)}))&&j((function(t){new d,new d(null),new d(1.5),new d(t)}),!0)||(d=n((function(t,n,r,i){var o;return l(t,d,s),Z(n)?n instanceof H||"ArrayBuffer"==(o=w(n))||"SharedArrayBuffer"==o?void 0!==i?new m(n,xt(r,e),i):void 0!==r?new m(n,xt(r,e)):new m(n):gt in n?Vt(d,n):Tt.call(d,n):new m(y(n))})),K(b!==Function.prototype?I(m).concat(I(b)):I(m),(function(t){t in d||h(d,t,m[t])})),d.prototype=S,r||(S.constructor=d));var V=S[dt],W=!!V&&("values"==V.name||null==V.name),T=Nt.values;h(d,yt,!0),h(S,gt,s),h(S,wt,!0),h(S,mt,d),(c?new d(1)[vt]==s:vt in S)||C(S,vt,{get:function(){return s}}),k[s]=d,u(u.G+u.W+u.F*(d!=m),k),u(u.S,s,{BYTES_PER_ELEMENT:e}),u(u.S+u.F*o((function(){m.of.call(d,1)})),s,{from:Tt,of:Xt}),"BYTES_PER_ELEMENT"in S||h(S,"BYTES_PER_ELEMENT",e),u(u.P,s,Mt),P(s),u(u.P+u.F*St,s,{set:Pt}),u(u.P+u.F*!W,s,Nt),r||S.toString==ht||(S.toString=ht),u(u.P+u.F*o((function(){new d(1).slice()})),s,{slice:jt}),u(u.P+u.F*(o((function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()}))||!o((function(){S.toLocaleString.call([1,2])}))),s,{toLocaleString:Et}),M[s]=W?V:T,r||W||h(S,dt,T)}}else t.exports=function(){}},function(t,e,n){(function(t,r){var i;
2/**
3 * @license
4 * Lodash <https://lodash.com/>
5 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
6 * Released under MIT license <https://lodash.com/license>
7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9 */(function(){var o="Expected a function",u="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",s="[object Array]",l="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Function]",d="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Object]",b="[object RegExp]",g="[object Set]",w="[object String]",Z="[object Symbol]",k="[object WeakMap]",S="[object ArrayBuffer]",x="[object DataView]",R="[object Float32Array]",I="[object Float64Array]",_="[object Int8Array]",V="[object Int16Array]",W="[object Int32Array]",T="[object Uint8Array]",X="[object Uint16Array]",G="[object Uint32Array]",E=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,j=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,N=/[&<>"']/g,B=RegExp(P.source),U=RegExp(N.source),L=/<%-([\s\S]+?)%>/g,C=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/,F=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/[\\^$.*+?()[\]{}|]/g,H=RegExp(J.source),D=/^\s+|\s+$/g,K=/^\s+/,z=/\s+$/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,q=/\{\n\/\* \[wrapped with (.+)\] \*/,$=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,ut=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,ct=/^(?:0|[1-9]\d*)$/,st=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,ht="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dt="[\\ud800-\\udfff]",vt="["+pt+"]",yt="["+ht+"]",mt="\\d+",bt="[\\u2700-\\u27bf]",gt="[a-z\\xdf-\\xf6\\xf8-\\xff]",wt="[^\\ud800-\\udfff"+pt+mt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Zt="\\ud83c[\\udffb-\\udfff]",kt="[^\\ud800-\\udfff]",St="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",It="(?:"+gt+"|"+wt+")",_t="(?:"+Rt+"|"+wt+")",Vt="(?:"+yt+"|"+Zt+")"+"?",Wt="[\\ufe0e\\ufe0f]?"+Vt+("(?:\\u200d(?:"+[kt,St,xt].join("|")+")[\\ufe0e\\ufe0f]?"+Vt+")*"),Tt="(?:"+[bt,St,xt].join("|")+")"+Wt,Xt="(?:"+[kt+yt+"?",yt,St,xt,dt].join("|")+")",Gt=RegExp("['’]","g"),Et=RegExp(yt,"g"),Mt=RegExp(Zt+"(?="+Zt+")|"+Xt+Wt,"g"),jt=RegExp([Rt+"?"+gt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,Rt,"$"].join("|")+")",_t+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,Rt+It,"$"].join("|")+")",Rt+"?"+It+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Rt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mt,Tt].join("|"),"g"),Pt=RegExp("[\\u200d\\ud800-\\udfff"+ht+"\\ufe0e\\ufe0f]"),Nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Lt={};Lt[R]=Lt[I]=Lt[_]=Lt[V]=Lt[W]=Lt[T]=Lt["[object Uint8ClampedArray]"]=Lt[X]=Lt[G]=!0,Lt[c]=Lt[s]=Lt[S]=Lt[l]=Lt[x]=Lt[f]=Lt[h]=Lt[p]=Lt[v]=Lt[y]=Lt[m]=Lt[b]=Lt[g]=Lt[w]=Lt[k]=!1;var Ct={};Ct[c]=Ct[s]=Ct[S]=Ct[x]=Ct[l]=Ct[f]=Ct[R]=Ct[I]=Ct[_]=Ct[V]=Ct[W]=Ct[v]=Ct[y]=Ct[m]=Ct[b]=Ct[g]=Ct[w]=Ct[Z]=Ct[T]=Ct["[object Uint8ClampedArray]"]=Ct[X]=Ct[G]=!0,Ct[h]=Ct[p]=Ct[k]=!1;var Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},At=parseFloat,Ot=parseInt,Ft="object"==typeof t&&t&&t.Object===Object&&t,Jt="object"==typeof self&&self&&self.Object===Object&&self,Ht=Ft||Jt||Function("return this")(),Dt=e&&!e.nodeType&&e,Kt=Dt&&"object"==typeof r&&r&&!r.nodeType&&r,zt=Kt&&Kt.exports===Dt,Qt=zt&&Ft.process,qt=function(){try{var t=Kt&&Kt.require&&Kt.require("util").types;return t||Qt&&Qt.binding&&Qt.binding("util")}catch(t){}}(),$t=qt&&qt.isArrayBuffer,te=qt&&qt.isDate,ee=qt&&qt.isMap,ne=qt&&qt.isRegExp,re=qt&&qt.isSet,ie=qt&&qt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ue(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var u=t[i];e(r,u,n(u),t)}return r}function ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function le(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var u=t[n];e(u,n,t)&&(o[i++]=u)}return o}function fe(t,e){return!!(null==t?0:t.length)&&Ze(t,e,0)>-1}function he(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function pe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function de(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ve(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ye(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function me(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var be=Re("length");function ge(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function we(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ze(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):we(t,Se,n)}function ke(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Se(t){return t!=t}function xe(t,e){var n=null==t?0:t.length;return n?Ve(t,e)/n:NaN}function Re(t){return function(e){return null==e?void 0:e[t]}}function Ie(t){return function(e){return null==t?void 0:t[e]}}function _e(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ve(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function We(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Te(t){return function(e){return t(e)}}function Xe(t,e){return pe(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function Ee(t,e){for(var n=-1,r=t.length;++n<r&&Ze(e,t[n],0)>-1;);return n}function Me(t,e){for(var n=t.length;n--&&Ze(e,t[n],0)>-1;);return n}function je(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Pe=Ie({"À":"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","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ne=Ie({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Be(t){return"\\"+Yt[t]}function Ue(t){return Pt.test(t)}function Le(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Ce(t,e){return function(n){return t(e(n))}}function Ye(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,o[i++]=n)}return o}function Ae(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function Oe(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Fe(t){return Ue(t)?function(t){var e=Mt.lastIndex=0;for(;Mt.test(t);)++e;return e}(t):be(t)}function Je(t){return Ue(t)?function(t){return t.match(Mt)||[]}(t):function(t){return t.split("")}(t)}var He=Ie({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var De=function t(e){var n,r=(e=null==e?Ht:De.defaults(Ht.Object(),e,De.pick(Ht,Bt))).Array,i=e.Date,ht=e.Error,pt=e.Function,dt=e.Math,vt=e.Object,yt=e.RegExp,mt=e.String,bt=e.TypeError,gt=r.prototype,wt=pt.prototype,Zt=vt.prototype,kt=e["__core-js_shared__"],St=wt.toString,xt=Zt.hasOwnProperty,Rt=0,It=(n=/[^.]+$/.exec(kt&&kt.keys&&kt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",_t=Zt.toString,Vt=St.call(vt),Wt=Ht._,Tt=yt("^"+St.call(xt).replace(J,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=zt?e.Buffer:void 0,Mt=e.Symbol,Pt=e.Uint8Array,Yt=Xt?Xt.allocUnsafe:void 0,Ft=Ce(vt.getPrototypeOf,vt),Jt=vt.create,Dt=Zt.propertyIsEnumerable,Kt=gt.splice,Qt=Mt?Mt.isConcatSpreadable:void 0,qt=Mt?Mt.iterator:void 0,be=Mt?Mt.toStringTag:void 0,Ie=function(){try{var t=$i(vt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ke=e.clearTimeout!==Ht.clearTimeout&&e.clearTimeout,ze=i&&i.now!==Ht.Date.now&&i.now,Qe=e.setTimeout!==Ht.setTimeout&&e.setTimeout,qe=dt.ceil,$e=dt.floor,tn=vt.getOwnPropertySymbols,en=Xt?Xt.isBuffer:void 0,nn=e.isFinite,rn=gt.join,on=Ce(vt.keys,vt),un=dt.max,an=dt.min,cn=i.now,sn=e.parseInt,ln=dt.random,fn=gt.reverse,hn=$i(e,"DataView"),pn=$i(e,"Map"),dn=$i(e,"Promise"),vn=$i(e,"Set"),yn=$i(e,"WeakMap"),mn=$i(vt,"create"),bn=yn&&new yn,gn={},wn=_o(hn),Zn=_o(pn),kn=_o(dn),Sn=_o(vn),xn=_o(yn),Rn=Mt?Mt.prototype:void 0,In=Rn?Rn.valueOf:void 0,_n=Rn?Rn.toString:void 0;function Vn(t){if(Ou(t)&&!Eu(t)&&!(t instanceof Gn)){if(t instanceof Xn)return t;if(xt.call(t,"__wrapped__"))return Vo(t)}return new Xn(t)}var Wn=function(){function t(){}return function(e){if(!Au(e))return{};if(Jt)return Jt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Tn(){}function Xn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function En(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Pn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new jn;++e<n;)this.add(t[e])}function Nn(t){var e=this.__data__=new Mn(t);this.size=e.size}function Bn(t,e){var n=Eu(t),r=!n&&Gu(t),i=!n&&!r&&Nu(t),o=!n&&!r&&!i&&qu(t),u=n||r||i||o,a=u?We(t.length,mt):[],c=a.length;for(var s in t)!e&&!xt.call(t,s)||u&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||uo(s,c))||a.push(s);return a}function Un(t){var e=t.length;return e?t[Pr(0,e-1)]:void 0}function Ln(t,e){return xo(mi(t),Kn(e,0,t.length))}function Cn(t){return xo(mi(t))}function Yn(t,e,n){(void 0===n||Wu(t[e],n))&&(void 0!==n||e in t)||Hn(t,e,n)}function An(t,e,n){var r=t[e];xt.call(t,e)&&Wu(r,n)&&(void 0!==n||e in t)||Hn(t,e,n)}function On(t,e){for(var n=t.length;n--;)if(Wu(t[n][0],e))return n;return-1}function Fn(t,e,n,r){return tr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function Jn(t,e){return t&&bi(e,wa(e),t)}function Hn(t,e,n){"__proto__"==e&&Ie?Ie(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Dn(t,e){for(var n=-1,i=e.length,o=r(i),u=null==t;++n<i;)o[n]=u?void 0:va(t,e[n]);return o}function Kn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function zn(t,e,n,r,i,o){var u,a=1&e,s=2&e,h=4&e;if(n&&(u=i?n(t,r,i,o):n(t)),void 0!==u)return u;if(!Au(t))return t;var k=Eu(t);if(k){if(u=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&xt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!a)return mi(t,u)}else{var E=no(t),M=E==p||E==d;if(Nu(t))return fi(t,a);if(E==m||E==c||M&&!i){if(u=s||M?{}:io(t),!a)return s?function(t,e){return bi(t,eo(t),e)}(t,function(t,e){return t&&bi(e,Za(e),t)}(u,t)):function(t,e){return bi(t,to(t),e)}(t,Jn(u,t))}else{if(!Ct[E])return i?t:{};u=function(t,e,n){var r=t.constructor;switch(e){case S:return hi(t);case l:case f:return new r(+t);case x:return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case I:case _:case V:case W:case T:case"[object Uint8ClampedArray]":case X:case G:return pi(t,n);case v:return new r;case y:case w:return new r(t);case b:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return new r;case Z:return i=t,In?vt(In.call(i)):{}}var i}(t,E,a)}}o||(o=new Nn);var j=o.get(t);if(j)return j;o.set(t,u),Ku(t)?t.forEach((function(r){u.add(zn(r,e,n,r,t,o))})):Fu(t)&&t.forEach((function(r,i){u.set(i,zn(r,e,n,i,t,o))}));var P=k?void 0:(h?s?Ji:Fi:s?Za:wa)(t);return ae(P||t,(function(r,i){P&&(r=t[i=r]),An(u,i,zn(r,e,n,i,t,o))})),u}function Qn(t,e,n){var r=n.length;if(null==t)return!r;for(t=vt(t);r--;){var i=n[r],o=e[i],u=t[i];if(void 0===u&&!(i in t)||!o(u))return!1}return!0}function qn(t,e,n){if("function"!=typeof t)throw new bt(o);return wo((function(){t.apply(void 0,n)}),e)}function $n(t,e,n,r){var i=-1,o=fe,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=pe(e,Te(n))),r?(o=he,u=!1):e.length>=200&&(o=Ge,u=!1,e=new Pn(e));t:for(;++i<a;){var l=t[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else o(e,f,r)||c.push(l)}return c}Vn.templateSettings={escape:L,evaluate:C,interpolate:Y,variable:"",imports:{_:Vn}},Vn.prototype=Tn.prototype,Vn.prototype.constructor=Vn,Xn.prototype=Wn(Tn.prototype),Xn.prototype.constructor=Xn,Gn.prototype=Wn(Tn.prototype),Gn.prototype.constructor=Gn,En.prototype.clear=function(){this.__data__=mn?mn(null):{},this.size=0},En.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},En.prototype.get=function(t){var e=this.__data__;if(mn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return xt.call(e,t)?e[t]:void 0},En.prototype.has=function(t){var e=this.__data__;return mn?void 0!==e[t]:xt.call(e,t)},En.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mn&&void 0===e?"__lodash_hash_undefined__":e,this},Mn.prototype.clear=function(){this.__data__=[],this.size=0},Mn.prototype.delete=function(t){var e=this.__data__,n=On(e,t);return!(n<0)&&(n==e.length-1?e.pop():Kt.call(e,n,1),--this.size,!0)},Mn.prototype.get=function(t){var e=this.__data__,n=On(e,t);return n<0?void 0:e[n][1]},Mn.prototype.has=function(t){return On(this.__data__,t)>-1},Mn.prototype.set=function(t,e){var n=this.__data__,r=On(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},jn.prototype.clear=function(){this.size=0,this.__data__={hash:new En,map:new(pn||Mn),string:new En}},jn.prototype.delete=function(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e},jn.prototype.get=function(t){return Qi(this,t).get(t)},jn.prototype.has=function(t){return Qi(this,t).has(t)},jn.prototype.set=function(t,e){var n=Qi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Pn.prototype.add=Pn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(t){return this.__data__.has(t)},Nn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Nn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Nn.prototype.get=function(t){return this.__data__.get(t)},Nn.prototype.has=function(t){return this.__data__.has(t)},Nn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!pn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new jn(r)}return n.set(t,e),this.size=n.size,this};var tr=Zi(cr),er=Zi(sr,!0);function nr(t,e){var n=!0;return tr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function rr(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],u=e(o);if(null!=u&&(void 0===a?u==u&&!Qu(u):n(u,a)))var a=u,c=o}return c}function ir(t,e){var n=[];return tr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function or(t,e,n,r,i){var o=-1,u=t.length;for(n||(n=oo),i||(i=[]);++o<u;){var a=t[o];e>0&&n(a)?e>1?or(a,e-1,n,r,i):de(i,a):r||(i[i.length]=a)}return i}var ur=ki(),ar=ki(!0);function cr(t,e){return t&&ur(t,e,wa)}function sr(t,e){return t&&ar(t,e,wa)}function lr(t,e){return le(e,(function(e){return Lu(t[e])}))}function fr(t,e){for(var n=0,r=(e=ai(e,t)).length;null!=t&&n<r;)t=t[Io(e[n++])];return n&&n==r?t:void 0}function hr(t,e,n){var r=e(t);return Eu(t)?r:de(r,n(t))}function pr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":be&&be in vt(t)?function(t){var e=xt.call(t,be),n=t[be];try{t[be]=void 0;var r=!0}catch(t){}var i=_t.call(t);r&&(e?t[be]=n:delete t[be]);return i}(t):function(t){return _t.call(t)}(t)}function dr(t,e){return t>e}function vr(t,e){return null!=t&&xt.call(t,e)}function yr(t,e){return null!=t&&e in vt(t)}function mr(t,e,n){for(var i=n?he:fe,o=t[0].length,u=t.length,a=u,c=r(u),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=pe(f,Te(e))),s=an(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new Pn(a&&f):void 0}f=t[0];var h=-1,p=c[0];t:for(;++h<o&&l.length<s;){var d=f[h],v=e?e(d):d;if(d=n||0!==d?d:0,!(p?Ge(p,v):i(l,v,n))){for(a=u;--a;){var y=c[a];if(!(y?Ge(y,v):i(t[a],v,n)))continue t}p&&p.push(v),l.push(d)}}return l}function br(t,e,n){var r=null==(t=yo(t,e=ai(e,t)))?t:t[Io(Uo(e))];return null==r?void 0:oe(r,t,n)}function gr(t){return Ou(t)&&pr(t)==c}function wr(t,e,n,r,i){return t===e||(null==t||null==e||!Ou(t)&&!Ou(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var u=Eu(t),a=Eu(e),p=u?s:no(t),d=a?s:no(e),k=(p=p==c?m:p)==m,R=(d=d==c?m:d)==m,I=p==d;if(I&&Nu(t)){if(!Nu(e))return!1;u=!0,k=!1}if(I&&!k)return o||(o=new Nn),u||qu(t)?Ai(t,e,n,r,i,o):function(t,e,n,r,i,o,u){switch(n){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!o(new Pt(t),new Pt(e)));case l:case f:case y:return Wu(+t,+e);case h:return t.name==e.name&&t.message==e.message;case b:case w:return t==e+"";case v:var a=Le;case g:var c=1&r;if(a||(a=Ae),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var p=Ai(a(t),a(e),r,i,o,u);return u.delete(t),p;case Z:if(In)return In.call(t)==In.call(e)}return!1}(t,e,p,n,r,i,o);if(!(1&n)){var _=k&&xt.call(t,"__wrapped__"),V=R&&xt.call(e,"__wrapped__");if(_||V){var W=_?t.value():t,T=V?e.value():e;return o||(o=new Nn),i(W,T,n,r,o)}}if(!I)return!1;return o||(o=new Nn),function(t,e,n,r,i,o){var u=1&n,a=Fi(t),c=a.length,s=Fi(e).length;if(c!=s&&!u)return!1;var l=c;for(;l--;){var f=a[l];if(!(u?f in e:xt.call(e,f)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var p=!0;o.set(t,e),o.set(e,t);var d=u;for(;++l<c;){f=a[l];var v=t[f],y=e[f];if(r)var m=u?r(y,v,f,e,t,o):r(v,y,f,t,e,o);if(!(void 0===m?v===y||i(v,y,n,r,o):m)){p=!1;break}d||(d="constructor"==f)}if(p&&!d){var b=t.constructor,g=e.constructor;b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o)}(t,e,n,r,wr,i))}function Zr(t,e,n,r){var i=n.length,o=i,u=!r;if(null==t)return!o;for(t=vt(t);i--;){var a=n[i];if(u&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var c=(a=n[i])[0],s=t[c],l=a[1];if(u&&a[2]){if(void 0===s&&!(c in t))return!1}else{var f=new Nn;if(r)var h=r(s,l,c,t,e,f);if(!(void 0===h?wr(l,s,3,r,f):h))return!1}}return!0}function kr(t){return!(!Au(t)||(e=t,It&&It in e))&&(Lu(t)?Tt:ut).test(_o(t));var e}function Sr(t){return"function"==typeof t?t:null==t?Ja:"object"==typeof t?Eu(t)?Wr(t[0],t[1]):Vr(t):ec(t)}function xr(t){if(!fo(t))return on(t);var e=[];for(var n in vt(t))xt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t){if(!Au(t))return function(t){var e=[];if(null!=t)for(var n in vt(t))e.push(n);return e}(t);var e=fo(t),n=[];for(var r in t)("constructor"!=r||!e&&xt.call(t,r))&&n.push(r);return n}function Ir(t,e){return t<e}function _r(t,e){var n=-1,i=ju(t)?r(t.length):[];return tr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Vr(t){var e=qi(t);return 1==e.length&&e[0][2]?po(e[0][0],e[0][1]):function(n){return n===t||Zr(n,t,e)}}function Wr(t,e){return co(t)&&ho(e)?po(Io(t),e):function(n){var r=va(n,t);return void 0===r&&r===e?ya(n,t):wr(e,r,3)}}function Tr(t,e,n,r,i){t!==e&&ur(e,(function(o,u){if(i||(i=new Nn),Au(o))!function(t,e,n,r,i,o,u){var a=bo(t,n),c=bo(e,n),s=u.get(c);if(s)return void Yn(t,n,s);var l=o?o(a,c,n+"",t,e,u):void 0,f=void 0===l;if(f){var h=Eu(c),p=!h&&Nu(c),d=!h&&!p&&qu(c);l=c,h||p||d?Eu(a)?l=a:Pu(a)?l=mi(a):p?(f=!1,l=fi(c,!0)):d?(f=!1,l=pi(c,!0)):l=[]:Hu(c)||Gu(c)?(l=a,Gu(a)?l=ua(a):Au(a)&&!Lu(a)||(l=io(c))):f=!1}f&&(u.set(c,l),i(l,c,r,o,u),u.delete(c));Yn(t,n,l)}(t,e,u,n,Tr,r,i);else{var a=r?r(bo(t,u),o,u+"",t,e,i):void 0;void 0===a&&(a=o),Yn(t,u,a)}}),Za)}function Xr(t,e){var n=t.length;if(n)return uo(e+=e<0?n:0,n)?t[e]:void 0}function Gr(t,e,n){var r=-1;return e=pe(e.length?e:[Ja],Te(zi())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(_r(t,(function(t,n,i){return{criteria:pe(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,u=i.length,a=n.length;for(;++r<u;){var c=di(i[r],o[r]);if(c){if(r>=a)return c;var s=n[r];return c*("desc"==s?-1:1)}}return t.index-e.index}(t,e,n)}))}function Er(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var u=e[r],a=fr(t,u);n(a,u)&&Cr(o,ai(u,t),a)}return o}function Mr(t,e,n,r){var i=r?ke:Ze,o=-1,u=e.length,a=t;for(t===e&&(e=mi(e)),n&&(a=pe(t,Te(n)));++o<u;)for(var c=0,s=e[o],l=n?n(s):s;(c=i(a,l,c,r))>-1;)a!==t&&Kt.call(a,c,1),Kt.call(t,c,1);return t}function jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;uo(i)?Kt.call(t,i,1):$r(t,i)}}return t}function Pr(t,e){return t+$e(ln()*(e-t+1))}function Nr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=$e(e/2))&&(t+=t)}while(e);return n}function Br(t,e){return Zo(vo(t,e,Ja),t+"")}function Ur(t){return Un(Wa(t))}function Lr(t,e){var n=Wa(t);return xo(n,Kn(e,0,n.length))}function Cr(t,e,n,r){if(!Au(t))return t;for(var i=-1,o=(e=ai(e,t)).length,u=o-1,a=t;null!=a&&++i<o;){var c=Io(e[i]),s=n;if(i!=u){var l=a[c];void 0===(s=r?r(l,c,a):void 0)&&(s=Au(l)?l:uo(e[i+1])?[]:{})}An(a,c,s),a=a[c]}return t}var Yr=bn?function(t,e){return bn.set(t,e),t}:Ja,Ar=Ie?function(t,e){return Ie(t,"toString",{configurable:!0,enumerable:!1,value:Aa(e),writable:!0})}:Ja;function Or(t){return xo(Wa(t))}function Fr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var u=r(o);++i<o;)u[i]=t[i+e];return u}function Jr(t,e){var n;return tr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Hr(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,u=t[o];null!==u&&!Qu(u)&&(n?u<=e:u<e)?r=o+1:i=o}return i}return Dr(t,e,Ja,n)}function Dr(t,e,n,r){e=n(e);for(var i=0,o=null==t?0:t.length,u=e!=e,a=null===e,c=Qu(e),s=void 0===e;i<o;){var l=$e((i+o)/2),f=n(t[l]),h=void 0!==f,p=null===f,d=f==f,v=Qu(f);if(u)var y=r||d;else y=s?d&&(r||h):a?d&&h&&(r||!p):c?d&&h&&!p&&(r||!v):!p&&!v&&(r?f<=e:f<e);y?i=l+1:o=l}return an(o,4294967294)}function Kr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Wu(a,c)){var c=a;o[i++]=0===u?0:u}}return o}function zr(t){return"number"==typeof t?t:Qu(t)?NaN:+t}function Qr(t){if("string"==typeof t)return t;if(Eu(t))return pe(t,Qr)+"";if(Qu(t))return _n?_n.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function qr(t,e,n){var r=-1,i=fe,o=t.length,u=!0,a=[],c=a;if(n)u=!1,i=he;else if(o>=200){var s=e?null:Ni(t);if(s)return Ae(s);u=!1,i=Ge,c=new Pn}else c=e?[]:a;t:for(;++r<o;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else i(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a}function $r(t,e){return null==(t=yo(t,e=ai(e,t)))||delete t[Io(Uo(e))]}function ti(t,e,n,r){return Cr(t,e,n(fr(t,e)),r)}function ei(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Fr(t,r?0:o,r?o+1:i):Fr(t,r?o+1:0,r?i:o)}function ni(t,e){var n=t;return n instanceof Gn&&(n=n.value()),ve(e,(function(t,e){return e.func.apply(e.thisArg,de([t],e.args))}),n)}function ri(t,e,n){var i=t.length;if(i<2)return i?qr(t[0]):[];for(var o=-1,u=r(i);++o<i;)for(var a=t[o],c=-1;++c<i;)c!=o&&(u[o]=$n(u[o]||a,t[c],e,n));return qr(or(u,1),e,n)}function ii(t,e,n){for(var r=-1,i=t.length,o=e.length,u={};++r<i;){var a=r<o?e[r]:void 0;n(u,t[r],a)}return u}function oi(t){return Pu(t)?t:[]}function ui(t){return"function"==typeof t?t:Ja}function ai(t,e){return Eu(t)?t:co(t,e)?[t]:Ro(aa(t))}var ci=Br;function si(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Fr(t,e,n)}var li=Ke||function(t){return Ht.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var n=t.length,r=Yt?Yt(n):new t.constructor(n);return t.copy(r),r}function hi(t){var e=new t.constructor(t.byteLength);return new Pt(e).set(new Pt(t)),e}function pi(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function di(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Qu(t),u=void 0!==e,a=null===e,c=e==e,s=Qu(e);if(!a&&!s&&!o&&t>e||o&&u&&c&&!a&&!s||r&&u&&c||!n&&c||!i)return 1;if(!r&&!o&&!s&&t<e||s&&n&&i&&!r&&!o||a&&n&&i||!u&&i||!c)return-1}return 0}function vi(t,e,n,i){for(var o=-1,u=t.length,a=n.length,c=-1,s=e.length,l=un(u-a,0),f=r(s+l),h=!i;++c<s;)f[c]=e[c];for(;++o<a;)(h||o<u)&&(f[n[o]]=t[o]);for(;l--;)f[c++]=t[o++];return f}function yi(t,e,n,i){for(var o=-1,u=t.length,a=-1,c=n.length,s=-1,l=e.length,f=un(u-c,0),h=r(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++s<l;)h[d+s]=e[s];for(;++a<c;)(p||o<u)&&(h[d+n[a]]=t[o++]);return h}function mi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function bi(t,e,n,r){var i=!n;n||(n={});for(var o=-1,u=e.length;++o<u;){var a=e[o],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),i?Hn(n,a,c):An(n,a,c)}return n}function gi(t,e){return function(n,r){var i=Eu(n)?ue:Fn,o=e?e():{};return i(n,t,zi(r,2),o)}}function wi(t){return Br((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,u&&ao(n[0],n[1],u)&&(o=i<3?void 0:o,i=1),e=vt(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e}))}function Zi(t,e){return function(n,r){if(null==n)return n;if(!ju(n))return t(n,r);for(var i=n.length,o=e?i:-1,u=vt(n);(e?o--:++o<i)&&!1!==r(u[o],o,u););return n}}function ki(t){return function(e,n,r){for(var i=-1,o=vt(e),u=r(e),a=u.length;a--;){var c=u[t?a:++i];if(!1===n(o[c],c,o))break}return e}}function Si(t){return function(e){var n=Ue(e=aa(e))?Je(e):void 0,r=n?n[0]:e.charAt(0),i=n?si(n,1).join(""):e.slice(1);return r[t]()+i}}function xi(t){return function(e){return ve(La(Ga(e).replace(Gt,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Wn(t.prototype),r=t.apply(n,e);return Au(r)?r:n}}function Ii(t){return function(e,n,r){var i=vt(e);if(!ju(e)){var o=zi(n,3);e=wa(e),n=function(t){return o(i[t],t,i)}}var u=t(e,n,r);return u>-1?i[o?e[u]:u]:void 0}}function _i(t){return Oi((function(e){var n=e.length,r=n,i=Xn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new bt(o);if(i&&!a&&"wrapper"==Di(u))var a=new Xn([],!0)}for(r=a?r:n;++r<n;){var c=Di(u=e[r]),s="wrapper"==c?Hi(u):void 0;a=s&&so(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Di(s[0])].apply(a,s[3]):1==u.length&&so(u)?a[c]():a.thru(u)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Eu(r))return a.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Vi(t,e,n,i,o,u,a,c,s,l){var f=128&e,h=1&e,p=2&e,d=24&e,v=512&e,y=p?void 0:Ri(t);return function m(){for(var b=arguments.length,g=r(b),w=b;w--;)g[w]=arguments[w];if(d)var Z=Ki(m),k=je(g,Z);if(i&&(g=vi(g,i,o,d)),u&&(g=yi(g,u,a,d)),b-=k,d&&b<l){var S=Ye(g,Z);return ji(t,e,Vi,m.placeholder,n,g,S,c,s,l-b)}var x=h?n:this,R=p?x[t]:t;return b=g.length,c?g=mo(g,c):v&&b>1&&g.reverse(),f&&s<b&&(g.length=s),this&&this!==Ht&&this instanceof m&&(R=y||Ri(R)),R.apply(x,g)}}function Wi(t,e){return function(n,r){return function(t,e,n,r){return cr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ti(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Qr(n),r=Qr(r)):(n=zr(n),r=zr(r)),i=t(n,r)}return i}}function Xi(t){return Oi((function(e){return e=pe(e,Te(zi())),Br((function(n){var r=this;return t(e,(function(t){return oe(t,r,n)}))}))}))}function Gi(t,e){var n=(e=void 0===e?" ":Qr(e)).length;if(n<2)return n?Nr(e,t):e;var r=Nr(e,qe(t/Fe(e)));return Ue(e)?si(Je(r),0,t).join(""):r.slice(0,t)}function Ei(t){return function(e,n,i){return i&&"number"!=typeof i&&ao(e,n,i)&&(n=i=void 0),e=na(e),void 0===n?(n=e,e=0):n=na(n),function(t,e,n,i){for(var o=-1,u=un(qe((e-t)/(n||1)),0),a=r(u);u--;)a[i?u:++o]=t,t+=n;return a}(e,n,i=void 0===i?e<n?1:-1:na(i),t)}}function Mi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=oa(e),n=oa(n)),t(e,n)}}function ji(t,e,n,r,i,o,u,a,c,s){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var f=[t,e,i,l?o:void 0,l?u:void 0,l?void 0:o,l?void 0:u,a,c,s],h=n.apply(void 0,f);return so(t)&&go(h,f),h.placeholder=r,ko(h,t,e)}function Pi(t){var e=dt[t];return function(t,n){if(t=oa(t),(n=null==n?0:an(ra(n),292))&&nn(t)){var r=(aa(t)+"e").split("e");return+((r=(aa(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ni=vn&&1/Ae(new vn([,-0]))[1]==1/0?function(t){return new vn(t)}:Qa;function Bi(t){return function(e){var n=no(e);return n==v?Le(e):n==g?Oe(e):function(t,e){return pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ui(t,e,n,i,a,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new bt(o);var h=i?i.length:0;if(h||(e&=-97,i=a=void 0),s=void 0===s?s:un(ra(s),0),l=void 0===l?l:ra(l),h-=a?a.length:0,64&e){var p=i,d=a;i=a=void 0}var v=f?void 0:Hi(t),y=[t,e,n,i,a,p,d,c,s,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var s=t[3];t[3]=s?vi(s,c,e[4]):c,t[4]=s?Ye(t[3],u):e[4]}(c=e[5])&&(s=t[5],t[5]=s?yi(s,c,e[6]):c,t[6]=s?Ye(t[5],u):e[6]);(c=e[7])&&(t[7]=c);128&r&&(t[8]=null==t[8]?e[8]:an(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(y,v),t=y[0],e=y[1],n=y[2],i=y[3],a=y[4],!(l=y[9]=void 0===y[9]?f?0:t.length:un(y[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?function(t,e,n){var i=Ri(t);return function o(){for(var u=arguments.length,a=r(u),c=u,s=Ki(o);c--;)a[c]=arguments[c];var l=u<3&&a[0]!==s&&a[u-1]!==s?[]:Ye(a,s);if((u-=l.length)<n)return ji(t,e,Vi,o.placeholder,void 0,a,l,void 0,void 0,n-u);var f=this&&this!==Ht&&this instanceof o?i:t;return oe(f,this,a)}}(t,e,l):32!=e&&33!=e||a.length?Vi.apply(void 0,y):function(t,e,n,i){var o=1&e,u=Ri(t);return function e(){for(var a=-1,c=arguments.length,s=-1,l=i.length,f=r(l+c),h=this&&this!==Ht&&this instanceof e?u:t;++s<l;)f[s]=i[s];for(;c--;)f[s++]=arguments[++a];return oe(h,o?n:this,f)}}(t,e,n,i);else var m=function(t,e,n){var r=1&e,i=Ri(t);return function e(){var o=this&&this!==Ht&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return ko((v?Yr:go)(m,y),t,e)}function Li(t,e,n,r){return void 0===t||Wu(t,Zt[n])&&!xt.call(r,n)?e:t}function Ci(t,e,n,r,i,o){return Au(t)&&Au(e)&&(o.set(e,t),Tr(t,e,void 0,Ci,o),o.delete(e)),t}function Yi(t){return Hu(t)?void 0:t}function Ai(t,e,n,r,i,o){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=o.get(t);if(s&&o.get(e))return s==e;var l=-1,f=!0,h=2&n?new Pn:void 0;for(o.set(t,e),o.set(e,t);++l<a;){var p=t[l],d=e[l];if(r)var v=u?r(d,p,l,e,t,o):r(p,d,l,t,e,o);if(void 0!==v){if(v)continue;f=!1;break}if(h){if(!me(e,(function(t,e){if(!Ge(h,e)&&(p===t||i(p,t,n,r,o)))return h.push(e)}))){f=!1;break}}else if(p!==d&&!i(p,d,n,r,o)){f=!1;break}}return o.delete(t),o.delete(e),f}function Oi(t){return Zo(vo(t,void 0,Mo),t+"")}function Fi(t){return hr(t,wa,to)}function Ji(t){return hr(t,Za,eo)}var Hi=bn?function(t){return bn.get(t)}:Qa;function Di(t){for(var e=t.name+"",n=gn[e],r=xt.call(gn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Ki(t){return(xt.call(Vn,"placeholder")?Vn:t).placeholder}function zi(){var t=Vn.iteratee||Ha;return t=t===Ha?Sr:t,arguments.length?t(arguments[0],arguments[1]):t}function Qi(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function qi(t){for(var e=wa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,ho(i)]}return e}function $i(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return kr(n)?n:void 0}var to=tn?function(t){return null==t?[]:(t=vt(t),le(tn(t),(function(e){return Dt.call(t,e)})))}:ic,eo=tn?function(t){for(var e=[];t;)de(e,to(t)),t=Ft(t);return e}:ic,no=pr;function ro(t,e,n){for(var r=-1,i=(e=ai(e,t)).length,o=!1;++r<i;){var u=Io(e[r]);if(!(o=null!=t&&n(t,u)))break;t=t[u]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Yu(i)&&uo(u,i)&&(Eu(t)||Gu(t))}function io(t){return"function"!=typeof t.constructor||fo(t)?{}:Wn(Ft(t))}function oo(t){return Eu(t)||Gu(t)||!!(Qt&&t&&t[Qt])}function uo(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ct.test(t))&&t>-1&&t%1==0&&t<e}function ao(t,e,n){if(!Au(n))return!1;var r=typeof e;return!!("number"==r?ju(n)&&uo(e,n.length):"string"==r&&e in n)&&Wu(n[e],t)}function co(t,e){if(Eu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Qu(t))||(O.test(t)||!A.test(t)||null!=e&&t in vt(e))}function so(t){var e=Di(t),n=Vn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=Hi(n);return!!r&&t===r[0]}(hn&&no(new hn(new ArrayBuffer(1)))!=x||pn&&no(new pn)!=v||dn&&"[object Promise]"!=no(dn.resolve())||vn&&no(new vn)!=g||yn&&no(new yn)!=k)&&(no=function(t){var e=pr(t),n=e==m?t.constructor:void 0,r=n?_o(n):"";if(r)switch(r){case wn:return x;case Zn:return v;case kn:return"[object Promise]";case Sn:return g;case xn:return k}return e});var lo=kt?Lu:oc;function fo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Zt)}function ho(t){return t==t&&!Au(t)}function po(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in vt(n)))}}function vo(t,e,n){return e=un(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,u=un(i.length-e,0),a=r(u);++o<u;)a[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(a),oe(t,this,c)}}function yo(t,e){return e.length<2?t:fr(t,Fr(e,0,-1))}function mo(t,e){for(var n=t.length,r=an(e.length,n),i=mi(t);r--;){var o=e[r];t[r]=uo(o,n)?i[o]:void 0}return t}function bo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var go=So(Yr),wo=Qe||function(t,e){return Ht.setTimeout(t,e)},Zo=So(Ar);function ko(t,e,n){var r=e+"";return Zo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Q,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ae(a,(function(n){var r="_."+n[0];e&n[1]&&!fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(q);return e?e[1].split($):[]}(r),n)))}function So(t){var e=0,n=0;return function(){var r=cn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function xo(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=Pr(n,i),u=t[o];t[o]=t[n],t[n]=u}return t.length=e,t}var Ro=function(t){var e=Su(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(F,(function(t,n,r,i){e.push(r?i.replace(et,"$1"):n||t)})),e}));function Io(t){if("string"==typeof t||Qu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function _o(t){if(null!=t){try{return St.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vo(t){if(t instanceof Gn)return t.clone();var e=new Xn(t.__wrapped__,t.__chain__);return e.__actions__=mi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Wo=Br((function(t,e){return Pu(t)?$n(t,or(e,1,Pu,!0)):[]})),To=Br((function(t,e){var n=Uo(e);return Pu(n)&&(n=void 0),Pu(t)?$n(t,or(e,1,Pu,!0),zi(n,2)):[]})),Xo=Br((function(t,e){var n=Uo(e);return Pu(n)&&(n=void 0),Pu(t)?$n(t,or(e,1,Pu,!0),void 0,n):[]}));function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=un(r+i,0)),we(t,zi(e,3),i)}function Eo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ra(n),i=n<0?un(r+i,0):an(i,r-1)),we(t,zi(e,3),i,!0)}function Mo(t){return(null==t?0:t.length)?or(t,1):[]}function jo(t){return t&&t.length?t[0]:void 0}var Po=Br((function(t){var e=pe(t,oi);return e.length&&e[0]===t[0]?mr(e):[]})),No=Br((function(t){var e=Uo(t),n=pe(t,oi);return e===Uo(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?mr(n,zi(e,2)):[]})),Bo=Br((function(t){var e=Uo(t),n=pe(t,oi);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?mr(n,void 0,e):[]}));function Uo(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Lo=Br(Co);function Co(t,e){return t&&t.length&&e&&e.length?Mr(t,e):t}var Yo=Oi((function(t,e){var n=null==t?0:t.length,r=Dn(t,e);return jr(t,pe(e,(function(t){return uo(t,n)?+t:t})).sort(di)),r}));function Ao(t){return null==t?t:fn.call(t)}var Oo=Br((function(t){return qr(or(t,1,Pu,!0))})),Fo=Br((function(t){var e=Uo(t);return Pu(e)&&(e=void 0),qr(or(t,1,Pu,!0),zi(e,2))})),Jo=Br((function(t){var e=Uo(t);return e="function"==typeof e?e:void 0,qr(or(t,1,Pu,!0),void 0,e)}));function Ho(t){if(!t||!t.length)return[];var e=0;return t=le(t,(function(t){if(Pu(t))return e=un(t.length,e),!0})),We(e,(function(e){return pe(t,Re(e))}))}function Do(t,e){if(!t||!t.length)return[];var n=Ho(t);return null==e?n:pe(n,(function(t){return oe(e,void 0,t)}))}var Ko=Br((function(t,e){return Pu(t)?$n(t,e):[]})),zo=Br((function(t){return ri(le(t,Pu))})),Qo=Br((function(t){var e=Uo(t);return Pu(e)&&(e=void 0),ri(le(t,Pu),zi(e,2))})),qo=Br((function(t){var e=Uo(t);return e="function"==typeof e?e:void 0,ri(le(t,Pu),void 0,e)})),$o=Br(Ho);var tu=Br((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Do(t,n)}));function eu(t){var e=Vn(t);return e.__chain__=!0,e}function nu(t,e){return e(t)}var ru=Oi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Dn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&uo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:nu,args:[i],thisArg:void 0}),new Xn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var iu=gi((function(t,e,n){xt.call(t,n)?++t[n]:Hn(t,n,1)}));var ou=Ii(Go),uu=Ii(Eo);function au(t,e){return(Eu(t)?ae:tr)(t,zi(e,3))}function cu(t,e){return(Eu(t)?ce:er)(t,zi(e,3))}var su=gi((function(t,e,n){xt.call(t,n)?t[n].push(e):Hn(t,n,[e])}));var lu=Br((function(t,e,n){var i=-1,o="function"==typeof e,u=ju(t)?r(t.length):[];return tr(t,(function(t){u[++i]=o?oe(e,t,n):br(t,e,n)})),u})),fu=gi((function(t,e,n){Hn(t,n,e)}));function hu(t,e){return(Eu(t)?pe:_r)(t,zi(e,3))}var pu=gi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var du=Br((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ao(t,e[0],e[1])?e=[]:n>2&&ao(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,or(e,1),[])})),vu=ze||function(){return Ht.Date.now()};function yu(t,e,n){return e=n?void 0:e,Ui(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function mu(t,e){var n;if("function"!=typeof e)throw new bt(o);return t=ra(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var bu=Br((function(t,e,n){var r=1;if(n.length){var i=Ye(n,Ki(bu));r|=32}return Ui(t,r,e,n,i)})),gu=Br((function(t,e,n){var r=3;if(n.length){var i=Ye(n,Ki(gu));r|=32}return Ui(e,r,t,n,i)}));function wu(t,e,n){var r,i,u,a,c,s,l=0,f=!1,h=!1,p=!0;if("function"!=typeof t)throw new bt(o);function d(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function v(t){return l=t,c=wo(m,e),f?d(t):a}function y(t){var n=t-s;return void 0===s||n>=e||n<0||h&&t-l>=u}function m(){var t=vu();if(y(t))return b(t);c=wo(m,function(t){var n=e-(t-s);return h?an(n,u-(t-l)):n}(t))}function b(t){return c=void 0,p&&r?d(t):(r=i=void 0,a)}function g(){var t=vu(),n=y(t);if(r=arguments,i=this,s=t,n){if(void 0===c)return v(s);if(h)return li(c),c=wo(m,e),d(s)}return void 0===c&&(c=wo(m,e)),a}return e=oa(e)||0,Au(n)&&(f=!!n.leading,u=(h="maxWait"in n)?un(oa(n.maxWait)||0,e):u,p="trailing"in n?!!n.trailing:p),g.cancel=function(){void 0!==c&&li(c),l=0,r=s=i=c=void 0},g.flush=function(){return void 0===c?a:b(vu())},g}var Zu=Br((function(t,e){return qn(t,1,e)})),ku=Br((function(t,e,n){return qn(t,oa(e)||0,n)}));function Su(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new bt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return n.cache=o.set(i,u)||o,u};return n.cache=new(Su.Cache||jn),n}function xu(t){if("function"!=typeof t)throw new bt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Su.Cache=jn;var Ru=ci((function(t,e){var n=(e=1==e.length&&Eu(e[0])?pe(e[0],Te(zi())):pe(or(e,1),Te(zi()))).length;return Br((function(r){for(var i=-1,o=an(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return oe(t,this,r)}))})),Iu=Br((function(t,e){return Ui(t,32,void 0,e,Ye(e,Ki(Iu)))})),_u=Br((function(t,e){return Ui(t,64,void 0,e,Ye(e,Ki(_u)))})),Vu=Oi((function(t,e){return Ui(t,256,void 0,void 0,void 0,e)}));function Wu(t,e){return t===e||t!=t&&e!=e}var Tu=Mi(dr),Xu=Mi((function(t,e){return t>=e})),Gu=gr(function(){return arguments}())?gr:function(t){return Ou(t)&&xt.call(t,"callee")&&!Dt.call(t,"callee")},Eu=r.isArray,Mu=$t?Te($t):function(t){return Ou(t)&&pr(t)==S};function ju(t){return null!=t&&Yu(t.length)&&!Lu(t)}function Pu(t){return Ou(t)&&ju(t)}var Nu=en||oc,Bu=te?Te(te):function(t){return Ou(t)&&pr(t)==f};function Uu(t){if(!Ou(t))return!1;var e=pr(t);return e==h||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Hu(t)}function Lu(t){if(!Au(t))return!1;var e=pr(t);return e==p||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Cu(t){return"number"==typeof t&&t==ra(t)}function Yu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Au(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ou(t){return null!=t&&"object"==typeof t}var Fu=ee?Te(ee):function(t){return Ou(t)&&no(t)==v};function Ju(t){return"number"==typeof t||Ou(t)&&pr(t)==y}function Hu(t){if(!Ou(t)||pr(t)!=m)return!1;var e=Ft(t);if(null===e)return!0;var n=xt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&St.call(n)==Vt}var Du=ne?Te(ne):function(t){return Ou(t)&&pr(t)==b};var Ku=re?Te(re):function(t){return Ou(t)&&no(t)==g};function zu(t){return"string"==typeof t||!Eu(t)&&Ou(t)&&pr(t)==w}function Qu(t){return"symbol"==typeof t||Ou(t)&&pr(t)==Z}var qu=ie?Te(ie):function(t){return Ou(t)&&Yu(t.length)&&!!Lt[pr(t)]};var $u=Mi(Ir),ta=Mi((function(t,e){return t<=e}));function ea(t){if(!t)return[];if(ju(t))return zu(t)?Je(t):mi(t);if(qt&&t[qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[qt]());var e=no(t);return(e==v?Le:e==g?Ae:Wa)(t)}function na(t){return t?(t=oa(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ra(t){var e=na(t),n=e%1;return e==e?n?e-n:e:0}function ia(t){return t?Kn(ra(t),0,4294967295):0}function oa(t){if("number"==typeof t)return t;if(Qu(t))return NaN;if(Au(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Au(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(D,"");var n=ot.test(t);return n||at.test(t)?Ot(t.slice(2),n?2:8):it.test(t)?NaN:+t}function ua(t){return bi(t,Za(t))}function aa(t){return null==t?"":Qr(t)}var ca=wi((function(t,e){if(fo(e)||ju(e))bi(e,wa(e),t);else for(var n in e)xt.call(e,n)&&An(t,n,e[n])})),sa=wi((function(t,e){bi(e,Za(e),t)})),la=wi((function(t,e,n,r){bi(e,Za(e),t,r)})),fa=wi((function(t,e,n,r){bi(e,wa(e),t,r)})),ha=Oi(Dn);var pa=Br((function(t,e){t=vt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&ao(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],u=Za(o),a=-1,c=u.length;++a<c;){var s=u[a],l=t[s];(void 0===l||Wu(l,Zt[s])&&!xt.call(t,s))&&(t[s]=o[s])}return t})),da=Br((function(t){return t.push(void 0,Ci),oe(Sa,void 0,t)}));function va(t,e,n){var r=null==t?void 0:fr(t,e);return void 0===r?n:r}function ya(t,e){return null!=t&&ro(t,e,yr)}var ma=Wi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=_t.call(e)),t[e]=n}),Aa(Ja)),ba=Wi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=_t.call(e)),xt.call(t,e)?t[e].push(n):t[e]=[n]}),zi),ga=Br(br);function wa(t){return ju(t)?Bn(t):xr(t)}function Za(t){return ju(t)?Bn(t,!0):Rr(t)}var ka=wi((function(t,e,n){Tr(t,e,n)})),Sa=wi((function(t,e,n,r){Tr(t,e,n,r)})),xa=Oi((function(t,e){var n={};if(null==t)return n;var r=!1;e=pe(e,(function(e){return e=ai(e,t),r||(r=e.length>1),e})),bi(t,Ji(t),n),r&&(n=zn(n,7,Yi));for(var i=e.length;i--;)$r(n,e[i]);return n}));var Ra=Oi((function(t,e){return null==t?{}:function(t,e){return Er(t,e,(function(e,n){return ya(t,n)}))}(t,e)}));function Ia(t,e){if(null==t)return{};var n=pe(Ji(t),(function(t){return[t]}));return e=zi(e),Er(t,n,(function(t,n){return e(t,n[0])}))}var _a=Bi(wa),Va=Bi(Za);function Wa(t){return null==t?[]:Xe(t,wa(t))}var Ta=xi((function(t,e,n){return e=e.toLowerCase(),t+(n?Xa(e):e)}));function Xa(t){return Ua(aa(t).toLowerCase())}function Ga(t){return(t=aa(t))&&t.replace(st,Pe).replace(Et,"")}var Ea=xi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ma=xi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ja=Si("toLowerCase");var Pa=xi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Na=xi((function(t,e,n){return t+(n?" ":"")+Ua(e)}));var Ba=xi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ua=Si("toUpperCase");function La(t,e,n){return t=aa(t),void 0===(e=n?void 0:e)?function(t){return Nt.test(t)}(t)?function(t){return t.match(jt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Ca=Br((function(t,e){try{return oe(t,void 0,e)}catch(t){return Uu(t)?t:new ht(t)}})),Ya=Oi((function(t,e){return ae(e,(function(e){e=Io(e),Hn(t,e,bu(t[e],t))})),t}));function Aa(t){return function(){return t}}var Oa=_i(),Fa=_i(!0);function Ja(t){return t}function Ha(t){return Sr("function"==typeof t?t:zn(t,1))}var Da=Br((function(t,e){return function(n){return br(n,t,e)}})),Ka=Br((function(t,e){return function(n){return br(t,n,e)}}));function za(t,e,n){var r=wa(e),i=lr(e,r);null!=n||Au(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=lr(e,wa(e)));var o=!(Au(n)&&"chain"in n&&!n.chain),u=Lu(t);return ae(i,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=mi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,de([this.value()],arguments))})})),t}function Qa(){}var qa=Xi(pe),$a=Xi(se),tc=Xi(me);function ec(t){return co(t)?Re(Io(t)):function(t){return function(e){return fr(e,t)}}(t)}var nc=Ei(),rc=Ei(!0);function ic(){return[]}function oc(){return!1}var uc=Ti((function(t,e){return t+e}),0),ac=Pi("ceil"),cc=Ti((function(t,e){return t/e}),1),sc=Pi("floor");var lc,fc=Ti((function(t,e){return t*e}),1),hc=Pi("round"),pc=Ti((function(t,e){return t-e}),0);return Vn.after=function(t,e){if("function"!=typeof e)throw new bt(o);return t=ra(t),function(){if(--t<1)return e.apply(this,arguments)}},Vn.ary=yu,Vn.assign=ca,Vn.assignIn=sa,Vn.assignInWith=la,Vn.assignWith=fa,Vn.at=ha,Vn.before=mu,Vn.bind=bu,Vn.bindAll=Ya,Vn.bindKey=gu,Vn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Eu(t)?t:[t]},Vn.chain=eu,Vn.chunk=function(t,e,n){e=(n?ao(t,e,n):void 0===e)?1:un(ra(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,u=0,a=r(qe(i/e));o<i;)a[u++]=Fr(t,o,o+=e);return a},Vn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Vn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return de(Eu(n)?mi(n):[n],or(e,1))},Vn.cond=function(t){var e=null==t?0:t.length,n=zi();return t=e?pe(t,(function(t){if("function"!=typeof t[1])throw new bt(o);return[n(t[0]),t[1]]})):[],Br((function(n){for(var r=-1;++r<e;){var i=t[r];if(oe(i[0],this,n))return oe(i[1],this,n)}}))},Vn.conforms=function(t){return function(t){var e=wa(t);return function(n){return Qn(n,t,e)}}(zn(t,1))},Vn.constant=Aa,Vn.countBy=iu,Vn.create=function(t,e){var n=Wn(t);return null==e?n:Jn(n,e)},Vn.curry=function t(e,n,r){var i=Ui(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Vn.curryRight=function t(e,n,r){var i=Ui(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Vn.debounce=wu,Vn.defaults=pa,Vn.defaultsDeep=da,Vn.defer=Zu,Vn.delay=ku,Vn.difference=Wo,Vn.differenceBy=To,Vn.differenceWith=Xo,Vn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Fr(t,(e=n||void 0===e?1:ra(e))<0?0:e,r):[]},Vn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Fr(t,0,(e=r-(e=n||void 0===e?1:ra(e)))<0?0:e):[]},Vn.dropRightWhile=function(t,e){return t&&t.length?ei(t,zi(e,3),!0,!0):[]},Vn.dropWhile=function(t,e){return t&&t.length?ei(t,zi(e,3),!0):[]},Vn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&ao(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ra(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ra(r))<0&&(r+=i),r=n>r?0:ia(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Vn.filter=function(t,e){return(Eu(t)?le:ir)(t,zi(e,3))},Vn.flatMap=function(t,e){return or(hu(t,e),1)},Vn.flatMapDeep=function(t,e){return or(hu(t,e),1/0)},Vn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ra(n),or(hu(t,e),n)},Vn.flatten=Mo,Vn.flattenDeep=function(t){return(null==t?0:t.length)?or(t,1/0):[]},Vn.flattenDepth=function(t,e){return(null==t?0:t.length)?or(t,e=void 0===e?1:ra(e)):[]},Vn.flip=function(t){return Ui(t,512)},Vn.flow=Oa,Vn.flowRight=Fa,Vn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Vn.functions=function(t){return null==t?[]:lr(t,wa(t))},Vn.functionsIn=function(t){return null==t?[]:lr(t,Za(t))},Vn.groupBy=su,Vn.initial=function(t){return(null==t?0:t.length)?Fr(t,0,-1):[]},Vn.intersection=Po,Vn.intersectionBy=No,Vn.intersectionWith=Bo,Vn.invert=ma,Vn.invertBy=ba,Vn.invokeMap=lu,Vn.iteratee=Ha,Vn.keyBy=fu,Vn.keys=wa,Vn.keysIn=Za,Vn.map=hu,Vn.mapKeys=function(t,e){var n={};return e=zi(e,3),cr(t,(function(t,r,i){Hn(n,e(t,r,i),t)})),n},Vn.mapValues=function(t,e){var n={};return e=zi(e,3),cr(t,(function(t,r,i){Hn(n,r,e(t,r,i))})),n},Vn.matches=function(t){return Vr(zn(t,1))},Vn.matchesProperty=function(t,e){return Wr(t,zn(e,1))},Vn.memoize=Su,Vn.merge=ka,Vn.mergeWith=Sa,Vn.method=Da,Vn.methodOf=Ka,Vn.mixin=za,Vn.negate=xu,Vn.nthArg=function(t){return t=ra(t),Br((function(e){return Xr(e,t)}))},Vn.omit=xa,Vn.omitBy=function(t,e){return Ia(t,xu(zi(e)))},Vn.once=function(t){return mu(2,t)},Vn.orderBy=function(t,e,n,r){return null==t?[]:(Eu(e)||(e=null==e?[]:[e]),Eu(n=r?void 0:n)||(n=null==n?[]:[n]),Gr(t,e,n))},Vn.over=qa,Vn.overArgs=Ru,Vn.overEvery=$a,Vn.overSome=tc,Vn.partial=Iu,Vn.partialRight=_u,Vn.partition=pu,Vn.pick=Ra,Vn.pickBy=Ia,Vn.property=ec,Vn.propertyOf=function(t){return function(e){return null==t?void 0:fr(t,e)}},Vn.pull=Lo,Vn.pullAll=Co,Vn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Mr(t,e,zi(n,2)):t},Vn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Mr(t,e,void 0,n):t},Vn.pullAt=Yo,Vn.range=nc,Vn.rangeRight=rc,Vn.rearg=Vu,Vn.reject=function(t,e){return(Eu(t)?le:ir)(t,xu(zi(e,3)))},Vn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=zi(e,3);++r<o;){var u=t[r];e(u,r,t)&&(n.push(u),i.push(r))}return jr(t,i),n},Vn.rest=function(t,e){if("function"!=typeof t)throw new bt(o);return Br(t,e=void 0===e?e:ra(e))},Vn.reverse=Ao,Vn.sampleSize=function(t,e,n){return e=(n?ao(t,e,n):void 0===e)?1:ra(e),(Eu(t)?Ln:Lr)(t,e)},Vn.set=function(t,e,n){return null==t?t:Cr(t,e,n)},Vn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Cr(t,e,n,r)},Vn.shuffle=function(t){return(Eu(t)?Cn:Or)(t)},Vn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&ao(t,e,n)?(e=0,n=r):(e=null==e?0:ra(e),n=void 0===n?r:ra(n)),Fr(t,e,n)):[]},Vn.sortBy=du,Vn.sortedUniq=function(t){return t&&t.length?Kr(t):[]},Vn.sortedUniqBy=function(t,e){return t&&t.length?Kr(t,zi(e,2)):[]},Vn.split=function(t,e,n){return n&&"number"!=typeof n&&ao(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=aa(t))&&("string"==typeof e||null!=e&&!Du(e))&&!(e=Qr(e))&&Ue(t)?si(Je(t),0,n):t.split(e,n):[]},Vn.spread=function(t,e){if("function"!=typeof t)throw new bt(o);return e=null==e?0:un(ra(e),0),Br((function(n){var r=n[e],i=si(n,0,e);return r&&de(i,r),oe(t,this,i)}))},Vn.tail=function(t){var e=null==t?0:t.length;return e?Fr(t,1,e):[]},Vn.take=function(t,e,n){return t&&t.length?Fr(t,0,(e=n||void 0===e?1:ra(e))<0?0:e):[]},Vn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Fr(t,(e=r-(e=n||void 0===e?1:ra(e)))<0?0:e,r):[]},Vn.takeRightWhile=function(t,e){return t&&t.length?ei(t,zi(e,3),!1,!0):[]},Vn.takeWhile=function(t,e){return t&&t.length?ei(t,zi(e,3)):[]},Vn.tap=function(t,e){return e(t),t},Vn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new bt(o);return Au(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wu(t,e,{leading:r,maxWait:e,trailing:i})},Vn.thru=nu,Vn.toArray=ea,Vn.toPairs=_a,Vn.toPairsIn=Va,Vn.toPath=function(t){return Eu(t)?pe(t,Io):Qu(t)?[t]:mi(Ro(aa(t)))},Vn.toPlainObject=ua,Vn.transform=function(t,e,n){var r=Eu(t),i=r||Nu(t)||qu(t);if(e=zi(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Au(t)&&Lu(o)?Wn(Ft(t)):{}}return(i?ae:cr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Vn.unary=function(t){return yu(t,1)},Vn.union=Oo,Vn.unionBy=Fo,Vn.unionWith=Jo,Vn.uniq=function(t){return t&&t.length?qr(t):[]},Vn.uniqBy=function(t,e){return t&&t.length?qr(t,zi(e,2)):[]},Vn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?qr(t,void 0,e):[]},Vn.unset=function(t,e){return null==t||$r(t,e)},Vn.unzip=Ho,Vn.unzipWith=Do,Vn.update=function(t,e,n){return null==t?t:ti(t,e,ui(n))},Vn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ti(t,e,ui(n),r)},Vn.values=Wa,Vn.valuesIn=function(t){return null==t?[]:Xe(t,Za(t))},Vn.without=Ko,Vn.words=La,Vn.wrap=function(t,e){return Iu(ui(e),t)},Vn.xor=zo,Vn.xorBy=Qo,Vn.xorWith=qo,Vn.zip=$o,Vn.zipObject=function(t,e){return ii(t||[],e||[],An)},Vn.zipObjectDeep=function(t,e){return ii(t||[],e||[],Cr)},Vn.zipWith=tu,Vn.entries=_a,Vn.entriesIn=Va,Vn.extend=sa,Vn.extendWith=la,za(Vn,Vn),Vn.add=uc,Vn.attempt=Ca,Vn.camelCase=Ta,Vn.capitalize=Xa,Vn.ceil=ac,Vn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==e&&(e=(e=oa(e))==e?e:0),Kn(oa(t),e,n)},Vn.clone=function(t){return zn(t,4)},Vn.cloneDeep=function(t){return zn(t,5)},Vn.cloneDeepWith=function(t,e){return zn(t,5,e="function"==typeof e?e:void 0)},Vn.cloneWith=function(t,e){return zn(t,4,e="function"==typeof e?e:void 0)},Vn.conformsTo=function(t,e){return null==e||Qn(t,e,wa(e))},Vn.deburr=Ga,Vn.defaultTo=function(t,e){return null==t||t!=t?e:t},Vn.divide=cc,Vn.endsWith=function(t,e,n){t=aa(t),e=Qr(e);var r=t.length,i=n=void 0===n?r:Kn(ra(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Vn.eq=Wu,Vn.escape=function(t){return(t=aa(t))&&U.test(t)?t.replace(N,Ne):t},Vn.escapeRegExp=function(t){return(t=aa(t))&&H.test(t)?t.replace(J,"\\$&"):t},Vn.every=function(t,e,n){var r=Eu(t)?se:nr;return n&&ao(t,e,n)&&(e=void 0),r(t,zi(e,3))},Vn.find=ou,Vn.findIndex=Go,Vn.findKey=function(t,e){return ge(t,zi(e,3),cr)},Vn.findLast=uu,Vn.findLastIndex=Eo,Vn.findLastKey=function(t,e){return ge(t,zi(e,3),sr)},Vn.floor=sc,Vn.forEach=au,Vn.forEachRight=cu,Vn.forIn=function(t,e){return null==t?t:ur(t,zi(e,3),Za)},Vn.forInRight=function(t,e){return null==t?t:ar(t,zi(e,3),Za)},Vn.forOwn=function(t,e){return t&&cr(t,zi(e,3))},Vn.forOwnRight=function(t,e){return t&&sr(t,zi(e,3))},Vn.get=va,Vn.gt=Tu,Vn.gte=Xu,Vn.has=function(t,e){return null!=t&&ro(t,e,vr)},Vn.hasIn=ya,Vn.head=jo,Vn.identity=Ja,Vn.includes=function(t,e,n,r){t=ju(t)?t:Wa(t),n=n&&!r?ra(n):0;var i=t.length;return n<0&&(n=un(i+n,0)),zu(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ze(t,e,n)>-1},Vn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=un(r+i,0)),Ze(t,e,i)},Vn.inRange=function(t,e,n){return e=na(e),void 0===n?(n=e,e=0):n=na(n),function(t,e,n){return t>=an(e,n)&&t<un(e,n)}(t=oa(t),e,n)},Vn.invoke=ga,Vn.isArguments=Gu,Vn.isArray=Eu,Vn.isArrayBuffer=Mu,Vn.isArrayLike=ju,Vn.isArrayLikeObject=Pu,Vn.isBoolean=function(t){return!0===t||!1===t||Ou(t)&&pr(t)==l},Vn.isBuffer=Nu,Vn.isDate=Bu,Vn.isElement=function(t){return Ou(t)&&1===t.nodeType&&!Hu(t)},Vn.isEmpty=function(t){if(null==t)return!0;if(ju(t)&&(Eu(t)||"string"==typeof t||"function"==typeof t.splice||Nu(t)||qu(t)||Gu(t)))return!t.length;var e=no(t);if(e==v||e==g)return!t.size;if(fo(t))return!xr(t).length;for(var n in t)if(xt.call(t,n))return!1;return!0},Vn.isEqual=function(t,e){return wr(t,e)},Vn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?wr(t,e,void 0,n):!!r},Vn.isError=Uu,Vn.isFinite=function(t){return"number"==typeof t&&nn(t)},Vn.isFunction=Lu,Vn.isInteger=Cu,Vn.isLength=Yu,Vn.isMap=Fu,Vn.isMatch=function(t,e){return t===e||Zr(t,e,qi(e))},Vn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,Zr(t,e,qi(e),n)},Vn.isNaN=function(t){return Ju(t)&&t!=+t},Vn.isNative=function(t){if(lo(t))throw new ht("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return kr(t)},Vn.isNil=function(t){return null==t},Vn.isNull=function(t){return null===t},Vn.isNumber=Ju,Vn.isObject=Au,Vn.isObjectLike=Ou,Vn.isPlainObject=Hu,Vn.isRegExp=Du,Vn.isSafeInteger=function(t){return Cu(t)&&t>=-9007199254740991&&t<=9007199254740991},Vn.isSet=Ku,Vn.isString=zu,Vn.isSymbol=Qu,Vn.isTypedArray=qu,Vn.isUndefined=function(t){return void 0===t},Vn.isWeakMap=function(t){return Ou(t)&&no(t)==k},Vn.isWeakSet=function(t){return Ou(t)&&"[object WeakSet]"==pr(t)},Vn.join=function(t,e){return null==t?"":rn.call(t,e)},Vn.kebabCase=Ea,Vn.last=Uo,Vn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ra(n))<0?un(r+i,0):an(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):we(t,Se,i,!0)},Vn.lowerCase=Ma,Vn.lowerFirst=ja,Vn.lt=$u,Vn.lte=ta,Vn.max=function(t){return t&&t.length?rr(t,Ja,dr):void 0},Vn.maxBy=function(t,e){return t&&t.length?rr(t,zi(e,2),dr):void 0},Vn.mean=function(t){return xe(t,Ja)},Vn.meanBy=function(t,e){return xe(t,zi(e,2))},Vn.min=function(t){return t&&t.length?rr(t,Ja,Ir):void 0},Vn.minBy=function(t,e){return t&&t.length?rr(t,zi(e,2),Ir):void 0},Vn.stubArray=ic,Vn.stubFalse=oc,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=fc,Vn.nth=function(t,e){return t&&t.length?Xr(t,ra(e)):void 0},Vn.noConflict=function(){return Ht._===this&&(Ht._=Wt),this},Vn.noop=Qa,Vn.now=vu,Vn.pad=function(t,e,n){t=aa(t);var r=(e=ra(e))?Fe(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi($e(i),n)+t+Gi(qe(i),n)},Vn.padEnd=function(t,e,n){t=aa(t);var r=(e=ra(e))?Fe(t):0;return e&&r<e?t+Gi(e-r,n):t},Vn.padStart=function(t,e,n){t=aa(t);var r=(e=ra(e))?Fe(t):0;return e&&r<e?Gi(e-r,n)+t:t},Vn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),sn(aa(t).replace(K,""),e||0)},Vn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ao(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=na(t),void 0===e?(e=t,t=0):e=na(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=ln();return an(t+i*(e-t+At("1e-"+((i+"").length-1))),e)}return Pr(t,e)},Vn.reduce=function(t,e,n){var r=Eu(t)?ve:_e,i=arguments.length<3;return r(t,zi(e,4),n,i,tr)},Vn.reduceRight=function(t,e,n){var r=Eu(t)?ye:_e,i=arguments.length<3;return r(t,zi(e,4),n,i,er)},Vn.repeat=function(t,e,n){return e=(n?ao(t,e,n):void 0===e)?1:ra(e),Nr(aa(t),e)},Vn.replace=function(){var t=arguments,e=aa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Vn.result=function(t,e,n){var r=-1,i=(e=ai(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[Io(e[r])];void 0===o&&(r=i,o=n),t=Lu(o)?o.call(t):o}return t},Vn.round=hc,Vn.runInContext=t,Vn.sample=function(t){return(Eu(t)?Un:Ur)(t)},Vn.size=function(t){if(null==t)return 0;if(ju(t))return zu(t)?Fe(t):t.length;var e=no(t);return e==v||e==g?t.size:xr(t).length},Vn.snakeCase=Pa,Vn.some=function(t,e,n){var r=Eu(t)?me:Jr;return n&&ao(t,e,n)&&(e=void 0),r(t,zi(e,3))},Vn.sortedIndex=function(t,e){return Hr(t,e)},Vn.sortedIndexBy=function(t,e,n){return Dr(t,e,zi(n,2))},Vn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Hr(t,e);if(r<n&&Wu(t[r],e))return r}return-1},Vn.sortedLastIndex=function(t,e){return Hr(t,e,!0)},Vn.sortedLastIndexBy=function(t,e,n){return Dr(t,e,zi(n,2),!0)},Vn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Hr(t,e,!0)-1;if(Wu(t[n],e))return n}return-1},Vn.startCase=Na,Vn.startsWith=function(t,e,n){return t=aa(t),n=null==n?0:Kn(ra(n),0,t.length),e=Qr(e),t.slice(n,n+e.length)==e},Vn.subtract=pc,Vn.sum=function(t){return t&&t.length?Ve(t,Ja):0},Vn.sumBy=function(t,e){return t&&t.length?Ve(t,zi(e,2)):0},Vn.template=function(t,e,n){var r=Vn.templateSettings;n&&ao(t,e,n)&&(e=void 0),t=aa(t),e=la({},e,r,Li);var i,o,u=la({},e.imports,r.imports,Li),a=wa(u),c=Xe(u,a),s=0,l=e.interpolate||lt,f="__p += '",h=yt((e.escape||lt).source+"|"+l.source+"|"+(l===Y?nt:lt).source+"|"+(e.evaluate||lt).source+"|$","g"),p="//# sourceURL="+(xt.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(h,(function(e,n,r,u,a,c){return r||(r=u),f+=t.slice(s,c).replace(ft,Be),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),a&&(o=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+e.length,e})),f+="';\n";var d=xt.call(e,"variable")&&e.variable;d||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(E,""):f).replace(M,"$1").replace(j,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Ca((function(){return pt(a,p+"return "+f).apply(void 0,c)}));if(v.source=f,Uu(v))throw v;return v},Vn.times=function(t,e){if((t=ra(t))<1||t>9007199254740991)return[];var n=4294967295,r=an(t,4294967295);t-=4294967295;for(var i=We(r,e=zi(e));++n<t;)e(n);return i},Vn.toFinite=na,Vn.toInteger=ra,Vn.toLength=ia,Vn.toLower=function(t){return aa(t).toLowerCase()},Vn.toNumber=oa,Vn.toSafeInteger=function(t){return t?Kn(ra(t),-9007199254740991,9007199254740991):0===t?t:0},Vn.toString=aa,Vn.toUpper=function(t){return aa(t).toUpperCase()},Vn.trim=function(t,e,n){if((t=aa(t))&&(n||void 0===e))return t.replace(D,"");if(!t||!(e=Qr(e)))return t;var r=Je(t),i=Je(e);return si(r,Ee(r,i),Me(r,i)+1).join("")},Vn.trimEnd=function(t,e,n){if((t=aa(t))&&(n||void 0===e))return t.replace(z,"");if(!t||!(e=Qr(e)))return t;var r=Je(t);return si(r,0,Me(r,Je(e))+1).join("")},Vn.trimStart=function(t,e,n){if((t=aa(t))&&(n||void 0===e))return t.replace(K,"");if(!t||!(e=Qr(e)))return t;var r=Je(t);return si(r,Ee(r,Je(e))).join("")},Vn.truncate=function(t,e){var n=30,r="...";if(Au(e)){var i="separator"in e?e.separator:i;n="length"in e?ra(e.length):n,r="omission"in e?Qr(e.omission):r}var o=(t=aa(t)).length;if(Ue(t)){var u=Je(t);o=u.length}if(n>=o)return t;var a=n-Fe(r);if(a<1)return r;var c=u?si(u,0,a).join(""):t.slice(0,a);if(void 0===i)return c+r;if(u&&(a+=c.length-a),Du(i)){if(t.slice(a).search(i)){var s,l=c;for(i.global||(i=yt(i.source,aa(rt.exec(i))+"g")),i.lastIndex=0;s=i.exec(l);)var f=s.index;c=c.slice(0,void 0===f?a:f)}}else if(t.indexOf(Qr(i),a)!=a){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Vn.unescape=function(t){return(t=aa(t))&&B.test(t)?t.replace(P,He):t},Vn.uniqueId=function(t){var e=++Rt;return aa(t)+e},Vn.upperCase=Ba,Vn.upperFirst=Ua,Vn.each=au,Vn.eachRight=cu,Vn.first=jo,za(Vn,(lc={},cr(Vn,(function(t,e){xt.call(Vn.prototype,e)||(lc[e]=t)})),lc),{chain:!1}),Vn.VERSION="4.17.15",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Vn[t].placeholder=Vn})),ae(["drop","take"],(function(t,e){Gn.prototype[t]=function(n){n=void 0===n?1:un(ra(n),0);var r=this.__filtered__&&!e?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:zi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(Ja)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Br((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return br(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(xu(zi(t)))},Gn.prototype.slice=function(t,e){t=ra(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ra(e))<0?n.dropRight(-e):n.take(e-t)),n)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(4294967295)},cr(Gn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Vn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Vn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,a=e instanceof Gn,c=u[0],s=a||Eu(e),l=function(t){var e=i.apply(Vn,de([t],u));return r&&f?e[0]:e};s&&n&&"function"==typeof c&&1!=c.length&&(a=s=!1);var f=this.__chain__,h=!!this.__actions__.length,p=o&&!f,d=a&&!h;if(!o&&s){e=d?e:new Gn(this);var v=t.apply(e,u);return v.__actions__.push({func:nu,args:[l],thisArg:void 0}),new Xn(v,f)}return p&&d?t.apply(this,u):(v=this.thru(l),p?r?v.value()[0]:v.value():v)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=gt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Vn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Eu(i)?i:[],t)}return this[n]((function(n){return e.apply(Eu(n)?n:[],t)}))}})),cr(Gn.prototype,(function(t,e){var n=Vn[e];if(n){var r=n.name+"";xt.call(gn,r)||(gn[r]=[]),gn[r].push({name:e,func:n})}})),gn[Vi(void 0,2).name]=[{name:"wrapper",func:void 0}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=mi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=mi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=mi(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Eu(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],u=o.size;switch(o.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=an(e,t+u);break;case"takeRight":t=un(t,e-u)}}return{start:t,end:e}}(0,i,this.__views__),u=o.start,a=o.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,p=an(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return ni(t,this.__actions__);var d=[];t:for(;c--&&h<p;){for(var v=-1,y=t[s+=e];++v<f;){var m=l[v],b=m.iteratee,g=m.type,w=b(y);if(2==g)y=w;else if(!w){if(1==g)continue t;break t}}d[h++]=y}return d},Vn.prototype.at=ru,Vn.prototype.chain=function(){return eu(this)},Vn.prototype.commit=function(){return new Xn(this.value(),this.__chain__)},Vn.prototype.next=function(){void 0===this.__values__&&(this.__values__=ea(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Vn.prototype.plant=function(t){for(var e,n=this;n instanceof Tn;){var r=Vo(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Vn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:nu,args:[Ao],thisArg:void 0}),new Xn(e,this.__chain__)}return this.thru(Ao)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,qt&&(Vn.prototype[qt]=function(){return this}),Vn}();Ht._=De,void 0===(i=function(){return De}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(19),n(149)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n(79);function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.payload=e,this.faces=n,this.actions=r}var e,n,i;return e=t,(n=[{key:"canPerformAction",value:function(t){return this.actions.find((function(e){return-1!==e.name.indexOf(t)}))}},{key:"canCombineWith",value:function(t){if(!t||this.id===t.id)return!1;if(!this.isFolder)return!1;if(!this.isDefinedFolder)return!0;var e=this.properties.child_policy||[];e=e.map((function(t){return{templateVariation:t.template_variation,maxCount:t.creation_policy&&t.creation_policy.policy_count_max||9999,enforceMaxCount:t.creation_policy&&t.creation_policy.enforce_policy_count_max||!1}}));var n=!0,r=!1,i=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done);n=!0)if(o.value.templateVariation===t.properties.template_variation)return!0}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}return!1}},{key:"containsIconFace",value:function(){return!!this.faces.find((function(t){return("web"===t.properties.constraints.platform||"generic"===t.properties.constraints.platform)&&"icon"===t.properties.constraints.view_mode}))}},{key:"containsCardFace",value:function(){return!!this.faces.find((function(t){return("web"===t.properties.constraints.platform||"generic"===t.properties.constraints.platform)&&"card"===t.properties.constraints.view_mode}))}},{key:"containsFullscreenFace",value:function(){return!!this.faces.find((function(t){return("web"===t.properties.constraints.platform||"generic"===t.properties.constraints.platform)&&"fullscreen"===t.properties.constraints.view_mode}))}},{key:"id",get:function(){return this.payload.id}},{key:"private",get:function(){return this.payload.private}},{key:"unpublished",get:function(){return this.payload.unpublished}},{key:"version",get:function(){return this.payload.version}},{key:"sync",get:function(){return this.payload.sync}},{key:"whenCreated",get:function(){return this.payload.when_created}},{key:"whenModified",get:function(){return this.payload.when_modified}},{key:"properties",get:function(){return this.payload["vAtom::vAtomType"]}},{key:"isFolder",get:function(){return-1!==this.properties.root_type.indexOf("ContainerType")}},{key:"isDefinedFolder",get:function(){return-1!==this.properties.root_type.indexOf("DefinedFolderContainerType")}},{key:"isDiscoverFolder",get:function(){return-1!=this.properties.root_type.indexOf("DiscoverFolderContainerType")}}])&&r(e.prototype,n),i&&r(e,i),t}()},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(38)("meta"),i=n(5),o=n(15),u=n(11).f,a=0,c=Object.isExtensible||function(){return!0},s=!n(3)((function(){return c(Object.preventExtensions({}))})),l=function(t){u(t,r,{value:{i:"O"+ ++a,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return s&&f.NEED&&c(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return y}));var r=n(162),i=n(32),o=n(81),u=n(31),a=n(18);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function u(t){s(o,r,i,u,a,"next",t)}function a(t){s(o,r,i,u,a,"throw",t)}u(void 0)}))}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var y=function(e){function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=function(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?h(t):e}(this,d(n).call(this,t))).queuedMessages=[],e.socketPaused=!1,e.socketProcessing=!1,e.onWebSocketMessage=e.onWebSocketMessage.bind(h(e)),e.socket=e.dataPool.Blockv.WebSockets,e.socket.connect(),e.socket.addEventListener("websocket.raw",e.onWebSocketMessage),o.a.withBlockv(t.Blockv).addRegion(h(e)),e}var r,s,y,m,b;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(n,e),r=n,(s=[{key:"close",value:function(){p(d(n.prototype),"close",this).call(this),this.socket.removeEventListener("websocket.raw",this.onWebSocketMessage),o.a.withBlockv(this.dataPool.Blockv).removeRegion(this)}},{key:"pauseMessages",value:function(){this.socketPaused=!0}},{key:"resumeMessages",value:function(){this.socketPaused=!1,this.socketProcessing||this.processNextMessage()}},{key:"onWebSocketMessage",value:function(t){this.queuedMessages.push(t),this.socketPaused||this.socketProcessing||this.processNextMessage()}},{key:"processNextMessage",value:(b=l(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.socketPaused){e.next=2;break}return e.abrupt("return");case 2:if(!this.socketProcessing){e.next=4;break}return e.abrupt("return");case 4:if(this.socketProcessing=!0,n=this.queuedMessages.shift()){e.next=9;break}return this.socketProcessing=!1,e.abrupt("return");case 9:return e.prev=9,e.next=12,this.processMessage(n);case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),t.warn("[DataPool > BVWebSocketRegion] Error processing WebSocket message! "+e.t0.message,n);case 17:this.socketProcessing=!1,this.processNextMessage();case 19:case"end":return e.stop()}}),e,this,[[9,14]])}))),function(){return b.apply(this,arguments)})},{key:"processMessage",value:(m=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("state_update"==e.msg_type){t.next=2;break}return t.abrupt("return");case 2:if(e.payload&&e.payload.id){t.next=5;break}throw new Error("Got websocket message with no vatom ID in it.");case 5:if(e.payload.new_object){t.next=7;break}throw new Error("WebSocket message had no new object payload.");case 7:this.updateObjects([{id:e.payload.id,new_data:e.payload.new_object}]);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"map",value:function(t){if("vatom"!==t.type)return null;var e=Array.from(this.objects.values()).filter((function(e){return"face"===e.type&&e.data.template===t.data["vAtom::vAtomType"].template})).map((function(t){return t.data})),n=Array.from(this.objects.values()).filter((function(e){return"action"===e.type&&e.data.name.startsWith(t.data["vAtom::vAtomType"].template+"::Action::")})).map((function(t){return t.data}));return new i.a(t.data,e,n)}},{key:"willAdd",value:function(t){var e=this,n=t.data&&t.data["vAtom::vAtomType"]&&t.data["vAtom::vAtomType"].parent_id;n&&a.a.run((function(t){return e.emit("object.updated",n)}));var r=o.a.withBlockv(this.dataPool.Blockv).changes.find((function(e){return e.id===t.id}));r&&Object(u.merge)(t.data,r.new_data)}},{key:"willUpdateFields",value:function(t,e){var n=this,r=t.data&&t.data["vAtom::vAtomType"]&&t.data["vAtom::vAtomType"].parent_id,i=e&&e["vAtom::vAtomType"]&&e["vAtom::vAtomType"].parent_id;i&&a.a.run((function(t){return n.emit("object.updated",r)})),i&&a.a.run((function(t){return n.emit("object.updated",i)}))}},{key:"willUpdateField",value:function(t,e,n,r){var i=this;"vAtom::vAtomType.parent_id"===e&&(a.a.run((function(t){return i.emit("object.updated",n)})),a.a.run((function(t){return i.emit("object.updated",r)})))}},{key:"willRemove",value:function(t){var e=this,n=t;"string"==typeof t&&(n=this.objects.get(t));var r=n&&n.data&&n.data["vAtom::vAtomType"]&&n.data["vAtom::vAtomType"].parent_id;r&&a.a.run((function(t){return e.emit("object.updated",r)}))}}])&&f(r.prototype,s),y&&f(r,y),n}(r.a)}).call(this,n(9))},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,(r=[{key:"when",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.privateEventListeners=this.privateEventListeners||{},this.privateEventListeners[t]=this.privateEventListeners[t]||[],n?(this.privateEventListeners[t].push(n),null):new Promise((function(n){n.removeAfterCall=!0,e.privateEventListeners[t].push(n)}))}},{key:"on",value:function(){return this.when.apply(this,arguments)}},{key:"addEventListener",value:function(){return this.when.apply(this,arguments)}},{key:"removeEventListener",value:function(t,e){this.privateEventListeners=this.privateEventListeners||{},this.privateEventListeners[t]=this.privateEventListeners[t]||[];for(var n=0;n<this.privateEventListeners[t].length;n+=1)this.privateEventListeners[t][n]===e&&(this.privateEventListeners[t].splice(n,1),n-=1)}},{key:"off",value:function(){return this.removeEventListener.apply(this,arguments)}},{key:"emit",value:function(t){var e=this,n=this.privateEventListeners&&this.privateEventListeners[t]||[],r=Array.from(arguments).slice(1);n.forEach((function(t){t.apply(e,r)}));for(var i=0;i<n.length;i+=1)n[i].removeAfterCall&&(n.splice(i,1),i-=1)}},{key:"trigger",value:function(){return this.emit.apply(this,arguments)}},{key:"triggerEvent",value:function(){return this.emit.apply(this,arguments)}}])&&n(e.prototype,r),i&&n(e,i),t}();r.mixin=function(t){for(var e in r.prototype)r.prototype.hasOwnProperty(e)&&(t[e]=r.prototype[e])},t.exports=r},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!1},function(t,e,n){var r=n(118),i=n(85);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(23),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(4),i=n(119),o=n(85),u=n(84)("IE_PROTO"),a=function(){},c=function(){var t,e=n(82)("iframe"),r=o.length;for(e.style.display="none",n(86).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[u]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(118),i=n(85).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(15),i=n(12),o=n(84)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(6)("unscopables"),i=Array.prototype;null==i[r]&&n(16)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(77),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=f;var o=n(60);o.inherits=n(54);var u=n(153),a=n(113);o.inherits(f,u);for(var c=i(a.prototype),s=0;s<c.length;s++){var l=c[s];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(t){if(!(this instanceof f))return new f(t);u.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){var r=n(11).f,i=n(15),o=n(6)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(0),i=n(29),o=n(3),u=n(88),a="["+u+"]",c=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),l=function(t,e,n){var i={},a=o((function(){return!!u[t]()||"​…"!="​…"[t]()})),c=i[t]=a?e(f):u[t];n&&(i[n]=c),r(r.P+r.F*a,"String",i)},f=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(s,"")),t};t.exports=l},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(2),i=n(11),o=n(10),u=n(6)("species");t.exports=function(t){var e=r[t];o&&e&&!e[u]&&i.f(e,u,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(13);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";var r=n(382);function i(t){this.message=t}i.prototype=new Error,i.prototype.name="InvalidTokenError",t.exports=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(r(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}},t.exports.InvalidTokenError=i},function(t,e,n){var r=n(28);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(28),i=n(6)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},function(t,e,n){var r=n(4),i=n(22),o=n(6)("species");t.exports=function(t,e){var n,u=r(t).constructor;return void 0===u||null==(n=r(u)[o])?e:i(n)}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(76).Buffer)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(32);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.bv=e,this.overridePayload=n,this.filters=[],this.groupBy=[t.FieldTemplateVariation],this.scope=null,this.auth=!0,this.setScopeToOwnedVatomsOnly(),this.samples=0}var e,n,o;return e=t,(n=[{key:"appendFilter",value:function(e,n,r,i){this.filters.push({field:e,value:n,filter_op:r||t.FilterOperation.Equal,bool_op:i||t.CombineOperation.And})}},{key:"setScopeToPublisherFQDN",value:function(e){this.scope={key:t.FieldPublisherFqdn,value:e}}},{key:"setScopeToOwnedVatomsOnly",value:function(){this.scope={key:t.FieldOwner,value:"$currentuser"}}},{key:"setScope",value:function(t,e){this.scope={key:t,value:e}}},{key:"getPayload",value:function(){if(this.overridePayload)return this.overridePayload;if(!this.scope)throw new Error("Vatomic SDK: No scope set for discover filter!");var t={};return t.scope=this.scope,this.samples>0&&this.groupBy.length>0&&(t.sample=this.samples,t.group_by=this.groupBy),this.filters.length>0&&(t.filters=[{filter_elems:this.filters}]),t.return={type:"*",fields:[]},t}},{key:"execute",value:function(){return this.bv.client.request("POST","/v1/vatom/discover",this.getPayload(),this.auth).then((function(t){var e=t.actions,n=t.faces,i=t.results,o=[],u=[],a=[],c=!0,s=!1,l=void 0;try{for(var f,h=e[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value,d=p.name.split("::Action::"),v=d[0];o.push({template:v,action:d[1],meta:p.meta,properties:p.properties})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}var y=!0,m=!1,b=void 0;try{for(var g,w=n[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var Z=g.value;u.push({template:Z.template,id:Z.id,meta:Z.meta,properties:Z.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var k=!0,S=!1,x=void 0;try{for(var R,I=function(){var t=R.value,e=t["vAtom::vAtomType"].template,n=new r.a(t,u.filter((function(t){return t.template===e})),o.filter((function(t){return t.template===e})));a.push(n)},_=i[Symbol.iterator]();!(k=(R=_.next()).done);k=!0)I()}catch(t){S=!0,x=t}finally{try{k||null==_.return||_.return()}finally{if(S)throw x}}return a}))}},{key:"count",value:function(){var t=this.getPayload();return t.return.type="count",this.bv.client.request("POST","/v1/vatom/discover",t,this.auth).then((function(t){return t.count||0}))}}])&&i(e.prototype,n),o&&i(e,o),t}();o.FilterOperation={Equal:"Eq",GreaterThan:"Gt",GreaterOrEqual:"Ge",LessThan:"Lt",LessOrEqual:"Le",NotEqual:"Ne",Match:"Match"},o.CombineOperation={And:"And",Or:"Or"},o.FieldAcquireable="vAtom::vAtomType.acquireable",o.FieldPrivateName="private.name",o.FieldID="id",o.FieldPublisherFqdn="vAtom::vAtomType.publisher_fqdn",o.FieldTemplate="vAtom::vAtomType.template",o.FieldTemplateVariation="vAtom::vAtomType.template_variation",o.FieldVisibilityType="vAtom::vAtomType.visibility.type",o.FieldOwner="vAtom::vAtomType.owner",o.FieldParentID="vAtom::vAtomType.parent_id"},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e.id,this.firstName=e.properties.first_name,this.lastName=e.properties.last_name,this.namePublic=e.properties.name_public,this.avatarUri=e.properties.avatar_uri,this.avatarPublic=e.properties.avatar_public,this.birthday=e.properties.birthday,this.language=e.properties.language,this.nonPushNotification=e.properties.nonpush_notification,this.guestId=e.properties.guest_id,this.isPasswordSet=e.properties.is_password_set,this.activated=e.system_properties.activated,this.isAdmin=e.system_properties.is_admin,this.isMerchant=e.system_properties.is_merchant,this.lastLogin=e.system_properties.last_login,this.pubFqdn=e.system_properties.pub_fqdn,this.rawPayload=e,this.consents=e.properties.user_consents,this.meta={createdBy:e.meta.created_by,dataType:e.meta.data_type,modifiedBy:e.meta.modified_by,whenCreated:e.meta.when_created,whenModified:e.meta.when_modified}}},function(t,e,n){(function(t,r){var i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},o=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,u=String(t).replace(o,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),a=r[n];n<i;a=r[++n])y(a)||!Z(a)?u+=" "+a:u+=" "+c(a);return u},e.deprecate=function(n,i){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,i).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?r.trace(i):r.error(i),o=!0}return n.apply(this,arguments)}};var u,a={};function c(t,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(n)?r.showHidden=n:n&&e._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,t,r.depth)}function s(t,e){var n=c.styles[e];return n?"["+c.colors[n][0]+"m"+t+"["+c.colors[n][1]+"m":t}function l(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return b(i)||(i=f(t,i,r)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(b(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(m(e))return t.stylize(""+e,"number");if(v(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,n);if(o)return o;var u=Object.keys(n),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(n)),S(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return h(n);if(0===u.length){if(x(n)){var c=n.name?": "+n.name:"";return t.stylize("[Function"+c+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(k(n))return t.stylize(Date.prototype.toString.call(n),"date");if(S(n))return h(n)}var s,l="",Z=!1,R=["{","}"];(d(n)&&(Z=!0,R=["[","]"]),x(n))&&(l=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(l=" "+RegExp.prototype.toString.call(n)),k(n)&&(l=" "+Date.prototype.toUTCString.call(n)),S(n)&&(l=" "+h(n)),0!==u.length||Z&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),s=Z?function(t,e,n,r,i){for(var o=[],u=0,a=e.length;u<a;++u)W(e,String(u))?o.push(p(t,e,n,r,String(u),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(t,e,n,r,i,!0))})),o}(t,n,r,a,u):u.map((function(e){return p(t,n,r,a,e,Z)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(s,l,R)):R[0]+l+R[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,o){var u,a,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),W(r,i)||(u="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=y(n)?f(t,c.value,null):f(t,c.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),g(u)){if(o&&i.match(/^\d+$/))return a;(u=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+a}function d(t){return Array.isArray(t)}function v(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return"number"==typeof t}function b(t){return"string"==typeof t}function g(t){return void 0===t}function w(t){return Z(t)&&"[object RegExp]"===R(t)}function Z(t){return"object"==typeof t&&null!==t}function k(t){return Z(t)&&"[object Date]"===R(t)}function S(t){return Z(t)&&("[object Error]"===R(t)||t instanceof Error)}function x(t){return"function"==typeof t}function R(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(g(u)&&(u=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(u)){var i=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);r.error("%s %d: %s",n,i,t)}}else a[n]=function(){};return a[n]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=v,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=b,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=w,e.isObject=Z,e.isDate=k,e.isError=S,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(173);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),_[t.getMonth()],e].join(" ")}function W(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){r.log("%s - %s",V(),e.format.apply(e,arguments))},e.inherits=n(174),e._extend=function(t,e){if(!e||!Z(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function X(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var e;if("function"!=typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),T&&Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,i(t))},e.promisify.custom=T,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,u=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(u,null,e)}),(function(e){t.nextTick(X,e,u)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,i(e)),n}}).call(this,n(27),n(9))},function(t,e,n){var r=n(8),i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(17),i=n(7),o=n(41);t.exports=function(t){return function(e,n,u){var a,c=r(e),s=i(c.length),l=o(u,s);if(t&&n!=n){for(;s>l;)if((a=c[l++])!=a)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(28);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(6)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:n=!0}},o[r]=function(){return u},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(4);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(58),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(136);var r=n(13),i=n(16),o=n(3),u=n(29),a=n(6),c=n(103),s=a("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var h=a(t),p=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),d=p?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[h](""),!e})):void 0;if(!p||!d||"replace"===t&&!l||"split"===t&&!f){var v=/./[h],y=n(u,h,""[t],(function(t,e,n,r,i){return e.exec===c?p&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),m=y[0],b=y[1];r(String.prototype,t,m),i(RegExp.prototype,h,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},function(t,e,n){var r=n(21),i=n(131),o=n(98),u=n(4),a=n(7),c=n(100),s={},l={};(e=t.exports=function(t,e,n,f,h){var p,d,v,y,m=h?function(){return t}:c(t),b=r(n,f,e?2:1),g=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(o(m)){for(p=a(t.length);p>g;g++)if((y=e?b(u(d=t[g])[0],d[1]):b(t[g]))===s||y===l)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=i(v,b,d.value,e))===s||y===l)return y}).BREAK=s,e.RETURN=l},function(t,e,n){var r=n(2).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(13),u=n(53),a=n(34),c=n(72),s=n(52),l=n(5),f=n(3),h=n(68),p=n(48),d=n(89);t.exports=function(t,e,n,v,y,m){var b=r[t],g=b,w=y?"set":"add",Z=g&&g.prototype,k={},S=function(t){var e=Z[t];o(Z,t,"delete"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof g&&(m||Z.forEach&&!f((function(){(new g).entries().next()})))){var x=new g,R=x[w](m?{}:-0,1)!=x,I=f((function(){x.has(1)})),_=h((function(t){new g(t)})),V=!m&&f((function(){for(var t=new g,e=5;e--;)t[w](e,e);return!t.has(-0)}));_||((g=e((function(e,n){s(e,g,t);var r=d(new b,e,g);return null!=n&&c(n,y,r[w],r),r}))).prototype=Z,Z.constructor=g),(I||V)&&(S("delete"),S("has"),y&&S("get")),(V||R)&&S(w),m&&Z.clear&&delete Z.clear}else g=v.getConstructor(e,t,y,w),u(g.prototype,n),a.NEED=!0;return p(g,t),k[t]=g,i(i.G+i.W+i.F*(g!=b),k),m||v.setStrong(g,t,y),g}},function(t,e,n){for(var r,i=n(2),o=n(16),u=n(38),a=u("typed_array"),c=u("view"),s=!(!i.ArrayBuffer||!i.DataView),l=s,f=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=i[h[f++]])?(o(r.prototype,a,!0),o(r.prototype,c,!0)):l=!1;t.exports={ABV:s,CONSTR:l,TYPED:a,VIEW:c}},function(t,e,n){"use strict";(function(t){
10/*!
11 * The buffer module from node.js, for the browser.
12 *
13 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
14 * @license MIT
15 */
16var r=n(365),i=n(366),o=n(150);function u(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return s(this,t,e,n)}function s(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=a(t,e<0?0:0|p(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return C(t).length;default:if(r)return L(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return W(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return _(this,e,n);case"latin1":case"binary":return V(this,e,n);case"base64":return R(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){var o,u=1,a=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;u=2,a/=2,c/=2,n/=2}function s(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){var l=-1;for(o=n;o<a;o++)if(s(t,o)===s(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*u}else-1!==l&&(o-=o-l),l=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(s(t,o+h)!==s(e,h)){f=!1;break}if(f)return o}return-1}function g(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(e.substr(2*u,2),16);if(isNaN(a))return u;t[n+u]=a}return u}function w(t,e,n,r){return Y(L(e,t.length-n),t,n,r)}function Z(t,e,n,r){return Y(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function k(t,e,n,r){return Z(t,e,n,r)}function S(t,e,n,r){return Y(C(e),t,n,r)}function x(t,e,n,r){return Y(function(t,e){for(var n,r,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)n=t.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function R(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function I(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,u,a,c,s=t[i],l=null,f=s>239?4:s>223?3:s>191?2:1;if(i+f<=n)switch(f){case 1:s<128&&(l=s);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&s)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(c=(15&s)<<12|(63&o)<<6|63&u)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],u=t[i+2],a=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(c=(15&s)<<18|(63&o)<<12|(63&u)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=u(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return s(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var u=t[n];if(!c.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(r,i),i+=u.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?I(this,0,t):v.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(n>>>=0)-(e>>>=0),a=Math.min(o,u),s=this.slice(r,i),l=t.slice(e,n),f=0;f<a;++f)if(s[f]!==l[f]){o=s[f],u=l[f];break}return o<u?-1:u<o?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return g(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return Z(this,t,e,n);case"latin1":case"binary":return k(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function V(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function W(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=U(t[o]);return i}function T(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function X(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function G(t,e,n,r,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function E(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(t,e,n,r,o){return o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function N(t,e,n,r,o){return o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||X(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||X(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},c.prototype.readUInt8=function(t,e){return e||X(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||X(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||X(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||X(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||X(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||X(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||X(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||X(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||X(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||X(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||X(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||X(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||X(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||X(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||X(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||X(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||G(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||G(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):E(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):E(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);G(this,t,e,n,i-1,-i)}var o=0,u=1,a=0;for(this[e]=255&t;++o<n&&(u*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/u>>0)-a&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);G(this,t,e,n,i-1,-i)}var o=n-1,u=1,a=0;for(this[e+o]=255&t;--o>=0&&(u*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/u>>0)-a&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):E(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):E(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||G(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return P(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return P(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return N(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return N(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var u=c.isBuffer(t)?t:L(new c(t,r).toString()),a=u.length;for(o=0;o<n-e;++o)this[o+e]=u[o%a]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],u=0;u<r;++u){if((n=t.charCodeAt(u))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function C(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(19))},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,u,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(a-1),u=0;u<o.length;)o[u++]=arguments[u];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,n(27))},function(t,e,n){(function(e){var r=n(158).logify_input,i=n(160).titleFormat,o=n(159),u={is_warning:"is_warning",is_usage:"is_usage",is_internal:"is_internal",details:"details"};function a(t){var e=[],n={};for(var r in t){var i=t[r];if(i&&i.IS_REASSERT_OPTS)for(var o in i){if(!u[o]&&"IS_REASSERT_OPTS"!==o)throw new Error("@brillout/assert: [Internal Error]: "+("Unkonwn option `"+o+"`"));n[o]=i[o]}else e.push(i)}return{msgs:e,opts:n}}function c(t,e,n,o){var a=[];return a=a.concat(function(t){if(!t.details)return[];var e=[i("Error Details")];for(var n in t.details)e.push(r(t.details[n]));return e.push("\n"),e}(n)),h()||(a=a.concat(function(t,e,n){if(t[u.is_warning]&&e.length>0)return[];return[i("Stack Trace"),n.join("\n")]}(n,e,o))).push("\n"),a=a.concat(function(t,e,n){let o=[];var a=(n[u.is_warning]?"Warning":n[u.is_usage]&&"Wrong Usage")||n[u.is_internal]&&"Internal Error"||"Assertion Fail";o.push(i(a)),0===e.length&&o.push("Failed assertion condition: `"+t+" != true`");for(var c in e){var s=e[c],l=r(s);o.push(l)}n.details&&(o.push(""),o.push('See "Error Details" above for more information.'));return o}(t,e,n))}function s(t,n,r){var i=!n[u.is_warning];if(o()){if(i){var a=new Error;throw a.stack=t.join("\n"),a}for(var c in t)e.error(t[c])}h()&&(i?l(t):setTimeout((function(){l(t)}),0))}function l(t){for(var n in t)e.error(t[n]);throw Error.stackTraceLimit=1/0,new Error}function f(){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var e=(new Error).stack;Error.stackTraceLimit=t;var n=e.split("\n"),r=[];for(var i in n){var o=n[i];"Error"!==o&&(-1===o.indexOf("/node_modules/@brillout/assert/")&&-1===o.indexOf(" (internal/")&&r.push(o))}return r}function h(){return"undefined"!=typeof window}t.exports=function(t){if(t)return t;var e=a([].slice.call(arguments,1)),n=e.msgs,r=e.opts,i=f(),o=c(t,n,r,i);return s(o,r,i),t}}).call(this,n(9))},function(t,e,n){"use strict";(function(e){var r=n(378),i=n(379),o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function c(t){return(t||"").toString().replace(a,"")}var s=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function f(t){var n,r=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},i={},u=typeof(t=t||r);if("blob:"===t.protocol)i=new p(unescape(t.pathname),{});else if("string"===u)for(n in i=new p(t,{}),l)delete i[n];else if("object"===u){for(n in t)n in l||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=o.test(t.href))}return i}function h(t){t=c(t);var e=u.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function p(t,e,n){if(t=c(t),!(this instanceof p))return new p(t,e,n);var o,u,a,l,d,v,y=s.slice(),m=typeof e,b=this,g=0;for("object"!==m&&"string"!==m&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),e=f(e),o=!(u=h(t||"")).protocol&&!u.slashes,b.slashes=u.slashes||o&&e.slashes,b.protocol=u.protocol||e.protocol||"",t=u.rest,u.slashes||(y[3]=[/(.*)/,"pathname"]);g<y.length;g++)"function"!=typeof(l=y[g])?(a=l[0],v=l[1],a!=a?b[v]=t:"string"==typeof a?~(d=t.indexOf(a))&&("number"==typeof l[2]?(b[v]=t.slice(0,d),t=t.slice(d+l[2])):(b[v]=t.slice(d),t=t.slice(0,d))):(d=a.exec(t))&&(b[v]=d[1],t=t.slice(0,d.index)),b[v]=b[v]||o&&l[3]&&e[v]||"",l[4]&&(b[v]=b[v].toLowerCase())):t=l(t);n&&(b.query=n(b.query)),o&&e.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==e.pathname)&&(b.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,u=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),u++):u&&(0===r&&(o=!0),n.splice(r,1),u--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(b.pathname,e.pathname)),r(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(l=b.auth.split(":"),b.username=l[0]||"",b.password=l[1]||""),b.origin=b.protocol&&b.host&&"file:"!==b.protocol?b.protocol+"//"+b.host:"null",b.href=b.toString()}p.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,/:\d+$/.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var u="pathname"===t?"/":"#";o[t]=e.charAt(0)!==u?u+e:e}else o[t]=e;break;default:o[t]=e}for(var a=0;a<s.length;a++){var c=s[a];c[4]&&(o[c[1]]=o[c[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.slashes?"//":"");return n.username&&(o+=n.username,n.password&&(o+=":"+n.password),o+="@"),o+=n.host+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},p.extractProtocol=h,p.location=f,p.trimLeft=c,p.qs=i,t.exports=p}).call(this,n(19))},function(t,e,n){(function(t,e,r,i,o,u){
17/*!
18 LZ-UTF8 v0.5.5
19
20 Copyright (c) 2018, Rotem Dan
21 Released under the MIT license.
22
23 Build date: 2018-07-30
24
25 Please report any issue at https://github.com/rotemdan/lzutf8.js/issues
26*/
27var a;if(function(o){o.runningInNodeJS=function(){return"object"==typeof t&&"object"==typeof t.versions&&"string"==typeof t.versions.node},o.runningInMainNodeJSModule=function(){return o.runningInNodeJS()&&n.c[n.s]===e},o.commonJSAvailable=function(){return"object"==typeof e.exports},o.runningInWebWorker=function(){return"undefined"==typeof window&&"object"==typeof self&&"function"==typeof self.addEventListener&&"function"==typeof self.close},o.runningInNodeChildProcess=function(){return o.runningInNodeJS()&&"function"==typeof t.send},o.runningInNullOrigin=function(){return"object"==typeof window&&"object"==typeof window.location&&("http:"!==document.location.protocol&&"https:"!==document.location.protocol)},o.webWorkersAvailable=function(){return"function"==typeof Worker&&!o.runningInNullOrigin()&&(!o.runningInNodeJS()&&!(navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Android 4.3")>=0))},o.log=function(t,e){void 0===e&&(e=!1),"object"==typeof r&&(r.log(t),e&&"object"==typeof document&&(document.body.innerHTML+=t+"<br/>"))},o.createErrorMessage=function(t,e){if(void 0===e&&(e="Unhandled exception"),null==t)return e;if(e+=": ","object"==typeof t.content){if(o.runningInNodeJS())return e+t.content.stack;var n=JSON.stringify(t.content);return"{}"!==n?e+n:e+t.content}return"string"==typeof t.content?e+t.content:e+t},o.printExceptionAndStackTraceToConsole=function(t,e){void 0===e&&(e="Unhandled exception"),o.log(o.createErrorMessage(t,e))},o.getGlobalObject=function(){return"object"==typeof i?i:"object"==typeof window?window:"object"==typeof self?self:{}},o.toString=Object.prototype.toString,o.commonJSAvailable()&&(e.exports=o)}(a||(a={})),"function"==typeof Uint8Array&&0!==new Uint8Array(1).subarray(1).byteLength){var c=function(t,e){var n=function(t,e,n){return t<e?e:t>n?n:t};t|=0,e|=0,arguments.length<1&&(t=0),arguments.length<2&&(e=this.length),t<0&&(t=this.length+t),e<0&&(e=this.length+e),t=n(t,0,this.length);var r=(e=n(e,0,this.length))-t;return r<0&&(r=0),new this.constructor(this.buffer,this.byteOffset+t*this.BYTES_PER_ELEMENT,r)},s=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],l=void 0;if("object"==typeof window?l=window:"object"==typeof self&&(l=self),void 0!==l)for(var f=0;f<s.length;f++)l[s[f]]&&(l[s[f]].prototype.subarray=c)}!function(t){var e=function(){function e(){}return e.compressAsync=function(e,n,r){var i=new t.Timer,o=new t.Compressor;if(!r)throw new TypeError("compressAsync: No callback argument given");if("string"==typeof e)e=t.encodeUTF8(e);else if(null==e||!(e instanceof Uint8Array))return void r(void 0,new TypeError("compressAsync: Invalid input argument, only 'string' and 'Uint8Array' are supported"));var u=t.ArrayTools.splitByteArray(e,n.blockSize),a=[],c=function(e){if(e<u.length){var s=void 0;try{s=o.compressBlock(u[e])}catch(t){return void r(void 0,t)}a.push(s),i.getElapsedTime()<=20?c(e+1):(t.enqueueImmediate((function(){return c(e+1)})),i.restart())}else{var l=t.ArrayTools.concatUint8Arrays(a);t.enqueueImmediate((function(){var e;try{e=t.CompressionCommon.encodeCompressedBytes(l,n.outputEncoding)}catch(t){return void r(void 0,t)}t.enqueueImmediate((function(){return r(e)}))}))}};t.enqueueImmediate((function(){return c(0)}))},e.createCompressionStream=function(){var e=new t.Compressor,r=new(n(152).Transform)({decodeStrings:!0,highWaterMark:65536});return r._transform=function(n,i,o){var u;try{u=t.BufferTools.uint8ArrayToBuffer(e.compressBlock(t.BufferTools.bufferToUint8Array(n)))}catch(t){return void r.emit("error",t)}r.push(u),o()},r},e}();t.AsyncCompressor=e}(a||(a={})),function(t){var e=function(){function e(){}return e.decompressAsync=function(e,n,r){if(!r)throw new TypeError("decompressAsync: No callback argument given");var i=new t.Timer;try{e=t.CompressionCommon.decodeCompressedBytes(e,n.inputEncoding)}catch(t){return void r(void 0,t)}var o=new t.Decompressor,u=t.ArrayTools.splitByteArray(e,n.blockSize),a=[],c=function(e){if(e<u.length){var s=void 0;try{s=o.decompressBlock(u[e])}catch(t){return void r(void 0,t)}a.push(s),i.getElapsedTime()<=20?c(e+1):(t.enqueueImmediate((function(){return c(e+1)})),i.restart())}else{var l=t.ArrayTools.concatUint8Arrays(a);t.enqueueImmediate((function(){var e;try{e=t.CompressionCommon.encodeDecompressedBytes(l,n.outputEncoding)}catch(t){return void r(void 0,t)}t.enqueueImmediate((function(){return r(e)}))}))}};t.enqueueImmediate((function(){return c(0)}))},e.createDecompressionStream=function(){var e=new t.Decompressor,r=new(n(152).Transform)({decodeStrings:!0,highWaterMark:65536});return r._transform=function(n,i,o){var u;try{u=t.BufferTools.uint8ArrayToBuffer(e.decompressBlock(t.BufferTools.bufferToUint8Array(n)))}catch(t){return void r.emit("error",t)}r.push(u),o()},r},e}();t.AsyncDecompressor=e}(a||(a={})),function(t){var e;!function(e){e.compressAsync=function(t,n,r){if("ByteArray"!=n.inputEncoding||t instanceof Uint8Array){var i={token:Math.random().toString(),type:"compress",data:t,inputEncoding:n.inputEncoding,outputEncoding:n.outputEncoding},o=function(t){var n=t.data;n&&n.token==i.token&&(e.globalWorker.removeEventListener("message",o),"error"==n.type?r(void 0,new Error(n.error)):r(n.data))};e.globalWorker.addEventListener("message",o),e.globalWorker.postMessage(i,[])}else r(void 0,new TypeError("compressAsync: input is not a Uint8Array"))},e.decompressAsync=function(t,n,r){var i={token:Math.random().toString(),type:"decompress",data:t,inputEncoding:n.inputEncoding,outputEncoding:n.outputEncoding},o=function(t){var n=t.data;n&&n.token==i.token&&(e.globalWorker.removeEventListener("message",o),"error"==n.type?r(void 0,new Error(n.error)):r(n.data))};e.globalWorker.addEventListener("message",o),e.globalWorker.postMessage(i,[])},e.installWebWorkerIfNeeded=function(){"object"==typeof self&&void 0===self.document&&null!=self.addEventListener&&(self.addEventListener("message",(function(e){var n=e.data;if("compress"==n.type){var r=void 0;try{r=t.compress(n.data,{outputEncoding:n.outputEncoding})}catch(e){return void self.postMessage({token:n.token,type:"error",error:t.createErrorMessage(e)},[])}(i={token:n.token,type:"compressionResult",data:r,encoding:n.outputEncoding}).data instanceof Uint8Array&&-1===navigator.appVersion.indexOf("MSIE 10")?self.postMessage(i,[i.data.buffer]):self.postMessage(i,[])}else if("decompress"==n.type){var i,o=void 0;try{o=t.decompress(n.data,{inputEncoding:n.inputEncoding,outputEncoding:n.outputEncoding})}catch(e){return void self.postMessage({token:n.token,type:"error",error:t.createErrorMessage(e)},[])}(i={token:n.token,type:"decompressionResult",data:o,encoding:n.outputEncoding}).data instanceof Uint8Array&&-1===navigator.appVersion.indexOf("MSIE 10")?self.postMessage(i,[i.data.buffer]):self.postMessage(i,[])}})),self.addEventListener("error",(function(e){t.log(t.createErrorMessage(e.error,"Unexpected LZUTF8 WebWorker exception"))})))},e.createGlobalWorkerIfNeeded=function(){if(e.globalWorker)return!0;if(!t.webWorkersAvailable())return!1;if(!e.scriptURI&&"object"==typeof document){var n=document.getElementById("lzutf8");null!=n&&(e.scriptURI=n.getAttribute("src")||void 0)}return!!e.scriptURI&&(e.globalWorker=new Worker(e.scriptURI),!0)},e.terminate=function(){e.globalWorker&&(e.globalWorker.terminate(),e.globalWorker=void 0)}}(e=t.WebWorker||(t.WebWorker={})),e.installWebWorkerIfNeeded()}(a||(a={})),function(t){var e=function(){function t(t,e,n){this.container=t,this.startPosition=e,this.length=n}return t.prototype.get=function(t){return this.container[this.startPosition+t]},t.prototype.getInReversedOrder=function(t){return this.container[this.startPosition+this.length-1-t]},t.prototype.set=function(t,e){this.container[this.startPosition+t]=e},t}();t.ArraySegment=e}(a||(a={})),function(t){!function(t){t.copyElements=function(t,e,n,r,i){for(;i--;)n[r++]=t[e++]},t.zeroElements=function(t,e,n){for(;n--;)t[e++]=0},t.countNonzeroValuesInArray=function(t){for(var e=0,n=0;n<t.length;n++)t[n]&&e++;return e},t.truncateStartingElements=function(t,e){if(t.length<=e)throw new RangeError("truncateStartingElements: Requested length should be smaller than array length");for(var n=t.length-e,r=0;r<e;r++)t[r]=t[n+r];t.length=e},t.doubleByteArrayCapacity=function(t){var e=new Uint8Array(2*t.length);return e.set(t),e},t.concatUint8Arrays=function(t){for(var e=0,n=0,r=t;n<r.length;n++){e+=(c=r[n]).length}for(var i=new Uint8Array(e),o=0,u=0,a=t;u<a.length;u++){var c=a[u];i.set(c,o),o+=c.length}return i},t.splitByteArray=function(t,e){for(var n=[],r=0;r<t.length;){var i=Math.min(e,t.length-r);n.push(t.subarray(r,r+i)),r+=i}return n}}(t.ArrayTools||(t.ArrayTools={}))}(a||(a={})),function(t){!function(t){t.convertToUint8ArrayIfNeeded=function(e){return"function"==typeof o&&o.isBuffer(e)?t.bufferToUint8Array(e):e},t.uint8ArrayToBuffer=function(t){if(o.prototype instanceof Uint8Array){var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return Object.setPrototypeOf(e,o.prototype),e}for(var n=t.length,r=new o(n),i=0;i<n;i++)r[i]=t[i];return r},t.bufferToUint8Array=function(t){if(o.prototype instanceof Uint8Array)return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);for(var e=t.length,n=new Uint8Array(e),r=0;r<e;r++)n[r]=t[r];return n}}(t.BufferTools||(t.BufferTools={}))}(a||(a={})),function(t){!function(e){e.getCroppedBuffer=function(t,e,n,r){void 0===r&&(r=0);var i=new Uint8Array(n+r);return i.set(t.subarray(e,e+n)),i},e.getCroppedAndAppendedByteArray=function(e,n,r,i){return t.ArrayTools.concatUint8Arrays([e.subarray(n,n+r),i])},e.detectCompressionSourceEncoding=function(t){if(null==t)throw new TypeError("detectCompressionSourceEncoding: input is null or undefined");if("string"==typeof t)return"String";if(t instanceof Uint8Array||"function"==typeof o&&o.isBuffer(t))return"ByteArray";throw new TypeError("detectCompressionSourceEncoding: input must be of type 'string', 'Uint8Array' or 'Buffer'")},e.encodeCompressedBytes=function(e,n){switch(n){case"ByteArray":return e;case"Buffer":return t.BufferTools.uint8ArrayToBuffer(e);case"Base64":return t.encodeBase64(e);case"BinaryString":return t.encodeBinaryString(e);case"StorageBinaryString":return t.encodeStorageBinaryString(e);default:throw new TypeError("encodeCompressedBytes: invalid output encoding requested")}},e.decodeCompressedBytes=function(e,n){if(null==n)throw new TypeError("decodeCompressedData: Input is null or undefined");switch(n){case"ByteArray":case"Buffer":var r=t.BufferTools.convertToUint8ArrayIfNeeded(e);if(!(r instanceof Uint8Array))throw new TypeError("decodeCompressedData: 'ByteArray' or 'Buffer' input type was specified but input is not a Uint8Array or Buffer");return r;case"Base64":if("string"!=typeof e)throw new TypeError("decodeCompressedData: 'Base64' input type was specified but input is not a string");return t.decodeBase64(e);case"BinaryString":if("string"!=typeof e)throw new TypeError("decodeCompressedData: 'BinaryString' input type was specified but input is not a string");return t.decodeBinaryString(e);case"StorageBinaryString":if("string"!=typeof e)throw new TypeError("decodeCompressedData: 'StorageBinaryString' input type was specified but input is not a string");return t.decodeStorageBinaryString(e);default:throw new TypeError("decodeCompressedData: invalid input encoding requested: '"+n+"'")}},e.encodeDecompressedBytes=function(e,n){switch(n){case"String":return t.decodeUTF8(e);case"ByteArray":return e;case"Buffer":if("function"!=typeof o)throw new TypeError("encodeDecompressedBytes: a 'Buffer' type was specified but is not supported at the current envirnment");return t.BufferTools.uint8ArrayToBuffer(e);default:throw new TypeError("encodeDecompressedBytes: invalid output encoding requested")}}}(t.CompressionCommon||(t.CompressionCommon={}))}(a||(a={})),function(t){var e;!function(e){var n,r=[];e.enqueueImmediate=function(t){r.push(t),1===r.length&&n()},e.initializeScheduler=function(){var e=function(){for(var e=0,n=r;e<n.length;e++){var i=n[e];try{i.call(void 0)}catch(e){t.printExceptionAndStackTraceToConsole(e,"enqueueImmediate exception")}}r.length=0};if(t.runningInNodeJS()&&(n=function(){return u((function(){return e()}))}),"object"==typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.postMessage){var i,o="enqueueImmediate-"+Math.random().toString();window.addEventListener("message",(function(t){t.data===o&&e()})),i=t.runningInNullOrigin()?"*":window.location.href,n=function(){return window.postMessage(o,i)}}else if("function"==typeof MessageChannel&&"function"==typeof MessagePort){var a=new MessageChannel;a.port1.onmessage=function(){return e()},n=function(){return a.port2.postMessage(0)}}else n=function(){return setTimeout((function(){return e()}),0)}},e.initializeScheduler()}(e=t.EventLoop||(t.EventLoop={})),t.enqueueImmediate=function(t){return e.enqueueImmediate(t)}}(a||(a={})),function(t){!function(t){t.override=function(e,n){return t.extend(e,n)},t.extend=function(t,e){if(null==t)throw new TypeError("obj is null or undefined");if("object"!=typeof t)throw new TypeError("obj is not an object");if(null==e&&(e={}),"object"!=typeof e)throw new TypeError("newProperties is not an object");if(null!=e)for(var n in e)t[n]=e[n];return t}}(t.ObjectTools||(t.ObjectTools={}))}(a||(a={})),function(t){t.getRandomIntegerInRange=function(t,e){return t+Math.floor(Math.random()*(e-t))},t.getRandomUTF16StringOfLength=function(e){for(var n="",r=0;r<e;r++){var i=void 0;do{i=t.getRandomIntegerInRange(0,1114112)}while(i>=55296&&i<=57343);n+=t.Encoding.CodePoint.decodeToString(i)}return n}}(a||(a={})),function(t){var e=function(){function t(t){void 0===t&&(t=1024),this.outputBufferCapacity=t,this.outputPosition=0,this.outputString="",this.outputBuffer=new Uint16Array(this.outputBufferCapacity)}return t.prototype.appendCharCode=function(t){this.outputBuffer[this.outputPosition++]=t,this.outputPosition===this.outputBufferCapacity&&this.flushBufferToOutputString()},t.prototype.appendCharCodes=function(t){for(var e=0,n=t.length;e<n;e++)this.appendCharCode(t[e])},t.prototype.appendString=function(t){for(var e=0,n=t.length;e<n;e++)this.appendCharCode(t.charCodeAt(e))},t.prototype.appendCodePoint=function(t){if(t<=65535)this.appendCharCode(t);else{if(!(t<=1114111))throw new Error("appendCodePoint: A code point of "+t+" cannot be encoded in UTF-16");this.appendCharCode(55296+(t-65536>>>10)),this.appendCharCode(56320+(t-65536&1023))}},t.prototype.getOutputString=function(){return this.flushBufferToOutputString(),this.outputString},t.prototype.flushBufferToOutputString=function(){this.outputPosition===this.outputBufferCapacity?this.outputString+=String.fromCharCode.apply(null,this.outputBuffer):this.outputString+=String.fromCharCode.apply(null,this.outputBuffer.subarray(0,this.outputPosition)),this.outputPosition=0},t}();t.StringBuilder=e}(a||(a={})),function(e){var n=function(){function n(){this.restart()}return n.prototype.restart=function(){this.startTime=n.getTimestamp()},n.prototype.getElapsedTime=function(){return n.getTimestamp()-this.startTime},n.prototype.getElapsedTimeAndRestart=function(){var t=this.getElapsedTime();return this.restart(),t},n.prototype.logAndRestart=function(t,n){void 0===n&&(n=!0);var r=this.getElapsedTime(),i=t+": "+r.toFixed(3)+"ms";return e.log(i,n),this.restart(),r},n.getTimestamp=function(){return this.timestampFunc||this.createGlobalTimestampFunction(),this.timestampFunc()},n.getMicrosecondTimestamp=function(){return Math.floor(1e3*n.getTimestamp())},n.createGlobalTimestampFunction=function(){if("object"==typeof t&&"function"==typeof t.hrtime){var e=0;this.timestampFunc=function(){var n=t.hrtime(),r=1e3*n[0]+n[1]/1e6;return e+r},e=Date.now()-this.timestampFunc()}else if("object"==typeof chrome&&chrome.Interval){var n=Date.now(),r=new chrome.Interval;r.start(),this.timestampFunc=function(){return n+r.microseconds()/1e3}}else if("object"==typeof performance&&performance.now){var i=Date.now()-performance.now();this.timestampFunc=function(){return i+performance.now()}}else Date.now?this.timestampFunc=function(){return Date.now()}:this.timestampFunc=function(){return(new Date).getTime()}},n}();e.Timer=n}(a||(a={})),function(t){var e=function(){function e(e){void 0===e&&(e=!0),this.MinimumSequenceLength=4,this.MaximumSequenceLength=31,this.MaximumMatchDistance=32767,this.PrefixHashTableSize=65537,this.inputBufferStreamOffset=1,e&&"function"==typeof Uint32Array?this.prefixHashTable=new t.CompressorCustomHashTable(this.PrefixHashTableSize):this.prefixHashTable=new t.CompressorSimpleHashTable(this.PrefixHashTableSize)}return e.prototype.compressBlock=function(e){if(null==e)throw new TypeError("compressBlock: undefined or null input received");return"string"==typeof e&&(e=t.encodeUTF8(e)),e=t.BufferTools.convertToUint8ArrayIfNeeded(e),this.compressUtf8Block(e)},e.prototype.compressUtf8Block=function(t){if(!t||0==t.length)return new Uint8Array(0);var e=this.cropAndAddNewBytesToInputBuffer(t),n=this.inputBuffer,r=this.inputBuffer.length;this.outputBuffer=new Uint8Array(t.length),this.outputBufferPosition=0;for(var i=0,o=e;o<r;o++){var u=n[o],a=o<i;if(o>r-this.MinimumSequenceLength)a||this.outputRawByte(u);else{var c=this.getBucketIndexForPrefix(o);if(!a){var s=this.findLongestMatch(o,c);null!=s&&(this.outputPointerBytes(s.length,s.distance),i=o+s.length,a=!0)}a||this.outputRawByte(u);var l=this.inputBufferStreamOffset+o;this.prefixHashTable.addValueToBucket(c,l)}}return this.outputBuffer.subarray(0,this.outputBufferPosition)},e.prototype.findLongestMatch=function(t,e){var n=this.prefixHashTable.getArraySegmentForBucketIndex(e,this.reusableArraySegmentObject);if(null==n)return null;for(var r,i=this.inputBuffer,o=0,u=0;u<n.length;u++){var a=n.getInReversedOrder(u)-this.inputBufferStreamOffset,c=t-a,s=void 0;if(s=void 0===r?this.MinimumSequenceLength-1:r<128&&c>=128?o+(o>>>1):o,c>this.MaximumMatchDistance||s>=this.MaximumSequenceLength||t+s>=i.length)break;if(i[a+s]===i[t+s])for(var l=0;;l++){if(t+l===i.length||i[a+l]!==i[t+l]){l>s&&(r=c,o=l);break}if(l===this.MaximumSequenceLength)return{distance:c,length:this.MaximumSequenceLength}}}return void 0!==r?{distance:r,length:o}:null},e.prototype.getBucketIndexForPrefix=function(t){return(7880599*this.inputBuffer[t]+39601*this.inputBuffer[t+1]+199*this.inputBuffer[t+2]+this.inputBuffer[t+3])%this.PrefixHashTableSize},e.prototype.outputPointerBytes=function(t,e){e<128?(this.outputRawByte(192|t),this.outputRawByte(e)):(this.outputRawByte(224|t),this.outputRawByte(e>>>8),this.outputRawByte(255&e))},e.prototype.outputRawByte=function(t){this.outputBuffer[this.outputBufferPosition++]=t},e.prototype.cropAndAddNewBytesToInputBuffer=function(e){if(void 0===this.inputBuffer)return this.inputBuffer=e,0;var n=Math.min(this.inputBuffer.length,this.MaximumMatchDistance),r=this.inputBuffer.length-n;return this.inputBuffer=t.CompressionCommon.getCroppedAndAppendedByteArray(this.inputBuffer,r,n,e),this.inputBufferStreamOffset+=r,n},e}();t.Compressor=e}(a||(a={})),function(t){var e=function(){function e(t){this.minimumBucketCapacity=4,this.maximumBucketCapacity=64,this.bucketLocators=new Uint32Array(2*t),this.storage=new Uint32Array(2*t),this.storageIndex=1}return e.prototype.addValueToBucket=function(e,n){e<<=1,this.storageIndex>=this.storage.length>>>1&&this.compact();var r,i=this.bucketLocators[e];if(0===i)i=this.storageIndex,r=1,this.storage[this.storageIndex]=n,this.storageIndex+=this.minimumBucketCapacity;else{(r=this.bucketLocators[e+1])===this.maximumBucketCapacity-1&&(r=this.truncateBucketToNewerElements(i,r,this.maximumBucketCapacity/2));var o=i+r;0===this.storage[o]?(this.storage[o]=n,o===this.storageIndex&&(this.storageIndex+=r)):(t.ArrayTools.copyElements(this.storage,i,this.storage,this.storageIndex,r),i=this.storageIndex,this.storageIndex+=r,this.storage[this.storageIndex++]=n,this.storageIndex+=r),r++}this.bucketLocators[e]=i,this.bucketLocators[e+1]=r},e.prototype.truncateBucketToNewerElements=function(e,n,r){var i=e+n-r;return t.ArrayTools.copyElements(this.storage,i,this.storage,e,r),t.ArrayTools.zeroElements(this.storage,e+r,n-r),r},e.prototype.compact=function(){var e=this.bucketLocators,n=this.storage;this.bucketLocators=new Uint32Array(this.bucketLocators.length),this.storageIndex=1;for(var r=0;r<e.length;r+=2){var i=e[r+1];0!==i&&(this.bucketLocators[r]=this.storageIndex,this.bucketLocators[r+1]=i,this.storageIndex+=Math.max(Math.min(2*i,this.maximumBucketCapacity),this.minimumBucketCapacity))}this.storage=new Uint32Array(8*this.storageIndex);for(r=0;r<e.length;r+=2){var o=e[r];if(0!==o){var u=this.bucketLocators[r],a=this.bucketLocators[r+1];t.ArrayTools.copyElements(n,o,this.storage,u,a)}}},e.prototype.getArraySegmentForBucketIndex=function(e,n){e<<=1;var r=this.bucketLocators[e];return 0===r?null:(void 0===n&&(n=new t.ArraySegment(this.storage,r,this.bucketLocators[e+1])),n)},e.prototype.getUsedBucketCount=function(){return Math.floor(t.ArrayTools.countNonzeroValuesInArray(this.bucketLocators)/2)},e.prototype.getTotalElementCount=function(){for(var t=0,e=0;e<this.bucketLocators.length;e+=2)t+=this.bucketLocators[e+1];return t},e}();t.CompressorCustomHashTable=e}(a||(a={})),function(t){var e=function(){function e(t){this.maximumBucketCapacity=64,this.buckets=new Array(t)}return e.prototype.addValueToBucket=function(e,n){var r=this.buckets[e];void 0===r?this.buckets[e]=[n]:(r.length===this.maximumBucketCapacity-1&&t.ArrayTools.truncateStartingElements(r,this.maximumBucketCapacity/2),r.push(n))},e.prototype.getArraySegmentForBucketIndex=function(e,n){var r=this.buckets[e];return void 0===r?null:(void 0===n&&(n=new t.ArraySegment(r,0,r.length)),n)},e.prototype.getUsedBucketCount=function(){return t.ArrayTools.countNonzeroValuesInArray(this.buckets)},e.prototype.getTotalElementCount=function(){for(var t=0,e=0;e<this.buckets.length;e++)void 0!==this.buckets[e]&&(t+=this.buckets[e].length);return t},e}();t.CompressorSimpleHashTable=e}(a||(a={})),function(t){var e=function(){function e(){this.MaximumMatchDistance=32767,this.outputPosition=0}return e.prototype.decompressBlockToString=function(e){return e=t.BufferTools.convertToUint8ArrayIfNeeded(e),t.decodeUTF8(this.decompressBlock(e))},e.prototype.decompressBlock=function(e){this.inputBufferRemainder&&(e=t.ArrayTools.concatUint8Arrays([this.inputBufferRemainder,e]),this.inputBufferRemainder=void 0);for(var n=this.cropOutputBufferToWindowAndInitialize(Math.max(4*e.length,1024)),r=0,i=e.length;r<i;r++){var o=e[r];if(o>>>6==3){var u=o>>>5;if(r==i-1||r==i-2&&7==u){this.inputBufferRemainder=e.subarray(r);break}if(e[r+1]>>>7==1)this.outputByte(o);else{var a=31&o,c=void 0;6==u?(c=e[r+1],r+=1):(c=e[r+1]<<8|e[r+2],r+=2);for(var s=this.outputPosition-c,l=0;l<a;l++)this.outputByte(this.outputBuffer[s+l])}}else this.outputByte(o)}return this.rollBackIfOutputBufferEndsWithATruncatedMultibyteSequence(),t.CompressionCommon.getCroppedBuffer(this.outputBuffer,n,this.outputPosition-n)},e.prototype.outputByte=function(e){this.outputPosition===this.outputBuffer.length&&(this.outputBuffer=t.ArrayTools.doubleByteArrayCapacity(this.outputBuffer)),this.outputBuffer[this.outputPosition++]=e},e.prototype.cropOutputBufferToWindowAndInitialize=function(e){if(!this.outputBuffer)return this.outputBuffer=new Uint8Array(e),0;var n=Math.min(this.outputPosition,this.MaximumMatchDistance);if(this.outputBuffer=t.CompressionCommon.getCroppedBuffer(this.outputBuffer,this.outputPosition-n,n,e),this.outputPosition=n,this.outputBufferRemainder){for(var r=0;r<this.outputBufferRemainder.length;r++)this.outputByte(this.outputBufferRemainder[r]);this.outputBufferRemainder=void 0}return n},e.prototype.rollBackIfOutputBufferEndsWithATruncatedMultibyteSequence=function(){for(var t=1;t<=4&&this.outputPosition-t>=0;t++){var e=this.outputBuffer[this.outputPosition-t];if(t<4&&e>>>3==30||t<3&&e>>>4==14||t<2&&e>>>5==6)return this.outputBufferRemainder=this.outputBuffer.subarray(this.outputPosition-t,this.outputPosition),void(this.outputPosition-=t)}},e}();t.Decompressor=e}(a||(a={})),function(t){!function(e){!function(e){var n=new Uint8Array([65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47]),r=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,255,255,255,255]);e.encode=function(n){return n&&0!=n.length?t.runningInNodeJS()?t.BufferTools.uint8ArrayToBuffer(n).toString("base64"):e.encodeWithJS(n):""},e.decode=function(n){return n?t.runningInNodeJS()?t.BufferTools.bufferToUint8Array(new o(n,"base64")):e.decodeWithJS(n):new Uint8Array(0)},e.encodeWithJS=function(e,r){if(void 0===r&&(r=!0),!e||0==e.length)return"";for(var i,o=n,u=new t.StringBuilder,a=0,c=e.length;a<c;a+=3)a<=c-3?(i=e[a]<<16|e[a+1]<<8|e[a+2],u.appendCharCode(o[i>>>18&63]),u.appendCharCode(o[i>>>12&63]),u.appendCharCode(o[i>>>6&63]),u.appendCharCode(o[63&i]),i=0):a===c-2?(i=e[a]<<16|e[a+1]<<8,u.appendCharCode(o[i>>>18&63]),u.appendCharCode(o[i>>>12&63]),u.appendCharCode(o[i>>>6&63]),r&&u.appendCharCode(61)):a===c-1&&(i=e[a]<<16,u.appendCharCode(o[i>>>18&63]),u.appendCharCode(o[i>>>12&63]),r&&(u.appendCharCode(61),u.appendCharCode(61)));return u.getOutputString()},e.decodeWithJS=function(t,e){if(!t||0==t.length)return new Uint8Array(0);var n=t.length%4;if(1===n)throw new Error("Invalid Base64 string: length % 4 == 1");2===n?t+="==":3===n&&(t+="="),e||(e=new Uint8Array(t.length));for(var i=0,o=t.length,u=0;u<o;u+=4){var a=r[t.charCodeAt(u)]<<18|r[t.charCodeAt(u+1)]<<12|r[t.charCodeAt(u+2)]<<6|r[t.charCodeAt(u+3)];e[i++]=a>>>16&255,e[i++]=a>>>8&255,e[i++]=255&a}return 61==t.charCodeAt(o-1)&&i--,61==t.charCodeAt(o-2)&&i--,e.subarray(0,i)}}(e.Base64||(e.Base64={}))}(t.Encoding||(t.Encoding={}))}(a||(a={})),function(t){!function(e){!function(e){e.encode=function(e){if(null==e)throw new TypeError("BinaryString.encode: undefined or null input received");if(0===e.length)return"";for(var n=e.length,r=new t.StringBuilder,i=0,o=1,u=0;u<n;u+=2){var a=void 0;a=u==n-1?e[u]<<8:e[u]<<8|e[u+1],r.appendCharCode(i<<16-o|a>>>o),i=a&(1<<o)-1,15===o?(r.appendCharCode(i),i=0,o=1):o+=1,u>=n-2&&r.appendCharCode(i<<16-o)}return r.appendCharCode(32768|n%2),r.getOutputString()},e.decode=function(t){if("string"!=typeof t)throw new TypeError("BinaryString.decode: invalid input type");if(""==t)return new Uint8Array(0);for(var e=new Uint8Array(3*t.length),n=0,r=function(t){e[n++]=t>>>8,e[n++]=255&t},i=0,o=0,u=0;u<t.length;u++){var a=t.charCodeAt(u);a>=32768?(32769==a&&n--,o=0):(0==o?i=a:(r(i<<o|a>>>15-o),i=a&(1<<15-o)-1),15==o?o=0:o+=1)}return e.subarray(0,n)}}(e.BinaryString||(e.BinaryString={}))}(t.Encoding||(t.Encoding={}))}(a||(a={})),function(t){!function(t){!function(t){t.encodeFromString=function(t,e){var n=t.charCodeAt(e);if(n<55296||n>56319)return n;var r=t.charCodeAt(e+1);if(r>=56320&&r<=57343)return r-56320+(n-55296<<10)+65536;throw new Error("getUnicodeCodePoint: Received a lead surrogate character, char code "+n+", followed by "+r+", which is not a trailing surrogate character code.")},t.decodeToString=function(t){if(t<=65535)return String.fromCharCode(t);if(t<=1114111)return String.fromCharCode(55296+(t-65536>>>10),56320+(t-65536&1023));throw new Error("getStringFromUnicodeCodePoint: A code point of "+t+" cannot be encoded in UTF-16")}}(t.CodePoint||(t.CodePoint={}))}(t.Encoding||(t.Encoding={}))}(a||(a={})),function(t){!function(t){!function(t){var e=["000","001","002","003","004","005","006","007","008","009","010","011","012","013","014","015","016","017","018","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","040","041","042","043","044","045","046","047","048","049","050","051","052","053","054","055","056","057","058","059","060","061","062","063","064","065","066","067","068","069","070","071","072","073","074","075","076","077","078","079","080","081","082","083","084","085","086","087","088","089","090","091","092","093","094","095","096","097","098","099","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255"];t.encode=function(t){for(var n=[],r=0;r<t.length;r++)n.push(e[t[r]]);return n.join(" ")}}(t.DecimalString||(t.DecimalString={}))}(t.Encoding||(t.Encoding={}))}(a||(a={})),function(t){!function(t){!function(e){e.encode=function(e){return t.BinaryString.encode(e).replace(/\0/g,"耂")},e.decode=function(e){return t.BinaryString.decode(e.replace(/\u8002/g,"\0"))}}(t.StorageBinaryString||(t.StorageBinaryString={}))}(t.Encoding||(t.Encoding={}))}(a||(a={})),function(t){!function(e){!function(n){var r,i;n.encode=function(e){return e&&0!=e.length?t.runningInNodeJS()?t.BufferTools.bufferToUint8Array(new o(e,"utf8")):n.createNativeTextEncoderAndDecoderIfAvailable()?r.encode(e):n.encodeWithJS(e):new Uint8Array(0)},n.decode=function(e){return e&&0!=e.length?t.runningInNodeJS()?t.BufferTools.uint8ArrayToBuffer(e).toString("utf8"):n.createNativeTextEncoderAndDecoderIfAvailable()?i.decode(e):n.decodeWithJS(e):""},n.encodeWithJS=function(t,n){if(!t||0==t.length)return new Uint8Array(0);n||(n=new Uint8Array(4*t.length));for(var r=0,i=0;i<t.length;i++){var o=e.CodePoint.encodeFromString(t,i);if(o<=127)n[r++]=o;else if(o<=2047)n[r++]=192|o>>>6,n[r++]=128|63&o;else if(o<=65535)n[r++]=224|o>>>12,n[r++]=128|o>>>6&63,n[r++]=128|63&o;else{if(!(o<=1114111))throw new Error("Invalid UTF-16 string: Encountered a character unsupported by UTF-8/16 (RFC 3629)");n[r++]=240|o>>>18,n[r++]=128|o>>>12&63,n[r++]=128|o>>>6&63,n[r++]=128|63&o,i++}}return n.subarray(0,r)},n.decodeWithJS=function(e,n,r){if(void 0===n&&(n=0),!e||0==e.length)return"";void 0===r&&(r=e.length);for(var i,o,u=new t.StringBuilder,a=n,c=r;a<c;){if((o=e[a])>>>7==0)i=o,a+=1;else if(o>>>5==6){if(a+1>=r)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+a);i=(31&o)<<6|63&e[a+1],a+=2}else if(o>>>4==14){if(a+2>=r)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+a);i=(15&o)<<12|(63&e[a+1])<<6|63&e[a+2],a+=3}else{if(o>>>3!=30)throw new Error("Invalid UTF-8 stream: An invalid lead byte value encountered at position "+a);if(a+3>=r)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+a);i=(7&o)<<18|(63&e[a+1])<<12|(63&e[a+2])<<6|63&e[a+3],a+=4}u.appendCodePoint(i)}return u.getOutputString()},n.createNativeTextEncoderAndDecoderIfAvailable=function(){return!!r||"function"==typeof TextEncoder&&(r=new TextEncoder("utf-8"),i=new TextDecoder("utf-8"),!0)}}(e.UTF8||(e.UTF8={}))}(t.Encoding||(t.Encoding={}))}(a||(a={})),function(t){t.compress=function(e,n){if(void 0===n&&(n={}),null==e)throw new TypeError("compress: undefined or null input received");var r=t.CompressionCommon.detectCompressionSourceEncoding(e);n=t.ObjectTools.override({inputEncoding:r,outputEncoding:"ByteArray"},n);var i=(new t.Compressor).compressBlock(e);return t.CompressionCommon.encodeCompressedBytes(i,n.outputEncoding)},t.decompress=function(e,n){if(void 0===n&&(n={}),null==e)throw new TypeError("decompress: undefined or null input received");n=t.ObjectTools.override({inputEncoding:"ByteArray",outputEncoding:"String"},n);var r=t.CompressionCommon.decodeCompressedBytes(e,n.inputEncoding),i=(new t.Decompressor).decompressBlock(r);return t.CompressionCommon.encodeDecompressedBytes(i,n.outputEncoding)},t.compressAsync=function(e,n,r){var i;null==r&&(r=function(){});try{i=t.CompressionCommon.detectCompressionSourceEncoding(e)}catch(t){return void r(void 0,t)}n=t.ObjectTools.override({inputEncoding:i,outputEncoding:"ByteArray",useWebWorker:!0,blockSize:65536},n),t.enqueueImmediate((function(){n.useWebWorker&&t.WebWorker.createGlobalWorkerIfNeeded()?t.WebWorker.compressAsync(e,n,r):t.AsyncCompressor.compressAsync(e,n,r)}))},t.decompressAsync=function(e,n,r){if(null==r&&(r=function(){}),null!=e){n=t.ObjectTools.override({inputEncoding:"ByteArray",outputEncoding:"String",useWebWorker:!0,blockSize:65536},n);var i=t.BufferTools.convertToUint8ArrayIfNeeded(e);t.EventLoop.enqueueImmediate((function(){n.useWebWorker&&t.WebWorker.createGlobalWorkerIfNeeded()?t.WebWorker.decompressAsync(i,n,r):t.AsyncDecompressor.decompressAsync(e,n,r)}))}else r(void 0,new TypeError("decompressAsync: undefined or null input received"))},t.createCompressionStream=function(){return t.AsyncCompressor.createCompressionStream()},t.createDecompressionStream=function(){return t.AsyncDecompressor.createDecompressionStream()},t.encodeUTF8=function(e){return t.Encoding.UTF8.encode(e)},t.decodeUTF8=function(e){return t.Encoding.UTF8.decode(e)},t.encodeBase64=function(e){return t.Encoding.Base64.encode(e)},t.decodeBase64=function(e){return t.Encoding.Base64.decode(e)},t.encodeBinaryString=function(e){return t.Encoding.BinaryString.encode(e)},t.decodeBinaryString=function(e){return t.Encoding.BinaryString.decode(e)},t.encodeStorageBinaryString=function(e){return t.Encoding.StorageBinaryString.encode(e)},t.decodeStorageBinaryString=function(e){return t.Encoding.StorageBinaryString.decode(e)}}(a||(a={}))}).call(this,n(27),n(149)(t),n(9),n(19),n(76).Buffer,n(151).setImmediate)},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return o}));var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.blockv=e,this.regions=[],this.changes=[],this.updateTimer=null,this.timeSkew=0,this.onWebSocketMessage=this.onWebSocketMessage.bind(this),this.blockv.WebSockets.addEventListener("websocket.raw",this.onWebSocketMessage)}return i(t,null,[{key:"withBlockv",value:function(e){return e.animator||(e.animator=new t(e)),e.animator}}]),i(t,[{key:"onWebSocketMessage",value:function(t){if("state_update"==t.msg_type&&"brain-update"==t.payload.action_name){var e=t.payload.new_object.next_positions;if(e){var n=e.map((function(e){return{id:t.payload.id,time:e.time,new_data:{"vAtom::vAtomType":{geo_pos:{coordinates:e.geo_pos}}}}})),r=n[0].time,i=!0,o=!1,u=void 0;try{for(var a,c=n[Symbol.iterator]();!(i=(a=c.next()).done);i=!0){var s=a.value;r>s.time&&(r=s.time)}}catch(t){o=!0,u=t}finally{try{i||null==c.return||c.return()}finally{if(o)throw u}}this.clearUpdatesFor(t.payload.id,r),this.add(n)}}}},{key:"addRegion",value:function(t){this.regions.push(t)}},{key:"removeRegion",value:function(t){this.regions=this.regions.filter((function(e){return e!=t}))}},{key:"isMonitoringID",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.regions[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){if(i.value.objects.get(t))return!0}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return!1}},{key:"add",value:function(t){var e=Date.now()+this.timeSkew,n=!0,r=!1,i=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done);n=!0){var a=o.value;this.isMonitoringID(a.id)&&(!a.time||a.time<e||this.changes.push(a))}}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}this.changes.sort((function(t,e){return t.time-e.time})),this.updateTimer||(this.updateTimer=setInterval(this.doNextUpdate.bind(this),50))}},{key:"clearUpdatesFor",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.changes.length;n++)this.changes[n].id==t&&this.changes[n].time>e&&this.changes.splice(n--,1)}},{key:"doNextUpdate",value:function(){if(0==this.changes.length)return clearInterval(this.updateTimer),void(this.updateTimer=null);var t=Date.now()+this.timeSkew;if(!(this.changes[0].time>t)){var e=this.changes.shift(),n=!0,r=!1,i=void 0;try{for(var o,u=this.regions[Symbol.iterator]();!(n=(o=u.next()).done);n=!0){o.value.updateObjects([e])}}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}this.changes.length>0&&this.changes[0].time<t&&this.doNextUpdate()}}}]),t}()},function(t,e,n){var r=n(5),i=n(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){e.f=n(6)},function(t,e,n){var r=n(64)("keys"),i=n(38);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(5),i=n(4),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(21)(Function.call,n(24).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(5),i=n(87).set;t.exports=function(t,e,n){var o,u=e.constructor;return u!==n&&"function"==typeof u&&(o=u.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(23),i=n(29);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(23),i=n(29);t.exports=function(t){return function(e,n){var o,u,a=String(i(e)),c=r(n),s=a.length;return c<0||c>=s?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===s||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):o:t?a.slice(c,c+2):u-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(39),i=n(0),o=n(13),u=n(16),a=n(50),c=n(130),s=n(48),l=n(44),f=n(6)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,v,y,m){c(n,e,d);var b,g,w,Z=function(t){if(!h&&t in R)return R[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",S="values"==v,x=!1,R=t.prototype,I=R[f]||R["@@iterator"]||v&&R[v],_=I||Z(v),V=v?S?Z("entries"):_:void 0,W="Array"==e&&R.entries||I;if(W&&(w=l(W.call(new t)))!==Object.prototype&&w.next&&(s(w,k,!0),r||"function"==typeof w[f]||u(w,f,p)),S&&I&&"values"!==I.name&&(x=!0,_=function(){return I.call(this)}),r&&!m||!h&&!x&&R[f]||u(R,f,_),a[e]=_,a[k]=p,v)if(b={values:S?_:Z("values"),keys:y?_:Z("keys"),entries:V},m)for(g in b)g in R||o(R,g,b[g]);else i(i.P+i.F*(h||x),e,b);return b}},function(t,e,n){var r=n(96),i=n(29);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(5),i=n(28),o=n(6)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(50),i=n(6)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(11),i=n(37);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(58),i=n(6)("iterator"),o=n(50);t.exports=n(8).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(12),i=n(41),o=n(7);t.exports=function(t){for(var e=r(this),n=o(e.length),u=arguments.length,a=i(u>1?arguments[1]:void 0,n),c=u>2?arguments[2]:void 0,s=void 0===c?n:i(c,n);s>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var r=n(45),i=n(135),o=n(50),u=n(17);t.exports=n(94)(Array,"Array",(function(t,e){this._t=u(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,i,o=n(69),u=RegExp.prototype.exec,a=String.prototype.replace,c=u,s=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(s||l)&&(c=function(t){var e,n,r,i,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),s&&(e=c.lastIndex),r=u.call(c,t),s&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&a.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=c},function(t,e,n){"use strict";var r=n(93)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r,i,o,u=n(21),a=n(124),c=n(86),s=n(82),l=n(2),f=l.process,h=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,v=l.Dispatch,y=0,m={},b=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},g=function(t){b.call(t.data)};h&&p||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){a("function"==typeof t?t:Function(t),e)},r(y),y},p=function(t){delete m[t]},"process"==n(28)(f)?r=function(t){f.nextTick(u(b,t,1))}:v&&v.now?r=function(t){v.now(u(b,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=g,r=u(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",g,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),b.call(t)}}:function(t){setTimeout(u(b,t,1),0)}),t.exports={set:h,clear:p}},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(39),u=n(75),a=n(16),c=n(53),s=n(3),l=n(52),f=n(23),h=n(7),p=n(143),d=n(43).f,v=n(11).f,y=n(101),m=n(48),b=r.ArrayBuffer,g=r.DataView,w=r.Math,Z=r.RangeError,k=r.Infinity,S=b,x=w.abs,R=w.pow,I=w.floor,_=w.log,V=w.LN2,W=i?"_b":"buffer",T=i?"_l":"byteLength",X=i?"_o":"byteOffset";function G(t,e,n){var r,i,o,u=new Array(n),a=8*n-e-1,c=(1<<a)-1,s=c>>1,l=23===e?R(2,-24)-R(2,-77):0,f=0,h=t<0||0===t&&1/t<0?1:0;for((t=x(t))!=t||t===k?(i=t!=t?1:0,r=c):(r=I(_(t)/V),t*(o=R(2,-r))<1&&(r--,o*=2),(t+=r+s>=1?l/o:l*R(2,1-s))*o>=2&&(r++,o/=2),r+s>=c?(i=0,r=c):r+s>=1?(i=(t*o-1)*R(2,e),r+=s):(i=t*R(2,s-1)*R(2,e),r=0));e>=8;u[f++]=255&i,i/=256,e-=8);for(r=r<<e|i,a+=e;a>0;u[f++]=255&r,r/=256,a-=8);return u[--f]|=128*h,u}function E(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,u=o>>1,a=i-7,c=n-1,s=t[c--],l=127&s;for(s>>=7;a>0;l=256*l+t[c],c--,a-=8);for(r=l&(1<<-a)-1,l>>=-a,a+=e;a>0;r=256*r+t[c],c--,a-=8);if(0===l)l=1-u;else{if(l===o)return r?NaN:s?-k:k;r+=R(2,e),l-=u}return(s?-1:1)*r*R(2,l-e)}function M(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function j(t){return[255&t]}function P(t){return[255&t,t>>8&255]}function N(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function B(t){return G(t,52,8)}function U(t){return G(t,23,4)}function L(t,e,n){v(t.prototype,e,{get:function(){return this[n]}})}function C(t,e,n,r){var i=p(+n);if(i+e>t[T])throw Z("Wrong index!");var o=t[W]._b,u=i+t[X],a=o.slice(u,u+e);return r?a:a.reverse()}function Y(t,e,n,r,i,o){var u=p(+n);if(u+e>t[T])throw Z("Wrong index!");for(var a=t[W]._b,c=u+t[X],s=r(+i),l=0;l<e;l++)a[c+l]=s[o?l:e-l-1]}if(u.ABV){if(!s((function(){b(1)}))||!s((function(){new b(-1)}))||s((function(){return new b,new b(1.5),new b(NaN),"ArrayBuffer"!=b.name}))){for(var A,O=(b=function(t){return l(this,b),new S(p(t))}).prototype=S.prototype,F=d(S),J=0;F.length>J;)(A=F[J++])in b||a(b,A,S[A]);o||(O.constructor=b)}var H=new g(new b(2)),D=g.prototype.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(g.prototype,{setInt8:function(t,e){D.call(this,t,e<<24>>24)},setUint8:function(t,e){D.call(this,t,e<<24>>24)}},!0)}else b=function(t){l(this,b,"ArrayBuffer");var e=p(t);this._b=y.call(new Array(e),0),this[T]=e},g=function(t,e,n){l(this,g,"DataView"),l(t,b,"DataView");var r=t[T],i=f(e);if(i<0||i>r)throw Z("Wrong offset!");if(i+(n=void 0===n?r-i:h(n))>r)throw Z("Wrong length!");this[W]=t,this[X]=i,this[T]=n},i&&(L(b,"byteLength","_l"),L(g,"buffer","_b"),L(g,"byteLength","_l"),L(g,"byteOffset","_o")),c(g.prototype,{getInt8:function(t){return C(this,1,t)[0]<<24>>24},getUint8:function(t){return C(this,1,t)[0]},getInt16:function(t){var e=C(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=C(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return M(C(this,4,t,arguments[1]))},getUint32:function(t){return M(C(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return E(C(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return E(C(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){Y(this,1,t,j,e)},setUint8:function(t,e){Y(this,1,t,j,e)},setInt16:function(t,e){Y(this,2,t,P,e,arguments[2])},setUint16:function(t,e){Y(this,2,t,P,e,arguments[2])},setInt32:function(t,e){Y(this,4,t,N,e,arguments[2])},setUint32:function(t,e){Y(this,4,t,N,e,arguments[2])},setFloat32:function(t,e){Y(this,4,t,U,e,arguments[2])},setFloat64:function(t,e){Y(this,8,t,B,e,arguments[2])}});m(b,"ArrayBuffer"),m(g,"DataView"),a(g.prototype,u.VIEW,!0),e.ArrayBuffer=b,e.DataView=g},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(148)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";(function(e){var n,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}t.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var a=10;function c(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function s(t,n,r,i){var o,u,a,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(u=t._events)?(u=t._events=Object.create(null),t._eventsCount=0):(void 0!==u.newListener&&(t.emit("newListener",n,r.listener?r.listener:r),u=t._events),a=u[n]),void 0===a)a=u[n]=r,++t._eventsCount;else if("function"==typeof a?a=u[n]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(o=c(t))>0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=n,l.count=a.length,s=l,e&&e.warn&&e.warn(s)}return t}function l(){for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,i(this.listener,this.target,t))}function f(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function h(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return c(this)},u.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var u;if(e.length>0&&(u=e[0]),u instanceof Error)throw u;var a=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw a.context=u,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var s=c.length,l=d(c,s);for(n=0;n<s;++n)i(l[n],this,e)}return!0},u.prototype.addListener=function(t,e){return s(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return s(this,t,e,!0)},u.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.on(t,f(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.prependListener(t,f(this,t,e)),this},u.prototype.removeListener=function(t,e){var n,r,i,o,u;if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);if(void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){u=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,u||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},u.prototype.listeners=function(t){return h(this,t,!0)},u.prototype.rawListeners=function(t){return h(this,t,!1)},u.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},u.prototype.listenerCount=p,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(9))},function(t,e,n){(e=t.exports=n(153)).Stream=e,e.Readable=e,e.Writable=n(113),e.Duplex=n(47),e.Transform=n(157),e.PassThrough=n(373)},function(t,e,n){var r=n(76),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function u(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=u),o(i,u),u.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},u.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},u.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},u.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";(function(e,r,i){var o=n(77);function u(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=b;var a,c=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;b.WritableState=m;var s=n(60);s.inherits=n(54);var l={deprecate:n(371)},f=n(154),h=n(112).Buffer,p=i.Uint8Array||function(){};var d,v=n(155);function y(){}function m(t,e){a=a||n(47),t=t||{};var r=e instanceof a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,s=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),x(t,e))}(t,n,r,e,i);else{var u=k(n);u||n.corked||n.bufferProcessing||!n.bufferedRequest||Z(t,n),r?c(w,t,n,u,i):w(t,n,u,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}function b(t){if(a=a||n(47),!(d.call(b,this)||this instanceof a))return new b(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function g(t,e,n,r,i,o,u){e.writelen=r,e.writecb=u,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),x(t,e)}function Z(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0,c=!0;n;)i[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;i.allBuffers=c,g(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new u(e),e.bufferedRequestCount=0}else{for(;n;){var s=n.chunk,l=n.encoding,f=n.callback;if(g(t,e,!1,e.objectMode?1:s.length,s,l,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),x(t,e)}))}function x(t,e){var n=k(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}s.inherits(b,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):d=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,n){var r,i=this._writableState,u=!1,a=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof p);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,u=!1;return null===n?u=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(u=new TypeError("Invalid non-string/buffer chunk")),u&&(t.emit("error",u),o.nextTick(r,u),i=!1),i}(this,i,t,n))&&(i.pendingcb++,u=function(t,e,n,r,i,o){if(!n){var u=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,r,i);r!==u&&(n=!0,i="buffer",r=u)}var a=e.objectMode?1:r.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var s=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},s?s.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else g(t,e,!1,a,r,i,o);return c}(this,i,a,t,e,n)),u},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||Z(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,x(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(27),n(151).setImmediate,n(19))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"a",(function(){return i}));var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,i;return e=t,(n=[{key:"when",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this._eventListeners=this._eventListeners||{},this._eventListeners[t]=this._eventListeners[t]||[],!n)return new Promise((function(n,r){n._removeAfterCall=!0,e._eventListeners[t].push(n)}));this._eventListeners[t].push(n)}},{key:"on",value:function(){return this.when.apply(this,arguments)}},{key:"addEventListener",value:function(){return this.when.apply(this,arguments)}},{key:"removeEventListener",value:function(t,e){this._eventListeners=this._eventListeners||{},this._eventListeners[t]=this._eventListeners[t]||[];for(var n=0;n<this._eventListeners[t].length;n++)this._eventListeners[t][n]==e&&this._eventListeners[t].splice(n--,1)}},{key:"off",value:function(){return this.removeEventListener.apply(this,arguments)}},{key:"emit",value:function(t){for(var e=this._eventListeners&&this._eventListeners[t]||[],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=!0,u=!1,a=void 0;try{for(var c,s=e[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var l=c.value;l.apply(this,r)}}catch(t){u=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(u)throw a}}for(var f=0;f<e.length;f++)e[f]._removeAfterCall&&e.splice(f--,1)}},{key:"trigger",value:function(){return this.emit.apply(this,arguments)}},{key:"triggerEvent",value:function(){return this.emit.apply(this,arguments)}}])&&r(e.prototype,n),i&&r(e,i),t}();i.mixin=function(t){for(var e in i.prototype)i.prototype.hasOwnProperty(e)&&(t[e]=i.prototype[e])}},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"default",(function(){return d}));var r=n(35),i=n(1);n(114);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,c,"next",t)}function c(t){u(o,r,i,a,c,"throw",t)}a(void 0)}))}}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var d=function(e){function n(t,e){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?c(t):e}(this,l(n).call(this,t))).noCache=!0,!(e&&e.top_right&&e.top_right.lat&&e.top_right.lon&&e.bottom_left&&e.bottom_left.lat&&e.bottom_left.lon))throw new Error("Please specify the top_right and bottom_left coordinates in the region descriptor.");return r.coordinates=e,r.sendRegionCommand(),r.onWebSocketOpen=r.onWebSocketOpen.bind(c(r)),r.socket.addEventListener("connected",r.onWebSocketOpen),r.timer=setInterval(r.onTimer.bind(c(r)),3e4),r}var r,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(n,e),h(n,null,[{key:"id",get:function(){return"geopos"}}]),h(n,[{key:"close",value:function(){s(l(n.prototype),"close",this).call(this),this.socket.removeEventListener("connected",this.onWebSocketOpen),clearInterval(this.timer)}},{key:"onTimer",value:function(){this.forceSynchronize()}},{key:"onWebSocketOpen",value:function(){this.forceSynchronize(),this.sendRegionCommand()}},{key:"sendRegionCommand",value:function(){if(this.socket.isOpen){var e={id:"1",version:"1",type:"command",cmd:"monitor",payload:{top_left:{lat:Math.max(this.coordinates.top_right.lat,this.coordinates.bottom_left.lat),lon:Math.min(this.coordinates.top_right.lon,this.coordinates.bottom_left.lon)},bottom_right:{lat:Math.min(this.coordinates.top_right.lat,this.coordinates.bottom_left.lat),lon:Math.max(this.coordinates.top_right.lon,this.coordinates.bottom_left.lon)}}};t.log("Sending WS command: "+JSON.stringify(e)),this.dataPool.Blockv.WebSockets.sendMessage(e)}}},{key:"has",value:function(t){if(!s(l(n.prototype),"has",this).call(this,t))return!1;var e=this.objects.get(t).data["vAtom::vAtomType"]||{};return!!(e.dropped&&e.geo_pos&&e.geo_pos.coordinates&&e.geo_pos.coordinates[0])||void 0}},{key:"matches",value:function(t,e){return"geopos"===t&&(!!(e&&e.top_right&&e.bottom_left)&&(e.top_right.lat===this.coordinates.top_right.lat&&(e.top_right.lon===this.coordinates.top_right.lon&&(e.bottom_left.lat===this.coordinates.bottom_left.lat&&e.bottom_left.lon===this.coordinates.bottom_left.lon))))}},{key:"load",value:(u=a(regeneratorRuntime.mark((function t(){var e,n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.pauseMessages(),e={top_right:this.coordinates.top_right,bottom_left:this.coordinates.bottom_left,filter:"all",limit:1e4},this.coordinates.publisher_fqdn&&(e.publisher_fqdn=this.coordinates.publisher_fqdn),t.next=5,this.dataPool.Blockv.client.request("POST","/v1/vatom/geodiscover",e,!0);case 5:return n=t.sent,r=[],n.vatoms.map((function(t){return new i.a("vatom",t.id,t)})).forEach((function(t){return r.push(t)})),n.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return r.push(t)})),n.actions.map((function(t){return new i.a("action",t.name,t)})).forEach((function(t){return r.push(t)})),this.addObjects(r),this.resumeMessages(),t.abrupt("return",r.map((function(t){return t.id})));case 13:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"save",value:function(){}},{key:"map",value:function(t){if(this.coordinates.publisher_fqdn&&t.data&&t.data["vAtom::vAtomType"]&&t.data["vAtom::vAtomType"].publisher_fqdn!==this.coordinates.publisher_fqdn)return null;var e=t.data["vAtom::vAtomType"]||{};return e.dropped&&e.geo_pos&&e.geo_pos.coordinates&&e.geo_pos.coordinates[0]?s(l(n.prototype),"map",this).call(this,t):null}},{key:"processMessage",value:(r=a(regeneratorRuntime.mark((function e(r){var o,u,a,c,f=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s(l(n.prototype),"processMessage",this).call(this,r),"map"!==r.msg_type||"add"!==r.payload.op){e.next=14;break}return o=[],e.next=5,this.dataPool.Blockv.client.request("POST","/v1/user/vatom/get",{ids:[r.payload.vatom_id]},!0);case 5:return u=e.sent,a=new i.a("vatom",u.vatoms[0].id,u.vatoms[0]),o.push(a),u.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return o.push(t)})),u.actions.map((function(t){return new i.a("action",t.name,t)})).forEach((function(t){return o.push(t)})),this.addObjects(o),e.abrupt("return");case 14:if("map"!==r.msg_type||"remove"!==r.payload.op){e.next=19;break}return this.preemptiveChange(r.payload.vatom_id,"vAtom::vAtomType.dropped",!1),e.abrupt("return");case 19:if("state_update"!=r.msg_type){e.next=30;break}if(c=r.payload&&r.payload.id){e.next=23;break}throw new Error("Got websocket message with no vatom ID in it.");case 23:if(r.payload.new_object&&r.payload.new_object["vAtom::vAtomType"]&&r.payload.new_object["vAtom::vAtomType"].dropped){e.next=26;break}return e.abrupt("return");case 26:if(!this.objects.get(c)){e.next=28;break}return e.abrupt("return");case 28:this.pauseMessages(),this.dataPool.Blockv.client.request("POST","/v1/user/vatom/get",{ids:[c]},!0).then((function(t){var e=[];e.push(new i.a("vatom",t.vatoms[0].id,t.vatoms[0])),t.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return e.push(t)})),t.actions.map((function(t){return new i.a("action",t.name,t)})).forEach((function(t){return e.push(t)})),f.addObjects(e)})).catch((function(e){t.warn("[DataPool > GeoPosRegion] A vatom was dropped, but we could not fetch it's payload! "+e.message)})).then((function(t){f.resumeMessages()}));case 30:case"end":return e.stop()}}),e,this)}))),function(t){return r.apply(this,arguments)})},{key:"stateKey",get:function(){return"geopos:"+this.coordinates.top_right.lat+","+this.coordinates.top_right.lon+" "+this.coordinates.bottom_left.lat+","+this.coordinates.bottom_left.lon}}]),n}(r.a)}.call(this,n(9))},function(t,e,n){t.exports=!n(10)&&!n(3)((function(){return 7!=Object.defineProperty(n(82)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(2),i=n(8),o=n(39),u=n(83),a=n(11).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:u.f(t)})}},function(t,e,n){var r=n(15),i=n(17),o=n(65)(!1),u=n(84)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),c=0,s=[];for(n in a)n!=u&&r(a,n)&&s.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~o(s,n)||s.push(n));return s}},function(t,e,n){var r=n(11),i=n(4),o=n(40);t.exports=n(10)?Object.defineProperties:function(t,e){i(t);for(var n,u=o(e),a=u.length,c=0;a>c;)r.f(t,n=u[c++],e[n]);return t}},function(t,e,n){var r=n(17),i=n(43).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(10),i=n(40),o=n(66),u=n(57),a=n(12),c=n(56),s=Object.assign;t.exports=!s||n(3)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r}))?function(t,e){for(var n=a(t),s=arguments.length,l=1,f=o.f,h=u.f;s>l;)for(var p,d=c(arguments[l++]),v=f?i(d).concat(f(d)):i(d),y=v.length,m=0;y>m;)p=v[m++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:s},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(22),i=n(5),o=n(124),u=[].slice,a={},c=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("F,a","return new F("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=u.call(arguments,1),a=function(){var r=n.concat(u.call(arguments));return this instanceof a?c(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(2).parseInt,i=n(49).trim,o=n(88),u=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(u.test(n)?16:10))}:r},function(t,e,n){var r=n(2).parseFloat,i=n(49).trim;t.exports=1/r(n(88)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(28);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(5),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var r=n(42),i=n(37),o=n(48),u={};n(16)(u,n(6)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(u,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(4);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(271);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(22),i=n(12),o=n(56),u=n(7);t.exports=function(t,e,n,a,c){r(e);var s=i(t),l=o(s),f=u(s.length),h=c?f-1:0,p=c?-1:1;if(n<2)for(;;){if(h in l){a=l[h],h+=p;break}if(h+=p,c?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;c?h>=0:f>h;h+=p)h in l&&(a=e(a,l[h],h,s));return a}},function(t,e,n){"use strict";var r=n(12),i=n(41),o=n(7);t.exports=[].copyWithin||function(t,e){var n=r(this),u=o(n.length),a=i(t,u),c=i(e,u),s=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===s?u:i(s,u))-c,u-a),f=1;for(c<a&&a<c+l&&(f=-1,c+=l-1,a+=l-1);l-- >0;)c in n?n[a]=n[c]:delete n[a],a+=f,c+=f;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(103);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(10)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(69)})},function(t,e,n){"use strict";var r,i,o,u,a=n(39),c=n(2),s=n(21),l=n(58),f=n(0),h=n(5),p=n(22),d=n(52),v=n(72),y=n(59),m=n(105).set,b=n(291)(),g=n(139),w=n(292),Z=n(73),k=n(140),S=c.TypeError,x=c.process,R=x&&x.versions,I=R&&R.v8||"",_=c.Promise,V="process"==l(x),W=function(){},T=i=g.f,X=!!function(){try{var t=_.resolve(1),e=(t.constructor={})[n(6)("species")]=function(t){t(W,W)};return(V||"function"==typeof PromiseRejectionEvent)&&t.then(W)instanceof e&&0!==I.indexOf("6.6")&&-1===Z.indexOf("Chrome/66")}catch(t){}}(),G=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},E=function(t,e){if(!t._n){t._n=!0;var n=t._c;b((function(){for(var r=t._v,i=1==t._s,o=0,u=function(e){var n,o,u,a=i?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{a?(i||(2==t._h&&P(t),t._h=1),!0===a?n=r:(l&&l.enter(),n=a(r),l&&(l.exit(),u=!0)),n===e.promise?s(S("Promise-chain cycle")):(o=G(n))?o.call(n,c,s):c(n)):s(r)}catch(t){l&&!u&&l.exit(),s(t)}};n.length>o;)u(n[o++]);t._c=[],t._n=!1,e&&!t._h&&M(t)}))}},M=function(t){m.call(c,(function(){var e,n,r,i=t._v,o=j(t);if(o&&(e=w((function(){V?x.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=V||j(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},P=function(t){m.call(c,(function(){var e;V?x.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),E(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=G(t))?b((function(){var r={_w:n,_d:!1};try{e.call(t,s(B,r,1),s(N,r,1))}catch(t){N.call(r,t)}})):(n._v=t,n._s=1,E(n,!1))}catch(t){N.call({_w:n,_d:!1},t)}}};X||(_=function(t){d(this,_,"Promise","_h"),p(t),r.call(this);try{t(s(B,this,1),s(N,this,1))}catch(t){N.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(53)(_.prototype,{then:function(t,e){var n=T(y(this,_));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=V?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&E(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=s(B,t,1),this.reject=s(N,t,1)},g.f=T=function(t){return t===_||t===u?new o(t):i(t)}),f(f.G+f.W+f.F*!X,{Promise:_}),n(48)(_,"Promise"),n(51)("Promise"),u=n(8).Promise,f(f.S+f.F*!X,"Promise",{reject:function(t){var e=T(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(a||!X),"Promise",{resolve:function(t){return k(a&&this===u?_:this,t)}}),f(f.S+f.F*!(X&&n(68)((function(t){_.all(t).catch(W)}))),"Promise",{all:function(t){var e=this,n=T(e),r=n.resolve,i=n.reject,o=w((function(){var n=[],o=0,u=1;v(t,!1,(function(t){var a=o++,c=!1;n.push(void 0),u++,e.resolve(t).then((function(t){c||(c=!0,n[a]=t,--u||r(n))}),i)})),--u||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=T(e),r=n.reject,i=w((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(22);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){var r=n(4),i=n(5),o=n(139);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(11).f,i=n(42),o=n(53),u=n(21),a=n(52),c=n(72),s=n(94),l=n(135),f=n(51),h=n(10),p=n(34).fastKey,d=n(46),v=h?"_s":"size",y=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,s){var l=t((function(t,r){a(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&c(r,n,t[s],t)}));return o(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=d(this,e),r=y(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(t){d(this,e);for(var n,r=u(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!y(d(this,e),t)}}),h&&r(l.prototype,"size",{get:function(){return d(this,e)[v]}}),l},def:function(t,e,n){var r,i,o=y(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,e,n){s(t,e,(function(t,n){this._t=d(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(53),i=n(34).getWeak,o=n(4),u=n(5),a=n(52),c=n(72),s=n(26),l=n(15),f=n(46),h=s(5),p=s(6),d=0,v=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},m=function(t,e){return h(t.a,(function(t){return t[0]===e}))};y.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var s=t((function(t,r){a(t,s,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=r&&c(r,n,t[o],t)}));return r(s.prototype,{delete:function(t){if(!u(t))return!1;var n=i(t);return!0===n?v(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!u(t))return!1;var n=i(t);return!0===n?v(f(this,e)).has(t):n&&l(n,this._i)}}),s},def:function(t,e,n){var r=i(o(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){var r=n(23),i=n(7);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(43),i=n(66),o=n(4),u=n(2).Reflect;t.exports=u&&u.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(7),i=n(90),o=n(29);t.exports=function(t,e,n,u){var a=String(o(t)),c=a.length,s=void 0===n?" ":String(n),l=r(e);if(l<=c||""==s)return a;var f=l-c,h=i.call(s,Math.ceil(f/s.length));return h.length>f&&(h=h.slice(0,f)),u?h+a:a+h}},function(t,e,n){var r=n(10),i=n(40),o=n(17),u=n(57).f;t.exports=function(t){return function(e){for(var n,a=o(e),c=i(a),s=c.length,l=0,f=[];s>l;)n=c[l++],r&&!u.call(a,n)||f.push(t?[n,a[n]]:a[n]);return f}}},function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(367),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(19))},function(t,e,n){t.exports=i;var r=n(110).EventEmitter;function i(){r.call(this)}n(54)(i,r),i.Readable=n(111),i.Writable=n(374),i.Duplex=n(375),i.Transform=n(376),i.PassThrough=n(377),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",c));var u=!1;function a(){u||(u=!0,t.end())}function c(){u||(u=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(l(),0===r.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",c),n.removeListener("error",s),t.removeListener("error",s),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",s),t.on("error",s),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t}},function(t,e,n){"use strict";(function(e,r){var i=n(77);t.exports=g;var o,u=n(150);g.ReadableState=b;n(110).EventEmitter;var a=function(t,e){return t.listeners(e).length},c=n(154),s=n(112).Buffer,l=e.Uint8Array||function(){};var f=n(60);f.inherits=n(54);var h=n(368),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,v=n(369),y=n(155);f.inherits(g,c);var m=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var r=e instanceof(o=o||n(47));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,u=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(u||0===u)?u:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(156).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function g(t){if(o=o||n(47),!(this instanceof g))return new g(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),c.call(this)}function w(t,e,n,r,i){var o,u=t._readableState;null===e?(u.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,S(t)}(t,u)):(i||(o=function(t,e){var n;r=e,s.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(u,e)),o?t.emit("error",o):u.objectMode||e&&e.length>0?("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r?u.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Z(t,u,e,!0):u.ended?t.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!n?(e=u.decoder.write(e),u.objectMode||0!==e.length?Z(t,u,e,!1):R(t,u)):Z(t,u,e,!1))):r||(u.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(u)}function Z(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&S(t)),R(t,e)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),g.prototype.destroy=y.destroy,g.prototype._undestroy=y.undestroy,g.prototype._destroy=function(t,e){this.push(null),e(t)},g.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=s.from(t,e),e=""),n=!0),w(this,t,e,!1,n)},g.prototype.unshift=function(t){return w(this,t,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(t){return d||(d=n(156).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),W(t)}function R(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(I,t,e))}function I(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function _(t){p("readable nexttick read 0"),t.read(0)}function V(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),W(t),e.flowing&&!e.reading&&t.read(0)}function W(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function T(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,u=t>o.length?o.length:t;if(u===o.length?i+=o:i+=o.slice(0,t),0===(t-=u)){u===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(u));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=s.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,u=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,u),0===(t-=u)){u===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(u));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function X(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(G,e,t))}function G(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function E(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}g.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?X(this):S(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&X(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(n,e))),null===(r=t>0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&X(this)),null!==r&&this.emit("data",r),r},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var c=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:g;function s(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",m),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",y),t.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",v),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){p("onend"),t.end()}o.endEmitted?i.nextTick(c):n.once("end",c),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,W(t))}}(n);t.on("drain",f);var h=!1;var d=!1;function v(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==E(o.pipes,t))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(e){p("onerror",e),g(),t.removeListener("error",y),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",b),g()}function b(){p("onfinish"),t.removeListener("close",m),g()}function g(){p("unpipe"),n.unpipe(t)}return n.on("data",v),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?u(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",y),t.once("close",m),t.once("finish",b),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var u=E(e.pipes,t);return-1===u?this:(e.pipes.splice(u,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)},g.prototype.on=function(t,e){var n=c.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):i.nextTick(_,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(V,t,e))}(this,t)),this},g.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(p("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<m.length;o++)t.on(m[o],this.emit.bind(this,m[o]));return this._read=function(e){p("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=T}).call(this,n(19),n(27))},function(t,e,n){t.exports=n(110).EventEmitter},function(t,e,n){"use strict";var r=n(77);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";var r=n(372).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=s,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function u(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=u(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=u(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=u(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";t.exports=u;var r=n(47),i=n(60);function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(t){if(!(this instanceof u))return new u(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){c(t,e,n)})):c(this,null,null)}function c(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(54),i.inherits(u,r),u.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},u.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},u.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},u.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){(function(e){var r=n(159);i.logify_input=o,t.exports=i;function i(){for(var t in arguments){var n=arguments[t],r=o(n);e.log(r)}}function o(t){var e=function(t){if(!t)return t;if(t.constructor===Array)return u(t);var e=a(t);if("[object "===e.slice(0,"[object ".length))return u(t);return e}(t);return e&&e.length>1e4?e.slice(0,1e4)+"[CROPPED-BY-REASSERT]":e}function u(t){var e=function t(e,n=[]){if(!(e instanceof Object))return e;if(e instanceof RegExp)return e.toJSON||(e.toJSON=function(){return"[RegExp: "+a(e)+"]"}),e;if(e instanceof Function)return e.toJSON||(e.toJSON=function(){return e.name?"[Function: "+e.name+"]":"[Function]"}),e;if(e.constructor!==Object&&e.constructor!==Array)return e;if(n.includes(e))return"[ALREADY_PRINTED_COPY]";n=[e,...n];var r=new e.constructor;for(var i in e)r[i]=t(e[i],n);return r}(t);try{return JSON.stringify(e,null,2)}catch(i){return r()?n(63).inspect(t):a(e)+"["+i+"][Error](Reassert-stringification)"}}function a(t){return"object"!=typeof t||t.toString?""+t:"[object Object]"}}).call(this,n(9))},function(t,e,n){(function(e){t.exports=function(){return e&&e.versions&&e.versions.node}}).call(this,n(27))},function(module,exports,__webpack_require__){(function(process){function tableFormat(t,{padding:e=2,indent:n=" "}={}){const r=[];t.forEach(t=>{t.forEach((t,e)=>{r[e]=Math.max(getStringWidth(t),r[e]||0)})});const i=[];return t.forEach(t=>{let o=n;t.forEach((n,i)=>{const u=r[i],a=i===t.length-1?"":getBar(u+e," ").slice(getStringWidth(n));o+=n+a}),i.push(o)}),i.join("\n")}function titleFormat(t,{padding:e=3}={}){const n=__webpack_require__(385),r=getStringWidth(t=" "+t+" "),i=Math.max(40,r+2*e),o=(__webpack_require__(388),Math.floor((i-r)/2)),u=getBar(i),a=getBar(o)+t+getBar(i-o-r);return n(getStringWidth(u)===getStringWidth(a)),[u,a,u].join("\n")}function getStringWidth(str){if(!isNodejs())return str.length;const stringWidth=eval("require")("string-width");return stringWidth(str)}function isNodejs(){return void 0!==process&&"undefined"==typeof window}function getBar(t,e="*"){return new Array(t).fill(e).join("")}module.exports={tableFormat:tableFormat,titleFormat:titleFormat}}).call(this,__webpack_require__(27))},function(t,e,n){(function(e){t.exports=function(){return e&&e.versions&&e.versions.node}}).call(this,n(27))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return v}));var r=n(114),i=(n(1),n(163)),o=(n(364),n(31)),u=n(18),a=n(164);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function u(t){s(o,r,i,u,a,"next",t)}function a(t){s(o,r,i,u,a,"throw",t)}u(void 0)}))}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var v=function(e){function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=h(this,p(n).call(this))).noCache=!1,e.dataPool=t,e.synchronized=!1,e.error=null,e._syncPromise=null,u.a.run((function(t){return e.synchronize()})),e}var r,c,s,v,y;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(n,e),r=n,(c=[{key:"forceSynchronize",value:function(){return this.synchronized=!1,this.synchronize()}},{key:"synchronize",value:function(){var e=this;return this._syncPromise?this._syncPromise:(this.error=null,this.emit("updated"),this.synchronized?Promise.resolve():(this._syncPromise=this._synchronize().catch((function(n){e._syncPromise=null,e.error=n,t.error(n),e.emit("error",n)})),this._syncPromise))}},{key:"_synchronize",value:(y=l(regeneratorRuntime.mark((function e(){var n,r,i,o,u,a,c,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.log("[DataPool > Region] Starting synchronization for region ".concat(this.stateKey)),e.next=3,this.objects.load();case 3:return this.emit("updated"),e.next=6,this.load();case 6:if(!(n=e.sent)||"number"!=typeof n.length){e.next=37;break}r=[],i=!0,o=!1,u=void 0,e.prev=12,a=this.objects.keys()[Symbol.iterator]();case 14:if(i=(c=a.next()).done){e.next=22;break}if(!(s=c.value).startsWith("extra:")){e.next=18;break}return e.abrupt("continue",19);case 18:n.includes(s)||r.push(s);case 19:i=!0,e.next=14;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(12),o=!0,u=e.t0;case 28:e.prev=28,e.prev=29,i||null==a.return||a.return();case 31:if(e.prev=31,!o){e.next=34;break}throw u;case 34:return e.finish(31);case 35:return e.finish(28);case 36:this.removeObjects(r);case 37:this.synchronized=!0,this._syncPromise=null,this.emit("updated"),t.log("[DataPool > Region] Region '".concat(this.stateKey,"' is now in sync!"));case 41:case"end":return e.stop()}}),e,this,[[12,24,28,36],[29,,31,35]])}))),function(){return y.apply(this,arguments)})},{key:"load",value:(v=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Subclasses must override Region.load()");case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"close",value:function(){this.dataPool.removeRegion(this),this.emit("closed")}},{key:"matches",value:function(t,e){throw new Error("Subclasses must override Region.matches()")}},{key:"addObjects",value:function(t){var e=this,n=!0,r=!1,i=void 0;try{for(var o,a=function(){var t=o.value,n=e.objects.get(t.id);n?(e.willUpdateFields(n,t.data),n.data=t.data,n.cached=null,e.objects.set(t.id,t)):(e.willAdd(t),e.objects.set(t.id,t)),u.a.run((function(n){return e.emit("object.updated",t.id)}))},c=t[Symbol.iterator]();!(n=(o=c.next()).done);n=!0)a()}catch(t){r=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(r)throw i}}t.length>0&&this.emit("updated")}},{key:"updateObjects",value:function(t){var e=this,n=!1,r=!0,i=!1,a=void 0;try{for(var c,s=function(){var t=c.value,r=e.objects.get(t.id);return r&&r.data?(e.willUpdateFields(r,t.new_data),Object(o.merge)(r.data,t.new_data),r.cached=null,u.a.run((function(n){return e.emit("object.updated",t.id)})),void(n=!0)):"continue"},l=t[Symbol.iterator]();!(r=(c=l.next()).done);r=!0)s()}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}n&&this.emit("updated")}},{key:"removeObjects",value:function(t){var e=this,n=!1,r=!0,i=!1,o=void 0;try{for(var a,c=function(){var t=a.value;e.willRemove(t),e.objects.delete(t)&&(u.a.run((function(n){return e.emit("object.removed",t)})),n=!0)},s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)c()}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}n&&this.emit("updated")}},{key:"onSessionInfoChanged",value:function(t){}},{key:"map",value:function(t){return t}},{key:"forEach",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.objects.values()[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var u=i.value,a=u.cached;if(a||(u.cached=a=this.map(u)),a&&!1===t(a))break}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"get",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e)return this.synchronize().then((function(e){return t.get(!1)}));var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=this.objects.values()[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value;if(c.cached)n.push(c.cached);else{var s=this.map(c);s&&(c.cached=s,n.push(s))}}}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}},{key:"getItem",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(n)return this.synchronize().then((function(n){return e.getItem(t,!1)}));var r=this.objects.get(t);if(!r)return null;if(r.cached)return r.cached;var i=this.map(r);return i?(r.cached=i,i):null}},{key:"has",value:function(t){return this.objects.has(t)}},{key:"preemptiveChange",value:function(t,e,n){var r=this,i=this.objects.get(t);if(!i)return function(){};var u=Object(o.get)(i.data,e);return this.willUpdateField(i,e,u,n),Object(o.set)(i.data,e,n),i.cached=null,this.emit("object.updated",t),this.emit("updated"),this.objects.set(t,i),function(a){r.willUpdateField(i,e,n,u),Object(o.set)(i.data,e,u),i.cached=null,r.emit("object.updated",t),r.emit("updated"),r.objects.set(t,i)}}},{key:"preemptiveRemove",value:function(t){var e=this,n=this.objects.get(t);return n?(this.willRemove(n),this.objects.delete(t),this.emit("updated"),function(r){e.objects.has(t)||(e.willAdd(n),e.addObjects([n]))}):function(){}}},{key:"filter",value:function(t,e){return new i.a(this,t,e)}},{key:"willAdd",value:function(t){}},{key:"willUpdateFields",value:function(t,e){}},{key:"willUpdateField",value:function(t,e,n,r){}},{key:"willRemove",value:function(t){}},{key:"objects",get:function(){return this._objects?this._objects:(this._objects=new a.a(this.stateKey,this.noCache),this._objects)}},{key:"stateKey",get:function(){throw new Error("Subclasses must override 'get stateKey()' in order to correctly handle saving/restoring state to disk.")}}])&&f(r.prototype,c),s&&f(r,s),n}(r.a)}).call(this,n(9))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(31);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.region=e,this.keyPath=n,this.value=r}var e,n,o;return e=t,(n=[{key:"synchronize",value:function(){return this.region.synchronize()}},{key:"getItem",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.region.getItem(t,e)}},{key:"map",value:function(t){return this.region.map(t)}},{key:"get",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e)return this.synchronize().then((function(e){return t.get(!1)}));var n=[],i=!0,o=!1,u=void 0;try{for(var a,c=this.objects.values()[Symbol.iterator]();!(i=(a=c.next()).done);i=!0){var s=a.value,l=Object(r.get)(s.data,this.keyPath);if(l==this.value)if(s.cached)n.push(s.cached);else{var f=this.map(s);f&&(s.cached=f,n.push(f))}}}catch(t){o=!0,u=t}finally{try{i||null==c.return||c.return()}finally{if(o)throw u}}return n}},{key:"objects",get:function(){return this.region.objects}}])&&i(e.prototype,n),o&&i(e,o),t}()},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return l}));var r=n(1),i=n(80),o=n.n(i),u=n(165);function a(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function u(t){a(o,r,i,u,c,"next",t)}function c(t){a(o,r,i,u,c,"throw",t)}u(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=function(){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=t,this.noStore=n,this.cache=new Map}var n,i,a,l,f;return n=e,(i=[{key:"load",value:(f=c(regeneratorRuntime.mark((function e(){var n,i,a,c,s,l,f,h,p,d,v,y,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.loaded){e.next=2;break}return e.abrupt("return");case 2:if(this.loaded=!0,e.prev=3,!this.noStore){e.next=6;break}return e.abrupt("return");case 6:if(n=localStorage["sync."+this.id]){e.next=9;break}return e.abrupt("return");case 9:return window.Blob&&window.URL&&window.Worker?(i=new Blob([atob(u.a)]),a=URL.createObjectURL(i),o.a.WebWorker.scriptURI=a):t.warn("[DataPool > LocalStorageMap] Web worker unavailable, app performance may suffer while saving or loading."),c=Date.now(),e.next=13,new Promise((function(t,e){o.a.decompressAsync(n,{inputEncoding:"StorageBinaryString"},(function(n,r){r?e(r):t(n)}))}));case 13:for(s=e.sent,l=JSON.parse(s),f=!0,h=!1,p=void 0,e.prev=18,d=l[Symbol.iterator]();!(f=(v=d.next()).done);f=!0)y=v.value,m=new r.a(y.type,y.id,y.data),this.cache.set(y.id,m);e.next=26;break;case 22:e.prev=22,e.t0=e.catch(18),h=!0,p=e.t0;case 26:e.prev=26,e.prev=27,f||null==d.return||d.return();case 29:if(e.prev=29,!h){e.next=32;break}throw p;case 32:return e.finish(29);case 33:return e.finish(26);case 34:t.debug("[DataPool > LocalStorageMap] Loaded ".concat(l.length," items from ").concat(Math.floor(s.length/1024)," KB of data (from ").concat(Math.floor(n.length/1024)," KB compressed) in ").concat(Date.now()-c," ms")),e.next=40;break;case 37:e.prev=37,e.t1=e.catch(3),t.warn("[DataPool > LocalStorageMap] Unable to load cached items: ".concat(e.t1.message));case 40:case"end":return e.stop()}}),e,this,[[3,37],[18,22,26,34],[27,,29,33]])}))),function(){return f.apply(this,arguments)})},{key:"entries",value:function(){return this.cache.entries()}},{key:"forEach",value:function(t,e){return this.cache.forEach(t,e)}},{key:"get",value:function(t){return this.cache.get(t)}},{key:"has",value:function(t){return this.cache.has(t)}},{key:"keys",value:function(){return this.cache.keys()}},{key:"values",value:function(){return this.cache.values()}},{key:Symbol.iterator,value:function(){return this.cache[Symbol.iterator]()}},{key:"clear",value:function(){this.cache.clear(),this.saveSoon()}},{key:"delete",value:function(t){var e=this.cache.delete(t);return e&&this.saveSoon(),e}},{key:"set",value:function(t,e){this.cache.set(t,e),this.saveSoon()}},{key:"getExtra",value:function(t){var e=this.get("extra:"+t);return e?e.data:null}},{key:"setExtra",value:function(t,e){this.getExtra(t)!=e&&this.set("extra:"+t,{type:"_extra",data:e})}},{key:"saveSoon",value:function(){var t=window.Worker?100:2e3;this.saveTimer?this.changesStillOccurring=!0:this.saveTimer=setTimeout(this.save.bind(this),t)}},{key:"save",value:(l=c(regeneratorRuntime.mark((function e(){var n,r,i,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.changesStillOccurring){e.next=5;break}return this.saveTimer=null,this.saveSoon(),this.changesStillOccurring=!1,e.abrupt("return");case 5:if(e.prev=5,!this.noStore){e.next=8;break}return e.abrupt("return");case 8:return n=Date.now(),r=[],this.cache.forEach((function(t,e){r.push({id:e,type:t.type,data:t.data})})),i=JSON.stringify(r),e.next=14,new Promise((function(t,e){o.a.compressAsync(i,{outputEncoding:"StorageBinaryString"},(function(n,r){r?e(r):t(n)}))}));case 14:u=e.sent,localStorage["sync."+this.id]=u,t.debug("[DataPool > LocalStorageMap] Saved ".concat(r.length," items, using ").concat(Math.floor(u.length/1024)," KB of data (").concat(Math.floor(i.length/1024)," KB uncompressed) in ").concat(Date.now()-n," ms")),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(5),t.warn("[DataPool > LocalStorageMap] Failed to save! ".concat(e.t0.message));case 22:this.saveTimer=null,this.changesStillOccurring&&(this.changesStillOccurring=!1,this.saveSoon());case 24:case"end":return e.stop()}}),e,this,[[5,19]])}))),function(){return l.apply(this,arguments)})},{key:"size",get:function(){return this.cache.size}}])&&s(n.prototype,i),a&&s(n,a),e}()}).call(this,n(9))},function(t,e,n){"use strict";e.a="dmFyIExaVVRGODtpZighZnVuY3Rpb24obil7bi5ydW5uaW5nSW5Ob2RlSlM9ZnVuY3Rpb24oKXtyZXR1cm4ib2JqZWN0Ij09dHlwZW9mIHByb2Nlc3MmJiJvYmplY3QiPT10eXBlb2YgcHJvY2Vzcy52ZXJzaW9ucyYmInN0cmluZyI9PXR5cGVvZiBwcm9jZXNzLnZlcnNpb25zLm5vZGV9LG4ucnVubmluZ0luTWFpbk5vZGVKU01vZHVsZT1mdW5jdGlvbigpe3JldHVybiBuLnJ1bm5pbmdJbk5vZGVKUygpJ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ExaVVRGOD1MWlVURjh8fHt9KTs="},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return u}));var r=n(55),i=n.n(r);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.prefix=t}var n,r,u;return n=e,(r=[{key:"server",get:function(){return this.serverAddress},set:function(t){this.serverAddress=t}},{key:"userID",set:function(t){},get:function(){try{return i()(this.refreshToken).user_id}catch(e){t.warn("Decoding failed!")}}},{key:"appID",get:function(){return this.APPID},set:function(t){this.APPID=t}},{key:"websocketAddress",get:function(){return this.wssocketAddress},set:function(t){this.wssocketAddress=t}},{key:"token",set:function(t){this.accessToken=t},get:function(){return this.accessToken}},{key:"refreshToken",set:function(t){this.token="",this.privateRefreshToken=t,"undefined"!=typeof localStorage&&localStorage.setItem("".concat(this.prefix,"_refresh"),t)},get:function(){if(this.privateRefreshToken)return this.privateRefreshToken;if("undefined"!=typeof localStorage){var t=localStorage.getItem("".concat(this.prefix,"_refresh"));if(t)return t}return null}},{key:"assetProvider",set:function(t){this.privateAssetProvider=t,"undefined"!=typeof localStorage&&localStorage.setItem("".concat(this.prefix,"_asset_provider"),JSON.stringify(t))},get:function(){if(this.privateAssetProvider)return this.privateAssetProvider;if("undefined"!=typeof localStorage)try{return JSON.parse(localStorage.getItem("".concat(this.prefix,"_asset_provider")))}catch(e){t.warn("Unable to parse JSON payload ",e)}return null}}])&&o(n.prototype,r),u&&o(n,u),e}()}).call(this,n(9))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return s}));var r=n(79),i=n.n(r),o=n(62);function u(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,c,"next",t)}function c(t){u(o,r,i,a,c,"throw",t)}a(void 0)}))}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.Blockv=t,this.client=t.client,this.store=t.store,this.dataPool=t.dataPool}var n,r,u,s,l,f,h;return n=e,r=[{key:"getAccessToken",value:function(){return this.store.token}},{key:"setAccessToken",value:function(t){this.store.token="",this.store.token=t}},{key:"getRefreshToken",value:function(){return this.store.refreshToken}},{key:"setRefreshToken",value:function(t){this.store.token="",this.store.refreshToken=t}},{key:"register",value:function(t){var e=this;return this.client.request("POST","/v1/users",t,!1).then((function(t){return e.store.token=t.access_token.token,e.store.refreshToken=t.refresh_token.token,e.store.assetProvider=t.asset_provider,e.store.userID=t.user.id,e.dataPool.setSessionInfo({userID:t.user.id}),t})).then((function(t){return new o.a(t.user)}))}},{key:"login",value:function(t,e,n){var r=this,i={token:t,token_type:e,auth_data:{password:n}};return this.client.request("POST","/v1/user/login",i,!1).then((function(t){if(n)return r.store.token=t.access_token.token,r.store.refreshToken=t.refresh_token.token,r.store.assetProvider=t.asset_provider,r.store.userID=t.user.id,r.dataPool.setSessionInfo({userID:t.user.id,client:r.client}),t;var e=new Error("Login Failed, Password Reset");throw e.code="PASSWORD_RESET",e})).then((function(t){return new o.a(t.user)}))}},{key:"loginGuest",value:function(t){var e=this,n={token:t,token_type:"guest_id"};return this.client.request("POST","/v1/user/login",n,!1).then((function(t){return e.store.token=t.access_token.token,e.store.refreshToken=t.refresh_token.token,e.store.assetProvider=t.asset_provider,e.dataPool.setSessionInfo({userID:t.user.id}),t})).then((function(t){return new o.a(t.user)}))}},{key:"uploadAvatar",value:function(t){return this.client.request("POST","/v1/user/avatar",t,!0)}},{key:"getCurrentUser",value:function(t){return this.client.request("GET","/v1/user",t,!0).then((function(t){return new o.a(t)}))}},{key:"updateUser",value:function(t){return this.client.request("PATCH","/v1/user",t,!0)}},{key:"getUserTokens",value:function(){return this.client.request("GET","/v1/user/tokens","",!0)}},{key:"verifyUserToken",value:function(t){return this.client.request("POST","/v1/user/verify_token",t,!0)}},{key:"resetPassword",value:function(t,e){var n={token:t,token_type:e};return this.client.request("POST","/v1/user/reset_token",n,!1)}},{key:"sendTokenVerification",value:function(t,e){var n={token:t,token_type:e};return this.client.request("POST","/v1/user/reset_token_verification",n,!1)}},{key:"getGuestToken",value:function(){return this.client.request("POST","/v1/user/guest","",!1).then((function(t){return t.properties.guest_id}))}},{key:"logout",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.Blockv.emit("logout"),this.Blockv.WebSockets.close(),t.log("trying to logout"),!n)return this.client.request("POST","/v1/user/logout",{},!0).then((function(){e.store.token="",e.store.refreshToken="",e.dataPool.setSessionInfo(null)})).catch((function(n){throw t.warn(n),e.store.token="",e.store.refreshToken="",e.dataPool.setSessionInfo(null),n}));this.store.token="",this.store.refreshToken="",this.dataPool.setSessionInfo(null)}},{key:"encodeAssetProvider",value:function(t){for(var n=this.store.assetProvider,r=n.length,o=i()(t),u=0;u<r;u+=1){var a=i()(n[u].uri);if(o.hostname===a.hostname){var c=e.mapString(n[u].descriptor);return"".concat(t,"?").concat(c)}}return t}},{key:"addUserToken",value:function(t){return this.client.request("POST","/v1/user/tokens",t,!0)}},{key:"setDefaultToken",value:function(t){return this.client.request("PUT","/v1/user/tokens/".concat(t,"/default"),null,!0)}},{key:"deleteUserToken",value:function(t){return this.client.request("DELETE","/v1/user/tokens/".concat(t),null,!0)}},{key:"addRedeemable",value:(h=a(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.store.userID,t.abrupt("return",this.client.request("POST","/v1/users/".concat(n,"/redeemables"),e,!0));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"getPublicUserProfile",value:(f=a(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.client.request("GET","/v1/users/".concat(e),"",!0));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"loginOAuthPopup",value:(l=a(regeneratorRuntime.mark((function e(){var n,r,i,o,u,c,s,l,f,h,p=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.store.appID){e.next=2;break}throw new Error("Please initialize the SDK and set your App ID first.");case 2:if(n=Math.random().toString(36).substr(2),r="https://login.blockv.io/send-event.html",i="https://login.blockv.io/?response_type=code&client_id=".concat(this.store.appID,"&redirect_uri=").concat(encodeURIComponent(r),"&scope=all&state=").concat(n),o=window.open(i,"_blank","left=200,top=200,width=360,height=480,chrome,centerscreen")){e.next=8;break}throw new Error("Unable to login, popups have been blocked");case 8:return u=!1,c=null,s=null,l=new Promise((function(t,e){c=t,s=e})),f=setInterval((function(){if(!o.closed)return!1;clearInterval(f),u||c(!1)}),250),h=function(){var e=a(regeneratorRuntime.mark((function e(i){var a,l,d,v,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("https://login.blockv.io"===i.origin){e.next=2;break}return e.abrupt("return",!1);case 2:if(i.data.state===n){e.next=4;break}return e.abrupt("return",!1);case 4:if("oauth-response"===i.data.action){e.next=6;break}return e.abrupt("return",!1);case 6:if(t.log(i.data),!i.data.code){e.next=27;break}return a={grant_type:"authorization_code",client_id:p.Blockv.store.appID,code:i.data.code,redirect_uri:r},e.next=11,p.Blockv.client.request("POST","/v1/oauth/token",a,!1);case 11:return l=e.sent,p.setRefreshToken(l.refresh_token.token),p.store.token=l.access_token.token,e.next=16,p.getCurrentUser();case 16:return d=e.sent,p.store.userID=d.id,e.next=20,p.client.request("GET","/v1/user/asset_providers",null,!0);case 20:v=e.sent,p.store.assetProvider=v.asset_provider,p.dataPool.setSessionInfo({userID:d.id}),u=!0,c(!0),e.next=31;break;case 27:(y=new Error(i.data.error_text||"Unable to login.")).code=i.data.error,u=!0,s(y);case 31:return o.close(),window.removeEventListener("message",h),clearInterval(f),e.abrupt("return",!0);case 35:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),window.addEventListener("message",h),e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"loginOauthCode",value:(s=a(regeneratorRuntime.mark((function t(e,n){var r,i,o,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={grant_type:"authorization_code",client_id:this.store.appID,code:n,redirect_uri:e},t.next=3,this.Blockv.client.request("POST","/v1/oauth/token",r,!1);case 3:return i=t.sent,this.setRefreshToken(i.refresh_token.token),this.store.token=i.access_token.token,t.next=8,this.getCurrentUser();case 8:return o=t.sent,this.store.userID=o.id,t.next=12,this.client.request("GET","/v1/user/asset_providers",null,!0);case 12:u=t.sent,this.store.assetProvider=u.asset_provider,this.dataPool.setSessionInfo({userID:o.id});case 15:case"end":return t.stop()}}),t,this)}))),function(t,e){return s.apply(this,arguments)})}],u=[{key:"mapString",value:function(t){return Object.keys(t).map((function(e){return"".concat(e,"=").concat(t[e])})).join("&")}}],r&&c(n.prototype,r),u&&c(n,u),e}()}).call(this,n(9))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return y}));var r=n(169),i=n.n(r),o=n(55),u=n.n(o),a=n(36);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function u(t){s(o,r,i,u,a,"next",t)}function a(t){s(o,r,i,u,a,"throw",t)}u(void 0)}))}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var v={2:"Blank App ID",17:"Invalid App ID",401:"Token has Expired",516:"Invalid Payload",517:"Invalid Payload",521:"Token Unavailable",527:"Invalid Date Format",1004:"Invalid Request Payload",1701:"vAtom Unrecognized",1708:"vAtom Unvailable",2030:"No user found, Please register an account first.",2031:"Authentication Failed",2032:"Login Failed, Please try again",2034:"Invalid Token",2037:"Upload Avatar Failed",2049:"Refresh Token Expired / Not Whitelisted",2051:"Too many login attempts, Please try again later.",2552:"Unable To Retrieve Token",2553:"Token ID Invalid",2562:"Cannot Delete Primary Token",2563:"Token Already Confirmed",2564:"Invalid Verification Code",2566:"Token Already Confirmed",2567:"Invalid Verification Code",2569:"Invalid Token Type",2571:"Invalid Email",2572:"Invalid Phone Number"},y=function(e){function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=h(this,p(n).call(this))).Blockv=t,e.store=t.store,e}var r,o,a,s,y,m;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(n,e),r=n,(o=[{key:"request",value:(m=l(regeneratorRuntime.mark((function t(e,n,r,i,o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i){t.next=3;break}return t.next=3,this.checkToken();case 3:return o||(o={}),o["App-Id"]=this.store.appID,i&&(o.Authorization="Bearer ".concat(this.store.token)),t.abrupt("return",this.authRequest(e,n,r,o));case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,n,r,i){return m.apply(this,arguments)})},{key:"authRequest",value:(y=l(regeneratorRuntime.mark((function t(e,n,r,o){var u,a,s,l,f,h,p,d,y,m,b,g;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=performance.now(),a=Math.random().toString(36).substr(2),this.emit("requestTimerStart",{url:this.store.server+n,method:e,event:"start",statekey:a,time:u}),s=null,r?"undefined"!=typeof FormData&&r instanceof FormData?s=r:"object"===c(s)?(s=JSON.stringify(r),o["Content-Type"]="application/json"):(s=r,extraHeaders["Content-Type"]||(o["Content-Type"]="application/json")):s=void 0,l=null,f=null,t.prev=7,t.next=10,i()(this.store.server+n,{method:e,body:s,headers:o});case 10:return l=t.sent,t.next=13,l.json();case 13:f=t.sent,h=performance.now(),this.emit("requestTimerEnd",{url:this.store.server+n,method:e,milliseconds:h-u,statekey:a,event:"end"}),t.next=23;break;case 18:throw t.prev=18,t.t0=t.catch(7),h=performance.now(),this.emit("requestTimerEnd",{url:this.store.server+n,method:e,milliseconds:h-u,statekey:a,event:"end"}),t.t0;case 23:if(void 0!==f.payload||2051!==f.error){t.next=35;break}throw p=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/g.exec(l.message),d=new Date(p),(y=new Error("Too many login attempts, try again at ".concat(d))).code=f.error||l.status||0,y.httpStatus=l.status,y.requestID=f.request_id,y.serverMessage=f.message,y.lockedUntil=d,y;case 35:if(!f||void 0!==f.payload||200!=l.status){t.next=39;break}f={payload:f},t.next=46;break;case 39:if(void 0!==f.payload){t.next=46;break}throw(m=new Error(v[l.error]||f.message||"An unknown server error has occurred")).code=f.error||l.status||0,m.httpStatus=l.status,m.requestID=f.request_id,m.serverMessage=f.message,m;case 46:if(!(f.payload&&f.payload.main&&f.payload.main.error)){t.next=54;break}throw b=f.payload.main.error.Code||l.status||0,(g=new Error(v[b]||f.payload.main.error.Msg||"An unknown server error occurred.")).code=b,g.serverMessage=f.payload.main.error.Msg||"",g.httpStatus=l.status,g.requestID=f.request_id,g;case 54:return t.abrupt("return",f.payload);case 55:case"end":return t.stop()}}),t,this,[[7,18]])}))),function(t,e,n,r){return y.apply(this,arguments)})},{key:"refreshToken",value:function(){var e=this;return this.tokenFetchPromise?this.tokenFetchPromise:(this.tokenFetchPromise=this.request("POST","/v1/access_token","",!1,{Authorization:"Bearer ".concat(this.store.refreshToken)}).then((function(t){e.store.token=t.access_token.token,e.tokenFetchPromise=null})).catch((function(n){throw t.warn("Failed to fetch a fresh access token from the backend.",n),e.tokenFetchPromise=null,("2049"==n.code||n.message.includes("Bad token"))&&e.Blockv.UserManager.logout(!0),n})),this.tokenFetchPromise)}},{key:"checkToken",value:(s=l(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=u()(this.store.token),n=1e3*e.exp,!(Date.now()+5e3>n)){t.next=6;break}throw new Error("Token expired.");case 6:t.next=11;break;case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",this.refreshToken());case 11:return t.abrupt("return",!0);case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return s.apply(this,arguments)})}])&&f(r.prototype,o),a&&f(r,a),n}(n.n(a).a)}).call(this,n(9))},function(module,exports,__webpack_require__){"use strict";var assert=__webpack_require__(384),fetch;function isBrowser(){return"undefined"!=typeof window}isBrowser()?(assert.usage(void 0!==window.fetch,["This browser doesn't support `fetch` (`window.fetch===undefined`).","Is this running in Internet Explorer?","Note that the `@brillout/fetch` library doesn't support IE. If you want to support IE then use another fetch library."].join("\n")),fetch=window.fetch.bind(window)):fetch=eval("require")("node-fetch"),module.exports=fetch},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return l}));var r=n(36);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function n(t,e,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(i=a(this,c(n).call(this))).store=t,i.client=e,i.address=r,i.socket=null,i.delayTime=1e3,i.shouldRetry=!1,i}var r,i,l,f,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,e),r=n,(i=[{key:"connect",value:(f=regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.shouldRetry=!0,!this.socket){e.next=3;break}return e.abrupt("return",this);case 3:return e.prev=3,e.next=6,this.client.checkToken();case 6:e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(3),t.warn("WebSocket unable to get client token! Will retry soon..."),this.retryConnection(),e.abrupt("return",this);case 13:if(!this.socket){e.next=15;break}return e.abrupt("return",this);case 15:return n="".concat(this.address,"/ws?app_id=").concat(encodeURIComponent(this.store.appID),"&token=").concat(encodeURIComponent(this.store.token)),this.socket=new WebSocket(n),this.socket.addEventListener("open",this.handleConnected.bind(this)),this.socket.addEventListener("message",this.handleMessage.bind(this)),this.socket.addEventListener("error",this.handleError.bind(this)),this.socket.addEventListener("close",this.handleClose.bind(this)),e.abrupt("return",this);case 22:case"end":return e.stop()}}),e,this,[[3,8]])})),h=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=f.apply(t,e);function u(t){o(i,n,r,u,a,"next",t)}function a(t){o(i,n,r,u,a,"throw",t)}u(void 0)}))},function(){return h.apply(this,arguments)})},{key:"sendMessage",value:function(e){this.socket&&1===this.socket.readyState?this.socket.send(JSON.stringify(e)):t.warn("WebSocket: Attempted to send message up, but the socket is not ready.")}},{key:"handleMessage",value:function(t){var e=JSON.parse(t.data);this.trigger("websocket.raw",e),"rpc"===e.msg_type&&this.trigger("websocket.rpc",e),"state_update"===e.msg_type&&this.trigger("stateUpdate",e),"inventory"===e.msg_type&&this.trigger("inventory",e),"my_events"===e.msg_type&&this.trigger("activity",e),"info"===e.msg_type&&this.trigger("info",e),e&&this.trigger("all",e)}},{key:"handleConnected",value:function(t){this.delayTime=1e3,this.trigger("connected",t)}},{key:"retryConnection",value:function(){var t=this;this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=setTimeout((function(){t.retryTimer=null,t.shouldRetry&&(t.delayTime<8e3&&(t.delayTime*=2),t.connect())}),this.delayTime)}},{key:"handleError",value:function(e){this.socket=null,t.warn("[WebSocket] Connection failed: "+e.message)}},{key:"handleClose",value:function(){this.socket=null,this.retryConnection()}},{key:"close",value:function(){this.shouldRetry=!1,this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.socket&&(this.socket.close(),this.socket=null)}},{key:"isOpen",get:function(){return this.socket&&1===this.socket.readyState}}])&&u(r.prototype,i),l&&u(r,l),n}(n.n(r).a)}).call(this,n(9))},function(t,e,n){n(172),t.exports=n(396)},function(t,e,n){"use strict";(function(t){n(178);var e,r=(e=n(350))&&e.__esModule?e:{default:e};r.default._babelPolyfill&&void 0!==t&&t.warn&&t.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),r.default._babelPolyfill=!0}).call(this,n(9))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";(function(e){var r=n(176);
28/*!
29 * The buffer module from node.js, for the browser.
30 *
31 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
32 * @license MIT
33 */function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var u=n(63),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,s="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function f(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=b,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(u.isFunction(t)){if(s)return t.name;var e=t.toString().match(p);return e&&e[1]}}function v(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function y(t){if(s||!u.isFunction(t))return u.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,n,r,i){throw new h.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function b(t,e){t||m(t,!0,e,"==",h.ok)}function g(t,e,n,r){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(u.isDate(t)&&u.isDate(e))return t.getTime()===e.getTime();if(u.isRegExp(t)&&u.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(u.isPrimitive(t)||u.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=w(t),o=w(e);if(i&&!o||!i&&o)return!1;if(i)return t=c.call(t),e=c.call(e),g(t,e,n);var a,s,l=S(t),f=S(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),s=l.length-1;s>=0;s--)if(l[s]!==f[s])return!1;for(s=l.length-1;s>=0;s--)if(a=l[s],!g(t[a],e[a],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function Z(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function k(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&m(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!t&&i&&!n;if((!t&&u.isError(i)&&o&&Z(i,n)||a)&&m(i,n,"Got unwanted exception"+r),t&&i&&n&&!Z(i,n)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return v(y(t.actual),128)+" "+t.operator+" "+v(y(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=d(e),o=r.indexOf("\n"+i);if(o>=0){var u=r.indexOf("\n",o+1);r=r.substring(u+1)}this.stack=r}}},u.inherits(h.AssertionError,Error),h.fail=m,h.ok=b,h.equal=function(t,e,n){t!=e&&m(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&m(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){g(t,e,!1)||m(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){g(t,e,!0)||m(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){g(t,e,!1)&&m(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){g(e,n,!0)&&m(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&m(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&m(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){k(!0,t,e,n)},h.doesNotThrow=function(t,e,n){k(!1,t,e,n)},h.ifError=function(t){if(t)throw t},h.strict=r((function t(e,n){e||m(e,!0,n,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(t){var e=[];for(var n in t)a.call(t,n)&&e.push(n);return e}}).call(this,n(19))},function(t,e,n){"use strict";
34/*
35object-assign
36(c) Sindre Sorhus
37@license MIT
38*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function u(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,c=u(t),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))i.call(n,l)&&(c[l]=n[l]);if(r){a=r(n);for(var f=0;f<a.length;f++)o.call(n,a[f])&&(c[a[f]]=n[a[f]])}}return c}},function(t,e){t.exports=function(){return(new Date).getTime()}},function(t,e,n){"use strict";n(179),n(322),n(324),n(327),n(329),n(331),n(333),n(335),n(337),n(339),n(341),n(343),n(345),n(349)},function(t,e,n){n(180),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(261),n(262),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(102),n(285),n(136),n(286),n(137),n(287),n(288),n(289),n(290),n(138),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),t.exports=n(8)},function(t,e,n){"use strict";var r=n(2),i=n(15),o=n(10),u=n(0),a=n(13),c=n(34).KEY,s=n(3),l=n(64),f=n(48),h=n(38),p=n(6),d=n(83),v=n(117),y=n(182),m=n(67),b=n(4),g=n(5),w=n(12),Z=n(17),k=n(33),S=n(37),x=n(42),R=n(120),I=n(24),_=n(66),V=n(11),W=n(40),T=I.f,X=V.f,G=R.f,E=r.Symbol,M=r.JSON,j=M&&M.stringify,P=p("_hidden"),N=p("toPrimitive"),B={}.propertyIsEnumerable,U=l("symbol-registry"),L=l("symbols"),C=l("op-symbols"),Y=Object.prototype,A="function"==typeof E&&!!_.f,O=r.QObject,F=!O||!O.prototype||!O.prototype.findChild,J=o&&s((function(){return 7!=x(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=T(Y,e);r&&delete Y[e],X(t,e,n),r&&t!==Y&&X(Y,e,r)}:X,H=function(t){var e=L[t]=x(E.prototype);return e._k=t,e},D=A&&"symbol"==typeof E.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof E},K=function(t,e,n){return t===Y&&K(C,e,n),b(t),e=k(e,!0),b(n),i(L,e)?(n.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),n=x(n,{enumerable:S(0,!1)})):(i(t,P)||X(t,P,S(1,{})),t[P][e]=!0),J(t,e,n)):X(t,e,n)},z=function(t,e){b(t);for(var n,r=y(e=Z(e)),i=0,o=r.length;o>i;)K(t,n=r[i++],e[n]);return t},Q=function(t){var e=B.call(this,t=k(t,!0));return!(this===Y&&i(L,t)&&!i(C,t))&&(!(e||!i(this,t)||!i(L,t)||i(this,P)&&this[P][t])||e)},q=function(t,e){if(t=Z(t),e=k(e,!0),t!==Y||!i(L,e)||i(C,e)){var n=T(t,e);return!n||!i(L,e)||i(t,P)&&t[P][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=G(Z(t)),r=[],o=0;n.length>o;)i(L,e=n[o++])||e==P||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===Y,r=G(n?C:Z(t)),o=[],u=0;r.length>u;)!i(L,e=r[u++])||n&&!i(Y,e)||o.push(L[e]);return o};A||(a((E=function(){if(this instanceof E)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(C,n),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),J(this,t,S(1,n))};return o&&F&&J(Y,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",(function(){return this._k})),I.f=q,V.f=K,n(43).f=R.f=$,n(57).f=Q,_.f=tt,o&&!n(39)&&a(Y,"propertyIsEnumerable",Q,!0),d.f=function(t){return H(p(t))}),u(u.G+u.W+u.F*!A,{Symbol:E});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var rt=W(p.store),it=0;rt.length>it;)v(rt[it++]);u(u.S+u.F*!A,"Symbol",{for:function(t){return i(U,t+="")?U[t]:U[t]=E(t)},keyFor:function(t){if(!D(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){F=!0},useSimple:function(){F=!1}}),u(u.S+u.F*!A,"Object",{create:function(t,e){return void 0===e?x(t):z(x(t),e)},defineProperty:K,defineProperties:z,getOwnPropertyDescriptor:q,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=s((function(){_.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return _.f(w(t))}}),M&&u(u.S+u.F*(!A||s((function(){var t=E();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!D(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!D(e))return e}),r[1]=e,j.apply(M,r)}}),E.prototype[N]||n(16)(E.prototype,N,E.prototype.valueOf),f(E,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(64)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(40),i=n(66),o=n(57);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var u,a=n(t),c=o.f,s=0;a.length>s;)c.call(t,u=a[s++])&&e.push(u);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(42)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(10),"Object",{defineProperties:n(119)})},function(t,e,n){var r=n(17),i=n(24).f;n(25)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(r(t),e)}}))},function(t,e,n){var r=n(12),i=n(44);n(25)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,e,n){var r=n(12),i=n(40);n(25)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){n(25)("getOwnPropertyNames",(function(){return n(120).f}))},function(t,e,n){var r=n(5),i=n(34).onFreeze;n(25)("freeze",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(5),i=n(34).onFreeze;n(25)("seal",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(5),i=n(34).onFreeze;n(25)("preventExtensions",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(5);n(25)("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(5);n(25)("isSealed",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(5);n(25)("isExtensible",(function(t){return function(e){return!!r(e)&&(!t||t(e))}}))},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(121)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(122)})},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(87).set})},function(t,e,n){"use strict";var r=n(58),i={};i[n(6)("toStringTag")]="z",i+""!="[object z]"&&n(13)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(123)})},function(t,e,n){var r=n(11).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(10)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(5),i=n(44),o=n(6)("hasInstance"),u=Function.prototype;o in u||n(11).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),i=n(125);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(0),i=n(126);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(2),i=n(15),o=n(28),u=n(89),a=n(33),c=n(3),s=n(43).f,l=n(24).f,f=n(11).f,h=n(49).trim,p=r.Number,d=p,v=p.prototype,y="Number"==o(n(42)(v)),m="trim"in String.prototype,b=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=m?e.trim():h(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var u,c=e.slice(2),s=0,l=c.length;s<l;s++)if((u=c.charCodeAt(s))<48||u>i)return NaN;return parseInt(c,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(y?c((function(){v.valueOf.call(n)})):"Number"!=o(n))?u(new d(b(e)),n,p):b(e)};for(var g,w=n(10)?s(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Z=0;w.length>Z;Z++)i(d,g=w[Z])&&!i(p,g)&&f(p,g,l(d,g));p.prototype=v,v.constructor=p,n(13)(r,"Number",p)}},function(t,e,n){"use strict";var r=n(0),i=n(23),o=n(127),u=n(90),a=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*s[n],s[n]=r%1e7,r=c(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=s[e],s[e]=c(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==s[t]){var n=String(s[t]);e=""===e?n:e+u.call("0",7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){a.call({})}))),"Number",{toFixed:function(t){var e,n,r,a,c=o(this,l),s=i(t),v="",y="0";if(s<0||s>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*d(2,69,1))-69)<0?c*d(2,-e,1):c/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=s;r>=7;)f(1e7,0),r-=7;for(f(d(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),f(1,1),h(2),y=p()}else f(0,n),f(1<<-e,0),y=p()+u.call("0",s);return y=s>0?v+((a=y.length)<=s?"0."+u.call("0",s-a)+y:y.slice(0,a-s)+"."+y.slice(a-s)):v+y}})},function(t,e,n){"use strict";var r=n(0),i=n(3),o=n(127),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(e):u.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),i=n(2).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(128)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(128),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(126);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(125);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(0),i=n(129),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(91);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(0),i=n(92);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(225)})},function(t,e,n){var r=n(91),i=Math.pow,o=i(2,-52),u=i(2,-23),a=i(2,127)*(2-u),c=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),s=r(t);return i<c?s*(i/c/u+1/o-1/o)*c*u:(n=(e=(1+u/o)*i)-(e-i))>a||n!=n?s*(1/0):s*n}},function(t,e,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,u=0,a=arguments.length,c=0;u<a;)c<(n=i(arguments[u++]))?(o=o*(r=c/n)*r+1,c=n):o+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,e,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(3)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(129)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(91)})},function(t,e,n){var r=n(0),i=n(92),o=Math.exp;r(r.S+r.F*n(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),i=n(92),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),i=n(41),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,u=0;r>u;){if(e=+arguments[u++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),i=n(17),o=n(7);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,u=[],a=0;n>a;)u.push(String(e[a++])),a<r&&u.push(String(arguments[a]));return u.join("")}})},function(t,e,n){"use strict";n(49)("trim",(function(t){return function(){return t(this,3)}}))},function(t,e,n){"use strict";var r=n(93)(!0);n(94)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(0),i=n(93)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(95),u="".endsWith;r(r.P+r.F*n(97)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),a=void 0===n?r:Math.min(i(n),r),c=String(t);return u?u.call(e,c,a):e.slice(a-c.length,a)===c}})},function(t,e,n){"use strict";var r=n(0),i=n(95);r(r.P+r.F*n(97)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(95),u="".startsWith;r(r.P+r.F*n(97)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return u?u.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(14)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(14)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(14)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(14)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(14)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(14)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(14)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(14)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(14)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(14)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(14)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(14)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(14)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),i=n(12),o=n(33);r(r.P+r.F*n(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),i=n(260);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(3),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(n>99?n:"0"+u(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(13)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,e,n){var r=n(6)("toPrimitive"),i=Date.prototype;r in i||n(16)(i,r,n(263))},function(t,e,n){"use strict";var r=n(4),i=n(33);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(67)})},function(t,e,n){"use strict";var r=n(21),i=n(0),o=n(12),u=n(131),a=n(98),c=n(7),s=n(99),l=n(100);i(i.S+i.F*!n(68)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,f,h=o(t),p="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,m=0,b=l(h);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(e=c(h.length));e>m;m++)s(n,m,y?v(h[m],m):h[m]);else for(f=b.call(h),n=new p;!(i=f.next()).done;m++)s(n,m,y?u(f,v,[i.value,m],!0):i.value);return n.length=m,n}})},function(t,e,n){"use strict";var r=n(0),i=n(99);r(r.S+r.F*n(3)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(17),o=[].join;r(r.P+r.F*(n(56)!=Object||!n(20)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),i=n(86),o=n(28),u=n(41),a=n(7),c=[].slice;r(r.P+r.F*n(3)((function(){i&&c.call(i)})),"Array",{slice:function(t,e){var n=a(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var i=u(t,n),s=u(e,n),l=a(s-i),f=new Array(l),h=0;h<l;h++)f[h]="String"==r?this.charAt(i+h):this[i+h];return f}})},function(t,e,n){"use strict";var r=n(0),i=n(22),o=n(12),u=n(3),a=[].sort,c=[1,2,3];r(r.P+r.F*(u((function(){c.sort(void 0)}))||!u((function(){c.sort(null)}))||!n(20)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),i(t))}})},function(t,e,n){"use strict";var r=n(0),i=n(26)(0),o=n(20)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(5),i=n(67),o=n(6)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(0),i=n(26)(1);r(r.P+r.F*!n(20)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(26)(2);r(r.P+r.F*!n(20)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(26)(3);r(r.P+r.F*!n(20)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(26)(4);r(r.P+r.F*!n(20)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(133);r(r.P+r.F*!n(20)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(0),i=n(133);r(r.P+r.F*!n(20)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(0),i=n(65)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!n(20)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(17),o=n(23),u=n(7),a=[].lastIndexOf,c=!!a&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(20)(a)),"Array",{lastIndexOf:function(t){if(c)return a.apply(this,arguments)||0;var e=i(this),n=u(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(134)}),n(45)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(101)}),n(45)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(26)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(45)("find")},function(t,e,n){"use strict";var r=n(0),i=n(26)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(45)(o)},function(t,e,n){n(51)("Array")},function(t,e,n){var r=n(2),i=n(89),o=n(11).f,u=n(43).f,a=n(96),c=n(69),s=r.RegExp,l=s,f=s.prototype,h=/a/g,p=/a/g,d=new s(h)!==h;if(n(10)&&(!d||n(3)((function(){return p[n(6)("match")]=!1,s(h)!=h||s(p)==p||"/a/i"!=s(h,"i")})))){s=function(t,e){var n=this instanceof s,r=a(t),o=void 0===e;return!n&&r&&t.constructor===s&&o?t:i(d?new l(r&&!o?t.source:t,e):l((r=t instanceof s)?t.source:t,r&&o?c.call(t):e),n?this:f,s)};for(var v=function(t){t in s||o(s,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},y=u(l),m=0;y.length>m;)v(y[m++]);f.constructor=s,s.prototype=f,n(13)(r,"RegExp",s)}n(51)("RegExp")},function(t,e,n){"use strict";n(137);var r=n(4),i=n(69),o=n(10),u=/./.toString,a=function(t){n(13)(RegExp.prototype,"toString",t,!0)};n(3)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?a((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&a((function(){return u.call(this)}))},function(t,e,n){"use strict";var r=n(4),i=n(7),o=n(104),u=n(70);n(71)("match",1,(function(t,e,n,a){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var c=r(t),s=String(this);if(!c.global)return u(c,s);var l=c.unicode;c.lastIndex=0;for(var f,h=[],p=0;null!==(f=u(c,s));){var d=String(f[0]);h[p]=d,""===d&&(c.lastIndex=o(s,i(c.lastIndex),l)),p++}return 0===p?null:h}]}))},function(t,e,n){"use strict";var r=n(4),i=n(12),o=n(7),u=n(23),a=n(104),c=n(70),s=Math.max,l=Math.min,f=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(71)("replace",2,(function(t,e,n,d){return[function(r,i){var o=t(this),u=null==r?void 0:r[e];return void 0!==u?u.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=d(n,t,this,e);if(i.done)return i.value;var f=r(t),h=String(this),p="function"==typeof e;p||(e=String(e));var y=f.global;if(y){var m=f.unicode;f.lastIndex=0}for(var b=[];;){var g=c(f,h);if(null===g)break;if(b.push(g),!y)break;""===String(g[0])&&(f.lastIndex=a(h,o(f.lastIndex),m))}for(var w,Z="",k=0,S=0;S<b.length;S++){g=b[S];for(var x=String(g[0]),R=s(l(u(g.index),h.length),0),I=[],_=1;_<g.length;_++)I.push(void 0===(w=g[_])?w:String(w));var V=g.groups;if(p){var W=[x].concat(I,R,h);void 0!==V&&W.push(V);var T=String(e.apply(void 0,W))}else T=v(x,h,R,I,V,e);R>=k&&(Z+=h.slice(k,R)+T,k=R+x.length)}return Z+h.slice(k)}];function v(t,e,r,o,u,a){var c=r+t.length,s=o.length,l=p;return void 0!==u&&(u=i(u),l=h),n.call(a,l,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":a=u[i.slice(1,-1)];break;default:var l=+i;if(0===l)return n;if(l>s){var h=f(l/10);return 0===h?n:h<=s?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):n}a=o[l-1]}return void 0===a?"":a}))}}))},function(t,e,n){"use strict";var r=n(4),i=n(122),o=n(70);n(71)("search",1,(function(t,e,n,u){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=u(n,t,this);if(e.done)return e.value;var a=r(t),c=String(this),s=a.lastIndex;i(s,0)||(a.lastIndex=0);var l=o(a,c);return i(a.lastIndex,s)||(a.lastIndex=s),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(96),i=n(4),o=n(59),u=n(104),a=n(7),c=n(70),s=n(103),l=n(3),f=Math.min,h=[].push,p=!l((function(){RegExp(4294967295,"y")}));n(71)("split",2,(function(t,e,n,l){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,u,a,c=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,p=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,l+"g");(o=s.call(d,i))&&!((u=d.lastIndex)>f&&(c.push(i.slice(f,o.index)),o.length>1&&o.index<i.length&&h.apply(c,o.slice(1)),a=o[0].length,f=u,c.length>=p));)d.lastIndex===o.index&&d.lastIndex++;return f===i.length?!a&&d.test("")||c.push(""):c.push(i.slice(f)),c.length>p?c.slice(0,p):c}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):d.call(String(i),n,r)},function(t,e){var r=l(d,t,this,e,d!==n);if(r.done)return r.value;var s=i(t),h=String(this),v=o(s,RegExp),y=s.unicode,m=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(p?"y":"g"),b=new v(p?s:"^(?:"+s.source+")",m),g=void 0===e?4294967295:e>>>0;if(0===g)return[];if(0===h.length)return null===c(b,h)?[h]:[];for(var w=0,Z=0,k=[];Z<h.length;){b.lastIndex=p?Z:0;var S,x=c(b,p?h:h.slice(Z));if(null===x||(S=f(a(b.lastIndex+(p?0:Z)),h.length))===w)Z=u(h,Z,y);else{if(k.push(h.slice(w,Z)),k.length===g)return k;for(var R=1;R<=x.length-1;R++)if(k.push(x[R]),k.length===g)return k;Z=w=S}}return k.push(h.slice(w)),k}]}))},function(t,e,n){var r=n(2),i=n(105).set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,a=r.Promise,c="process"==n(28)(u);t.exports=function(){var t,e,n,s=function(){var r,i;for(c&&(r=u.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){u.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var l=a.resolve(void 0);n=function(){l.then(s)}}else n=function(){i.call(r,s)};else{var f=!0,h=document.createTextNode("");new o(s).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(141),i=n(46);t.exports=n(74)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(141),i=n(46);t.exports=n(74)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(2),o=n(26)(0),u=n(13),a=n(34),c=n(121),s=n(142),l=n(5),f=n(46),h=n(46),p=!i.ActiveXObject&&"ActiveXObject"in i,d=a.getWeak,v=Object.isExtensible,y=s.ufstore,m=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(t){if(l(t)){var e=d(t);return!0===e?y(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(f(this,"WeakMap"),t,e)}},g=t.exports=n(74)("WeakMap",m,b,s,!0,!0);h&&p&&(c((r=s.getConstructor(m,"WeakMap")).prototype,b),a.NEED=!0,o(["delete","has","get","set"],(function(t){var e=g.prototype,n=e[t];u(e,t,(function(e,i){if(l(e)&&!v(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)}))})))},function(t,e,n){"use strict";var r=n(142),i=n(46);n(74)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),i=n(75),o=n(106),u=n(4),a=n(41),c=n(7),s=n(5),l=n(2).ArrayBuffer,f=n(59),h=o.ArrayBuffer,p=o.DataView,d=i.ABV&&l.isView,v=h.prototype.slice,y=i.VIEW;r(r.G+r.W+r.F*(l!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||s(t)&&y in t}}),r(r.P+r.U+r.F*n(3)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(u(this),t);for(var n=u(this).byteLength,r=a(t,n),i=a(void 0===e?n:e,n),o=new(f(this,h))(c(i-r)),s=new p(this),l=new p(o),d=0;r<i;)l.setUint8(d++,s.getUint8(r++));return o}}),n(51)("ArrayBuffer")},function(t,e,n){var r=n(0);r(r.G+r.W+r.F*!n(75).ABV,{DataView:n(106).DataView})},function(t,e,n){n(30)("Int8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(30)("Int16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Uint16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Int32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Uint32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Float32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(30)("Float64",8,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){var r=n(0),i=n(22),o=n(4),u=(n(2).Reflect||{}).apply,a=Function.apply;r(r.S+r.F*!n(3)((function(){u((function(){}))})),"Reflect",{apply:function(t,e,n){var r=i(t),c=o(n);return u?u(r,e,c):a.call(r,e,c)}})},function(t,e,n){var r=n(0),i=n(42),o=n(22),u=n(4),a=n(5),c=n(3),s=n(123),l=(n(2).Reflect||{}).construct,f=c((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),h=!c((function(){l((function(){}))}));r(r.S+r.F*(f||h),"Reflect",{construct:function(t,e){o(t),u(e);var n=arguments.length<3?t:o(arguments[2]);if(h&&!f)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var c=n.prototype,p=i(a(c)?c:Object.prototype),d=Function.apply.call(t,p,e);return a(d)?d:p}})},function(t,e,n){var r=n(11),i=n(0),o=n(4),u=n(33);i(i.S+i.F*n(3)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,e,n){o(t),e=u(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),i=n(24).f,o=n(4);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(0),i=n(4),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(130)(o,"Object",(function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(24),i=n(44),o=n(15),u=n(0),a=n(5),c=n(4);u(u.S,"Reflect",{get:function t(e,n){var u,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[n]:(u=r.f(e,n))?o(u,"value")?u.value:void 0!==u.get?u.get.call(l):void 0:a(s=i(e))?t(s,n,l):void 0}})},function(t,e,n){var r=n(24),i=n(0),o=n(4);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(44),o=n(4);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(4),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(144)})},function(t,e,n){var r=n(0),i=n(4),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(11),i=n(24),o=n(44),u=n(15),a=n(0),c=n(37),s=n(4),l=n(5);a(a.S,"Reflect",{set:function t(e,n,a){var f,h,p=arguments.length<4?e:arguments[3],d=i.f(s(e),n);if(!d){if(l(h=o(e)))return t(h,n,a,p);d=c(0)}if(u(d,"value")){if(!1===d.writable||!l(p))return!1;if(f=i.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=a,r.f(p,n,f)}else r.f(p,n,c(0,a));return!0}return void 0!==d.set&&(d.set.call(p,a),!0)}})},function(t,e,n){var r=n(0),i=n(87);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(323),t.exports=n(8).Array.includes},function(t,e,n){"use strict";var r=n(0),i=n(65)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(45)("includes")},function(t,e,n){n(325),t.exports=n(8).Array.flatMap},function(t,e,n){"use strict";var r=n(0),i=n(326),o=n(12),u=n(7),a=n(22),c=n(132);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return a(t),e=u(r.length),n=c(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(45)("flatMap")},function(t,e,n){"use strict";var r=n(67),i=n(5),o=n(7),u=n(21),a=n(6)("isConcatSpreadable");t.exports=function t(e,n,c,s,l,f,h,p){for(var d,v,y=l,m=0,b=!!h&&u(h,p,3);m<s;){if(m in c){if(d=b?b(c[m],m,n):c[m],v=!1,i(d)&&(v=void 0!==(v=d[a])?!!v:r(d)),v&&f>0)y=t(e,n,d,o(d.length),y,f-1)-1;else{if(y>=9007199254740991)throw TypeError();e[y]=d}y++}m++}return y}},function(t,e,n){n(328),t.exports=n(8).String.padStart},function(t,e,n){"use strict";var r=n(0),i=n(145),o=n(73),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(330),t.exports=n(8).String.padEnd},function(t,e,n){"use strict";var r=n(0),i=n(145),o=n(73),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(332),t.exports=n(8).String.trimLeft},function(t,e,n){"use strict";n(49)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){n(334),t.exports=n(8).String.trimRight},function(t,e,n){"use strict";n(49)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){n(336),t.exports=n(83).f("asyncIterator")},function(t,e,n){n(117)("asyncIterator")},function(t,e,n){n(338),t.exports=n(8).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(0),i=n(144),o=n(17),u=n(24),a=n(99);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),c=u.f,s=i(r),l={},f=0;s.length>f;)void 0!==(n=c(r,e=s[f++]))&&a(l,e,n);return l}})},function(t,e,n){n(340),t.exports=n(8).Object.values},function(t,e,n){var r=n(0),i=n(146)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){n(342),t.exports=n(8).Object.entries},function(t,e,n){var r=n(0),i=n(146)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";n(138),n(344),t.exports=n(8).Promise.finally},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(2),u=n(59),a=n(140);r(r.P+r.R,"Promise",{finally:function(t){var e=u(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then((function(){return n}))}:t,n?function(n){return a(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){n(346),n(347),n(348),t.exports=n(8)},function(t,e,n){var r=n(2),i=n(0),o=n(73),u=[].slice,a=/MSIE .\./.test(o),c=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*a,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){var r=n(0),i=n(105);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(102),i=n(40),o=n(13),u=n(2),a=n(16),c=n(50),s=n(6),l=s("iterator"),f=s("toStringTag"),h=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(p),v=0;v<d.length;v++){var y,m=d[v],b=p[m],g=u[m],w=g&&g.prototype;if(w&&(w[l]||a(w,l,h),w[f]||a(w,f,m),c[m]=h,b))for(y in r)w[y]||o(w,y,r[y],!0)}},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function a(t,e,n,r){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),u=new k(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var u=n.delegate;if(u){var a=g(u,n);if(a){if(a===s)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,u),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var s={};function l(){}function f(){}function h(){}var p={};p[i]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(S([])));v&&v!==e&&n.call(v,i)&&(p=v);var y=h.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function b(t){var e;this._invoke=function(r,i){function o(){return new Promise((function(e,o){!function e(r,i,o,u){var a=c(t[r],t,i);if("throw"!==a.type){var s=a.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,o,u)}),(function(t){e("throw",t,o,u)})):Promise.resolve(l).then((function(t){s.value=t,o(s)}),(function(t){return e("throw",t,o,u)}))}u(a.arg)}(r,i,e,o)}))}return e=e?e.then(o,o):o()}}function g(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return f.prototype=y.constructor=h,h.constructor=f,h[u]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),b.prototype[o]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,i){var o=new b(a(e,n,r,i));return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},m(y),y[u]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Z),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return u.type="throw",u.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=e,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),Z(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;Z(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){n(351),t.exports=n(147).global},function(t,e,n){var r=n(352);r(r.G,{global:n(107)})},function(t,e,n){var r=n(107),i=n(147),o=n(353),u=n(355),a=n(362),c=function(t,e,n){var s,l,f,h=t&c.F,p=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,m=t&c.W,b=p?i:i[e]||(i[e]={}),g=b.prototype,w=p?r:d?r[e]:(r[e]||{}).prototype;for(s in p&&(n=e),n)(l=!h&&w&&void 0!==w[s])&&a(b,s)||(f=l?w[s]:n[s],b[s]=p&&"function"!=typeof w[s]?n[s]:y&&l?o(f,r):m&&w[s]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((b.virtual||(b.virtual={}))[s]=f,t&c.R&&g&&!g[s]&&u(g,s,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(354);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(356),i=n(361);t.exports=n(109)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(357),i=n(358),o=n(360),u=Object.defineProperty;e.f=n(109)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(108);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(109)&&!n(148)((function(){return 7!=Object.defineProperty(n(359)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(108),i=n(107).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(108);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"default",(function(){return d}));var r=n(35),i=n(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,c,"next",t)}function c(t){u(o,r,i,a,c,"throw",t)}a(void 0)}))}}function c(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(t,e,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var d=function(e){function n(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),!(e=c(this,l(n).call(this,t))).dataPool.sessionInfo||!e.dataPool.sessionInfo.userID)throw new Error("You cannot query the inventory region without being logged in.");return e.currentUserID=e.dataPool.sessionInfo.userID,e}var r,o,u,f,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(n,e),h(n,null,[{key:"id",get:function(){return"inventory"}}]),h(n,[{key:"matches",value:function(t,e){return"inventory"===t}},{key:"onSessionInfoChanged",value:function(){this.close()}},{key:"load",value:(d=a(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.pauseMessages(),n=null,e.prev=2,e.next=5,this.loadV2();case 5:return e.next=7,this.loadV2FacesActions();case 7:e.next=15;break;case 9:return e.prev=9,e.t0=e.catch(2),t.warn("[DataPool > InventoryRegion] Unable to sync via the new method! Attempting the old method now. Reason:",e.t0),e.next=14,this.loadV1();case 14:n=e.sent;case 15:return this.resumeMessages(),e.abrupt("return",n);case 17:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return d.apply(this,arguments)})},{key:"loadV2FacesActions",value:(f=a(regeneratorRuntime.mark((function e(){var n,r,o,u,a,c,s,l,f,h,p,d,v,y,m,b,g,w,Z,k,S,x,R,I,_,V,W,T,X,G,E,M,j,P,N,B,U,L,C;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=[],r=this.objects.getExtra("last-stable-sync"),o=!0,u=!1,a=void 0,e.prev=5,c=this.get(!1)[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)l=s.value,n.includes(l.properties.template)||n.push(l.properties.template);e.next=13;break;case 9:e.prev=9,e.t0=e.catch(5),u=!0,a=e.t0;case 13:e.prev=13,e.prev=14,o||null==c.return||c.return();case 16:if(e.prev=16,!u){e.next=19;break}throw a;case 19:return e.finish(16);case 20:return e.finish(13);case 21:t.debug("[DataPool > InventoryRegion] Synchronizing faces using v2 method... Starting from date ".concat(new Date(r).toLocaleString()," and using ").concat(n.length," templates.")),f=100,h=[],p=0;case 25:if(!(p<n.length)){e.next=57;break}return e.next=28,this.dataPool.Blockv.client.request("POST","/v1/vatom/actions/changes",{templates:n.slice(p,Math.min(p+f,n.length)),since:r},!0);case 28:d=e.sent,e.t1=regeneratorRuntime.keys(d.actions_changes);case 30:if((e.t2=e.t1()).done){e.next=53;break}for(v=e.t2.value,y=!0,m=!1,b=void 0,e.prev=35,g=d.actions_changes[v][Symbol.iterator]();!(y=(w=g.next()).done);y=!0)Z=w.value,h.push({operation:Z.operation,template:v,id:Z.action.name,type:"action",data:Z.action});e.next=43;break;case 39:e.prev=39,e.t3=e.catch(35),m=!0,b=e.t3;case 43:e.prev=43,e.prev=44,y||null==g.return||g.return();case 46:if(e.prev=46,!m){e.next=49;break}throw b;case 49:return e.finish(46);case 50:return e.finish(43);case 51:e.next=30;break;case 53:t.debug("[DataPool > InventoryRegion] Fetched action changes for templates ".concat(p," to ").concat(Math.min(p+f,n.length)));case 54:p+=f,e.next=25;break;case 57:k=0;case 58:if(!(k<n.length)){e.next=90;break}return e.next=61,this.dataPool.Blockv.client.request("POST","/v1/vatom/faces/changes",{templates:n.slice(k,Math.min(k+f,n.length)),since:r},!0);case 61:S=e.sent,e.t4=regeneratorRuntime.keys(S.faces_changes);case 63:if((e.t5=e.t4()).done){e.next=86;break}for(x=e.t5.value,R=!0,I=!1,_=void 0,e.prev=68,V=S.faces_changes[x][Symbol.iterator]();!(R=(W=V.next()).done);R=!0)T=W.value,h.push({operation:T.operation,template:x,id:T.face.id,type:"face",data:T.face});e.next=76;break;case 72:e.prev=72,e.t6=e.catch(68),I=!0,_=e.t6;case 76:e.prev=76,e.prev=77,R||null==V.return||V.return();case 79:if(e.prev=79,!I){e.next=82;break}throw _;case 82:return e.finish(79);case 83:return e.finish(76);case 84:e.next=63;break;case 86:t.debug("[DataPool > InventoryRegion] Fetched face changes for templates ".concat(k," to ").concat(Math.min(k+f,n.length)));case 87:k+=f,e.next=58;break;case 90:for(t.debug("[DataPool > InventoryRegion] Applying ".concat(h.length," face/action changes")),X=[],G=0,E=h;G<E.length;G++)"delete"==(M=E[G]).operation?(t.log("Removing "+M.id),this.removeObjects([M.id])):(t.log("Creating or updating "+M.id),this.addObjects([new i.a(M.type,M.id,M.data)])),X.includes(M.template)||X.push(M.template);j=!0,P=!1,N=void 0,e.prev=96,B=this.objects.values()[Symbol.iterator]();case 98:if(j=(U=B.next()).done){e.next=110;break}if(L=U.value,C=L.data&&L.data["vAtom::vAtomType"]&&L.data["vAtom::vAtomType"].template,X.includes(C)){e.next=103;break}return e.abrupt("continue",107);case 103:if(L.cached){e.next=105;break}return e.abrupt("continue",107);case 105:L.cached=null,this.emit("object.updated",L.id);case 107:j=!0,e.next=98;break;case 110:e.next=116;break;case 112:e.prev=112,e.t7=e.catch(96),P=!0,N=e.t7;case 116:e.prev=116,e.prev=117,j||null==B.return||B.return();case 119:if(e.prev=119,!P){e.next=122;break}throw N;case 122:return e.finish(119);case 123:return e.finish(116);case 124:X.length>0&&this.emit("updated"),this.objects.setExtra("last-stable-sync",Date.now());case 126:case"end":return e.stop()}}),e,this,[[5,9,13,21],[14,,16,20],[35,39,43,51],[44,,46,50],[68,72,76,84],[77,,79,83],[96,112,116,124],[117,,119,123]])}))),function(){return f.apply(this,arguments)})},{key:"loadV2",value:(u=a(regeneratorRuntime.mark((function e(){var n,r,o,u,a,c,s,l,f,h,p,d,v,y,m,b,g,w,Z,k,S,x,R,I,_,V,W,T,X,G,E,M,j,P,N,B,U,L;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dataPool.disableSyncV2){e.next=2;break}throw new Error("V2 synchronization algorithm is disabled in the config.");case 2:if(Array.from(this.objects.values()).find((function(t){return"vatom"==t.type}))){e.next=4;break}throw new Error("V2 synchronization is disabled if the inventory is empty, since it's faster to use the old method for initial sync.");case 4:if(this.objects.getExtra("last-stable-sync")){e.next=7;break}throw new Error("V2 synchronization is disabled, since we don't know when the last stable sync was.");case 7:return n=this.objects.getExtra("hash"),e.next=10,this.dataPool.Blockv.client.request("GET","/v1/user/vatom/inventory/hash",null,!0);case 10:if((r=e.sent).hash){e.next=13;break}throw new Error("The server did not return a hash for our current inventory.");case 13:if(!n||n!=r.hash){e.next=15;break}return e.abrupt("return",t.log("[DataPool > InventoryRegion] Sync complete, our hash matches the server, no changes needed."));case 15:o=[],u=0,a=null;case 18:return u+=1,t.log("[DataPool > InventoryRegion] Fetching page ".concat(u," of sync statuses...")),e.next=23,this.dataPool.Blockv.client.request("GET","/v1/user/vatom/inventory/index?limit=1000"+(a?"&next_token=".concat(a):""),null,!0);case 23:if(c=e.sent,o=o.concat(c.vatoms||[]),a=c.next_token){e.next=28;break}return e.abrupt("break",30);case 28:e.next=18;break;case 30:for(s=Array.from(this.objects.values()).filter((function(t){return"vatom"==t.type&&!o.find((function(e){return e.id==t.id}))})).map((function(t){return t.id})),this.removeObjects(s),s.length>0&&t.log("DataPool > InventoryRegion] Removed ".concat(s.length," vatoms which are no longer in the inventory")),l=[],f=!0,h=!1,p=void 0,e.prev=37,d=o[Symbol.iterator]();!(f=(v=d.next()).done);f=!0)y=v.value,(m=this.getItem(y.id,!1))&&m.sync==y.sync||l.push(y.id);e.next=45;break;case 41:e.prev=41,e.t0=e.catch(37),h=!0,p=e.t0;case 45:e.prev=45,e.prev=46,f||null==d.return||d.return();case 48:if(e.prev=48,!h){e.next=51;break}throw p;case 51:return e.finish(48);case 52:return e.finish(45);case 53:b=100,g=l;case 55:if(!(g.length>0)){e.next=123;break}return w=g.slice(0,b),g=g.slice(b),t.log("[DataPool > InventoryRegion] Fetching ".concat(w.length," updates, ").concat(g.length," vatoms left...")),e.next=61,this.dataPool.Blockv.client.request("POST","/v1/user/vatom/get",{ids:w},!0);case 61:for(Z=e.sent,k=[],S=!0,x=!1,R=void 0,e.prev=66,I=Z.vatoms[Symbol.iterator]();!(S=(_=I.next()).done);S=!0)V=_.value,k.push(new i.a("vatom",V.id,V));e.next=74;break;case 70:e.prev=70,e.t1=e.catch(66),x=!0,R=e.t1;case 74:e.prev=74,e.prev=75,S||null==I.return||I.return();case 77:if(e.prev=77,!x){e.next=80;break}throw R;case 80:return e.finish(77);case 81:return e.finish(74);case 82:for(W=!0,T=!1,X=void 0,e.prev=85,G=Z.faces[Symbol.iterator]();!(W=(E=G.next()).done);W=!0)M=E.value,k.push(new i.a("face",M.id,M));e.next=93;break;case 89:e.prev=89,e.t2=e.catch(85),T=!0,X=e.t2;case 93:e.prev=93,e.prev=94,W||null==G.return||G.return();case 96:if(e.prev=96,!T){e.next=99;break}throw X;case 99:return e.finish(96);case 100:return e.finish(93);case 101:for(j=!0,P=!1,N=void 0,e.prev=104,B=Z.actions[Symbol.iterator]();!(j=(U=B.next()).done);j=!0)L=U.value,k.push(new i.a("action",L.name,L));e.next=112;break;case 108:e.prev=108,e.t3=e.catch(104),P=!0,N=e.t3;case 112:e.prev=112,e.prev=113,j||null==B.return||B.return();case 115:if(e.prev=115,!P){e.next=118;break}throw N;case 118:return e.finish(115);case 119:return e.finish(112);case 120:this.addObjects(k),e.next=55;break;case 123:this.objects.setExtra("hash",r.hash),t.log("[DataPool > InventoryRegion] Sync complete! We fetched ".concat(l.length," vatoms, and removed ").concat(s.length," vatoms."));case 125:case"end":return e.stop()}}),e,this,[[37,41,45,53],[46,,48,52],[66,70,74,82],[75,,77,81],[85,89,93,101],[94,,96,100],[104,108,112,120],[113,,115,119]])}))),function(){return u.apply(this,arguments)})},{key:"loadV1",value:(o=a(regeneratorRuntime.mark((function e(){var n,r,o,u,a,c,s,l,f,h,p,d,v,y,m,b,g,w,Z,k,S,x;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=1,r=[];case 2:return t.debug("[DataPool > InventoryRegion] Fetching owned vatoms, page ".concat(n,"...")),e.next=6,this.dataPool.Blockv.client.request("POST","/v1/user/vatom/inventory",{parent_id:"*",limit:1e3,page:n},!0);case 6:for(o=e.sent,u=[],a=!0,c=!1,s=void 0,e.prev=11,l=o.vatoms[Symbol.iterator]();!(a=(f=l.next()).done);a=!0)h=f.value,r.push(h.id),u.push(new i.a("vatom",h.id,h));e.next=19;break;case 15:e.prev=15,e.t0=e.catch(11),c=!0,s=e.t0;case 19:e.prev=19,e.prev=20,a||null==l.return||l.return();case 22:if(e.prev=22,!c){e.next=25;break}throw s;case 25:return e.finish(22);case 26:return e.finish(19);case 27:for(p=!0,d=!1,v=void 0,e.prev=30,y=o.faces[Symbol.iterator]();!(p=(m=y.next()).done);p=!0)b=m.value,r.push(b.id),u.push(new i.a("face",b.id,b));e.next=38;break;case 34:e.prev=34,e.t1=e.catch(30),d=!0,v=e.t1;case 38:e.prev=38,e.prev=39,p||null==y.return||y.return();case 41:if(e.prev=41,!d){e.next=44;break}throw v;case 44:return e.finish(41);case 45:return e.finish(38);case 46:for(g=!0,w=!1,Z=void 0,e.prev=49,k=o.actions[Symbol.iterator]();!(g=(S=k.next()).done);g=!0)x=S.value,r.push(x.name),u.push(new i.a("action",x.name,x));e.next=57;break;case 53:e.prev=53,e.t2=e.catch(49),w=!0,Z=e.t2;case 57:e.prev=57,e.prev=58,g||null==k.return||k.return();case 60:if(e.prev=60,!w){e.next=63;break}throw Z;case 63:return e.finish(60);case 64:return e.finish(57);case 65:if(this.addObjects(u),n+=1,0!==u.length){e.next=69;break}return e.abrupt("break",71);case 69:e.next=2;break;case 71:return this.objects.setExtra("last-stable-sync",Date.now()),e.abrupt("return",r);case 73:case"end":return e.stop()}}),e,this,[[11,15,19,27],[20,,22,26],[30,34,38,46],[39,,41,45],[49,53,57,65],[58,,60,64]])}))),function(){return o.apply(this,arguments)})},{key:"processMessage",value:(r=a(regeneratorRuntime.mark((function e(r){var o,u,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s(l(n.prototype),"processMessage",this).call(this,r),"inventory"===r.msg_type){e.next=3;break}return e.abrupt("return");case 3:if(o=r.payload&&r.payload.id){e.next=6;break}return e.abrupt("return",t.warn("[DataPool > BVWebSocketRegion] Got websocket message with no vatom ID in it: ",r));case 6:if(r.payload.old_owner!==this.currentUserID||r.payload.new_owner===this.currentUserID){e.next=10;break}this.removeObjects([o]),e.next=22;break;case 10:if(r.payload.old_owner===this.currentUserID||r.payload.new_owner!==this.currentUserID){e.next=21;break}return e.next=13,this.dataPool.Blockv.client.request("POST","/v1/user/vatom/get",{ids:[o]},!0);case 13:u=e.sent,a=[],u.vatoms.map((function(t){return new i.a("vatom",t.id,t)})).forEach((function(t){return a.push(t)})),u.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return a.push(t)})),u.actions.map((function(t){return new i.a("action",t.name,t)})).forEach((function(t){return a.push(t)})),this.addObjects(a),e.next=22;break;case 21:t.warn("[DataPool > BVWebSocketRegion] Logic error in WebSocket message, old_owner and new_owner shouldn't be the same: ".concat(vatomRef.id));case 22:case"end":return e.stop()}}),e,this)}))),function(t){return r.apply(this,arguments)})},{key:"get",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e?s(l(n.prototype),"get",this).call(this,!0):s(l(n.prototype),"get",this).call(this,!1).filter((function(e){return e.properties.owner==t.currentUserID}))}},{key:"willAdd",value:function(t){s(l(n.prototype),"willAdd",this).call(this,t),this.onObjectPreemptivelyChanged(t)}},{key:"willUpdateFields",value:function(t,e){s(l(n.prototype),"willUpdateFields",this).call(this,t,e),this.onObjectPreemptivelyChanged(t)}},{key:"willUpdateField",value:function(t,e,r,i){s(l(n.prototype),"willUpdateField",this).call(this,t,e,r,i),this.onObjectPreemptivelyChanged(t)}},{key:"willRemove",value:function(t){s(l(n.prototype),"willRemove",this).call(this,t),this.objects.setExtra("hash","")}},{key:"onObjectPreemptivelyChanged",value:function(t){t.data.sync=-1,this.objects.setExtra("hash","")}},{key:"stateKey",get:function(){return"inventory:"+this.currentUserID}}]),n}(r.a)}.call(this,n(9))},function(t,e,n){var r,i=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function i(t,e){if(!r[t]){r[t]={};for(var n=0;n<t.length;n++)r[t][t.charAt(n)]=n}return r[t][e]}var o={compressToBase64:function(t){if(null==t)return"";var n=o._compress(t,6,(function(t){return e.charAt(t)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:o._decompress(t.length,32,(function(n){return i(e,t.charAt(n))}))},compressToUTF16:function(e){return null==e?"":o._compress(e,15,(function(e){return t(e+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:o._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=o.compress(t),n=new Uint8Array(2*e.length),r=0,i=e.length;r<i;r++){var u=e.charCodeAt(r);n[2*r]=u>>>8,n[2*r+1]=u%256}return n},decompressFromUint8Array:function(e){if(null==e)return o.decompress(e);for(var n=new Array(e.length/2),r=0,i=n.length;r<i;r++)n[r]=256*e[2*r]+e[2*r+1];var u=[];return n.forEach((function(e){u.push(t(e))})),o.decompress(u.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":o._compress(t,6,(function(t){return n.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),o._decompress(t.length,32,(function(e){return i(n,t.charAt(e))})))},compress:function(e){return o._compress(e,16,(function(e){return t(e)}))},_compress:function(t,e,n){if(null==t)return"";var r,i,o,u={},a={},c="",s="",l="",f=2,h=3,p=2,d=[],v=0,y=0;for(o=0;o<t.length;o+=1)if(c=t.charAt(o),Object.prototype.hasOwnProperty.call(u,c)||(u[c]=h++,a[c]=!0),s=l+c,Object.prototype.hasOwnProperty.call(u,s))l=s;else{if(Object.prototype.hasOwnProperty.call(a,l)){if(l.charCodeAt(0)<256){for(r=0;r<p;r++)v<<=1,y==e-1?(y=0,d.push(n(v)),v=0):y++;for(i=l.charCodeAt(0),r=0;r<8;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1}else{for(i=1,r=0;r<p;r++)v=v<<1|i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1}0==--f&&(f=Math.pow(2,p),p++),delete a[l]}else for(i=u[l],r=0;r<p;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1;0==--f&&(f=Math.pow(2,p),p++),u[s]=h++,l=String(c)}if(""!==l){if(Object.prototype.hasOwnProperty.call(a,l)){if(l.charCodeAt(0)<256){for(r=0;r<p;r++)v<<=1,y==e-1?(y=0,d.push(n(v)),v=0):y++;for(i=l.charCodeAt(0),r=0;r<8;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1}else{for(i=1,r=0;r<p;r++)v=v<<1|i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1}0==--f&&(f=Math.pow(2,p),p++),delete a[l]}else for(i=u[l],r=0;r<p;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1;0==--f&&(f=Math.pow(2,p),p++)}for(i=2,r=0;r<p;r++)v=v<<1|1&i,y==e-1?(y=0,d.push(n(v)),v=0):y++,i>>=1;for(;;){if(v<<=1,y==e-1){d.push(n(v));break}y++}return d.join("")},decompress:function(t){return null==t?"":""==t?null:o._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,n,r){var i,o,u,a,c,s,l,f=[],h=4,p=4,d=3,v="",y=[],m={val:r(0),position:n,index:1};for(i=0;i<3;i+=1)f[i]=i;for(u=0,c=Math.pow(2,2),s=1;s!=c;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),u|=(a>0?1:0)*s,s<<=1;switch(u){case 0:for(u=0,c=Math.pow(2,8),s=1;s!=c;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),u|=(a>0?1:0)*s,s<<=1;l=t(u);break;case 1:for(u=0,c=Math.pow(2,16),s=1;s!=c;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),u|=(a>0?1:0)*s,s<<=1;l=t(u);break;case 2:return""}for(f[3]=l,o=l,y.push(l);;){if(m.index>e)return"";for(u=0,c=Math.pow(2,d),s=1;s!=c;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),u|=(a>0?1:0)*s,s<<=1;switch(l=u){case 0:for(u=0,c=Math.pow(2,8),s=1;s!=c;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),u|=(a>0?1:0)*s,s<<=1;f[p++]=t(u),l=p-1,h--;break;case 1:for(u=0,c=Math.pow(2,16),s=1;s!=c;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),u|=(a>0?1:0)*s,s<<=1;f[p++]=t(u),l=p-1,h--;break;case 2:return y.join("")}if(0==h&&(h=Math.pow(2,d),d++),f[l])v=f[l];else{if(l!==p)return null;v=o+o.charAt(0)}y.push(v),f[p++]=o+v.charAt(0),o=v,0==--h&&(h=Math.pow(2,d),d++)}}};return o}();void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)},function(t,e,n){"use strict";e.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){for(var e,n=s(t),r=n[0],u=n[1],a=new o(function(t,e,n){return 3*(e+n)/4-n}(0,r,u)),c=0,l=u>0?r-4:r,f=0;f<l;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],a[c++]=e>>16&255,a[c++]=e>>8&255,a[c++]=255&e;2===u&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,a[c++]=255&e);1===u&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e);return a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],u=0,a=n-i;u<a;u+=16383)o.push(l(t,u,u+16383>a?a:u+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=u.length;a<c;++a)r[a]=u[a],i[u.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,u=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,u,a=8*i-r-1,c=(1<<a)-1,s=c>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=r;l>0;u=256*u+t[e+f],f+=h,l-=8);if(0===o)o=1-s;else{if(o===c)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,r),o-=s}return(p?-1:1)*u*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var u,a,c,s=8*o-i-1,l=(1<<s)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,u=l):(u=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-u))<1&&(u--,c*=2),(e+=u+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(u++,c/=2),u+f>=l?(a=0,u=l):u+f>=1?(a=(e*c-1)*Math.pow(2,i),u+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(u=u<<i|a,s+=i;s>0;t[n+p]=255&u,p+=d,u/=256,s-=8);t[n+p-d]|=128*v}},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,u,a,c=1,s={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(u="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(u)&&d(+e.data.slice(u.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(u+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return s[c]=i,r(c),c++},h.clearImmediate=p}function p(t){delete s[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=s[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(19),n(27))},function(t,e){},function(t,e,n){"use strict";var r=n(112).Buffer,i=n(370);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,o=r.allocUnsafe(t>>>0),u=this.head,a=0;u;)e=u.data,n=o,i=a,e.copy(n,i),a+=u.data.length,u=u.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(e,n){function r(t){try{if(!n.localStorage)return!1}catch(t){return!1}var e=n.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,n){if(r("noDeprecation"))return t;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(n);r("traceDeprecation")?e.trace(n):e.warn(n),i=!0}return t.apply(this,arguments)}}}).call(this,n(9),n(19))},function(t,e,n){var r=n(76),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function u(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=u),o(i,u),u.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},u.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},u.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},u.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";t.exports=o;var r=n(157),i=n(60);function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(54),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(113)},function(t,e,n){t.exports=n(47)},function(t,e,n){t.exports=n(111).Transform},function(t,e,n){t.exports=n(111).PassThrough},function(t,e,n){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}e.stringify=function(t,e){e=e||"";var n,i,o=[];for(i in"string"!=typeof e&&(e="?"),t)if(r.call(t,i)){if((n=t[i])||null!=n&&!isNaN(n)||(n=""),i=encodeURIComponent(i),n=encodeURIComponent(n),null===i||null===n)continue;o.push(i+"="+n)}return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,n=/([^=?&]+)=?([^&]*)/g,r={};e=n.exec(t);){var o=i(e[1]),u=i(e[2]);null===o||null===u||o in r||(r[o]=u)}return r}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(35),i=n(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function a(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=a(this,c(e).call(this,t))).noCache=!0,r.ids=n.sort(),r}var n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(e,t),l(e,null,[{key:"id",get:function(){return"ids"}}]),l(e,[{key:"matches",value:function(t,e){if("ids"!==t)return!1;if(!e||e.length!==this.ids.length)return!1;for(var n=0;n<this.ids.length;n++)if(e[n]!==this.ids[n])return!1;return!0}},{key:"load",value:(n=regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.pauseMessages(),t.next=3,this.dataPool.Blockv.client.request("POST","/v1/user/vatom/get",{ids:this.ids},!0);case 3:return e=t.sent,n=[],e.vatoms.map((function(t){return new i.a("vatom",t.id,t)})).forEach((function(t){return n.push(t)})),e.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return n.push(t)})),e.actions.map((function(t){return new i.a("action",t.name,t)})).forEach((function(t){return n.push(t)})),this.addObjects(n),this.resumeMessages(),t.abrupt("return",n.map((function(t){return t.id})));case 11:case"end":return t.stop()}}),t,this)})),r=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){u(o,r,i,a,c,"next",t)}function c(t){u(o,r,i,a,c,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})},{key:"stateKey",get:function(){return"ids:"+this.ids.join(",")}}]),e}(r.a)},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return p}));var r=n(35),i=n(61),o=n(1);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function c(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var p=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=c(this,s(e).call(this,t))).noCache=!0,r.parentID=n,r}var n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(e,t),f(e,null,[{key:"id",get:function(){return"children"}}]),f(e,[{key:"matches",value:function(t,e){return"children"===t&&e===this.parentID}},{key:"load",value:(n=regeneratorRuntime.mark((function t(){var e,n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.pauseMessages(),e=(new i.a).setScope(i.a.FieldParentID,this.parentID).getPayload(),t.next=4,this.dataPool.Blockv.client.request("POST","/vatom/discover",e,!0);case 4:return n=t.sent,r=[],n.results.map((function(t){return new o.a("vatom",t.id,t)})).forEach((function(t){return r.push(t)})),n.faces.map((function(t){return new o.a("face",t.id,t)})).forEach((function(t){return r.push(t)})),n.actions.map((function(t){return new o.a("action",t.name,t)})).forEach((function(t){return r.push(t)})),this.addObjects(r),this.resumeMessages(),t.abrupt("return",r.map((function(t){return t.id})));case 12:case"end":return t.stop()}}),t,this)})),r=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function u(t){a(o,r,i,u,c,"next",t)}function c(t){a(o,r,i,u,c,"throw",t)}u(void 0)}))},function(){return r.apply(this,arguments)})},{key:"stateKey",get:function(){return"children:"+this.parentID}}]),e}(r.a)},function(t,e,n){var r=n(383);t.exports=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(r(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return r(e)}}},function(t,e){function n(t){this.message=t}n.prototype=new Error,n.prototype.name="InvalidCharacterError",t.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,u=0,a="";i=e.charAt(u++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return a}},function(t,e,n){const r=n(78),i=n(392),o=n(393),u=n(394),a=n(158);t.exports=r,t.exports.internal=i,t.exports.usage=o,t.exports.warning=u,t.exports.log=a},function(t,e,n){var r=n(386);t.exports=function(){var t=[].slice.call(arguments);return t.push({IS_REASSERT_OPTS:!0,is_warning:!0}),r.apply(this,t)}},function(t,e,n){(function(e){var r=n(387).logify_input,i=n(160).titleFormat,o=n(161),u={is_warning:"is_warning",is_usage:"is_usage",is_internal:"is_internal",details:"details"};function a(t){var e=[],n={};for(var r in t){var i=t[r];if(i&&i.IS_REASSERT_OPTS)for(var o in i){if(!u[o]&&"IS_REASSERT_OPTS"!==o)throw new Error("Reassert: [Internal Error]: "+("Unkonwn option `"+o+"`"));n[o]=i[o]}else e.push(i)}return{msgs:e,opts:n}}function c(t,e,n,o){var a=[];return a=a.concat(function(t){if(!t.details)return[];var e=[i("Error Details")];for(var n in t.details)e.push(r(t.details[n]));return e.push("\n"),e}(n)),h()||(a=a.concat(function(t,e,n){if(t[u.is_warning]&&e.length>0)return[];return[i("Stack Trace"),n.join("\n")]}(n,e,o))).push("\n"),a=a.concat(function(t,e,n){let o=[];var a=(n[u.is_warning]?"Warning":n[u.is_usage]&&"Wrong Usage")||n[u.is_internal]&&"Internal Error"||"Assertion Fail";o.push(i(a)),0===e.length&&o.push("Failed assertion condition: `"+t+" != true`");for(var c in e){var s=e[c],l=r(s);o.push(l)}n.details&&(o.push(""),o.push('See "Error Details" above for more information.'));return o}(t,e,n))}function s(t,n,r){var i=!n[u.is_warning];if(o()){if(i){var a=new Error;throw a.stack=t.join("\n"),a}for(var c in t)e.error(t[c])}h()&&(i?l(t):setTimeout((function(){l(t)}),0))}function l(t){for(var n in t)e.error(t[n]);throw Error.stackTraceLimit=1/0,new Error}function f(){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var e=(new Error).stack;Error.stackTraceLimit=t;var n=e.split("\n"),r=[];for(var i in n){var o=n[i];"Error"!==o&&(-1===o.indexOf("/node_modules/reassert/")&&-1===o.indexOf(" (internal/")&&r.push(o))}return r}function h(){return"undefined"!=typeof window}t.exports=function(t){if(t)return t;var e=a([].slice.call(arguments,1)),n=e.msgs,r=e.opts,i=f(),o=c(t,n,r,i);return s(o,r,i),t}}).call(this,n(9))},function(t,e,n){(function(e){var r=n(161);i.logify_input=o,t.exports=i;function i(){for(var t in arguments){var n=arguments[t],r=o(n);e.log(r)}}function o(t){var e=function(t){if(!t)return t;if(t.constructor===Array)return u(t);var e=a(t);if("[object "===e.slice(0,"[object ".length))return u(t);return e}(t);return e&&e.length>1e4?e.slice(0,1e4)+"[CROPPED-BY-REASSERT]":e}function u(t){var e=function t(e,n=[]){if(!(e instanceof Object))return e;if(e instanceof RegExp)return e.toJSON||(e.toJSON=function(){return"[RegExp: "+a(e)+"]"}),e;if(e instanceof Function)return e.toJSON||(e.toJSON=function(){return e.name?"[Function: "+e.name+"]":"[Function]"}),e;if(e.constructor!==Object&&e.constructor!==Array)return e;if(n.includes(e))return"[ALREADY_PRINTED_COPY]";n=[e,...n];var r=new e.constructor;for(var i in e)r[i]=t(e[i],n);return r}(t);try{return JSON.stringify(e,null,2)}catch(i){return r()?n(63).inspect(t):a(e)+"["+i+"][Error](Reassert-stringification)"}}function a(t){return"object"!=typeof t||t.toString?""+t:"[object Object]"}}).call(this,n(9))},function(t,e,n){"use strict";const r=n(389),i=n(391);t.exports=t=>{if("string"!=typeof t||0===t.length)return 0;t=r(t);let e=0;for(let n=0;n<t.length;n++){const r=t.codePointAt(n);r<=31||r>=127&&r<=159||(r>=768&&r<=879||(r>65535&&n++,e+=i(r)?2:1))}return e}},function(t,e,n){"use strict";const r=n(390);t.exports=t=>"string"==typeof t?t.replace(r(),""):t},function(t,e,n){"use strict";t.exports=()=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(t,"g")}},function(t,e,n){"use strict";t.exports=t=>!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141))},function(t,e,n){var r=n(78);t.exports=function(){var t=[].slice.call(arguments);return t.push({IS_REASSERT_OPTS:!0,is_internal:!0}),r.apply(this,t)}},function(t,e,n){var r=n(78);t.exports=function(){var t=[].slice.call(arguments);return t.push({IS_REASSERT_OPTS:!0,is_usage:!0}),r.apply(this,t)}},function(t,e,n){var r=n(78);t.exports=function(){var t=[].slice.call(arguments);return t.push({IS_REASSERT_OPTS:!0,is_warning:!0}),r.apply(this,t)}},function(t){t.exports=JSON.parse('{"name":"@blockv/sdk","version":"3.3.24","description":"Allows web apps to display and interact with vatoms.","main":"lib/index-node.js","browser":"src/index.js","scripts":{"build-node":"babel --config-file=./node.babelrc -d lib/ src/","build-browser":"webpack -p","build-faces-browser":"webpack -p --config ./face/webpack.config.js","build-dev":"webpack -d --config ./face/webpack.config.js","build":"concurrently \\"npm run build-node\\" \\"npm run build-browser\\" \\"npm run build-faces-browser\\"","prepare":"npm run build","test":"npm run build && npm run jest --detectOpenHandles","mocha":"mocha","jest":"jest"},"keywords":["vatom","blockv","browser","web","html"],"files":["src/","face/","lib/","dist/"],"author":"Blockv","license":"BLOCKv AG","source":true,"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-decorators":"^7.7.4","@babel/polyfill":"^7.7.0","@babel/preset-env":"^7.7.7","@babel/preset-react":"^7.7.4","babel-loader":"^8.0.6","concurrently":"^5.0.2","copy":"^0.3.2","css-loader":"^3.4.1","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.19.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","file-loader":"^5.0.2","jest":"^24.9.0","node-qunit-phantomjs":"^2.1.0","node-sass":"^4.13.0","postcss-loader":"~3.0.0","sass-loader":"^8.0.0","should":"^13.2.3","style-loader":"^1.1.2","unexpected":"^11.12.1","url-loader":"^3.0.0","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0","webpack":"^4.41.5","webpack-cli":"^3.3.10","worker-loader":"^2.0.0"},"dependencies":{"@brillout/fetch":"^0.2.1","babel-polyfill":"^6.26.0","babel-preset-stage-0":"^6.24.1","better-assert":"^1.0.2","chai":"^4.2.0","dotenv":"^8.2.0","expect.js":"^0.3.1","jwt-decode":"^2.2.0","lodash":"^4.17.15","lz-string":"^1.4.4","lzutf8":"^0.5.5","pouchdb":"^7.1.1","url-parse":"^1.4.7"},"repository":"github:BLOCKvIO/web-sdk","jest":{"bail":true},"standard":{"globals":["WebSocket"]}}')},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.r(e);var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.plugins=[n(363).default,n(380).default,n(381).default,n(115).default],this.regions=[],this.sessionInfo={}}var e,i,o;return e=t,(i=[{key:"region",value:function(t,e){var n=this.regions.find((function(n){return n.matches(t,e)}));if(n)return n;var r=this.plugins.find((function(e){return e.id===t}));if(!r)throw new Error("Region with ID '".concat(t,"' not found."));return n=new r(this,e),this.regions.push(n),n}},{key:"removeRegion",value:function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e]===t)return this.regions.splice(e,1)}},{key:"setSessionInfo",value:function(t){this.sessionInfo=t;var e=!0,n=!1,r=void 0;try{for(var i,o=this.regions[Symbol.iterator]();!(e=(i=o.next()).done);e=!0)i.value.onSessionInfoChanged(t)}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"stats",value:function(){var t=0;for(var e in localStorage)e.startsWith("sync.")&&(t+=localStorage[e].length);return{estimatedSize:t}}},{key:"clearCache",value:function(){for(var t in localStorage)t.startsWith("sync.")&&localStorage.removeItem(t)}}])&&r(e.prototype,i),o&&r(e,o),t}(),o=n(166),u=n(55),a=n.n(u);function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.UserApi=e,this.store=n}var e,n,r;return e=t,(n=[{key:"register",value:function(t){return this.UserApi.register(t)}},{key:"login",value:function(t,e,n){return this.UserApi.login(t,e,n)}},{key:"loginGuest",value:function(t){return this.UserApi.loginGuest(t)}},{key:"logout",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.UserApi.logout(t)}},{key:"loginOAuthPopup",value:function(){return this.UserApi.loginOAuthPopup()}},{key:"getCurrentUser",value:function(){return this.UserApi.getCurrentUser()}},{key:"getCurrentUserTokens",value:function(){return this.UserApi.getUserTokens()}},{key:"uploadAvatar",value:function(t){return this.UserApi.uploadAvatar(t)}},{key:"updateUser",value:function(t){return this.UserApi.updateUser(t)}},{key:"getAccessToken",value:function(){return this.UserApi.getAccessToken()}},{key:"encodeAssetProvider",value:function(t){return this.UserApi.encodeAssetProvider(t)}},{key:"sendTokenVerification",value:function(t,e){return this.UserApi.sendTokenVerification(t,e)}},{key:"getRefreshToken",value:function(){return this.UserApi.getRefreshToken()}},{key:"setRefreshToken",value:function(t){return this.UserApi.setRefreshToken(t)}},{key:"verifyUserToken",value:function(t){return this.UserApi.verifyUserToken(t)}},{key:"addUserToken",value:function(t){return this.UserApi.addUserToken(t)}},{key:"setDefaultToken",value:function(t){return this.UserApi.setDefaultToken(t)}},{key:"deleteUserToken",value:function(t){return this.UserApi.deleteUserToken(t)}},{key:"getGuestToken",value:function(){return this.UserApi.getGuestToken()}},{key:"resetPassword",value:function(t,e){return this.UserApi.resetPassword(t,e)}},{key:"getPublicUserProfile",value:function(t){return this.UserApi.getPublicUserProfile(t)}},{key:"addRedeemable",value:function(t){return this.UserApi.addRedeemable(t)}},{key:"isLoggedIn",get:function(){if(!this.store.assetProvider)return!1;var t,e=this.store.refreshToken;if(!e)return!1;try{return t=1e3*a()(e).exp,Date.now()<t-3e4}catch(t){return!1}}}])&&c(e.prototype,n),r&&c(e,r),t}(),l=n(167),f=n(32);function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e}var e,n,r;return e=t,(n=[{key:"getActions",value:function(t){return this.client.request("GET","/v1/user/actions/".concat(t),{},!0).then((function(t){for(var e=t.length,n=[],r=0;r<e;){var i=t[r].name.split("::Action::");n.push({template_id:i[0],action:i[1]}),r+=1}return n}))}},{key:"performAction",value:function(t,e){return this.client.request("POST","/v1/user/vatom/action/".concat(t),e,!0).then((function(t){return t.main.output}))}},{key:"getUserInventory",value:function(t){return this.client.request("POST","/v1/user/vatom/inventory",t,!0).then((function(t){var e=t.actions,n=t.faces,r=t.vatoms,i=[],o=[],u=[],a=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(a=(l=h.next()).done);a=!0){var p=l.value,d=p.name.split("::Action::"),v=d[0];i.push({template:v,action:d[1],meta:p.meta,properties:p.properties})}}catch(t){c=!0,s=t}finally{try{a||null==h.return||h.return()}finally{if(c)throw s}}var y=!0,m=!1,b=void 0;try{for(var g,w=n[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var Z=g.value;o.push({template:Z.template,id:Z.id,meta:Z.meta,properties:Z.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var k=!0,S=!1,x=void 0;try{for(var R,I=function(){var t=R.value,e=t["vAtom::vAtomType"].template;if("vatomic::v1::vAtom::Avatar"!==e){var n=new f.a(t,o.filter((function(t){return t.template===e})),i.filter((function(t){return t.template===e})));u.push(n)}},_=r[Symbol.iterator]();!(k=(R=_.next()).done);k=!0)I()}catch(t){S=!0,x=t}finally{try{k||null==_.return||_.return()}finally{if(S)throw x}}return u}))}},{key:"getUserVatoms",value:function(t){return this.client.request("POST","/v1/user/vatom/get",t,!0).then((function(t){var e=t.actions,n=t.faces,r=t.vatoms,i=[],o=[],u=[],a=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(a=(l=h.next()).done);a=!0){var p=l.value,d=p.name.split("::Action::"),v=d[0];i.push({template:v,action:d[1],meta:p.meta,properties:p.properties})}}catch(t){c=!0,s=t}finally{try{a||null==h.return||h.return()}finally{if(c)throw s}}var y=!0,m=!1,b=void 0;try{for(var g,w=n[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var Z=g.value;o.push({template:Z.template,id:Z.id,meta:Z.meta,properties:Z.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var k=!0,S=!1,x=void 0;try{for(var R,I=function(){var t=R.value,e=t["vAtom::vAtomType"].template,n=new f.a(t,o.filter((function(t){return t.template===e})),i.filter((function(t){return t.template===e})));u.push(n)},_=r[Symbol.iterator]();!(k=(R=_.next()).done);k=!0)I()}catch(t){S=!0,x=t}finally{try{k||null==_.return||_.return()}finally{if(S)throw x}}return u}))}},{key:"geoDiscover",value:function(t){return this.client.request("POST","/v1/vatom/geodiscover",t,!0).then((function(t){var e=t.actions,n=t.faces,r=t.vatoms,i=[],o=[],u=[],a=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(a=(l=h.next()).done);a=!0){var p=l.value,d=p.name.split("::Action::"),v=d[0];i.push({template:v,action:d[1],meta:p.meta,properties:p.properties})}}catch(t){c=!0,s=t}finally{try{a||null==h.return||h.return()}finally{if(c)throw s}}var y=!0,m=!1,b=void 0;try{for(var g,w=n[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var Z=g.value;o.push({template:Z.template,id:Z.id,meta:Z.meta,properties:Z.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var k=!0,S=!1,x=void 0;try{for(var R,I=function(){var t=R.value,e=t["vAtom::vAtomType"].template,n=new f.a(t,o.filter((function(t){return t.template===e})),i.filter((function(t){return t.template===e})));u.push(n)},_=r[Symbol.iterator]();!(k=(R=_.next()).done);k=!0)I()}catch(t){S=!0,x=t}finally{try{k||null==_.return||_.return()}finally{if(S)throw x}}return u}))}},{key:"geoDiscoverGroups",value:function(t){return this.client.request("POST","/v1/vatom/geodiscovergroups",t,!0).then((function(t){return t}))}},{key:"getVatomChildren",value:function(t){return this.client.request("POST","/v1/vatom/discover",{scope:{key:"vAtom::vAtomType.parent_id",value:t},return:{type:"*",fields:[]}},!0).then((function(t){var e=t.actions,n=t.faces,r=t.results,i=[],o=[],u=[],a=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(a=(l=h.next()).done);a=!0){var p=l.value,d=p.name.split("::Action::"),v=d[0];i.push({template:v,action:d[1],meta:p.meta,properties:p.properties})}}catch(t){c=!0,s=t}finally{try{a||null==h.return||h.return()}finally{if(c)throw s}}var y=!0,m=!1,b=void 0;try{for(var g,w=n[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var Z=g.value;o.push({template:Z.template,id:Z.id,meta:Z.meta,properties:Z.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var k=!0,S=!1,x=void 0;try{for(var R,I=function(){var t=R.value,e=t["vAtom::vAtomType"].template,n=new f.a(t,o.filter((function(t){return t.template===e})),i.filter((function(t){return t.template===e})));u.push(n)},_=r[Symbol.iterator]();!(k=(R=_.next()).done);k=!0)I()}catch(t){S=!0,x=t}finally{try{k||null==_.return||_.return()}finally{if(S)throw x}}return u}))}},{key:"setParent",value:function(t){return this.client.request("PATCH","/v1/vatoms",t,!0).then((function(t){return t}))}},{key:"trashVatom",value:function(t){var e={"this.id":t};return this.client.request("POST","/v1/user/vatom/trash",e,!0).then((function(t){return t}))}}])&&h(e.prototype,n),r&&h(e,r),t}(),d=n(115);function v(t,e,n,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var m=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.Blockv=e,this.vatomApi=new p(e.client)}var e,n,r,i,o;return e=t,(n=[{key:"getActions",value:function(t){return this.vatomApi.getActions(t)}},{key:"transferTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Transfer",n=arguments.length>2?arguments[2]:void 0,r={};if("string"==typeof t)/^0x[a-fA-F0-9]{40}$/.test(t)?(e.startsWith("Eth")||(e="Eth"+e),r["new.owner.eth_address"]=t):-1!==t.indexOf("@")?r["new.owner.email"]=t:0===t.indexOf("+")?r["new.owner.phone_number"]=t:r["new.owner.id"]=t;else if(t.userID)r["new.owner.id"]=t.userID;else if(t.phoneNumber)r["new.owner.phone_number"]=t.phoneNumber;else{if(!t.email)return Promise.reject({code:"INVALID_PARAMETER",message:"The user object supplied didn't have any identifying fields. It must have either a userID, an email, or a phoneNumber."});r["new.owner.email"]=t.email}return this.performAction(n,e,r)}},{key:"performAction",value:function(t,e,n){var r=this,i=[];switch(e){case"Transfer":i.push(this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.owner","."));break;case"Drop":i.push(this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.geo_pos",n)),i.push(this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.dropped",!0));break;case"Pickup":i.push(this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.dropped",!1));break;case"Redeem":i.push(this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.owner","."))}return this.vatomApi.performAction(e,Object.assign({"this.id":t},n)).catch((function(e){throw i.map((function(t){return t()})),1645==e.code&&r.Blockv.dataPool.regions.filter((function(t){return t instanceof d.default})).forEach((function(e){return e.preemptiveChange(t,"vAtom::vAtomType.dropped",!1)})),e}))}},{key:"combineWith",value:function(t,e){var n=this.Blockv.dataPool.region("inventory").preemptiveChange(e.id,"vAtom::vAtomType.parent_id",t.id);return this.Blockv.client.request("PATCH","/v1/vatoms",{ids:[e.id],parent_id:t.id},!0).catch((function(t){throw n(),t}))}},{key:"split",value:function(t){var e=this,n=t.properties.parent_id||".";return this.getVatomChildren(t.id).then((function(t){return Promise.all(t.map((function(t){var r=e.Blockv.dataPool.region("inventory").preemptiveChange(t.id,"vAtom::vAtomType.parent_id",n);return e.Blockv.client.request("PATCH","/v1/vatoms",{ids:[t.id],parent_id:n},!0).catch((function(t){throw r(),t}))})))}))}},{key:"getUserInventory",value:function(){return this.Blockv.dataPool.region("inventory").get()}},{key:"getUserVatoms",value:(i=regeneratorRuntime.mark((function t(e){var n,r,i,o,u,a,c,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"string"==typeof e&&(e=[e]),n=[],r=!0,i=!1,o=void 0,t.prev=5,u=e[Symbol.iterator]();case 7:if(r=(a=u.next()).done){t.next=20;break}return c=a.value,t.next=11,this.Blockv.dataPool.region("inventory").getItem(c);case 11:if(!(s=t.sent)){t.next=16;break}n.push(s),t.next=17;break;case 16:return t.abrupt("break",20);case 17:r=!0,t.next=7;break;case 20:t.next=26;break;case 22:t.prev=22,t.t0=t.catch(5),i=!0,o=t.t0;case 26:t.prev=26,t.prev=27,r||null==u.return||u.return();case 29:if(t.prev=29,!i){t.next=32;break}throw o;case 32:return t.finish(29);case 33:return t.finish(26);case 34:if(n.length!==e.length){t.next=36;break}return t.abrupt("return",n);case 36:return t.abrupt("return",this.Blockv.dataPool.region("ids",e).get());case 37:case"end":return t.stop()}}),t,this,[[5,22,26,34],[27,,29,33]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function u(t){v(o,n,r,u,a,"next",t)}function a(t){v(o,n,r,u,a,"throw",t)}u(void 0)}))},function(t){return o.apply(this,arguments)})},{key:"geoDiscover",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vatoms",r={bottom_left:{lat:t.lat,lon:t.lon},top_right:{lat:e.lat,lon:e.lon},filter:n};return this.vatomApi.geoDiscover(r)}},{key:"geoDiscoverGroups",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"all",i={bottom_left:{lat:t.lat,lon:t.lon},top_right:{lat:e.lat,lon:e.lon},precision:n,filter:r};return this.vatomApi.geoDiscoverGroups(i)}},{key:"getVatomChildren",value:function(t){return this.Blockv.dataPool.region("inventory").has(t)?this.Blockv.dataPool.region("inventory").get().then((function(e){return e.filter((function(e){return e.properties.parent_id===t}))})):this.vatomApi.getVatomChildren(t)}},{key:"setParentID",value:function(t,e){var n=this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.parent_id",e);return this.Blockv.client.request("PATCH","/v1/vatoms",{ids:[t],parent_id:e},!0).catch((function(t){throw n(),t}))}},{key:"setParent",value:function(t){var e={ids:[t.id],parent_id:t.parent_id};return this.vatomApi.setParent(e)}},{key:"trashVatom",value:function(t){var e=[];return e.push(this.Blockv.dataPool.region("inventory").preemptiveChange(t,"vAtom::vAtomType.owner",".")),this.vatomApi.trashVatom(t).catch((function(t){throw e.map((function(t){return t()})),t}))}}])&&y(e.prototype,n),r&&y(e,r),t}();function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activityApi=e}var e,n,r;return e=t,(n=[{key:"myThreads",value:function(){return this.activityApi.threads()}},{key:"myThreadMessages",value:function(t){return this.activityApi.threadMessages(t)}},{key:"sendMessage",value:function(t,e){return this.activityApi.sendMessage(t,e)}}])&&b(e.prototype,n),r&&b(e,r),t}();function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Z=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e}var e,n,r;return e=t,(n=[{key:"threads",value:function(){return this.client.request("POST","/v1/activity/mythreads",{},!0).then((function(t){return t.threads}))}},{key:"threadMessages",value:function(t){var e={name:t,cursor:"",count:100};return this.client.request("POST","/v1/activity/mythreadmessages",e,!0).then((function(t){return t}))}},{key:"sendMessage",value:function(t,e){var n={message:e,id:t};return this.client.request("POST","/v1/user/message",n,!0).then((function(t){return t}))}}])&&w(e.prototype,n),r&&w(e,r),t}(),k=n(168),S=n(36),x=n.n(S),R=n(170);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function V(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function T(t,e){return(T=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var X=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=V(this,W(e).call(this))).store=t,r.client=n,r.sockets=[],r}var n,r,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&T(t,e)}(e,t),n=e,(r=[{key:"connect",value:function(){var t=this;if(0==this.sockets.length){var e=this.store.websocketAddress;"string"==typeof e&&(e=[e]);var n=!0,r=!1,i=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done);n=!0){var a=o.value;this.sockets.push(new R.a(this.store,this.client,a))}}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}var c=!0,s=!1,l=void 0;try{for(var f,h=this.sockets[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;p.trigger=this.trigger.bind(this),p.triggerEvent=this.triggerEvent.bind(this),p.emit=this.emit.bind(this)}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}return Promise.all(this.sockets.map((function(t){return t.connect()}))).then((function(e){return t}))}},{key:"sendMessage",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.sockets[Symbol.iterator]();!(e=(i=o.next()).done);e=!0)i.value.sendMessage(t)}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"close",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.sockets[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.close()}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}this.sockets=[]}},{key:"isOpen",get:function(){return!!this.sockets.find((function(t){return t.isOpen}))}}])&&_(n.prototype,r),i&&_(n,i),e}(x.a);function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function M(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var P=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e){return!e||"object"!==G(e)&&"function"!=typeof e?M(t):e}(this,E(e).call(this));var r=t.prefix||t.appID;n.store=new o.a(r),n.store.appID=t.appID,n.store.server=t.server||"https://api.blockv.io",n.store.websocketAddress=t.websocketAddress||"wss://newws.blockv.io",n.dataPool=new i(M(n)),n.dataPool.Blockv=M(n),n.dataPool.disableSyncV2=t.disableSyncV2,n.client=new k.a(M(n));var u=new l.a(M(n)),a=new Z(n.client);return n.Activity=new g(a),n.WebSockets=new X(n.store,n.client),n.UserManager=new s(u,n.store),n.Vatoms=new m(M(n)),n.UserManager.isLoggedIn&&n.dataPool.setSessionInfo({userID:n.store.userID,client:n.client}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(e,t),e}(x.a),N=n(61);n.d(e,"default",(function(){return P})),n.d(e,"Discover",(function(){return N.a})),"undefined"!=typeof window&&(window.BlockvSDKInfo={version:n(395).version})}]).default;
39//# sourceMappingURL=blockv-sdk.min.js.map
\No newline at end of file