UNPKG

@firebase/webchannel-wrapper

Version:

A wrapper of the webchannel packages from closure-library for use outside of a closure compiled application

109 lines (108 loc) • 51.9 kB
/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ (function() {'use strict';var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a}; function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var p=ca(this);function q(a,b){if(b)a:{var c=p;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:!0,writable:!0,value:b})}} q("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b}); q("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=p[b[c]];typeof d==="function"&&typeof d.prototype[a]!="function"&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return da(aa(this))}})}return a});function da(a){a={next:a};a[Symbol.iterator]=function(){return this};return a} var ea=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},fa;if(typeof Object.setPrototypeOf=="function")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 t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");} q("Promise",function(a){function b(g){this.g=0;this.i=void 0;this.h=[];this.u=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=p.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k= g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.B),reject:g(this.l)}};b.prototype.B=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.G(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}}; b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.F(h,g):this.m(g)};b.prototype.l=function(g){this.o(2,g)};b.prototype.m=function(g){this.o(1,g)};b.prototype.o=function(g,h){if(this.g!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.g);this.g=g;this.i=h;this.g===2&&this.D();this.v()};b.prototype.D=function(){var g=this;e(function(){if(g.C()){var h=p.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C= function(){if(this.u)return!1;var g=p.CustomEvent,h=p.Event,k=p.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=p.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.v=function(){if(this.h!=null){for(var g=0;g<this.h.length;++g)f.h(this.h[g]);this.h=null}};var f=new c;b.prototype.G= function(g){var h=this.j();g.ha(h.resolve,h.reject)};b.prototype.F=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(u,z){return typeof u=="function"?function(G){try{l(u(G))}catch(H){m(H)}}:z}var l,m,r=new b(function(u,z){l=u;m=z});this.ha(k(g,l),k(h,m));return r};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.ha=function(g,h){function k(){switch(l.g){case 1:g(l.i);break;case 2:h(l.i);break;default:throw Error("Unexpected state: "+ l.g);}}var l=this;this.h==null?f.h(k):this.h.push(k);this.u=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).ha(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function r(G){return function(H){u[G]=H;z--;z==0&&l(u)}}var u=[],z=0;do u.push(void 0),z++,d(k.value).ha(r(u.length-1),m),k=h.next();while(!k.done)})};return b}); function v(a,b){return Object.prototype.hasOwnProperty.call(a,b)}q("Symbol.dispose",function(a){return a?a:Symbol("Symbol.dispose")}); q("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!v(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}), m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(r){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!v(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&v(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&v(k, g)&&v(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&v(k,g)&&v(k[g],this.g)?delete k[g][this.g]:!1};return b}); q("Map",function(a){function b(){var h={};return h.P=h.next=h.head=h}function c(h,k){var l=h[1];return da(function(){if(l){for(;l.head!=h[1];)l=l.P;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&v(h[0],l))for(h=0;h<m.length;h++){var r=m[h];if(k!==k&&r.key!==r.key||k===r.key)return{id:l,list:m,index:h,entry:r}}return{id:l, list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!= 4||m.value[1]!="t"||!l.next().done?!1:!0}catch(r){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],P:this[1].P,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].P.next=l.entry,this[1].P=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.P.next=h.entry.next, h.entry.next.P=h.entry.P,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].P=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach= function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e}); q("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=4|| f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]= b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});q("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,f=0;f<e;f++){var g=d[f];if(b.call(c,g,f,d)){b=g;break a}}b=void 0}return b}}); function la(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}q("Array.prototype.values",function(a){return a?a:function(){return la(this,function(b,c){return c})}});q("Array.prototype.keys",function(a){return a?a:function(){return la(this,function(b){return b})}}); q("Array.prototype.entries",function(a){return a?a:function(){return la(this,function(b,c){return[b,c]})}});q("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}}); q("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)v(b,d)&&c.push([d,b[d]]);return c}});/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var ma=ma||{},w=this||self;function na(a){var b=typeof a;return b=="object"&&a!=null||b=="function"}function oa(a,b,c){return a.call.apply(a.bind,arguments)}function pa(a,b,c){if(!a)throw Error();if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}} function x(a,b,c){x=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?oa:pa;return x.apply(null,arguments)}function qa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}} function y(a,b){function c(){}c.prototype=b.prototype;a.X=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Qb=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};var ra=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?function(a){return a&&AsyncContext.Snapshot.wrap(a)}:function(a){return a};var sa=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function ta(a){var b=a.length;if(b>0){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]} function ua(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];var e=typeof d;e=e!="object"?e:d?Array.isArray(d)?"array":e:"null";if(e=="array"||e=="object"&&typeof d.length=="number"){e=a.length||0;var f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}};function va(a,b){this.i=a;this.j=b;this.h=0;this.g=null}va.prototype.get=function(){if(this.h>0){this.h--;var a=this.g;this.g=a.next;a.next=null}else a=this.i();return a};function wa(a){w.setTimeout(function(){throw a;},0)};function xa(){this.h=this.g=null}xa.prototype.add=function(a,b){var c=ya.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c};function za(){var a=Aa,b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}var ya=new va(function(){return new Ba},function(a){return a.reset()});function Ba(){this.next=this.g=this.h=null}Ba.prototype.set=function(a,b){this.h=a;this.g=b;this.next=null};Ba.prototype.reset=function(){this.next=this.g=this.h=null};var Ca,Da=!1,Aa=new xa;function Fa(a,b){Ca||Ga();Da||(Ca(),Da=!0);Aa.add(a,b)}function Ga(){var a=Promise.resolve(void 0);Ca=function(){a.then(Ha)}}function Ha(){for(var a;a=za();){try{a.h.call(a.g)}catch(c){wa(c)}var b=ya;b.j(a);b.h<100&&(b.h++,a.next=b.g,b.g=a)}Da=!1};function A(){this.u=this.u;this.C=this.C}A.prototype.u=!1;A.prototype.dispose=function(){this.u||(this.u=!0,this.N())};A.prototype[Symbol.dispose]=function(){this.dispose()};A.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function B(a,b){this.type=a;this.g=this.target=b;this.defaultPrevented=!1}B.prototype.h=function(){this.defaultPrevented=!0};var Ia=function(){if(!w.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{var c=function(){};w.addEventListener("test",c,b);w.removeEventListener("test",c,b)}catch(d){}return a}();function Ja(a){return/^[\s\xa0]*$/.test(a)};function C(a,b){B.call(this,a?a.type:"");this.relatedTarget=this.g=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.i=null;a&&this.init(a,b)}y(C,B); C.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.g=b;b=a.relatedTarget;b||(c=="mouseover"?b=a.fromElement:c=="mouseout"&&(b=a.toElement));this.relatedTarget=b;d?(this.clientX=d.clientX!==void 0?d.clientX:d.pageX,this.clientY=d.clientY!==void 0?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!== void 0?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.key=a.key||"";this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType=a.pointerType;this.state=a.state;this.i=a;a.defaultPrevented&&C.X.h.call(this)};C.prototype.h=function(){C.X.h.call(this);var a=this.i;a.preventDefault?a.preventDefault():a.returnValue=!1};var Ka="closure_listenable_"+(Math.random()*1E6|0);var La=0;function Ma(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.ja=e;this.key=++La;this.ea=this.ga=!1}function Na(a){a.ea=!0;a.listener=null;a.proxy=null;a.src=null;a.ja=null};function Oa(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Pa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Qa(a){var b={},c;for(c in a)b[c]=a[c];return b}var Ra="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Sa(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Ra.length;f++)c=Ra[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function Ta(a){this.src=a;this.g={};this.h=0}Ta.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.g[f];a||(a=this.g[f]=[],this.h++);var g=Ua(a,b,d,e);g>-1?(b=a[g],c||(b.ga=!1)):(b=new Ma(b,this.src,f,!!d,e),b.ga=c,a.push(b));return b};function Va(a,b){var c=b.type;if(c in a.g){var d=a.g[c],e=sa(d,b),f;(f=e>=0)&&Array.prototype.splice.call(d,e,1);f&&(Na(b),a.g[c].length==0&&(delete a.g[c],a.h--))}} function Ua(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.ea&&f.listener==b&&f.capture==!!c&&f.ja==d)return e}return-1};var Wa="closure_lm_"+(Math.random()*1E6|0),Xa={},Ya=0;function Za(a,b,c,d,e){if(d&&d.once)return $a(a,b,c,d,e);if(Array.isArray(b)){for(var f=0;f<b.length;f++)Za(a,b[f],c,d,e);return null}c=ab(c);return a&&a[Ka]?a.J(b,c,na(d)?!!d.capture:!!d,e):bb(a,b,c,!1,d,e)} function bb(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=na(e)?!!e.capture:!!e,h=cb(a);h||(a[Wa]=h=new Ta(a));c=h.add(b,c,d,g,f);if(c.proxy)return c;d=db();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)Ia||(e=g),e===void 0&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(eb(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");Ya++;return c} function db(){function a(c){return b.call(a.src,a.listener,c)}var b=fb;return a}function $a(a,b,c,d,e){if(Array.isArray(b)){for(var f=0;f<b.length;f++)$a(a,b[f],c,d,e);return null}c=ab(c);return a&&a[Ka]?a.K(b,c,na(d)?!!d.capture:!!d,e):bb(a,b,c,!0,d,e)} function gb(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)gb(a,b[f],c,d,e);else(d=na(d)?!!d.capture:!!d,c=ab(c),a&&a[Ka])?(a=a.i,b=String(b).toString(),b in a.g&&(f=a.g[b],c=Ua(f,c,d,e),c>-1&&(Na(f[c]),Array.prototype.splice.call(f,c,1),f.length==0&&(delete a.g[b],a.h--)))):a&&(a=cb(a))&&(b=a.g[b.toString()],a=-1,b&&(a=Ua(b,c,d,e)),(c=a>-1?b[a]:null)&&hb(c))} function hb(a){if(typeof a!=="number"&&a&&!a.ea){var b=a.src;if(b&&b[Ka])Va(b.i,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(eb(c),d):b.addListener&&b.removeListener&&b.removeListener(d);Ya--;(c=cb(b))?(Va(c,a),c.h==0&&(c.src=null,b[Wa]=null)):Na(a)}}}function eb(a){return a in Xa?Xa[a]:Xa[a]="on"+a}function fb(a,b){if(a.ea)a=!0;else{b=new C(b,this);var c=a.listener,d=a.ja||a.src;a.ga&&hb(a);a=c.call(d,b)}return a} function cb(a){a=a[Wa];return a instanceof Ta?a:null}var ib="__closure_events_fn_"+(Math.random()*1E9>>>0);function ab(a){if(typeof a==="function")return a;a[ib]||(a[ib]=function(b){return a.handleEvent(b)});return a[ib]};function D(){A.call(this);this.i=new Ta(this);this.M=this;this.G=null}y(D,A);D.prototype[Ka]=!0;D.prototype.removeEventListener=function(a,b,c,d){gb(this,a,b,c,d)}; function E(a,b){var c,d=a.G;if(d)for(c=[];d;d=d.G)c.push(d);a=a.M;d=b.type||b;if(typeof b==="string")b=new B(b,a);else if(b instanceof B)b.target=b.target||a;else{var e=b;b=new B(d,a);Sa(b,e)}e=!0;var f;if(c)for(f=c.length-1;f>=0;f--){var g=b.g=c[f];e=jb(g,d,!0,b)&&e}g=b.g=a;e=jb(g,d,!0,b)&&e;e=jb(g,d,!1,b)&&e;if(c)for(f=0;f<c.length;f++)g=b.g=c[f],e=jb(g,d,!1,b)&&e} D.prototype.N=function(){D.X.N.call(this);if(this.i){var a=this.i,b=0,c;for(c in a.g){for(var d=a.g[c],e=0;e<d.length;e++)++b,Na(d[e]);delete a.g[c];a.h--}}this.G=null};D.prototype.J=function(a,b,c,d){return this.i.add(String(a),b,!1,c,d)};D.prototype.K=function(a,b,c,d){return this.i.add(String(a),b,!0,c,d)}; function jb(a,b,c,d){b=a.i.g[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.ea&&g.capture==c){var h=g.listener,k=g.ja||g.src;g.ga&&Va(a.i,g);e=h.call(k,d)!==!1&&e}}return e&&!d.defaultPrevented};function kb(a,b){if(typeof a!=="function")if(a&&typeof a.handleEvent=="function")a=x(a.handleEvent,a);else throw Error("Invalid listener argument");return Number(b)>2147483647?-1:w.setTimeout(a,b||0)};function F(a,b,c){A.call(this);this.m=c!=null?a.bind(c):a;this.l=b;this.h=null;this.i=!1;this.g=null}F.prototype=ea(A.prototype);F.prototype.constructor=F;if(ka)ka(F,A);else for(var lb in A)if(lb!="prototype")if(Object.defineProperties){var mb=Object.getOwnPropertyDescriptor(A,lb);mb&&Object.defineProperty(F,lb,mb)}else F[lb]=A[lb];F.X=A.prototype;F.prototype.j=function(a){this.h=arguments;this.g?this.i=!0:nb(this)}; F.prototype.N=function(){A.prototype.N.call(this);this.g&&(w.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)};function nb(a){a.g=kb(function(){a.g=null;a.i&&(a.i=!1,nb(a))},a.l);var b=a.h;a.h=null;a.m.apply(null,b)};function ob(a){A.call(this);this.h=a;this.g={}}y(ob,A);var pb=[];function qb(a){Oa(a.g,function(b,c){this.g.hasOwnProperty(c)&&hb(b)},a);a.g={}}ob.prototype.N=function(){ob.X.N.call(this);qb(this)};ob.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var rb=w.JSON.stringify;var sb=w.JSON.parse;function tb(){}tb.prototype.stringify=function(a){return w.JSON.stringify(a,void 0)};tb.prototype.parse=function(a){return w.JSON.parse(a,void 0)};function ub(){};function vb(){}var wb={OPEN:"a",jb:"b",ERROR:"c",wb:"d"};function xb(){B.call(this,"d")}y(xb,B);function yb(){B.call(this,"c")}y(yb,B);var I={},zb=null;function Ab(){return zb=zb||new D}I.Ka="serverreachability";function Bb(a){B.call(this,I.Ka,a)}y(Bb,B);function Cb(a){var b=Ab();E(b,new Bb(b,a))}I.STAT_EVENT="statevent";function Db(a,b){B.call(this,I.STAT_EVENT,a);this.stat=b}y(Db,B);function J(a){var b=Ab();E(b,new Db(b,a))}I.La="timingevent";function Eb(a,b){B.call(this,I.La,a);this.size=b}y(Eb,B); function Fb(a,b){if(typeof a!=="function")throw Error("Fn must not be null and must be a function");return w.setTimeout(function(){a()},b)};function Gb(){this.g=!0}Gb.prototype.wa=function(){this.g=!1};function Hb(a,b,c,d,e,f){a.info(function(){if(a.g)if(f){var g="";for(var h=f.split("&"),k=0;k<h.length;k++){var l=h[k].split("=");if(l.length>1){var m=l[0];l=l[1];var r=m.split("_");g=r.length>=2&&r[1]=="type"?g+(m+"="+l+"&"):g+(m+"=redacted&")}}}else g=null;else g=f;return"XMLHTTP REQ ("+d+") [attempt "+e+"]: "+b+"\n"+c+"\n"+g})} function Ib(a,b,c,d,e,f,g){a.info(function(){return"XMLHTTP RESP ("+d+") [ attempt "+e+"]: "+b+"\n"+c+"\n"+f+" "+g})}function K(a,b,c,d){a.info(function(){return"XMLHTTP TEXT ("+b+"): "+Jb(a,c)+(d?" "+d:"")})}function Kb(a,b){a.info(function(){return"TIMEOUT: "+b})}Gb.prototype.info=function(){}; function Jb(a,b){if(!a.g)return b;if(!b)return null;try{var c=JSON.parse(b);if(c)for(a=0;a<c.length;a++)if(Array.isArray(c[a])){var d=c[a];if(!(d.length<2)){var e=d[1];if(Array.isArray(e)&&!(e.length<1)){var f=e[0];if(f!="noop"&&f!="stop"&&f!="close")for(var g=1;g<e.length;g++)e[g]=""}}}return rb(c)}catch(h){return b}};var Lb={NO_ERROR:0,fb:1,sb:2,rb:3,mb:4,qb:5,tb:6,Ia:7,TIMEOUT:8,xb:9};var Mb={kb:"complete",Hb:"success",ERROR:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",ub:"incrementaldata",yb:"progress",nb:"downloadprogress",Pb:"uploadprogress"};var Nb;function Ob(){}y(Ob,ub);Ob.prototype.g=function(){return new XMLHttpRequest};Nb=new Ob;function L(a){return encodeURIComponent(String(a))}function Pb(a){var b=1;a=a.split(":");for(var c=[];b>0&&a.length;)c.push(a.shift()),b--;a.length&&c.push(a.join(":"));return c};function M(a,b,c,d){this.j=a;this.i=b;this.l=c;this.T=d||1;this.W=new ob(this);this.H=45E3;this.J=null;this.o=!1;this.u=this.B=this.A=this.M=this.F=this.U=this.D=null;this.G=[];this.g=null;this.C=0;this.m=this.v=null;this.Z=-1;this.K=!1;this.R=0;this.O=null;this.Y=this.L=this.V=this.S=!1;this.h=new Qb}function Qb(){this.i=null;this.g="";this.h=!1}var Rb={},Sb={};function Tb(a,b,c){a.M=1;a.A=Ub(N(b));a.u=c;a.S=!0;Vb(a,null)} function Vb(a,b){a.F=Date.now();Wb(a);a.B=N(a.A);var c=a.B,d=a.T;Array.isArray(d)||(d=[String(d)]);Xb(c.i,"t",d);a.C=0;c=a.j.L;a.h=new Qb;a.g=Yb(a.j,c?b:null,!a.u);a.R>0&&(a.O=new F(x(a.aa,a,a.g),a.R));b=a.W;c=a.g;d=a.ca;var e="readystatechange";Array.isArray(e)||(e&&(pb[0]=e.toString()),e=pb);for(var f=0;f<e.length;f++){var g=Za(c,e[f],d||b.handleEvent,!1,b.h||b);if(!g)break;b.g[g.key]=g}b=a.J?Qa(a.J):{};a.u?(a.v||(a.v="POST"),b["Content-Type"]="application/x-www-form-urlencoded",a.g.fa(a.B,a.v, a.u,b)):(a.v="GET",a.g.fa(a.B,a.v,null,b));Cb(1);Hb(a.i,a.v,a.B,a.l,a.T,a.u)}M.prototype.ca=function(a){a=a.target;var b=this.O;b&&O(a)==3?b.j():this.aa(a)}; M.prototype.aa=function(a){try{if(a==this.g)a:{var b=O(this.g),c=this.g.Aa(),d=this.g.da();if(!(b<3)&&(b!=3||this.g&&(this.h.h||this.g.na()||Zb(this.g)))){this.K||b!=4||c==7||(c==8||d<=0?Cb(3):Cb(2));$b(this);var e=this.g.da();this.Z=e;var f=ac(this);this.o=e==200;Ib(this.i,this.v,this.B,this.l,this.T,b,e);if(this.o){if(this.V&&!this.L){b:{if(this.g){var g,h=this.g;if((g=h.g?h.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Ja(g)){var k=g;break b}}k=null}if(a=k)K(this.i,this.l,a,"Initial handshake response via X-HTTP-Initial-Response"), this.L=!0,bc(this,a);else{this.o=!1;this.m=3;J(12);P(this);cc(this);break a}}if(this.S){a=!0;for(var l;!this.K&&this.C<f.length;)if(l=dc(this,f),l==Sb){b==4&&(this.m=4,J(14),a=!1);K(this.i,this.l,null,"[Incomplete Response]");break}else if(l==Rb){this.m=4;J(15);K(this.i,this.l,f,"[Invalid Chunk]");a=!1;break}else K(this.i,this.l,l,null),bc(this,l);ec(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0);b!=4||f.length!=0||this.h.h||(this.m=1,J(16),a=!1);this.o=this.o&&a;if(!a)K(this.i,this.l, f,"[Invalid Chunked Response]"),P(this),cc(this);else if(f.length>0&&!this.Y){this.Y=!0;var m=this.j;m.g==this&&m.ba&&!m.R&&(m.j.info("Great, no buffering proxy detected. Bytes received: "+f.length),fc(m),m.R=!0,J(11))}}else K(this.i,this.l,f,null),bc(this,f);b==4&&P(this);this.o&&!this.K&&(b==4?hc(this.j,this):(this.o=!1,Wb(this)))}else ic(this.g),e==400&&f.indexOf("Unknown SID")>0?(this.m=3,J(12)):(this.m=0,J(13)),P(this),cc(this)}}}catch(r){}finally{}}; function ac(a){if(!ec(a))return a.g.na();var b=Zb(a.g);if(b==="")return"";var c="",d=b.length,e=O(a.g)==4;if(!a.h.i){if(typeof TextDecoder==="undefined")return P(a),cc(a),"";a.h.i=new w.TextDecoder}for(var f=0;f<d;f++)a.h.h=!0,c+=a.h.i.decode(b[f],{stream:!(e&&f==d-1)});b.length=0;a.h.g+=c;a.C=0;return a.h.g}function ec(a){return a.g?a.v=="GET"&&a.M!=2&&a.j.Ca:!1} function dc(a,b){var c=a.C,d=b.indexOf("\n",c);if(d==-1)return Sb;c=Number(b.substring(c,d));if(isNaN(c))return Rb;d+=1;if(d+c>b.length)return Sb;b=b.slice(d,d+c);a.C=d+c;return b}M.prototype.cancel=function(){this.K=!0;P(this)};function Wb(a){a.U=Date.now()+a.H;jc(a,a.H)}function jc(a,b){if(a.D!=null)throw Error("WatchDog timer not null");a.D=Fb(x(a.ba,a),b)}function $b(a){a.D&&(w.clearTimeout(a.D),a.D=null)} M.prototype.ba=function(){this.D=null;var a=Date.now();a-this.U>=0?(Kb(this.i,this.B),this.M!=2&&(Cb(3),J(17)),P(this),this.m=2,cc(this)):jc(this,this.U-a)};function cc(a){a.j.I==0||a.K||hc(a.j,a)}function P(a){$b(a);var b=a.O;b&&typeof b.dispose=="function"&&b.dispose();a.O=null;qb(a.W);a.g&&(b=a.g,a.g=null,b.abort(),b.dispose())} function bc(a,b){try{var c=a.j;if(c.I!=0&&(c.g==a||kc(c.h,a)))if(!a.L&&kc(c.h,a)&&c.I==3){try{var d=c.Da.g.parse(b)}catch(Ea){d=null}if(Array.isArray(d)&&d.length==3){var e=d;if(e[0]==0)a:{if(!c.v){if(c.g)if(c.g.F+3E3<a.F)lc(c),mc(c);else break a;nc(c);J(18)}}else c.za=e[1],0<c.za-c.K&&e[2]<37500&&c.F&&c.A==0&&!c.C&&(c.C=Fb(x(c.Xa,c),6E3));oc(c.h)<=1&&c.va&&(c.va=void 0)}else Q(c,11)}else if((a.L||c.g==a)&&lc(c),!Ja(b))for(e=c.Da.g.parse(b),b=0;b<e.length;b++){var f=e[b],g=f[0];if(!(g<=c.K))if(c.K= g,f=f[1],c.I==2)if(f[0]=="c"){c.M=f[1];c.ca=f[2];var h=f[3];h!=null&&(c.ma=h,c.j.info("VER="+c.ma));var k=f[4];k!=null&&(c.Ba=k,c.j.info("SVER="+c.Ba));var l=f[5];l!=null&&typeof l==="number"&&l>0&&(d=1.5*l,c.O=d,c.j.info("backChannelRequestTimeoutMs_="+d));d=c;var m=a.g;if(m){var r=m.g?m.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(r){var u=d.h;u.g||r.indexOf("spdy")==-1&&r.indexOf("quic")==-1&&r.indexOf("h2")==-1||(u.j=u.l,u.g=new Set,u.h&&(pc(u,u.h),u.h=null))}if(d.G){var z=m.g?m.g.getResponseHeader("X-HTTP-Session-Id"): null;z&&(d.ya=z,R(d.J,d.G,z))}}c.I=3;c.l&&c.l.ta();c.ba&&(c.U=Date.now()-a.F,c.j.info("Handshake RTT: "+c.U+"ms"));d=c;var G=a;d.pa=qc(d,d.L?d.ca:null,d.Y);if(G.L){rc(d.h,G);var H=G,X=d.O;X&&(H.H=X);H.D&&($b(H),Wb(H));d.g=G}else sc(d);c.i.length>0&&tc(c)}else f[0]!="stop"&&f[0]!="close"||Q(c,7);else c.I==3&&(f[0]=="stop"||f[0]=="close"?f[0]=="stop"?Q(c,7):uc(c):f[0]!="noop"&&c.l&&c.l.sa(f),c.A=0)}Cb(4)}catch(Ea){}};function vc(a,b){this.g=a;this.map=b};function wc(a){this.l=a||10;w.PerformanceNavigationTiming?(a=w.performance.getEntriesByType("navigation"),a=a.length>0&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(w.chrome&&w.chrome.loadTimes&&w.chrome.loadTimes()&&w.chrome.loadTimes().wasFetchedViaSpdy);this.j=a?this.l:1;this.g=null;this.j>1&&(this.g=new Set);this.h=null;this.i=[]}function xc(a){return a.h?!0:a.g?a.g.size>=a.j:!1}function oc(a){return a.h?1:a.g?a.g.size:0}function kc(a,b){return a.h?a.h==b:a.g?a.g.has(b):!1} function pc(a,b){a.g?a.g.add(b):a.h=b}function rc(a,b){a.h&&a.h==b?a.h=null:a.g&&a.g.has(b)&&a.g.delete(b)}wc.prototype.cancel=function(){this.i=yc(this);if(this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(var a=t(this.g.values()),b=a.next();!b.done;b=a.next())b.value.cancel();this.g.clear()}}; function yc(a){if(a.h!=null)return a.i.concat(a.h.G);if(a.g!=null&&a.g.size!==0){var b=a.i;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())b=b.concat(c.value.G);return b}return ta(a.i)};var zc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Ac(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(d>=0){var f=a[c].substring(0,d);e=a[c].substring(d+1)}else f=a[c];b(f,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};function S(a){this.g=this.o=this.j="";this.u=null;this.m=this.h="";this.l=!1;var b;a instanceof S?(this.l=a.l,Bc(this,a.j),this.o=a.o,this.g=a.g,Cc(this,a.u),this.h=a.h,Dc(this,Fc(a.i)),this.m=a.m):a&&(b=String(a).match(zc))?(this.l=!1,Bc(this,b[1]||"",!0),this.o=Gc(b[2]||""),this.g=Gc(b[3]||"",!0),Cc(this,b[4]),this.h=Gc(b[5]||"",!0),Dc(this,b[6]||"",!0),this.m=Gc(b[7]||"")):(this.l=!1,this.i=new Hc(null,this.l))} S.prototype.toString=function(){var a=[],b=this.j;b&&a.push(Ic(b,Jc,!0),":");var c=this.g;if(c||b=="file")a.push("//"),(b=this.o)&&a.push(Ic(b,Jc,!0),"@"),a.push(L(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.u,c!=null&&a.push(":",String(c));if(c=this.h)this.g&&c.charAt(0)!="/"&&a.push("/"),a.push(Ic(c,c.charAt(0)=="/"?Kc:Lc,!0));(c=this.i.toString())&&a.push("?",c);(c=this.m)&&a.push("#",Ic(c,Mc));return a.join("")}; S.prototype.resolve=function(a){var b=N(this),c=!!a.j;c?Bc(b,a.j):c=!!a.o;c?b.o=a.o:c=!!a.g;c?b.g=a.g:c=a.u!=null;var d=a.h;if(c)Cc(b,a.u);else if(c=!!a.h){if(d.charAt(0)!="/")if(this.g&&!this.h)d="/"+d;else{var e=b.h.lastIndexOf("/");e!=-1&&(d=b.h.slice(0,e+1)+d)}e=d;if(e==".."||e==".")d="";else if(e.indexOf("./")!=-1||e.indexOf("/.")!=-1){d=e.lastIndexOf("/",0)==0;e=e.split("/");for(var f=[],g=0;g<e.length;){var h=e[g++];h=="."?d&&g==e.length&&f.push(""):h==".."?((f.length>1||f.length==1&&f[0]!= "")&&f.pop(),d&&g==e.length&&f.push("")):(f.push(h),d=!0)}d=f.join("/")}else d=e}c?b.h=d:c=a.i.toString()!=="";c?Dc(b,Fc(a.i)):c=!!a.m;c&&(b.m=a.m);return b};function N(a){return new S(a)}function Bc(a,b,c){a.j=c?Gc(b,!0):b;a.j&&(a.j=a.j.replace(/:$/,""))}function Cc(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.u=b}else a.u=null}function Dc(a,b,c){b instanceof Hc?(a.i=b,Nc(a.i,a.l)):(c||(b=Ic(b,Oc)),a.i=new Hc(b,a.l))}function R(a,b,c){a.i.set(b,c)} function Ub(a){R(a,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36));return a}function Gc(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function Ic(a,b,c){return typeof a==="string"?(a=encodeURI(a).replace(b,Pc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Pc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)} var Jc=/[#\/\?@]/g,Lc=/[#\?:]/g,Kc=/[#\?]/g,Oc=/[#\?@]/g,Mc=/#/g;function Hc(a,b){this.h=this.g=null;this.i=a||null;this.j=!!b}function T(a){a.g||(a.g=new Map,a.h=0,a.i&&Ac(a.i,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))}n=Hc.prototype;n.add=function(a,b){T(this);this.i=null;a=U(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.h+=1;return this};function Qc(a,b){T(a);b=U(a,b);a.g.has(b)&&(a.i=null,a.h-=a.g.get(b).length,a.g.delete(b))} function Rc(a,b){T(a);b=U(a,b);return a.g.has(b)}n.forEach=function(a,b){T(this);this.g.forEach(function(c,d){c.forEach(function(e){a.call(b,e,d,this)},this)},this)};function Sc(a,b){T(a);var c=[];if(typeof b==="string")Rc(a,b)&&(c=c.concat(a.g.get(U(a,b))));else for(a=Array.from(a.g.values()),b=0;b<a.length;b++)c=c.concat(a[b]);return c}n.set=function(a,b){T(this);this.i=null;a=U(this,a);Rc(this,a)&&(this.h-=this.g.get(a).length);this.g.set(a,[b]);this.h+=1;return this}; n.get=function(a,b){if(!a)return b;a=Sc(this,a);return a.length>0?String(a[0]):b};function Xb(a,b,c){Qc(a,b);c.length>0&&(a.i=null,a.g.set(U(a,b),ta(c)),a.h+=c.length)}n.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var a=[],b=Array.from(this.g.keys()),c=0;c<b.length;c++){var d=b[c],e=L(d);d=Sc(this,d);for(var f=0;f<d.length;f++){var g=e;d[f]!==""&&(g+="="+L(d[f]));a.push(g)}}return this.i=a.join("&")}; function Fc(a){var b=new Hc;b.i=a.i;a.g&&(b.g=new Map(a.g),b.h=a.h);return b}function U(a,b){b=String(b);a.j&&(b=b.toLowerCase());return b}function Nc(a,b){b&&!a.j&&(T(a),a.i=null,a.g.forEach(function(c,d){var e=d.toLowerCase();d!=e&&(Qc(this,d),Xb(this,e,c))},a));a.j=b};function Tc(a,b){var c=new Gb;if(w.Image){var d=new Image;d.onload=qa(V,c,"TestLoadImage: loaded",!0,b,d);d.onerror=qa(V,c,"TestLoadImage: error",!1,b,d);d.onabort=qa(V,c,"TestLoadImage: abort",!1,b,d);d.ontimeout=qa(V,c,"TestLoadImage: timeout",!1,b,d);w.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4);d.src=a}else b(!1)} function Uc(a,b){var c=new Gb,d=new AbortController,e=setTimeout(function(){d.abort();V(c,"TestPingServer: timeout",!1,b)},1E4);fetch(a,{signal:d.signal}).then(function(f){clearTimeout(e);f.ok?V(c,"TestPingServer: ok",!0,b):V(c,"TestPingServer: server error",!1,b)}).catch(function(){clearTimeout(e);V(c,"TestPingServer: error",!1,b)})}function V(a,b,c,d,e){try{e&&(e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null),d(c)}catch(f){}};function Vc(){this.g=new tb};function Wc(a){this.i=a.Ub||null;this.h=a.cb||!1}y(Wc,ub);Wc.prototype.g=function(){return new Xc(this.i,this.h)};function Xc(a,b){D.call(this);this.H=a;this.o=b;this.m=void 0;this.status=this.readyState=0;this.responseType=this.responseText=this.response=this.statusText="";this.onreadystatechange=null;this.A=new Headers;this.h=null;this.F="GET";this.D="";this.g=!1;this.B=this.j=this.l=null;this.v=new AbortController}y(Xc,D);n=Xc.prototype; n.open=function(a,b){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=a;this.D=b;this.readyState=1;Yc(this)};n.send=function(a){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;var b={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};a&&(b.body=a);(this.H||w).fetch(new Request(this.D,b)).then(this.Ra.bind(this),this.ia.bind(this))}; n.abort=function(){this.response=this.responseText="";this.A=new Headers;this.status=0;this.v.abort();this.j&&this.j.cancel("Request was aborted.").catch(function(){});this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,Zc(this));this.readyState=0}; n.Ra=function(a){if(this.g&&(this.l=a,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=a.headers,this.readyState=2,Yc(this)),this.g&&(this.readyState=3,Yc(this),this.g)))if(this.responseType==="arraybuffer")a.arrayBuffer().then(this.Pa.bind(this),this.ia.bind(this));else if(typeof w.ReadableStream!=="undefined"&&"body"in a){this.j=a.body.getReader();if(this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response= []}else this.response=this.responseText="",this.B=new TextDecoder;$c(this)}else a.text().then(this.Qa.bind(this),this.ia.bind(this))};function $c(a){a.j.read().then(a.Oa.bind(a)).catch(a.ia.bind(a))}n.Oa=function(a){if(this.g){if(this.o&&a.value)this.response.push(a.value);else if(!this.o){var b=a.value?a.value:new Uint8Array(0);if(b=this.B.decode(b,{stream:!a.done}))this.response=this.responseText+=b}a.done?Zc(this):Yc(this);this.readyState==3&&$c(this)}}; n.Qa=function(a){this.g&&(this.response=this.responseText=a,Zc(this))};n.Pa=function(a){this.g&&(this.response=a,Zc(this))};n.ia=function(){this.g&&Zc(this)};function Zc(a){a.readyState=4;a.l=null;a.j=null;a.B=null;Yc(a)}n.setRequestHeader=function(a,b){this.A.append(a,b)};n.getResponseHeader=function(a){return this.h?this.h.get(a.toLowerCase())||"":""}; n.getAllResponseHeaders=function(){if(!this.h)return"";for(var a=[],b=this.h.entries(),c=b.next();!c.done;)c=c.value,a.push(c[0]+": "+c[1]),c=b.next();return a.join("\r\n")};function Yc(a){a.onreadystatechange&&a.onreadystatechange.call(a)}Object.defineProperty(Xc.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(a){this.m=a?"include":"same-origin"}});function ad(a){var b="";Oa(a,function(c,d){b+=d;b+=":";b+=c;b+="\r\n"});return b}function bd(a,b,c){a:{for(d in c){var d=!1;break a}d=!0}d||(c=ad(c),typeof a==="string"?(L(b),c!=null&&L(c)):R(a,b,c))};function W(a){D.call(this);this.headers=new Map;this.L=a||null;this.h=!1;this.g=null;this.D="";this.o=0;this.l="";this.j=this.B=this.v=this.A=!1;this.m=null;this.F="";this.H=!1}y(W,D);var cd=/^https?$/i,dd=["POST","PUT"];n=W.prototype;n.Ha=function(a){this.H=a}; n.fa=function(a,b,c,d){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+a);b=b?b.toUpperCase():"GET";this.D=a;this.l="";this.o=0;this.A=!1;this.h=!0;this.g=this.L?this.L.g():Nb.g();this.g.onreadystatechange=ra(x(this.Ea,this));try{this.B=!0,this.g.open(b,String(a),!0),this.B=!1}catch(g){ed(this,g);return}a=c||"";c=new Map(this.headers);if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if(typeof d.keys==="function"&& typeof d.get==="function"){e=t(d.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,c.set(f,d.get(f))}else throw Error("Unknown input type for opt_headers: "+String(d));d=Array.from(c.keys()).find(function(g){return"content-type"==g.toLowerCase()});e=w.FormData&&a instanceof w.FormData;!(sa(dd,b)>=0)||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");b=t(c);for(d=b.next();!d.done;d=b.next())c=t(d.value),d=c.next().value,c=c.next().value,this.g.setRequestHeader(d,c); this.F&&(this.g.responseType=this.F);"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(a),this.v=!1}catch(g){ed(this,g)}};function ed(a,b){a.h=!1;a.g&&(a.j=!0,a.g.abort(),a.j=!1);a.l=b;a.o=5;fd(a);gd(a)}function fd(a){a.A||(a.A=!0,E(a,"complete"),E(a,"error"))} n.abort=function(a){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=a||7,E(this,"complete"),E(this,"abort"),gd(this))};n.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),gd(this,!0));W.X.N.call(this)};n.Ea=function(){this.u||(this.B||this.v||this.j?hd(this):this.Za())};n.Za=function(){hd(this)}; function hd(a){if(a.h&&typeof ma!="undefined")if(a.v&&O(a)==4)setTimeout(a.Ea.bind(a),0);else if(E(a,"readystatechange"),O(a)==4){a.h=!1;try{var b=a.da();a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=b===0){var f=String(a.D).match(zc)[1]||null;!f&&w.self&&w.self.location&&(f=w.self.location.protocol.slice(0,-1));e=!cd.test(f?f.toLowerCase():"")}d=e}if(d)E(a,"complete"),E(a,"success");else{a.o=6;try{var g=O(a)> 2?a.g.statusText:""}catch(h){g=""}a.l=g+" ["+a.da()+"]";fd(a)}}finally{gd(a)}}}function gd(a,b){if(a.g){a.m&&(clearTimeout(a.m),a.m=null);var c=a.g;a.g=null;b||E(a,"ready");try{c.onreadystatechange=null}catch(d){}}}n.isActive=function(){return!!this.g};function O(a){return a.g?a.g.readyState:0}n.da=function(){try{return O(this)>2?this.g.status:-1}catch(a){return-1}};n.na=function(){try{return this.g?this.g.responseText:""}catch(a){return""}}; n.Na=function(a){if(this.g){var b=this.g.responseText;a&&b.indexOf(a)==0&&(b=b.substring(a.length));return sb(b)}};function Zb(a){try{if(!a.g)return null;if("response"in a.g)return a.g.response;switch(a.F){case "":case "text":return a.g.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.g)return a.g.mozResponseArrayBuffer}return null}catch(b){return null}} function ic(a){var b={};a=(a.g&&O(a)>=2?a.g.getAllResponseHeaders()||"":"").split("\r\n");for(var c=0;c<a.length;c++)if(!Ja(a[c])){var d=Pb(a[c]),e=d[0];d=d[1];if(typeof d==="string"){d=d.trim();var f=b[e]||[];b[e]=f;f.push(d)}}Pa(b,function(g){return g.join(", ")})}n.Aa=function(){return this.o};n.Ja=function(){return typeof this.l==="string"?this.l:String(this.l)};function id(a,b,c){return c&&c.internalChannelParams?c.internalChannelParams[a]||b:b} function jd(a){this.Ba=0;this.i=[];this.j=new Gb;this.ca=this.pa=this.J=this.Y=this.g=this.ya=this.G=this.H=this.u=this.V=this.o=null;this.ab=this.W=0;this.Ua=id("failFast",!1,a);this.F=this.C=this.v=this.m=this.l=null;this.Z=!0;this.za=this.K=-1;this.aa=this.A=this.D=0;this.Sa=id("baseRetryDelayMs",5E3,a);this.bb=id("retryDelaySeedMs",1E4,a);this.Va=id("forwardChannelMaxRetries",2,a);this.xa=id("forwardChannelRequestTimeoutMs",2E4,a);this.oa=a&&a.xmlHttpFactory||void 0;this.Wa=a&&a.Tb||void 0;this.Ca= a&&a.useFetchStreams||!1;this.O=void 0;this.L=a&&a.supportsCrossDomainXhr||!1;this.M="";this.h=new wc(a&&a.concurrentRequestLimit);this.Da=new Vc;this.T=a&&a.fastHandshake||!1;this.S=a&&a.encodeInitMessageHeaders||!1;this.T&&this.S&&(this.S=!1);this.Ta=a&&a.Rb||!1;a&&a.wa&&this.j.wa();a&&a.forceLongPolling&&(this.Z=!1);this.ba=!this.T&&this.Z&&a&&a.detectBufferingProxy||!1;this.ka=void 0;a&&a.longPollingTimeout&&a.longPollingTimeout>0&&(this.ka=a.longPollingTimeout);this.va=void 0;this.U=0;this.R= !1;this.la=this.B=null}n=jd.prototype;n.ma=8;n.I=1;n.connect=function(a,b,c,d){J(0);this.Y=a;this.H=b||{};c&&d!==void 0&&(this.H.OSID=c,this.H.OAID=d);this.F=this.Z;this.J=qc(this,null,this.Y);tc(this)}; function uc(a){kd(a);if(a.I==3){var b=a.W++,c=N(a.J);R(c,"SID",a.M);R(c,"RID",b);R(c,"TYPE","terminate");ld(a,c);b=new M(a,a.j,b);b.M=2;b.A=Ub(N(c));c=!1;if(w.navigator&&w.navigator.sendBeacon)try{c=w.navigator.sendBeacon(b.A.toString(),"")}catch(d){}!c&&w.Image&&((new Image).src=b.A,c=!0);c||(b.g=Yb(b.j,null),b.g.fa(b.A));b.F=Date.now();Wb(b)}md(a)}function mc(a){a.g&&(fc(a),a.g.cancel(),a.g=null)} function kd(a){mc(a);a.v&&(w.clearTimeout(a.v),a.v=null);lc(a);a.h.cancel();a.m&&(typeof a.m==="number"&&w.clearTimeout(a.m),a.m=null)}function tc(a){xc(a.h)||a.m||(a.m=!0,Fa(a.Ga,a),a.D=0)}function nd(a,b){if(oc(a.h)>=a.h.j-(a.m?1:0))return!1;if(a.m)return a.i=b.G.concat(a.i),!0;if(a.I==1||a.I==2||a.D>=(a.Ua?0:a.Va))return!1;a.m=Fb(x(a.Ga,a,b),od(a,a.D));a.D++;return!0} n.Ga=function(a){if(this.m)if(this.m=null,this.I==1){if(!a){this.W=Math.floor(Math.random()*1E5);a=this.W++;var b=new M(this,this.j,a),c=this.o;this.V&&(c?(c=Qa(c),Sa(c,this.V)):c=this.V);this.u!==null||this.S||(b.J=c,c=null);var d;if(this.T)a:{for(var e=d=0;e<this.i.length;e++){b:{var f=this.i[e];if("__data__"in f.map&&(f=f.map.__data__,typeof f==="string")){f=f.length;break b}f=void 0}if(f===void 0)break;d+=f;if(d>4096){d=e;break a}if(d===4096||e===this.i.length-1){d=e+1;break a}}d=1E3}else d=1E3; d=pd(this,b,d);e=N(this.J);R(e,"RID",a);R(e,"CVER",22);this.G&&R(e,"X-HTTP-Session-Id",this.G);ld(this,e);c&&(this.S?d="headers="+L(ad(c))+"&"+d:this.u&&bd(e,this.u,c));pc(this.h,b);this.Ta&&R(e,"TYPE","init");this.T?(R(e,"$req",d),R(e,"SID","null"),b.V=!0,Tb(b,e,null)):Tb(b,e,d);this.I=2}}else this.I==3&&(a?qd(this,a):this.i.length==0||xc(this.h)||qd(this))}; function qd(a,b){var c;b?c=b.l:c=a.W++;var d=N(a.J);R(d,"SID",a.M);R(d,"RID",c);R(d,"AID",a.K);ld(a,d);a.u&&a.o&&bd(d,a.u,a.o);c=new M(a,a.j,c,a.D+1);a.u===null&&(c.J=a.o);b&&(a.i=b.G.concat(a.i));b=pd(a,c,1E3);c.H=Math.round(a.xa*.5)+Math.round(a.xa*.5*Math.random());pc(a.h,c);Tb(c,d,b)}function ld(a,b){a.H&&Oa(a.H,function(c,d){R(b,d,c)});a.l&&Oa({},function(c,d){R(b,d,c)})} function pd(a,b,c){c=Math.min(a.i.length,c);var d=a.l?x(a.l.Ma,a.l,a):null;a:{for(var e=a.i,f=-1;;){var g=["count="+c];f==-1?c>0?(f=e[0].g,g.push("ofs="+f)):f=0:g.push("ofs="+f);for(var h=!0,k=0;k<c;k++){var l=e[k].g,m=e[k].map;l-=f;if(l<0)f=Math.max(0,e[k].g-100),h=!1;else try{l="req"+l+"_"||"";try{var r=m instanceof Map?m:Object.entries(m);for(var u=t(r),z=u.next();!z.done;z=u.next()){var G=t(z.value),H=G.next().value,X=G.next().value,Ea=X;na(X)&&(Ea=rb(X));g.push(l+H+"="+encodeURIComponent(Ea))}}catch(Ec){throw g.push(l+ "type="+encodeURIComponent("_badmap")),Ec;}}catch(Ec){d&&d(m)}}if(h){r=g.join("&");break a}}r=void 0}a=a.i.splice(0,c);b.G=a;return r}function sc(a){a.g||a.v||(a.aa=1,Fa(a.Fa,a),a.A=0)}function nc(a){if(a.g||a.v||a.A>=3)return!1;a.aa++;a.v=Fb(x(a.Fa,a),od(a,a.A));a.A++;return!0}n.Fa=function(){this.v=null;rd(this);if(this.ba&&!(this.R||this.g==null||this.U<=0)){var a=4*this.U;this.j.info("BP detection timer enabled: "+a);this.B=Fb(x(this.Ya,this),a)}}; n.Ya=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.R=!0,J(10),mc(this),rd(this))};function fc(a){a.B!=null&&(w.clearTimeout(a.B),a.B=null)} function rd(a){a.g=new M(a,a.j,"rpc",a.aa);a.u===null&&(a.g.J=a.o);a.g.R=0;var b=N(a.pa);R(b,"RID","rpc");R(b,"SID",a.M);R(b,"AID",a.K);R(b,"CI",a.F?"0":"1");!a.F&&a.ka&&R(b,"TO",a.ka);R(b,"TYPE","xmlhttp");ld(a,b);a.u&&a.o&&bd(b,a.u,a.o);a.O&&(a.g.H=a.O);var c=a.g;a=a.ca;c.M=1;c.A=Ub(N(b));c.u=null;c.S=!0;Vb(c,a)}n.Xa=function(){this.C!=null&&(this.C=null,mc(this),nc(this),J(19))};function lc(a){a.C!=null&&(w.clearTimeout(a.C),a.C=null)} function hc(a,b){var c=null;if(a.g==b){lc(a);fc(a);a.g=null;var d=2}else if(kc(a.h,b))c=b.G,rc(a.h,b),d=1;else return;if(a.I!=0)if(b.o)if(d==1){c=b.u?b.u.length:0;b=Date.now()-b.F;var e=a.D;d=Ab();E(d,new Eb(d,c,b,e));tc(a)}else sc(a);else if(e=b.m,e==3||e==0&&b.Z>0||!(d==1&&nd(a,b)||d==2&&nc(a)))switch(c&&c.length>0&&(b=a.h,b.i=b.i.concat(c)),e){case 1:Q(a,5);break;case 4:Q(a,10);break;case 3:Q(a,6);break;default:Q(a,2)}} function od(a,b){var c=a.Sa+Math.floor(Math.random()*a.bb);a.isActive()||(c*=2);return c*b}function Q(a,b){a.j.info("Error code "+b);if(b==2){var c=x(a.eb,a),d=a.Wa,e=!d;d=new S(d||"//www.google.com/images/cleardot.gif");w.location&&w.location.protocol=="http"||Bc(d,"https");Ub(d);e?Tc(d.toString(),c):Uc(d.toString(),c)}else J(2);a.I=0;a.l&&a.l.ra(b);md(a);kd(a)}n.eb=function(a){a?(this.j.info("Successfully pinged google.com"),J(2)):(this.j.info("Failed to ping google.com"),J(1))}; function md(a){a.I=0;a.la=[];if(a.l){var b=yc(a.h);if(b.length!=0||a.i.length!=0)ua(a.la,b),ua(a.la,a.i),a.h.i.length=0,ta(a.i),a.i.length=0;a.l.qa()}}function qc(a,b,c){var d=c instanceof S?N(c):new S(c);if(d.g!="")b&&(d.g=b+"."+d.g),Cc(d,d.u);else{var e=w.location;d=e.protocol;b=b?b+"."+e.hostname:e.hostname;e=+e.port;var f=new S(null);d&&Bc(f,d);b&&(f.g=b);e&&Cc(f,e);c&&(f.h=c);d=f}c=a.G;b=a.ya;c&&b&&R(d,c,b);R(d,"VER",a.ma);ld(a,d);return d} function Yb(a,b,c){if(b&&!a.L)throw Error("Can't create secondary domain capable XhrIo object.");b=a.Ca&&!a.oa?new W(new Wc({cb:c})):new W(a.oa);b.Ha(a.L);return b}n.isActive=function(){return!!this.l&&this.l.isActive(this)};function sd(){}n=sd.prototype;n.ta=function(){};n.sa=function(){};n.ra=function(){};n.qa=function(){};n.isActive=function(){return!0};n.Ma=function(){};function td(){}td.prototype.g=function(a,b){return new Y(a,b)}; function Y(a,b){D.call(this);this.g=new jd(b);this.l=a;this.h=b&&b.messageUrlParams||null;a=b&&b.messageHeaders||null;b&&b.clientProtocolHeaderRequired&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"});this.g.o=a;a=b&&b.initMessageHeaders||null;b&&b.messageContentType&&(a?a["X-WebChannel-Content-Type"]=b.messageContentType:a={"X-WebChannel-Content-Type":b.messageContentType});b&&b.ua&&(a?a["X-WebChannel-Client-Profile"]=b.ua:a={"X-WebChannel-Client-Profile":b.ua});this.g.V= a;(a=b&&b.Sb)&&!Ja(a)&&(this.g.u=a);this.A=b&&b.supportsCrossDomainXhr||!1;this.v=b&&b.sendRawJson||!1;(b=b&&b.httpSessionIdParam)&&!Ja(b)&&(this.g.G=b,a=this.h,a!==null&&b in a&&(a=this.h,b in a&&delete a[b]));this.j=new Z(this)}y(Y,D);Y.prototype.m=function(){this.g.l=this.j;this.A&&(this.g.L=!0);this.g.connect(this.l,this.h||void 0)};Y.prototype.close=function(){uc(this.g)}; Y.prototype.o=function(a){var b=this.g;if(typeof a==="string"){var c={};c.__data__=a;a=c}else this.v&&(c={},c.__data__=rb(a),a=c);b.i.push(new vc(b.ab++,a));b.I==