(function(){/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
'use strict';function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?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 n=ca(this);function da(a,b){if(b)a:{var c=n;a=a.split(".");for(var d=0;d<a.length-1;d++){var h=a[d];if(!(h in c))break a;c=c[h]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
function p(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}var ea="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},r;if("function"==typeof Object.setPrototypeOf)r=Object.setPrototypeOf;else{var t;a:{var fa={a:!0},u={};try{u.__proto__=fa;t=u.a;break a}catch(a){}t=!1}r=t?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var w=r;
function x(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(w)w(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.J=b.prototype}
da("Promise",function(a){function b(e){this.h=0;this.i=void 0;this.g=[];this.s=!1;var f=this.j();try{e(f.resolve,f.reject)}catch(g){f.reject(g)}}function c(){this.g=null}function d(e){return e instanceof b?e:new b(function(f){f(e)})}if(a)return a;c.prototype.h=function(e){if(null==this.g){this.g=[];var f=this;this.i(function(){f.l()})}this.g.push(e)};var h=n.setTimeout;c.prototype.i=function(e){h(e,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var f=0;f<e.length;++f){var g=
e[f];e[f]=null;try{g()}catch(k){this.j(k)}}}this.g=null};c.prototype.j=function(e){this.i(function(){throw e;})};b.prototype.j=function(){function e(k){return function(l){g||(g=!0,k.call(f,l))}}var f=this,g=!1;return{resolve:e(this.A),reject:e(this.l)}};b.prototype.A=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof b)this.C(e);else{a:switch(typeof e){case "object":var f=null!=e;break a;case "function":f=!0;break a;default:f=!1}f?this.v(e):this.o(e)}};
b.prototype.v=function(e){var f=void 0;try{f=e.then}catch(g){this.l(g);return}"function"==typeof f?this.D(f,e):this.o(e)};b.prototype.l=function(e){this.u(2,e)};b.prototype.o=function(e){this.u(1,e)};b.prototype.u=function(e,f){if(0!=this.h)throw Error("Cannot settle("+e+", "+f+"): Promise already settled in state"+this.h);this.h=e;this.i=f;2===this.h&&this.B();this.G()};b.prototype.B=function(){var e=this;h(function(){if(e.H()){var f=n.console;"undefined"!==typeof f&&f.error(e.i)}},1)};b.prototype.H=
function(){if(this.s)return!1;var e=n.CustomEvent,f=n.Event,g=n.dispatchEvent;if("undefined"===typeof g)return!0;"function"===typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"===typeof f?e=new f("unhandledrejection",{cancelable:!0}):(e=n.document.createEvent("CustomEvent"),e.initCustomEvent("unhandledrejection",!1,!0,e));e.promise=this;e.reason=this.i;return g(e)};b.prototype.G=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)m.h(this.g[e]);this.g=null}};var m=new c;b.prototype.C=
function(e){var f=this.j();e.m(f.resolve,f.reject)};b.prototype.D=function(e,f){var g=this.j();try{e.call(f,g.resolve,g.reject)}catch(k){g.reject(k)}};b.prototype.then=function(e,f){function g(q,v){return"function"==typeof q?function(I){try{k(q(I))}catch(J){l(J)}}:v}var k,l,K=new b(function(q,v){k=q;l=v});this.m(g(e,k),g(f,l));return K};b.prototype.catch=function(e){return this.then(void 0,e)};b.prototype.m=function(e,f){function g(){switch(k.h){case 1:e(k.i);break;case 2:f(k.i);break;default:throw Error("Unexpected state: "+
k.h);}}var k=this;null==this.g?m.h(g):this.g.push(g);this.s=!0};b.resolve=d;b.reject=function(e){return new b(function(f,g){g(e)})};b.race=function(e){return new b(function(f,g){for(var k=p(e),l=k.next();!l.done;l=k.next())d(l.value).m(f,g)})};b.all=function(e){var f=p(e),g=f.next();return g.done?d([]):new b(function(k,l){function K(I){return function(J){q[I]=J;v--;0==v&&k(q)}}var q=[],v=0;do q.push(void 0),v++,d(g.value).m(K(q.length-1),l),g=f.next();while(!g.done)})};return b});var ha=this||self;
function y(a,b){a=a.split(".");var c=ha;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var z={},A=null;var B="function"===typeof Uint8Array;function C(a,b,c){return"object"===typeof a?B&&!Array.isArray(a)&&a instanceof Uint8Array?c(a):D(a,b,c):b(a)}function D(a,b,c){if(Array.isArray(a)){for(var d=Array(a.length),h=0;h<a.length;h++){var m=a[h];null!=m&&(d[h]=C(m,b,c))}Array.isArray(a)&&a.F&&E(d);return d}d={};for(h in a)m=a[h],null!=m&&(d[h]=C(m,b,c));return d}
function ia(a){return D(a,function(b){return"number"===typeof b?isFinite(b)?b:String(b):b},function(b){var c;void 0===c&&(c=0);if(!A){A={};for(var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),h=["+/=","+/","-_=","-_.","-_"],m=0;5>m;m++){var e=d.concat(h[m].split(""));z[m]=e;for(var f=0;f<e.length;f++){var g=e[f];void 0===A[g]&&(A[g]=f)}}}c=z[c];d=Array(Math.floor(b.length/3));h=c[64]||"";for(m=e=0;e<b.length-2;e+=3){var k=b[e],l=b[e+1];g=b[e+2];f=c[k>>2];k=c[(k&3)<<
4|l>>4];l=c[(l&15)<<2|g>>6];g=c[g&63];d[m++]=f+k+l+g}f=0;g=h;switch(b.length-e){case 2:f=b[e+1],g=c[(f&15)<<2]||h;case 1:b=b[e],d[m]=c[b>>2]+c[(b&3)<<4|f>>4]+g+h}return d.join("")})}var ja={F:{value:!0,configurable:!0}};function E(a){Array.isArray(a)&&!Object.isFrozen(a)&&Object.defineProperties(a,ja);return a};var F;function G(a,b,c){var d=F;F=null;a||(a=d);d=this.constructor.I;a||(a=d?[d]:[]);this.j=d?0:-1;this.i=null;this.g=a;a:{d=this.g.length;a=d-1;if(d&&(d=this.g[a],!(null===d||"object"!=typeof d||Array.isArray(d)||B&&d instanceof Uint8Array))){this.l=a-this.j;this.h=d;break a}void 0!==b&&-1<b?(this.l=Math.max(b,a+1-this.j),this.h=null):this.l=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b++)a=c[b],a<this.l?(a+=this.j,(d=this.g[a])?E(d):this.g[a]=H):(L(this),(d=this.h[a])?E(d):this.h[a]=H)}var H=Object.freeze(E([]));
function L(a){var b=a.l+a.j;a.g[b]||(a.h=a.g[b]={})}function M(a,b){if(-1===b)return null;if(b<a.l){b+=a.j;var c=a.g[b];return c!==H?c:a.g[b]=E([])}if(a.h)return c=a.h[b],c!==H?c:a.h[b]=E([])}function N(a,b){a=M(a,b);return null==a?a:!!a}function O(a,b){a=M(a,b);return null==a?0:a}function ka(a){var b=void 0===b?!1:b;a=N(a,1);return null==a?b:a}function P(a,b,c){b<a.l?a.g[b+a.j]=c:(L(a),a.h[b]=c)}function Q(a,b,c,d){c!==d?P(a,b,c):P(a,b,void 0)}
function R(a,b,c){if(-1===c)return null;a.i||(a.i={});if(!a.i[c]){var d=M(a,c);d&&(a.i[c]=new b(d))}return a.i[c]}G.prototype.toJSON=function(){var a=S(this,!1);return ia(a)};function S(a,b){if(a.i)for(var c in a.i){var d=a.i[c];if(Array.isArray(d))for(var h=0;h<d.length;h++)d[h]&&S(d[h],b);else d&&S(d,b)}return a.g}function la(a,b){F=b=b?JSON.parse(b):null;a=new a(b);F=null;return a}G.prototype.toString=function(){return S(this,!1).toString()};function T(a){G.call(this,a,-1,ma)}x(T,G);var ma=[17];function U(a){G.call(this,a,-1,na)}x(U,G);var na=[8];function oa(a){G.call(this,a,-1,pa)}x(oa,G);var pa=[27];function qa(a){G.call(this,a)}x(qa,G);function ra(a){G.call(this,a,-1,sa)}x(ra,G);var sa=[1,2,3];function ta(a){G.call(this,a,-1,ua)}x(ta,G);var ua=[12];function V(a,b){a=a.getElementsByTagName("META");for(var c=0;c<a.length;++c)if(a[c].getAttribute("name")===b)return a[c].getAttribute("content")||"";return""};function va(a,b){this.head=a;this.body=b;V(b,"sampling_mod");a=V(b,"namespace");if(!a){a=Math.random;a="ns-"+a().toString(36).substr(2,5);a:{var c=void 0===c?0:c;for(var d=b.getElementsByTagName("META"),h=0;h<d.length;++h)if("namespace"===d[h].getAttribute("name")&&d[h].getAttribute("index")===c.toString()){d[h].setAttribute("content",a);break a}d=b.querySelector("#mys-meta");d||(d=document.createElement("div"),d.id="mys-meta",d.style.position="absolute",d.style.display="none",b.appendChild(d));b=
document.createElement("META");b.setAttribute("name","namespace");b.setAttribute("content",a);b.setAttribute("index",c.toString());d.appendChild(b)}}}function W(a,b){a=a.body;var c={detail:void 0};c=void 0===c?{}:c;if("function"===typeof window.CustomEvent)var d=new CustomEvent(b,c);else d=document.createEvent("CustomEvent"),d.initCustomEvent(b,!!c.bubbles,!!c.cancelable,c.detail);a.dispatchEvent(d)}va.prototype.addEventListener=function(a,b){this.body.addEventListener(a,b)};function wa(a){G.call(this,a)}x(wa,G);function xa(a){var b=document;a=String(a);"application/xhtml+xml"===b.contentType&&(a=a.toLowerCase());return b.createElement(a)};function ya(a,b){this.context=a;this.i=b;this.h=xa("SPAN");this.g=xa("DIV");this.h.style.fontSize="6px";this.h.textContent="go";this.g.style.position="absolute";this.g.style.top="100%";this.g.style.left="100%";this.g.style.width="1px";this.g.style.height="0";this.g.style.overflow="hidden";this.g.style.visibility="hidden";this.g.appendChild(this.h)}
ya.prototype.wait=function(){var a=this;if(!ka(this.i)&&(W(this.context,"spanStart"),this.context.body.appendChild(this.g),!za(this)))return new Promise(function(b){var c=setInterval(function(){za(a)&&(clearInterval(c),b())},O(a.i,3))})};function za(a){if(1>=a.h.offsetWidth||1>=a.h.offsetHeight)return!1;a.g.remove();W(a.context,"spanReady");return!0};function Aa(a){this.h=0;this.i=R(a,oa,1);this.g=R(a,U,12)||new U;this.h=a=O(a,2);2===a&&(P(this.g,6,!1),P(this.g,7,!1));R(this.i,T,10)||new T};function X(a,b){this.context=a;this.j=b;new ta;this.g=0}function Ba(a){a.g&=-31}function Y(a,b){a.g|=b}X.prototype.h=function(){};function Ca(a,b,c,d){this.context=new va(a,b);this.g=d(this.context,c)}function Da(a){la(ra,V(a.context.body,"engine_msg")||"[]");return a.g.h()||Promise.resolve()}
function Ea(a){var b;Ba(a.g);Y(a.g,1);null===(b=window.AFMA_Communicator)||void 0===b?void 0:b.addEventListener("onshow",function(){Y(a.g,32)});var c=0,d=a.context.body;d.addEventListener("browserRender",function(){++c;if(1===c)W(a.context,"overallStart"),Da(a).then(function(){W(a.context,"overallQuiet")});else{var h=d.clientHeight;d.clientWidth&&h&&Da(a)}})};function Fa(){this.h=this.g=!1;this.i=[]}function Ga(a){a.i.length=0;a.h=!0}function Ha(a,b){function c(){a.h=!1;var d=a.i.shift();return void 0===d?(a.g=!1,Promise.resolve()):Ha(a,d())}a.g=!0;return b?b.then(c,function(){if(a.h)return c();a.g=!1;return Promise.reject()}):c()}function Ia(a,b){b=p(b);for(var c=b.next();!c.done;c=b.next())a.i.push(c.value);if(!a.g)return Ha(a)};function Z(){X.apply(this,arguments);this.i=new Fa}x(Z,X);
Z.prototype.h=function(){var a=this;Ga(this.i);return Ia(this.i,[function(){},function(){var b,c=a.j,d=new wa;Q(d,3,100,0);Q(d,4,1E4,0);N(c.g,4)?(Q(d,6,!0,!1),Q(d,7,"monospace",""),Q(d,8,"IMWimw0.!?@","")):(N(c.g,5)&&Q(d,9,!0,!1),Q(d,5,!0,!1));N(c.g,3)&&Q(d,2,!0,!1);2===c.h&&Q(d,2,!0,!1);d&&(b=(new ya(a.context,d)).wait());W(a.context,"browserStart");W(a.context,"browserStartEnd");Ba(a);Y(a,2);return b},function(){W(a.context,"browserReady");W(a.context,"browserReadyEnd");Y(a,4);W(a.context,"overallReady")},
function(){W(a.context,"browserQuiet");W(a.context,"browserQuietEnd");Y(a,8)}])};(function(a){var b=null;y("mys.engine.init",function(c,d){var h=la(qa,V(d,"render_config")||"[]");b=new Ca(c,d,h,a);Ea(b)});y("mys.engine.stage",function(){return b?b.g.g:0})})(function(a,b){b=new Aa(b);return new Z(a,b)});}).call(this);
