(function(Ia,Za){"object"===typeof exports&&"undefined"!==typeof module?Za(exports):"function"===typeof define&&define.amd?define(["exports"],Za):(Ia="undefined"!==typeof globalThis?globalThis:Ia||self,Za(Ia.Countly=Ia.Countly||{}))})(this,function(Ia){function Za(m,q,v){if("function"==typeof m?m===q:m.has(q))return 3>arguments.length?q:v;throw new TypeError("Private element is not present on this object");}function b(m,q){return m.get(Za(m,q))}function p(m,q,v){if(q.has(m))throw new TypeError("Cannot initialize the same private elements twice on an object"); q.set(m,v)}function k(m,q,v){return m.set(Za(m,q),v),v}function x(m,q,v){a:{var a=q;if("object"==typeof a&&a){var G=a[Symbol.toPrimitive];if(void 0!==G){a=G.call(a,"string");if("object"!=typeof a)break a;throw new TypeError("@@toPrimitive must return a primitive value.");}a=String(a)}}return(q="symbol"==typeof a?a:a+"")in m?Object.defineProperty(m,q,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[q]=v,m}function U(m){"@babel/helpers - typeof";return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator? function(q){return typeof q}:function(q){return q&&"function"==typeof Symbol&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},U(m)}function Lc(m){var q=[];if("undefined"!==typeof m.options)for(var v=0;v=m?Hb++:Hb=m;return Hb}function w(m,q,v){if(q&&Object.keys(q).length){if("undefined"!==typeof q[m])return q[m]}else if("undefined"!==typeof t[m])return t[m];return v}function pc(m,q,v){for(var a in t.i)t.i[a].tracking_crashes&&t.i[a].recordError(m,q,v)}function qc(m,q){var v=[],a;for(a in m)v.push(a+ "="+encodeURIComponent(m[a]));var G=v.join("&");return q?Nc(G,q).then(function(c){return G+="&checksum256="+c}):Promise.resolve(G)}function Ja(m){return"string"===typeof m&&"/"===m.substring(m.length-1)?m.substring(0,m.length-1):m}function pb(m,q){for(var v={},a,G=0,c=q.length;Ga){var g={},h=0,n;for(n in m)hq&&(G=m.substring(0,q),a(f.DEBUG,v+", Key: [ "+m+" ] is longer than accepted length. It will be truncated."));return G}function Nc(m,q){m=(new TextEncoder).encode(m+q);return crypto.subtle.digest("SHA-256",m).then(function(v){return Array.from(new Uint8Array(v)).map(function(a){return a.toString(16).padStart(2,"0")}).join("")})}function E(m,q,v){A&&(null===m||"undefined"===typeof m?Ib()&& console.warn("[WARNING] [Countly] add_event_listener, Can't bind ["+q+"] event to nonexisting element"):"undefined"!==typeof m.addEventListener?m.addEventListener(q,v,!1):m.attachEvent("on"+q,v))}function Jb(m){return m?"undefined"!==typeof m.target?m.target:m.srcElement:window.event.srcElement}function ab(m){if(m)return m;(m=navigator.userAgent)||(m=rc());return m}function rc(m){if(m)return m;m="";navigator.userAgentData&&(m=navigator.userAgentData.brands.map(function(q){return q.brand+":"+q.version}).join(), m+=navigator.userAgentData.mobile?" mobi ":" ",m+=navigator.userAgentData.platform);return m}function sc(m){if(!m){if(navigator.userAgentData&&navigator.userAgentData.mobile)return"phone";m=ab()}m=m.toLowerCase();var q="desktop",v=/(mobi|ipod|phone|blackberry|opera mini|fennec|minimo|symbian|psp|nintendo ds|archos|skyfire|puffin|blazer|bolt|gobrowser|iris|maemo|semc|teashark|uzard)/;/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(m)? q="tablet":v.test(m)&&(q="phone");return q}function Oc(m){var q=/(CountlySiteBot|nuhk|Googlebot|GoogleSecurityScanner|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver|bingbot|Google Web Preview|Mediapartners-Google|AdsBot-Google|Baiduspider|Ezooms|YahooSeeker|AltaVista|AVSearch|Mercator|Scooter|InfoSeek|Ultraseek|Lycos|Wget|YandexBot|Yandex|YaDirectFetcher|SiteBot|Exabot|AhrefsBot|MJ12bot|TurnitinBot|magpie-crawler|Nutch Crawler|CMS Crawler|rogerbot|Domnutch|ssearch_bot|XoviBot|netseer|digincore|fr-crawler|wesee|AliasIO|contxbot|PingdomBot|BingPreview|HeadlessChrome|Lighthouse)/; if(m)return q.test(m);m=q.test(ab());q=q.test(rc());return m||q}function tc(m){"undefined"===typeof m.pageY&&"number"===typeof m.clientX&&document.documentElement&&(m.pageX=m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m.pageY=m.clientY+document.body.scrollTop+document.documentElement.scrollTop);return m}function Kb(){var m=document;return Math.max(Math.max(m.body.scrollHeight,m.documentElement.scrollHeight),Math.max(m.body.offsetHeight,m.documentElement.offsetHeight),Math.max(m.body.clientHeight, m.documentElement.clientHeight))}function uc(){var m=document;return Math.max(Math.max(m.body.scrollWidth,m.documentElement.scrollWidth),Math.max(m.body.offsetWidth,m.documentElement.offsetWidth),Math.max(m.body.clientWidth,m.documentElement.clientWidth))}function Pc(){var m=document;return Math.min(Math.min(m.body.clientHeight,m.documentElement.clientHeight),Math.min(m.body.offsetHeight,m.documentElement.offsetHeight),window.innerHeight)}function Qc(m,q,v,a,G,c){m=document.createElement(m);var d; m.setAttribute(q,v);m.setAttribute(a,G);q=function(){d||c();d=!0};c&&(m.onreadystatechange=q,m.onload=q);document.getElementsByTagName("head")[0].appendChild(m)}function Rc(m,q){Qc("script","type","text/javascript","src",m,q)}function Lb(m,q){Qc("link","rel","stylesheet","href",m,q)}function Sc(){if(A){var m=document.getElementById("cly-loader");if(!m){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText= "#cly-loader {height: 4px; width: 100%; position: absolute; z-index: 99999; overflow: hidden; background-color: #fff; top:0px; left:0px;}#cly-loader:before{display: block; position: absolute; content: ''; left: -200px; width: 200px; height: 4px; background-color: #2EB52B; animation: cly-loading 2s linear infinite;}@keyframes cly-loading { from {left: -200px; width: 30%;} 50% {width: 30%;} 70% {width: 70%;} 80% { left: 50%;} 95% {left: 120%;} to {left: 100%;}}":v.appendChild(document.createTextNode("#cly-loader {height: 4px; width: 100%; position: absolute; z-index: 99999; overflow: hidden; background-color: #fff; top:0px; left:0px;}#cly-loader:before{display: block; position: absolute; content: ''; left: -200px; width: 200px; height: 4px; background-color: #2EB52B; animation: cly-loading 2s linear infinite;}@keyframes cly-loading { from {left: -200px; width: 30%;} 50% {width: 30%;} 70% {width: 70%;} 80% { left: 50%;} 95% {left: 120%;} to {left: 100%;}}")); q.appendChild(v);m=document.createElement("div");m.setAttribute("id","cly-loader");window.addEventListener("load",function(){if(t.showLoaderProtection)Ib()&&console.warn("[WARNING] [Countly] showLoader, Loader is already on");else try{document.body.appendChild(m)}catch(a){Ib()&&console.error("[ERROR] [Countly] showLoader, Body is not loaded for loader to append: "+a)}})}m.style.display="block"}}function Ib(){return t&&t.debug&&"undefined"!==typeof console?!0:!1}function Tc(){if(A){t.showLoaderProtection= !0;var m=document.getElementById("cly-loader");m&&(m.style.display="none")}}function qd(m){var q=document.createElement("script"),v=document.createElement("script");q.async=!0;v.async=!0;q.src=t.customSourceBoomerang||Uc.BOOMERANG_SRC;v.src=t.customSourceCountlyBoomerang||Uc.CLY_BOOMERANG_SRC;document.getElementsByTagName("head")[0].appendChild(q);document.getElementsByTagName("head")[0].appendChild(v);var a=!1,G=!1;q.onload=function(){a=!0};v.onload=function(){G=!0};var c=0,d=setInterval(function(){c+= 50;if(a&&G||1500<=c){if(t.debug){var g="BoomerangJS loaded:["+a+"], countly_boomerang loaded:["+G+"].";a&&G?console.log("[DEBUG] "+g):console.warn("[WARNING] "+g+" Initializing without APM.")}t.init(m);clearInterval(d)}},50)}var R={NPS:"[CLY]_nps",SURVEY:"[CLY]_survey",STAR_RATING:"[CLY]_star_rating",VIEW:"[CLY]_view",ORIENTATION:"[CLY]_orientation",ACTION:"[CLY]_action"},rd=Object.values(R),f={ERROR:"[ERROR] ",WARNING:"[WARNING] ",INFO:"[INFO] ",DEBUG:"[DEBUG] ",VERBOSE:"[VERBOSE] "},Uc={BOOMERANG_SRC:"https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/plugin/boomerang/boomerang.min.js", CLY_BOOMERANG_SRC:"https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/plugin/boomerang/countly_boomerang.js"},Q=Object.freeze({errorCount:"cly_hc_error_count",warningCount:"cly_hc_warning_count",statusCode:"cly_hc_status_code",errorMessage:"cly_hc_error_message",backoffCount:"cly_hc_backoff_count",consecutiveBackoffCount:"cly_hc_consecutive_backoff_count"}),Vc=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?::([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?::([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/, A="undefined"!==typeof window,t=globalThis.Countly||{},Hb=0,qb=new WeakMap,Wc=new WeakMap,bb=new WeakMap,ca=new WeakMap,rb=new WeakMap,Ka=new WeakMap,cb=new WeakMap,L=new WeakMap,O=new WeakMap,V=new WeakMap,sa=new WeakMap,fa=new WeakMap,ha=new WeakMap,sb=new WeakMap,La=new WeakMap,la=new WeakMap,tb=new WeakMap,X=new WeakMap,Ma=new WeakMap,Na=new WeakMap,ub=new WeakMap,db=new WeakMap,Oa=new WeakMap,Da=new WeakMap,ma=new WeakMap,Pa=new WeakMap,eb=new WeakMap,fb=new WeakMap,N=new WeakMap,ia=new WeakMap, ta=new WeakMap,Mb=new WeakMap,ua=new WeakMap,Ea=new WeakMap,J=new WeakMap,Qa=new WeakMap,Ra=new WeakMap,vb=new WeakMap,va=new WeakMap,gb=new WeakMap,na=new WeakMap,wa=new WeakMap,oa=new WeakMap,wb=new WeakMap,M=new WeakMap,xb=new WeakMap,vc=new WeakMap,Sa=new WeakMap,hb=new WeakMap,ib=new WeakMap,jb=new WeakMap,xa=new WeakMap,Nb=new WeakMap,pa=new WeakMap,Fa=new WeakMap,Ta=new WeakMap,kb=new WeakMap,Ob=new WeakMap,lb=new WeakMap,mb=new WeakMap,yb=new WeakMap,zb=new WeakMap,Pb=new WeakMap,Qb=new WeakMap, nb=new WeakMap,Ua=new WeakMap,Rb=new WeakMap,K=new WeakMap,H=new WeakMap,Y=new WeakMap,Va=new WeakMap,ya=new WeakMap,za=new WeakMap,Sb=new WeakMap,Tb=new WeakMap,Ub=new WeakMap,Vb=new WeakMap,Wb=new WeakMap,Xb=new WeakMap,Yb=new WeakMap,wc=new WeakMap,Wa=new WeakMap,Ga=new WeakMap,Xa=new WeakMap,Ab=new WeakMap,Bb=new WeakMap,Cb=new WeakMap,Zb=new WeakMap,$b=new WeakMap,ac=new WeakMap,Xc=new WeakMap,xc=new WeakMap,da=new WeakMap,yc=new WeakMap,ja=new WeakMap,qa=new WeakMap,zc=new WeakMap,Ac=new WeakMap, bc=new WeakMap,cc=new WeakMap,Bc=new WeakMap,Ha=new WeakMap,Yc=new WeakMap,dc=new WeakMap,Zc=new WeakMap,Cc=new WeakMap,$c=new WeakMap,ad=new WeakMap,ec=new WeakMap,Aa=new WeakMap,fc=new WeakMap,Dc=new WeakMap,gc=new WeakMap,bd=new WeakMap,Ec=new WeakMap,Ya=new WeakMap,W=new WeakMap,Db=new WeakMap,cd=new WeakMap,dd=new WeakMap,Ba=new WeakMap,hc=new WeakMap,ed=new WeakMap,Fc=new WeakMap,Eb=new WeakMap,Fb=new WeakMap,ic=new WeakMap,e=new WeakMap,ea=new WeakMap,Gc=new WeakMap,Hc=new WeakMap,jc=new WeakMap, kc=new WeakMap,Ic=new WeakMap,lc=new WeakMap,fd=new WeakMap,Jc=new WeakMap,gd=new WeakMap,hd=new WeakMap,id=new WeakMap,jd=new WeakMap,Kc=new WeakMap,B=new WeakMap,y=new WeakMap,Z=new WeakMap,kd=new WeakMap,ld=new WeakMap,md=new WeakMap,nd=new WeakMap,ka=new WeakMap,od=function(m,q,v){return Object.defineProperty(m,"prototype",{writable:!1}),m}(function v(q){var a=this;if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");p(this,qb,void 0);p(this,Wc,void 0);p(this,bb,void 0); p(this,ca,void 0);p(this,rb,void 0);p(this,Ka,void 0);p(this,cb,void 0);p(this,L,void 0);p(this,O,void 0);p(this,V,void 0);p(this,sa,void 0);p(this,fa,void 0);p(this,ha,void 0);p(this,sb,void 0);p(this,La,void 0);p(this,la,void 0);p(this,tb,void 0);p(this,X,void 0);p(this,Ma,void 0);p(this,Na,void 0);p(this,ub,void 0);p(this,db,void 0);p(this,Oa,void 0);p(this,Da,void 0);p(this,ma,void 0);p(this,Pa,void 0);p(this,eb,void 0);p(this,fb,void 0);p(this,N,void 0);p(this,ia,void 0);p(this,ta,void 0);p(this, Mb,void 0);p(this,ua,void 0);p(this,Ea,void 0);p(this,J,void 0);p(this,Qa,void 0);p(this,Ra,void 0);p(this,vb,void 0);p(this,va,void 0);p(this,gb,void 0);p(this,na,void 0);p(this,wa,void 0);p(this,oa,void 0);p(this,wb,void 0);p(this,M,void 0);p(this,xb,void 0);p(this,vc,void 0);p(this,Sa,void 0);p(this,hb,void 0);p(this,ib,void 0);p(this,jb,void 0);p(this,xa,void 0);p(this,Nb,void 0);p(this,pa,void 0);p(this,Fa,void 0);p(this,Ta,void 0);p(this,kb,void 0);p(this,Ob,void 0);p(this,lb,void 0);p(this, mb,void 0);p(this,yb,void 0);p(this,zb,void 0);p(this,Pb,void 0);p(this,Qb,void 0);p(this,nb,void 0);p(this,Ua,void 0);p(this,Rb,void 0);p(this,K,void 0);p(this,H,void 0);p(this,Y,void 0);p(this,Va,void 0);p(this,ya,void 0);p(this,za,void 0);p(this,Sb,void 0);p(this,Tb,void 0);p(this,Ub,void 0);p(this,Vb,void 0);p(this,Wb,void 0);p(this,Xb,void 0);p(this,Yb,void 0);p(this,wc,void 0);p(this,Wa,void 0);p(this,Ga,void 0);p(this,Xa,void 0);p(this,Ab,void 0);p(this,Bb,void 0);p(this,Cb,void 0);p(this, Zb,void 0);p(this,$b,function(){if("[CLY]_temp_id"===a.device_id)b(e,a).call(a,f.INFO,"server_config, Device ID is temporary, not fetching server config");else if(b(wc,a))b(e,a).call(a,f.INFO,"server_config, SDK behavior sync is disabled, not fetching server config");else{b(e,a).call(a,f.INFO,"server_config, Fetching server config");var c={};c.app_key=a.app_key;c.device_id=a.device_id;c.sdk_version=b(oa,a);c.sdk_name=b(wa,a);c.t=b(J,a);c.timestamp=$a();var d=new Date;c.hour=d.getHours();c.dow=d.getDay(); c.av=a.app_version;c.method="sc";b(ea,a).call(a,"server_config",a.url+b(Ka,a),c,function(g,h,n){if(!g)try{var l=JSON.parse(n);b(e,a).call(a,f.INFO,"server_config, Config fetched successfully:["+JSON.stringify(l)+"]");l&&b(ac,a).call(a,l);b(y,a).call(a,"cly_config",JSON.stringify(l))}catch(r){b(e,a).call(a,f.ERROR,"server_config, Had an issue while parsing the response: "+r)}},!0,!0);setTimeout(function(){b($b,a).call(a)},36E5*b(Ob,a))}});p(this,ac,function(c){c&&c.c&&"object"===U(c.c)&&(c=c.c,c.hasOwnProperty("networking")&& k(Nb,a,c.networking),c.hasOwnProperty("tracking")&&k(lb,a,c.tracking),c.hasOwnProperty("rqs")&&k(pa,a,c.rqs),c.hasOwnProperty("eqs")&&k(Fa,a,c.eqs),c.hasOwnProperty("sui")&&k(Ta,a,c.sui),c.hasOwnProperty("czi")&&14 window.innerHeight?"landscape":"portrait")}})});x(this,"report_conversion",function(c,d){b(e,a).call(a,f.WARNING,"report_conversion, Deprecated function call! Use 'recordDirectAttribution' in place of this call. Call will be redirected now!");a.recordDirectAttribution(c,d)});x(this,"recordDirectAttribution",function(c,d){b(e,a).call(a,f.INFO,"recordDirectAttribution, Recording the attribution for campaign ID: ["+c+"] and the user ID: ["+d+"]");a.check_consent("attribution")&&(c=c||b(B,a).call(a,"cly_cmp_id")|| "cly_organic",(d=d||b(B,a).call(a,"cly_cmp_uid"))?b(W,a).call(a,{campaign_id:c,campaign_user:d}):b(W,a).call(a,{campaign_id:c}))});x(this,"user_details",function(c){b(e,a).call(a,f.INFO,"user_details, Trying to add user details: ",c);a.check_consent("users")&&(b(Ba,a).call(a),b(Aa,a).call(a),b(e,a).call(a,f.INFO,"user_details, flushed the event queue"),c.name=C(c.name,b(H,a),"user_details",b(e,a)),c.username=C(c.username,b(H,a),"user_details",b(e,a)),c.email=C(c.email,b(H,a),"user_details",b(e,a)), c.organization=C(c.organization,b(H,a),"user_details",b(e,a)),c.phone=C(c.phone,b(H,a),"user_details",b(e,a)),c.picture=C(c.picture,4096,"user_details",b(e,a)),c.gender=C(c.gender,b(H,a),"user_details",b(e,a)),c.byear=C(c.byear,b(H,a),"user_details",b(e,a)),c.custom=ra(c.custom,b(K,a),b(H,a),b(Y,a),"user_details",b(e,a)),b(W,a).call(a,{user_details:JSON.stringify(pb(c,"name username email organization phone picture gender byear custom".split(" ")))}))});p(this,ja,{});p(this,qa,function(c,d,g){a.check_consent("users")&& (b(ja,a)[c]||(b(ja,a)[c]={}),"$push"===g||"$pull"===g||"$addToSet"===g?(b(ja,a)[c][g]||(b(ja,a)[c][g]=[]),b(ja,a)[c][g].push(d)):b(ja,a)[c][g]=d)});x(this,"userData",{set:function(c,d){b(e,a).call(a,f.INFO,"[userData] set, Setting user's custom property value: ["+d+"] under the key: ["+c+"]");c=C(c,b(K,a),"userData set",b(e,a));d=C(d,b(H,a),"userData set",b(e,a));b(ja,a)[c]=d},unset:function(c){b(e,a).call(a,f.INFO,"[userData] unset, Resetting user's custom property with key: ["+c+"] ");b(ja,a)[c]= ""},set_once:function(c,d){b(e,a).call(a,f.INFO,"[userData] set_once, Setting user's unique custom property value: ["+d+"] under the key: ["+c+"] ");c=C(c,b(K,a),"userData set_once",b(e,a));d=C(d,b(H,a),"userData set_once",b(e,a));b(qa,a).call(a,c,d,"$setOnce")},increment:function(c){b(e,a).call(a,f.INFO,"[userData] increment, Increasing user's custom property value under the key: ["+c+"] by one");c=C(c,b(K,a),"userData increment",b(e,a));b(qa,a).call(a,c,1,"$inc")},increment_by:function(c,d){b(e, a).call(a,f.INFO,"[userData] increment_by, Increasing user's custom property value under the key: ["+c+"] by: ["+d+"]");c=C(c,b(K,a),"userData increment_by",b(e,a));d=C(d,b(H,a),"userData increment_by",b(e,a));b(qa,a).call(a,c,d,"$inc")},multiply:function(c,d){b(e,a).call(a,f.INFO,"[userData] multiply, Multiplying user's custom property value under the key: ["+c+"] by: ["+d+"]");c=C(c,b(K,a),"userData multiply",b(e,a));d=C(d,b(H,a),"userData multiply",b(e,a));b(qa,a).call(a,c,d,"$mul")},max:function(c, d){b(e,a).call(a,f.INFO,"[userData] max, Saving user's maximum custom property value compared to the value: ["+d+"] under the key: ["+c+"]");c=C(c,b(K,a),"userData max",b(e,a));d=C(d,b(H,a),"userData max",b(e,a));b(qa,a).call(a,c,d,"$max")},min:function(c,d){b(e,a).call(a,f.INFO,"[userData] min, Saving user's minimum custom property value compared to the value: ["+d+"] under the key: ["+c+"]");c=C(c,b(K,a),"userData min",b(e,a));d=C(d,b(H,a),"userData min",b(e,a));b(qa,a).call(a,c,d,"$min")},push:function(c, d){b(e,a).call(a,f.INFO,"[userData] push, Pushing a value: ["+d+"] under the key: ["+c+"] to user's custom property array");c=C(c,b(K,a),"userData push",b(e,a));d=C(d,b(H,a),"userData push",b(e,a));b(qa,a).call(a,c,d,"$push")},push_unique:function(c,d){b(e,a).call(a,f.INFO,"[userData] push_unique, Pushing a unique value: ["+d+"] under the key: ["+c+"] to user's custom property array");c=C(c,b(K,a),"userData push_unique",b(e,a));d=C(d,b(H,a),"userData push_unique",b(e,a));b(qa,a).call(a,c,d,"$addToSet")}, pull:function(c,d){b(e,a).call(a,f.INFO,"[userData] pull, Removing the value: ["+d+"] under the key: ["+c+"] from user's custom property array");b(qa,a).call(a,c,d,"$pull")},save:function(){b(e,a).call(a,f.INFO,"[userData] save, Saving changes to user's custom property");a.check_consent("users")&&(b(Ba,a).call(a),b(Aa,a).call(a),b(e,a).call(a,f.INFO,"user_details, flushed the event queue"),b(W,a).call(a,{user_details:JSON.stringify({custom:b(ja,a)})}));k(ja,a,{})}});x(this,"report_trace",function(c){b(e, a).call(a,f.INFO,"report_trace, Reporting performance trace");if(a.check_consent("apm")){for(var d="type name stz etz apm_metrics apm_attr".split(" "),g=0;g=b(Va,a);)b(sa,a).shift(),b(e,a).call(a,f.WARNING,"add_log, Reached maximum crashLogs size. Will erase the oldest one.");b(sa,a).push(c)}});x(this,"fetch_remote_config",function(c,d,g){var h=null,n=null,l=null;c&&(g||"function"!==typeof c?Array.isArray(c)&&(h=c):l=c);d&&(g||"function"!==typeof d?Array.isArray(d)&& (n=d):l=d);l||"function"!==typeof g||(l=g);a.useExplicitRcApi?(b(e,a).call(a,f.INFO,"fetch_remote_config, Fetching remote config"),c=a.rcAutoOptinAb?1:0,b(zc,a).call(a,h,n,c,null,l)):(b(e,a).call(a,f.WARNING,"fetch_remote_config, Fetching remote config, with legacy API"),b(zc,a).call(a,h,n,null,"legacy",l))});p(this,zc,function(c,d,g,h,n){b(e,a).call(a,f.INFO,"fetch_remote_config_explicit, Fetching sequence initiated");var l={method:"rc",av:a.app_version};c&&(l.keys=JSON.stringify(c));d&&(l.omit_keys= JSON.stringify(d));var r;"legacy"===h&&(l.method="fetch_remote_config");0===g&&(l.oi=0);1===g&&(l.oi=1);"function"===typeof n&&(r=n);a.check_consent("sessions")&&(l.metrics=JSON.stringify(b(Eb,a).call(a)));a.check_consent("remote-config")?(b(Ya,a).call(a,l),b(ea,a).call(a,"fetch_remote_config_explicit",a.url+b(Ka,a),l,function(u,z,D){if(!u){try{var S=JSON.parse(D);if(l.keys||l.omit_keys)for(var T in S)b(V,a)[T]=S[T];else k(V,a,S);b(y,a).call(a,"cly_remote_configs",b(V,a))}catch(Ca){b(e,a).call(a, f.ERROR,"fetch_remote_config_explicit, Had an issue while parsing the response: "+Ca)}r&&(b(e,a).call(a,f.INFO,"fetch_remote_config_explicit, Callback function is provided"),r(u,b(V,a)))}},!0)):(b(e,a).call(a,f.ERROR,"fetch_remote_config_explicit, Remote config requires explicit consent"),r&&r(Error("Remote config requires explicit consent"),b(V,a)))});x(this,"enrollUserToAb",function(c){b(e,a).call(a,f.INFO,"enrollUserToAb, Providing AB test keys to opt in for");c&&Array.isArray(c)&&0!==c.length? (c={method:"ab",keys:JSON.stringify(c),av:a.app_version},b(Ya,a).call(a,c),b(ea,a).call(a,"enrollUserToAb",a.url+b(Ka,a),c,function(d,g,h){if(!d)try{var n=JSON.parse(h);b(e,a).call(a,f.DEBUG,"enrollUserToAb, Parsed the response's result: ["+n.result+"]")}catch(l){b(e,a).call(a,f.ERROR,"enrollUserToAb, Had an issue while parsing the response: "+l)}},!0)):b(e,a).call(a,f.ERROR,"enrollUserToAb, No keys provided")});x(this,"get_remote_config",function(c){b(e,a).call(a,f.INFO,"get_remote_config, Getting remote config from storage"); return"undefined"!==typeof c?b(V,a)[c]:b(V,a)});p(this,Ac,function(){b(e,a).call(a,f.INFO,"stop_time, Stopping tracking duration");b(ta,a)&&(k(ta,a,!1),k(tb,a,I()-b(la,a)),k(Na,a,I()-b(Ma,a)))});p(this,bc,function(){b(e,a).call(a,f.INFO,"start_time, Starting tracking duration");b(ta,a)||(k(ta,a,!0),k(la,a,I()-b(tb,a)),k(Ma,a,I()-b(Na,a)),k(Na,a,0),b(Ec,a).call(a))});x(this,"track_sessions",function(){if(A){b(e,a).call(a,f.INFO,"track_session, Starting tracking user session");a.begin_session();b(bc, a).call(a);E(window,"beforeunload",function(){b(Ba,a).call(a);b(Aa,a).call(a);a.end_session()});var c="hidden",d=function(){document[c]||!document.hasFocus()?b(Ac,a).call(a):b(bc,a).call(a)};E(window,"focus",d);E(window,"blur",d);E(window,"pageshow",d);E(window,"pagehide",d);"onfocusin"in document&&(E(window,"focusin",d),E(window,"focusout",d));c in document?document.addEventListener("visibilitychange",d):"mozHidden"in document?(c="mozHidden",document.addEventListener("mozvisibilitychange",d)):"webkitHidden"in document?(c="webkitHidden",document.addEventListener("webkitvisibilitychange",d)):"msHidden"in document&&(c="msHidden",document.addEventListener("msvisibilitychange",d));d=function(){b(Da,a)>=b(Oa,a)&&b(bc,a).call(a);k(Da,a,0)};E(window,"mousemove",d);E(window,"click",d);E(window,"keydown",d);E(window,"scroll",d);setInterval(function(){var g;k(Da,a,(g=b(Da,a),g++,g));b(Da,a)>=b(Oa,a)&&b(Ac,a).call(a)},6E4)}else b(e,a).call(a,f.WARNING,"track_sessions, window object is not available. Not tracking sessions.")}); x(this,"track_pageview",function(c,d,g){if(A||c)if(b(yb,a))if(b(e,a).call(a,f.INFO,"track_pageview, Tracking page views"),b(e,a).call(a,f.VERBOSE,"track_pageview, last view is:["+b(X,a)+"], current view ID is:["+b(va,a)+"], previous view ID is:["+b(gb,a)+"]"),b(X,a)&&b(vb,a)&&(b(e,a).call(a,f.DEBUG,"track_pageview, Scroll registry triggered"),b(lc,a).call(a),k(Qa,a,!0),k(Ra,a,0)),b(gc,a).call(a),k(gb,a,b(va,a)),k(va,a,nc()),(c=C(c,b(K,a),"track_pageview",b(e,a)))&&Array.isArray(c)&&(d=c,c=null),c|| (c=a.getViewName()),void 0===c||""===c)b(e,a).call(a,f.ERROR,"track_pageview, No page name to track (it is either undefined or empty string). No page view can be tracked.");else if(null===c)b(e,a).call(a,f.ERROR,"track_pageview, View name returned as null. Page view will be ignored.");else{if(d&&d.length)for(var h=0;h