bare.es5.js 48 KB

12345678910111213
  1. /*!
  2. * @name @waca/barejs
  3. * @version 1.1.20181003
  4. * @license
  5. * Licenced Materials - Property of IBM
  6. *
  7. * (C) Copyright IBM Corp. 2016, 2018
  8. *
  9. * US Government Users Restricted Rights - Use, duplication or
  10. * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  11. */
  12. !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("barejs",[],t):"object"==typeof exports?exports.barejs=t():e.barejs=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(1),n(13),n(16),e.exports=n(18)},function(e,t,n){!function(e,n,r,i,o,s,a,u,l,c){"use strict";function f(e){return this[e]}function h(e,t){return this[e]=t}function p(e){if(e&&"object"==typeof e){if(te.call(e,"value"))return e.value;if(te.call(e,"get"))return e.get}return e}function d(e,t,n,r){var i;if(e&&"object"==typeof e)if(te.call(e,"value"))i=e;else if(te.call(e,"get")||te.call(e,"set")){if(i=e,!s.propertyGetSetSupport)return null;"string"==typeof i.get&&(i.getterName=i.get,i.get=p(n[i.get]||r&&r[i.get])),"string"==typeof i.set&&(i.setterName=i.set,i.set=p(n[i.set]||r&&r[i.set]))}return i||(i={enumerable:s.shouldBeEnumerable(t),writable:!0,value:e}),i}function y(e,t){var n,r,i=!1;switch(e&&typeof e){case"function":i=!0;break;case"object":if(i=e===se||e===le,!i){if(n="allowGet"in e&&e.allowGet,r="allowSet"in e&&e.allowSet,"boolean"!=typeof n)throw new o("allowGet value is not a boolean");if("boolean"!=typeof r)throw new o("allowSet value is not a boolean");i=n||r}}if(!i)throw new o("Values on an interface prototype must be either a function or an object containing allowGet or allowSet boolean properties.");return{enumerable:!0,value:e}}function v(e,t,n,r){ne&&!te.call(e,"name")&&s.defineProperty(e,"name",{configurable:!0,value:n}),"displayName"in e||s.defineProperty(e,"displayName",{configurable:!0,value:t+"."+n+(r||"")})}function m(t,n,r,i){if(t){t=e(t);for(var o,a,u,c=e.keys(t),f=0,h=c.length;f<h;++f)o=c[f],u=re.exec(o),u&&(u=l[u[1]||u[2]],"symbol"!=typeof u)?delete t[o]:(a=r(t[o],u||o,t,n),u?(delete t[o],t[u]=a):t[o]!==a&&(null===a?delete t[o]:t[o]=a),a&&i&&("value"in a?s.isCallable(a.value)&&v(a.value,i,o):(a.get&&!a.getterName&&v(a.get,i,o," [GET]"),a.set&&!a.setterName&&v(a.set,i,o," [SET]"))))}return t}function g(e){if("function"!=typeof e)throw new o("_class must be a function");if(J.has(e))throw new i("Already declared uncastable");var t=l(e.name);return J.add(e),Q.set(t,e),t}function w(t,n,r){return t.prototype=e.create(n.prototype,r||void 0),s.defineProperty(t.prototype,"constructor",{writable:!0,value:t}),s.defineProperty(t,"superclass",{value:n})}function b(e,t){this.interfaces=e,this.name=t}function _(e,t){b.call(this,[e],t)}function x(e,t,n,r){b.call(this,e,t),this.allowGet=n,this.allowSet=r}function S(){this.directMembers=[],this.inheritedMembers=[],this.members=null}function P(t){this.names=s.freeze(e.keys(t)),this.values=s.freeze(this.names.map(f,t))}function O(){}function E(){}function k(){}function j(){}function C(t){var n=null;return"function"==typeof t&&(n=s.getPrototypeOf(t.prototype),n=n&&n.constructor?n.constructor:e),n}function I(e){var t=null===e?"null":typeof e;if("function"===t)e.prototype instanceof k?t="interface":e.prototype instanceof j?t="enum":"prototype"in e?"superclass"in e&&(t="class"):t="native function";else if("object"===t){if(n.isArray(e))return"array";e instanceof j?t="enum":e instanceof k&&(t="proxy")}return t}function M(e){return e?"function"==typeof e?e.name||null:e.constructor?e.constructor.name||null:null:null}function T(e){var t=M(e);return t?I(e)+" "+t:I(e)}function A(t,n,r){if(n&&ae.indexOf(n)<0){for(var i,o=s.getOwnPropertyDescriptors(n),a=e.keys(o),u=0,l=a.length;u<l;++u){var c=a[u];if(!("string"==typeof c&&ie.test(c)||te.call(t,c)||r&&te.call(r,c)||n.$private&&n.$private(c))){var p=o[c];"value"in p&&"function"!=typeof p.value&&p.writable&&s.propertyGetSetSupport&&(p={configurable:p.configurable,enumerable:p.enumerable,get:f.bind(n,c),set:h.bind(n,c)}),p.configurable=!0,i||(i={}),i[c]=p}}i&&Y(t,i)}r&&Y(t,r)}function N(e,t,n){var r=n&&n.slice(0)||[];if(t&&t.length)for(var o=0,a=t.length;o<a;++o){if(C(t[o])!==k)throw new i("Interface "+o+" is not a valid interface.");r.indexOf(t[o])<0&&r.push(t[o])}s.defineProperty(e,"interfaces",{value:s.freeze(r)})}function D(e,t){if(e===t)return!0;if(e.interfaces)for(var n=0,r=e.interfaces.length;n<r;++n)if(D(e.interfaces[n],t))return!0;return!1}function z(t,n){return e.is(U(t)?t.as(ce):t,U(n)?n.as(ce):n)}function F(e){return"function"==typeof e&&e.prototype instanceof k}function G(e){return e instanceof j}function U(e){return e instanceof k&&e.hasOwnProperty("as")}function L(e,t){if("function"!=typeof e)throw new o("_class is not a (constructor) function");if("function"!=typeof t)throw new o("_base is not a (constructor) function");return e===t||e.prototype instanceof t}function R(t,n){if(!F(n))throw new o(T(n)+" is not a valid Interface");if(!t)throw new i("Cannot proxy "+T(t)+" as "+T(n));if(U(t))return R(t.as(ce),n);for(var r,a,u={constructor:{value:n},as:{value:fe.as.value.bind(t)},is:{value:fe.is.value.bind(t)}},l=S.get(n).members,c=0,p=l.length;c<p;++c)switch((r=l[c]).type){case"function":if(a=t[r.name],"function"!=typeof a)throw new i("as( "+T(n)+" ) expected "+r+" to be on "+T(t.constructor)+", but it is missing.");u[r.name]={value:a.bind(t),enumerable:!0};break;case"property":if(!(r.name in t))throw new i("as( "+T(n)+" ) expected "+r+" to be on "+T(t.constructor)+", but it is missing.");s.propertyGetSetSupport?(a={enumerable:!0},r.allowGet&&(a.get=f.bind(t,r.name)),r.allowSet&&(a.set=h.bind(t,r.name)),u[r.name]=a):void 0!==typeof console&&console.warn("interface proxy skipping "+r+", since the environment doesn't support getters and setters.")}return s.seal(e.create(n.prototype,u))}function K(t,n){var r=!!t;if(r){t=e(t);for(var i=S.get(n).members,o=i.length-1;r&&o>=0;--o)switch(i[o].type){case"function":r="function"==typeof t[i[o].name];break;case"property":r=i[o].name in t}}return r}function H(t,n,r){if(!F(n))throw new o("hasInterface: _interface must be an interface defined with decl.declareInterface, but is "+T(n));if(!t)return!1;if(U(t))return H(t.as(ce),n,r);for(var i="function"==typeof t,s=i?t:t.constructor;s&&s!==e&&s!==k&&s!==j;s=C(s))if(s.interfaces&&D(s,n))return!0;return r!==!0&&K(i?t.prototype:t,n)}function W(t){var n=t.length;return n>0&&"function"!=typeof t[n-1]?e(t.pop()):null}function $(t,n,r){var i=n[0],o=null,a=null,u=null,l=null;return n.length>1&&(a=ee.call(n,1,n.length),(null===a[0]||"function"==typeof a[0]&&!F(a[0]))&&(o=a.shift()),l=W(a),u=W(a)),null===o&&(o=e),w(i,o,m(l,o&&o.prototype,d,(i.name||"(Class)")+".prototype")),N(i,a,o.interfaces),(o!==e||u)&&A(i,o,u),"as"in i.prototype||s.defineProperties(i.prototype,fe),i}function Z(e){return $("abstractClass",arguments)}function q(e){return $("declareClass",arguments,ue)}function B(e){var t=null,n=null,r=null;return arguments.length>1&&(t=ee.call(arguments,1,arguments.length),r=W(t),n=W(t)),w(e,k,m(r,k.prototype,y,e.name||"(Interface)")),N(e,t,null),n&&A(e,null,n),e}function V(e){return w(e,j,m(arguments[1],j.prototype,d,e.name||"(Enum)")),s.freeze(new e)}function Y(e,t){if(!t)throw new i("Missing definition");return s.defineProperties(e,m(t,e,d,arguments.length>2?r(arguments[2]):e.name))}function X(t,n,r){if(!F(n))throw new o(n+" is not an interface");var i=S.get(n),s=i.members[0];if(1!==i.members.length||"function"!==s.type)throw new o(n.prototype+" is not a functional interface, functional interfaces have a single method");if(null===t||void 0===t)return null;if("function"==typeof t){var a={};return a[s.name]={enumerable:!0,value:t},e.create(n.prototype,a)}if(H(t,n,r))return t;throw new o(t+" does not implement "+n.prototype)}var J=new u,Q=new a,ee=n.prototype.slice,te=e.prototype.hasOwnProperty,ne=!(!e.defineProperties||!e.getOwnPropertyDescriptor);ne&&(ne=e.getOwnPropertyDescriptor(Function.prototype,"name"),ne=!ne||ne.configurable);var re=/^(?:@@([a-zA-Z0-9_\$]+)|\[\[([a-zA-Z0-9_\$]+)\]\])$/,ie=/^(?:constructor|prototype|name|interfaces|superclass|\$private)$/,oe=new c,se=s.freeze({allowGet:!0,allowSet:!1}),ae=[e,n,Function,Boolean,Number,Math,Date,r,RegExp,l,i,EvalError,RangeError,ReferenceError,SyntaxError,o,URIError];"undefined"!=typeof ArrayBuffer&&ae.push(ArrayBuffer),"undefined"!=typeof Float32Array&&ae.push(Float32Array),"undefined"!=typeof Float64Array&&ae.push(Float64Array),"undefined"!=typeof Promise&&ae.push(Promise),"undefined"!=typeof Proxy&&ae.push(Proxy),"undefined"!=typeof Uint8Array&&ae.push(Uint8Array),"undefined"!=typeof Uint8ClampedArray&&ae.push(Uint8ClampedArray),"undefined"!=typeof Uint16Array&&ae.push(Uint16Array),"undefined"!=typeof Uint32Array&&ae.push(Uint32Array);var ue,le=s.freeze({allowGet:!0,allowSet:!0}),ce=g(e);w(b,e,{type:{value:"member"},toString:{value:function(){return this.type+' "'+r(this.name)+'" defined on '+this.interfaces.map(T).join(", ")}}}),w(_,b,{type:{value:"function"}}),w(x,b,{type:{value:"property"},merge:{value:function(e){if(e===this)return this;for(var t,n=this.interfaces.slice(0),r=0,i=e.interfaces.length;r<i;++r)n.indexOf(t=e.interfaces[r])&&n.push(t);return new x(n,this.name,this.allowGet||e.allowGet,this.allowSet||e.allowSet)}}}),S.prototype.merge=function(){var t,n,r,i;if(!this.members)if(this.inheritedMembers.length<1)this.members=this.directMembers;else if(this.directMembers.length<1)this.members=this.inheritedMembers;else{for(t=e.create(null),this.members=this.directMembers.slice(0),n=0,r=this.members.length;n<r;++n)t[this.members[n].name]=!0;for(n=0,r=this.inheritedMembers.length;n<r;++n)t[(i=this.inheritedMembers[n]).name]!==!0&&this.members.push(i);this.members.sort(function(e,t){if(e.name===t.name)return 0;var n=typeof e.name;return n===typeof t.name&&"string"===n&&e.name>t.name?1:-1})}},S.get=function(t){if(!F(t))throw new o("_interface is not an Interface");var n=oe.get(t);if(!n){oe.set(t,n=new S);var r=e.create(null);t.interfaces&&t.interfaces.forEach(function(e){for(var o,s,a=S.get(e).members,u=0,l=a.length;u<l;++u)if(o=a[u],(s=r[o.name])&&s!==o){if("property"!==s.type||"property"!==o.type)throw new i(T(t)+" has a conflict in extended interfaces: The "+s+" conflicts with "+o+".");n.inheritedMembers[n.inheritedMembers.indexOf(s)]=r[o.name]=s.merge(o)}else r[o.name]=o,n.inheritedMembers.push(o)});for(var a=e.keys(s.freeze(t.prototype)).concat(s.getOwnPropertySymbols(t.prototype)),u=0,l=a.length;u<l;++u){var c=a[u],f=t.prototype[c];if("as"===c||"is"===c)throw new i("The "+new b([t],c)+' uses the reserved name "'+c+'", which is not allowed.');if("constructor"!==c){var h=null,p=r[c];switch(f&&typeof f){case"function":h=new _(t,c);break;case"object":if(("allowGet"in f||"allowSet"in f)&&(h=new x([t],c,f.allowGet===!0,f.allowSet===!0),!h.allowGet&&!h.allowSet))throw new i("The "+h+" is invalid: it doesn't allow get or set.")}if(!h)throw new i("The "+new b([t],c)+" is invalid: expected a function, or an object with allowGet or allowSet property, but got "+typeof f+f+" instead.");if(p){if("property"!==h.type||"property"!==p.type)throw new i("The "+h+" conflicts with "+p+".");if(p.allowGet&&!h.allowGet)throw new i("The "+h+" has a conflict with "+p+": it is removing get access.");if(p.allowSet&&!h.allowSet)throw new i("The "+h+" has a conflict with "+p+": it is removing set access.");if(p.allowGet===h.allowGet&&p.allowSet===h.allowSet)throw new i("The "+h+" is redefining "+p+" with equal get/set access (so it is obsolete).")}n.directMembers.push(h)}}n.merge()}return n},P.prototype.ciName=function(e){for(var t=r(e).toLowerCase(),n=this.names.length-1;n>=0;--n)if(t===this.names[n].toLowerCase())return this.names[n];return null},P.get=function(e){var t=oe.get(e.constructor);return t||oe.set(e.constructor,t=new P(e)),t},O.prototype=null,w(E,O,{hasOwnProperty:{value:te}}),w(k,E,{toString:{value:function(){return"[interface "+(this.constructor.name||"Interface")+"]"}}}),w(j,E,{nameOf:{writable:!0,value:function(e){var t=P.get(this);return t.names[t.values.indexOf(e)]||null}},valueOf:{writable:!0,value:function(e,t){return this.hasOwnProperty(e)?this[e]:t!==!0?null:(e=P.get(this).ciName(e),e&&this[e])}},hasName:{writable:!0,value:function(e,t){return this.hasOwnProperty(e)||t===!0&&null!==P.get(this).ciName(e)}},hasValue:{writable:!0,value:function(e){return P.get(this).values.indexOf(e)>=0}},parse:{writable:!0,value:function(e,t,n){var r=P.get(this);if(r.values.indexOf(e)>=0)return e;var i=e;if(this.hasOwnProperty(i)||t!==!0||(i=P.get(this).ciName(i)),i&&this.hasOwnProperty(i))return this[i];if(n===!0)throw new RangeError("Could not parse enum value "+e);return null}},names:{writable:!0,value:function(){return P.get(this).names}},values:{writable:!0,value:function(){return P.get(this).values}},forEach:{writable:!0,value:function(t){for(var n=P.get(this),r=0,i=n.names.length,o=(arguments[1]||null)&&e(arguments[1]);r<i;++r)t.call(o,n.values[r],n.names[r],this)}},toString:{value:function(){return"[enum "+(this.constructor.name||"Enum")+"]"}}});var fe={as:{value:function(e,t){if(e===ce)return this;if("function"!=typeof e){var n=Q.get(e);if(n)return this instanceof n?this:null;throw new o("as requires _class to be a (constructor) function")}if(J.has(e))throw new i("as does not allow casting to this type, specify a more specific type");return F(e)&&H(this,e,t)?R(this,e):this instanceof e?this:null}},is:{value:function(e,t){return"function"==typeof e?this instanceof e||F(e)&&H(this,e,t):U(e)?this===e.as(ce):this===e}}};Y(t,{isInterface:F,isEnum:G,isProxy:U,is:z,hasBase:L,hasInterface:H,proxy:R,abstractClass:Z,declareClass:q,declareInterface:B,declareEnum:V,defineObject:Y,asFunctional:X,readOnlyProperty:se,readWriteProperty:le,preventCast:g},"decl"),Y(t,{hasPropertySupport:s.propertyGetSetSupport,defineProperty:s.defineProperty,defineProperties:s.defineProperties,seal:s.seal,isSealed:s.isSealed,freeze:s.freeze,isFrozen:s.isFrozen}),t.freeze(t)}(Object,Array,String,Error,TypeError,n(2),n(3),n(6),n(8),n(10),n(12))},function(e,t,n){!function(e,t){"use strict";function n(t,n,r,i){for(var o in n)if(n.hasOwnProperty(o)){var s=n[o],a="function"==typeof s;a&&i&&(s.displayName=i+"."+o),r&&(r[o]=s),o in t||e.defineProperty(t,o,{enumerable:!1,configurable:a,writable:a,value:s})}}function r(e){switch(e&&typeof e){case"object":case"function":return!0;default:return!1}}function i(e,n){switch(null===e?f:typeof e){case"undefined":throw new TypeError(n?n.displayName+" called on null or undefined":"Cannot convert undefined or null to object");case"object":case"function":return e;default:return t(e)}}function o(t,n){var r={configurable:!0,value:n};return p&&e.defineProperty(t,p,r),e.defineProperty(t,"@@iterator",r),t}function s(e){var n=null;if(e){var r=t(e);p&&p in r?n=r[p]():"@@iterator"in r&&(n=r["@@iterator"]())}return n}var a=t.prototype.hasOwnProperty,u=t.prototype.toString,l=/^__\d*\x01?[sS]ymbol/,c=/^[^_\$]/,f="undefined",h=typeof Symbol!==f?Symbol:null,p=h&&"symbol"==typeof Symbol.iterator?Symbol.iterator:null,d={};e.polyfill=function(e,t,r,i,o){return t&&n(e,t,i,o),r&&n(e.prototype,r,i,o&&o+".prototype"),e},e.shouldBeEnumerable=function(e){return"string"==typeof e&&c.test(e)},e.isObject=r,e.toObject=i,e.isCallable=function(e){return"function"==typeof e||"[object Function]"===u.call(e)},e.ensureCallable=function(t){if(!e.isCallable(t))throw new TypeError(t+" is not a function");return arguments.length>1?arguments[1]:t},e.setIterator=o,e.getIterator=s;var y=!!t.defineProperties,v="__defineGetter__"in t.prototype&&"__defineSetter__"in t.prototype;e.propertyGetSetSupport=y||v,y&&(e.defineProperty=t.defineProperty,e.defineProperties=t.defineProperties,e.getOwnPropertyDescriptor=t.getOwnPropertyDescriptor,e.getOwnPropertyDescriptors=t.getOwnPropertyDescriptors),e.getPrototypeOf=t.getPrototypeOf,e.freeze=t.freeze,e.isFrozen=t.isFrozen,e.seal=t.seal,e.isSealed=t.isSealed,e.getOwnPropertyNames=t.getOwnPropertyNames,e.getOwnPropertySymbols=t.getOwnPropertySymbols,e.getOwnPropertyNames||(e.getOwnPropertyNames=function(e){var n=[];if(e){var r=t(e);for(var i in r)a.call(r,i)&&"string"==typeof i&&n.push(i)}return n}),e.getOwnPropertySymbols||(e.getOwnPropertySymbols=function(e){e=i(e);var t=[];for(var n in e)a.call(e,n)&&l.test(n)&&t.push(n);return t}),e.getOwnPropertyDescriptor||(e.getOwnPropertyDescriptor=function(e,n){var r;if(e){var i=t(e);if(a.call(i,n)){r={configurable:!0,enumerable:!0};var o,s;v&&(o=i.__lookupGetter__(n),s=i.__lookupSetter__(n)),o||s?(o&&(r.get=o),s&&(r.set=s)):r.value=i[n]}}return r}),e.getOwnPropertyDescriptors||(e.getOwnPropertyDescriptors=function(t){var n={};if(t)for(var r=e.getOwnPropertyNames(t),i=0,o=r.length;i<o;++i)n[r[i]]=e.getOwnPropertyDescriptor(t,r[i]);return n}),d.is=function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t},d.assign=function(e,t){e=i(e);for(var n,o=1,s=arguments.length;o<s;++o)if(r(n=arguments[o]))for(var u in n)a.call(n,u)&&(e[u]=n[u]);return e},d.values=function(e){for(var n=i(e),r=t.keys(n),o=0,s=r.length;o<s;++o)r[o]=n[r[o]];return r},d.entries=function(e){for(var n=i(e),r=t.keys(n),o=0,s=r.length;o<s;++o)r[o]=[r[o],n[r[o]]];return r},n(t,d,e,"Object"),t.create(null,{test:{value:!0}}).test!==!0&&(t.create=function(n){return function(r,i){var o=n.call(t,r);return i&&e.defineProperties(o,i),o}}(t.create))}(t,Object)},function(e,t,n){e.exports="undefined"!=typeof Map?Map:n(4)},function(e,t,n){e.exports=function(e,t){"use strict";function n(e,n){t.Iterator.call(this,e,n)}function r(){e.defineProperty(this,"_store",{value:new t(arguments[0],!0)}),i&&(this.size=this._store.size)}var i=!1;return n.prototype=Object.create(t.Iterator.prototype,{constructor:{writable:!0,value:n}}),e.defineProperties(r.prototype,{_store:{value:null},size:i?{writable:!0,value:null}:{get:function(){return this._store&&this._store.size}},set:{value:function(e,t){return this._store.set(e,t),i&&(this.size=this._store.size),this}},get:{value:function(e){var t=this._store.entries[this._store.indexOf(e)];return t&&t[1]}},has:{value:function(e){return this._store.indexOf(e)>=0}},delete:{value:function(e){var t=this._store.remove(e);return i&&(this.size=this._store.size),t}},clear:{value:function(){this._store.clear(),i&&(this.size=this._store.size)}},forEach:{value:function(e){this._store.forEach(this,e,arguments[1])}},keys:{value:function(){return new n("key",this._store)}},values:{value:function(){return new n("value",this._store)}},entries:{value:function(){return new n("entry",this._store)}}}),e.setIterator(r.prototype,r.prototype.entries),r}(n(2),n(5))},function(e,t,n){e.exports=function(e){"use strict";function t(e,t){this.entries=Object.create(null),this.entries.start=this.entries.end=1,this.clear(),e&&Array.from(e,t===!0?this._setPair:this._setValue,this)}function n(e,t){this._kind=e,this._next=t._nxt(),this._next>=0&&(this._store=t)}return e.polyfill(t,null,{_setPair:function(e){if("object"!=typeof e)throw new TypeError("Iterator value "+String(e)+" is not an entry object");this.set(e[0],e[1])},_setValue:function(e){this.set(e,e)},_nxt:function(e){for(var t=Math.max(e||0,this.entries.start),n=this.entries.end;t<n;++t)if(t in this.entries)return t;return-1},indexOf:function(e){switch(typeof e){case"string":return this._stringKeys[e]||-1;case"number":return this._numberKeys[String(e)]||-1;default:return this._otherKeyIds[this._otherKeys.indexOf(e)]||-1}},set:function(e,t){var n=this.indexOf(e);if(n<0){switch(n=this.entries.end++,++this.size,typeof e){case"string":this._stringKeys[e]=n;break;case"number":this._numberKeys[String(e)]=n;break;default:this._otherKeys.push(e),this._otherKeyIds.push(n)}this.entries[n]=[e,t]}else this.entries[n][1]=t},remove:function(e){var t;switch(typeof e){case"string":(t=this._stringKeys[e]||-1)>=0&&delete this._stringKeys[e];break;case"number":(t=this._numberKeys[String(e)]||-1)>=0&&delete this._numberKeys[String(e)];break;default:(t=this._otherKeys.indexOf(e))>=0&&(this._otherKeys.splice(t,1),t=this._otherKeyIds.splice(t,1)[0])}var n=t>=0;return n&&(delete this.entries[t],--this.size,t===this.entries.start&&(t=this._nxt(t+1),this.entries.start=t<0?this.entries.end:t)),n},clear:function(){this._numberKeys=Object.create(null),this._stringKeys=Object.create(null),this._otherKeys=[],this._otherKeyIds=[],this.size=0;for(var e=this.entries.start,t=this.entries.end;e<t;++e)delete this.entries[e];this.entries.start=this.entries.end},forEach:function(t,n,r){for(var i,o=e.ensureCallable(n,r&&Object(r)),s=this._nxt();s>=0;s=this._nxt(s+1))i=this.entries[s],n.call(o,i[1],i[0],t)}},null,"EntryStore"),e.polyfill(n,null,{next:function e(){var t,n={value:t,done:this._next<0};if(!n.done){var r=this._store,e=this._next=r._nxt(this._next);if(e<0)n.done=!0,this._store=null;else{switch(t=r.entries[e],this._kind){case"key":n.value=t[0];break;case"value":n.value=t[1];break;default:n.value=t.slice(0,2)}this._next=r._nxt(e+1)}}return n}},null,"Iterator"),e.defineProperty(t,"Iterator",{value:n}),e.setIterator(n.prototype,function(){return this}),t}(n(2))},function(e,t,n){e.exports="undefined"!=typeof Set?Set:n(7)},function(e,t,n){e.exports=function(e,t){"use strict";function n(e,n){t.Iterator.call(this,e,n)}function r(){e.defineProperty(this,"_store",{value:new t(arguments[0],!1)}),i&&(this.size=this._store.size)}var i=!1;return n.prototype=Object.create(t.Iterator.prototype,{constructor:{writable:!0,value:n}}),e.defineProperties(r.prototype,{_store:{value:null},size:i?{writable:!0,value:null}:{get:function(){return this._store&&this._store.size}},add:{value:function(e){return this._store.set(e,e),i&&(this.size=this._store.size),this}},has:{value:function(e){return this._store.indexOf(e)>=0}},delete:{value:function(e){var t=this._store.remove(e);return i&&(this.size=this._store.size),t}},clear:{value:function(){this._store.clear(),i&&(this.size=this._store.size)}},forEach:{value:function(e){this._store.forEach(this,e,arguments[1])}},keys:{value:function(){return new n("key",this._store)}},values:{value:function(){return new n("value",this._store)}},entries:{value:function(){return new n("entry",this._store)}}}),e.setIterator(r.prototype,r.prototype.values),r}(n(2),n(5))},function(e,t,n){e.exports="undefined"!=typeof Symbol?Symbol:n(9)},function(e,t){e.exports=function(){"use strict";var e=0;return function t(n){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return"__"+ ++e+"Symbol("+(n||"")+")"}}()},function(e,t,n){e.exports="undefined"!=typeof WeakMap?WeakMap:n(11)},function(e,t,n){e.exports=function(e,t){"use strict";function n(t){if(e.defineProperty(this,"_map",{value:Object.create(null)}),t)for(var n=0;n<t.length;++n)this.set(t[n][0],t[n][1])}var r=t("WeakMap"),i=Object.prototype.hasOwnProperty,o=0;return e.defineProperties(n.prototype,{_map:{value:null},set:{value:function(t,n){if(!e.isObject(t))throw new TypeError("Invalid value used as weak map key");return i.call(t,r)||e.defineProperty(t,r,{value:++o}),this._map[t[r]]=n,this}},get:{value:function(e){return this.has(e)?this._map[e[r]]:void 0}},has:{value:function(t){return e.isObject(t)&&i.call(t,r)&&t[r]in this._map}},delete:{value:function(e){return this.has(e)&&(delete this._map[e[r]]||!0)}}}),n}(n(2),n(8))},function(e,t,n){!function(e,n,r,i){"use strict";function o(e,t,n,r){for(var i,o,s=("charAt"in e&&"substr"in e),a=0,u=e.length>>>0;a<u&&(!(s||a in e)||(o=t.call(n,i=s?e.charAt(a):e[a],a,e),r(i,a,o)!==!0));++a);}var s=n.toObject,a=n.isCallable,u=n.ensureCallable,l=(Object.prototype.toString,{}),c={};c.find=function e(t){var n=void 0;return o(s(this,e),u(t),arguments[1],function(e,t,r){if(r)return n=e,!0}),n},c.findIndex=function e(t){var n=-1;return o(s(this,e),u(t),arguments[1],function(e,t,r){if(r)return n=t,!0}),n},c.fill=function e(t){var n=s(this,e),r=n.length>>>0,i=arguments[1]>>0,o=arguments[2];for(i<0&&(i=Math.max(0,i+r)),void 0===o?o=r:o<0&&(o=Math.max(0,o+r));i<o;++i)n[i]=t;return n},l.of=function(){for(var t=this,n=arguments,r=n.length,i=a(t)?Object(new t(r)):new e(r),o=0;o<r;++o)i[o]=n[o];return i},l.from=function(t){var o,l,c,f=this,h=s(t),p="undefined"!=typeof arguments[1]?u(arguments[1]):null,d=arguments[2],y=h instanceof r;p&&(void 0===d?d=null:null!==d&&(d=Object(d)));var v=a(h.next)?h:n.getIterator(h);if(v){o=[];for(var m=v.next();!m.done;m=v.next())o.push(m.value);c=o.length}else(y||h instanceof i)&&a(h.forEach)&&(l=0,c=Math.floor(h.size)||0,o=new e(c),h.forEach(function(t,n){var r;y?(r=new e(2),r[0]=n,r[1]=t):r=t,o[l++]=r}));if(!o){var g="charAt"in h&&"substr"in h;for(c=Math.floor(h.length)||0,o=new e(c),l=0;l<c;++l)o[l]=g?h.charAt(l):h[l]}var w=a(f)&&f!==e?Object(new f(c)):o;if(p||w!==o)for(l=0;l<c;++l)w[l]=p?p.call(d,o[l],l):o[l];return w},c.includes=function e(t){var n=s(this,e),r=n.length>>>0,i=0;if(r<1)return!1;for(arguments.length>1&&(i=arguments[1]>>0)<0&&(i=Math.max(0,r+i));i<r;++i)if(n[i]===t||t!==t&&n[i]!==n[i])return!0;return!1},n.polyfill(e,l,c,t,"Array")}(Array,n(2),n(3),n(6))},function(e,t,n){e.exports=function(e,t,n,r){"use strict";function i(e){return t.isProxy(e)&&e.is(c)?e.as(h):Object(e)}function o(e){return!!e&&p.has(i(e))}function s(){this.listeners=[],this.references=[],this.referenceHandlers=[]}function a(e){var t=this.indexOf(e);return t>=0&&this.splice(t,1),t>=0}function u(e){e&&(e=Object(e),"destroy"in e?e.destroy():"remove"in e&&e.remove())}function l(e,t){this.owner=e,this.target=t,e.addDestroyListener(this._owner_destroyed=this._owner_destroyed.bind(this)),this.target instanceof c&&this.target.addDestroyListener(this._target_destroyed=this._target_destroyed.bind(this))}function c(){}function f(e){var t=i(e);if(!t||!("destroy"in t||"remove"in t))throw new TypeError("Cannot own; invalid value");if(t===this)throw new Error("An object cannot own itself");return new l(this,t),e}var h=null,p=new r,d=Array.prototype.map;return t.declareClass(s,{listeners:null,references:null,referenceHandlers:null}),function(e){s.get=function(t,n){var r=e.get(t)||null;return r||n!==!0||e.set(t,r=new s),r},s.remove=function(t){var n=e.get(t)||null;return n&&e.delete(t),n}}(new n),t.declareClass(l,{owner:null,target:null,_owner_destroyed:function(){this.target&&(delete this.owner,this.target instanceof c&&this.target.removeDestroyListener(this._target_destroyed),u(this.target),delete this._owner_destroyed,delete this._target_destroyed,delete this.target)},_target_destroyed:function(){this.owner&&(this.owner.removeDestroyListener(this._owner_destroyed),delete this._owner_destroyed,delete this._target_destroyed,delete this.owner,delete this.target)}}),h=t.preventCast(c),t.declareClass(c,{$private:{value:function(e){return"isDestroyed"===e||"alive"===e}},isDestroyed:{value:o}},{destroy:{writable:!0,value:function(){if(!o(this)){var e,t,n=s.remove(this);if(n){if(n.listeners.length>0){for(e=0,t=n.listeners.length;e<t;++e)n.listeners[e](this);n.listeners.length=0}if(n.references.length>0){for(e=0,t=n.references.length;e<t;++e)n.referenceHandlers[e]&&i(this[n.references[e]]).removeDestroyListener(n.referenceHandlers[e]),delete this[n.references[e]];n.references.length=0,n.referenceHandlers.length=0}}p.add(this)}}},addDestroyListener:{value:function(t){var n=s.get(this,!0);return n.listeners.push(e.ensureCallable(t)),t}},removeDestroyListener:{value:function(e){var t=s.get(this,!1);return!!t&&a.call(t.listeners,e)}},own:{value:function(){return d.call(arguments,f,this)}},ref:{value:function(n,r){if("string"!=typeof n)throw new TypeError("Name must be a string");switch(null===r?"undefined":typeof r){case"function":case"object":break;case"undefined":throw new TypeError("_target cannot be "+r+". Use unref to clear a reference.");default:throw new TypeError("_target cannot be "+typeof r+". Only objects or functions can be referenced.")}var o,a=s.get(this,!0),u=a.references.indexOf(n);return u<0?(u=a.references.push(n)-1,a.referenceHandlers.push(null)):a.referenceHandlers[u]&&(o=i(this[n]),o instanceof c&&o.removeDestroyListener(a.referenceHandlers[u]),a.referenceHandlers[u]=null),t.defineProperty(this,n,{configurable:!0,enumerable:e.shouldBeEnumerable(n),value:r}),o=i(r),o instanceof c&&o.addDestroyListener(a.referenceHandlers[u]=this.unref.bind(this,n)),r}},unref:{value:function(e){if("string"!=typeof e)throw new TypeError("_name must be a string");var n,r,o,a,u=arguments[1];return(r=s.get(this,!1))&&(o=r.references.indexOf(e))>=0&&(n=this[r.references[o]],u&&!t.is(n,u)?n=void 0:(delete this[r.references.splice(o,1)[0]],(a=r.referenceHandlers.splice(o,1)[0])&&!u&&i(n).removeDestroyListener(a))),n}},ownMember:{value:function(e,t){return this.ref(e,f.call(this,t))}},destroyAll:{value:function(e){var t=Object(e);if("forEach"in t)t.forEach(u,null);else{if(!("length"in t))throw new TypeError("_collection must either have a forEach method or a length property.");Array.prototype.forEach.call(t,u,null)}}}})}(n(2),n(1),n(10),n(14))},function(e,t,n){e.exports="undefined"!=typeof WeakSet?WeakSet:n(15)},function(e,t,n){e.exports=function(e,t){"use strict";function n(t){if(t)for(var n=0;n<t.length;++n)this.add(t[n]);e.defineProperty(this,"_values",{value:[]})}var r=t("WeakSet"),i=Object.prototype.hasOwnProperty,o=0;return e.defineProperties(n.prototype,{_values:{value:null},add:{value:function(t){if(!e.isObject(t))throw new TypeError("Invalid value used as WeakSet value");return i.call(t,r)||e.defineProperty(t,r,{value:++o}),this._values.indexOf(t[r])<0&&this._values.push(t[r]),this}},has:{value:function(t){return e.isObject(t)&&i.call(t,r)&&this._values.indexOf(t[r])>=0}},delete:{value:function(t){var n=-1;return e.isObject(t)&&i.call(t,r)&&(n=this._values.indexOf(t[r])),!(n<0)&&(this._values.splice(n,1),!0)}}}),n}(n(2),n(8))},function(e,t,n){e.exports=function(e,t,n,r,i,o){"use strict";function s(e,t,i){r.call(this),l.set(this,e),n.defineProperties(this,{eventName:{enumerable:!0,value:t},listener:{configurable:!0,enumerable:!0,value:i},_attached:{writable:!0,value:!1}}),this.attach()}function a(){r.call(this)}var u=n.freeze(new i),l=new o,c=new o,f=t.ensureCallable;return n.declareClass(s,r,{eventName:null,listener:null,_attached:null,destroy:function(){this.remove(),delete this.listener,l.delete(this),r.prototype.destroy.call(this)},remove:function(){var e;if(this._attached&&this.listener&&(e=l.get(this))){var t=e.lastIndexOf(this);return t>=e.length-1?e.pop():t>=0&&e.splice(t,1),this._attached=!1,!0}return!1},attach:function(){var e;return!this._attached&&this.listener&&(e=l.get(this))&&(e.push(this),this._attached=!0),this._attached},isAttached:function(){return this._attached}}),n.preventCast(a),n.declareClass(a,r,{destroy:function(){var e=c.get(this)||null;if(e){c.delete(this);for(var t=e.length-1;t>=0;--t)e[t].destroy()}r.prototype.destroy.call(this)},on:function(t,n){var i;if(r.isDestroyed(f(n,this)))throw new e("The target object has been destroyed, cannot attach an event listener to it");if(!("on"+t in this))throw new e("The target object does not have a(n) "+t+" event");return(i=c.get(this))||c.set(this,i=[]),new s(i,t,n)},once:function(e,t){var n=f(t,null);return n=this.on(e,function(){return n&&(n.destroy(),n=null),t.apply(this,arguments)})},emit:function(t,n){if(r.isDestroyed(this))throw new e("The target object has been destroyed, cannot emit an event from it");var i,o=n||u,s="on"+t;if(!(s in this))throw new e("The "+t+" event being emitted is not defined. Is this class missing an "+s+" event definition?");if(this[s](o,this),(i=c.get(this))&&i.length>0)for(var a,l=i.filter(function(e){return e.eventName===t}),f=0,h=l.length;f<h;f++)(a=l[f])._attached&&a.listener&&a.listener(o,this);return n||null},hasListener:function(e){var t=c.get(this);return!!t&&t.some(function(t){return t.eventName===e})}})}(Error,n(2),n(1),n(13),n(17),n(10))},function(e,t,n){e.exports=function(e){"use strict";function t(){e.defineProperties(this,{cancelable:{enumerable:!0,value:"boolean"==typeof arguments[0]?arguments[0]:this.cancelable===!0},defaultPrevented:{configurable:!0,enumerable:!0,value:!1}})}return e.declareClass(t,{defaultPrevented:{enumerable:!0,value:null},cancelable:{enumerable:!0,writable:!0,value:!1},preventDefault:{enumerable:!0,
  13. value:function(){this.cancelable!==!0||this.defaultPrevented||e.defineProperty(this,"defaultPrevented",{enumerable:!0,value:!0})}}})}(n(1))},function(e,t,n){Object.assign(t,n(19),{decl:n(1),Destroyable:n(13),EventArgs:n(17),Evented:n(16),Exception:n(35),load:function(e,n,r){"use strict";if(!(e in t))throw new Error("invalid path: "+e);r(t[e])},write:function(){"use strict"}})},function(e,t,n){n(12),n(20),n(21),n(22),n(23),n(2),n(24),Object.assign(t,{NMap:n(3),NSet:n(6),Intl:n(25),Map:n(31),WeakMap:n(10),Set:n(32),WeakSet:n(14),Symbol:n(8),Promise:n(33)})},function(e,t,n){!function(e,n){"use strict";var r={},i={};n.polyfill(e,r,i,t,"Date")}(Date,n(2))},function(e,t,n){!function(e,n,r){"use strict";var i={},o=n.prototype;!function(){function t(){if(this===o)return"";var t=n.call(this).match(/function\s*([a-zA-Z0-9_$]*)\s*\(/);return e.defineProperty(this,"name",{configurable:!0,value:t&&t[1]||""}),this.name}var n=o.toString;!t.name&&e.defineProperties&&"name"===t.call(t)&&e.defineProperty(o,"name",{configurable:!0,get:t})}(),r.polyfill(n,null,i,t,"Function")}(Object,Function,n(2))},function(e,t,n){!function(e,n){"use strict";var r={};r.cbrt=function(t){var n=e.pow(e.abs(t),1/3);return t<0?-n:n},r.expm1=function(t){return e.exp(t)-1},r.hypot=function(t,n){for(var r,i=0,o=arguments.length,s=0;i<o;++i){if(r=e.abs(arguments[i]),r===1/0)return r;s+=r*r}return e.sqrt(s)},r.imul=function(e,t){var n=e>>>16&65535,r=65535&e,i=t>>>16&65535,o=65535&t;return r*o+(n*o+r*i<<16>>>0)|0},function(){var t=[32,31,0,16,0,30,3,0,15,0,0,0,29,10,2,0,0,0,12,14,21,0,19,0,0,28,0,25,0,9,1,0,17,0,4,void 0,0,0,11,0,13,22,20,0,26,0,0,18,5,0,0,23,0,27,0,6,0,24,7,0,8,0,0,0];r.clz32=function(n){var r=n>>>0;return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,t[e.imul(r,116069625)>>>26]}}(),r.log1p=function(t){return e.log(1+t)},r.log2=function(t){return e.log(t)/e.LN2},r.log10=function(t){return e.log(t)/e.LN10},r.cosh=function(t){var n=e.exp(t);return(n+1/n)/2},r.acosh=function(t){return e.log(t+e.sqrt(t*t-1))},r.sinh=function(t){var n=e.exp(t);return(n-1/n)/2},r.asinh=function(t){return t===-(1/0)?t:e.log(t+e.sqrt(t*t+1))},r.tanh=function(t){var n;return t===1/0?1:t===-(1/0)?-1:((n=e.exp(2*t))-1)/(n+1)},r.atanh=function(t){return e.log((1+t)/(1-t))/2},r.sign=function(e){return e=+e,0===e||isNaN(e)?e:e>0?1:-1},r.trunc=function(t){return t<0?e.ceil(t):e.floor(t)},n.polyfill(e,r,null,t,"Math")}(Math,n(2))},function(e,t,n){!function(e,n){"use strict";var r={};r.parseInt=parseInt,r.parseFloat=parseFloat,r.MAX_SAFE_INTEGER=9007199254740991,r.MIN_SAFE_INTEGER=-r.MAX_SAFE_INTEGER,r.EPSILON=Math.pow(2,-52),function(e){r.isFinite=function(t){return"number"==typeof t&&e(t)}}(isFinite),r.isInteger=function(t){return e.isFinite(t)&&Math.floor(t)===t},r.isSafeInteger=function(t){return e.isInteger(t)&&t>=e.MIN_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER},function(e){r.isNaN=function(t){return"number"==typeof t&&e(t)}}(isNaN),n.polyfill(e,r,null,t,"Number")}(Number,n(2))},function(e,t,n){!function(e,n,r,i){"use strict";function o(e,t){if(typeof e===u||null===e)throw new TypeError("String.prototype."+t+" called on null or undefined");return r(e)}function s(e,t){if(e instanceof n)throw new TypeError("First argument to String.prototype."+t+" must not be a regular expression");return r(e)}function a(t,n,r,i){return isNaN(t=e.trunc(t))?r:t<n?n:t>i?i:t}var u="undefined",l={},c={};c.startsWith=function(e){var t=o(this,"startsWith"),n=a(arguments[1],0,0,t.length);return t.lastIndexOf(s(e,"startsWith"),n)===n},c.endsWith=function(e){var t=o(this,"endsWith"),n=a(arguments[1],0,t.length,t.length)-(e=s(e,"endsWith")).length;return n>=0&&t.indexOf(e,n)===n},function(e){var t=/^\s+|\s+$/g,r=/^\s+/,i=/\s+$/;e.match(/[^\s]/)&&(t=new n("^[\\s"+e+"]+|[\\s"+e+"]+$","g"),r=new n("^[\\s"+e+"]+"),i=new n("[\\s"+e+"]+$")),c.trim=function(){return o(this,"trim").replace(t,"")},c.trimStart=c.trimLeft=function(){return o(this,"trimStart").replace(r,"")},c.trimEnd=c.trimRight=function(){return o(this,"trimEnd").replace(i,"")}}(r.fromCharCode(160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288)),function(){var t=1<<28;c.repeat=function(n){var r="",i=o(this,"repeat"),s=e.floor(n)||0;if(s<0)throw new RangeError("repeat count must be non-negative");if(s===1/0)throw new RangeError("repeat count must be less than infinity");var a=i.length*s;if(a>=t)throw new RangeError("repeat count must not overflow maximum string size");if(a>0)for(;1===(1&s)&&(r+=i),s>>>=1,0!==s;)i+=i;return r}}(),c.codePointAt=function(t){var n,r=o(this,"codePointAt"),i=r.length,s=e.floor(t)||0;if(s>=0&&s<i&&(n=r.charCodeAt(s++),n>=55296&&n<=56319&&s<i)){var a=r.charCodeAt(s);a>=56320&&a<=57343&&(n=1024*(n-55296)+a-56320+65536)}return n},l.fromCodePoint=function(t){for(var n=[],i="",o=0,s=arguments.length;o<s;++o){var a=+arguments[o];if(!isFinite(a)||a<0||a>1114111||e.floor(a)!==a)throw new RangeError("Invalid code point: "+a);if(a<=65535)n.push(a);else{a-=65536;var u=(a>>10)+55296,l=a%1024+56320;n.push(u,l)}(o+1===s||n.length>16384)&&(i+=r.fromCharCode.apply(r,n),n.length=0)}return i},c.includes=function(e){var t=o(this,"includes"),n=a(arguments[1],0,0,t.length);return t.indexOf(s(e,"includes"),n)>=0},c.padStart=function(t){var n,i,s=o(this,"padStart"),a=arguments[1],l=e.trunc(t)||0,c=l-s.length;return a=typeof a===u?" ":r(a),n=a.length,c>0&&n>0&&(i=a.repeat(e.floor(c/n)),c%=n,c>0&&(i+=a.substr(0,c)),s=i+s),s},c.padEnd=function(t){var n,i,s=o(this,"padEnd"),a=arguments[1],l=e.trunc(t)||0,c=l-s.length;return a=typeof a===u?" ":r(a),n=a.length,c>0&&n>0&&(i=a.repeat(e.floor(c/n)),c%=n,c>0&&(i+=a.substr(0,c)),s+=i),s},i.polyfill(r,l,c,t,"String")}(Math,RegExp,String,n(2))},function(e,t,n){e.exports=function(e,t){"use strict";function n(n){return!e[n]||t[n]}var r=["Collator","DateTimeformat","NumberFormat","PluralRules","getCanonicalLocales"],i=e||t;return e&&r.some(n)&&(i=Object.create(e,r.reduce(function(n,r){var i=e[r]||t[r];return i&&(n[r]={value:i}),n},{}))),i}("undefined"!=typeof Intl?Intl:null,n(26))},function(e,t,n){e.exports=function(e,t,n,r){"use strict";function i(){e.defineProperties(this,{DateTimeFormat:{value:t},NumberFormat:{value:n},getCanonicalLocales:{value:r.getCanonicalLocales}})}return new i}(n(2),n(27),n(30),n(29))},function(e,t,n){e.exports=function(e,t){"use strict";function n(e){this._conditionalSet(e,"year",s),this._conditionalSet(e,"month",u),this._conditionalSet(e,"day",s),this._conditionalSet(e,"weekday",a),this._conditionalSet(e,"hour",s),this._conditionalSet(e,"minute",s),this._conditionalSet(e,"second",s),this._conditionalSet(e,"weekday",a),this._conditionalSet(e,"hour12",l),this._conditionalSet(e,"timeZoneName",o)}function r(e,t,n){return h.setTime(e||Date.now()),n=n===!0,String(t).replace(f,function(e){var t,r=e.charAt(0),i=e.length;switch(r){case"y":t=n?h.getUTCFullYear():h.getFullYear(),2===i&&(t%=100);break;case"M":t=(n?h.getUTCMonth():h.getMonth())+1;break;case"d":t=n?h.getUTCDate():h.getDate();break;case"D":t=new Date(Date.UTC(h.getUTCFullYear(),0,1,h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds())),t=Math.round((h.getTime()-t.getTime())/864e5)+1;break;case"E":t=(n?h.getUTCDay():h.getDay())+1;break;case"H":case"h":case"K":case"k":switch(t=n?h.getUTCHours():h.getHours(),r){case"h":t=t%12||12;break;case"K":t%=12;break;case"k":t=t||24}break;case"m":t=n?h.getUTCMinutes():h.getMinutes();break;case"s":t=n?h.getUTCSeconds():h.getSeconds();break;case"S":t=Math.round((n?h.getUTCMilliseconds():h.getMilliseconds())*Math.pow(10,i-3));break;case"a":if(i>1)throw new RangeError("Invalid pattern: "+e+", a maximum of 1 character is allowed");return t=n?h.getUTCHours():h.getHours(),t<12?"am":"pm";case"Z":if(i>2)throw new RangeError("Invalid pattern: "+e+", a maximum of 2 characters is allowed");return n&&2===i?"Z":(t=n?0:-h.getTimezoneOffset(),t=(t<0?"-":"+")+c(Math.floor(t/60),2,"0")+":"+c(t%60,2,"0"),1===i?"GMT"+t:t);default:throw new Error("format identifier "+e.charAt(0)+"is not supported by this method")}switch(r){case"H":case"h":case"K":case"k":case"m":case"s":if(i>2)throw new RangeError("Invalid pattern: "+e+", a maximum of 2 characters is allowed");break;case"D":if(i>3)throw new RangeError("Invalid pattern: "+e+", a maximum of 3 characters is allowed");break;case"M":case"d":case"E":if(i>5)throw new RangeError("Invalid pattern: "+e+", a maximum of 5 characters is allowed");if(i>2)throw new RangeError("Pattern: "+e+", requires localisation, which is not supported by format")}return i>1?c(t,i,"0"):t})}function i(e,r){t.call(this,e,new n(Object(r)))}var o=["short","long"],s=["numeric","2-digit"],a=["narrow"].concat(o),u=s.concat(a),l=[!0,!1],c=Function.prototype.call.bind(String.prototype.padStart),f=/A+|a+|D+|d+|E+|e+|F+|G+|g+|H+|h+|K+|k+|M+|m+|S+|s+|u+|W+|w+|Y+|y+|Z+|z+/g,h=new Date;return e.defineProperties(n.prototype,{localeMatcher:{writable:!0,value:null},timeZone:{writable:!0,value:null},hour12:{writable:!0,value:null},formatMatcher:{writable:!0,value:null},weekday:{writable:!0,value:null},era:{writable:!0,value:null},year:{writable:!0,value:null},month:{writable:!0,value:null},day:{writable:!0,value:null},hour:{writable:!0,value:null},minute:{writable:!0,value:null},second:{writable:!0,value:null},timeZoneName:{writable:!0,value:null},_conditionalSet:{value:function(e,t,n){if("undefined"!=typeof e[t]&&!n.includes(this[t]=e[t]))throw new RangeError("Invalid value for "+t+": "+e[t])}}}),i.prototype=Object.create(t.prototype,{format:{enumerable:!0,value:function(e){var t=[],n=[];switch(this._options.year){case"2-digit":t.push("yy");break;case"numeric":t.push("yyyy")}switch(this._options.month){case"narrow":case"short":case"long":case"2-digit":t.push("MM");break;case"numeric":t.push("M")}switch(this._options.day){case"2-digit":t.push("dd");break;case"numeric":t.push("d")}switch(t.length>0&&(n.push(t.join("-")),t.length=0),this._options.hour){case"2-digit":t.push("HH");break;case"numeric":t.push("H")}switch(this._options.minute){case"2-digit":t.push("mm");break;case"numeric":t.push("m")}switch(this._options.second){case"2-digit":t.push("ss");break;case"numeric":t.push("s")}return t.length>0&&n.push(t.join(":")),n.length<1&&n.push("yyyy-MM-dd"),r(e,n.join(" "))}}}),i}(n(2),n(28))},function(e,t,n){e.exports=function(e,t){"use strict";function n(t,n){e.defineProperties(this,{_locale:{value:r},_options:{value:n}})}var r=function(e){try{return t.getCanonicalLocales(e&&(e.language||e.userLanguage)||"en-US")[0]}catch(e){return"en-US"}}("undefined"!=typeof navigator?navigator:null);return e.defineProperties(n.prototype,{_locale:{value:null},_options:{value:null},resolvedOptions:{value:function(){return Object.assign({locale:this._locale},this._options)}},format:{enumerable:!0,value:function(e){return e?e.toLocaleString():""}}}),e.defineProperty(n,"envLocale",{value:r})}(n(2),n(29))},function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=t?e.length:0;return 3===n?e.toUpperCase():5===n?e.substr(0,2).toUpperCase()+e.substr(2).toLowerCase():e.toLowerCase()}function r(e){return o.test(e)}function i(e){var t=String(e);if(!r(t))throw new RangeError("Invalid language tag: "+t);return t.replace(s,n)}var o=/^(i|[a-zA-Z]{2,3})((?:\-[a-zA-Z0-9]+)*)$/,s=/^[a-zA-Z]+|\-\w+/g;e.getCanonicalLocales=function(e){var n;if(void 0===e)n=new Array(0);else if("string"==typeof e)n=new Array(1),n[0]=i(e);else{n=[];for(var r=t.toObject(e),o=r.length||0,s=0;s<o;++s){var a=i(r[s]);n.indexOf(a)<0&&n.push(a)}}return n}}(e.exports,n(2))},function(e,t,n){e.exports=function(e){"use strict";function t(e){switch(this.minimumFractionDigits=0,this.maximumFractionDigits=3,this.minimumIntegerDigits=1,this.numberingSystem="latn",this.useGrouping=!0,"style"in e?e.style:"decimal"){case"percent":this.style="percent",this.maximumFractionDigits=Math.max(0,this.minimumFractionDigits);break;case"currency":if(this.style="currency",!e.currency)throw new TypeError("Currency code is required with currency style.");if("string"!=typeof e.currency||!r.test(e.currency))throw new TypeError("Invalid currency code:"+e.currency);this.currency=e.currency,this.currencyDisplay="code",this.maximumFractionDigits=Math.max(2,this.minimumFractionDigits);break;case"decimal":this.style="decimal";break;default:throw new RangeError("Value "+e.style+" out of range for numberformat options property style")}}function n(n,r){e.call(this,n,new t(Object(r)))}var r=/^[A-Z]{3}$/,i=String.fromCharCode(160);return n.prototype=Object.create(e.prototype,{constructor:{writable:!0,value:n},format:{enumerable:!0,value:function(e){if(null===e||"undefined"==typeof e)return"";var t=+e,n="",r="";if(isNaN(t))return"NaN";switch(this._options.style){case"percent":t*=100,r="%";break;case"currency":n=this._options.currency+i}return n+t.toLocaleString()+r}}}),n}(n(28))},function(e,t,n){var r=n(3);e.exports="entries"in r.prototype?r:n(4)},function(e,t,n){var r=n(6);e.exports="entries"in r.prototype?r:n(7)},function(e,t,n){e.exports="undefined"!=typeof Promise?Promise:n(34)},function(e,t,n){e.exports=function(e,t){"use strict";function n(t){var n,r,i;if(t.length||0===t.length){n=new Array(t.length);for(var o=0,s=t.length;o<s;++o)i=t[o],i&&"function"==typeof i.then||(i=u.resolve(i)),n[o]=i}else{if(!(r=e.getIterator(t)))throw new Error("Invalid iterable");for(n=[],i=r.next();!i.done;i=r.next())i.value&&"function"==typeof i.value.then?n.push(i.value):n.push(u.resolve(i.value))}return n}function r(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function i(){}function o(e){try{return e.then}catch(e){return y=e,v}}function s(e,t){try{return e(t)}catch(e){return y=e,v}}function a(e,t,n){try{e(t,n)}catch(e){return y=e,v}}function u(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._state=0,this._value=null,this._deferreds=[],e.ensureCallable(t)!==i&&d(t,this)}function l(e,t,n){return new e.constructor(function(o,s){var a=new u(i);a.then(o,s),c(e,new r(t,n,a))})}function c(e,n){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(n):void t(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null===t)return void(1===e._state?f(n.promise,e._value):h(n.promise,e._value));var r=s(t,e._value);r===v?h(n.promise,y):f(n.promise,r)})}function f(e,t){if(t===e)return h(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var n=o(t);if(n===v)return h(e,y);if(n===e.then&&t instanceof u)return e._state=3,e._value=t,void p(e);if("function"==typeof n)return void d(n.bind(t),e)}e._state=1,e._value=t,p(e)}function h(e,t){e._state=2,e._value=t,p(e)}function p(e){for(var t=0;t<e._deferreds.length;++t)c(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1,r=a(e,function(e){n||(n=!0,f(t,e))},function(e){n||(n=!0,h(t,e))});n||r!==v||(n=!0,h(t,y))}var y=null,v={};return e.polyfill(u,{_noop:i,resolve:function(e){return new u(function(t,n){t(e)})},reject:function(e){return new u(function(t,n){n(e)})},all:function(e){var t=n(e);return t.length<1?u.resolve(t):new u(function(e,n){function r(e){o&&(n(e),o=null)}function i(t,n){o&&(o[t]=n,++s>=o.length&&(e(o),o=null))}for(var o=new Array(t.length),s=0,a=0,u=t.length;a<u;++a)t[a].then(i.bind(null,a),r)})},race:function(e){var t=n(e);return new u(function(e,n){function r(e){o||(n(e),o=!0)}function i(t){o||(e(t),o=!0)}for(var o=!1,s=0,a=t.length;s<a;++s)t[s].then(i,r)})}},{then:function(e,t){if(this.constructor!==u)return l(this,e,t);var n=new u(i);return c(this,new r(e,t,n)),n},catch:function(e){return this.then(null,e)}},null,"Promise")}(n(2),"undefined"!=typeof setImmediate?setImmediate:setTimeout)},function(e,t,n){e.exports=function(e,t){"use strict";function n(e){if(!e)return null;var t=String(e),n=new Array(4),r=t.match(/^([^@]*)@/);return n[0]=null,r&&(n[0]=r[1]||null,t=t.substr(r[0].length)),r=t.match(/(:[0-9]+)?:([0-9]+)$/),r&&(r[1]?(n[2]=parseInt(r[1].substr(1),10),n[3]=parseInt(r[2],10)-1):(n[2]=parseInt(r[2],10),n[3]=null),t=t.substr(0,t.length-r[0].length)),n[1]=t,n}function r(e,r,i){var o,s,a,u,l,c=i.stack.split("\n");if(o=s=a=null,r.name){for(u=0;u<c.length&&!c[u].startsWith(r.name+"@");++u);u>=c.length-1&&(u=-1)}else u=1===c.length?-1:0;u>=0&&(c=c.slice(u+1),l=n(c[0]),l&&(o=l[1],s=l[2],a=l[3])),t.defineProperty(e,"stack",{configurable:!0,value:c.join("\n")}),o&&t.defineProperties(e,{fileName:{configurable:!0,value:o},lineNumber:{configurable:!0,value:s},columnNumber:{configurable:!0,value:a}})}function i(e,t,n){"stack"in n&&r(e,t,n)}function o(n){if(!(this&&this instanceof o))throw new TypeError("Invalid context for Exception. Did you forget the new keyword?");var r=arguments[1]||this.constructor;if("function"!=typeof r)throw new TypeError("_creatorFn must be omitted, null or a function.");e.captureStackTrace?e.captureStackTrace(this,r):i(this,r,new e),t.defineProperty(this,"message",{configurable:!0,writable:!0,value:n})}return t.declareClass(o,e,{name:{configurable:!0,writable:!0,value:"Exception"}})}(Error,n(1))}])});