(function(){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ 'use strict';function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); function n(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}var ea="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},fa; if("function"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else{var ha;a:{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ka=fa; function la(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ka)ka(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.H=b.prototype}var ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cc&&(c=Math.max(c+e,0));ce;e++){var f=c.concat(d[e].split(""));za[e]=f;for(var g=0;g>2];k=b[(k&3)<<4|l>>4];l=b[(l&15)<<2|h>>6];h=b[h&63];c[e++]=g+k+l+h}g=0;h=d;switch(a.length-f){case 2:g= a[f+1],h=b[(g&15)<<2]||d;case 1:a=a[f],c[e]=b[a>>2]+b[(a&3)<<4|g>>4]+h+d}return c.join("")};var Ba,Ca="undefined"!==typeof TextEncoder;var Da="undefined"!==typeof Uint8Array,Ea=!wa&&"function"===typeof btoa,Fa,Ga={};var z=0,A=0;function Ha(){this.g=[]}Ha.prototype.length=function(){return this.g.length};Ha.prototype.end=function(){var a=this.g;this.g=[];return a};function B(a,b){for(;127>>=7;a.g.push(b)}function Ia(a,b){if(0<=b)B(a,b);else{for(var c=0;9>c;c++)a.g.push(b&127|128),b>>=7;a.g.push(1)}}function Ja(a,b){a.g.push(b>>>0&255);a.g.push(b>>>8&255);a.g.push(b>>>16&255);a.g.push(b>>>24&255)};function Ka(){this.j=[];this.h=0;this.g=new Ha}function C(a,b){0!==b.length&&(a.j.push(b),a.h+=b.length)};function D(a){this.g=a};var E="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol():void 0;function F(a,b){E?a[E]|=b:void 0!==a.g?a.g|=b:Object.defineProperties(a,{g:{value:b,configurable:!0,writable:!0,enumerable:!1}})}function La(a){var b=G(a);1!==(b&1)&&(Object.isFrozen(a)&&(a=Array.prototype.slice.call(a)),H(a,b|1))}function Ma(a,b){E?a[E]&&(a[E]&=~b):void 0!==a.g&&(a.g&=~b)}function G(a){var b;E?b=a[E]:b=a.g;return b|0} function H(a,b){E?a[E]=b:void 0!==a.g?a.g=b:Object.defineProperties(a,{g:{value:b,configurable:!0,writable:!0,enumerable:!1}});return a}function Na(a,b){Object.isFrozen(a)&&(a=Array.prototype.slice.call(a));H(a,b);return a}function Oa(a){F(a,1);return a}function Pa(a,b){H(b,(a|0)&-51)}function Qa(a,b){H(b,(a|18)&-41)};var I={};function J(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}var K=Object.freeze(H([],23));function L(a){if(a&2)throw Error();};function M(a,b,c){return-1===b?null:b>=a.j?a.g?a.g[b]:void 0:c&&a.g&&(c=a.g[b],null!=c)?c:a.i[b+a.h]}function N(a,b,c){L(G(a.i));P(a,b,c)}function P(a,b,c,d){a.l&&(a.l=void 0);if(b>=a.j||d)return d=a.j+a.h,(a.g||(a.g=a.i[d]={}))[b]=c,a;a.i[b+a.h]=c;(c=a.g)&&b in c&&delete c[b];return a}function Q(a,b,c,d){L(G(a.i));for(var e=0,f=0;f=e){Object.assign(b[b.length-1]={},f);break}}e=b;c=!c;f=a.j;var h;for(g=0;ge&&"number"!==typeof a[e]){var f=a[e++];if(Array.isArray(f)){b.j=f[0];b.h=f[1];break a}b.h=f}for(;eh)f[e++]=h;else{if(2048>h)f[e++]=h>>6|192;else{if(55296<=h&&57343>=h){if(56319>=h&&g=k){h=1024*(h-55296)+k- 56320+65536;f[e++]=h>>18|240;f[e++]=h>>12&63|128;f[e++]=h>>6&63|128;f[e++]=h&63|128;continue}else g--}if(d)throw Error("Found an unpaired surrogate");h=65533}f[e++]=h>>12|224;f[e++]=h>>6&63|128}f[e++]=h&63|128}}b=e===f.length?f:f.subarray(0,e)}B(a.g,8*c+2);B(a.g,b.length);C(a,a.g.end());C(a,b)}} var nb=new D(function(a,b,c){var d=M(b,c);var e=null==d?d:"number"===typeof d||"NaN"===d||"Infinity"===d||"-Infinity"===d?Number(d):void 0;null!=e&&e!==d&&P(b,c,e);if(null!=e){B(a.g,8*c+1);a=a.g;c=+e;if(0===c)A=0<1/c?0:2147483648,z=0;else if(isNaN(c))A=2147483647,z=4294967295;else if(c=(e=0>c?-2147483648:0)?-c:c,1.7976931348623157E308>>0,z=0;else if(2.2250738585072014E-308>c)b=c/Math.pow(2,-1074),A=(e|b/4294967296)>>>0,z=b>>>0;else{d=c;b=0;if(2<=d)for(;2<=d&&1023>b;)b++,d/=2;else for(;1> d&&-1022>>0;z=4503599627370496*c>>>0}Ja(a,z);Ja(a,A)}}),ob=new D(function(a,b,c){a:if(b=M(b,c),null!=b){switch(typeof b){case "string":b=+b;break a;case "number":break a}b=void 0}null!=b&&null!=b&&(B(a.g,8*c),Ia(a.g,b))}),pb=new D(mb),qb=new D(mb),rb=new D(function(a,b,c,d,e){b=Ra(b,d,c,void 0,1,G(b.i));if(null!=b)for(d=0;d>>=7,g.h++;f.push(h);g.h++}}),tb=new D(function(a,b,c){b=M(b,c);b=null==b?b:b;null!=b&&(b=parseInt(b,10),B(a.g,8*c),Ia(a.g,b))});function R(a){S.call(this,a)}la(R,S);var T=[1,2,3],ub=[4,5],vb=[R,1,tb,T,2,tb,T,3,qb,T,4,nb,ub,5,qb,ub,6,ob];function U(a){S.call(this,a)}la(U,S);U.v=[1];U.prototype.m=function(a){return function(){var b=new Ka;ib(this,b,hb(a));C(b,b.g.end());for(var c=new Uint8Array(b.h),d=b.j,e=d.length,f=0,g=0;ga||a>d.length)throw Error();void 0!=a?d.splice(a,1,b):d.push(b);G(b.i)&2&&Ma(d,8);return this};wb.v=[1,2];function xb(a){this.h=a;this.data=[];this.g=[]}xb.prototype.setData=function(a,b,c){this.h.includes(c)&&this.data.push({key:a,value:b,channel:c})};function yb(a){return a.data.some(function(b){return 1===b.channel})}xb.prototype.setAttribute=function(a,b){this.g.push({key:a,value:b})}; function zb(a,b,c,d){var e=new R;"string"===typeof a?Q(e,3,T,a):d?Q(e,1,T,a):Q(e,2,T,a);if("number"===typeof b){if(null!=b&&"number"!==typeof b)throw Error("Value of float/double field must be a number|null|undefined, found "+typeof b+": "+b);Q(e,4,ub,b)}else Q(e,5,ub,b);c&&N(e,6,c);return e};function V(){this.g=new xb([]);this.B=Date.now();this.h=[];this.u=this.l=!1;this.m=100} V.prototype.init=function(a,b,c,d,e,f){var g=this;this.g=new xb(b);this.D=a;this.A=e;this.C=c;if(d){b=a=NaN;d=n(d);for(c=d.next();!c.done;c=d.next())e=n(c.value),c=e.next().value,e=e.next().value,6===c?a=Number(e):5===c?b=Number(e):this.g.setAttribute(c,e);!isNaN(a)&&0<=a?this.m=a:isNaN(b)||(this.l=!0,setInterval(this.j.bind(this),b),setTimeout(function(){Ab(g,"timeout")},3E5),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&Ab(g,"document_hidden")}),window.addEventListener("beforeunload", function(){Ab(g,"beforeunload")}))}if(f){f=n(f);for(a=f.next();!a.done;a=f.next())d=n(a.value),a=d.next().value,b=d.next().value,d=d.next().value,this.setData(a,b,d);"complete"===document.readyState?this.send():window.addEventListener("load",function(){g.send()})}};V.prototype.getBaseTime=function(){return this.B};V.prototype.setData=function(a,b,c){this.g.setData(a,b,c);this.h[c]?this.h[c]++:this.h[c]=1};V.prototype.setAttribute=function(a,b){this.g.setAttribute(a,b)}; V.prototype.send=function(a){var b=this;if(!this.l){var c=yb(this.g)?0:this.m;a=null!=a?a:c;0