UNPKG

484 kBJavaScriptView Raw
1!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}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=181)}([function(t,e,n){var r=n(2),i=n(9),o=n(16),a=n(13),u=n(23),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?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,b&&a(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(65)("wks"),i=n(39),o=n(2).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){(function(e){var r,i=n(64),o=n(185),a=n(187),u=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]=a()},"time"],[function(t){var e=c[t];if(!e)throw new Error("No such label: "+t);var n=a()-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=u.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(21))},function(t,e,n){var r=n(25),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){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(118),o=n(34),a=Object.defineProperty;e.f=n(10)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(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(31);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(2),i=n(16),o=n(15),a=n(39)("src"),u=n(191),c=(""+u).split("toString");n(9).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(s&&(o(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:u?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[a]||u.call(this)}))},function(t,e,n){var r=n(0),i=n(3),o=n(31),a=/"/g,u=function(t,e,n,r){var i=String(o(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),u+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(u),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(38);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(57),i=n(31);t.exports=function(t){return r(i(t))}},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(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vatomView=e,this.face=r,this.element=document.createElement("div"),this.element.style.position="relative",this.element.style.width="100%",this.element.style.height="100%"}var e,n,i;return e=t,(n=[{key:"onResize",value:function(){}},{key:"onLoad",value:function(){}},{key:"onUnload",value:function(){}},{key:"onVatomUpdated",value:function(){}},{key:"vatom",get:function(){return this.vatomView.vatom}}])&&r(e.prototype,n),i&&r(e,i),t}()},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",a="__lodash_placeholder__",u=[["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]",k="[object Symbol]",Z="[object WeakMap]",S="[object ArrayBuffer]",x="[object DataView]",_="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",V="[object Int16Array]",W="[object Int32Array]",T="[object Uint8Array]",M="[object Uint16Array]",j="[object Uint32Array]",E=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,N=/[&<>"']/g,L=RegExp(P.source),C=RegExp(N.source),U=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,A=/<%=([\s\S]+?)%>/g,O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,F=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/[\\^$.*+?()[\]{}|]/g,D=RegExp(J.source),H=/^\s+|\s+$/g,z=/^\s+/,K=/\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,at=/^\[object .+?Constructor\]$/,ut=/^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]",kt="\\ud83c[\\udffb-\\udfff]",Zt="[^\\ud800-\\udfff]",St="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",_t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",It="(?:"+gt+"|"+wt+")",Rt="(?:"+_t+"|"+wt+")",Vt="(?:"+yt+"|"+kt+")"+"?",Wt="[\\ufe0e\\ufe0f]?"+Vt+("(?:\\u200d(?:"+[Zt,St,xt].join("|")+")[\\ufe0e\\ufe0f]?"+Vt+")*"),Tt="(?:"+[bt,St,xt].join("|")+")"+Wt,Mt="(?:"+[Zt+yt+"?",yt,St,xt,dt].join("|")+")",jt=RegExp("['’]","g"),Et=RegExp(yt,"g"),Gt=RegExp(kt+"(?="+kt+")|"+Mt+Wt,"g"),Xt=RegExp([_t+"?"+gt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,_t,"$"].join("|")+")",Rt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,_t+It,"$"].join("|")+")",_t+"?"+It+"+(?:['’](?:d|ll|m|re|s|t|ve))?",_t+"+(?:['’](?: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 ]/,Lt=["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"],Ct=-1,Ut={};Ut[_]=Ut[I]=Ut[R]=Ut[V]=Ut[W]=Ut[T]=Ut["[object Uint8ClampedArray]"]=Ut[M]=Ut[j]=!0,Ut[c]=Ut[s]=Ut[S]=Ut[l]=Ut[x]=Ut[f]=Ut[h]=Ut[p]=Ut[v]=Ut[y]=Ut[m]=Ut[b]=Ut[g]=Ut[w]=Ut[Z]=!1;var Bt={};Bt[c]=Bt[s]=Bt[S]=Bt[x]=Bt[l]=Bt[f]=Bt[_]=Bt[I]=Bt[R]=Bt[V]=Bt[W]=Bt[v]=Bt[y]=Bt[m]=Bt[b]=Bt[g]=Bt[w]=Bt[k]=Bt[T]=Bt["[object Uint8ClampedArray]"]=Bt[M]=Bt[j]=!0,Bt[h]=Bt[p]=Bt[Z]=!1;var At={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ot=parseFloat,Yt=parseInt,Ft="object"==typeof t&&t&&t.Object===Object&&t,Jt="object"==typeof self&&self&&self.Object===Object&&self,Dt=Ft||Jt||Function("return this")(),Ht=e&&!e.nodeType&&e,zt=Ht&&"object"==typeof r&&r&&!r.nodeType&&r,Kt=zt&&zt.exports===Ht,Qt=Kt&&Ft.process,qt=function(){try{var t=zt&&zt.require&&zt.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 ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function ue(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 a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function fe(t,e){return!!(null==t?0:t.length)&&ke(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=_e("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 ke(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 Ze(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 _e(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 Re(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 Me(t,e){return pe(e,(function(e){return t[e]}))}function je(t,e){return t.has(e)}function Ee(t,e){for(var n=-1,r=t.length;++n<r&&ke(e,t[n],0)>-1;);return n}function Ge(t,e){for(var n=t.length;n--&&ke(e,t[n],0)>-1;);return n}function Xe(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 Le(t){return"\\"+At[t]}function Ce(t){return Pt.test(t)}function Ue(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Be(t,e){return function(n){return t(e(n))}}function Ae(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var u=t[n];u!==e&&u!==a||(t[n]=a,o[i++]=n)}return o}function Oe(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function Ye(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Fe(t){return Ce(t)?function(t){var e=Gt.lastIndex=0;for(;Gt.test(t);)++e;return e}(t):be(t)}function Je(t){return Ce(t)?function(t){return t.match(Gt)||[]}(t):function(t){return t.split("")}(t)}var De=Ie({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var He=function t(e){var n,r=(e=null==e?Dt:He.defaults(Dt.Object(),e,He.pick(Dt,Lt))).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,kt=vt.prototype,Zt=e["__core-js_shared__"],St=wt.toString,xt=kt.hasOwnProperty,_t=0,It=(n=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Rt=kt.toString,Vt=St.call(vt),Wt=Dt._,Tt=yt("^"+St.call(xt).replace(J,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mt=Kt?e.Buffer:void 0,Gt=e.Symbol,Pt=e.Uint8Array,At=Mt?Mt.allocUnsafe:void 0,Ft=Be(vt.getPrototypeOf,vt),Jt=vt.create,Ht=kt.propertyIsEnumerable,zt=gt.splice,Qt=Gt?Gt.isConcatSpreadable:void 0,qt=Gt?Gt.iterator:void 0,be=Gt?Gt.toStringTag:void 0,Ie=function(){try{var t=$i(vt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ze=e.clearTimeout!==Dt.clearTimeout&&e.clearTimeout,Ke=i&&i.now!==Dt.Date.now&&i.now,Qe=e.setTimeout!==Dt.setTimeout&&e.setTimeout,qe=dt.ceil,$e=dt.floor,tn=vt.getOwnPropertySymbols,en=Mt?Mt.isBuffer:void 0,nn=e.isFinite,rn=gt.join,on=Be(vt.keys,vt),an=dt.max,un=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=Ro(hn),kn=Ro(pn),Zn=Ro(dn),Sn=Ro(vn),xn=Ro(yn),_n=Gt?Gt.prototype:void 0,In=_n?_n.valueOf:void 0,Rn=_n?_n.toString:void 0;function Vn(t){if(Ya(t)&&!Ea(t)&&!(t instanceof jn)){if(t instanceof Mn)return t;if(xt.call(t,"__wrapped__"))return Vo(t)}return new Mn(t)}var Wn=function(){function t(){}return function(e){if(!Oa(e))return{};if(Jt)return Jt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Tn(){}function Mn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function jn(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 Gn(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 Xn(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 Xn;++e<n;)this.add(t[e])}function Nn(t){var e=this.__data__=new Gn(t);this.size=e.size}function Ln(t,e){var n=Ea(t),r=!n&&ja(t),i=!n&&!r&&Na(t),o=!n&&!r&&!i&&qa(t),a=n||r||i||o,u=a?We(t.length,mt):[],c=u.length;for(var s in t)!e&&!xt.call(t,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||ao(s,c))||u.push(s);return u}function Cn(t){var e=t.length;return e?t[Pr(0,e-1)]:void 0}function Un(t,e){return xo(mi(t),zn(e,0,t.length))}function Bn(t){return xo(mi(t))}function An(t,e,n){(void 0===n||Wa(t[e],n))&&(void 0!==n||e in t)||Dn(t,e,n)}function On(t,e,n){var r=t[e];xt.call(t,e)&&Wa(r,n)&&(void 0!==n||e in t)||Dn(t,e,n)}function Yn(t,e){for(var n=t.length;n--;)if(Wa(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,wu(e),t)}function Dn(t,e,n){"__proto__"==e&&Ie?Ie(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Hn(t,e){for(var n=-1,i=e.length,o=r(i),a=null==t;++n<i;)o[n]=a?void 0:vu(t,e[n]);return o}function zn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Kn(t,e,n,r,i,o){var a,u=1&e,s=2&e,h=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!Oa(t))return t;var Z=Ea(t);if(Z){if(a=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),!u)return mi(t,a)}else{var E=no(t),G=E==p||E==d;if(Na(t))return fi(t,u);if(E==m||E==c||G&&!i){if(a=s||G?{}:io(t),!u)return s?function(t,e){return bi(t,eo(t),e)}(t,function(t,e){return t&&bi(e,ku(e),t)}(a,t)):function(t,e){return bi(t,to(t),e)}(t,Jn(a,t))}else{if(!Bt[E])return i?t:{};a=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 _:case I:case R:case V:case W:case T:case"[object Uint8ClampedArray]":case M:case j: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 k:return i=t,In?vt(In.call(i)):{}}var i}(t,E,u)}}o||(o=new Nn);var X=o.get(t);if(X)return X;o.set(t,a),za(t)?t.forEach((function(r){a.add(Kn(r,e,n,r,t,o))})):Fa(t)&&t.forEach((function(r,i){a.set(i,Kn(r,e,n,i,t,o))}));var P=Z?void 0:(h?s?Ji:Fi:s?ku:wu)(t);return ue(P||t,(function(r,i){P&&(r=t[i=r]),On(a,i,Kn(r,e,n,i,t,o))})),a}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],a=t[i];if(void 0===a&&!(i in t)||!o(a))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,a=!0,u=t.length,c=[],s=e.length;if(!u)return c;n&&(e=pe(e,Te(n))),r?(o=he,a=!1):e.length>=200&&(o=je,a=!1,e=new Pn(e));t:for(;++i<u;){var l=t[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&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:U,evaluate:B,interpolate:A,variable:"",imports:{_:Vn}},Vn.prototype=Tn.prototype,Vn.prototype.constructor=Vn,Mn.prototype=Wn(Tn.prototype),Mn.prototype.constructor=Mn,jn.prototype=Wn(Tn.prototype),jn.prototype.constructor=jn,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},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(t){var e=this.__data__,n=Yn(e,t);return!(n<0)&&(n==e.length-1?e.pop():zt.call(e,n,1),--this.size,!0)},Gn.prototype.get=function(t){var e=this.__data__,n=Yn(e,t);return n<0?void 0:e[n][1]},Gn.prototype.has=function(t){return Yn(this.__data__,t)>-1},Gn.prototype.set=function(t,e){var n=this.__data__,r=Yn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Xn.prototype.clear=function(){this.size=0,this.__data__={hash:new En,map:new(pn||Gn),string:new En}},Xn.prototype.delete=function(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e},Xn.prototype.get=function(t){return Qi(this,t).get(t)},Xn.prototype.has=function(t){return Qi(this,t).has(t)},Xn.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 Gn,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 Gn){var r=n.__data__;if(!pn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Xn(r)}return n.set(t,e),this.size=n.size,this};var tr=ki(cr),er=ki(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],a=e(o);if(null!=a&&(void 0===u?a==a&&!Qa(a):n(a,u)))var u=a,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,a=t.length;for(n||(n=oo),i||(i=[]);++o<a;){var u=t[o];e>0&&n(u)?e>1?or(u,e-1,n,r,i):de(i,u):r||(i[i.length]=u)}return i}var ar=Zi(),ur=Zi(!0);function cr(t,e){return t&&ar(t,e,wu)}function sr(t,e){return t&&ur(t,e,wu)}function lr(t,e){return le(e,(function(e){return Ua(t[e])}))}function fr(t,e){for(var n=0,r=(e=ui(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 Ea(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=Rt.call(t);r&&(e?t[be]=n:delete t[be]);return i}(t):function(t){return Rt.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,a=t.length,u=a,c=r(a),s=1/0,l=[];u--;){var f=t[u];u&&e&&(f=pe(f,Te(e))),s=un(f.length,s),c[u]=!n&&(e||o>=120&&f.length>=120)?new Pn(u&&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?je(p,v):i(l,v,n))){for(u=a;--u;){var y=c[u];if(!(y?je(y,v):i(t[u],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=ui(e,t)))?t:t[Io(Co(e))];return null==r?void 0:oe(r,t,n)}function gr(t){return Ya(t)&&pr(t)==c}function wr(t,e,n,r,i){return t===e||(null==t||null==e||!Ya(t)&&!Ya(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var a=Ea(t),u=Ea(e),p=a?s:no(t),d=u?s:no(e),Z=(p=p==c?m:p)==m,_=(d=d==c?m:d)==m,I=p==d;if(I&&Na(t)){if(!Na(e))return!1;a=!0,Z=!1}if(I&&!Z)return o||(o=new Nn),a||qa(t)?Oi(t,e,n,r,i,o):function(t,e,n,r,i,o,a){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 Wa(+t,+e);case h:return t.name==e.name&&t.message==e.message;case b:case w:return t==e+"";case v:var u=Ue;case g:var c=1&r;if(u||(u=Oe),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=2,a.set(t,e);var p=Oi(u(t),u(e),r,i,o,a);return a.delete(t),p;case k:if(In)return In.call(t)==In.call(e)}return!1}(t,e,p,n,r,i,o);if(!(1&n)){var R=Z&&xt.call(t,"__wrapped__"),V=_&&xt.call(e,"__wrapped__");if(R||V){var W=R?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 a=1&n,u=Fi(t),c=u.length,s=Fi(e).length;if(c!=s&&!a)return!1;var l=c;for(;l--;){var f=u[l];if(!(a?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=a;for(;++l<c;){f=u[l];var v=t[f],y=e[f];if(r)var m=a?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 kr(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=vt(t);i--;){var u=n[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var c=(u=n[i])[0],s=t[c],l=u[1];if(a&&u[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 Zr(t){return!(!Oa(t)||(e=t,It&&It in e))&&(Ua(t)?Tt:at).test(Ro(t));var e}function Sr(t){return"function"==typeof t?t:null==t?Ju:"object"==typeof t?Ea(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 _r(t){if(!Oa(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 Rr(t,e){var n=-1,i=Xa(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||kr(n,t,e)}}function Wr(t,e){return co(t)&&ho(e)?po(Io(t),e):function(n){var r=vu(n,t);return void 0===r&&r===e?yu(n,t):wr(e,r,3)}}function Tr(t,e,n,r,i){t!==e&&ar(e,(function(o,a){if(i||(i=new Nn),Oa(o))!function(t,e,n,r,i,o,a){var u=bo(t,n),c=bo(e,n),s=a.get(c);if(s)return void An(t,n,s);var l=o?o(u,c,n+"",t,e,a):void 0,f=void 0===l;if(f){var h=Ea(c),p=!h&&Na(c),d=!h&&!p&&qa(c);l=c,h||p||d?Ea(u)?l=u:Pa(u)?l=mi(u):p?(f=!1,l=fi(c,!0)):d?(f=!1,l=pi(c,!0)):l=[]:Da(c)||ja(c)?(l=u,ja(u)?l=au(u):Oa(u)&&!Ua(u)||(l=io(c))):f=!1}f&&(a.set(c,l),i(l,c,r,o,a),a.delete(c));An(t,n,l)}(t,e,a,n,Tr,r,i);else{var u=r?r(bo(t,a),o,a+"",t,e,i):void 0;void 0===u&&(u=o),An(t,a,u)}}),ku)}function Mr(t,e){var n=t.length;if(n)return ao(e+=e<0?n:0,n)?t[e]:void 0}function jr(t,e,n){var r=-1;return e=pe(e.length?e:[Ju],Te(Ki())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Rr(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,a=i.length,u=n.length;for(;++r<a;){var c=di(i[r],o[r]);if(c){if(r>=u)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 a=e[r],u=fr(t,a);n(u,a)&&Br(o,ui(a,t),u)}return o}function Gr(t,e,n,r){var i=r?Ze:ke,o=-1,a=e.length,u=t;for(t===e&&(e=mi(e)),n&&(u=pe(t,Te(n)));++o<a;)for(var c=0,s=e[o],l=n?n(s):s;(c=i(u,l,c,r))>-1;)u!==t&&zt.call(u,c,1),zt.call(t,c,1);return t}function Xr(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;ao(i)?zt.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 Lr(t,e){return ko(vo(t,e,Ju),t+"")}function Cr(t){return Cn(Wu(t))}function Ur(t,e){var n=Wu(t);return xo(n,zn(e,0,n.length))}function Br(t,e,n,r){if(!Oa(t))return t;for(var i=-1,o=(e=ui(e,t)).length,a=o-1,u=t;null!=u&&++i<o;){var c=Io(e[i]),s=n;if(i!=a){var l=u[c];void 0===(s=r?r(l,c,u):void 0)&&(s=Oa(l)?l:ao(e[i+1])?[]:{})}On(u,c,s),u=u[c]}return t}var Ar=bn?function(t,e){return bn.set(t,e),t}:Ju,Or=Ie?function(t,e){return Ie(t,"toString",{configurable:!0,enumerable:!1,value:Ou(e),writable:!0})}:Ju;function Yr(t){return xo(Wu(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 a=r(o);++i<o;)a[i]=t[i+e];return a}function Jr(t,e){var n;return tr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Dr(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,a=t[o];null!==a&&!Qa(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Hr(t,e,Ju,n)}function Hr(t,e,n,r){e=n(e);for(var i=0,o=null==t?0:t.length,a=e!=e,u=null===e,c=Qa(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=Qa(f);if(a)var y=r||d;else y=s?d&&(r||h):u?d&&h&&(r||!p):c?d&&h&&!p&&(r||!v):!p&&!v&&(r?f<=e:f<e);y?i=l+1:o=l}return un(o,4294967294)}function zr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],u=e?e(a):a;if(!n||!Wa(u,c)){var c=u;o[i++]=0===a?0:a}}return o}function Kr(t){return"number"==typeof t?t:Qa(t)?NaN:+t}function Qr(t){if("string"==typeof t)return t;if(Ea(t))return pe(t,Qr)+"";if(Qa(t))return Rn?Rn.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,a=!0,u=[],c=u;if(n)a=!1,i=he;else if(o>=200){var s=e?null:Ni(t);if(s)return Oe(s);a=!1,i=je,c=new Pn}else c=e?[]:u;t:for(;++r<o;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),u.push(l)}else i(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u}function $r(t,e){return null==(t=yo(t,e=ui(e,t)))||delete t[Io(Co(e))]}function ti(t,e,n,r){return Br(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 jn&&(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,a=r(i);++o<i;)for(var u=t[o],c=-1;++c<i;)c!=o&&(a[o]=$n(a[o]||u,t[c],e,n));return qr(or(a,1),e,n)}function ii(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var u=r<o?e[r]:void 0;n(a,t[r],u)}return a}function oi(t){return Pa(t)?t:[]}function ai(t){return"function"==typeof t?t:Ju}function ui(t,e){return Ea(t)?t:co(t,e)?[t]:_o(uu(t))}var ci=Lr;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=ze||function(t){return Dt.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var n=t.length,r=At?At(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=Qa(t),a=void 0!==e,u=null===e,c=e==e,s=Qa(e);if(!u&&!s&&!o&&t>e||o&&a&&c&&!u&&!s||r&&a&&c||!n&&c||!i)return 1;if(!r&&!o&&!s&&t<e||s&&n&&i&&!r&&!o||u&&n&&i||!a&&i||!c)return-1}return 0}function vi(t,e,n,i){for(var o=-1,a=t.length,u=n.length,c=-1,s=e.length,l=an(a-u,0),f=r(s+l),h=!i;++c<s;)f[c]=e[c];for(;++o<u;)(h||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[c++]=t[o++];return f}function yi(t,e,n,i){for(var o=-1,a=t.length,u=-1,c=n.length,s=-1,l=e.length,f=an(a-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(;++u<c;)(p||o<a)&&(h[d+n[u]]=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,a=e.length;++o<a;){var u=e[o],c=r?r(n[u],t[u],u,n,t):void 0;void 0===c&&(c=t[u]),i?Dn(n,u,c):On(n,u,c)}return n}function gi(t,e){return function(n,r){var i=Ea(n)?ae:Fn,o=e?e():{};return i(n,t,Ki(r,2),o)}}function wi(t){return Lr((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&uo(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=vt(e);++r<i;){var u=n[r];u&&t(e,u,r,o)}return e}))}function ki(t,e){return function(n,r){if(null==n)return n;if(!Xa(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=vt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Zi(t){return function(e,n,r){for(var i=-1,o=vt(e),a=r(e),u=a.length;u--;){var c=a[t?u:++i];if(!1===n(o[c],c,o))break}return e}}function Si(t){return function(e){var n=Ce(e=uu(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(Uu(ju(e).replace(jt,"")),t,"")}}function _i(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 Oa(r)?r:n}}function Ii(t){return function(e,n,r){var i=vt(e);if(!Xa(e)){var o=Ki(n,3);e=wu(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}function Ri(t){return Yi((function(e){var n=e.length,r=n,i=Mn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new bt(o);if(i&&!u&&"wrapper"==Hi(a))var u=new Mn([],!0)}for(r=u?r:n;++r<n;){var c=Hi(a=e[r]),s="wrapper"==c?Di(a):void 0;u=s&&so(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Hi(s[0])].apply(u,s[3]):1==a.length&&so(a)?u[c]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ea(r))return u.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,a,u,c,s,l){var f=128&e,h=1&e,p=2&e,d=24&e,v=512&e,y=p?void 0:_i(t);return function m(){for(var b=arguments.length,g=r(b),w=b;w--;)g[w]=arguments[w];if(d)var k=zi(m),Z=Xe(g,k);if(i&&(g=vi(g,i,o,d)),a&&(g=yi(g,a,u,d)),b-=Z,d&&b<l){var S=Ae(g,k);return Xi(t,e,Vi,m.placeholder,n,g,S,c,s,l-b)}var x=h?n:this,_=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!==Dt&&this instanceof m&&(_=y||_i(_)),_.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=Kr(n),r=Kr(r)),i=t(n,r)}return i}}function Mi(t){return Yi((function(e){return e=pe(e,Te(Ki())),Lr((function(n){var r=this;return t(e,(function(t){return oe(t,r,n)}))}))}))}function ji(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 Ce(e)?si(Je(r),0,t).join(""):r.slice(0,t)}function Ei(t){return function(e,n,i){return i&&"number"!=typeof i&&uo(e,n,i)&&(n=i=void 0),e=nu(e),void 0===n?(n=e,e=0):n=nu(n),function(t,e,n,i){for(var o=-1,a=an(qe((e-t)/(n||1)),0),u=r(a);a--;)u[i?a:++o]=t,t+=n;return u}(e,n,i=void 0===i?e<n?1:-1:nu(i),t)}}function Gi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ou(e),n=ou(n)),t(e,n)}}function Xi(t,e,n,r,i,o,a,u,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?a:void 0,l?void 0:o,l?void 0:a,u,c,s],h=n.apply(void 0,f);return so(t)&&go(h,f),h.placeholder=r,Zo(h,t,e)}function Pi(t){var e=dt[t];return function(t,n){if(t=ou(t),(n=null==n?0:un(ru(n),292))&&nn(t)){var r=(uu(t)+"e").split("e");return+((r=(uu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ni=vn&&1/Oe(new vn([,-0]))[1]==1/0?function(t){return new vn(t)}:Qu;function Li(t){return function(e){var n=no(e);return n==v?Ue(e):n==g?Ye(e):function(t,e){return pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ci(t,e,n,i,u,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=u=void 0),s=void 0===s?s:an(ru(s),0),l=void 0===l?l:ru(l),h-=u?u.length:0,64&e){var p=i,d=u;i=u=void 0}var v=f?void 0:Di(t),y=[t,e,n,i,u,p,d,c,s,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,u=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!u)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?Ae(t[3],a):e[4]}(c=e[5])&&(s=t[5],t[5]=s?yi(s,c,e[6]):c,t[6]=s?Ae(t[5],a):e[6]);(c=e[7])&&(t[7]=c);128&r&&(t[8]=null==t[8]?e[8]:un(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],u=y[4],!(l=y[9]=void 0===y[9]?f?0:t.length:an(y[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?function(t,e,n){var i=_i(t);return function o(){for(var a=arguments.length,u=r(a),c=a,s=zi(o);c--;)u[c]=arguments[c];var l=a<3&&u[0]!==s&&u[a-1]!==s?[]:Ae(u,s);if((a-=l.length)<n)return Xi(t,e,Vi,o.placeholder,void 0,u,l,void 0,void 0,n-a);var f=this&&this!==Dt&&this instanceof o?i:t;return oe(f,this,u)}}(t,e,l):32!=e&&33!=e||u.length?Vi.apply(void 0,y):function(t,e,n,i){var o=1&e,a=_i(t);return function e(){for(var u=-1,c=arguments.length,s=-1,l=i.length,f=r(l+c),h=this&&this!==Dt&&this instanceof e?a:t;++s<l;)f[s]=i[s];for(;c--;)f[s++]=arguments[++u];return oe(h,o?n:this,f)}}(t,e,n,i);else var m=function(t,e,n){var r=1&e,i=_i(t);return function e(){var o=this&&this!==Dt&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return Zo((v?Ar:go)(m,y),t,e)}function Ui(t,e,n,r){return void 0===t||Wa(t,kt[n])&&!xt.call(r,n)?e:t}function Bi(t,e,n,r,i,o){return Oa(t)&&Oa(e)&&(o.set(e,t),Tr(t,e,void 0,Bi,o),o.delete(e)),t}function Ai(t){return Da(t)?void 0:t}function Oi(t,e,n,r,i,o){var a=1&n,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))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<u;){var p=t[l],d=e[l];if(r)var v=a?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(!je(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 Yi(t){return ko(vo(t,void 0,Go),t+"")}function Fi(t){return hr(t,wu,to)}function Ji(t){return hr(t,ku,eo)}var Di=bn?function(t){return bn.get(t)}:Qu;function Hi(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 zi(t){return(xt.call(Vn,"placeholder")?Vn:t).placeholder}function Ki(){var t=Vn.iteratee||Du;return t=t===Du?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=wu(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 Zr(n)?n:void 0}var to=tn?function(t){return null==t?[]:(t=vt(t),le(tn(t),(function(e){return Ht.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=ui(e,t)).length,o=!1;++r<i;){var a=Io(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Aa(i)&&ao(a,i)&&(Ea(t)||ja(t))}function io(t){return"function"!=typeof t.constructor||fo(t)?{}:Wn(Ft(t))}function oo(t){return Ea(t)||ja(t)||!!(Qt&&t&&t[Qt])}function ao(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 uo(t,e,n){if(!Oa(n))return!1;var r=typeof e;return!!("number"==r?Xa(n)&&ao(e,n.length):"string"==r&&e in n)&&Wa(n[e],t)}function co(t,e){if(Ea(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Qa(t))||(Y.test(t)||!O.test(t)||null!=e&&t in vt(e))}function so(t){var e=Hi(t),n=Vn[e];if("function"!=typeof n||!(e in jn.prototype))return!1;if(t===n)return!0;var r=Di(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)!=Z)&&(no=function(t){var e=pr(t),n=e==m?t.constructor:void 0,r=n?Ro(n):"";if(r)switch(r){case wn:return x;case kn:return v;case Zn:return"[object Promise]";case Sn:return g;case xn:return Z}return e});var lo=Zt?Ua:oc;function fo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function ho(t){return t==t&&!Oa(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=an(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=an(i.length-e,0),u=r(a);++o<a;)u[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(u),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=un(e.length,n),i=mi(t);r--;){var o=e[r];t[r]=ao(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(Ar),wo=Qe||function(t,e){return Dt.setTimeout(t,e)},ko=So(Or);function Zo(t,e,n){var r=e+"";return ko(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 ue(u,(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),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var _o=function(t){var e=Sa(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||Qa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ro(t){if(null!=t){try{return St.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vo(t){if(t instanceof jn)return t.clone();var e=new Mn(t.__wrapped__,t.__chain__);return e.__actions__=mi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Wo=Lr((function(t,e){return Pa(t)?$n(t,or(e,1,Pa,!0)):[]})),To=Lr((function(t,e){var n=Co(e);return Pa(n)&&(n=void 0),Pa(t)?$n(t,or(e,1,Pa,!0),Ki(n,2)):[]})),Mo=Lr((function(t,e){var n=Co(e);return Pa(n)&&(n=void 0),Pa(t)?$n(t,or(e,1,Pa,!0),void 0,n):[]}));function jo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ru(n);return i<0&&(i=an(r+i,0)),we(t,Ki(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=ru(n),i=n<0?an(r+i,0):un(i,r-1)),we(t,Ki(e,3),i,!0)}function Go(t){return(null==t?0:t.length)?or(t,1):[]}function Xo(t){return t&&t.length?t[0]:void 0}var Po=Lr((function(t){var e=pe(t,oi);return e.length&&e[0]===t[0]?mr(e):[]})),No=Lr((function(t){var e=Co(t),n=pe(t,oi);return e===Co(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?mr(n,Ki(e,2)):[]})),Lo=Lr((function(t){var e=Co(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 Co(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Uo=Lr(Bo);function Bo(t,e){return t&&t.length&&e&&e.length?Gr(t,e):t}var Ao=Yi((function(t,e){var n=null==t?0:t.length,r=Hn(t,e);return Xr(t,pe(e,(function(t){return ao(t,n)?+t:t})).sort(di)),r}));function Oo(t){return null==t?t:fn.call(t)}var Yo=Lr((function(t){return qr(or(t,1,Pa,!0))})),Fo=Lr((function(t){var e=Co(t);return Pa(e)&&(e=void 0),qr(or(t,1,Pa,!0),Ki(e,2))})),Jo=Lr((function(t){var e=Co(t);return e="function"==typeof e?e:void 0,qr(or(t,1,Pa,!0),void 0,e)}));function Do(t){if(!t||!t.length)return[];var e=0;return t=le(t,(function(t){if(Pa(t))return e=an(t.length,e),!0})),We(e,(function(e){return pe(t,_e(e))}))}function Ho(t,e){if(!t||!t.length)return[];var n=Do(t);return null==e?n:pe(n,(function(t){return oe(e,void 0,t)}))}var zo=Lr((function(t,e){return Pa(t)?$n(t,e):[]})),Ko=Lr((function(t){return ri(le(t,Pa))})),Qo=Lr((function(t){var e=Co(t);return Pa(e)&&(e=void 0),ri(le(t,Pa),Ki(e,2))})),qo=Lr((function(t){var e=Co(t);return e="function"==typeof e?e:void 0,ri(le(t,Pa),void 0,e)})),$o=Lr(Do);var ta=Lr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Ho(t,n)}));function ea(t){var e=Vn(t);return e.__chain__=!0,e}function na(t,e){return e(t)}var ra=Yi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Hn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof jn&&ao(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Mn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var ia=gi((function(t,e,n){xt.call(t,n)?++t[n]:Dn(t,n,1)}));var oa=Ii(jo),aa=Ii(Eo);function ua(t,e){return(Ea(t)?ue:tr)(t,Ki(e,3))}function ca(t,e){return(Ea(t)?ce:er)(t,Ki(e,3))}var sa=gi((function(t,e,n){xt.call(t,n)?t[n].push(e):Dn(t,n,[e])}));var la=Lr((function(t,e,n){var i=-1,o="function"==typeof e,a=Xa(t)?r(t.length):[];return tr(t,(function(t){a[++i]=o?oe(e,t,n):br(t,e,n)})),a})),fa=gi((function(t,e,n){Dn(t,n,e)}));function ha(t,e){return(Ea(t)?pe:Rr)(t,Ki(e,3))}var pa=gi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var da=Lr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&uo(t,e[0],e[1])?e=[]:n>2&&uo(e[0],e[1],e[2])&&(e=[e[0]]),jr(t,or(e,1),[])})),va=Ke||function(){return Dt.Date.now()};function ya(t,e,n){return e=n?void 0:e,Ci(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ma(t,e){var n;if("function"!=typeof e)throw new bt(o);return t=ru(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ba=Lr((function(t,e,n){var r=1;if(n.length){var i=Ae(n,zi(ba));r|=32}return Ci(t,r,e,n,i)})),ga=Lr((function(t,e,n){var r=3;if(n.length){var i=Ae(n,zi(ga));r|=32}return Ci(e,r,t,n,i)}));function wa(t,e,n){var r,i,a,u,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,u=t.apply(o,n)}function v(t){return l=t,c=wo(m,e),f?d(t):u}function y(t){var n=t-s;return void 0===s||n>=e||n<0||h&&t-l>=a}function m(){var t=va();if(y(t))return b(t);c=wo(m,function(t){var n=e-(t-s);return h?un(n,a-(t-l)):n}(t))}function b(t){return c=void 0,p&&r?d(t):(r=i=void 0,u)}function g(){var t=va(),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)),u}return e=ou(e)||0,Oa(n)&&(f=!!n.leading,a=(h="maxWait"in n)?an(ou(n.maxWait)||0,e):a,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?u:b(va())},g}var ka=Lr((function(t,e){return qn(t,1,e)})),Za=Lr((function(t,e,n){return qn(t,ou(e)||0,n)}));function Sa(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 a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Sa.Cache||Xn),n}function xa(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)}}Sa.Cache=Xn;var _a=ci((function(t,e){var n=(e=1==e.length&&Ea(e[0])?pe(e[0],Te(Ki())):pe(or(e,1),Te(Ki()))).length;return Lr((function(r){for(var i=-1,o=un(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return oe(t,this,r)}))})),Ia=Lr((function(t,e){return Ci(t,32,void 0,e,Ae(e,zi(Ia)))})),Ra=Lr((function(t,e){return Ci(t,64,void 0,e,Ae(e,zi(Ra)))})),Va=Yi((function(t,e){return Ci(t,256,void 0,void 0,void 0,e)}));function Wa(t,e){return t===e||t!=t&&e!=e}var Ta=Gi(dr),Ma=Gi((function(t,e){return t>=e})),ja=gr(function(){return arguments}())?gr:function(t){return Ya(t)&&xt.call(t,"callee")&&!Ht.call(t,"callee")},Ea=r.isArray,Ga=$t?Te($t):function(t){return Ya(t)&&pr(t)==S};function Xa(t){return null!=t&&Aa(t.length)&&!Ua(t)}function Pa(t){return Ya(t)&&Xa(t)}var Na=en||oc,La=te?Te(te):function(t){return Ya(t)&&pr(t)==f};function Ca(t){if(!Ya(t))return!1;var e=pr(t);return e==h||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Da(t)}function Ua(t){if(!Oa(t))return!1;var e=pr(t);return e==p||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ba(t){return"number"==typeof t&&t==ru(t)}function Aa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Oa(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ya(t){return null!=t&&"object"==typeof t}var Fa=ee?Te(ee):function(t){return Ya(t)&&no(t)==v};function Ja(t){return"number"==typeof t||Ya(t)&&pr(t)==y}function Da(t){if(!Ya(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 Ha=ne?Te(ne):function(t){return Ya(t)&&pr(t)==b};var za=re?Te(re):function(t){return Ya(t)&&no(t)==g};function Ka(t){return"string"==typeof t||!Ea(t)&&Ya(t)&&pr(t)==w}function Qa(t){return"symbol"==typeof t||Ya(t)&&pr(t)==k}var qa=ie?Te(ie):function(t){return Ya(t)&&Aa(t.length)&&!!Ut[pr(t)]};var $a=Gi(Ir),tu=Gi((function(t,e){return t<=e}));function eu(t){if(!t)return[];if(Xa(t))return Ka(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?Ue:e==g?Oe:Wu)(t)}function nu(t){return t?(t=ou(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ru(t){var e=nu(t),n=e%1;return e==e?n?e-n:e:0}function iu(t){return t?zn(ru(t),0,4294967295):0}function ou(t){if("number"==typeof t)return t;if(Qa(t))return NaN;if(Oa(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Oa(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(H,"");var n=ot.test(t);return n||ut.test(t)?Yt(t.slice(2),n?2:8):it.test(t)?NaN:+t}function au(t){return bi(t,ku(t))}function uu(t){return null==t?"":Qr(t)}var cu=wi((function(t,e){if(fo(e)||Xa(e))bi(e,wu(e),t);else for(var n in e)xt.call(e,n)&&On(t,n,e[n])})),su=wi((function(t,e){bi(e,ku(e),t)})),lu=wi((function(t,e,n,r){bi(e,ku(e),t,r)})),fu=wi((function(t,e,n,r){bi(e,wu(e),t,r)})),hu=Yi(Hn);var pu=Lr((function(t,e){t=vt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&uo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=ku(o),u=-1,c=a.length;++u<c;){var s=a[u],l=t[s];(void 0===l||Wa(l,kt[s])&&!xt.call(t,s))&&(t[s]=o[s])}return t})),du=Lr((function(t){return t.push(void 0,Bi),oe(Su,void 0,t)}));function vu(t,e,n){var r=null==t?void 0:fr(t,e);return void 0===r?n:r}function yu(t,e){return null!=t&&ro(t,e,yr)}var mu=Wi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),t[e]=n}),Ou(Ju)),bu=Wi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),xt.call(t,e)?t[e].push(n):t[e]=[n]}),Ki),gu=Lr(br);function wu(t){return Xa(t)?Ln(t):xr(t)}function ku(t){return Xa(t)?Ln(t,!0):_r(t)}var Zu=wi((function(t,e,n){Tr(t,e,n)})),Su=wi((function(t,e,n,r){Tr(t,e,n,r)})),xu=Yi((function(t,e){var n={};if(null==t)return n;var r=!1;e=pe(e,(function(e){return e=ui(e,t),r||(r=e.length>1),e})),bi(t,Ji(t),n),r&&(n=Kn(n,7,Ai));for(var i=e.length;i--;)$r(n,e[i]);return n}));var _u=Yi((function(t,e){return null==t?{}:function(t,e){return Er(t,e,(function(e,n){return yu(t,n)}))}(t,e)}));function Iu(t,e){if(null==t)return{};var n=pe(Ji(t),(function(t){return[t]}));return e=Ki(e),Er(t,n,(function(t,n){return e(t,n[0])}))}var Ru=Li(wu),Vu=Li(ku);function Wu(t){return null==t?[]:Me(t,wu(t))}var Tu=xi((function(t,e,n){return e=e.toLowerCase(),t+(n?Mu(e):e)}));function Mu(t){return Cu(uu(t).toLowerCase())}function ju(t){return(t=uu(t))&&t.replace(st,Pe).replace(Et,"")}var Eu=xi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Gu=xi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Xu=Si("toLowerCase");var Pu=xi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Nu=xi((function(t,e,n){return t+(n?" ":"")+Cu(e)}));var Lu=xi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Cu=Si("toUpperCase");function Uu(t,e,n){return t=uu(t),void 0===(e=n?void 0:e)?function(t){return Nt.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Bu=Lr((function(t,e){try{return oe(t,void 0,e)}catch(t){return Ca(t)?t:new ht(t)}})),Au=Yi((function(t,e){return ue(e,(function(e){e=Io(e),Dn(t,e,ba(t[e],t))})),t}));function Ou(t){return function(){return t}}var Yu=Ri(),Fu=Ri(!0);function Ju(t){return t}function Du(t){return Sr("function"==typeof t?t:Kn(t,1))}var Hu=Lr((function(t,e){return function(n){return br(n,t,e)}})),zu=Lr((function(t,e){return function(n){return br(t,n,e)}}));function Ku(t,e,n){var r=wu(e),i=lr(e,r);null!=n||Oa(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=lr(e,wu(e)));var o=!(Oa(n)&&"chain"in n&&!n.chain),a=Ua(t);return ue(i,(function(n){var r=e[n];t[n]=r,a&&(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 Qu(){}var qu=Mi(pe),$u=Mi(se),tc=Mi(me);function ec(t){return co(t)?_e(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 ac=Ti((function(t,e){return t+e}),0),uc=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=ru(t),function(){if(--t<1)return e.apply(this,arguments)}},Vn.ary=ya,Vn.assign=cu,Vn.assignIn=su,Vn.assignInWith=lu,Vn.assignWith=fu,Vn.at=hu,Vn.before=ma,Vn.bind=ba,Vn.bindAll=Au,Vn.bindKey=ga,Vn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ea(t)?t:[t]},Vn.chain=ea,Vn.chunk=function(t,e,n){e=(n?uo(t,e,n):void 0===e)?1:an(ru(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,u=r(qe(i/e));o<i;)u[a++]=Fr(t,o,o+=e);return u},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(Ea(n)?mi(n):[n],or(e,1))},Vn.cond=function(t){var e=null==t?0:t.length,n=Ki();return t=e?pe(t,(function(t){if("function"!=typeof t[1])throw new bt(o);return[n(t[0]),t[1]]})):[],Lr((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=wu(t);return function(n){return Qn(n,t,e)}}(Kn(t,1))},Vn.constant=Ou,Vn.countBy=ia,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=Ci(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=Ci(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=wa,Vn.defaults=pu,Vn.defaultsDeep=du,Vn.defer=ka,Vn.delay=Za,Vn.difference=Wo,Vn.differenceBy=To,Vn.differenceWith=Mo,Vn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Fr(t,(e=n||void 0===e?1:ru(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:ru(e)))<0?0:e):[]},Vn.dropRightWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3),!0,!0):[]},Vn.dropWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3),!0):[]},Vn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&uo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ru(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ru(r))<0&&(r+=i),r=n>r?0:iu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Vn.filter=function(t,e){return(Ea(t)?le:ir)(t,Ki(e,3))},Vn.flatMap=function(t,e){return or(ha(t,e),1)},Vn.flatMapDeep=function(t,e){return or(ha(t,e),1/0)},Vn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ru(n),or(ha(t,e),n)},Vn.flatten=Go,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:ru(e)):[]},Vn.flip=function(t){return Ci(t,512)},Vn.flow=Yu,Vn.flowRight=Fu,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,wu(t))},Vn.functionsIn=function(t){return null==t?[]:lr(t,ku(t))},Vn.groupBy=sa,Vn.initial=function(t){return(null==t?0:t.length)?Fr(t,0,-1):[]},Vn.intersection=Po,Vn.intersectionBy=No,Vn.intersectionWith=Lo,Vn.invert=mu,Vn.invertBy=bu,Vn.invokeMap=la,Vn.iteratee=Du,Vn.keyBy=fa,Vn.keys=wu,Vn.keysIn=ku,Vn.map=ha,Vn.mapKeys=function(t,e){var n={};return e=Ki(e,3),cr(t,(function(t,r,i){Dn(n,e(t,r,i),t)})),n},Vn.mapValues=function(t,e){var n={};return e=Ki(e,3),cr(t,(function(t,r,i){Dn(n,r,e(t,r,i))})),n},Vn.matches=function(t){return Vr(Kn(t,1))},Vn.matchesProperty=function(t,e){return Wr(t,Kn(e,1))},Vn.memoize=Sa,Vn.merge=Zu,Vn.mergeWith=Su,Vn.method=Hu,Vn.methodOf=zu,Vn.mixin=Ku,Vn.negate=xa,Vn.nthArg=function(t){return t=ru(t),Lr((function(e){return Mr(e,t)}))},Vn.omit=xu,Vn.omitBy=function(t,e){return Iu(t,xa(Ki(e)))},Vn.once=function(t){return ma(2,t)},Vn.orderBy=function(t,e,n,r){return null==t?[]:(Ea(e)||(e=null==e?[]:[e]),Ea(n=r?void 0:n)||(n=null==n?[]:[n]),jr(t,e,n))},Vn.over=qu,Vn.overArgs=_a,Vn.overEvery=$u,Vn.overSome=tc,Vn.partial=Ia,Vn.partialRight=Ra,Vn.partition=pa,Vn.pick=_u,Vn.pickBy=Iu,Vn.property=ec,Vn.propertyOf=function(t){return function(e){return null==t?void 0:fr(t,e)}},Vn.pull=Uo,Vn.pullAll=Bo,Vn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,Ki(n,2)):t},Vn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,void 0,n):t},Vn.pullAt=Ao,Vn.range=nc,Vn.rangeRight=rc,Vn.rearg=Va,Vn.reject=function(t,e){return(Ea(t)?le:ir)(t,xa(Ki(e,3)))},Vn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Ki(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Xr(t,i),n},Vn.rest=function(t,e){if("function"!=typeof t)throw new bt(o);return Lr(t,e=void 0===e?e:ru(e))},Vn.reverse=Oo,Vn.sampleSize=function(t,e,n){return e=(n?uo(t,e,n):void 0===e)?1:ru(e),(Ea(t)?Un:Ur)(t,e)},Vn.set=function(t,e,n){return null==t?t:Br(t,e,n)},Vn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Br(t,e,n,r)},Vn.shuffle=function(t){return(Ea(t)?Bn:Yr)(t)},Vn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&uo(t,e,n)?(e=0,n=r):(e=null==e?0:ru(e),n=void 0===n?r:ru(n)),Fr(t,e,n)):[]},Vn.sortBy=da,Vn.sortedUniq=function(t){return t&&t.length?zr(t):[]},Vn.sortedUniqBy=function(t,e){return t&&t.length?zr(t,Ki(e,2)):[]},Vn.split=function(t,e,n){return n&&"number"!=typeof n&&uo(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=uu(t))&&("string"==typeof e||null!=e&&!Ha(e))&&!(e=Qr(e))&&Ce(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:an(ru(e),0),Lr((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:ru(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:ru(e)))<0?0:e,r):[]},Vn.takeRightWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3),!1,!0):[]},Vn.takeWhile=function(t,e){return t&&t.length?ei(t,Ki(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 Oa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wa(t,e,{leading:r,maxWait:e,trailing:i})},Vn.thru=na,Vn.toArray=eu,Vn.toPairs=Ru,Vn.toPairsIn=Vu,Vn.toPath=function(t){return Ea(t)?pe(t,Io):Qa(t)?[t]:mi(_o(uu(t)))},Vn.toPlainObject=au,Vn.transform=function(t,e,n){var r=Ea(t),i=r||Na(t)||qa(t);if(e=Ki(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Oa(t)&&Ua(o)?Wn(Ft(t)):{}}return(i?ue:cr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Vn.unary=function(t){return ya(t,1)},Vn.union=Yo,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,Ki(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=Do,Vn.unzipWith=Ho,Vn.update=function(t,e,n){return null==t?t:ti(t,e,ai(n))},Vn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ti(t,e,ai(n),r)},Vn.values=Wu,Vn.valuesIn=function(t){return null==t?[]:Me(t,ku(t))},Vn.without=zo,Vn.words=Uu,Vn.wrap=function(t,e){return Ia(ai(e),t)},Vn.xor=Ko,Vn.xorBy=Qo,Vn.xorWith=qo,Vn.zip=$o,Vn.zipObject=function(t,e){return ii(t||[],e||[],On)},Vn.zipObjectDeep=function(t,e){return ii(t||[],e||[],Br)},Vn.zipWith=ta,Vn.entries=Ru,Vn.entriesIn=Vu,Vn.extend=su,Vn.extendWith=lu,Ku(Vn,Vn),Vn.add=ac,Vn.attempt=Bu,Vn.camelCase=Tu,Vn.capitalize=Mu,Vn.ceil=uc,Vn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ou(n))==n?n:0),void 0!==e&&(e=(e=ou(e))==e?e:0),zn(ou(t),e,n)},Vn.clone=function(t){return Kn(t,4)},Vn.cloneDeep=function(t){return Kn(t,5)},Vn.cloneDeepWith=function(t,e){return Kn(t,5,e="function"==typeof e?e:void 0)},Vn.cloneWith=function(t,e){return Kn(t,4,e="function"==typeof e?e:void 0)},Vn.conformsTo=function(t,e){return null==e||Qn(t,e,wu(e))},Vn.deburr=ju,Vn.defaultTo=function(t,e){return null==t||t!=t?e:t},Vn.divide=cc,Vn.endsWith=function(t,e,n){t=uu(t),e=Qr(e);var r=t.length,i=n=void 0===n?r:zn(ru(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Vn.eq=Wa,Vn.escape=function(t){return(t=uu(t))&&C.test(t)?t.replace(N,Ne):t},Vn.escapeRegExp=function(t){return(t=uu(t))&&D.test(t)?t.replace(J,"\\$&"):t},Vn.every=function(t,e,n){var r=Ea(t)?se:nr;return n&&uo(t,e,n)&&(e=void 0),r(t,Ki(e,3))},Vn.find=oa,Vn.findIndex=jo,Vn.findKey=function(t,e){return ge(t,Ki(e,3),cr)},Vn.findLast=aa,Vn.findLastIndex=Eo,Vn.findLastKey=function(t,e){return ge(t,Ki(e,3),sr)},Vn.floor=sc,Vn.forEach=ua,Vn.forEachRight=ca,Vn.forIn=function(t,e){return null==t?t:ar(t,Ki(e,3),ku)},Vn.forInRight=function(t,e){return null==t?t:ur(t,Ki(e,3),ku)},Vn.forOwn=function(t,e){return t&&cr(t,Ki(e,3))},Vn.forOwnRight=function(t,e){return t&&sr(t,Ki(e,3))},Vn.get=vu,Vn.gt=Ta,Vn.gte=Ma,Vn.has=function(t,e){return null!=t&&ro(t,e,vr)},Vn.hasIn=yu,Vn.head=Xo,Vn.identity=Ju,Vn.includes=function(t,e,n,r){t=Xa(t)?t:Wu(t),n=n&&!r?ru(n):0;var i=t.length;return n<0&&(n=an(i+n,0)),Ka(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ke(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:ru(n);return i<0&&(i=an(r+i,0)),ke(t,e,i)},Vn.inRange=function(t,e,n){return e=nu(e),void 0===n?(n=e,e=0):n=nu(n),function(t,e,n){return t>=un(e,n)&&t<an(e,n)}(t=ou(t),e,n)},Vn.invoke=gu,Vn.isArguments=ja,Vn.isArray=Ea,Vn.isArrayBuffer=Ga,Vn.isArrayLike=Xa,Vn.isArrayLikeObject=Pa,Vn.isBoolean=function(t){return!0===t||!1===t||Ya(t)&&pr(t)==l},Vn.isBuffer=Na,Vn.isDate=La,Vn.isElement=function(t){return Ya(t)&&1===t.nodeType&&!Da(t)},Vn.isEmpty=function(t){if(null==t)return!0;if(Xa(t)&&(Ea(t)||"string"==typeof t||"function"==typeof t.splice||Na(t)||qa(t)||ja(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=Ca,Vn.isFinite=function(t){return"number"==typeof t&&nn(t)},Vn.isFunction=Ua,Vn.isInteger=Ba,Vn.isLength=Aa,Vn.isMap=Fa,Vn.isMatch=function(t,e){return t===e||kr(t,e,qi(e))},Vn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,kr(t,e,qi(e),n)},Vn.isNaN=function(t){return Ja(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 Zr(t)},Vn.isNil=function(t){return null==t},Vn.isNull=function(t){return null===t},Vn.isNumber=Ja,Vn.isObject=Oa,Vn.isObjectLike=Ya,Vn.isPlainObject=Da,Vn.isRegExp=Ha,Vn.isSafeInteger=function(t){return Ba(t)&&t>=-9007199254740991&&t<=9007199254740991},Vn.isSet=za,Vn.isString=Ka,Vn.isSymbol=Qa,Vn.isTypedArray=qa,Vn.isUndefined=function(t){return void 0===t},Vn.isWeakMap=function(t){return Ya(t)&&no(t)==Z},Vn.isWeakSet=function(t){return Ya(t)&&"[object WeakSet]"==pr(t)},Vn.join=function(t,e){return null==t?"":rn.call(t,e)},Vn.kebabCase=Eu,Vn.last=Co,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=ru(n))<0?an(r+i,0):un(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=Gu,Vn.lowerFirst=Xu,Vn.lt=$a,Vn.lte=tu,Vn.max=function(t){return t&&t.length?rr(t,Ju,dr):void 0},Vn.maxBy=function(t,e){return t&&t.length?rr(t,Ki(e,2),dr):void 0},Vn.mean=function(t){return xe(t,Ju)},Vn.meanBy=function(t,e){return xe(t,Ki(e,2))},Vn.min=function(t){return t&&t.length?rr(t,Ju,Ir):void 0},Vn.minBy=function(t,e){return t&&t.length?rr(t,Ki(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?Mr(t,ru(e)):void 0},Vn.noConflict=function(){return Dt._===this&&(Dt._=Wt),this},Vn.noop=Qu,Vn.now=va,Vn.pad=function(t,e,n){t=uu(t);var r=(e=ru(e))?Fe(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ji($e(i),n)+t+ji(qe(i),n)},Vn.padEnd=function(t,e,n){t=uu(t);var r=(e=ru(e))?Fe(t):0;return e&&r<e?t+ji(e-r,n):t},Vn.padStart=function(t,e,n){t=uu(t);var r=(e=ru(e))?Fe(t):0;return e&&r<e?ji(e-r,n)+t:t},Vn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),sn(uu(t).replace(z,""),e||0)},Vn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&uo(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=nu(t),void 0===e?(e=t,t=0):e=nu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=ln();return un(t+i*(e-t+Ot("1e-"+((i+"").length-1))),e)}return Pr(t,e)},Vn.reduce=function(t,e,n){var r=Ea(t)?ve:Re,i=arguments.length<3;return r(t,Ki(e,4),n,i,tr)},Vn.reduceRight=function(t,e,n){var r=Ea(t)?ye:Re,i=arguments.length<3;return r(t,Ki(e,4),n,i,er)},Vn.repeat=function(t,e,n){return e=(n?uo(t,e,n):void 0===e)?1:ru(e),Nr(uu(t),e)},Vn.replace=function(){var t=arguments,e=uu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Vn.result=function(t,e,n){var r=-1,i=(e=ui(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=Ua(o)?o.call(t):o}return t},Vn.round=hc,Vn.runInContext=t,Vn.sample=function(t){return(Ea(t)?Cn:Cr)(t)},Vn.size=function(t){if(null==t)return 0;if(Xa(t))return Ka(t)?Fe(t):t.length;var e=no(t);return e==v||e==g?t.size:xr(t).length},Vn.snakeCase=Pu,Vn.some=function(t,e,n){var r=Ea(t)?me:Jr;return n&&uo(t,e,n)&&(e=void 0),r(t,Ki(e,3))},Vn.sortedIndex=function(t,e){return Dr(t,e)},Vn.sortedIndexBy=function(t,e,n){return Hr(t,e,Ki(n,2))},Vn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Dr(t,e);if(r<n&&Wa(t[r],e))return r}return-1},Vn.sortedLastIndex=function(t,e){return Dr(t,e,!0)},Vn.sortedLastIndexBy=function(t,e,n){return Hr(t,e,Ki(n,2),!0)},Vn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Dr(t,e,!0)-1;if(Wa(t[n],e))return n}return-1},Vn.startCase=Nu,Vn.startsWith=function(t,e,n){return t=uu(t),n=null==n?0:zn(ru(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,Ju):0},Vn.sumBy=function(t,e){return t&&t.length?Ve(t,Ki(e,2)):0},Vn.template=function(t,e,n){var r=Vn.templateSettings;n&&uo(t,e,n)&&(e=void 0),t=uu(t),e=lu({},e,r,Ui);var i,o,a=lu({},e.imports,r.imports,Ui),u=wu(a),c=Me(a,u),s=0,l=e.interpolate||lt,f="__p += '",h=yt((e.escape||lt).source+"|"+l.source+"|"+(l===A?nt:lt).source+"|"+(e.evaluate||lt).source+"|$","g"),p="//# sourceURL="+(xt.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Ct+"]")+"\n";t.replace(h,(function(e,n,r,a,u,c){return r||(r=a),f+=t.slice(s,c).replace(ft,Le),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),u&&(o=!0,f+="';\n"+u+";\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(G,"$1").replace(X,"$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=Bu((function(){return pt(u,p+"return "+f).apply(void 0,c)}));if(v.source=f,Ca(v))throw v;return v},Vn.times=function(t,e){if((t=ru(t))<1||t>9007199254740991)return[];var n=4294967295,r=un(t,4294967295);t-=4294967295;for(var i=We(r,e=Ki(e));++n<t;)e(n);return i},Vn.toFinite=nu,Vn.toInteger=ru,Vn.toLength=iu,Vn.toLower=function(t){return uu(t).toLowerCase()},Vn.toNumber=ou,Vn.toSafeInteger=function(t){return t?zn(ru(t),-9007199254740991,9007199254740991):0===t?t:0},Vn.toString=uu,Vn.toUpper=function(t){return uu(t).toUpperCase()},Vn.trim=function(t,e,n){if((t=uu(t))&&(n||void 0===e))return t.replace(H,"");if(!t||!(e=Qr(e)))return t;var r=Je(t),i=Je(e);return si(r,Ee(r,i),Ge(r,i)+1).join("")},Vn.trimEnd=function(t,e,n){if((t=uu(t))&&(n||void 0===e))return t.replace(K,"");if(!t||!(e=Qr(e)))return t;var r=Je(t);return si(r,0,Ge(r,Je(e))+1).join("")},Vn.trimStart=function(t,e,n){if((t=uu(t))&&(n||void 0===e))return t.replace(z,"");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(Oa(e)){var i="separator"in e?e.separator:i;n="length"in e?ru(e.length):n,r="omission"in e?Qr(e.omission):r}var o=(t=uu(t)).length;if(Ce(t)){var a=Je(t);o=a.length}if(n>=o)return t;var u=n-Fe(r);if(u<1)return r;var c=a?si(a,0,u).join(""):t.slice(0,u);if(void 0===i)return c+r;if(a&&(u+=c.length-u),Ha(i)){if(t.slice(u).search(i)){var s,l=c;for(i.global||(i=yt(i.source,uu(rt.exec(i))+"g")),i.lastIndex=0;s=i.exec(l);)var f=s.index;c=c.slice(0,void 0===f?u:f)}}else if(t.indexOf(Qr(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Vn.unescape=function(t){return(t=uu(t))&&L.test(t)?t.replace(P,De):t},Vn.uniqueId=function(t){var e=++_t;return uu(t)+e},Vn.upperCase=Lu,Vn.upperFirst=Cu,Vn.each=ua,Vn.eachRight=ca,Vn.first=Xo,Ku(Vn,(lc={},cr(Vn,(function(t,e){xt.call(Vn.prototype,e)||(lc[e]=t)})),lc),{chain:!1}),Vn.VERSION="4.17.15",ue(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Vn[t].placeholder=Vn})),ue(["drop","take"],(function(t,e){jn.prototype[t]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!e?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=un(n,r.__takeCount__):r.__views__.push({size:un(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ue(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ki(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ue(["head","last"],(function(t,e){var n="take"+(e?"Right":"");jn.prototype[t]=function(){return this[n](1).value()[0]}})),ue(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");jn.prototype[t]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(Ju)},jn.prototype.find=function(t){return this.filter(t).head()},jn.prototype.findLast=function(t){return this.reverse().find(t)},jn.prototype.invokeMap=Lr((function(t,e){return"function"==typeof t?new jn(this):this.map((function(n){return br(n,t,e)}))})),jn.prototype.reject=function(t){return this.filter(xa(Ki(t)))},jn.prototype.slice=function(t,e){t=ru(t);var n=this;return n.__filtered__&&(t>0||e<0)?new jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ru(e))<0?n.dropRight(-e):n.take(e-t)),n)},jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},jn.prototype.toArray=function(){return this.take(4294967295)},cr(jn.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__,a=r?[1]:arguments,u=e instanceof jn,c=a[0],s=u||Ea(e),l=function(t){var e=i.apply(Vn,de([t],a));return r&&f?e[0]:e};s&&n&&"function"==typeof c&&1!=c.length&&(u=s=!1);var f=this.__chain__,h=!!this.__actions__.length,p=o&&!f,d=u&&!h;if(!o&&s){e=d?e:new jn(this);var v=t.apply(e,a);return v.__actions__.push({func:na,args:[l],thisArg:void 0}),new Mn(v,f)}return p&&d?t.apply(this,a):(v=this.thru(l),p?r?v.value()[0]:v.value():v)})})),ue(["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(Ea(i)?i:[],t)}return this[n]((function(n){return e.apply(Ea(n)?n:[],t)}))}})),cr(jn.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}],jn.prototype.clone=function(){var t=new jn(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},jn.prototype.reverse=function(){if(this.__filtered__){var t=new jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ea(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],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=un(e,t+a);break;case"takeRight":t=an(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,h=0,p=un(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=ra,Vn.prototype.chain=function(){return ea(this)},Vn.prototype.commit=function(){return new Mn(this.value(),this.__chain__)},Vn.prototype.next=function(){void 0===this.__values__&&(this.__values__=eu(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 jn){var e=t;return this.__actions__.length&&(e=new jn(this)),(e=e.reverse()).__actions__.push({func:na,args:[Oo],thisArg:void 0}),new Mn(e,this.__chain__)}return this.thru(Oo)},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}();Dt._=He,void 0===(i=function(){return He}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(21),n(151)(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,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;try{u()}catch(e){t.error("Delayed action failed: ",e)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}}])&&n(r.prototype,i),o&&n(r,o),e}())}).call(this,n(7))},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(24);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(58),i=n(38),o=n(17),a=n(34),u=n(15),c=n(118),s=Object.getOwnPropertyDescriptor;e.f=n(10)?s:function(t,e){if(t=o(t),e=a(e,!0),c)try{return s(t,e)}catch(t){}if(u(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(0),i=n(9),o=n(3);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){var r=n(23),i=n(57),o=n(12),a=n(8),u=n(134);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||u;return function(e,u,d){for(var v,y,m=o(e),b=i(m),g=r(u,d,3),w=a(b.length),k=0,Z=n?p(e,w):c?p(e,0):void 0;w>k;k++)if((h||k in b)&&(y=g(v=b[k],k,m),t))if(n)Z[k]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return k;case 2:Z.push(v)}else if(l)return!1;return f?-1:s||l?l:Z}}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(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:a}catch(t){r=a}}();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=u(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===a||!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||u(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(40),i=n(2),o=n(3),a=n(0),u=n(76),c=n(108),s=n(23),l=n(53),f=n(38),h=n(16),p=n(54),d=n(25),v=n(8),y=n(145),m=n(42),b=n(34),g=n(15),w=n(59),k=n(5),Z=n(12),S=n(100),x=n(43),_=n(45),I=n(44).f,R=n(102),V=n(39),W=n(6),T=n(28),M=n(66),j=n(60),E=n(104),G=n(51),X=n(69),P=n(52),N=n(103),L=n(136),C=n(11),U=n(26),B=C.f,A=U.f,O=i.RangeError,Y=i.TypeError,F=i.Uint8Array,J=Array.prototype,D=c.ArrayBuffer,H=c.DataView,z=T(0),K=T(2),Q=T(3),q=T(4),$=T(5),tt=T(6),et=M(!0),nt=M(!1),rt=E.values,it=E.keys,ot=E.entries,at=J.lastIndexOf,ut=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=u.CONSTR,gt=u.TYPED,wt=u.VIEW,kt=T(1,(function(t,e){return It(j(t,t[mt]),e)})),Zt=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 O("Wrong offset!");return n},_t=function(t){if(k(t)&&gt in t)return t;throw Y(t+" is not a typed array!")},It=function(t,e){if(!(k(t)&&yt in t))throw Y("It is not a typed array constructor!");return new t(e)},Rt=function(t,e){return Vt(j(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){B(t,e,{get:function(){return this._d[n]}})},Tt=function(t){var e,n,r,i,o,a,u=Z(t),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=R(u);if(null!=h&&!S(h)){for(a=h.call(u),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);u=r}for(f&&c>2&&(l=s(l,arguments[2],2)),e=0,n=v(u.length),i=It(this,n);n>e;e++)i[e]=f?l(u[e],e):u[e];return i},Mt=function(){for(var t=0,e=arguments.length,n=It(this,e);e>t;)n[t]=arguments[t++];return n},jt=!!F&&o((function(){pt.call(new F(1))})),Et=function(){return pt.apply(jt?ft.call(_t(this)):_t(this),arguments)},Gt={copyWithin:function(t,e){return L.call(_t(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return q(_t(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(_t(this),arguments)},filter:function(t){return Rt(this,K(_t(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(_t(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(_t(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){z(_t(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(_t(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(_t(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(_t(this),arguments)},lastIndexOf:function(t){return at.apply(_t(this),arguments)},map:function(t){return kt(_t(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ut.apply(_t(this),arguments)},reduceRight:function(t){return ct.apply(_t(this),arguments)},reverse:function(){for(var t,e=_t(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(_t(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return lt.call(_t(this),t)},subarray:function(t,e){var n=_t(this),r=n.length,i=m(t,r);return new(j(n,n[mt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?r:m(e,r))-i))}},Xt=function(t,e){return Rt(this,ft.call(_t(this),t,e))},Pt=function(t){_t(this);var e=xt(arguments[1],1),n=this.length,r=Z(t),i=v(r.length),o=0;if(i+e>n)throw O("Wrong length!");for(;o<i;)this[e+o]=r[o++]},Nt={entries:function(){return ot.call(_t(this))},keys:function(){return it.call(_t(this))},values:function(){return rt.call(_t(this))}},Lt=function(t,e){return k(t)&&t[gt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ct=function(t,e){return Lt(t,e=b(e,!0))?f(2,t[e]):A(t,e)},Ut=function(t,e,n){return!(Lt(t,e=b(e,!0))&&k(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?B(t,e,n):(t[e]=n.value,t)};bt||(U.f=Ct,C.f=Ut),a(a.S+a.F*!bt,"Object",{getOwnPropertyDescriptor:Ct,defineProperty:Ut}),o((function(){ht.call({})}))&&(ht=pt=function(){return st.call(this)});var Bt=p({},Gt);p(Bt,Nt),h(Bt,dt,Nt.values),p(Bt,{slice:Xt,set:Pt,constructor:function(){},toString:ht,toLocaleString:Et}),Wt(Bt,"buffer","b"),Wt(Bt,"byteOffset","o"),Wt(Bt,"byteLength","l"),Wt(Bt,"length","e"),B(Bt,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&&_(d),g=!d||!u.ABV,Z={},S=d&&d.prototype,R=function(t,n){B(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[f](n*e+r.o,Zt)}(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,Zt)}(this,n,t)},enumerable:!0})};g?(d=n((function(t,n,r,i){l(t,d,s,"_d");var o,a,u,c,f=0,p=0;if(k(n)){if(!(n instanceof D||"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 O("Wrong length!");if((a=m-p)<0)throw O("Wrong length!")}else if((a=v(i)*e)+p>m)throw O("Wrong length!");u=a/e}else u=y(n),o=new D(a=u*e);for(h(t,"_d",{b:o,o:p,l:a,e:u,v:new H(o)});f<u;)R(t,f++)})),S=d.prototype=x(Bt),h(S,"constructor",d)):o((function(){d(1)}))&&o((function(){new d(-1)}))&&X((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),k(n)?n instanceof D||"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))})),z(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)||B(S,vt,{get:function(){return s}}),Z[s]=d,a(a.G+a.W+a.F*(d!=m),Z),a(a.S,s,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*o((function(){m.of.call(d,1)})),s,{from:Tt,of:Mt}),"BYTES_PER_ELEMENT"in S||h(S,"BYTES_PER_ELEMENT",e),a(a.P,s,Gt),P(s),a(a.P+a.F*St,s,{set:Pt}),a(a.P+a.F*!W,s,Nt),r||S.toString==ht||(S.toString=ht),a(a.P+a.F*o((function(){new d(1).slice()})),s,{slice:Xt}),a(a.P+a.F*(o((function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()}))||!o((function(){S.toLocaleString.call([1,2])}))),s,{toLocaleString:Et}),G[s]=W?V:T,r||W||h(S,dt,T)}}else t.exports=function(){}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n(80);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,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0)if(o.value.templateVariation===t.properties.template_variation)return!0}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.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(39)("meta"),i=n(5),o=n(15),a=n(11).f,u=0,c=Object.isExtensible||function(){return!0},s=!n(3)((function(){return c(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++u,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(164),i=n(33),o=n(83),a=n(19),u=n(20);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,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.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 a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(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&&u.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(a.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&&u.a.run((function(t){return n.emit("object.updated",r)})),i&&u.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&&(u.a.run((function(t){return i.emit("object.updated",n)})),u.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&&u.a.run((function(t){return e.emit("object.updated",r)}))}}])&&f(r.prototype,s),y&&f(r,y),n}(r.a)}).call(this,n(7))},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(120),i=n(87);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(25),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(121),o=n(87),a=n(86)("IE_PROTO"),u=function(){},c=function(){var t,e=n(84)("iframe"),r=o.length;for(e.style.display="none",n(88).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?(u.prototype=r(t),n=new u,u.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(120),i=n(87).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(86)("IE_PROTO"),a=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?a: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(78),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=f;var o=n(61);o.inherits=n(55);var a=n(155),u=n(115);o.inherits(f,a);for(var c=i(u.prototype),s=0;s<c.length;s++){var l=c[s];f.prototype[l]||(f.prototype[l]=u.prototype[l])}function f(t){if(!(this instanceof f))return new f(t);a.call(this,t),u.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(31),o=n(3),a=n(90),u="["+a+"]",c=RegExp("^"+u+u+"*"),s=RegExp(u+u+"*$"),l=function(t,e,n){var i={},u=o((function(){return!!a[t]()||"​…"!="​…"[t]()})),c=i[t]=u?e(f):a[t];n&&(i[n]=c),r(r.P+r.F*u,"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),a=n(6)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{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(392);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(30);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(30),i=n(6)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;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"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(4),i=n(24),o=n(6)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[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(77).Buffer)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(33);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=[],a=[],u=[],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 k=g.value;a.push({template:k.template,id:k.id,meta:k.meta,properties:k.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var Z=!0,S=!1,x=void 0;try{for(var _,I=function(){var t=_.value,e=t["vAtom::vAtomType"].template,n=new r.a(t,a.filter((function(t){return t.template===e})),o.filter((function(t){return t.template===e})));u.push(n)},R=i[Symbol.iterator]();!(Z=(_=R.next()).done);Z=!0)I()}catch(t){S=!0,x=t}finally{try{Z||null==R.return||R.return()}finally{if(S)throw x}}return u}))}},{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,a=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}})),u=r[n];n<i;u=r[++n])y(u)||!k(u)?a+=" "+u:a+=" "+c(u);return a},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 a,u={};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 a=Object.keys(n),u=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.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(Z(n))return t.stylize(Date.prototype.toString.call(n),"date");if(S(n))return h(n)}var s,l="",k=!1,_=["{","}"];(d(n)&&(k=!0,_=["[","]"]),x(n))&&(l=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(l=" "+RegExp.prototype.toString.call(n)),Z(n)&&(l=" "+Date.prototype.toUTCString.call(n)),S(n)&&(l=" "+h(n)),0!==a.length||k&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),s=k?function(t,e,n,r,i){for(var o=[],a=0,u=e.length;a<u;++a)W(e,String(a))?o.push(p(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(t,e,n,r,i,!0))})),o}(t,n,r,u,a):a.map((function(e){return p(t,n,r,u,e,k)})),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,_)):_[0]+l+_[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,o){var a,u,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),W(r,i)||(a="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=y(n)?f(t,c.value,null):f(t,c.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}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 k(t)&&"[object RegExp]"===_(t)}function k(t){return"object"==typeof t&&null!==t}function Z(t){return k(t)&&"[object Date]"===_(t)}function S(t){return k(t)&&("[object Error]"===_(t)||t instanceof Error)}function x(t){return"function"==typeof t}function _(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(a)&&(a=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!u[n])if(new RegExp("\\b"+n+"\\b","i").test(a)){var i=t.pid;u[n]=function(){var t=e.format.apply(e,arguments);r.error("%s %d: %s",n,i,t)}}else u[n]=function(){};return u[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=k,e.isDate=Z,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(183);var R=["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(),R[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(184),e._extend=function(t,e){if(!e||!k(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 M(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,a=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(M,e,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,i(e)),n}}).call(this,n(29),n(7))},function(t,e,n){var r=n(9),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(40)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(17),i=n(8),o=n(42);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=i(c.length),l=o(a,s);if(t&&n!=n){for(;s>l;)if((u=c[l++])!=u)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(30);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],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},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(59),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(138);var r=n(13),i=n(16),o=n(3),a=n(31),u=n(6),c=n(105),s=u("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=u(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(a,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(23),i=n(133),o=n(100),a=n(4),u=n(8),c=n(102),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=u(t.length);p>g;g++)if((y=e?b(a(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),a=n(54),u=n(35),c=n(73),s=n(53),l=n(5),f=n(3),h=n(69),p=n(49),d=n(91);t.exports=function(t,e,n,v,y,m){var b=r[t],g=b,w=y?"set":"add",k=g&&g.prototype,Z={},S=function(t){var e=k[t];o(k,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||k.forEach&&!f((function(){(new g).entries().next()})))){var x=new g,_=x[w](m?{}:-0,1)!=x,I=f((function(){x.has(1)})),R=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)}));R||((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=k,k.constructor=g),(I||V)&&(S("delete"),S("has"),y&&S("get")),(V||_)&&S(w),m&&k.clear&&delete k.clear}else g=v.getConstructor(e,t,y,w),a(g.prototype,n),u.NEED=!0;return p(g,t),Z[t]=g,i(i.G+i.W+i.F*(g!=b),Z),m||v.setStrong(g,t,y),g}},function(t,e,n){for(var r,i=n(2),o=n(16),a=n(39),u=a("typed_array"),c=a("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,u,!0),o(r.prototype,c,!0)):l=!1;t.exports={ABV:s,CONSTR:l,TYPED:u,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(375),i=n(376),o=n(152);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(a()<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=u(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=u(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?u(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=u(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=u(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().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 U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return U(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 R(this,e,n);case"latin1":case"binary":return V(this,e,n);case"base64":return _(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,a=1,u=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;a=2,u/=2,c/=2,n/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<u;o++)if(s(t,o)===s(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+c>u&&(n=u-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 a=0;a<r;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[n+a]=u}return a}function w(t,e,n,r){return A(U(e,t.length-n),t,n,r)}function k(t,e,n,r){return A(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function Z(t,e,n,r){return k(t,e,n,r)}function S(t,e,n,r){return A(B(e),t,n,r)}function x(t,e,n,r){return A(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function _(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,a,u,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],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&s)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(c=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>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=a(),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?u(t,e):void 0!==n?"string"==typeof r?u(t,e).fill(n,r):u(t,e).fill(n):u(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 a=t[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.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),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),s=this.slice(r,i),l=t.slice(e,n),f=0;f<u;++f)if(s[f]!==l[f]){o=s[f],a=l[f];break}return o<a?-1:a<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 k(this,t,e,n);case"latin1":case"binary":return Z(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 R(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+=C(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 M(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 j(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 G(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 X(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||X(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function N(t,e,n,r,o){return o||X(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||M(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||M(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||M(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||M(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||M(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||M(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||M(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||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||M(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||M(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||M(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||M(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||M(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||M(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)||j(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)||j(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||j(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||j(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||j(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||j(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):G(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||j(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):G(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);j(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&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);j(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||j(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||j(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||j(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||j(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):G(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||j(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):G(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 a=c.isBuffer(t)?t:U(new c(t,r).toString()),u=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function C(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+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 B(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function A(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(21))},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,a,u=arguments.length;switch(u){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(u-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,n(29))},function(t,e,n){(function(e){var r=n(160).logify_input,i=n(162).titleFormat,o=n(161),a={is_warning:"is_warning",is_usage:"is_usage",is_internal:"is_internal",details:"details"};function u(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(!a[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 u=[];return u=u.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()||(u=u.concat(function(t,e,n){if(t[a.is_warning]&&e.length>0)return[];return[i("Stack Trace"),n.join("\n")]}(n,e,o))).push("\n"),u=u.concat(function(t,e,n){let o=[];var u=(n[a.is_warning]?"Warning":n[a.is_usage]&&"Wrong Usage")||n[a.is_internal]&&"Internal Error"||"Assertion Fail";o.push(i(u)),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[a.is_warning];if(o()){if(i){var u=new Error;throw u.stack=t.join("\n"),u}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=u([].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(7))},function(t,e,n){"use strict";(function(e){var r=n(388),i=n(389),o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,u=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(u,"")}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={},a=typeof(t=t||r);if("blob:"===t.protocol)i=new p(unescape(t.pathname),{});else if("string"===a)for(n in i=new p(t,{}),l)delete i[n];else if("object"===a){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=a.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,a,u,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=!(a=h(t||"")).protocol&&!a.slashes,b.slashes=a.slashes||o&&e.slashes,b.protocol=a.protocol||e.protocol||"",t=a.rest,a.slashes||(y[3]=[/(.*)/,"pathname"]);g<y.length;g++)"function"!=typeof(l=y[g])?(u=l[0],v=l[1],u!=u?b[v]=t:"string"==typeof u?~(d=t.indexOf(u))&&("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=u.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,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);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 a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;default:o[t]=e}for(var u=0;u<s.length;u++){var c=s[u];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(21))},function(t,e,n){"use strict";e.a={Icon:function(t){return t.faces.find((function(t){return"icon"===t.properties.constraints.view_mode&&"web"===t.properties.constraints.platform}))||t.faces.find((function(t){return"icon"===t.properties.constraints.view_mode&&"generic"===t.properties.constraints.platform}))},Engaged:function(t){return t.faces.find((function(t){return"engaged"===t.properties.constraints.view_mode&&"web"===t.properties.constraints.platform}))||t.faces.find((function(t){return"engaged"===t.properties.constraints.view_mode&&"generic"===t.properties.constraints.platform}))||t.faces.find((function(t){return"icon"===t.properties.constraints.view_mode&&"web"===t.properties.constraints.platform}))||t.faces.find((function(t){return"icon"===t.properties.constraints.view_mode&&"generic"===t.properties.constraints.platform}))},Fullscreen:function(t){return t.faces.find((function(t){return"fullscreen"===t.properties.constraints.view_mode&&"web"===t.properties.constraints.platform}))||t.faces.find((function(t){return"fullscreen"===t.properties.constraints.view_mode&&"generic"===t.properties.constraints.platform}))},Card:function(t){return t.faces.find((function(t){return"card"===t.properties.constraints.view_mode&&"web"===t.properties.constraints.platform}))||t.faces.find((function(t){return"card"===t.properties.constraints.view_mode&&"generic"===t.properties.constraints.platform}))}}},function(t,e,n){(function(t,e,r,i,o,a){
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 u;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)}(u||(u={})),"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 a=t.ArrayTools.splitByteArray(e,n.blockSize),u=[],c=function(e){if(e<a.length){var s=void 0;try{s=o.compressBlock(a[e])}catch(t){return void r(void 0,t)}u.push(s),i.getElapsedTime()<=20?c(e+1):(t.enqueueImmediate((function(){return c(e+1)})),i.restart())}else{var l=t.ArrayTools.concatUint8Arrays(u);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(154).Transform)({decodeStrings:!0,highWaterMark:65536});return r._transform=function(n,i,o){var a;try{a=t.BufferTools.uint8ArrayToBuffer(e.compressBlock(t.BufferTools.bufferToUint8Array(n)))}catch(t){return void r.emit("error",t)}r.push(a),o()},r},e}();t.AsyncCompressor=e}(u||(u={})),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,a=t.ArrayTools.splitByteArray(e,n.blockSize),u=[],c=function(e){if(e<a.length){var s=void 0;try{s=o.decompressBlock(a[e])}catch(t){return void r(void 0,t)}u.push(s),i.getElapsedTime()<=20?c(e+1):(t.enqueueImmediate((function(){return c(e+1)})),i.restart())}else{var l=t.ArrayTools.concatUint8Arrays(u);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(154).Transform)({decodeStrings:!0,highWaterMark:65536});return r._transform=function(n,i,o){var a;try{a=t.BufferTools.uint8ArrayToBuffer(e.decompressBlock(t.BufferTools.bufferToUint8Array(n)))}catch(t){return void r.emit("error",t)}r.push(a),o()},r},e}();t.AsyncDecompressor=e}(u||(u={})),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()}(u||(u={})),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}(u||(u={})),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,a=0,u=t;a<u.length;a++){var c=u[a];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={}))}(u||(u={})),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={}))}(u||(u={})),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={}))}(u||(u={})),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 a((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 u=new MessageChannel;u.port1.onmessage=function(){return e()},n=function(){return u.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)}}(u||(u={})),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={}))}(u||(u={})),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}}(u||(u={})),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}(u||(u={})),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}(u||(u={})),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 a=n[o],u=o<i;if(o>r-this.MinimumSequenceLength)u||this.outputRawByte(a);else{var c=this.getBucketIndexForPrefix(o);if(!u){var s=this.findLongestMatch(o,c);null!=s&&(this.outputPointerBytes(s.length,s.distance),i=o+s.length,u=!0)}u||this.outputRawByte(a);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,a=0;a<n.length;a++){var u=n.getInReversedOrder(a)-this.inputBufferStreamOffset,c=t-u,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[u+s]===i[t+s])for(var l=0;;l++){if(t+l===i.length||i[u+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}(u||(u={})),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 a=this.bucketLocators[r],u=this.bucketLocators[r+1];t.ArrayTools.copyElements(n,o,this.storage,a,u)}}},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}(u||(u={})),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}(u||(u={})),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 a=o>>>5;if(r==i-1||r==i-2&&7==a){this.inputBufferRemainder=e.subarray(r);break}if(e[r+1]>>>7==1)this.outputByte(o);else{var u=31&o,c=void 0;6==a?(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<u;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}(u||(u={})),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,a=new t.StringBuilder,u=0,c=e.length;u<c;u+=3)u<=c-3?(i=e[u]<<16|e[u+1]<<8|e[u+2],a.appendCharCode(o[i>>>18&63]),a.appendCharCode(o[i>>>12&63]),a.appendCharCode(o[i>>>6&63]),a.appendCharCode(o[63&i]),i=0):u===c-2?(i=e[u]<<16|e[u+1]<<8,a.appendCharCode(o[i>>>18&63]),a.appendCharCode(o[i>>>12&63]),a.appendCharCode(o[i>>>6&63]),r&&a.appendCharCode(61)):u===c-1&&(i=e[u]<<16,a.appendCharCode(o[i>>>18&63]),a.appendCharCode(o[i>>>12&63]),r&&(a.appendCharCode(61),a.appendCharCode(61)));return a.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,a=0;a<o;a+=4){var u=r[t.charCodeAt(a)]<<18|r[t.charCodeAt(a+1)]<<12|r[t.charCodeAt(a+2)]<<6|r[t.charCodeAt(a+3)];e[i++]=u>>>16&255,e[i++]=u>>>8&255,e[i++]=255&u}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={}))}(u||(u={})),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,a=0;a<n;a+=2){var u=void 0;u=a==n-1?e[a]<<8:e[a]<<8|e[a+1],r.appendCharCode(i<<16-o|u>>>o),i=u&(1<<o)-1,15===o?(r.appendCharCode(i),i=0,o=1):o+=1,a>=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,a=0;a<t.length;a++){var u=t.charCodeAt(a);u>=32768?(32769==u&&n--,o=0):(0==o?i=u:(r(i<<o|u>>>15-o),i=u&(1<<15-o)-1),15==o?o=0:o+=1)}return e.subarray(0,n)}}(e.BinaryString||(e.BinaryString={}))}(t.Encoding||(t.Encoding={}))}(u||(u={})),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={}))}(u||(u={})),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={}))}(u||(u={})),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={}))}(u||(u={})),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,a=new t.StringBuilder,u=n,c=r;u<c;){if((o=e[u])>>>7==0)i=o,u+=1;else if(o>>>5==6){if(u+1>=r)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+u);i=(31&o)<<6|63&e[u+1],u+=2}else if(o>>>4==14){if(u+2>=r)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+u);i=(15&o)<<12|(63&e[u+1])<<6|63&e[u+2],u+=3}else{if(o>>>3!=30)throw new Error("Invalid UTF-8 stream: An invalid lead byte value encountered at position "+u);if(u+3>=r)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+u);i=(7&o)<<18|(63&e[u+1])<<12|(63&e[u+2])<<6|63&e[u+3],u+=4}a.appendCodePoint(i)}return a.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={}))}(u||(u={})),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)}}(u||(u={}))}).call(this,n(29),n(151)(t),n(7),n(21),n(77).Buffer,n(153).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,a=void 0;try{for(var u,c=n[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=u.value;r>s.time&&(r=s.time)}}catch(t){o=!0,a=t}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}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,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;this.isMonitoringID(u.id)&&(!u.time||u.time<e||this.changes.push(u))}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.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,a=this.regions[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){o.value.updateObjects([e])}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.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(65)("keys"),i=n(39);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(23)(Function.call,n(26).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(89).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(25),i=n(31);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(25),i=n(31);t.exports=function(t){return function(e,n){var o,a,u=String(i(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(o=u.charCodeAt(c))<55296||o>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):o:t?u.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(40),i=n(0),o=n(13),a=n(16),u=n(51),c=n(132),s=n(49),l=n(45),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,k=function(t){if(!h&&t in _)return _[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},Z=e+" Iterator",S="values"==v,x=!1,_=t.prototype,I=_[f]||_["@@iterator"]||v&&_[v],R=I||k(v),V=v?S?k("entries"):R:void 0,W="Array"==e&&_.entries||I;if(W&&(w=l(W.call(new t)))!==Object.prototype&&w.next&&(s(w,Z,!0),r||"function"==typeof w[f]||a(w,f,p)),S&&I&&"values"!==I.name&&(x=!0,R=function(){return I.call(this)}),r&&!m||!h&&!x&&_[f]||a(_,f,R),u[e]=R,u[Z]=p,v)if(b={values:S?R:k("values"),keys:y?R:k("keys"),entries:V},m)for(g in b)g in _||o(_,g,b[g]);else i(i.P+i.F*(h||x),e,b);return b}},function(t,e,n){var r=n(98),i=n(31);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(30),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(51),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(38);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(59),i=n(6)("iterator"),o=n(51);t.exports=n(9).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(42),o=n(8);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:i(c,n);s>u;)e[u++]=t;return e}},function(t,e,n){"use strict";var r=n(46),i=n(137),o=n(51),a=n(17);t.exports=n(96)(Array,"Array",(function(t,e){this._t=a(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(70),a=RegExp.prototype.exec,u=String.prototype.replace,c=a,s=(r=/a/,i=/b*/g,a.call(r,"a"),a.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=a.call(c,t),s&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&u.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(95)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r,i,o,a=n(23),u=n(126),c=n(88),s=n(84),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(){u("function"==typeof t?t:Function(t),e)},r(y),y},p=function(t){delete m[t]},"process"==n(30)(f)?r=function(t){f.nextTick(a(b,t,1))}:v&&v.now?r=function(t){v.now(a(b,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=g,r=a(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(a(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(40),a=n(76),u=n(16),c=n(54),s=n(3),l=n(53),f=n(25),h=n(8),p=n(145),d=n(44).f,v=n(11).f,y=n(103),m=n(49),b=r.ArrayBuffer,g=r.DataView,w=r.Math,k=r.RangeError,Z=r.Infinity,S=b,x=w.abs,_=w.pow,I=w.floor,R=w.log,V=w.LN2,W=i?"_b":"buffer",T=i?"_l":"byteLength",M=i?"_o":"byteOffset";function j(t,e,n){var r,i,o,a=new Array(n),u=8*n-e-1,c=(1<<u)-1,s=c>>1,l=23===e?_(2,-24)-_(2,-77):0,f=0,h=t<0||0===t&&1/t<0?1:0;for((t=x(t))!=t||t===Z?(i=t!=t?1:0,r=c):(r=I(R(t)/V),t*(o=_(2,-r))<1&&(r--,o*=2),(t+=r+s>=1?l/o:l*_(2,1-s))*o>=2&&(r++,o/=2),r+s>=c?(i=0,r=c):r+s>=1?(i=(t*o-1)*_(2,e),r+=s):(i=t*_(2,s-1)*_(2,e),r=0));e>=8;a[f++]=255&i,i/=256,e-=8);for(r=r<<e|i,u+=e;u>0;a[f++]=255&r,r/=256,u-=8);return a[--f]|=128*h,a}function E(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,a=o>>1,u=i-7,c=n-1,s=t[c--],l=127&s;for(s>>=7;u>0;l=256*l+t[c],c--,u-=8);for(r=l&(1<<-u)-1,l>>=-u,u+=e;u>0;r=256*r+t[c],c--,u-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:s?-Z:Z;r+=_(2,e),l-=a}return(s?-1:1)*r*_(2,l-e)}function G(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function X(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 L(t){return j(t,52,8)}function C(t){return j(t,23,4)}function U(t,e,n){v(t.prototype,e,{get:function(){return this[n]}})}function B(t,e,n,r){var i=p(+n);if(i+e>t[T])throw k("Wrong index!");var o=t[W]._b,a=i+t[M],u=o.slice(a,a+e);return r?u:u.reverse()}function A(t,e,n,r,i,o){var a=p(+n);if(a+e>t[T])throw k("Wrong index!");for(var u=t[W]._b,c=a+t[M],s=r(+i),l=0;l<e;l++)u[c+l]=s[o?l:e-l-1]}if(a.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 O,Y=(b=function(t){return l(this,b),new S(p(t))}).prototype=S.prototype,F=d(S),J=0;F.length>J;)(O=F[J++])in b||u(b,O,S[O]);o||(Y.constructor=b)}var D=new g(new b(2)),H=g.prototype.setInt8;D.setInt8(0,2147483648),D.setInt8(1,2147483649),!D.getInt8(0)&&D.getInt8(1)||c(g.prototype,{setInt8:function(t,e){H.call(this,t,e<<24>>24)},setUint8:function(t,e){H.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 k("Wrong offset!");if(i+(n=void 0===n?r-i:h(n))>r)throw k("Wrong length!");this[W]=t,this[M]=i,this[T]=n},i&&(U(b,"byteLength","_l"),U(g,"buffer","_b"),U(g,"byteLength","_l"),U(g,"byteOffset","_o")),c(g.prototype,{getInt8:function(t){return B(this,1,t)[0]<<24>>24},getUint8:function(t){return B(this,1,t)[0]},getInt16:function(t){var e=B(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=B(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return G(B(this,4,t,arguments[1]))},getUint32:function(t){return G(B(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return E(B(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return E(B(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){A(this,1,t,X,e)},setUint8:function(t,e){A(this,1,t,X,e)},setInt16:function(t,e){A(this,2,t,P,e,arguments[2])},setUint16:function(t,e){A(this,2,t,P,e,arguments[2])},setInt32:function(t,e){A(this,4,t,N,e,arguments[2])},setUint32:function(t,e){A(this,4,t,N,e,arguments[2])},setFloat32:function(t,e){A(this,4,t,C,e,arguments[2])},setFloat64:function(t,e){A(this,8,t,L,e,arguments[2])}});m(b,"ArrayBuffer"),m(g,"DataView"),u(g.prototype,a.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(150)((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 a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function s(t,n,r,i){var o,a,u,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",n,r.listener?r.listener:r),a=t._events),u=a[n]),void 0===u)u=a[n]=r,++t._eventsCount;else if("function"==typeof u?u=a[n]=i?[r,u]:[u,r]:i?u.unshift(r):u.push(r),(o=c(t))>0&&u.length>o&&!u.warned){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=n,l.count=u.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(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},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+".");u=t}}),a.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},a.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},a.prototype.getMaxListeners=function(){return c(this)},a.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 a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}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},a.prototype.addListener=function(t,e){return s(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return s(this,t,e,!0)},a.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},a.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},a.prototype.removeListener=function(t,e){var n,r,i,o,a;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){a=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,a||e)}return this},a.prototype.off=a.prototype.removeListener,a.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},a.prototype.listeners=function(t){return h(this,t,!0)},a.prototype.rawListeners=function(t){return h(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(7))},function(t,e,n){(e=t.exports=n(155)).Stream=e,e.Readable=e,e.Writable=n(115),e.Duplex=n(48),e.Transform=n(159),e.PassThrough=n(383)},function(t,e,n){var r=n(77),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.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},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.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(78);function a(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 u,c=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;b.WritableState=m;var s=n(61);s.inherits=n(55);var l={deprecate:n(381)},f=n(156),h=n(114).Buffer,p=i.Uint8Array||function(){};var d,v=n(157);function y(){}function m(t,e){u=u||n(48),t=t||{};var r=e instanceof u;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 a=Z(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||k(t,n),r?c(w,t,n,a,i):w(t,n,a,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 a(this)}function b(t){if(u=u||n(48),!(d.call(b,this)||this instanceof u))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,a){e.writelen=r,e.writecb=a,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 k(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 u=0,c=!0;n;)i[u]=n,n.isBuf||(c=!1),n=n.next,u+=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 a(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 Z(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=Z(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,a=!1,u=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof p);return u&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),u?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):(u||function(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,t,n))&&(i.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var u=e.objectMode?1:r.length;e.length+=u;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,u,r,i,o);return c}(this,i,u,t,e,n)),a},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||k(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(29),n(153).setImmediate,n(21))},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,a=!1,u=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){a=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(a)throw u}}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(36),i=n(1);n(116);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 a(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function u(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 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,a;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:(a=u(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 a.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=u(regeneratorRuntime.mark((function e(r){var o,a,u,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 a=e.sent,u=new i.a("vatom",a.vatoms[0].id,a.vatoms[0]),o.push(u),a.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return o.push(t)})),a.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(7))},function(t,e,n){t.exports=!n(10)&&!n(3)((function(){return 7!=Object.defineProperty(n(84)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(2),i=n(9),o=n(40),a=n(85),u=n(11).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(15),i=n(17),o=n(66)(!1),a=n(86)("IE_PROTO");t.exports=function(t,e){var n,u=i(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~o(s,n)||s.push(n));return s}},function(t,e,n){var r=n(11),i=n(4),o=n(41);t.exports=n(10)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(17),i=n(44).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(10),i=n(41),o=n(67),a=n(58),u=n(12),c=n(57),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=u(t),s=arguments.length,l=1,f=o.f,h=a.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(24),i=n(5),o=n(126),a=[].slice,u={},c=function(t,e,n){if(!(e in u)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?c(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(u.prototype=e.prototype),u}},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(50).trim,o=n(90),a=/^[-+]?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||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(2).parseFloat,i=n(50).trim;t.exports=1/r(n(90)+"-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(30);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(43),i=n(38),o=n(49),a={};n(16)(a,n(6)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{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(281);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(24),i=n(12),o=n(57),a=n(8);t.exports=function(t,e,n,u,c){r(e);var s=i(t),l=o(s),f=a(s.length),h=c?f-1:0,p=c?-1:1;if(n<2)for(;;){if(h in l){u=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&&(u=e(u,l[h],h,s));return u}},function(t,e,n){"use strict";var r=n(12),i=n(42),o=n(8);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),u=i(t,a),c=i(e,a),s=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===s?a:i(s,a))-c,a-u),f=1;for(c<u&&u<c+l&&(f=-1,c+=l-1,u+=l-1);l-- >0;)c in n?n[u]=n[c]:delete n[u],u+=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(105);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(70)})},function(t,e,n){"use strict";var r,i,o,a,u=n(40),c=n(2),s=n(23),l=n(59),f=n(0),h=n(5),p=n(24),d=n(53),v=n(73),y=n(60),m=n(107).set,b=n(301)(),g=n(141),w=n(302),k=n(74),Z=n(142),S=c.TypeError,x=c.process,_=x&&x.versions,I=_&&_.v8||"",R=c.Promise,V="process"==l(x),W=function(){},T=i=g.f,M=!!function(){try{var t=R.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===k.indexOf("Chrome/66")}catch(t){}}(),j=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,a=function(e){var n,o,a,u=i?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(i||(2==t._h&&P(t),t._h=1),!0===u?n=r:(l&&l.enter(),n=u(r),l&&(l.exit(),a=!0)),n===e.promise?s(S("Promise-chain cycle")):(o=j(n))?o.call(n,c,s):c(n)):s(r)}catch(t){l&&!a&&l.exit(),s(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&G(t)}))}},G=function(t){m.call(c,(function(){var e,n,r,i=t._v,o=X(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||X(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},X=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))},L=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=j(t))?b((function(){var r={_w:n,_d:!1};try{e.call(t,s(L,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)}}};M||(R=function(t){d(this,R,"Promise","_h"),p(t),r.call(this);try{t(s(L,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(54)(R.prototype,{then:function(t,e){var n=T(y(this,R));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(L,t,1),this.reject=s(N,t,1)},g.f=T=function(t){return t===R||t===a?new o(t):i(t)}),f(f.G+f.W+f.F*!M,{Promise:R}),n(49)(R,"Promise"),n(52)("Promise"),a=n(9).Promise,f(f.S+f.F*!M,"Promise",{reject:function(t){var e=T(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(u||!M),"Promise",{resolve:function(t){return Z(u&&this===a?R:this,t)}}),f(f.S+f.F*!(M&&n(69)((function(t){R.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,a=1;v(t,!1,(function(t){var u=o++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[u]=t,--a||r(n))}),i)})),--a||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(24);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(141);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(43),o=n(54),a=n(23),u=n(53),c=n(73),s=n(96),l=n(137),f=n(52),h=n(10),p=n(35).fastKey,d=n(47),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){u(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=a(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(54),i=n(35).getWeak,o=n(4),a=n(5),u=n(53),c=n(73),s=n(28),l=n(15),f=n(47),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){u(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(!a(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(!a(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(25),i=n(8);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(44),i=n(67),o=n(4),a=n(2).Reflect;t.exports=a&&a.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(8),i=n(92),o=n(31);t.exports=function(t,e,n,a){var u=String(o(t)),c=u.length,s=void 0===n?" ":String(n),l=r(e);if(l<=c||""==s)return u;var f=l-c,h=i.call(s,Math.ceil(f/s.length));return h.length>f&&(h=h.slice(0,f)),a?h+u:u+h}},function(t,e,n){var r=n(10),i=n(41),o=n(17),a=n(58).f;t.exports=function(t){return function(e){for(var n,u=o(e),c=i(u),s=c.length,l=0,f=[];s>l;)n=c[l++],r&&!a.call(u,n)||f.push(t?[n,u[n]]:u[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(377),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(21))},function(t,e,n){t.exports=i;var r=n(112).EventEmitter;function i(){r.call(this)}n(55)(i,r),i.Readable=n(113),i.Writable=n(384),i.Duplex=n(385),i.Transform=n(386),i.PassThrough=n(387),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",u),n.on("close",c));var a=!1;function u(){a||(a=!0,t.end())}function c(){a||(a=!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",u),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(78);t.exports=g;var o,a=n(152);g.ReadableState=b;n(112).EventEmitter;var u=function(t,e){return t.listeners(e).length},c=n(156),s=n(114).Buffer,l=e.Uint8Array||function(){};var f=n(61);f.inherits=n(55);var h=n(378),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,v=n(379),y=n(157);f.inherits(g,c);var m=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var r=e instanceof(o=o||n(48));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:u,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(158).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function g(t){if(o=o||n(48),!(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,a=t._readableState;null===e?(a.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,a)):(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}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):k(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?k(t,a,e,!1):_(t,a)):k(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function k(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)),_(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(158).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};function Z(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 _(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 R(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,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));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,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function M(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(j,e,t))}function j(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?M(this):S(this),null;if(0===(t=Z(t,e))&&e.ended)return 0===e.length&&M(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=Z(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&&M(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&&u(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===u(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]?a(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 a=E(e.pipes,t);return-1===a?this:(e.pipes.splice(a,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(R,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(21),n(29))},function(t,e,n){t.exports=n(112).EventEmitter},function(t,e,n){"use strict";var r=n(78);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(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(382).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=u,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 a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function u(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=a(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=a(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(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=a;var r=n(48),i=n(61);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 a(t){if(!(this instanceof a))return new a(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",u)}function u(){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(55),i.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},a.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)}},a.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},a.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(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 a(t);var e=u(t);if("[object "===e.slice(0,"[object ".length))return a(t);return e}(t);return e&&e.length>1e4?e.slice(0,1e4)+"[CROPPED-BY-REASSERT]":e}function a(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: "+u(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(64).inspect(t):u(e)+"["+i+"][Error](Reassert-stringification)"}}function u(t){return"object"!=typeof t||t.toString?""+t:"[object Object]"}}).call(this,n(7))},function(t,e,n){(function(e){t.exports=function(){return e&&e.versions&&e.versions.node}}).call(this,n(29))},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 a=r[i],u=i===t.length-1?"":getBar(a+e," ").slice(getStringWidth(n));o+=n+u}),i.push(o)}),i.join("\n")}function titleFormat(t,{padding:e=3}={}){const n=__webpack_require__(395),r=getStringWidth(t=" "+t+" "),i=Math.max(40,r+2*e),o=(__webpack_require__(398),Math.floor((i-r)/2)),a=getBar(i),u=getBar(o)+t+getBar(i-o-r);return n(getStringWidth(a)===getStringWidth(u)),[a,u,a].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__(29))},function(t,e,n){(function(e){t.exports=function(){return e&&e.versions&&e.versions.node}}).call(this,n(29))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return v}));var r=n(116),i=(n(1),n(165)),o=(n(374),n(19)),a=n(20),u=n(166);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,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.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 a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(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,a.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,a,u,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,a=void 0,e.prev=12,u=this.objects.keys()[Symbol.iterator]();case 14:if(i=(c=u.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,a=e.t0;case 28:e.prev=28,e.prev=29,i||null==u.return||u.return();case 31:if(e.prev=31,!o){e.next=34;break}throw a;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,u=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)),a.a.run((function(n){return e.emit("object.updated",t.id)}))},c=t[Symbol.iterator]();!(n=(o=c.next()).done);n=!0)u()}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,u=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,a.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,u=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw u}}n&&this.emit("updated")}},{key:"removeObjects",value:function(t){var e=this,n=!1,r=!0,i=!1,o=void 0;try{for(var u,c=function(){var t=u.value;e.willRemove(t),e.objects.delete(t)&&(a.a.run((function(n){return e.emit("object.removed",t)})),n=!0)},s=t[Symbol.iterator]();!(r=(u=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 a=i.value,u=a.cached;if(u||(a.cached=u=this.map(a)),u&&!1===t(u))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 a,u=this.objects.values()[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.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==u.return||u.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 a=Object(o.get)(i.data,e);return this.willUpdateField(i,e,a,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(u){r.willUpdateField(i,e,n,a),Object(o.set)(i.data,e,a),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 u.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(7))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(19);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,a=void 0;try{for(var u,c=this.objects.values()[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=u.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,a=t}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}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(82),o=n.n(i),a=n(167);function u(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.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 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 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,u,l,f;return n=e,(i=[{key:"load",value:(f=c(regeneratorRuntime.mark((function e(){var n,i,u,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(a.a)]),u=URL.createObjectURL(i),o.a.WebWorker.scriptURI=u):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,a;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:a=e.sent,localStorage["sync."+this.id]=a,t.debug("[DataPool > LocalStorageMap] Saved ".concat(r.length," items, using ").concat(Math.floor(a.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),u&&s(n,u),e}()}).call(this,n(7))},function(t,e,n){"use strict";e.a="dmFyIExaVVRGODtpZighZnVuY3Rpb24obil7bi5ydW5uaW5nSW5Ob2RlSlM9ZnVuY3Rpb24oKXtyZXR1cm4ib2JqZWN0Ij09dHlwZW9mIHByb2Nlc3MmJiJvYmplY3QiPT10eXBlb2YgcHJvY2Vzcy52ZXJzaW9ucyYmInN0cmluZyI9PXR5cGVvZiBwcm9jZXNzLnZlcnNpb25zLm5vZGV9LG4ucnVubmluZ0luTWFpbk5vZGVKU01vZHVsZT1mdW5jdGlvbigpe3JldHVybiBuLnJ1bm5pbmdJbk5vZGVKUygpJiZyZXF1aXJlLm1haW49PT1tb2R1bGV9LG4uY29tbW9uSlNBdmFpbGFibGU9ZnVuY3Rpb24oKXtyZXR1cm4ib2JqZ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blN0cmVhbT1mdW5jdGlvbigpe3JldHVybiBvLkFzeW5jQ29tcHJlc3Nvci5jcmVhdGVDb21wcmVzc2lvblN0cmVhbSgpfSxvLmNyZWF0ZURlY29tcHJlc3Npb25TdHJlYW09ZnVuY3Rpb24oKXtyZXR1cm4gby5Bc3luY0RlY29tcHJlc3Nvci5jcmVhdGVEZWNvbXByZXNzaW9uU3RyZWFtKCl9LG8uZW5jb2RlVVRGOD1mdW5jdGlvbihlKXtyZXR1cm4gby5FbmNvZGluZy5VVEY4LmVuY29kZShlKX0sby5kZWNvZGVVVEY4PWZ1bmN0aW9uKGUpe3JldHVybiBvLkVuY29kaW5nLlVURjguZGVjb2RlKGUpfSxvLmVuY29kZUJhc2U2ND1mdW5jdGlvbihlKXtyZXR1cm4gby5FbmNvZGluZy5CYXNlNjQuZW5jb2RlKGUpfSxvLmRlY29kZUJhc2U2ND1mdW5jdGlvbihlKXtyZXR1cm4gby5FbmNvZGluZy5CYXNlNjQuZGVjb2RlKGUpfSxvLmVuY29kZUJpbmFyeVN0cmluZz1mdW5jdGlvbihlKXtyZXR1cm4gby5FbmNvZGluZy5CaW5hcnlTdHJpbmcuZW5jb2RlKGUpfSxvLmRlY29kZUJpbmFyeVN0cmluZz1mdW5jdGlvbihlKXtyZXR1cm4gby5FbmNvZGluZy5CaW5hcnlTdHJpbmcuZGVjb2RlKGUpfSxvLmVuY29kZVN0b3JhZ2VCaW5hcnlTdHJpbmc9ZnVuY3Rpb24oZSl7cmV0dXJuIG8uRW5jb2RpbmcuU3RvcmFnZUJpbmFyeVN0cmluZy5lbmNvZGUoZSl9LG8uZGVjb2RlU3RvcmFnZUJpbmFyeVN0cmluZz1mdW5jdGlvbihlKXtyZXR1cm4gby5FbmNvZGluZy5TdG9yYWdlQmluYXJ5U3RyaW5nLmRlY29kZShlKX19KExaVVRGOD1MWlVURjh8fHt9KTs="},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return a}));var r=n(56),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 a=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,a;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),a&&o(n,a),e}()}).call(this,n(7))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return s}));var r=n(80),i=n.n(r),o=n(63);function a(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function u(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 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,a,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),a=0;a<r;a+=1){var u=i()(n[a].uri);if(o.hostname===u.hostname){var c=e.mapString(n[a].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=u(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=u(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=u(regeneratorRuntime.mark((function e(){var n,r,i,o,a,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 a=!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),a||c(!1)}),250),h=function(){var e=u(regeneratorRuntime.mark((function e(i){var u,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 u={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",u,!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}),a=!0,c(!0),e.next=31;break;case 27:(y=new Error(i.data.error_text||"Unable to login.")).code=i.data.error,a=!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=u(regeneratorRuntime.mark((function t(e,n){var r,i,o,a;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:a=t.sent,this.store.assetProvider=a.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)})}],a=[{key:"mapString",value:function(t){return Object.keys(t).map((function(e){return"".concat(e,"=").concat(t[e])})).join("&")}}],r&&c(n.prototype,r),a&&c(n,a),e}()}).call(this,n(7))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return y}));var r=n(171),i=n.n(r),o=n(56),a=n.n(o),u=n(37);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,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.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 a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(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,u,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 a,u,s,l,f,h,p,d,y,m,b,g;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=performance.now(),u=Math.random().toString(36).substr(2),this.emit("requestTimerStart",{url:this.store.server+n,method:e,event:"start",statekey:u,time:a}),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-a,statekey:u,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-a,statekey:u,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=a()(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),u&&f(r,u),n}(n.n(u).a)}).call(this,n(7))},function(module,exports,__webpack_require__){"use strict";var assert=__webpack_require__(394),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(37);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,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function a(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 u(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=u(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 a(t){o(i,n,r,a,u,"next",t)}function u(t){o(i,n,r,a,u,"throw",t)}a(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}}])&&a(r.prototype,i),l&&a(r,l),n}(n.n(r).a)}).call(this,n(7))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return h}));var r=n(81),i=n(174),o=n(175),a=n(176),u=n(177),c=n(178);function s(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}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)}}var f={"native://image":o.a,"native://progress-image-overlay":i.a,"native://image-policy":a.a,"native://layered-image":u.a},h=function(){function e(t,n,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.blockv=t,this.vatomObj=n,this.fsp=i||r.a.Icon,this.config=o||{},this._currentFace=null,this.onVatomUpdated=this.onVatomUpdated.bind(this),this.region=this.blockv.dataPool.region("inventory"),this.region.addEventListener("object.updated",this.onVatomUpdated),this.element=document.createElement("div"),this.element.style.position="relative",this.element.style.width=this.config.width||"64px",this.element.style.height=this.config.height||"64px",this.createLoader=this.config.loader||function(){var t=".spinner {margin: 0px auto;width: 70px;text-align: center; margin-top: -50%;}";t+=".spinner > div {width: 12px;height: 12px;margin: 0px 3px;border-radius: 100%;display: inline-block;-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;animation: sk-bouncedelay 1.4s infinite ease-in-out both;}",t+=".spinner .bounce1 {-webkit-animation-delay: -0.32s;animation-delay: -0.32s;}",t+=".spinner .bounce2 {-webkit-animation-delay: -0.16s;animation-delay: -0.16s;}",t+="@-webkit-keyframes sk-bouncedelay {0%, 80%, 100% { -webkit-transform: scale(0) }40% { -webkit-transform: scale(1.0) }}",t+="@keyframes sk-bouncedelay {0%, 80%, 100% {-webkit-transform: scale(0);transform: scale(0);} 40% {-webkit-transform: scale(1.0);transform: scale(1.0);}}";var e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");e.appendChild(n),n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t));var r=document.createElement("div");return r.innerHTML='<div class="spinner"><div class="bounce1" style="background-color: #333;"></div><div class="bounce2" style="background-color: #333;"></div><div class="bounce3" style="background-color: #333;"></div></div>',r},this.createErrorView=this.config.errorView||function(t,e,n){var r=document.createElement("div"),i=e.properties.resources.find((function(t){return"ActivatedImage"===t.name})),o=i&&t.UserManager.encodeAssetProvider(i.value.value);r.style.backgroundSize="contain",r.style.backgroundPosition="center",r.style.backgroundRepeat="no-repeat",r.style.backgroundImage="url('".concat(o,"')"),r.style.width="100%",r.style.height="100%";var a=document.createElement("div");return a.style.cssText="position: absolute; top: 0px; right: 0px; padding-right: 5px; padding-top: 5px;",a.innerHTML='<img width="20" height="20" src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ5Ny40NzIgNDk3LjQ3MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDk3LjQ3MiA0OTcuNDcyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4yNSAwIDAgLTEuMjUgMCA0NSkiPgoJPGc+CgkJPGc+CgkJCTxwYXRoIHN0eWxlPSJmaWxsOiNGRkNDNEQ7IiBkPSJNMjQuMzc0LTM1Ny44NTdjLTIwLjk1OCwwLTMwLjE5NywxNS4yMjMtMjAuNTQ4LDMzLjgyNkwxODEuNDIxLDE3LjkyOCAgICAgYzkuNjQ4LDE4LjYwMywyNS40NjMsMTguNjAzLDM1LjEyMywwTDM5NC4xNC0zMjQuMDMxYzkuNjcxLTE4LjYwMywwLjQyMS0zMy44MjYtMjAuNTQ4LTMzLjgyNkgyNC4zNzR6Ii8+CgkJCTxwYXRoIHN0eWxlPSJmaWxsOiMyMzFGMjA7IiBkPSJNMTczLjYwNS04MC45MjJjMCwxNC44MTQsMTAuOTM0LDIzLjk4NCwyNS4zOTUsMjMuOTg0YzE0LjEyLDAsMjUuNDA3LTkuNTEyLDI1LjQwNy0yMy45ODQgICAgIFYtMjE2Ljc1YzAtMTQuNDYxLTExLjI4Ny0yMy45ODQtMjUuNDA3LTIzLjk4NGMtMTQuNDYxLDAtMjUuMzk1LDkuMTgyLTI1LjM5NSwyMy45ODRWLTgwLjkyMnogTTE3MS40ODktMjg5LjA1NiAgICAgYzAsMTUuMTY3LDEyLjM0NSwyNy41MTEsMjcuNTExLDI3LjUxMWMxNS4xNjcsMCwyNy41MjMtMTIuMzQ1LDI3LjUyMy0yNy41MTFjMC0xNS4xNzgtMTIuMzU2LTI3LjUyMy0yNy41MjMtMjcuNTIzICAgICBDMTgzLjgzNC0zMTYuNTc5LDE3MS40ODktMzA0LjIzNCwxNzEuNDg5LTI4OS4wNTYiLz4KCQk8L2c+Cgk8L2c+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" />',a.addEventListener("click",(function(t){return alert(n.message)}),!1),r.appendChild(a),r},this.update()}var n,i,o,a,u;return n=e,i=[{key:"update",value:function(){if(!this.vatomObj)return t.warn("No vAtom supplied");this._currentFace&&this._currentFace.onUnload&&this._currentFace.onUnload(),this._currentFace=null;for(var e=this.element;e.firstChild;)e.removeChild(e.firstChild);this.load()}},{key:"load",value:function(){var e=this;this.loader&&this.loader.parentNode&&this.loader.parentNode.removeChild(this.loader),this.errorView&&this.errorView.parentNode&&this.errorView.parentNode.removeChild(this.errorView),this.loader=null,this.errorView=null;var n=null;Promise.resolve((function(){return null})).then((function(){var t=e.fsp(e.vatomObj);if(!t)throw new Error("No face found for this view mode.");var r=null,i=t.properties.display_url.toLowerCase();if(e.config.excludedFaces.includes(i))throw new Error("This face is not allowed to run in this view mode. [excluded : "+i+"]");if(void 0===(r=f[i])&&-1!==i.indexOf("http"))r=c.a;else if(void 0===r)throw new Error("No Face Registered");return n=new r(e,e.vatomObj,t),e._currentFace=n,n.element.style.opacity=0,e.element.appendChild(n.element),e.element.appendChild(e.loader=e.createLoader()),n.onLoad()})).then((function(){e.loader&&(e.element.removeChild(e.loader),n.element.style.opacity=1)})).catch((function(r){t.warn("Error from catch",r),e.element.appendChild(e.errorView=e.createErrorView(e.blockv,e.vatom,r)),n&&n.element&&n.element.parentNode&&e.element.removeChild(n.element),e.loader&&e.loader.parentNode&&e.element.removeChild(e.loader)}))}},{key:"free",value:function(){this.region.removeEventListener("object.updated",this.onVatomUpdated),this._currentFace&&this._currentFace.onUnload&&this._currentFace.onUnload(),this._currentFace=null;for(var t=this.element;t.firstChild;)t.removeChild(t.firstChild)}},{key:"onVatomUpdated",value:function(e){if(e===this.vatomObj.id){var n=this.region.getItem(e,!1);if(!n)return t.warn("DataPool indicated that an updated vatom was available, but we were unable to fetch it.");this.vatom=n}}},{key:"sendRequest",value:(a=regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._currentFace){t.next=2;break}throw new Error("No face loaded.");case 2:if(this._currentFace.sendRequest){t.next=4;break}throw new Error("Request not supported for this face.");case 4:return t.abrupt("return",this._currentFace.sendRequest(e,n));case 5:case"end":return t.stop()}}),t,this)})),u=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=a.apply(t,e);function o(t){s(i,n,r,o,u,"next",t)}function u(t){s(i,n,r,o,u,"throw",t)}o(void 0)}))},function(t,e){return u.apply(this,arguments)})},{key:"vatom",set:function(t){t&&t.id===this.vatomObj.id?(this.vatomObj.payload=t.payload,this._currentFace&&this._currentFace.onVatomUpdated()):t&&(this.vatomObj=t,this.update())},get:function(){return this.vatomObj}}],o=[{key:"registerFace",value:function(t){f[t.url.toLowerCase()]=t}}],i&&l(n.prototype,i),o&&l(n,o),e}()}).call(this,n(7))},function(t,e,n){"use strict";function r(t){return(r="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 i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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)}}function a(t,e){return!e||"object"!==r(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 u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",(function(){return s}));var s=function(t){function e(){return i(this,e),a(this,u(e).apply(this,arguments))}var n,r,s;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&&c(t,e)}(e,t),n=e,s=[{key:"calculateAspectRatioFit",value:function(t,e,n,r){var i=Math.min(n/t,r/e);return{width:t*i,height:e*i}}},{key:"waitForImage",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.src=t,r.onerror=n,r.onload=function(){return e(r)}}))}}],(r=[{key:"onLoad",value:function(){return this.element.style.overflow="hidden",this.base=document.createElement("div"),this.base.style.cssText="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-position: center; background-size: contain; background-repeat: no-repeat; ",this.element.appendChild(this.base),this.fillContainer=document.createElement("div"),this.fillContainer.style.cssText="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; overflow: hidden;",this.element.appendChild(this.fillContainer),this.fill=document.createElement("div"),this.fill.style.cssText="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-position: center; background-size: contain; background-repeat: no-repeat;",this.fillContainer.appendChild(this.fill),this.percentContainer=document.createElement("div"),this.percentContainer.style.cssText="position:absolute; top: 0px; right: 0px; width:auto; height:auto; padding:5px; font-size:9px; color: rgba(0,0,0,0.5)",this.element.appendChild(this.percentContainer),this.refresh()}},{key:"onVatomUpdated",value:function(){return this.refresh()}},{key:"refresh",value:function(){var t=this,n=this.face.properties.config&&this.face.properties.config.empty_image&&this.vatom.properties.resources.find((function(e){return e.name===t.face.properties.config.empty_image}))||this.vatom.properties.resources.find((function(t){return"BaseImage"===t.name}));if(!n)return Promise.reject(new Error("No BaseImage found."));this.base.style.backgroundImage="url(".concat(this.vatomView.blockv.UserManager.encodeAssetProvider(n.value.value),")");var r=this.face.properties.config&&this.face.properties.config.full_image&&this.vatom.properties.resources.find((function(e){return e.name===t.face.properties.config.full_image}))||this.vatom.properties.resources.find((function(t){return"ActivatedImage"===t.name}));return r?(this.fill.style.backgroundImage="url(".concat(this.vatomView.blockv.UserManager.encodeAssetProvider(r.value.value),")"),Promise.all([e.waitForImage(this.vatomView.blockv.UserManager.encodeAssetProvider(n.value.value)),e.waitForImage(this.vatomView.blockv.UserManager.encodeAssetProvider(r.value.value))]).then((function(e){var n=100*Math.min(1,Math.max(0,parseFloat(t.vatom.properties.cloning_score)||0)),r=parseFloat(t.face.properties.config&&t.face.properties.config.padding_start||t.vatom.private.padding_start)||0,i=parseFloat(t.face.properties.config&&t.face.properties.config.padding_end||t.vatom.private.padding_end)||0,o=(t.face.properties.config&&t.face.properties.config.direction||t.vatom.private.direction||"").toLowerCase();"up"===o||"down"===o?(r=r/e[0].height*100,i=i/e[0].height*100):(r=r/e[0].width*100,i=i/e[0].width*100);var a=100-r-i,u=100-Math.floor(n/100*a+r);"up"===o?(t.fillContainer.style.top="".concat(u,"%"),t.fill.style.top="".concat(-1*u,"%")):"down"===o?(t.fillContainer.style.top="".concat(-1*u,"%"),t.fill.style.top="".concat(u,"%")):"left"===o?(t.fillContainer.style.left="".concat(-1*u,"%"),t.fill.style.left="".concat(u,"%")):(t.fillContainer.style.left="".concat(u,"%"),t.fill.style.left="".concat(-1*u,"%"))}))):Promise.reject(new Error("No ActivatedImage found."))}}])&&o(n.prototype,r),s&&o(n,s),e}(n(18).a)},function(t,e,n){"use strict";function r(t){return(r="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 i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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)}}function a(t,e){return!e||"object"!==r(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 u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",(function(){return s}));var s=function(t){function e(){return i(this,e),a(this,u(e).apply(this,arguments))}var n,r,s;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&&c(t,e)}(e,t),n=e,s=[{key:"url",get:function(){return"native://image"}}],(r=[{key:"onLoad",value:function(){return this.updateImage()}},{key:"updateImage",value:function(){this.element.style.backgroundSize="card"===this.face.properties.constraints.view_mode?"cover":"contain",this.element.style.backgroundPosition="center",this.element.style.backgroundRepeat="no-repeat",this.face.properties.config&&"fill"===this.face.properties.config.scale?this.element.style.backgroundSize="cover":this.face.properties.config&&"fit"===this.face.properties.config.scale&&(this.element.style.backgroundSize="contain");var t=this.face.properties.config&&this.face.properties.config.image||this.face.properties.resources&&this.face.properties.resources[0]||"ActivatedImage",e=this.vatom.properties.resources.find((function(e){return e.name===t}));if(!e)return Promise.reject(new Error("No image found to display."));var n=this.vatomView.blockv.UserManager.encodeAssetProvider(e.value.value);return this.element.style.backgroundImage="url('".concat(n,"')"),this.showImage(n)}},{key:"showImage",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.src=t,r.onload=e,r.onerror=function(t){return n(new Error("Couldn't load image"))}}))}}])&&o(n.prototype,r),s&&o(n,s),e}(n(18).a)},function(t,e,n){"use strict";(function(t){function r(t){return(r="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 i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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)}}function a(t,e){return!e||"object"!==r(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 u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",(function(){return s}));var s=function(e){function n(){return i(this,n),a(this,u(n).apply(this,arguments))}var s,l,f;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&&c(t,e)}(n,e),s=n,f=[{key:"imageURL",value:function(e,n,i){var o=e.dataPool.region("inventory").get(!1).filter((function(t){return t.properties.parent_id==n.id})),a=i.properties.config&&i.properties.config.image_policy||n.private.image_policy||n.properties.icon_stages||[],u=!0,c=!1,s=void 0;try{for(var l,f=function(){var t=l.value;if(void 0!==t.count_max){if(o.length>t.count_max)return"continue"}else if(t.field){for(var e=t.field.split(/\.(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/).map((function(t){return t.replace(/"/g,"")})),r=n.payload;e.length>0&&(r=r[e[0]],e.splice(0,1),r););if(t.value!==r)return"continue"}if(p=n.properties.resources.find((function(e){return e.name===t.resource})))return{v:p.value.value}},h=a[Symbol.iterator]();!(u=(l=h.next()).done);u=!0){var p,d=f();switch(d){case"continue":continue;default:if("object"===r(d))return d.v}}}catch(t){c=!0,s=t}finally{try{u||null==h.return||h.return()}finally{if(c)throw s}}t.warn("Image policy face: No policy matched, resorting to the ActivatedImage.");var v=n.properties.resources.find((function(t){return"ActivatedImage"===t.name}));return v&&v.value.value}},{key:"waitForImage",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.src=t,r.onerror=n,r.onload=e}))}}],(l=[{key:"onLoad",value:function(){return this.refreshImage()}},{key:"onVatomUpdated",value:function(){this.refreshImage()}},{key:"refreshImage",value:function(){this.element.style.backgroundSize=this.face.properties.config&&this.face.properties.config.image_mode||this.vatomView.vatom.properties.image_mode||"contain",this.element.style.backgroundPosition="center",this.element.style.backgroundRepeat="no-repeat";var t=n.imageURL(this.vatomView.blockv,this.vatom,this.face);if(!t)throw new Error("No policy found, and no ActivatedImage resource available.");return t=this.vatomView.blockv.UserManager.encodeAssetProvider(t),this.element.style.backgroundImage="url(".concat(t,")"),this.element.style.backgroundSize="contain",n.waitForImage(t)}}])&&o(s.prototype,l),f&&o(s,f),n}(n(18).a)}).call(this,n(7))},function(t,e,n){"use strict";function r(t){return(r="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 i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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)}}function a(t,e){return!e||"object"!==r(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 u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",(function(){return s}));var s=function(t){function e(){return i(this,e),a(this,u(e).apply(this,arguments))}var n,r,s;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&&c(t,e)}(e,t),n=e,s=[{key:"waitForImage",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.src=t,r.onerror=n,r.onload=e}))}}],(r=[{key:"onLoad",value:function(){return this.reloadImages()}},{key:"encodeUrl",value:function(t,e){var n=t.properties.resources.find((function(t){return t.name===e}));return n?this.vatomView.blockv.UserManager.encodeAssetProvider(n.value.value):null}},{key:"onVatomUpdated",value:function(){return this.reloadImages()}},{key:"getLayerImage",value:function(t){return this.encodeUrl(t,this.face.properties.config&&this.face.properties.config.layerImage)||this.encodeUrl(t,"LayeredImage")||this.encodeUrl(t,"ActivatedImage")}},{key:"reloadImages",value:function(){var t=this,n=this.getLayerImage(this.vatom),r=[this.createImageNode(n)],i=[e.waitForImage(n)],o=this.vatomView.blockv.dataPool.region("inventory").get(!1).filter((function(e){return e.properties.parent_id==t.vatom.id})),a=!0,u=!1,c=void 0;try{for(var s,l=o[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var f=s.value,h=this.getLayerImage(f);h&&(r.push(this.createImageNode(h)),i.push(e.waitForImage(h)))}}catch(t){u=!0,c=t}finally{try{a||null==l.return||l.return()}finally{if(u)throw c}}var p=!0,d=!1,v=void 0;try{for(var y,m=(this.images||[])[Symbol.iterator]();!(p=(y=m.next()).done);p=!0){var b=y.value;b.parentNode.removeChild(b)}}catch(t){d=!0,v=t}finally{try{p||null==m.return||m.return()}finally{if(d)throw v}}this.images=r;for(var g=0,w=r;g<w.length;g++){var k=w[g];this.element.appendChild(k)}return Promise.all(i)}},{key:"createImageNode",value:function(t){var e=document.createElement("div");return e.style.cssText="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-position: center; background-size: contain; background-repeat: no-repeat; ",e.style.backgroundImage="url(".concat(t,")"),e}}])&&o(n.prototype,r),s&&o(n,s),e}(n(18).a)},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return d}));var r=n(18),i=n(179),o=n(180);function a(t){return(a="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,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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){return!e||"object"!==a(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 h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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(){return s(this,n),f(this,h(n).apply(this,arguments))}var r,a,d,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&&p(t,e)}(n,e),r=n,(a=[{key:"onLoad",value:function(){return this.pendingRequests={},this.iframe=document.createElement("iframe"),this.iframe.style.cssText="display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; overflow: hidden; border: none; background: none; outline: none; z-index:0;",this.iframe.setAttribute("src",this.face.properties.display_url),this.element.appendChild(this.iframe),this.owner=this.vatomView.vatom.properties.owner,this.user=this.vatomView.blockv.UserManager.getPublicUserProfile(this.owner),this.version=null,this.BridgeV1=new i.a(this.vatomView.blockv,this.vatom,this.face),this.BridgeV2=new o.a(this.vatomView.blockv,this.vatom,this.face),this.observeListenerSet=!1,this.listChildren=[],this.onIncomingBridgeMessage=this.onIncomingBridgeMessage.bind(this),window.addEventListener("message",this.onIncomingBridgeMessage),Promise.resolve()}},{key:"onUnload",value:function(){this.element.removeChild(this.iframe),this.iframe.onload=null,this.iframe=null,window.removeEventListener("message",this.onIncomingBridgeMessage),this.observeListenerSet&&this.vatomView.blockv.dataPool.region("inventory").removeEventListener("object.updated",this.observeChildren)}},{key:"processIncomingBridgeMessage",value:function(t,e){switch(t){case"vatom.init":return this.version=1,this.BridgeV1.init(e);case"vatom.children.get":return this.BridgeV1.getChildren(e);case"vatom.rpc.call":return this.BridgeV1.rpc();case"vatom.performAction":return this.BridgeV1.performAction(e);case"user.profile.fetch":case"user.avatar.fetch":return this.BridgeV1.getUser();case"vatom.patch":return this.BridgeV1.patchVatom(e);case"vatom.get":return this.BridgeV1.getVatom(e);case"core.init":return this.version=2,this.BridgeV2.init(e);case"core.user.get":return this.BridgeV2.getUserProfile(e);case"core.user.current.get":return this.BridgeV2.getCurrentUser(e);case"core.vatom.get":return this.BridgeV2.getVatom();case"core.vatom.children.get":return this.BridgeV2.getVatomChildren(e);case"core.vatom.parent.set":return this.BridgeV2.vatomParentSet(e);case"core.vatom.children.observe":return this.observeListenerSet||(this.observeChildren=this.observeChildren.bind(this),this.vatomView.blockv.dataPool.region("inventory").addEventListener("object.updated",this.observeChildren),this.observeListenerSet=!0),this.observeChildren(e.id);case"core.action.perform":return this.BridgeV2.performAction(e);case"core.resource.encode":return this.BridgeV2.encodeResource(e);default:return this.vatomView&&this.vatomView.onMessage?this.vatomView.onMessage(t,e):Promise.reject(new Error("Bridge message not implemented."))}}},{key:"onIncomingBridgeMessage",value:function(t){var e=this,n=t.data;if(n&&this.iframe&&t.source===this.iframe.contentWindow){var r=null;if(n.responseID&&(r=n.responseID),n.response_id&&this.pendingRequests[n.response_id]){if(n.error_message){var i=new Error(n.error_message);return i.code=n.error_code||"unknown_error",this.pendingRequests[n.response_id].reject(i),void delete this.pendingRequests[n.response_id]}return this.pendingRequests[n.response_id].resolve(n.payload),void delete this.pendingRequests[n.response_id]}Promise.resolve(this.processIncomingBridgeMessage(n.name,n.data||n.payload)).then((function(t){"2.0.0"===n.version?e.sendV2Message(n.request_id,n.name,t):e.sendv1Message(r||t._responseName,t)})).catch((function(t){"2.0.0"===n.version?e.sendV2Message(n.request_id,n.name,{error_code:t.code||"unknown_error",error_message:t.message},!1):e.sendv1Message(r,{errorCode:t.code,errorText:t.message})}))}}},{key:"sendv1Message",value:function(t,e){this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage({source:"VatomicSDK",name:t,data:e},"*")}},{key:"sendV2Message",value:function(t,e,n,r){var i;this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage((c(i={},r?"request_id":"response_id",t),c(i,"source","BLOCKv SDK"),c(i,"name",e),c(i,"payload",n),c(i,"version","2.0.0"),i),"*")}},{key:"sendRequest",value:function(t,e){var n=this,r=Math.random().toString(36).substr(2);return this.sendV2Message(r,t,e,!0),new Promise((function(t,e){n.pendingRequests[r]={resolve:t,reject:e}}))}},{key:"vatomStateChanged",value:function(t){if(1===this.version){if(t.id===this.vatom.id&&this.face){var e={},n=!0,r=!1,i=void 0;try{for(var o,a=this.vatomView.vatom.properties.resources[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;e[u.name]=u.value.value}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}var c={vatomInfo:{id:this.vatomView.vatom.id,properties:this.vatomView.vatom.properties,resources:e,faceProperties:this.face.properties}};this.sendv1Message("vatom.updated",c)}}else t.id===this.vatom.id&&this.face&&this.sendV2Message("res_1","core.vatom.update",{vatom:this.BridgeV2.encodeVatom(t)},!0)}},{key:"observeChildren",value:(v=regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.log("payload from observe",n),this.vatom.id===n&&(r=this.vatomView.blockv.dataPool.region("inventory").get(!1).filter((function(t){return t.properties.parent_id===n})).map(this.mapVatom),this.sendV2Message(Math.random(),"core.vatom.children.update",{id:n,vatoms:r},!0));case 2:case"end":return e.stop()}}),e,this)})),y=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=v.apply(t,e);function o(t){u(i,n,r,o,a,"next",t)}function a(t){u(i,n,r,o,a,"throw",t)}o(void 0)}))},function(t){return y.apply(this,arguments)})},{key:"onVatomUpdated",value:function(){this.vatomStateChanged(this.vatom)}},{key:"mapVatom",value:function(t){return Object.assign({actions:t.actions,faces:t.faces},t.payload)}}])&&l(r.prototype,a),d&&l(r,d),n}(r.a)}).call(this,n(7))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(19),i=n.n(r);function o(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function a(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 t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.blockv=e,this.vatom=n,this.face=r,this.version=1}var e,n,r,u,c;return e=t,(n=[{key:"init",value:function(){var t=this,e=this.encodeVatom(this.vatom);return e.vatomInfo.faceProperties=this.face.properties||{},null!=this.blockv.store.userID&&this.blockv.UserManager.getCurrentUser().then((function(n){e.user=t.encodeUser(n)})),e._responseName="vatom.init-complete",e}},{key:"getChildren",value:function(t){var e=this;return this.blockv.Vatoms.getVatomChildren(t.id).then((function(t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value;n.push(e.encodeVatom(c))}}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return{items:n,_responseName:"vatom.children.get-response"}}))}},{key:"rpc",value:function(t){return Events.callEvent("websocket.rpc",t),{}}},{key:"performAction",value:function(t){return this.blockv.Vatoms.performAction(t.actionData["this.id"],t.actionName,t.actionData)}},{key:"getProfile",value:function(t){var e=this;return this.vatomView.blockv.UserManager.getCurrentUser().then((function(t){return{firstName:t.firstName,lastName:t.lastName,avatarURL:e.blockv.UserManager.encodeAssetProvider(t.avatarURL)}}))}},{key:"patchVatom",value:function(t){return this.blockv.request("PATCH","/vatoms",t,!0)}},{key:"getVatom",value:function(t){var e=this;return this.blockv.Vatoms.getUserVatoms([t.id]).then((function(t){return e.encodeVatom(t[0])}))}},{key:"getUser",value:(u=regeneratorRuntime.mark((function t(){var e,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.vatom.properties.owner,t.abrupt("return",this.blockv.UserManager.getPublicUserProfile(e).then((function(t){return n.encodeUser(t)})));case 2:case"end":return t.stop()}}),t,this)})),c=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=u.apply(t,e);function a(t){o(i,n,r,a,c,"next",t)}function c(t){o(i,n,r,a,c,"throw",t)}a(void 0)}))},function(){return c.apply(this,arguments)})},{key:"encodeVatom",value:function(t){for(var e={},n=0;n<t.properties.resources.length;n++)e[t.properties.resources[n].name]=this.blockv.UserManager.encodeAssetProvider(t.properties.resources[n].value.value);if(t.private&&t.private.resources)for(var r=0;r<t.private.resources.length;r++)e[t.private.resources[r].name]=this.blockv.UserManager.encodeAssetProvider(t.private.resources[r].value.value);return{vatomInfo:{id:t.id,properties:i.a.merge({},t.properties,t.private),resources:e}}}},{key:"encodeUser",value:function(t){return{id:t.id,firstName:t.firstName,lastName:t.lastName,avatarURL:this.blockv.UserManager.encodeAssetProvider(t.avatarURI)}}}])&&a(e.prototype,n),r&&a(e,r),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n(19);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.blockv=e,this.vatom=this.encodeVatom(n),this.face=r,this.version=2}var e,n,i;return e=t,(n=[{key:"init",value:function(){return{vatom:this.vatom,face:this.face}}},{key:"getVatom",value:function(){var t=this;return this.blockv.Vatoms.getUserVatoms([this.vatom.id]).then((function(e){return{vatom:t.encodeVatom(e[0])}}))}},{key:"getVatomChildren",value:function(){return this.blockv.Vatoms.getVatomChildren(this.vatom.id).then((function(t){return{vatoms:t.map((function(t){return Object.assign({actions:t.actions,faces:t.faces},t.payload)}))}}))}},{key:"vatomParentSet",value:function(t){return this.blockv.Vatoms.setParent(t).then((function(t){return{new_parent_id:t}}))}},{key:"observeChildren",value:function(t){var e=t;return this.blockv.Vatoms.observeChildren(t.id).then((function(t){return{id:e,vatoms:t}}))}},{key:"performAction",value:function(t){if(this.vatom.id===t.payload["this.id"])return this.blockv.Vatoms.performAction(t.payload["this.id"],t.action_name,t.payload)}},{key:"getUserProfile",value:function(t){var e=this;return this.blockv.UserManager.getPublicUserProfile(this.vatom["vAtom::vAtomType"].owner).then((function(t){return e.encodeUser(t)}))}},{key:"getCurrentUser",value:function(t){return Promise.all([this.blockv.UserManager.getPublicUserProfile(this.vatom["vAtom::vAtomType"].owner),this.blockv.UserManager.getCurrentUserTokens()]).then((function(t){var e=t[0],n=t[1];return{user:{id:e.id,properties:{avatar_uri:e.properties.avatar_uri,first_name:e.properties.first_name,last_name:e.properties.last_name,is_guest:!!e.properties.guest_id},tokens:{has_email:n.some((function(t){return"email"==t.properties.token_type})),has_phone:n.some((function(t){return"phone_number"==t.properties.token_type})),has_verified_email:n.some((function(t){return t.properties.confirmed&&"email"==t.properties.token_type})),has_verified_phone:n.some((function(t){return t.properties.confirmed&&"phone_number"==t.properties.token_type}))}}}}))}},{key:"encodeResource",value:function(t){var e=[],n=!0,r=!1,i=void 0;try{for(var o,a=t.urls[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value,c=this.blockv.UserManager.encodeAssetProvider(u);e.push(c)}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return{urls:e}}},{key:"updateVatom",value:function(t){this.vatom=t}},{key:"customMessage",value:function(t){return t}},{key:"encodeVatom",value:function(t){return Object.assign({},t.payload,{faces:t.faces},{actions:t.actions})}},{key:"encodeUser",value:function(t){return{user:{id:t.id,properties:{avatar_uri:t.properties.avatar_uri,first_name:t.properties.first_name,last_name:t.properties.last_name}}}}}])&&r(e.prototype,n),i&&r(e,i),t}()},function(t,e,n){n(182),t.exports=n(405)},function(t,e,n){"use strict";(function(t){n(188);var e,r=(e=n(360))&&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(7))},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(186);
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 a=n(64),u=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(a.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||!a.isFunction(t))return a.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(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.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 u=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===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(a.isPrimitive(t)||a.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 u,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(u=l[s],!g(t[u],e[u],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 k(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 Z(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,u=!t&&i&&!n;if((!t&&a.isError(i)&&o&&k(i,n)||u)&&m(i,n,"Got unwanted exception"+r),t&&i&&n&&!k(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 a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.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){Z(!0,t,e,n)},h.doesNotThrow=function(t,e,n){Z(!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)u.call(t,n)&&e.push(n);return e}}).call(this,n(21))},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 a(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,u,c=a(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){u=r(n);for(var f=0;f<u.length;f++)o.call(n,u[f])&&(c[u[f]]=n[u[f]])}}return c}},function(t,e){t.exports=function(){return(new Date).getTime()}},function(t,e,n){"use strict";n(189),n(332),n(334),n(337),n(339),n(341),n(343),n(345),n(347),n(349),n(351),n(353),n(355),n(359)},function(t,e,n){n(190),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(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),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(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(271),n(272),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(104),n(295),n(138),n(296),n(139),n(297),n(298),n(299),n(300),n(140),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),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),t.exports=n(9)},function(t,e,n){"use strict";var r=n(2),i=n(15),o=n(10),a=n(0),u=n(13),c=n(35).KEY,s=n(3),l=n(65),f=n(49),h=n(39),p=n(6),d=n(85),v=n(119),y=n(192),m=n(68),b=n(4),g=n(5),w=n(12),k=n(17),Z=n(34),S=n(38),x=n(43),_=n(122),I=n(26),R=n(67),V=n(11),W=n(41),T=I.f,M=V.f,j=_.f,E=r.Symbol,G=r.JSON,X=G&&G.stringify,P=p("_hidden"),N=p("toPrimitive"),L={}.propertyIsEnumerable,C=l("symbol-registry"),U=l("symbols"),B=l("op-symbols"),A=Object.prototype,O="function"==typeof E&&!!R.f,Y=r.QObject,F=!Y||!Y.prototype||!Y.prototype.findChild,J=o&&s((function(){return 7!=x(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=T(A,e);r&&delete A[e],M(t,e,n),r&&t!==A&&M(A,e,r)}:M,D=function(t){var e=U[t]=x(E.prototype);return e._k=t,e},H=O&&"symbol"==typeof E.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof E},z=function(t,e,n){return t===A&&z(B,e,n),b(t),e=Z(e,!0),b(n),i(U,e)?(n.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),n=x(n,{enumerable:S(0,!1)})):(i(t,P)||M(t,P,S(1,{})),t[P][e]=!0),J(t,e,n)):M(t,e,n)},K=function(t,e){b(t);for(var n,r=y(e=k(e)),i=0,o=r.length;o>i;)z(t,n=r[i++],e[n]);return t},Q=function(t){var e=L.call(this,t=Z(t,!0));return!(this===A&&i(U,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,P)&&this[P][t])||e)},q=function(t,e){if(t=k(t),e=Z(e,!0),t!==A||!i(U,e)||i(B,e)){var n=T(t,e);return!n||!i(U,e)||i(t,P)&&t[P][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=j(k(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==P||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===A,r=j(n?B:k(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(A,e)||o.push(U[e]);return o};O||(u((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===A&&e.call(B,n),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),J(this,t,S(1,n))};return o&&F&&J(A,t,{configurable:!0,set:e}),D(t)}).prototype,"toString",(function(){return this._k})),I.f=q,V.f=z,n(44).f=_.f=$,n(58).f=Q,R.f=tt,o&&!n(40)&&u(A,"propertyIsEnumerable",Q,!0),d.f=function(t){return D(p(t))}),a(a.G+a.W+a.F*!O,{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++]);a(a.S+a.F*!O,"Symbol",{for:function(t){return i(C,t+="")?C[t]:C[t]=E(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in C)if(C[e]===t)return e},useSetter:function(){F=!0},useSimple:function(){F=!1}}),a(a.S+a.F*!O,"Object",{create:function(t,e){return void 0===e?x(t):K(x(t),e)},defineProperty:z,defineProperties:K,getOwnPropertyDescriptor:q,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=s((function(){R.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return R.f(w(t))}}),G&&a(a.S+a.F*(!O||s((function(){var t=E();return"[null]"!=X([t])||"{}"!=X({a:t})||"{}"!=X(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)&&!H(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,X.apply(G,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(65)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(41),i=n(67),o=n(58);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,u=n(t),c=o.f,s=0;u.length>s;)c.call(t,a=u[s++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(43)})},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(121)})},function(t,e,n){var r=n(17),i=n(26).f;n(27)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(r(t),e)}}))},function(t,e,n){var r=n(12),i=n(45);n(27)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,e,n){var r=n(12),i=n(41);n(27)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){n(27)("getOwnPropertyNames",(function(){return n(122).f}))},function(t,e,n){var r=n(5),i=n(35).onFreeze;n(27)("freeze",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(5),i=n(35).onFreeze;n(27)("seal",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(5),i=n(35).onFreeze;n(27)("preventExtensions",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(5);n(27)("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(5);n(27)("isSealed",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(5);n(27)("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(123)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(124)})},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(89).set})},function(t,e,n){"use strict";var r=n(59),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(125)})},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(45),o=n(6)("hasInstance"),a=Function.prototype;o in a||n(11).f(a,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(127);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(0),i=n(128);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(2),i=n(15),o=n(30),a=n(91),u=n(34),c=n(3),s=n(44).f,l=n(26).f,f=n(11).f,h=n(50).trim,p=r.Number,d=p,v=p.prototype,y="Number"==o(n(43)(v)),m="trim"in String.prototype,b=function(t){var e=u(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 a,c=e.slice(2),s=0,l=c.length;s<l;s++)if((a=c.charCodeAt(s))<48||a>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))?a(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(","),k=0;w.length>k;k++)i(d,g=w[k])&&!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(25),o=n(129),a=n(92),u=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+a.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*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){u.call({})}))),"Number",{toFixed:function(t){var e,n,r,u,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()+a.call("0",s);return y=s>0?v+((u=y.length)<=s?"0."+a.call("0",s-u)+y:y.slice(0,u-s)+"."+y.slice(u-s)):v+y}})},function(t,e,n){"use strict";var r=n(0),i=n(3),o=n(129),a=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.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(130)})},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(130),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(128);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(127);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(0),i=n(131),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(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(93);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(94);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(235)})},function(t,e,n){var r=n(93),i=Math.pow,o=i(2,-52),a=i(2,-23),u=i(2,127)*(2-a),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/a+1/o-1/o)*c*a:(n=(e=(1+a/o)*i)-(e-i))>u||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,a=0,u=arguments.length,c=0;a<u;)c<(n=i(arguments[a++]))?(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(131)})},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(93)})},function(t,e,n){var r=n(0),i=n(94),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(94),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(42),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],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(8);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},function(t,e,n){"use strict";n(50)("trim",(function(t){return function(){return t(this,3)}}))},function(t,e,n){"use strict";var r=n(95)(!0);n(96)(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(95)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(97),a="".endsWith;r(r.P+r.F*n(99)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),u=void 0===n?r:Math.min(i(n),r),c=String(t);return a?a.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){"use strict";var r=n(0),i=n(97);r(r.P+r.F*n(99)("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(92)})},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(97),a="".startsWith;r(r.P+r.F*n(99)("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 a?a.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(34);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(270);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,a=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)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(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(273))},function(t,e,n){"use strict";var r=n(4),i=n(34);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(68)})},function(t,e,n){"use strict";var r=n(23),i=n(0),o=n(12),a=n(133),u=n(100),c=n(8),s=n(101),l=n(102);i(i.S+i.F*!n(69)((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&&u(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?a(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(101);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(57)!=Object||!n(22)(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(88),o=n(30),a=n(42),u=n(8),c=[].slice;r(r.P+r.F*n(3)((function(){i&&c.call(i)})),"Array",{slice:function(t,e){var n=u(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var i=a(t,n),s=a(e,n),l=u(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(24),o=n(12),a=n(3),u=[].sort,c=[1,2,3];r(r.P+r.F*(a((function(){c.sort(void 0)}))||!a((function(){c.sort(null)}))||!n(22)(u)),"Array",{sort:function(t){return void 0===t?u.call(o(this)):u.call(o(this),i(t))}})},function(t,e,n){"use strict";var r=n(0),i=n(28)(0),o=n(22)([].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(68),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(28)(1);r(r.P+r.F*!n(22)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(28)(2);r(r.P+r.F*!n(22)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(28)(3);r(r.P+r.F*!n(22)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(28)(4);r(r.P+r.F*!n(22)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(135);r(r.P+r.F*!n(22)([].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(135);r(r.P+r.F*!n(22)([].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(66)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(22)(o)),"Array",{indexOf:function(t){return a?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(25),a=n(8),u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(22)(u)),"Array",{lastIndexOf:function(t){if(c)return u.apply(this,arguments)||0;var e=i(this),n=a(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(136)}),n(46)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(103)}),n(46)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(28)(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(46)("find")},function(t,e,n){"use strict";var r=n(0),i=n(28)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(46)(o)},function(t,e,n){n(52)("Array")},function(t,e,n){var r=n(2),i=n(91),o=n(11).f,a=n(44).f,u=n(98),c=n(70),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=u(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=a(l),m=0;y.length>m;)v(y[m++]);f.constructor=s,s.prototype=f,n(13)(r,"RegExp",s)}n(52)("RegExp")},function(t,e,n){"use strict";n(139);var r=n(4),i=n(70),o=n(10),a=/./.toString,u=function(t){n(13)(RegExp.prototype,"toString",t,!0)};n(3)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&u((function(){return a.call(this)}))},function(t,e,n){"use strict";var r=n(4),i=n(8),o=n(106),a=n(71);n(72)("match",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 c=r(t),s=String(this);if(!c.global)return a(c,s);var l=c.unicode;c.lastIndex=0;for(var f,h=[],p=0;null!==(f=a(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(8),a=n(25),u=n(106),c=n(71),s=Math.max,l=Math.min,f=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(72)("replace",2,(function(t,e,n,d){return[function(r,i){var o=t(this),a=null==r?void 0:r[e];return void 0!==a?a.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=u(h,o(f.lastIndex),m))}for(var w,k="",Z=0,S=0;S<b.length;S++){g=b[S];for(var x=String(g[0]),_=s(l(a(g.index),h.length),0),I=[],R=1;R<g.length;R++)I.push(void 0===(w=g[R])?w:String(w));var V=g.groups;if(p){var W=[x].concat(I,_,h);void 0!==V&&W.push(V);var T=String(e.apply(void 0,W))}else T=v(x,h,_,I,V,e);_>=Z&&(k+=h.slice(Z,_)+T,Z=_+x.length)}return k+h.slice(Z)}];function v(t,e,r,o,a,u){var c=r+t.length,s=o.length,l=p;return void 0!==a&&(a=i(a),l=h),n.call(u,l,(function(n,i){var u;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":u=a[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}u=o[l-1]}return void 0===u?"":u}))}}))},function(t,e,n){"use strict";var r=n(4),i=n(124),o=n(71);n(72)("search",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 u=r(t),c=String(this),s=u.lastIndex;i(s,0)||(u.lastIndex=0);var l=o(u,c);return i(u.lastIndex,s)||(u.lastIndex=s),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(98),i=n(4),o=n(60),a=n(106),u=n(8),c=n(71),s=n(105),l=n(3),f=Math.min,h=[].push,p=!l((function(){RegExp(4294967295,"y")}));n(72)("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,a,u,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))&&!((a=d.lastIndex)>f&&(c.push(i.slice(f,o.index)),o.length>1&&o.index<i.length&&h.apply(c,o.slice(1)),u=o[0].length,f=a,c.length>=p));)d.lastIndex===o.index&&d.lastIndex++;return f===i.length?!u&&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,k=0,Z=[];k<h.length;){b.lastIndex=p?k:0;var S,x=c(b,p?h:h.slice(k));if(null===x||(S=f(u(b.lastIndex+(p?0:k)),h.length))===w)k=a(h,k,y);else{if(Z.push(h.slice(w,k)),Z.length===g)return Z;for(var _=1;_<=x.length-1;_++)if(Z.push(x[_]),Z.length===g)return Z;k=w=S}}return Z.push(h.slice(w)),Z}]}))},function(t,e,n){var r=n(2),i=n(107).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,c="process"==n(30)(a);t.exports=function(){var t,e,n,s=function(){var r,i;for(c&&(r=a.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(){a.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var l=u.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(143),i=n(47);t.exports=n(75)("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(143),i=n(47);t.exports=n(75)("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(28)(0),a=n(13),u=n(35),c=n(123),s=n(144),l=n(5),f=n(47),h=n(47),p=!i.ActiveXObject&&"ActiveXObject"in i,d=u.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(75)("WeakMap",m,b,s,!0,!0);h&&p&&(c((r=s.getConstructor(m,"WeakMap")).prototype,b),u.NEED=!0,o(["delete","has","get","set"],(function(t){var e=g.prototype,n=e[t];a(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(144),i=n(47);n(75)("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(76),o=n(108),a=n(4),u=n(42),c=n(8),s=n(5),l=n(2).ArrayBuffer,f=n(60),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(a(this),t);for(var n=a(this).byteLength,r=u(t,n),i=u(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(52)("ArrayBuffer")},function(t,e,n){var r=n(0);r(r.G+r.W+r.F*!n(76).ABV,{DataView:n(108).DataView})},function(t,e,n){n(32)("Int8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(32)("Int16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("Uint16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("Int32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("Uint32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("Float32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(32)("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(24),o=n(4),a=(n(2).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(3)((function(){a((function(){}))})),"Reflect",{apply:function(t,e,n){var r=i(t),c=o(n);return a?a(r,e,c):u.call(r,e,c)}})},function(t,e,n){var r=n(0),i=n(43),o=n(24),a=n(4),u=n(5),c=n(3),s=n(125),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),a(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(u(c)?c:Object.prototype),d=Function.apply.call(t,p,e);return u(d)?d:p}})},function(t,e,n){var r=n(11),i=n(0),o=n(4),a=n(34);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=a(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(26).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(132)(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(26),i=n(45),o=n(15),a=n(0),u=n(5),c=n(4);a(a.S,"Reflect",{get:function t(e,n){var a,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:u(s=i(e))?t(s,n,l):void 0}})},function(t,e,n){var r=n(26),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(45),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(146)})},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(26),o=n(45),a=n(15),u=n(0),c=n(38),s=n(4),l=n(5);u(u.S,"Reflect",{set:function t(e,n,u){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,u,p);d=c(0)}if(a(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=u,r.f(p,n,f)}else r.f(p,n,c(0,u));return!0}return void 0!==d.set&&(d.set.call(p,u),!0)}})},function(t,e,n){var r=n(0),i=n(89);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(333),t.exports=n(9).Array.includes},function(t,e,n){"use strict";var r=n(0),i=n(66)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(46)("includes")},function(t,e,n){n(335),t.exports=n(9).Array.flatMap},function(t,e,n){"use strict";var r=n(0),i=n(336),o=n(12),a=n(8),u=n(24),c=n(134);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return u(t),e=a(r.length),n=c(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(46)("flatMap")},function(t,e,n){"use strict";var r=n(68),i=n(5),o=n(8),a=n(23),u=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&&a(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[u])?!!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(338),t.exports=n(9).String.padStart},function(t,e,n){"use strict";var r=n(0),i=n(147),o=n(74),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(340),t.exports=n(9).String.padEnd},function(t,e,n){"use strict";var r=n(0),i=n(147),o=n(74),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(342),t.exports=n(9).String.trimLeft},function(t,e,n){"use strict";n(50)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){n(344),t.exports=n(9).String.trimRight},function(t,e,n){"use strict";n(50)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){n(346),t.exports=n(85).f("asyncIterator")},function(t,e,n){n(119)("asyncIterator")},function(t,e,n){n(348),t.exports=n(9).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(0),i=n(146),o=n(17),a=n(26),u=n(101);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),c=a.f,s=i(r),l={},f=0;s.length>f;)void 0!==(n=c(r,e=s[f++]))&&u(l,e,n);return l}})},function(t,e,n){n(350),t.exports=n(9).Object.values},function(t,e,n){var r=n(0),i=n(148)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){n(352),t.exports=n(9).Object.entries},function(t,e,n){var r=n(0),i=n(148)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";n(140),n(354),t.exports=n(9).Promise.finally},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(2),a=n(60),u=n(142);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then((function(){return n}))}:t,n?function(n){return u(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){n(356),n(357),n(358),t.exports=n(9)},function(t,e,n){var r=n(2),i=n(0),o=n(74),a=[].slice,u=/MSIE .\./.test(o),c=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&a.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*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){var r=n(0),i=n(107);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(104),i=n(41),o=n(13),a=n(2),u=n(16),c=n(51),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=a[m],w=g&&g.prototype;if(w&&(w[l]||u(w,l,h),w[f]||u(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",a=r.toStringTag||"@@toStringTag";function u(t,e,n,r){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new Z(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 a=n.delegate;if(a){var u=g(a,n);if(u){if(u===s)continue;return u}}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,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;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,a){var u=c(t[r],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,o,a)}),(function(t){e("throw",t,o,a)})):Promise.resolve(l).then((function(t){s.value=t,o(s)}),(function(t){return e("throw",t,o,a)}))}a(u.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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Z(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[a]=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,a in t||(t[a]="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(u(e,n,r,i));return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},m(y),y[a]="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,Z.prototype={constructor:Z,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(k),!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 a.type="throw",a.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],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){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 a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(a)},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),k(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;k(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(361),t.exports=n(149).global},function(t,e,n){var r=n(362);r(r.G,{global:n(109)})},function(t,e,n){var r=n(109),i=n(149),o=n(363),a=n(365),u=n(372),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])&&u(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]&&a(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(364);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(366),i=n(371);t.exports=n(111)?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(367),i=n(368),o=n(370),a=Object.defineProperty;e.f=n(111)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(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(110);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(111)&&!n(150)((function(){return 7!=Object.defineProperty(n(369)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(110),i=n(109).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(110);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(36),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 a(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function u(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 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,a,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=u(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=u(regeneratorRuntime.mark((function e(){var n,r,o,a,u,c,s,l,f,h,p,d,v,y,m,b,g,w,k,Z,S,x,_,I,R,V,W,T,M,j,E,G,X,P,N,L,C,U,B;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=[],r=this.objects.getExtra("last-stable-sync"),o=!0,a=!1,u=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),a=!0,u=e.t0;case 13:e.prev=13,e.prev=14,o||null==c.return||c.return();case 16:if(e.prev=16,!a){e.next=19;break}throw u;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)k=w.value,h.push({operation:k.operation,template:v,id:k.action.name,type:"action",data:k.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:Z=0;case 58:if(!(Z<n.length)){e.next=90;break}return e.next=61,this.dataPool.Blockv.client.request("POST","/v1/vatom/faces/changes",{templates:n.slice(Z,Math.min(Z+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,_=!0,I=!1,R=void 0,e.prev=68,V=S.faces_changes[x][Symbol.iterator]();!(_=(W=V.next()).done);_=!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,R=e.t6;case 76:e.prev=76,e.prev=77,_||null==V.return||V.return();case 79:if(e.prev=79,!I){e.next=82;break}throw R;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(Z," to ").concat(Math.min(Z+f,n.length)));case 87:Z+=f,e.next=58;break;case 90:for(t.debug("[DataPool > InventoryRegion] Applying ".concat(h.length," face/action changes")),M=[],j=0,E=h;j<E.length;j++)"delete"==(G=E[j]).operation?(t.log("Removing "+G.id),this.removeObjects([G.id])):(t.log("Creating or updating "+G.id),this.addObjects([new i.a(G.type,G.id,G.data)])),M.includes(G.template)||M.push(G.template);X=!0,P=!1,N=void 0,e.prev=96,L=this.objects.values()[Symbol.iterator]();case 98:if(X=(C=L.next()).done){e.next=110;break}if(U=C.value,B=U.data&&U.data["vAtom::vAtomType"]&&U.data["vAtom::vAtomType"].template,M.includes(B)){e.next=103;break}return e.abrupt("continue",107);case 103:if(U.cached){e.next=105;break}return e.abrupt("continue",107);case 105:U.cached=null,this.emit("object.updated",U.id);case 107:X=!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,X||null==L.return||L.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:M.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:(a=u(regeneratorRuntime.mark((function e(){var n,r,o,a,u,c,s,l,f,h,p,d,v,y,m,b,g,w,k,Z,S,x,_,I,R,V,W,T,M,j,E,G,X,P,N,L,C,U;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=[],a=0,u=null;case 18:return a+=1,t.log("[DataPool > InventoryRegion] Fetching page ".concat(a," of sync statuses...")),e.next=23,this.dataPool.Blockv.client.request("GET","/v1/user/vatom/inventory/index?limit=1000"+(u?"&next_token=".concat(u):""),null,!0);case 23:if(c=e.sent,o=o.concat(c.vatoms||[]),u=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(k=e.sent,Z=[],S=!0,x=!1,_=void 0,e.prev=66,I=k.vatoms[Symbol.iterator]();!(S=(R=I.next()).done);S=!0)V=R.value,Z.push(new i.a("vatom",V.id,V));e.next=74;break;case 70:e.prev=70,e.t1=e.catch(66),x=!0,_=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 _;case 80:return e.finish(77);case 81:return e.finish(74);case 82:for(W=!0,T=!1,M=void 0,e.prev=85,j=k.faces[Symbol.iterator]();!(W=(E=j.next()).done);W=!0)G=E.value,Z.push(new i.a("face",G.id,G));e.next=93;break;case 89:e.prev=89,e.t2=e.catch(85),T=!0,M=e.t2;case 93:e.prev=93,e.prev=94,W||null==j.return||j.return();case 96:if(e.prev=96,!T){e.next=99;break}throw M;case 99:return e.finish(96);case 100:return e.finish(93);case 101:for(X=!0,P=!1,N=void 0,e.prev=104,L=k.actions[Symbol.iterator]();!(X=(C=L.next()).done);X=!0)U=C.value,Z.push(new i.a("action",U.name,U));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,X||null==L.return||L.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(Z),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 a.apply(this,arguments)})},{key:"loadV1",value:(o=u(regeneratorRuntime.mark((function e(){var n,r,o,a,u,c,s,l,f,h,p,d,v,y,m,b,g,w,k,Z,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,a=[],u=!0,c=!1,s=void 0,e.prev=11,l=o.vatoms[Symbol.iterator]();!(u=(f=l.next()).done);u=!0)h=f.value,r.push(h.id),a.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,u||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),a.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,k=void 0,e.prev=49,Z=o.actions[Symbol.iterator]();!(g=(S=Z.next()).done);g=!0)x=S.value,r.push(x.name),a.push(new i.a("action",x.name,x));e.next=57;break;case 53:e.prev=53,e.t2=e.catch(49),w=!0,k=e.t2;case 57:e.prev=57,e.prev=58,g||null==Z.return||Z.return();case 60:if(e.prev=60,!w){e.next=63;break}throw k;case 63:return e.finish(60);case 64:return e.finish(57);case 65:if(this.addObjects(a),n+=1,0!==a.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=u(regeneratorRuntime.mark((function e(r){var o,a,u;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:a=e.sent,u=[],a.vatoms.map((function(t){return new i.a("vatom",t.id,t)})).forEach((function(t){return u.push(t)})),a.faces.map((function(t){return new i.a("face",t.id,t)})).forEach((function(t){return u.push(t)})),a.actions.map((function(t){return new i.a("action",t.name,t)})).forEach((function(t){return u.push(t)})),this.addObjects(u),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(7))},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 a=e.charCodeAt(r);n[2*r]=a>>>8,n[2*r+1]=a%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 a=[];return n.forEach((function(e){a.push(t(e))})),o.decompress(a.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,a={},u={},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(a,c)||(a[c]=h++,u[c]=!0),s=l+c,Object.prototype.hasOwnProperty.call(a,s))l=s;else{if(Object.prototype.hasOwnProperty.call(u,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 u[l]}else for(i=a[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++),a[s]=h++,l=String(c)}if(""!==l){if(Object.prototype.hasOwnProperty.call(u,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 u[l]}else for(i=a[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,a,u,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(a=0,c=Math.pow(2,2),s=1;s!=c;)u=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),a|=(u>0?1:0)*s,s<<=1;switch(a){case 0:for(a=0,c=Math.pow(2,8),s=1;s!=c;)u=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),a|=(u>0?1:0)*s,s<<=1;l=t(a);break;case 1:for(a=0,c=Math.pow(2,16),s=1;s!=c;)u=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),a|=(u>0?1:0)*s,s<<=1;l=t(a);break;case 2:return""}for(f[3]=l,o=l,y.push(l);;){if(m.index>e)return"";for(a=0,c=Math.pow(2,d),s=1;s!=c;)u=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),a|=(u>0?1:0)*s,s<<=1;switch(l=a){case 0:for(a=0,c=Math.pow(2,8),s=1;s!=c;)u=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),a|=(u>0?1:0)*s,s<<=1;f[p++]=t(a),l=p-1,h--;break;case 1:for(a=0,c=Math.pow(2,16),s=1;s!=c;)u=m.val&m.position,m.position>>=1,0==m.position&&(m.position=n,m.val=r(m.index++)),a|=(u>0?1:0)*s,s<<=1;f[p++]=t(a),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],a=n[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,r,a)),c=0,l=a>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)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===a&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,u[c++]=255&e);1===a&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,u=n-i;a<u;a+=16383)o.push(l(t,a,a+16383>u?u:a+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,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u<c;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;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,a=[],u=e;u<n;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,a,u=8*i-r-1,c=(1<<u)-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+=u;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-s;else{if(o===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=s}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,u,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?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(e*c-1)*Math.pow(2,i),a+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&u,p+=d,u/=256,i-=8);for(a=a<<i|u,s+=i;s>0;t[n+p]=255&a,p+=d,a/=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,a,u,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)}:(a="setImmediate$"+Math.random()+"$",u=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",u,!1):t.attachEvent("onmessage",u),r=function(e){t.postMessage(a+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(21),n(29))},function(t,e){},function(t,e,n){"use strict";var r=n(114).Buffer,i=n(380);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),a=this.head,u=0;a;)e=a.data,n=o,i=u,e.copy(n,i),u+=a.data.length,a=a.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(7),n(21))},function(t,e,n){var r=n(77),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.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},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.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(159),i=n(61);function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(55),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(115)},function(t,e,n){t.exports=n(48)},function(t,e,n){t.exports=n(113).Transform},function(t,e,n){t.exports=n(113).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]),a=i(e[2]);null===o||null===a||o in r||(r[o]=a)}return r}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(36),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 a(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function u(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=u(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 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"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(36),i=n(62),o=n(1);function a(t){return(a="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,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}function c(t,e){return!e||"object"!==a(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 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"children:"+this.parentID}}]),e}(r.a)},function(t,e,n){var r=n(393);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,a=0,u="";i=e.charAt(a++);~i&&(r=o%4?64*r+i:i,o++%4)?u+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return u}},function(t,e,n){const r=n(79),i=n(402),o=n(403),a=n(404),u=n(160);t.exports=r,t.exports.internal=i,t.exports.usage=o,t.exports.warning=a,t.exports.log=u},function(t,e,n){var r=n(396);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(397).logify_input,i=n(162).titleFormat,o=n(163),a={is_warning:"is_warning",is_usage:"is_usage",is_internal:"is_internal",details:"details"};function u(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(!a[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 u=[];return u=u.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()||(u=u.concat(function(t,e,n){if(t[a.is_warning]&&e.length>0)return[];return[i("Stack Trace"),n.join("\n")]}(n,e,o))).push("\n"),u=u.concat(function(t,e,n){let o=[];var u=(n[a.is_warning]?"Warning":n[a.is_usage]&&"Wrong Usage")||n[a.is_internal]&&"Internal Error"||"Assertion Fail";o.push(i(u)),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[a.is_warning];if(o()){if(i){var u=new Error;throw u.stack=t.join("\n"),u}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=u([].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(7))},function(t,e,n){(function(e){var r=n(163);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 a(t);var e=u(t);if("[object "===e.slice(0,"[object ".length))return a(t);return e}(t);return e&&e.length>1e4?e.slice(0,1e4)+"[CROPPED-BY-REASSERT]":e}function a(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: "+u(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(64).inspect(t):u(e)+"["+i+"][Error](Reassert-stringification)"}}function u(t){return"object"!=typeof t||t.toString?""+t:"[object Object]"}}).call(this,n(7))},function(t,e,n){"use strict";const r=n(399),i=n(401);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(400);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(79);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(79);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(79);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){"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(373).default,n(390).default,n(391).default,n(117).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(168),a=n(56),u=n.n(a);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*u()(e).exp,Date.now()<t-3e4}catch(t){return!1}}}])&&c(e.prototype,n),r&&c(e,r),t}(),l=n(169),f=n(33);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=[],a=[],u=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(u=(l=h.next()).done);u=!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{u||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 k=g.value;o.push({template:k.template,id:k.id,meta:k.meta,properties:k.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var Z=!0,S=!1,x=void 0;try{for(var _,I=function(){var t=_.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})));a.push(n)}},R=r[Symbol.iterator]();!(Z=(_=R.next()).done);Z=!0)I()}catch(t){S=!0,x=t}finally{try{Z||null==R.return||R.return()}finally{if(S)throw x}}return a}))}},{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=[],a=[],u=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(u=(l=h.next()).done);u=!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{u||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 k=g.value;o.push({template:k.template,id:k.id,meta:k.meta,properties:k.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var Z=!0,S=!1,x=void 0;try{for(var _,I=function(){var t=_.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})));a.push(n)},R=r[Symbol.iterator]();!(Z=(_=R.next()).done);Z=!0)I()}catch(t){S=!0,x=t}finally{try{Z||null==R.return||R.return()}finally{if(S)throw x}}return a}))}},{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=[],a=[],u=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(u=(l=h.next()).done);u=!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{u||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 k=g.value;o.push({template:k.template,id:k.id,meta:k.meta,properties:k.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var Z=!0,S=!1,x=void 0;try{for(var _,I=function(){var t=_.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})));a.push(n)},R=r[Symbol.iterator]();!(Z=(_=R.next()).done);Z=!0)I()}catch(t){S=!0,x=t}finally{try{Z||null==R.return||R.return()}finally{if(S)throw x}}return a}))}},{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=[],a=[],u=!0,c=!1,s=void 0;try{for(var l,h=e[Symbol.iterator]();!(u=(l=h.next()).done);u=!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{u||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 k=g.value;o.push({template:k.template,id:k.id,meta:k.meta,properties:k.properties})}}catch(t){m=!0,b=t}finally{try{y||null==w.return||w.return()}finally{if(m)throw b}}var Z=!0,S=!1,x=void 0;try{for(var _,I=function(){var t=_.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})));a.push(n)},R=r[Symbol.iterator]();!(Z=(_=R.next()).done);Z=!0)I()}catch(t){S=!0,x=t}finally{try{Z||null==R.return||R.return()}finally{if(S)throw x}}return a}))}},{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(117);function v(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.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,a,u,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,a=e[Symbol.iterator]();case 7:if(r=(u=a.next()).done){t.next=20;break}return c=u.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==a.return||a.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 a(t){v(o,n,r,a,u,"next",t)}function u(t){v(o,n,r,a,u,"throw",t)}a(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 k=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}(),Z=n(170),S=n(37),x=n.n(S),_=n(172);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 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 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 M=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,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value;this.sockets.push(new _.a(this.store,this.client,u))}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.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}))}}])&&R(n.prototype,r),i&&R(n,i),e}(x.a);function j(t){return(j="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 G(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function X(t,e){return(X=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"!==j(e)&&"function"!=typeof e?G(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(G(n)),n.dataPool.Blockv=G(n),n.dataPool.disableSyncV2=t.disableSyncV2,n.client=new Z.a(G(n));var a=new l.a(G(n)),u=new k(n.client);return n.Activity=new g(u),n.WebSockets=new M(n.store,n.client),n.UserManager=new s(a,n.store),n.Vatoms=new m(G(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&&X(t,e)}(e,t),e}(x.a),N=n(62),L=n(173),C=n(81),U=n(18);window.Blockv=P,window.Discover=N.a,window.VatomView=L.a,window.FaceSelection=C.a,window.BaseFace=U.a}]);
39//# sourceMappingURL=blockv-faces.min.js.map
\No newline at end of file